Connecteur COZY permettant de récupérer et stocker ses factures Enercoop.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

101472 lines
3.4 MiB

  1. /******/ (function(modules) { // webpackBootstrap
  2. /******/ // The module cache
  3. /******/ var installedModules = {};
  4. /******/
  5. /******/ // The require function
  6. /******/ function __webpack_require__(moduleId) {
  7. /******/
  8. /******/ // Check if module is in cache
  9. /******/ if(installedModules[moduleId]) {
  10. /******/ return installedModules[moduleId].exports;
  11. /******/ }
  12. /******/ // Create a new module (and put it into the cache)
  13. /******/ var module = installedModules[moduleId] = {
  14. /******/ i: moduleId,
  15. /******/ l: false,
  16. /******/ exports: {}
  17. /******/ };
  18. /******/
  19. /******/ // Execute the module function
  20. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  21. /******/
  22. /******/ // Flag the module as loaded
  23. /******/ module.l = true;
  24. /******/
  25. /******/ // Return the exports of the module
  26. /******/ return module.exports;
  27. /******/ }
  28. /******/
  29. /******/
  30. /******/ // expose the modules object (__webpack_modules__)
  31. /******/ __webpack_require__.m = modules;
  32. /******/
  33. /******/ // expose the module cache
  34. /******/ __webpack_require__.c = installedModules;
  35. /******/
  36. /******/ // define getter function for harmony exports
  37. /******/ __webpack_require__.d = function(exports, name, getter) {
  38. /******/ if(!__webpack_require__.o(exports, name)) {
  39. /******/ Object.defineProperty(exports, name, {
  40. /******/ configurable: false,
  41. /******/ enumerable: true,
  42. /******/ get: getter
  43. /******/ });
  44. /******/ }
  45. /******/ };
  46. /******/
  47. /******/ // getDefaultExport function for compatibility with non-harmony modules
  48. /******/ __webpack_require__.n = function(module) {
  49. /******/ var getter = module && module.__esModule ?
  50. /******/ function getDefault() { return module['default']; } :
  51. /******/ function getModuleExports() { return module; };
  52. /******/ __webpack_require__.d(getter, 'a', getter);
  53. /******/ return getter;
  54. /******/ };
  55. /******/
  56. /******/ // Object.prototype.hasOwnProperty.call
  57. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  58. /******/
  59. /******/ // __webpack_public_path__
  60. /******/ __webpack_require__.p = "";
  61. /******/
  62. /******/ // Load entry module and return exports
  63. /******/ return __webpack_require__(__webpack_require__.s = 474);
  64. /******/ })
  65. /************************************************************************/
  66. /******/ ([
  67. /* 0 */
  68. /***/ (function(module, exports, __webpack_require__) {
  69. /* WEBPACK VAR INJECTION */(function(module) {var require;//! moment.js
  70. //! version : 2.20.1
  71. //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
  72. //! license : MIT
  73. //! momentjs.com
  74. ;(function (global, factory) {
  75. true ? module.exports = factory() :
  76. typeof define === 'function' && define.amd ? define(factory) :
  77. global.moment = factory()
  78. }(this, (function () { 'use strict';
  79. var hookCallback;
  80. function hooks () {
  81. return hookCallback.apply(null, arguments);
  82. }
  83. // This is done to register the method called with moment()
  84. // without creating circular dependencies.
  85. function setHookCallback (callback) {
  86. hookCallback = callback;
  87. }
  88. function isArray(input) {
  89. return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';
  90. }
  91. function isObject(input) {
  92. // IE8 will treat undefined and null as object if it wasn't for
  93. // input != null
  94. return input != null && Object.prototype.toString.call(input) === '[object Object]';
  95. }
  96. function isObjectEmpty(obj) {
  97. if (Object.getOwnPropertyNames) {
  98. return (Object.getOwnPropertyNames(obj).length === 0);
  99. } else {
  100. var k;
  101. for (k in obj) {
  102. if (obj.hasOwnProperty(k)) {
  103. return false;
  104. }
  105. }
  106. return true;
  107. }
  108. }
  109. function isUndefined(input) {
  110. return input === void 0;
  111. }
  112. function isNumber(input) {
  113. return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
  114. }
  115. function isDate(input) {
  116. return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
  117. }
  118. function map(arr, fn) {
  119. var res = [], i;
  120. for (i = 0; i < arr.length; ++i) {
  121. res.push(fn(arr[i], i));
  122. }
  123. return res;
  124. }
  125. function hasOwnProp(a, b) {
  126. return Object.prototype.hasOwnProperty.call(a, b);
  127. }
  128. function extend(a, b) {
  129. for (var i in b) {
  130. if (hasOwnProp(b, i)) {
  131. a[i] = b[i];
  132. }
  133. }
  134. if (hasOwnProp(b, 'toString')) {
  135. a.toString = b.toString;
  136. }
  137. if (hasOwnProp(b, 'valueOf')) {
  138. a.valueOf = b.valueOf;
  139. }
  140. return a;
  141. }
  142. function createUTC (input, format, locale, strict) {
  143. return createLocalOrUTC(input, format, locale, strict, true).utc();
  144. }
  145. function defaultParsingFlags() {
  146. // We need to deep clone this object.
  147. return {
  148. empty : false,
  149. unusedTokens : [],
  150. unusedInput : [],
  151. overflow : -2,
  152. charsLeftOver : 0,
  153. nullInput : false,
  154. invalidMonth : null,
  155. invalidFormat : false,
  156. userInvalidated : false,
  157. iso : false,
  158. parsedDateParts : [],
  159. meridiem : null,
  160. rfc2822 : false,
  161. weekdayMismatch : false
  162. };
  163. }
  164. function getParsingFlags(m) {
  165. if (m._pf == null) {
  166. m._pf = defaultParsingFlags();
  167. }
  168. return m._pf;
  169. }
  170. var some;
  171. if (Array.prototype.some) {
  172. some = Array.prototype.some;
  173. } else {
  174. some = function (fun) {
  175. var t = Object(this);
  176. var len = t.length >>> 0;
  177. for (var i = 0; i < len; i++) {
  178. if (i in t && fun.call(this, t[i], i, t)) {
  179. return true;
  180. }
  181. }
  182. return false;
  183. };
  184. }
  185. function isValid(m) {
  186. if (m._isValid == null) {
  187. var flags = getParsingFlags(m);
  188. var parsedParts = some.call(flags.parsedDateParts, function (i) {
  189. return i != null;
  190. });
  191. var isNowValid = !isNaN(m._d.getTime()) &&
  192. flags.overflow < 0 &&
  193. !flags.empty &&
  194. !flags.invalidMonth &&
  195. !flags.invalidWeekday &&
  196. !flags.weekdayMismatch &&
  197. !flags.nullInput &&
  198. !flags.invalidFormat &&
  199. !flags.userInvalidated &&
  200. (!flags.meridiem || (flags.meridiem && parsedParts));
  201. if (m._strict) {
  202. isNowValid = isNowValid &&
  203. flags.charsLeftOver === 0 &&
  204. flags.unusedTokens.length === 0 &&
  205. flags.bigHour === undefined;
  206. }
  207. if (Object.isFrozen == null || !Object.isFrozen(m)) {
  208. m._isValid = isNowValid;
  209. }
  210. else {
  211. return isNowValid;
  212. }
  213. }
  214. return m._isValid;
  215. }
  216. function createInvalid (flags) {
  217. var m = createUTC(NaN);
  218. if (flags != null) {
  219. extend(getParsingFlags(m), flags);
  220. }
  221. else {
  222. getParsingFlags(m).userInvalidated = true;
  223. }
  224. return m;
  225. }
  226. // Plugins that add properties should also add the key here (null value),
  227. // so we can properly clone ourselves.
  228. var momentProperties = hooks.momentProperties = [];
  229. function copyConfig(to, from) {
  230. var i, prop, val;
  231. if (!isUndefined(from._isAMomentObject)) {
  232. to._isAMomentObject = from._isAMomentObject;
  233. }
  234. if (!isUndefined(from._i)) {
  235. to._i = from._i;
  236. }
  237. if (!isUndefined(from._f)) {
  238. to._f = from._f;
  239. }
  240. if (!isUndefined(from._l)) {
  241. to._l = from._l;
  242. }
  243. if (!isUndefined(from._strict)) {
  244. to._strict = from._strict;
  245. }
  246. if (!isUndefined(from._tzm)) {
  247. to._tzm = from._tzm;
  248. }
  249. if (!isUndefined(from._isUTC)) {
  250. to._isUTC = from._isUTC;
  251. }
  252. if (!isUndefined(from._offset)) {
  253. to._offset = from._offset;
  254. }
  255. if (!isUndefined(from._pf)) {
  256. to._pf = getParsingFlags(from);
  257. }
  258. if (!isUndefined(from._locale)) {
  259. to._locale = from._locale;
  260. }
  261. if (momentProperties.length > 0) {
  262. for (i = 0; i < momentProperties.length; i++) {
  263. prop = momentProperties[i];
  264. val = from[prop];
  265. if (!isUndefined(val)) {
  266. to[prop] = val;
  267. }
  268. }
  269. }
  270. return to;
  271. }
  272. var updateInProgress = false;
  273. // Moment prototype object
  274. function Moment(config) {
  275. copyConfig(this, config);
  276. this._d = new Date(config._d != null ? config._d.getTime() : NaN);
  277. if (!this.isValid()) {
  278. this._d = new Date(NaN);
  279. }
  280. // Prevent infinite loop in case updateOffset creates new moment
  281. // objects.
  282. if (updateInProgress === false) {
  283. updateInProgress = true;
  284. hooks.updateOffset(this);
  285. updateInProgress = false;
  286. }
  287. }
  288. function isMoment (obj) {
  289. return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);
  290. }
  291. function absFloor (number) {
  292. if (number < 0) {
  293. // -0 -> 0
  294. return Math.ceil(number) || 0;
  295. } else {
  296. return Math.floor(number);
  297. }
  298. }
  299. function toInt(argumentForCoercion) {
  300. var coercedNumber = +argumentForCoercion,
  301. value = 0;
  302. if (coercedNumber !== 0 && isFinite(coercedNumber)) {
  303. value = absFloor(coercedNumber);
  304. }
  305. return value;
  306. }
  307. // compare two arrays, return the number of differences
  308. function compareArrays(array1, array2, dontConvert) {
  309. var len = Math.min(array1.length, array2.length),
  310. lengthDiff = Math.abs(array1.length - array2.length),
  311. diffs = 0,
  312. i;
  313. for (i = 0; i < len; i++) {
  314. if ((dontConvert && array1[i] !== array2[i]) ||
  315. (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
  316. diffs++;
  317. }
  318. }
  319. return diffs + lengthDiff;
  320. }
  321. function warn(msg) {
  322. if (hooks.suppressDeprecationWarnings === false &&
  323. (typeof console !== 'undefined') && console.warn) {
  324. console.warn('Deprecation warning: ' + msg);
  325. }
  326. }
  327. function deprecate(msg, fn) {
  328. var firstTime = true;
  329. return extend(function () {
  330. if (hooks.deprecationHandler != null) {
  331. hooks.deprecationHandler(null, msg);
  332. }
  333. if (firstTime) {
  334. var args = [];
  335. var arg;
  336. for (var i = 0; i < arguments.length; i++) {
  337. arg = '';
  338. if (typeof arguments[i] === 'object') {
  339. arg += '\n[' + i + '] ';
  340. for (var key in arguments[0]) {
  341. arg += key + ': ' + arguments[0][key] + ', ';
  342. }
  343. arg = arg.slice(0, -2); // Remove trailing comma and space
  344. } else {
  345. arg = arguments[i];
  346. }
  347. args.push(arg);
  348. }
  349. warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack);
  350. firstTime = false;
  351. }
  352. return fn.apply(this, arguments);
  353. }, fn);
  354. }
  355. var deprecations = {};
  356. function deprecateSimple(name, msg) {
  357. if (hooks.deprecationHandler != null) {
  358. hooks.deprecationHandler(name, msg);
  359. }
  360. if (!deprecations[name]) {
  361. warn(msg);
  362. deprecations[name] = true;
  363. }
  364. }
  365. hooks.suppressDeprecationWarnings = false;
  366. hooks.deprecationHandler = null;
  367. function isFunction(input) {
  368. return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
  369. }
  370. function set (config) {
  371. var prop, i;
  372. for (i in config) {
  373. prop = config[i];
  374. if (isFunction(prop)) {
  375. this[i] = prop;
  376. } else {
  377. this['_' + i] = prop;
  378. }
  379. }
  380. this._config = config;
  381. // Lenient ordinal parsing accepts just a number in addition to
  382. // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
  383. // TODO: Remove "ordinalParse" fallback in next major release.
  384. this._dayOfMonthOrdinalParseLenient = new RegExp(
  385. (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
  386. '|' + (/\d{1,2}/).source);
  387. }
  388. function mergeConfigs(parentConfig, childConfig) {
  389. var res = extend({}, parentConfig), prop;
  390. for (prop in childConfig) {
  391. if (hasOwnProp(childConfig, prop)) {
  392. if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
  393. res[prop] = {};
  394. extend(res[prop], parentConfig[prop]);
  395. extend(res[prop], childConfig[prop]);
  396. } else if (childConfig[prop] != null) {
  397. res[prop] = childConfig[prop];
  398. } else {
  399. delete res[prop];
  400. }
  401. }
  402. }
  403. for (prop in parentConfig) {
  404. if (hasOwnProp(parentConfig, prop) &&
  405. !hasOwnProp(childConfig, prop) &&
  406. isObject(parentConfig[prop])) {
  407. // make sure changes to properties don't modify parent config
  408. res[prop] = extend({}, res[prop]);
  409. }
  410. }
  411. return res;
  412. }
  413. function Locale(config) {
  414. if (config != null) {
  415. this.set(config);
  416. }
  417. }
  418. var keys;
  419. if (Object.keys) {
  420. keys = Object.keys;
  421. } else {
  422. keys = function (obj) {
  423. var i, res = [];
  424. for (i in obj) {
  425. if (hasOwnProp(obj, i)) {
  426. res.push(i);
  427. }
  428. }
  429. return res;
  430. };
  431. }
  432. var defaultCalendar = {
  433. sameDay : '[Today at] LT',
  434. nextDay : '[Tomorrow at] LT',
  435. nextWeek : 'dddd [at] LT',
  436. lastDay : '[Yesterday at] LT',
  437. lastWeek : '[Last] dddd [at] LT',
  438. sameElse : 'L'
  439. };
  440. function calendar (key, mom, now) {
  441. var output = this._calendar[key] || this._calendar['sameElse'];
  442. return isFunction(output) ? output.call(mom, now) : output;
  443. }
  444. var defaultLongDateFormat = {
  445. LTS : 'h:mm:ss A',
  446. LT : 'h:mm A',
  447. L : 'MM/DD/YYYY',
  448. LL : 'MMMM D, YYYY',
  449. LLL : 'MMMM D, YYYY h:mm A',
  450. LLLL : 'dddd, MMMM D, YYYY h:mm A'
  451. };
  452. function longDateFormat (key) {
  453. var format = this._longDateFormat[key],
  454. formatUpper = this._longDateFormat[key.toUpperCase()];
  455. if (format || !formatUpper) {
  456. return format;
  457. }
  458. this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {
  459. return val.slice(1);
  460. });
  461. return this._longDateFormat[key];
  462. }
  463. var defaultInvalidDate = 'Invalid date';
  464. function invalidDate () {
  465. return this._invalidDate;
  466. }
  467. var defaultOrdinal = '%d';
  468. var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
  469. function ordinal (number) {
  470. return this._ordinal.replace('%d', number);
  471. }
  472. var defaultRelativeTime = {
  473. future : 'in %s',
  474. past : '%s ago',
  475. s : 'a few seconds',
  476. ss : '%d seconds',
  477. m : 'a minute',
  478. mm : '%d minutes',
  479. h : 'an hour',
  480. hh : '%d hours',
  481. d : 'a day',
  482. dd : '%d days',
  483. M : 'a month',
  484. MM : '%d months',
  485. y : 'a year',
  486. yy : '%d years'
  487. };
  488. function relativeTime (number, withoutSuffix, string, isFuture) {
  489. var output = this._relativeTime[string];
  490. return (isFunction(output)) ?
  491. output(number, withoutSuffix, string, isFuture) :
  492. output.replace(/%d/i, number);
  493. }
  494. function pastFuture (diff, output) {
  495. var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
  496. return isFunction(format) ? format(output) : format.replace(/%s/i, output);
  497. }
  498. var aliases = {};
  499. function addUnitAlias (unit, shorthand) {
  500. var lowerCase = unit.toLowerCase();
  501. aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
  502. }
  503. function normalizeUnits(units) {
  504. return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
  505. }
  506. function normalizeObjectUnits(inputObject) {
  507. var normalizedInput = {},
  508. normalizedProp,
  509. prop;
  510. for (prop in inputObject) {
  511. if (hasOwnProp(inputObject, prop)) {
  512. normalizedProp = normalizeUnits(prop);
  513. if (normalizedProp) {
  514. normalizedInput[normalizedProp] = inputObject[prop];
  515. }
  516. }
  517. }
  518. return normalizedInput;
  519. }
  520. var priorities = {};
  521. function addUnitPriority(unit, priority) {
  522. priorities[unit] = priority;
  523. }
  524. function getPrioritizedUnits(unitsObj) {
  525. var units = [];
  526. for (var u in unitsObj) {
  527. units.push({unit: u, priority: priorities[u]});
  528. }
  529. units.sort(function (a, b) {
  530. return a.priority - b.priority;
  531. });
  532. return units;
  533. }
  534. function zeroFill(number, targetLength, forceSign) {
  535. var absNumber = '' + Math.abs(number),
  536. zerosToFill = targetLength - absNumber.length,
  537. sign = number >= 0;
  538. return (sign ? (forceSign ? '+' : '') : '-') +
  539. Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
  540. }
  541. var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;
  542. var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
  543. var formatFunctions = {};
  544. var formatTokenFunctions = {};
  545. // token: 'M'
  546. // padded: ['MM', 2]
  547. // ordinal: 'Mo'
  548. // callback: function () { this.month() + 1 }
  549. function addFormatToken (token, padded, ordinal, callback) {
  550. var func = callback;
  551. if (typeof callback === 'string') {
  552. func = function () {
  553. return this[callback]();
  554. };
  555. }
  556. if (token) {
  557. formatTokenFunctions[token] = func;
  558. }
  559. if (padded) {
  560. formatTokenFunctions[padded[0]] = function () {
  561. return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
  562. };
  563. }
  564. if (ordinal) {
  565. formatTokenFunctions[ordinal] = function () {
  566. return this.localeData().ordinal(func.apply(this, arguments), token);
  567. };
  568. }
  569. }
  570. function removeFormattingTokens(input) {
  571. if (input.match(/\[[\s\S]/)) {
  572. return input.replace(/^\[|\]$/g, '');
  573. }
  574. return input.replace(/\\/g, '');
  575. }
  576. function makeFormatFunction(format) {
  577. var array = format.match(formattingTokens), i, length;
  578. for (i = 0, length = array.length; i < length; i++) {
  579. if (formatTokenFunctions[array[i]]) {
  580. array[i] = formatTokenFunctions[array[i]];
  581. } else {
  582. array[i] = removeFormattingTokens(array[i]);
  583. }
  584. }
  585. return function (mom) {
  586. var output = '', i;
  587. for (i = 0; i < length; i++) {
  588. output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];
  589. }
  590. return output;
  591. };
  592. }
  593. // format date using native date object
  594. function formatMoment(m, format) {
  595. if (!m.isValid()) {
  596. return m.localeData().invalidDate();
  597. }
  598. format = expandFormat(format, m.localeData());
  599. formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
  600. return formatFunctions[format](m);
  601. }
  602. function expandFormat(format, locale) {
  603. var i = 5;
  604. function replaceLongDateFormatTokens(input) {
  605. return locale.longDateFormat(input) || input;
  606. }
  607. localFormattingTokens.lastIndex = 0;
  608. while (i >= 0 && localFormattingTokens.test(format)) {
  609. format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
  610. localFormattingTokens.lastIndex = 0;
  611. i -= 1;
  612. }
  613. return format;
  614. }
  615. var match1 = /\d/; // 0 - 9
  616. var match2 = /\d\d/; // 00 - 99
  617. var match3 = /\d{3}/; // 000 - 999
  618. var match4 = /\d{4}/; // 0000 - 9999
  619. var match6 = /[+-]?\d{6}/; // -999999 - 999999
  620. var match1to2 = /\d\d?/; // 0 - 99
  621. var match3to4 = /\d\d\d\d?/; // 999 - 9999
  622. var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999
  623. var match1to3 = /\d{1,3}/; // 0 - 999
  624. var match1to4 = /\d{1,4}/; // 0 - 9999
  625. var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999
  626. var matchUnsigned = /\d+/; // 0 - inf
  627. var matchSigned = /[+-]?\d+/; // -inf - inf
  628. var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z
  629. var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z
  630. var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123
  631. // any word (or two) characters or numbers including two/three word month in arabic.
  632. // includes scottish gaelic two word and hyphenated months
  633. var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;
  634. var regexes = {};
  635. function addRegexToken (token, regex, strictRegex) {
  636. regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {
  637. return (isStrict && strictRegex) ? strictRegex : regex;
  638. };
  639. }
  640. function getParseRegexForToken (token, config) {
  641. if (!hasOwnProp(regexes, token)) {
  642. return new RegExp(unescapeFormat(token));
  643. }
  644. return regexes[token](config._strict, config._locale);
  645. }
  646. // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
  647. function unescapeFormat(s) {
  648. return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
  649. return p1 || p2 || p3 || p4;
  650. }));
  651. }
  652. function regexEscape(s) {
  653. return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
  654. }
  655. var tokens = {};
  656. function addParseToken (token, callback) {
  657. var i, func = callback;
  658. if (typeof token === 'string') {
  659. token = [token];
  660. }
  661. if (isNumber(callback)) {
  662. func = function (input, array) {
  663. array[callback] = toInt(input);
  664. };
  665. }
  666. for (i = 0; i < token.length; i++) {
  667. tokens[token[i]] = func;
  668. }
  669. }
  670. function addWeekParseToken (token, callback) {
  671. addParseToken(token, function (input, array, config, token) {
  672. config._w = config._w || {};
  673. callback(input, config._w, config, token);
  674. });
  675. }
  676. function addTimeToArrayFromToken(token, input, config) {
  677. if (input != null && hasOwnProp(tokens, token)) {
  678. tokens[token](input, config._a, config, token);
  679. }
  680. }
  681. var YEAR = 0;
  682. var MONTH = 1;
  683. var DATE = 2;
  684. var HOUR = 3;
  685. var MINUTE = 4;
  686. var SECOND = 5;
  687. var MILLISECOND = 6;
  688. var WEEK = 7;
  689. var WEEKDAY = 8;
  690. // FORMATTING
  691. addFormatToken('Y', 0, 0, function () {
  692. var y = this.year();
  693. return y <= 9999 ? '' + y : '+' + y;
  694. });
  695. addFormatToken(0, ['YY', 2], 0, function () {
  696. return this.year() % 100;
  697. });
  698. addFormatToken(0, ['YYYY', 4], 0, 'year');
  699. addFormatToken(0, ['YYYYY', 5], 0, 'year');
  700. addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
  701. // ALIASES
  702. addUnitAlias('year', 'y');
  703. // PRIORITIES
  704. addUnitPriority('year', 1);
  705. // PARSING
  706. addRegexToken('Y', matchSigned);
  707. addRegexToken('YY', match1to2, match2);
  708. addRegexToken('YYYY', match1to4, match4);
  709. addRegexToken('YYYYY', match1to6, match6);
  710. addRegexToken('YYYYYY', match1to6, match6);
  711. addParseToken(['YYYYY', 'YYYYYY'], YEAR);
  712. addParseToken('YYYY', function (input, array) {
  713. array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
  714. });
  715. addParseToken('YY', function (input, array) {
  716. array[YEAR] = hooks.parseTwoDigitYear(input);
  717. });
  718. addParseToken('Y', function (input, array) {
  719. array[YEAR] = parseInt(input, 10);
  720. });
  721. // HELPERS
  722. function daysInYear(year) {
  723. return isLeapYear(year) ? 366 : 365;
  724. }
  725. function isLeapYear(year) {
  726. return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
  727. }
  728. // HOOKS
  729. hooks.parseTwoDigitYear = function (input) {
  730. return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
  731. };
  732. // MOMENTS
  733. var getSetYear = makeGetSet('FullYear', true);
  734. function getIsLeapYear () {
  735. return isLeapYear(this.year());
  736. }
  737. function makeGetSet (unit, keepTime) {
  738. return function (value) {
  739. if (value != null) {
  740. set$1(this, unit, value);
  741. hooks.updateOffset(this, keepTime);
  742. return this;
  743. } else {
  744. return get(this, unit);
  745. }
  746. };
  747. }
  748. function get (mom, unit) {
  749. return mom.isValid() ?
  750. mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
  751. }
  752. function set$1 (mom, unit, value) {
  753. if (mom.isValid() && !isNaN(value)) {
  754. if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {
  755. mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));
  756. }
  757. else {
  758. mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
  759. }
  760. }
  761. }
  762. // MOMENTS
  763. function stringGet (units) {
  764. units = normalizeUnits(units);
  765. if (isFunction(this[units])) {
  766. return this[units]();
  767. }
  768. return this;
  769. }
  770. function stringSet (units, value) {
  771. if (typeof units === 'object') {
  772. units = normalizeObjectUnits(units);
  773. var prioritized = getPrioritizedUnits(units);
  774. for (var i = 0; i < prioritized.length; i++) {
  775. this[prioritized[i].unit](units[prioritized[i].unit]);
  776. }
  777. } else {
  778. units = normalizeUnits(units);
  779. if (isFunction(this[units])) {
  780. return this[units](value);
  781. }
  782. }
  783. return this;
  784. }
  785. function mod(n, x) {
  786. return ((n % x) + x) % x;
  787. }
  788. var indexOf;
  789. if (Array.prototype.indexOf) {
  790. indexOf = Array.prototype.indexOf;
  791. } else {
  792. indexOf = function (o) {
  793. // I know
  794. var i;
  795. for (i = 0; i < this.length; ++i) {
  796. if (this[i] === o) {
  797. return i;
  798. }
  799. }
  800. return -1;
  801. };
  802. }
  803. function daysInMonth(year, month) {
  804. if (isNaN(year) || isNaN(month)) {
  805. return NaN;
  806. }
  807. var modMonth = mod(month, 12);
  808. year += (month - modMonth) / 12;
  809. return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2);
  810. }
  811. // FORMATTING
  812. addFormatToken('M', ['MM', 2], 'Mo', function () {
  813. return this.month() + 1;
  814. });
  815. addFormatToken('MMM', 0, 0, function (format) {
  816. return this.localeData().monthsShort(this, format);
  817. });
  818. addFormatToken('MMMM', 0, 0, function (format) {
  819. return this.localeData().months(this, format);
  820. });
  821. // ALIASES
  822. addUnitAlias('month', 'M');
  823. // PRIORITY
  824. addUnitPriority('month', 8);
  825. // PARSING
  826. addRegexToken('M', match1to2);
  827. addRegexToken('MM', match1to2, match2);
  828. addRegexToken('MMM', function (isStrict, locale) {
  829. return locale.monthsShortRegex(isStrict);
  830. });
  831. addRegexToken('MMMM', function (isStrict, locale) {
  832. return locale.monthsRegex(isStrict);
  833. });
  834. addParseToken(['M', 'MM'], function (input, array) {
  835. array[MONTH] = toInt(input) - 1;
  836. });
  837. addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
  838. var month = config._locale.monthsParse(input, token, config._strict);
  839. // if we didn't find a month name, mark the date as invalid.
  840. if (month != null) {
  841. array[MONTH] = month;
  842. } else {
  843. getParsingFlags(config).invalidMonth = input;
  844. }
  845. });
  846. // LOCALES
  847. var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;
  848. var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
  849. function localeMonths (m, format) {
  850. if (!m) {
  851. return isArray(this._months) ? this._months :
  852. this._months['standalone'];
  853. }
  854. return isArray(this._months) ? this._months[m.month()] :
  855. this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
  856. }
  857. var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
  858. function localeMonthsShort (m, format) {
  859. if (!m) {
  860. return isArray(this._monthsShort) ? this._monthsShort :
  861. this._monthsShort['standalone'];
  862. }
  863. return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
  864. this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
  865. }
  866. function handleStrictParse(monthName, format, strict) {
  867. var i, ii, mom, llc = monthName.toLocaleLowerCase();
  868. if (!this._monthsParse) {
  869. // this is not used
  870. this._monthsParse = [];
  871. this._longMonthsParse = [];
  872. this._shortMonthsParse = [];
  873. for (i = 0; i < 12; ++i) {
  874. mom = createUTC([2000, i]);
  875. this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
  876. this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
  877. }
  878. }
  879. if (strict) {
  880. if (format === 'MMM') {
  881. ii = indexOf.call(this._shortMonthsParse, llc);
  882. return ii !== -1 ? ii : null;
  883. } else {
  884. ii = indexOf.call(this._longMonthsParse, llc);
  885. return ii !== -1 ? ii : null;
  886. }
  887. } else {
  888. if (format === 'MMM') {
  889. ii = indexOf.call(this._shortMonthsParse, llc);
  890. if (ii !== -1) {
  891. return ii;
  892. }
  893. ii = indexOf.call(this._longMonthsParse, llc);
  894. return ii !== -1 ? ii : null;
  895. } else {
  896. ii = indexOf.call(this._longMonthsParse, llc);
  897. if (ii !== -1) {
  898. return ii;
  899. }
  900. ii = indexOf.call(this._shortMonthsParse, llc);
  901. return ii !== -1 ? ii : null;
  902. }
  903. }
  904. }
  905. function localeMonthsParse (monthName, format, strict) {
  906. var i, mom, regex;
  907. if (this._monthsParseExact) {
  908. return handleStrictParse.call(this, monthName, format, strict);
  909. }
  910. if (!this._monthsParse) {
  911. this._monthsParse = [];
  912. this._longMonthsParse = [];
  913. this._shortMonthsParse = [];
  914. }
  915. // TODO: add sorting
  916. // Sorting makes sure if one month (or abbr) is a prefix of another
  917. // see sorting in computeMonthsParse
  918. for (i = 0; i < 12; i++) {
  919. // make the regex if we don't have it already
  920. mom = createUTC([2000, i]);
  921. if (strict && !this._longMonthsParse[i]) {
  922. this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
  923. this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
  924. }
  925. if (!strict && !this._monthsParse[i]) {
  926. regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
  927. this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
  928. }
  929. // test the regex
  930. if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
  931. return i;
  932. } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
  933. return i;
  934. } else if (!strict && this._monthsParse[i].test(monthName)) {
  935. return i;
  936. }
  937. }
  938. }
  939. // MOMENTS
  940. function setMonth (mom, value) {
  941. var dayOfMonth;
  942. if (!mom.isValid()) {
  943. // No op
  944. return mom;
  945. }
  946. if (typeof value === 'string') {
  947. if (/^\d+$/.test(value)) {
  948. value = toInt(value);
  949. } else {
  950. value = mom.localeData().monthsParse(value);
  951. // TODO: Another silent failure?
  952. if (!isNumber(value)) {
  953. return mom;
  954. }
  955. }
  956. }
  957. dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
  958. mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
  959. return mom;
  960. }
  961. function getSetMonth (value) {
  962. if (value != null) {
  963. setMonth(this, value);
  964. hooks.updateOffset(this, true);
  965. return this;
  966. } else {
  967. return get(this, 'Month');
  968. }
  969. }
  970. function getDaysInMonth () {
  971. return daysInMonth(this.year(), this.month());
  972. }
  973. var defaultMonthsShortRegex = matchWord;
  974. function monthsShortRegex (isStrict) {
  975. if (this._monthsParseExact) {
  976. if (!hasOwnProp(this, '_monthsRegex')) {
  977. computeMonthsParse.call(this);
  978. }
  979. if (isStrict) {
  980. return this._monthsShortStrictRegex;
  981. } else {
  982. return this._monthsShortRegex;
  983. }
  984. } else {
  985. if (!hasOwnProp(this, '_monthsShortRegex')) {
  986. this._monthsShortRegex = defaultMonthsShortRegex;
  987. }
  988. return this._monthsShortStrictRegex && isStrict ?
  989. this._monthsShortStrictRegex : this._monthsShortRegex;
  990. }
  991. }
  992. var defaultMonthsRegex = matchWord;
  993. function monthsRegex (isStrict) {
  994. if (this._monthsParseExact) {
  995. if (!hasOwnProp(this, '_monthsRegex')) {
  996. computeMonthsParse.call(this);
  997. }
  998. if (isStrict) {
  999. return this._monthsStrictRegex;
  1000. } else {
  1001. return this._monthsRegex;
  1002. }
  1003. } else {
  1004. if (!hasOwnProp(this, '_monthsRegex')) {
  1005. this._monthsRegex = defaultMonthsRegex;
  1006. }
  1007. return this._monthsStrictRegex && isStrict ?
  1008. this._monthsStrictRegex : this._monthsRegex;
  1009. }
  1010. }
  1011. function computeMonthsParse () {
  1012. function cmpLenRev(a, b) {
  1013. return b.length - a.length;
  1014. }
  1015. var shortPieces = [], longPieces = [], mixedPieces = [],
  1016. i, mom;
  1017. for (i = 0; i < 12; i++) {
  1018. // make the regex if we don't have it already
  1019. mom = createUTC([2000, i]);
  1020. shortPieces.push(this.monthsShort(mom, ''));
  1021. longPieces.push(this.months(mom, ''));
  1022. mixedPieces.push(this.months(mom, ''));
  1023. mixedPieces.push(this.monthsShort(mom, ''));
  1024. }
  1025. // Sorting makes sure if one month (or abbr) is a prefix of another it
  1026. // will match the longer piece.
  1027. shortPieces.sort(cmpLenRev);
  1028. longPieces.sort(cmpLenRev);
  1029. mixedPieces.sort(cmpLenRev);
  1030. for (i = 0; i < 12; i++) {
  1031. shortPieces[i] = regexEscape(shortPieces[i]);
  1032. longPieces[i] = regexEscape(longPieces[i]);
  1033. }
  1034. for (i = 0; i < 24; i++) {
  1035. mixedPieces[i] = regexEscape(mixedPieces[i]);
  1036. }
  1037. this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  1038. this._monthsShortRegex = this._monthsRegex;
  1039. this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
  1040. this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
  1041. }
  1042. function createDate (y, m, d, h, M, s, ms) {
  1043. // can't just apply() to create a date:
  1044. // https://stackoverflow.com/q/181348
  1045. var date = new Date(y, m, d, h, M, s, ms);
  1046. // the date constructor remaps years 0-99 to 1900-1999
  1047. if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
  1048. date.setFullYear(y);
  1049. }
  1050. return date;
  1051. }
  1052. function createUTCDate (y) {
  1053. var date = new Date(Date.UTC.apply(null, arguments));
  1054. // the Date.UTC function remaps years 0-99 to 1900-1999
  1055. if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
  1056. date.setUTCFullYear(y);
  1057. }
  1058. return date;
  1059. }
  1060. // start-of-first-week - start-of-year
  1061. function firstWeekOffset(year, dow, doy) {
  1062. var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
  1063. fwd = 7 + dow - doy,
  1064. // first-week day local weekday -- which local weekday is fwd
  1065. fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
  1066. return -fwdlw + fwd - 1;
  1067. }
  1068. // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
  1069. function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
  1070. var localWeekday = (7 + weekday - dow) % 7,
  1071. weekOffset = firstWeekOffset(year, dow, doy),
  1072. dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
  1073. resYear, resDayOfYear;
  1074. if (dayOfYear <= 0) {
  1075. resYear = year - 1;
  1076. resDayOfYear = daysInYear(resYear) + dayOfYear;
  1077. } else if (dayOfYear > daysInYear(year)) {
  1078. resYear = year + 1;
  1079. resDayOfYear = dayOfYear - daysInYear(year);
  1080. } else {
  1081. resYear = year;
  1082. resDayOfYear = dayOfYear;
  1083. }
  1084. return {
  1085. year: resYear,
  1086. dayOfYear: resDayOfYear
  1087. };
  1088. }
  1089. function weekOfYear(mom, dow, doy) {
  1090. var weekOffset = firstWeekOffset(mom.year(), dow, doy),
  1091. week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
  1092. resWeek, resYear;
  1093. if (week < 1) {
  1094. resYear = mom.year() - 1;
  1095. resWeek = week + weeksInYear(resYear, dow, doy);
  1096. } else if (week > weeksInYear(mom.year(), dow, doy)) {
  1097. resWeek = week - weeksInYear(mom.year(), dow, doy);
  1098. resYear = mom.year() + 1;
  1099. } else {
  1100. resYear = mom.year();
  1101. resWeek = week;
  1102. }
  1103. return {
  1104. week: resWeek,
  1105. year: resYear
  1106. };
  1107. }
  1108. function weeksInYear(year, dow, doy) {
  1109. var weekOffset = firstWeekOffset(year, dow, doy),
  1110. weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
  1111. return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
  1112. }
  1113. // FORMATTING
  1114. addFormatToken('w', ['ww', 2], 'wo', 'week');
  1115. addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
  1116. // ALIASES
  1117. addUnitAlias('week', 'w');
  1118. addUnitAlias('isoWeek', 'W');
  1119. // PRIORITIES
  1120. addUnitPriority('week', 5);
  1121. addUnitPriority('isoWeek', 5);
  1122. // PARSING
  1123. addRegexToken('w', match1to2);
  1124. addRegexToken('ww', match1to2, match2);
  1125. addRegexToken('W', match1to2);
  1126. addRegexToken('WW', match1to2, match2);
  1127. addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
  1128. week[token.substr(0, 1)] = toInt(input);
  1129. });
  1130. // HELPERS
  1131. // LOCALES
  1132. function localeWeek (mom) {
  1133. return weekOfYear(mom, this._week.dow, this._week.doy).week;
  1134. }
  1135. var defaultLocaleWeek = {
  1136. dow : 0, // Sunday is the first day of the week.
  1137. doy : 6 // The week that contains Jan 1st is the first week of the year.
  1138. };
  1139. function localeFirstDayOfWeek () {
  1140. return this._week.dow;
  1141. }
  1142. function localeFirstDayOfYear () {
  1143. return this._week.doy;
  1144. }
  1145. // MOMENTS
  1146. function getSetWeek (input) {
  1147. var week = this.localeData().week(this);
  1148. return input == null ? week : this.add((input - week) * 7, 'd');
  1149. }
  1150. function getSetISOWeek (input) {
  1151. var week = weekOfYear(this, 1, 4).week;
  1152. return input == null ? week : this.add((input - week) * 7, 'd');
  1153. }
  1154. // FORMATTING
  1155. addFormatToken('d', 0, 'do', 'day');
  1156. addFormatToken('dd', 0, 0, function (format) {
  1157. return this.localeData().weekdaysMin(this, format);
  1158. });
  1159. addFormatToken('ddd', 0, 0, function (format) {
  1160. return this.localeData().weekdaysShort(this, format);
  1161. });
  1162. addFormatToken('dddd', 0, 0, function (format) {
  1163. return this.localeData().weekdays(this, format);
  1164. });
  1165. addFormatToken('e', 0, 0, 'weekday');
  1166. addFormatToken('E', 0, 0, 'isoWeekday');
  1167. // ALIASES
  1168. addUnitAlias('day', 'd');
  1169. addUnitAlias('weekday', 'e');
  1170. addUnitAlias('isoWeekday', 'E');
  1171. // PRIORITY
  1172. addUnitPriority('day', 11);
  1173. addUnitPriority('weekday', 11);
  1174. addUnitPriority('isoWeekday', 11);
  1175. // PARSING
  1176. addRegexToken('d', match1to2);
  1177. addRegexToken('e', match1to2);
  1178. addRegexToken('E', match1to2);
  1179. addRegexToken('dd', function (isStrict, locale) {
  1180. return locale.weekdaysMinRegex(isStrict);
  1181. });
  1182. addRegexToken('ddd', function (isStrict, locale) {
  1183. return locale.weekdaysShortRegex(isStrict);
  1184. });
  1185. addRegexToken('dddd', function (isStrict, locale) {
  1186. return locale.weekdaysRegex(isStrict);
  1187. });
  1188. addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
  1189. var weekday = config._locale.weekdaysParse(input, token, config._strict);
  1190. // if we didn't get a weekday name, mark the date as invalid
  1191. if (weekday != null) {
  1192. week.d = weekday;
  1193. } else {
  1194. getParsingFlags(config).invalidWeekday = input;
  1195. }
  1196. });
  1197. addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
  1198. week[token] = toInt(input);
  1199. });
  1200. // HELPERS
  1201. function parseWeekday(input, locale) {
  1202. if (typeof input !== 'string') {
  1203. return input;
  1204. }
  1205. if (!isNaN(input)) {
  1206. return parseInt(input, 10);
  1207. }
  1208. input = locale.weekdaysParse(input);
  1209. if (typeof input === 'number') {
  1210. return input;
  1211. }
  1212. return null;
  1213. }
  1214. function parseIsoWeekday(input, locale) {
  1215. if (typeof input === 'string') {
  1216. return locale.weekdaysParse(input) % 7 || 7;
  1217. }
  1218. return isNaN(input) ? null : input;
  1219. }
  1220. // LOCALES
  1221. var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
  1222. function localeWeekdays (m, format) {
  1223. if (!m) {
  1224. return isArray(this._weekdays) ? this._weekdays :
  1225. this._weekdays['standalone'];
  1226. }
  1227. return isArray(this._weekdays) ? this._weekdays[m.day()] :
  1228. this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
  1229. }
  1230. var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
  1231. function localeWeekdaysShort (m) {
  1232. return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;
  1233. }
  1234. var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
  1235. function localeWeekdaysMin (m) {
  1236. return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;
  1237. }
  1238. function handleStrictParse$1(weekdayName, format, strict) {
  1239. var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
  1240. if (!this._weekdaysParse) {
  1241. this._weekdaysParse = [];
  1242. this._shortWeekdaysParse = [];
  1243. this._minWeekdaysParse = [];
  1244. for (i = 0; i < 7; ++i) {
  1245. mom = createUTC([2000, 1]).day(i);
  1246. this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();
  1247. this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();
  1248. this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
  1249. }
  1250. }
  1251. if (strict) {
  1252. if (format === 'dddd') {
  1253. ii = indexOf.call(this._weekdaysParse, llc);
  1254. return ii !== -1 ? ii : null;
  1255. } else if (format === 'ddd') {
  1256. ii = indexOf.call(this._shortWeekdaysParse, llc);
  1257. return ii !== -1 ? ii : null;
  1258. } else {
  1259. ii = indexOf.call(this._minWeekdaysParse, llc);
  1260. return ii !== -1 ? ii : null;
  1261. }
  1262. } else {
  1263. if (format === 'dddd') {
  1264. ii = indexOf.call(this._weekdaysParse, llc);
  1265. if (ii !== -1) {
  1266. return ii;
  1267. }
  1268. ii = indexOf.call(this._shortWeekdaysParse, llc);
  1269. if (ii !== -1) {
  1270. return ii;
  1271. }
  1272. ii = indexOf.call(this._minWeekdaysParse, llc);
  1273. return ii !== -1 ? ii : null;
  1274. } else if (format === 'ddd') {
  1275. ii = indexOf.call(this._shortWeekdaysParse, llc);
  1276. if (ii !== -1) {
  1277. return ii;
  1278. }
  1279. ii = indexOf.call(this._weekdaysParse, llc);
  1280. if (ii !== -1) {
  1281. return ii;
  1282. }
  1283. ii = indexOf.call(this._minWeekdaysParse, llc);
  1284. return ii !== -1 ? ii : null;
  1285. } else {
  1286. ii = indexOf.call(this._minWeekdaysParse, llc);
  1287. if (ii !== -1) {
  1288. return ii;
  1289. }
  1290. ii = indexOf.call(this._weekdaysParse, llc);
  1291. if (ii !== -1) {
  1292. return ii;
  1293. }
  1294. ii = indexOf.call(this._shortWeekdaysParse, llc);
  1295. return ii !== -1 ? ii : null;
  1296. }
  1297. }
  1298. }
  1299. function localeWeekdaysParse (weekdayName, format, strict) {
  1300. var i, mom, regex;
  1301. if (this._weekdaysParseExact) {
  1302. return handleStrictParse$1.call(this, weekdayName, format, strict);
  1303. }
  1304. if (!this._weekdaysParse) {
  1305. this._weekdaysParse = [];
  1306. this._minWeekdaysParse = [];
  1307. this._shortWeekdaysParse = [];
  1308. this._fullWeekdaysParse = [];
  1309. }
  1310. for (i = 0; i < 7; i++) {
  1311. // make the regex if we don't have it already
  1312. mom = createUTC([2000, 1]).day(i);
  1313. if (strict && !this._fullWeekdaysParse[i]) {
  1314. this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i');
  1315. this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i');
  1316. this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i');
  1317. }
  1318. if (!this._weekdaysParse[i]) {
  1319. regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
  1320. this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
  1321. }
  1322. // test the regex
  1323. if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
  1324. return i;
  1325. } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
  1326. return i;
  1327. } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
  1328. return i;
  1329. } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
  1330. return i;
  1331. }
  1332. }
  1333. }
  1334. // MOMENTS
  1335. function getSetDayOfWeek (input) {
  1336. if (!this.isValid()) {
  1337. return input != null ? this : NaN;
  1338. }
  1339. var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
  1340. if (input != null) {
  1341. input = parseWeekday(input, this.localeData());
  1342. return this.add(input - day, 'd');
  1343. } else {
  1344. return day;
  1345. }
  1346. }
  1347. function getSetLocaleDayOfWeek (input) {
  1348. if (!this.isValid()) {
  1349. return input != null ? this : NaN;
  1350. }
  1351. var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
  1352. return input == null ? weekday : this.add(input - weekday, 'd');
  1353. }
  1354. function getSetISODayOfWeek (input) {
  1355. if (!this.isValid()) {
  1356. return input != null ? this : NaN;
  1357. }
  1358. // behaves the same as moment#day except
  1359. // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
  1360. // as a setter, sunday should belong to the previous week.
  1361. if (input != null) {
  1362. var weekday = parseIsoWeekday(input, this.localeData());
  1363. return this.day(this.day() % 7 ? weekday : weekday - 7);
  1364. } else {
  1365. return this.day() || 7;
  1366. }
  1367. }
  1368. var defaultWeekdaysRegex = matchWord;
  1369. function weekdaysRegex (isStrict) {
  1370. if (this._weekdaysParseExact) {
  1371. if (!hasOwnProp(this, '_weekdaysRegex')) {
  1372. computeWeekdaysParse.call(this);
  1373. }
  1374. if (isStrict) {
  1375. return this._weekdaysStrictRegex;
  1376. } else {
  1377. return this._weekdaysRegex;
  1378. }
  1379. } else {
  1380. if (!hasOwnProp(this, '_weekdaysRegex')) {
  1381. this._weekdaysRegex = defaultWeekdaysRegex;
  1382. }
  1383. return this._weekdaysStrictRegex && isStrict ?
  1384. this._weekdaysStrictRegex : this._weekdaysRegex;
  1385. }
  1386. }
  1387. var defaultWeekdaysShortRegex = matchWord;
  1388. function weekdaysShortRegex (isStrict) {
  1389. if (this._weekdaysParseExact) {
  1390. if (!hasOwnProp(this, '_weekdaysRegex')) {
  1391. computeWeekdaysParse.call(this);
  1392. }
  1393. if (isStrict) {
  1394. return this._weekdaysShortStrictRegex;
  1395. } else {
  1396. return this._weekdaysShortRegex;
  1397. }
  1398. } else {
  1399. if (!hasOwnProp(this, '_weekdaysShortRegex')) {
  1400. this._weekdaysShortRegex = defaultWeekdaysShortRegex;
  1401. }
  1402. return this._weekdaysShortStrictRegex && isStrict ?
  1403. this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
  1404. }
  1405. }
  1406. var defaultWeekdaysMinRegex = matchWord;
  1407. function weekdaysMinRegex (isStrict) {
  1408. if (this._weekdaysParseExact) {
  1409. if (!hasOwnProp(this, '_weekdaysRegex')) {
  1410. computeWeekdaysParse.call(this);
  1411. }
  1412. if (isStrict) {
  1413. return this._weekdaysMinStrictRegex;
  1414. } else {
  1415. return this._weekdaysMinRegex;
  1416. }
  1417. } else {
  1418. if (!hasOwnProp(this, '_weekdaysMinRegex')) {
  1419. this._weekdaysMinRegex = defaultWeekdaysMinRegex;
  1420. }
  1421. return this._weekdaysMinStrictRegex && isStrict ?
  1422. this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
  1423. }
  1424. }
  1425. function computeWeekdaysParse () {
  1426. function cmpLenRev(a, b) {
  1427. return b.length - a.length;
  1428. }
  1429. var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],
  1430. i, mom, minp, shortp, longp;
  1431. for (i = 0; i < 7; i++) {
  1432. // make the regex if we don't have it already
  1433. mom = createUTC([2000, 1]).day(i);
  1434. minp = this.weekdaysMin(mom, '');
  1435. shortp = this.weekdaysShort(mom, '');
  1436. longp = this.weekdays(mom, '');
  1437. minPieces.push(minp);
  1438. shortPieces.push(shortp);
  1439. longPieces.push(longp);
  1440. mixedPieces.push(minp);
  1441. mixedPieces.push(shortp);
  1442. mixedPieces.push(longp);
  1443. }
  1444. // Sorting makes sure if one weekday (or abbr) is a prefix of another it
  1445. // will match the longer piece.
  1446. minPieces.sort(cmpLenRev);
  1447. shortPieces.sort(cmpLenRev);
  1448. longPieces.sort(cmpLenRev);
  1449. mixedPieces.sort(cmpLenRev);
  1450. for (i = 0; i < 7; i++) {
  1451. shortPieces[i] = regexEscape(shortPieces[i]);
  1452. longPieces[i] = regexEscape(longPieces[i]);
  1453. mixedPieces[i] = regexEscape(mixedPieces[i]);
  1454. }
  1455. this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  1456. this._weekdaysShortRegex = this._weekdaysRegex;
  1457. this._weekdaysMinRegex = this._weekdaysRegex;
  1458. this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
  1459. this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
  1460. this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');
  1461. }
  1462. // FORMATTING
  1463. function hFormat() {
  1464. return this.hours() % 12 || 12;
  1465. }
  1466. function kFormat() {
  1467. return this.hours() || 24;
  1468. }
  1469. addFormatToken('H', ['HH', 2], 0, 'hour');
  1470. addFormatToken('h', ['hh', 2], 0, hFormat);
  1471. addFormatToken('k', ['kk', 2], 0, kFormat);
  1472. addFormatToken('hmm', 0, 0, function () {
  1473. return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
  1474. });
  1475. addFormatToken('hmmss', 0, 0, function () {
  1476. return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +
  1477. zeroFill(this.seconds(), 2);
  1478. });
  1479. addFormatToken('Hmm', 0, 0, function () {
  1480. return '' + this.hours() + zeroFill(this.minutes(), 2);
  1481. });
  1482. addFormatToken('Hmmss', 0, 0, function () {
  1483. return '' + this.hours() + zeroFill(this.minutes(), 2) +
  1484. zeroFill(this.seconds(), 2);
  1485. });
  1486. function meridiem (token, lowercase) {
  1487. addFormatToken(token, 0, 0, function () {
  1488. return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
  1489. });
  1490. }
  1491. meridiem('a', true);
  1492. meridiem('A', false);
  1493. // ALIASES
  1494. addUnitAlias('hour', 'h');
  1495. // PRIORITY
  1496. addUnitPriority('hour', 13);
  1497. // PARSING
  1498. function matchMeridiem (isStrict, locale) {
  1499. return locale._meridiemParse;
  1500. }
  1501. addRegexToken('a', matchMeridiem);
  1502. addRegexToken('A', matchMeridiem);
  1503. addRegexToken('H', match1to2);
  1504. addRegexToken('h', match1to2);
  1505. addRegexToken('k', match1to2);
  1506. addRegexToken('HH', match1to2, match2);
  1507. addRegexToken('hh', match1to2, match2);
  1508. addRegexToken('kk', match1to2, match2);
  1509. addRegexToken('hmm', match3to4);
  1510. addRegexToken('hmmss', match5to6);
  1511. addRegexToken('Hmm', match3to4);
  1512. addRegexToken('Hmmss', match5to6);
  1513. addParseToken(['H', 'HH'], HOUR);
  1514. addParseToken(['k', 'kk'], function (input, array, config) {
  1515. var kInput = toInt(input);
  1516. array[HOUR] = kInput === 24 ? 0 : kInput;
  1517. });
  1518. addParseToken(['a', 'A'], function (input, array, config) {
  1519. config._isPm = config._locale.isPM(input);
  1520. config._meridiem = input;
  1521. });
  1522. addParseToken(['h', 'hh'], function (input, array, config) {
  1523. array[HOUR] = toInt(input);
  1524. getParsingFlags(config).bigHour = true;
  1525. });
  1526. addParseToken('hmm', function (input, array, config) {
  1527. var pos = input.length - 2;
  1528. array[HOUR] = toInt(input.substr(0, pos));
  1529. array[MINUTE] = toInt(input.substr(pos));
  1530. getParsingFlags(config).bigHour = true;
  1531. });
  1532. addParseToken('hmmss', function (input, array, config) {
  1533. var pos1 = input.length - 4;
  1534. var pos2 = input.length - 2;
  1535. array[HOUR] = toInt(input.substr(0, pos1));
  1536. array[MINUTE] = toInt(input.substr(pos1, 2));
  1537. array[SECOND] = toInt(input.substr(pos2));
  1538. getParsingFlags(config).bigHour = true;
  1539. });
  1540. addParseToken('Hmm', function (input, array, config) {
  1541. var pos = input.length - 2;
  1542. array[HOUR] = toInt(input.substr(0, pos));
  1543. array[MINUTE] = toInt(input.substr(pos));
  1544. });
  1545. addParseToken('Hmmss', function (input, array, config) {
  1546. var pos1 = input.length - 4;
  1547. var pos2 = input.length - 2;
  1548. array[HOUR] = toInt(input.substr(0, pos1));
  1549. array[MINUTE] = toInt(input.substr(pos1, 2));
  1550. array[SECOND] = toInt(input.substr(pos2));
  1551. });
  1552. // LOCALES
  1553. function localeIsPM (input) {
  1554. // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
  1555. // Using charAt should be more compatible.
  1556. return ((input + '').toLowerCase().charAt(0) === 'p');
  1557. }
  1558. var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
  1559. function localeMeridiem (hours, minutes, isLower) {
  1560. if (hours > 11) {
  1561. return isLower ? 'pm' : 'PM';
  1562. } else {
  1563. return isLower ? 'am' : 'AM';
  1564. }
  1565. }
  1566. // MOMENTS
  1567. // Setting the hour should keep the time, because the user explicitly
  1568. // specified which hour he wants. So trying to maintain the same hour (in
  1569. // a new timezone) makes sense. Adding/subtracting hours does not follow
  1570. // this rule.
  1571. var getSetHour = makeGetSet('Hours', true);
  1572. // months
  1573. // week
  1574. // weekdays
  1575. // meridiem
  1576. var baseConfig = {
  1577. calendar: defaultCalendar,
  1578. longDateFormat: defaultLongDateFormat,
  1579. invalidDate: defaultInvalidDate,
  1580. ordinal: defaultOrdinal,
  1581. dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
  1582. relativeTime: defaultRelativeTime,
  1583. months: defaultLocaleMonths,
  1584. monthsShort: defaultLocaleMonthsShort,
  1585. week: defaultLocaleWeek,
  1586. weekdays: defaultLocaleWeekdays,
  1587. weekdaysMin: defaultLocaleWeekdaysMin,
  1588. weekdaysShort: defaultLocaleWeekdaysShort,
  1589. meridiemParse: defaultLocaleMeridiemParse
  1590. };
  1591. // internal storage for locale config files
  1592. var locales = {};
  1593. var localeFamilies = {};
  1594. var globalLocale;
  1595. function normalizeLocale(key) {
  1596. return key ? key.toLowerCase().replace('_', '-') : key;
  1597. }
  1598. // pick the locale from the array
  1599. // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
  1600. // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
  1601. function chooseLocale(names) {
  1602. var i = 0, j, next, locale, split;
  1603. while (i < names.length) {
  1604. split = normalizeLocale(names[i]).split('-');
  1605. j = split.length;
  1606. next = normalizeLocale(names[i + 1]);
  1607. next = next ? next.split('-') : null;
  1608. while (j > 0) {
  1609. locale = loadLocale(split.slice(0, j).join('-'));
  1610. if (locale) {
  1611. return locale;
  1612. }
  1613. if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
  1614. //the next array item is better than a shallower substring of this one
  1615. break;
  1616. }
  1617. j--;
  1618. }
  1619. i++;
  1620. }
  1621. return null;
  1622. }
  1623. function loadLocale(name) {
  1624. var oldLocale = null;
  1625. // TODO: Find a better way to register and load all the locales in Node
  1626. if (!locales[name] && (typeof module !== 'undefined') &&
  1627. module && module.exports) {
  1628. try {
  1629. oldLocale = globalLocale._abbr;
  1630. var aliasedRequire = require;
  1631. __webpack_require__(475)("./" + name);
  1632. getSetGlobalLocale(oldLocale);
  1633. } catch (e) {}
  1634. }
  1635. return locales[name];
  1636. }
  1637. // This function will load locale and then set the global locale. If
  1638. // no arguments are passed in, it will simply return the current global
  1639. // locale key.
  1640. function getSetGlobalLocale (key, values) {
  1641. var data;
  1642. if (key) {
  1643. if (isUndefined(values)) {
  1644. data = getLocale(key);
  1645. }
  1646. else {
  1647. data = defineLocale(key, values);
  1648. }
  1649. if (data) {
  1650. // moment.duration._locale = moment._locale = data;
  1651. globalLocale = data;
  1652. }
  1653. }
  1654. return globalLocale._abbr;
  1655. }
  1656. function defineLocale (name, config) {
  1657. if (config !== null) {
  1658. var parentConfig = baseConfig;
  1659. config.abbr = name;
  1660. if (locales[name] != null) {
  1661. deprecateSimple('defineLocaleOverride',
  1662. 'use moment.updateLocale(localeName, config) to change ' +
  1663. 'an existing locale. moment.defineLocale(localeName, ' +
  1664. 'config) should only be used for creating a new locale ' +
  1665. 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');
  1666. parentConfig = locales[name]._config;
  1667. } else if (config.parentLocale != null) {
  1668. if (locales[config.parentLocale] != null) {
  1669. parentConfig = locales[config.parentLocale]._config;
  1670. } else {
  1671. if (!localeFamilies[config.parentLocale]) {
  1672. localeFamilies[config.parentLocale] = [];
  1673. }
  1674. localeFamilies[config.parentLocale].push({
  1675. name: name,
  1676. config: config
  1677. });
  1678. return null;
  1679. }
  1680. }
  1681. locales[name] = new Locale(mergeConfigs(parentConfig, config));
  1682. if (localeFamilies[name]) {
  1683. localeFamilies[name].forEach(function (x) {
  1684. defineLocale(x.name, x.config);
  1685. });
  1686. }
  1687. // backwards compat for now: also set the locale
  1688. // make sure we set the locale AFTER all child locales have been
  1689. // created, so we won't end up with the child locale set.
  1690. getSetGlobalLocale(name);
  1691. return locales[name];
  1692. } else {
  1693. // useful for testing
  1694. delete locales[name];
  1695. return null;
  1696. }
  1697. }
  1698. function updateLocale(name, config) {
  1699. if (config != null) {
  1700. var locale, tmpLocale, parentConfig = baseConfig;
  1701. // MERGE
  1702. tmpLocale = loadLocale(name);
  1703. if (tmpLocale != null) {
  1704. parentConfig = tmpLocale._config;
  1705. }
  1706. config = mergeConfigs(parentConfig, config);
  1707. locale = new Locale(config);
  1708. locale.parentLocale = locales[name];
  1709. locales[name] = locale;
  1710. // backwards compat for now: also set the locale
  1711. getSetGlobalLocale(name);
  1712. } else {
  1713. // pass null for config to unupdate, useful for tests
  1714. if (locales[name] != null) {
  1715. if (locales[name].parentLocale != null) {
  1716. locales[name] = locales[name].parentLocale;
  1717. } else if (locales[name] != null) {
  1718. delete locales[name];
  1719. }
  1720. }
  1721. }
  1722. return locales[name];
  1723. }
  1724. // returns locale data
  1725. function getLocale (key) {
  1726. var locale;
  1727. if (key && key._locale && key._locale._abbr) {
  1728. key = key._locale._abbr;
  1729. }
  1730. if (!key) {
  1731. return globalLocale;
  1732. }
  1733. if (!isArray(key)) {
  1734. //short-circuit everything else
  1735. locale = loadLocale(key);
  1736. if (locale) {
  1737. return locale;
  1738. }
  1739. key = [key];
  1740. }
  1741. return chooseLocale(key);
  1742. }
  1743. function listLocales() {
  1744. return keys(locales);
  1745. }
  1746. function checkOverflow (m) {
  1747. var overflow;
  1748. var a = m._a;
  1749. if (a && getParsingFlags(m).overflow === -2) {
  1750. overflow =
  1751. a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
  1752. a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
  1753. a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
  1754. a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
  1755. a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
  1756. a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
  1757. -1;
  1758. if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
  1759. overflow = DATE;
  1760. }
  1761. if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
  1762. overflow = WEEK;
  1763. }
  1764. if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
  1765. overflow = WEEKDAY;
  1766. }
  1767. getParsingFlags(m).overflow = overflow;
  1768. }
  1769. return m;
  1770. }
  1771. // Pick the first defined of two or three arguments.
  1772. function defaults(a, b, c) {
  1773. if (a != null) {
  1774. return a;
  1775. }
  1776. if (b != null) {
  1777. return b;
  1778. }
  1779. return c;
  1780. }
  1781. function currentDateArray(config) {
  1782. // hooks is actually the exported moment object
  1783. var nowValue = new Date(hooks.now());
  1784. if (config._useUTC) {
  1785. return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
  1786. }
  1787. return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
  1788. }
  1789. // convert an array to a date.
  1790. // the array should mirror the parameters below
  1791. // note: all values past the year are optional and will default to the lowest possible value.
  1792. // [year, month, day , hour, minute, second, millisecond]
  1793. function configFromArray (config) {
  1794. var i, date, input = [], currentDate, expectedWeekday, yearToUse;
  1795. if (config._d) {
  1796. return;
  1797. }
  1798. currentDate = currentDateArray(config);
  1799. //compute day of the year from weeks and weekdays
  1800. if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
  1801. dayOfYearFromWeekInfo(config);
  1802. }
  1803. //if the day of the year is set, figure out what it is
  1804. if (config._dayOfYear != null) {
  1805. yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
  1806. if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
  1807. getParsingFlags(config)._overflowDayOfYear = true;
  1808. }
  1809. date = createUTCDate(yearToUse, 0, config._dayOfYear);
  1810. config._a[MONTH] = date.getUTCMonth();
  1811. config._a[DATE] = date.getUTCDate();
  1812. }
  1813. // Default to current date.
  1814. // * if no year, month, day of month are given, default to today
  1815. // * if day of month is given, default month and year
  1816. // * if month is given, default only year
  1817. // * if year is given, don't default anything
  1818. for (i = 0; i < 3 && config._a[i] == null; ++i) {
  1819. config._a[i] = input[i] = currentDate[i];
  1820. }
  1821. // Zero out whatever was not defaulted, including time
  1822. for (; i < 7; i++) {
  1823. config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
  1824. }
  1825. // Check for 24:00:00.000
  1826. if (config._a[HOUR] === 24 &&
  1827. config._a[MINUTE] === 0 &&
  1828. config._a[SECOND] === 0 &&
  1829. config._a[MILLISECOND] === 0) {
  1830. config._nextDay = true;
  1831. config._a[HOUR] = 0;
  1832. }
  1833. config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
  1834. expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();
  1835. // Apply timezone offset from input. The actual utcOffset can be changed
  1836. // with parseZone.
  1837. if (config._tzm != null) {
  1838. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  1839. }
  1840. if (config._nextDay) {
  1841. config._a[HOUR] = 24;
  1842. }
  1843. // check for mismatching day of week
  1844. if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {
  1845. getParsingFlags(config).weekdayMismatch = true;
  1846. }
  1847. }
  1848. function dayOfYearFromWeekInfo(config) {
  1849. var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;
  1850. w = config._w;
  1851. if (w.GG != null || w.W != null || w.E != null) {
  1852. dow = 1;
  1853. doy = 4;
  1854. // TODO: We need to take the current isoWeekYear, but that depends on
  1855. // how we interpret now (local, utc, fixed offset). So create
  1856. // a now version of current config (take local/utc/offset flags, and
  1857. // create now).
  1858. weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);
  1859. week = defaults(w.W, 1);
  1860. weekday = defaults(w.E, 1);
  1861. if (weekday < 1 || weekday > 7) {
  1862. weekdayOverflow = true;
  1863. }
  1864. } else {
  1865. dow = config._locale._week.dow;
  1866. doy = config._locale._week.doy;
  1867. var curWeek = weekOfYear(createLocal(), dow, doy);
  1868. weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
  1869. // Default to current week.
  1870. week = defaults(w.w, curWeek.week);
  1871. if (w.d != null) {
  1872. // weekday -- low day numbers are considered next week
  1873. weekday = w.d;
  1874. if (weekday < 0 || weekday > 6) {
  1875. weekdayOverflow = true;
  1876. }
  1877. } else if (w.e != null) {
  1878. // local weekday -- counting starts from begining of week
  1879. weekday = w.e + dow;
  1880. if (w.e < 0 || w.e > 6) {
  1881. weekdayOverflow = true;
  1882. }
  1883. } else {
  1884. // default to begining of week
  1885. weekday = dow;
  1886. }
  1887. }
  1888. if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
  1889. getParsingFlags(config)._overflowWeeks = true;
  1890. } else if (weekdayOverflow != null) {
  1891. getParsingFlags(config)._overflowWeekday = true;
  1892. } else {
  1893. temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
  1894. config._a[YEAR] = temp.year;
  1895. config._dayOfYear = temp.dayOfYear;
  1896. }
  1897. }
  1898. // iso 8601 regex
  1899. // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
  1900. var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;
  1901. var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;
  1902. var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
  1903. var isoDates = [
  1904. ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
  1905. ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
  1906. ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
  1907. ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
  1908. ['YYYY-DDD', /\d{4}-\d{3}/],
  1909. ['YYYY-MM', /\d{4}-\d\d/, false],
  1910. ['YYYYYYMMDD', /[+-]\d{10}/],
  1911. ['YYYYMMDD', /\d{8}/],
  1912. // YYYYMM is NOT allowed by the standard
  1913. ['GGGG[W]WWE', /\d{4}W\d{3}/],
  1914. ['GGGG[W]WW', /\d{4}W\d{2}/, false],
  1915. ['YYYYDDD', /\d{7}/]
  1916. ];
  1917. // iso time formats and regexes
  1918. var isoTimes = [
  1919. ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
  1920. ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
  1921. ['HH:mm:ss', /\d\d:\d\d:\d\d/],
  1922. ['HH:mm', /\d\d:\d\d/],
  1923. ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
  1924. ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
  1925. ['HHmmss', /\d\d\d\d\d\d/],
  1926. ['HHmm', /\d\d\d\d/],
  1927. ['HH', /\d\d/]
  1928. ];
  1929. var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
  1930. // date from iso format
  1931. function configFromISO(config) {
  1932. var i, l,
  1933. string = config._i,
  1934. match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
  1935. allowTime, dateFormat, timeFormat, tzFormat;
  1936. if (match) {
  1937. getParsingFlags(config).iso = true;
  1938. for (i = 0, l = isoDates.length; i < l; i++) {
  1939. if (isoDates[i][1].exec(match[1])) {
  1940. dateFormat = isoDates[i][0];
  1941. allowTime = isoDates[i][2] !== false;
  1942. break;
  1943. }
  1944. }
  1945. if (dateFormat == null) {
  1946. config._isValid = false;
  1947. return;
  1948. }
  1949. if (match[3]) {
  1950. for (i = 0, l = isoTimes.length; i < l; i++) {
  1951. if (isoTimes[i][1].exec(match[3])) {
  1952. // match[2] should be 'T' or space
  1953. timeFormat = (match[2] || ' ') + isoTimes[i][0];
  1954. break;
  1955. }
  1956. }
  1957. if (timeFormat == null) {
  1958. config._isValid = false;
  1959. return;
  1960. }
  1961. }
  1962. if (!allowTime && timeFormat != null) {
  1963. config._isValid = false;
  1964. return;
  1965. }
  1966. if (match[4]) {
  1967. if (tzRegex.exec(match[4])) {
  1968. tzFormat = 'Z';
  1969. } else {
  1970. config._isValid = false;
  1971. return;
  1972. }
  1973. }
  1974. config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
  1975. configFromStringAndFormat(config);
  1976. } else {
  1977. config._isValid = false;
  1978. }
  1979. }
  1980. // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
  1981. var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;
  1982. function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
  1983. var result = [
  1984. untruncateYear(yearStr),
  1985. defaultLocaleMonthsShort.indexOf(monthStr),
  1986. parseInt(dayStr, 10),
  1987. parseInt(hourStr, 10),
  1988. parseInt(minuteStr, 10)
  1989. ];
  1990. if (secondStr) {
  1991. result.push(parseInt(secondStr, 10));
  1992. }
  1993. return result;
  1994. }
  1995. function untruncateYear(yearStr) {
  1996. var year = parseInt(yearStr, 10);
  1997. if (year <= 49) {
  1998. return 2000 + year;
  1999. } else if (year <= 999) {
  2000. return 1900 + year;
  2001. }
  2002. return year;
  2003. }
  2004. function preprocessRFC2822(s) {
  2005. // Remove comments and folding whitespace and replace multiple-spaces with a single space
  2006. return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').trim();
  2007. }
  2008. function checkWeekday(weekdayStr, parsedInput, config) {
  2009. if (weekdayStr) {
  2010. // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
  2011. var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
  2012. weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();
  2013. if (weekdayProvided !== weekdayActual) {
  2014. getParsingFlags(config).weekdayMismatch = true;
  2015. config._isValid = false;
  2016. return false;
  2017. }
  2018. }
  2019. return true;
  2020. }
  2021. var obsOffsets = {
  2022. UT: 0,
  2023. GMT: 0,
  2024. EDT: -4 * 60,
  2025. EST: -5 * 60,
  2026. CDT: -5 * 60,
  2027. CST: -6 * 60,
  2028. MDT: -6 * 60,
  2029. MST: -7 * 60,
  2030. PDT: -7 * 60,
  2031. PST: -8 * 60
  2032. };
  2033. function calculateOffset(obsOffset, militaryOffset, numOffset) {
  2034. if (obsOffset) {
  2035. return obsOffsets[obsOffset];
  2036. } else if (militaryOffset) {
  2037. // the only allowed military tz is Z
  2038. return 0;
  2039. } else {
  2040. var hm = parseInt(numOffset, 10);
  2041. var m = hm % 100, h = (hm - m) / 100;
  2042. return h * 60 + m;
  2043. }
  2044. }
  2045. // date and time from ref 2822 format
  2046. function configFromRFC2822(config) {
  2047. var match = rfc2822.exec(preprocessRFC2822(config._i));
  2048. if (match) {
  2049. var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);
  2050. if (!checkWeekday(match[1], parsedArray, config)) {
  2051. return;
  2052. }
  2053. config._a = parsedArray;
  2054. config._tzm = calculateOffset(match[8], match[9], match[10]);
  2055. config._d = createUTCDate.apply(null, config._a);
  2056. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  2057. getParsingFlags(config).rfc2822 = true;
  2058. } else {
  2059. config._isValid = false;
  2060. }
  2061. }
  2062. // date from iso format or fallback
  2063. function configFromString(config) {
  2064. var matched = aspNetJsonRegex.exec(config._i);
  2065. if (matched !== null) {
  2066. config._d = new Date(+matched[1]);
  2067. return;
  2068. }
  2069. configFromISO(config);
  2070. if (config._isValid === false) {
  2071. delete config._isValid;
  2072. } else {
  2073. return;
  2074. }
  2075. configFromRFC2822(config);
  2076. if (config._isValid === false) {
  2077. delete config._isValid;
  2078. } else {
  2079. return;
  2080. }
  2081. // Final attempt, use Input Fallback
  2082. hooks.createFromInputFallback(config);
  2083. }
  2084. hooks.createFromInputFallback = deprecate(
  2085. 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
  2086. 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
  2087. 'discouraged and will be removed in an upcoming major release. Please refer to ' +
  2088. 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
  2089. function (config) {
  2090. config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
  2091. }
  2092. );
  2093. // constant that refers to the ISO standard
  2094. hooks.ISO_8601 = function () {};
  2095. // constant that refers to the RFC 2822 form
  2096. hooks.RFC_2822 = function () {};
  2097. // date from string and format string
  2098. function configFromStringAndFormat(config) {
  2099. // TODO: Move this to another part of the creation flow to prevent circular deps
  2100. if (config._f === hooks.ISO_8601) {
  2101. configFromISO(config);
  2102. return;
  2103. }
  2104. if (config._f === hooks.RFC_2822) {
  2105. configFromRFC2822(config);
  2106. return;
  2107. }
  2108. config._a = [];
  2109. getParsingFlags(config).empty = true;
  2110. // This array is used to make a Date, either with `new Date` or `Date.UTC`
  2111. var string = '' + config._i,
  2112. i, parsedInput, tokens, token, skipped,
  2113. stringLength = string.length,
  2114. totalParsedInputLength = 0;
  2115. tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
  2116. for (i = 0; i < tokens.length; i++) {
  2117. token = tokens[i];
  2118. parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
  2119. // console.log('token', token, 'parsedInput', parsedInput,
  2120. // 'regex', getParseRegexForToken(token, config));
  2121. if (parsedInput) {
  2122. skipped = string.substr(0, string.indexOf(parsedInput));
  2123. if (skipped.length > 0) {
  2124. getParsingFlags(config).unusedInput.push(skipped);
  2125. }
  2126. string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
  2127. totalParsedInputLength += parsedInput.length;
  2128. }
  2129. // don't parse if it's not a known token
  2130. if (formatTokenFunctions[token]) {
  2131. if (parsedInput) {
  2132. getParsingFlags(config).empty = false;
  2133. }
  2134. else {
  2135. getParsingFlags(config).unusedTokens.push(token);
  2136. }
  2137. addTimeToArrayFromToken(token, parsedInput, config);
  2138. }
  2139. else if (config._strict && !parsedInput) {
  2140. getParsingFlags(config).unusedTokens.push(token);
  2141. }
  2142. }
  2143. // add remaining unparsed input length to the string
  2144. getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
  2145. if (string.length > 0) {
  2146. getParsingFlags(config).unusedInput.push(string);
  2147. }
  2148. // clear _12h flag if hour is <= 12
  2149. if (config._a[HOUR] <= 12 &&
  2150. getParsingFlags(config).bigHour === true &&
  2151. config._a[HOUR] > 0) {
  2152. getParsingFlags(config).bigHour = undefined;
  2153. }
  2154. getParsingFlags(config).parsedDateParts = config._a.slice(0);
  2155. getParsingFlags(config).meridiem = config._meridiem;
  2156. // handle meridiem
  2157. config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
  2158. configFromArray(config);
  2159. checkOverflow(config);
  2160. }
  2161. function meridiemFixWrap (locale, hour, meridiem) {
  2162. var isPm;
  2163. if (meridiem == null) {
  2164. // nothing to do
  2165. return hour;
  2166. }
  2167. if (locale.meridiemHour != null) {
  2168. return locale.meridiemHour(hour, meridiem);
  2169. } else if (locale.isPM != null) {
  2170. // Fallback
  2171. isPm = locale.isPM(meridiem);
  2172. if (isPm && hour < 12) {
  2173. hour += 12;
  2174. }
  2175. if (!isPm && hour === 12) {
  2176. hour = 0;
  2177. }
  2178. return hour;
  2179. } else {
  2180. // this is not supposed to happen
  2181. return hour;
  2182. }
  2183. }
  2184. // date from string and array of format strings
  2185. function configFromStringAndArray(config) {
  2186. var tempConfig,
  2187. bestMoment,
  2188. scoreToBeat,
  2189. i,
  2190. currentScore;
  2191. if (config._f.length === 0) {
  2192. getParsingFlags(config).invalidFormat = true;
  2193. config._d = new Date(NaN);
  2194. return;
  2195. }
  2196. for (i = 0; i < config._f.length; i++) {
  2197. currentScore = 0;
  2198. tempConfig = copyConfig({}, config);
  2199. if (config._useUTC != null) {
  2200. tempConfig._useUTC = config._useUTC;
  2201. }
  2202. tempConfig._f = config._f[i];
  2203. configFromStringAndFormat(tempConfig);
  2204. if (!isValid(tempConfig)) {
  2205. continue;
  2206. }
  2207. // if there is any input that was not parsed add a penalty for that format
  2208. currentScore += getParsingFlags(tempConfig).charsLeftOver;
  2209. //or tokens
  2210. currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
  2211. getParsingFlags(tempConfig).score = currentScore;
  2212. if (scoreToBeat == null || currentScore < scoreToBeat) {
  2213. scoreToBeat = currentScore;
  2214. bestMoment = tempConfig;
  2215. }
  2216. }
  2217. extend(config, bestMoment || tempConfig);
  2218. }
  2219. function configFromObject(config) {
  2220. if (config._d) {
  2221. return;
  2222. }
  2223. var i = normalizeObjectUnits(config._i);
  2224. config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {
  2225. return obj && parseInt(obj, 10);
  2226. });
  2227. configFromArray(config);
  2228. }
  2229. function createFromConfig (config) {
  2230. var res = new Moment(checkOverflow(prepareConfig(config)));
  2231. if (res._nextDay) {
  2232. // Adding is smart enough around DST
  2233. res.add(1, 'd');
  2234. res._nextDay = undefined;
  2235. }
  2236. return res;
  2237. }
  2238. function prepareConfig (config) {
  2239. var input = config._i,
  2240. format = config._f;
  2241. config._locale = config._locale || getLocale(config._l);
  2242. if (input === null || (format === undefined && input === '')) {
  2243. return createInvalid({nullInput: true});
  2244. }
  2245. if (typeof input === 'string') {
  2246. config._i = input = config._locale.preparse(input);
  2247. }
  2248. if (isMoment(input)) {
  2249. return new Moment(checkOverflow(input));
  2250. } else if (isDate(input)) {
  2251. config._d = input;
  2252. } else if (isArray(format)) {
  2253. configFromStringAndArray(config);
  2254. } else if (format) {
  2255. configFromStringAndFormat(config);
  2256. } else {
  2257. configFromInput(config);
  2258. }
  2259. if (!isValid(config)) {
  2260. config._d = null;
  2261. }
  2262. return config;
  2263. }
  2264. function configFromInput(config) {
  2265. var input = config._i;
  2266. if (isUndefined(input)) {
  2267. config._d = new Date(hooks.now());
  2268. } else if (isDate(input)) {
  2269. config._d = new Date(input.valueOf());
  2270. } else if (typeof input === 'string') {
  2271. configFromString(config);
  2272. } else if (isArray(input)) {
  2273. config._a = map(input.slice(0), function (obj) {
  2274. return parseInt(obj, 10);
  2275. });
  2276. configFromArray(config);
  2277. } else if (isObject(input)) {
  2278. configFromObject(config);
  2279. } else if (isNumber(input)) {
  2280. // from milliseconds
  2281. config._d = new Date(input);
  2282. } else {
  2283. hooks.createFromInputFallback(config);
  2284. }
  2285. }
  2286. function createLocalOrUTC (input, format, locale, strict, isUTC) {
  2287. var c = {};
  2288. if (locale === true || locale === false) {
  2289. strict = locale;
  2290. locale = undefined;
  2291. }
  2292. if ((isObject(input) && isObjectEmpty(input)) ||
  2293. (isArray(input) && input.length === 0)) {
  2294. input = undefined;
  2295. }
  2296. // object construction must be done this way.
  2297. // https://github.com/moment/moment/issues/1423
  2298. c._isAMomentObject = true;
  2299. c._useUTC = c._isUTC = isUTC;
  2300. c._l = locale;
  2301. c._i = input;
  2302. c._f = format;
  2303. c._strict = strict;
  2304. return createFromConfig(c);
  2305. }
  2306. function createLocal (input, format, locale, strict) {
  2307. return createLocalOrUTC(input, format, locale, strict, false);
  2308. }
  2309. var prototypeMin = deprecate(
  2310. 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
  2311. function () {
  2312. var other = createLocal.apply(null, arguments);
  2313. if (this.isValid() && other.isValid()) {
  2314. return other < this ? this : other;
  2315. } else {
  2316. return createInvalid();
  2317. }
  2318. }
  2319. );
  2320. var prototypeMax = deprecate(
  2321. 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
  2322. function () {
  2323. var other = createLocal.apply(null, arguments);
  2324. if (this.isValid() && other.isValid()) {
  2325. return other > this ? this : other;
  2326. } else {
  2327. return createInvalid();
  2328. }
  2329. }
  2330. );
  2331. // Pick a moment m from moments so that m[fn](other) is true for all
  2332. // other. This relies on the function fn to be transitive.
  2333. //
  2334. // moments should either be an array of moment objects or an array, whose
  2335. // first element is an array of moment objects.
  2336. function pickBy(fn, moments) {
  2337. var res, i;
  2338. if (moments.length === 1 && isArray(moments[0])) {
  2339. moments = moments[0];
  2340. }
  2341. if (!moments.length) {
  2342. return createLocal();
  2343. }
  2344. res = moments[0];
  2345. for (i = 1; i < moments.length; ++i) {
  2346. if (!moments[i].isValid() || moments[i][fn](res)) {
  2347. res = moments[i];
  2348. }
  2349. }
  2350. return res;
  2351. }
  2352. // TODO: Use [].sort instead?
  2353. function min () {
  2354. var args = [].slice.call(arguments, 0);
  2355. return pickBy('isBefore', args);
  2356. }
  2357. function max () {
  2358. var args = [].slice.call(arguments, 0);
  2359. return pickBy('isAfter', args);
  2360. }
  2361. var now = function () {
  2362. return Date.now ? Date.now() : +(new Date());
  2363. };
  2364. var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
  2365. function isDurationValid(m) {
  2366. for (var key in m) {
  2367. if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
  2368. return false;
  2369. }
  2370. }
  2371. var unitHasDecimal = false;
  2372. for (var i = 0; i < ordering.length; ++i) {
  2373. if (m[ordering[i]]) {
  2374. if (unitHasDecimal) {
  2375. return false; // only allow non-integers for smallest unit
  2376. }
  2377. if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
  2378. unitHasDecimal = true;
  2379. }
  2380. }
  2381. }
  2382. return true;
  2383. }
  2384. function isValid$1() {
  2385. return this._isValid;
  2386. }
  2387. function createInvalid$1() {
  2388. return createDuration(NaN);
  2389. }
  2390. function Duration (duration) {
  2391. var normalizedInput = normalizeObjectUnits(duration),
  2392. years = normalizedInput.year || 0,
  2393. quarters = normalizedInput.quarter || 0,
  2394. months = normalizedInput.month || 0,
  2395. weeks = normalizedInput.week || 0,
  2396. days = normalizedInput.day || 0,
  2397. hours = normalizedInput.hour || 0,
  2398. minutes = normalizedInput.minute || 0,
  2399. seconds = normalizedInput.second || 0,
  2400. milliseconds = normalizedInput.millisecond || 0;
  2401. this._isValid = isDurationValid(normalizedInput);
  2402. // representation for dateAddRemove
  2403. this._milliseconds = +milliseconds +
  2404. seconds * 1e3 + // 1000
  2405. minutes * 6e4 + // 1000 * 60
  2406. hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
  2407. // Because of dateAddRemove treats 24 hours as different from a
  2408. // day when working around DST, we need to store them separately
  2409. this._days = +days +
  2410. weeks * 7;
  2411. // It is impossible to translate months into days without knowing
  2412. // which months you are are talking about, so we have to store
  2413. // it separately.
  2414. this._months = +months +
  2415. quarters * 3 +
  2416. years * 12;
  2417. this._data = {};
  2418. this._locale = getLocale();
  2419. this._bubble();
  2420. }
  2421. function isDuration (obj) {
  2422. return obj instanceof Duration;
  2423. }
  2424. function absRound (number) {
  2425. if (number < 0) {
  2426. return Math.round(-1 * number) * -1;
  2427. } else {
  2428. return Math.round(number);
  2429. }
  2430. }
  2431. // FORMATTING
  2432. function offset (token, separator) {
  2433. addFormatToken(token, 0, 0, function () {
  2434. var offset = this.utcOffset();
  2435. var sign = '+';
  2436. if (offset < 0) {
  2437. offset = -offset;
  2438. sign = '-';
  2439. }
  2440. return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
  2441. });
  2442. }
  2443. offset('Z', ':');
  2444. offset('ZZ', '');
  2445. // PARSING
  2446. addRegexToken('Z', matchShortOffset);
  2447. addRegexToken('ZZ', matchShortOffset);
  2448. addParseToken(['Z', 'ZZ'], function (input, array, config) {
  2449. config._useUTC = true;
  2450. config._tzm = offsetFromString(matchShortOffset, input);
  2451. });
  2452. // HELPERS
  2453. // timezone chunker
  2454. // '+10:00' > ['10', '00']
  2455. // '-1530' > ['-15', '30']
  2456. var chunkOffset = /([\+\-]|\d\d)/gi;
  2457. function offsetFromString(matcher, string) {
  2458. var matches = (string || '').match(matcher);
  2459. if (matches === null) {
  2460. return null;
  2461. }
  2462. var chunk = matches[matches.length - 1] || [];
  2463. var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
  2464. var minutes = +(parts[1] * 60) + toInt(parts[2]);
  2465. return minutes === 0 ?
  2466. 0 :
  2467. parts[0] === '+' ? minutes : -minutes;
  2468. }
  2469. // Return a moment from input, that is local/utc/zone equivalent to model.
  2470. function cloneWithOffset(input, model) {
  2471. var res, diff;
  2472. if (model._isUTC) {
  2473. res = model.clone();
  2474. diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();
  2475. // Use low-level api, because this fn is low-level api.
  2476. res._d.setTime(res._d.valueOf() + diff);
  2477. hooks.updateOffset(res, false);
  2478. return res;
  2479. } else {
  2480. return createLocal(input).local();
  2481. }
  2482. }
  2483. function getDateOffset (m) {
  2484. // On Firefox.24 Date#getTimezoneOffset returns a floating point.
  2485. // https://github.com/moment/moment/pull/1871
  2486. return -Math.round(m._d.getTimezoneOffset() / 15) * 15;
  2487. }
  2488. // HOOKS
  2489. // This function will be called whenever a moment is mutated.
  2490. // It is intended to keep the offset in sync with the timezone.
  2491. hooks.updateOffset = function () {};
  2492. // MOMENTS
  2493. // keepLocalTime = true means only change the timezone, without
  2494. // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
  2495. // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
  2496. // +0200, so we adjust the time as needed, to be valid.
  2497. //
  2498. // Keeping the time actually adds/subtracts (one hour)
  2499. // from the actual represented time. That is why we call updateOffset
  2500. // a second time. In case it wants us to change the offset again
  2501. // _changeInProgress == true case, then we have to adjust, because
  2502. // there is no such time in the given timezone.
  2503. function getSetOffset (input, keepLocalTime, keepMinutes) {
  2504. var offset = this._offset || 0,
  2505. localAdjust;
  2506. if (!this.isValid()) {
  2507. return input != null ? this : NaN;
  2508. }
  2509. if (input != null) {
  2510. if (typeof input === 'string') {
  2511. input = offsetFromString(matchShortOffset, input);
  2512. if (input === null) {
  2513. return this;
  2514. }
  2515. } else if (Math.abs(input) < 16 && !keepMinutes) {
  2516. input = input * 60;
  2517. }
  2518. if (!this._isUTC && keepLocalTime) {
  2519. localAdjust = getDateOffset(this);
  2520. }
  2521. this._offset = input;
  2522. this._isUTC = true;
  2523. if (localAdjust != null) {
  2524. this.add(localAdjust, 'm');
  2525. }
  2526. if (offset !== input) {
  2527. if (!keepLocalTime || this._changeInProgress) {
  2528. addSubtract(this, createDuration(input - offset, 'm'), 1, false);
  2529. } else if (!this._changeInProgress) {
  2530. this._changeInProgress = true;
  2531. hooks.updateOffset(this, true);
  2532. this._changeInProgress = null;
  2533. }
  2534. }
  2535. return this;
  2536. } else {
  2537. return this._isUTC ? offset : getDateOffset(this);
  2538. }
  2539. }
  2540. function getSetZone (input, keepLocalTime) {
  2541. if (input != null) {
  2542. if (typeof input !== 'string') {
  2543. input = -input;
  2544. }
  2545. this.utcOffset(input, keepLocalTime);
  2546. return this;
  2547. } else {
  2548. return -this.utcOffset();
  2549. }
  2550. }
  2551. function setOffsetToUTC (keepLocalTime) {
  2552. return this.utcOffset(0, keepLocalTime);
  2553. }
  2554. function setOffsetToLocal (keepLocalTime) {
  2555. if (this._isUTC) {
  2556. this.utcOffset(0, keepLocalTime);
  2557. this._isUTC = false;
  2558. if (keepLocalTime) {
  2559. this.subtract(getDateOffset(this), 'm');
  2560. }
  2561. }
  2562. return this;
  2563. }
  2564. function setOffsetToParsedOffset () {
  2565. if (this._tzm != null) {
  2566. this.utcOffset(this._tzm, false, true);
  2567. } else if (typeof this._i === 'string') {
  2568. var tZone = offsetFromString(matchOffset, this._i);
  2569. if (tZone != null) {
  2570. this.utcOffset(tZone);
  2571. }
  2572. else {
  2573. this.utcOffset(0, true);
  2574. }
  2575. }
  2576. return this;
  2577. }
  2578. function hasAlignedHourOffset (input) {
  2579. if (!this.isValid()) {
  2580. return false;
  2581. }
  2582. input = input ? createLocal(input).utcOffset() : 0;
  2583. return (this.utcOffset() - input) % 60 === 0;
  2584. }
  2585. function isDaylightSavingTime () {
  2586. return (
  2587. this.utcOffset() > this.clone().month(0).utcOffset() ||
  2588. this.utcOffset() > this.clone().month(5).utcOffset()
  2589. );
  2590. }
  2591. function isDaylightSavingTimeShifted () {
  2592. if (!isUndefined(this._isDSTShifted)) {
  2593. return this._isDSTShifted;
  2594. }
  2595. var c = {};
  2596. copyConfig(c, this);
  2597. c = prepareConfig(c);
  2598. if (c._a) {
  2599. var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
  2600. this._isDSTShifted = this.isValid() &&
  2601. compareArrays(c._a, other.toArray()) > 0;
  2602. } else {
  2603. this._isDSTShifted = false;
  2604. }
  2605. return this._isDSTShifted;
  2606. }
  2607. function isLocal () {
  2608. return this.isValid() ? !this._isUTC : false;
  2609. }
  2610. function isUtcOffset () {
  2611. return this.isValid() ? this._isUTC : false;
  2612. }
  2613. function isUtc () {
  2614. return this.isValid() ? this._isUTC && this._offset === 0 : false;
  2615. }
  2616. // ASP.NET json date format regex
  2617. var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;
  2618. // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
  2619. // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
  2620. // and further modified to allow for strings containing both week and day
  2621. var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
  2622. function createDuration (input, key) {
  2623. var duration = input,
  2624. // matching against regexp is expensive, do it on demand
  2625. match = null,
  2626. sign,
  2627. ret,
  2628. diffRes;
  2629. if (isDuration(input)) {
  2630. duration = {
  2631. ms : input._milliseconds,
  2632. d : input._days,
  2633. M : input._months
  2634. };
  2635. } else if (isNumber(input)) {
  2636. duration = {};
  2637. if (key) {
  2638. duration[key] = input;
  2639. } else {
  2640. duration.milliseconds = input;
  2641. }
  2642. } else if (!!(match = aspNetRegex.exec(input))) {
  2643. sign = (match[1] === '-') ? -1 : 1;
  2644. duration = {
  2645. y : 0,
  2646. d : toInt(match[DATE]) * sign,
  2647. h : toInt(match[HOUR]) * sign,
  2648. m : toInt(match[MINUTE]) * sign,
  2649. s : toInt(match[SECOND]) * sign,
  2650. ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match
  2651. };
  2652. } else if (!!(match = isoRegex.exec(input))) {
  2653. sign = (match[1] === '-') ? -1 : (match[1] === '+') ? 1 : 1;
  2654. duration = {
  2655. y : parseIso(match[2], sign),
  2656. M : parseIso(match[3], sign),
  2657. w : parseIso(match[4], sign),
  2658. d : parseIso(match[5], sign),
  2659. h : parseIso(match[6], sign),
  2660. m : parseIso(match[7], sign),
  2661. s : parseIso(match[8], sign)
  2662. };
  2663. } else if (duration == null) {// checks for null or undefined
  2664. duration = {};
  2665. } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {
  2666. diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));
  2667. duration = {};
  2668. duration.ms = diffRes.milliseconds;
  2669. duration.M = diffRes.months;
  2670. }
  2671. ret = new Duration(duration);
  2672. if (isDuration(input) && hasOwnProp(input, '_locale')) {
  2673. ret._locale = input._locale;
  2674. }
  2675. return ret;
  2676. }
  2677. createDuration.fn = Duration.prototype;
  2678. createDuration.invalid = createInvalid$1;
  2679. function parseIso (inp, sign) {
  2680. // We'd normally use ~~inp for this, but unfortunately it also
  2681. // converts floats to ints.
  2682. // inp may be undefined, so careful calling replace on it.
  2683. var res = inp && parseFloat(inp.replace(',', '.'));
  2684. // apply sign while we're at it
  2685. return (isNaN(res) ? 0 : res) * sign;
  2686. }
  2687. function positiveMomentsDifference(base, other) {
  2688. var res = {milliseconds: 0, months: 0};
  2689. res.months = other.month() - base.month() +
  2690. (other.year() - base.year()) * 12;
  2691. if (base.clone().add(res.months, 'M').isAfter(other)) {
  2692. --res.months;
  2693. }
  2694. res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
  2695. return res;
  2696. }
  2697. function momentsDifference(base, other) {
  2698. var res;
  2699. if (!(base.isValid() && other.isValid())) {
  2700. return {milliseconds: 0, months: 0};
  2701. }
  2702. other = cloneWithOffset(other, base);
  2703. if (base.isBefore(other)) {
  2704. res = positiveMomentsDifference(base, other);
  2705. } else {
  2706. res = positiveMomentsDifference(other, base);
  2707. res.milliseconds = -res.milliseconds;
  2708. res.months = -res.months;
  2709. }
  2710. return res;
  2711. }
  2712. // TODO: remove 'name' arg after deprecation is removed
  2713. function createAdder(direction, name) {
  2714. return function (val, period) {
  2715. var dur, tmp;
  2716. //invert the arguments, but complain about it
  2717. if (period !== null && !isNaN(+period)) {
  2718. deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +
  2719. 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');
  2720. tmp = val; val = period; period = tmp;
  2721. }
  2722. val = typeof val === 'string' ? +val : val;
  2723. dur = createDuration(val, period);
  2724. addSubtract(this, dur, direction);
  2725. return this;
  2726. };
  2727. }
  2728. function addSubtract (mom, duration, isAdding, updateOffset) {
  2729. var milliseconds = duration._milliseconds,
  2730. days = absRound(duration._days),
  2731. months = absRound(duration._months);
  2732. if (!mom.isValid()) {
  2733. // No op
  2734. return;
  2735. }
  2736. updateOffset = updateOffset == null ? true : updateOffset;
  2737. if (months) {
  2738. setMonth(mom, get(mom, 'Month') + months * isAdding);
  2739. }
  2740. if (days) {
  2741. set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
  2742. }
  2743. if (milliseconds) {
  2744. mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
  2745. }
  2746. if (updateOffset) {
  2747. hooks.updateOffset(mom, days || months);
  2748. }
  2749. }
  2750. var add = createAdder(1, 'add');
  2751. var subtract = createAdder(-1, 'subtract');
  2752. function getCalendarFormat(myMoment, now) {
  2753. var diff = myMoment.diff(now, 'days', true);
  2754. return diff < -6 ? 'sameElse' :
  2755. diff < -1 ? 'lastWeek' :
  2756. diff < 0 ? 'lastDay' :
  2757. diff < 1 ? 'sameDay' :
  2758. diff < 2 ? 'nextDay' :
  2759. diff < 7 ? 'nextWeek' : 'sameElse';
  2760. }
  2761. function calendar$1 (time, formats) {
  2762. // We want to compare the start of today, vs this.
  2763. // Getting start-of-today depends on whether we're local/utc/offset or not.
  2764. var now = time || createLocal(),
  2765. sod = cloneWithOffset(now, this).startOf('day'),
  2766. format = hooks.calendarFormat(this, sod) || 'sameElse';
  2767. var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);
  2768. return this.format(output || this.localeData().calendar(format, this, createLocal(now)));
  2769. }
  2770. function clone () {
  2771. return new Moment(this);
  2772. }
  2773. function isAfter (input, units) {
  2774. var localInput = isMoment(input) ? input : createLocal(input);
  2775. if (!(this.isValid() && localInput.isValid())) {
  2776. return false;
  2777. }
  2778. units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
  2779. if (units === 'millisecond') {
  2780. return this.valueOf() > localInput.valueOf();
  2781. } else {
  2782. return localInput.valueOf() < this.clone().startOf(units).valueOf();
  2783. }
  2784. }
  2785. function isBefore (input, units) {
  2786. var localInput = isMoment(input) ? input : createLocal(input);
  2787. if (!(this.isValid() && localInput.isValid())) {
  2788. return false;
  2789. }
  2790. units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
  2791. if (units === 'millisecond') {
  2792. return this.valueOf() < localInput.valueOf();
  2793. } else {
  2794. return this.clone().endOf(units).valueOf() < localInput.valueOf();
  2795. }
  2796. }
  2797. function isBetween (from, to, units, inclusivity) {
  2798. inclusivity = inclusivity || '()';
  2799. return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&
  2800. (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));
  2801. }
  2802. function isSame (input, units) {
  2803. var localInput = isMoment(input) ? input : createLocal(input),
  2804. inputMs;
  2805. if (!(this.isValid() && localInput.isValid())) {
  2806. return false;
  2807. }
  2808. units = normalizeUnits(units || 'millisecond');
  2809. if (units === 'millisecond') {
  2810. return this.valueOf() === localInput.valueOf();
  2811. } else {
  2812. inputMs = localInput.valueOf();
  2813. return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
  2814. }
  2815. }
  2816. function isSameOrAfter (input, units) {
  2817. return this.isSame(input, units) || this.isAfter(input,units);
  2818. }
  2819. function isSameOrBefore (input, units) {
  2820. return this.isSame(input, units) || this.isBefore(input,units);
  2821. }
  2822. function diff (input, units, asFloat) {
  2823. var that,
  2824. zoneDelta,
  2825. delta, output;
  2826. if (!this.isValid()) {
  2827. return NaN;
  2828. }
  2829. that = cloneWithOffset(input, this);
  2830. if (!that.isValid()) {
  2831. return NaN;
  2832. }
  2833. zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
  2834. units = normalizeUnits(units);
  2835. switch (units) {
  2836. case 'year': output = monthDiff(this, that) / 12; break;
  2837. case 'month': output = monthDiff(this, that); break;
  2838. case 'quarter': output = monthDiff(this, that) / 3; break;
  2839. case 'second': output = (this - that) / 1e3; break; // 1000
  2840. case 'minute': output = (this - that) / 6e4; break; // 1000 * 60
  2841. case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60
  2842. case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst
  2843. case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst
  2844. default: output = this - that;
  2845. }
  2846. return asFloat ? output : absFloor(output);
  2847. }
  2848. function monthDiff (a, b) {
  2849. // difference in months
  2850. var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),
  2851. // b is in (anchor - 1 month, anchor + 1 month)
  2852. anchor = a.clone().add(wholeMonthDiff, 'months'),
  2853. anchor2, adjust;
  2854. if (b - anchor < 0) {
  2855. anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
  2856. // linear across the month
  2857. adjust = (b - anchor) / (anchor - anchor2);
  2858. } else {
  2859. anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
  2860. // linear across the month
  2861. adjust = (b - anchor) / (anchor2 - anchor);
  2862. }
  2863. //check for negative zero, return zero if negative zero
  2864. return -(wholeMonthDiff + adjust) || 0;
  2865. }
  2866. hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
  2867. hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
  2868. function toString () {
  2869. return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
  2870. }
  2871. function toISOString(keepOffset) {
  2872. if (!this.isValid()) {
  2873. return null;
  2874. }
  2875. var utc = keepOffset !== true;
  2876. var m = utc ? this.clone().utc() : this;
  2877. if (m.year() < 0 || m.year() > 9999) {
  2878. return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');
  2879. }
  2880. if (isFunction(Date.prototype.toISOString)) {
  2881. // native implementation is ~50x faster, use it when we can
  2882. if (utc) {
  2883. return this.toDate().toISOString();
  2884. } else {
  2885. return new Date(this._d.valueOf()).toISOString().replace('Z', formatMoment(m, 'Z'));
  2886. }
  2887. }
  2888. return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');
  2889. }
  2890. /**
  2891. * Return a human readable representation of a moment that can
  2892. * also be evaluated to get a new moment which is the same
  2893. *
  2894. * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
  2895. */
  2896. function inspect () {
  2897. if (!this.isValid()) {
  2898. return 'moment.invalid(/* ' + this._i + ' */)';
  2899. }
  2900. var func = 'moment';
  2901. var zone = '';
  2902. if (!this.isLocal()) {
  2903. func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
  2904. zone = 'Z';
  2905. }
  2906. var prefix = '[' + func + '("]';
  2907. var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';
  2908. var datetime = '-MM-DD[T]HH:mm:ss.SSS';
  2909. var suffix = zone + '[")]';
  2910. return this.format(prefix + year + datetime + suffix);
  2911. }
  2912. function format (inputString) {
  2913. if (!inputString) {
  2914. inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
  2915. }
  2916. var output = formatMoment(this, inputString);
  2917. return this.localeData().postformat(output);
  2918. }
  2919. function from (time, withoutSuffix) {
  2920. if (this.isValid() &&
  2921. ((isMoment(time) && time.isValid()) ||
  2922. createLocal(time).isValid())) {
  2923. return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
  2924. } else {
  2925. return this.localeData().invalidDate();
  2926. }
  2927. }
  2928. function fromNow (withoutSuffix) {
  2929. return this.from(createLocal(), withoutSuffix);
  2930. }
  2931. function to (time, withoutSuffix) {
  2932. if (this.isValid() &&
  2933. ((isMoment(time) && time.isValid()) ||
  2934. createLocal(time).isValid())) {
  2935. return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
  2936. } else {
  2937. return this.localeData().invalidDate();
  2938. }
  2939. }
  2940. function toNow (withoutSuffix) {
  2941. return this.to(createLocal(), withoutSuffix);
  2942. }
  2943. // If passed a locale key, it will set the locale for this
  2944. // instance. Otherwise, it will return the locale configuration
  2945. // variables for this instance.
  2946. function locale (key) {
  2947. var newLocaleData;
  2948. if (key === undefined) {
  2949. return this._locale._abbr;
  2950. } else {
  2951. newLocaleData = getLocale(key);
  2952. if (newLocaleData != null) {
  2953. this._locale = newLocaleData;
  2954. }
  2955. return this;
  2956. }
  2957. }
  2958. var lang = deprecate(
  2959. 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
  2960. function (key) {
  2961. if (key === undefined) {
  2962. return this.localeData();
  2963. } else {
  2964. return this.locale(key);
  2965. }
  2966. }
  2967. );
  2968. function localeData () {
  2969. return this._locale;
  2970. }
  2971. function startOf (units) {
  2972. units = normalizeUnits(units);
  2973. // the following switch intentionally omits break keywords
  2974. // to utilize falling through the cases.
  2975. switch (units) {
  2976. case 'year':
  2977. this.month(0);
  2978. /* falls through */
  2979. case 'quarter':
  2980. case 'month':
  2981. this.date(1);
  2982. /* falls through */
  2983. case 'week':
  2984. case 'isoWeek':
  2985. case 'day':
  2986. case 'date':
  2987. this.hours(0);
  2988. /* falls through */
  2989. case 'hour':
  2990. this.minutes(0);
  2991. /* falls through */
  2992. case 'minute':
  2993. this.seconds(0);
  2994. /* falls through */
  2995. case 'second':
  2996. this.milliseconds(0);
  2997. }
  2998. // weeks are a special case
  2999. if (units === 'week') {
  3000. this.weekday(0);
  3001. }
  3002. if (units === 'isoWeek') {
  3003. this.isoWeekday(1);
  3004. }
  3005. // quarters are also special
  3006. if (units === 'quarter') {
  3007. this.month(Math.floor(this.month() / 3) * 3);
  3008. }
  3009. return this;
  3010. }
  3011. function endOf (units) {
  3012. units = normalizeUnits(units);
  3013. if (units === undefined || units === 'millisecond') {
  3014. return this;
  3015. }
  3016. // 'date' is an alias for 'day', so it should be considered as such.
  3017. if (units === 'date') {
  3018. units = 'day';
  3019. }
  3020. return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
  3021. }
  3022. function valueOf () {
  3023. return this._d.valueOf() - ((this._offset || 0) * 60000);
  3024. }
  3025. function unix () {
  3026. return Math.floor(this.valueOf() / 1000);
  3027. }
  3028. function toDate () {
  3029. return new Date(this.valueOf());
  3030. }
  3031. function toArray () {
  3032. var m = this;
  3033. return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
  3034. }
  3035. function toObject () {
  3036. var m = this;
  3037. return {
  3038. years: m.year(),
  3039. months: m.month(),
  3040. date: m.date(),
  3041. hours: m.hours(),
  3042. minutes: m.minutes(),
  3043. seconds: m.seconds(),
  3044. milliseconds: m.milliseconds()
  3045. };
  3046. }
  3047. function toJSON () {
  3048. // new Date(NaN).toJSON() === null
  3049. return this.isValid() ? this.toISOString() : null;
  3050. }
  3051. function isValid$2 () {
  3052. return isValid(this);
  3053. }
  3054. function parsingFlags () {
  3055. return extend({}, getParsingFlags(this));
  3056. }
  3057. function invalidAt () {
  3058. return getParsingFlags(this).overflow;
  3059. }
  3060. function creationData() {
  3061. return {
  3062. input: this._i,
  3063. format: this._f,
  3064. locale: this._locale,
  3065. isUTC: this._isUTC,
  3066. strict: this._strict
  3067. };
  3068. }
  3069. // FORMATTING
  3070. addFormatToken(0, ['gg', 2], 0, function () {
  3071. return this.weekYear() % 100;
  3072. });
  3073. addFormatToken(0, ['GG', 2], 0, function () {
  3074. return this.isoWeekYear() % 100;
  3075. });
  3076. function addWeekYearFormatToken (token, getter) {
  3077. addFormatToken(0, [token, token.length], 0, getter);
  3078. }
  3079. addWeekYearFormatToken('gggg', 'weekYear');
  3080. addWeekYearFormatToken('ggggg', 'weekYear');
  3081. addWeekYearFormatToken('GGGG', 'isoWeekYear');
  3082. addWeekYearFormatToken('GGGGG', 'isoWeekYear');
  3083. // ALIASES
  3084. addUnitAlias('weekYear', 'gg');
  3085. addUnitAlias('isoWeekYear', 'GG');
  3086. // PRIORITY
  3087. addUnitPriority('weekYear', 1);
  3088. addUnitPriority('isoWeekYear', 1);
  3089. // PARSING
  3090. addRegexToken('G', matchSigned);
  3091. addRegexToken('g', matchSigned);
  3092. addRegexToken('GG', match1to2, match2);
  3093. addRegexToken('gg', match1to2, match2);
  3094. addRegexToken('GGGG', match1to4, match4);
  3095. addRegexToken('gggg', match1to4, match4);
  3096. addRegexToken('GGGGG', match1to6, match6);
  3097. addRegexToken('ggggg', match1to6, match6);
  3098. addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {
  3099. week[token.substr(0, 2)] = toInt(input);
  3100. });
  3101. addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
  3102. week[token] = hooks.parseTwoDigitYear(input);
  3103. });
  3104. // MOMENTS
  3105. function getSetWeekYear (input) {
  3106. return getSetWeekYearHelper.call(this,
  3107. input,
  3108. this.week(),
  3109. this.weekday(),
  3110. this.localeData()._week.dow,
  3111. this.localeData()._week.doy);
  3112. }
  3113. function getSetISOWeekYear (input) {
  3114. return getSetWeekYearHelper.call(this,
  3115. input, this.isoWeek(), this.isoWeekday(), 1, 4);
  3116. }
  3117. function getISOWeeksInYear () {
  3118. return weeksInYear(this.year(), 1, 4);
  3119. }
  3120. function getWeeksInYear () {
  3121. var weekInfo = this.localeData()._week;
  3122. return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
  3123. }
  3124. function getSetWeekYearHelper(input, week, weekday, dow, doy) {
  3125. var weeksTarget;
  3126. if (input == null) {
  3127. return weekOfYear(this, dow, doy).year;
  3128. } else {
  3129. weeksTarget = weeksInYear(input, dow, doy);
  3130. if (week > weeksTarget) {
  3131. week = weeksTarget;
  3132. }
  3133. return setWeekAll.call(this, input, week, weekday, dow, doy);
  3134. }
  3135. }
  3136. function setWeekAll(weekYear, week, weekday, dow, doy) {
  3137. var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
  3138. date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
  3139. this.year(date.getUTCFullYear());
  3140. this.month(date.getUTCMonth());
  3141. this.date(date.getUTCDate());
  3142. return this;
  3143. }
  3144. // FORMATTING
  3145. addFormatToken('Q', 0, 'Qo', 'quarter');
  3146. // ALIASES
  3147. addUnitAlias('quarter', 'Q');
  3148. // PRIORITY
  3149. addUnitPriority('quarter', 7);
  3150. // PARSING
  3151. addRegexToken('Q', match1);
  3152. addParseToken('Q', function (input, array) {
  3153. array[MONTH] = (toInt(input) - 1) * 3;
  3154. });
  3155. // MOMENTS
  3156. function getSetQuarter (input) {
  3157. return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
  3158. }
  3159. // FORMATTING
  3160. addFormatToken('D', ['DD', 2], 'Do', 'date');
  3161. // ALIASES
  3162. addUnitAlias('date', 'D');
  3163. // PRIOROITY
  3164. addUnitPriority('date', 9);
  3165. // PARSING
  3166. addRegexToken('D', match1to2);
  3167. addRegexToken('DD', match1to2, match2);
  3168. addRegexToken('Do', function (isStrict, locale) {
  3169. // TODO: Remove "ordinalParse" fallback in next major release.
  3170. return isStrict ?
  3171. (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :
  3172. locale._dayOfMonthOrdinalParseLenient;
  3173. });
  3174. addParseToken(['D', 'DD'], DATE);
  3175. addParseToken('Do', function (input, array) {
  3176. array[DATE] = toInt(input.match(match1to2)[0]);
  3177. });
  3178. // MOMENTS
  3179. var getSetDayOfMonth = makeGetSet('Date', true);
  3180. // FORMATTING
  3181. addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
  3182. // ALIASES
  3183. addUnitAlias('dayOfYear', 'DDD');
  3184. // PRIORITY
  3185. addUnitPriority('dayOfYear', 4);
  3186. // PARSING
  3187. addRegexToken('DDD', match1to3);
  3188. addRegexToken('DDDD', match3);
  3189. addParseToken(['DDD', 'DDDD'], function (input, array, config) {
  3190. config._dayOfYear = toInt(input);
  3191. });
  3192. // HELPERS
  3193. // MOMENTS
  3194. function getSetDayOfYear (input) {
  3195. var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
  3196. return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
  3197. }
  3198. // FORMATTING
  3199. addFormatToken('m', ['mm', 2], 0, 'minute');
  3200. // ALIASES
  3201. addUnitAlias('minute', 'm');
  3202. // PRIORITY
  3203. addUnitPriority('minute', 14);
  3204. // PARSING
  3205. addRegexToken('m', match1to2);
  3206. addRegexToken('mm', match1to2, match2);
  3207. addParseToken(['m', 'mm'], MINUTE);
  3208. // MOMENTS
  3209. var getSetMinute = makeGetSet('Minutes', false);
  3210. // FORMATTING
  3211. addFormatToken('s', ['ss', 2], 0, 'second');
  3212. // ALIASES
  3213. addUnitAlias('second', 's');
  3214. // PRIORITY
  3215. addUnitPriority('second', 15);
  3216. // PARSING
  3217. addRegexToken('s', match1to2);
  3218. addRegexToken('ss', match1to2, match2);
  3219. addParseToken(['s', 'ss'], SECOND);
  3220. // MOMENTS
  3221. var getSetSecond = makeGetSet('Seconds', false);
  3222. // FORMATTING
  3223. addFormatToken('S', 0, 0, function () {
  3224. return ~~(this.millisecond() / 100);
  3225. });
  3226. addFormatToken(0, ['SS', 2], 0, function () {
  3227. return ~~(this.millisecond() / 10);
  3228. });
  3229. addFormatToken(0, ['SSS', 3], 0, 'millisecond');
  3230. addFormatToken(0, ['SSSS', 4], 0, function () {
  3231. return this.millisecond() * 10;
  3232. });
  3233. addFormatToken(0, ['SSSSS', 5], 0, function () {
  3234. return this.millisecond() * 100;
  3235. });
  3236. addFormatToken(0, ['SSSSSS', 6], 0, function () {
  3237. return this.millisecond() * 1000;
  3238. });
  3239. addFormatToken(0, ['SSSSSSS', 7], 0, function () {
  3240. return this.millisecond() * 10000;
  3241. });
  3242. addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
  3243. return this.millisecond() * 100000;
  3244. });
  3245. addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
  3246. return this.millisecond() * 1000000;
  3247. });
  3248. // ALIASES
  3249. addUnitAlias('millisecond', 'ms');
  3250. // PRIORITY
  3251. addUnitPriority('millisecond', 16);
  3252. // PARSING
  3253. addRegexToken('S', match1to3, match1);
  3254. addRegexToken('SS', match1to3, match2);
  3255. addRegexToken('SSS', match1to3, match3);
  3256. var token;
  3257. for (token = 'SSSS'; token.length <= 9; token += 'S') {
  3258. addRegexToken(token, matchUnsigned);
  3259. }
  3260. function parseMs(input, array) {
  3261. array[MILLISECOND] = toInt(('0.' + input) * 1000);
  3262. }
  3263. for (token = 'S'; token.length <= 9; token += 'S') {
  3264. addParseToken(token, parseMs);
  3265. }
  3266. // MOMENTS
  3267. var getSetMillisecond = makeGetSet('Milliseconds', false);
  3268. // FORMATTING
  3269. addFormatToken('z', 0, 0, 'zoneAbbr');
  3270. addFormatToken('zz', 0, 0, 'zoneName');
  3271. // MOMENTS
  3272. function getZoneAbbr () {
  3273. return this._isUTC ? 'UTC' : '';
  3274. }
  3275. function getZoneName () {
  3276. return this._isUTC ? 'Coordinated Universal Time' : '';
  3277. }
  3278. var proto = Moment.prototype;
  3279. proto.add = add;
  3280. proto.calendar = calendar$1;
  3281. proto.clone = clone;
  3282. proto.diff = diff;
  3283. proto.endOf = endOf;
  3284. proto.format = format;
  3285. proto.from = from;
  3286. proto.fromNow = fromNow;
  3287. proto.to = to;
  3288. proto.toNow = toNow;
  3289. proto.get = stringGet;
  3290. proto.invalidAt = invalidAt;
  3291. proto.isAfter = isAfter;
  3292. proto.isBefore = isBefore;
  3293. proto.isBetween = isBetween;
  3294. proto.isSame = isSame;
  3295. proto.isSameOrAfter = isSameOrAfter;
  3296. proto.isSameOrBefore = isSameOrBefore;
  3297. proto.isValid = isValid$2;
  3298. proto.lang = lang;
  3299. proto.locale = locale;
  3300. proto.localeData = localeData;
  3301. proto.max = prototypeMax;
  3302. proto.min = prototypeMin;
  3303. proto.parsingFlags = parsingFlags;
  3304. proto.set = stringSet;
  3305. proto.startOf = startOf;
  3306. proto.subtract = subtract;
  3307. proto.toArray = toArray;
  3308. proto.toObject = toObject;
  3309. proto.toDate = toDate;
  3310. proto.toISOString = toISOString;
  3311. proto.inspect = inspect;
  3312. proto.toJSON = toJSON;
  3313. proto.toString = toString;
  3314. proto.unix = unix;
  3315. proto.valueOf = valueOf;
  3316. proto.creationData = creationData;
  3317. // Year
  3318. proto.year = getSetYear;
  3319. proto.isLeapYear = getIsLeapYear;
  3320. // Week Year
  3321. proto.weekYear = getSetWeekYear;
  3322. proto.isoWeekYear = getSetISOWeekYear;
  3323. // Quarter
  3324. proto.quarter = proto.quarters = getSetQuarter;
  3325. // Month
  3326. proto.month = getSetMonth;
  3327. proto.daysInMonth = getDaysInMonth;
  3328. // Week
  3329. proto.week = proto.weeks = getSetWeek;
  3330. proto.isoWeek = proto.isoWeeks = getSetISOWeek;
  3331. proto.weeksInYear = getWeeksInYear;
  3332. proto.isoWeeksInYear = getISOWeeksInYear;
  3333. // Day
  3334. proto.date = getSetDayOfMonth;
  3335. proto.day = proto.days = getSetDayOfWeek;
  3336. proto.weekday = getSetLocaleDayOfWeek;
  3337. proto.isoWeekday = getSetISODayOfWeek;
  3338. proto.dayOfYear = getSetDayOfYear;
  3339. // Hour
  3340. proto.hour = proto.hours = getSetHour;
  3341. // Minute
  3342. proto.minute = proto.minutes = getSetMinute;
  3343. // Second
  3344. proto.second = proto.seconds = getSetSecond;
  3345. // Millisecond
  3346. proto.millisecond = proto.milliseconds = getSetMillisecond;
  3347. // Offset
  3348. proto.utcOffset = getSetOffset;
  3349. proto.utc = setOffsetToUTC;
  3350. proto.local = setOffsetToLocal;
  3351. proto.parseZone = setOffsetToParsedOffset;
  3352. proto.hasAlignedHourOffset = hasAlignedHourOffset;
  3353. proto.isDST = isDaylightSavingTime;
  3354. proto.isLocal = isLocal;
  3355. proto.isUtcOffset = isUtcOffset;
  3356. proto.isUtc = isUtc;
  3357. proto.isUTC = isUtc;
  3358. // Timezone
  3359. proto.zoneAbbr = getZoneAbbr;
  3360. proto.zoneName = getZoneName;
  3361. // Deprecations
  3362. proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);
  3363. proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);
  3364. proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);
  3365. proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);
  3366. proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);
  3367. function createUnix (input) {
  3368. return createLocal(input * 1000);
  3369. }
  3370. function createInZone () {
  3371. return createLocal.apply(null, arguments).parseZone();
  3372. }
  3373. function preParsePostFormat (string) {
  3374. return string;
  3375. }
  3376. var proto$1 = Locale.prototype;
  3377. proto$1.calendar = calendar;
  3378. proto$1.longDateFormat = longDateFormat;
  3379. proto$1.invalidDate = invalidDate;
  3380. proto$1.ordinal = ordinal;
  3381. proto$1.preparse = preParsePostFormat;
  3382. proto$1.postformat = preParsePostFormat;
  3383. proto$1.relativeTime = relativeTime;
  3384. proto$1.pastFuture = pastFuture;
  3385. proto$1.set = set;
  3386. // Month
  3387. proto$1.months = localeMonths;
  3388. proto$1.monthsShort = localeMonthsShort;
  3389. proto$1.monthsParse = localeMonthsParse;
  3390. proto$1.monthsRegex = monthsRegex;
  3391. proto$1.monthsShortRegex = monthsShortRegex;
  3392. // Week
  3393. proto$1.week = localeWeek;
  3394. proto$1.firstDayOfYear = localeFirstDayOfYear;
  3395. proto$1.firstDayOfWeek = localeFirstDayOfWeek;
  3396. // Day of Week
  3397. proto$1.weekdays = localeWeekdays;
  3398. proto$1.weekdaysMin = localeWeekdaysMin;
  3399. proto$1.weekdaysShort = localeWeekdaysShort;
  3400. proto$1.weekdaysParse = localeWeekdaysParse;
  3401. proto$1.weekdaysRegex = weekdaysRegex;
  3402. proto$1.weekdaysShortRegex = weekdaysShortRegex;
  3403. proto$1.weekdaysMinRegex = weekdaysMinRegex;
  3404. // Hours
  3405. proto$1.isPM = localeIsPM;
  3406. proto$1.meridiem = localeMeridiem;
  3407. function get$1 (format, index, field, setter) {
  3408. var locale = getLocale();
  3409. var utc = createUTC().set(setter, index);
  3410. return locale[field](utc, format);
  3411. }
  3412. function listMonthsImpl (format, index, field) {
  3413. if (isNumber(format)) {
  3414. index = format;
  3415. format = undefined;
  3416. }
  3417. format = format || '';
  3418. if (index != null) {
  3419. return get$1(format, index, field, 'month');
  3420. }
  3421. var i;
  3422. var out = [];
  3423. for (i = 0; i < 12; i++) {
  3424. out[i] = get$1(format, i, field, 'month');
  3425. }
  3426. return out;
  3427. }
  3428. // ()
  3429. // (5)
  3430. // (fmt, 5)
  3431. // (fmt)
  3432. // (true)
  3433. // (true, 5)
  3434. // (true, fmt, 5)
  3435. // (true, fmt)
  3436. function listWeekdaysImpl (localeSorted, format, index, field) {
  3437. if (typeof localeSorted === 'boolean') {
  3438. if (isNumber(format)) {
  3439. index = format;
  3440. format = undefined;
  3441. }
  3442. format = format || '';
  3443. } else {
  3444. format = localeSorted;
  3445. index = format;
  3446. localeSorted = false;
  3447. if (isNumber(format)) {
  3448. index = format;
  3449. format = undefined;
  3450. }
  3451. format = format || '';
  3452. }
  3453. var locale = getLocale(),
  3454. shift = localeSorted ? locale._week.dow : 0;
  3455. if (index != null) {
  3456. return get$1(format, (index + shift) % 7, field, 'day');
  3457. }
  3458. var i;
  3459. var out = [];
  3460. for (i = 0; i < 7; i++) {
  3461. out[i] = get$1(format, (i + shift) % 7, field, 'day');
  3462. }
  3463. return out;
  3464. }
  3465. function listMonths (format, index) {
  3466. return listMonthsImpl(format, index, 'months');
  3467. }
  3468. function listMonthsShort (format, index) {
  3469. return listMonthsImpl(format, index, 'monthsShort');
  3470. }
  3471. function listWeekdays (localeSorted, format, index) {
  3472. return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
  3473. }
  3474. function listWeekdaysShort (localeSorted, format, index) {
  3475. return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
  3476. }
  3477. function listWeekdaysMin (localeSorted, format, index) {
  3478. return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
  3479. }
  3480. getSetGlobalLocale('en', {
  3481. dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  3482. ordinal : function (number) {
  3483. var b = number % 10,
  3484. output = (toInt(number % 100 / 10) === 1) ? 'th' :
  3485. (b === 1) ? 'st' :
  3486. (b === 2) ? 'nd' :
  3487. (b === 3) ? 'rd' : 'th';
  3488. return number + output;
  3489. }
  3490. });
  3491. // Side effect imports
  3492. hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);
  3493. hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);
  3494. var mathAbs = Math.abs;
  3495. function abs () {
  3496. var data = this._data;
  3497. this._milliseconds = mathAbs(this._milliseconds);
  3498. this._days = mathAbs(this._days);
  3499. this._months = mathAbs(this._months);
  3500. data.milliseconds = mathAbs(data.milliseconds);
  3501. data.seconds = mathAbs(data.seconds);
  3502. data.minutes = mathAbs(data.minutes);
  3503. data.hours = mathAbs(data.hours);
  3504. data.months = mathAbs(data.months);
  3505. data.years = mathAbs(data.years);
  3506. return this;
  3507. }
  3508. function addSubtract$1 (duration, input, value, direction) {
  3509. var other = createDuration(input, value);
  3510. duration._milliseconds += direction * other._milliseconds;
  3511. duration._days += direction * other._days;
  3512. duration._months += direction * other._months;
  3513. return duration._bubble();
  3514. }
  3515. // supports only 2.0-style add(1, 's') or add(duration)
  3516. function add$1 (input, value) {
  3517. return addSubtract$1(this, input, value, 1);
  3518. }
  3519. // supports only 2.0-style subtract(1, 's') or subtract(duration)
  3520. function subtract$1 (input, value) {
  3521. return addSubtract$1(this, input, value, -1);
  3522. }
  3523. function absCeil (number) {
  3524. if (number < 0) {
  3525. return Math.floor(number);
  3526. } else {
  3527. return Math.ceil(number);
  3528. }
  3529. }
  3530. function bubble () {
  3531. var milliseconds = this._milliseconds;
  3532. var days = this._days;
  3533. var months = this._months;
  3534. var data = this._data;
  3535. var seconds, minutes, hours, years, monthsFromDays;
  3536. // if we have a mix of positive and negative values, bubble down first
  3537. // check: https://github.com/moment/moment/issues/2166
  3538. if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
  3539. (milliseconds <= 0 && days <= 0 && months <= 0))) {
  3540. milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
  3541. days = 0;
  3542. months = 0;
  3543. }
  3544. // The following code bubbles up values, see the tests for
  3545. // examples of what that means.
  3546. data.milliseconds = milliseconds % 1000;
  3547. seconds = absFloor(milliseconds / 1000);
  3548. data.seconds = seconds % 60;
  3549. minutes = absFloor(seconds / 60);
  3550. data.minutes = minutes % 60;
  3551. hours = absFloor(minutes / 60);
  3552. data.hours = hours % 24;
  3553. days += absFloor(hours / 24);
  3554. // convert days to months
  3555. monthsFromDays = absFloor(daysToMonths(days));
  3556. months += monthsFromDays;
  3557. days -= absCeil(monthsToDays(monthsFromDays));
  3558. // 12 months -> 1 year
  3559. years = absFloor(months / 12);
  3560. months %= 12;
  3561. data.days = days;
  3562. data.months = months;
  3563. data.years = years;
  3564. return this;
  3565. }
  3566. function daysToMonths (days) {
  3567. // 400 years have 146097 days (taking into account leap year rules)
  3568. // 400 years have 12 months === 4800
  3569. return days * 4800 / 146097;
  3570. }
  3571. function monthsToDays (months) {
  3572. // the reverse of daysToMonths
  3573. return months * 146097 / 4800;
  3574. }
  3575. function as (units) {
  3576. if (!this.isValid()) {
  3577. return NaN;
  3578. }
  3579. var days;
  3580. var months;
  3581. var milliseconds = this._milliseconds;
  3582. units = normalizeUnits(units);
  3583. if (units === 'month' || units === 'year') {
  3584. days = this._days + milliseconds / 864e5;
  3585. months = this._months + daysToMonths(days);
  3586. return units === 'month' ? months : months / 12;
  3587. } else {
  3588. // handle milliseconds separately because of floating point math errors (issue #1867)
  3589. days = this._days + Math.round(monthsToDays(this._months));
  3590. switch (units) {
  3591. case 'week' : return days / 7 + milliseconds / 6048e5;
  3592. case 'day' : return days + milliseconds / 864e5;
  3593. case 'hour' : return days * 24 + milliseconds / 36e5;
  3594. case 'minute' : return days * 1440 + milliseconds / 6e4;
  3595. case 'second' : return days * 86400 + milliseconds / 1000;
  3596. // Math.floor prevents floating point math errors here
  3597. case 'millisecond': return Math.floor(days * 864e5) + milliseconds;
  3598. default: throw new Error('Unknown unit ' + units);
  3599. }
  3600. }
  3601. }
  3602. // TODO: Use this.as('ms')?
  3603. function valueOf$1 () {
  3604. if (!this.isValid()) {
  3605. return NaN;
  3606. }
  3607. return (
  3608. this._milliseconds +
  3609. this._days * 864e5 +
  3610. (this._months % 12) * 2592e6 +
  3611. toInt(this._months / 12) * 31536e6
  3612. );
  3613. }
  3614. function makeAs (alias) {
  3615. return function () {
  3616. return this.as(alias);
  3617. };
  3618. }
  3619. var asMilliseconds = makeAs('ms');
  3620. var asSeconds = makeAs('s');
  3621. var asMinutes = makeAs('m');
  3622. var asHours = makeAs('h');
  3623. var asDays = makeAs('d');
  3624. var asWeeks = makeAs('w');
  3625. var asMonths = makeAs('M');
  3626. var asYears = makeAs('y');
  3627. function clone$1 () {
  3628. return createDuration(this);
  3629. }
  3630. function get$2 (units) {
  3631. units = normalizeUnits(units);
  3632. return this.isValid() ? this[units + 's']() : NaN;
  3633. }
  3634. function makeGetter(name) {
  3635. return function () {
  3636. return this.isValid() ? this._data[name] : NaN;
  3637. };
  3638. }
  3639. var milliseconds = makeGetter('milliseconds');
  3640. var seconds = makeGetter('seconds');
  3641. var minutes = makeGetter('minutes');
  3642. var hours = makeGetter('hours');
  3643. var days = makeGetter('days');
  3644. var months = makeGetter('months');
  3645. var years = makeGetter('years');
  3646. function weeks () {
  3647. return absFloor(this.days() / 7);
  3648. }
  3649. var round = Math.round;
  3650. var thresholds = {
  3651. ss: 44, // a few seconds to seconds
  3652. s : 45, // seconds to minute
  3653. m : 45, // minutes to hour
  3654. h : 22, // hours to day
  3655. d : 26, // days to month
  3656. M : 11 // months to year
  3657. };
  3658. // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
  3659. function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
  3660. return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
  3661. }
  3662. function relativeTime$1 (posNegDuration, withoutSuffix, locale) {
  3663. var duration = createDuration(posNegDuration).abs();
  3664. var seconds = round(duration.as('s'));
  3665. var minutes = round(duration.as('m'));
  3666. var hours = round(duration.as('h'));
  3667. var days = round(duration.as('d'));
  3668. var months = round(duration.as('M'));
  3669. var years = round(duration.as('y'));
  3670. var a = seconds <= thresholds.ss && ['s', seconds] ||
  3671. seconds < thresholds.s && ['ss', seconds] ||
  3672. minutes <= 1 && ['m'] ||
  3673. minutes < thresholds.m && ['mm', minutes] ||
  3674. hours <= 1 && ['h'] ||
  3675. hours < thresholds.h && ['hh', hours] ||
  3676. days <= 1 && ['d'] ||
  3677. days < thresholds.d && ['dd', days] ||
  3678. months <= 1 && ['M'] ||
  3679. months < thresholds.M && ['MM', months] ||
  3680. years <= 1 && ['y'] || ['yy', years];
  3681. a[2] = withoutSuffix;
  3682. a[3] = +posNegDuration > 0;
  3683. a[4] = locale;
  3684. return substituteTimeAgo.apply(null, a);
  3685. }
  3686. // This function allows you to set the rounding function for relative time strings
  3687. function getSetRelativeTimeRounding (roundingFunction) {
  3688. if (roundingFunction === undefined) {
  3689. return round;
  3690. }
  3691. if (typeof(roundingFunction) === 'function') {
  3692. round = roundingFunction;
  3693. return true;
  3694. }
  3695. return false;
  3696. }
  3697. // This function allows you to set a threshold for relative time strings
  3698. function getSetRelativeTimeThreshold (threshold, limit) {
  3699. if (thresholds[threshold] === undefined) {
  3700. return false;
  3701. }
  3702. if (limit === undefined) {
  3703. return thresholds[threshold];
  3704. }
  3705. thresholds[threshold] = limit;
  3706. if (threshold === 's') {
  3707. thresholds.ss = limit - 1;
  3708. }
  3709. return true;
  3710. }
  3711. function humanize (withSuffix) {
  3712. if (!this.isValid()) {
  3713. return this.localeData().invalidDate();
  3714. }
  3715. var locale = this.localeData();
  3716. var output = relativeTime$1(this, !withSuffix, locale);
  3717. if (withSuffix) {
  3718. output = locale.pastFuture(+this, output);
  3719. }
  3720. return locale.postformat(output);
  3721. }
  3722. var abs$1 = Math.abs;
  3723. function sign(x) {
  3724. return ((x > 0) - (x < 0)) || +x;
  3725. }
  3726. function toISOString$1() {
  3727. // for ISO strings we do not use the normal bubbling rules:
  3728. // * milliseconds bubble up until they become hours
  3729. // * days do not bubble at all
  3730. // * months bubble up until they become years
  3731. // This is because there is no context-free conversion between hours and days
  3732. // (think of clock changes)
  3733. // and also not between days and months (28-31 days per month)
  3734. if (!this.isValid()) {
  3735. return this.localeData().invalidDate();
  3736. }
  3737. var seconds = abs$1(this._milliseconds) / 1000;
  3738. var days = abs$1(this._days);
  3739. var months = abs$1(this._months);
  3740. var minutes, hours, years;
  3741. // 3600 seconds -> 60 minutes -> 1 hour
  3742. minutes = absFloor(seconds / 60);
  3743. hours = absFloor(minutes / 60);
  3744. seconds %= 60;
  3745. minutes %= 60;
  3746. // 12 months -> 1 year
  3747. years = absFloor(months / 12);
  3748. months %= 12;
  3749. // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
  3750. var Y = years;
  3751. var M = months;
  3752. var D = days;
  3753. var h = hours;
  3754. var m = minutes;
  3755. var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
  3756. var total = this.asSeconds();
  3757. if (!total) {
  3758. // this is the same as C#'s (Noda) and python (isodate)...
  3759. // but not other JS (goog.date)
  3760. return 'P0D';
  3761. }
  3762. var totalSign = total < 0 ? '-' : '';
  3763. var ymSign = sign(this._months) !== sign(total) ? '-' : '';
  3764. var daysSign = sign(this._days) !== sign(total) ? '-' : '';
  3765. var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
  3766. return totalSign + 'P' +
  3767. (Y ? ymSign + Y + 'Y' : '') +
  3768. (M ? ymSign + M + 'M' : '') +
  3769. (D ? daysSign + D + 'D' : '') +
  3770. ((h || m || s) ? 'T' : '') +
  3771. (h ? hmsSign + h + 'H' : '') +
  3772. (m ? hmsSign + m + 'M' : '') +
  3773. (s ? hmsSign + s + 'S' : '');
  3774. }
  3775. var proto$2 = Duration.prototype;
  3776. proto$2.isValid = isValid$1;
  3777. proto$2.abs = abs;
  3778. proto$2.add = add$1;
  3779. proto$2.subtract = subtract$1;
  3780. proto$2.as = as;
  3781. proto$2.asMilliseconds = asMilliseconds;
  3782. proto$2.asSeconds = asSeconds;
  3783. proto$2.asMinutes = asMinutes;
  3784. proto$2.asHours = asHours;
  3785. proto$2.asDays = asDays;
  3786. proto$2.asWeeks = asWeeks;
  3787. proto$2.asMonths = asMonths;
  3788. proto$2.asYears = asYears;
  3789. proto$2.valueOf = valueOf$1;
  3790. proto$2._bubble = bubble;
  3791. proto$2.clone = clone$1;
  3792. proto$2.get = get$2;
  3793. proto$2.milliseconds = milliseconds;
  3794. proto$2.seconds = seconds;
  3795. proto$2.minutes = minutes;
  3796. proto$2.hours = hours;
  3797. proto$2.days = days;
  3798. proto$2.weeks = weeks;
  3799. proto$2.months = months;
  3800. proto$2.years = years;
  3801. proto$2.humanize = humanize;
  3802. proto$2.toISOString = toISOString$1;
  3803. proto$2.toString = toISOString$1;
  3804. proto$2.toJSON = toISOString$1;
  3805. proto$2.locale = locale;
  3806. proto$2.localeData = localeData;
  3807. // Deprecations
  3808. proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);
  3809. proto$2.lang = lang;
  3810. // Side effect imports
  3811. // FORMATTING
  3812. addFormatToken('X', 0, 0, 'unix');
  3813. addFormatToken('x', 0, 0, 'valueOf');
  3814. // PARSING
  3815. addRegexToken('x', matchSigned);
  3816. addRegexToken('X', matchTimestamp);
  3817. addParseToken('X', function (input, array, config) {
  3818. config._d = new Date(parseFloat(input, 10) * 1000);
  3819. });
  3820. addParseToken('x', function (input, array, config) {
  3821. config._d = new Date(toInt(input));
  3822. });
  3823. // Side effect imports
  3824. hooks.version = '2.20.1';
  3825. setHookCallback(createLocal);
  3826. hooks.fn = proto;
  3827. hooks.min = min;
  3828. hooks.max = max;
  3829. hooks.now = now;
  3830. hooks.utc = createUTC;
  3831. hooks.unix = createUnix;
  3832. hooks.months = listMonths;
  3833. hooks.isDate = isDate;
  3834. hooks.locale = getSetGlobalLocale;
  3835. hooks.invalid = createInvalid;
  3836. hooks.duration = createDuration;
  3837. hooks.isMoment = isMoment;
  3838. hooks.weekdays = listWeekdays;
  3839. hooks.parseZone = createInZone;
  3840. hooks.localeData = getLocale;
  3841. hooks.isDuration = isDuration;
  3842. hooks.monthsShort = listMonthsShort;
  3843. hooks.weekdaysMin = listWeekdaysMin;
  3844. hooks.defineLocale = defineLocale;
  3845. hooks.updateLocale = updateLocale;
  3846. hooks.locales = listLocales;
  3847. hooks.weekdaysShort = listWeekdaysShort;
  3848. hooks.normalizeUnits = normalizeUnits;
  3849. hooks.relativeTimeRounding = getSetRelativeTimeRounding;
  3850. hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
  3851. hooks.calendarFormat = getCalendarFormat;
  3852. hooks.prototype = proto;
  3853. // currently HTML5 input type only supports 24-hour formats
  3854. hooks.HTML5_FMT = {
  3855. DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
  3856. DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
  3857. DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
  3858. DATE: 'YYYY-MM-DD', // <input type="date" />
  3859. TIME: 'HH:mm', // <input type="time" />
  3860. TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
  3861. TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
  3862. WEEK: 'YYYY-[W]WW', // <input type="week" />
  3863. MONTH: 'YYYY-MM' // <input type="month" />
  3864. };
  3865. return hooks;
  3866. })));
  3867. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(58)(module)))
  3868. /***/ }),
  3869. /* 1 */
  3870. /***/ (function(module, exports, __webpack_require__) {
  3871. var global = __webpack_require__(6);
  3872. var core = __webpack_require__(96);
  3873. var hide = __webpack_require__(27);
  3874. var redefine = __webpack_require__(41);
  3875. var ctx = __webpack_require__(34);
  3876. var PROTOTYPE = 'prototype';
  3877. var $export = function (type, name, source) {
  3878. var IS_FORCED = type & $export.F;
  3879. var IS_GLOBAL = type & $export.G;
  3880. var IS_STATIC = type & $export.S;
  3881. var IS_PROTO = type & $export.P;
  3882. var IS_BIND = type & $export.B;
  3883. var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
  3884. var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  3885. var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
  3886. var key, own, out, exp;
  3887. if (IS_GLOBAL) source = name;
  3888. for (key in source) {
  3889. // contains in native
  3890. own = !IS_FORCED && target && target[key] !== undefined;
  3891. // export native or passed
  3892. out = (own ? target : source)[key];
  3893. // bind timers to global for call from export context
  3894. exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
  3895. // extend global
  3896. if (target) redefine(target, key, out, type & $export.U);
  3897. // export
  3898. if (exports[key] != out) hide(exports, key, exp);
  3899. if (IS_PROTO && expProto[key] != out) expProto[key] = out;
  3900. }
  3901. };
  3902. global.core = core;
  3903. // type bitmap
  3904. $export.F = 1; // forced
  3905. $export.G = 2; // global
  3906. $export.S = 4; // static
  3907. $export.P = 8; // proto
  3908. $export.B = 16; // bind
  3909. $export.W = 32; // wrap
  3910. $export.U = 64; // safe
  3911. $export.R = 128; // real proto method for `library`
  3912. module.exports = $export;
  3913. /***/ }),
  3914. /* 2 */
  3915. /***/ (function(module, exports) {
  3916. module.exports = require("util");
  3917. /***/ }),
  3918. /* 3 */
  3919. /***/ (function(module, exports, __webpack_require__) {
  3920. // Copyright (c) 2012, Mark Cavage. All rights reserved.
  3921. // Copyright 2015 Joyent, Inc.
  3922. var assert = __webpack_require__(83);
  3923. var Stream = __webpack_require__(10).Stream;
  3924. var util = __webpack_require__(2);
  3925. ///--- Globals
  3926. /* JSSTYLED */
  3927. var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
  3928. ///--- Internal
  3929. function _capitalize(str) {
  3930. return (str.charAt(0).toUpperCase() + str.slice(1));
  3931. }
  3932. function _toss(name, expected, oper, arg, actual) {
  3933. throw new assert.AssertionError({
  3934. message: util.format('%s (%s) is required', name, expected),
  3935. actual: (actual === undefined) ? typeof (arg) : actual(arg),
  3936. expected: expected,
  3937. operator: oper || '===',
  3938. stackStartFunction: _toss.caller
  3939. });
  3940. }
  3941. function _getClass(arg) {
  3942. return (Object.prototype.toString.call(arg).slice(8, -1));
  3943. }
  3944. function noop() {
  3945. // Why even bother with asserts?
  3946. }
  3947. ///--- Exports
  3948. var types = {
  3949. bool: {
  3950. check: function (arg) { return typeof (arg) === 'boolean'; }
  3951. },
  3952. func: {
  3953. check: function (arg) { return typeof (arg) === 'function'; }
  3954. },
  3955. string: {
  3956. check: function (arg) { return typeof (arg) === 'string'; }
  3957. },
  3958. object: {
  3959. check: function (arg) {
  3960. return typeof (arg) === 'object' && arg !== null;
  3961. }
  3962. },
  3963. number: {
  3964. check: function (arg) {
  3965. return typeof (arg) === 'number' && !isNaN(arg);
  3966. }
  3967. },
  3968. finite: {
  3969. check: function (arg) {
  3970. return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg);
  3971. }
  3972. },
  3973. buffer: {
  3974. check: function (arg) { return Buffer.isBuffer(arg); },
  3975. operator: 'Buffer.isBuffer'
  3976. },
  3977. array: {
  3978. check: function (arg) { return Array.isArray(arg); },
  3979. operator: 'Array.isArray'
  3980. },
  3981. stream: {
  3982. check: function (arg) { return arg instanceof Stream; },
  3983. operator: 'instanceof',
  3984. actual: _getClass
  3985. },
  3986. date: {
  3987. check: function (arg) { return arg instanceof Date; },
  3988. operator: 'instanceof',
  3989. actual: _getClass
  3990. },
  3991. regexp: {
  3992. check: function (arg) { return arg instanceof RegExp; },
  3993. operator: 'instanceof',
  3994. actual: _getClass
  3995. },
  3996. uuid: {
  3997. check: function (arg) {
  3998. return typeof (arg) === 'string' && UUID_REGEXP.test(arg);
  3999. },
  4000. operator: 'isUUID'
  4001. }
  4002. };
  4003. function _setExports(ndebug) {
  4004. var keys = Object.keys(types);
  4005. var out;
  4006. /* re-export standard assert */
  4007. if (process.env.NODE_NDEBUG) {
  4008. out = noop;
  4009. } else {
  4010. out = function (arg, msg) {
  4011. if (!arg) {
  4012. _toss(msg, 'true', arg);
  4013. }
  4014. };
  4015. }
  4016. /* standard checks */
  4017. keys.forEach(function (k) {
  4018. if (ndebug) {
  4019. out[k] = noop;
  4020. return;
  4021. }
  4022. var type = types[k];
  4023. out[k] = function (arg, msg) {
  4024. if (!type.check(arg)) {
  4025. _toss(msg, k, type.operator, arg, type.actual);
  4026. }
  4027. };
  4028. });
  4029. /* optional checks */
  4030. keys.forEach(function (k) {
  4031. var name = 'optional' + _capitalize(k);
  4032. if (ndebug) {
  4033. out[name] = noop;
  4034. return;
  4035. }
  4036. var type = types[k];
  4037. out[name] = function (arg, msg) {
  4038. if (arg === undefined || arg === null) {
  4039. return;
  4040. }
  4041. if (!type.check(arg)) {
  4042. _toss(msg, k, type.operator, arg, type.actual);
  4043. }
  4044. };
  4045. });
  4046. /* arrayOf checks */
  4047. keys.forEach(function (k) {
  4048. var name = 'arrayOf' + _capitalize(k);
  4049. if (ndebug) {
  4050. out[name] = noop;
  4051. return;
  4052. }
  4053. var type = types[k];
  4054. var expected = '[' + k + ']';
  4055. out[name] = function (arg, msg) {
  4056. if (!Array.isArray(arg)) {
  4057. _toss(msg, expected, type.operator, arg, type.actual);
  4058. }
  4059. var i;
  4060. for (i = 0; i < arg.length; i++) {
  4061. if (!type.check(arg[i])) {
  4062. _toss(msg, expected, type.operator, arg, type.actual);
  4063. }
  4064. }
  4065. };
  4066. });
  4067. /* optionalArrayOf checks */
  4068. keys.forEach(function (k) {
  4069. var name = 'optionalArrayOf' + _capitalize(k);
  4070. if (ndebug) {
  4071. out[name] = noop;
  4072. return;
  4073. }
  4074. var type = types[k];
  4075. var expected = '[' + k + ']';
  4076. out[name] = function (arg, msg) {
  4077. if (arg === undefined || arg === null) {
  4078. return;
  4079. }
  4080. if (!Array.isArray(arg)) {
  4081. _toss(msg, expected, type.operator, arg, type.actual);
  4082. }
  4083. var i;
  4084. for (i = 0; i < arg.length; i++) {
  4085. if (!type.check(arg[i])) {
  4086. _toss(msg, expected, type.operator, arg, type.actual);
  4087. }
  4088. }
  4089. };
  4090. });
  4091. /* re-export built-in assertions */
  4092. Object.keys(assert).forEach(function (k) {
  4093. if (k === 'AssertionError') {
  4094. out[k] = assert[k];
  4095. return;
  4096. }
  4097. if (ndebug) {
  4098. out[k] = noop;
  4099. return;
  4100. }
  4101. out[k] = assert[k];
  4102. });
  4103. /* export ourselves (for unit tests _only_) */
  4104. out._setExports = _setExports;
  4105. return out;
  4106. }
  4107. module.exports = _setExports(process.env.NODE_NDEBUG);
  4108. /***/ }),
  4109. /* 4 */
  4110. /***/ (function(module, exports, __webpack_require__) {
  4111. "use strict";
  4112. var es5 = __webpack_require__(59);
  4113. var canEvaluate = typeof navigator == "undefined";
  4114. var errorObj = {e: {}};
  4115. var tryCatchTarget;
  4116. var globalObject = typeof self !== "undefined" ? self :
  4117. typeof window !== "undefined" ? window :
  4118. typeof global !== "undefined" ? global :
  4119. this !== undefined ? this : null;
  4120. function tryCatcher() {
  4121. try {
  4122. var target = tryCatchTarget;
  4123. tryCatchTarget = null;
  4124. return target.apply(this, arguments);
  4125. } catch (e) {
  4126. errorObj.e = e;
  4127. return errorObj;
  4128. }
  4129. }
  4130. function tryCatch(fn) {
  4131. tryCatchTarget = fn;
  4132. return tryCatcher;
  4133. }
  4134. var inherits = function(Child, Parent) {
  4135. var hasProp = {}.hasOwnProperty;
  4136. function T() {
  4137. this.constructor = Child;
  4138. this.constructor$ = Parent;
  4139. for (var propertyName in Parent.prototype) {
  4140. if (hasProp.call(Parent.prototype, propertyName) &&
  4141. propertyName.charAt(propertyName.length-1) !== "$"
  4142. ) {
  4143. this[propertyName + "$"] = Parent.prototype[propertyName];
  4144. }
  4145. }
  4146. }
  4147. T.prototype = Parent.prototype;
  4148. Child.prototype = new T();
  4149. return Child.prototype;
  4150. };
  4151. function isPrimitive(val) {
  4152. return val == null || val === true || val === false ||
  4153. typeof val === "string" || typeof val === "number";
  4154. }
  4155. function isObject(value) {
  4156. return typeof value === "function" ||
  4157. typeof value === "object" && value !== null;
  4158. }
  4159. function maybeWrapAsError(maybeError) {
  4160. if (!isPrimitive(maybeError)) return maybeError;
  4161. return new Error(safeToString(maybeError));
  4162. }
  4163. function withAppended(target, appendee) {
  4164. var len = target.length;
  4165. var ret = new Array(len + 1);
  4166. var i;
  4167. for (i = 0; i < len; ++i) {
  4168. ret[i] = target[i];
  4169. }
  4170. ret[i] = appendee;
  4171. return ret;
  4172. }
  4173. function getDataPropertyOrDefault(obj, key, defaultValue) {
  4174. if (es5.isES5) {
  4175. var desc = Object.getOwnPropertyDescriptor(obj, key);
  4176. if (desc != null) {
  4177. return desc.get == null && desc.set == null
  4178. ? desc.value
  4179. : defaultValue;
  4180. }
  4181. } else {
  4182. return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;
  4183. }
  4184. }
  4185. function notEnumerableProp(obj, name, value) {
  4186. if (isPrimitive(obj)) return obj;
  4187. var descriptor = {
  4188. value: value,
  4189. configurable: true,
  4190. enumerable: false,
  4191. writable: true
  4192. };
  4193. es5.defineProperty(obj, name, descriptor);
  4194. return obj;
  4195. }
  4196. function thrower(r) {
  4197. throw r;
  4198. }
  4199. var inheritedDataKeys = (function() {
  4200. var excludedPrototypes = [
  4201. Array.prototype,
  4202. Object.prototype,
  4203. Function.prototype
  4204. ];
  4205. var isExcludedProto = function(val) {
  4206. for (var i = 0; i < excludedPrototypes.length; ++i) {
  4207. if (excludedPrototypes[i] === val) {
  4208. return true;
  4209. }
  4210. }
  4211. return false;
  4212. };
  4213. if (es5.isES5) {
  4214. var getKeys = Object.getOwnPropertyNames;
  4215. return function(obj) {
  4216. var ret = [];
  4217. var visitedKeys = Object.create(null);
  4218. while (obj != null && !isExcludedProto(obj)) {
  4219. var keys;
  4220. try {
  4221. keys = getKeys(obj);
  4222. } catch (e) {
  4223. return ret;
  4224. }
  4225. for (var i = 0; i < keys.length; ++i) {
  4226. var key = keys[i];
  4227. if (visitedKeys[key]) continue;
  4228. visitedKeys[key] = true;
  4229. var desc = Object.getOwnPropertyDescriptor(obj, key);
  4230. if (desc != null && desc.get == null && desc.set == null) {
  4231. ret.push(key);
  4232. }
  4233. }
  4234. obj = es5.getPrototypeOf(obj);
  4235. }
  4236. return ret;
  4237. };
  4238. } else {
  4239. var hasProp = {}.hasOwnProperty;
  4240. return function(obj) {
  4241. if (isExcludedProto(obj)) return [];
  4242. var ret = [];
  4243. /*jshint forin:false */
  4244. enumeration: for (var key in obj) {
  4245. if (hasProp.call(obj, key)) {
  4246. ret.push(key);
  4247. } else {
  4248. for (var i = 0; i < excludedPrototypes.length; ++i) {
  4249. if (hasProp.call(excludedPrototypes[i], key)) {
  4250. continue enumeration;
  4251. }
  4252. }
  4253. ret.push(key);
  4254. }
  4255. }
  4256. return ret;
  4257. };
  4258. }
  4259. })();
  4260. var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/;
  4261. function isClass(fn) {
  4262. try {
  4263. if (typeof fn === "function") {
  4264. var keys = es5.names(fn.prototype);
  4265. var hasMethods = es5.isES5 && keys.length > 1;
  4266. var hasMethodsOtherThanConstructor = keys.length > 0 &&
  4267. !(keys.length === 1 && keys[0] === "constructor");
  4268. var hasThisAssignmentAndStaticMethods =
  4269. thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0;
  4270. if (hasMethods || hasMethodsOtherThanConstructor ||
  4271. hasThisAssignmentAndStaticMethods) {
  4272. return true;
  4273. }
  4274. }
  4275. return false;
  4276. } catch (e) {
  4277. return false;
  4278. }
  4279. }
  4280. function toFastProperties(obj) {
  4281. /*jshint -W027,-W055,-W031*/
  4282. function FakeConstructor() {}
  4283. FakeConstructor.prototype = obj;
  4284. var l = 8;
  4285. while (l--) new FakeConstructor();
  4286. return obj;
  4287. eval(obj);
  4288. }
  4289. var rident = /^[a-z$_][a-z$_0-9]*$/i;
  4290. function isIdentifier(str) {
  4291. return rident.test(str);
  4292. }
  4293. function filledRange(count, prefix, suffix) {
  4294. var ret = new Array(count);
  4295. for(var i = 0; i < count; ++i) {
  4296. ret[i] = prefix + i + suffix;
  4297. }
  4298. return ret;
  4299. }
  4300. function safeToString(obj) {
  4301. try {
  4302. return obj + "";
  4303. } catch (e) {
  4304. return "[no string representation]";
  4305. }
  4306. }
  4307. function isError(obj) {
  4308. return obj instanceof Error ||
  4309. (obj !== null &&
  4310. typeof obj === "object" &&
  4311. typeof obj.message === "string" &&
  4312. typeof obj.name === "string");
  4313. }
  4314. function markAsOriginatingFromRejection(e) {
  4315. try {
  4316. notEnumerableProp(e, "isOperational", true);
  4317. }
  4318. catch(ignore) {}
  4319. }
  4320. function originatesFromRejection(e) {
  4321. if (e == null) return false;
  4322. return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) ||
  4323. e["isOperational"] === true);
  4324. }
  4325. function canAttachTrace(obj) {
  4326. return isError(obj) && es5.propertyIsWritable(obj, "stack");
  4327. }
  4328. var ensureErrorObject = (function() {
  4329. if (!("stack" in new Error())) {
  4330. return function(value) {
  4331. if (canAttachTrace(value)) return value;
  4332. try {throw new Error(safeToString(value));}
  4333. catch(err) {return err;}
  4334. };
  4335. } else {
  4336. return function(value) {
  4337. if (canAttachTrace(value)) return value;
  4338. return new Error(safeToString(value));
  4339. };
  4340. }
  4341. })();
  4342. function classString(obj) {
  4343. return {}.toString.call(obj);
  4344. }
  4345. function copyDescriptors(from, to, filter) {
  4346. var keys = es5.names(from);
  4347. for (var i = 0; i < keys.length; ++i) {
  4348. var key = keys[i];
  4349. if (filter(key)) {
  4350. try {
  4351. es5.defineProperty(to, key, es5.getDescriptor(from, key));
  4352. } catch (ignore) {}
  4353. }
  4354. }
  4355. }
  4356. var asArray = function(v) {
  4357. if (es5.isArray(v)) {
  4358. return v;
  4359. }
  4360. return null;
  4361. };
  4362. if (typeof Symbol !== "undefined" && Symbol.iterator) {
  4363. var ArrayFrom = typeof Array.from === "function" ? function(v) {
  4364. return Array.from(v);
  4365. } : function(v) {
  4366. var ret = [];
  4367. var it = v[Symbol.iterator]();
  4368. var itResult;
  4369. while (!((itResult = it.next()).done)) {
  4370. ret.push(itResult.value);
  4371. }
  4372. return ret;
  4373. };
  4374. asArray = function(v) {
  4375. if (es5.isArray(v)) {
  4376. return v;
  4377. } else if (v != null && typeof v[Symbol.iterator] === "function") {
  4378. return ArrayFrom(v);
  4379. }
  4380. return null;
  4381. };
  4382. }
  4383. var isNode = typeof process !== "undefined" &&
  4384. classString(process).toLowerCase() === "[object process]";
  4385. var hasEnvVariables = typeof process !== "undefined" &&
  4386. typeof process.env !== "undefined";
  4387. function env(key) {
  4388. return hasEnvVariables ? process.env[key] : undefined;
  4389. }
  4390. function getNativePromise() {
  4391. if (typeof Promise === "function") {
  4392. try {
  4393. var promise = new Promise(function(){});
  4394. if ({}.toString.call(promise) === "[object Promise]") {
  4395. return Promise;
  4396. }
  4397. } catch (e) {}
  4398. }
  4399. }
  4400. function domainBind(self, cb) {
  4401. return self.bind(cb);
  4402. }
  4403. var ret = {
  4404. isClass: isClass,
  4405. isIdentifier: isIdentifier,
  4406. inheritedDataKeys: inheritedDataKeys,
  4407. getDataPropertyOrDefault: getDataPropertyOrDefault,
  4408. thrower: thrower,
  4409. isArray: es5.isArray,
  4410. asArray: asArray,
  4411. notEnumerableProp: notEnumerableProp,
  4412. isPrimitive: isPrimitive,
  4413. isObject: isObject,
  4414. isError: isError,
  4415. canEvaluate: canEvaluate,
  4416. errorObj: errorObj,
  4417. tryCatch: tryCatch,
  4418. inherits: inherits,
  4419. withAppended: withAppended,
  4420. maybeWrapAsError: maybeWrapAsError,
  4421. toFastProperties: toFastProperties,
  4422. filledRange: filledRange,
  4423. toString: safeToString,
  4424. canAttachTrace: canAttachTrace,
  4425. ensureErrorObject: ensureErrorObject,
  4426. originatesFromRejection: originatesFromRejection,
  4427. markAsOriginatingFromRejection: markAsOriginatingFromRejection,
  4428. classString: classString,
  4429. copyDescriptors: copyDescriptors,
  4430. hasDevTools: typeof chrome !== "undefined" && chrome &&
  4431. typeof chrome.loadTimes === "function",
  4432. isNode: isNode,
  4433. hasEnvVariables: hasEnvVariables,
  4434. env: env,
  4435. global: globalObject,
  4436. getNativePromise: getNativePromise,
  4437. domainBind: domainBind
  4438. };
  4439. ret.isRecentNode = ret.isNode && (function() {
  4440. var version = process.versions.node.split(".").map(Number);
  4441. return (version[0] === 0 && version[1] > 10) || (version[0] > 0);
  4442. })();
  4443. if (ret.isNode) ret.toFastProperties(process);
  4444. try {throw new Error(); } catch (e) {ret.lastLineError = e;}
  4445. module.exports = ret;
  4446. /***/ }),
  4447. /* 5 */
  4448. /***/ (function(module, exports) {
  4449. module.exports = require("crypto");
  4450. /***/ }),
  4451. /* 6 */
  4452. /***/ (function(module, exports) {
  4453. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  4454. var global = module.exports = typeof window != 'undefined' && window.Math == Math
  4455. ? window : typeof self != 'undefined' && self.Math == Math ? self
  4456. // eslint-disable-next-line no-new-func
  4457. : Function('return this')();
  4458. if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
  4459. /***/ }),
  4460. /* 7 */
  4461. /***/ (function(module, exports, __webpack_require__) {
  4462. var isObject = __webpack_require__(8);
  4463. module.exports = function (it) {
  4464. if (!isObject(it)) throw TypeError(it + ' is not an object!');
  4465. return it;
  4466. };
  4467. /***/ }),
  4468. /* 8 */
  4469. /***/ (function(module, exports) {
  4470. module.exports = function (it) {
  4471. return typeof it === 'object' ? it !== null : typeof it === 'function';
  4472. };
  4473. /***/ }),
  4474. /* 9 */
  4475. /***/ (function(module, exports) {
  4476. /**
  4477. * Checks if `value` is classified as an `Array` object.
  4478. *
  4479. * @static
  4480. * @memberOf _
  4481. * @since 0.1.0
  4482. * @category Lang
  4483. * @param {*} value The value to check.
  4484. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  4485. * @example
  4486. *
  4487. * _.isArray([1, 2, 3]);
  4488. * // => true
  4489. *
  4490. * _.isArray(document.body.children);
  4491. * // => false
  4492. *
  4493. * _.isArray('abc');
  4494. * // => false
  4495. *
  4496. * _.isArray(_.noop);
  4497. * // => false
  4498. */
  4499. var isArray = Array.isArray;
  4500. module.exports = isArray;
  4501. /***/ }),
  4502. /* 10 */
  4503. /***/ (function(module, exports) {
  4504. module.exports = require("stream");
  4505. /***/ }),
  4506. /* 11 */
  4507. /***/ (function(module, exports, __webpack_require__) {
  4508. var store = __webpack_require__(190)('wks');
  4509. var uid = __webpack_require__(53);
  4510. var Symbol = __webpack_require__(6).Symbol;
  4511. var USE_SYMBOL = typeof Symbol == 'function';
  4512. var $exports = module.exports = function (name) {
  4513. return store[name] || (store[name] =
  4514. USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
  4515. };
  4516. $exports.store = store;
  4517. /***/ }),
  4518. /* 12 */
  4519. /***/ (function(module, exports, __webpack_require__) {
  4520. // Copyright 2015 Joyent, Inc.
  4521. module.exports = {
  4522. bufferSplit: bufferSplit,
  4523. addRSAMissing: addRSAMissing,
  4524. calculateDSAPublic: calculateDSAPublic,
  4525. mpNormalize: mpNormalize,
  4526. ecNormalize: ecNormalize,
  4527. countZeros: countZeros,
  4528. assertCompatible: assertCompatible,
  4529. isCompatible: isCompatible,
  4530. opensslKeyDeriv: opensslKeyDeriv,
  4531. opensshCipherInfo: opensshCipherInfo
  4532. };
  4533. var assert = __webpack_require__(3);
  4534. var PrivateKey = __webpack_require__(17);
  4535. var crypto = __webpack_require__(5);
  4536. var MAX_CLASS_DEPTH = 3;
  4537. function isCompatible(obj, klass, needVer) {
  4538. if (obj === null || typeof (obj) !== 'object')
  4539. return (false);
  4540. if (needVer === undefined)
  4541. needVer = klass.prototype._sshpkApiVersion;
  4542. if (obj instanceof klass &&
  4543. klass.prototype._sshpkApiVersion[0] == needVer[0])
  4544. return (true);
  4545. var proto = Object.getPrototypeOf(obj);
  4546. var depth = 0;
  4547. while (proto.constructor.name !== klass.name) {
  4548. proto = Object.getPrototypeOf(proto);
  4549. if (!proto || ++depth > MAX_CLASS_DEPTH)
  4550. return (false);
  4551. }
  4552. if (proto.constructor.name !== klass.name)
  4553. return (false);
  4554. var ver = proto._sshpkApiVersion;
  4555. if (ver === undefined)
  4556. ver = klass._oldVersionDetect(obj);
  4557. if (ver[0] != needVer[0] || ver[1] < needVer[1])
  4558. return (false);
  4559. return (true);
  4560. }
  4561. function assertCompatible(obj, klass, needVer, name) {
  4562. if (name === undefined)
  4563. name = 'object';
  4564. assert.ok(obj, name + ' must not be null');
  4565. assert.object(obj, name + ' must be an object');
  4566. if (needVer === undefined)
  4567. needVer = klass.prototype._sshpkApiVersion;
  4568. if (obj instanceof klass &&
  4569. klass.prototype._sshpkApiVersion[0] == needVer[0])
  4570. return;
  4571. var proto = Object.getPrototypeOf(obj);
  4572. var depth = 0;
  4573. while (proto.constructor.name !== klass.name) {
  4574. proto = Object.getPrototypeOf(proto);
  4575. assert.ok(proto && ++depth <= MAX_CLASS_DEPTH,
  4576. name + ' must be a ' + klass.name + ' instance');
  4577. }
  4578. assert.strictEqual(proto.constructor.name, klass.name,
  4579. name + ' must be a ' + klass.name + ' instance');
  4580. var ver = proto._sshpkApiVersion;
  4581. if (ver === undefined)
  4582. ver = klass._oldVersionDetect(obj);
  4583. assert.ok(ver[0] == needVer[0] && ver[1] >= needVer[1],
  4584. name + ' must be compatible with ' + klass.name + ' klass ' +
  4585. 'version ' + needVer[0] + '.' + needVer[1]);
  4586. }
  4587. var CIPHER_LEN = {
  4588. 'des-ede3-cbc': { key: 7, iv: 8 },
  4589. 'aes-128-cbc': { key: 16, iv: 16 }
  4590. };
  4591. var PKCS5_SALT_LEN = 8;
  4592. function opensslKeyDeriv(cipher, salt, passphrase, count) {
  4593. assert.buffer(salt, 'salt');
  4594. assert.buffer(passphrase, 'passphrase');
  4595. assert.number(count, 'iteration count');
  4596. var clen = CIPHER_LEN[cipher];
  4597. assert.object(clen, 'supported cipher');
  4598. salt = salt.slice(0, PKCS5_SALT_LEN);
  4599. var D, D_prev, bufs;
  4600. var material = new Buffer(0);
  4601. while (material.length < clen.key + clen.iv) {
  4602. bufs = [];
  4603. if (D_prev)
  4604. bufs.push(D_prev);
  4605. bufs.push(passphrase);
  4606. bufs.push(salt);
  4607. D = Buffer.concat(bufs);
  4608. for (var j = 0; j < count; ++j)
  4609. D = crypto.createHash('md5').update(D).digest();
  4610. material = Buffer.concat([material, D]);
  4611. D_prev = D;
  4612. }
  4613. return ({
  4614. key: material.slice(0, clen.key),
  4615. iv: material.slice(clen.key, clen.key + clen.iv)
  4616. });
  4617. }
  4618. /* Count leading zero bits on a buffer */
  4619. function countZeros(buf) {
  4620. var o = 0, obit = 8;
  4621. while (o < buf.length) {
  4622. var mask = (1 << obit);
  4623. if ((buf[o] & mask) === mask)
  4624. break;
  4625. obit--;
  4626. if (obit < 0) {
  4627. o++;
  4628. obit = 8;
  4629. }
  4630. }
  4631. return (o*8 + (8 - obit) - 1);
  4632. }
  4633. function bufferSplit(buf, chr) {
  4634. assert.buffer(buf);
  4635. assert.string(chr);
  4636. var parts = [];
  4637. var lastPart = 0;
  4638. var matches = 0;
  4639. for (var i = 0; i < buf.length; ++i) {
  4640. if (buf[i] === chr.charCodeAt(matches))
  4641. ++matches;
  4642. else if (buf[i] === chr.charCodeAt(0))
  4643. matches = 1;
  4644. else
  4645. matches = 0;
  4646. if (matches >= chr.length) {
  4647. var newPart = i + 1;
  4648. parts.push(buf.slice(lastPart, newPart - matches));
  4649. lastPart = newPart;
  4650. matches = 0;
  4651. }
  4652. }
  4653. if (lastPart <= buf.length)
  4654. parts.push(buf.slice(lastPart, buf.length));
  4655. return (parts);
  4656. }
  4657. function ecNormalize(buf, addZero) {
  4658. assert.buffer(buf);
  4659. if (buf[0] === 0x00 && buf[1] === 0x04) {
  4660. if (addZero)
  4661. return (buf);
  4662. return (buf.slice(1));
  4663. } else if (buf[0] === 0x04) {
  4664. if (!addZero)
  4665. return (buf);
  4666. } else {
  4667. while (buf[0] === 0x00)
  4668. buf = buf.slice(1);
  4669. if (buf[0] === 0x02 || buf[0] === 0x03)
  4670. throw (new Error('Compressed elliptic curve points ' +
  4671. 'are not supported'));
  4672. if (buf[0] !== 0x04)
  4673. throw (new Error('Not a valid elliptic curve point'));
  4674. if (!addZero)
  4675. return (buf);
  4676. }
  4677. var b = new Buffer(buf.length + 1);
  4678. b[0] = 0x0;
  4679. buf.copy(b, 1);
  4680. return (b);
  4681. }
  4682. function mpNormalize(buf) {
  4683. assert.buffer(buf);
  4684. while (buf.length > 1 && buf[0] === 0x00 && (buf[1] & 0x80) === 0x00)
  4685. buf = buf.slice(1);
  4686. if ((buf[0] & 0x80) === 0x80) {
  4687. var b = new Buffer(buf.length + 1);
  4688. b[0] = 0x00;
  4689. buf.copy(b, 1);
  4690. buf = b;
  4691. }
  4692. return (buf);
  4693. }
  4694. function bigintToMpBuf(bigint) {
  4695. var buf = new Buffer(bigint.toByteArray());
  4696. buf = mpNormalize(buf);
  4697. return (buf);
  4698. }
  4699. function calculateDSAPublic(g, p, x) {
  4700. assert.buffer(g);
  4701. assert.buffer(p);
  4702. assert.buffer(x);
  4703. try {
  4704. var bigInt = __webpack_require__(46).BigInteger;
  4705. } catch (e) {
  4706. throw (new Error('To load a PKCS#8 format DSA private key, ' +
  4707. 'the node jsbn library is required.'));
  4708. }
  4709. g = new bigInt(g);
  4710. p = new bigInt(p);
  4711. x = new bigInt(x);
  4712. var y = g.modPow(x, p);
  4713. var ybuf = bigintToMpBuf(y);
  4714. return (ybuf);
  4715. }
  4716. function addRSAMissing(key) {
  4717. assert.object(key);
  4718. assertCompatible(key, PrivateKey, [1, 1]);
  4719. try {
  4720. var bigInt = __webpack_require__(46).BigInteger;
  4721. } catch (e) {
  4722. throw (new Error('To write a PEM private key from ' +
  4723. 'this source, the node jsbn lib is required.'));
  4724. }
  4725. var d = new bigInt(key.part.d.data);
  4726. var buf;
  4727. if (!key.part.dmodp) {
  4728. var p = new bigInt(key.part.p.data);
  4729. var dmodp = d.mod(p.subtract(1));
  4730. buf = bigintToMpBuf(dmodp);
  4731. key.part.dmodp = {name: 'dmodp', data: buf};
  4732. key.parts.push(key.part.dmodp);
  4733. }
  4734. if (!key.part.dmodq) {
  4735. var q = new bigInt(key.part.q.data);
  4736. var dmodq = d.mod(q.subtract(1));
  4737. buf = bigintToMpBuf(dmodq);
  4738. key.part.dmodq = {name: 'dmodq', data: buf};
  4739. key.parts.push(key.part.dmodq);
  4740. }
  4741. }
  4742. function opensshCipherInfo(cipher) {
  4743. var inf = {};
  4744. switch (cipher) {
  4745. case '3des-cbc':
  4746. inf.keySize = 24;
  4747. inf.blockSize = 8;
  4748. inf.opensslName = 'des-ede3-cbc';
  4749. break;
  4750. case 'blowfish-cbc':
  4751. inf.keySize = 16;
  4752. inf.blockSize = 8;
  4753. inf.opensslName = 'bf-cbc';
  4754. break;
  4755. case 'aes128-cbc':
  4756. case 'aes128-ctr':
  4757. case 'aes128-gcm@openssh.com':
  4758. inf.keySize = 16;
  4759. inf.blockSize = 16;
  4760. inf.opensslName = 'aes-128-' + cipher.slice(7, 10);
  4761. break;
  4762. case 'aes192-cbc':
  4763. case 'aes192-ctr':
  4764. case 'aes192-gcm@openssh.com':
  4765. inf.keySize = 24;
  4766. inf.blockSize = 16;
  4767. inf.opensslName = 'aes-192-' + cipher.slice(7, 10);
  4768. break;
  4769. case 'aes256-cbc':
  4770. case 'aes256-ctr':
  4771. case 'aes256-gcm@openssh.com':
  4772. inf.keySize = 32;
  4773. inf.blockSize = 16;
  4774. inf.opensslName = 'aes-256-' + cipher.slice(7, 10);
  4775. break;
  4776. default:
  4777. throw (new Error(
  4778. 'Unsupported openssl cipher "' + cipher + '"'));
  4779. }
  4780. return (inf);
  4781. }
  4782. /***/ }),
  4783. /* 13 */
  4784. /***/ (function(module, exports) {
  4785. module.exports = function (exec) {
  4786. try {
  4787. return !!exec();
  4788. } catch (e) {
  4789. return true;
  4790. }
  4791. };
  4792. /***/ }),
  4793. /* 14 */
  4794. /***/ (function(module, exports) {
  4795. module.exports = require("url");
  4796. /***/ }),
  4797. /* 15 */
  4798. /***/ (function(module, exports, __webpack_require__) {
  4799. // Copyright 2017 Joyent, Inc.
  4800. module.exports = Key;
  4801. var assert = __webpack_require__(3);
  4802. var algs = __webpack_require__(16);
  4803. var crypto = __webpack_require__(5);
  4804. var Fingerprint = __webpack_require__(84);
  4805. var Signature = __webpack_require__(32);
  4806. var DiffieHellman = __webpack_require__(346).DiffieHellman;
  4807. var errs = __webpack_require__(31);
  4808. var utils = __webpack_require__(12);
  4809. var PrivateKey = __webpack_require__(17);
  4810. var edCompat;
  4811. try {
  4812. edCompat = __webpack_require__(348);
  4813. } catch (e) {
  4814. /* Just continue through, and bail out if we try to use it. */
  4815. }
  4816. var InvalidAlgorithmError = errs.InvalidAlgorithmError;
  4817. var KeyParseError = errs.KeyParseError;
  4818. var formats = {};
  4819. formats['auto'] = __webpack_require__(349);
  4820. formats['pem'] = __webpack_require__(38);
  4821. formats['pkcs1'] = __webpack_require__(149);
  4822. formats['pkcs8'] = __webpack_require__(86);
  4823. formats['rfc4253'] = __webpack_require__(48);
  4824. formats['ssh'] = __webpack_require__(351);
  4825. formats['ssh-private'] = __webpack_require__(109);
  4826. formats['openssh'] = formats['ssh-private'];
  4827. function Key(opts) {
  4828. assert.object(opts, 'options');
  4829. assert.arrayOfObject(opts.parts, 'options.parts');
  4830. assert.string(opts.type, 'options.type');
  4831. assert.optionalString(opts.comment, 'options.comment');
  4832. var algInfo = algs.info[opts.type];
  4833. if (typeof (algInfo) !== 'object')
  4834. throw (new InvalidAlgorithmError(opts.type));
  4835. var partLookup = {};
  4836. for (var i = 0; i < opts.parts.length; ++i) {
  4837. var part = opts.parts[i];
  4838. partLookup[part.name] = part;
  4839. }
  4840. this.type = opts.type;
  4841. this.parts = opts.parts;
  4842. this.part = partLookup;
  4843. this.comment = undefined;
  4844. this.source = opts.source;
  4845. /* for speeding up hashing/fingerprint operations */
  4846. this._rfc4253Cache = opts._rfc4253Cache;
  4847. this._hashCache = {};
  4848. var sz;
  4849. this.curve = undefined;
  4850. if (this.type === 'ecdsa') {
  4851. var curve = this.part.curve.data.toString();
  4852. this.curve = curve;
  4853. sz = algs.curves[curve].size;
  4854. } else if (this.type === 'ed25519' || this.type === 'curve25519') {
  4855. sz = 256;
  4856. this.curve = 'curve25519';
  4857. } else {
  4858. var szPart = this.part[algInfo.sizePart];
  4859. sz = szPart.data.length;
  4860. sz = sz * 8 - utils.countZeros(szPart.data);
  4861. }
  4862. this.size = sz;
  4863. }
  4864. Key.formats = formats;
  4865. Key.prototype.toBuffer = function (format, options) {
  4866. if (format === undefined)
  4867. format = 'ssh';
  4868. assert.string(format, 'format');
  4869. assert.object(formats[format], 'formats[format]');
  4870. assert.optionalObject(options, 'options');
  4871. if (format === 'rfc4253') {
  4872. if (this._rfc4253Cache === undefined)
  4873. this._rfc4253Cache = formats['rfc4253'].write(this);
  4874. return (this._rfc4253Cache);
  4875. }
  4876. return (formats[format].write(this, options));
  4877. };
  4878. Key.prototype.toString = function (format, options) {
  4879. return (this.toBuffer(format, options).toString());
  4880. };
  4881. Key.prototype.hash = function (algo) {
  4882. assert.string(algo, 'algorithm');
  4883. algo = algo.toLowerCase();
  4884. if (algs.hashAlgs[algo] === undefined)
  4885. throw (new InvalidAlgorithmError(algo));
  4886. if (this._hashCache[algo])
  4887. return (this._hashCache[algo]);
  4888. var hash = crypto.createHash(algo).
  4889. update(this.toBuffer('rfc4253')).digest();
  4890. this._hashCache[algo] = hash;
  4891. return (hash);
  4892. };
  4893. Key.prototype.fingerprint = function (algo) {
  4894. if (algo === undefined)
  4895. algo = 'sha256';
  4896. assert.string(algo, 'algorithm');
  4897. var opts = {
  4898. type: 'key',
  4899. hash: this.hash(algo),
  4900. algorithm: algo
  4901. };
  4902. return (new Fingerprint(opts));
  4903. };
  4904. Key.prototype.defaultHashAlgorithm = function () {
  4905. var hashAlgo = 'sha1';
  4906. if (this.type === 'rsa')
  4907. hashAlgo = 'sha256';
  4908. if (this.type === 'dsa' && this.size > 1024)
  4909. hashAlgo = 'sha256';
  4910. if (this.type === 'ed25519')
  4911. hashAlgo = 'sha512';
  4912. if (this.type === 'ecdsa') {
  4913. if (this.size <= 256)
  4914. hashAlgo = 'sha256';
  4915. else if (this.size <= 384)
  4916. hashAlgo = 'sha384';
  4917. else
  4918. hashAlgo = 'sha512';
  4919. }
  4920. return (hashAlgo);
  4921. };
  4922. Key.prototype.createVerify = function (hashAlgo) {
  4923. if (hashAlgo === undefined)
  4924. hashAlgo = this.defaultHashAlgorithm();
  4925. assert.string(hashAlgo, 'hash algorithm');
  4926. /* ED25519 is not supported by OpenSSL, use a javascript impl. */
  4927. if (this.type === 'ed25519' && edCompat !== undefined)
  4928. return (new edCompat.Verifier(this, hashAlgo));
  4929. if (this.type === 'curve25519')
  4930. throw (new Error('Curve25519 keys are not suitable for ' +
  4931. 'signing or verification'));
  4932. var v, nm, err;
  4933. try {
  4934. nm = hashAlgo.toUpperCase();
  4935. v = crypto.createVerify(nm);
  4936. } catch (e) {
  4937. err = e;
  4938. }
  4939. if (v === undefined || (err instanceof Error &&
  4940. err.message.match(/Unknown message digest/))) {
  4941. nm = 'RSA-';
  4942. nm += hashAlgo.toUpperCase();
  4943. v = crypto.createVerify(nm);
  4944. }
  4945. assert.ok(v, 'failed to create verifier');
  4946. var oldVerify = v.verify.bind(v);
  4947. var key = this.toBuffer('pkcs8');
  4948. var curve = this.curve;
  4949. var self = this;
  4950. v.verify = function (signature, fmt) {
  4951. if (Signature.isSignature(signature, [2, 0])) {
  4952. if (signature.type !== self.type)
  4953. return (false);
  4954. if (signature.hashAlgorithm &&
  4955. signature.hashAlgorithm !== hashAlgo)
  4956. return (false);
  4957. if (signature.curve && self.type === 'ecdsa' &&
  4958. signature.curve !== curve)
  4959. return (false);
  4960. return (oldVerify(key, signature.toBuffer('asn1')));
  4961. } else if (typeof (signature) === 'string' ||
  4962. Buffer.isBuffer(signature)) {
  4963. return (oldVerify(key, signature, fmt));
  4964. /*
  4965. * Avoid doing this on valid arguments, walking the prototype
  4966. * chain can be quite slow.
  4967. */
  4968. } else if (Signature.isSignature(signature, [1, 0])) {
  4969. throw (new Error('signature was created by too old ' +
  4970. 'a version of sshpk and cannot be verified'));
  4971. } else {
  4972. throw (new TypeError('signature must be a string, ' +
  4973. 'Buffer, or Signature object'));
  4974. }
  4975. };
  4976. return (v);
  4977. };
  4978. Key.prototype.createDiffieHellman = function () {
  4979. if (this.type === 'rsa')
  4980. throw (new Error('RSA keys do not support Diffie-Hellman'));
  4981. return (new DiffieHellman(this));
  4982. };
  4983. Key.prototype.createDH = Key.prototype.createDiffieHellman;
  4984. Key.parse = function (data, format, options) {
  4985. if (typeof (data) !== 'string')
  4986. assert.buffer(data, 'data');
  4987. if (format === undefined)
  4988. format = 'auto';
  4989. assert.string(format, 'format');
  4990. if (typeof (options) === 'string')
  4991. options = { filename: options };
  4992. assert.optionalObject(options, 'options');
  4993. if (options === undefined)
  4994. options = {};
  4995. assert.optionalString(options.filename, 'options.filename');
  4996. if (options.filename === undefined)
  4997. options.filename = '(unnamed)';
  4998. assert.object(formats[format], 'formats[format]');
  4999. try {
  5000. var k = formats[format].read(data, options);
  5001. if (k instanceof PrivateKey)
  5002. k = k.toPublic();
  5003. if (!k.comment)
  5004. k.comment = options.filename;
  5005. return (k);
  5006. } catch (e) {
  5007. if (e.name === 'KeyEncryptedError')
  5008. throw (e);
  5009. throw (new KeyParseError(options.filename, format, e));
  5010. }
  5011. };
  5012. Key.isKey = function (obj, ver) {
  5013. return (utils.isCompatible(obj, Key, ver));
  5014. };
  5015. /*
  5016. * API versions for Key:
  5017. * [1,0] -- initial ver, may take Signature for createVerify or may not
  5018. * [1,1] -- added pkcs1, pkcs8 formats
  5019. * [1,2] -- added auto, ssh-private, openssh formats
  5020. * [1,3] -- added defaultHashAlgorithm
  5021. * [1,4] -- added ed support, createDH
  5022. * [1,5] -- first explicitly tagged version
  5023. */
  5024. Key.prototype._sshpkApiVersion = [1, 5];
  5025. Key._oldVersionDetect = function (obj) {
  5026. assert.func(obj.toBuffer);
  5027. assert.func(obj.fingerprint);
  5028. if (obj.createDH)
  5029. return ([1, 4]);
  5030. if (obj.defaultHashAlgorithm)
  5031. return ([1, 3]);
  5032. if (obj.formats['auto'])
  5033. return ([1, 2]);
  5034. if (obj.formats['pkcs1'])
  5035. return ([1, 1]);
  5036. return ([1, 0]);
  5037. };
  5038. /***/ }),
  5039. /* 16 */
  5040. /***/ (function(module, exports) {
  5041. // Copyright 2015 Joyent, Inc.
  5042. var algInfo = {
  5043. 'dsa': {
  5044. parts: ['p', 'q', 'g', 'y'],
  5045. sizePart: 'p'
  5046. },
  5047. 'rsa': {
  5048. parts: ['e', 'n'],
  5049. sizePart: 'n'
  5050. },
  5051. 'ecdsa': {
  5052. parts: ['curve', 'Q'],
  5053. sizePart: 'Q'
  5054. },
  5055. 'ed25519': {
  5056. parts: ['R'],
  5057. normalize: false,
  5058. sizePart: 'R'
  5059. }
  5060. };
  5061. algInfo['curve25519'] = algInfo['ed25519'];
  5062. var algPrivInfo = {
  5063. 'dsa': {
  5064. parts: ['p', 'q', 'g', 'y', 'x']
  5065. },
  5066. 'rsa': {
  5067. parts: ['n', 'e', 'd', 'iqmp', 'p', 'q']
  5068. },
  5069. 'ecdsa': {
  5070. parts: ['curve', 'Q', 'd']
  5071. },
  5072. 'ed25519': {
  5073. parts: ['R', 'r'],
  5074. normalize: false
  5075. }
  5076. };
  5077. algPrivInfo['curve25519'] = algPrivInfo['ed25519'];
  5078. var hashAlgs = {
  5079. 'md5': true,
  5080. 'sha1': true,
  5081. 'sha256': true,
  5082. 'sha384': true,
  5083. 'sha512': true
  5084. };
  5085. /*
  5086. * Taken from
  5087. * http://csrc.nist.gov/groups/ST/toolkit/documents/dss/NISTReCur.pdf
  5088. */
  5089. var curves = {
  5090. 'nistp256': {
  5091. size: 256,
  5092. pkcs8oid: '1.2.840.10045.3.1.7',
  5093. p: new Buffer(('00' +
  5094. 'ffffffff 00000001 00000000 00000000' +
  5095. '00000000 ffffffff ffffffff ffffffff').
  5096. replace(/ /g, ''), 'hex'),
  5097. a: new Buffer(('00' +
  5098. 'FFFFFFFF 00000001 00000000 00000000' +
  5099. '00000000 FFFFFFFF FFFFFFFF FFFFFFFC').
  5100. replace(/ /g, ''), 'hex'),
  5101. b: new Buffer((
  5102. '5ac635d8 aa3a93e7 b3ebbd55 769886bc' +
  5103. '651d06b0 cc53b0f6 3bce3c3e 27d2604b').
  5104. replace(/ /g, ''), 'hex'),
  5105. s: new Buffer(('00' +
  5106. 'c49d3608 86e70493 6a6678e1 139d26b7' +
  5107. '819f7e90').
  5108. replace(/ /g, ''), 'hex'),
  5109. n: new Buffer(('00' +
  5110. 'ffffffff 00000000 ffffffff ffffffff' +
  5111. 'bce6faad a7179e84 f3b9cac2 fc632551').
  5112. replace(/ /g, ''), 'hex'),
  5113. G: new Buffer(('04' +
  5114. '6b17d1f2 e12c4247 f8bce6e5 63a440f2' +
  5115. '77037d81 2deb33a0 f4a13945 d898c296' +
  5116. '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16' +
  5117. '2bce3357 6b315ece cbb64068 37bf51f5').
  5118. replace(/ /g, ''), 'hex')
  5119. },
  5120. 'nistp384': {
  5121. size: 384,
  5122. pkcs8oid: '1.3.132.0.34',
  5123. p: new Buffer(('00' +
  5124. 'ffffffff ffffffff ffffffff ffffffff' +
  5125. 'ffffffff ffffffff ffffffff fffffffe' +
  5126. 'ffffffff 00000000 00000000 ffffffff').
  5127. replace(/ /g, ''), 'hex'),
  5128. a: new Buffer(('00' +
  5129. 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
  5130. 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE' +
  5131. 'FFFFFFFF 00000000 00000000 FFFFFFFC').
  5132. replace(/ /g, ''), 'hex'),
  5133. b: new Buffer((
  5134. 'b3312fa7 e23ee7e4 988e056b e3f82d19' +
  5135. '181d9c6e fe814112 0314088f 5013875a' +
  5136. 'c656398d 8a2ed19d 2a85c8ed d3ec2aef').
  5137. replace(/ /g, ''), 'hex'),
  5138. s: new Buffer(('00' +
  5139. 'a335926a a319a27a 1d00896a 6773a482' +
  5140. '7acdac73').
  5141. replace(/ /g, ''), 'hex'),
  5142. n: new Buffer(('00' +
  5143. 'ffffffff ffffffff ffffffff ffffffff' +
  5144. 'ffffffff ffffffff c7634d81 f4372ddf' +
  5145. '581a0db2 48b0a77a ecec196a ccc52973').
  5146. replace(/ /g, ''), 'hex'),
  5147. G: new Buffer(('04' +
  5148. 'aa87ca22 be8b0537 8eb1c71e f320ad74' +
  5149. '6e1d3b62 8ba79b98 59f741e0 82542a38' +
  5150. '5502f25d bf55296c 3a545e38 72760ab7' +
  5151. '3617de4a 96262c6f 5d9e98bf 9292dc29' +
  5152. 'f8f41dbd 289a147c e9da3113 b5f0b8c0' +
  5153. '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f').
  5154. replace(/ /g, ''), 'hex')
  5155. },
  5156. 'nistp521': {
  5157. size: 521,
  5158. pkcs8oid: '1.3.132.0.35',
  5159. p: new Buffer((
  5160. '01ffffff ffffffff ffffffff ffffffff' +
  5161. 'ffffffff ffffffff ffffffff ffffffff' +
  5162. 'ffffffff ffffffff ffffffff ffffffff' +
  5163. 'ffffffff ffffffff ffffffff ffffffff' +
  5164. 'ffff').replace(/ /g, ''), 'hex'),
  5165. a: new Buffer(('01FF' +
  5166. 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
  5167. 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
  5168. 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' +
  5169. 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC').
  5170. replace(/ /g, ''), 'hex'),
  5171. b: new Buffer(('51' +
  5172. '953eb961 8e1c9a1f 929a21a0 b68540ee' +
  5173. 'a2da725b 99b315f3 b8b48991 8ef109e1' +
  5174. '56193951 ec7e937b 1652c0bd 3bb1bf07' +
  5175. '3573df88 3d2c34f1 ef451fd4 6b503f00').
  5176. replace(/ /g, ''), 'hex'),
  5177. s: new Buffer(('00' +
  5178. 'd09e8800 291cb853 96cc6717 393284aa' +
  5179. 'a0da64ba').replace(/ /g, ''), 'hex'),
  5180. n: new Buffer(('01ff' +
  5181. 'ffffffff ffffffff ffffffff ffffffff' +
  5182. 'ffffffff ffffffff ffffffff fffffffa' +
  5183. '51868783 bf2f966b 7fcc0148 f709a5d0' +
  5184. '3bb5c9b8 899c47ae bb6fb71e 91386409').
  5185. replace(/ /g, ''), 'hex'),
  5186. G: new Buffer(('04' +
  5187. '00c6 858e06b7 0404e9cd 9e3ecb66 2395b442' +
  5188. '9c648139 053fb521 f828af60 6b4d3dba' +
  5189. 'a14b5e77 efe75928 fe1dc127 a2ffa8de' +
  5190. '3348b3c1 856a429b f97e7e31 c2e5bd66' +
  5191. '0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9' +
  5192. '98f54449 579b4468 17afbd17 273e662c' +
  5193. '97ee7299 5ef42640 c550b901 3fad0761' +
  5194. '353c7086 a272c240 88be9476 9fd16650').
  5195. replace(/ /g, ''), 'hex')
  5196. }
  5197. };
  5198. module.exports = {
  5199. info: algInfo,
  5200. privInfo: algPrivInfo,
  5201. hashAlgs: hashAlgs,
  5202. curves: curves
  5203. };
  5204. /***/ }),
  5205. /* 17 */
  5206. /***/ (function(module, exports, __webpack_require__) {
  5207. // Copyright 2017 Joyent, Inc.
  5208. module.exports = PrivateKey;
  5209. var assert = __webpack_require__(3);
  5210. var algs = __webpack_require__(16);
  5211. var crypto = __webpack_require__(5);
  5212. var Fingerprint = __webpack_require__(84);
  5213. var Signature = __webpack_require__(32);
  5214. var errs = __webpack_require__(31);
  5215. var util = __webpack_require__(2);
  5216. var utils = __webpack_require__(12);
  5217. var dhe = __webpack_require__(346);
  5218. var generateECDSA = dhe.generateECDSA;
  5219. var generateED25519 = dhe.generateED25519;
  5220. var edCompat;
  5221. var nacl;
  5222. try {
  5223. edCompat = __webpack_require__(348);
  5224. } catch (e) {
  5225. /* Just continue through, and bail out if we try to use it. */
  5226. }
  5227. var Key = __webpack_require__(15);
  5228. var InvalidAlgorithmError = errs.InvalidAlgorithmError;
  5229. var KeyParseError = errs.KeyParseError;
  5230. var KeyEncryptedError = errs.KeyEncryptedError;
  5231. var formats = {};
  5232. formats['auto'] = __webpack_require__(349);
  5233. formats['pem'] = __webpack_require__(38);
  5234. formats['pkcs1'] = __webpack_require__(149);
  5235. formats['pkcs8'] = __webpack_require__(86);
  5236. formats['rfc4253'] = __webpack_require__(48);
  5237. formats['ssh-private'] = __webpack_require__(109);
  5238. formats['openssh'] = formats['ssh-private'];
  5239. formats['ssh'] = formats['ssh-private'];
  5240. function PrivateKey(opts) {
  5241. assert.object(opts, 'options');
  5242. Key.call(this, opts);
  5243. this._pubCache = undefined;
  5244. }
  5245. util.inherits(PrivateKey, Key);
  5246. PrivateKey.formats = formats;
  5247. PrivateKey.prototype.toBuffer = function (format, options) {
  5248. if (format === undefined)
  5249. format = 'pkcs1';
  5250. assert.string(format, 'format');
  5251. assert.object(formats[format], 'formats[format]');
  5252. assert.optionalObject(options, 'options');
  5253. return (formats[format].write(this, options));
  5254. };
  5255. PrivateKey.prototype.hash = function (algo) {
  5256. return (this.toPublic().hash(algo));
  5257. };
  5258. PrivateKey.prototype.toPublic = function () {
  5259. if (this._pubCache)
  5260. return (this._pubCache);
  5261. var algInfo = algs.info[this.type];
  5262. var pubParts = [];
  5263. for (var i = 0; i < algInfo.parts.length; ++i) {
  5264. var p = algInfo.parts[i];
  5265. pubParts.push(this.part[p]);
  5266. }
  5267. this._pubCache = new Key({
  5268. type: this.type,
  5269. source: this,
  5270. parts: pubParts
  5271. });
  5272. if (this.comment)
  5273. this._pubCache.comment = this.comment;
  5274. return (this._pubCache);
  5275. };
  5276. PrivateKey.prototype.derive = function (newType) {
  5277. assert.string(newType, 'type');
  5278. var priv, pub, pair;
  5279. if (this.type === 'ed25519' && newType === 'curve25519') {
  5280. if (nacl === undefined)
  5281. nacl = __webpack_require__(47);
  5282. priv = this.part.r.data;
  5283. if (priv[0] === 0x00)
  5284. priv = priv.slice(1);
  5285. priv = priv.slice(0, 32);
  5286. pair = nacl.box.keyPair.fromSecretKey(new Uint8Array(priv));
  5287. pub = new Buffer(pair.publicKey);
  5288. priv = Buffer.concat([priv, pub]);
  5289. return (new PrivateKey({
  5290. type: 'curve25519',
  5291. parts: [
  5292. { name: 'R', data: utils.mpNormalize(pub) },
  5293. { name: 'r', data: priv }
  5294. ]
  5295. }));
  5296. } else if (this.type === 'curve25519' && newType === 'ed25519') {
  5297. if (nacl === undefined)
  5298. nacl = __webpack_require__(47);
  5299. priv = this.part.r.data;
  5300. if (priv[0] === 0x00)
  5301. priv = priv.slice(1);
  5302. priv = priv.slice(0, 32);
  5303. pair = nacl.sign.keyPair.fromSeed(new Uint8Array(priv));
  5304. pub = new Buffer(pair.publicKey);
  5305. priv = Buffer.concat([priv, pub]);
  5306. return (new PrivateKey({
  5307. type: 'ed25519',
  5308. parts: [
  5309. { name: 'R', data: utils.mpNormalize(pub) },
  5310. { name: 'r', data: priv }
  5311. ]
  5312. }));
  5313. }
  5314. throw (new Error('Key derivation not supported from ' + this.type +
  5315. ' to ' + newType));
  5316. };
  5317. PrivateKey.prototype.createVerify = function (hashAlgo) {
  5318. return (this.toPublic().createVerify(hashAlgo));
  5319. };
  5320. PrivateKey.prototype.createSign = function (hashAlgo) {
  5321. if (hashAlgo === undefined)
  5322. hashAlgo = this.defaultHashAlgorithm();
  5323. assert.string(hashAlgo, 'hash algorithm');
  5324. /* ED25519 is not supported by OpenSSL, use a javascript impl. */
  5325. if (this.type === 'ed25519' && edCompat !== undefined)
  5326. return (new edCompat.Signer(this, hashAlgo));
  5327. if (this.type === 'curve25519')
  5328. throw (new Error('Curve25519 keys are not suitable for ' +
  5329. 'signing or verification'));
  5330. var v, nm, err;
  5331. try {
  5332. nm = hashAlgo.toUpperCase();
  5333. v = crypto.createSign(nm);
  5334. } catch (e) {
  5335. err = e;
  5336. }
  5337. if (v === undefined || (err instanceof Error &&
  5338. err.message.match(/Unknown message digest/))) {
  5339. nm = 'RSA-';
  5340. nm += hashAlgo.toUpperCase();
  5341. v = crypto.createSign(nm);
  5342. }
  5343. assert.ok(v, 'failed to create verifier');
  5344. var oldSign = v.sign.bind(v);
  5345. var key = this.toBuffer('pkcs1');
  5346. var type = this.type;
  5347. var curve = this.curve;
  5348. v.sign = function () {
  5349. var sig = oldSign(key);
  5350. if (typeof (sig) === 'string')
  5351. sig = new Buffer(sig, 'binary');
  5352. sig = Signature.parse(sig, type, 'asn1');
  5353. sig.hashAlgorithm = hashAlgo;
  5354. sig.curve = curve;
  5355. return (sig);
  5356. };
  5357. return (v);
  5358. };
  5359. PrivateKey.parse = function (data, format, options) {
  5360. if (typeof (data) !== 'string')
  5361. assert.buffer(data, 'data');
  5362. if (format === undefined)
  5363. format = 'auto';
  5364. assert.string(format, 'format');
  5365. if (typeof (options) === 'string')
  5366. options = { filename: options };
  5367. assert.optionalObject(options, 'options');
  5368. if (options === undefined)
  5369. options = {};
  5370. assert.optionalString(options.filename, 'options.filename');
  5371. if (options.filename === undefined)
  5372. options.filename = '(unnamed)';
  5373. assert.object(formats[format], 'formats[format]');
  5374. try {
  5375. var k = formats[format].read(data, options);
  5376. assert.ok(k instanceof PrivateKey, 'key is not a private key');
  5377. if (!k.comment)
  5378. k.comment = options.filename;
  5379. return (k);
  5380. } catch (e) {
  5381. if (e.name === 'KeyEncryptedError')
  5382. throw (e);
  5383. throw (new KeyParseError(options.filename, format, e));
  5384. }
  5385. };
  5386. PrivateKey.isPrivateKey = function (obj, ver) {
  5387. return (utils.isCompatible(obj, PrivateKey, ver));
  5388. };
  5389. PrivateKey.generate = function (type, options) {
  5390. if (options === undefined)
  5391. options = {};
  5392. assert.object(options, 'options');
  5393. switch (type) {
  5394. case 'ecdsa':
  5395. if (options.curve === undefined)
  5396. options.curve = 'nistp256';
  5397. assert.string(options.curve, 'options.curve');
  5398. return (generateECDSA(options.curve));
  5399. case 'ed25519':
  5400. return (generateED25519());
  5401. default:
  5402. throw (new Error('Key generation not supported with key ' +
  5403. 'type "' + type + '"'));
  5404. }
  5405. };
  5406. /*
  5407. * API versions for PrivateKey:
  5408. * [1,0] -- initial ver
  5409. * [1,1] -- added auto, pkcs[18], openssh/ssh-private formats
  5410. * [1,2] -- added defaultHashAlgorithm
  5411. * [1,3] -- added derive, ed, createDH
  5412. * [1,4] -- first tagged version
  5413. */
  5414. PrivateKey.prototype._sshpkApiVersion = [1, 4];
  5415. PrivateKey._oldVersionDetect = function (obj) {
  5416. assert.func(obj.toPublic);
  5417. assert.func(obj.createSign);
  5418. if (obj.derive)
  5419. return ([1, 3]);
  5420. if (obj.defaultHashAlgorithm)
  5421. return ([1, 2]);
  5422. if (obj.formats['auto'])
  5423. return ([1, 1]);
  5424. return ([1, 0]);
  5425. };
  5426. /***/ }),
  5427. /* 18 */
  5428. /***/ (function(module, exports, __webpack_require__) {
  5429. var anObject = __webpack_require__(7);
  5430. var IE8_DOM_DEFINE = __webpack_require__(441);
  5431. var toPrimitive = __webpack_require__(97);
  5432. var dP = Object.defineProperty;
  5433. exports.f = __webpack_require__(22) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  5434. anObject(O);
  5435. P = toPrimitive(P, true);
  5436. anObject(Attributes);
  5437. if (IE8_DOM_DEFINE) try {
  5438. return dP(O, P, Attributes);
  5439. } catch (e) { /* empty */ }
  5440. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  5441. if ('value' in Attributes) O[P] = Attributes.value;
  5442. return O;
  5443. };
  5444. /***/ }),
  5445. /* 19 */
  5446. /***/ (function(module, exports, __webpack_require__) {
  5447. var freeGlobal = __webpack_require__(334);
  5448. /** Detect free variable `self`. */
  5449. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  5450. /** Used as a reference to the global object. */
  5451. var root = freeGlobal || freeSelf || Function('return this')();
  5452. module.exports = root;
  5453. /***/ }),
  5454. /* 20 */
  5455. /***/ (function(module, exports, __webpack_require__) {
  5456. // 7.1.15 ToLength
  5457. var toInteger = __webpack_require__(55);
  5458. var min = Math.min;
  5459. module.exports = function (it) {
  5460. return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  5461. };
  5462. /***/ }),
  5463. /* 21 */
  5464. /***/ (function(module, exports) {
  5465. module.exports = require("buffer");
  5466. /***/ }),
  5467. /* 22 */
  5468. /***/ (function(module, exports, __webpack_require__) {
  5469. // Thank's IE8 for his funny defineProperty
  5470. module.exports = !__webpack_require__(13)(function () {
  5471. return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  5472. });
  5473. /***/ }),
  5474. /* 23 */
  5475. /***/ (function(module, exports) {
  5476. var hasOwnProperty = {}.hasOwnProperty;
  5477. module.exports = function (it, key) {
  5478. return hasOwnProperty.call(it, key);
  5479. };
  5480. /***/ }),
  5481. /* 24 */
  5482. /***/ (function(module, exports, __webpack_require__) {
  5483. const { env2formats } = __webpack_require__(478)
  5484. const { filterLevel, filterSecrets } = __webpack_require__(488)
  5485. const { DEBUG, NODE_ENV, LOG_LEVEL } = process.env
  5486. const env = (env2formats[NODE_ENV] && NODE_ENV) || 'production'
  5487. let level = LOG_LEVEL || (DEBUG && DEBUG.length ? 'debug' : 'info')
  5488. const format = env2formats[env]
  5489. const filters = [filterLevel, filterSecrets]
  5490. const filterOut = function (level, type, message, label, namespace) {
  5491. for (const filter of filters) {
  5492. if (filter.apply(null, arguments) === false) {
  5493. return true
  5494. }
  5495. }
  5496. return false
  5497. }
  5498. /**
  5499. * Use it to log messages in your konnector. Typical types are
  5500. *
  5501. * - `debug`
  5502. * - `warning`
  5503. * - `info`
  5504. * - `error`
  5505. * - `ok`
  5506. *
  5507. *
  5508. * @example
  5509. *
  5510. * They will be colored in development mode. In production mode, those logs are formatted in JSON to be interpreted by the stack and possibly sent to the client. `error` will stop the konnector.
  5511. *
  5512. * ```js
  5513. * logger = log('my-namespace')
  5514. * logger('debug', '365 bills')
  5515. * // my-namespace : debug : 365 bills
  5516. * logger('info', 'Page fetched')
  5517. * // my-namespace : info : Page fetched
  5518. * ```
  5519. * @param {string} type
  5520. * @param {string} message
  5521. * @param {string} label
  5522. * @param {string} namespace
  5523. */
  5524. function log (type, message, label, namespace) {
  5525. if (filterOut(level, type, message, label, namespace)) {
  5526. return
  5527. }
  5528. console.log(format(type, message, label, namespace))
  5529. // Try to stop the connector after current running io before the stack
  5530. if (type === 'critical') setImmediate(() => process.exit(1))
  5531. }
  5532. log.addFilter = function (filter) {
  5533. return filters.push(filter)
  5534. }
  5535. log.setLevel = function (lvl) {
  5536. level = lvl
  5537. }
  5538. // Short-hands
  5539. const methods = ['debug', 'info', 'warn', 'error', 'ok', 'critical']
  5540. methods.forEach(level => {
  5541. log[level] = function (message, label, namespace) {
  5542. return log(level, message, label, namespace)
  5543. }
  5544. })
  5545. module.exports = log
  5546. log.namespace = function (namespace) {
  5547. return function (type, message, label, ns = namespace) {
  5548. log(type, message, label, ns)
  5549. }
  5550. }
  5551. /***/ }),
  5552. /* 25 */
  5553. /***/ (function(module, exports) {
  5554. /**
  5555. * Checks if `value` is the
  5556. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  5557. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  5558. *
  5559. * @static
  5560. * @memberOf _
  5561. * @since 0.1.0
  5562. * @category Lang
  5563. * @param {*} value The value to check.
  5564. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  5565. * @example
  5566. *
  5567. * _.isObject({});
  5568. * // => true
  5569. *
  5570. * _.isObject([1, 2, 3]);
  5571. * // => true
  5572. *
  5573. * _.isObject(_.noop);
  5574. * // => true
  5575. *
  5576. * _.isObject(null);
  5577. * // => false
  5578. */
  5579. function isObject(value) {
  5580. var type = typeof value;
  5581. return value != null && (type == 'object' || type == 'function');
  5582. }
  5583. module.exports = isObject;
  5584. /***/ }),
  5585. /* 26 */
  5586. /***/ (function(module, exports) {
  5587. /**
  5588. * Checks if `value` is object-like. A value is object-like if it's not `null`
  5589. * and has a `typeof` result of "object".
  5590. *
  5591. * @static
  5592. * @memberOf _
  5593. * @since 4.0.0
  5594. * @category Lang
  5595. * @param {*} value The value to check.
  5596. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  5597. * @example
  5598. *
  5599. * _.isObjectLike({});
  5600. * // => true
  5601. *
  5602. * _.isObjectLike([1, 2, 3]);
  5603. * // => true
  5604. *
  5605. * _.isObjectLike(_.noop);
  5606. * // => false
  5607. *
  5608. * _.isObjectLike(null);
  5609. * // => false
  5610. */
  5611. function isObjectLike(value) {
  5612. return value != null && typeof value == 'object';
  5613. }
  5614. module.exports = isObjectLike;
  5615. /***/ }),
  5616. /* 27 */
  5617. /***/ (function(module, exports, __webpack_require__) {
  5618. var dP = __webpack_require__(18);
  5619. var createDesc = __webpack_require__(52);
  5620. module.exports = __webpack_require__(22) ? function (object, key, value) {
  5621. return dP.f(object, key, createDesc(1, value));
  5622. } : function (object, key, value) {
  5623. object[key] = value;
  5624. return object;
  5625. };
  5626. /***/ }),
  5627. /* 28 */
  5628. /***/ (function(module, exports, __webpack_require__) {
  5629. var isDate = __webpack_require__(470)
  5630. var MILLISECONDS_IN_HOUR = 3600000
  5631. var MILLISECONDS_IN_MINUTE = 60000
  5632. var DEFAULT_ADDITIONAL_DIGITS = 2
  5633. var parseTokenDateTimeDelimeter = /[T ]/
  5634. var parseTokenPlainTime = /:/
  5635. // year tokens
  5636. var parseTokenYY = /^(\d{2})$/
  5637. var parseTokensYYY = [
  5638. /^([+-]\d{2})$/, // 0 additional digits
  5639. /^([+-]\d{3})$/, // 1 additional digit
  5640. /^([+-]\d{4})$/ // 2 additional digits
  5641. ]
  5642. var parseTokenYYYY = /^(\d{4})/
  5643. var parseTokensYYYYY = [
  5644. /^([+-]\d{4})/, // 0 additional digits
  5645. /^([+-]\d{5})/, // 1 additional digit
  5646. /^([+-]\d{6})/ // 2 additional digits
  5647. ]
  5648. // date tokens
  5649. var parseTokenMM = /^-(\d{2})$/
  5650. var parseTokenDDD = /^-?(\d{3})$/
  5651. var parseTokenMMDD = /^-?(\d{2})-?(\d{2})$/
  5652. var parseTokenWww = /^-?W(\d{2})$/
  5653. var parseTokenWwwD = /^-?W(\d{2})-?(\d{1})$/
  5654. // time tokens
  5655. var parseTokenHH = /^(\d{2}([.,]\d*)?)$/
  5656. var parseTokenHHMM = /^(\d{2}):?(\d{2}([.,]\d*)?)$/
  5657. var parseTokenHHMMSS = /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/
  5658. // timezone tokens
  5659. var parseTokenTimezone = /([Z+-].*)$/
  5660. var parseTokenTimezoneZ = /^(Z)$/
  5661. var parseTokenTimezoneHH = /^([+-])(\d{2})$/
  5662. var parseTokenTimezoneHHMM = /^([+-])(\d{2}):?(\d{2})$/
  5663. /**
  5664. * @category Common Helpers
  5665. * @summary Convert the given argument to an instance of Date.
  5666. *
  5667. * @description
  5668. * Convert the given argument to an instance of Date.
  5669. *
  5670. * If the argument is an instance of Date, the function returns its clone.
  5671. *
  5672. * If the argument is a number, it is treated as a timestamp.
  5673. *
  5674. * If an argument is a string, the function tries to parse it.
  5675. * Function accepts complete ISO 8601 formats as well as partial implementations.
  5676. * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601
  5677. *
  5678. * If all above fails, the function passes the given argument to Date constructor.
  5679. *
  5680. * @param {Date|String|Number} argument - the value to convert
  5681. * @param {Object} [options] - the object with options
  5682. * @param {0 | 1 | 2} [options.additionalDigits=2] - the additional number of digits in the extended year format
  5683. * @returns {Date} the parsed date in the local time zone
  5684. *
  5685. * @example
  5686. * // Convert string '2014-02-11T11:30:30' to date:
  5687. * var result = parse('2014-02-11T11:30:30')
  5688. * //=> Tue Feb 11 2014 11:30:30
  5689. *
  5690. * @example
  5691. * // Parse string '+02014101',
  5692. * // if the additional number of digits in the extended year format is 1:
  5693. * var result = parse('+02014101', {additionalDigits: 1})
  5694. * //=> Fri Apr 11 2014 00:00:00
  5695. */
  5696. function parse (argument, dirtyOptions) {
  5697. if (isDate(argument)) {
  5698. // Prevent the date to lose the milliseconds when passed to new Date() in IE10
  5699. return new Date(argument.getTime())
  5700. } else if (typeof argument !== 'string') {
  5701. return new Date(argument)
  5702. }
  5703. var options = dirtyOptions || {}
  5704. var additionalDigits = options.additionalDigits
  5705. if (additionalDigits == null) {
  5706. additionalDigits = DEFAULT_ADDITIONAL_DIGITS
  5707. } else {
  5708. additionalDigits = Number(additionalDigits)
  5709. }
  5710. var dateStrings = splitDateString(argument)
  5711. var parseYearResult = parseYear(dateStrings.date, additionalDigits)
  5712. var year = parseYearResult.year
  5713. var restDateString = parseYearResult.restDateString
  5714. var date = parseDate(restDateString, year)
  5715. if (date) {
  5716. var timestamp = date.getTime()
  5717. var time = 0
  5718. var offset
  5719. if (dateStrings.time) {
  5720. time = parseTime(dateStrings.time)
  5721. }
  5722. if (dateStrings.timezone) {
  5723. offset = parseTimezone(dateStrings.timezone)
  5724. } else {
  5725. // get offset accurate to hour in timezones that change offset
  5726. offset = new Date(timestamp + time).getTimezoneOffset()
  5727. offset = new Date(timestamp + time + offset * MILLISECONDS_IN_MINUTE).getTimezoneOffset()
  5728. }
  5729. return new Date(timestamp + time + offset * MILLISECONDS_IN_MINUTE)
  5730. } else {
  5731. return new Date(argument)
  5732. }
  5733. }
  5734. function splitDateString (dateString) {
  5735. var dateStrings = {}
  5736. var array = dateString.split(parseTokenDateTimeDelimeter)
  5737. var timeString
  5738. if (parseTokenPlainTime.test(array[0])) {
  5739. dateStrings.date = null
  5740. timeString = array[0]
  5741. } else {
  5742. dateStrings.date = array[0]
  5743. timeString = array[1]
  5744. }
  5745. if (timeString) {
  5746. var token = parseTokenTimezone.exec(timeString)
  5747. if (token) {
  5748. dateStrings.time = timeString.replace(token[1], '')
  5749. dateStrings.timezone = token[1]
  5750. } else {
  5751. dateStrings.time = timeString
  5752. }
  5753. }
  5754. return dateStrings
  5755. }
  5756. function parseYear (dateString, additionalDigits) {
  5757. var parseTokenYYY = parseTokensYYY[additionalDigits]
  5758. var parseTokenYYYYY = parseTokensYYYYY[additionalDigits]
  5759. var token
  5760. // YYYY or ±YYYYY
  5761. token = parseTokenYYYY.exec(dateString) || parseTokenYYYYY.exec(dateString)
  5762. if (token) {
  5763. var yearString = token[1]
  5764. return {
  5765. year: parseInt(yearString, 10),
  5766. restDateString: dateString.slice(yearString.length)
  5767. }
  5768. }
  5769. // YY or ±YYY
  5770. token = parseTokenYY.exec(dateString) || parseTokenYYY.exec(dateString)
  5771. if (token) {
  5772. var centuryString = token[1]
  5773. return {
  5774. year: parseInt(centuryString, 10) * 100,
  5775. restDateString: dateString.slice(centuryString.length)
  5776. }
  5777. }
  5778. // Invalid ISO-formatted year
  5779. return {
  5780. year: null
  5781. }
  5782. }
  5783. function parseDate (dateString, year) {
  5784. // Invalid ISO-formatted year
  5785. if (year === null) {
  5786. return null
  5787. }
  5788. var token
  5789. var date
  5790. var month
  5791. var week
  5792. // YYYY
  5793. if (dateString.length === 0) {
  5794. date = new Date(0)
  5795. date.setUTCFullYear(year)
  5796. return date
  5797. }
  5798. // YYYY-MM
  5799. token = parseTokenMM.exec(dateString)
  5800. if (token) {
  5801. date = new Date(0)
  5802. month = parseInt(token[1], 10) - 1
  5803. date.setUTCFullYear(year, month)
  5804. return date
  5805. }
  5806. // YYYY-DDD or YYYYDDD
  5807. token = parseTokenDDD.exec(dateString)
  5808. if (token) {
  5809. date = new Date(0)
  5810. var dayOfYear = parseInt(token[1], 10)
  5811. date.setUTCFullYear(year, 0, dayOfYear)
  5812. return date
  5813. }
  5814. // YYYY-MM-DD or YYYYMMDD
  5815. token = parseTokenMMDD.exec(dateString)
  5816. if (token) {
  5817. date = new Date(0)
  5818. month = parseInt(token[1], 10) - 1
  5819. var day = parseInt(token[2], 10)
  5820. date.setUTCFullYear(year, month, day)
  5821. return date
  5822. }
  5823. // YYYY-Www or YYYYWww
  5824. token = parseTokenWww.exec(dateString)
  5825. if (token) {
  5826. week = parseInt(token[1], 10) - 1
  5827. return dayOfISOYear(year, week)
  5828. }
  5829. // YYYY-Www-D or YYYYWwwD
  5830. token = parseTokenWwwD.exec(dateString)
  5831. if (token) {
  5832. week = parseInt(token[1], 10) - 1
  5833. var dayOfWeek = parseInt(token[2], 10) - 1
  5834. return dayOfISOYear(year, week, dayOfWeek)
  5835. }
  5836. // Invalid ISO-formatted date
  5837. return null
  5838. }
  5839. function parseTime (timeString) {
  5840. var token
  5841. var hours
  5842. var minutes
  5843. // hh
  5844. token = parseTokenHH.exec(timeString)
  5845. if (token) {
  5846. hours = parseFloat(token[1].replace(',', '.'))
  5847. return (hours % 24) * MILLISECONDS_IN_HOUR
  5848. }
  5849. // hh:mm or hhmm
  5850. token = parseTokenHHMM.exec(timeString)
  5851. if (token) {
  5852. hours = parseInt(token[1], 10)
  5853. minutes = parseFloat(token[2].replace(',', '.'))
  5854. return (hours % 24) * MILLISECONDS_IN_HOUR +
  5855. minutes * MILLISECONDS_IN_MINUTE
  5856. }
  5857. // hh:mm:ss or hhmmss
  5858. token = parseTokenHHMMSS.exec(timeString)
  5859. if (token) {
  5860. hours = parseInt(token[1], 10)
  5861. minutes = parseInt(token[2], 10)
  5862. var seconds = parseFloat(token[3].replace(',', '.'))
  5863. return (hours % 24) * MILLISECONDS_IN_HOUR +
  5864. minutes * MILLISECONDS_IN_MINUTE +
  5865. seconds * 1000
  5866. }
  5867. // Invalid ISO-formatted time
  5868. return null
  5869. }
  5870. function parseTimezone (timezoneString) {
  5871. var token
  5872. var absoluteOffset
  5873. // Z
  5874. token = parseTokenTimezoneZ.exec(timezoneString)
  5875. if (token) {
  5876. return 0
  5877. }
  5878. // ±hh
  5879. token = parseTokenTimezoneHH.exec(timezoneString)
  5880. if (token) {
  5881. absoluteOffset = parseInt(token[2], 10) * 60
  5882. return (token[1] === '+') ? -absoluteOffset : absoluteOffset
  5883. }
  5884. // ±hh:mm or ±hhmm
  5885. token = parseTokenTimezoneHHMM.exec(timezoneString)
  5886. if (token) {
  5887. absoluteOffset = parseInt(token[2], 10) * 60 + parseInt(token[3], 10)
  5888. return (token[1] === '+') ? -absoluteOffset : absoluteOffset
  5889. }
  5890. return 0
  5891. }
  5892. function dayOfISOYear (isoYear, week, day) {
  5893. week = week || 0
  5894. day = day || 0
  5895. var date = new Date(0)
  5896. date.setUTCFullYear(isoYear, 0, 4)
  5897. var fourthOfJanuaryDay = date.getUTCDay() || 7
  5898. var diff = week * 7 + day + 1 - fourthOfJanuaryDay
  5899. date.setUTCDate(date.getUTCDate() + diff)
  5900. return date
  5901. }
  5902. module.exports = parse
  5903. /***/ }),
  5904. /* 29 */
  5905. /***/ (function(module, exports, __webpack_require__) {
  5906. "use strict";
  5907. var NS = exports.NAMESPACES = {
  5908. HTML: 'http://www.w3.org/1999/xhtml',
  5909. MATHML: 'http://www.w3.org/1998/Math/MathML',
  5910. SVG: 'http://www.w3.org/2000/svg',
  5911. XLINK: 'http://www.w3.org/1999/xlink',
  5912. XML: 'http://www.w3.org/XML/1998/namespace',
  5913. XMLNS: 'http://www.w3.org/2000/xmlns/'
  5914. };
  5915. exports.ATTRS = {
  5916. TYPE: 'type',
  5917. ACTION: 'action',
  5918. ENCODING: 'encoding',
  5919. PROMPT: 'prompt',
  5920. NAME: 'name',
  5921. COLOR: 'color',
  5922. FACE: 'face',
  5923. SIZE: 'size'
  5924. };
  5925. exports.DOCUMENT_MODE = {
  5926. NO_QUIRKS: 'no-quirks',
  5927. QUIRKS: 'quirks',
  5928. LIMITED_QUIRKS: 'limited-quirks'
  5929. };
  5930. var $ = exports.TAG_NAMES = {
  5931. A: 'a',
  5932. ADDRESS: 'address',
  5933. ANNOTATION_XML: 'annotation-xml',
  5934. APPLET: 'applet',
  5935. AREA: 'area',
  5936. ARTICLE: 'article',
  5937. ASIDE: 'aside',
  5938. B: 'b',
  5939. BASE: 'base',
  5940. BASEFONT: 'basefont',
  5941. BGSOUND: 'bgsound',
  5942. BIG: 'big',
  5943. BLOCKQUOTE: 'blockquote',
  5944. BODY: 'body',
  5945. BR: 'br',
  5946. BUTTON: 'button',
  5947. CAPTION: 'caption',
  5948. CENTER: 'center',
  5949. CODE: 'code',
  5950. COL: 'col',
  5951. COLGROUP: 'colgroup',
  5952. DD: 'dd',
  5953. DESC: 'desc',
  5954. DETAILS: 'details',
  5955. DIALOG: 'dialog',
  5956. DIR: 'dir',
  5957. DIV: 'div',
  5958. DL: 'dl',
  5959. DT: 'dt',
  5960. EM: 'em',
  5961. EMBED: 'embed',
  5962. FIELDSET: 'fieldset',
  5963. FIGCAPTION: 'figcaption',
  5964. FIGURE: 'figure',
  5965. FONT: 'font',
  5966. FOOTER: 'footer',
  5967. FOREIGN_OBJECT: 'foreignObject',
  5968. FORM: 'form',
  5969. FRAME: 'frame',
  5970. FRAMESET: 'frameset',
  5971. H1: 'h1',
  5972. H2: 'h2',
  5973. H3: 'h3',
  5974. H4: 'h4',
  5975. H5: 'h5',
  5976. H6: 'h6',
  5977. HEAD: 'head',
  5978. HEADER: 'header',
  5979. HGROUP: 'hgroup',
  5980. HR: 'hr',
  5981. HTML: 'html',
  5982. I: 'i',
  5983. IMG: 'img',
  5984. IMAGE: 'image',
  5985. INPUT: 'input',
  5986. IFRAME: 'iframe',
  5987. KEYGEN: 'keygen',
  5988. LABEL: 'label',
  5989. LI: 'li',
  5990. LINK: 'link',
  5991. LISTING: 'listing',
  5992. MAIN: 'main',
  5993. MALIGNMARK: 'malignmark',
  5994. MARQUEE: 'marquee',
  5995. MATH: 'math',
  5996. MENU: 'menu',
  5997. MENUITEM: 'menuitem',
  5998. META: 'meta',
  5999. MGLYPH: 'mglyph',
  6000. MI: 'mi',
  6001. MO: 'mo',
  6002. MN: 'mn',
  6003. MS: 'ms',
  6004. MTEXT: 'mtext',
  6005. NAV: 'nav',
  6006. NOBR: 'nobr',
  6007. NOFRAMES: 'noframes',
  6008. NOEMBED: 'noembed',
  6009. NOSCRIPT: 'noscript',
  6010. OBJECT: 'object',
  6011. OL: 'ol',
  6012. OPTGROUP: 'optgroup',
  6013. OPTION: 'option',
  6014. P: 'p',
  6015. PARAM: 'param',
  6016. PLAINTEXT: 'plaintext',
  6017. PRE: 'pre',
  6018. RB: 'rb',
  6019. RP: 'rp',
  6020. RT: 'rt',
  6021. RTC: 'rtc',
  6022. RUBY: 'ruby',
  6023. S: 's',
  6024. SCRIPT: 'script',
  6025. SECTION: 'section',
  6026. SELECT: 'select',
  6027. SOURCE: 'source',
  6028. SMALL: 'small',
  6029. SPAN: 'span',
  6030. STRIKE: 'strike',
  6031. STRONG: 'strong',
  6032. STYLE: 'style',
  6033. SUB: 'sub',
  6034. SUMMARY: 'summary',
  6035. SUP: 'sup',
  6036. TABLE: 'table',
  6037. TBODY: 'tbody',
  6038. TEMPLATE: 'template',
  6039. TEXTAREA: 'textarea',
  6040. TFOOT: 'tfoot',
  6041. TD: 'td',
  6042. TH: 'th',
  6043. THEAD: 'thead',
  6044. TITLE: 'title',
  6045. TR: 'tr',
  6046. TRACK: 'track',
  6047. TT: 'tt',
  6048. U: 'u',
  6049. UL: 'ul',
  6050. SVG: 'svg',
  6051. VAR: 'var',
  6052. WBR: 'wbr',
  6053. XMP: 'xmp'
  6054. };
  6055. var SPECIAL_ELEMENTS = exports.SPECIAL_ELEMENTS = Object.create(null);
  6056. SPECIAL_ELEMENTS[NS.HTML] = Object.create(null);
  6057. SPECIAL_ELEMENTS[NS.HTML][$.ADDRESS] = true;
  6058. SPECIAL_ELEMENTS[NS.HTML][$.APPLET] = true;
  6059. SPECIAL_ELEMENTS[NS.HTML][$.AREA] = true;
  6060. SPECIAL_ELEMENTS[NS.HTML][$.ARTICLE] = true;
  6061. SPECIAL_ELEMENTS[NS.HTML][$.ASIDE] = true;
  6062. SPECIAL_ELEMENTS[NS.HTML][$.BASE] = true;
  6063. SPECIAL_ELEMENTS[NS.HTML][$.BASEFONT] = true;
  6064. SPECIAL_ELEMENTS[NS.HTML][$.BGSOUND] = true;
  6065. SPECIAL_ELEMENTS[NS.HTML][$.BLOCKQUOTE] = true;
  6066. SPECIAL_ELEMENTS[NS.HTML][$.BODY] = true;
  6067. SPECIAL_ELEMENTS[NS.HTML][$.BR] = true;
  6068. SPECIAL_ELEMENTS[NS.HTML][$.BUTTON] = true;
  6069. SPECIAL_ELEMENTS[NS.HTML][$.CAPTION] = true;
  6070. SPECIAL_ELEMENTS[NS.HTML][$.CENTER] = true;
  6071. SPECIAL_ELEMENTS[NS.HTML][$.COL] = true;
  6072. SPECIAL_ELEMENTS[NS.HTML][$.COLGROUP] = true;
  6073. SPECIAL_ELEMENTS[NS.HTML][$.DD] = true;
  6074. SPECIAL_ELEMENTS[NS.HTML][$.DETAILS] = true;
  6075. SPECIAL_ELEMENTS[NS.HTML][$.DIR] = true;
  6076. SPECIAL_ELEMENTS[NS.HTML][$.DIV] = true;
  6077. SPECIAL_ELEMENTS[NS.HTML][$.DL] = true;
  6078. SPECIAL_ELEMENTS[NS.HTML][$.DT] = true;
  6079. SPECIAL_ELEMENTS[NS.HTML][$.EMBED] = true;
  6080. SPECIAL_ELEMENTS[NS.HTML][$.FIELDSET] = true;
  6081. SPECIAL_ELEMENTS[NS.HTML][$.FIGCAPTION] = true;
  6082. SPECIAL_ELEMENTS[NS.HTML][$.FIGURE] = true;
  6083. SPECIAL_ELEMENTS[NS.HTML][$.FOOTER] = true;
  6084. SPECIAL_ELEMENTS[NS.HTML][$.FORM] = true;
  6085. SPECIAL_ELEMENTS[NS.HTML][$.FRAME] = true;
  6086. SPECIAL_ELEMENTS[NS.HTML][$.FRAMESET] = true;
  6087. SPECIAL_ELEMENTS[NS.HTML][$.H1] = true;
  6088. SPECIAL_ELEMENTS[NS.HTML][$.H2] = true;
  6089. SPECIAL_ELEMENTS[NS.HTML][$.H3] = true;
  6090. SPECIAL_ELEMENTS[NS.HTML][$.H4] = true;
  6091. SPECIAL_ELEMENTS[NS.HTML][$.H5] = true;
  6092. SPECIAL_ELEMENTS[NS.HTML][$.H6] = true;
  6093. SPECIAL_ELEMENTS[NS.HTML][$.HEAD] = true;
  6094. SPECIAL_ELEMENTS[NS.HTML][$.HEADER] = true;
  6095. SPECIAL_ELEMENTS[NS.HTML][$.HGROUP] = true;
  6096. SPECIAL_ELEMENTS[NS.HTML][$.HR] = true;
  6097. SPECIAL_ELEMENTS[NS.HTML][$.HTML] = true;
  6098. SPECIAL_ELEMENTS[NS.HTML][$.IFRAME] = true;
  6099. SPECIAL_ELEMENTS[NS.HTML][$.IMG] = true;
  6100. SPECIAL_ELEMENTS[NS.HTML][$.INPUT] = true;
  6101. SPECIAL_ELEMENTS[NS.HTML][$.LI] = true;
  6102. SPECIAL_ELEMENTS[NS.HTML][$.LINK] = true;
  6103. SPECIAL_ELEMENTS[NS.HTML][$.LISTING] = true;
  6104. SPECIAL_ELEMENTS[NS.HTML][$.MAIN] = true;
  6105. SPECIAL_ELEMENTS[NS.HTML][$.MARQUEE] = true;
  6106. SPECIAL_ELEMENTS[NS.HTML][$.MENU] = true;
  6107. SPECIAL_ELEMENTS[NS.HTML][$.META] = true;
  6108. SPECIAL_ELEMENTS[NS.HTML][$.NAV] = true;
  6109. SPECIAL_ELEMENTS[NS.HTML][$.NOEMBED] = true;
  6110. SPECIAL_ELEMENTS[NS.HTML][$.NOFRAMES] = true;
  6111. SPECIAL_ELEMENTS[NS.HTML][$.NOSCRIPT] = true;
  6112. SPECIAL_ELEMENTS[NS.HTML][$.OBJECT] = true;
  6113. SPECIAL_ELEMENTS[NS.HTML][$.OL] = true;
  6114. SPECIAL_ELEMENTS[NS.HTML][$.P] = true;
  6115. SPECIAL_ELEMENTS[NS.HTML][$.PARAM] = true;
  6116. SPECIAL_ELEMENTS[NS.HTML][$.PLAINTEXT] = true;
  6117. SPECIAL_ELEMENTS[NS.HTML][$.PRE] = true;
  6118. SPECIAL_ELEMENTS[NS.HTML][$.SCRIPT] = true;
  6119. SPECIAL_ELEMENTS[NS.HTML][$.SECTION] = true;
  6120. SPECIAL_ELEMENTS[NS.HTML][$.SELECT] = true;
  6121. SPECIAL_ELEMENTS[NS.HTML][$.SOURCE] = true;
  6122. SPECIAL_ELEMENTS[NS.HTML][$.STYLE] = true;
  6123. SPECIAL_ELEMENTS[NS.HTML][$.SUMMARY] = true;
  6124. SPECIAL_ELEMENTS[NS.HTML][$.TABLE] = true;
  6125. SPECIAL_ELEMENTS[NS.HTML][$.TBODY] = true;
  6126. SPECIAL_ELEMENTS[NS.HTML][$.TD] = true;
  6127. SPECIAL_ELEMENTS[NS.HTML][$.TEMPLATE] = true;
  6128. SPECIAL_ELEMENTS[NS.HTML][$.TEXTAREA] = true;
  6129. SPECIAL_ELEMENTS[NS.HTML][$.TFOOT] = true;
  6130. SPECIAL_ELEMENTS[NS.HTML][$.TH] = true;
  6131. SPECIAL_ELEMENTS[NS.HTML][$.THEAD] = true;
  6132. SPECIAL_ELEMENTS[NS.HTML][$.TITLE] = true;
  6133. SPECIAL_ELEMENTS[NS.HTML][$.TR] = true;
  6134. SPECIAL_ELEMENTS[NS.HTML][$.TRACK] = true;
  6135. SPECIAL_ELEMENTS[NS.HTML][$.UL] = true;
  6136. SPECIAL_ELEMENTS[NS.HTML][$.WBR] = true;
  6137. SPECIAL_ELEMENTS[NS.HTML][$.XMP] = true;
  6138. SPECIAL_ELEMENTS[NS.MATHML] = Object.create(null);
  6139. SPECIAL_ELEMENTS[NS.MATHML][$.MI] = true;
  6140. SPECIAL_ELEMENTS[NS.MATHML][$.MO] = true;
  6141. SPECIAL_ELEMENTS[NS.MATHML][$.MN] = true;
  6142. SPECIAL_ELEMENTS[NS.MATHML][$.MS] = true;
  6143. SPECIAL_ELEMENTS[NS.MATHML][$.MTEXT] = true;
  6144. SPECIAL_ELEMENTS[NS.MATHML][$.ANNOTATION_XML] = true;
  6145. SPECIAL_ELEMENTS[NS.SVG] = Object.create(null);
  6146. SPECIAL_ELEMENTS[NS.SVG][$.TITLE] = true;
  6147. SPECIAL_ELEMENTS[NS.SVG][$.FOREIGN_OBJECT] = true;
  6148. SPECIAL_ELEMENTS[NS.SVG][$.DESC] = true;
  6149. /***/ }),
  6150. /* 30 */
  6151. /***/ (function(module, exports, __webpack_require__) {
  6152. /* eslint-disable node/no-deprecated-api */
  6153. var buffer = __webpack_require__(21)
  6154. var Buffer = buffer.Buffer
  6155. // alternative to using Object.keys for old browsers
  6156. function copyProps (src, dst) {
  6157. for (var key in src) {
  6158. dst[key] = src[key]
  6159. }
  6160. }
  6161. if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
  6162. module.exports = buffer
  6163. } else {
  6164. // Copy properties from require('buffer')
  6165. copyProps(buffer, exports)
  6166. exports.Buffer = SafeBuffer
  6167. }
  6168. function SafeBuffer (arg, encodingOrOffset, length) {
  6169. return Buffer(arg, encodingOrOffset, length)
  6170. }
  6171. // Copy static methods from Buffer
  6172. copyProps(Buffer, SafeBuffer)
  6173. SafeBuffer.from = function (arg, encodingOrOffset, length) {
  6174. if (typeof arg === 'number') {
  6175. throw new TypeError('Argument must not be a number')
  6176. }
  6177. return Buffer(arg, encodingOrOffset, length)
  6178. }
  6179. SafeBuffer.alloc = function (size, fill, encoding) {
  6180. if (typeof size !== 'number') {
  6181. throw new TypeError('Argument must be a number')
  6182. }
  6183. var buf = Buffer(size)
  6184. if (fill !== undefined) {
  6185. if (typeof encoding === 'string') {
  6186. buf.fill(fill, encoding)
  6187. } else {
  6188. buf.fill(fill)
  6189. }
  6190. } else {
  6191. buf.fill(0)
  6192. }
  6193. return buf
  6194. }
  6195. SafeBuffer.allocUnsafe = function (size) {
  6196. if (typeof size !== 'number') {
  6197. throw new TypeError('Argument must be a number')
  6198. }
  6199. return Buffer(size)
  6200. }
  6201. SafeBuffer.allocUnsafeSlow = function (size) {
  6202. if (typeof size !== 'number') {
  6203. throw new TypeError('Argument must be a number')
  6204. }
  6205. return buffer.SlowBuffer(size)
  6206. }
  6207. /***/ }),
  6208. /* 31 */
  6209. /***/ (function(module, exports, __webpack_require__) {
  6210. // Copyright 2015 Joyent, Inc.
  6211. var assert = __webpack_require__(3);
  6212. var util = __webpack_require__(2);
  6213. function FingerprintFormatError(fp, format) {
  6214. if (Error.captureStackTrace)
  6215. Error.captureStackTrace(this, FingerprintFormatError);
  6216. this.name = 'FingerprintFormatError';
  6217. this.fingerprint = fp;
  6218. this.format = format;
  6219. this.message = 'Fingerprint format is not supported, or is invalid: ';
  6220. if (fp !== undefined)
  6221. this.message += ' fingerprint = ' + fp;
  6222. if (format !== undefined)
  6223. this.message += ' format = ' + format;
  6224. }
  6225. util.inherits(FingerprintFormatError, Error);
  6226. function InvalidAlgorithmError(alg) {
  6227. if (Error.captureStackTrace)
  6228. Error.captureStackTrace(this, InvalidAlgorithmError);
  6229. this.name = 'InvalidAlgorithmError';
  6230. this.algorithm = alg;
  6231. this.message = 'Algorithm "' + alg + '" is not supported';
  6232. }
  6233. util.inherits(InvalidAlgorithmError, Error);
  6234. function KeyParseError(name, format, innerErr) {
  6235. if (Error.captureStackTrace)
  6236. Error.captureStackTrace(this, KeyParseError);
  6237. this.name = 'KeyParseError';
  6238. this.format = format;
  6239. this.keyName = name;
  6240. this.innerErr = innerErr;
  6241. this.message = 'Failed to parse ' + name + ' as a valid ' + format +
  6242. ' format key: ' + innerErr.message;
  6243. }
  6244. util.inherits(KeyParseError, Error);
  6245. function SignatureParseError(type, format, innerErr) {
  6246. if (Error.captureStackTrace)
  6247. Error.captureStackTrace(this, SignatureParseError);
  6248. this.name = 'SignatureParseError';
  6249. this.type = type;
  6250. this.format = format;
  6251. this.innerErr = innerErr;
  6252. this.message = 'Failed to parse the given data as a ' + type +
  6253. ' signature in ' + format + ' format: ' + innerErr.message;
  6254. }
  6255. util.inherits(SignatureParseError, Error);
  6256. function CertificateParseError(name, format, innerErr) {
  6257. if (Error.captureStackTrace)
  6258. Error.captureStackTrace(this, CertificateParseError);
  6259. this.name = 'CertificateParseError';
  6260. this.format = format;
  6261. this.certName = name;
  6262. this.innerErr = innerErr;
  6263. this.message = 'Failed to parse ' + name + ' as a valid ' + format +
  6264. ' format certificate: ' + innerErr.message;
  6265. }
  6266. util.inherits(CertificateParseError, Error);
  6267. function KeyEncryptedError(name, format) {
  6268. if (Error.captureStackTrace)
  6269. Error.captureStackTrace(this, KeyEncryptedError);
  6270. this.name = 'KeyEncryptedError';
  6271. this.format = format;
  6272. this.keyName = name;
  6273. this.message = 'The ' + format + ' format key ' + name + ' is ' +
  6274. 'encrypted (password-protected), and no passphrase was ' +
  6275. 'provided in `options`';
  6276. }
  6277. util.inherits(KeyEncryptedError, Error);
  6278. module.exports = {
  6279. FingerprintFormatError: FingerprintFormatError,
  6280. InvalidAlgorithmError: InvalidAlgorithmError,
  6281. KeyParseError: KeyParseError,
  6282. SignatureParseError: SignatureParseError,
  6283. KeyEncryptedError: KeyEncryptedError,
  6284. CertificateParseError: CertificateParseError
  6285. };
  6286. /***/ }),
  6287. /* 32 */
  6288. /***/ (function(module, exports, __webpack_require__) {
  6289. // Copyright 2015 Joyent, Inc.
  6290. module.exports = Signature;
  6291. var assert = __webpack_require__(3);
  6292. var algs = __webpack_require__(16);
  6293. var crypto = __webpack_require__(5);
  6294. var errs = __webpack_require__(31);
  6295. var utils = __webpack_require__(12);
  6296. var asn1 = __webpack_require__(39);
  6297. var SSHBuffer = __webpack_require__(110);
  6298. var InvalidAlgorithmError = errs.InvalidAlgorithmError;
  6299. var SignatureParseError = errs.SignatureParseError;
  6300. function Signature(opts) {
  6301. assert.object(opts, 'options');
  6302. assert.arrayOfObject(opts.parts, 'options.parts');
  6303. assert.string(opts.type, 'options.type');
  6304. var partLookup = {};
  6305. for (var i = 0; i < opts.parts.length; ++i) {
  6306. var part = opts.parts[i];
  6307. partLookup[part.name] = part;
  6308. }
  6309. this.type = opts.type;
  6310. this.hashAlgorithm = opts.hashAlgo;
  6311. this.curve = opts.curve;
  6312. this.parts = opts.parts;
  6313. this.part = partLookup;
  6314. }
  6315. Signature.prototype.toBuffer = function (format) {
  6316. if (format === undefined)
  6317. format = 'asn1';
  6318. assert.string(format, 'format');
  6319. var buf;
  6320. var stype = 'ssh-' + this.type;
  6321. switch (this.type) {
  6322. case 'rsa':
  6323. switch (this.hashAlgorithm) {
  6324. case 'sha256':
  6325. stype = 'rsa-sha2-256';
  6326. break;
  6327. case 'sha512':
  6328. stype = 'rsa-sha2-512';
  6329. break;
  6330. case 'sha1':
  6331. case undefined:
  6332. break;
  6333. default:
  6334. throw (new Error('SSH signature ' +
  6335. 'format does not support hash ' +
  6336. 'algorithm ' + this.hashAlgorithm));
  6337. }
  6338. if (format === 'ssh') {
  6339. buf = new SSHBuffer({});
  6340. buf.writeString(stype);
  6341. buf.writePart(this.part.sig);
  6342. return (buf.toBuffer());
  6343. } else {
  6344. return (this.part.sig.data);
  6345. }
  6346. break;
  6347. case 'ed25519':
  6348. if (format === 'ssh') {
  6349. buf = new SSHBuffer({});
  6350. buf.writeString(stype);
  6351. buf.writePart(this.part.sig);
  6352. return (buf.toBuffer());
  6353. } else {
  6354. return (this.part.sig.data);
  6355. }
  6356. break;
  6357. case 'dsa':
  6358. case 'ecdsa':
  6359. var r, s;
  6360. if (format === 'asn1') {
  6361. var der = new asn1.BerWriter();
  6362. der.startSequence();
  6363. r = utils.mpNormalize(this.part.r.data);
  6364. s = utils.mpNormalize(this.part.s.data);
  6365. der.writeBuffer(r, asn1.Ber.Integer);
  6366. der.writeBuffer(s, asn1.Ber.Integer);
  6367. der.endSequence();
  6368. return (der.buffer);
  6369. } else if (format === 'ssh' && this.type === 'dsa') {
  6370. buf = new SSHBuffer({});
  6371. buf.writeString('ssh-dss');
  6372. r = this.part.r.data;
  6373. if (r.length > 20 && r[0] === 0x00)
  6374. r = r.slice(1);
  6375. s = this.part.s.data;
  6376. if (s.length > 20 && s[0] === 0x00)
  6377. s = s.slice(1);
  6378. if ((this.hashAlgorithm &&
  6379. this.hashAlgorithm !== 'sha1') ||
  6380. r.length + s.length !== 40) {
  6381. throw (new Error('OpenSSH only supports ' +
  6382. 'DSA signatures with SHA1 hash'));
  6383. }
  6384. buf.writeBuffer(Buffer.concat([r, s]));
  6385. return (buf.toBuffer());
  6386. } else if (format === 'ssh' && this.type === 'ecdsa') {
  6387. var inner = new SSHBuffer({});
  6388. r = this.part.r.data;
  6389. inner.writeBuffer(r);
  6390. inner.writePart(this.part.s);
  6391. buf = new SSHBuffer({});
  6392. /* XXX: find a more proper way to do this? */
  6393. var curve;
  6394. if (r[0] === 0x00)
  6395. r = r.slice(1);
  6396. var sz = r.length * 8;
  6397. if (sz === 256)
  6398. curve = 'nistp256';
  6399. else if (sz === 384)
  6400. curve = 'nistp384';
  6401. else if (sz === 528)
  6402. curve = 'nistp521';
  6403. buf.writeString('ecdsa-sha2-' + curve);
  6404. buf.writeBuffer(inner.toBuffer());
  6405. return (buf.toBuffer());
  6406. }
  6407. throw (new Error('Invalid signature format'));
  6408. default:
  6409. throw (new Error('Invalid signature data'));
  6410. }
  6411. };
  6412. Signature.prototype.toString = function (format) {
  6413. assert.optionalString(format, 'format');
  6414. return (this.toBuffer(format).toString('base64'));
  6415. };
  6416. Signature.parse = function (data, type, format) {
  6417. if (typeof (data) === 'string')
  6418. data = new Buffer(data, 'base64');
  6419. assert.buffer(data, 'data');
  6420. assert.string(format, 'format');
  6421. assert.string(type, 'type');
  6422. var opts = {};
  6423. opts.type = type.toLowerCase();
  6424. opts.parts = [];
  6425. try {
  6426. assert.ok(data.length > 0, 'signature must not be empty');
  6427. switch (opts.type) {
  6428. case 'rsa':
  6429. return (parseOneNum(data, type, format, opts));
  6430. case 'ed25519':
  6431. return (parseOneNum(data, type, format, opts));
  6432. case 'dsa':
  6433. case 'ecdsa':
  6434. if (format === 'asn1')
  6435. return (parseDSAasn1(data, type, format, opts));
  6436. else if (opts.type === 'dsa')
  6437. return (parseDSA(data, type, format, opts));
  6438. else
  6439. return (parseECDSA(data, type, format, opts));
  6440. default:
  6441. throw (new InvalidAlgorithmError(type));
  6442. }
  6443. } catch (e) {
  6444. if (e instanceof InvalidAlgorithmError)
  6445. throw (e);
  6446. throw (new SignatureParseError(type, format, e));
  6447. }
  6448. };
  6449. function parseOneNum(data, type, format, opts) {
  6450. if (format === 'ssh') {
  6451. try {
  6452. var buf = new SSHBuffer({buffer: data});
  6453. var head = buf.readString();
  6454. } catch (e) {
  6455. /* fall through */
  6456. }
  6457. if (buf !== undefined) {
  6458. var msg = 'SSH signature does not match expected ' +
  6459. 'type (expected ' + type + ', got ' + head + ')';
  6460. switch (head) {
  6461. case 'ssh-rsa':
  6462. assert.strictEqual(type, 'rsa', msg);
  6463. opts.hashAlgo = 'sha1';
  6464. break;
  6465. case 'rsa-sha2-256':
  6466. assert.strictEqual(type, 'rsa', msg);
  6467. opts.hashAlgo = 'sha256';
  6468. break;
  6469. case 'rsa-sha2-512':
  6470. assert.strictEqual(type, 'rsa', msg);
  6471. opts.hashAlgo = 'sha512';
  6472. break;
  6473. case 'ssh-ed25519':
  6474. assert.strictEqual(type, 'ed25519', msg);
  6475. opts.hashAlgo = 'sha512';
  6476. break;
  6477. default:
  6478. throw (new Error('Unknown SSH signature ' +
  6479. 'type: ' + head));
  6480. }
  6481. var sig = buf.readPart();
  6482. assert.ok(buf.atEnd(), 'extra trailing bytes');
  6483. sig.name = 'sig';
  6484. opts.parts.push(sig);
  6485. return (new Signature(opts));
  6486. }
  6487. }
  6488. opts.parts.push({name: 'sig', data: data});
  6489. return (new Signature(opts));
  6490. }
  6491. function parseDSAasn1(data, type, format, opts) {
  6492. var der = new asn1.BerReader(data);
  6493. der.readSequence();
  6494. var r = der.readString(asn1.Ber.Integer, true);
  6495. var s = der.readString(asn1.Ber.Integer, true);
  6496. opts.parts.push({name: 'r', data: utils.mpNormalize(r)});
  6497. opts.parts.push({name: 's', data: utils.mpNormalize(s)});
  6498. return (new Signature(opts));
  6499. }
  6500. function parseDSA(data, type, format, opts) {
  6501. if (data.length != 40) {
  6502. var buf = new SSHBuffer({buffer: data});
  6503. var d = buf.readBuffer();
  6504. if (d.toString('ascii') === 'ssh-dss')
  6505. d = buf.readBuffer();
  6506. assert.ok(buf.atEnd(), 'extra trailing bytes');
  6507. assert.strictEqual(d.length, 40, 'invalid inner length');
  6508. data = d;
  6509. }
  6510. opts.parts.push({name: 'r', data: data.slice(0, 20)});
  6511. opts.parts.push({name: 's', data: data.slice(20, 40)});
  6512. return (new Signature(opts));
  6513. }
  6514. function parseECDSA(data, type, format, opts) {
  6515. var buf = new SSHBuffer({buffer: data});
  6516. var r, s;
  6517. var inner = buf.readBuffer();
  6518. var stype = inner.toString('ascii');
  6519. if (stype.slice(0, 6) === 'ecdsa-') {
  6520. var parts = stype.split('-');
  6521. assert.strictEqual(parts[0], 'ecdsa');
  6522. assert.strictEqual(parts[1], 'sha2');
  6523. opts.curve = parts[2];
  6524. switch (opts.curve) {
  6525. case 'nistp256':
  6526. opts.hashAlgo = 'sha256';
  6527. break;
  6528. case 'nistp384':
  6529. opts.hashAlgo = 'sha384';
  6530. break;
  6531. case 'nistp521':
  6532. opts.hashAlgo = 'sha512';
  6533. break;
  6534. default:
  6535. throw (new Error('Unsupported ECDSA curve: ' +
  6536. opts.curve));
  6537. }
  6538. inner = buf.readBuffer();
  6539. assert.ok(buf.atEnd(), 'extra trailing bytes on outer');
  6540. buf = new SSHBuffer({buffer: inner});
  6541. r = buf.readPart();
  6542. } else {
  6543. r = {data: inner};
  6544. }
  6545. s = buf.readPart();
  6546. assert.ok(buf.atEnd(), 'extra trailing bytes');
  6547. r.name = 'r';
  6548. s.name = 's';
  6549. opts.parts.push(r);
  6550. opts.parts.push(s);
  6551. return (new Signature(opts));
  6552. }
  6553. Signature.isSignature = function (obj, ver) {
  6554. return (utils.isCompatible(obj, Signature, ver));
  6555. };
  6556. /*
  6557. * API versions for Signature:
  6558. * [1,0] -- initial ver
  6559. * [2,0] -- support for rsa in full ssh format, compat with sshpk-agent
  6560. * hashAlgorithm property
  6561. * [2,1] -- first tagged version
  6562. */
  6563. Signature.prototype._sshpkApiVersion = [2, 1];
  6564. Signature._oldVersionDetect = function (obj) {
  6565. assert.func(obj.toBuffer);
  6566. if (obj.hasOwnProperty('hashAlgorithm'))
  6567. return ([2, 0]);
  6568. return ([1, 0]);
  6569. };
  6570. /***/ }),
  6571. /* 33 */
  6572. /***/ (function(module, exports, __webpack_require__) {
  6573. try {
  6574. var util = __webpack_require__(2);
  6575. if (typeof util.inherits !== 'function') throw '';
  6576. module.exports = util.inherits;
  6577. } catch (e) {
  6578. module.exports = __webpack_require__(640);
  6579. }
  6580. /***/ }),
  6581. /* 34 */
  6582. /***/ (function(module, exports, __webpack_require__) {
  6583. // optional / simple context binding
  6584. var aFunction = __webpack_require__(54);
  6585. module.exports = function (fn, that, length) {
  6586. aFunction(fn);
  6587. if (that === undefined) return fn;
  6588. switch (length) {
  6589. case 1: return function (a) {
  6590. return fn.call(that, a);
  6591. };
  6592. case 2: return function (a, b) {
  6593. return fn.call(that, a, b);
  6594. };
  6595. case 3: return function (a, b, c) {
  6596. return fn.call(that, a, b, c);
  6597. };
  6598. }
  6599. return function (/* ...args */) {
  6600. return fn.apply(that, arguments);
  6601. };
  6602. };
  6603. /***/ }),
  6604. /* 35 */
  6605. /***/ (function(module, exports, __webpack_require__) {
  6606. // to indexed object, toObject with fallback for non-array-like ES3 strings
  6607. var IObject = __webpack_require__(187);
  6608. var defined = __webpack_require__(56);
  6609. module.exports = function (it) {
  6610. return IObject(defined(it));
  6611. };
  6612. /***/ }),
  6613. /* 36 */
  6614. /***/ (function(module, exports, __webpack_require__) {
  6615. "use strict";
  6616. if (__webpack_require__(22)) {
  6617. var LIBRARY = __webpack_require__(70);
  6618. var global = __webpack_require__(6);
  6619. var fails = __webpack_require__(13);
  6620. var $export = __webpack_require__(1);
  6621. var $typed = __webpack_require__(186);
  6622. var $buffer = __webpack_require__(442);
  6623. var ctx = __webpack_require__(34);
  6624. var anInstance = __webpack_require__(72);
  6625. var propertyDesc = __webpack_require__(52);
  6626. var hide = __webpack_require__(27);
  6627. var redefineAll = __webpack_require__(71);
  6628. var toInteger = __webpack_require__(55);
  6629. var toLength = __webpack_require__(20);
  6630. var toIndex = __webpack_require__(443);
  6631. var toAbsoluteIndex = __webpack_require__(99);
  6632. var toPrimitive = __webpack_require__(97);
  6633. var has = __webpack_require__(23);
  6634. var classof = __webpack_require__(193);
  6635. var isObject = __webpack_require__(8);
  6636. var toObject = __webpack_require__(57);
  6637. var isArrayIter = __webpack_require__(194);
  6638. var create = __webpack_require__(100);
  6639. var getPrototypeOf = __webpack_require__(101);
  6640. var gOPN = __webpack_require__(98).f;
  6641. var getIterFn = __webpack_require__(195);
  6642. var uid = __webpack_require__(53);
  6643. var wks = __webpack_require__(11);
  6644. var createArrayMethod = __webpack_require__(102);
  6645. var createArrayIncludes = __webpack_require__(188);
  6646. var speciesConstructor = __webpack_require__(447);
  6647. var ArrayIterators = __webpack_require__(196);
  6648. var Iterators = __webpack_require__(75);
  6649. var $iterDetect = __webpack_require__(136);
  6650. var setSpecies = __webpack_require__(197);
  6651. var arrayFill = __webpack_require__(192);
  6652. var arrayCopyWithin = __webpack_require__(450);
  6653. var $DP = __webpack_require__(18);
  6654. var $GOPD = __webpack_require__(42);
  6655. var dP = $DP.f;
  6656. var gOPD = $GOPD.f;
  6657. var RangeError = global.RangeError;
  6658. var TypeError = global.TypeError;
  6659. var Uint8Array = global.Uint8Array;
  6660. var ARRAY_BUFFER = 'ArrayBuffer';
  6661. var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER;
  6662. var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
  6663. var PROTOTYPE = 'prototype';
  6664. var ArrayProto = Array[PROTOTYPE];
  6665. var $ArrayBuffer = $buffer.ArrayBuffer;
  6666. var $DataView = $buffer.DataView;
  6667. var arrayForEach = createArrayMethod(0);
  6668. var arrayFilter = createArrayMethod(2);
  6669. var arraySome = createArrayMethod(3);
  6670. var arrayEvery = createArrayMethod(4);
  6671. var arrayFind = createArrayMethod(5);
  6672. var arrayFindIndex = createArrayMethod(6);
  6673. var arrayIncludes = createArrayIncludes(true);
  6674. var arrayIndexOf = createArrayIncludes(false);
  6675. var arrayValues = ArrayIterators.values;
  6676. var arrayKeys = ArrayIterators.keys;
  6677. var arrayEntries = ArrayIterators.entries;
  6678. var arrayLastIndexOf = ArrayProto.lastIndexOf;
  6679. var arrayReduce = ArrayProto.reduce;
  6680. var arrayReduceRight = ArrayProto.reduceRight;
  6681. var arrayJoin = ArrayProto.join;
  6682. var arraySort = ArrayProto.sort;
  6683. var arraySlice = ArrayProto.slice;
  6684. var arrayToString = ArrayProto.toString;
  6685. var arrayToLocaleString = ArrayProto.toLocaleString;
  6686. var ITERATOR = wks('iterator');
  6687. var TAG = wks('toStringTag');
  6688. var TYPED_CONSTRUCTOR = uid('typed_constructor');
  6689. var DEF_CONSTRUCTOR = uid('def_constructor');
  6690. var ALL_CONSTRUCTORS = $typed.CONSTR;
  6691. var TYPED_ARRAY = $typed.TYPED;
  6692. var VIEW = $typed.VIEW;
  6693. var WRONG_LENGTH = 'Wrong length!';
  6694. var $map = createArrayMethod(1, function (O, length) {
  6695. return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);
  6696. });
  6697. var LITTLE_ENDIAN = fails(function () {
  6698. // eslint-disable-next-line no-undef
  6699. return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
  6700. });
  6701. var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () {
  6702. new Uint8Array(1).set({});
  6703. });
  6704. var toOffset = function (it, BYTES) {
  6705. var offset = toInteger(it);
  6706. if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!');
  6707. return offset;
  6708. };
  6709. var validate = function (it) {
  6710. if (isObject(it) && TYPED_ARRAY in it) return it;
  6711. throw TypeError(it + ' is not a typed array!');
  6712. };
  6713. var allocate = function (C, length) {
  6714. if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) {
  6715. throw TypeError('It is not a typed array constructor!');
  6716. } return new C(length);
  6717. };
  6718. var speciesFromList = function (O, list) {
  6719. return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);
  6720. };
  6721. var fromList = function (C, list) {
  6722. var index = 0;
  6723. var length = list.length;
  6724. var result = allocate(C, length);
  6725. while (length > index) result[index] = list[index++];
  6726. return result;
  6727. };
  6728. var addGetter = function (it, key, internal) {
  6729. dP(it, key, { get: function () { return this._d[internal]; } });
  6730. };
  6731. var $from = function from(source /* , mapfn, thisArg */) {
  6732. var O = toObject(source);
  6733. var aLen = arguments.length;
  6734. var mapfn = aLen > 1 ? arguments[1] : undefined;
  6735. var mapping = mapfn !== undefined;
  6736. var iterFn = getIterFn(O);
  6737. var i, length, values, result, step, iterator;
  6738. if (iterFn != undefined && !isArrayIter(iterFn)) {
  6739. for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) {
  6740. values.push(step.value);
  6741. } O = values;
  6742. }
  6743. if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2);
  6744. for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) {
  6745. result[i] = mapping ? mapfn(O[i], i) : O[i];
  6746. }
  6747. return result;
  6748. };
  6749. var $of = function of(/* ...items */) {
  6750. var index = 0;
  6751. var length = arguments.length;
  6752. var result = allocate(this, length);
  6753. while (length > index) result[index] = arguments[index++];
  6754. return result;
  6755. };
  6756. // iOS Safari 6.x fails here
  6757. var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); });
  6758. var $toLocaleString = function toLocaleString() {
  6759. return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);
  6760. };
  6761. var proto = {
  6762. copyWithin: function copyWithin(target, start /* , end */) {
  6763. return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
  6764. },
  6765. every: function every(callbackfn /* , thisArg */) {
  6766. return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  6767. },
  6768. fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars
  6769. return arrayFill.apply(validate(this), arguments);
  6770. },
  6771. filter: function filter(callbackfn /* , thisArg */) {
  6772. return speciesFromList(this, arrayFilter(validate(this), callbackfn,
  6773. arguments.length > 1 ? arguments[1] : undefined));
  6774. },
  6775. find: function find(predicate /* , thisArg */) {
  6776. return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
  6777. },
  6778. findIndex: function findIndex(predicate /* , thisArg */) {
  6779. return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
  6780. },
  6781. forEach: function forEach(callbackfn /* , thisArg */) {
  6782. arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  6783. },
  6784. indexOf: function indexOf(searchElement /* , fromIndex */) {
  6785. return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
  6786. },
  6787. includes: function includes(searchElement /* , fromIndex */) {
  6788. return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
  6789. },
  6790. join: function join(separator) { // eslint-disable-line no-unused-vars
  6791. return arrayJoin.apply(validate(this), arguments);
  6792. },
  6793. lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars
  6794. return arrayLastIndexOf.apply(validate(this), arguments);
  6795. },
  6796. map: function map(mapfn /* , thisArg */) {
  6797. return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
  6798. },
  6799. reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
  6800. return arrayReduce.apply(validate(this), arguments);
  6801. },
  6802. reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
  6803. return arrayReduceRight.apply(validate(this), arguments);
  6804. },
  6805. reverse: function reverse() {
  6806. var that = this;
  6807. var length = validate(that).length;
  6808. var middle = Math.floor(length / 2);
  6809. var index = 0;
  6810. var value;
  6811. while (index < middle) {
  6812. value = that[index];
  6813. that[index++] = that[--length];
  6814. that[length] = value;
  6815. } return that;
  6816. },
  6817. some: function some(callbackfn /* , thisArg */) {
  6818. return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  6819. },
  6820. sort: function sort(comparefn) {
  6821. return arraySort.call(validate(this), comparefn);
  6822. },
  6823. subarray: function subarray(begin, end) {
  6824. var O = validate(this);
  6825. var length = O.length;
  6826. var $begin = toAbsoluteIndex(begin, length);
  6827. return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(
  6828. O.buffer,
  6829. O.byteOffset + $begin * O.BYTES_PER_ELEMENT,
  6830. toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin)
  6831. );
  6832. }
  6833. };
  6834. var $slice = function slice(start, end) {
  6835. return speciesFromList(this, arraySlice.call(validate(this), start, end));
  6836. };
  6837. var $set = function set(arrayLike /* , offset */) {
  6838. validate(this);
  6839. var offset = toOffset(arguments[1], 1);
  6840. var length = this.length;
  6841. var src = toObject(arrayLike);
  6842. var len = toLength(src.length);
  6843. var index = 0;
  6844. if (len + offset > length) throw RangeError(WRONG_LENGTH);
  6845. while (index < len) this[offset + index] = src[index++];
  6846. };
  6847. var $iterators = {
  6848. entries: function entries() {
  6849. return arrayEntries.call(validate(this));
  6850. },
  6851. keys: function keys() {
  6852. return arrayKeys.call(validate(this));
  6853. },
  6854. values: function values() {
  6855. return arrayValues.call(validate(this));
  6856. }
  6857. };
  6858. var isTAIndex = function (target, key) {
  6859. return isObject(target)
  6860. && target[TYPED_ARRAY]
  6861. && typeof key != 'symbol'
  6862. && key in target
  6863. && String(+key) == String(key);
  6864. };
  6865. var $getDesc = function getOwnPropertyDescriptor(target, key) {
  6866. return isTAIndex(target, key = toPrimitive(key, true))
  6867. ? propertyDesc(2, target[key])
  6868. : gOPD(target, key);
  6869. };
  6870. var $setDesc = function defineProperty(target, key, desc) {
  6871. if (isTAIndex(target, key = toPrimitive(key, true))
  6872. && isObject(desc)
  6873. && has(desc, 'value')
  6874. && !has(desc, 'get')
  6875. && !has(desc, 'set')
  6876. // TODO: add validation descriptor w/o calling accessors
  6877. && !desc.configurable
  6878. && (!has(desc, 'writable') || desc.writable)
  6879. && (!has(desc, 'enumerable') || desc.enumerable)
  6880. ) {
  6881. target[key] = desc.value;
  6882. return target;
  6883. } return dP(target, key, desc);
  6884. };
  6885. if (!ALL_CONSTRUCTORS) {
  6886. $GOPD.f = $getDesc;
  6887. $DP.f = $setDesc;
  6888. }
  6889. $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {
  6890. getOwnPropertyDescriptor: $getDesc,
  6891. defineProperty: $setDesc
  6892. });
  6893. if (fails(function () { arrayToString.call({}); })) {
  6894. arrayToString = arrayToLocaleString = function toString() {
  6895. return arrayJoin.call(this);
  6896. };
  6897. }
  6898. var $TypedArrayPrototype$ = redefineAll({}, proto);
  6899. redefineAll($TypedArrayPrototype$, $iterators);
  6900. hide($TypedArrayPrototype$, ITERATOR, $iterators.values);
  6901. redefineAll($TypedArrayPrototype$, {
  6902. slice: $slice,
  6903. set: $set,
  6904. constructor: function () { /* noop */ },
  6905. toString: arrayToString,
  6906. toLocaleString: $toLocaleString
  6907. });
  6908. addGetter($TypedArrayPrototype$, 'buffer', 'b');
  6909. addGetter($TypedArrayPrototype$, 'byteOffset', 'o');
  6910. addGetter($TypedArrayPrototype$, 'byteLength', 'l');
  6911. addGetter($TypedArrayPrototype$, 'length', 'e');
  6912. dP($TypedArrayPrototype$, TAG, {
  6913. get: function () { return this[TYPED_ARRAY]; }
  6914. });
  6915. // eslint-disable-next-line max-statements
  6916. module.exports = function (KEY, BYTES, wrapper, CLAMPED) {
  6917. CLAMPED = !!CLAMPED;
  6918. var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array';
  6919. var GETTER = 'get' + KEY;
  6920. var SETTER = 'set' + KEY;
  6921. var TypedArray = global[NAME];
  6922. var Base = TypedArray || {};
  6923. var TAC = TypedArray && getPrototypeOf(TypedArray);
  6924. var FORCED = !TypedArray || !$typed.ABV;
  6925. var O = {};
  6926. var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];
  6927. var getter = function (that, index) {
  6928. var data = that._d;
  6929. return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);
  6930. };
  6931. var setter = function (that, index, value) {
  6932. var data = that._d;
  6933. if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;
  6934. data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);
  6935. };
  6936. var addElement = function (that, index) {
  6937. dP(that, index, {
  6938. get: function () {
  6939. return getter(this, index);
  6940. },
  6941. set: function (value) {
  6942. return setter(this, index, value);
  6943. },
  6944. enumerable: true
  6945. });
  6946. };
  6947. if (FORCED) {
  6948. TypedArray = wrapper(function (that, data, $offset, $length) {
  6949. anInstance(that, TypedArray, NAME, '_d');
  6950. var index = 0;
  6951. var offset = 0;
  6952. var buffer, byteLength, length, klass;
  6953. if (!isObject(data)) {
  6954. length = toIndex(data);
  6955. byteLength = length * BYTES;
  6956. buffer = new $ArrayBuffer(byteLength);
  6957. } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
  6958. buffer = data;
  6959. offset = toOffset($offset, BYTES);
  6960. var $len = data.byteLength;
  6961. if ($length === undefined) {
  6962. if ($len % BYTES) throw RangeError(WRONG_LENGTH);
  6963. byteLength = $len - offset;
  6964. if (byteLength < 0) throw RangeError(WRONG_LENGTH);
  6965. } else {
  6966. byteLength = toLength($length) * BYTES;
  6967. if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH);
  6968. }
  6969. length = byteLength / BYTES;
  6970. } else if (TYPED_ARRAY in data) {
  6971. return fromList(TypedArray, data);
  6972. } else {
  6973. return $from.call(TypedArray, data);
  6974. }
  6975. hide(that, '_d', {
  6976. b: buffer,
  6977. o: offset,
  6978. l: byteLength,
  6979. e: length,
  6980. v: new $DataView(buffer)
  6981. });
  6982. while (index < length) addElement(that, index++);
  6983. });
  6984. TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);
  6985. hide(TypedArrayPrototype, 'constructor', TypedArray);
  6986. } else if (!fails(function () {
  6987. TypedArray(1);
  6988. }) || !fails(function () {
  6989. new TypedArray(-1); // eslint-disable-line no-new
  6990. }) || !$iterDetect(function (iter) {
  6991. new TypedArray(); // eslint-disable-line no-new
  6992. new TypedArray(null); // eslint-disable-line no-new
  6993. new TypedArray(1.5); // eslint-disable-line no-new
  6994. new TypedArray(iter); // eslint-disable-line no-new
  6995. }, true)) {
  6996. TypedArray = wrapper(function (that, data, $offset, $length) {
  6997. anInstance(that, TypedArray, NAME);
  6998. var klass;
  6999. // `ws` module bug, temporarily remove validation length for Uint8Array
  7000. // https://github.com/websockets/ws/pull/645
  7001. if (!isObject(data)) return new Base(toIndex(data));
  7002. if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
  7003. return $length !== undefined
  7004. ? new Base(data, toOffset($offset, BYTES), $length)
  7005. : $offset !== undefined
  7006. ? new Base(data, toOffset($offset, BYTES))
  7007. : new Base(data);
  7008. }
  7009. if (TYPED_ARRAY in data) return fromList(TypedArray, data);
  7010. return $from.call(TypedArray, data);
  7011. });
  7012. arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) {
  7013. if (!(key in TypedArray)) hide(TypedArray, key, Base[key]);
  7014. });
  7015. TypedArray[PROTOTYPE] = TypedArrayPrototype;
  7016. if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray;
  7017. }
  7018. var $nativeIterator = TypedArrayPrototype[ITERATOR];
  7019. var CORRECT_ITER_NAME = !!$nativeIterator
  7020. && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined);
  7021. var $iterator = $iterators.values;
  7022. hide(TypedArray, TYPED_CONSTRUCTOR, true);
  7023. hide(TypedArrayPrototype, TYPED_ARRAY, NAME);
  7024. hide(TypedArrayPrototype, VIEW, true);
  7025. hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);
  7026. if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) {
  7027. dP(TypedArrayPrototype, TAG, {
  7028. get: function () { return NAME; }
  7029. });
  7030. }
  7031. O[NAME] = TypedArray;
  7032. $export($export.G + $export.W + $export.F * (TypedArray != Base), O);
  7033. $export($export.S, NAME, {
  7034. BYTES_PER_ELEMENT: BYTES
  7035. });
  7036. $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, {
  7037. from: $from,
  7038. of: $of
  7039. });
  7040. if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);
  7041. $export($export.P, NAME, proto);
  7042. setSpecies(NAME);
  7043. $export($export.P + $export.F * FORCED_SET, NAME, { set: $set });
  7044. $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);
  7045. if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;
  7046. $export($export.P + $export.F * fails(function () {
  7047. new TypedArray(1).slice();
  7048. }), NAME, { slice: $slice });
  7049. $export($export.P + $export.F * (fails(function () {
  7050. return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString();
  7051. }) || !fails(function () {
  7052. TypedArrayPrototype.toLocaleString.call([1, 2]);
  7053. })), NAME, { toLocaleString: $toLocaleString });
  7054. Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;
  7055. if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator);
  7056. };
  7057. } else module.exports = function () { /* empty */ };
  7058. /***/ }),
  7059. /* 37 */
  7060. /***/ (function(module, exports, __webpack_require__) {
  7061. "use strict";
  7062. var es5 = __webpack_require__(59);
  7063. var Objectfreeze = es5.freeze;
  7064. var util = __webpack_require__(4);
  7065. var inherits = util.inherits;
  7066. var notEnumerableProp = util.notEnumerableProp;
  7067. function subError(nameProperty, defaultMessage) {
  7068. function SubError(message) {
  7069. if (!(this instanceof SubError)) return new SubError(message);
  7070. notEnumerableProp(this, "message",
  7071. typeof message === "string" ? message : defaultMessage);
  7072. notEnumerableProp(this, "name", nameProperty);
  7073. if (Error.captureStackTrace) {
  7074. Error.captureStackTrace(this, this.constructor);
  7075. } else {
  7076. Error.call(this);
  7077. }
  7078. }
  7079. inherits(SubError, Error);
  7080. return SubError;
  7081. }
  7082. var _TypeError, _RangeError;
  7083. var Warning = subError("Warning", "warning");
  7084. var CancellationError = subError("CancellationError", "cancellation error");
  7085. var TimeoutError = subError("TimeoutError", "timeout error");
  7086. var AggregateError = subError("AggregateError", "aggregate error");
  7087. try {
  7088. _TypeError = TypeError;
  7089. _RangeError = RangeError;
  7090. } catch(e) {
  7091. _TypeError = subError("TypeError", "type error");
  7092. _RangeError = subError("RangeError", "range error");
  7093. }
  7094. var methods = ("join pop push shift unshift slice filter forEach some " +
  7095. "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");
  7096. for (var i = 0; i < methods.length; ++i) {
  7097. if (typeof Array.prototype[methods[i]] === "function") {
  7098. AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];
  7099. }
  7100. }
  7101. es5.defineProperty(AggregateError.prototype, "length", {
  7102. value: 0,
  7103. configurable: false,
  7104. writable: true,
  7105. enumerable: true
  7106. });
  7107. AggregateError.prototype["isOperational"] = true;
  7108. var level = 0;
  7109. AggregateError.prototype.toString = function() {
  7110. var indent = Array(level * 4 + 1).join(" ");
  7111. var ret = "\n" + indent + "AggregateError of:" + "\n";
  7112. level++;
  7113. indent = Array(level * 4 + 1).join(" ");
  7114. for (var i = 0; i < this.length; ++i) {
  7115. var str = this[i] === this ? "[Circular AggregateError]" : this[i] + "";
  7116. var lines = str.split("\n");
  7117. for (var j = 0; j < lines.length; ++j) {
  7118. lines[j] = indent + lines[j];
  7119. }
  7120. str = lines.join("\n");
  7121. ret += str + "\n";
  7122. }
  7123. level--;
  7124. return ret;
  7125. };
  7126. function OperationalError(message) {
  7127. if (!(this instanceof OperationalError))
  7128. return new OperationalError(message);
  7129. notEnumerableProp(this, "name", "OperationalError");
  7130. notEnumerableProp(this, "message", message);
  7131. this.cause = message;
  7132. this["isOperational"] = true;
  7133. if (message instanceof Error) {
  7134. notEnumerableProp(this, "message", message.message);
  7135. notEnumerableProp(this, "stack", message.stack);
  7136. } else if (Error.captureStackTrace) {
  7137. Error.captureStackTrace(this, this.constructor);
  7138. }
  7139. }
  7140. inherits(OperationalError, Error);
  7141. var errorTypes = Error["__BluebirdErrorTypes__"];
  7142. if (!errorTypes) {
  7143. errorTypes = Objectfreeze({
  7144. CancellationError: CancellationError,
  7145. TimeoutError: TimeoutError,
  7146. OperationalError: OperationalError,
  7147. RejectionError: OperationalError,
  7148. AggregateError: AggregateError
  7149. });
  7150. es5.defineProperty(Error, "__BluebirdErrorTypes__", {
  7151. value: errorTypes,
  7152. writable: false,
  7153. enumerable: false,
  7154. configurable: false
  7155. });
  7156. }
  7157. module.exports = {
  7158. Error: Error,
  7159. TypeError: _TypeError,
  7160. RangeError: _RangeError,
  7161. CancellationError: errorTypes.CancellationError,
  7162. OperationalError: errorTypes.OperationalError,
  7163. TimeoutError: errorTypes.TimeoutError,
  7164. AggregateError: errorTypes.AggregateError,
  7165. Warning: Warning
  7166. };
  7167. /***/ }),
  7168. /* 38 */
  7169. /***/ (function(module, exports, __webpack_require__) {
  7170. // Copyright 2015 Joyent, Inc.
  7171. module.exports = {
  7172. read: read,
  7173. write: write
  7174. };
  7175. var assert = __webpack_require__(3);
  7176. var asn1 = __webpack_require__(39);
  7177. var crypto = __webpack_require__(5);
  7178. var algs = __webpack_require__(16);
  7179. var utils = __webpack_require__(12);
  7180. var Key = __webpack_require__(15);
  7181. var PrivateKey = __webpack_require__(17);
  7182. var pkcs1 = __webpack_require__(149);
  7183. var pkcs8 = __webpack_require__(86);
  7184. var sshpriv = __webpack_require__(109);
  7185. var rfc4253 = __webpack_require__(48);
  7186. var errors = __webpack_require__(31);
  7187. /*
  7188. * For reading we support both PKCS#1 and PKCS#8. If we find a private key,
  7189. * we just take the public component of it and use that.
  7190. */
  7191. function read(buf, options, forceType) {
  7192. var input = buf;
  7193. if (typeof (buf) !== 'string') {
  7194. assert.buffer(buf, 'buf');
  7195. buf = buf.toString('ascii');
  7196. }
  7197. var lines = buf.trim().split('\n');
  7198. var m = lines[0].match(/*JSSTYLED*/
  7199. /[-]+[ ]*BEGIN ([A-Z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/);
  7200. assert.ok(m, 'invalid PEM header');
  7201. var m2 = lines[lines.length - 1].match(/*JSSTYLED*/
  7202. /[-]+[ ]*END ([A-Z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/);
  7203. assert.ok(m2, 'invalid PEM footer');
  7204. /* Begin and end banners must match key type */
  7205. assert.equal(m[2], m2[2]);
  7206. var type = m[2].toLowerCase();
  7207. var alg;
  7208. if (m[1]) {
  7209. /* They also must match algorithms, if given */
  7210. assert.equal(m[1], m2[1], 'PEM header and footer mismatch');
  7211. alg = m[1].trim();
  7212. }
  7213. var headers = {};
  7214. while (true) {
  7215. lines = lines.slice(1);
  7216. m = lines[0].match(/*JSSTYLED*/
  7217. /^([A-Za-z0-9-]+): (.+)$/);
  7218. if (!m)
  7219. break;
  7220. headers[m[1].toLowerCase()] = m[2];
  7221. }
  7222. var cipher, key, iv;
  7223. if (headers['proc-type']) {
  7224. var parts = headers['proc-type'].split(',');
  7225. if (parts[0] === '4' && parts[1] === 'ENCRYPTED') {
  7226. if (typeof (options.passphrase) === 'string') {
  7227. options.passphrase = new Buffer(
  7228. options.passphrase, 'utf-8');
  7229. }
  7230. if (!Buffer.isBuffer(options.passphrase)) {
  7231. throw (new errors.KeyEncryptedError(
  7232. options.filename, 'PEM'));
  7233. } else {
  7234. parts = headers['dek-info'].split(',');
  7235. assert.ok(parts.length === 2);
  7236. cipher = parts[0].toLowerCase();
  7237. iv = new Buffer(parts[1], 'hex');
  7238. key = utils.opensslKeyDeriv(cipher, iv,
  7239. options.passphrase, 1).key;
  7240. }
  7241. }
  7242. }
  7243. /* Chop off the first and last lines */
  7244. lines = lines.slice(0, -1).join('');
  7245. buf = new Buffer(lines, 'base64');
  7246. if (cipher && key && iv) {
  7247. var cipherStream = crypto.createDecipheriv(cipher, key, iv);
  7248. var chunk, chunks = [];
  7249. cipherStream.once('error', function (e) {
  7250. if (e.toString().indexOf('bad decrypt') !== -1) {
  7251. throw (new Error('Incorrect passphrase ' +
  7252. 'supplied, could not decrypt key'));
  7253. }
  7254. throw (e);
  7255. });
  7256. cipherStream.write(buf);
  7257. cipherStream.end();
  7258. while ((chunk = cipherStream.read()) !== null)
  7259. chunks.push(chunk);
  7260. buf = Buffer.concat(chunks);
  7261. }
  7262. /* The new OpenSSH internal format abuses PEM headers */
  7263. if (alg && alg.toLowerCase() === 'openssh')
  7264. return (sshpriv.readSSHPrivate(type, buf, options));
  7265. if (alg && alg.toLowerCase() === 'ssh2')
  7266. return (rfc4253.readType(type, buf, options));
  7267. var der = new asn1.BerReader(buf);
  7268. der.originalInput = input;
  7269. /*
  7270. * All of the PEM file types start with a sequence tag, so chop it
  7271. * off here
  7272. */
  7273. der.readSequence();
  7274. /* PKCS#1 type keys name an algorithm in the banner explicitly */
  7275. if (alg) {
  7276. if (forceType)
  7277. assert.strictEqual(forceType, 'pkcs1');
  7278. return (pkcs1.readPkcs1(alg, type, der));
  7279. } else {
  7280. if (forceType)
  7281. assert.strictEqual(forceType, 'pkcs8');
  7282. return (pkcs8.readPkcs8(alg, type, der));
  7283. }
  7284. }
  7285. function write(key, options, type) {
  7286. assert.object(key);
  7287. var alg = {'ecdsa': 'EC', 'rsa': 'RSA', 'dsa': 'DSA'}[key.type];
  7288. var header;
  7289. var der = new asn1.BerWriter();
  7290. if (PrivateKey.isPrivateKey(key)) {
  7291. if (type && type === 'pkcs8') {
  7292. header = 'PRIVATE KEY';
  7293. pkcs8.writePkcs8(der, key);
  7294. } else {
  7295. if (type)
  7296. assert.strictEqual(type, 'pkcs1');
  7297. header = alg + ' PRIVATE KEY';
  7298. pkcs1.writePkcs1(der, key);
  7299. }
  7300. } else if (Key.isKey(key)) {
  7301. if (type && type === 'pkcs1') {
  7302. header = alg + ' PUBLIC KEY';
  7303. pkcs1.writePkcs1(der, key);
  7304. } else {
  7305. if (type)
  7306. assert.strictEqual(type, 'pkcs8');
  7307. header = 'PUBLIC KEY';
  7308. pkcs8.writePkcs8(der, key);
  7309. }
  7310. } else {
  7311. throw (new Error('key is not a Key or PrivateKey'));
  7312. }
  7313. var tmp = der.buffer.toString('base64');
  7314. var len = tmp.length + (tmp.length / 64) +
  7315. 18 + 16 + header.length*2 + 10;
  7316. var buf = new Buffer(len);
  7317. var o = 0;
  7318. o += buf.write('-----BEGIN ' + header + '-----\n', o);
  7319. for (var i = 0; i < tmp.length; ) {
  7320. var limit = i + 64;
  7321. if (limit > tmp.length)
  7322. limit = tmp.length;
  7323. o += buf.write(tmp.slice(i, limit), o);
  7324. buf[o++] = 10;
  7325. i = limit;
  7326. }
  7327. o += buf.write('-----END ' + header + '-----\n', o);
  7328. return (buf.slice(0, o));
  7329. }
  7330. /***/ }),
  7331. /* 39 */
  7332. /***/ (function(module, exports, __webpack_require__) {
  7333. // Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
  7334. // If you have no idea what ASN.1 or BER is, see this:
  7335. // ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc
  7336. var Ber = __webpack_require__(546);
  7337. ///--- Exported API
  7338. module.exports = {
  7339. Ber: Ber,
  7340. BerReader: Ber.Reader,
  7341. BerWriter: Ber.Writer
  7342. };
  7343. /***/ }),
  7344. /* 40 */
  7345. /***/ (function(module, exports, __webpack_require__) {
  7346. var isFunction = __webpack_require__(79),
  7347. isLength = __webpack_require__(166);
  7348. /**
  7349. * Checks if `value` is array-like. A value is considered array-like if it's
  7350. * not a function and has a `value.length` that's an integer greater than or
  7351. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  7352. *
  7353. * @static
  7354. * @memberOf _
  7355. * @since 4.0.0
  7356. * @category Lang
  7357. * @param {*} value The value to check.
  7358. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  7359. * @example
  7360. *
  7361. * _.isArrayLike([1, 2, 3]);
  7362. * // => true
  7363. *
  7364. * _.isArrayLike(document.body.children);
  7365. * // => true
  7366. *
  7367. * _.isArrayLike('abc');
  7368. * // => true
  7369. *
  7370. * _.isArrayLike(_.noop);
  7371. * // => false
  7372. */
  7373. function isArrayLike(value) {
  7374. return value != null && isLength(value.length) && !isFunction(value);
  7375. }
  7376. module.exports = isArrayLike;
  7377. /***/ }),
  7378. /* 41 */
  7379. /***/ (function(module, exports, __webpack_require__) {
  7380. var global = __webpack_require__(6);
  7381. var hide = __webpack_require__(27);
  7382. var has = __webpack_require__(23);
  7383. var SRC = __webpack_require__(53)('src');
  7384. var TO_STRING = 'toString';
  7385. var $toString = Function[TO_STRING];
  7386. var TPL = ('' + $toString).split(TO_STRING);
  7387. __webpack_require__(96).inspectSource = function (it) {
  7388. return $toString.call(it);
  7389. };
  7390. (module.exports = function (O, key, val, safe) {
  7391. var isFunction = typeof val == 'function';
  7392. if (isFunction) has(val, 'name') || hide(val, 'name', key);
  7393. if (O[key] === val) return;
  7394. if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
  7395. if (O === global) {
  7396. O[key] = val;
  7397. } else if (!safe) {
  7398. delete O[key];
  7399. hide(O, key, val);
  7400. } else if (O[key]) {
  7401. O[key] = val;
  7402. } else {
  7403. hide(O, key, val);
  7404. }
  7405. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  7406. })(Function.prototype, TO_STRING, function toString() {
  7407. return typeof this == 'function' && this[SRC] || $toString.call(this);
  7408. });
  7409. /***/ }),
  7410. /* 42 */
  7411. /***/ (function(module, exports, __webpack_require__) {
  7412. var pIE = __webpack_require__(103);
  7413. var createDesc = __webpack_require__(52);
  7414. var toIObject = __webpack_require__(35);
  7415. var toPrimitive = __webpack_require__(97);
  7416. var has = __webpack_require__(23);
  7417. var IE8_DOM_DEFINE = __webpack_require__(441);
  7418. var gOPD = Object.getOwnPropertyDescriptor;
  7419. exports.f = __webpack_require__(22) ? gOPD : function getOwnPropertyDescriptor(O, P) {
  7420. O = toIObject(O);
  7421. P = toPrimitive(P, true);
  7422. if (IE8_DOM_DEFINE) try {
  7423. return gOPD(O, P);
  7424. } catch (e) { /* empty */ }
  7425. if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
  7426. };
  7427. /***/ }),
  7428. /* 43 */
  7429. /***/ (function(module, exports, __webpack_require__) {
  7430. "use strict";
  7431. var old;
  7432. if (typeof Promise !== "undefined") old = Promise;
  7433. function noConflict() {
  7434. try { if (Promise === bluebird) Promise = old; }
  7435. catch (e) {}
  7436. return bluebird;
  7437. }
  7438. var bluebird = __webpack_require__(490)();
  7439. bluebird.noConflict = noConflict;
  7440. module.exports = bluebird;
  7441. /***/ }),
  7442. /* 44 */
  7443. /***/ (function(module, exports, __webpack_require__) {
  7444. var Symbol = __webpack_require__(80),
  7445. getRawTag = __webpack_require__(523),
  7446. objectToString = __webpack_require__(524);
  7447. /** `Object#toString` result references. */
  7448. var nullTag = '[object Null]',
  7449. undefinedTag = '[object Undefined]';
  7450. /** Built-in value references. */
  7451. var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  7452. /**
  7453. * The base implementation of `getTag` without fallbacks for buggy environments.
  7454. *
  7455. * @private
  7456. * @param {*} value The value to query.
  7457. * @returns {string} Returns the `toStringTag`.
  7458. */
  7459. function baseGetTag(value) {
  7460. if (value == null) {
  7461. return value === undefined ? undefinedTag : nullTag;
  7462. }
  7463. return (symToStringTag && symToStringTag in Object(value))
  7464. ? getRawTag(value)
  7465. : objectToString(value);
  7466. }
  7467. module.exports = baseGetTag;
  7468. /***/ }),
  7469. /* 45 */
  7470. /***/ (function(module, exports) {
  7471. module.exports = require("http");
  7472. /***/ }),
  7473. /* 46 */
  7474. /***/ (function(module, exports, __webpack_require__) {
  7475. (function(){
  7476. // Copyright (c) 2005 Tom Wu
  7477. // All Rights Reserved.
  7478. // See "LICENSE" for details.
  7479. // Basic JavaScript BN library - subset useful for RSA encryption.
  7480. // Bits per digit
  7481. var dbits;
  7482. // JavaScript engine analysis
  7483. var canary = 0xdeadbeefcafe;
  7484. var j_lm = ((canary&0xffffff)==0xefcafe);
  7485. // (public) Constructor
  7486. function BigInteger(a,b,c) {
  7487. if(a != null)
  7488. if("number" == typeof a) this.fromNumber(a,b,c);
  7489. else if(b == null && "string" != typeof a) this.fromString(a,256);
  7490. else this.fromString(a,b);
  7491. }
  7492. // return new, unset BigInteger
  7493. function nbi() { return new BigInteger(null); }
  7494. // am: Compute w_j += (x*this_i), propagate carries,
  7495. // c is initial carry, returns final carry.
  7496. // c < 3*dvalue, x < 2*dvalue, this_i < dvalue
  7497. // We need to select the fastest one that works in this environment.
  7498. // am1: use a single mult and divide to get the high bits,
  7499. // max digit bits should be 26 because
  7500. // max internal value = 2*dvalue^2-2*dvalue (< 2^53)
  7501. function am1(i,x,w,j,c,n) {
  7502. while(--n >= 0) {
  7503. var v = x*this[i++]+w[j]+c;
  7504. c = Math.floor(v/0x4000000);
  7505. w[j++] = v&0x3ffffff;
  7506. }
  7507. return c;
  7508. }
  7509. // am2 avoids a big mult-and-extract completely.
  7510. // Max digit bits should be <= 30 because we do bitwise ops
  7511. // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)
  7512. function am2(i,x,w,j,c,n) {
  7513. var xl = x&0x7fff, xh = x>>15;
  7514. while(--n >= 0) {
  7515. var l = this[i]&0x7fff;
  7516. var h = this[i++]>>15;
  7517. var m = xh*l+h*xl;
  7518. l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff);
  7519. c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);
  7520. w[j++] = l&0x3fffffff;
  7521. }
  7522. return c;
  7523. }
  7524. // Alternately, set max digit bits to 28 since some
  7525. // browsers slow down when dealing with 32-bit numbers.
  7526. function am3(i,x,w,j,c,n) {
  7527. var xl = x&0x3fff, xh = x>>14;
  7528. while(--n >= 0) {
  7529. var l = this[i]&0x3fff;
  7530. var h = this[i++]>>14;
  7531. var m = xh*l+h*xl;
  7532. l = xl*l+((m&0x3fff)<<14)+w[j]+c;
  7533. c = (l>>28)+(m>>14)+xh*h;
  7534. w[j++] = l&0xfffffff;
  7535. }
  7536. return c;
  7537. }
  7538. var inBrowser = typeof navigator !== "undefined";
  7539. if(inBrowser && j_lm && (navigator.appName == "Microsoft Internet Explorer")) {
  7540. BigInteger.prototype.am = am2;
  7541. dbits = 30;
  7542. }
  7543. else if(inBrowser && j_lm && (navigator.appName != "Netscape")) {
  7544. BigInteger.prototype.am = am1;
  7545. dbits = 26;
  7546. }
  7547. else { // Mozilla/Netscape seems to prefer am3
  7548. BigInteger.prototype.am = am3;
  7549. dbits = 28;
  7550. }
  7551. BigInteger.prototype.DB = dbits;
  7552. BigInteger.prototype.DM = ((1<<dbits)-1);
  7553. BigInteger.prototype.DV = (1<<dbits);
  7554. var BI_FP = 52;
  7555. BigInteger.prototype.FV = Math.pow(2,BI_FP);
  7556. BigInteger.prototype.F1 = BI_FP-dbits;
  7557. BigInteger.prototype.F2 = 2*dbits-BI_FP;
  7558. // Digit conversions
  7559. var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz";
  7560. var BI_RC = new Array();
  7561. var rr,vv;
  7562. rr = "0".charCodeAt(0);
  7563. for(vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv;
  7564. rr = "a".charCodeAt(0);
  7565. for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;
  7566. rr = "A".charCodeAt(0);
  7567. for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;
  7568. function int2char(n) { return BI_RM.charAt(n); }
  7569. function intAt(s,i) {
  7570. var c = BI_RC[s.charCodeAt(i)];
  7571. return (c==null)?-1:c;
  7572. }
  7573. // (protected) copy this to r
  7574. function bnpCopyTo(r) {
  7575. for(var i = this.t-1; i >= 0; --i) r[i] = this[i];
  7576. r.t = this.t;
  7577. r.s = this.s;
  7578. }
  7579. // (protected) set from integer value x, -DV <= x < DV
  7580. function bnpFromInt(x) {
  7581. this.t = 1;
  7582. this.s = (x<0)?-1:0;
  7583. if(x > 0) this[0] = x;
  7584. else if(x < -1) this[0] = x+this.DV;
  7585. else this.t = 0;
  7586. }
  7587. // return bigint initialized to value
  7588. function nbv(i) { var r = nbi(); r.fromInt(i); return r; }
  7589. // (protected) set from string and radix
  7590. function bnpFromString(s,b) {
  7591. var k;
  7592. if(b == 16) k = 4;
  7593. else if(b == 8) k = 3;
  7594. else if(b == 256) k = 8; // byte array
  7595. else if(b == 2) k = 1;
  7596. else if(b == 32) k = 5;
  7597. else if(b == 4) k = 2;
  7598. else { this.fromRadix(s,b); return; }
  7599. this.t = 0;
  7600. this.s = 0;
  7601. var i = s.length, mi = false, sh = 0;
  7602. while(--i >= 0) {
  7603. var x = (k==8)?s[i]&0xff:intAt(s,i);
  7604. if(x < 0) {
  7605. if(s.charAt(i) == "-") mi = true;
  7606. continue;
  7607. }
  7608. mi = false;
  7609. if(sh == 0)
  7610. this[this.t++] = x;
  7611. else if(sh+k > this.DB) {
  7612. this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<<sh;
  7613. this[this.t++] = (x>>(this.DB-sh));
  7614. }
  7615. else
  7616. this[this.t-1] |= x<<sh;
  7617. sh += k;
  7618. if(sh >= this.DB) sh -= this.DB;
  7619. }
  7620. if(k == 8 && (s[0]&0x80) != 0) {
  7621. this.s = -1;
  7622. if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)<<sh;
  7623. }
  7624. this.clamp();
  7625. if(mi) BigInteger.ZERO.subTo(this,this);
  7626. }
  7627. // (protected) clamp off excess high words
  7628. function bnpClamp() {
  7629. var c = this.s&this.DM;
  7630. while(this.t > 0 && this[this.t-1] == c) --this.t;
  7631. }
  7632. // (public) return string representation in given radix
  7633. function bnToString(b) {
  7634. if(this.s < 0) return "-"+this.negate().toString(b);
  7635. var k;
  7636. if(b == 16) k = 4;
  7637. else if(b == 8) k = 3;
  7638. else if(b == 2) k = 1;
  7639. else if(b == 32) k = 5;
  7640. else if(b == 4) k = 2;
  7641. else return this.toRadix(b);
  7642. var km = (1<<k)-1, d, m = false, r = "", i = this.t;
  7643. var p = this.DB-(i*this.DB)%k;
  7644. if(i-- > 0) {
  7645. if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); }
  7646. while(i >= 0) {
  7647. if(p < k) {
  7648. d = (this[i]&((1<<p)-1))<<(k-p);
  7649. d |= this[--i]>>(p+=this.DB-k);
  7650. }
  7651. else {
  7652. d = (this[i]>>(p-=k))&km;
  7653. if(p <= 0) { p += this.DB; --i; }
  7654. }
  7655. if(d > 0) m = true;
  7656. if(m) r += int2char(d);
  7657. }
  7658. }
  7659. return m?r:"0";
  7660. }
  7661. // (public) -this
  7662. function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; }
  7663. // (public) |this|
  7664. function bnAbs() { return (this.s<0)?this.negate():this; }
  7665. // (public) return + if this > a, - if this < a, 0 if equal
  7666. function bnCompareTo(a) {
  7667. var r = this.s-a.s;
  7668. if(r != 0) return r;
  7669. var i = this.t;
  7670. r = i-a.t;
  7671. if(r != 0) return (this.s<0)?-r:r;
  7672. while(--i >= 0) if((r=this[i]-a[i]) != 0) return r;
  7673. return 0;
  7674. }
  7675. // returns bit length of the integer x
  7676. function nbits(x) {
  7677. var r = 1, t;
  7678. if((t=x>>>16) != 0) { x = t; r += 16; }
  7679. if((t=x>>8) != 0) { x = t; r += 8; }
  7680. if((t=x>>4) != 0) { x = t; r += 4; }
  7681. if((t=x>>2) != 0) { x = t; r += 2; }
  7682. if((t=x>>1) != 0) { x = t; r += 1; }
  7683. return r;
  7684. }
  7685. // (public) return the number of bits in "this"
  7686. function bnBitLength() {
  7687. if(this.t <= 0) return 0;
  7688. return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM));
  7689. }
  7690. // (protected) r = this << n*DB
  7691. function bnpDLShiftTo(n,r) {
  7692. var i;
  7693. for(i = this.t-1; i >= 0; --i) r[i+n] = this[i];
  7694. for(i = n-1; i >= 0; --i) r[i] = 0;
  7695. r.t = this.t+n;
  7696. r.s = this.s;
  7697. }
  7698. // (protected) r = this >> n*DB
  7699. function bnpDRShiftTo(n,r) {
  7700. for(var i = n; i < this.t; ++i) r[i-n] = this[i];
  7701. r.t = Math.max(this.t-n,0);
  7702. r.s = this.s;
  7703. }
  7704. // (protected) r = this << n
  7705. function bnpLShiftTo(n,r) {
  7706. var bs = n%this.DB;
  7707. var cbs = this.DB-bs;
  7708. var bm = (1<<cbs)-1;
  7709. var ds = Math.floor(n/this.DB), c = (this.s<<bs)&this.DM, i;
  7710. for(i = this.t-1; i >= 0; --i) {
  7711. r[i+ds+1] = (this[i]>>cbs)|c;
  7712. c = (this[i]&bm)<<bs;
  7713. }
  7714. for(i = ds-1; i >= 0; --i) r[i] = 0;
  7715. r[ds] = c;
  7716. r.t = this.t+ds+1;
  7717. r.s = this.s;
  7718. r.clamp();
  7719. }
  7720. // (protected) r = this >> n
  7721. function bnpRShiftTo(n,r) {
  7722. r.s = this.s;
  7723. var ds = Math.floor(n/this.DB);
  7724. if(ds >= this.t) { r.t = 0; return; }
  7725. var bs = n%this.DB;
  7726. var cbs = this.DB-bs;
  7727. var bm = (1<<bs)-1;
  7728. r[0] = this[ds]>>bs;
  7729. for(var i = ds+1; i < this.t; ++i) {
  7730. r[i-ds-1] |= (this[i]&bm)<<cbs;
  7731. r[i-ds] = this[i]>>bs;
  7732. }
  7733. if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<<cbs;
  7734. r.t = this.t-ds;
  7735. r.clamp();
  7736. }
  7737. // (protected) r = this - a
  7738. function bnpSubTo(a,r) {
  7739. var i = 0, c = 0, m = Math.min(a.t,this.t);
  7740. while(i < m) {
  7741. c += this[i]-a[i];
  7742. r[i++] = c&this.DM;
  7743. c >>= this.DB;
  7744. }
  7745. if(a.t < this.t) {
  7746. c -= a.s;
  7747. while(i < this.t) {
  7748. c += this[i];
  7749. r[i++] = c&this.DM;
  7750. c >>= this.DB;
  7751. }
  7752. c += this.s;
  7753. }
  7754. else {
  7755. c += this.s;
  7756. while(i < a.t) {
  7757. c -= a[i];
  7758. r[i++] = c&this.DM;
  7759. c >>= this.DB;
  7760. }
  7761. c -= a.s;
  7762. }
  7763. r.s = (c<0)?-1:0;
  7764. if(c < -1) r[i++] = this.DV+c;
  7765. else if(c > 0) r[i++] = c;
  7766. r.t = i;
  7767. r.clamp();
  7768. }
  7769. // (protected) r = this * a, r != this,a (HAC 14.12)
  7770. // "this" should be the larger one if appropriate.
  7771. function bnpMultiplyTo(a,r) {
  7772. var x = this.abs(), y = a.abs();
  7773. var i = x.t;
  7774. r.t = i+y.t;
  7775. while(--i >= 0) r[i] = 0;
  7776. for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t);
  7777. r.s = 0;
  7778. r.clamp();
  7779. if(this.s != a.s) BigInteger.ZERO.subTo(r,r);
  7780. }
  7781. // (protected) r = this^2, r != this (HAC 14.16)
  7782. function bnpSquareTo(r) {
  7783. var x = this.abs();
  7784. var i = r.t = 2*x.t;
  7785. while(--i >= 0) r[i] = 0;
  7786. for(i = 0; i < x.t-1; ++i) {
  7787. var c = x.am(i,x[i],r,2*i,0,1);
  7788. if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) {
  7789. r[i+x.t] -= x.DV;
  7790. r[i+x.t+1] = 1;
  7791. }
  7792. }
  7793. if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1);
  7794. r.s = 0;
  7795. r.clamp();
  7796. }
  7797. // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)
  7798. // r != q, this != m. q or r may be null.
  7799. function bnpDivRemTo(m,q,r) {
  7800. var pm = m.abs();
  7801. if(pm.t <= 0) return;
  7802. var pt = this.abs();
  7803. if(pt.t < pm.t) {
  7804. if(q != null) q.fromInt(0);
  7805. if(r != null) this.copyTo(r);
  7806. return;
  7807. }
  7808. if(r == null) r = nbi();
  7809. var y = nbi(), ts = this.s, ms = m.s;
  7810. var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus
  7811. if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); }
  7812. else { pm.copyTo(y); pt.copyTo(r); }
  7813. var ys = y.t;
  7814. var y0 = y[ys-1];
  7815. if(y0 == 0) return;
  7816. var yt = y0*(1<<this.F1)+((ys>1)?y[ys-2]>>this.F2:0);
  7817. var d1 = this.FV/yt, d2 = (1<<this.F1)/yt, e = 1<<this.F2;
  7818. var i = r.t, j = i-ys, t = (q==null)?nbi():q;
  7819. y.dlShiftTo(j,t);
  7820. if(r.compareTo(t) >= 0) {
  7821. r[r.t++] = 1;
  7822. r.subTo(t,r);
  7823. }
  7824. BigInteger.ONE.dlShiftTo(ys,t);
  7825. t.subTo(y,y); // "negative" y so we can replace sub with am later
  7826. while(y.t < ys) y[y.t++] = 0;
  7827. while(--j >= 0) {
  7828. // Estimate quotient digit
  7829. var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);
  7830. if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out
  7831. y.dlShiftTo(j,t);
  7832. r.subTo(t,r);
  7833. while(r[i] < --qd) r.subTo(t,r);
  7834. }
  7835. }
  7836. if(q != null) {
  7837. r.drShiftTo(ys,q);
  7838. if(ts != ms) BigInteger.ZERO.subTo(q,q);
  7839. }
  7840. r.t = ys;
  7841. r.clamp();
  7842. if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder
  7843. if(ts < 0) BigInteger.ZERO.subTo(r,r);
  7844. }
  7845. // (public) this mod a
  7846. function bnMod(a) {
  7847. var r = nbi();
  7848. this.abs().divRemTo(a,null,r);
  7849. if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r);
  7850. return r;
  7851. }
  7852. // Modular reduction using "classic" algorithm
  7853. function Classic(m) { this.m = m; }
  7854. function cConvert(x) {
  7855. if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);
  7856. else return x;
  7857. }
  7858. function cRevert(x) { return x; }
  7859. function cReduce(x) { x.divRemTo(this.m,null,x); }
  7860. function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
  7861. function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
  7862. Classic.prototype.convert = cConvert;
  7863. Classic.prototype.revert = cRevert;
  7864. Classic.prototype.reduce = cReduce;
  7865. Classic.prototype.mulTo = cMulTo;
  7866. Classic.prototype.sqrTo = cSqrTo;
  7867. // (protected) return "-1/this % 2^DB"; useful for Mont. reduction
  7868. // justification:
  7869. // xy == 1 (mod m)
  7870. // xy = 1+km
  7871. // xy(2-xy) = (1+km)(1-km)
  7872. // x[y(2-xy)] = 1-k^2m^2
  7873. // x[y(2-xy)] == 1 (mod m^2)
  7874. // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2
  7875. // should reduce x and y(2-xy) by m^2 at each step to keep size bounded.
  7876. // JS multiply "overflows" differently from C/C++, so care is needed here.
  7877. function bnpInvDigit() {
  7878. if(this.t < 1) return 0;
  7879. var x = this[0];
  7880. if((x&1) == 0) return 0;
  7881. var y = x&3; // y == 1/x mod 2^2
  7882. y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4
  7883. y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8
  7884. y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16
  7885. // last step - calculate inverse mod DV directly;
  7886. // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints
  7887. y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits
  7888. // we really want the negative inverse, and -DV < y < DV
  7889. return (y>0)?this.DV-y:-y;
  7890. }
  7891. // Montgomery reduction
  7892. function Montgomery(m) {
  7893. this.m = m;
  7894. this.mp = m.invDigit();
  7895. this.mpl = this.mp&0x7fff;
  7896. this.mph = this.mp>>15;
  7897. this.um = (1<<(m.DB-15))-1;
  7898. this.mt2 = 2*m.t;
  7899. }
  7900. // xR mod m
  7901. function montConvert(x) {
  7902. var r = nbi();
  7903. x.abs().dlShiftTo(this.m.t,r);
  7904. r.divRemTo(this.m,null,r);
  7905. if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r);
  7906. return r;
  7907. }
  7908. // x/R mod m
  7909. function montRevert(x) {
  7910. var r = nbi();
  7911. x.copyTo(r);
  7912. this.reduce(r);
  7913. return r;
  7914. }
  7915. // x = x/R mod m (HAC 14.32)
  7916. function montReduce(x) {
  7917. while(x.t <= this.mt2) // pad x so am has enough room later
  7918. x[x.t++] = 0;
  7919. for(var i = 0; i < this.m.t; ++i) {
  7920. // faster way of calculating u0 = x[i]*mp mod DV
  7921. var j = x[i]&0x7fff;
  7922. var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM;
  7923. // use am to combine the multiply-shift-add into one call
  7924. j = i+this.m.t;
  7925. x[j] += this.m.am(0,u0,x,i,0,this.m.t);
  7926. // propagate carry
  7927. while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; }
  7928. }
  7929. x.clamp();
  7930. x.drShiftTo(this.m.t,x);
  7931. if(x.compareTo(this.m) >= 0) x.subTo(this.m,x);
  7932. }
  7933. // r = "x^2/R mod m"; x != r
  7934. function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
  7935. // r = "xy/R mod m"; x,y != r
  7936. function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
  7937. Montgomery.prototype.convert = montConvert;
  7938. Montgomery.prototype.revert = montRevert;
  7939. Montgomery.prototype.reduce = montReduce;
  7940. Montgomery.prototype.mulTo = montMulTo;
  7941. Montgomery.prototype.sqrTo = montSqrTo;
  7942. // (protected) true iff this is even
  7943. function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; }
  7944. // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79)
  7945. function bnpExp(e,z) {
  7946. if(e > 0xffffffff || e < 1) return BigInteger.ONE;
  7947. var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1;
  7948. g.copyTo(r);
  7949. while(--i >= 0) {
  7950. z.sqrTo(r,r2);
  7951. if((e&(1<<i)) > 0) z.mulTo(r2,g,r);
  7952. else { var t = r; r = r2; r2 = t; }
  7953. }
  7954. return z.revert(r);
  7955. }
  7956. // (public) this^e % m, 0 <= e < 2^32
  7957. function bnModPowInt(e,m) {
  7958. var z;
  7959. if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m);
  7960. return this.exp(e,z);
  7961. }
  7962. // protected
  7963. BigInteger.prototype.copyTo = bnpCopyTo;
  7964. BigInteger.prototype.fromInt = bnpFromInt;
  7965. BigInteger.prototype.fromString = bnpFromString;
  7966. BigInteger.prototype.clamp = bnpClamp;
  7967. BigInteger.prototype.dlShiftTo = bnpDLShiftTo;
  7968. BigInteger.prototype.drShiftTo = bnpDRShiftTo;
  7969. BigInteger.prototype.lShiftTo = bnpLShiftTo;
  7970. BigInteger.prototype.rShiftTo = bnpRShiftTo;
  7971. BigInteger.prototype.subTo = bnpSubTo;
  7972. BigInteger.prototype.multiplyTo = bnpMultiplyTo;
  7973. BigInteger.prototype.squareTo = bnpSquareTo;
  7974. BigInteger.prototype.divRemTo = bnpDivRemTo;
  7975. BigInteger.prototype.invDigit = bnpInvDigit;
  7976. BigInteger.prototype.isEven = bnpIsEven;
  7977. BigInteger.prototype.exp = bnpExp;
  7978. // public
  7979. BigInteger.prototype.toString = bnToString;
  7980. BigInteger.prototype.negate = bnNegate;
  7981. BigInteger.prototype.abs = bnAbs;
  7982. BigInteger.prototype.compareTo = bnCompareTo;
  7983. BigInteger.prototype.bitLength = bnBitLength;
  7984. BigInteger.prototype.mod = bnMod;
  7985. BigInteger.prototype.modPowInt = bnModPowInt;
  7986. // "constants"
  7987. BigInteger.ZERO = nbv(0);
  7988. BigInteger.ONE = nbv(1);
  7989. // Copyright (c) 2005-2009 Tom Wu
  7990. // All Rights Reserved.
  7991. // See "LICENSE" for details.
  7992. // Extended JavaScript BN functions, required for RSA private ops.
  7993. // Version 1.1: new BigInteger("0", 10) returns "proper" zero
  7994. // Version 1.2: square() API, isProbablePrime fix
  7995. // (public)
  7996. function bnClone() { var r = nbi(); this.copyTo(r); return r; }
  7997. // (public) return value as integer
  7998. function bnIntValue() {
  7999. if(this.s < 0) {
  8000. if(this.t == 1) return this[0]-this.DV;
  8001. else if(this.t == 0) return -1;
  8002. }
  8003. else if(this.t == 1) return this[0];
  8004. else if(this.t == 0) return 0;
  8005. // assumes 16 < DB < 32
  8006. return ((this[1]&((1<<(32-this.DB))-1))<<this.DB)|this[0];
  8007. }
  8008. // (public) return value as byte
  8009. function bnByteValue() { return (this.t==0)?this.s:(this[0]<<24)>>24; }
  8010. // (public) return value as short (assumes DB>=16)
  8011. function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; }
  8012. // (protected) return x s.t. r^x < DV
  8013. function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); }
  8014. // (public) 0 if this == 0, 1 if this > 0
  8015. function bnSigNum() {
  8016. if(this.s < 0) return -1;
  8017. else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0;
  8018. else return 1;
  8019. }
  8020. // (protected) convert to radix string
  8021. function bnpToRadix(b) {
  8022. if(b == null) b = 10;
  8023. if(this.signum() == 0 || b < 2 || b > 36) return "0";
  8024. var cs = this.chunkSize(b);
  8025. var a = Math.pow(b,cs);
  8026. var d = nbv(a), y = nbi(), z = nbi(), r = "";
  8027. this.divRemTo(d,y,z);
  8028. while(y.signum() > 0) {
  8029. r = (a+z.intValue()).toString(b).substr(1) + r;
  8030. y.divRemTo(d,y,z);
  8031. }
  8032. return z.intValue().toString(b) + r;
  8033. }
  8034. // (protected) convert from radix string
  8035. function bnpFromRadix(s,b) {
  8036. this.fromInt(0);
  8037. if(b == null) b = 10;
  8038. var cs = this.chunkSize(b);
  8039. var d = Math.pow(b,cs), mi = false, j = 0, w = 0;
  8040. for(var i = 0; i < s.length; ++i) {
  8041. var x = intAt(s,i);
  8042. if(x < 0) {
  8043. if(s.charAt(i) == "-" && this.signum() == 0) mi = true;
  8044. continue;
  8045. }
  8046. w = b*w+x;
  8047. if(++j >= cs) {
  8048. this.dMultiply(d);
  8049. this.dAddOffset(w,0);
  8050. j = 0;
  8051. w = 0;
  8052. }
  8053. }
  8054. if(j > 0) {
  8055. this.dMultiply(Math.pow(b,j));
  8056. this.dAddOffset(w,0);
  8057. }
  8058. if(mi) BigInteger.ZERO.subTo(this,this);
  8059. }
  8060. // (protected) alternate constructor
  8061. function bnpFromNumber(a,b,c) {
  8062. if("number" == typeof b) {
  8063. // new BigInteger(int,int,RNG)
  8064. if(a < 2) this.fromInt(1);
  8065. else {
  8066. this.fromNumber(a,c);
  8067. if(!this.testBit(a-1)) // force MSB set
  8068. this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);
  8069. if(this.isEven()) this.dAddOffset(1,0); // force odd
  8070. while(!this.isProbablePrime(b)) {
  8071. this.dAddOffset(2,0);
  8072. if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this);
  8073. }
  8074. }
  8075. }
  8076. else {
  8077. // new BigInteger(int,RNG)
  8078. var x = new Array(), t = a&7;
  8079. x.length = (a>>3)+1;
  8080. b.nextBytes(x);
  8081. if(t > 0) x[0] &= ((1<<t)-1); else x[0] = 0;
  8082. this.fromString(x,256);
  8083. }
  8084. }
  8085. // (public) convert to bigendian byte array
  8086. function bnToByteArray() {
  8087. var i = this.t, r = new Array();
  8088. r[0] = this.s;
  8089. var p = this.DB-(i*this.DB)%8, d, k = 0;
  8090. if(i-- > 0) {
  8091. if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p)
  8092. r[k++] = d|(this.s<<(this.DB-p));
  8093. while(i >= 0) {
  8094. if(p < 8) {
  8095. d = (this[i]&((1<<p)-1))<<(8-p);
  8096. d |= this[--i]>>(p+=this.DB-8);
  8097. }
  8098. else {
  8099. d = (this[i]>>(p-=8))&0xff;
  8100. if(p <= 0) { p += this.DB; --i; }
  8101. }
  8102. if((d&0x80) != 0) d |= -256;
  8103. if(k == 0 && (this.s&0x80) != (d&0x80)) ++k;
  8104. if(k > 0 || d != this.s) r[k++] = d;
  8105. }
  8106. }
  8107. return r;
  8108. }
  8109. function bnEquals(a) { return(this.compareTo(a)==0); }
  8110. function bnMin(a) { return(this.compareTo(a)<0)?this:a; }
  8111. function bnMax(a) { return(this.compareTo(a)>0)?this:a; }
  8112. // (protected) r = this op a (bitwise)
  8113. function bnpBitwiseTo(a,op,r) {
  8114. var i, f, m = Math.min(a.t,this.t);
  8115. for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]);
  8116. if(a.t < this.t) {
  8117. f = a.s&this.DM;
  8118. for(i = m; i < this.t; ++i) r[i] = op(this[i],f);
  8119. r.t = this.t;
  8120. }
  8121. else {
  8122. f = this.s&this.DM;
  8123. for(i = m; i < a.t; ++i) r[i] = op(f,a[i]);
  8124. r.t = a.t;
  8125. }
  8126. r.s = op(this.s,a.s);
  8127. r.clamp();
  8128. }
  8129. // (public) this & a
  8130. function op_and(x,y) { return x&y; }
  8131. function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; }
  8132. // (public) this | a
  8133. function op_or(x,y) { return x|y; }
  8134. function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; }
  8135. // (public) this ^ a
  8136. function op_xor(x,y) { return x^y; }
  8137. function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; }
  8138. // (public) this & ~a
  8139. function op_andnot(x,y) { return x&~y; }
  8140. function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; }
  8141. // (public) ~this
  8142. function bnNot() {
  8143. var r = nbi();
  8144. for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i];
  8145. r.t = this.t;
  8146. r.s = ~this.s;
  8147. return r;
  8148. }
  8149. // (public) this << n
  8150. function bnShiftLeft(n) {
  8151. var r = nbi();
  8152. if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r);
  8153. return r;
  8154. }
  8155. // (public) this >> n
  8156. function bnShiftRight(n) {
  8157. var r = nbi();
  8158. if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r);
  8159. return r;
  8160. }
  8161. // return index of lowest 1-bit in x, x < 2^31
  8162. function lbit(x) {
  8163. if(x == 0) return -1;
  8164. var r = 0;
  8165. if((x&0xffff) == 0) { x >>= 16; r += 16; }
  8166. if((x&0xff) == 0) { x >>= 8; r += 8; }
  8167. if((x&0xf) == 0) { x >>= 4; r += 4; }
  8168. if((x&3) == 0) { x >>= 2; r += 2; }
  8169. if((x&1) == 0) ++r;
  8170. return r;
  8171. }
  8172. // (public) returns index of lowest 1-bit (or -1 if none)
  8173. function bnGetLowestSetBit() {
  8174. for(var i = 0; i < this.t; ++i)
  8175. if(this[i] != 0) return i*this.DB+lbit(this[i]);
  8176. if(this.s < 0) return this.t*this.DB;
  8177. return -1;
  8178. }
  8179. // return number of 1 bits in x
  8180. function cbit(x) {
  8181. var r = 0;
  8182. while(x != 0) { x &= x-1; ++r; }
  8183. return r;
  8184. }
  8185. // (public) return number of set bits
  8186. function bnBitCount() {
  8187. var r = 0, x = this.s&this.DM;
  8188. for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x);
  8189. return r;
  8190. }
  8191. // (public) true iff nth bit is set
  8192. function bnTestBit(n) {
  8193. var j = Math.floor(n/this.DB);
  8194. if(j >= this.t) return(this.s!=0);
  8195. return((this[j]&(1<<(n%this.DB)))!=0);
  8196. }
  8197. // (protected) this op (1<<n)
  8198. function bnpChangeBit(n,op) {
  8199. var r = BigInteger.ONE.shiftLeft(n);
  8200. this.bitwiseTo(r,op,r);
  8201. return r;
  8202. }
  8203. // (public) this | (1<<n)
  8204. function bnSetBit(n) { return this.changeBit(n,op_or); }
  8205. // (public) this & ~(1<<n)
  8206. function bnClearBit(n) { return this.changeBit(n,op_andnot); }
  8207. // (public) this ^ (1<<n)
  8208. function bnFlipBit(n) { return this.changeBit(n,op_xor); }
  8209. // (protected) r = this + a
  8210. function bnpAddTo(a,r) {
  8211. var i = 0, c = 0, m = Math.min(a.t,this.t);
  8212. while(i < m) {
  8213. c += this[i]+a[i];
  8214. r[i++] = c&this.DM;
  8215. c >>= this.DB;
  8216. }
  8217. if(a.t < this.t) {
  8218. c += a.s;
  8219. while(i < this.t) {
  8220. c += this[i];
  8221. r[i++] = c&this.DM;
  8222. c >>= this.DB;
  8223. }
  8224. c += this.s;
  8225. }
  8226. else {
  8227. c += this.s;
  8228. while(i < a.t) {
  8229. c += a[i];
  8230. r[i++] = c&this.DM;
  8231. c >>= this.DB;
  8232. }
  8233. c += a.s;
  8234. }
  8235. r.s = (c<0)?-1:0;
  8236. if(c > 0) r[i++] = c;
  8237. else if(c < -1) r[i++] = this.DV+c;
  8238. r.t = i;
  8239. r.clamp();
  8240. }
  8241. // (public) this + a
  8242. function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; }
  8243. // (public) this - a
  8244. function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; }
  8245. // (public) this * a
  8246. function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; }
  8247. // (public) this^2
  8248. function bnSquare() { var r = nbi(); this.squareTo(r); return r; }
  8249. // (public) this / a
  8250. function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }
  8251. // (public) this % a
  8252. function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; }
  8253. // (public) [this/a,this%a]
  8254. function bnDivideAndRemainder(a) {
  8255. var q = nbi(), r = nbi();
  8256. this.divRemTo(a,q,r);
  8257. return new Array(q,r);
  8258. }
  8259. // (protected) this *= n, this >= 0, 1 < n < DV
  8260. function bnpDMultiply(n) {
  8261. this[this.t] = this.am(0,n-1,this,0,0,this.t);
  8262. ++this.t;
  8263. this.clamp();
  8264. }
  8265. // (protected) this += n << w words, this >= 0
  8266. function bnpDAddOffset(n,w) {
  8267. if(n == 0) return;
  8268. while(this.t <= w) this[this.t++] = 0;
  8269. this[w] += n;
  8270. while(this[w] >= this.DV) {
  8271. this[w] -= this.DV;
  8272. if(++w >= this.t) this[this.t++] = 0;
  8273. ++this[w];
  8274. }
  8275. }
  8276. // A "null" reducer
  8277. function NullExp() {}
  8278. function nNop(x) { return x; }
  8279. function nMulTo(x,y,r) { x.multiplyTo(y,r); }
  8280. function nSqrTo(x,r) { x.squareTo(r); }
  8281. NullExp.prototype.convert = nNop;
  8282. NullExp.prototype.revert = nNop;
  8283. NullExp.prototype.mulTo = nMulTo;
  8284. NullExp.prototype.sqrTo = nSqrTo;
  8285. // (public) this^e
  8286. function bnPow(e) { return this.exp(e,new NullExp()); }
  8287. // (protected) r = lower n words of "this * a", a.t <= n
  8288. // "this" should be the larger one if appropriate.
  8289. function bnpMultiplyLowerTo(a,n,r) {
  8290. var i = Math.min(this.t+a.t,n);
  8291. r.s = 0; // assumes a,this >= 0
  8292. r.t = i;
  8293. while(i > 0) r[--i] = 0;
  8294. var j;
  8295. for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t);
  8296. for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i);
  8297. r.clamp();
  8298. }
  8299. // (protected) r = "this * a" without lower n words, n > 0
  8300. // "this" should be the larger one if appropriate.
  8301. function bnpMultiplyUpperTo(a,n,r) {
  8302. --n;
  8303. var i = r.t = this.t+a.t-n;
  8304. r.s = 0; // assumes a,this >= 0
  8305. while(--i >= 0) r[i] = 0;
  8306. for(i = Math.max(n-this.t,0); i < a.t; ++i)
  8307. r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n);
  8308. r.clamp();
  8309. r.drShiftTo(1,r);
  8310. }
  8311. // Barrett modular reduction
  8312. function Barrett(m) {
  8313. // setup Barrett
  8314. this.r2 = nbi();
  8315. this.q3 = nbi();
  8316. BigInteger.ONE.dlShiftTo(2*m.t,this.r2);
  8317. this.mu = this.r2.divide(m);
  8318. this.m = m;
  8319. }
  8320. function barrettConvert(x) {
  8321. if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m);
  8322. else if(x.compareTo(this.m) < 0) return x;
  8323. else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; }
  8324. }
  8325. function barrettRevert(x) { return x; }
  8326. // x = x mod m (HAC 14.42)
  8327. function barrettReduce(x) {
  8328. x.drShiftTo(this.m.t-1,this.r2);
  8329. if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); }
  8330. this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);
  8331. this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);
  8332. while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1);
  8333. x.subTo(this.r2,x);
  8334. while(x.compareTo(this.m) >= 0) x.subTo(this.m,x);
  8335. }
  8336. // r = x^2 mod m; x != r
  8337. function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
  8338. // r = x*y mod m; x,y != r
  8339. function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
  8340. Barrett.prototype.convert = barrettConvert;
  8341. Barrett.prototype.revert = barrettRevert;
  8342. Barrett.prototype.reduce = barrettReduce;
  8343. Barrett.prototype.mulTo = barrettMulTo;
  8344. Barrett.prototype.sqrTo = barrettSqrTo;
  8345. // (public) this^e % m (HAC 14.85)
  8346. function bnModPow(e,m) {
  8347. var i = e.bitLength(), k, r = nbv(1), z;
  8348. if(i <= 0) return r;
  8349. else if(i < 18) k = 1;
  8350. else if(i < 48) k = 3;
  8351. else if(i < 144) k = 4;
  8352. else if(i < 768) k = 5;
  8353. else k = 6;
  8354. if(i < 8)
  8355. z = new Classic(m);
  8356. else if(m.isEven())
  8357. z = new Barrett(m);
  8358. else
  8359. z = new Montgomery(m);
  8360. // precomputation
  8361. var g = new Array(), n = 3, k1 = k-1, km = (1<<k)-1;
  8362. g[1] = z.convert(this);
  8363. if(k > 1) {
  8364. var g2 = nbi();
  8365. z.sqrTo(g[1],g2);
  8366. while(n <= km) {
  8367. g[n] = nbi();
  8368. z.mulTo(g2,g[n-2],g[n]);
  8369. n += 2;
  8370. }
  8371. }
  8372. var j = e.t-1, w, is1 = true, r2 = nbi(), t;
  8373. i = nbits(e[j])-1;
  8374. while(j >= 0) {
  8375. if(i >= k1) w = (e[j]>>(i-k1))&km;
  8376. else {
  8377. w = (e[j]&((1<<(i+1))-1))<<(k1-i);
  8378. if(j > 0) w |= e[j-1]>>(this.DB+i-k1);
  8379. }
  8380. n = k;
  8381. while((w&1) == 0) { w >>= 1; --n; }
  8382. if((i -= n) < 0) { i += this.DB; --j; }
  8383. if(is1) { // ret == 1, don't bother squaring or multiplying it
  8384. g[w].copyTo(r);
  8385. is1 = false;
  8386. }
  8387. else {
  8388. while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; }
  8389. if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; }
  8390. z.mulTo(r2,g[w],r);
  8391. }
  8392. while(j >= 0 && (e[j]&(1<<i)) == 0) {
  8393. z.sqrTo(r,r2); t = r; r = r2; r2 = t;
  8394. if(--i < 0) { i = this.DB-1; --j; }
  8395. }
  8396. }
  8397. return z.revert(r);
  8398. }
  8399. // (public) gcd(this,a) (HAC 14.54)
  8400. function bnGCD(a) {
  8401. var x = (this.s<0)?this.negate():this.clone();
  8402. var y = (a.s<0)?a.negate():a.clone();
  8403. if(x.compareTo(y) < 0) { var t = x; x = y; y = t; }
  8404. var i = x.getLowestSetBit(), g = y.getLowestSetBit();
  8405. if(g < 0) return x;
  8406. if(i < g) g = i;
  8407. if(g > 0) {
  8408. x.rShiftTo(g,x);
  8409. y.rShiftTo(g,y);
  8410. }
  8411. while(x.signum() > 0) {
  8412. if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x);
  8413. if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y);
  8414. if(x.compareTo(y) >= 0) {
  8415. x.subTo(y,x);
  8416. x.rShiftTo(1,x);
  8417. }
  8418. else {
  8419. y.subTo(x,y);
  8420. y.rShiftTo(1,y);
  8421. }
  8422. }
  8423. if(g > 0) y.lShiftTo(g,y);
  8424. return y;
  8425. }
  8426. // (protected) this % n, n < 2^26
  8427. function bnpModInt(n) {
  8428. if(n <= 0) return 0;
  8429. var d = this.DV%n, r = (this.s<0)?n-1:0;
  8430. if(this.t > 0)
  8431. if(d == 0) r = this[0]%n;
  8432. else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n;
  8433. return r;
  8434. }
  8435. // (public) 1/this % m (HAC 14.61)
  8436. function bnModInverse(m) {
  8437. var ac = m.isEven();
  8438. if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;
  8439. var u = m.clone(), v = this.clone();
  8440. var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1);
  8441. while(u.signum() != 0) {
  8442. while(u.isEven()) {
  8443. u.rShiftTo(1,u);
  8444. if(ac) {
  8445. if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); }
  8446. a.rShiftTo(1,a);
  8447. }
  8448. else if(!b.isEven()) b.subTo(m,b);
  8449. b.rShiftTo(1,b);
  8450. }
  8451. while(v.isEven()) {
  8452. v.rShiftTo(1,v);
  8453. if(ac) {
  8454. if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); }
  8455. c.rShiftTo(1,c);
  8456. }
  8457. else if(!d.isEven()) d.subTo(m,d);
  8458. d.rShiftTo(1,d);
  8459. }
  8460. if(u.compareTo(v) >= 0) {
  8461. u.subTo(v,u);
  8462. if(ac) a.subTo(c,a);
  8463. b.subTo(d,b);
  8464. }
  8465. else {
  8466. v.subTo(u,v);
  8467. if(ac) c.subTo(a,c);
  8468. d.subTo(b,d);
  8469. }
  8470. }
  8471. if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;
  8472. if(d.compareTo(m) >= 0) return d.subtract(m);
  8473. if(d.signum() < 0) d.addTo(m,d); else return d;
  8474. if(d.signum() < 0) return d.add(m); else return d;
  8475. }
  8476. var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];
  8477. var lplim = (1<<26)/lowprimes[lowprimes.length-1];
  8478. // (public) test primality with certainty >= 1-.5^t
  8479. function bnIsProbablePrime(t) {
  8480. var i, x = this.abs();
  8481. if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) {
  8482. for(i = 0; i < lowprimes.length; ++i)
  8483. if(x[0] == lowprimes[i]) return true;
  8484. return false;
  8485. }
  8486. if(x.isEven()) return false;
  8487. i = 1;
  8488. while(i < lowprimes.length) {
  8489. var m = lowprimes[i], j = i+1;
  8490. while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];
  8491. m = x.modInt(m);
  8492. while(i < j) if(m%lowprimes[i++] == 0) return false;
  8493. }
  8494. return x.millerRabin(t);
  8495. }
  8496. // (protected) true if probably prime (HAC 4.24, Miller-Rabin)
  8497. function bnpMillerRabin(t) {
  8498. var n1 = this.subtract(BigInteger.ONE);
  8499. var k = n1.getLowestSetBit();
  8500. if(k <= 0) return false;
  8501. var r = n1.shiftRight(k);
  8502. t = (t+1)>>1;
  8503. if(t > lowprimes.length) t = lowprimes.length;
  8504. var a = nbi();
  8505. for(var i = 0; i < t; ++i) {
  8506. //Pick bases at random, instead of starting at 2
  8507. a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);
  8508. var y = a.modPow(r,this);
  8509. if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {
  8510. var j = 1;
  8511. while(j++ < k && y.compareTo(n1) != 0) {
  8512. y = y.modPowInt(2,this);
  8513. if(y.compareTo(BigInteger.ONE) == 0) return false;
  8514. }
  8515. if(y.compareTo(n1) != 0) return false;
  8516. }
  8517. }
  8518. return true;
  8519. }
  8520. // protected
  8521. BigInteger.prototype.chunkSize = bnpChunkSize;
  8522. BigInteger.prototype.toRadix = bnpToRadix;
  8523. BigInteger.prototype.fromRadix = bnpFromRadix;
  8524. BigInteger.prototype.fromNumber = bnpFromNumber;
  8525. BigInteger.prototype.bitwiseTo = bnpBitwiseTo;
  8526. BigInteger.prototype.changeBit = bnpChangeBit;
  8527. BigInteger.prototype.addTo = bnpAddTo;
  8528. BigInteger.prototype.dMultiply = bnpDMultiply;
  8529. BigInteger.prototype.dAddOffset = bnpDAddOffset;
  8530. BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;
  8531. BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;
  8532. BigInteger.prototype.modInt = bnpModInt;
  8533. BigInteger.prototype.millerRabin = bnpMillerRabin;
  8534. // public
  8535. BigInteger.prototype.clone = bnClone;
  8536. BigInteger.prototype.intValue = bnIntValue;
  8537. BigInteger.prototype.byteValue = bnByteValue;
  8538. BigInteger.prototype.shortValue = bnShortValue;
  8539. BigInteger.prototype.signum = bnSigNum;
  8540. BigInteger.prototype.toByteArray = bnToByteArray;
  8541. BigInteger.prototype.equals = bnEquals;
  8542. BigInteger.prototype.min = bnMin;
  8543. BigInteger.prototype.max = bnMax;
  8544. BigInteger.prototype.and = bnAnd;
  8545. BigInteger.prototype.or = bnOr;
  8546. BigInteger.prototype.xor = bnXor;
  8547. BigInteger.prototype.andNot = bnAndNot;
  8548. BigInteger.prototype.not = bnNot;
  8549. BigInteger.prototype.shiftLeft = bnShiftLeft;
  8550. BigInteger.prototype.shiftRight = bnShiftRight;
  8551. BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;
  8552. BigInteger.prototype.bitCount = bnBitCount;
  8553. BigInteger.prototype.testBit = bnTestBit;
  8554. BigInteger.prototype.setBit = bnSetBit;
  8555. BigInteger.prototype.clearBit = bnClearBit;
  8556. BigInteger.prototype.flipBit = bnFlipBit;
  8557. BigInteger.prototype.add = bnAdd;
  8558. BigInteger.prototype.subtract = bnSubtract;
  8559. BigInteger.prototype.multiply = bnMultiply;
  8560. BigInteger.prototype.divide = bnDivide;
  8561. BigInteger.prototype.remainder = bnRemainder;
  8562. BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;
  8563. BigInteger.prototype.modPow = bnModPow;
  8564. BigInteger.prototype.modInverse = bnModInverse;
  8565. BigInteger.prototype.pow = bnPow;
  8566. BigInteger.prototype.gcd = bnGCD;
  8567. BigInteger.prototype.isProbablePrime = bnIsProbablePrime;
  8568. // JSBN-specific extension
  8569. BigInteger.prototype.square = bnSquare;
  8570. // Expose the Barrett function
  8571. BigInteger.prototype.Barrett = Barrett
  8572. // BigInteger interfaces not implemented in jsbn:
  8573. // BigInteger(int signum, byte[] magnitude)
  8574. // double doubleValue()
  8575. // float floatValue()
  8576. // int hashCode()
  8577. // long longValue()
  8578. // static BigInteger valueOf(long val)
  8579. // Random number generator - requires a PRNG backend, e.g. prng4.js
  8580. // For best results, put code like
  8581. // <body onClick='rng_seed_time();' onKeyPress='rng_seed_time();'>
  8582. // in your main HTML document.
  8583. var rng_state;
  8584. var rng_pool;
  8585. var rng_pptr;
  8586. // Mix in a 32-bit integer into the pool
  8587. function rng_seed_int(x) {
  8588. rng_pool[rng_pptr++] ^= x & 255;
  8589. rng_pool[rng_pptr++] ^= (x >> 8) & 255;
  8590. rng_pool[rng_pptr++] ^= (x >> 16) & 255;
  8591. rng_pool[rng_pptr++] ^= (x >> 24) & 255;
  8592. if(rng_pptr >= rng_psize) rng_pptr -= rng_psize;
  8593. }
  8594. // Mix in the current time (w/milliseconds) into the pool
  8595. function rng_seed_time() {
  8596. rng_seed_int(new Date().getTime());
  8597. }
  8598. // Initialize the pool with junk if needed.
  8599. if(rng_pool == null) {
  8600. rng_pool = new Array();
  8601. rng_pptr = 0;
  8602. var t;
  8603. if(typeof window !== "undefined" && window.crypto) {
  8604. if (window.crypto.getRandomValues) {
  8605. // Use webcrypto if available
  8606. var ua = new Uint8Array(32);
  8607. window.crypto.getRandomValues(ua);
  8608. for(t = 0; t < 32; ++t)
  8609. rng_pool[rng_pptr++] = ua[t];
  8610. }
  8611. else if(navigator.appName == "Netscape" && navigator.appVersion < "5") {
  8612. // Extract entropy (256 bits) from NS4 RNG if available
  8613. var z = window.crypto.random(32);
  8614. for(t = 0; t < z.length; ++t)
  8615. rng_pool[rng_pptr++] = z.charCodeAt(t) & 255;
  8616. }
  8617. }
  8618. while(rng_pptr < rng_psize) { // extract some randomness from Math.random()
  8619. t = Math.floor(65536 * Math.random());
  8620. rng_pool[rng_pptr++] = t >>> 8;
  8621. rng_pool[rng_pptr++] = t & 255;
  8622. }
  8623. rng_pptr = 0;
  8624. rng_seed_time();
  8625. //rng_seed_int(window.screenX);
  8626. //rng_seed_int(window.screenY);
  8627. }
  8628. function rng_get_byte() {
  8629. if(rng_state == null) {
  8630. rng_seed_time();
  8631. rng_state = prng_newstate();
  8632. rng_state.init(rng_pool);
  8633. for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr)
  8634. rng_pool[rng_pptr] = 0;
  8635. rng_pptr = 0;
  8636. //rng_pool = null;
  8637. }
  8638. // TODO: allow reseeding after first request
  8639. return rng_state.next();
  8640. }
  8641. function rng_get_bytes(ba) {
  8642. var i;
  8643. for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte();
  8644. }
  8645. function SecureRandom() {}
  8646. SecureRandom.prototype.nextBytes = rng_get_bytes;
  8647. // prng4.js - uses Arcfour as a PRNG
  8648. function Arcfour() {
  8649. this.i = 0;
  8650. this.j = 0;
  8651. this.S = new Array();
  8652. }
  8653. // Initialize arcfour context from key, an array of ints, each from [0..255]
  8654. function ARC4init(key) {
  8655. var i, j, t;
  8656. for(i = 0; i < 256; ++i)
  8657. this.S[i] = i;
  8658. j = 0;
  8659. for(i = 0; i < 256; ++i) {
  8660. j = (j + this.S[i] + key[i % key.length]) & 255;
  8661. t = this.S[i];
  8662. this.S[i] = this.S[j];
  8663. this.S[j] = t;
  8664. }
  8665. this.i = 0;
  8666. this.j = 0;
  8667. }
  8668. function ARC4next() {
  8669. var t;
  8670. this.i = (this.i + 1) & 255;
  8671. this.j = (this.j + this.S[this.i]) & 255;
  8672. t = this.S[this.i];
  8673. this.S[this.i] = this.S[this.j];
  8674. this.S[this.j] = t;
  8675. return this.S[(t + this.S[this.i]) & 255];
  8676. }
  8677. Arcfour.prototype.init = ARC4init;
  8678. Arcfour.prototype.next = ARC4next;
  8679. // Plug in your RNG constructor here
  8680. function prng_newstate() {
  8681. return new Arcfour();
  8682. }
  8683. // Pool size must be a multiple of 4 and greater than 32.
  8684. // An array of bytes the size of the pool will be passed to init()
  8685. var rng_psize = 256;
  8686. BigInteger.SecureRandom = SecureRandom;
  8687. BigInteger.BigInteger = BigInteger;
  8688. if (true) {
  8689. exports = module.exports = BigInteger;
  8690. } else {
  8691. this.BigInteger = BigInteger;
  8692. this.SecureRandom = SecureRandom;
  8693. }
  8694. }).call(this);
  8695. /***/ }),
  8696. /* 47 */
  8697. /***/ (function(module, exports, __webpack_require__) {
  8698. (function(nacl) {
  8699. 'use strict';
  8700. // Ported in 2014 by Dmitry Chestnykh and Devi Mandiri.
  8701. // Public domain.
  8702. //
  8703. // Implementation derived from TweetNaCl version 20140427.
  8704. // See for details: http://tweetnacl.cr.yp.to/
  8705. var gf = function(init) {
  8706. var i, r = new Float64Array(16);
  8707. if (init) for (i = 0; i < init.length; i++) r[i] = init[i];
  8708. return r;
  8709. };
  8710. // Pluggable, initialized in high-level API below.
  8711. var randombytes = function(/* x, n */) { throw new Error('no PRNG'); };
  8712. var _0 = new Uint8Array(16);
  8713. var _9 = new Uint8Array(32); _9[0] = 9;
  8714. var gf0 = gf(),
  8715. gf1 = gf([1]),
  8716. _121665 = gf([0xdb41, 1]),
  8717. D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]),
  8718. D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]),
  8719. X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]),
  8720. Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]),
  8721. I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]);
  8722. function ts64(x, i, h, l) {
  8723. x[i] = (h >> 24) & 0xff;
  8724. x[i+1] = (h >> 16) & 0xff;
  8725. x[i+2] = (h >> 8) & 0xff;
  8726. x[i+3] = h & 0xff;
  8727. x[i+4] = (l >> 24) & 0xff;
  8728. x[i+5] = (l >> 16) & 0xff;
  8729. x[i+6] = (l >> 8) & 0xff;
  8730. x[i+7] = l & 0xff;
  8731. }
  8732. function vn(x, xi, y, yi, n) {
  8733. var i,d = 0;
  8734. for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i];
  8735. return (1 & ((d - 1) >>> 8)) - 1;
  8736. }
  8737. function crypto_verify_16(x, xi, y, yi) {
  8738. return vn(x,xi,y,yi,16);
  8739. }
  8740. function crypto_verify_32(x, xi, y, yi) {
  8741. return vn(x,xi,y,yi,32);
  8742. }
  8743. function core_salsa20(o, p, k, c) {
  8744. var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24,
  8745. j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24,
  8746. j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24,
  8747. j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24,
  8748. j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24,
  8749. j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24,
  8750. j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24,
  8751. j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24,
  8752. j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24,
  8753. j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24,
  8754. j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24,
  8755. j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24,
  8756. j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24,
  8757. j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24,
  8758. j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24,
  8759. j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24;
  8760. var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7,
  8761. x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14,
  8762. x15 = j15, u;
  8763. for (var i = 0; i < 20; i += 2) {
  8764. u = x0 + x12 | 0;
  8765. x4 ^= u<<7 | u>>>(32-7);
  8766. u = x4 + x0 | 0;
  8767. x8 ^= u<<9 | u>>>(32-9);
  8768. u = x8 + x4 | 0;
  8769. x12 ^= u<<13 | u>>>(32-13);
  8770. u = x12 + x8 | 0;
  8771. x0 ^= u<<18 | u>>>(32-18);
  8772. u = x5 + x1 | 0;
  8773. x9 ^= u<<7 | u>>>(32-7);
  8774. u = x9 + x5 | 0;
  8775. x13 ^= u<<9 | u>>>(32-9);
  8776. u = x13 + x9 | 0;
  8777. x1 ^= u<<13 | u>>>(32-13);
  8778. u = x1 + x13 | 0;
  8779. x5 ^= u<<18 | u>>>(32-18);
  8780. u = x10 + x6 | 0;
  8781. x14 ^= u<<7 | u>>>(32-7);
  8782. u = x14 + x10 | 0;
  8783. x2 ^= u<<9 | u>>>(32-9);
  8784. u = x2 + x14 | 0;
  8785. x6 ^= u<<13 | u>>>(32-13);
  8786. u = x6 + x2 | 0;
  8787. x10 ^= u<<18 | u>>>(32-18);
  8788. u = x15 + x11 | 0;
  8789. x3 ^= u<<7 | u>>>(32-7);
  8790. u = x3 + x15 | 0;
  8791. x7 ^= u<<9 | u>>>(32-9);
  8792. u = x7 + x3 | 0;
  8793. x11 ^= u<<13 | u>>>(32-13);
  8794. u = x11 + x7 | 0;
  8795. x15 ^= u<<18 | u>>>(32-18);
  8796. u = x0 + x3 | 0;
  8797. x1 ^= u<<7 | u>>>(32-7);
  8798. u = x1 + x0 | 0;
  8799. x2 ^= u<<9 | u>>>(32-9);
  8800. u = x2 + x1 | 0;
  8801. x3 ^= u<<13 | u>>>(32-13);
  8802. u = x3 + x2 | 0;
  8803. x0 ^= u<<18 | u>>>(32-18);
  8804. u = x5 + x4 | 0;
  8805. x6 ^= u<<7 | u>>>(32-7);
  8806. u = x6 + x5 | 0;
  8807. x7 ^= u<<9 | u>>>(32-9);
  8808. u = x7 + x6 | 0;
  8809. x4 ^= u<<13 | u>>>(32-13);
  8810. u = x4 + x7 | 0;
  8811. x5 ^= u<<18 | u>>>(32-18);
  8812. u = x10 + x9 | 0;
  8813. x11 ^= u<<7 | u>>>(32-7);
  8814. u = x11 + x10 | 0;
  8815. x8 ^= u<<9 | u>>>(32-9);
  8816. u = x8 + x11 | 0;
  8817. x9 ^= u<<13 | u>>>(32-13);
  8818. u = x9 + x8 | 0;
  8819. x10 ^= u<<18 | u>>>(32-18);
  8820. u = x15 + x14 | 0;
  8821. x12 ^= u<<7 | u>>>(32-7);
  8822. u = x12 + x15 | 0;
  8823. x13 ^= u<<9 | u>>>(32-9);
  8824. u = x13 + x12 | 0;
  8825. x14 ^= u<<13 | u>>>(32-13);
  8826. u = x14 + x13 | 0;
  8827. x15 ^= u<<18 | u>>>(32-18);
  8828. }
  8829. x0 = x0 + j0 | 0;
  8830. x1 = x1 + j1 | 0;
  8831. x2 = x2 + j2 | 0;
  8832. x3 = x3 + j3 | 0;
  8833. x4 = x4 + j4 | 0;
  8834. x5 = x5 + j5 | 0;
  8835. x6 = x6 + j6 | 0;
  8836. x7 = x7 + j7 | 0;
  8837. x8 = x8 + j8 | 0;
  8838. x9 = x9 + j9 | 0;
  8839. x10 = x10 + j10 | 0;
  8840. x11 = x11 + j11 | 0;
  8841. x12 = x12 + j12 | 0;
  8842. x13 = x13 + j13 | 0;
  8843. x14 = x14 + j14 | 0;
  8844. x15 = x15 + j15 | 0;
  8845. o[ 0] = x0 >>> 0 & 0xff;
  8846. o[ 1] = x0 >>> 8 & 0xff;
  8847. o[ 2] = x0 >>> 16 & 0xff;
  8848. o[ 3] = x0 >>> 24 & 0xff;
  8849. o[ 4] = x1 >>> 0 & 0xff;
  8850. o[ 5] = x1 >>> 8 & 0xff;
  8851. o[ 6] = x1 >>> 16 & 0xff;
  8852. o[ 7] = x1 >>> 24 & 0xff;
  8853. o[ 8] = x2 >>> 0 & 0xff;
  8854. o[ 9] = x2 >>> 8 & 0xff;
  8855. o[10] = x2 >>> 16 & 0xff;
  8856. o[11] = x2 >>> 24 & 0xff;
  8857. o[12] = x3 >>> 0 & 0xff;
  8858. o[13] = x3 >>> 8 & 0xff;
  8859. o[14] = x3 >>> 16 & 0xff;
  8860. o[15] = x3 >>> 24 & 0xff;
  8861. o[16] = x4 >>> 0 & 0xff;
  8862. o[17] = x4 >>> 8 & 0xff;
  8863. o[18] = x4 >>> 16 & 0xff;
  8864. o[19] = x4 >>> 24 & 0xff;
  8865. o[20] = x5 >>> 0 & 0xff;
  8866. o[21] = x5 >>> 8 & 0xff;
  8867. o[22] = x5 >>> 16 & 0xff;
  8868. o[23] = x5 >>> 24 & 0xff;
  8869. o[24] = x6 >>> 0 & 0xff;
  8870. o[25] = x6 >>> 8 & 0xff;
  8871. o[26] = x6 >>> 16 & 0xff;
  8872. o[27] = x6 >>> 24 & 0xff;
  8873. o[28] = x7 >>> 0 & 0xff;
  8874. o[29] = x7 >>> 8 & 0xff;
  8875. o[30] = x7 >>> 16 & 0xff;
  8876. o[31] = x7 >>> 24 & 0xff;
  8877. o[32] = x8 >>> 0 & 0xff;
  8878. o[33] = x8 >>> 8 & 0xff;
  8879. o[34] = x8 >>> 16 & 0xff;
  8880. o[35] = x8 >>> 24 & 0xff;
  8881. o[36] = x9 >>> 0 & 0xff;
  8882. o[37] = x9 >>> 8 & 0xff;
  8883. o[38] = x9 >>> 16 & 0xff;
  8884. o[39] = x9 >>> 24 & 0xff;
  8885. o[40] = x10 >>> 0 & 0xff;
  8886. o[41] = x10 >>> 8 & 0xff;
  8887. o[42] = x10 >>> 16 & 0xff;
  8888. o[43] = x10 >>> 24 & 0xff;
  8889. o[44] = x11 >>> 0 & 0xff;
  8890. o[45] = x11 >>> 8 & 0xff;
  8891. o[46] = x11 >>> 16 & 0xff;
  8892. o[47] = x11 >>> 24 & 0xff;
  8893. o[48] = x12 >>> 0 & 0xff;
  8894. o[49] = x12 >>> 8 & 0xff;
  8895. o[50] = x12 >>> 16 & 0xff;
  8896. o[51] = x12 >>> 24 & 0xff;
  8897. o[52] = x13 >>> 0 & 0xff;
  8898. o[53] = x13 >>> 8 & 0xff;
  8899. o[54] = x13 >>> 16 & 0xff;
  8900. o[55] = x13 >>> 24 & 0xff;
  8901. o[56] = x14 >>> 0 & 0xff;
  8902. o[57] = x14 >>> 8 & 0xff;
  8903. o[58] = x14 >>> 16 & 0xff;
  8904. o[59] = x14 >>> 24 & 0xff;
  8905. o[60] = x15 >>> 0 & 0xff;
  8906. o[61] = x15 >>> 8 & 0xff;
  8907. o[62] = x15 >>> 16 & 0xff;
  8908. o[63] = x15 >>> 24 & 0xff;
  8909. }
  8910. function core_hsalsa20(o,p,k,c) {
  8911. var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24,
  8912. j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24,
  8913. j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24,
  8914. j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24,
  8915. j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24,
  8916. j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24,
  8917. j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24,
  8918. j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24,
  8919. j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24,
  8920. j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24,
  8921. j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24,
  8922. j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24,
  8923. j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24,
  8924. j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24,
  8925. j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24,
  8926. j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24;
  8927. var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7,
  8928. x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14,
  8929. x15 = j15, u;
  8930. for (var i = 0; i < 20; i += 2) {
  8931. u = x0 + x12 | 0;
  8932. x4 ^= u<<7 | u>>>(32-7);
  8933. u = x4 + x0 | 0;
  8934. x8 ^= u<<9 | u>>>(32-9);
  8935. u = x8 + x4 | 0;
  8936. x12 ^= u<<13 | u>>>(32-13);
  8937. u = x12 + x8 | 0;
  8938. x0 ^= u<<18 | u>>>(32-18);
  8939. u = x5 + x1 | 0;
  8940. x9 ^= u<<7 | u>>>(32-7);
  8941. u = x9 + x5 | 0;
  8942. x13 ^= u<<9 | u>>>(32-9);
  8943. u = x13 + x9 | 0;
  8944. x1 ^= u<<13 | u>>>(32-13);
  8945. u = x1 + x13 | 0;
  8946. x5 ^= u<<18 | u>>>(32-18);
  8947. u = x10 + x6 | 0;
  8948. x14 ^= u<<7 | u>>>(32-7);
  8949. u = x14 + x10 | 0;
  8950. x2 ^= u<<9 | u>>>(32-9);
  8951. u = x2 + x14 | 0;
  8952. x6 ^= u<<13 | u>>>(32-13);
  8953. u = x6 + x2 | 0;
  8954. x10 ^= u<<18 | u>>>(32-18);
  8955. u = x15 + x11 | 0;
  8956. x3 ^= u<<7 | u>>>(32-7);
  8957. u = x3 + x15 | 0;
  8958. x7 ^= u<<9 | u>>>(32-9);
  8959. u = x7 + x3 | 0;
  8960. x11 ^= u<<13 | u>>>(32-13);
  8961. u = x11 + x7 | 0;
  8962. x15 ^= u<<18 | u>>>(32-18);
  8963. u = x0 + x3 | 0;
  8964. x1 ^= u<<7 | u>>>(32-7);
  8965. u = x1 + x0 | 0;
  8966. x2 ^= u<<9 | u>>>(32-9);
  8967. u = x2 + x1 | 0;
  8968. x3 ^= u<<13 | u>>>(32-13);
  8969. u = x3 + x2 | 0;
  8970. x0 ^= u<<18 | u>>>(32-18);
  8971. u = x5 + x4 | 0;
  8972. x6 ^= u<<7 | u>>>(32-7);
  8973. u = x6 + x5 | 0;
  8974. x7 ^= u<<9 | u>>>(32-9);
  8975. u = x7 + x6 | 0;
  8976. x4 ^= u<<13 | u>>>(32-13);
  8977. u = x4 + x7 | 0;
  8978. x5 ^= u<<18 | u>>>(32-18);
  8979. u = x10 + x9 | 0;
  8980. x11 ^= u<<7 | u>>>(32-7);
  8981. u = x11 + x10 | 0;
  8982. x8 ^= u<<9 | u>>>(32-9);
  8983. u = x8 + x11 | 0;
  8984. x9 ^= u<<13 | u>>>(32-13);
  8985. u = x9 + x8 | 0;
  8986. x10 ^= u<<18 | u>>>(32-18);
  8987. u = x15 + x14 | 0;
  8988. x12 ^= u<<7 | u>>>(32-7);
  8989. u = x12 + x15 | 0;
  8990. x13 ^= u<<9 | u>>>(32-9);
  8991. u = x13 + x12 | 0;
  8992. x14 ^= u<<13 | u>>>(32-13);
  8993. u = x14 + x13 | 0;
  8994. x15 ^= u<<18 | u>>>(32-18);
  8995. }
  8996. o[ 0] = x0 >>> 0 & 0xff;
  8997. o[ 1] = x0 >>> 8 & 0xff;
  8998. o[ 2] = x0 >>> 16 & 0xff;
  8999. o[ 3] = x0 >>> 24 & 0xff;
  9000. o[ 4] = x5 >>> 0 & 0xff;
  9001. o[ 5] = x5 >>> 8 & 0xff;
  9002. o[ 6] = x5 >>> 16 & 0xff;
  9003. o[ 7] = x5 >>> 24 & 0xff;
  9004. o[ 8] = x10 >>> 0 & 0xff;
  9005. o[ 9] = x10 >>> 8 & 0xff;
  9006. o[10] = x10 >>> 16 & 0xff;
  9007. o[11] = x10 >>> 24 & 0xff;
  9008. o[12] = x15 >>> 0 & 0xff;
  9009. o[13] = x15 >>> 8 & 0xff;
  9010. o[14] = x15 >>> 16 & 0xff;
  9011. o[15] = x15 >>> 24 & 0xff;
  9012. o[16] = x6 >>> 0 & 0xff;
  9013. o[17] = x6 >>> 8 & 0xff;
  9014. o[18] = x6 >>> 16 & 0xff;
  9015. o[19] = x6 >>> 24 & 0xff;
  9016. o[20] = x7 >>> 0 & 0xff;
  9017. o[21] = x7 >>> 8 & 0xff;
  9018. o[22] = x7 >>> 16 & 0xff;
  9019. o[23] = x7 >>> 24 & 0xff;
  9020. o[24] = x8 >>> 0 & 0xff;
  9021. o[25] = x8 >>> 8 & 0xff;
  9022. o[26] = x8 >>> 16 & 0xff;
  9023. o[27] = x8 >>> 24 & 0xff;
  9024. o[28] = x9 >>> 0 & 0xff;
  9025. o[29] = x9 >>> 8 & 0xff;
  9026. o[30] = x9 >>> 16 & 0xff;
  9027. o[31] = x9 >>> 24 & 0xff;
  9028. }
  9029. function crypto_core_salsa20(out,inp,k,c) {
  9030. core_salsa20(out,inp,k,c);
  9031. }
  9032. function crypto_core_hsalsa20(out,inp,k,c) {
  9033. core_hsalsa20(out,inp,k,c);
  9034. }
  9035. var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]);
  9036. // "expand 32-byte k"
  9037. function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) {
  9038. var z = new Uint8Array(16), x = new Uint8Array(64);
  9039. var u, i;
  9040. for (i = 0; i < 16; i++) z[i] = 0;
  9041. for (i = 0; i < 8; i++) z[i] = n[i];
  9042. while (b >= 64) {
  9043. crypto_core_salsa20(x,z,k,sigma);
  9044. for (i = 0; i < 64; i++) c[cpos+i] = m[mpos+i] ^ x[i];
  9045. u = 1;
  9046. for (i = 8; i < 16; i++) {
  9047. u = u + (z[i] & 0xff) | 0;
  9048. z[i] = u & 0xff;
  9049. u >>>= 8;
  9050. }
  9051. b -= 64;
  9052. cpos += 64;
  9053. mpos += 64;
  9054. }
  9055. if (b > 0) {
  9056. crypto_core_salsa20(x,z,k,sigma);
  9057. for (i = 0; i < b; i++) c[cpos+i] = m[mpos+i] ^ x[i];
  9058. }
  9059. return 0;
  9060. }
  9061. function crypto_stream_salsa20(c,cpos,b,n,k) {
  9062. var z = new Uint8Array(16), x = new Uint8Array(64);
  9063. var u, i;
  9064. for (i = 0; i < 16; i++) z[i] = 0;
  9065. for (i = 0; i < 8; i++) z[i] = n[i];
  9066. while (b >= 64) {
  9067. crypto_core_salsa20(x,z,k,sigma);
  9068. for (i = 0; i < 64; i++) c[cpos+i] = x[i];
  9069. u = 1;
  9070. for (i = 8; i < 16; i++) {
  9071. u = u + (z[i] & 0xff) | 0;
  9072. z[i] = u & 0xff;
  9073. u >>>= 8;
  9074. }
  9075. b -= 64;
  9076. cpos += 64;
  9077. }
  9078. if (b > 0) {
  9079. crypto_core_salsa20(x,z,k,sigma);
  9080. for (i = 0; i < b; i++) c[cpos+i] = x[i];
  9081. }
  9082. return 0;
  9083. }
  9084. function crypto_stream(c,cpos,d,n,k) {
  9085. var s = new Uint8Array(32);
  9086. crypto_core_hsalsa20(s,n,k,sigma);
  9087. var sn = new Uint8Array(8);
  9088. for (var i = 0; i < 8; i++) sn[i] = n[i+16];
  9089. return crypto_stream_salsa20(c,cpos,d,sn,s);
  9090. }
  9091. function crypto_stream_xor(c,cpos,m,mpos,d,n,k) {
  9092. var s = new Uint8Array(32);
  9093. crypto_core_hsalsa20(s,n,k,sigma);
  9094. var sn = new Uint8Array(8);
  9095. for (var i = 0; i < 8; i++) sn[i] = n[i+16];
  9096. return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,sn,s);
  9097. }
  9098. /*
  9099. * Port of Andrew Moon's Poly1305-donna-16. Public domain.
  9100. * https://github.com/floodyberry/poly1305-donna
  9101. */
  9102. var poly1305 = function(key) {
  9103. this.buffer = new Uint8Array(16);
  9104. this.r = new Uint16Array(10);
  9105. this.h = new Uint16Array(10);
  9106. this.pad = new Uint16Array(8);
  9107. this.leftover = 0;
  9108. this.fin = 0;
  9109. var t0, t1, t2, t3, t4, t5, t6, t7;
  9110. t0 = key[ 0] & 0xff | (key[ 1] & 0xff) << 8; this.r[0] = ( t0 ) & 0x1fff;
  9111. t1 = key[ 2] & 0xff | (key[ 3] & 0xff) << 8; this.r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff;
  9112. t2 = key[ 4] & 0xff | (key[ 5] & 0xff) << 8; this.r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03;
  9113. t3 = key[ 6] & 0xff | (key[ 7] & 0xff) << 8; this.r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff;
  9114. t4 = key[ 8] & 0xff | (key[ 9] & 0xff) << 8; this.r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff;
  9115. this.r[5] = ((t4 >>> 1)) & 0x1ffe;
  9116. t5 = key[10] & 0xff | (key[11] & 0xff) << 8; this.r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff;
  9117. t6 = key[12] & 0xff | (key[13] & 0xff) << 8; this.r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81;
  9118. t7 = key[14] & 0xff | (key[15] & 0xff) << 8; this.r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff;
  9119. this.r[9] = ((t7 >>> 5)) & 0x007f;
  9120. this.pad[0] = key[16] & 0xff | (key[17] & 0xff) << 8;
  9121. this.pad[1] = key[18] & 0xff | (key[19] & 0xff) << 8;
  9122. this.pad[2] = key[20] & 0xff | (key[21] & 0xff) << 8;
  9123. this.pad[3] = key[22] & 0xff | (key[23] & 0xff) << 8;
  9124. this.pad[4] = key[24] & 0xff | (key[25] & 0xff) << 8;
  9125. this.pad[5] = key[26] & 0xff | (key[27] & 0xff) << 8;
  9126. this.pad[6] = key[28] & 0xff | (key[29] & 0xff) << 8;
  9127. this.pad[7] = key[30] & 0xff | (key[31] & 0xff) << 8;
  9128. };
  9129. poly1305.prototype.blocks = function(m, mpos, bytes) {
  9130. var hibit = this.fin ? 0 : (1 << 11);
  9131. var t0, t1, t2, t3, t4, t5, t6, t7, c;
  9132. var d0, d1, d2, d3, d4, d5, d6, d7, d8, d9;
  9133. var h0 = this.h[0],
  9134. h1 = this.h[1],
  9135. h2 = this.h[2],
  9136. h3 = this.h[3],
  9137. h4 = this.h[4],
  9138. h5 = this.h[5],
  9139. h6 = this.h[6],
  9140. h7 = this.h[7],
  9141. h8 = this.h[8],
  9142. h9 = this.h[9];
  9143. var r0 = this.r[0],
  9144. r1 = this.r[1],
  9145. r2 = this.r[2],
  9146. r3 = this.r[3],
  9147. r4 = this.r[4],
  9148. r5 = this.r[5],
  9149. r6 = this.r[6],
  9150. r7 = this.r[7],
  9151. r8 = this.r[8],
  9152. r9 = this.r[9];
  9153. while (bytes >= 16) {
  9154. t0 = m[mpos+ 0] & 0xff | (m[mpos+ 1] & 0xff) << 8; h0 += ( t0 ) & 0x1fff;
  9155. t1 = m[mpos+ 2] & 0xff | (m[mpos+ 3] & 0xff) << 8; h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff;
  9156. t2 = m[mpos+ 4] & 0xff | (m[mpos+ 5] & 0xff) << 8; h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff;
  9157. t3 = m[mpos+ 6] & 0xff | (m[mpos+ 7] & 0xff) << 8; h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff;
  9158. t4 = m[mpos+ 8] & 0xff | (m[mpos+ 9] & 0xff) << 8; h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff;
  9159. h5 += ((t4 >>> 1)) & 0x1fff;
  9160. t5 = m[mpos+10] & 0xff | (m[mpos+11] & 0xff) << 8; h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff;
  9161. t6 = m[mpos+12] & 0xff | (m[mpos+13] & 0xff) << 8; h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff;
  9162. t7 = m[mpos+14] & 0xff | (m[mpos+15] & 0xff) << 8; h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff;
  9163. h9 += ((t7 >>> 5)) | hibit;
  9164. c = 0;
  9165. d0 = c;
  9166. d0 += h0 * r0;
  9167. d0 += h1 * (5 * r9);
  9168. d0 += h2 * (5 * r8);
  9169. d0 += h3 * (5 * r7);
  9170. d0 += h4 * (5 * r6);
  9171. c = (d0 >>> 13); d0 &= 0x1fff;
  9172. d0 += h5 * (5 * r5);
  9173. d0 += h6 * (5 * r4);
  9174. d0 += h7 * (5 * r3);
  9175. d0 += h8 * (5 * r2);
  9176. d0 += h9 * (5 * r1);
  9177. c += (d0 >>> 13); d0 &= 0x1fff;
  9178. d1 = c;
  9179. d1 += h0 * r1;
  9180. d1 += h1 * r0;
  9181. d1 += h2 * (5 * r9);
  9182. d1 += h3 * (5 * r8);
  9183. d1 += h4 * (5 * r7);
  9184. c = (d1 >>> 13); d1 &= 0x1fff;
  9185. d1 += h5 * (5 * r6);
  9186. d1 += h6 * (5 * r5);
  9187. d1 += h7 * (5 * r4);
  9188. d1 += h8 * (5 * r3);
  9189. d1 += h9 * (5 * r2);
  9190. c += (d1 >>> 13); d1 &= 0x1fff;
  9191. d2 = c;
  9192. d2 += h0 * r2;
  9193. d2 += h1 * r1;
  9194. d2 += h2 * r0;
  9195. d2 += h3 * (5 * r9);
  9196. d2 += h4 * (5 * r8);
  9197. c = (d2 >>> 13); d2 &= 0x1fff;
  9198. d2 += h5 * (5 * r7);
  9199. d2 += h6 * (5 * r6);
  9200. d2 += h7 * (5 * r5);
  9201. d2 += h8 * (5 * r4);
  9202. d2 += h9 * (5 * r3);
  9203. c += (d2 >>> 13); d2 &= 0x1fff;
  9204. d3 = c;
  9205. d3 += h0 * r3;
  9206. d3 += h1 * r2;
  9207. d3 += h2 * r1;
  9208. d3 += h3 * r0;
  9209. d3 += h4 * (5 * r9);
  9210. c = (d3 >>> 13); d3 &= 0x1fff;
  9211. d3 += h5 * (5 * r8);
  9212. d3 += h6 * (5 * r7);
  9213. d3 += h7 * (5 * r6);
  9214. d3 += h8 * (5 * r5);
  9215. d3 += h9 * (5 * r4);
  9216. c += (d3 >>> 13); d3 &= 0x1fff;
  9217. d4 = c;
  9218. d4 += h0 * r4;
  9219. d4 += h1 * r3;
  9220. d4 += h2 * r2;
  9221. d4 += h3 * r1;
  9222. d4 += h4 * r0;
  9223. c = (d4 >>> 13); d4 &= 0x1fff;
  9224. d4 += h5 * (5 * r9);
  9225. d4 += h6 * (5 * r8);
  9226. d4 += h7 * (5 * r7);
  9227. d4 += h8 * (5 * r6);
  9228. d4 += h9 * (5 * r5);
  9229. c += (d4 >>> 13); d4 &= 0x1fff;
  9230. d5 = c;
  9231. d5 += h0 * r5;
  9232. d5 += h1 * r4;
  9233. d5 += h2 * r3;
  9234. d5 += h3 * r2;
  9235. d5 += h4 * r1;
  9236. c = (d5 >>> 13); d5 &= 0x1fff;
  9237. d5 += h5 * r0;
  9238. d5 += h6 * (5 * r9);
  9239. d5 += h7 * (5 * r8);
  9240. d5 += h8 * (5 * r7);
  9241. d5 += h9 * (5 * r6);
  9242. c += (d5 >>> 13); d5 &= 0x1fff;
  9243. d6 = c;
  9244. d6 += h0 * r6;
  9245. d6 += h1 * r5;
  9246. d6 += h2 * r4;
  9247. d6 += h3 * r3;
  9248. d6 += h4 * r2;
  9249. c = (d6 >>> 13); d6 &= 0x1fff;
  9250. d6 += h5 * r1;
  9251. d6 += h6 * r0;
  9252. d6 += h7 * (5 * r9);
  9253. d6 += h8 * (5 * r8);
  9254. d6 += h9 * (5 * r7);
  9255. c += (d6 >>> 13); d6 &= 0x1fff;
  9256. d7 = c;
  9257. d7 += h0 * r7;
  9258. d7 += h1 * r6;
  9259. d7 += h2 * r5;
  9260. d7 += h3 * r4;
  9261. d7 += h4 * r3;
  9262. c = (d7 >>> 13); d7 &= 0x1fff;
  9263. d7 += h5 * r2;
  9264. d7 += h6 * r1;
  9265. d7 += h7 * r0;
  9266. d7 += h8 * (5 * r9);
  9267. d7 += h9 * (5 * r8);
  9268. c += (d7 >>> 13); d7 &= 0x1fff;
  9269. d8 = c;
  9270. d8 += h0 * r8;
  9271. d8 += h1 * r7;
  9272. d8 += h2 * r6;
  9273. d8 += h3 * r5;
  9274. d8 += h4 * r4;
  9275. c = (d8 >>> 13); d8 &= 0x1fff;
  9276. d8 += h5 * r3;
  9277. d8 += h6 * r2;
  9278. d8 += h7 * r1;
  9279. d8 += h8 * r0;
  9280. d8 += h9 * (5 * r9);
  9281. c += (d8 >>> 13); d8 &= 0x1fff;
  9282. d9 = c;
  9283. d9 += h0 * r9;
  9284. d9 += h1 * r8;
  9285. d9 += h2 * r7;
  9286. d9 += h3 * r6;
  9287. d9 += h4 * r5;
  9288. c = (d9 >>> 13); d9 &= 0x1fff;
  9289. d9 += h5 * r4;
  9290. d9 += h6 * r3;
  9291. d9 += h7 * r2;
  9292. d9 += h8 * r1;
  9293. d9 += h9 * r0;
  9294. c += (d9 >>> 13); d9 &= 0x1fff;
  9295. c = (((c << 2) + c)) | 0;
  9296. c = (c + d0) | 0;
  9297. d0 = c & 0x1fff;
  9298. c = (c >>> 13);
  9299. d1 += c;
  9300. h0 = d0;
  9301. h1 = d1;
  9302. h2 = d2;
  9303. h3 = d3;
  9304. h4 = d4;
  9305. h5 = d5;
  9306. h6 = d6;
  9307. h7 = d7;
  9308. h8 = d8;
  9309. h9 = d9;
  9310. mpos += 16;
  9311. bytes -= 16;
  9312. }
  9313. this.h[0] = h0;
  9314. this.h[1] = h1;
  9315. this.h[2] = h2;
  9316. this.h[3] = h3;
  9317. this.h[4] = h4;
  9318. this.h[5] = h5;
  9319. this.h[6] = h6;
  9320. this.h[7] = h7;
  9321. this.h[8] = h8;
  9322. this.h[9] = h9;
  9323. };
  9324. poly1305.prototype.finish = function(mac, macpos) {
  9325. var g = new Uint16Array(10);
  9326. var c, mask, f, i;
  9327. if (this.leftover) {
  9328. i = this.leftover;
  9329. this.buffer[i++] = 1;
  9330. for (; i < 16; i++) this.buffer[i] = 0;
  9331. this.fin = 1;
  9332. this.blocks(this.buffer, 0, 16);
  9333. }
  9334. c = this.h[1] >>> 13;
  9335. this.h[1] &= 0x1fff;
  9336. for (i = 2; i < 10; i++) {
  9337. this.h[i] += c;
  9338. c = this.h[i] >>> 13;
  9339. this.h[i] &= 0x1fff;
  9340. }
  9341. this.h[0] += (c * 5);
  9342. c = this.h[0] >>> 13;
  9343. this.h[0] &= 0x1fff;
  9344. this.h[1] += c;
  9345. c = this.h[1] >>> 13;
  9346. this.h[1] &= 0x1fff;
  9347. this.h[2] += c;
  9348. g[0] = this.h[0] + 5;
  9349. c = g[0] >>> 13;
  9350. g[0] &= 0x1fff;
  9351. for (i = 1; i < 10; i++) {
  9352. g[i] = this.h[i] + c;
  9353. c = g[i] >>> 13;
  9354. g[i] &= 0x1fff;
  9355. }
  9356. g[9] -= (1 << 13);
  9357. mask = (c ^ 1) - 1;
  9358. for (i = 0; i < 10; i++) g[i] &= mask;
  9359. mask = ~mask;
  9360. for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i];
  9361. this.h[0] = ((this.h[0] ) | (this.h[1] << 13) ) & 0xffff;
  9362. this.h[1] = ((this.h[1] >>> 3) | (this.h[2] << 10) ) & 0xffff;
  9363. this.h[2] = ((this.h[2] >>> 6) | (this.h[3] << 7) ) & 0xffff;
  9364. this.h[3] = ((this.h[3] >>> 9) | (this.h[4] << 4) ) & 0xffff;
  9365. this.h[4] = ((this.h[4] >>> 12) | (this.h[5] << 1) | (this.h[6] << 14)) & 0xffff;
  9366. this.h[5] = ((this.h[6] >>> 2) | (this.h[7] << 11) ) & 0xffff;
  9367. this.h[6] = ((this.h[7] >>> 5) | (this.h[8] << 8) ) & 0xffff;
  9368. this.h[7] = ((this.h[8] >>> 8) | (this.h[9] << 5) ) & 0xffff;
  9369. f = this.h[0] + this.pad[0];
  9370. this.h[0] = f & 0xffff;
  9371. for (i = 1; i < 8; i++) {
  9372. f = (((this.h[i] + this.pad[i]) | 0) + (f >>> 16)) | 0;
  9373. this.h[i] = f & 0xffff;
  9374. }
  9375. mac[macpos+ 0] = (this.h[0] >>> 0) & 0xff;
  9376. mac[macpos+ 1] = (this.h[0] >>> 8) & 0xff;
  9377. mac[macpos+ 2] = (this.h[1] >>> 0) & 0xff;
  9378. mac[macpos+ 3] = (this.h[1] >>> 8) & 0xff;
  9379. mac[macpos+ 4] = (this.h[2] >>> 0) & 0xff;
  9380. mac[macpos+ 5] = (this.h[2] >>> 8) & 0xff;
  9381. mac[macpos+ 6] = (this.h[3] >>> 0) & 0xff;
  9382. mac[macpos+ 7] = (this.h[3] >>> 8) & 0xff;
  9383. mac[macpos+ 8] = (this.h[4] >>> 0) & 0xff;
  9384. mac[macpos+ 9] = (this.h[4] >>> 8) & 0xff;
  9385. mac[macpos+10] = (this.h[5] >>> 0) & 0xff;
  9386. mac[macpos+11] = (this.h[5] >>> 8) & 0xff;
  9387. mac[macpos+12] = (this.h[6] >>> 0) & 0xff;
  9388. mac[macpos+13] = (this.h[6] >>> 8) & 0xff;
  9389. mac[macpos+14] = (this.h[7] >>> 0) & 0xff;
  9390. mac[macpos+15] = (this.h[7] >>> 8) & 0xff;
  9391. };
  9392. poly1305.prototype.update = function(m, mpos, bytes) {
  9393. var i, want;
  9394. if (this.leftover) {
  9395. want = (16 - this.leftover);
  9396. if (want > bytes)
  9397. want = bytes;
  9398. for (i = 0; i < want; i++)
  9399. this.buffer[this.leftover + i] = m[mpos+i];
  9400. bytes -= want;
  9401. mpos += want;
  9402. this.leftover += want;
  9403. if (this.leftover < 16)
  9404. return;
  9405. this.blocks(this.buffer, 0, 16);
  9406. this.leftover = 0;
  9407. }
  9408. if (bytes >= 16) {
  9409. want = bytes - (bytes % 16);
  9410. this.blocks(m, mpos, want);
  9411. mpos += want;
  9412. bytes -= want;
  9413. }
  9414. if (bytes) {
  9415. for (i = 0; i < bytes; i++)
  9416. this.buffer[this.leftover + i] = m[mpos+i];
  9417. this.leftover += bytes;
  9418. }
  9419. };
  9420. function crypto_onetimeauth(out, outpos, m, mpos, n, k) {
  9421. var s = new poly1305(k);
  9422. s.update(m, mpos, n);
  9423. s.finish(out, outpos);
  9424. return 0;
  9425. }
  9426. function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) {
  9427. var x = new Uint8Array(16);
  9428. crypto_onetimeauth(x,0,m,mpos,n,k);
  9429. return crypto_verify_16(h,hpos,x,0);
  9430. }
  9431. function crypto_secretbox(c,m,d,n,k) {
  9432. var i;
  9433. if (d < 32) return -1;
  9434. crypto_stream_xor(c,0,m,0,d,n,k);
  9435. crypto_onetimeauth(c, 16, c, 32, d - 32, c);
  9436. for (i = 0; i < 16; i++) c[i] = 0;
  9437. return 0;
  9438. }
  9439. function crypto_secretbox_open(m,c,d,n,k) {
  9440. var i;
  9441. var x = new Uint8Array(32);
  9442. if (d < 32) return -1;
  9443. crypto_stream(x,0,32,n,k);
  9444. if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1;
  9445. crypto_stream_xor(m,0,c,0,d,n,k);
  9446. for (i = 0; i < 32; i++) m[i] = 0;
  9447. return 0;
  9448. }
  9449. function set25519(r, a) {
  9450. var i;
  9451. for (i = 0; i < 16; i++) r[i] = a[i]|0;
  9452. }
  9453. function car25519(o) {
  9454. var i, v, c = 1;
  9455. for (i = 0; i < 16; i++) {
  9456. v = o[i] + c + 65535;
  9457. c = Math.floor(v / 65536);
  9458. o[i] = v - c * 65536;
  9459. }
  9460. o[0] += c-1 + 37 * (c-1);
  9461. }
  9462. function sel25519(p, q, b) {
  9463. var t, c = ~(b-1);
  9464. for (var i = 0; i < 16; i++) {
  9465. t = c & (p[i] ^ q[i]);
  9466. p[i] ^= t;
  9467. q[i] ^= t;
  9468. }
  9469. }
  9470. function pack25519(o, n) {
  9471. var i, j, b;
  9472. var m = gf(), t = gf();
  9473. for (i = 0; i < 16; i++) t[i] = n[i];
  9474. car25519(t);
  9475. car25519(t);
  9476. car25519(t);
  9477. for (j = 0; j < 2; j++) {
  9478. m[0] = t[0] - 0xffed;
  9479. for (i = 1; i < 15; i++) {
  9480. m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1);
  9481. m[i-1] &= 0xffff;
  9482. }
  9483. m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1);
  9484. b = (m[15]>>16) & 1;
  9485. m[14] &= 0xffff;
  9486. sel25519(t, m, 1-b);
  9487. }
  9488. for (i = 0; i < 16; i++) {
  9489. o[2*i] = t[i] & 0xff;
  9490. o[2*i+1] = t[i]>>8;
  9491. }
  9492. }
  9493. function neq25519(a, b) {
  9494. var c = new Uint8Array(32), d = new Uint8Array(32);
  9495. pack25519(c, a);
  9496. pack25519(d, b);
  9497. return crypto_verify_32(c, 0, d, 0);
  9498. }
  9499. function par25519(a) {
  9500. var d = new Uint8Array(32);
  9501. pack25519(d, a);
  9502. return d[0] & 1;
  9503. }
  9504. function unpack25519(o, n) {
  9505. var i;
  9506. for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8);
  9507. o[15] &= 0x7fff;
  9508. }
  9509. function A(o, a, b) {
  9510. for (var i = 0; i < 16; i++) o[i] = a[i] + b[i];
  9511. }
  9512. function Z(o, a, b) {
  9513. for (var i = 0; i < 16; i++) o[i] = a[i] - b[i];
  9514. }
  9515. function M(o, a, b) {
  9516. var v, c,
  9517. t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0,
  9518. t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0,
  9519. t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0,
  9520. t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0,
  9521. b0 = b[0],
  9522. b1 = b[1],
  9523. b2 = b[2],
  9524. b3 = b[3],
  9525. b4 = b[4],
  9526. b5 = b[5],
  9527. b6 = b[6],
  9528. b7 = b[7],
  9529. b8 = b[8],
  9530. b9 = b[9],
  9531. b10 = b[10],
  9532. b11 = b[11],
  9533. b12 = b[12],
  9534. b13 = b[13],
  9535. b14 = b[14],
  9536. b15 = b[15];
  9537. v = a[0];
  9538. t0 += v * b0;
  9539. t1 += v * b1;
  9540. t2 += v * b2;
  9541. t3 += v * b3;
  9542. t4 += v * b4;
  9543. t5 += v * b5;
  9544. t6 += v * b6;
  9545. t7 += v * b7;
  9546. t8 += v * b8;
  9547. t9 += v * b9;
  9548. t10 += v * b10;
  9549. t11 += v * b11;
  9550. t12 += v * b12;
  9551. t13 += v * b13;
  9552. t14 += v * b14;
  9553. t15 += v * b15;
  9554. v = a[1];
  9555. t1 += v * b0;
  9556. t2 += v * b1;
  9557. t3 += v * b2;
  9558. t4 += v * b3;
  9559. t5 += v * b4;
  9560. t6 += v * b5;
  9561. t7 += v * b6;
  9562. t8 += v * b7;
  9563. t9 += v * b8;
  9564. t10 += v * b9;
  9565. t11 += v * b10;
  9566. t12 += v * b11;
  9567. t13 += v * b12;
  9568. t14 += v * b13;
  9569. t15 += v * b14;
  9570. t16 += v * b15;
  9571. v = a[2];
  9572. t2 += v * b0;
  9573. t3 += v * b1;
  9574. t4 += v * b2;
  9575. t5 += v * b3;
  9576. t6 += v * b4;
  9577. t7 += v * b5;
  9578. t8 += v * b6;
  9579. t9 += v * b7;
  9580. t10 += v * b8;
  9581. t11 += v * b9;
  9582. t12 += v * b10;
  9583. t13 += v * b11;
  9584. t14 += v * b12;
  9585. t15 += v * b13;
  9586. t16 += v * b14;
  9587. t17 += v * b15;
  9588. v = a[3];
  9589. t3 += v * b0;
  9590. t4 += v * b1;
  9591. t5 += v * b2;
  9592. t6 += v * b3;
  9593. t7 += v * b4;
  9594. t8 += v * b5;
  9595. t9 += v * b6;
  9596. t10 += v * b7;
  9597. t11 += v * b8;
  9598. t12 += v * b9;
  9599. t13 += v * b10;
  9600. t14 += v * b11;
  9601. t15 += v * b12;
  9602. t16 += v * b13;
  9603. t17 += v * b14;
  9604. t18 += v * b15;
  9605. v = a[4];
  9606. t4 += v * b0;
  9607. t5 += v * b1;
  9608. t6 += v * b2;
  9609. t7 += v * b3;
  9610. t8 += v * b4;
  9611. t9 += v * b5;
  9612. t10 += v * b6;
  9613. t11 += v * b7;
  9614. t12 += v * b8;
  9615. t13 += v * b9;
  9616. t14 += v * b10;
  9617. t15 += v * b11;
  9618. t16 += v * b12;
  9619. t17 += v * b13;
  9620. t18 += v * b14;
  9621. t19 += v * b15;
  9622. v = a[5];
  9623. t5 += v * b0;
  9624. t6 += v * b1;
  9625. t7 += v * b2;
  9626. t8 += v * b3;
  9627. t9 += v * b4;
  9628. t10 += v * b5;
  9629. t11 += v * b6;
  9630. t12 += v * b7;
  9631. t13 += v * b8;
  9632. t14 += v * b9;
  9633. t15 += v * b10;
  9634. t16 += v * b11;
  9635. t17 += v * b12;
  9636. t18 += v * b13;
  9637. t19 += v * b14;
  9638. t20 += v * b15;
  9639. v = a[6];
  9640. t6 += v * b0;
  9641. t7 += v * b1;
  9642. t8 += v * b2;
  9643. t9 += v * b3;
  9644. t10 += v * b4;
  9645. t11 += v * b5;
  9646. t12 += v * b6;
  9647. t13 += v * b7;
  9648. t14 += v * b8;
  9649. t15 += v * b9;
  9650. t16 += v * b10;
  9651. t17 += v * b11;
  9652. t18 += v * b12;
  9653. t19 += v * b13;
  9654. t20 += v * b14;
  9655. t21 += v * b15;
  9656. v = a[7];
  9657. t7 += v * b0;
  9658. t8 += v * b1;
  9659. t9 += v * b2;
  9660. t10 += v * b3;
  9661. t11 += v * b4;
  9662. t12 += v * b5;
  9663. t13 += v * b6;
  9664. t14 += v * b7;
  9665. t15 += v * b8;
  9666. t16 += v * b9;
  9667. t17 += v * b10;
  9668. t18 += v * b11;
  9669. t19 += v * b12;
  9670. t20 += v * b13;
  9671. t21 += v * b14;
  9672. t22 += v * b15;
  9673. v = a[8];
  9674. t8 += v * b0;
  9675. t9 += v * b1;
  9676. t10 += v * b2;
  9677. t11 += v * b3;
  9678. t12 += v * b4;
  9679. t13 += v * b5;
  9680. t14 += v * b6;
  9681. t15 += v * b7;
  9682. t16 += v * b8;
  9683. t17 += v * b9;
  9684. t18 += v * b10;
  9685. t19 += v * b11;
  9686. t20 += v * b12;
  9687. t21 += v * b13;
  9688. t22 += v * b14;
  9689. t23 += v * b15;
  9690. v = a[9];
  9691. t9 += v * b0;
  9692. t10 += v * b1;
  9693. t11 += v * b2;
  9694. t12 += v * b3;
  9695. t13 += v * b4;
  9696. t14 += v * b5;
  9697. t15 += v * b6;
  9698. t16 += v * b7;
  9699. t17 += v * b8;
  9700. t18 += v * b9;
  9701. t19 += v * b10;
  9702. t20 += v * b11;
  9703. t21 += v * b12;
  9704. t22 += v * b13;
  9705. t23 += v * b14;
  9706. t24 += v * b15;
  9707. v = a[10];
  9708. t10 += v * b0;
  9709. t11 += v * b1;
  9710. t12 += v * b2;
  9711. t13 += v * b3;
  9712. t14 += v * b4;
  9713. t15 += v * b5;
  9714. t16 += v * b6;
  9715. t17 += v * b7;
  9716. t18 += v * b8;
  9717. t19 += v * b9;
  9718. t20 += v * b10;
  9719. t21 += v * b11;
  9720. t22 += v * b12;
  9721. t23 += v * b13;
  9722. t24 += v * b14;
  9723. t25 += v * b15;
  9724. v = a[11];
  9725. t11 += v * b0;
  9726. t12 += v * b1;
  9727. t13 += v * b2;
  9728. t14 += v * b3;
  9729. t15 += v * b4;
  9730. t16 += v * b5;
  9731. t17 += v * b6;
  9732. t18 += v * b7;
  9733. t19 += v * b8;
  9734. t20 += v * b9;
  9735. t21 += v * b10;
  9736. t22 += v * b11;
  9737. t23 += v * b12;
  9738. t24 += v * b13;
  9739. t25 += v * b14;
  9740. t26 += v * b15;
  9741. v = a[12];
  9742. t12 += v * b0;
  9743. t13 += v * b1;
  9744. t14 += v * b2;
  9745. t15 += v * b3;
  9746. t16 += v * b4;
  9747. t17 += v * b5;
  9748. t18 += v * b6;
  9749. t19 += v * b7;
  9750. t20 += v * b8;
  9751. t21 += v * b9;
  9752. t22 += v * b10;
  9753. t23 += v * b11;
  9754. t24 += v * b12;
  9755. t25 += v * b13;
  9756. t26 += v * b14;
  9757. t27 += v * b15;
  9758. v = a[13];
  9759. t13 += v * b0;
  9760. t14 += v * b1;
  9761. t15 += v * b2;
  9762. t16 += v * b3;
  9763. t17 += v * b4;
  9764. t18 += v * b5;
  9765. t19 += v * b6;
  9766. t20 += v * b7;
  9767. t21 += v * b8;
  9768. t22 += v * b9;
  9769. t23 += v * b10;
  9770. t24 += v * b11;
  9771. t25 += v * b12;
  9772. t26 += v * b13;
  9773. t27 += v * b14;
  9774. t28 += v * b15;
  9775. v = a[14];
  9776. t14 += v * b0;
  9777. t15 += v * b1;
  9778. t16 += v * b2;
  9779. t17 += v * b3;
  9780. t18 += v * b4;
  9781. t19 += v * b5;
  9782. t20 += v * b6;
  9783. t21 += v * b7;
  9784. t22 += v * b8;
  9785. t23 += v * b9;
  9786. t24 += v * b10;
  9787. t25 += v * b11;
  9788. t26 += v * b12;
  9789. t27 += v * b13;
  9790. t28 += v * b14;
  9791. t29 += v * b15;
  9792. v = a[15];
  9793. t15 += v * b0;
  9794. t16 += v * b1;
  9795. t17 += v * b2;
  9796. t18 += v * b3;
  9797. t19 += v * b4;
  9798. t20 += v * b5;
  9799. t21 += v * b6;
  9800. t22 += v * b7;
  9801. t23 += v * b8;
  9802. t24 += v * b9;
  9803. t25 += v * b10;
  9804. t26 += v * b11;
  9805. t27 += v * b12;
  9806. t28 += v * b13;
  9807. t29 += v * b14;
  9808. t30 += v * b15;
  9809. t0 += 38 * t16;
  9810. t1 += 38 * t17;
  9811. t2 += 38 * t18;
  9812. t3 += 38 * t19;
  9813. t4 += 38 * t20;
  9814. t5 += 38 * t21;
  9815. t6 += 38 * t22;
  9816. t7 += 38 * t23;
  9817. t8 += 38 * t24;
  9818. t9 += 38 * t25;
  9819. t10 += 38 * t26;
  9820. t11 += 38 * t27;
  9821. t12 += 38 * t28;
  9822. t13 += 38 * t29;
  9823. t14 += 38 * t30;
  9824. // t15 left as is
  9825. // first car
  9826. c = 1;
  9827. v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536;
  9828. v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536;
  9829. v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536;
  9830. v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536;
  9831. v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536;
  9832. v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536;
  9833. v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536;
  9834. v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536;
  9835. v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536;
  9836. v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536;
  9837. v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536;
  9838. v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536;
  9839. v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536;
  9840. v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536;
  9841. v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536;
  9842. v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536;
  9843. t0 += c-1 + 37 * (c-1);
  9844. // second car
  9845. c = 1;
  9846. v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536;
  9847. v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536;
  9848. v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536;
  9849. v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536;
  9850. v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536;
  9851. v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536;
  9852. v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536;
  9853. v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536;
  9854. v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536;
  9855. v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536;
  9856. v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536;
  9857. v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536;
  9858. v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536;
  9859. v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536;
  9860. v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536;
  9861. v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536;
  9862. t0 += c-1 + 37 * (c-1);
  9863. o[ 0] = t0;
  9864. o[ 1] = t1;
  9865. o[ 2] = t2;
  9866. o[ 3] = t3;
  9867. o[ 4] = t4;
  9868. o[ 5] = t5;
  9869. o[ 6] = t6;
  9870. o[ 7] = t7;
  9871. o[ 8] = t8;
  9872. o[ 9] = t9;
  9873. o[10] = t10;
  9874. o[11] = t11;
  9875. o[12] = t12;
  9876. o[13] = t13;
  9877. o[14] = t14;
  9878. o[15] = t15;
  9879. }
  9880. function S(o, a) {
  9881. M(o, a, a);
  9882. }
  9883. function inv25519(o, i) {
  9884. var c = gf();
  9885. var a;
  9886. for (a = 0; a < 16; a++) c[a] = i[a];
  9887. for (a = 253; a >= 0; a--) {
  9888. S(c, c);
  9889. if(a !== 2 && a !== 4) M(c, c, i);
  9890. }
  9891. for (a = 0; a < 16; a++) o[a] = c[a];
  9892. }
  9893. function pow2523(o, i) {
  9894. var c = gf();
  9895. var a;
  9896. for (a = 0; a < 16; a++) c[a] = i[a];
  9897. for (a = 250; a >= 0; a--) {
  9898. S(c, c);
  9899. if(a !== 1) M(c, c, i);
  9900. }
  9901. for (a = 0; a < 16; a++) o[a] = c[a];
  9902. }
  9903. function crypto_scalarmult(q, n, p) {
  9904. var z = new Uint8Array(32);
  9905. var x = new Float64Array(80), r, i;
  9906. var a = gf(), b = gf(), c = gf(),
  9907. d = gf(), e = gf(), f = gf();
  9908. for (i = 0; i < 31; i++) z[i] = n[i];
  9909. z[31]=(n[31]&127)|64;
  9910. z[0]&=248;
  9911. unpack25519(x,p);
  9912. for (i = 0; i < 16; i++) {
  9913. b[i]=x[i];
  9914. d[i]=a[i]=c[i]=0;
  9915. }
  9916. a[0]=d[0]=1;
  9917. for (i=254; i>=0; --i) {
  9918. r=(z[i>>>3]>>>(i&7))&1;
  9919. sel25519(a,b,r);
  9920. sel25519(c,d,r);
  9921. A(e,a,c);
  9922. Z(a,a,c);
  9923. A(c,b,d);
  9924. Z(b,b,d);
  9925. S(d,e);
  9926. S(f,a);
  9927. M(a,c,a);
  9928. M(c,b,e);
  9929. A(e,a,c);
  9930. Z(a,a,c);
  9931. S(b,a);
  9932. Z(c,d,f);
  9933. M(a,c,_121665);
  9934. A(a,a,d);
  9935. M(c,c,a);
  9936. M(a,d,f);
  9937. M(d,b,x);
  9938. S(b,e);
  9939. sel25519(a,b,r);
  9940. sel25519(c,d,r);
  9941. }
  9942. for (i = 0; i < 16; i++) {
  9943. x[i+16]=a[i];
  9944. x[i+32]=c[i];
  9945. x[i+48]=b[i];
  9946. x[i+64]=d[i];
  9947. }
  9948. var x32 = x.subarray(32);
  9949. var x16 = x.subarray(16);
  9950. inv25519(x32,x32);
  9951. M(x16,x16,x32);
  9952. pack25519(q,x16);
  9953. return 0;
  9954. }
  9955. function crypto_scalarmult_base(q, n) {
  9956. return crypto_scalarmult(q, n, _9);
  9957. }
  9958. function crypto_box_keypair(y, x) {
  9959. randombytes(x, 32);
  9960. return crypto_scalarmult_base(y, x);
  9961. }
  9962. function crypto_box_beforenm(k, y, x) {
  9963. var s = new Uint8Array(32);
  9964. crypto_scalarmult(s, x, y);
  9965. return crypto_core_hsalsa20(k, _0, s, sigma);
  9966. }
  9967. var crypto_box_afternm = crypto_secretbox;
  9968. var crypto_box_open_afternm = crypto_secretbox_open;
  9969. function crypto_box(c, m, d, n, y, x) {
  9970. var k = new Uint8Array(32);
  9971. crypto_box_beforenm(k, y, x);
  9972. return crypto_box_afternm(c, m, d, n, k);
  9973. }
  9974. function crypto_box_open(m, c, d, n, y, x) {
  9975. var k = new Uint8Array(32);
  9976. crypto_box_beforenm(k, y, x);
  9977. return crypto_box_open_afternm(m, c, d, n, k);
  9978. }
  9979. var K = [
  9980. 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,
  9981. 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,
  9982. 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,
  9983. 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,
  9984. 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,
  9985. 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,
  9986. 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,
  9987. 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,
  9988. 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,
  9989. 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,
  9990. 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,
  9991. 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,
  9992. 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,
  9993. 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,
  9994. 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,
  9995. 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,
  9996. 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,
  9997. 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,
  9998. 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,
  9999. 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,
  10000. 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,
  10001. 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,
  10002. 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,
  10003. 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,
  10004. 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,
  10005. 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,
  10006. 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,
  10007. 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,
  10008. 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,
  10009. 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,
  10010. 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,
  10011. 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,
  10012. 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,
  10013. 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,
  10014. 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,
  10015. 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,
  10016. 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,
  10017. 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,
  10018. 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,
  10019. 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817
  10020. ];
  10021. function crypto_hashblocks_hl(hh, hl, m, n) {
  10022. var wh = new Int32Array(16), wl = new Int32Array(16),
  10023. bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7,
  10024. bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7,
  10025. th, tl, i, j, h, l, a, b, c, d;
  10026. var ah0 = hh[0],
  10027. ah1 = hh[1],
  10028. ah2 = hh[2],
  10029. ah3 = hh[3],
  10030. ah4 = hh[4],
  10031. ah5 = hh[5],
  10032. ah6 = hh[6],
  10033. ah7 = hh[7],
  10034. al0 = hl[0],
  10035. al1 = hl[1],
  10036. al2 = hl[2],
  10037. al3 = hl[3],
  10038. al4 = hl[4],
  10039. al5 = hl[5],
  10040. al6 = hl[6],
  10041. al7 = hl[7];
  10042. var pos = 0;
  10043. while (n >= 128) {
  10044. for (i = 0; i < 16; i++) {
  10045. j = 8 * i + pos;
  10046. wh[i] = (m[j+0] << 24) | (m[j+1] << 16) | (m[j+2] << 8) | m[j+3];
  10047. wl[i] = (m[j+4] << 24) | (m[j+5] << 16) | (m[j+6] << 8) | m[j+7];
  10048. }
  10049. for (i = 0; i < 80; i++) {
  10050. bh0 = ah0;
  10051. bh1 = ah1;
  10052. bh2 = ah2;
  10053. bh3 = ah3;
  10054. bh4 = ah4;
  10055. bh5 = ah5;
  10056. bh6 = ah6;
  10057. bh7 = ah7;
  10058. bl0 = al0;
  10059. bl1 = al1;
  10060. bl2 = al2;
  10061. bl3 = al3;
  10062. bl4 = al4;
  10063. bl5 = al5;
  10064. bl6 = al6;
  10065. bl7 = al7;
  10066. // add
  10067. h = ah7;
  10068. l = al7;
  10069. a = l & 0xffff; b = l >>> 16;
  10070. c = h & 0xffff; d = h >>> 16;
  10071. // Sigma1
  10072. h = ((ah4 >>> 14) | (al4 << (32-14))) ^ ((ah4 >>> 18) | (al4 << (32-18))) ^ ((al4 >>> (41-32)) | (ah4 << (32-(41-32))));
  10073. l = ((al4 >>> 14) | (ah4 << (32-14))) ^ ((al4 >>> 18) | (ah4 << (32-18))) ^ ((ah4 >>> (41-32)) | (al4 << (32-(41-32))));
  10074. a += l & 0xffff; b += l >>> 16;
  10075. c += h & 0xffff; d += h >>> 16;
  10076. // Ch
  10077. h = (ah4 & ah5) ^ (~ah4 & ah6);
  10078. l = (al4 & al5) ^ (~al4 & al6);
  10079. a += l & 0xffff; b += l >>> 16;
  10080. c += h & 0xffff; d += h >>> 16;
  10081. // K
  10082. h = K[i*2];
  10083. l = K[i*2+1];
  10084. a += l & 0xffff; b += l >>> 16;
  10085. c += h & 0xffff; d += h >>> 16;
  10086. // w
  10087. h = wh[i%16];
  10088. l = wl[i%16];
  10089. a += l & 0xffff; b += l >>> 16;
  10090. c += h & 0xffff; d += h >>> 16;
  10091. b += a >>> 16;
  10092. c += b >>> 16;
  10093. d += c >>> 16;
  10094. th = c & 0xffff | d << 16;
  10095. tl = a & 0xffff | b << 16;
  10096. // add
  10097. h = th;
  10098. l = tl;
  10099. a = l & 0xffff; b = l >>> 16;
  10100. c = h & 0xffff; d = h >>> 16;
  10101. // Sigma0
  10102. h = ((ah0 >>> 28) | (al0 << (32-28))) ^ ((al0 >>> (34-32)) | (ah0 << (32-(34-32)))) ^ ((al0 >>> (39-32)) | (ah0 << (32-(39-32))));
  10103. l = ((al0 >>> 28) | (ah0 << (32-28))) ^ ((ah0 >>> (34-32)) | (al0 << (32-(34-32)))) ^ ((ah0 >>> (39-32)) | (al0 << (32-(39-32))));
  10104. a += l & 0xffff; b += l >>> 16;
  10105. c += h & 0xffff; d += h >>> 16;
  10106. // Maj
  10107. h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2);
  10108. l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2);
  10109. a += l & 0xffff; b += l >>> 16;
  10110. c += h & 0xffff; d += h >>> 16;
  10111. b += a >>> 16;
  10112. c += b >>> 16;
  10113. d += c >>> 16;
  10114. bh7 = (c & 0xffff) | (d << 16);
  10115. bl7 = (a & 0xffff) | (b << 16);
  10116. // add
  10117. h = bh3;
  10118. l = bl3;
  10119. a = l & 0xffff; b = l >>> 16;
  10120. c = h & 0xffff; d = h >>> 16;
  10121. h = th;
  10122. l = tl;
  10123. a += l & 0xffff; b += l >>> 16;
  10124. c += h & 0xffff; d += h >>> 16;
  10125. b += a >>> 16;
  10126. c += b >>> 16;
  10127. d += c >>> 16;
  10128. bh3 = (c & 0xffff) | (d << 16);
  10129. bl3 = (a & 0xffff) | (b << 16);
  10130. ah1 = bh0;
  10131. ah2 = bh1;
  10132. ah3 = bh2;
  10133. ah4 = bh3;
  10134. ah5 = bh4;
  10135. ah6 = bh5;
  10136. ah7 = bh6;
  10137. ah0 = bh7;
  10138. al1 = bl0;
  10139. al2 = bl1;
  10140. al3 = bl2;
  10141. al4 = bl3;
  10142. al5 = bl4;
  10143. al6 = bl5;
  10144. al7 = bl6;
  10145. al0 = bl7;
  10146. if (i%16 === 15) {
  10147. for (j = 0; j < 16; j++) {
  10148. // add
  10149. h = wh[j];
  10150. l = wl[j];
  10151. a = l & 0xffff; b = l >>> 16;
  10152. c = h & 0xffff; d = h >>> 16;
  10153. h = wh[(j+9)%16];
  10154. l = wl[(j+9)%16];
  10155. a += l & 0xffff; b += l >>> 16;
  10156. c += h & 0xffff; d += h >>> 16;
  10157. // sigma0
  10158. th = wh[(j+1)%16];
  10159. tl = wl[(j+1)%16];
  10160. h = ((th >>> 1) | (tl << (32-1))) ^ ((th >>> 8) | (tl << (32-8))) ^ (th >>> 7);
  10161. l = ((tl >>> 1) | (th << (32-1))) ^ ((tl >>> 8) | (th << (32-8))) ^ ((tl >>> 7) | (th << (32-7)));
  10162. a += l & 0xffff; b += l >>> 16;
  10163. c += h & 0xffff; d += h >>> 16;
  10164. // sigma1
  10165. th = wh[(j+14)%16];
  10166. tl = wl[(j+14)%16];
  10167. h = ((th >>> 19) | (tl << (32-19))) ^ ((tl >>> (61-32)) | (th << (32-(61-32)))) ^ (th >>> 6);
  10168. l = ((tl >>> 19) | (th << (32-19))) ^ ((th >>> (61-32)) | (tl << (32-(61-32)))) ^ ((tl >>> 6) | (th << (32-6)));
  10169. a += l & 0xffff; b += l >>> 16;
  10170. c += h & 0xffff; d += h >>> 16;
  10171. b += a >>> 16;
  10172. c += b >>> 16;
  10173. d += c >>> 16;
  10174. wh[j] = (c & 0xffff) | (d << 16);
  10175. wl[j] = (a & 0xffff) | (b << 16);
  10176. }
  10177. }
  10178. }
  10179. // add
  10180. h = ah0;
  10181. l = al0;
  10182. a = l & 0xffff; b = l >>> 16;
  10183. c = h & 0xffff; d = h >>> 16;
  10184. h = hh[0];
  10185. l = hl[0];
  10186. a += l & 0xffff; b += l >>> 16;
  10187. c += h & 0xffff; d += h >>> 16;
  10188. b += a >>> 16;
  10189. c += b >>> 16;
  10190. d += c >>> 16;
  10191. hh[0] = ah0 = (c & 0xffff) | (d << 16);
  10192. hl[0] = al0 = (a & 0xffff) | (b << 16);
  10193. h = ah1;
  10194. l = al1;
  10195. a = l & 0xffff; b = l >>> 16;
  10196. c = h & 0xffff; d = h >>> 16;
  10197. h = hh[1];
  10198. l = hl[1];
  10199. a += l & 0xffff; b += l >>> 16;
  10200. c += h & 0xffff; d += h >>> 16;
  10201. b += a >>> 16;
  10202. c += b >>> 16;
  10203. d += c >>> 16;
  10204. hh[1] = ah1 = (c & 0xffff) | (d << 16);
  10205. hl[1] = al1 = (a & 0xffff) | (b << 16);
  10206. h = ah2;
  10207. l = al2;
  10208. a = l & 0xffff; b = l >>> 16;
  10209. c = h & 0xffff; d = h >>> 16;
  10210. h = hh[2];
  10211. l = hl[2];
  10212. a += l & 0xffff; b += l >>> 16;
  10213. c += h & 0xffff; d += h >>> 16;
  10214. b += a >>> 16;
  10215. c += b >>> 16;
  10216. d += c >>> 16;
  10217. hh[2] = ah2 = (c & 0xffff) | (d << 16);
  10218. hl[2] = al2 = (a & 0xffff) | (b << 16);
  10219. h = ah3;
  10220. l = al3;
  10221. a = l & 0xffff; b = l >>> 16;
  10222. c = h & 0xffff; d = h >>> 16;
  10223. h = hh[3];
  10224. l = hl[3];
  10225. a += l & 0xffff; b += l >>> 16;
  10226. c += h & 0xffff; d += h >>> 16;
  10227. b += a >>> 16;
  10228. c += b >>> 16;
  10229. d += c >>> 16;
  10230. hh[3] = ah3 = (c & 0xffff) | (d << 16);
  10231. hl[3] = al3 = (a & 0xffff) | (b << 16);
  10232. h = ah4;
  10233. l = al4;
  10234. a = l & 0xffff; b = l >>> 16;
  10235. c = h & 0xffff; d = h >>> 16;
  10236. h = hh[4];
  10237. l = hl[4];
  10238. a += l & 0xffff; b += l >>> 16;
  10239. c += h & 0xffff; d += h >>> 16;
  10240. b += a >>> 16;
  10241. c += b >>> 16;
  10242. d += c >>> 16;
  10243. hh[4] = ah4 = (c & 0xffff) | (d << 16);
  10244. hl[4] = al4 = (a & 0xffff) | (b << 16);
  10245. h = ah5;
  10246. l = al5;
  10247. a = l & 0xffff; b = l >>> 16;
  10248. c = h & 0xffff; d = h >>> 16;
  10249. h = hh[5];
  10250. l = hl[5];
  10251. a += l & 0xffff; b += l >>> 16;
  10252. c += h & 0xffff; d += h >>> 16;
  10253. b += a >>> 16;
  10254. c += b >>> 16;
  10255. d += c >>> 16;
  10256. hh[5] = ah5 = (c & 0xffff) | (d << 16);
  10257. hl[5] = al5 = (a & 0xffff) | (b << 16);
  10258. h = ah6;
  10259. l = al6;
  10260. a = l & 0xffff; b = l >>> 16;
  10261. c = h & 0xffff; d = h >>> 16;
  10262. h = hh[6];
  10263. l = hl[6];
  10264. a += l & 0xffff; b += l >>> 16;
  10265. c += h & 0xffff; d += h >>> 16;
  10266. b += a >>> 16;
  10267. c += b >>> 16;
  10268. d += c >>> 16;
  10269. hh[6] = ah6 = (c & 0xffff) | (d << 16);
  10270. hl[6] = al6 = (a & 0xffff) | (b << 16);
  10271. h = ah7;
  10272. l = al7;
  10273. a = l & 0xffff; b = l >>> 16;
  10274. c = h & 0xffff; d = h >>> 16;
  10275. h = hh[7];
  10276. l = hl[7];
  10277. a += l & 0xffff; b += l >>> 16;
  10278. c += h & 0xffff; d += h >>> 16;
  10279. b += a >>> 16;
  10280. c += b >>> 16;
  10281. d += c >>> 16;
  10282. hh[7] = ah7 = (c & 0xffff) | (d << 16);
  10283. hl[7] = al7 = (a & 0xffff) | (b << 16);
  10284. pos += 128;
  10285. n -= 128;
  10286. }
  10287. return n;
  10288. }
  10289. function crypto_hash(out, m, n) {
  10290. var hh = new Int32Array(8),
  10291. hl = new Int32Array(8),
  10292. x = new Uint8Array(256),
  10293. i, b = n;
  10294. hh[0] = 0x6a09e667;
  10295. hh[1] = 0xbb67ae85;
  10296. hh[2] = 0x3c6ef372;
  10297. hh[3] = 0xa54ff53a;
  10298. hh[4] = 0x510e527f;
  10299. hh[5] = 0x9b05688c;
  10300. hh[6] = 0x1f83d9ab;
  10301. hh[7] = 0x5be0cd19;
  10302. hl[0] = 0xf3bcc908;
  10303. hl[1] = 0x84caa73b;
  10304. hl[2] = 0xfe94f82b;
  10305. hl[3] = 0x5f1d36f1;
  10306. hl[4] = 0xade682d1;
  10307. hl[5] = 0x2b3e6c1f;
  10308. hl[6] = 0xfb41bd6b;
  10309. hl[7] = 0x137e2179;
  10310. crypto_hashblocks_hl(hh, hl, m, n);
  10311. n %= 128;
  10312. for (i = 0; i < n; i++) x[i] = m[b-n+i];
  10313. x[n] = 128;
  10314. n = 256-128*(n<112?1:0);
  10315. x[n-9] = 0;
  10316. ts64(x, n-8, (b / 0x20000000) | 0, b << 3);
  10317. crypto_hashblocks_hl(hh, hl, x, n);
  10318. for (i = 0; i < 8; i++) ts64(out, 8*i, hh[i], hl[i]);
  10319. return 0;
  10320. }
  10321. function add(p, q) {
  10322. var a = gf(), b = gf(), c = gf(),
  10323. d = gf(), e = gf(), f = gf(),
  10324. g = gf(), h = gf(), t = gf();
  10325. Z(a, p[1], p[0]);
  10326. Z(t, q[1], q[0]);
  10327. M(a, a, t);
  10328. A(b, p[0], p[1]);
  10329. A(t, q[0], q[1]);
  10330. M(b, b, t);
  10331. M(c, p[3], q[3]);
  10332. M(c, c, D2);
  10333. M(d, p[2], q[2]);
  10334. A(d, d, d);
  10335. Z(e, b, a);
  10336. Z(f, d, c);
  10337. A(g, d, c);
  10338. A(h, b, a);
  10339. M(p[0], e, f);
  10340. M(p[1], h, g);
  10341. M(p[2], g, f);
  10342. M(p[3], e, h);
  10343. }
  10344. function cswap(p, q, b) {
  10345. var i;
  10346. for (i = 0; i < 4; i++) {
  10347. sel25519(p[i], q[i], b);
  10348. }
  10349. }
  10350. function pack(r, p) {
  10351. var tx = gf(), ty = gf(), zi = gf();
  10352. inv25519(zi, p[2]);
  10353. M(tx, p[0], zi);
  10354. M(ty, p[1], zi);
  10355. pack25519(r, ty);
  10356. r[31] ^= par25519(tx) << 7;
  10357. }
  10358. function scalarmult(p, q, s) {
  10359. var b, i;
  10360. set25519(p[0], gf0);
  10361. set25519(p[1], gf1);
  10362. set25519(p[2], gf1);
  10363. set25519(p[3], gf0);
  10364. for (i = 255; i >= 0; --i) {
  10365. b = (s[(i/8)|0] >> (i&7)) & 1;
  10366. cswap(p, q, b);
  10367. add(q, p);
  10368. add(p, p);
  10369. cswap(p, q, b);
  10370. }
  10371. }
  10372. function scalarbase(p, s) {
  10373. var q = [gf(), gf(), gf(), gf()];
  10374. set25519(q[0], X);
  10375. set25519(q[1], Y);
  10376. set25519(q[2], gf1);
  10377. M(q[3], X, Y);
  10378. scalarmult(p, q, s);
  10379. }
  10380. function crypto_sign_keypair(pk, sk, seeded) {
  10381. var d = new Uint8Array(64);
  10382. var p = [gf(), gf(), gf(), gf()];
  10383. var i;
  10384. if (!seeded) randombytes(sk, 32);
  10385. crypto_hash(d, sk, 32);
  10386. d[0] &= 248;
  10387. d[31] &= 127;
  10388. d[31] |= 64;
  10389. scalarbase(p, d);
  10390. pack(pk, p);
  10391. for (i = 0; i < 32; i++) sk[i+32] = pk[i];
  10392. return 0;
  10393. }
  10394. var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]);
  10395. function modL(r, x) {
  10396. var carry, i, j, k;
  10397. for (i = 63; i >= 32; --i) {
  10398. carry = 0;
  10399. for (j = i - 32, k = i - 12; j < k; ++j) {
  10400. x[j] += carry - 16 * x[i] * L[j - (i - 32)];
  10401. carry = (x[j] + 128) >> 8;
  10402. x[j] -= carry * 256;
  10403. }
  10404. x[j] += carry;
  10405. x[i] = 0;
  10406. }
  10407. carry = 0;
  10408. for (j = 0; j < 32; j++) {
  10409. x[j] += carry - (x[31] >> 4) * L[j];
  10410. carry = x[j] >> 8;
  10411. x[j] &= 255;
  10412. }
  10413. for (j = 0; j < 32; j++) x[j] -= carry * L[j];
  10414. for (i = 0; i < 32; i++) {
  10415. x[i+1] += x[i] >> 8;
  10416. r[i] = x[i] & 255;
  10417. }
  10418. }
  10419. function reduce(r) {
  10420. var x = new Float64Array(64), i;
  10421. for (i = 0; i < 64; i++) x[i] = r[i];
  10422. for (i = 0; i < 64; i++) r[i] = 0;
  10423. modL(r, x);
  10424. }
  10425. // Note: difference from C - smlen returned, not passed as argument.
  10426. function crypto_sign(sm, m, n, sk) {
  10427. var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64);
  10428. var i, j, x = new Float64Array(64);
  10429. var p = [gf(), gf(), gf(), gf()];
  10430. crypto_hash(d, sk, 32);
  10431. d[0] &= 248;
  10432. d[31] &= 127;
  10433. d[31] |= 64;
  10434. var smlen = n + 64;
  10435. for (i = 0; i < n; i++) sm[64 + i] = m[i];
  10436. for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i];
  10437. crypto_hash(r, sm.subarray(32), n+32);
  10438. reduce(r);
  10439. scalarbase(p, r);
  10440. pack(sm, p);
  10441. for (i = 32; i < 64; i++) sm[i] = sk[i];
  10442. crypto_hash(h, sm, n + 64);
  10443. reduce(h);
  10444. for (i = 0; i < 64; i++) x[i] = 0;
  10445. for (i = 0; i < 32; i++) x[i] = r[i];
  10446. for (i = 0; i < 32; i++) {
  10447. for (j = 0; j < 32; j++) {
  10448. x[i+j] += h[i] * d[j];
  10449. }
  10450. }
  10451. modL(sm.subarray(32), x);
  10452. return smlen;
  10453. }
  10454. function unpackneg(r, p) {
  10455. var t = gf(), chk = gf(), num = gf(),
  10456. den = gf(), den2 = gf(), den4 = gf(),
  10457. den6 = gf();
  10458. set25519(r[2], gf1);
  10459. unpack25519(r[1], p);
  10460. S(num, r[1]);
  10461. M(den, num, D);
  10462. Z(num, num, r[2]);
  10463. A(den, r[2], den);
  10464. S(den2, den);
  10465. S(den4, den2);
  10466. M(den6, den4, den2);
  10467. M(t, den6, num);
  10468. M(t, t, den);
  10469. pow2523(t, t);
  10470. M(t, t, num);
  10471. M(t, t, den);
  10472. M(t, t, den);
  10473. M(r[0], t, den);
  10474. S(chk, r[0]);
  10475. M(chk, chk, den);
  10476. if (neq25519(chk, num)) M(r[0], r[0], I);
  10477. S(chk, r[0]);
  10478. M(chk, chk, den);
  10479. if (neq25519(chk, num)) return -1;
  10480. if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]);
  10481. M(r[3], r[0], r[1]);
  10482. return 0;
  10483. }
  10484. function crypto_sign_open(m, sm, n, pk) {
  10485. var i, mlen;
  10486. var t = new Uint8Array(32), h = new Uint8Array(64);
  10487. var p = [gf(), gf(), gf(), gf()],
  10488. q = [gf(), gf(), gf(), gf()];
  10489. mlen = -1;
  10490. if (n < 64) return -1;
  10491. if (unpackneg(q, pk)) return -1;
  10492. for (i = 0; i < n; i++) m[i] = sm[i];
  10493. for (i = 0; i < 32; i++) m[i+32] = pk[i];
  10494. crypto_hash(h, m, n);
  10495. reduce(h);
  10496. scalarmult(p, q, h);
  10497. scalarbase(q, sm.subarray(32));
  10498. add(p, q);
  10499. pack(t, p);
  10500. n -= 64;
  10501. if (crypto_verify_32(sm, 0, t, 0)) {
  10502. for (i = 0; i < n; i++) m[i] = 0;
  10503. return -1;
  10504. }
  10505. for (i = 0; i < n; i++) m[i] = sm[i + 64];
  10506. mlen = n;
  10507. return mlen;
  10508. }
  10509. var crypto_secretbox_KEYBYTES = 32,
  10510. crypto_secretbox_NONCEBYTES = 24,
  10511. crypto_secretbox_ZEROBYTES = 32,
  10512. crypto_secretbox_BOXZEROBYTES = 16,
  10513. crypto_scalarmult_BYTES = 32,
  10514. crypto_scalarmult_SCALARBYTES = 32,
  10515. crypto_box_PUBLICKEYBYTES = 32,
  10516. crypto_box_SECRETKEYBYTES = 32,
  10517. crypto_box_BEFORENMBYTES = 32,
  10518. crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES,
  10519. crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES,
  10520. crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES,
  10521. crypto_sign_BYTES = 64,
  10522. crypto_sign_PUBLICKEYBYTES = 32,
  10523. crypto_sign_SECRETKEYBYTES = 64,
  10524. crypto_sign_SEEDBYTES = 32,
  10525. crypto_hash_BYTES = 64;
  10526. nacl.lowlevel = {
  10527. crypto_core_hsalsa20: crypto_core_hsalsa20,
  10528. crypto_stream_xor: crypto_stream_xor,
  10529. crypto_stream: crypto_stream,
  10530. crypto_stream_salsa20_xor: crypto_stream_salsa20_xor,
  10531. crypto_stream_salsa20: crypto_stream_salsa20,
  10532. crypto_onetimeauth: crypto_onetimeauth,
  10533. crypto_onetimeauth_verify: crypto_onetimeauth_verify,
  10534. crypto_verify_16: crypto_verify_16,
  10535. crypto_verify_32: crypto_verify_32,
  10536. crypto_secretbox: crypto_secretbox,
  10537. crypto_secretbox_open: crypto_secretbox_open,
  10538. crypto_scalarmult: crypto_scalarmult,
  10539. crypto_scalarmult_base: crypto_scalarmult_base,
  10540. crypto_box_beforenm: crypto_box_beforenm,
  10541. crypto_box_afternm: crypto_box_afternm,
  10542. crypto_box: crypto_box,
  10543. crypto_box_open: crypto_box_open,
  10544. crypto_box_keypair: crypto_box_keypair,
  10545. crypto_hash: crypto_hash,
  10546. crypto_sign: crypto_sign,
  10547. crypto_sign_keypair: crypto_sign_keypair,
  10548. crypto_sign_open: crypto_sign_open,
  10549. crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES,
  10550. crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES,
  10551. crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES,
  10552. crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES,
  10553. crypto_scalarmult_BYTES: crypto_scalarmult_BYTES,
  10554. crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES,
  10555. crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES,
  10556. crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES,
  10557. crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES,
  10558. crypto_box_NONCEBYTES: crypto_box_NONCEBYTES,
  10559. crypto_box_ZEROBYTES: crypto_box_ZEROBYTES,
  10560. crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES,
  10561. crypto_sign_BYTES: crypto_sign_BYTES,
  10562. crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES,
  10563. crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES,
  10564. crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES,
  10565. crypto_hash_BYTES: crypto_hash_BYTES
  10566. };
  10567. /* High-level API */
  10568. function checkLengths(k, n) {
  10569. if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size');
  10570. if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size');
  10571. }
  10572. function checkBoxLengths(pk, sk) {
  10573. if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size');
  10574. if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size');
  10575. }
  10576. function checkArrayTypes() {
  10577. var t, i;
  10578. for (i = 0; i < arguments.length; i++) {
  10579. if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]')
  10580. throw new TypeError('unexpected type ' + t + ', use Uint8Array');
  10581. }
  10582. }
  10583. function cleanup(arr) {
  10584. for (var i = 0; i < arr.length; i++) arr[i] = 0;
  10585. }
  10586. // TODO: Completely remove this in v0.15.
  10587. if (!nacl.util) {
  10588. nacl.util = {};
  10589. nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() {
  10590. throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js');
  10591. };
  10592. }
  10593. nacl.randomBytes = function(n) {
  10594. var b = new Uint8Array(n);
  10595. randombytes(b, n);
  10596. return b;
  10597. };
  10598. nacl.secretbox = function(msg, nonce, key) {
  10599. checkArrayTypes(msg, nonce, key);
  10600. checkLengths(key, nonce);
  10601. var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length);
  10602. var c = new Uint8Array(m.length);
  10603. for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i];
  10604. crypto_secretbox(c, m, m.length, nonce, key);
  10605. return c.subarray(crypto_secretbox_BOXZEROBYTES);
  10606. };
  10607. nacl.secretbox.open = function(box, nonce, key) {
  10608. checkArrayTypes(box, nonce, key);
  10609. checkLengths(key, nonce);
  10610. var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length);
  10611. var m = new Uint8Array(c.length);
  10612. for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i];
  10613. if (c.length < 32) return false;
  10614. if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false;
  10615. return m.subarray(crypto_secretbox_ZEROBYTES);
  10616. };
  10617. nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES;
  10618. nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES;
  10619. nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES;
  10620. nacl.scalarMult = function(n, p) {
  10621. checkArrayTypes(n, p);
  10622. if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size');
  10623. if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size');
  10624. var q = new Uint8Array(crypto_scalarmult_BYTES);
  10625. crypto_scalarmult(q, n, p);
  10626. return q;
  10627. };
  10628. nacl.scalarMult.base = function(n) {
  10629. checkArrayTypes(n);
  10630. if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size');
  10631. var q = new Uint8Array(crypto_scalarmult_BYTES);
  10632. crypto_scalarmult_base(q, n);
  10633. return q;
  10634. };
  10635. nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES;
  10636. nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES;
  10637. nacl.box = function(msg, nonce, publicKey, secretKey) {
  10638. var k = nacl.box.before(publicKey, secretKey);
  10639. return nacl.secretbox(msg, nonce, k);
  10640. };
  10641. nacl.box.before = function(publicKey, secretKey) {
  10642. checkArrayTypes(publicKey, secretKey);
  10643. checkBoxLengths(publicKey, secretKey);
  10644. var k = new Uint8Array(crypto_box_BEFORENMBYTES);
  10645. crypto_box_beforenm(k, publicKey, secretKey);
  10646. return k;
  10647. };
  10648. nacl.box.after = nacl.secretbox;
  10649. nacl.box.open = function(msg, nonce, publicKey, secretKey) {
  10650. var k = nacl.box.before(publicKey, secretKey);
  10651. return nacl.secretbox.open(msg, nonce, k);
  10652. };
  10653. nacl.box.open.after = nacl.secretbox.open;
  10654. nacl.box.keyPair = function() {
  10655. var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES);
  10656. var sk = new Uint8Array(crypto_box_SECRETKEYBYTES);
  10657. crypto_box_keypair(pk, sk);
  10658. return {publicKey: pk, secretKey: sk};
  10659. };
  10660. nacl.box.keyPair.fromSecretKey = function(secretKey) {
  10661. checkArrayTypes(secretKey);
  10662. if (secretKey.length !== crypto_box_SECRETKEYBYTES)
  10663. throw new Error('bad secret key size');
  10664. var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES);
  10665. crypto_scalarmult_base(pk, secretKey);
  10666. return {publicKey: pk, secretKey: new Uint8Array(secretKey)};
  10667. };
  10668. nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES;
  10669. nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES;
  10670. nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES;
  10671. nacl.box.nonceLength = crypto_box_NONCEBYTES;
  10672. nacl.box.overheadLength = nacl.secretbox.overheadLength;
  10673. nacl.sign = function(msg, secretKey) {
  10674. checkArrayTypes(msg, secretKey);
  10675. if (secretKey.length !== crypto_sign_SECRETKEYBYTES)
  10676. throw new Error('bad secret key size');
  10677. var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length);
  10678. crypto_sign(signedMsg, msg, msg.length, secretKey);
  10679. return signedMsg;
  10680. };
  10681. nacl.sign.open = function(signedMsg, publicKey) {
  10682. if (arguments.length !== 2)
  10683. throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?');
  10684. checkArrayTypes(signedMsg, publicKey);
  10685. if (publicKey.length !== crypto_sign_PUBLICKEYBYTES)
  10686. throw new Error('bad public key size');
  10687. var tmp = new Uint8Array(signedMsg.length);
  10688. var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey);
  10689. if (mlen < 0) return null;
  10690. var m = new Uint8Array(mlen);
  10691. for (var i = 0; i < m.length; i++) m[i] = tmp[i];
  10692. return m;
  10693. };
  10694. nacl.sign.detached = function(msg, secretKey) {
  10695. var signedMsg = nacl.sign(msg, secretKey);
  10696. var sig = new Uint8Array(crypto_sign_BYTES);
  10697. for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i];
  10698. return sig;
  10699. };
  10700. nacl.sign.detached.verify = function(msg, sig, publicKey) {
  10701. checkArrayTypes(msg, sig, publicKey);
  10702. if (sig.length !== crypto_sign_BYTES)
  10703. throw new Error('bad signature size');
  10704. if (publicKey.length !== crypto_sign_PUBLICKEYBYTES)
  10705. throw new Error('bad public key size');
  10706. var sm = new Uint8Array(crypto_sign_BYTES + msg.length);
  10707. var m = new Uint8Array(crypto_sign_BYTES + msg.length);
  10708. var i;
  10709. for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i];
  10710. for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i];
  10711. return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0);
  10712. };
  10713. nacl.sign.keyPair = function() {
  10714. var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES);
  10715. var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES);
  10716. crypto_sign_keypair(pk, sk);
  10717. return {publicKey: pk, secretKey: sk};
  10718. };
  10719. nacl.sign.keyPair.fromSecretKey = function(secretKey) {
  10720. checkArrayTypes(secretKey);
  10721. if (secretKey.length !== crypto_sign_SECRETKEYBYTES)
  10722. throw new Error('bad secret key size');
  10723. var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES);
  10724. for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i];
  10725. return {publicKey: pk, secretKey: new Uint8Array(secretKey)};
  10726. };
  10727. nacl.sign.keyPair.fromSeed = function(seed) {
  10728. checkArrayTypes(seed);
  10729. if (seed.length !== crypto_sign_SEEDBYTES)
  10730. throw new Error('bad seed size');
  10731. var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES);
  10732. var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES);
  10733. for (var i = 0; i < 32; i++) sk[i] = seed[i];
  10734. crypto_sign_keypair(pk, sk, true);
  10735. return {publicKey: pk, secretKey: sk};
  10736. };
  10737. nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES;
  10738. nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES;
  10739. nacl.sign.seedLength = crypto_sign_SEEDBYTES;
  10740. nacl.sign.signatureLength = crypto_sign_BYTES;
  10741. nacl.hash = function(msg) {
  10742. checkArrayTypes(msg);
  10743. var h = new Uint8Array(crypto_hash_BYTES);
  10744. crypto_hash(h, msg, msg.length);
  10745. return h;
  10746. };
  10747. nacl.hash.hashLength = crypto_hash_BYTES;
  10748. nacl.verify = function(x, y) {
  10749. checkArrayTypes(x, y);
  10750. // Zero length arguments are considered not equal.
  10751. if (x.length === 0 || y.length === 0) return false;
  10752. if (x.length !== y.length) return false;
  10753. return (vn(x, 0, y, 0, x.length) === 0) ? true : false;
  10754. };
  10755. nacl.setPRNG = function(fn) {
  10756. randombytes = fn;
  10757. };
  10758. (function() {
  10759. // Initialize PRNG if environment provides CSPRNG.
  10760. // If not, methods calling randombytes will throw.
  10761. var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null;
  10762. if (crypto && crypto.getRandomValues) {
  10763. // Browsers.
  10764. var QUOTA = 65536;
  10765. nacl.setPRNG(function(x, n) {
  10766. var i, v = new Uint8Array(n);
  10767. for (i = 0; i < n; i += QUOTA) {
  10768. crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA)));
  10769. }
  10770. for (i = 0; i < n; i++) x[i] = v[i];
  10771. cleanup(v);
  10772. });
  10773. } else if (true) {
  10774. // Node.js.
  10775. crypto = __webpack_require__(5);
  10776. if (crypto && crypto.randomBytes) {
  10777. nacl.setPRNG(function(x, n) {
  10778. var i, v = crypto.randomBytes(n);
  10779. for (i = 0; i < n; i++) x[i] = v[i];
  10780. cleanup(v);
  10781. });
  10782. }
  10783. }
  10784. })();
  10785. })(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {}));
  10786. /***/ }),
  10787. /* 48 */
  10788. /***/ (function(module, exports, __webpack_require__) {
  10789. // Copyright 2015 Joyent, Inc.
  10790. module.exports = {
  10791. read: read.bind(undefined, false, undefined),
  10792. readType: read.bind(undefined, false),
  10793. write: write,
  10794. /* semi-private api, used by sshpk-agent */
  10795. readPartial: read.bind(undefined, true),
  10796. /* shared with ssh format */
  10797. readInternal: read,
  10798. keyTypeToAlg: keyTypeToAlg,
  10799. algToKeyType: algToKeyType
  10800. };
  10801. var assert = __webpack_require__(3);
  10802. var algs = __webpack_require__(16);
  10803. var utils = __webpack_require__(12);
  10804. var Key = __webpack_require__(15);
  10805. var PrivateKey = __webpack_require__(17);
  10806. var SSHBuffer = __webpack_require__(110);
  10807. function algToKeyType(alg) {
  10808. assert.string(alg);
  10809. if (alg === 'ssh-dss')
  10810. return ('dsa');
  10811. else if (alg === 'ssh-rsa')
  10812. return ('rsa');
  10813. else if (alg === 'ssh-ed25519')
  10814. return ('ed25519');
  10815. else if (alg === 'ssh-curve25519')
  10816. return ('curve25519');
  10817. else if (alg.match(/^ecdsa-sha2-/))
  10818. return ('ecdsa');
  10819. else
  10820. throw (new Error('Unknown algorithm ' + alg));
  10821. }
  10822. function keyTypeToAlg(key) {
  10823. assert.object(key);
  10824. if (key.type === 'dsa')
  10825. return ('ssh-dss');
  10826. else if (key.type === 'rsa')
  10827. return ('ssh-rsa');
  10828. else if (key.type === 'ed25519')
  10829. return ('ssh-ed25519');
  10830. else if (key.type === 'curve25519')
  10831. return ('ssh-curve25519');
  10832. else if (key.type === 'ecdsa')
  10833. return ('ecdsa-sha2-' + key.part.curve.data.toString());
  10834. else
  10835. throw (new Error('Unknown key type ' + key.type));
  10836. }
  10837. function read(partial, type, buf, options) {
  10838. if (typeof (buf) === 'string')
  10839. buf = new Buffer(buf);
  10840. assert.buffer(buf, 'buf');
  10841. var key = {};
  10842. var parts = key.parts = [];
  10843. var sshbuf = new SSHBuffer({buffer: buf});
  10844. var alg = sshbuf.readString();
  10845. assert.ok(!sshbuf.atEnd(), 'key must have at least one part');
  10846. key.type = algToKeyType(alg);
  10847. var partCount = algs.info[key.type].parts.length;
  10848. if (type && type === 'private')
  10849. partCount = algs.privInfo[key.type].parts.length;
  10850. while (!sshbuf.atEnd() && parts.length < partCount)
  10851. parts.push(sshbuf.readPart());
  10852. while (!partial && !sshbuf.atEnd())
  10853. parts.push(sshbuf.readPart());
  10854. assert.ok(parts.length >= 1,
  10855. 'key must have at least one part');
  10856. assert.ok(partial || sshbuf.atEnd(),
  10857. 'leftover bytes at end of key');
  10858. var Constructor = Key;
  10859. var algInfo = algs.info[key.type];
  10860. if (type === 'private' || algInfo.parts.length !== parts.length) {
  10861. algInfo = algs.privInfo[key.type];
  10862. Constructor = PrivateKey;
  10863. }
  10864. assert.strictEqual(algInfo.parts.length, parts.length);
  10865. if (key.type === 'ecdsa') {
  10866. var res = /^ecdsa-sha2-(.+)$/.exec(alg);
  10867. assert.ok(res !== null);
  10868. assert.strictEqual(res[1], parts[0].data.toString());
  10869. }
  10870. var normalized = true;
  10871. for (var i = 0; i < algInfo.parts.length; ++i) {
  10872. parts[i].name = algInfo.parts[i];
  10873. if (parts[i].name !== 'curve' &&
  10874. algInfo.normalize !== false) {
  10875. var p = parts[i];
  10876. var nd = utils.mpNormalize(p.data);
  10877. if (nd !== p.data) {
  10878. p.data = nd;
  10879. normalized = false;
  10880. }
  10881. }
  10882. }
  10883. if (normalized)
  10884. key._rfc4253Cache = sshbuf.toBuffer();
  10885. if (partial && typeof (partial) === 'object') {
  10886. partial.remainder = sshbuf.remainder();
  10887. partial.consumed = sshbuf._offset;
  10888. }
  10889. return (new Constructor(key));
  10890. }
  10891. function write(key, options) {
  10892. assert.object(key);
  10893. var alg = keyTypeToAlg(key);
  10894. var i;
  10895. var algInfo = algs.info[key.type];
  10896. if (PrivateKey.isPrivateKey(key))
  10897. algInfo = algs.privInfo[key.type];
  10898. var parts = algInfo.parts;
  10899. var buf = new SSHBuffer({});
  10900. buf.writeString(alg);
  10901. for (i = 0; i < parts.length; ++i) {
  10902. var data = key.part[parts[i]].data;
  10903. if (algInfo.normalize !== false)
  10904. data = utils.mpNormalize(data);
  10905. buf.writeBuffer(data);
  10906. }
  10907. return (buf.toBuffer());
  10908. }
  10909. /***/ }),
  10910. /* 49 */
  10911. /***/ (function(module, exports, __webpack_require__) {
  10912. var baseIsNative = __webpack_require__(675),
  10913. getValue = __webpack_require__(678);
  10914. /**
  10915. * Gets the native function at `key` of `object`.
  10916. *
  10917. * @private
  10918. * @param {Object} object The object to query.
  10919. * @param {string} key The key of the method to get.
  10920. * @returns {*} Returns the function if it's native, else `undefined`.
  10921. */
  10922. function getNative(object, key) {
  10923. var value = getValue(object, key);
  10924. return baseIsNative(value) ? value : undefined;
  10925. }
  10926. module.exports = getNative;
  10927. /***/ }),
  10928. /* 50 */
  10929. /***/ (function(module, exports, __webpack_require__) {
  10930. var baseMatches = __webpack_require__(758),
  10931. baseMatchesProperty = __webpack_require__(778),
  10932. identity = __webpack_require__(68),
  10933. isArray = __webpack_require__(9),
  10934. property = __webpack_require__(787);
  10935. /**
  10936. * The base implementation of `_.iteratee`.
  10937. *
  10938. * @private
  10939. * @param {*} [value=_.identity] The value to convert to an iteratee.
  10940. * @returns {Function} Returns the iteratee.
  10941. */
  10942. function baseIteratee(value) {
  10943. // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
  10944. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
  10945. if (typeof value == 'function') {
  10946. return value;
  10947. }
  10948. if (value == null) {
  10949. return identity;
  10950. }
  10951. if (typeof value == 'object') {
  10952. return isArray(value)
  10953. ? baseMatchesProperty(value[0], value[1])
  10954. : baseMatches(value);
  10955. }
  10956. return property(value);
  10957. }
  10958. module.exports = baseIteratee;
  10959. /***/ }),
  10960. /* 51 */
  10961. /***/ (function(module, exports, __webpack_require__) {
  10962. /**
  10963. * This is a [cozy-client-js](https://cozy.github.io/cozy-client-js/) instance already initialized and ready to use
  10964. * @module cozy-client
  10965. */
  10966. const {Client, MemoryStorage} = __webpack_require__(809)
  10967. const getCredentials = function (environment) {
  10968. try {
  10969. if (environment === 'development') {
  10970. const credentials = JSON.parse(process.env.COZY_CREDENTIALS)
  10971. credentials.token.toAuthHeader = function () {
  10972. return 'Bearer ' + credentials.client.registrationAccessToken
  10973. }
  10974. return credentials
  10975. } else {
  10976. return process.env.COZY_CREDENTIALS.trim()
  10977. }
  10978. } catch (err) {
  10979. console.error(`Please provide proper COZY_CREDENTIALS environment variable. ${process.env.COZY_CREDENTIALS} is not OK`)
  10980. throw err
  10981. }
  10982. }
  10983. const getCozyUrl = function () {
  10984. if (process.env.COZY_URL === undefined) {
  10985. console.error(`Please provide COZY_URL environment variable.`)
  10986. throw new Error('COZY_URL environment variable is absent/not valid')
  10987. } else {
  10988. return process.env.COZY_URL
  10989. }
  10990. }
  10991. const getCozyClient = function (environment = 'production') {
  10992. if (environment === 'standalone' || environment === 'test') {
  10993. return __webpack_require__(938)
  10994. }
  10995. const credentials = getCredentials(environment)
  10996. const cozyURL = getCozyUrl()
  10997. const options = {
  10998. cozyURL: cozyURL
  10999. }
  11000. if (environment === 'development') {
  11001. options.oauth = {storage: new MemoryStorage()}
  11002. } else if (environment === 'production') {
  11003. options.token = credentials
  11004. }
  11005. const cozyClient = new Client(options)
  11006. if (environment === 'development') {
  11007. cozyClient.saveCredentials(credentials.client, credentials.token)
  11008. }
  11009. return cozyClient
  11010. }
  11011. module.exports = getCozyClient(process.env.NODE_ENV)
  11012. /***/ }),
  11013. /* 52 */
  11014. /***/ (function(module, exports) {
  11015. module.exports = function (bitmap, value) {
  11016. return {
  11017. enumerable: !(bitmap & 1),
  11018. configurable: !(bitmap & 2),
  11019. writable: !(bitmap & 4),
  11020. value: value
  11021. };
  11022. };
  11023. /***/ }),
  11024. /* 53 */
  11025. /***/ (function(module, exports) {
  11026. var id = 0;
  11027. var px = Math.random();
  11028. module.exports = function (key) {
  11029. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
  11030. };
  11031. /***/ }),
  11032. /* 54 */
  11033. /***/ (function(module, exports) {
  11034. module.exports = function (it) {
  11035. if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  11036. return it;
  11037. };
  11038. /***/ }),
  11039. /* 55 */
  11040. /***/ (function(module, exports) {
  11041. // 7.1.4 ToInteger
  11042. var ceil = Math.ceil;
  11043. var floor = Math.floor;
  11044. module.exports = function (it) {
  11045. return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
  11046. };
  11047. /***/ }),
  11048. /* 56 */
  11049. /***/ (function(module, exports) {
  11050. // 7.2.1 RequireObjectCoercible(argument)
  11051. module.exports = function (it) {
  11052. if (it == undefined) throw TypeError("Can't call method on " + it);
  11053. return it;
  11054. };
  11055. /***/ }),
  11056. /* 57 */
  11057. /***/ (function(module, exports, __webpack_require__) {
  11058. // 7.1.13 ToObject(argument)
  11059. var defined = __webpack_require__(56);
  11060. module.exports = function (it) {
  11061. return Object(defined(it));
  11062. };
  11063. /***/ }),
  11064. /* 58 */
  11065. /***/ (function(module, exports) {
  11066. module.exports = function(module) {
  11067. if(!module.webpackPolyfill) {
  11068. module.deprecate = function() {};
  11069. module.paths = [];
  11070. // module.parent = undefined by default
  11071. if(!module.children) module.children = [];
  11072. Object.defineProperty(module, "loaded", {
  11073. enumerable: true,
  11074. get: function() {
  11075. return module.l;
  11076. }
  11077. });
  11078. Object.defineProperty(module, "id", {
  11079. enumerable: true,
  11080. get: function() {
  11081. return module.i;
  11082. }
  11083. });
  11084. module.webpackPolyfill = 1;
  11085. }
  11086. return module;
  11087. };
  11088. /***/ }),
  11089. /* 59 */
  11090. /***/ (function(module, exports) {
  11091. var isES5 = (function(){
  11092. "use strict";
  11093. return this === undefined;
  11094. })();
  11095. if (isES5) {
  11096. module.exports = {
  11097. freeze: Object.freeze,
  11098. defineProperty: Object.defineProperty,
  11099. getDescriptor: Object.getOwnPropertyDescriptor,
  11100. keys: Object.keys,
  11101. names: Object.getOwnPropertyNames,
  11102. getPrototypeOf: Object.getPrototypeOf,
  11103. isArray: Array.isArray,
  11104. isES5: isES5,
  11105. propertyIsWritable: function(obj, prop) {
  11106. var descriptor = Object.getOwnPropertyDescriptor(obj, prop);
  11107. return !!(!descriptor || descriptor.writable || descriptor.set);
  11108. }
  11109. };
  11110. } else {
  11111. var has = {}.hasOwnProperty;
  11112. var str = {}.toString;
  11113. var proto = {}.constructor.prototype;
  11114. var ObjectKeys = function (o) {
  11115. var ret = [];
  11116. for (var key in o) {
  11117. if (has.call(o, key)) {
  11118. ret.push(key);
  11119. }
  11120. }
  11121. return ret;
  11122. };
  11123. var ObjectGetDescriptor = function(o, key) {
  11124. return {value: o[key]};
  11125. };
  11126. var ObjectDefineProperty = function (o, key, desc) {
  11127. o[key] = desc.value;
  11128. return o;
  11129. };
  11130. var ObjectFreeze = function (obj) {
  11131. return obj;
  11132. };
  11133. var ObjectGetPrototypeOf = function (obj) {
  11134. try {
  11135. return Object(obj).constructor.prototype;
  11136. }
  11137. catch (e) {
  11138. return proto;
  11139. }
  11140. };
  11141. var ArrayIsArray = function (obj) {
  11142. try {
  11143. return str.call(obj) === "[object Array]";
  11144. }
  11145. catch(e) {
  11146. return false;
  11147. }
  11148. };
  11149. module.exports = {
  11150. isArray: ArrayIsArray,
  11151. keys: ObjectKeys,
  11152. names: ObjectKeys,
  11153. defineProperty: ObjectDefineProperty,
  11154. getDescriptor: ObjectGetDescriptor,
  11155. freeze: ObjectFreeze,
  11156. getPrototypeOf: ObjectGetPrototypeOf,
  11157. isES5: isES5,
  11158. propertyIsWritable: function() {
  11159. return true;
  11160. }
  11161. };
  11162. }
  11163. /***/ }),
  11164. /* 60 */
  11165. /***/ (function(module, exports) {
  11166. module.exports = require("path");
  11167. /***/ }),
  11168. /* 61 */
  11169. /***/ (function(module, exports) {
  11170. // Copyright Joyent, Inc. and other Node contributors.
  11171. //
  11172. // Permission is hereby granted, free of charge, to any person obtaining a
  11173. // copy of this software and associated documentation files (the
  11174. // "Software"), to deal in the Software without restriction, including
  11175. // without limitation the rights to use, copy, modify, merge, publish,
  11176. // distribute, sublicense, and/or sell copies of the Software, and to permit
  11177. // persons to whom the Software is furnished to do so, subject to the
  11178. // following conditions:
  11179. //
  11180. // The above copyright notice and this permission notice shall be included
  11181. // in all copies or substantial portions of the Software.
  11182. //
  11183. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  11184. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  11185. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  11186. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  11187. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  11188. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  11189. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  11190. // NOTE: These type checking functions intentionally don't use `instanceof`
  11191. // because it is fragile and can be easily faked with `Object.create()`.
  11192. function isArray(arg) {
  11193. if (Array.isArray) {
  11194. return Array.isArray(arg);
  11195. }
  11196. return objectToString(arg) === '[object Array]';
  11197. }
  11198. exports.isArray = isArray;
  11199. function isBoolean(arg) {
  11200. return typeof arg === 'boolean';
  11201. }
  11202. exports.isBoolean = isBoolean;
  11203. function isNull(arg) {
  11204. return arg === null;
  11205. }
  11206. exports.isNull = isNull;
  11207. function isNullOrUndefined(arg) {
  11208. return arg == null;
  11209. }
  11210. exports.isNullOrUndefined = isNullOrUndefined;
  11211. function isNumber(arg) {
  11212. return typeof arg === 'number';
  11213. }
  11214. exports.isNumber = isNumber;
  11215. function isString(arg) {
  11216. return typeof arg === 'string';
  11217. }
  11218. exports.isString = isString;
  11219. function isSymbol(arg) {
  11220. return typeof arg === 'symbol';
  11221. }
  11222. exports.isSymbol = isSymbol;
  11223. function isUndefined(arg) {
  11224. return arg === void 0;
  11225. }
  11226. exports.isUndefined = isUndefined;
  11227. function isRegExp(re) {
  11228. return objectToString(re) === '[object RegExp]';
  11229. }
  11230. exports.isRegExp = isRegExp;
  11231. function isObject(arg) {
  11232. return typeof arg === 'object' && arg !== null;
  11233. }
  11234. exports.isObject = isObject;
  11235. function isDate(d) {
  11236. return objectToString(d) === '[object Date]';
  11237. }
  11238. exports.isDate = isDate;
  11239. function isError(e) {
  11240. return (objectToString(e) === '[object Error]' || e instanceof Error);
  11241. }
  11242. exports.isError = isError;
  11243. function isFunction(arg) {
  11244. return typeof arg === 'function';
  11245. }
  11246. exports.isFunction = isFunction;
  11247. function isPrimitive(arg) {
  11248. return arg === null ||
  11249. typeof arg === 'boolean' ||
  11250. typeof arg === 'number' ||
  11251. typeof arg === 'string' ||
  11252. typeof arg === 'symbol' || // ES6 symbol
  11253. typeof arg === 'undefined';
  11254. }
  11255. exports.isPrimitive = isPrimitive;
  11256. exports.isBuffer = Buffer.isBuffer;
  11257. function objectToString(o) {
  11258. return Object.prototype.toString.call(o);
  11259. }
  11260. /***/ }),
  11261. /* 62 */
  11262. /***/ (function(module, exports, __webpack_require__) {
  11263. "use strict";
  11264. module.exports = {
  11265. copy: copy,
  11266. checkDataType: checkDataType,
  11267. checkDataTypes: checkDataTypes,
  11268. coerceToTypes: coerceToTypes,
  11269. toHash: toHash,
  11270. getProperty: getProperty,
  11271. escapeQuotes: escapeQuotes,
  11272. equal: __webpack_require__(153),
  11273. ucs2length: __webpack_require__(576),
  11274. varOccurences: varOccurences,
  11275. varReplace: varReplace,
  11276. cleanUpCode: cleanUpCode,
  11277. finalCleanUpCode: finalCleanUpCode,
  11278. schemaHasRules: schemaHasRules,
  11279. schemaHasRulesExcept: schemaHasRulesExcept,
  11280. toQuotedString: toQuotedString,
  11281. getPathExpr: getPathExpr,
  11282. getPath: getPath,
  11283. getData: getData,
  11284. unescapeFragment: unescapeFragment,
  11285. unescapeJsonPointer: unescapeJsonPointer,
  11286. escapeFragment: escapeFragment,
  11287. escapeJsonPointer: escapeJsonPointer
  11288. };
  11289. function copy(o, to) {
  11290. to = to || {};
  11291. for (var key in o) to[key] = o[key];
  11292. return to;
  11293. }
  11294. function checkDataType(dataType, data, negate) {
  11295. var EQUAL = negate ? ' !== ' : ' === '
  11296. , AND = negate ? ' || ' : ' && '
  11297. , OK = negate ? '!' : ''
  11298. , NOT = negate ? '' : '!';
  11299. switch (dataType) {
  11300. case 'null': return data + EQUAL + 'null';
  11301. case 'array': return OK + 'Array.isArray(' + data + ')';
  11302. case 'object': return '(' + OK + data + AND +
  11303. 'typeof ' + data + EQUAL + '"object"' + AND +
  11304. NOT + 'Array.isArray(' + data + '))';
  11305. case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND +
  11306. NOT + '(' + data + ' % 1)' +
  11307. AND + data + EQUAL + data + ')';
  11308. default: return 'typeof ' + data + EQUAL + '"' + dataType + '"';
  11309. }
  11310. }
  11311. function checkDataTypes(dataTypes, data) {
  11312. switch (dataTypes.length) {
  11313. case 1: return checkDataType(dataTypes[0], data, true);
  11314. default:
  11315. var code = '';
  11316. var types = toHash(dataTypes);
  11317. if (types.array && types.object) {
  11318. code = types.null ? '(': '(!' + data + ' || ';
  11319. code += 'typeof ' + data + ' !== "object")';
  11320. delete types.null;
  11321. delete types.array;
  11322. delete types.object;
  11323. }
  11324. if (types.number) delete types.integer;
  11325. for (var t in types)
  11326. code += (code ? ' && ' : '' ) + checkDataType(t, data, true);
  11327. return code;
  11328. }
  11329. }
  11330. var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]);
  11331. function coerceToTypes(optionCoerceTypes, dataTypes) {
  11332. if (Array.isArray(dataTypes)) {
  11333. var types = [];
  11334. for (var i=0; i<dataTypes.length; i++) {
  11335. var t = dataTypes[i];
  11336. if (COERCE_TO_TYPES[t]) types[types.length] = t;
  11337. else if (optionCoerceTypes === 'array' && t === 'array') types[types.length] = t;
  11338. }
  11339. if (types.length) return types;
  11340. } else if (COERCE_TO_TYPES[dataTypes]) {
  11341. return [dataTypes];
  11342. } else if (optionCoerceTypes === 'array' && dataTypes === 'array') {
  11343. return ['array'];
  11344. }
  11345. }
  11346. function toHash(arr) {
  11347. var hash = {};
  11348. for (var i=0; i<arr.length; i++) hash[arr[i]] = true;
  11349. return hash;
  11350. }
  11351. var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
  11352. var SINGLE_QUOTE = /'|\\/g;
  11353. function getProperty(key) {
  11354. return typeof key == 'number'
  11355. ? '[' + key + ']'
  11356. : IDENTIFIER.test(key)
  11357. ? '.' + key
  11358. : "['" + escapeQuotes(key) + "']";
  11359. }
  11360. function escapeQuotes(str) {
  11361. return str.replace(SINGLE_QUOTE, '\\$&')
  11362. .replace(/\n/g, '\\n')
  11363. .replace(/\r/g, '\\r')
  11364. .replace(/\f/g, '\\f')
  11365. .replace(/\t/g, '\\t');
  11366. }
  11367. function varOccurences(str, dataVar) {
  11368. dataVar += '[^0-9]';
  11369. var matches = str.match(new RegExp(dataVar, 'g'));
  11370. return matches ? matches.length : 0;
  11371. }
  11372. function varReplace(str, dataVar, expr) {
  11373. dataVar += '([^0-9])';
  11374. expr = expr.replace(/\$/g, '$$$$');
  11375. return str.replace(new RegExp(dataVar, 'g'), expr + '$1');
  11376. }
  11377. var EMPTY_ELSE = /else\s*{\s*}/g
  11378. , EMPTY_IF_NO_ELSE = /if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g
  11379. , EMPTY_IF_WITH_ELSE = /if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g;
  11380. function cleanUpCode(out) {
  11381. return out.replace(EMPTY_ELSE, '')
  11382. .replace(EMPTY_IF_NO_ELSE, '')
  11383. .replace(EMPTY_IF_WITH_ELSE, 'if (!($1))');
  11384. }
  11385. var ERRORS_REGEXP = /[^v.]errors/g
  11386. , REMOVE_ERRORS = /var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g
  11387. , REMOVE_ERRORS_ASYNC = /var errors = 0;|var vErrors = null;/g
  11388. , RETURN_VALID = 'return errors === 0;'
  11389. , RETURN_TRUE = 'validate.errors = null; return true;'
  11390. , RETURN_ASYNC = /if \(errors === 0\) return data;\s*else throw new ValidationError\(vErrors\);/
  11391. , RETURN_DATA_ASYNC = 'return data;'
  11392. , ROOTDATA_REGEXP = /[^A-Za-z_$]rootData[^A-Za-z0-9_$]/g
  11393. , REMOVE_ROOTDATA = /if \(rootData === undefined\) rootData = data;/;
  11394. function finalCleanUpCode(out, async) {
  11395. var matches = out.match(ERRORS_REGEXP);
  11396. if (matches && matches.length == 2) {
  11397. out = async
  11398. ? out.replace(REMOVE_ERRORS_ASYNC, '')
  11399. .replace(RETURN_ASYNC, RETURN_DATA_ASYNC)
  11400. : out.replace(REMOVE_ERRORS, '')
  11401. .replace(RETURN_VALID, RETURN_TRUE);
  11402. }
  11403. matches = out.match(ROOTDATA_REGEXP);
  11404. if (!matches || matches.length !== 3) return out;
  11405. return out.replace(REMOVE_ROOTDATA, '');
  11406. }
  11407. function schemaHasRules(schema, rules) {
  11408. if (typeof schema == 'boolean') return !schema;
  11409. for (var key in schema) if (rules[key]) return true;
  11410. }
  11411. function schemaHasRulesExcept(schema, rules, exceptKeyword) {
  11412. if (typeof schema == 'boolean') return !schema && exceptKeyword != 'not';
  11413. for (var key in schema) if (key != exceptKeyword && rules[key]) return true;
  11414. }
  11415. function toQuotedString(str) {
  11416. return '\'' + escapeQuotes(str) + '\'';
  11417. }
  11418. function getPathExpr(currentPath, expr, jsonPointers, isNumber) {
  11419. var path = jsonPointers // false by default
  11420. ? '\'/\' + ' + expr + (isNumber ? '' : '.replace(/~/g, \'~0\').replace(/\\//g, \'~1\')')
  11421. : (isNumber ? '\'[\' + ' + expr + ' + \']\'' : '\'[\\\'\' + ' + expr + ' + \'\\\']\'');
  11422. return joinPaths(currentPath, path);
  11423. }
  11424. function getPath(currentPath, prop, jsonPointers) {
  11425. var path = jsonPointers // false by default
  11426. ? toQuotedString('/' + escapeJsonPointer(prop))
  11427. : toQuotedString(getProperty(prop));
  11428. return joinPaths(currentPath, path);
  11429. }
  11430. var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
  11431. var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
  11432. function getData($data, lvl, paths) {
  11433. var up, jsonPointer, data, matches;
  11434. if ($data === '') return 'rootData';
  11435. if ($data[0] == '/') {
  11436. if (!JSON_POINTER.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);
  11437. jsonPointer = $data;
  11438. data = 'rootData';
  11439. } else {
  11440. matches = $data.match(RELATIVE_JSON_POINTER);
  11441. if (!matches) throw new Error('Invalid JSON-pointer: ' + $data);
  11442. up = +matches[1];
  11443. jsonPointer = matches[2];
  11444. if (jsonPointer == '#') {
  11445. if (up >= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl);
  11446. return paths[lvl - up];
  11447. }
  11448. if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl);
  11449. data = 'data' + ((lvl - up) || '');
  11450. if (!jsonPointer) return data;
  11451. }
  11452. var expr = data;
  11453. var segments = jsonPointer.split('/');
  11454. for (var i=0; i<segments.length; i++) {
  11455. var segment = segments[i];
  11456. if (segment) {
  11457. data += getProperty(unescapeJsonPointer(segment));
  11458. expr += ' && ' + data;
  11459. }
  11460. }
  11461. return expr;
  11462. }
  11463. function joinPaths (a, b) {
  11464. if (a == '""') return b;
  11465. return (a + ' + ' + b).replace(/' \+ '/g, '');
  11466. }
  11467. function unescapeFragment(str) {
  11468. return unescapeJsonPointer(decodeURIComponent(str));
  11469. }
  11470. function escapeFragment(str) {
  11471. return encodeURIComponent(escapeJsonPointer(str));
  11472. }
  11473. function escapeJsonPointer(str) {
  11474. return str.replace(/~/g, '~0').replace(/\//g, '~1');
  11475. }
  11476. function unescapeJsonPointer(str) {
  11477. return str.replace(/~1/g, '/').replace(/~0/g, '~');
  11478. }
  11479. /***/ }),
  11480. /* 63 */
  11481. /***/ (function(module, exports, __webpack_require__) {
  11482. var Parser = __webpack_require__(376),
  11483. DomHandler = __webpack_require__(641);
  11484. function defineProp(name, value){
  11485. delete module.exports[name];
  11486. module.exports[name] = value;
  11487. return value;
  11488. }
  11489. module.exports = {
  11490. Parser: Parser,
  11491. Tokenizer: __webpack_require__(377),
  11492. ElementType: __webpack_require__(88),
  11493. DomHandler: DomHandler,
  11494. get FeedHandler(){
  11495. return defineProp("FeedHandler", __webpack_require__(643));
  11496. },
  11497. get Stream(){
  11498. return defineProp("Stream", __webpack_require__(644));
  11499. },
  11500. get WritableStream(){
  11501. return defineProp("WritableStream", __webpack_require__(381));
  11502. },
  11503. get ProxyHandler(){
  11504. return defineProp("ProxyHandler", __webpack_require__(650));
  11505. },
  11506. get DomUtils(){
  11507. return defineProp("DomUtils", __webpack_require__(65));
  11508. },
  11509. get CollectingHandler(){
  11510. return defineProp("CollectingHandler", __webpack_require__(661));
  11511. },
  11512. // For legacy support
  11513. DefaultHandler: DomHandler,
  11514. get RssHandler(){
  11515. return defineProp("RssHandler", this.FeedHandler);
  11516. },
  11517. //helper methods
  11518. parseDOM: function(data, options){
  11519. var handler = new DomHandler(options);
  11520. new Parser(handler, options).end(data);
  11521. return handler.dom;
  11522. },
  11523. parseFeed: function(feed, options){
  11524. var handler = new module.exports.FeedHandler(options);
  11525. new Parser(handler, options).end(feed);
  11526. return handler.dom;
  11527. },
  11528. createDomStream: function(cb, options, elementCb){
  11529. var handler = new DomHandler(cb, options, elementCb);
  11530. return new Parser(handler, options);
  11531. },
  11532. // List of all events that the parser emits
  11533. EVENTS: { /* Format: eventname: number of arguments */
  11534. attribute: 2,
  11535. cdatastart: 0,
  11536. cdataend: 0,
  11537. text: 1,
  11538. processinginstruction: 2,
  11539. comment: 1,
  11540. commentend: 0,
  11541. closetag: 1,
  11542. opentag: 2,
  11543. opentagname: 1,
  11544. error: 1,
  11545. end: 0
  11546. }
  11547. };
  11548. /***/ }),
  11549. /* 64 */
  11550. /***/ (function(module, exports, __webpack_require__) {
  11551. "use strict";
  11552. // Copyright Joyent, Inc. and other Node contributors.
  11553. //
  11554. // Permission is hereby granted, free of charge, to any person obtaining a
  11555. // copy of this software and associated documentation files (the
  11556. // "Software"), to deal in the Software without restriction, including
  11557. // without limitation the rights to use, copy, modify, merge, publish,
  11558. // distribute, sublicense, and/or sell copies of the Software, and to permit
  11559. // persons to whom the Software is furnished to do so, subject to the
  11560. // following conditions:
  11561. //
  11562. // The above copyright notice and this permission notice shall be included
  11563. // in all copies or substantial portions of the Software.
  11564. //
  11565. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  11566. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  11567. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  11568. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  11569. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  11570. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  11571. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  11572. // a duplex stream is just a stream that is both readable and writable.
  11573. // Since JS doesn't have multiple prototypal inheritance, this class
  11574. // prototypally inherits from Readable, and then parasitically from
  11575. // Writable.
  11576. /*<replacement>*/
  11577. var processNextTick = __webpack_require__(115);
  11578. /*</replacement>*/
  11579. /*<replacement>*/
  11580. var objectKeys = Object.keys || function (obj) {
  11581. var keys = [];
  11582. for (var key in obj) {
  11583. keys.push(key);
  11584. }return keys;
  11585. };
  11586. /*</replacement>*/
  11587. module.exports = Duplex;
  11588. /*<replacement>*/
  11589. var util = __webpack_require__(61);
  11590. util.inherits = __webpack_require__(33);
  11591. /*</replacement>*/
  11592. var Readable = __webpack_require__(382);
  11593. var Writable = __webpack_require__(385);
  11594. util.inherits(Duplex, Readable);
  11595. var keys = objectKeys(Writable.prototype);
  11596. for (var v = 0; v < keys.length; v++) {
  11597. var method = keys[v];
  11598. if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
  11599. }
  11600. function Duplex(options) {
  11601. if (!(this instanceof Duplex)) return new Duplex(options);
  11602. Readable.call(this, options);
  11603. Writable.call(this, options);
  11604. if (options && options.readable === false) this.readable = false;
  11605. if (options && options.writable === false) this.writable = false;
  11606. this.allowHalfOpen = true;
  11607. if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
  11608. this.once('end', onend);
  11609. }
  11610. // the no-half-open enforcer
  11611. function onend() {
  11612. // if we allow half-open state, or if the writable side ended,
  11613. // then we're ok.
  11614. if (this.allowHalfOpen || this._writableState.ended) return;
  11615. // no more data can be written.
  11616. // But allow more writes to happen in this tick.
  11617. processNextTick(onEndNT, this);
  11618. }
  11619. function onEndNT(self) {
  11620. self.end();
  11621. }
  11622. Object.defineProperty(Duplex.prototype, 'destroyed', {
  11623. get: function () {
  11624. if (this._readableState === undefined || this._writableState === undefined) {
  11625. return false;
  11626. }
  11627. return this._readableState.destroyed && this._writableState.destroyed;
  11628. },
  11629. set: function (value) {
  11630. // we ignore the value if the stream
  11631. // has not been initialized yet
  11632. if (this._readableState === undefined || this._writableState === undefined) {
  11633. return;
  11634. }
  11635. // backward compatibility, the user is explicitly
  11636. // managing destroyed
  11637. this._readableState.destroyed = value;
  11638. this._writableState.destroyed = value;
  11639. }
  11640. });
  11641. Duplex.prototype._destroy = function (err, cb) {
  11642. this.push(null);
  11643. this.end();
  11644. processNextTick(cb, err);
  11645. };
  11646. function forEach(xs, f) {
  11647. for (var i = 0, l = xs.length; i < l; i++) {
  11648. f(xs[i], i);
  11649. }
  11650. }
  11651. /***/ }),
  11652. /* 65 */
  11653. /***/ (function(module, exports, __webpack_require__) {
  11654. var DomUtils = module.exports;
  11655. [
  11656. __webpack_require__(651),
  11657. __webpack_require__(656),
  11658. __webpack_require__(657),
  11659. __webpack_require__(658),
  11660. __webpack_require__(659),
  11661. __webpack_require__(660)
  11662. ].forEach(function(ext){
  11663. Object.keys(ext).forEach(function(key){
  11664. DomUtils[key] = ext[key].bind(DomUtils);
  11665. });
  11666. });
  11667. /***/ }),
  11668. /* 66 */
  11669. /***/ (function(module, exports, __webpack_require__) {
  11670. "use strict";
  11671. var Preprocessor = __webpack_require__(663),
  11672. UNICODE = __webpack_require__(89),
  11673. neTree = __webpack_require__(664);
  11674. //Aliases
  11675. var $ = UNICODE.CODE_POINTS,
  11676. $$ = UNICODE.CODE_POINT_SEQUENCES;
  11677. //Replacement code points for numeric entities
  11678. var NUMERIC_ENTITY_REPLACEMENTS = {
  11679. 0x00: 0xFFFD, 0x0D: 0x000D, 0x80: 0x20AC, 0x81: 0x0081, 0x82: 0x201A, 0x83: 0x0192, 0x84: 0x201E,
  11680. 0x85: 0x2026, 0x86: 0x2020, 0x87: 0x2021, 0x88: 0x02C6, 0x89: 0x2030, 0x8A: 0x0160, 0x8B: 0x2039,
  11681. 0x8C: 0x0152, 0x8D: 0x008D, 0x8E: 0x017D, 0x8F: 0x008F, 0x90: 0x0090, 0x91: 0x2018, 0x92: 0x2019,
  11682. 0x93: 0x201C, 0x94: 0x201D, 0x95: 0x2022, 0x96: 0x2013, 0x97: 0x2014, 0x98: 0x02DC, 0x99: 0x2122,
  11683. 0x9A: 0x0161, 0x9B: 0x203A, 0x9C: 0x0153, 0x9D: 0x009D, 0x9E: 0x017E, 0x9F: 0x0178
  11684. };
  11685. // Named entity tree flags
  11686. var HAS_DATA_FLAG = 1 << 0;
  11687. var DATA_DUPLET_FLAG = 1 << 1;
  11688. var HAS_BRANCHES_FLAG = 1 << 2;
  11689. var MAX_BRANCH_MARKER_VALUE = HAS_DATA_FLAG | DATA_DUPLET_FLAG | HAS_BRANCHES_FLAG;
  11690. //States
  11691. var DATA_STATE = 'DATA_STATE',
  11692. CHARACTER_REFERENCE_IN_DATA_STATE = 'CHARACTER_REFERENCE_IN_DATA_STATE',
  11693. RCDATA_STATE = 'RCDATA_STATE',
  11694. CHARACTER_REFERENCE_IN_RCDATA_STATE = 'CHARACTER_REFERENCE_IN_RCDATA_STATE',
  11695. RAWTEXT_STATE = 'RAWTEXT_STATE',
  11696. SCRIPT_DATA_STATE = 'SCRIPT_DATA_STATE',
  11697. PLAINTEXT_STATE = 'PLAINTEXT_STATE',
  11698. TAG_OPEN_STATE = 'TAG_OPEN_STATE',
  11699. END_TAG_OPEN_STATE = 'END_TAG_OPEN_STATE',
  11700. TAG_NAME_STATE = 'TAG_NAME_STATE',
  11701. RCDATA_LESS_THAN_SIGN_STATE = 'RCDATA_LESS_THAN_SIGN_STATE',
  11702. RCDATA_END_TAG_OPEN_STATE = 'RCDATA_END_TAG_OPEN_STATE',
  11703. RCDATA_END_TAG_NAME_STATE = 'RCDATA_END_TAG_NAME_STATE',
  11704. RAWTEXT_LESS_THAN_SIGN_STATE = 'RAWTEXT_LESS_THAN_SIGN_STATE',
  11705. RAWTEXT_END_TAG_OPEN_STATE = 'RAWTEXT_END_TAG_OPEN_STATE',
  11706. RAWTEXT_END_TAG_NAME_STATE = 'RAWTEXT_END_TAG_NAME_STATE',
  11707. SCRIPT_DATA_LESS_THAN_SIGN_STATE = 'SCRIPT_DATA_LESS_THAN_SIGN_STATE',
  11708. SCRIPT_DATA_END_TAG_OPEN_STATE = 'SCRIPT_DATA_END_TAG_OPEN_STATE',
  11709. SCRIPT_DATA_END_TAG_NAME_STATE = 'SCRIPT_DATA_END_TAG_NAME_STATE',
  11710. SCRIPT_DATA_ESCAPE_START_STATE = 'SCRIPT_DATA_ESCAPE_START_STATE',
  11711. SCRIPT_DATA_ESCAPE_START_DASH_STATE = 'SCRIPT_DATA_ESCAPE_START_DASH_STATE',
  11712. SCRIPT_DATA_ESCAPED_STATE = 'SCRIPT_DATA_ESCAPED_STATE',
  11713. SCRIPT_DATA_ESCAPED_DASH_STATE = 'SCRIPT_DATA_ESCAPED_DASH_STATE',
  11714. SCRIPT_DATA_ESCAPED_DASH_DASH_STATE = 'SCRIPT_DATA_ESCAPED_DASH_DASH_STATE',
  11715. SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE = 'SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE',
  11716. SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE = 'SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE',
  11717. SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE = 'SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE',
  11718. SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE',
  11719. SCRIPT_DATA_DOUBLE_ESCAPED_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPED_STATE',
  11720. SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE',
  11721. SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE',
  11722. SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE',
  11723. SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE',
  11724. BEFORE_ATTRIBUTE_NAME_STATE = 'BEFORE_ATTRIBUTE_NAME_STATE',
  11725. ATTRIBUTE_NAME_STATE = 'ATTRIBUTE_NAME_STATE',
  11726. AFTER_ATTRIBUTE_NAME_STATE = 'AFTER_ATTRIBUTE_NAME_STATE',
  11727. BEFORE_ATTRIBUTE_VALUE_STATE = 'BEFORE_ATTRIBUTE_VALUE_STATE',
  11728. ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE = 'ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE',
  11729. ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE = 'ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE',
  11730. ATTRIBUTE_VALUE_UNQUOTED_STATE = 'ATTRIBUTE_VALUE_UNQUOTED_STATE',
  11731. CHARACTER_REFERENCE_IN_ATTRIBUTE_VALUE_STATE = 'CHARACTER_REFERENCE_IN_ATTRIBUTE_VALUE_STATE',
  11732. AFTER_ATTRIBUTE_VALUE_QUOTED_STATE = 'AFTER_ATTRIBUTE_VALUE_QUOTED_STATE',
  11733. SELF_CLOSING_START_TAG_STATE = 'SELF_CLOSING_START_TAG_STATE',
  11734. BOGUS_COMMENT_STATE = 'BOGUS_COMMENT_STATE',
  11735. BOGUS_COMMENT_STATE_CONTINUATION = 'BOGUS_COMMENT_STATE_CONTINUATION',
  11736. MARKUP_DECLARATION_OPEN_STATE = 'MARKUP_DECLARATION_OPEN_STATE',
  11737. COMMENT_START_STATE = 'COMMENT_START_STATE',
  11738. COMMENT_START_DASH_STATE = 'COMMENT_START_DASH_STATE',
  11739. COMMENT_STATE = 'COMMENT_STATE',
  11740. COMMENT_END_DASH_STATE = 'COMMENT_END_DASH_STATE',
  11741. COMMENT_END_STATE = 'COMMENT_END_STATE',
  11742. COMMENT_END_BANG_STATE = 'COMMENT_END_BANG_STATE',
  11743. DOCTYPE_STATE = 'DOCTYPE_STATE',
  11744. DOCTYPE_NAME_STATE = 'DOCTYPE_NAME_STATE',
  11745. AFTER_DOCTYPE_NAME_STATE = 'AFTER_DOCTYPE_NAME_STATE',
  11746. BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE = 'BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE',
  11747. DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE = 'DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE',
  11748. DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE = 'DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE',
  11749. BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE = 'BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE',
  11750. BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE = 'BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE',
  11751. DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE = 'DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE',
  11752. DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE = 'DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE',
  11753. AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE = 'AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE',
  11754. BOGUS_DOCTYPE_STATE = 'BOGUS_DOCTYPE_STATE',
  11755. CDATA_SECTION_STATE = 'CDATA_SECTION_STATE';
  11756. //Utils
  11757. //OPTIMIZATION: these utility functions should not be moved out of this module. V8 Crankshaft will not inline
  11758. //this functions if they will be situated in another module due to context switch.
  11759. //Always perform inlining check before modifying this functions ('node --trace-inlining').
  11760. function isWhitespace(cp) {
  11761. return cp === $.SPACE || cp === $.LINE_FEED || cp === $.TABULATION || cp === $.FORM_FEED;
  11762. }
  11763. function isAsciiDigit(cp) {
  11764. return cp >= $.DIGIT_0 && cp <= $.DIGIT_9;
  11765. }
  11766. function isAsciiUpper(cp) {
  11767. return cp >= $.LATIN_CAPITAL_A && cp <= $.LATIN_CAPITAL_Z;
  11768. }
  11769. function isAsciiLower(cp) {
  11770. return cp >= $.LATIN_SMALL_A && cp <= $.LATIN_SMALL_Z;
  11771. }
  11772. function isAsciiLetter(cp) {
  11773. return isAsciiLower(cp) || isAsciiUpper(cp);
  11774. }
  11775. function isAsciiAlphaNumeric(cp) {
  11776. return isAsciiLetter(cp) || isAsciiDigit(cp);
  11777. }
  11778. function isDigit(cp, isHex) {
  11779. return isAsciiDigit(cp) || isHex && (cp >= $.LATIN_CAPITAL_A && cp <= $.LATIN_CAPITAL_F ||
  11780. cp >= $.LATIN_SMALL_A && cp <= $.LATIN_SMALL_F);
  11781. }
  11782. function isReservedCodePoint(cp) {
  11783. return cp >= 0xD800 && cp <= 0xDFFF || cp > 0x10FFFF;
  11784. }
  11785. function toAsciiLowerCodePoint(cp) {
  11786. return cp + 0x0020;
  11787. }
  11788. //NOTE: String.fromCharCode() function can handle only characters from BMP subset.
  11789. //So, we need to workaround this manually.
  11790. //(see: https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/fromCharCode#Getting_it_to_work_with_higher_values)
  11791. function toChar(cp) {
  11792. if (cp <= 0xFFFF)
  11793. return String.fromCharCode(cp);
  11794. cp -= 0x10000;
  11795. return String.fromCharCode(cp >>> 10 & 0x3FF | 0xD800) + String.fromCharCode(0xDC00 | cp & 0x3FF);
  11796. }
  11797. function toAsciiLowerChar(cp) {
  11798. return String.fromCharCode(toAsciiLowerCodePoint(cp));
  11799. }
  11800. function findNamedEntityTreeBranch(nodeIx, cp) {
  11801. var branchCount = neTree[++nodeIx],
  11802. lo = ++nodeIx,
  11803. hi = lo + branchCount - 1;
  11804. while (lo <= hi) {
  11805. var mid = lo + hi >>> 1,
  11806. midCp = neTree[mid];
  11807. if (midCp < cp)
  11808. lo = mid + 1;
  11809. else if (midCp > cp)
  11810. hi = mid - 1;
  11811. else
  11812. return neTree[mid + branchCount];
  11813. }
  11814. return -1;
  11815. }
  11816. //Tokenizer
  11817. var Tokenizer = module.exports = function () {
  11818. this.preprocessor = new Preprocessor();
  11819. this.tokenQueue = [];
  11820. this.allowCDATA = false;
  11821. this.state = DATA_STATE;
  11822. this.returnState = '';
  11823. this.tempBuff = [];
  11824. this.additionalAllowedCp = void 0;
  11825. this.lastStartTagName = '';
  11826. this.consumedAfterSnapshot = -1;
  11827. this.active = false;
  11828. this.currentCharacterToken = null;
  11829. this.currentToken = null;
  11830. this.currentAttr = null;
  11831. };
  11832. //Token types
  11833. Tokenizer.CHARACTER_TOKEN = 'CHARACTER_TOKEN';
  11834. Tokenizer.NULL_CHARACTER_TOKEN = 'NULL_CHARACTER_TOKEN';
  11835. Tokenizer.WHITESPACE_CHARACTER_TOKEN = 'WHITESPACE_CHARACTER_TOKEN';
  11836. Tokenizer.START_TAG_TOKEN = 'START_TAG_TOKEN';
  11837. Tokenizer.END_TAG_TOKEN = 'END_TAG_TOKEN';
  11838. Tokenizer.COMMENT_TOKEN = 'COMMENT_TOKEN';
  11839. Tokenizer.DOCTYPE_TOKEN = 'DOCTYPE_TOKEN';
  11840. Tokenizer.EOF_TOKEN = 'EOF_TOKEN';
  11841. Tokenizer.HIBERNATION_TOKEN = 'HIBERNATION_TOKEN';
  11842. //Tokenizer initial states for different modes
  11843. Tokenizer.MODE = {
  11844. DATA: DATA_STATE,
  11845. RCDATA: RCDATA_STATE,
  11846. RAWTEXT: RAWTEXT_STATE,
  11847. SCRIPT_DATA: SCRIPT_DATA_STATE,
  11848. PLAINTEXT: PLAINTEXT_STATE
  11849. };
  11850. //Static
  11851. Tokenizer.getTokenAttr = function (token, attrName) {
  11852. for (var i = token.attrs.length - 1; i >= 0; i--) {
  11853. if (token.attrs[i].name === attrName)
  11854. return token.attrs[i].value;
  11855. }
  11856. return null;
  11857. };
  11858. //API
  11859. Tokenizer.prototype.getNextToken = function () {
  11860. while (!this.tokenQueue.length && this.active) {
  11861. this._hibernationSnapshot();
  11862. var cp = this._consume();
  11863. if (!this._ensureHibernation())
  11864. this[this.state](cp);
  11865. }
  11866. return this.tokenQueue.shift();
  11867. };
  11868. Tokenizer.prototype.write = function (chunk, isLastChunk) {
  11869. this.active = true;
  11870. this.preprocessor.write(chunk, isLastChunk);
  11871. };
  11872. Tokenizer.prototype.insertHtmlAtCurrentPos = function (chunk) {
  11873. this.active = true;
  11874. this.preprocessor.insertHtmlAtCurrentPos(chunk);
  11875. };
  11876. //Hibernation
  11877. Tokenizer.prototype._hibernationSnapshot = function () {
  11878. this.consumedAfterSnapshot = 0;
  11879. };
  11880. Tokenizer.prototype._ensureHibernation = function () {
  11881. if (this.preprocessor.endOfChunkHit) {
  11882. for (; this.consumedAfterSnapshot > 0; this.consumedAfterSnapshot--)
  11883. this.preprocessor.retreat();
  11884. this.active = false;
  11885. this.tokenQueue.push({type: Tokenizer.HIBERNATION_TOKEN});
  11886. return true;
  11887. }
  11888. return false;
  11889. };
  11890. //Consumption
  11891. Tokenizer.prototype._consume = function () {
  11892. this.consumedAfterSnapshot++;
  11893. return this.preprocessor.advance();
  11894. };
  11895. Tokenizer.prototype._unconsume = function () {
  11896. this.consumedAfterSnapshot--;
  11897. this.preprocessor.retreat();
  11898. };
  11899. Tokenizer.prototype._unconsumeSeveral = function (count) {
  11900. while (count--)
  11901. this._unconsume();
  11902. };
  11903. Tokenizer.prototype._reconsumeInState = function (state) {
  11904. this.state = state;
  11905. this._unconsume();
  11906. };
  11907. Tokenizer.prototype._consumeSubsequentIfMatch = function (pattern, startCp, caseSensitive) {
  11908. var consumedCount = 0,
  11909. isMatch = true,
  11910. patternLength = pattern.length,
  11911. patternPos = 0,
  11912. cp = startCp,
  11913. patternCp = void 0;
  11914. for (; patternPos < patternLength; patternPos++) {
  11915. if (patternPos > 0) {
  11916. cp = this._consume();
  11917. consumedCount++;
  11918. }
  11919. if (cp === $.EOF) {
  11920. isMatch = false;
  11921. break;
  11922. }
  11923. patternCp = pattern[patternPos];
  11924. if (cp !== patternCp && (caseSensitive || cp !== toAsciiLowerCodePoint(patternCp))) {
  11925. isMatch = false;
  11926. break;
  11927. }
  11928. }
  11929. if (!isMatch)
  11930. this._unconsumeSeveral(consumedCount);
  11931. return isMatch;
  11932. };
  11933. //Lookahead
  11934. Tokenizer.prototype._lookahead = function () {
  11935. var cp = this._consume();
  11936. this._unconsume();
  11937. return cp;
  11938. };
  11939. //Temp buffer
  11940. Tokenizer.prototype.isTempBufferEqualToScriptString = function () {
  11941. if (this.tempBuff.length !== $$.SCRIPT_STRING.length)
  11942. return false;
  11943. for (var i = 0; i < this.tempBuff.length; i++) {
  11944. if (this.tempBuff[i] !== $$.SCRIPT_STRING[i])
  11945. return false;
  11946. }
  11947. return true;
  11948. };
  11949. //Token creation
  11950. Tokenizer.prototype._createStartTagToken = function () {
  11951. this.currentToken = {
  11952. type: Tokenizer.START_TAG_TOKEN,
  11953. tagName: '',
  11954. selfClosing: false,
  11955. attrs: []
  11956. };
  11957. };
  11958. Tokenizer.prototype._createEndTagToken = function () {
  11959. this.currentToken = {
  11960. type: Tokenizer.END_TAG_TOKEN,
  11961. tagName: '',
  11962. attrs: []
  11963. };
  11964. };
  11965. Tokenizer.prototype._createCommentToken = function () {
  11966. this.currentToken = {
  11967. type: Tokenizer.COMMENT_TOKEN,
  11968. data: ''
  11969. };
  11970. };
  11971. Tokenizer.prototype._createDoctypeToken = function (initialName) {
  11972. this.currentToken = {
  11973. type: Tokenizer.DOCTYPE_TOKEN,
  11974. name: initialName,
  11975. forceQuirks: false,
  11976. publicId: null,
  11977. systemId: null
  11978. };
  11979. };
  11980. Tokenizer.prototype._createCharacterToken = function (type, ch) {
  11981. this.currentCharacterToken = {
  11982. type: type,
  11983. chars: ch
  11984. };
  11985. };
  11986. //Tag attributes
  11987. Tokenizer.prototype._createAttr = function (attrNameFirstCh) {
  11988. this.currentAttr = {
  11989. name: attrNameFirstCh,
  11990. value: ''
  11991. };
  11992. };
  11993. Tokenizer.prototype._isDuplicateAttr = function () {
  11994. return Tokenizer.getTokenAttr(this.currentToken, this.currentAttr.name) !== null;
  11995. };
  11996. Tokenizer.prototype._leaveAttrName = function (toState) {
  11997. this.state = toState;
  11998. if (!this._isDuplicateAttr())
  11999. this.currentToken.attrs.push(this.currentAttr);
  12000. };
  12001. Tokenizer.prototype._leaveAttrValue = function (toState) {
  12002. this.state = toState;
  12003. };
  12004. //Appropriate end tag token
  12005. //(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#appropriate-end-tag-token)
  12006. Tokenizer.prototype._isAppropriateEndTagToken = function () {
  12007. return this.lastStartTagName === this.currentToken.tagName;
  12008. };
  12009. //Token emission
  12010. Tokenizer.prototype._emitCurrentToken = function () {
  12011. this._emitCurrentCharacterToken();
  12012. //NOTE: store emited start tag's tagName to determine is the following end tag token is appropriate.
  12013. if (this.currentToken.type === Tokenizer.START_TAG_TOKEN)
  12014. this.lastStartTagName = this.currentToken.tagName;
  12015. this.tokenQueue.push(this.currentToken);
  12016. this.currentToken = null;
  12017. };
  12018. Tokenizer.prototype._emitCurrentCharacterToken = function () {
  12019. if (this.currentCharacterToken) {
  12020. this.tokenQueue.push(this.currentCharacterToken);
  12021. this.currentCharacterToken = null;
  12022. }
  12023. };
  12024. Tokenizer.prototype._emitEOFToken = function () {
  12025. this._emitCurrentCharacterToken();
  12026. this.tokenQueue.push({type: Tokenizer.EOF_TOKEN});
  12027. };
  12028. //Characters emission
  12029. //OPTIMIZATION: specification uses only one type of character tokens (one token per character).
  12030. //This causes a huge memory overhead and a lot of unnecessary parser loops. parse5 uses 3 groups of characters.
  12031. //If we have a sequence of characters that belong to the same group, parser can process it
  12032. //as a single solid character token.
  12033. //So, there are 3 types of character tokens in parse5:
  12034. //1)NULL_CHARACTER_TOKEN - \u0000-character sequences (e.g. '\u0000\u0000\u0000')
  12035. //2)WHITESPACE_CHARACTER_TOKEN - any whitespace/new-line character sequences (e.g. '\n \r\t \f')
  12036. //3)CHARACTER_TOKEN - any character sequence which don't belong to groups 1 and 2 (e.g. 'abcdef1234@@#$%^')
  12037. Tokenizer.prototype._appendCharToCurrentCharacterToken = function (type, ch) {
  12038. if (this.currentCharacterToken && this.currentCharacterToken.type !== type)
  12039. this._emitCurrentCharacterToken();
  12040. if (this.currentCharacterToken)
  12041. this.currentCharacterToken.chars += ch;
  12042. else
  12043. this._createCharacterToken(type, ch);
  12044. };
  12045. Tokenizer.prototype._emitCodePoint = function (cp) {
  12046. var type = Tokenizer.CHARACTER_TOKEN;
  12047. if (isWhitespace(cp))
  12048. type = Tokenizer.WHITESPACE_CHARACTER_TOKEN;
  12049. else if (cp === $.NULL)
  12050. type = Tokenizer.NULL_CHARACTER_TOKEN;
  12051. this._appendCharToCurrentCharacterToken(type, toChar(cp));
  12052. };
  12053. Tokenizer.prototype._emitSeveralCodePoints = function (codePoints) {
  12054. for (var i = 0; i < codePoints.length; i++)
  12055. this._emitCodePoint(codePoints[i]);
  12056. };
  12057. //NOTE: used then we emit character explicitly. This is always a non-whitespace and a non-null character.
  12058. //So we can avoid additional checks here.
  12059. Tokenizer.prototype._emitChar = function (ch) {
  12060. this._appendCharToCurrentCharacterToken(Tokenizer.CHARACTER_TOKEN, ch);
  12061. };
  12062. //Character reference tokenization
  12063. Tokenizer.prototype._consumeNumericEntity = function (isHex) {
  12064. var digits = '',
  12065. nextCp = void 0;
  12066. do {
  12067. digits += toChar(this._consume());
  12068. nextCp = this._lookahead();
  12069. } while (nextCp !== $.EOF && isDigit(nextCp, isHex));
  12070. if (this._lookahead() === $.SEMICOLON)
  12071. this._consume();
  12072. var referencedCp = parseInt(digits, isHex ? 16 : 10),
  12073. replacement = NUMERIC_ENTITY_REPLACEMENTS[referencedCp];
  12074. if (replacement)
  12075. return replacement;
  12076. if (isReservedCodePoint(referencedCp))
  12077. return $.REPLACEMENT_CHARACTER;
  12078. return referencedCp;
  12079. };
  12080. // NOTE: for the details on this algorithm see
  12081. // https://github.com/inikulin/parse5/tree/master/scripts/generate_named_entity_data/README.md
  12082. Tokenizer.prototype._consumeNamedEntity = function (inAttr) {
  12083. var referencedCodePoints = null,
  12084. referenceSize = 0,
  12085. cp = null,
  12086. consumedCount = 0,
  12087. semicolonTerminated = false;
  12088. for (var i = 0; i > -1;) {
  12089. var current = neTree[i],
  12090. inNode = current < MAX_BRANCH_MARKER_VALUE,
  12091. nodeWithData = inNode && current & HAS_DATA_FLAG;
  12092. if (nodeWithData) {
  12093. referencedCodePoints = current & DATA_DUPLET_FLAG ? [neTree[++i], neTree[++i]] : [neTree[++i]];
  12094. referenceSize = consumedCount;
  12095. if (cp === $.SEMICOLON) {
  12096. semicolonTerminated = true;
  12097. break;
  12098. }
  12099. }
  12100. cp = this._consume();
  12101. consumedCount++;
  12102. if (cp === $.EOF)
  12103. break;
  12104. if (inNode)
  12105. i = current & HAS_BRANCHES_FLAG ? findNamedEntityTreeBranch(i, cp) : -1;
  12106. else
  12107. i = cp === current ? ++i : -1;
  12108. }
  12109. if (referencedCodePoints) {
  12110. if (!semicolonTerminated) {
  12111. //NOTE: unconsume excess (e.g. 'it' in '&notit')
  12112. this._unconsumeSeveral(consumedCount - referenceSize);
  12113. //NOTE: If the character reference is being consumed as part of an attribute and the next character
  12114. //is either a U+003D EQUALS SIGN character (=) or an alphanumeric ASCII character, then, for historical
  12115. //reasons, all the characters that were matched after the U+0026 AMPERSAND character (&) must be
  12116. //unconsumed, and nothing is returned.
  12117. //However, if this next character is in fact a U+003D EQUALS SIGN character (=), then this is a
  12118. //parse error, because some legacy user agents will misinterpret the markup in those cases.
  12119. //(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#tokenizing-character-references)
  12120. if (inAttr) {
  12121. var nextCp = this._lookahead();
  12122. if (nextCp === $.EQUALS_SIGN || isAsciiAlphaNumeric(nextCp)) {
  12123. this._unconsumeSeveral(referenceSize);
  12124. return null;
  12125. }
  12126. }
  12127. }
  12128. return referencedCodePoints;
  12129. }
  12130. this._unconsumeSeveral(consumedCount);
  12131. return null;
  12132. };
  12133. Tokenizer.prototype._consumeCharacterReference = function (startCp, inAttr) {
  12134. if (isWhitespace(startCp) || startCp === $.GREATER_THAN_SIGN ||
  12135. startCp === $.AMPERSAND || startCp === this.additionalAllowedCp || startCp === $.EOF) {
  12136. //NOTE: not a character reference. No characters are consumed, and nothing is returned.
  12137. this._unconsume();
  12138. return null;
  12139. }
  12140. if (startCp === $.NUMBER_SIGN) {
  12141. //NOTE: we have a numeric entity candidate, now we should determine if it's hex or decimal
  12142. var isHex = false,
  12143. nextCp = this._lookahead();
  12144. if (nextCp === $.LATIN_SMALL_X || nextCp === $.LATIN_CAPITAL_X) {
  12145. this._consume();
  12146. isHex = true;
  12147. }
  12148. nextCp = this._lookahead();
  12149. //NOTE: if we have at least one digit this is a numeric entity for sure, so we consume it
  12150. if (nextCp !== $.EOF && isDigit(nextCp, isHex))
  12151. return [this._consumeNumericEntity(isHex)];
  12152. //NOTE: otherwise this is a bogus number entity and a parse error. Unconsume the number sign
  12153. //and the 'x'-character if appropriate.
  12154. this._unconsumeSeveral(isHex ? 2 : 1);
  12155. return null;
  12156. }
  12157. this._unconsume();
  12158. return this._consumeNamedEntity(inAttr);
  12159. };
  12160. //State machine
  12161. var _ = Tokenizer.prototype;
  12162. //12.2.4.1 Data state
  12163. //------------------------------------------------------------------
  12164. _[DATA_STATE] = function dataState(cp) {
  12165. this.preprocessor.dropParsedChunk();
  12166. if (cp === $.AMPERSAND)
  12167. this.state = CHARACTER_REFERENCE_IN_DATA_STATE;
  12168. else if (cp === $.LESS_THAN_SIGN)
  12169. this.state = TAG_OPEN_STATE;
  12170. else if (cp === $.NULL)
  12171. this._emitCodePoint(cp);
  12172. else if (cp === $.EOF)
  12173. this._emitEOFToken();
  12174. else
  12175. this._emitCodePoint(cp);
  12176. };
  12177. //12.2.4.2 Character reference in data state
  12178. //------------------------------------------------------------------
  12179. _[CHARACTER_REFERENCE_IN_DATA_STATE] = function characterReferenceInDataState(cp) {
  12180. this.additionalAllowedCp = void 0;
  12181. var referencedCodePoints = this._consumeCharacterReference(cp, false);
  12182. if (!this._ensureHibernation()) {
  12183. if (referencedCodePoints)
  12184. this._emitSeveralCodePoints(referencedCodePoints);
  12185. else
  12186. this._emitChar('&');
  12187. this.state = DATA_STATE;
  12188. }
  12189. };
  12190. //12.2.4.3 RCDATA state
  12191. //------------------------------------------------------------------
  12192. _[RCDATA_STATE] = function rcdataState(cp) {
  12193. this.preprocessor.dropParsedChunk();
  12194. if (cp === $.AMPERSAND)
  12195. this.state = CHARACTER_REFERENCE_IN_RCDATA_STATE;
  12196. else if (cp === $.LESS_THAN_SIGN)
  12197. this.state = RCDATA_LESS_THAN_SIGN_STATE;
  12198. else if (cp === $.NULL)
  12199. this._emitChar(UNICODE.REPLACEMENT_CHARACTER);
  12200. else if (cp === $.EOF)
  12201. this._emitEOFToken();
  12202. else
  12203. this._emitCodePoint(cp);
  12204. };
  12205. //12.2.4.4 Character reference in RCDATA state
  12206. //------------------------------------------------------------------
  12207. _[CHARACTER_REFERENCE_IN_RCDATA_STATE] = function characterReferenceInRcdataState(cp) {
  12208. this.additionalAllowedCp = void 0;
  12209. var referencedCodePoints = this._consumeCharacterReference(cp, false);
  12210. if (!this._ensureHibernation()) {
  12211. if (referencedCodePoints)
  12212. this._emitSeveralCodePoints(referencedCodePoints);
  12213. else
  12214. this._emitChar('&');
  12215. this.state = RCDATA_STATE;
  12216. }
  12217. };
  12218. //12.2.4.5 RAWTEXT state
  12219. //------------------------------------------------------------------
  12220. _[RAWTEXT_STATE] = function rawtextState(cp) {
  12221. this.preprocessor.dropParsedChunk();
  12222. if (cp === $.LESS_THAN_SIGN)
  12223. this.state = RAWTEXT_LESS_THAN_SIGN_STATE;
  12224. else if (cp === $.NULL)
  12225. this._emitChar(UNICODE.REPLACEMENT_CHARACTER);
  12226. else if (cp === $.EOF)
  12227. this._emitEOFToken();
  12228. else
  12229. this._emitCodePoint(cp);
  12230. };
  12231. //12.2.4.6 Script data state
  12232. //------------------------------------------------------------------
  12233. _[SCRIPT_DATA_STATE] = function scriptDataState(cp) {
  12234. this.preprocessor.dropParsedChunk();
  12235. if (cp === $.LESS_THAN_SIGN)
  12236. this.state = SCRIPT_DATA_LESS_THAN_SIGN_STATE;
  12237. else if (cp === $.NULL)
  12238. this._emitChar(UNICODE.REPLACEMENT_CHARACTER);
  12239. else if (cp === $.EOF)
  12240. this._emitEOFToken();
  12241. else
  12242. this._emitCodePoint(cp);
  12243. };
  12244. //12.2.4.7 PLAINTEXT state
  12245. //------------------------------------------------------------------
  12246. _[PLAINTEXT_STATE] = function plaintextState(cp) {
  12247. this.preprocessor.dropParsedChunk();
  12248. if (cp === $.NULL)
  12249. this._emitChar(UNICODE.REPLACEMENT_CHARACTER);
  12250. else if (cp === $.EOF)
  12251. this._emitEOFToken();
  12252. else
  12253. this._emitCodePoint(cp);
  12254. };
  12255. //12.2.4.8 Tag open state
  12256. //------------------------------------------------------------------
  12257. _[TAG_OPEN_STATE] = function tagOpenState(cp) {
  12258. if (cp === $.EXCLAMATION_MARK)
  12259. this.state = MARKUP_DECLARATION_OPEN_STATE;
  12260. else if (cp === $.SOLIDUS)
  12261. this.state = END_TAG_OPEN_STATE;
  12262. else if (isAsciiLetter(cp)) {
  12263. this._createStartTagToken();
  12264. this._reconsumeInState(TAG_NAME_STATE);
  12265. }
  12266. else if (cp === $.QUESTION_MARK)
  12267. this._reconsumeInState(BOGUS_COMMENT_STATE);
  12268. else {
  12269. this._emitChar('<');
  12270. this._reconsumeInState(DATA_STATE);
  12271. }
  12272. };
  12273. //12.2.4.9 End tag open state
  12274. //------------------------------------------------------------------
  12275. _[END_TAG_OPEN_STATE] = function endTagOpenState(cp) {
  12276. if (isAsciiLetter(cp)) {
  12277. this._createEndTagToken();
  12278. this._reconsumeInState(TAG_NAME_STATE);
  12279. }
  12280. else if (cp === $.GREATER_THAN_SIGN)
  12281. this.state = DATA_STATE;
  12282. else if (cp === $.EOF) {
  12283. this._reconsumeInState(DATA_STATE);
  12284. this._emitChar('<');
  12285. this._emitChar('/');
  12286. }
  12287. else
  12288. this._reconsumeInState(BOGUS_COMMENT_STATE);
  12289. };
  12290. //12.2.4.10 Tag name state
  12291. //------------------------------------------------------------------
  12292. _[TAG_NAME_STATE] = function tagNameState(cp) {
  12293. if (isWhitespace(cp))
  12294. this.state = BEFORE_ATTRIBUTE_NAME_STATE;
  12295. else if (cp === $.SOLIDUS)
  12296. this.state = SELF_CLOSING_START_TAG_STATE;
  12297. else if (cp === $.GREATER_THAN_SIGN) {
  12298. this.state = DATA_STATE;
  12299. this._emitCurrentToken();
  12300. }
  12301. else if (isAsciiUpper(cp))
  12302. this.currentToken.tagName += toAsciiLowerChar(cp);
  12303. else if (cp === $.NULL)
  12304. this.currentToken.tagName += UNICODE.REPLACEMENT_CHARACTER;
  12305. else if (cp === $.EOF)
  12306. this._reconsumeInState(DATA_STATE);
  12307. else
  12308. this.currentToken.tagName += toChar(cp);
  12309. };
  12310. //12.2.4.11 RCDATA less-than sign state
  12311. //------------------------------------------------------------------
  12312. _[RCDATA_LESS_THAN_SIGN_STATE] = function rcdataLessThanSignState(cp) {
  12313. if (cp === $.SOLIDUS) {
  12314. this.tempBuff = [];
  12315. this.state = RCDATA_END_TAG_OPEN_STATE;
  12316. }
  12317. else {
  12318. this._emitChar('<');
  12319. this._reconsumeInState(RCDATA_STATE);
  12320. }
  12321. };
  12322. //12.2.4.12 RCDATA end tag open state
  12323. //------------------------------------------------------------------
  12324. _[RCDATA_END_TAG_OPEN_STATE] = function rcdataEndTagOpenState(cp) {
  12325. if (isAsciiLetter(cp)) {
  12326. this._createEndTagToken();
  12327. this._reconsumeInState(RCDATA_END_TAG_NAME_STATE);
  12328. }
  12329. else {
  12330. this._emitChar('<');
  12331. this._emitChar('/');
  12332. this._reconsumeInState(RCDATA_STATE);
  12333. }
  12334. };
  12335. //12.2.4.13 RCDATA end tag name state
  12336. //------------------------------------------------------------------
  12337. _[RCDATA_END_TAG_NAME_STATE] = function rcdataEndTagNameState(cp) {
  12338. if (isAsciiUpper(cp)) {
  12339. this.currentToken.tagName += toAsciiLowerChar(cp);
  12340. this.tempBuff.push(cp);
  12341. }
  12342. else if (isAsciiLower(cp)) {
  12343. this.currentToken.tagName += toChar(cp);
  12344. this.tempBuff.push(cp);
  12345. }
  12346. else {
  12347. if (this._isAppropriateEndTagToken()) {
  12348. if (isWhitespace(cp)) {
  12349. this.state = BEFORE_ATTRIBUTE_NAME_STATE;
  12350. return;
  12351. }
  12352. if (cp === $.SOLIDUS) {
  12353. this.state = SELF_CLOSING_START_TAG_STATE;
  12354. return;
  12355. }
  12356. if (cp === $.GREATER_THAN_SIGN) {
  12357. this.state = DATA_STATE;
  12358. this._emitCurrentToken();
  12359. return;
  12360. }
  12361. }
  12362. this._emitChar('<');
  12363. this._emitChar('/');
  12364. this._emitSeveralCodePoints(this.tempBuff);
  12365. this._reconsumeInState(RCDATA_STATE);
  12366. }
  12367. };
  12368. //12.2.4.14 RAWTEXT less-than sign state
  12369. //------------------------------------------------------------------
  12370. _[RAWTEXT_LESS_THAN_SIGN_STATE] = function rawtextLessThanSignState(cp) {
  12371. if (cp === $.SOLIDUS) {
  12372. this.tempBuff = [];
  12373. this.state = RAWTEXT_END_TAG_OPEN_STATE;
  12374. }
  12375. else {
  12376. this._emitChar('<');
  12377. this._reconsumeInState(RAWTEXT_STATE);
  12378. }
  12379. };
  12380. //12.2.4.15 RAWTEXT end tag open state
  12381. //------------------------------------------------------------------
  12382. _[RAWTEXT_END_TAG_OPEN_STATE] = function rawtextEndTagOpenState(cp) {
  12383. if (isAsciiLetter(cp)) {
  12384. this._createEndTagToken();
  12385. this._reconsumeInState(RAWTEXT_END_TAG_NAME_STATE);
  12386. }
  12387. else {
  12388. this._emitChar('<');
  12389. this._emitChar('/');
  12390. this._reconsumeInState(RAWTEXT_STATE);
  12391. }
  12392. };
  12393. //12.2.4.16 RAWTEXT end tag name state
  12394. //------------------------------------------------------------------
  12395. _[RAWTEXT_END_TAG_NAME_STATE] = function rawtextEndTagNameState(cp) {
  12396. if (isAsciiUpper(cp)) {
  12397. this.currentToken.tagName += toAsciiLowerChar(cp);
  12398. this.tempBuff.push(cp);
  12399. }
  12400. else if (isAsciiLower(cp)) {
  12401. this.currentToken.tagName += toChar(cp);
  12402. this.tempBuff.push(cp);
  12403. }
  12404. else {
  12405. if (this._isAppropriateEndTagToken()) {
  12406. if (isWhitespace(cp)) {
  12407. this.state = BEFORE_ATTRIBUTE_NAME_STATE;
  12408. return;
  12409. }
  12410. if (cp === $.SOLIDUS) {
  12411. this.state = SELF_CLOSING_START_TAG_STATE;
  12412. return;
  12413. }
  12414. if (cp === $.GREATER_THAN_SIGN) {
  12415. this._emitCurrentToken();
  12416. this.state = DATA_STATE;
  12417. return;
  12418. }
  12419. }
  12420. this._emitChar('<');
  12421. this._emitChar('/');
  12422. this._emitSeveralCodePoints(this.tempBuff);
  12423. this._reconsumeInState(RAWTEXT_STATE);
  12424. }
  12425. };
  12426. //12.2.4.17 Script data less-than sign state
  12427. //------------------------------------------------------------------
  12428. _[SCRIPT_DATA_LESS_THAN_SIGN_STATE] = function scriptDataLessThanSignState(cp) {
  12429. if (cp === $.SOLIDUS) {
  12430. this.tempBuff = [];
  12431. this.state = SCRIPT_DATA_END_TAG_OPEN_STATE;
  12432. }
  12433. else if (cp === $.EXCLAMATION_MARK) {
  12434. this.state = SCRIPT_DATA_ESCAPE_START_STATE;
  12435. this._emitChar('<');
  12436. this._emitChar('!');
  12437. }
  12438. else {
  12439. this._emitChar('<');
  12440. this._reconsumeInState(SCRIPT_DATA_STATE);
  12441. }
  12442. };
  12443. //12.2.4.18 Script data end tag open state
  12444. //------------------------------------------------------------------
  12445. _[SCRIPT_DATA_END_TAG_OPEN_STATE] = function scriptDataEndTagOpenState(cp) {
  12446. if (isAsciiLetter(cp)) {
  12447. this._createEndTagToken();
  12448. this._reconsumeInState(SCRIPT_DATA_END_TAG_NAME_STATE);
  12449. }
  12450. else {
  12451. this._emitChar('<');
  12452. this._emitChar('/');
  12453. this._reconsumeInState(SCRIPT_DATA_STATE);
  12454. }
  12455. };
  12456. //12.2.4.19 Script data end tag name state
  12457. //------------------------------------------------------------------
  12458. _[SCRIPT_DATA_END_TAG_NAME_STATE] = function scriptDataEndTagNameState(cp) {
  12459. if (isAsciiUpper(cp)) {
  12460. this.currentToken.tagName += toAsciiLowerChar(cp);
  12461. this.tempBuff.push(cp);
  12462. }
  12463. else if (isAsciiLower(cp)) {
  12464. this.currentToken.tagName += toChar(cp);
  12465. this.tempBuff.push(cp);
  12466. }
  12467. else {
  12468. if (this._isAppropriateEndTagToken()) {
  12469. if (isWhitespace(cp)) {
  12470. this.state = BEFORE_ATTRIBUTE_NAME_STATE;
  12471. return;
  12472. }
  12473. else if (cp === $.SOLIDUS) {
  12474. this.state = SELF_CLOSING_START_TAG_STATE;
  12475. return;
  12476. }
  12477. else if (cp === $.GREATER_THAN_SIGN) {
  12478. this._emitCurrentToken();
  12479. this.state = DATA_STATE;
  12480. return;
  12481. }
  12482. }
  12483. this._emitChar('<');
  12484. this._emitChar('/');
  12485. this._emitSeveralCodePoints(this.tempBuff);
  12486. this._reconsumeInState(SCRIPT_DATA_STATE);
  12487. }
  12488. };
  12489. //12.2.4.20 Script data escape start state
  12490. //------------------------------------------------------------------
  12491. _[SCRIPT_DATA_ESCAPE_START_STATE] = function scriptDataEscapeStartState(cp) {
  12492. if (cp === $.HYPHEN_MINUS) {
  12493. this.state = SCRIPT_DATA_ESCAPE_START_DASH_STATE;
  12494. this._emitChar('-');
  12495. }
  12496. else
  12497. this._reconsumeInState(SCRIPT_DATA_STATE);
  12498. };
  12499. //12.2.4.21 Script data escape start dash state
  12500. //------------------------------------------------------------------
  12501. _[SCRIPT_DATA_ESCAPE_START_DASH_STATE] = function scriptDataEscapeStartDashState(cp) {
  12502. if (cp === $.HYPHEN_MINUS) {
  12503. this.state = SCRIPT_DATA_ESCAPED_DASH_DASH_STATE;
  12504. this._emitChar('-');
  12505. }
  12506. else
  12507. this._reconsumeInState(SCRIPT_DATA_STATE);
  12508. };
  12509. //12.2.4.22 Script data escaped state
  12510. //------------------------------------------------------------------
  12511. _[SCRIPT_DATA_ESCAPED_STATE] = function scriptDataEscapedState(cp) {
  12512. if (cp === $.HYPHEN_MINUS) {
  12513. this.state = SCRIPT_DATA_ESCAPED_DASH_STATE;
  12514. this._emitChar('-');
  12515. }
  12516. else if (cp === $.LESS_THAN_SIGN)
  12517. this.state = SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE;
  12518. else if (cp === $.NULL)
  12519. this._emitChar(UNICODE.REPLACEMENT_CHARACTER);
  12520. else if (cp === $.EOF)
  12521. this._reconsumeInState(DATA_STATE);
  12522. else
  12523. this._emitCodePoint(cp);
  12524. };
  12525. //12.2.4.23 Script data escaped dash state
  12526. //------------------------------------------------------------------
  12527. _[SCRIPT_DATA_ESCAPED_DASH_STATE] = function scriptDataEscapedDashState(cp) {
  12528. if (cp === $.HYPHEN_MINUS) {
  12529. this.state = SCRIPT_DATA_ESCAPED_DASH_DASH_STATE;
  12530. this._emitChar('-');
  12531. }
  12532. else if (cp === $.LESS_THAN_SIGN)
  12533. this.state = SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE;
  12534. else if (cp === $.NULL) {
  12535. this.state = SCRIPT_DATA_ESCAPED_STATE;
  12536. this._emitChar(UNICODE.REPLACEMENT_CHARACTER);
  12537. }
  12538. else if (cp === $.EOF)
  12539. this._reconsumeInState(DATA_STATE);
  12540. else {
  12541. this.state = SCRIPT_DATA_ESCAPED_STATE;
  12542. this._emitCodePoint(cp);
  12543. }
  12544. };
  12545. //12.2.4.24 Script data escaped dash dash state
  12546. //------------------------------------------------------------------
  12547. _[SCRIPT_DATA_ESCAPED_DASH_DASH_STATE] = function scriptDataEscapedDashDashState(cp) {
  12548. if (cp === $.HYPHEN_MINUS)
  12549. this._emitChar('-');
  12550. else if (cp === $.LESS_THAN_SIGN)
  12551. this.state = SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE;
  12552. else if (cp === $.GREATER_THAN_SIGN) {
  12553. this.state = SCRIPT_DATA_STATE;
  12554. this._emitChar('>');
  12555. }
  12556. else if (cp === $.NULL) {
  12557. this.state = SCRIPT_DATA_ESCAPED_STATE;
  12558. this._emitChar(UNICODE.REPLACEMENT_CHARACTER);
  12559. }
  12560. else if (cp === $.EOF)
  12561. this._reconsumeInState(DATA_STATE);
  12562. else {
  12563. this.state = SCRIPT_DATA_ESCAPED_STATE;
  12564. this._emitCodePoint(cp);
  12565. }
  12566. };
  12567. //12.2.4.25 Script data escaped less-than sign state
  12568. //------------------------------------------------------------------
  12569. _[SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE] = function scriptDataEscapedLessThanSignState(cp) {
  12570. if (cp === $.SOLIDUS) {
  12571. this.tempBuff = [];
  12572. this.state = SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE;
  12573. }
  12574. else if (isAsciiLetter(cp)) {
  12575. this.tempBuff = [];
  12576. this._emitChar('<');
  12577. this._reconsumeInState(SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE);
  12578. }
  12579. else {
  12580. this._emitChar('<');
  12581. this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE);
  12582. }
  12583. };
  12584. //12.2.4.26 Script data escaped end tag open state
  12585. //------------------------------------------------------------------
  12586. _[SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE] = function scriptDataEscapedEndTagOpenState(cp) {
  12587. if (isAsciiLetter(cp)) {
  12588. this._createEndTagToken();
  12589. this._reconsumeInState(SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE);
  12590. }
  12591. else {
  12592. this._emitChar('<');
  12593. this._emitChar('/');
  12594. this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE);
  12595. }
  12596. };
  12597. //12.2.4.27 Script data escaped end tag name state
  12598. //------------------------------------------------------------------
  12599. _[SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE] = function scriptDataEscapedEndTagNameState(cp) {
  12600. if (isAsciiUpper(cp)) {
  12601. this.currentToken.tagName += toAsciiLowerChar(cp);
  12602. this.tempBuff.push(cp);
  12603. }
  12604. else if (isAsciiLower(cp)) {
  12605. this.currentToken.tagName += toChar(cp);
  12606. this.tempBuff.push(cp);
  12607. }
  12608. else {
  12609. if (this._isAppropriateEndTagToken()) {
  12610. if (isWhitespace(cp)) {
  12611. this.state = BEFORE_ATTRIBUTE_NAME_STATE;
  12612. return;
  12613. }
  12614. if (cp === $.SOLIDUS) {
  12615. this.state = SELF_CLOSING_START_TAG_STATE;
  12616. return;
  12617. }
  12618. if (cp === $.GREATER_THAN_SIGN) {
  12619. this._emitCurrentToken();
  12620. this.state = DATA_STATE;
  12621. return;
  12622. }
  12623. }
  12624. this._emitChar('<');
  12625. this._emitChar('/');
  12626. this._emitSeveralCodePoints(this.tempBuff);
  12627. this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE);
  12628. }
  12629. };
  12630. //12.2.4.28 Script data double escape start state
  12631. //------------------------------------------------------------------
  12632. _[SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE] = function scriptDataDoubleEscapeStartState(cp) {
  12633. if (isWhitespace(cp) || cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN) {
  12634. this.state = this.isTempBufferEqualToScriptString() ? SCRIPT_DATA_DOUBLE_ESCAPED_STATE : SCRIPT_DATA_ESCAPED_STATE;
  12635. this._emitCodePoint(cp);
  12636. }
  12637. else if (isAsciiUpper(cp)) {
  12638. this.tempBuff.push(toAsciiLowerCodePoint(cp));
  12639. this._emitCodePoint(cp);
  12640. }
  12641. else if (isAsciiLower(cp)) {
  12642. this.tempBuff.push(cp);
  12643. this._emitCodePoint(cp);
  12644. }
  12645. else
  12646. this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE);
  12647. };
  12648. //12.2.4.29 Script data double escaped state
  12649. //------------------------------------------------------------------
  12650. _[SCRIPT_DATA_DOUBLE_ESCAPED_STATE] = function scriptDataDoubleEscapedState(cp) {
  12651. if (cp === $.HYPHEN_MINUS) {
  12652. this.state = SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE;
  12653. this._emitChar('-');
  12654. }
  12655. else if (cp === $.LESS_THAN_SIGN) {
  12656. this.state = SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE;
  12657. this._emitChar('<');
  12658. }
  12659. else if (cp === $.NULL)
  12660. this._emitChar(UNICODE.REPLACEMENT_CHARACTER);
  12661. else if (cp === $.EOF)
  12662. this._reconsumeInState(DATA_STATE);
  12663. else
  12664. this._emitCodePoint(cp);
  12665. };
  12666. //12.2.4.30 Script data double escaped dash state
  12667. //------------------------------------------------------------------
  12668. _[SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE] = function scriptDataDoubleEscapedDashState(cp) {
  12669. if (cp === $.HYPHEN_MINUS) {
  12670. this.state = SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE;
  12671. this._emitChar('-');
  12672. }
  12673. else if (cp === $.LESS_THAN_SIGN) {
  12674. this.state = SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE;
  12675. this._emitChar('<');
  12676. }
  12677. else if (cp === $.NULL) {
  12678. this.state = SCRIPT_DATA_DOUBLE_ESCAPED_STATE;
  12679. this._emitChar(UNICODE.REPLACEMENT_CHARACTER);
  12680. }
  12681. else if (cp === $.EOF)
  12682. this._reconsumeInState(DATA_STATE);
  12683. else {
  12684. this.state = SCRIPT_DATA_DOUBLE_ESCAPED_STATE;
  12685. this._emitCodePoint(cp);
  12686. }
  12687. };
  12688. //12.2.4.31 Script data double escaped dash dash state
  12689. //------------------------------------------------------------------
  12690. _[SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE] = function scriptDataDoubleEscapedDashDashState(cp) {
  12691. if (cp === $.HYPHEN_MINUS)
  12692. this._emitChar('-');
  12693. else if (cp === $.LESS_THAN_SIGN) {
  12694. this.state = SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE;
  12695. this._emitChar('<');
  12696. }
  12697. else if (cp === $.GREATER_THAN_SIGN) {
  12698. this.state = SCRIPT_DATA_STATE;
  12699. this._emitChar('>');
  12700. }
  12701. else if (cp === $.NULL) {
  12702. this.state = SCRIPT_DATA_DOUBLE_ESCAPED_STATE;
  12703. this._emitChar(UNICODE.REPLACEMENT_CHARACTER);
  12704. }
  12705. else if (cp === $.EOF)
  12706. this._reconsumeInState(DATA_STATE);
  12707. else {
  12708. this.state = SCRIPT_DATA_DOUBLE_ESCAPED_STATE;
  12709. this._emitCodePoint(cp);
  12710. }
  12711. };
  12712. //12.2.4.32 Script data double escaped less-than sign state
  12713. //------------------------------------------------------------------
  12714. _[SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE] = function scriptDataDoubleEscapedLessThanSignState(cp) {
  12715. if (cp === $.SOLIDUS) {
  12716. this.tempBuff = [];
  12717. this.state = SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE;
  12718. this._emitChar('/');
  12719. }
  12720. else
  12721. this._reconsumeInState(SCRIPT_DATA_DOUBLE_ESCAPED_STATE);
  12722. };
  12723. //12.2.4.33 Script data double escape end state
  12724. //------------------------------------------------------------------
  12725. _[SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE] = function scriptDataDoubleEscapeEndState(cp) {
  12726. if (isWhitespace(cp) || cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN) {
  12727. this.state = this.isTempBufferEqualToScriptString() ? SCRIPT_DATA_ESCAPED_STATE : SCRIPT_DATA_DOUBLE_ESCAPED_STATE;
  12728. this._emitCodePoint(cp);
  12729. }
  12730. else if (isAsciiUpper(cp)) {
  12731. this.tempBuff.push(toAsciiLowerCodePoint(cp));
  12732. this._emitCodePoint(cp);
  12733. }
  12734. else if (isAsciiLower(cp)) {
  12735. this.tempBuff.push(cp);
  12736. this._emitCodePoint(cp);
  12737. }
  12738. else
  12739. this._reconsumeInState(SCRIPT_DATA_DOUBLE_ESCAPED_STATE);
  12740. };
  12741. //12.2.4.34 Before attribute name state
  12742. //------------------------------------------------------------------
  12743. _[BEFORE_ATTRIBUTE_NAME_STATE] = function beforeAttributeNameState(cp) {
  12744. if (isWhitespace(cp))
  12745. return;
  12746. if (cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN || cp === $.EOF)
  12747. this._reconsumeInState(AFTER_ATTRIBUTE_NAME_STATE);
  12748. else if (cp === $.EQUALS_SIGN) {
  12749. this._createAttr('=');
  12750. this.state = ATTRIBUTE_NAME_STATE;
  12751. }
  12752. else {
  12753. this._createAttr('');
  12754. this._reconsumeInState(ATTRIBUTE_NAME_STATE);
  12755. }
  12756. };
  12757. //12.2.4.35 Attribute name state
  12758. //------------------------------------------------------------------
  12759. _[ATTRIBUTE_NAME_STATE] = function attributeNameState(cp) {
  12760. if (isWhitespace(cp) || cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN || cp === $.EOF) {
  12761. this._leaveAttrName(AFTER_ATTRIBUTE_NAME_STATE);
  12762. this._unconsume();
  12763. }
  12764. else if (cp === $.EQUALS_SIGN)
  12765. this._leaveAttrName(BEFORE_ATTRIBUTE_VALUE_STATE);
  12766. else if (isAsciiUpper(cp))
  12767. this.currentAttr.name += toAsciiLowerChar(cp);
  12768. else if (cp === $.QUOTATION_MARK || cp === $.APOSTROPHE || cp === $.LESS_THAN_SIGN)
  12769. this.currentAttr.name += toChar(cp);
  12770. else if (cp === $.NULL)
  12771. this.currentAttr.name += UNICODE.REPLACEMENT_CHARACTER;
  12772. else
  12773. this.currentAttr.name += toChar(cp);
  12774. };
  12775. //12.2.4.36 After attribute name state
  12776. //------------------------------------------------------------------
  12777. _[AFTER_ATTRIBUTE_NAME_STATE] = function afterAttributeNameState(cp) {
  12778. if (isWhitespace(cp))
  12779. return;
  12780. if (cp === $.SOLIDUS)
  12781. this.state = SELF_CLOSING_START_TAG_STATE;
  12782. else if (cp === $.EQUALS_SIGN)
  12783. this.state = BEFORE_ATTRIBUTE_VALUE_STATE;
  12784. else if (cp === $.GREATER_THAN_SIGN) {
  12785. this.state = DATA_STATE;
  12786. this._emitCurrentToken();
  12787. }
  12788. else if (cp === $.EOF)
  12789. this._reconsumeInState(DATA_STATE);
  12790. else {
  12791. this._createAttr('');
  12792. this._reconsumeInState(ATTRIBUTE_NAME_STATE);
  12793. }
  12794. };
  12795. //12.2.4.37 Before attribute value state
  12796. //------------------------------------------------------------------
  12797. _[BEFORE_ATTRIBUTE_VALUE_STATE] = function beforeAttributeValueState(cp) {
  12798. if (isWhitespace(cp))
  12799. return;
  12800. if (cp === $.QUOTATION_MARK)
  12801. this.state = ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE;
  12802. else if (cp === $.APOSTROPHE)
  12803. this.state = ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE;
  12804. else
  12805. this._reconsumeInState(ATTRIBUTE_VALUE_UNQUOTED_STATE);
  12806. };
  12807. //12.2.4.38 Attribute value (double-quoted) state
  12808. //------------------------------------------------------------------
  12809. _[ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE] = function attributeValueDoubleQuotedState(cp) {
  12810. if (cp === $.QUOTATION_MARK)
  12811. this.state = AFTER_ATTRIBUTE_VALUE_QUOTED_STATE;
  12812. else if (cp === $.AMPERSAND) {
  12813. this.additionalAllowedCp = $.QUOTATION_MARK;
  12814. this.returnState = this.state;
  12815. this.state = CHARACTER_REFERENCE_IN_ATTRIBUTE_VALUE_STATE;
  12816. }
  12817. else if (cp === $.NULL)
  12818. this.currentAttr.value += UNICODE.REPLACEMENT_CHARACTER;
  12819. else if (cp === $.EOF)
  12820. this._reconsumeInState(DATA_STATE);
  12821. else
  12822. this.currentAttr.value += toChar(cp);
  12823. };
  12824. //12.2.4.39 Attribute value (single-quoted) state
  12825. //------------------------------------------------------------------
  12826. _[ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE] = function attributeValueSingleQuotedState(cp) {
  12827. if (cp === $.APOSTROPHE)
  12828. this.state = AFTER_ATTRIBUTE_VALUE_QUOTED_STATE;
  12829. else if (cp === $.AMPERSAND) {
  12830. this.additionalAllowedCp = $.APOSTROPHE;
  12831. this.returnState = this.state;
  12832. this.state = CHARACTER_REFERENCE_IN_ATTRIBUTE_VALUE_STATE;
  12833. }
  12834. else if (cp === $.NULL)
  12835. this.currentAttr.value += UNICODE.REPLACEMENT_CHARACTER;
  12836. else if (cp === $.EOF)
  12837. this._reconsumeInState(DATA_STATE);
  12838. else
  12839. this.currentAttr.value += toChar(cp);
  12840. };
  12841. //12.2.4.40 Attribute value (unquoted) state
  12842. //------------------------------------------------------------------
  12843. _[ATTRIBUTE_VALUE_UNQUOTED_STATE] = function attributeValueUnquotedState(cp) {
  12844. if (isWhitespace(cp))
  12845. this._leaveAttrValue(BEFORE_ATTRIBUTE_NAME_STATE);
  12846. else if (cp === $.AMPERSAND) {
  12847. this.additionalAllowedCp = $.GREATER_THAN_SIGN;
  12848. this.returnState = this.state;
  12849. this.state = CHARACTER_REFERENCE_IN_ATTRIBUTE_VALUE_STATE;
  12850. }
  12851. else if (cp === $.GREATER_THAN_SIGN) {
  12852. this._leaveAttrValue(DATA_STATE);
  12853. this._emitCurrentToken();
  12854. }
  12855. else if (cp === $.NULL)
  12856. this.currentAttr.value += UNICODE.REPLACEMENT_CHARACTER;
  12857. else if (cp === $.QUOTATION_MARK || cp === $.APOSTROPHE || cp === $.LESS_THAN_SIGN ||
  12858. cp === $.EQUALS_SIGN || cp === $.GRAVE_ACCENT)
  12859. this.currentAttr.value += toChar(cp);
  12860. else if (cp === $.EOF)
  12861. this._reconsumeInState(DATA_STATE);
  12862. else
  12863. this.currentAttr.value += toChar(cp);
  12864. };
  12865. //12.2.4.41 Character reference in attribute value state
  12866. //------------------------------------------------------------------
  12867. _[CHARACTER_REFERENCE_IN_ATTRIBUTE_VALUE_STATE] = function characterReferenceInAttributeValueState(cp) {
  12868. var referencedCodePoints = this._consumeCharacterReference(cp, true);
  12869. if (!this._ensureHibernation()) {
  12870. if (referencedCodePoints) {
  12871. for (var i = 0; i < referencedCodePoints.length; i++)
  12872. this.currentAttr.value += toChar(referencedCodePoints[i]);
  12873. }
  12874. else
  12875. this.currentAttr.value += '&';
  12876. this.state = this.returnState;
  12877. }
  12878. };
  12879. //12.2.4.42 After attribute value (quoted) state
  12880. //------------------------------------------------------------------
  12881. _[AFTER_ATTRIBUTE_VALUE_QUOTED_STATE] = function afterAttributeValueQuotedState(cp) {
  12882. if (isWhitespace(cp))
  12883. this._leaveAttrValue(BEFORE_ATTRIBUTE_NAME_STATE);
  12884. else if (cp === $.SOLIDUS)
  12885. this._leaveAttrValue(SELF_CLOSING_START_TAG_STATE);
  12886. else if (cp === $.GREATER_THAN_SIGN) {
  12887. this._leaveAttrValue(DATA_STATE);
  12888. this._emitCurrentToken();
  12889. }
  12890. else if (cp === $.EOF)
  12891. this._reconsumeInState(DATA_STATE);
  12892. else
  12893. this._reconsumeInState(BEFORE_ATTRIBUTE_NAME_STATE);
  12894. };
  12895. //12.2.4.43 Self-closing start tag state
  12896. //------------------------------------------------------------------
  12897. _[SELF_CLOSING_START_TAG_STATE] = function selfClosingStartTagState(cp) {
  12898. if (cp === $.GREATER_THAN_SIGN) {
  12899. this.currentToken.selfClosing = true;
  12900. this.state = DATA_STATE;
  12901. this._emitCurrentToken();
  12902. }
  12903. else if (cp === $.EOF)
  12904. this._reconsumeInState(DATA_STATE);
  12905. else
  12906. this._reconsumeInState(BEFORE_ATTRIBUTE_NAME_STATE);
  12907. };
  12908. //12.2.4.44 Bogus comment state
  12909. //------------------------------------------------------------------
  12910. _[BOGUS_COMMENT_STATE] = function bogusCommentState() {
  12911. this._createCommentToken();
  12912. this._reconsumeInState(BOGUS_COMMENT_STATE_CONTINUATION);
  12913. };
  12914. //HACK: to support streaming and make BOGUS_COMMENT_STATE reentrant we've
  12915. //introduced BOGUS_COMMENT_STATE_CONTINUATION state which will not produce
  12916. //comment token on each call.
  12917. _[BOGUS_COMMENT_STATE_CONTINUATION] = function bogusCommentStateContinuation(cp) {
  12918. while (true) {
  12919. if (cp === $.GREATER_THAN_SIGN) {
  12920. this.state = DATA_STATE;
  12921. break;
  12922. }
  12923. else if (cp === $.EOF) {
  12924. this._reconsumeInState(DATA_STATE);
  12925. break;
  12926. }
  12927. else {
  12928. this.currentToken.data += cp === $.NULL ? UNICODE.REPLACEMENT_CHARACTER : toChar(cp);
  12929. this._hibernationSnapshot();
  12930. cp = this._consume();
  12931. if (this._ensureHibernation())
  12932. return;
  12933. }
  12934. }
  12935. this._emitCurrentToken();
  12936. };
  12937. //12.2.4.45 Markup declaration open state
  12938. //------------------------------------------------------------------
  12939. _[MARKUP_DECLARATION_OPEN_STATE] = function markupDeclarationOpenState(cp) {
  12940. var dashDashMatch = this._consumeSubsequentIfMatch($$.DASH_DASH_STRING, cp, true),
  12941. doctypeMatch = !dashDashMatch && this._consumeSubsequentIfMatch($$.DOCTYPE_STRING, cp, false),
  12942. cdataMatch = !dashDashMatch && !doctypeMatch &&
  12943. this.allowCDATA &&
  12944. this._consumeSubsequentIfMatch($$.CDATA_START_STRING, cp, true);
  12945. if (!this._ensureHibernation()) {
  12946. if (dashDashMatch) {
  12947. this._createCommentToken();
  12948. this.state = COMMENT_START_STATE;
  12949. }
  12950. else if (doctypeMatch)
  12951. this.state = DOCTYPE_STATE;
  12952. else if (cdataMatch)
  12953. this.state = CDATA_SECTION_STATE;
  12954. else
  12955. this._reconsumeInState(BOGUS_COMMENT_STATE);
  12956. }
  12957. };
  12958. //12.2.4.46 Comment start state
  12959. //------------------------------------------------------------------
  12960. _[COMMENT_START_STATE] = function commentStartState(cp) {
  12961. if (cp === $.HYPHEN_MINUS)
  12962. this.state = COMMENT_START_DASH_STATE;
  12963. else if (cp === $.NULL) {
  12964. this.currentToken.data += UNICODE.REPLACEMENT_CHARACTER;
  12965. this.state = COMMENT_STATE;
  12966. }
  12967. else if (cp === $.GREATER_THAN_SIGN) {
  12968. this.state = DATA_STATE;
  12969. this._emitCurrentToken();
  12970. }
  12971. else if (cp === $.EOF) {
  12972. this._emitCurrentToken();
  12973. this._reconsumeInState(DATA_STATE);
  12974. }
  12975. else {
  12976. this.currentToken.data += toChar(cp);
  12977. this.state = COMMENT_STATE;
  12978. }
  12979. };
  12980. //12.2.4.47 Comment start dash state
  12981. //------------------------------------------------------------------
  12982. _[COMMENT_START_DASH_STATE] = function commentStartDashState(cp) {
  12983. if (cp === $.HYPHEN_MINUS)
  12984. this.state = COMMENT_END_STATE;
  12985. else if (cp === $.NULL) {
  12986. this.currentToken.data += '-';
  12987. this.currentToken.data += UNICODE.REPLACEMENT_CHARACTER;
  12988. this.state = COMMENT_STATE;
  12989. }
  12990. else if (cp === $.GREATER_THAN_SIGN) {
  12991. this.state = DATA_STATE;
  12992. this._emitCurrentToken();
  12993. }
  12994. else if (cp === $.EOF) {
  12995. this._emitCurrentToken();
  12996. this._reconsumeInState(DATA_STATE);
  12997. }
  12998. else {
  12999. this.currentToken.data += '-';
  13000. this.currentToken.data += toChar(cp);
  13001. this.state = COMMENT_STATE;
  13002. }
  13003. };
  13004. //12.2.4.48 Comment state
  13005. //------------------------------------------------------------------
  13006. _[COMMENT_STATE] = function commentState(cp) {
  13007. if (cp === $.HYPHEN_MINUS)
  13008. this.state = COMMENT_END_DASH_STATE;
  13009. else if (cp === $.NULL)
  13010. this.currentToken.data += UNICODE.REPLACEMENT_CHARACTER;
  13011. else if (cp === $.EOF) {
  13012. this._emitCurrentToken();
  13013. this._reconsumeInState(DATA_STATE);
  13014. }
  13015. else
  13016. this.currentToken.data += toChar(cp);
  13017. };
  13018. //12.2.4.49 Comment end dash state
  13019. //------------------------------------------------------------------
  13020. _[COMMENT_END_DASH_STATE] = function commentEndDashState(cp) {
  13021. if (cp === $.HYPHEN_MINUS)
  13022. this.state = COMMENT_END_STATE;
  13023. else if (cp === $.NULL) {
  13024. this.currentToken.data += '-';
  13025. this.currentToken.data += UNICODE.REPLACEMENT_CHARACTER;
  13026. this.state = COMMENT_STATE;
  13027. }
  13028. else if (cp === $.EOF) {
  13029. this._emitCurrentToken();
  13030. this._reconsumeInState(DATA_STATE);
  13031. }
  13032. else {
  13033. this.currentToken.data += '-';
  13034. this.currentToken.data += toChar(cp);
  13035. this.state = COMMENT_STATE;
  13036. }
  13037. };
  13038. //12.2.4.50 Comment end state
  13039. //------------------------------------------------------------------
  13040. _[COMMENT_END_STATE] = function commentEndState(cp) {
  13041. if (cp === $.GREATER_THAN_SIGN) {
  13042. this.state = DATA_STATE;
  13043. this._emitCurrentToken();
  13044. }
  13045. else if (cp === $.EXCLAMATION_MARK)
  13046. this.state = COMMENT_END_BANG_STATE;
  13047. else if (cp === $.HYPHEN_MINUS)
  13048. this.currentToken.data += '-';
  13049. else if (cp === $.NULL) {
  13050. this.currentToken.data += '--';
  13051. this.currentToken.data += UNICODE.REPLACEMENT_CHARACTER;
  13052. this.state = COMMENT_STATE;
  13053. }
  13054. else if (cp === $.EOF) {
  13055. this._reconsumeInState(DATA_STATE);
  13056. this._emitCurrentToken();
  13057. }
  13058. else {
  13059. this.currentToken.data += '--';
  13060. this.currentToken.data += toChar(cp);
  13061. this.state = COMMENT_STATE;
  13062. }
  13063. };
  13064. //12.2.4.51 Comment end bang state
  13065. //------------------------------------------------------------------
  13066. _[COMMENT_END_BANG_STATE] = function commentEndBangState(cp) {
  13067. if (cp === $.HYPHEN_MINUS) {
  13068. this.currentToken.data += '--!';
  13069. this.state = COMMENT_END_DASH_STATE;
  13070. }
  13071. else if (cp === $.GREATER_THAN_SIGN) {
  13072. this.state = DATA_STATE;
  13073. this._emitCurrentToken();
  13074. }
  13075. else if (cp === $.NULL) {
  13076. this.currentToken.data += '--!';
  13077. this.currentToken.data += UNICODE.REPLACEMENT_CHARACTER;
  13078. this.state = COMMENT_STATE;
  13079. }
  13080. else if (cp === $.EOF) {
  13081. this._emitCurrentToken();
  13082. this._reconsumeInState(DATA_STATE);
  13083. }
  13084. else {
  13085. this.currentToken.data += '--!';
  13086. this.currentToken.data += toChar(cp);
  13087. this.state = COMMENT_STATE;
  13088. }
  13089. };
  13090. //12.2.4.52 DOCTYPE state
  13091. //------------------------------------------------------------------
  13092. _[DOCTYPE_STATE] = function doctypeState(cp) {
  13093. if (isWhitespace(cp))
  13094. return;
  13095. else if (cp === $.GREATER_THAN_SIGN) {
  13096. this._createDoctypeToken(null);
  13097. this.currentToken.forceQuirks = true;
  13098. this._emitCurrentToken();
  13099. this.state = DATA_STATE;
  13100. }
  13101. else if (cp === $.EOF) {
  13102. this._createDoctypeToken(null);
  13103. this.currentToken.forceQuirks = true;
  13104. this._emitCurrentToken();
  13105. this._reconsumeInState(DATA_STATE);
  13106. }
  13107. else {
  13108. this._createDoctypeToken('');
  13109. this._reconsumeInState(DOCTYPE_NAME_STATE);
  13110. }
  13111. };
  13112. //12.2.4.54 DOCTYPE name state
  13113. //------------------------------------------------------------------
  13114. _[DOCTYPE_NAME_STATE] = function doctypeNameState(cp) {
  13115. if (isWhitespace(cp) || cp === $.GREATER_THAN_SIGN || cp === $.EOF)
  13116. this._reconsumeInState(AFTER_DOCTYPE_NAME_STATE);
  13117. else if (isAsciiUpper(cp))
  13118. this.currentToken.name += toAsciiLowerChar(cp);
  13119. else if (cp === $.NULL)
  13120. this.currentToken.name += UNICODE.REPLACEMENT_CHARACTER;
  13121. else
  13122. this.currentToken.name += toChar(cp);
  13123. };
  13124. //12.2.4.55 After DOCTYPE name state
  13125. //------------------------------------------------------------------
  13126. _[AFTER_DOCTYPE_NAME_STATE] = function afterDoctypeNameState(cp) {
  13127. if (isWhitespace(cp))
  13128. return;
  13129. if (cp === $.GREATER_THAN_SIGN) {
  13130. this.state = DATA_STATE;
  13131. this._emitCurrentToken();
  13132. }
  13133. else {
  13134. var publicMatch = this._consumeSubsequentIfMatch($$.PUBLIC_STRING, cp, false),
  13135. systemMatch = !publicMatch && this._consumeSubsequentIfMatch($$.SYSTEM_STRING, cp, false);
  13136. if (!this._ensureHibernation()) {
  13137. if (publicMatch)
  13138. this.state = BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE;
  13139. else if (systemMatch)
  13140. this.state = BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE;
  13141. else {
  13142. this.currentToken.forceQuirks = true;
  13143. this.state = BOGUS_DOCTYPE_STATE;
  13144. }
  13145. }
  13146. }
  13147. };
  13148. //12.2.4.57 Before DOCTYPE public identifier state
  13149. //------------------------------------------------------------------
  13150. _[BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE] = function beforeDoctypePublicIdentifierState(cp) {
  13151. if (isWhitespace(cp))
  13152. return;
  13153. if (cp === $.QUOTATION_MARK) {
  13154. this.currentToken.publicId = '';
  13155. this.state = DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE;
  13156. }
  13157. else if (cp === $.APOSTROPHE) {
  13158. this.currentToken.publicId = '';
  13159. this.state = DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE;
  13160. }
  13161. else {
  13162. this.currentToken.forceQuirks = true;
  13163. this._reconsumeInState(BOGUS_DOCTYPE_STATE);
  13164. }
  13165. };
  13166. //12.2.4.58 DOCTYPE public identifier (double-quoted) state
  13167. //------------------------------------------------------------------
  13168. _[DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE] = function doctypePublicIdentifierDoubleQuotedState(cp) {
  13169. if (cp === $.QUOTATION_MARK)
  13170. this.state = BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE;
  13171. else if (cp === $.NULL)
  13172. this.currentToken.publicId += UNICODE.REPLACEMENT_CHARACTER;
  13173. else if (cp === $.GREATER_THAN_SIGN) {
  13174. this.currentToken.forceQuirks = true;
  13175. this._emitCurrentToken();
  13176. this.state = DATA_STATE;
  13177. }
  13178. else if (cp === $.EOF) {
  13179. this.currentToken.forceQuirks = true;
  13180. this._emitCurrentToken();
  13181. this._reconsumeInState(DATA_STATE);
  13182. }
  13183. else
  13184. this.currentToken.publicId += toChar(cp);
  13185. };
  13186. //12.2.4.59 DOCTYPE public identifier (single-quoted) state
  13187. //------------------------------------------------------------------
  13188. _[DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE] = function doctypePublicIdentifierSingleQuotedState(cp) {
  13189. if (cp === $.APOSTROPHE)
  13190. this.state = BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE;
  13191. else if (cp === $.NULL)
  13192. this.currentToken.publicId += UNICODE.REPLACEMENT_CHARACTER;
  13193. else if (cp === $.GREATER_THAN_SIGN) {
  13194. this.currentToken.forceQuirks = true;
  13195. this._emitCurrentToken();
  13196. this.state = DATA_STATE;
  13197. }
  13198. else if (cp === $.EOF) {
  13199. this.currentToken.forceQuirks = true;
  13200. this._emitCurrentToken();
  13201. this._reconsumeInState(DATA_STATE);
  13202. }
  13203. else
  13204. this.currentToken.publicId += toChar(cp);
  13205. };
  13206. //12.2.4.61 Between DOCTYPE public and system identifiers state
  13207. //------------------------------------------------------------------
  13208. _[BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE] = function betweenDoctypePublicAndSystemIdentifiersState(cp) {
  13209. if (isWhitespace(cp))
  13210. return;
  13211. if (cp === $.GREATER_THAN_SIGN) {
  13212. this._emitCurrentToken();
  13213. this.state = DATA_STATE;
  13214. }
  13215. else if (cp === $.QUOTATION_MARK) {
  13216. this.currentToken.systemId = '';
  13217. this.state = DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE;
  13218. }
  13219. else if (cp === $.APOSTROPHE) {
  13220. this.currentToken.systemId = '';
  13221. this.state = DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE;
  13222. }
  13223. else {
  13224. this.currentToken.forceQuirks = true;
  13225. this._reconsumeInState(BOGUS_DOCTYPE_STATE);
  13226. }
  13227. };
  13228. //12.2.4.63 Before DOCTYPE system identifier state
  13229. //------------------------------------------------------------------
  13230. _[BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE] = function beforeDoctypeSystemIdentifierState(cp) {
  13231. if (isWhitespace(cp))
  13232. return;
  13233. if (cp === $.QUOTATION_MARK) {
  13234. this.currentToken.systemId = '';
  13235. this.state = DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE;
  13236. }
  13237. else if (cp === $.APOSTROPHE) {
  13238. this.currentToken.systemId = '';
  13239. this.state = DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE;
  13240. }
  13241. else {
  13242. this.currentToken.forceQuirks = true;
  13243. this._reconsumeInState(BOGUS_DOCTYPE_STATE);
  13244. }
  13245. };
  13246. //12.2.4.64 DOCTYPE system identifier (double-quoted) state
  13247. //------------------------------------------------------------------
  13248. _[DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE] = function doctypeSystemIdentifierDoubleQuotedState(cp) {
  13249. if (cp === $.QUOTATION_MARK)
  13250. this.state = AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE;
  13251. else if (cp === $.GREATER_THAN_SIGN) {
  13252. this.currentToken.forceQuirks = true;
  13253. this._emitCurrentToken();
  13254. this.state = DATA_STATE;
  13255. }
  13256. else if (cp === $.NULL)
  13257. this.currentToken.systemId += UNICODE.REPLACEMENT_CHARACTER;
  13258. else if (cp === $.EOF) {
  13259. this.currentToken.forceQuirks = true;
  13260. this._emitCurrentToken();
  13261. this._reconsumeInState(DATA_STATE);
  13262. }
  13263. else
  13264. this.currentToken.systemId += toChar(cp);
  13265. };
  13266. //12.2.4.65 DOCTYPE system identifier (single-quoted) state
  13267. //------------------------------------------------------------------
  13268. _[DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE] = function doctypeSystemIdentifierSingleQuotedState(cp) {
  13269. if (cp === $.APOSTROPHE)
  13270. this.state = AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE;
  13271. else if (cp === $.GREATER_THAN_SIGN) {
  13272. this.currentToken.forceQuirks = true;
  13273. this._emitCurrentToken();
  13274. this.state = DATA_STATE;
  13275. }
  13276. else if (cp === $.NULL)
  13277. this.currentToken.systemId += UNICODE.REPLACEMENT_CHARACTER;
  13278. else if (cp === $.EOF) {
  13279. this.currentToken.forceQuirks = true;
  13280. this._emitCurrentToken();
  13281. this._reconsumeInState(DATA_STATE);
  13282. }
  13283. else
  13284. this.currentToken.systemId += toChar(cp);
  13285. };
  13286. //12.2.4.66 After DOCTYPE system identifier state
  13287. //------------------------------------------------------------------
  13288. _[AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE] = function afterDoctypeSystemIdentifierState(cp) {
  13289. if (isWhitespace(cp))
  13290. return;
  13291. if (cp === $.GREATER_THAN_SIGN) {
  13292. this._emitCurrentToken();
  13293. this.state = DATA_STATE;
  13294. }
  13295. else if (cp === $.EOF) {
  13296. this.currentToken.forceQuirks = true;
  13297. this._emitCurrentToken();
  13298. this._reconsumeInState(DATA_STATE);
  13299. }
  13300. else
  13301. this.state = BOGUS_DOCTYPE_STATE;
  13302. };
  13303. //12.2.4.67 Bogus DOCTYPE state
  13304. //------------------------------------------------------------------
  13305. _[BOGUS_DOCTYPE_STATE] = function bogusDoctypeState(cp) {
  13306. if (cp === $.GREATER_THAN_SIGN) {
  13307. this._emitCurrentToken();
  13308. this.state = DATA_STATE;
  13309. }
  13310. else if (cp === $.EOF) {
  13311. this._emitCurrentToken();
  13312. this._reconsumeInState(DATA_STATE);
  13313. }
  13314. };
  13315. //12.2.4.68 CDATA section state
  13316. //------------------------------------------------------------------
  13317. _[CDATA_SECTION_STATE] = function cdataSectionState(cp) {
  13318. while (true) {
  13319. if (cp === $.EOF) {
  13320. this._reconsumeInState(DATA_STATE);
  13321. break;
  13322. }
  13323. else {
  13324. var cdataEndMatch = this._consumeSubsequentIfMatch($$.CDATA_END_STRING, cp, true);
  13325. if (this._ensureHibernation())
  13326. break;
  13327. if (cdataEndMatch) {
  13328. this.state = DATA_STATE;
  13329. break;
  13330. }
  13331. this._emitCodePoint(cp);
  13332. this._hibernationSnapshot();
  13333. cp = this._consume();
  13334. if (this._ensureHibernation())
  13335. break;
  13336. }
  13337. }
  13338. };
  13339. /***/ }),
  13340. /* 67 */
  13341. /***/ (function(module, exports) {
  13342. /**
  13343. * Performs a
  13344. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  13345. * comparison between two values to determine if they are equivalent.
  13346. *
  13347. * @static
  13348. * @memberOf _
  13349. * @since 4.0.0
  13350. * @category Lang
  13351. * @param {*} value The value to compare.
  13352. * @param {*} other The other value to compare.
  13353. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  13354. * @example
  13355. *
  13356. * var object = { 'a': 1 };
  13357. * var other = { 'a': 1 };
  13358. *
  13359. * _.eq(object, object);
  13360. * // => true
  13361. *
  13362. * _.eq(object, other);
  13363. * // => false
  13364. *
  13365. * _.eq('a', 'a');
  13366. * // => true
  13367. *
  13368. * _.eq('a', Object('a'));
  13369. * // => false
  13370. *
  13371. * _.eq(NaN, NaN);
  13372. * // => true
  13373. */
  13374. function eq(value, other) {
  13375. return value === other || (value !== value && other !== other);
  13376. }
  13377. module.exports = eq;
  13378. /***/ }),
  13379. /* 68 */
  13380. /***/ (function(module, exports) {
  13381. /**
  13382. * This method returns the first argument it receives.
  13383. *
  13384. * @static
  13385. * @since 0.1.0
  13386. * @memberOf _
  13387. * @category Util
  13388. * @param {*} value Any value.
  13389. * @returns {*} Returns `value`.
  13390. * @example
  13391. *
  13392. * var object = { 'a': 1 };
  13393. *
  13394. * console.log(_.identity(object) === object);
  13395. * // => true
  13396. */
  13397. function identity(value) {
  13398. return value;
  13399. }
  13400. module.exports = identity;
  13401. /***/ }),
  13402. /* 69 */
  13403. /***/ (function(module, exports, __webpack_require__) {
  13404. var baseForOwn = __webpack_require__(712),
  13405. createBaseEach = __webpack_require__(714);
  13406. /**
  13407. * The base implementation of `_.forEach` without support for iteratee shorthands.
  13408. *
  13409. * @private
  13410. * @param {Array|Object} collection The collection to iterate over.
  13411. * @param {Function} iteratee The function invoked per iteration.
  13412. * @returns {Array|Object} Returns `collection`.
  13413. */
  13414. var baseEach = createBaseEach(baseForOwn);
  13415. module.exports = baseEach;
  13416. /***/ }),
  13417. /* 70 */
  13418. /***/ (function(module, exports) {
  13419. module.exports = false;
  13420. /***/ }),
  13421. /* 71 */
  13422. /***/ (function(module, exports, __webpack_require__) {
  13423. var redefine = __webpack_require__(41);
  13424. module.exports = function (target, src, safe) {
  13425. for (var key in src) redefine(target, key, src[key], safe);
  13426. return target;
  13427. };
  13428. /***/ }),
  13429. /* 72 */
  13430. /***/ (function(module, exports) {
  13431. module.exports = function (it, Constructor, name, forbiddenField) {
  13432. if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
  13433. throw TypeError(name + ': incorrect invocation!');
  13434. } return it;
  13435. };
  13436. /***/ }),
  13437. /* 73 */
  13438. /***/ (function(module, exports) {
  13439. var toString = {}.toString;
  13440. module.exports = function (it) {
  13441. return toString.call(it).slice(8, -1);
  13442. };
  13443. /***/ }),
  13444. /* 74 */
  13445. /***/ (function(module, exports, __webpack_require__) {
  13446. var def = __webpack_require__(18).f;
  13447. var has = __webpack_require__(23);
  13448. var TAG = __webpack_require__(11)('toStringTag');
  13449. module.exports = function (it, tag, stat) {
  13450. if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
  13451. };
  13452. /***/ }),
  13453. /* 75 */
  13454. /***/ (function(module, exports) {
  13455. module.exports = {};
  13456. /***/ }),
  13457. /* 76 */
  13458. /***/ (function(module, exports, __webpack_require__) {
  13459. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  13460. var $keys = __webpack_require__(444);
  13461. var enumBugKeys = __webpack_require__(191);
  13462. module.exports = Object.keys || function keys(O) {
  13463. return $keys(O, enumBugKeys);
  13464. };
  13465. /***/ }),
  13466. /* 77 */
  13467. /***/ (function(module, exports, __webpack_require__) {
  13468. // 22.1.3.31 Array.prototype[@@unscopables]
  13469. var UNSCOPABLES = __webpack_require__(11)('unscopables');
  13470. var ArrayProto = Array.prototype;
  13471. if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(27)(ArrayProto, UNSCOPABLES, {});
  13472. module.exports = function (key) {
  13473. ArrayProto[UNSCOPABLES][key] = true;
  13474. };
  13475. /***/ }),
  13476. /* 78 */
  13477. /***/ (function(module, exports, __webpack_require__) {
  13478. var isObject = __webpack_require__(8);
  13479. module.exports = function (it, TYPE) {
  13480. if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
  13481. return it;
  13482. };
  13483. /***/ }),
  13484. /* 79 */
  13485. /***/ (function(module, exports, __webpack_require__) {
  13486. var baseGetTag = __webpack_require__(44),
  13487. isObject = __webpack_require__(25);
  13488. /** `Object#toString` result references. */
  13489. var asyncTag = '[object AsyncFunction]',
  13490. funcTag = '[object Function]',
  13491. genTag = '[object GeneratorFunction]',
  13492. proxyTag = '[object Proxy]';
  13493. /**
  13494. * Checks if `value` is classified as a `Function` object.
  13495. *
  13496. * @static
  13497. * @memberOf _
  13498. * @since 0.1.0
  13499. * @category Lang
  13500. * @param {*} value The value to check.
  13501. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  13502. * @example
  13503. *
  13504. * _.isFunction(_);
  13505. * // => true
  13506. *
  13507. * _.isFunction(/abc/);
  13508. * // => false
  13509. */
  13510. function isFunction(value) {
  13511. if (!isObject(value)) {
  13512. return false;
  13513. }
  13514. // The use of `Object#toString` avoids issues with the `typeof` operator
  13515. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  13516. var tag = baseGetTag(value);
  13517. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  13518. }
  13519. module.exports = isFunction;
  13520. /***/ }),
  13521. /* 80 */
  13522. /***/ (function(module, exports, __webpack_require__) {
  13523. var root = __webpack_require__(19);
  13524. /** Built-in value references. */
  13525. var Symbol = root.Symbol;
  13526. module.exports = Symbol;
  13527. /***/ }),
  13528. /* 81 */
  13529. /***/ (function(module, exports) {
  13530. module.exports = require("https");
  13531. /***/ }),
  13532. /* 82 */
  13533. /***/ (function(module, exports, __webpack_require__) {
  13534. "use strict";
  13535. // Load modules
  13536. const Crypto = __webpack_require__(5);
  13537. const Path = __webpack_require__(60);
  13538. const Util = __webpack_require__(2);
  13539. const Escape = __webpack_require__(533);
  13540. // Declare internals
  13541. const internals = {};
  13542. // Clone object or array
  13543. exports.clone = function (obj, seen) {
  13544. if (typeof obj !== 'object' ||
  13545. obj === null) {
  13546. return obj;
  13547. }
  13548. seen = seen || new Map();
  13549. const lookup = seen.get(obj);
  13550. if (lookup) {
  13551. return lookup;
  13552. }
  13553. let newObj;
  13554. let cloneDeep = false;
  13555. if (!Array.isArray(obj)) {
  13556. if (Buffer.isBuffer(obj)) {
  13557. newObj = new Buffer(obj);
  13558. }
  13559. else if (obj instanceof Date) {
  13560. newObj = new Date(obj.getTime());
  13561. }
  13562. else if (obj instanceof RegExp) {
  13563. newObj = new RegExp(obj);
  13564. }
  13565. else {
  13566. const proto = Object.getPrototypeOf(obj);
  13567. if (proto &&
  13568. proto.isImmutable) {
  13569. newObj = obj;
  13570. }
  13571. else {
  13572. newObj = Object.create(proto);
  13573. cloneDeep = true;
  13574. }
  13575. }
  13576. }
  13577. else {
  13578. newObj = [];
  13579. cloneDeep = true;
  13580. }
  13581. seen.set(obj, newObj);
  13582. if (cloneDeep) {
  13583. const keys = Object.getOwnPropertyNames(obj);
  13584. for (let i = 0; i < keys.length; ++i) {
  13585. const key = keys[i];
  13586. const descriptor = Object.getOwnPropertyDescriptor(obj, key);
  13587. if (descriptor &&
  13588. (descriptor.get ||
  13589. descriptor.set)) {
  13590. Object.defineProperty(newObj, key, descriptor);
  13591. }
  13592. else {
  13593. newObj[key] = exports.clone(obj[key], seen);
  13594. }
  13595. }
  13596. }
  13597. return newObj;
  13598. };
  13599. // Merge all the properties of source into target, source wins in conflict, and by default null and undefined from source are applied
  13600. /*eslint-disable */
  13601. exports.merge = function (target, source, isNullOverride /* = true */, isMergeArrays /* = true */) {
  13602. /*eslint-enable */
  13603. exports.assert(target && typeof target === 'object', 'Invalid target value: must be an object');
  13604. exports.assert(source === null || source === undefined || typeof source === 'object', 'Invalid source value: must be null, undefined, or an object');
  13605. if (!source) {
  13606. return target;
  13607. }
  13608. if (Array.isArray(source)) {
  13609. exports.assert(Array.isArray(target), 'Cannot merge array onto an object');
  13610. if (isMergeArrays === false) { // isMergeArrays defaults to true
  13611. target.length = 0; // Must not change target assignment
  13612. }
  13613. for (let i = 0; i < source.length; ++i) {
  13614. target.push(exports.clone(source[i]));
  13615. }
  13616. return target;
  13617. }
  13618. const keys = Object.keys(source);
  13619. for (let i = 0; i < keys.length; ++i) {
  13620. const key = keys[i];
  13621. const value = source[key];
  13622. if (value &&
  13623. typeof value === 'object') {
  13624. if (!target[key] ||
  13625. typeof target[key] !== 'object' ||
  13626. (Array.isArray(target[key]) !== Array.isArray(value)) ||
  13627. value instanceof Date ||
  13628. Buffer.isBuffer(value) ||
  13629. value instanceof RegExp) {
  13630. target[key] = exports.clone(value);
  13631. }
  13632. else {
  13633. exports.merge(target[key], value, isNullOverride, isMergeArrays);
  13634. }
  13635. }
  13636. else {
  13637. if (value !== null &&
  13638. value !== undefined) { // Explicit to preserve empty strings
  13639. target[key] = value;
  13640. }
  13641. else if (isNullOverride !== false) { // Defaults to true
  13642. target[key] = value;
  13643. }
  13644. }
  13645. }
  13646. return target;
  13647. };
  13648. // Apply options to a copy of the defaults
  13649. exports.applyToDefaults = function (defaults, options, isNullOverride) {
  13650. exports.assert(defaults && typeof defaults === 'object', 'Invalid defaults value: must be an object');
  13651. exports.assert(!options || options === true || typeof options === 'object', 'Invalid options value: must be true, falsy or an object');
  13652. if (!options) { // If no options, return null
  13653. return null;
  13654. }
  13655. const copy = exports.clone(defaults);
  13656. if (options === true) { // If options is set to true, use defaults
  13657. return copy;
  13658. }
  13659. return exports.merge(copy, options, isNullOverride === true, false);
  13660. };
  13661. // Clone an object except for the listed keys which are shallow copied
  13662. exports.cloneWithShallow = function (source, keys) {
  13663. if (!source ||
  13664. typeof source !== 'object') {
  13665. return source;
  13666. }
  13667. const storage = internals.store(source, keys); // Move shallow copy items to storage
  13668. const copy = exports.clone(source); // Deep copy the rest
  13669. internals.restore(copy, source, storage); // Shallow copy the stored items and restore
  13670. return copy;
  13671. };
  13672. internals.store = function (source, keys) {
  13673. const storage = {};
  13674. for (let i = 0; i < keys.length; ++i) {
  13675. const key = keys[i];
  13676. const value = exports.reach(source, key);
  13677. if (value !== undefined) {
  13678. storage[key] = value;
  13679. internals.reachSet(source, key, undefined);
  13680. }
  13681. }
  13682. return storage;
  13683. };
  13684. internals.restore = function (copy, source, storage) {
  13685. const keys = Object.keys(storage);
  13686. for (let i = 0; i < keys.length; ++i) {
  13687. const key = keys[i];
  13688. internals.reachSet(copy, key, storage[key]);
  13689. internals.reachSet(source, key, storage[key]);
  13690. }
  13691. };
  13692. internals.reachSet = function (obj, key, value) {
  13693. const path = key.split('.');
  13694. let ref = obj;
  13695. for (let i = 0; i < path.length; ++i) {
  13696. const segment = path[i];
  13697. if (i + 1 === path.length) {
  13698. ref[segment] = value;
  13699. }
  13700. ref = ref[segment];
  13701. }
  13702. };
  13703. // Apply options to defaults except for the listed keys which are shallow copied from option without merging
  13704. exports.applyToDefaultsWithShallow = function (defaults, options, keys) {
  13705. exports.assert(defaults && typeof defaults === 'object', 'Invalid defaults value: must be an object');
  13706. exports.assert(!options || options === true || typeof options === 'object', 'Invalid options value: must be true, falsy or an object');
  13707. exports.assert(keys && Array.isArray(keys), 'Invalid keys');
  13708. if (!options) { // If no options, return null
  13709. return null;
  13710. }
  13711. const copy = exports.cloneWithShallow(defaults, keys);
  13712. if (options === true) { // If options is set to true, use defaults
  13713. return copy;
  13714. }
  13715. const storage = internals.store(options, keys); // Move shallow copy items to storage
  13716. exports.merge(copy, options, false, false); // Deep copy the rest
  13717. internals.restore(copy, options, storage); // Shallow copy the stored items and restore
  13718. return copy;
  13719. };
  13720. // Deep object or array comparison
  13721. exports.deepEqual = function (obj, ref, options, seen) {
  13722. options = options || { prototype: true };
  13723. const type = typeof obj;
  13724. if (type !== typeof ref) {
  13725. return false;
  13726. }
  13727. if (type !== 'object' ||
  13728. obj === null ||
  13729. ref === null) {
  13730. if (obj === ref) { // Copied from Deep-eql, copyright(c) 2013 Jake Luer, jake@alogicalparadox.com, MIT Licensed, https://github.com/chaijs/deep-eql
  13731. return obj !== 0 || 1 / obj === 1 / ref; // -0 / +0
  13732. }
  13733. return obj !== obj && ref !== ref; // NaN
  13734. }
  13735. seen = seen || [];
  13736. if (seen.indexOf(obj) !== -1) {
  13737. return true; // If previous comparison failed, it would have stopped execution
  13738. }
  13739. seen.push(obj);
  13740. if (Array.isArray(obj)) {
  13741. if (!Array.isArray(ref)) {
  13742. return false;
  13743. }
  13744. if (!options.part && obj.length !== ref.length) {
  13745. return false;
  13746. }
  13747. for (let i = 0; i < obj.length; ++i) {
  13748. if (options.part) {
  13749. let found = false;
  13750. for (let j = 0; j < ref.length; ++j) {
  13751. if (exports.deepEqual(obj[i], ref[j], options)) {
  13752. found = true;
  13753. break;
  13754. }
  13755. }
  13756. return found;
  13757. }
  13758. if (!exports.deepEqual(obj[i], ref[i], options)) {
  13759. return false;
  13760. }
  13761. }
  13762. return true;
  13763. }
  13764. if (Buffer.isBuffer(obj)) {
  13765. if (!Buffer.isBuffer(ref)) {
  13766. return false;
  13767. }
  13768. if (obj.length !== ref.length) {
  13769. return false;
  13770. }
  13771. for (let i = 0; i < obj.length; ++i) {
  13772. if (obj[i] !== ref[i]) {
  13773. return false;
  13774. }
  13775. }
  13776. return true;
  13777. }
  13778. if (obj instanceof Date) {
  13779. return (ref instanceof Date && obj.getTime() === ref.getTime());
  13780. }
  13781. if (obj instanceof RegExp) {
  13782. return (ref instanceof RegExp && obj.toString() === ref.toString());
  13783. }
  13784. if (options.prototype) {
  13785. if (Object.getPrototypeOf(obj) !== Object.getPrototypeOf(ref)) {
  13786. return false;
  13787. }
  13788. }
  13789. const keys = Object.getOwnPropertyNames(obj);
  13790. if (!options.part && keys.length !== Object.getOwnPropertyNames(ref).length) {
  13791. return false;
  13792. }
  13793. for (let i = 0; i < keys.length; ++i) {
  13794. const key = keys[i];
  13795. const descriptor = Object.getOwnPropertyDescriptor(obj, key);
  13796. if (descriptor.get) {
  13797. if (!exports.deepEqual(descriptor, Object.getOwnPropertyDescriptor(ref, key), options, seen)) {
  13798. return false;
  13799. }
  13800. }
  13801. else if (!exports.deepEqual(obj[key], ref[key], options, seen)) {
  13802. return false;
  13803. }
  13804. }
  13805. return true;
  13806. };
  13807. // Remove duplicate items from array
  13808. exports.unique = (array, key) => {
  13809. let result;
  13810. if (key) {
  13811. result = [];
  13812. const index = new Set();
  13813. array.forEach((item) => {
  13814. const identifier = item[key];
  13815. if (!index.has(identifier)) {
  13816. index.add(identifier);
  13817. result.push(item);
  13818. }
  13819. });
  13820. }
  13821. else {
  13822. result = Array.from(new Set(array));
  13823. }
  13824. return result;
  13825. };
  13826. // Convert array into object
  13827. exports.mapToObject = function (array, key) {
  13828. if (!array) {
  13829. return null;
  13830. }
  13831. const obj = {};
  13832. for (let i = 0; i < array.length; ++i) {
  13833. if (key) {
  13834. if (array[i][key]) {
  13835. obj[array[i][key]] = true;
  13836. }
  13837. }
  13838. else {
  13839. obj[array[i]] = true;
  13840. }
  13841. }
  13842. return obj;
  13843. };
  13844. // Find the common unique items in two arrays
  13845. exports.intersect = function (array1, array2, justFirst) {
  13846. if (!array1 || !array2) {
  13847. return [];
  13848. }
  13849. const common = [];
  13850. const hash = (Array.isArray(array1) ? exports.mapToObject(array1) : array1);
  13851. const found = {};
  13852. for (let i = 0; i < array2.length; ++i) {
  13853. if (hash[array2[i]] && !found[array2[i]]) {
  13854. if (justFirst) {
  13855. return array2[i];
  13856. }
  13857. common.push(array2[i]);
  13858. found[array2[i]] = true;
  13859. }
  13860. }
  13861. return (justFirst ? null : common);
  13862. };
  13863. // Test if the reference contains the values
  13864. exports.contain = function (ref, values, options) {
  13865. /*
  13866. string -> string(s)
  13867. array -> item(s)
  13868. object -> key(s)
  13869. object -> object (key:value)
  13870. */
  13871. let valuePairs = null;
  13872. if (typeof ref === 'object' &&
  13873. typeof values === 'object' &&
  13874. !Array.isArray(ref) &&
  13875. !Array.isArray(values)) {
  13876. valuePairs = values;
  13877. values = Object.keys(values);
  13878. }
  13879. else {
  13880. values = [].concat(values);
  13881. }
  13882. options = options || {}; // deep, once, only, part
  13883. exports.assert(arguments.length >= 2, 'Insufficient arguments');
  13884. exports.assert(typeof ref === 'string' || typeof ref === 'object', 'Reference must be string or an object');
  13885. exports.assert(values.length, 'Values array cannot be empty');
  13886. let compare;
  13887. let compareFlags;
  13888. if (options.deep) {
  13889. compare = exports.deepEqual;
  13890. const hasOnly = options.hasOwnProperty('only');
  13891. const hasPart = options.hasOwnProperty('part');
  13892. compareFlags = {
  13893. prototype: hasOnly ? options.only : hasPart ? !options.part : false,
  13894. part: hasOnly ? !options.only : hasPart ? options.part : true
  13895. };
  13896. }
  13897. else {
  13898. compare = (a, b) => a === b;
  13899. }
  13900. let misses = false;
  13901. const matches = new Array(values.length);
  13902. for (let i = 0; i < matches.length; ++i) {
  13903. matches[i] = 0;
  13904. }
  13905. if (typeof ref === 'string') {
  13906. let pattern = '(';
  13907. for (let i = 0; i < values.length; ++i) {
  13908. const value = values[i];
  13909. exports.assert(typeof value === 'string', 'Cannot compare string reference to non-string value');
  13910. pattern += (i ? '|' : '') + exports.escapeRegex(value);
  13911. }
  13912. const regex = new RegExp(pattern + ')', 'g');
  13913. const leftovers = ref.replace(regex, ($0, $1) => {
  13914. const index = values.indexOf($1);
  13915. ++matches[index];
  13916. return ''; // Remove from string
  13917. });
  13918. misses = !!leftovers;
  13919. }
  13920. else if (Array.isArray(ref)) {
  13921. for (let i = 0; i < ref.length; ++i) {
  13922. let matched = false;
  13923. for (let j = 0; j < values.length && matched === false; ++j) {
  13924. matched = compare(values[j], ref[i], compareFlags) && j;
  13925. }
  13926. if (matched !== false) {
  13927. ++matches[matched];
  13928. }
  13929. else {
  13930. misses = true;
  13931. }
  13932. }
  13933. }
  13934. else {
  13935. const keys = Object.getOwnPropertyNames(ref);
  13936. for (let i = 0; i < keys.length; ++i) {
  13937. const key = keys[i];
  13938. const pos = values.indexOf(key);
  13939. if (pos !== -1) {
  13940. if (valuePairs &&
  13941. !compare(valuePairs[key], ref[key], compareFlags)) {
  13942. return false;
  13943. }
  13944. ++matches[pos];
  13945. }
  13946. else {
  13947. misses = true;
  13948. }
  13949. }
  13950. }
  13951. let result = false;
  13952. for (let i = 0; i < matches.length; ++i) {
  13953. result = result || !!matches[i];
  13954. if ((options.once && matches[i] > 1) ||
  13955. (!options.part && !matches[i])) {
  13956. return false;
  13957. }
  13958. }
  13959. if (options.only &&
  13960. misses) {
  13961. return false;
  13962. }
  13963. return result;
  13964. };
  13965. // Flatten array
  13966. exports.flatten = function (array, target) {
  13967. const result = target || [];
  13968. for (let i = 0; i < array.length; ++i) {
  13969. if (Array.isArray(array[i])) {
  13970. exports.flatten(array[i], result);
  13971. }
  13972. else {
  13973. result.push(array[i]);
  13974. }
  13975. }
  13976. return result;
  13977. };
  13978. // Convert an object key chain string ('a.b.c') to reference (object[a][b][c])
  13979. exports.reach = function (obj, chain, options) {
  13980. if (chain === false ||
  13981. chain === null ||
  13982. typeof chain === 'undefined') {
  13983. return obj;
  13984. }
  13985. options = options || {};
  13986. if (typeof options === 'string') {
  13987. options = { separator: options };
  13988. }
  13989. const path = chain.split(options.separator || '.');
  13990. let ref = obj;
  13991. for (let i = 0; i < path.length; ++i) {
  13992. let key = path[i];
  13993. if (key[0] === '-' && Array.isArray(ref)) {
  13994. key = key.slice(1, key.length);
  13995. key = ref.length - key;
  13996. }
  13997. if (!ref ||
  13998. !((typeof ref === 'object' || typeof ref === 'function') && key in ref) ||
  13999. (typeof ref !== 'object' && options.functions === false)) { // Only object and function can have properties
  14000. exports.assert(!options.strict || i + 1 === path.length, 'Missing segment', key, 'in reach path ', chain);
  14001. exports.assert(typeof ref === 'object' || options.functions === true || typeof ref !== 'function', 'Invalid segment', key, 'in reach path ', chain);
  14002. ref = options.default;
  14003. break;
  14004. }
  14005. ref = ref[key];
  14006. }
  14007. return ref;
  14008. };
  14009. exports.reachTemplate = function (obj, template, options) {
  14010. return template.replace(/{([^}]+)}/g, ($0, chain) => {
  14011. const value = exports.reach(obj, chain, options);
  14012. return (value === undefined || value === null ? '' : value);
  14013. });
  14014. };
  14015. exports.formatStack = function (stack) {
  14016. const trace = [];
  14017. for (let i = 0; i < stack.length; ++i) {
  14018. const item = stack[i];
  14019. trace.push([item.getFileName(), item.getLineNumber(), item.getColumnNumber(), item.getFunctionName(), item.isConstructor()]);
  14020. }
  14021. return trace;
  14022. };
  14023. exports.formatTrace = function (trace) {
  14024. const display = [];
  14025. for (let i = 0; i < trace.length; ++i) {
  14026. const row = trace[i];
  14027. display.push((row[4] ? 'new ' : '') + row[3] + ' (' + row[0] + ':' + row[1] + ':' + row[2] + ')');
  14028. }
  14029. return display;
  14030. };
  14031. exports.callStack = function (slice) {
  14032. // http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
  14033. const v8 = Error.prepareStackTrace;
  14034. Error.prepareStackTrace = function (_, stack) {
  14035. return stack;
  14036. };
  14037. const capture = {};
  14038. Error.captureStackTrace(capture, this); // arguments.callee is not supported in strict mode so we use this and slice the trace of this off the result
  14039. const stack = capture.stack;
  14040. Error.prepareStackTrace = v8;
  14041. const trace = exports.formatStack(stack);
  14042. return trace.slice(1 + slice);
  14043. };
  14044. exports.displayStack = function (slice) {
  14045. const trace = exports.callStack(slice === undefined ? 1 : slice + 1);
  14046. return exports.formatTrace(trace);
  14047. };
  14048. exports.abortThrow = false;
  14049. exports.abort = function (message, hideStack) {
  14050. if (process.env.NODE_ENV === 'test' || exports.abortThrow === true) {
  14051. throw new Error(message || 'Unknown error');
  14052. }
  14053. let stack = '';
  14054. if (!hideStack) {
  14055. stack = exports.displayStack(1).join('\n\t');
  14056. }
  14057. console.log('ABORT: ' + message + '\n\t' + stack);
  14058. process.exit(1);
  14059. };
  14060. exports.assert = function (condition /*, msg1, msg2, msg3 */) {
  14061. if (condition) {
  14062. return;
  14063. }
  14064. if (arguments.length === 2 && arguments[1] instanceof Error) {
  14065. throw arguments[1];
  14066. }
  14067. let msgs = [];
  14068. for (let i = 1; i < arguments.length; ++i) {
  14069. if (arguments[i] !== '') {
  14070. msgs.push(arguments[i]); // Avoids Array.slice arguments leak, allowing for V8 optimizations
  14071. }
  14072. }
  14073. msgs = msgs.map((msg) => {
  14074. return typeof msg === 'string' ? msg : msg instanceof Error ? msg.message : exports.stringify(msg);
  14075. });
  14076. throw new Error(msgs.join(' ') || 'Unknown error');
  14077. };
  14078. exports.Timer = function () {
  14079. this.ts = 0;
  14080. this.reset();
  14081. };
  14082. exports.Timer.prototype.reset = function () {
  14083. this.ts = Date.now();
  14084. };
  14085. exports.Timer.prototype.elapsed = function () {
  14086. return Date.now() - this.ts;
  14087. };
  14088. exports.Bench = function () {
  14089. this.ts = 0;
  14090. this.reset();
  14091. };
  14092. exports.Bench.prototype.reset = function () {
  14093. this.ts = exports.Bench.now();
  14094. };
  14095. exports.Bench.prototype.elapsed = function () {
  14096. return exports.Bench.now() - this.ts;
  14097. };
  14098. exports.Bench.now = function () {
  14099. const ts = process.hrtime();
  14100. return (ts[0] * 1e3) + (ts[1] / 1e6);
  14101. };
  14102. // Escape string for Regex construction
  14103. exports.escapeRegex = function (string) {
  14104. // Escape ^$.*+-?=!:|\/()[]{},
  14105. return string.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g, '\\$&');
  14106. };
  14107. // Base64url (RFC 4648) encode
  14108. exports.base64urlEncode = function (value, encoding) {
  14109. exports.assert(typeof value === 'string' || Buffer.isBuffer(value), 'value must be string or buffer');
  14110. const buf = (Buffer.isBuffer(value) ? value : new Buffer(value, encoding || 'binary'));
  14111. return buf.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, '');
  14112. };
  14113. // Base64url (RFC 4648) decode
  14114. exports.base64urlDecode = function (value, encoding) {
  14115. if (typeof value !== 'string') {
  14116. return new Error('Value not a string');
  14117. }
  14118. if (!/^[\w\-]*$/.test(value)) {
  14119. return new Error('Invalid character');
  14120. }
  14121. const buf = new Buffer(value, 'base64');
  14122. return (encoding === 'buffer' ? buf : buf.toString(encoding || 'binary'));
  14123. };
  14124. // Escape attribute value for use in HTTP header
  14125. exports.escapeHeaderAttribute = function (attribute) {
  14126. // Allowed value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9, \, "
  14127. exports.assert(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(attribute), 'Bad attribute value (' + attribute + ')');
  14128. return attribute.replace(/\\/g, '\\\\').replace(/\"/g, '\\"'); // Escape quotes and slash
  14129. };
  14130. exports.escapeHtml = function (string) {
  14131. return Escape.escapeHtml(string);
  14132. };
  14133. exports.escapeJavaScript = function (string) {
  14134. return Escape.escapeJavaScript(string);
  14135. };
  14136. exports.escapeJson = function (string) {
  14137. return Escape.escapeJson(string);
  14138. };
  14139. exports.nextTick = function (callback) {
  14140. return function () {
  14141. const args = arguments;
  14142. process.nextTick(() => {
  14143. callback.apply(null, args);
  14144. });
  14145. };
  14146. };
  14147. exports.once = function (method) {
  14148. if (method._hoekOnce) {
  14149. return method;
  14150. }
  14151. let once = false;
  14152. const wrapped = function () {
  14153. if (!once) {
  14154. once = true;
  14155. method.apply(null, arguments);
  14156. }
  14157. };
  14158. wrapped._hoekOnce = true;
  14159. return wrapped;
  14160. };
  14161. exports.isInteger = Number.isSafeInteger;
  14162. exports.ignore = function () { };
  14163. exports.inherits = Util.inherits;
  14164. exports.format = Util.format;
  14165. exports.transform = function (source, transform, options) {
  14166. exports.assert(source === null || source === undefined || typeof source === 'object' || Array.isArray(source), 'Invalid source object: must be null, undefined, an object, or an array');
  14167. const separator = (typeof options === 'object' && options !== null) ? (options.separator || '.') : '.';
  14168. if (Array.isArray(source)) {
  14169. const results = [];
  14170. for (let i = 0; i < source.length; ++i) {
  14171. results.push(exports.transform(source[i], transform, options));
  14172. }
  14173. return results;
  14174. }
  14175. const result = {};
  14176. const keys = Object.keys(transform);
  14177. for (let i = 0; i < keys.length; ++i) {
  14178. const key = keys[i];
  14179. const path = key.split(separator);
  14180. const sourcePath = transform[key];
  14181. exports.assert(typeof sourcePath === 'string', 'All mappings must be "." delineated strings');
  14182. let segment;
  14183. let res = result;
  14184. while (path.length > 1) {
  14185. segment = path.shift();
  14186. if (!res[segment]) {
  14187. res[segment] = {};
  14188. }
  14189. res = res[segment];
  14190. }
  14191. segment = path.shift();
  14192. res[segment] = exports.reach(source, sourcePath, options);
  14193. }
  14194. return result;
  14195. };
  14196. exports.uniqueFilename = function (path, extension) {
  14197. if (extension) {
  14198. extension = extension[0] !== '.' ? '.' + extension : extension;
  14199. }
  14200. else {
  14201. extension = '';
  14202. }
  14203. path = Path.resolve(path);
  14204. const name = [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join('-') + extension;
  14205. return Path.join(path, name);
  14206. };
  14207. exports.stringify = function () {
  14208. try {
  14209. return JSON.stringify.apply(null, arguments);
  14210. }
  14211. catch (err) {
  14212. return '[Cannot display object: ' + err.message + ']';
  14213. }
  14214. };
  14215. exports.shallow = function (source) {
  14216. const target = {};
  14217. const keys = Object.keys(source);
  14218. for (let i = 0; i < keys.length; ++i) {
  14219. const key = keys[i];
  14220. target[key] = source[key];
  14221. }
  14222. return target;
  14223. };
  14224. /***/ }),
  14225. /* 83 */
  14226. /***/ (function(module, exports) {
  14227. module.exports = require("assert");
  14228. /***/ }),
  14229. /* 84 */
  14230. /***/ (function(module, exports, __webpack_require__) {
  14231. // Copyright 2015 Joyent, Inc.
  14232. module.exports = Fingerprint;
  14233. var assert = __webpack_require__(3);
  14234. var algs = __webpack_require__(16);
  14235. var crypto = __webpack_require__(5);
  14236. var errs = __webpack_require__(31);
  14237. var Key = __webpack_require__(15);
  14238. var Certificate = __webpack_require__(85);
  14239. var utils = __webpack_require__(12);
  14240. var FingerprintFormatError = errs.FingerprintFormatError;
  14241. var InvalidAlgorithmError = errs.InvalidAlgorithmError;
  14242. function Fingerprint(opts) {
  14243. assert.object(opts, 'options');
  14244. assert.string(opts.type, 'options.type');
  14245. assert.buffer(opts.hash, 'options.hash');
  14246. assert.string(opts.algorithm, 'options.algorithm');
  14247. this.algorithm = opts.algorithm.toLowerCase();
  14248. if (algs.hashAlgs[this.algorithm] !== true)
  14249. throw (new InvalidAlgorithmError(this.algorithm));
  14250. this.hash = opts.hash;
  14251. this.type = opts.type;
  14252. }
  14253. Fingerprint.prototype.toString = function (format) {
  14254. if (format === undefined) {
  14255. if (this.algorithm === 'md5')
  14256. format = 'hex';
  14257. else
  14258. format = 'base64';
  14259. }
  14260. assert.string(format);
  14261. switch (format) {
  14262. case 'hex':
  14263. return (addColons(this.hash.toString('hex')));
  14264. case 'base64':
  14265. return (sshBase64Format(this.algorithm,
  14266. this.hash.toString('base64')));
  14267. default:
  14268. throw (new FingerprintFormatError(undefined, format));
  14269. }
  14270. };
  14271. Fingerprint.prototype.matches = function (other) {
  14272. assert.object(other, 'key or certificate');
  14273. if (this.type === 'key') {
  14274. utils.assertCompatible(other, Key, [1, 0], 'key');
  14275. } else {
  14276. utils.assertCompatible(other, Certificate, [1, 0],
  14277. 'certificate');
  14278. }
  14279. var theirHash = other.hash(this.algorithm);
  14280. var theirHash2 = crypto.createHash(this.algorithm).
  14281. update(theirHash).digest('base64');
  14282. if (this.hash2 === undefined)
  14283. this.hash2 = crypto.createHash(this.algorithm).
  14284. update(this.hash).digest('base64');
  14285. return (this.hash2 === theirHash2);
  14286. };
  14287. Fingerprint.parse = function (fp, options) {
  14288. assert.string(fp, 'fingerprint');
  14289. var alg, hash, enAlgs;
  14290. if (Array.isArray(options)) {
  14291. enAlgs = options;
  14292. options = {};
  14293. }
  14294. assert.optionalObject(options, 'options');
  14295. if (options === undefined)
  14296. options = {};
  14297. if (options.enAlgs !== undefined)
  14298. enAlgs = options.enAlgs;
  14299. assert.optionalArrayOfString(enAlgs, 'algorithms');
  14300. var parts = fp.split(':');
  14301. if (parts.length == 2) {
  14302. alg = parts[0].toLowerCase();
  14303. /*JSSTYLED*/
  14304. var base64RE = /^[A-Za-z0-9+\/=]+$/;
  14305. if (!base64RE.test(parts[1]))
  14306. throw (new FingerprintFormatError(fp));
  14307. try {
  14308. hash = new Buffer(parts[1], 'base64');
  14309. } catch (e) {
  14310. throw (new FingerprintFormatError(fp));
  14311. }
  14312. } else if (parts.length > 2) {
  14313. alg = 'md5';
  14314. if (parts[0].toLowerCase() === 'md5')
  14315. parts = parts.slice(1);
  14316. parts = parts.join('');
  14317. /*JSSTYLED*/
  14318. var md5RE = /^[a-fA-F0-9]+$/;
  14319. if (!md5RE.test(parts))
  14320. throw (new FingerprintFormatError(fp));
  14321. try {
  14322. hash = new Buffer(parts, 'hex');
  14323. } catch (e) {
  14324. throw (new FingerprintFormatError(fp));
  14325. }
  14326. }
  14327. if (alg === undefined)
  14328. throw (new FingerprintFormatError(fp));
  14329. if (algs.hashAlgs[alg] === undefined)
  14330. throw (new InvalidAlgorithmError(alg));
  14331. if (enAlgs !== undefined) {
  14332. enAlgs = enAlgs.map(function (a) { return a.toLowerCase(); });
  14333. if (enAlgs.indexOf(alg) === -1)
  14334. throw (new InvalidAlgorithmError(alg));
  14335. }
  14336. return (new Fingerprint({
  14337. algorithm: alg,
  14338. hash: hash,
  14339. type: options.type || 'key'
  14340. }));
  14341. };
  14342. function addColons(s) {
  14343. /*JSSTYLED*/
  14344. return (s.replace(/(.{2})(?=.)/g, '$1:'));
  14345. }
  14346. function base64Strip(s) {
  14347. /*JSSTYLED*/
  14348. return (s.replace(/=*$/, ''));
  14349. }
  14350. function sshBase64Format(alg, h) {
  14351. return (alg.toUpperCase() + ':' + base64Strip(h));
  14352. }
  14353. Fingerprint.isFingerprint = function (obj, ver) {
  14354. return (utils.isCompatible(obj, Fingerprint, ver));
  14355. };
  14356. /*
  14357. * API versions for Fingerprint:
  14358. * [1,0] -- initial ver
  14359. * [1,1] -- first tagged ver
  14360. */
  14361. Fingerprint.prototype._sshpkApiVersion = [1, 1];
  14362. Fingerprint._oldVersionDetect = function (obj) {
  14363. assert.func(obj.toString);
  14364. assert.func(obj.matches);
  14365. return ([1, 0]);
  14366. };
  14367. /***/ }),
  14368. /* 85 */
  14369. /***/ (function(module, exports, __webpack_require__) {
  14370. // Copyright 2016 Joyent, Inc.
  14371. module.exports = Certificate;
  14372. var assert = __webpack_require__(3);
  14373. var algs = __webpack_require__(16);
  14374. var crypto = __webpack_require__(5);
  14375. var Fingerprint = __webpack_require__(84);
  14376. var Signature = __webpack_require__(32);
  14377. var errs = __webpack_require__(31);
  14378. var util = __webpack_require__(2);
  14379. var utils = __webpack_require__(12);
  14380. var Key = __webpack_require__(15);
  14381. var PrivateKey = __webpack_require__(17);
  14382. var Identity = __webpack_require__(87);
  14383. var formats = {};
  14384. formats['openssh'] = __webpack_require__(549);
  14385. formats['x509'] = __webpack_require__(352);
  14386. formats['pem'] = __webpack_require__(550);
  14387. var CertificateParseError = errs.CertificateParseError;
  14388. var InvalidAlgorithmError = errs.InvalidAlgorithmError;
  14389. function Certificate(opts) {
  14390. assert.object(opts, 'options');
  14391. assert.arrayOfObject(opts.subjects, 'options.subjects');
  14392. utils.assertCompatible(opts.subjects[0], Identity, [1, 0],
  14393. 'options.subjects');
  14394. utils.assertCompatible(opts.subjectKey, Key, [1, 0],
  14395. 'options.subjectKey');
  14396. utils.assertCompatible(opts.issuer, Identity, [1, 0], 'options.issuer');
  14397. if (opts.issuerKey !== undefined) {
  14398. utils.assertCompatible(opts.issuerKey, Key, [1, 0],
  14399. 'options.issuerKey');
  14400. }
  14401. assert.object(opts.signatures, 'options.signatures');
  14402. assert.buffer(opts.serial, 'options.serial');
  14403. assert.date(opts.validFrom, 'options.validFrom');
  14404. assert.date(opts.validUntil, 'optons.validUntil');
  14405. assert.optionalArrayOfString(opts.purposes, 'options.purposes');
  14406. this._hashCache = {};
  14407. this.subjects = opts.subjects;
  14408. this.issuer = opts.issuer;
  14409. this.subjectKey = opts.subjectKey;
  14410. this.issuerKey = opts.issuerKey;
  14411. this.signatures = opts.signatures;
  14412. this.serial = opts.serial;
  14413. this.validFrom = opts.validFrom;
  14414. this.validUntil = opts.validUntil;
  14415. this.purposes = opts.purposes;
  14416. }
  14417. Certificate.formats = formats;
  14418. Certificate.prototype.toBuffer = function (format, options) {
  14419. if (format === undefined)
  14420. format = 'x509';
  14421. assert.string(format, 'format');
  14422. assert.object(formats[format], 'formats[format]');
  14423. assert.optionalObject(options, 'options');
  14424. return (formats[format].write(this, options));
  14425. };
  14426. Certificate.prototype.toString = function (format, options) {
  14427. if (format === undefined)
  14428. format = 'pem';
  14429. return (this.toBuffer(format, options).toString());
  14430. };
  14431. Certificate.prototype.fingerprint = function (algo) {
  14432. if (algo === undefined)
  14433. algo = 'sha256';
  14434. assert.string(algo, 'algorithm');
  14435. var opts = {
  14436. type: 'certificate',
  14437. hash: this.hash(algo),
  14438. algorithm: algo
  14439. };
  14440. return (new Fingerprint(opts));
  14441. };
  14442. Certificate.prototype.hash = function (algo) {
  14443. assert.string(algo, 'algorithm');
  14444. algo = algo.toLowerCase();
  14445. if (algs.hashAlgs[algo] === undefined)
  14446. throw (new InvalidAlgorithmError(algo));
  14447. if (this._hashCache[algo])
  14448. return (this._hashCache[algo]);
  14449. var hash = crypto.createHash(algo).
  14450. update(this.toBuffer('x509')).digest();
  14451. this._hashCache[algo] = hash;
  14452. return (hash);
  14453. };
  14454. Certificate.prototype.isExpired = function (when) {
  14455. if (when === undefined)
  14456. when = new Date();
  14457. return (!((when.getTime() >= this.validFrom.getTime()) &&
  14458. (when.getTime() < this.validUntil.getTime())));
  14459. };
  14460. Certificate.prototype.isSignedBy = function (issuerCert) {
  14461. utils.assertCompatible(issuerCert, Certificate, [1, 0], 'issuer');
  14462. if (!this.issuer.equals(issuerCert.subjects[0]))
  14463. return (false);
  14464. if (this.issuer.purposes && this.issuer.purposes.length > 0 &&
  14465. this.issuer.purposes.indexOf('ca') === -1) {
  14466. return (false);
  14467. }
  14468. return (this.isSignedByKey(issuerCert.subjectKey));
  14469. };
  14470. Certificate.prototype.isSignedByKey = function (issuerKey) {
  14471. utils.assertCompatible(issuerKey, Key, [1, 2], 'issuerKey');
  14472. if (this.issuerKey !== undefined) {
  14473. return (this.issuerKey.
  14474. fingerprint('sha512').matches(issuerKey));
  14475. }
  14476. var fmt = Object.keys(this.signatures)[0];
  14477. var valid = formats[fmt].verify(this, issuerKey);
  14478. if (valid)
  14479. this.issuerKey = issuerKey;
  14480. return (valid);
  14481. };
  14482. Certificate.prototype.signWith = function (key) {
  14483. utils.assertCompatible(key, PrivateKey, [1, 2], 'key');
  14484. var fmts = Object.keys(formats);
  14485. var didOne = false;
  14486. for (var i = 0; i < fmts.length; ++i) {
  14487. if (fmts[i] !== 'pem') {
  14488. var ret = formats[fmts[i]].sign(this, key);
  14489. if (ret === true)
  14490. didOne = true;
  14491. }
  14492. }
  14493. if (!didOne) {
  14494. throw (new Error('Failed to sign the certificate for any ' +
  14495. 'available certificate formats'));
  14496. }
  14497. };
  14498. Certificate.createSelfSigned = function (subjectOrSubjects, key, options) {
  14499. var subjects;
  14500. if (Array.isArray(subjectOrSubjects))
  14501. subjects = subjectOrSubjects;
  14502. else
  14503. subjects = [subjectOrSubjects];
  14504. assert.arrayOfObject(subjects);
  14505. subjects.forEach(function (subject) {
  14506. utils.assertCompatible(subject, Identity, [1, 0], 'subject');
  14507. });
  14508. utils.assertCompatible(key, PrivateKey, [1, 2], 'private key');
  14509. assert.optionalObject(options, 'options');
  14510. if (options === undefined)
  14511. options = {};
  14512. assert.optionalObject(options.validFrom, 'options.validFrom');
  14513. assert.optionalObject(options.validUntil, 'options.validUntil');
  14514. var validFrom = options.validFrom;
  14515. var validUntil = options.validUntil;
  14516. if (validFrom === undefined)
  14517. validFrom = new Date();
  14518. if (validUntil === undefined) {
  14519. assert.optionalNumber(options.lifetime, 'options.lifetime');
  14520. var lifetime = options.lifetime;
  14521. if (lifetime === undefined)
  14522. lifetime = 10*365*24*3600;
  14523. validUntil = new Date();
  14524. validUntil.setTime(validUntil.getTime() + lifetime*1000);
  14525. }
  14526. assert.optionalBuffer(options.serial, 'options.serial');
  14527. var serial = options.serial;
  14528. if (serial === undefined)
  14529. serial = new Buffer('0000000000000001', 'hex');
  14530. var purposes = options.purposes;
  14531. if (purposes === undefined)
  14532. purposes = [];
  14533. if (purposes.indexOf('signature') === -1)
  14534. purposes.push('signature');
  14535. /* Self-signed certs are always CAs. */
  14536. if (purposes.indexOf('ca') === -1)
  14537. purposes.push('ca');
  14538. if (purposes.indexOf('crl') === -1)
  14539. purposes.push('crl');
  14540. /*
  14541. * If we weren't explicitly given any other purposes, do the sensible
  14542. * thing and add some basic ones depending on the subject type.
  14543. */
  14544. if (purposes.length <= 3) {
  14545. var hostSubjects = subjects.filter(function (subject) {
  14546. return (subject.type === 'host');
  14547. });
  14548. var userSubjects = subjects.filter(function (subject) {
  14549. return (subject.type === 'user');
  14550. });
  14551. if (hostSubjects.length > 0) {
  14552. if (purposes.indexOf('serverAuth') === -1)
  14553. purposes.push('serverAuth');
  14554. }
  14555. if (userSubjects.length > 0) {
  14556. if (purposes.indexOf('clientAuth') === -1)
  14557. purposes.push('clientAuth');
  14558. }
  14559. if (userSubjects.length > 0 || hostSubjects.length > 0) {
  14560. if (purposes.indexOf('keyAgreement') === -1)
  14561. purposes.push('keyAgreement');
  14562. if (key.type === 'rsa' &&
  14563. purposes.indexOf('encryption') === -1)
  14564. purposes.push('encryption');
  14565. }
  14566. }
  14567. var cert = new Certificate({
  14568. subjects: subjects,
  14569. issuer: subjects[0],
  14570. subjectKey: key.toPublic(),
  14571. issuerKey: key.toPublic(),
  14572. signatures: {},
  14573. serial: serial,
  14574. validFrom: validFrom,
  14575. validUntil: validUntil,
  14576. purposes: purposes
  14577. });
  14578. cert.signWith(key);
  14579. return (cert);
  14580. };
  14581. Certificate.create =
  14582. function (subjectOrSubjects, key, issuer, issuerKey, options) {
  14583. var subjects;
  14584. if (Array.isArray(subjectOrSubjects))
  14585. subjects = subjectOrSubjects;
  14586. else
  14587. subjects = [subjectOrSubjects];
  14588. assert.arrayOfObject(subjects);
  14589. subjects.forEach(function (subject) {
  14590. utils.assertCompatible(subject, Identity, [1, 0], 'subject');
  14591. });
  14592. utils.assertCompatible(key, Key, [1, 0], 'key');
  14593. if (PrivateKey.isPrivateKey(key))
  14594. key = key.toPublic();
  14595. utils.assertCompatible(issuer, Identity, [1, 0], 'issuer');
  14596. utils.assertCompatible(issuerKey, PrivateKey, [1, 2], 'issuer key');
  14597. assert.optionalObject(options, 'options');
  14598. if (options === undefined)
  14599. options = {};
  14600. assert.optionalObject(options.validFrom, 'options.validFrom');
  14601. assert.optionalObject(options.validUntil, 'options.validUntil');
  14602. var validFrom = options.validFrom;
  14603. var validUntil = options.validUntil;
  14604. if (validFrom === undefined)
  14605. validFrom = new Date();
  14606. if (validUntil === undefined) {
  14607. assert.optionalNumber(options.lifetime, 'options.lifetime');
  14608. var lifetime = options.lifetime;
  14609. if (lifetime === undefined)
  14610. lifetime = 10*365*24*3600;
  14611. validUntil = new Date();
  14612. validUntil.setTime(validUntil.getTime() + lifetime*1000);
  14613. }
  14614. assert.optionalBuffer(options.serial, 'options.serial');
  14615. var serial = options.serial;
  14616. if (serial === undefined)
  14617. serial = new Buffer('0000000000000001', 'hex');
  14618. var purposes = options.purposes;
  14619. if (purposes === undefined)
  14620. purposes = [];
  14621. if (purposes.indexOf('signature') === -1)
  14622. purposes.push('signature');
  14623. if (options.ca === true) {
  14624. if (purposes.indexOf('ca') === -1)
  14625. purposes.push('ca');
  14626. if (purposes.indexOf('crl') === -1)
  14627. purposes.push('crl');
  14628. }
  14629. var hostSubjects = subjects.filter(function (subject) {
  14630. return (subject.type === 'host');
  14631. });
  14632. var userSubjects = subjects.filter(function (subject) {
  14633. return (subject.type === 'user');
  14634. });
  14635. if (hostSubjects.length > 0) {
  14636. if (purposes.indexOf('serverAuth') === -1)
  14637. purposes.push('serverAuth');
  14638. }
  14639. if (userSubjects.length > 0) {
  14640. if (purposes.indexOf('clientAuth') === -1)
  14641. purposes.push('clientAuth');
  14642. }
  14643. if (userSubjects.length > 0 || hostSubjects.length > 0) {
  14644. if (purposes.indexOf('keyAgreement') === -1)
  14645. purposes.push('keyAgreement');
  14646. if (key.type === 'rsa' &&
  14647. purposes.indexOf('encryption') === -1)
  14648. purposes.push('encryption');
  14649. }
  14650. var cert = new Certificate({
  14651. subjects: subjects,
  14652. issuer: issuer,
  14653. subjectKey: key,
  14654. issuerKey: issuerKey.toPublic(),
  14655. signatures: {},
  14656. serial: serial,
  14657. validFrom: validFrom,
  14658. validUntil: validUntil,
  14659. purposes: purposes
  14660. });
  14661. cert.signWith(issuerKey);
  14662. return (cert);
  14663. };
  14664. Certificate.parse = function (data, format, options) {
  14665. if (typeof (data) !== 'string')
  14666. assert.buffer(data, 'data');
  14667. if (format === undefined)
  14668. format = 'auto';
  14669. assert.string(format, 'format');
  14670. if (typeof (options) === 'string')
  14671. options = { filename: options };
  14672. assert.optionalObject(options, 'options');
  14673. if (options === undefined)
  14674. options = {};
  14675. assert.optionalString(options.filename, 'options.filename');
  14676. if (options.filename === undefined)
  14677. options.filename = '(unnamed)';
  14678. assert.object(formats[format], 'formats[format]');
  14679. try {
  14680. var k = formats[format].read(data, options);
  14681. return (k);
  14682. } catch (e) {
  14683. throw (new CertificateParseError(options.filename, format, e));
  14684. }
  14685. };
  14686. Certificate.isCertificate = function (obj, ver) {
  14687. return (utils.isCompatible(obj, Certificate, ver));
  14688. };
  14689. /*
  14690. * API versions for Certificate:
  14691. * [1,0] -- initial ver
  14692. */
  14693. Certificate.prototype._sshpkApiVersion = [1, 0];
  14694. Certificate._oldVersionDetect = function (obj) {
  14695. return ([1, 0]);
  14696. };
  14697. /***/ }),
  14698. /* 86 */
  14699. /***/ (function(module, exports, __webpack_require__) {
  14700. // Copyright 2015 Joyent, Inc.
  14701. module.exports = {
  14702. read: read,
  14703. readPkcs8: readPkcs8,
  14704. write: write,
  14705. writePkcs8: writePkcs8,
  14706. readECDSACurve: readECDSACurve,
  14707. writeECDSACurve: writeECDSACurve
  14708. };
  14709. var assert = __webpack_require__(3);
  14710. var asn1 = __webpack_require__(39);
  14711. var algs = __webpack_require__(16);
  14712. var utils = __webpack_require__(12);
  14713. var Key = __webpack_require__(15);
  14714. var PrivateKey = __webpack_require__(17);
  14715. var pem = __webpack_require__(38);
  14716. function read(buf, options) {
  14717. return (pem.read(buf, options, 'pkcs8'));
  14718. }
  14719. function write(key, options) {
  14720. return (pem.write(key, options, 'pkcs8'));
  14721. }
  14722. /* Helper to read in a single mpint */
  14723. function readMPInt(der, nm) {
  14724. assert.strictEqual(der.peek(), asn1.Ber.Integer,
  14725. nm + ' is not an Integer');
  14726. return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true)));
  14727. }
  14728. function readPkcs8(alg, type, der) {
  14729. /* Private keys in pkcs#8 format have a weird extra int */
  14730. if (der.peek() === asn1.Ber.Integer) {
  14731. assert.strictEqual(type, 'private',
  14732. 'unexpected Integer at start of public key');
  14733. der.readString(asn1.Ber.Integer, true);
  14734. }
  14735. der.readSequence();
  14736. var next = der.offset + der.length;
  14737. var oid = der.readOID();
  14738. switch (oid) {
  14739. case '1.2.840.113549.1.1.1':
  14740. der._offset = next;
  14741. if (type === 'public')
  14742. return (readPkcs8RSAPublic(der));
  14743. else
  14744. return (readPkcs8RSAPrivate(der));
  14745. case '1.2.840.10040.4.1':
  14746. if (type === 'public')
  14747. return (readPkcs8DSAPublic(der));
  14748. else
  14749. return (readPkcs8DSAPrivate(der));
  14750. case '1.2.840.10045.2.1':
  14751. if (type === 'public')
  14752. return (readPkcs8ECDSAPublic(der));
  14753. else
  14754. return (readPkcs8ECDSAPrivate(der));
  14755. default:
  14756. throw (new Error('Unknown key type OID ' + oid));
  14757. }
  14758. }
  14759. function readPkcs8RSAPublic(der) {
  14760. // bit string sequence
  14761. der.readSequence(asn1.Ber.BitString);
  14762. der.readByte();
  14763. der.readSequence();
  14764. // modulus
  14765. var n = readMPInt(der, 'modulus');
  14766. var e = readMPInt(der, 'exponent');
  14767. // now, make the key
  14768. var key = {
  14769. type: 'rsa',
  14770. source: der.originalInput,
  14771. parts: [
  14772. { name: 'e', data: e },
  14773. { name: 'n', data: n }
  14774. ]
  14775. };
  14776. return (new Key(key));
  14777. }
  14778. function readPkcs8RSAPrivate(der) {
  14779. der.readSequence(asn1.Ber.OctetString);
  14780. der.readSequence();
  14781. var ver = readMPInt(der, 'version');
  14782. assert.equal(ver[0], 0x0, 'unknown RSA private key version');
  14783. // modulus then public exponent
  14784. var n = readMPInt(der, 'modulus');
  14785. var e = readMPInt(der, 'public exponent');
  14786. var d = readMPInt(der, 'private exponent');
  14787. var p = readMPInt(der, 'prime1');
  14788. var q = readMPInt(der, 'prime2');
  14789. var dmodp = readMPInt(der, 'exponent1');
  14790. var dmodq = readMPInt(der, 'exponent2');
  14791. var iqmp = readMPInt(der, 'iqmp');
  14792. // now, make the key
  14793. var key = {
  14794. type: 'rsa',
  14795. parts: [
  14796. { name: 'n', data: n },
  14797. { name: 'e', data: e },
  14798. { name: 'd', data: d },
  14799. { name: 'iqmp', data: iqmp },
  14800. { name: 'p', data: p },
  14801. { name: 'q', data: q },
  14802. { name: 'dmodp', data: dmodp },
  14803. { name: 'dmodq', data: dmodq }
  14804. ]
  14805. };
  14806. return (new PrivateKey(key));
  14807. }
  14808. function readPkcs8DSAPublic(der) {
  14809. der.readSequence();
  14810. var p = readMPInt(der, 'p');
  14811. var q = readMPInt(der, 'q');
  14812. var g = readMPInt(der, 'g');
  14813. // bit string sequence
  14814. der.readSequence(asn1.Ber.BitString);
  14815. der.readByte();
  14816. var y = readMPInt(der, 'y');
  14817. // now, make the key
  14818. var key = {
  14819. type: 'dsa',
  14820. parts: [
  14821. { name: 'p', data: p },
  14822. { name: 'q', data: q },
  14823. { name: 'g', data: g },
  14824. { name: 'y', data: y }
  14825. ]
  14826. };
  14827. return (new Key(key));
  14828. }
  14829. function readPkcs8DSAPrivate(der) {
  14830. der.readSequence();
  14831. var p = readMPInt(der, 'p');
  14832. var q = readMPInt(der, 'q');
  14833. var g = readMPInt(der, 'g');
  14834. der.readSequence(asn1.Ber.OctetString);
  14835. var x = readMPInt(der, 'x');
  14836. /* The pkcs#8 format does not include the public key */
  14837. var y = utils.calculateDSAPublic(g, p, x);
  14838. var key = {
  14839. type: 'dsa',
  14840. parts: [
  14841. { name: 'p', data: p },
  14842. { name: 'q', data: q },
  14843. { name: 'g', data: g },
  14844. { name: 'y', data: y },
  14845. { name: 'x', data: x }
  14846. ]
  14847. };
  14848. return (new PrivateKey(key));
  14849. }
  14850. function readECDSACurve(der) {
  14851. var curveName, curveNames;
  14852. var j, c, cd;
  14853. if (der.peek() === asn1.Ber.OID) {
  14854. var oid = der.readOID();
  14855. curveNames = Object.keys(algs.curves);
  14856. for (j = 0; j < curveNames.length; ++j) {
  14857. c = curveNames[j];
  14858. cd = algs.curves[c];
  14859. if (cd.pkcs8oid === oid) {
  14860. curveName = c;
  14861. break;
  14862. }
  14863. }
  14864. } else {
  14865. // ECParameters sequence
  14866. der.readSequence();
  14867. var version = der.readString(asn1.Ber.Integer, true);
  14868. assert.strictEqual(version[0], 1, 'ECDSA key not version 1');
  14869. var curve = {};
  14870. // FieldID sequence
  14871. der.readSequence();
  14872. var fieldTypeOid = der.readOID();
  14873. assert.strictEqual(fieldTypeOid, '1.2.840.10045.1.1',
  14874. 'ECDSA key is not from a prime-field');
  14875. var p = curve.p = utils.mpNormalize(
  14876. der.readString(asn1.Ber.Integer, true));
  14877. /*
  14878. * p always starts with a 1 bit, so count the zeros to get its
  14879. * real size.
  14880. */
  14881. curve.size = p.length * 8 - utils.countZeros(p);
  14882. // Curve sequence
  14883. der.readSequence();
  14884. curve.a = utils.mpNormalize(
  14885. der.readString(asn1.Ber.OctetString, true));
  14886. curve.b = utils.mpNormalize(
  14887. der.readString(asn1.Ber.OctetString, true));
  14888. if (der.peek() === asn1.Ber.BitString)
  14889. curve.s = der.readString(asn1.Ber.BitString, true);
  14890. // Combined Gx and Gy
  14891. curve.G = der.readString(asn1.Ber.OctetString, true);
  14892. assert.strictEqual(curve.G[0], 0x4,
  14893. 'uncompressed G is required');
  14894. curve.n = utils.mpNormalize(
  14895. der.readString(asn1.Ber.Integer, true));
  14896. curve.h = utils.mpNormalize(
  14897. der.readString(asn1.Ber.Integer, true));
  14898. assert.strictEqual(curve.h[0], 0x1, 'a cofactor=1 curve is ' +
  14899. 'required');
  14900. curveNames = Object.keys(algs.curves);
  14901. var ks = Object.keys(curve);
  14902. for (j = 0; j < curveNames.length; ++j) {
  14903. c = curveNames[j];
  14904. cd = algs.curves[c];
  14905. var equal = true;
  14906. for (var i = 0; i < ks.length; ++i) {
  14907. var k = ks[i];
  14908. if (cd[k] === undefined)
  14909. continue;
  14910. if (typeof (cd[k]) === 'object' &&
  14911. cd[k].equals !== undefined) {
  14912. if (!cd[k].equals(curve[k])) {
  14913. equal = false;
  14914. break;
  14915. }
  14916. } else if (Buffer.isBuffer(cd[k])) {
  14917. if (cd[k].toString('binary')
  14918. !== curve[k].toString('binary')) {
  14919. equal = false;
  14920. break;
  14921. }
  14922. } else {
  14923. if (cd[k] !== curve[k]) {
  14924. equal = false;
  14925. break;
  14926. }
  14927. }
  14928. }
  14929. if (equal) {
  14930. curveName = c;
  14931. break;
  14932. }
  14933. }
  14934. }
  14935. return (curveName);
  14936. }
  14937. function readPkcs8ECDSAPrivate(der) {
  14938. var curveName = readECDSACurve(der);
  14939. assert.string(curveName, 'a known elliptic curve');
  14940. der.readSequence(asn1.Ber.OctetString);
  14941. der.readSequence();
  14942. var version = readMPInt(der, 'version');
  14943. assert.equal(version[0], 1, 'unknown version of ECDSA key');
  14944. var d = der.readString(asn1.Ber.OctetString, true);
  14945. der.readSequence(0xa1);
  14946. var Q = der.readString(asn1.Ber.BitString, true);
  14947. Q = utils.ecNormalize(Q);
  14948. var key = {
  14949. type: 'ecdsa',
  14950. parts: [
  14951. { name: 'curve', data: new Buffer(curveName) },
  14952. { name: 'Q', data: Q },
  14953. { name: 'd', data: d }
  14954. ]
  14955. };
  14956. return (new PrivateKey(key));
  14957. }
  14958. function readPkcs8ECDSAPublic(der) {
  14959. var curveName = readECDSACurve(der);
  14960. assert.string(curveName, 'a known elliptic curve');
  14961. var Q = der.readString(asn1.Ber.BitString, true);
  14962. Q = utils.ecNormalize(Q);
  14963. var key = {
  14964. type: 'ecdsa',
  14965. parts: [
  14966. { name: 'curve', data: new Buffer(curveName) },
  14967. { name: 'Q', data: Q }
  14968. ]
  14969. };
  14970. return (new Key(key));
  14971. }
  14972. function writePkcs8(der, key) {
  14973. der.startSequence();
  14974. if (PrivateKey.isPrivateKey(key)) {
  14975. var sillyInt = new Buffer(1);
  14976. sillyInt[0] = 0x0;
  14977. der.writeBuffer(sillyInt, asn1.Ber.Integer);
  14978. }
  14979. der.startSequence();
  14980. switch (key.type) {
  14981. case 'rsa':
  14982. der.writeOID('1.2.840.113549.1.1.1');
  14983. if (PrivateKey.isPrivateKey(key))
  14984. writePkcs8RSAPrivate(key, der);
  14985. else
  14986. writePkcs8RSAPublic(key, der);
  14987. break;
  14988. case 'dsa':
  14989. der.writeOID('1.2.840.10040.4.1');
  14990. if (PrivateKey.isPrivateKey(key))
  14991. writePkcs8DSAPrivate(key, der);
  14992. else
  14993. writePkcs8DSAPublic(key, der);
  14994. break;
  14995. case 'ecdsa':
  14996. der.writeOID('1.2.840.10045.2.1');
  14997. if (PrivateKey.isPrivateKey(key))
  14998. writePkcs8ECDSAPrivate(key, der);
  14999. else
  15000. writePkcs8ECDSAPublic(key, der);
  15001. break;
  15002. default:
  15003. throw (new Error('Unsupported key type: ' + key.type));
  15004. }
  15005. der.endSequence();
  15006. }
  15007. function writePkcs8RSAPrivate(key, der) {
  15008. der.writeNull();
  15009. der.endSequence();
  15010. der.startSequence(asn1.Ber.OctetString);
  15011. der.startSequence();
  15012. var version = new Buffer(1);
  15013. version[0] = 0;
  15014. der.writeBuffer(version, asn1.Ber.Integer);
  15015. der.writeBuffer(key.part.n.data, asn1.Ber.Integer);
  15016. der.writeBuffer(key.part.e.data, asn1.Ber.Integer);
  15017. der.writeBuffer(key.part.d.data, asn1.Ber.Integer);
  15018. der.writeBuffer(key.part.p.data, asn1.Ber.Integer);
  15019. der.writeBuffer(key.part.q.data, asn1.Ber.Integer);
  15020. if (!key.part.dmodp || !key.part.dmodq)
  15021. utils.addRSAMissing(key);
  15022. der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer);
  15023. der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer);
  15024. der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer);
  15025. der.endSequence();
  15026. der.endSequence();
  15027. }
  15028. function writePkcs8RSAPublic(key, der) {
  15029. der.writeNull();
  15030. der.endSequence();
  15031. der.startSequence(asn1.Ber.BitString);
  15032. der.writeByte(0x00);
  15033. der.startSequence();
  15034. der.writeBuffer(key.part.n.data, asn1.Ber.Integer);
  15035. der.writeBuffer(key.part.e.data, asn1.Ber.Integer);
  15036. der.endSequence();
  15037. der.endSequence();
  15038. }
  15039. function writePkcs8DSAPrivate(key, der) {
  15040. der.startSequence();
  15041. der.writeBuffer(key.part.p.data, asn1.Ber.Integer);
  15042. der.writeBuffer(key.part.q.data, asn1.Ber.Integer);
  15043. der.writeBuffer(key.part.g.data, asn1.Ber.Integer);
  15044. der.endSequence();
  15045. der.endSequence();
  15046. der.startSequence(asn1.Ber.OctetString);
  15047. der.writeBuffer(key.part.x.data, asn1.Ber.Integer);
  15048. der.endSequence();
  15049. }
  15050. function writePkcs8DSAPublic(key, der) {
  15051. der.startSequence();
  15052. der.writeBuffer(key.part.p.data, asn1.Ber.Integer);
  15053. der.writeBuffer(key.part.q.data, asn1.Ber.Integer);
  15054. der.writeBuffer(key.part.g.data, asn1.Ber.Integer);
  15055. der.endSequence();
  15056. der.endSequence();
  15057. der.startSequence(asn1.Ber.BitString);
  15058. der.writeByte(0x00);
  15059. der.writeBuffer(key.part.y.data, asn1.Ber.Integer);
  15060. der.endSequence();
  15061. }
  15062. function writeECDSACurve(key, der) {
  15063. var curve = algs.curves[key.curve];
  15064. if (curve.pkcs8oid) {
  15065. /* This one has a name in pkcs#8, so just write the oid */
  15066. der.writeOID(curve.pkcs8oid);
  15067. } else {
  15068. // ECParameters sequence
  15069. der.startSequence();
  15070. var version = new Buffer(1);
  15071. version.writeUInt8(1, 0);
  15072. der.writeBuffer(version, asn1.Ber.Integer);
  15073. // FieldID sequence
  15074. der.startSequence();
  15075. der.writeOID('1.2.840.10045.1.1'); // prime-field
  15076. der.writeBuffer(curve.p, asn1.Ber.Integer);
  15077. der.endSequence();
  15078. // Curve sequence
  15079. der.startSequence();
  15080. var a = curve.p;
  15081. if (a[0] === 0x0)
  15082. a = a.slice(1);
  15083. der.writeBuffer(a, asn1.Ber.OctetString);
  15084. der.writeBuffer(curve.b, asn1.Ber.OctetString);
  15085. der.writeBuffer(curve.s, asn1.Ber.BitString);
  15086. der.endSequence();
  15087. der.writeBuffer(curve.G, asn1.Ber.OctetString);
  15088. der.writeBuffer(curve.n, asn1.Ber.Integer);
  15089. var h = curve.h;
  15090. if (!h) {
  15091. h = new Buffer(1);
  15092. h[0] = 1;
  15093. }
  15094. der.writeBuffer(h, asn1.Ber.Integer);
  15095. // ECParameters
  15096. der.endSequence();
  15097. }
  15098. }
  15099. function writePkcs8ECDSAPublic(key, der) {
  15100. writeECDSACurve(key, der);
  15101. der.endSequence();
  15102. var Q = utils.ecNormalize(key.part.Q.data, true);
  15103. der.writeBuffer(Q, asn1.Ber.BitString);
  15104. }
  15105. function writePkcs8ECDSAPrivate(key, der) {
  15106. writeECDSACurve(key, der);
  15107. der.endSequence();
  15108. der.startSequence(asn1.Ber.OctetString);
  15109. der.startSequence();
  15110. var version = new Buffer(1);
  15111. version[0] = 1;
  15112. der.writeBuffer(version, asn1.Ber.Integer);
  15113. der.writeBuffer(key.part.d.data, asn1.Ber.OctetString);
  15114. der.startSequence(0xa1);
  15115. var Q = utils.ecNormalize(key.part.Q.data, true);
  15116. der.writeBuffer(Q, asn1.Ber.BitString);
  15117. der.endSequence();
  15118. der.endSequence();
  15119. der.endSequence();
  15120. }
  15121. /***/ }),
  15122. /* 87 */
  15123. /***/ (function(module, exports, __webpack_require__) {
  15124. // Copyright 2017 Joyent, Inc.
  15125. module.exports = Identity;
  15126. var assert = __webpack_require__(3);
  15127. var algs = __webpack_require__(16);
  15128. var crypto = __webpack_require__(5);
  15129. var Fingerprint = __webpack_require__(84);
  15130. var Signature = __webpack_require__(32);
  15131. var errs = __webpack_require__(31);
  15132. var util = __webpack_require__(2);
  15133. var utils = __webpack_require__(12);
  15134. var asn1 = __webpack_require__(39);
  15135. /*JSSTYLED*/
  15136. var DNS_NAME_RE = /^([*]|[a-z0-9][a-z0-9\-]{0,62})(?:\.([*]|[a-z0-9][a-z0-9\-]{0,62}))*$/i;
  15137. var oids = {};
  15138. oids.cn = '2.5.4.3';
  15139. oids.o = '2.5.4.10';
  15140. oids.ou = '2.5.4.11';
  15141. oids.l = '2.5.4.7';
  15142. oids.s = '2.5.4.8';
  15143. oids.c = '2.5.4.6';
  15144. oids.sn = '2.5.4.4';
  15145. oids.dc = '0.9.2342.19200300.100.1.25';
  15146. oids.uid = '0.9.2342.19200300.100.1.1';
  15147. oids.mail = '0.9.2342.19200300.100.1.3';
  15148. var unoids = {};
  15149. Object.keys(oids).forEach(function (k) {
  15150. unoids[oids[k]] = k;
  15151. });
  15152. function Identity(opts) {
  15153. var self = this;
  15154. assert.object(opts, 'options');
  15155. assert.arrayOfObject(opts.components, 'options.components');
  15156. this.components = opts.components;
  15157. this.componentLookup = {};
  15158. this.components.forEach(function (c) {
  15159. if (c.name && !c.oid)
  15160. c.oid = oids[c.name];
  15161. if (c.oid && !c.name)
  15162. c.name = unoids[c.oid];
  15163. if (self.componentLookup[c.name] === undefined)
  15164. self.componentLookup[c.name] = [];
  15165. self.componentLookup[c.name].push(c);
  15166. });
  15167. if (this.componentLookup.cn && this.componentLookup.cn.length > 0) {
  15168. this.cn = this.componentLookup.cn[0].value;
  15169. }
  15170. assert.optionalString(opts.type, 'options.type');
  15171. if (opts.type === undefined) {
  15172. if (this.components.length === 1 &&
  15173. this.componentLookup.cn &&
  15174. this.componentLookup.cn.length === 1 &&
  15175. this.componentLookup.cn[0].value.match(DNS_NAME_RE)) {
  15176. this.type = 'host';
  15177. this.hostname = this.componentLookup.cn[0].value;
  15178. } else if (this.componentLookup.dc &&
  15179. this.components.length === this.componentLookup.dc.length) {
  15180. this.type = 'host';
  15181. this.hostname = this.componentLookup.dc.map(
  15182. function (c) {
  15183. return (c.value);
  15184. }).join('.');
  15185. } else if (this.componentLookup.uid &&
  15186. this.components.length ===
  15187. this.componentLookup.uid.length) {
  15188. this.type = 'user';
  15189. this.uid = this.componentLookup.uid[0].value;
  15190. } else if (this.componentLookup.cn &&
  15191. this.componentLookup.cn.length === 1 &&
  15192. this.componentLookup.cn[0].value.match(DNS_NAME_RE)) {
  15193. this.type = 'host';
  15194. this.hostname = this.componentLookup.cn[0].value;
  15195. } else if (this.componentLookup.uid &&
  15196. this.componentLookup.uid.length === 1) {
  15197. this.type = 'user';
  15198. this.uid = this.componentLookup.uid[0].value;
  15199. } else if (this.componentLookup.mail &&
  15200. this.componentLookup.mail.length === 1) {
  15201. this.type = 'email';
  15202. this.email = this.componentLookup.mail[0].value;
  15203. } else if (this.componentLookup.cn &&
  15204. this.componentLookup.cn.length === 1) {
  15205. this.type = 'user';
  15206. this.uid = this.componentLookup.cn[0].value;
  15207. } else {
  15208. this.type = 'unknown';
  15209. }
  15210. } else {
  15211. this.type = opts.type;
  15212. if (this.type === 'host')
  15213. this.hostname = opts.hostname;
  15214. else if (this.type === 'user')
  15215. this.uid = opts.uid;
  15216. else if (this.type === 'email')
  15217. this.email = opts.email;
  15218. else
  15219. throw (new Error('Unknown type ' + this.type));
  15220. }
  15221. }
  15222. Identity.prototype.toString = function () {
  15223. return (this.components.map(function (c) {
  15224. return (c.name.toUpperCase() + '=' + c.value);
  15225. }).join(', '));
  15226. };
  15227. /*
  15228. * These are from X.680 -- PrintableString allowed chars are in section 37.4
  15229. * table 8. Spec for IA5Strings is "1,6 + SPACE + DEL" where 1 refers to
  15230. * ISO IR #001 (standard ASCII control characters) and 6 refers to ISO IR #006
  15231. * (the basic ASCII character set).
  15232. */
  15233. /* JSSTYLED */
  15234. var NOT_PRINTABLE = /[^a-zA-Z0-9 '(),+.\/:=?-]/;
  15235. /* JSSTYLED */
  15236. var NOT_IA5 = /[^\x00-\x7f]/;
  15237. Identity.prototype.toAsn1 = function (der, tag) {
  15238. der.startSequence(tag);
  15239. this.components.forEach(function (c) {
  15240. der.startSequence(asn1.Ber.Constructor | asn1.Ber.Set);
  15241. der.startSequence();
  15242. der.writeOID(c.oid);
  15243. /*
  15244. * If we fit in a PrintableString, use that. Otherwise use an
  15245. * IA5String or UTF8String.
  15246. */
  15247. if (c.value.match(NOT_IA5)) {
  15248. var v = new Buffer(c.value, 'utf8');
  15249. der.writeBuffer(v, asn1.Ber.Utf8String);
  15250. } else if (c.value.match(NOT_PRINTABLE)) {
  15251. der.writeString(c.value, asn1.Ber.IA5String);
  15252. } else {
  15253. der.writeString(c.value, asn1.Ber.PrintableString);
  15254. }
  15255. der.endSequence();
  15256. der.endSequence();
  15257. });
  15258. der.endSequence();
  15259. };
  15260. function globMatch(a, b) {
  15261. if (a === '**' || b === '**')
  15262. return (true);
  15263. var aParts = a.split('.');
  15264. var bParts = b.split('.');
  15265. if (aParts.length !== bParts.length)
  15266. return (false);
  15267. for (var i = 0; i < aParts.length; ++i) {
  15268. if (aParts[i] === '*' || bParts[i] === '*')
  15269. continue;
  15270. if (aParts[i] !== bParts[i])
  15271. return (false);
  15272. }
  15273. return (true);
  15274. }
  15275. Identity.prototype.equals = function (other) {
  15276. if (!Identity.isIdentity(other, [1, 0]))
  15277. return (false);
  15278. if (other.components.length !== this.components.length)
  15279. return (false);
  15280. for (var i = 0; i < this.components.length; ++i) {
  15281. if (this.components[i].oid !== other.components[i].oid)
  15282. return (false);
  15283. if (!globMatch(this.components[i].value,
  15284. other.components[i].value)) {
  15285. return (false);
  15286. }
  15287. }
  15288. return (true);
  15289. };
  15290. Identity.forHost = function (hostname) {
  15291. assert.string(hostname, 'hostname');
  15292. return (new Identity({
  15293. type: 'host',
  15294. hostname: hostname,
  15295. components: [ { name: 'cn', value: hostname } ]
  15296. }));
  15297. };
  15298. Identity.forUser = function (uid) {
  15299. assert.string(uid, 'uid');
  15300. return (new Identity({
  15301. type: 'user',
  15302. uid: uid,
  15303. components: [ { name: 'uid', value: uid } ]
  15304. }));
  15305. };
  15306. Identity.forEmail = function (email) {
  15307. assert.string(email, 'email');
  15308. return (new Identity({
  15309. type: 'email',
  15310. email: email,
  15311. components: [ { name: 'mail', value: email } ]
  15312. }));
  15313. };
  15314. Identity.parseDN = function (dn) {
  15315. assert.string(dn, 'dn');
  15316. var parts = dn.split(',');
  15317. var cmps = parts.map(function (c) {
  15318. c = c.trim();
  15319. var eqPos = c.indexOf('=');
  15320. var name = c.slice(0, eqPos).toLowerCase();
  15321. var value = c.slice(eqPos + 1);
  15322. return ({ name: name, value: value });
  15323. });
  15324. return (new Identity({ components: cmps }));
  15325. };
  15326. Identity.parseAsn1 = function (der, top) {
  15327. var components = [];
  15328. der.readSequence(top);
  15329. var end = der.offset + der.length;
  15330. while (der.offset < end) {
  15331. der.readSequence(asn1.Ber.Constructor | asn1.Ber.Set);
  15332. var after = der.offset + der.length;
  15333. der.readSequence();
  15334. var oid = der.readOID();
  15335. var type = der.peek();
  15336. var value;
  15337. switch (type) {
  15338. case asn1.Ber.PrintableString:
  15339. case asn1.Ber.IA5String:
  15340. case asn1.Ber.OctetString:
  15341. case asn1.Ber.T61String:
  15342. value = der.readString(type);
  15343. break;
  15344. case asn1.Ber.Utf8String:
  15345. value = der.readString(type, true);
  15346. value = value.toString('utf8');
  15347. break;
  15348. case asn1.Ber.CharacterString:
  15349. case asn1.Ber.BMPString:
  15350. value = der.readString(type, true);
  15351. value = value.toString('utf16le');
  15352. break;
  15353. default:
  15354. throw (new Error('Unknown asn1 type ' + type));
  15355. }
  15356. components.push({ oid: oid, value: value });
  15357. der._offset = after;
  15358. }
  15359. der._offset = end;
  15360. return (new Identity({
  15361. components: components
  15362. }));
  15363. };
  15364. Identity.isIdentity = function (obj, ver) {
  15365. return (utils.isCompatible(obj, Identity, ver));
  15366. };
  15367. /*
  15368. * API versions for Identity:
  15369. * [1,0] -- initial ver
  15370. */
  15371. Identity.prototype._sshpkApiVersion = [1, 0];
  15372. Identity._oldVersionDetect = function (obj) {
  15373. return ([1, 0]);
  15374. };
  15375. /***/ }),
  15376. /* 88 */
  15377. /***/ (function(module, exports) {
  15378. //Types of elements found in the DOM
  15379. module.exports = {
  15380. Text: "text", //Text
  15381. Directive: "directive", //<? ... ?>
  15382. Comment: "comment", //<!-- ... -->
  15383. Script: "script", //<script> tags
  15384. Style: "style", //<style> tags
  15385. Tag: "tag", //Any tag
  15386. CDATA: "cdata", //<![CDATA[ ... ]]>
  15387. Doctype: "doctype",
  15388. isTag: function(elem){
  15389. return elem.type === "tag" || elem.type === "script" || elem.type === "style";
  15390. }
  15391. };
  15392. /***/ }),
  15393. /* 89 */
  15394. /***/ (function(module, exports, __webpack_require__) {
  15395. "use strict";
  15396. exports.REPLACEMENT_CHARACTER = '\uFFFD';
  15397. exports.CODE_POINTS = {
  15398. EOF: -1,
  15399. NULL: 0x00,
  15400. TABULATION: 0x09,
  15401. CARRIAGE_RETURN: 0x0D,
  15402. LINE_FEED: 0x0A,
  15403. FORM_FEED: 0x0C,
  15404. SPACE: 0x20,
  15405. EXCLAMATION_MARK: 0x21,
  15406. QUOTATION_MARK: 0x22,
  15407. NUMBER_SIGN: 0x23,
  15408. AMPERSAND: 0x26,
  15409. APOSTROPHE: 0x27,
  15410. HYPHEN_MINUS: 0x2D,
  15411. SOLIDUS: 0x2F,
  15412. DIGIT_0: 0x30,
  15413. DIGIT_9: 0x39,
  15414. SEMICOLON: 0x3B,
  15415. LESS_THAN_SIGN: 0x3C,
  15416. EQUALS_SIGN: 0x3D,
  15417. GREATER_THAN_SIGN: 0x3E,
  15418. QUESTION_MARK: 0x3F,
  15419. LATIN_CAPITAL_A: 0x41,
  15420. LATIN_CAPITAL_F: 0x46,
  15421. LATIN_CAPITAL_X: 0x58,
  15422. LATIN_CAPITAL_Z: 0x5A,
  15423. GRAVE_ACCENT: 0x60,
  15424. LATIN_SMALL_A: 0x61,
  15425. LATIN_SMALL_F: 0x66,
  15426. LATIN_SMALL_X: 0x78,
  15427. LATIN_SMALL_Z: 0x7A,
  15428. REPLACEMENT_CHARACTER: 0xFFFD
  15429. };
  15430. exports.CODE_POINT_SEQUENCES = {
  15431. DASH_DASH_STRING: [0x2D, 0x2D], //--
  15432. DOCTYPE_STRING: [0x44, 0x4F, 0x43, 0x54, 0x59, 0x50, 0x45], //DOCTYPE
  15433. CDATA_START_STRING: [0x5B, 0x43, 0x44, 0x41, 0x54, 0x41, 0x5B], //[CDATA[
  15434. CDATA_END_STRING: [0x5D, 0x5D, 0x3E], //]]>
  15435. SCRIPT_STRING: [0x73, 0x63, 0x72, 0x69, 0x70, 0x74], //script
  15436. PUBLIC_STRING: [0x50, 0x55, 0x42, 0x4C, 0x49, 0x43], //PUBLIC
  15437. SYSTEM_STRING: [0x53, 0x59, 0x53, 0x54, 0x45, 0x4D] //SYSTEM
  15438. };
  15439. /***/ }),
  15440. /* 90 */
  15441. /***/ (function(module, exports) {
  15442. /** Used as references for various `Number` constants. */
  15443. var MAX_SAFE_INTEGER = 9007199254740991;
  15444. /** Used to detect unsigned integer values. */
  15445. var reIsUint = /^(?:0|[1-9]\d*)$/;
  15446. /**
  15447. * Checks if `value` is a valid array-like index.
  15448. *
  15449. * @private
  15450. * @param {*} value The value to check.
  15451. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  15452. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  15453. */
  15454. function isIndex(value, length) {
  15455. length = length == null ? MAX_SAFE_INTEGER : length;
  15456. return !!length &&
  15457. (typeof value == 'number' || reIsUint.test(value)) &&
  15458. (value > -1 && value % 1 == 0 && value < length);
  15459. }
  15460. module.exports = isIndex;
  15461. /***/ }),
  15462. /* 91 */
  15463. /***/ (function(module, exports, __webpack_require__) {
  15464. var arrayLikeKeys = __webpack_require__(399),
  15465. baseKeys = __webpack_require__(686),
  15466. isArrayLike = __webpack_require__(40);
  15467. /**
  15468. * Creates an array of the own enumerable property names of `object`.
  15469. *
  15470. * **Note:** Non-object values are coerced to objects. See the
  15471. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  15472. * for more details.
  15473. *
  15474. * @static
  15475. * @since 0.1.0
  15476. * @memberOf _
  15477. * @category Object
  15478. * @param {Object} object The object to query.
  15479. * @returns {Array} Returns the array of property names.
  15480. * @example
  15481. *
  15482. * function Foo() {
  15483. * this.a = 1;
  15484. * this.b = 2;
  15485. * }
  15486. *
  15487. * Foo.prototype.c = 3;
  15488. *
  15489. * _.keys(new Foo);
  15490. * // => ['a', 'b'] (iteration order is not guaranteed)
  15491. *
  15492. * _.keys('hi');
  15493. * // => ['0', '1']
  15494. */
  15495. function keys(object) {
  15496. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  15497. }
  15498. module.exports = keys;
  15499. /***/ }),
  15500. /* 92 */
  15501. /***/ (function(module, exports, __webpack_require__) {
  15502. var parse = __webpack_require__(114),
  15503. render = __webpack_require__(159),
  15504. assign = __webpack_require__(394);
  15505. /**
  15506. * HTML Tags
  15507. */
  15508. var tags = { tag: true, script: true, style: true };
  15509. /**
  15510. * Check if the DOM element is a tag
  15511. *
  15512. * isTag(type) includes <script> and <style> tags
  15513. */
  15514. exports.isTag = function(type) {
  15515. if (type.type) type = type.type;
  15516. return tags[type] || false;
  15517. };
  15518. /**
  15519. * Convert a string to camel case notation.
  15520. * @param {String} str String to be converted.
  15521. * @return {String} String in camel case notation.
  15522. */
  15523. exports.camelCase = function(str) {
  15524. return str.replace(/[_.-](\w|$)/g, function(_, x) {
  15525. return x.toUpperCase();
  15526. });
  15527. };
  15528. /**
  15529. * Convert a string from camel case to "CSS case", where word boundaries are
  15530. * described by hyphens ("-") and all characters are lower-case.
  15531. * @param {String} str String to be converted.
  15532. * @return {string} String in "CSS case".
  15533. */
  15534. exports.cssCase = function(str) {
  15535. return str.replace(/[A-Z]/g, '-$&').toLowerCase();
  15536. };
  15537. /**
  15538. * Iterate over each DOM element without creating intermediary Cheerio instances.
  15539. *
  15540. * This is indented for use internally to avoid otherwise unnecessary memory pressure introduced
  15541. * by _make.
  15542. */
  15543. exports.domEach = function(cheerio, fn) {
  15544. var i = 0, len = cheerio.length;
  15545. while (i < len && fn.call(cheerio, i, cheerio[i]) !== false) ++i;
  15546. return cheerio;
  15547. };
  15548. /**
  15549. * Create a deep copy of the given DOM structure by first rendering it to a
  15550. * string and then parsing the resultant markup.
  15551. *
  15552. * @argument {Object} dom - The htmlparser2-compliant DOM structure
  15553. * @argument {Object} options - The parsing/rendering options
  15554. */
  15555. exports.cloneDom = function(dom, options) {
  15556. options = assign({}, options, { _useHtmlParser2: true });
  15557. return parse(render(dom, options), options, false).children;
  15558. };
  15559. /*
  15560. * A simple way to check for HTML strings or ID strings
  15561. */
  15562. var quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/;
  15563. /*
  15564. * Check if string is HTML
  15565. */
  15566. exports.isHtml = function(str) {
  15567. // Faster than running regex, if str starts with `<` and ends with `>`, assume it's HTML
  15568. if (str.charAt(0) === '<' && str.charAt(str.length - 1) === '>' && str.length >= 3) return true;
  15569. // Run the regex
  15570. var match = quickExpr.exec(str);
  15571. return !!(match && match[1]);
  15572. };
  15573. /***/ }),
  15574. /* 93 */
  15575. /***/ (function(module, exports, __webpack_require__) {
  15576. var baseGetTag = __webpack_require__(44),
  15577. isObjectLike = __webpack_require__(26);
  15578. /** `Object#toString` result references. */
  15579. var symbolTag = '[object Symbol]';
  15580. /**
  15581. * Checks if `value` is classified as a `Symbol` primitive or object.
  15582. *
  15583. * @static
  15584. * @memberOf _
  15585. * @since 4.0.0
  15586. * @category Lang
  15587. * @param {*} value The value to check.
  15588. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  15589. * @example
  15590. *
  15591. * _.isSymbol(Symbol.iterator);
  15592. * // => true
  15593. *
  15594. * _.isSymbol('abc');
  15595. * // => false
  15596. */
  15597. function isSymbol(value) {
  15598. return typeof value == 'symbol' ||
  15599. (isObjectLike(value) && baseGetTag(value) == symbolTag);
  15600. }
  15601. module.exports = isSymbol;
  15602. /***/ }),
  15603. /* 94 */
  15604. /***/ (function(module, exports) {
  15605. module.exports = {
  15606. trueFunc: function trueFunc(){
  15607. return true;
  15608. },
  15609. falseFunc: function falseFunc(){
  15610. return false;
  15611. }
  15612. };
  15613. /***/ }),
  15614. /* 95 */
  15615. /***/ (function(module, exports, __webpack_require__) {
  15616. var isSymbol = __webpack_require__(93);
  15617. /** Used as references for various `Number` constants. */
  15618. var INFINITY = 1 / 0;
  15619. /**
  15620. * Converts `value` to a string key if it's not a string or symbol.
  15621. *
  15622. * @private
  15623. * @param {*} value The value to inspect.
  15624. * @returns {string|symbol} Returns the key.
  15625. */
  15626. function toKey(value) {
  15627. if (typeof value == 'string' || isSymbol(value)) {
  15628. return value;
  15629. }
  15630. var result = (value + '');
  15631. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  15632. }
  15633. module.exports = toKey;
  15634. /***/ }),
  15635. /* 96 */
  15636. /***/ (function(module, exports) {
  15637. var core = module.exports = { version: '2.5.3' };
  15638. if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
  15639. /***/ }),
  15640. /* 97 */
  15641. /***/ (function(module, exports, __webpack_require__) {
  15642. // 7.1.1 ToPrimitive(input [, PreferredType])
  15643. var isObject = __webpack_require__(8);
  15644. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  15645. // and the second argument - flag - preferred type is a string
  15646. module.exports = function (it, S) {
  15647. if (!isObject(it)) return it;
  15648. var fn, val;
  15649. if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  15650. if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  15651. if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  15652. throw TypeError("Can't convert object to primitive value");
  15653. };
  15654. /***/ }),
  15655. /* 98 */
  15656. /***/ (function(module, exports, __webpack_require__) {
  15657. // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
  15658. var $keys = __webpack_require__(444);
  15659. var hiddenKeys = __webpack_require__(191).concat('length', 'prototype');
  15660. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  15661. return $keys(O, hiddenKeys);
  15662. };
  15663. /***/ }),
  15664. /* 99 */
  15665. /***/ (function(module, exports, __webpack_require__) {
  15666. var toInteger = __webpack_require__(55);
  15667. var max = Math.max;
  15668. var min = Math.min;
  15669. module.exports = function (index, length) {
  15670. index = toInteger(index);
  15671. return index < 0 ? max(index + length, 0) : min(index, length);
  15672. };
  15673. /***/ }),
  15674. /* 100 */
  15675. /***/ (function(module, exports, __webpack_require__) {
  15676. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  15677. var anObject = __webpack_require__(7);
  15678. var dPs = __webpack_require__(838);
  15679. var enumBugKeys = __webpack_require__(191);
  15680. var IE_PROTO = __webpack_require__(189)('IE_PROTO');
  15681. var Empty = function () { /* empty */ };
  15682. var PROTOTYPE = 'prototype';
  15683. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  15684. var createDict = function () {
  15685. // Thrash, waste and sodomy: IE GC bug
  15686. var iframe = __webpack_require__(185)('iframe');
  15687. var i = enumBugKeys.length;
  15688. var lt = '<';
  15689. var gt = '>';
  15690. var iframeDocument;
  15691. iframe.style.display = 'none';
  15692. __webpack_require__(445).appendChild(iframe);
  15693. iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  15694. // createDict = iframe.contentWindow.Object;
  15695. // html.removeChild(iframe);
  15696. iframeDocument = iframe.contentWindow.document;
  15697. iframeDocument.open();
  15698. iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  15699. iframeDocument.close();
  15700. createDict = iframeDocument.F;
  15701. while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
  15702. return createDict();
  15703. };
  15704. module.exports = Object.create || function create(O, Properties) {
  15705. var result;
  15706. if (O !== null) {
  15707. Empty[PROTOTYPE] = anObject(O);
  15708. result = new Empty();
  15709. Empty[PROTOTYPE] = null;
  15710. // add "__proto__" for Object.getPrototypeOf polyfill
  15711. result[IE_PROTO] = O;
  15712. } else result = createDict();
  15713. return Properties === undefined ? result : dPs(result, Properties);
  15714. };
  15715. /***/ }),
  15716. /* 101 */
  15717. /***/ (function(module, exports, __webpack_require__) {
  15718. // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
  15719. var has = __webpack_require__(23);
  15720. var toObject = __webpack_require__(57);
  15721. var IE_PROTO = __webpack_require__(189)('IE_PROTO');
  15722. var ObjectProto = Object.prototype;
  15723. module.exports = Object.getPrototypeOf || function (O) {
  15724. O = toObject(O);
  15725. if (has(O, IE_PROTO)) return O[IE_PROTO];
  15726. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  15727. return O.constructor.prototype;
  15728. } return O instanceof Object ? ObjectProto : null;
  15729. };
  15730. /***/ }),
  15731. /* 102 */
  15732. /***/ (function(module, exports, __webpack_require__) {
  15733. // 0 -> Array#forEach
  15734. // 1 -> Array#map
  15735. // 2 -> Array#filter
  15736. // 3 -> Array#some
  15737. // 4 -> Array#every
  15738. // 5 -> Array#find
  15739. // 6 -> Array#findIndex
  15740. var ctx = __webpack_require__(34);
  15741. var IObject = __webpack_require__(187);
  15742. var toObject = __webpack_require__(57);
  15743. var toLength = __webpack_require__(20);
  15744. var asc = __webpack_require__(839);
  15745. module.exports = function (TYPE, $create) {
  15746. var IS_MAP = TYPE == 1;
  15747. var IS_FILTER = TYPE == 2;
  15748. var IS_SOME = TYPE == 3;
  15749. var IS_EVERY = TYPE == 4;
  15750. var IS_FIND_INDEX = TYPE == 6;
  15751. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  15752. var create = $create || asc;
  15753. return function ($this, callbackfn, that) {
  15754. var O = toObject($this);
  15755. var self = IObject(O);
  15756. var f = ctx(callbackfn, that, 3);
  15757. var length = toLength(self.length);
  15758. var index = 0;
  15759. var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
  15760. var val, res;
  15761. for (;length > index; index++) if (NO_HOLES || index in self) {
  15762. val = self[index];
  15763. res = f(val, index, O);
  15764. if (TYPE) {
  15765. if (IS_MAP) result[index] = res; // map
  15766. else if (res) switch (TYPE) {
  15767. case 3: return true; // some
  15768. case 5: return val; // find
  15769. case 6: return index; // findIndex
  15770. case 2: result.push(val); // filter
  15771. } else if (IS_EVERY) return false; // every
  15772. }
  15773. }
  15774. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
  15775. };
  15776. };
  15777. /***/ }),
  15778. /* 103 */
  15779. /***/ (function(module, exports) {
  15780. exports.f = {}.propertyIsEnumerable;
  15781. /***/ }),
  15782. /* 104 */
  15783. /***/ (function(module, exports, __webpack_require__) {
  15784. var META = __webpack_require__(53)('meta');
  15785. var isObject = __webpack_require__(8);
  15786. var has = __webpack_require__(23);
  15787. var setDesc = __webpack_require__(18).f;
  15788. var id = 0;
  15789. var isExtensible = Object.isExtensible || function () {
  15790. return true;
  15791. };
  15792. var FREEZE = !__webpack_require__(13)(function () {
  15793. return isExtensible(Object.preventExtensions({}));
  15794. });
  15795. var setMeta = function (it) {
  15796. setDesc(it, META, { value: {
  15797. i: 'O' + ++id, // object ID
  15798. w: {} // weak collections IDs
  15799. } });
  15800. };
  15801. var fastKey = function (it, create) {
  15802. // return primitive with prefix
  15803. if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  15804. if (!has(it, META)) {
  15805. // can't set metadata to uncaught frozen object
  15806. if (!isExtensible(it)) return 'F';
  15807. // not necessary to add metadata
  15808. if (!create) return 'E';
  15809. // add missing metadata
  15810. setMeta(it);
  15811. // return object ID
  15812. } return it[META].i;
  15813. };
  15814. var getWeak = function (it, create) {
  15815. if (!has(it, META)) {
  15816. // can't set metadata to uncaught frozen object
  15817. if (!isExtensible(it)) return true;
  15818. // not necessary to add metadata
  15819. if (!create) return false;
  15820. // add missing metadata
  15821. setMeta(it);
  15822. // return hash weak collections IDs
  15823. } return it[META].w;
  15824. };
  15825. // add metadata on freeze-family methods calling
  15826. var onFreeze = function (it) {
  15827. if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
  15828. return it;
  15829. };
  15830. var meta = module.exports = {
  15831. KEY: META,
  15832. NEED: false,
  15833. fastKey: fastKey,
  15834. getWeak: getWeak,
  15835. onFreeze: onFreeze
  15836. };
  15837. /***/ }),
  15838. /* 105 */
  15839. /***/ (function(module, exports, __webpack_require__) {
  15840. "use strict";
  15841. // Load modules
  15842. const Sntp = __webpack_require__(344);
  15843. const Boom = __webpack_require__(144);
  15844. // Declare internals
  15845. const internals = {};
  15846. exports.version = function () {
  15847. return __webpack_require__(538).version;
  15848. };
  15849. exports.limits = {
  15850. maxMatchLength: 4096 // Limit the length of uris and headers to avoid a DoS attack on string matching
  15851. };
  15852. // Extract host and port from request
  15853. // $1 $2
  15854. internals.hostHeaderRegex = /^(?:(?:\r\n)?\s)*((?:[^:]+)|(?:\[[^\]]+\]))(?::(\d+))?(?:(?:\r\n)?\s)*$/; // (IPv4, hostname)|(IPv6)
  15855. exports.parseHost = function (req, hostHeaderName) {
  15856. hostHeaderName = (hostHeaderName ? hostHeaderName.toLowerCase() : 'host');
  15857. const hostHeader = req.headers[hostHeaderName];
  15858. if (!hostHeader) {
  15859. return null;
  15860. }
  15861. if (hostHeader.length > exports.limits.maxMatchLength) {
  15862. return null;
  15863. }
  15864. const hostParts = hostHeader.match(internals.hostHeaderRegex);
  15865. if (!hostParts) {
  15866. return null;
  15867. }
  15868. return {
  15869. name: hostParts[1],
  15870. port: (hostParts[2] ? hostParts[2] : (req.connection && req.connection.encrypted ? 443 : 80))
  15871. };
  15872. };
  15873. // Parse Content-Type header content
  15874. exports.parseContentType = function (header) {
  15875. if (!header) {
  15876. return '';
  15877. }
  15878. return header.split(';')[0].trim().toLowerCase();
  15879. };
  15880. // Convert node's to request configuration object
  15881. exports.parseRequest = function (req, options) {
  15882. if (!req.headers) {
  15883. return req;
  15884. }
  15885. // Obtain host and port information
  15886. let host;
  15887. if (!options.host ||
  15888. !options.port) {
  15889. host = exports.parseHost(req, options.hostHeaderName);
  15890. if (!host) {
  15891. return new Error('Invalid Host header');
  15892. }
  15893. }
  15894. const request = {
  15895. method: req.method,
  15896. url: req.url,
  15897. host: options.host || host.name,
  15898. port: options.port || host.port,
  15899. authorization: req.headers.authorization,
  15900. contentType: req.headers['content-type'] || ''
  15901. };
  15902. return request;
  15903. };
  15904. exports.now = function (localtimeOffsetMsec) {
  15905. return Sntp.now() + (localtimeOffsetMsec || 0);
  15906. };
  15907. exports.nowSecs = function (localtimeOffsetMsec) {
  15908. return Math.floor(exports.now(localtimeOffsetMsec) / 1000);
  15909. };
  15910. internals.authHeaderRegex = /^(\w+)(?:\s+(.*))?$/; // Header: scheme[ something]
  15911. internals.attributeRegex = /^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~]+$/; // !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9
  15912. // Parse Hawk HTTP Authorization header
  15913. exports.parseAuthorizationHeader = function (header, keys) {
  15914. keys = keys || ['id', 'ts', 'nonce', 'hash', 'ext', 'mac', 'app', 'dlg'];
  15915. if (!header) {
  15916. return Boom.unauthorized(null, 'Hawk');
  15917. }
  15918. if (header.length > exports.limits.maxMatchLength) {
  15919. return Boom.badRequest('Header length too long');
  15920. }
  15921. const headerParts = header.match(internals.authHeaderRegex);
  15922. if (!headerParts) {
  15923. return Boom.badRequest('Invalid header syntax');
  15924. }
  15925. const scheme = headerParts[1];
  15926. if (scheme.toLowerCase() !== 'hawk') {
  15927. return Boom.unauthorized(null, 'Hawk');
  15928. }
  15929. const attributesString = headerParts[2];
  15930. if (!attributesString) {
  15931. return Boom.badRequest('Invalid header syntax');
  15932. }
  15933. const attributes = {};
  15934. let errorMessage = '';
  15935. const verify = attributesString.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g, ($0, $1, $2) => {
  15936. // Check valid attribute names
  15937. if (keys.indexOf($1) === -1) {
  15938. errorMessage = 'Unknown attribute: ' + $1;
  15939. return;
  15940. }
  15941. // Allowed attribute value characters
  15942. if ($2.match(internals.attributeRegex) === null) {
  15943. errorMessage = 'Bad attribute value: ' + $1;
  15944. return;
  15945. }
  15946. // Check for duplicates
  15947. if (attributes.hasOwnProperty($1)) {
  15948. errorMessage = 'Duplicate attribute: ' + $1;
  15949. return;
  15950. }
  15951. attributes[$1] = $2;
  15952. return '';
  15953. });
  15954. if (verify !== '') {
  15955. return Boom.badRequest(errorMessage || 'Bad header format');
  15956. }
  15957. return attributes;
  15958. };
  15959. exports.unauthorized = function (message, attributes) {
  15960. return Boom.unauthorized(message || null, 'Hawk', attributes);
  15961. };
  15962. /***/ }),
  15963. /* 106 */
  15964. /***/ (function(module, exports) {
  15965. module.exports = require("querystring");
  15966. /***/ }),
  15967. /* 107 */
  15968. /***/ (function(module, exports, __webpack_require__) {
  15969. // Copyright 2012 Joyent, Inc. All rights reserved.
  15970. var assert = __webpack_require__(3);
  15971. var sshpk = __webpack_require__(146);
  15972. var util = __webpack_require__(2);
  15973. var HASH_ALGOS = {
  15974. 'sha1': true,
  15975. 'sha256': true,
  15976. 'sha512': true
  15977. };
  15978. var PK_ALGOS = {
  15979. 'rsa': true,
  15980. 'dsa': true,
  15981. 'ecdsa': true
  15982. };
  15983. function HttpSignatureError(message, caller) {
  15984. if (Error.captureStackTrace)
  15985. Error.captureStackTrace(this, caller || HttpSignatureError);
  15986. this.message = message;
  15987. this.name = caller.name;
  15988. }
  15989. util.inherits(HttpSignatureError, Error);
  15990. function InvalidAlgorithmError(message) {
  15991. HttpSignatureError.call(this, message, InvalidAlgorithmError);
  15992. }
  15993. util.inherits(InvalidAlgorithmError, HttpSignatureError);
  15994. function validateAlgorithm(algorithm) {
  15995. var alg = algorithm.toLowerCase().split('-');
  15996. if (alg.length !== 2) {
  15997. throw (new InvalidAlgorithmError(alg[0].toUpperCase() + ' is not a ' +
  15998. 'valid algorithm'));
  15999. }
  16000. if (alg[0] !== 'hmac' && !PK_ALGOS[alg[0]]) {
  16001. throw (new InvalidAlgorithmError(alg[0].toUpperCase() + ' type keys ' +
  16002. 'are not supported'));
  16003. }
  16004. if (!HASH_ALGOS[alg[1]]) {
  16005. throw (new InvalidAlgorithmError(alg[1].toUpperCase() + ' is not a ' +
  16006. 'supported hash algorithm'));
  16007. }
  16008. return (alg);
  16009. }
  16010. ///--- API
  16011. module.exports = {
  16012. HASH_ALGOS: HASH_ALGOS,
  16013. PK_ALGOS: PK_ALGOS,
  16014. HttpSignatureError: HttpSignatureError,
  16015. InvalidAlgorithmError: InvalidAlgorithmError,
  16016. validateAlgorithm: validateAlgorithm,
  16017. /**
  16018. * Converts an OpenSSH public key (rsa only) to a PKCS#8 PEM file.
  16019. *
  16020. * The intent of this module is to interoperate with OpenSSL only,
  16021. * specifically the node crypto module's `verify` method.
  16022. *
  16023. * @param {String} key an OpenSSH public key.
  16024. * @return {String} PEM encoded form of the RSA public key.
  16025. * @throws {TypeError} on bad input.
  16026. * @throws {Error} on invalid ssh key formatted data.
  16027. */
  16028. sshKeyToPEM: function sshKeyToPEM(key) {
  16029. assert.string(key, 'ssh_key');
  16030. var k = sshpk.parseKey(key, 'ssh');
  16031. return (k.toString('pem'));
  16032. },
  16033. /**
  16034. * Generates an OpenSSH fingerprint from an ssh public key.
  16035. *
  16036. * @param {String} key an OpenSSH public key.
  16037. * @return {String} key fingerprint.
  16038. * @throws {TypeError} on bad input.
  16039. * @throws {Error} if what you passed doesn't look like an ssh public key.
  16040. */
  16041. fingerprint: function fingerprint(key) {
  16042. assert.string(key, 'ssh_key');
  16043. var k = sshpk.parseKey(key, 'ssh');
  16044. return (k.fingerprint('md5').toString('hex'));
  16045. },
  16046. /**
  16047. * Converts a PKGCS#8 PEM file to an OpenSSH public key (rsa)
  16048. *
  16049. * The reverse of the above function.
  16050. */
  16051. pemToRsaSSHKey: function pemToRsaSSHKey(pem, comment) {
  16052. assert.equal('string', typeof (pem), 'typeof pem');
  16053. var k = sshpk.parseKey(pem, 'pem');
  16054. k.comment = comment;
  16055. return (k.toString('ssh'));
  16056. }
  16057. };
  16058. /***/ }),
  16059. /* 108 */
  16060. /***/ (function(module, exports, __webpack_require__) {
  16061. // Basic Javascript Elliptic Curve implementation
  16062. // Ported loosely from BouncyCastle's Java EC code
  16063. // Only Fp curves implemented for now
  16064. // Requires jsbn.js and jsbn2.js
  16065. var BigInteger = __webpack_require__(46).BigInteger
  16066. var Barrett = BigInteger.prototype.Barrett
  16067. // ----------------
  16068. // ECFieldElementFp
  16069. // constructor
  16070. function ECFieldElementFp(q,x) {
  16071. this.x = x;
  16072. // TODO if(x.compareTo(q) >= 0) error
  16073. this.q = q;
  16074. }
  16075. function feFpEquals(other) {
  16076. if(other == this) return true;
  16077. return (this.q.equals(other.q) && this.x.equals(other.x));
  16078. }
  16079. function feFpToBigInteger() {
  16080. return this.x;
  16081. }
  16082. function feFpNegate() {
  16083. return new ECFieldElementFp(this.q, this.x.negate().mod(this.q));
  16084. }
  16085. function feFpAdd(b) {
  16086. return new ECFieldElementFp(this.q, this.x.add(b.toBigInteger()).mod(this.q));
  16087. }
  16088. function feFpSubtract(b) {
  16089. return new ECFieldElementFp(this.q, this.x.subtract(b.toBigInteger()).mod(this.q));
  16090. }
  16091. function feFpMultiply(b) {
  16092. return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger()).mod(this.q));
  16093. }
  16094. function feFpSquare() {
  16095. return new ECFieldElementFp(this.q, this.x.square().mod(this.q));
  16096. }
  16097. function feFpDivide(b) {
  16098. return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger().modInverse(this.q)).mod(this.q));
  16099. }
  16100. ECFieldElementFp.prototype.equals = feFpEquals;
  16101. ECFieldElementFp.prototype.toBigInteger = feFpToBigInteger;
  16102. ECFieldElementFp.prototype.negate = feFpNegate;
  16103. ECFieldElementFp.prototype.add = feFpAdd;
  16104. ECFieldElementFp.prototype.subtract = feFpSubtract;
  16105. ECFieldElementFp.prototype.multiply = feFpMultiply;
  16106. ECFieldElementFp.prototype.square = feFpSquare;
  16107. ECFieldElementFp.prototype.divide = feFpDivide;
  16108. // ----------------
  16109. // ECPointFp
  16110. // constructor
  16111. function ECPointFp(curve,x,y,z) {
  16112. this.curve = curve;
  16113. this.x = x;
  16114. this.y = y;
  16115. // Projective coordinates: either zinv == null or z * zinv == 1
  16116. // z and zinv are just BigIntegers, not fieldElements
  16117. if(z == null) {
  16118. this.z = BigInteger.ONE;
  16119. }
  16120. else {
  16121. this.z = z;
  16122. }
  16123. this.zinv = null;
  16124. //TODO: compression flag
  16125. }
  16126. function pointFpGetX() {
  16127. if(this.zinv == null) {
  16128. this.zinv = this.z.modInverse(this.curve.q);
  16129. }
  16130. var r = this.x.toBigInteger().multiply(this.zinv);
  16131. this.curve.reduce(r);
  16132. return this.curve.fromBigInteger(r);
  16133. }
  16134. function pointFpGetY() {
  16135. if(this.zinv == null) {
  16136. this.zinv = this.z.modInverse(this.curve.q);
  16137. }
  16138. var r = this.y.toBigInteger().multiply(this.zinv);
  16139. this.curve.reduce(r);
  16140. return this.curve.fromBigInteger(r);
  16141. }
  16142. function pointFpEquals(other) {
  16143. if(other == this) return true;
  16144. if(this.isInfinity()) return other.isInfinity();
  16145. if(other.isInfinity()) return this.isInfinity();
  16146. var u, v;
  16147. // u = Y2 * Z1 - Y1 * Z2
  16148. u = other.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(other.z)).mod(this.curve.q);
  16149. if(!u.equals(BigInteger.ZERO)) return false;
  16150. // v = X2 * Z1 - X1 * Z2
  16151. v = other.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(other.z)).mod(this.curve.q);
  16152. return v.equals(BigInteger.ZERO);
  16153. }
  16154. function pointFpIsInfinity() {
  16155. if((this.x == null) && (this.y == null)) return true;
  16156. return this.z.equals(BigInteger.ZERO) && !this.y.toBigInteger().equals(BigInteger.ZERO);
  16157. }
  16158. function pointFpNegate() {
  16159. return new ECPointFp(this.curve, this.x, this.y.negate(), this.z);
  16160. }
  16161. function pointFpAdd(b) {
  16162. if(this.isInfinity()) return b;
  16163. if(b.isInfinity()) return this;
  16164. // u = Y2 * Z1 - Y1 * Z2
  16165. var u = b.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(b.z)).mod(this.curve.q);
  16166. // v = X2 * Z1 - X1 * Z2
  16167. var v = b.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(b.z)).mod(this.curve.q);
  16168. if(BigInteger.ZERO.equals(v)) {
  16169. if(BigInteger.ZERO.equals(u)) {
  16170. return this.twice(); // this == b, so double
  16171. }
  16172. return this.curve.getInfinity(); // this = -b, so infinity
  16173. }
  16174. var THREE = new BigInteger("3");
  16175. var x1 = this.x.toBigInteger();
  16176. var y1 = this.y.toBigInteger();
  16177. var x2 = b.x.toBigInteger();
  16178. var y2 = b.y.toBigInteger();
  16179. var v2 = v.square();
  16180. var v3 = v2.multiply(v);
  16181. var x1v2 = x1.multiply(v2);
  16182. var zu2 = u.square().multiply(this.z);
  16183. // x3 = v * (z2 * (z1 * u^2 - 2 * x1 * v^2) - v^3)
  16184. var x3 = zu2.subtract(x1v2.shiftLeft(1)).multiply(b.z).subtract(v3).multiply(v).mod(this.curve.q);
  16185. // y3 = z2 * (3 * x1 * u * v^2 - y1 * v^3 - z1 * u^3) + u * v^3
  16186. var y3 = x1v2.multiply(THREE).multiply(u).subtract(y1.multiply(v3)).subtract(zu2.multiply(u)).multiply(b.z).add(u.multiply(v3)).mod(this.curve.q);
  16187. // z3 = v^3 * z1 * z2
  16188. var z3 = v3.multiply(this.z).multiply(b.z).mod(this.curve.q);
  16189. return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3);
  16190. }
  16191. function pointFpTwice() {
  16192. if(this.isInfinity()) return this;
  16193. if(this.y.toBigInteger().signum() == 0) return this.curve.getInfinity();
  16194. // TODO: optimized handling of constants
  16195. var THREE = new BigInteger("3");
  16196. var x1 = this.x.toBigInteger();
  16197. var y1 = this.y.toBigInteger();
  16198. var y1z1 = y1.multiply(this.z);
  16199. var y1sqz1 = y1z1.multiply(y1).mod(this.curve.q);
  16200. var a = this.curve.a.toBigInteger();
  16201. // w = 3 * x1^2 + a * z1^2
  16202. var w = x1.square().multiply(THREE);
  16203. if(!BigInteger.ZERO.equals(a)) {
  16204. w = w.add(this.z.square().multiply(a));
  16205. }
  16206. w = w.mod(this.curve.q);
  16207. //this.curve.reduce(w);
  16208. // x3 = 2 * y1 * z1 * (w^2 - 8 * x1 * y1^2 * z1)
  16209. var x3 = w.square().subtract(x1.shiftLeft(3).multiply(y1sqz1)).shiftLeft(1).multiply(y1z1).mod(this.curve.q);
  16210. // y3 = 4 * y1^2 * z1 * (3 * w * x1 - 2 * y1^2 * z1) - w^3
  16211. var y3 = w.multiply(THREE).multiply(x1).subtract(y1sqz1.shiftLeft(1)).shiftLeft(2).multiply(y1sqz1).subtract(w.square().multiply(w)).mod(this.curve.q);
  16212. // z3 = 8 * (y1 * z1)^3
  16213. var z3 = y1z1.square().multiply(y1z1).shiftLeft(3).mod(this.curve.q);
  16214. return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3);
  16215. }
  16216. // Simple NAF (Non-Adjacent Form) multiplication algorithm
  16217. // TODO: modularize the multiplication algorithm
  16218. function pointFpMultiply(k) {
  16219. if(this.isInfinity()) return this;
  16220. if(k.signum() == 0) return this.curve.getInfinity();
  16221. var e = k;
  16222. var h = e.multiply(new BigInteger("3"));
  16223. var neg = this.negate();
  16224. var R = this;
  16225. var i;
  16226. for(i = h.bitLength() - 2; i > 0; --i) {
  16227. R = R.twice();
  16228. var hBit = h.testBit(i);
  16229. var eBit = e.testBit(i);
  16230. if (hBit != eBit) {
  16231. R = R.add(hBit ? this : neg);
  16232. }
  16233. }
  16234. return R;
  16235. }
  16236. // Compute this*j + x*k (simultaneous multiplication)
  16237. function pointFpMultiplyTwo(j,x,k) {
  16238. var i;
  16239. if(j.bitLength() > k.bitLength())
  16240. i = j.bitLength() - 1;
  16241. else
  16242. i = k.bitLength() - 1;
  16243. var R = this.curve.getInfinity();
  16244. var both = this.add(x);
  16245. while(i >= 0) {
  16246. R = R.twice();
  16247. if(j.testBit(i)) {
  16248. if(k.testBit(i)) {
  16249. R = R.add(both);
  16250. }
  16251. else {
  16252. R = R.add(this);
  16253. }
  16254. }
  16255. else {
  16256. if(k.testBit(i)) {
  16257. R = R.add(x);
  16258. }
  16259. }
  16260. --i;
  16261. }
  16262. return R;
  16263. }
  16264. ECPointFp.prototype.getX = pointFpGetX;
  16265. ECPointFp.prototype.getY = pointFpGetY;
  16266. ECPointFp.prototype.equals = pointFpEquals;
  16267. ECPointFp.prototype.isInfinity = pointFpIsInfinity;
  16268. ECPointFp.prototype.negate = pointFpNegate;
  16269. ECPointFp.prototype.add = pointFpAdd;
  16270. ECPointFp.prototype.twice = pointFpTwice;
  16271. ECPointFp.prototype.multiply = pointFpMultiply;
  16272. ECPointFp.prototype.multiplyTwo = pointFpMultiplyTwo;
  16273. // ----------------
  16274. // ECCurveFp
  16275. // constructor
  16276. function ECCurveFp(q,a,b) {
  16277. this.q = q;
  16278. this.a = this.fromBigInteger(a);
  16279. this.b = this.fromBigInteger(b);
  16280. this.infinity = new ECPointFp(this, null, null);
  16281. this.reducer = new Barrett(this.q);
  16282. }
  16283. function curveFpGetQ() {
  16284. return this.q;
  16285. }
  16286. function curveFpGetA() {
  16287. return this.a;
  16288. }
  16289. function curveFpGetB() {
  16290. return this.b;
  16291. }
  16292. function curveFpEquals(other) {
  16293. if(other == this) return true;
  16294. return(this.q.equals(other.q) && this.a.equals(other.a) && this.b.equals(other.b));
  16295. }
  16296. function curveFpGetInfinity() {
  16297. return this.infinity;
  16298. }
  16299. function curveFpFromBigInteger(x) {
  16300. return new ECFieldElementFp(this.q, x);
  16301. }
  16302. function curveReduce(x) {
  16303. this.reducer.reduce(x);
  16304. }
  16305. // for now, work with hex strings because they're easier in JS
  16306. function curveFpDecodePointHex(s) {
  16307. switch(parseInt(s.substr(0,2), 16)) { // first byte
  16308. case 0:
  16309. return this.infinity;
  16310. case 2:
  16311. case 3:
  16312. // point compression not supported yet
  16313. return null;
  16314. case 4:
  16315. case 6:
  16316. case 7:
  16317. var len = (s.length - 2) / 2;
  16318. var xHex = s.substr(2, len);
  16319. var yHex = s.substr(len+2, len);
  16320. return new ECPointFp(this,
  16321. this.fromBigInteger(new BigInteger(xHex, 16)),
  16322. this.fromBigInteger(new BigInteger(yHex, 16)));
  16323. default: // unsupported
  16324. return null;
  16325. }
  16326. }
  16327. function curveFpEncodePointHex(p) {
  16328. if (p.isInfinity()) return "00";
  16329. var xHex = p.getX().toBigInteger().toString(16);
  16330. var yHex = p.getY().toBigInteger().toString(16);
  16331. var oLen = this.getQ().toString(16).length;
  16332. if ((oLen % 2) != 0) oLen++;
  16333. while (xHex.length < oLen) {
  16334. xHex = "0" + xHex;
  16335. }
  16336. while (yHex.length < oLen) {
  16337. yHex = "0" + yHex;
  16338. }
  16339. return "04" + xHex + yHex;
  16340. }
  16341. ECCurveFp.prototype.getQ = curveFpGetQ;
  16342. ECCurveFp.prototype.getA = curveFpGetA;
  16343. ECCurveFp.prototype.getB = curveFpGetB;
  16344. ECCurveFp.prototype.equals = curveFpEquals;
  16345. ECCurveFp.prototype.getInfinity = curveFpGetInfinity;
  16346. ECCurveFp.prototype.fromBigInteger = curveFpFromBigInteger;
  16347. ECCurveFp.prototype.reduce = curveReduce;
  16348. //ECCurveFp.prototype.decodePointHex = curveFpDecodePointHex;
  16349. ECCurveFp.prototype.encodePointHex = curveFpEncodePointHex;
  16350. // from: https://github.com/kaielvin/jsbn-ec-point-compression
  16351. ECCurveFp.prototype.decodePointHex = function(s)
  16352. {
  16353. var yIsEven;
  16354. switch(parseInt(s.substr(0,2), 16)) { // first byte
  16355. case 0:
  16356. return this.infinity;
  16357. case 2:
  16358. yIsEven = false;
  16359. case 3:
  16360. if(yIsEven == undefined) yIsEven = true;
  16361. var len = s.length - 2;
  16362. var xHex = s.substr(2, len);
  16363. var x = this.fromBigInteger(new BigInteger(xHex,16));
  16364. var alpha = x.multiply(x.square().add(this.getA())).add(this.getB());
  16365. var beta = alpha.sqrt();
  16366. if (beta == null) throw "Invalid point compression";
  16367. var betaValue = beta.toBigInteger();
  16368. if (betaValue.testBit(0) != yIsEven)
  16369. {
  16370. // Use the other root
  16371. beta = this.fromBigInteger(this.getQ().subtract(betaValue));
  16372. }
  16373. return new ECPointFp(this,x,beta);
  16374. case 4:
  16375. case 6:
  16376. case 7:
  16377. var len = (s.length - 2) / 2;
  16378. var xHex = s.substr(2, len);
  16379. var yHex = s.substr(len+2, len);
  16380. return new ECPointFp(this,
  16381. this.fromBigInteger(new BigInteger(xHex, 16)),
  16382. this.fromBigInteger(new BigInteger(yHex, 16)));
  16383. default: // unsupported
  16384. return null;
  16385. }
  16386. }
  16387. ECCurveFp.prototype.encodeCompressedPointHex = function(p)
  16388. {
  16389. if (p.isInfinity()) return "00";
  16390. var xHex = p.getX().toBigInteger().toString(16);
  16391. var oLen = this.getQ().toString(16).length;
  16392. if ((oLen % 2) != 0) oLen++;
  16393. while (xHex.length < oLen)
  16394. xHex = "0" + xHex;
  16395. var yPrefix;
  16396. if(p.getY().toBigInteger().isEven()) yPrefix = "02";
  16397. else yPrefix = "03";
  16398. return yPrefix + xHex;
  16399. }
  16400. ECFieldElementFp.prototype.getR = function()
  16401. {
  16402. if(this.r != undefined) return this.r;
  16403. this.r = null;
  16404. var bitLength = this.q.bitLength();
  16405. if (bitLength > 128)
  16406. {
  16407. var firstWord = this.q.shiftRight(bitLength - 64);
  16408. if (firstWord.intValue() == -1)
  16409. {
  16410. this.r = BigInteger.ONE.shiftLeft(bitLength).subtract(this.q);
  16411. }
  16412. }
  16413. return this.r;
  16414. }
  16415. ECFieldElementFp.prototype.modMult = function(x1,x2)
  16416. {
  16417. return this.modReduce(x1.multiply(x2));
  16418. }
  16419. ECFieldElementFp.prototype.modReduce = function(x)
  16420. {
  16421. if (this.getR() != null)
  16422. {
  16423. var qLen = q.bitLength();
  16424. while (x.bitLength() > (qLen + 1))
  16425. {
  16426. var u = x.shiftRight(qLen);
  16427. var v = x.subtract(u.shiftLeft(qLen));
  16428. if (!this.getR().equals(BigInteger.ONE))
  16429. {
  16430. u = u.multiply(this.getR());
  16431. }
  16432. x = u.add(v);
  16433. }
  16434. while (x.compareTo(q) >= 0)
  16435. {
  16436. x = x.subtract(q);
  16437. }
  16438. }
  16439. else
  16440. {
  16441. x = x.mod(q);
  16442. }
  16443. return x;
  16444. }
  16445. ECFieldElementFp.prototype.sqrt = function()
  16446. {
  16447. if (!this.q.testBit(0)) throw "unsupported";
  16448. // p mod 4 == 3
  16449. if (this.q.testBit(1))
  16450. {
  16451. var z = new ECFieldElementFp(this.q,this.x.modPow(this.q.shiftRight(2).add(BigInteger.ONE),this.q));
  16452. return z.square().equals(this) ? z : null;
  16453. }
  16454. // p mod 4 == 1
  16455. var qMinusOne = this.q.subtract(BigInteger.ONE);
  16456. var legendreExponent = qMinusOne.shiftRight(1);
  16457. if (!(this.x.modPow(legendreExponent, this.q).equals(BigInteger.ONE)))
  16458. {
  16459. return null;
  16460. }
  16461. var u = qMinusOne.shiftRight(2);
  16462. var k = u.shiftLeft(1).add(BigInteger.ONE);
  16463. var Q = this.x;
  16464. var fourQ = modDouble(modDouble(Q));
  16465. var U, V;
  16466. do
  16467. {
  16468. var P;
  16469. do
  16470. {
  16471. P = new BigInteger(this.q.bitLength(), new SecureRandom());
  16472. }
  16473. while (P.compareTo(this.q) >= 0
  16474. || !(P.multiply(P).subtract(fourQ).modPow(legendreExponent, this.q).equals(qMinusOne)));
  16475. var result = this.lucasSequence(P, Q, k);
  16476. U = result[0];
  16477. V = result[1];
  16478. if (this.modMult(V, V).equals(fourQ))
  16479. {
  16480. // Integer division by 2, mod q
  16481. if (V.testBit(0))
  16482. {
  16483. V = V.add(q);
  16484. }
  16485. V = V.shiftRight(1);
  16486. return new ECFieldElementFp(q,V);
  16487. }
  16488. }
  16489. while (U.equals(BigInteger.ONE) || U.equals(qMinusOne));
  16490. return null;
  16491. }
  16492. ECFieldElementFp.prototype.lucasSequence = function(P,Q,k)
  16493. {
  16494. var n = k.bitLength();
  16495. var s = k.getLowestSetBit();
  16496. var Uh = BigInteger.ONE;
  16497. var Vl = BigInteger.TWO;
  16498. var Vh = P;
  16499. var Ql = BigInteger.ONE;
  16500. var Qh = BigInteger.ONE;
  16501. for (var j = n - 1; j >= s + 1; --j)
  16502. {
  16503. Ql = this.modMult(Ql, Qh);
  16504. if (k.testBit(j))
  16505. {
  16506. Qh = this.modMult(Ql, Q);
  16507. Uh = this.modMult(Uh, Vh);
  16508. Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));
  16509. Vh = this.modReduce(Vh.multiply(Vh).subtract(Qh.shiftLeft(1)));
  16510. }
  16511. else
  16512. {
  16513. Qh = Ql;
  16514. Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql));
  16515. Vh = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));
  16516. Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1)));
  16517. }
  16518. }
  16519. Ql = this.modMult(Ql, Qh);
  16520. Qh = this.modMult(Ql, Q);
  16521. Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql));
  16522. Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql)));
  16523. Ql = this.modMult(Ql, Qh);
  16524. for (var j = 1; j <= s; ++j)
  16525. {
  16526. Uh = this.modMult(Uh, Vl);
  16527. Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1)));
  16528. Ql = this.modMult(Ql, Ql);
  16529. }
  16530. return [ Uh, Vl ];
  16531. }
  16532. var exports = {
  16533. ECCurveFp: ECCurveFp,
  16534. ECPointFp: ECPointFp,
  16535. ECFieldElementFp: ECFieldElementFp
  16536. }
  16537. module.exports = exports
  16538. /***/ }),
  16539. /* 109 */
  16540. /***/ (function(module, exports, __webpack_require__) {
  16541. // Copyright 2015 Joyent, Inc.
  16542. module.exports = {
  16543. read: read,
  16544. readSSHPrivate: readSSHPrivate,
  16545. write: write
  16546. };
  16547. var assert = __webpack_require__(3);
  16548. var asn1 = __webpack_require__(39);
  16549. var algs = __webpack_require__(16);
  16550. var utils = __webpack_require__(12);
  16551. var crypto = __webpack_require__(5);
  16552. var Key = __webpack_require__(15);
  16553. var PrivateKey = __webpack_require__(17);
  16554. var pem = __webpack_require__(38);
  16555. var rfc4253 = __webpack_require__(48);
  16556. var SSHBuffer = __webpack_require__(110);
  16557. var errors = __webpack_require__(31);
  16558. var bcrypt;
  16559. function read(buf, options) {
  16560. return (pem.read(buf, options));
  16561. }
  16562. var MAGIC = 'openssh-key-v1';
  16563. function readSSHPrivate(type, buf, options) {
  16564. buf = new SSHBuffer({buffer: buf});
  16565. var magic = buf.readCString();
  16566. assert.strictEqual(magic, MAGIC, 'bad magic string');
  16567. var cipher = buf.readString();
  16568. var kdf = buf.readString();
  16569. var kdfOpts = buf.readBuffer();
  16570. var nkeys = buf.readInt();
  16571. if (nkeys !== 1) {
  16572. throw (new Error('OpenSSH-format key file contains ' +
  16573. 'multiple keys: this is unsupported.'));
  16574. }
  16575. var pubKey = buf.readBuffer();
  16576. if (type === 'public') {
  16577. assert.ok(buf.atEnd(), 'excess bytes left after key');
  16578. return (rfc4253.read(pubKey));
  16579. }
  16580. var privKeyBlob = buf.readBuffer();
  16581. assert.ok(buf.atEnd(), 'excess bytes left after key');
  16582. var kdfOptsBuf = new SSHBuffer({ buffer: kdfOpts });
  16583. switch (kdf) {
  16584. case 'none':
  16585. if (cipher !== 'none') {
  16586. throw (new Error('OpenSSH-format key uses KDF "none" ' +
  16587. 'but specifies a cipher other than "none"'));
  16588. }
  16589. break;
  16590. case 'bcrypt':
  16591. var salt = kdfOptsBuf.readBuffer();
  16592. var rounds = kdfOptsBuf.readInt();
  16593. var cinf = utils.opensshCipherInfo(cipher);
  16594. if (bcrypt === undefined) {
  16595. bcrypt = __webpack_require__(350);
  16596. }
  16597. if (typeof (options.passphrase) === 'string') {
  16598. options.passphrase = new Buffer(options.passphrase,
  16599. 'utf-8');
  16600. }
  16601. if (!Buffer.isBuffer(options.passphrase)) {
  16602. throw (new errors.KeyEncryptedError(
  16603. options.filename, 'OpenSSH'));
  16604. }
  16605. var pass = new Uint8Array(options.passphrase);
  16606. var salti = new Uint8Array(salt);
  16607. /* Use the pbkdf to derive both the key and the IV. */
  16608. var out = new Uint8Array(cinf.keySize + cinf.blockSize);
  16609. var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length,
  16610. out, out.length, rounds);
  16611. if (res !== 0) {
  16612. throw (new Error('bcrypt_pbkdf function returned ' +
  16613. 'failure, parameters invalid'));
  16614. }
  16615. out = new Buffer(out);
  16616. var ckey = out.slice(0, cinf.keySize);
  16617. var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize);
  16618. var cipherStream = crypto.createDecipheriv(cinf.opensslName,
  16619. ckey, iv);
  16620. cipherStream.setAutoPadding(false);
  16621. var chunk, chunks = [];
  16622. cipherStream.once('error', function (e) {
  16623. if (e.toString().indexOf('bad decrypt') !== -1) {
  16624. throw (new Error('Incorrect passphrase ' +
  16625. 'supplied, could not decrypt key'));
  16626. }
  16627. throw (e);
  16628. });
  16629. cipherStream.write(privKeyBlob);
  16630. cipherStream.end();
  16631. while ((chunk = cipherStream.read()) !== null)
  16632. chunks.push(chunk);
  16633. privKeyBlob = Buffer.concat(chunks);
  16634. break;
  16635. default:
  16636. throw (new Error(
  16637. 'OpenSSH-format key uses unknown KDF "' + kdf + '"'));
  16638. }
  16639. buf = new SSHBuffer({buffer: privKeyBlob});
  16640. var checkInt1 = buf.readInt();
  16641. var checkInt2 = buf.readInt();
  16642. if (checkInt1 !== checkInt2) {
  16643. throw (new Error('Incorrect passphrase supplied, could not ' +
  16644. 'decrypt key'));
  16645. }
  16646. var ret = {};
  16647. var key = rfc4253.readInternal(ret, 'private', buf.remainder());
  16648. buf.skip(ret.consumed);
  16649. var comment = buf.readString();
  16650. key.comment = comment;
  16651. return (key);
  16652. }
  16653. function write(key, options) {
  16654. var pubKey;
  16655. if (PrivateKey.isPrivateKey(key))
  16656. pubKey = key.toPublic();
  16657. else
  16658. pubKey = key;
  16659. var cipher = 'none';
  16660. var kdf = 'none';
  16661. var kdfopts = new Buffer(0);
  16662. var cinf = { blockSize: 8 };
  16663. var passphrase;
  16664. if (options !== undefined) {
  16665. passphrase = options.passphrase;
  16666. if (typeof (passphrase) === 'string')
  16667. passphrase = new Buffer(passphrase, 'utf-8');
  16668. if (passphrase !== undefined) {
  16669. assert.buffer(passphrase, 'options.passphrase');
  16670. assert.optionalString(options.cipher, 'options.cipher');
  16671. cipher = options.cipher;
  16672. if (cipher === undefined)
  16673. cipher = 'aes128-ctr';
  16674. cinf = utils.opensshCipherInfo(cipher);
  16675. kdf = 'bcrypt';
  16676. }
  16677. }
  16678. var privBuf;
  16679. if (PrivateKey.isPrivateKey(key)) {
  16680. privBuf = new SSHBuffer({});
  16681. var checkInt = crypto.randomBytes(4).readUInt32BE(0);
  16682. privBuf.writeInt(checkInt);
  16683. privBuf.writeInt(checkInt);
  16684. privBuf.write(key.toBuffer('rfc4253'));
  16685. privBuf.writeString(key.comment || '');
  16686. var n = 1;
  16687. while (privBuf._offset % cinf.blockSize !== 0)
  16688. privBuf.writeChar(n++);
  16689. privBuf = privBuf.toBuffer();
  16690. }
  16691. switch (kdf) {
  16692. case 'none':
  16693. break;
  16694. case 'bcrypt':
  16695. var salt = crypto.randomBytes(16);
  16696. var rounds = 16;
  16697. var kdfssh = new SSHBuffer({});
  16698. kdfssh.writeBuffer(salt);
  16699. kdfssh.writeInt(rounds);
  16700. kdfopts = kdfssh.toBuffer();
  16701. if (bcrypt === undefined) {
  16702. bcrypt = __webpack_require__(350);
  16703. }
  16704. var pass = new Uint8Array(passphrase);
  16705. var salti = new Uint8Array(salt);
  16706. /* Use the pbkdf to derive both the key and the IV. */
  16707. var out = new Uint8Array(cinf.keySize + cinf.blockSize);
  16708. var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length,
  16709. out, out.length, rounds);
  16710. if (res !== 0) {
  16711. throw (new Error('bcrypt_pbkdf function returned ' +
  16712. 'failure, parameters invalid'));
  16713. }
  16714. out = new Buffer(out);
  16715. var ckey = out.slice(0, cinf.keySize);
  16716. var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize);
  16717. var cipherStream = crypto.createCipheriv(cinf.opensslName,
  16718. ckey, iv);
  16719. cipherStream.setAutoPadding(false);
  16720. var chunk, chunks = [];
  16721. cipherStream.once('error', function (e) {
  16722. throw (e);
  16723. });
  16724. cipherStream.write(privBuf);
  16725. cipherStream.end();
  16726. while ((chunk = cipherStream.read()) !== null)
  16727. chunks.push(chunk);
  16728. privBuf = Buffer.concat(chunks);
  16729. break;
  16730. default:
  16731. throw (new Error('Unsupported kdf ' + kdf));
  16732. }
  16733. var buf = new SSHBuffer({});
  16734. buf.writeCString(MAGIC);
  16735. buf.writeString(cipher); /* cipher */
  16736. buf.writeString(kdf); /* kdf */
  16737. buf.writeBuffer(kdfopts); /* kdfoptions */
  16738. buf.writeInt(1); /* nkeys */
  16739. buf.writeBuffer(pubKey.toBuffer('rfc4253'));
  16740. if (privBuf)
  16741. buf.writeBuffer(privBuf);
  16742. buf = buf.toBuffer();
  16743. var header;
  16744. if (PrivateKey.isPrivateKey(key))
  16745. header = 'OPENSSH PRIVATE KEY';
  16746. else
  16747. header = 'OPENSSH PUBLIC KEY';
  16748. var tmp = buf.toString('base64');
  16749. var len = tmp.length + (tmp.length / 70) +
  16750. 18 + 16 + header.length*2 + 10;
  16751. buf = new Buffer(len);
  16752. var o = 0;
  16753. o += buf.write('-----BEGIN ' + header + '-----\n', o);
  16754. for (var i = 0; i < tmp.length; ) {
  16755. var limit = i + 70;
  16756. if (limit > tmp.length)
  16757. limit = tmp.length;
  16758. o += buf.write(tmp.slice(i, limit), o);
  16759. buf[o++] = 10;
  16760. i = limit;
  16761. }
  16762. o += buf.write('-----END ' + header + '-----\n', o);
  16763. return (buf.slice(0, o));
  16764. }
  16765. /***/ }),
  16766. /* 110 */
  16767. /***/ (function(module, exports, __webpack_require__) {
  16768. // Copyright 2015 Joyent, Inc.
  16769. module.exports = SSHBuffer;
  16770. var assert = __webpack_require__(3);
  16771. function SSHBuffer(opts) {
  16772. assert.object(opts, 'options');
  16773. if (opts.buffer !== undefined)
  16774. assert.buffer(opts.buffer, 'options.buffer');
  16775. this._size = opts.buffer ? opts.buffer.length : 1024;
  16776. this._buffer = opts.buffer || (new Buffer(this._size));
  16777. this._offset = 0;
  16778. }
  16779. SSHBuffer.prototype.toBuffer = function () {
  16780. return (this._buffer.slice(0, this._offset));
  16781. };
  16782. SSHBuffer.prototype.atEnd = function () {
  16783. return (this._offset >= this._buffer.length);
  16784. };
  16785. SSHBuffer.prototype.remainder = function () {
  16786. return (this._buffer.slice(this._offset));
  16787. };
  16788. SSHBuffer.prototype.skip = function (n) {
  16789. this._offset += n;
  16790. };
  16791. SSHBuffer.prototype.expand = function () {
  16792. this._size *= 2;
  16793. var buf = new Buffer(this._size);
  16794. this._buffer.copy(buf, 0);
  16795. this._buffer = buf;
  16796. };
  16797. SSHBuffer.prototype.readPart = function () {
  16798. return ({data: this.readBuffer()});
  16799. };
  16800. SSHBuffer.prototype.readBuffer = function () {
  16801. var len = this._buffer.readUInt32BE(this._offset);
  16802. this._offset += 4;
  16803. assert.ok(this._offset + len <= this._buffer.length,
  16804. 'length out of bounds at +0x' + this._offset.toString(16) +
  16805. ' (data truncated?)');
  16806. var buf = this._buffer.slice(this._offset, this._offset + len);
  16807. this._offset += len;
  16808. return (buf);
  16809. };
  16810. SSHBuffer.prototype.readString = function () {
  16811. return (this.readBuffer().toString());
  16812. };
  16813. SSHBuffer.prototype.readCString = function () {
  16814. var offset = this._offset;
  16815. while (offset < this._buffer.length &&
  16816. this._buffer[offset] !== 0x00)
  16817. offset++;
  16818. assert.ok(offset < this._buffer.length, 'c string does not terminate');
  16819. var str = this._buffer.slice(this._offset, offset).toString();
  16820. this._offset = offset + 1;
  16821. return (str);
  16822. };
  16823. SSHBuffer.prototype.readInt = function () {
  16824. var v = this._buffer.readUInt32BE(this._offset);
  16825. this._offset += 4;
  16826. return (v);
  16827. };
  16828. SSHBuffer.prototype.readInt64 = function () {
  16829. assert.ok(this._offset + 8 < this._buffer.length,
  16830. 'buffer not long enough to read Int64');
  16831. var v = this._buffer.slice(this._offset, this._offset + 8);
  16832. this._offset += 8;
  16833. return (v);
  16834. };
  16835. SSHBuffer.prototype.readChar = function () {
  16836. var v = this._buffer[this._offset++];
  16837. return (v);
  16838. };
  16839. SSHBuffer.prototype.writeBuffer = function (buf) {
  16840. while (this._offset + 4 + buf.length > this._size)
  16841. this.expand();
  16842. this._buffer.writeUInt32BE(buf.length, this._offset);
  16843. this._offset += 4;
  16844. buf.copy(this._buffer, this._offset);
  16845. this._offset += buf.length;
  16846. };
  16847. SSHBuffer.prototype.writeString = function (str) {
  16848. this.writeBuffer(new Buffer(str, 'utf8'));
  16849. };
  16850. SSHBuffer.prototype.writeCString = function (str) {
  16851. while (this._offset + 1 + str.length > this._size)
  16852. this.expand();
  16853. this._buffer.write(str, this._offset);
  16854. this._offset += str.length;
  16855. this._buffer[this._offset++] = 0;
  16856. };
  16857. SSHBuffer.prototype.writeInt = function (v) {
  16858. while (this._offset + 4 > this._size)
  16859. this.expand();
  16860. this._buffer.writeUInt32BE(v, this._offset);
  16861. this._offset += 4;
  16862. };
  16863. SSHBuffer.prototype.writeInt64 = function (v) {
  16864. assert.buffer(v, 'value');
  16865. if (v.length > 8) {
  16866. var lead = v.slice(0, v.length - 8);
  16867. for (var i = 0; i < lead.length; ++i) {
  16868. assert.strictEqual(lead[i], 0,
  16869. 'must fit in 64 bits of precision');
  16870. }
  16871. v = v.slice(v.length - 8, v.length);
  16872. }
  16873. while (this._offset + 8 > this._size)
  16874. this.expand();
  16875. v.copy(this._buffer, this._offset);
  16876. this._offset += 8;
  16877. };
  16878. SSHBuffer.prototype.writeChar = function (v) {
  16879. while (this._offset + 1 > this._size)
  16880. this.expand();
  16881. this._buffer[this._offset++] = v;
  16882. };
  16883. SSHBuffer.prototype.writePart = function (p) {
  16884. this.writeBuffer(p.data);
  16885. };
  16886. SSHBuffer.prototype.write = function (buf) {
  16887. while (this._offset + buf.length > this._size)
  16888. this.expand();
  16889. buf.copy(this._buffer, this._offset);
  16890. this._offset += buf.length;
  16891. };
  16892. /***/ }),
  16893. /* 111 */
  16894. /***/ (function(module, exports, __webpack_require__) {
  16895. "use strict";
  16896. /*!
  16897. * mime-types
  16898. * Copyright(c) 2014 Jonathan Ong
  16899. * Copyright(c) 2015 Douglas Christopher Wilson
  16900. * MIT Licensed
  16901. */
  16902. /**
  16903. * Module dependencies.
  16904. * @private
  16905. */
  16906. var db = __webpack_require__(556)
  16907. var extname = __webpack_require__(60).extname
  16908. /**
  16909. * Module variables.
  16910. * @private
  16911. */
  16912. var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/
  16913. var TEXT_TYPE_REGEXP = /^text\//i
  16914. /**
  16915. * Module exports.
  16916. * @public
  16917. */
  16918. exports.charset = charset
  16919. exports.charsets = { lookup: charset }
  16920. exports.contentType = contentType
  16921. exports.extension = extension
  16922. exports.extensions = Object.create(null)
  16923. exports.lookup = lookup
  16924. exports.types = Object.create(null)
  16925. // Populate the extensions/types maps
  16926. populateMaps(exports.extensions, exports.types)
  16927. /**
  16928. * Get the default charset for a MIME type.
  16929. *
  16930. * @param {string} type
  16931. * @return {boolean|string}
  16932. */
  16933. function charset (type) {
  16934. if (!type || typeof type !== 'string') {
  16935. return false
  16936. }
  16937. // TODO: use media-typer
  16938. var match = EXTRACT_TYPE_REGEXP.exec(type)
  16939. var mime = match && db[match[1].toLowerCase()]
  16940. if (mime && mime.charset) {
  16941. return mime.charset
  16942. }
  16943. // default text/* to utf-8
  16944. if (match && TEXT_TYPE_REGEXP.test(match[1])) {
  16945. return 'UTF-8'
  16946. }
  16947. return false
  16948. }
  16949. /**
  16950. * Create a full Content-Type header given a MIME type or extension.
  16951. *
  16952. * @param {string} str
  16953. * @return {boolean|string}
  16954. */
  16955. function contentType (str) {
  16956. // TODO: should this even be in this module?
  16957. if (!str || typeof str !== 'string') {
  16958. return false
  16959. }
  16960. var mime = str.indexOf('/') === -1
  16961. ? exports.lookup(str)
  16962. : str
  16963. if (!mime) {
  16964. return false
  16965. }
  16966. // TODO: use content-type or other module
  16967. if (mime.indexOf('charset') === -1) {
  16968. var charset = exports.charset(mime)
  16969. if (charset) mime += '; charset=' + charset.toLowerCase()
  16970. }
  16971. return mime
  16972. }
  16973. /**
  16974. * Get the default extension for a MIME type.
  16975. *
  16976. * @param {string} type
  16977. * @return {boolean|string}
  16978. */
  16979. function extension (type) {
  16980. if (!type || typeof type !== 'string') {
  16981. return false
  16982. }
  16983. // TODO: use media-typer
  16984. var match = EXTRACT_TYPE_REGEXP.exec(type)
  16985. // get extensions
  16986. var exts = match && exports.extensions[match[1].toLowerCase()]
  16987. if (!exts || !exts.length) {
  16988. return false
  16989. }
  16990. return exts[0]
  16991. }
  16992. /**
  16993. * Lookup the MIME type for a file path/extension.
  16994. *
  16995. * @param {string} path
  16996. * @return {boolean|string}
  16997. */
  16998. function lookup (path) {
  16999. if (!path || typeof path !== 'string') {
  17000. return false
  17001. }
  17002. // get the extension ("ext" or ".ext" or full path)
  17003. var extension = extname('x.' + path)
  17004. .toLowerCase()
  17005. .substr(1)
  17006. if (!extension) {
  17007. return false
  17008. }
  17009. return exports.types[extension] || false
  17010. }
  17011. /**
  17012. * Populate the extensions and types maps.
  17013. * @private
  17014. */
  17015. function populateMaps (extensions, types) {
  17016. // source preference (least -> most)
  17017. var preference = ['nginx', 'apache', undefined, 'iana']
  17018. Object.keys(db).forEach(function forEachMimeType (type) {
  17019. var mime = db[type]
  17020. var exts = mime.extensions
  17021. if (!exts || !exts.length) {
  17022. return
  17023. }
  17024. // mime -> extensions
  17025. extensions[type] = exts
  17026. // extension -> mime
  17027. for (var i = 0; i < exts.length; i++) {
  17028. var extension = exts[i]
  17029. if (types[extension]) {
  17030. var from = preference.indexOf(db[types[extension]].source)
  17031. var to = preference.indexOf(mime.source)
  17032. if (types[extension] !== 'application/octet-stream' &&
  17033. (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {
  17034. // skip the remapping
  17035. continue
  17036. }
  17037. }
  17038. // set the extension -> mime
  17039. types[extension] = type
  17040. }
  17041. })
  17042. }
  17043. /***/ }),
  17044. /* 112 */
  17045. /***/ (function(module, exports) {
  17046. module.exports = require("fs");
  17047. /***/ }),
  17048. /* 113 */
  17049. /***/ (function(module, exports) {
  17050. /**
  17051. * Convert array of 16 byte values to UUID string format of the form:
  17052. * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
  17053. */
  17054. var byteToHex = [];
  17055. for (var i = 0; i < 256; ++i) {
  17056. byteToHex[i] = (i + 0x100).toString(16).substr(1);
  17057. }
  17058. function bytesToUuid(buf, offset) {
  17059. var i = offset || 0;
  17060. var bth = byteToHex;
  17061. return bth[buf[i++]] + bth[buf[i++]] +
  17062. bth[buf[i++]] + bth[buf[i++]] + '-' +
  17063. bth[buf[i++]] + bth[buf[i++]] + '-' +
  17064. bth[buf[i++]] + bth[buf[i++]] + '-' +
  17065. bth[buf[i++]] + bth[buf[i++]] + '-' +
  17066. bth[buf[i++]] + bth[buf[i++]] +
  17067. bth[buf[i++]] + bth[buf[i++]] +
  17068. bth[buf[i++]] + bth[buf[i++]];
  17069. }
  17070. module.exports = bytesToUuid;
  17071. /***/ }),
  17072. /* 114 */
  17073. /***/ (function(module, exports, __webpack_require__) {
  17074. /*
  17075. Module Dependencies
  17076. */
  17077. var htmlparser = __webpack_require__(63),
  17078. parse5 = __webpack_require__(662);
  17079. /*
  17080. Parser
  17081. */
  17082. exports = module.exports = function(content, options, isDocument) {
  17083. var dom = exports.evaluate(content, options, isDocument),
  17084. // Generic root element
  17085. root = exports.evaluate('<root></root>', options, false)[0];
  17086. root.type = 'root';
  17087. root.parent = null;
  17088. // Update the dom using the root
  17089. exports.update(dom, root);
  17090. return root;
  17091. };
  17092. function parseWithParse5 (content, isDocument) {
  17093. var parse = isDocument ? parse5.parse : parse5.parseFragment,
  17094. root = parse(content, { treeAdapter: parse5.treeAdapters.htmlparser2 });
  17095. return root.children;
  17096. }
  17097. exports.evaluate = function(content, options, isDocument) {
  17098. // options = options || $.fn.options;
  17099. var dom;
  17100. if (Buffer.isBuffer(content))
  17101. content = content.toString();
  17102. if (typeof content === 'string') {
  17103. var useHtmlParser2 = options.xmlMode || options._useHtmlParser2;
  17104. dom = useHtmlParser2 ? htmlparser.parseDOM(content, options) : parseWithParse5(content, isDocument);
  17105. } else {
  17106. dom = content;
  17107. }
  17108. return dom;
  17109. };
  17110. /*
  17111. Update the dom structure, for one changed layer
  17112. */
  17113. exports.update = function(arr, parent) {
  17114. // normalize
  17115. if (!Array.isArray(arr)) arr = [arr];
  17116. // Update parent
  17117. if (parent) {
  17118. parent.children = arr;
  17119. } else {
  17120. parent = null;
  17121. }
  17122. // Update neighbors
  17123. for (var i = 0; i < arr.length; i++) {
  17124. var node = arr[i];
  17125. // Cleanly remove existing nodes from their previous structures.
  17126. var oldParent = node.parent || node.root,
  17127. oldSiblings = oldParent && oldParent.children;
  17128. if (oldSiblings && oldSiblings !== arr) {
  17129. oldSiblings.splice(oldSiblings.indexOf(node), 1);
  17130. if (node.prev) {
  17131. node.prev.next = node.next;
  17132. }
  17133. if (node.next) {
  17134. node.next.prev = node.prev;
  17135. }
  17136. }
  17137. if (parent) {
  17138. node.prev = arr[i - 1] || null;
  17139. node.next = arr[i + 1] || null;
  17140. } else {
  17141. node.prev = node.next = null;
  17142. }
  17143. if (parent && parent.type === 'root') {
  17144. node.root = parent;
  17145. node.parent = null;
  17146. } else {
  17147. node.root = null;
  17148. node.parent = parent;
  17149. }
  17150. }
  17151. return parent;
  17152. };
  17153. // module.exports = $.extend(exports);
  17154. /***/ }),
  17155. /* 115 */
  17156. /***/ (function(module, exports, __webpack_require__) {
  17157. "use strict";
  17158. if (!process.version ||
  17159. process.version.indexOf('v0.') === 0 ||
  17160. process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
  17161. module.exports = nextTick;
  17162. } else {
  17163. module.exports = process.nextTick;
  17164. }
  17165. function nextTick(fn, arg1, arg2, arg3) {
  17166. if (typeof fn !== 'function') {
  17167. throw new TypeError('"callback" argument must be a function');
  17168. }
  17169. var len = arguments.length;
  17170. var args, i;
  17171. switch (len) {
  17172. case 0:
  17173. case 1:
  17174. return process.nextTick(fn);
  17175. case 2:
  17176. return process.nextTick(function afterTickOne() {
  17177. fn.call(null, arg1);
  17178. });
  17179. case 3:
  17180. return process.nextTick(function afterTickTwo() {
  17181. fn.call(null, arg1, arg2);
  17182. });
  17183. case 4:
  17184. return process.nextTick(function afterTickThree() {
  17185. fn.call(null, arg1, arg2, arg3);
  17186. });
  17187. default:
  17188. args = new Array(len - 1);
  17189. i = 0;
  17190. while (i < args.length) {
  17191. args[i++] = arguments[i];
  17192. }
  17193. return process.nextTick(function afterTick() {
  17194. fn.apply(null, args);
  17195. });
  17196. }
  17197. }
  17198. /***/ }),
  17199. /* 116 */
  17200. /***/ (function(module, exports, __webpack_require__) {
  17201. "use strict";
  17202. var Mixin = module.exports = function (host) {
  17203. var originalMethods = {},
  17204. overriddenMethods = this._getOverriddenMethods(this, originalMethods);
  17205. Object.keys(overriddenMethods).forEach(function (key) {
  17206. if (typeof overriddenMethods[key] === 'function') {
  17207. originalMethods[key] = host[key];
  17208. host[key] = overriddenMethods[key];
  17209. }
  17210. });
  17211. };
  17212. Mixin.prototype._getOverriddenMethods = function () {
  17213. throw new Error('Not implemented');
  17214. };
  17215. /***/ }),
  17216. /* 117 */
  17217. /***/ (function(module, exports, __webpack_require__) {
  17218. var assign = __webpack_require__(394);
  17219. /*
  17220. * Cheerio default options
  17221. */
  17222. exports.default = {
  17223. withDomLvl1: true,
  17224. normalizeWhitespace: false,
  17225. xml: false,
  17226. decodeEntities: true
  17227. };
  17228. exports.flatten = function(options) {
  17229. return options && options.xml ? assign({xmlMode: true}, options.xml) : options;
  17230. };
  17231. /***/ }),
  17232. /* 118 */
  17233. /***/ (function(module, exports, __webpack_require__) {
  17234. var assignValue = __webpack_require__(163),
  17235. baseAssignValue = __webpack_require__(164);
  17236. /**
  17237. * Copies properties of `source` to `object`.
  17238. *
  17239. * @private
  17240. * @param {Object} source The object to copy properties from.
  17241. * @param {Array} props The property identifiers to copy.
  17242. * @param {Object} [object={}] The object to copy properties to.
  17243. * @param {Function} [customizer] The function to customize copied values.
  17244. * @returns {Object} Returns `object`.
  17245. */
  17246. function copyObject(source, props, object, customizer) {
  17247. var isNew = !object;
  17248. object || (object = {});
  17249. var index = -1,
  17250. length = props.length;
  17251. while (++index < length) {
  17252. var key = props[index];
  17253. var newValue = customizer
  17254. ? customizer(object[key], source[key], key, object, source)
  17255. : undefined;
  17256. if (newValue === undefined) {
  17257. newValue = source[key];
  17258. }
  17259. if (isNew) {
  17260. baseAssignValue(object, key, newValue);
  17261. } else {
  17262. assignValue(object, key, newValue);
  17263. }
  17264. }
  17265. return object;
  17266. }
  17267. module.exports = copyObject;
  17268. /***/ }),
  17269. /* 119 */
  17270. /***/ (function(module, exports, __webpack_require__) {
  17271. var baseRest = __webpack_require__(120),
  17272. isIterateeCall = __webpack_require__(122);
  17273. /**
  17274. * Creates a function like `_.assign`.
  17275. *
  17276. * @private
  17277. * @param {Function} assigner The function to assign values.
  17278. * @returns {Function} Returns the new assigner function.
  17279. */
  17280. function createAssigner(assigner) {
  17281. return baseRest(function(object, sources) {
  17282. var index = -1,
  17283. length = sources.length,
  17284. customizer = length > 1 ? sources[length - 1] : undefined,
  17285. guard = length > 2 ? sources[2] : undefined;
  17286. customizer = (assigner.length > 3 && typeof customizer == 'function')
  17287. ? (length--, customizer)
  17288. : undefined;
  17289. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  17290. customizer = length < 3 ? undefined : customizer;
  17291. length = 1;
  17292. }
  17293. object = Object(object);
  17294. while (++index < length) {
  17295. var source = sources[index];
  17296. if (source) {
  17297. assigner(object, source, index, customizer);
  17298. }
  17299. }
  17300. return object;
  17301. });
  17302. }
  17303. module.exports = createAssigner;
  17304. /***/ }),
  17305. /* 120 */
  17306. /***/ (function(module, exports, __webpack_require__) {
  17307. var identity = __webpack_require__(68),
  17308. overRest = __webpack_require__(397),
  17309. setToString = __webpack_require__(165);
  17310. /**
  17311. * The base implementation of `_.rest` which doesn't validate or coerce arguments.
  17312. *
  17313. * @private
  17314. * @param {Function} func The function to apply a rest parameter to.
  17315. * @param {number} [start=func.length-1] The start position of the rest parameter.
  17316. * @returns {Function} Returns the new function.
  17317. */
  17318. function baseRest(func, start) {
  17319. return setToString(overRest(func, start, identity), func + '');
  17320. }
  17321. module.exports = baseRest;
  17322. /***/ }),
  17323. /* 121 */
  17324. /***/ (function(module, exports) {
  17325. /**
  17326. * A faster alternative to `Function#apply`, this function invokes `func`
  17327. * with the `this` binding of `thisArg` and the arguments of `args`.
  17328. *
  17329. * @private
  17330. * @param {Function} func The function to invoke.
  17331. * @param {*} thisArg The `this` binding of `func`.
  17332. * @param {Array} args The arguments to invoke `func` with.
  17333. * @returns {*} Returns the result of `func`.
  17334. */
  17335. function apply(func, thisArg, args) {
  17336. switch (args.length) {
  17337. case 0: return func.call(thisArg);
  17338. case 1: return func.call(thisArg, args[0]);
  17339. case 2: return func.call(thisArg, args[0], args[1]);
  17340. case 3: return func.call(thisArg, args[0], args[1], args[2]);
  17341. }
  17342. return func.apply(thisArg, args);
  17343. }
  17344. module.exports = apply;
  17345. /***/ }),
  17346. /* 122 */
  17347. /***/ (function(module, exports, __webpack_require__) {
  17348. var eq = __webpack_require__(67),
  17349. isArrayLike = __webpack_require__(40),
  17350. isIndex = __webpack_require__(90),
  17351. isObject = __webpack_require__(25);
  17352. /**
  17353. * Checks if the given arguments are from an iteratee call.
  17354. *
  17355. * @private
  17356. * @param {*} value The potential iteratee value argument.
  17357. * @param {*} index The potential iteratee index or key argument.
  17358. * @param {*} object The potential iteratee object argument.
  17359. * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
  17360. * else `false`.
  17361. */
  17362. function isIterateeCall(value, index, object) {
  17363. if (!isObject(object)) {
  17364. return false;
  17365. }
  17366. var type = typeof index;
  17367. if (type == 'number'
  17368. ? (isArrayLike(object) && isIndex(index, object.length))
  17369. : (type == 'string' && index in object)
  17370. ) {
  17371. return eq(object[index], value);
  17372. }
  17373. return false;
  17374. }
  17375. module.exports = isIterateeCall;
  17376. /***/ }),
  17377. /* 123 */
  17378. /***/ (function(module, exports) {
  17379. /** Used for built-in method references. */
  17380. var objectProto = Object.prototype;
  17381. /**
  17382. * Checks if `value` is likely a prototype object.
  17383. *
  17384. * @private
  17385. * @param {*} value The value to check.
  17386. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  17387. */
  17388. function isPrototype(value) {
  17389. var Ctor = value && value.constructor,
  17390. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  17391. return value === proto;
  17392. }
  17393. module.exports = isPrototype;
  17394. /***/ }),
  17395. /* 124 */
  17396. /***/ (function(module, exports, __webpack_require__) {
  17397. var baseIsArguments = __webpack_require__(682),
  17398. isObjectLike = __webpack_require__(26);
  17399. /** Used for built-in method references. */
  17400. var objectProto = Object.prototype;
  17401. /** Used to check objects for own properties. */
  17402. var hasOwnProperty = objectProto.hasOwnProperty;
  17403. /** Built-in value references. */
  17404. var propertyIsEnumerable = objectProto.propertyIsEnumerable;
  17405. /**
  17406. * Checks if `value` is likely an `arguments` object.
  17407. *
  17408. * @static
  17409. * @memberOf _
  17410. * @since 0.1.0
  17411. * @category Lang
  17412. * @param {*} value The value to check.
  17413. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  17414. * else `false`.
  17415. * @example
  17416. *
  17417. * _.isArguments(function() { return arguments; }());
  17418. * // => true
  17419. *
  17420. * _.isArguments([1, 2, 3]);
  17421. * // => false
  17422. */
  17423. var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  17424. return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
  17425. !propertyIsEnumerable.call(value, 'callee');
  17426. };
  17427. module.exports = isArguments;
  17428. /***/ }),
  17429. /* 125 */
  17430. /***/ (function(module, exports, __webpack_require__) {
  17431. var arrayLikeKeys = __webpack_require__(399),
  17432. baseKeysIn = __webpack_require__(688),
  17433. isArrayLike = __webpack_require__(40);
  17434. /**
  17435. * Creates an array of the own and inherited enumerable property names of `object`.
  17436. *
  17437. * **Note:** Non-object values are coerced to objects.
  17438. *
  17439. * @static
  17440. * @memberOf _
  17441. * @since 3.0.0
  17442. * @category Object
  17443. * @param {Object} object The object to query.
  17444. * @returns {Array} Returns the array of property names.
  17445. * @example
  17446. *
  17447. * function Foo() {
  17448. * this.a = 1;
  17449. * this.b = 2;
  17450. * }
  17451. *
  17452. * Foo.prototype.c = 3;
  17453. *
  17454. * _.keysIn(new Foo);
  17455. * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  17456. */
  17457. function keysIn(object) {
  17458. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  17459. }
  17460. module.exports = keysIn;
  17461. /***/ }),
  17462. /* 126 */
  17463. /***/ (function(module, exports, __webpack_require__) {
  17464. var baseCreate = __webpack_require__(127),
  17465. isObject = __webpack_require__(25);
  17466. /**
  17467. * Creates a function that produces an instance of `Ctor` regardless of
  17468. * whether it was invoked as part of a `new` expression or by `call` or `apply`.
  17469. *
  17470. * @private
  17471. * @param {Function} Ctor The constructor to wrap.
  17472. * @returns {Function} Returns the new wrapped function.
  17473. */
  17474. function createCtor(Ctor) {
  17475. return function() {
  17476. // Use a `switch` statement to work with class constructors. See
  17477. // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
  17478. // for more details.
  17479. var args = arguments;
  17480. switch (args.length) {
  17481. case 0: return new Ctor;
  17482. case 1: return new Ctor(args[0]);
  17483. case 2: return new Ctor(args[0], args[1]);
  17484. case 3: return new Ctor(args[0], args[1], args[2]);
  17485. case 4: return new Ctor(args[0], args[1], args[2], args[3]);
  17486. case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
  17487. case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
  17488. case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
  17489. }
  17490. var thisBinding = baseCreate(Ctor.prototype),
  17491. result = Ctor.apply(thisBinding, args);
  17492. // Mimic the constructor's `return` behavior.
  17493. // See https://es5.github.io/#x13.2.2 for more details.
  17494. return isObject(result) ? result : thisBinding;
  17495. };
  17496. }
  17497. module.exports = createCtor;
  17498. /***/ }),
  17499. /* 127 */
  17500. /***/ (function(module, exports, __webpack_require__) {
  17501. var isObject = __webpack_require__(25);
  17502. /** Built-in value references. */
  17503. var objectCreate = Object.create;
  17504. /**
  17505. * The base implementation of `_.create` without support for assigning
  17506. * properties to the created object.
  17507. *
  17508. * @private
  17509. * @param {Object} proto The object to inherit from.
  17510. * @returns {Object} Returns the new object.
  17511. */
  17512. var baseCreate = (function() {
  17513. function object() {}
  17514. return function(proto) {
  17515. if (!isObject(proto)) {
  17516. return {};
  17517. }
  17518. if (objectCreate) {
  17519. return objectCreate(proto);
  17520. }
  17521. object.prototype = proto;
  17522. var result = new object;
  17523. object.prototype = undefined;
  17524. return result;
  17525. };
  17526. }());
  17527. module.exports = baseCreate;
  17528. /***/ }),
  17529. /* 128 */
  17530. /***/ (function(module, exports) {
  17531. /** Used as the internal argument placeholder. */
  17532. var PLACEHOLDER = '__lodash_placeholder__';
  17533. /**
  17534. * Replaces all `placeholder` elements in `array` with an internal placeholder
  17535. * and returns an array of their indexes.
  17536. *
  17537. * @private
  17538. * @param {Array} array The array to modify.
  17539. * @param {*} placeholder The placeholder to replace.
  17540. * @returns {Array} Returns the new array of placeholder indexes.
  17541. */
  17542. function replaceHolders(array, placeholder) {
  17543. var index = -1,
  17544. length = array.length,
  17545. resIndex = 0,
  17546. result = [];
  17547. while (++index < length) {
  17548. var value = array[index];
  17549. if (value === placeholder || value === PLACEHOLDER) {
  17550. array[index] = PLACEHOLDER;
  17551. result[resIndex++] = index;
  17552. }
  17553. }
  17554. return result;
  17555. }
  17556. module.exports = replaceHolders;
  17557. /***/ }),
  17558. /* 129 */
  17559. /***/ (function(module, exports, __webpack_require__) {
  17560. var arrayEach = __webpack_require__(414),
  17561. baseEach = __webpack_require__(69),
  17562. castFunction = __webpack_require__(715),
  17563. isArray = __webpack_require__(9);
  17564. /**
  17565. * Iterates over elements of `collection` and invokes `iteratee` for each element.
  17566. * The iteratee is invoked with three arguments: (value, index|key, collection).
  17567. * Iteratee functions may exit iteration early by explicitly returning `false`.
  17568. *
  17569. * **Note:** As with other "Collections" methods, objects with a "length"
  17570. * property are iterated like arrays. To avoid this behavior use `_.forIn`
  17571. * or `_.forOwn` for object iteration.
  17572. *
  17573. * @static
  17574. * @memberOf _
  17575. * @since 0.1.0
  17576. * @alias each
  17577. * @category Collection
  17578. * @param {Array|Object} collection The collection to iterate over.
  17579. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  17580. * @returns {Array|Object} Returns `collection`.
  17581. * @see _.forEachRight
  17582. * @example
  17583. *
  17584. * _.forEach([1, 2], function(value) {
  17585. * console.log(value);
  17586. * });
  17587. * // => Logs `1` then `2`.
  17588. *
  17589. * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
  17590. * console.log(key);
  17591. * });
  17592. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  17593. */
  17594. function forEach(collection, iteratee) {
  17595. var func = isArray(collection) ? arrayEach : baseEach;
  17596. return func(collection, castFunction(iteratee));
  17597. }
  17598. module.exports = forEach;
  17599. /***/ }),
  17600. /* 130 */
  17601. /***/ (function(module, exports, __webpack_require__) {
  17602. var listCacheClear = __webpack_require__(728),
  17603. listCacheDelete = __webpack_require__(729),
  17604. listCacheGet = __webpack_require__(730),
  17605. listCacheHas = __webpack_require__(731),
  17606. listCacheSet = __webpack_require__(732);
  17607. /**
  17608. * Creates an list cache object.
  17609. *
  17610. * @private
  17611. * @constructor
  17612. * @param {Array} [entries] The key-value pairs to cache.
  17613. */
  17614. function ListCache(entries) {
  17615. var index = -1,
  17616. length = entries == null ? 0 : entries.length;
  17617. this.clear();
  17618. while (++index < length) {
  17619. var entry = entries[index];
  17620. this.set(entry[0], entry[1]);
  17621. }
  17622. }
  17623. // Add methods to `ListCache`.
  17624. ListCache.prototype.clear = listCacheClear;
  17625. ListCache.prototype['delete'] = listCacheDelete;
  17626. ListCache.prototype.get = listCacheGet;
  17627. ListCache.prototype.has = listCacheHas;
  17628. ListCache.prototype.set = listCacheSet;
  17629. module.exports = ListCache;
  17630. /***/ }),
  17631. /* 131 */
  17632. /***/ (function(module, exports, __webpack_require__) {
  17633. var eq = __webpack_require__(67);
  17634. /**
  17635. * Gets the index at which the `key` is found in `array` of key-value pairs.
  17636. *
  17637. * @private
  17638. * @param {Array} array The array to inspect.
  17639. * @param {*} key The key to search for.
  17640. * @returns {number} Returns the index of the matched value, else `-1`.
  17641. */
  17642. function assocIndexOf(array, key) {
  17643. var length = array.length;
  17644. while (length--) {
  17645. if (eq(array[length][0], key)) {
  17646. return length;
  17647. }
  17648. }
  17649. return -1;
  17650. }
  17651. module.exports = assocIndexOf;
  17652. /***/ }),
  17653. /* 132 */
  17654. /***/ (function(module, exports, __webpack_require__) {
  17655. var getNative = __webpack_require__(49);
  17656. /* Built-in method references that are verified to be native. */
  17657. var nativeCreate = getNative(Object, 'create');
  17658. module.exports = nativeCreate;
  17659. /***/ }),
  17660. /* 133 */
  17661. /***/ (function(module, exports, __webpack_require__) {
  17662. var isKeyable = __webpack_require__(746);
  17663. /**
  17664. * Gets the data for `map`.
  17665. *
  17666. * @private
  17667. * @param {Object} map The map to query.
  17668. * @param {string} key The reference key.
  17669. * @returns {*} Returns the map data.
  17670. */
  17671. function getMapData(map, key) {
  17672. var data = map.__data__;
  17673. return isKeyable(key)
  17674. ? data[typeof key == 'string' ? 'string' : 'hash']
  17675. : data.map;
  17676. }
  17677. module.exports = getMapData;
  17678. /***/ }),
  17679. /* 134 */
  17680. /***/ (function(module, exports, __webpack_require__) {
  17681. var isArray = __webpack_require__(9),
  17682. isKey = __webpack_require__(181),
  17683. stringToPath = __webpack_require__(780),
  17684. toString = __webpack_require__(783);
  17685. /**
  17686. * Casts `value` to a path array if it's not one.
  17687. *
  17688. * @private
  17689. * @param {*} value The value to inspect.
  17690. * @param {Object} [object] The object to query keys on.
  17691. * @returns {Array} Returns the cast property path array.
  17692. */
  17693. function castPath(value, object) {
  17694. if (isArray(value)) {
  17695. return value;
  17696. }
  17697. return isKey(value, object) ? [value] : stringToPath(toString(value));
  17698. }
  17699. module.exports = castPath;
  17700. /***/ }),
  17701. /* 135 */
  17702. /***/ (function(module, exports) {
  17703. /**
  17704. * A specialized version of `_.map` for arrays without support for iteratee
  17705. * shorthands.
  17706. *
  17707. * @private
  17708. * @param {Array} [array] The array to iterate over.
  17709. * @param {Function} iteratee The function invoked per iteration.
  17710. * @returns {Array} Returns the new mapped array.
  17711. */
  17712. function arrayMap(array, iteratee) {
  17713. var index = -1,
  17714. length = array == null ? 0 : array.length,
  17715. result = Array(length);
  17716. while (++index < length) {
  17717. result[index] = iteratee(array[index], index, array);
  17718. }
  17719. return result;
  17720. }
  17721. module.exports = arrayMap;
  17722. /***/ }),
  17723. /* 136 */
  17724. /***/ (function(module, exports, __webpack_require__) {
  17725. var ITERATOR = __webpack_require__(11)('iterator');
  17726. var SAFE_CLOSING = false;
  17727. try {
  17728. var riter = [7][ITERATOR]();
  17729. riter['return'] = function () { SAFE_CLOSING = true; };
  17730. // eslint-disable-next-line no-throw-literal
  17731. Array.from(riter, function () { throw 2; });
  17732. } catch (e) { /* empty */ }
  17733. module.exports = function (exec, skipClosing) {
  17734. if (!skipClosing && !SAFE_CLOSING) return false;
  17735. var safe = false;
  17736. try {
  17737. var arr = [7];
  17738. var iter = arr[ITERATOR]();
  17739. iter.next = function () { return { done: safe = true }; };
  17740. arr[ITERATOR] = function () { return iter; };
  17741. exec(arr);
  17742. } catch (e) { /* empty */ }
  17743. return safe;
  17744. };
  17745. /***/ }),
  17746. /* 137 */
  17747. /***/ (function(module, exports, __webpack_require__) {
  17748. var ctx = __webpack_require__(34);
  17749. var call = __webpack_require__(452);
  17750. var isArrayIter = __webpack_require__(194);
  17751. var anObject = __webpack_require__(7);
  17752. var toLength = __webpack_require__(20);
  17753. var getIterFn = __webpack_require__(195);
  17754. var BREAK = {};
  17755. var RETURN = {};
  17756. var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
  17757. var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);
  17758. var f = ctx(fn, that, entries ? 2 : 1);
  17759. var index = 0;
  17760. var length, step, iterator, result;
  17761. if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
  17762. // fast case for arrays with default iterator
  17763. if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
  17764. result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
  17765. if (result === BREAK || result === RETURN) return result;
  17766. } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
  17767. result = call(iterator, f, step.value, entries);
  17768. if (result === BREAK || result === RETURN) return result;
  17769. }
  17770. };
  17771. exports.BREAK = BREAK;
  17772. exports.RETURN = RETURN;
  17773. /***/ }),
  17774. /* 138 */
  17775. /***/ (function(module, exports, __webpack_require__) {
  17776. "use strict";
  17777. var global = __webpack_require__(6);
  17778. var $export = __webpack_require__(1);
  17779. var redefine = __webpack_require__(41);
  17780. var redefineAll = __webpack_require__(71);
  17781. var meta = __webpack_require__(104);
  17782. var forOf = __webpack_require__(137);
  17783. var anInstance = __webpack_require__(72);
  17784. var isObject = __webpack_require__(8);
  17785. var fails = __webpack_require__(13);
  17786. var $iterDetect = __webpack_require__(136);
  17787. var setToStringTag = __webpack_require__(74);
  17788. var inheritIfRequired = __webpack_require__(851);
  17789. module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
  17790. var Base = global[NAME];
  17791. var C = Base;
  17792. var ADDER = IS_MAP ? 'set' : 'add';
  17793. var proto = C && C.prototype;
  17794. var O = {};
  17795. var fixMethod = function (KEY) {
  17796. var fn = proto[KEY];
  17797. redefine(proto, KEY,
  17798. KEY == 'delete' ? function (a) {
  17799. return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
  17800. } : KEY == 'has' ? function has(a) {
  17801. return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
  17802. } : KEY == 'get' ? function get(a) {
  17803. return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
  17804. } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }
  17805. : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }
  17806. );
  17807. };
  17808. if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {
  17809. new C().entries().next();
  17810. }))) {
  17811. // create collection constructor
  17812. C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
  17813. redefineAll(C.prototype, methods);
  17814. meta.NEED = true;
  17815. } else {
  17816. var instance = new C();
  17817. // early implementations not supports chaining
  17818. var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
  17819. // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
  17820. var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
  17821. // most early implementations doesn't supports iterables, most modern - not close it correctly
  17822. var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new
  17823. // for early implementations -0 and +0 not the same
  17824. var BUGGY_ZERO = !IS_WEAK && fails(function () {
  17825. // V8 ~ Chromium 42- fails only with 5+ elements
  17826. var $instance = new C();
  17827. var index = 5;
  17828. while (index--) $instance[ADDER](index, index);
  17829. return !$instance.has(-0);
  17830. });
  17831. if (!ACCEPT_ITERABLES) {
  17832. C = wrapper(function (target, iterable) {
  17833. anInstance(target, C, NAME);
  17834. var that = inheritIfRequired(new Base(), target, C);
  17835. if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
  17836. return that;
  17837. });
  17838. C.prototype = proto;
  17839. proto.constructor = C;
  17840. }
  17841. if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
  17842. fixMethod('delete');
  17843. fixMethod('has');
  17844. IS_MAP && fixMethod('get');
  17845. }
  17846. if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
  17847. // weak collections should not contains .clear method
  17848. if (IS_WEAK && proto.clear) delete proto.clear;
  17849. }
  17850. setToStringTag(C, NAME);
  17851. O[NAME] = C;
  17852. $export($export.G + $export.W + $export.F * (C != Base), O);
  17853. if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
  17854. return C;
  17855. };
  17856. /***/ }),
  17857. /* 139 */
  17858. /***/ (function(module, exports) {
  17859. exports.f = Object.getOwnPropertySymbols;
  17860. /***/ }),
  17861. /* 140 */
  17862. /***/ (function(module, exports, __webpack_require__) {
  17863. "use strict";
  17864. var hide = __webpack_require__(27);
  17865. var redefine = __webpack_require__(41);
  17866. var fails = __webpack_require__(13);
  17867. var defined = __webpack_require__(56);
  17868. var wks = __webpack_require__(11);
  17869. module.exports = function (KEY, length, exec) {
  17870. var SYMBOL = wks(KEY);
  17871. var fns = exec(defined, SYMBOL, ''[KEY]);
  17872. var strfn = fns[0];
  17873. var rxfn = fns[1];
  17874. if (fails(function () {
  17875. var O = {};
  17876. O[SYMBOL] = function () { return 7; };
  17877. return ''[KEY](O) != 7;
  17878. })) {
  17879. redefine(String.prototype, KEY, strfn);
  17880. hide(RegExp.prototype, SYMBOL, length == 2
  17881. // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
  17882. // 21.2.5.11 RegExp.prototype[@@split](string, limit)
  17883. ? function (string, arg) { return rxfn.call(string, this, arg); }
  17884. // 21.2.5.6 RegExp.prototype[@@match](string)
  17885. // 21.2.5.9 RegExp.prototype[@@search](string)
  17886. : function (string) { return rxfn.call(string, this); }
  17887. );
  17888. }
  17889. };
  17890. /***/ }),
  17891. /* 141 */
  17892. /***/ (function(module, exports, __webpack_require__) {
  17893. "use strict";
  17894. var hasOwn = Object.prototype.hasOwnProperty;
  17895. var toStr = Object.prototype.toString;
  17896. var isArray = function isArray(arr) {
  17897. if (typeof Array.isArray === 'function') {
  17898. return Array.isArray(arr);
  17899. }
  17900. return toStr.call(arr) === '[object Array]';
  17901. };
  17902. var isPlainObject = function isPlainObject(obj) {
  17903. if (!obj || toStr.call(obj) !== '[object Object]') {
  17904. return false;
  17905. }
  17906. var hasOwnConstructor = hasOwn.call(obj, 'constructor');
  17907. var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
  17908. // Not own constructor property must be Object
  17909. if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
  17910. return false;
  17911. }
  17912. // Own properties are enumerated firstly, so to speed up,
  17913. // if last one is own, then all properties are own.
  17914. var key;
  17915. for (key in obj) { /**/ }
  17916. return typeof key === 'undefined' || hasOwn.call(obj, key);
  17917. };
  17918. module.exports = function extend() {
  17919. var options, name, src, copy, copyIsArray, clone;
  17920. var target = arguments[0];
  17921. var i = 1;
  17922. var length = arguments.length;
  17923. var deep = false;
  17924. // Handle a deep copy situation
  17925. if (typeof target === 'boolean') {
  17926. deep = target;
  17927. target = arguments[1] || {};
  17928. // skip the boolean and the target
  17929. i = 2;
  17930. }
  17931. if (target == null || (typeof target !== 'object' && typeof target !== 'function')) {
  17932. target = {};
  17933. }
  17934. for (; i < length; ++i) {
  17935. options = arguments[i];
  17936. // Only deal with non-null/undefined values
  17937. if (options != null) {
  17938. // Extend the base object
  17939. for (name in options) {
  17940. src = target[name];
  17941. copy = options[name];
  17942. // Prevent never-ending loop
  17943. if (target !== copy) {
  17944. // Recurse if we're merging plain objects or arrays
  17945. if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
  17946. if (copyIsArray) {
  17947. copyIsArray = false;
  17948. clone = src && isArray(src) ? src : [];
  17949. } else {
  17950. clone = src && isPlainObject(src) ? src : {};
  17951. }
  17952. // Never move original objects, clone them
  17953. target[name] = extend(deep, clone, copy);
  17954. // Don't bring in undefined values
  17955. } else if (typeof copy !== 'undefined') {
  17956. target[name] = copy;
  17957. }
  17958. }
  17959. }
  17960. }
  17961. }
  17962. // Return the modified object
  17963. return target;
  17964. };
  17965. /***/ }),
  17966. /* 142 */
  17967. /***/ (function(module, exports) {
  17968. module.exports = require("net");
  17969. /***/ }),
  17970. /* 143 */
  17971. /***/ (function(module, exports, __webpack_require__) {
  17972. "use strict";
  17973. var jsonSafeStringify = __webpack_require__(530)
  17974. var crypto = __webpack_require__(5)
  17975. var Buffer = __webpack_require__(30).Buffer
  17976. var defer = typeof setImmediate === 'undefined'
  17977. ? process.nextTick
  17978. : setImmediate
  17979. function paramsHaveRequestBody (params) {
  17980. return (
  17981. params.body ||
  17982. params.requestBodyStream ||
  17983. (params.json && typeof params.json !== 'boolean') ||
  17984. params.multipart
  17985. )
  17986. }
  17987. function safeStringify (obj, replacer) {
  17988. var ret
  17989. try {
  17990. ret = JSON.stringify(obj, replacer)
  17991. } catch (e) {
  17992. ret = jsonSafeStringify(obj, replacer)
  17993. }
  17994. return ret
  17995. }
  17996. function md5 (str) {
  17997. return crypto.createHash('md5').update(str).digest('hex')
  17998. }
  17999. function isReadStream (rs) {
  18000. return rs.readable && rs.path && rs.mode
  18001. }
  18002. function toBase64 (str) {
  18003. return Buffer.from(str || '', 'utf8').toString('base64')
  18004. }
  18005. function copy (obj) {
  18006. var o = {}
  18007. Object.keys(obj).forEach(function (i) {
  18008. o[i] = obj[i]
  18009. })
  18010. return o
  18011. }
  18012. function version () {
  18013. var numbers = process.version.replace('v', '').split('.')
  18014. return {
  18015. major: parseInt(numbers[0], 10),
  18016. minor: parseInt(numbers[1], 10),
  18017. patch: parseInt(numbers[2], 10)
  18018. }
  18019. }
  18020. exports.paramsHaveRequestBody = paramsHaveRequestBody
  18021. exports.safeStringify = safeStringify
  18022. exports.md5 = md5
  18023. exports.isReadStream = isReadStream
  18024. exports.toBase64 = toBase64
  18025. exports.copy = copy
  18026. exports.version = version
  18027. exports.defer = defer
  18028. /***/ }),
  18029. /* 144 */
  18030. /***/ (function(module, exports, __webpack_require__) {
  18031. "use strict";
  18032. // Load modules
  18033. const Hoek = __webpack_require__(82);
  18034. // Declare internals
  18035. const internals = {
  18036. STATUS_CODES: Object.setPrototypeOf({
  18037. '100': 'Continue',
  18038. '101': 'Switching Protocols',
  18039. '102': 'Processing',
  18040. '200': 'OK',
  18041. '201': 'Created',
  18042. '202': 'Accepted',
  18043. '203': 'Non-Authoritative Information',
  18044. '204': 'No Content',
  18045. '205': 'Reset Content',
  18046. '206': 'Partial Content',
  18047. '207': 'Multi-Status',
  18048. '300': 'Multiple Choices',
  18049. '301': 'Moved Permanently',
  18050. '302': 'Moved Temporarily',
  18051. '303': 'See Other',
  18052. '304': 'Not Modified',
  18053. '305': 'Use Proxy',
  18054. '307': 'Temporary Redirect',
  18055. '400': 'Bad Request',
  18056. '401': 'Unauthorized',
  18057. '402': 'Payment Required',
  18058. '403': 'Forbidden',
  18059. '404': 'Not Found',
  18060. '405': 'Method Not Allowed',
  18061. '406': 'Not Acceptable',
  18062. '407': 'Proxy Authentication Required',
  18063. '408': 'Request Time-out',
  18064. '409': 'Conflict',
  18065. '410': 'Gone',
  18066. '411': 'Length Required',
  18067. '412': 'Precondition Failed',
  18068. '413': 'Request Entity Too Large',
  18069. '414': 'Request-URI Too Large',
  18070. '415': 'Unsupported Media Type',
  18071. '416': 'Requested Range Not Satisfiable',
  18072. '417': 'Expectation Failed',
  18073. '418': 'I\'m a teapot',
  18074. '422': 'Unprocessable Entity',
  18075. '423': 'Locked',
  18076. '424': 'Failed Dependency',
  18077. '425': 'Unordered Collection',
  18078. '426': 'Upgrade Required',
  18079. '428': 'Precondition Required',
  18080. '429': 'Too Many Requests',
  18081. '431': 'Request Header Fields Too Large',
  18082. '451': 'Unavailable For Legal Reasons',
  18083. '500': 'Internal Server Error',
  18084. '501': 'Not Implemented',
  18085. '502': 'Bad Gateway',
  18086. '503': 'Service Unavailable',
  18087. '504': 'Gateway Time-out',
  18088. '505': 'HTTP Version Not Supported',
  18089. '506': 'Variant Also Negotiates',
  18090. '507': 'Insufficient Storage',
  18091. '509': 'Bandwidth Limit Exceeded',
  18092. '510': 'Not Extended',
  18093. '511': 'Network Authentication Required'
  18094. }, null)
  18095. };
  18096. exports.wrap = function (error, statusCode, message) {
  18097. Hoek.assert(error instanceof Error, 'Cannot wrap non-Error object');
  18098. Hoek.assert(!error.isBoom || (!statusCode && !message), 'Cannot provide statusCode or message with boom error');
  18099. return (error.isBoom ? error : internals.initialize(error, statusCode || 500, message));
  18100. };
  18101. exports.create = function (statusCode, message, data) {
  18102. return internals.create(statusCode, message, data, exports.create);
  18103. };
  18104. internals.create = function (statusCode, message, data, ctor) {
  18105. if (message instanceof Error) {
  18106. if (data) {
  18107. message.data = data;
  18108. }
  18109. return exports.wrap(message, statusCode);
  18110. }
  18111. const error = new Error(message ? message : undefined); // Avoids settings null message
  18112. Error.captureStackTrace(error, ctor); // Filter the stack to our external API
  18113. error.data = data || null;
  18114. internals.initialize(error, statusCode);
  18115. return error;
  18116. };
  18117. internals.initialize = function (error, statusCode, message) {
  18118. const numberCode = parseInt(statusCode, 10);
  18119. Hoek.assert(!isNaN(numberCode) && numberCode >= 400, 'First argument must be a number (400+):', statusCode);
  18120. error.isBoom = true;
  18121. error.isServer = numberCode >= 500;
  18122. if (!error.hasOwnProperty('data')) {
  18123. error.data = null;
  18124. }
  18125. error.output = {
  18126. statusCode: numberCode,
  18127. payload: {},
  18128. headers: {}
  18129. };
  18130. error.reformat = internals.reformat;
  18131. error.reformat();
  18132. if (!message &&
  18133. !error.message) {
  18134. message = error.output.payload.error;
  18135. }
  18136. if (message) {
  18137. error.message = (message + (error.message ? ': ' + error.message : ''));
  18138. }
  18139. return error;
  18140. };
  18141. internals.reformat = function () {
  18142. this.output.payload.statusCode = this.output.statusCode;
  18143. this.output.payload.error = internals.STATUS_CODES[this.output.statusCode] || 'Unknown';
  18144. if (this.output.statusCode === 500) {
  18145. this.output.payload.message = 'An internal server error occurred'; // Hide actual error from user
  18146. }
  18147. else if (this.message) {
  18148. this.output.payload.message = this.message;
  18149. }
  18150. };
  18151. // 4xx Client Errors
  18152. exports.badRequest = function (message, data) {
  18153. return internals.create(400, message, data, exports.badRequest);
  18154. };
  18155. exports.unauthorized = function (message, scheme, attributes) { // Or function (message, wwwAuthenticate[])
  18156. const err = internals.create(401, message, undefined, exports.unauthorized);
  18157. if (!scheme) {
  18158. return err;
  18159. }
  18160. let wwwAuthenticate = '';
  18161. if (typeof scheme === 'string') {
  18162. // function (message, scheme, attributes)
  18163. wwwAuthenticate = scheme;
  18164. if (attributes || message) {
  18165. err.output.payload.attributes = {};
  18166. }
  18167. if (attributes) {
  18168. if (typeof attributes === 'string') {
  18169. wwwAuthenticate = wwwAuthenticate + ' ' + Hoek.escapeHeaderAttribute(attributes);
  18170. err.output.payload.attributes = attributes;
  18171. }
  18172. else {
  18173. const names = Object.keys(attributes);
  18174. for (let i = 0; i < names.length; ++i) {
  18175. const name = names[i];
  18176. if (i) {
  18177. wwwAuthenticate = wwwAuthenticate + ',';
  18178. }
  18179. let value = attributes[name];
  18180. if (value === null ||
  18181. value === undefined) { // Value can be zero
  18182. value = '';
  18183. }
  18184. wwwAuthenticate = wwwAuthenticate + ' ' + name + '="' + Hoek.escapeHeaderAttribute(value.toString()) + '"';
  18185. err.output.payload.attributes[name] = value;
  18186. }
  18187. }
  18188. }
  18189. if (message) {
  18190. if (attributes) {
  18191. wwwAuthenticate = wwwAuthenticate + ',';
  18192. }
  18193. wwwAuthenticate = wwwAuthenticate + ' error="' + Hoek.escapeHeaderAttribute(message) + '"';
  18194. err.output.payload.attributes.error = message;
  18195. }
  18196. else {
  18197. err.isMissing = true;
  18198. }
  18199. }
  18200. else {
  18201. // function (message, wwwAuthenticate[])
  18202. const wwwArray = scheme;
  18203. for (let i = 0; i < wwwArray.length; ++i) {
  18204. if (i) {
  18205. wwwAuthenticate = wwwAuthenticate + ', ';
  18206. }
  18207. wwwAuthenticate = wwwAuthenticate + wwwArray[i];
  18208. }
  18209. }
  18210. err.output.headers['WWW-Authenticate'] = wwwAuthenticate;
  18211. return err;
  18212. };
  18213. exports.paymentRequired = function (message, data) {
  18214. return internals.create(402, message, data, exports.paymentRequired);
  18215. };
  18216. exports.forbidden = function (message, data) {
  18217. return internals.create(403, message, data, exports.forbidden);
  18218. };
  18219. exports.notFound = function (message, data) {
  18220. return internals.create(404, message, data, exports.notFound);
  18221. };
  18222. exports.methodNotAllowed = function (message, data, allow) {
  18223. const err = internals.create(405, message, data, exports.methodNotAllowed);
  18224. if (typeof allow === 'string') {
  18225. allow = [allow];
  18226. }
  18227. if (Array.isArray(allow)) {
  18228. err.output.headers.Allow = allow.join(', ');
  18229. }
  18230. return err;
  18231. };
  18232. exports.notAcceptable = function (message, data) {
  18233. return internals.create(406, message, data, exports.notAcceptable);
  18234. };
  18235. exports.proxyAuthRequired = function (message, data) {
  18236. return internals.create(407, message, data, exports.proxyAuthRequired);
  18237. };
  18238. exports.clientTimeout = function (message, data) {
  18239. return internals.create(408, message, data, exports.clientTimeout);
  18240. };
  18241. exports.conflict = function (message, data) {
  18242. return internals.create(409, message, data, exports.conflict);
  18243. };
  18244. exports.resourceGone = function (message, data) {
  18245. return internals.create(410, message, data, exports.resourceGone);
  18246. };
  18247. exports.lengthRequired = function (message, data) {
  18248. return internals.create(411, message, data, exports.lengthRequired);
  18249. };
  18250. exports.preconditionFailed = function (message, data) {
  18251. return internals.create(412, message, data, exports.preconditionFailed);
  18252. };
  18253. exports.entityTooLarge = function (message, data) {
  18254. return internals.create(413, message, data, exports.entityTooLarge);
  18255. };
  18256. exports.uriTooLong = function (message, data) {
  18257. return internals.create(414, message, data, exports.uriTooLong);
  18258. };
  18259. exports.unsupportedMediaType = function (message, data) {
  18260. return internals.create(415, message, data, exports.unsupportedMediaType);
  18261. };
  18262. exports.rangeNotSatisfiable = function (message, data) {
  18263. return internals.create(416, message, data, exports.rangeNotSatisfiable);
  18264. };
  18265. exports.expectationFailed = function (message, data) {
  18266. return internals.create(417, message, data, exports.expectationFailed);
  18267. };
  18268. exports.teapot = function (message, data) {
  18269. return internals.create(418, message, data, exports.teapot);
  18270. };
  18271. exports.badData = function (message, data) {
  18272. return internals.create(422, message, data, exports.badData);
  18273. };
  18274. exports.locked = function (message, data) {
  18275. return internals.create(423, message, data, exports.locked);
  18276. };
  18277. exports.preconditionRequired = function (message, data) {
  18278. return internals.create(428, message, data, exports.preconditionRequired);
  18279. };
  18280. exports.tooManyRequests = function (message, data) {
  18281. return internals.create(429, message, data, exports.tooManyRequests);
  18282. };
  18283. exports.illegal = function (message, data) {
  18284. return internals.create(451, message, data, exports.illegal);
  18285. };
  18286. // 5xx Server Errors
  18287. exports.internal = function (message, data, statusCode) {
  18288. return internals.serverError(message, data, statusCode, exports.internal);
  18289. };
  18290. internals.serverError = function (message, data, statusCode, ctor) {
  18291. let error;
  18292. if (data instanceof Error) {
  18293. error = exports.wrap(data, statusCode, message);
  18294. }
  18295. else {
  18296. error = internals.create(statusCode || 500, message, undefined, ctor);
  18297. error.data = data;
  18298. }
  18299. return error;
  18300. };
  18301. exports.notImplemented = function (message, data) {
  18302. return internals.serverError(message, data, 501, exports.notImplemented);
  18303. };
  18304. exports.badGateway = function (message, data) {
  18305. return internals.serverError(message, data, 502, exports.badGateway);
  18306. };
  18307. exports.serverUnavailable = function (message, data) {
  18308. return internals.serverError(message, data, 503, exports.serverUnavailable);
  18309. };
  18310. exports.gatewayTimeout = function (message, data) {
  18311. return internals.serverError(message, data, 504, exports.gatewayTimeout);
  18312. };
  18313. exports.badImplementation = function (message, data) {
  18314. const err = internals.serverError(message, data, 500, exports.badImplementation);
  18315. err.isDeveloperError = true;
  18316. return err;
  18317. };
  18318. /***/ }),
  18319. /* 145 */
  18320. /***/ (function(module, exports, __webpack_require__) {
  18321. "use strict";
  18322. // Load modules
  18323. const Crypto = __webpack_require__(5);
  18324. const Url = __webpack_require__(14);
  18325. const Utils = __webpack_require__(105);
  18326. // Declare internals
  18327. const internals = {};
  18328. // MAC normalization format version
  18329. exports.headerVersion = '1'; // Prevent comparison of mac values generated with different normalized string formats
  18330. // Supported HMAC algorithms
  18331. exports.algorithms = ['sha1', 'sha256'];
  18332. // Calculate the request MAC
  18333. /*
  18334. type: 'header', // 'header', 'bewit', 'response'
  18335. credentials: {
  18336. key: 'aoijedoaijsdlaksjdl',
  18337. algorithm: 'sha256' // 'sha1', 'sha256'
  18338. },
  18339. options: {
  18340. method: 'GET',
  18341. resource: '/resource?a=1&b=2',
  18342. host: 'example.com',
  18343. port: 8080,
  18344. ts: 1357718381034,
  18345. nonce: 'd3d345f',
  18346. hash: 'U4MKKSmiVxk37JCCrAVIjV/OhB3y+NdwoCr6RShbVkE=',
  18347. ext: 'app-specific-data',
  18348. app: 'hf48hd83qwkj', // Application id (Oz)
  18349. dlg: 'd8djwekds9cj' // Delegated by application id (Oz), requires options.app
  18350. }
  18351. */
  18352. exports.calculateMac = function (type, credentials, options) {
  18353. const normalized = exports.generateNormalizedString(type, options);
  18354. const hmac = Crypto.createHmac(credentials.algorithm, credentials.key).update(normalized);
  18355. const digest = hmac.digest('base64');
  18356. return digest;
  18357. };
  18358. exports.generateNormalizedString = function (type, options) {
  18359. let resource = options.resource || '';
  18360. if (resource &&
  18361. resource[0] !== '/') {
  18362. const url = Url.parse(resource, false);
  18363. resource = url.path; // Includes query
  18364. }
  18365. let normalized = 'hawk.' + exports.headerVersion + '.' + type + '\n' +
  18366. options.ts + '\n' +
  18367. options.nonce + '\n' +
  18368. (options.method || '').toUpperCase() + '\n' +
  18369. resource + '\n' +
  18370. options.host.toLowerCase() + '\n' +
  18371. options.port + '\n' +
  18372. (options.hash || '') + '\n';
  18373. if (options.ext) {
  18374. normalized = normalized + options.ext.replace('\\', '\\\\').replace('\n', '\\n');
  18375. }
  18376. normalized = normalized + '\n';
  18377. if (options.app) {
  18378. normalized = normalized + options.app + '\n' +
  18379. (options.dlg || '') + '\n';
  18380. }
  18381. return normalized;
  18382. };
  18383. exports.calculatePayloadHash = function (payload, algorithm, contentType) {
  18384. const hash = exports.initializePayloadHash(algorithm, contentType);
  18385. hash.update(payload || '');
  18386. return exports.finalizePayloadHash(hash);
  18387. };
  18388. exports.initializePayloadHash = function (algorithm, contentType) {
  18389. const hash = Crypto.createHash(algorithm);
  18390. hash.update('hawk.' + exports.headerVersion + '.payload\n');
  18391. hash.update(Utils.parseContentType(contentType) + '\n');
  18392. return hash;
  18393. };
  18394. exports.finalizePayloadHash = function (hash) {
  18395. hash.update('\n');
  18396. return hash.digest('base64');
  18397. };
  18398. exports.calculateTsMac = function (ts, credentials) {
  18399. const hmac = Crypto.createHmac(credentials.algorithm, credentials.key);
  18400. hmac.update('hawk.' + exports.headerVersion + '.ts\n' + ts + '\n');
  18401. return hmac.digest('base64');
  18402. };
  18403. exports.timestampMessage = function (credentials, localtimeOffsetMsec) {
  18404. const now = Utils.nowSecs(localtimeOffsetMsec);
  18405. const tsm = exports.calculateTsMac(now, credentials);
  18406. return { ts: now, tsm };
  18407. };
  18408. /***/ }),
  18409. /* 146 */
  18410. /***/ (function(module, exports, __webpack_require__) {
  18411. // Copyright 2015 Joyent, Inc.
  18412. var Key = __webpack_require__(15);
  18413. var Fingerprint = __webpack_require__(84);
  18414. var Signature = __webpack_require__(32);
  18415. var PrivateKey = __webpack_require__(17);
  18416. var Certificate = __webpack_require__(85);
  18417. var Identity = __webpack_require__(87);
  18418. var errs = __webpack_require__(31);
  18419. module.exports = {
  18420. /* top-level classes */
  18421. Key: Key,
  18422. parseKey: Key.parse,
  18423. Fingerprint: Fingerprint,
  18424. parseFingerprint: Fingerprint.parse,
  18425. Signature: Signature,
  18426. parseSignature: Signature.parse,
  18427. PrivateKey: PrivateKey,
  18428. parsePrivateKey: PrivateKey.parse,
  18429. generatePrivateKey: PrivateKey.generate,
  18430. Certificate: Certificate,
  18431. parseCertificate: Certificate.parse,
  18432. createSelfSignedCertificate: Certificate.createSelfSigned,
  18433. createCertificate: Certificate.create,
  18434. Identity: Identity,
  18435. identityFromDN: Identity.parseDN,
  18436. identityForHost: Identity.forHost,
  18437. identityForUser: Identity.forUser,
  18438. identityForEmail: Identity.forEmail,
  18439. /* errors */
  18440. FingerprintFormatError: errs.FingerprintFormatError,
  18441. InvalidAlgorithmError: errs.InvalidAlgorithmError,
  18442. KeyParseError: errs.KeyParseError,
  18443. SignatureParseError: errs.SignatureParseError,
  18444. KeyEncryptedError: errs.KeyEncryptedError,
  18445. CertificateParseError: errs.CertificateParseError
  18446. };
  18447. /***/ }),
  18448. /* 147 */
  18449. /***/ (function(module, exports) {
  18450. // Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
  18451. module.exports = {
  18452. newInvalidAsn1Error: function(msg) {
  18453. var e = new Error();
  18454. e.name = 'InvalidAsn1Error';
  18455. e.message = msg || '';
  18456. return e;
  18457. }
  18458. };
  18459. /***/ }),
  18460. /* 148 */
  18461. /***/ (function(module, exports) {
  18462. // Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
  18463. module.exports = {
  18464. EOC: 0,
  18465. Boolean: 1,
  18466. Integer: 2,
  18467. BitString: 3,
  18468. OctetString: 4,
  18469. Null: 5,
  18470. OID: 6,
  18471. ObjectDescriptor: 7,
  18472. External: 8,
  18473. Real: 9, // float
  18474. Enumeration: 10,
  18475. PDV: 11,
  18476. Utf8String: 12,
  18477. RelativeOID: 13,
  18478. Sequence: 16,
  18479. Set: 17,
  18480. NumericString: 18,
  18481. PrintableString: 19,
  18482. T61String: 20,
  18483. VideotexString: 21,
  18484. IA5String: 22,
  18485. UTCTime: 23,
  18486. GeneralizedTime: 24,
  18487. GraphicString: 25,
  18488. VisibleString: 26,
  18489. GeneralString: 28,
  18490. UniversalString: 29,
  18491. CharacterString: 30,
  18492. BMPString: 31,
  18493. Constructor: 32,
  18494. Context: 128
  18495. };
  18496. /***/ }),
  18497. /* 149 */
  18498. /***/ (function(module, exports, __webpack_require__) {
  18499. // Copyright 2015 Joyent, Inc.
  18500. module.exports = {
  18501. read: read,
  18502. readPkcs1: readPkcs1,
  18503. write: write,
  18504. writePkcs1: writePkcs1
  18505. };
  18506. var assert = __webpack_require__(3);
  18507. var asn1 = __webpack_require__(39);
  18508. var algs = __webpack_require__(16);
  18509. var utils = __webpack_require__(12);
  18510. var Key = __webpack_require__(15);
  18511. var PrivateKey = __webpack_require__(17);
  18512. var pem = __webpack_require__(38);
  18513. var pkcs8 = __webpack_require__(86);
  18514. var readECDSACurve = pkcs8.readECDSACurve;
  18515. function read(buf, options) {
  18516. return (pem.read(buf, options, 'pkcs1'));
  18517. }
  18518. function write(key, options) {
  18519. return (pem.write(key, options, 'pkcs1'));
  18520. }
  18521. /* Helper to read in a single mpint */
  18522. function readMPInt(der, nm) {
  18523. assert.strictEqual(der.peek(), asn1.Ber.Integer,
  18524. nm + ' is not an Integer');
  18525. return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true)));
  18526. }
  18527. function readPkcs1(alg, type, der) {
  18528. switch (alg) {
  18529. case 'RSA':
  18530. if (type === 'public')
  18531. return (readPkcs1RSAPublic(der));
  18532. else if (type === 'private')
  18533. return (readPkcs1RSAPrivate(der));
  18534. throw (new Error('Unknown key type: ' + type));
  18535. case 'DSA':
  18536. if (type === 'public')
  18537. return (readPkcs1DSAPublic(der));
  18538. else if (type === 'private')
  18539. return (readPkcs1DSAPrivate(der));
  18540. throw (new Error('Unknown key type: ' + type));
  18541. case 'EC':
  18542. case 'ECDSA':
  18543. if (type === 'private')
  18544. return (readPkcs1ECDSAPrivate(der));
  18545. else if (type === 'public')
  18546. return (readPkcs1ECDSAPublic(der));
  18547. throw (new Error('Unknown key type: ' + type));
  18548. default:
  18549. throw (new Error('Unknown key algo: ' + alg));
  18550. }
  18551. }
  18552. function readPkcs1RSAPublic(der) {
  18553. // modulus and exponent
  18554. var n = readMPInt(der, 'modulus');
  18555. var e = readMPInt(der, 'exponent');
  18556. // now, make the key
  18557. var key = {
  18558. type: 'rsa',
  18559. parts: [
  18560. { name: 'e', data: e },
  18561. { name: 'n', data: n }
  18562. ]
  18563. };
  18564. return (new Key(key));
  18565. }
  18566. function readPkcs1RSAPrivate(der) {
  18567. var version = readMPInt(der, 'version');
  18568. assert.strictEqual(version[0], 0);
  18569. // modulus then public exponent
  18570. var n = readMPInt(der, 'modulus');
  18571. var e = readMPInt(der, 'public exponent');
  18572. var d = readMPInt(der, 'private exponent');
  18573. var p = readMPInt(der, 'prime1');
  18574. var q = readMPInt(der, 'prime2');
  18575. var dmodp = readMPInt(der, 'exponent1');
  18576. var dmodq = readMPInt(der, 'exponent2');
  18577. var iqmp = readMPInt(der, 'iqmp');
  18578. // now, make the key
  18579. var key = {
  18580. type: 'rsa',
  18581. parts: [
  18582. { name: 'n', data: n },
  18583. { name: 'e', data: e },
  18584. { name: 'd', data: d },
  18585. { name: 'iqmp', data: iqmp },
  18586. { name: 'p', data: p },
  18587. { name: 'q', data: q },
  18588. { name: 'dmodp', data: dmodp },
  18589. { name: 'dmodq', data: dmodq }
  18590. ]
  18591. };
  18592. return (new PrivateKey(key));
  18593. }
  18594. function readPkcs1DSAPrivate(der) {
  18595. var version = readMPInt(der, 'version');
  18596. assert.strictEqual(version.readUInt8(0), 0);
  18597. var p = readMPInt(der, 'p');
  18598. var q = readMPInt(der, 'q');
  18599. var g = readMPInt(der, 'g');
  18600. var y = readMPInt(der, 'y');
  18601. var x = readMPInt(der, 'x');
  18602. // now, make the key
  18603. var key = {
  18604. type: 'dsa',
  18605. parts: [
  18606. { name: 'p', data: p },
  18607. { name: 'q', data: q },
  18608. { name: 'g', data: g },
  18609. { name: 'y', data: y },
  18610. { name: 'x', data: x }
  18611. ]
  18612. };
  18613. return (new PrivateKey(key));
  18614. }
  18615. function readPkcs1DSAPublic(der) {
  18616. var y = readMPInt(der, 'y');
  18617. var p = readMPInt(der, 'p');
  18618. var q = readMPInt(der, 'q');
  18619. var g = readMPInt(der, 'g');
  18620. var key = {
  18621. type: 'dsa',
  18622. parts: [
  18623. { name: 'y', data: y },
  18624. { name: 'p', data: p },
  18625. { name: 'q', data: q },
  18626. { name: 'g', data: g }
  18627. ]
  18628. };
  18629. return (new Key(key));
  18630. }
  18631. function readPkcs1ECDSAPublic(der) {
  18632. der.readSequence();
  18633. var oid = der.readOID();
  18634. assert.strictEqual(oid, '1.2.840.10045.2.1', 'must be ecPublicKey');
  18635. var curveOid = der.readOID();
  18636. var curve;
  18637. var curves = Object.keys(algs.curves);
  18638. for (var j = 0; j < curves.length; ++j) {
  18639. var c = curves[j];
  18640. var cd = algs.curves[c];
  18641. if (cd.pkcs8oid === curveOid) {
  18642. curve = c;
  18643. break;
  18644. }
  18645. }
  18646. assert.string(curve, 'a known ECDSA named curve');
  18647. var Q = der.readString(asn1.Ber.BitString, true);
  18648. Q = utils.ecNormalize(Q);
  18649. var key = {
  18650. type: 'ecdsa',
  18651. parts: [
  18652. { name: 'curve', data: new Buffer(curve) },
  18653. { name: 'Q', data: Q }
  18654. ]
  18655. };
  18656. return (new Key(key));
  18657. }
  18658. function readPkcs1ECDSAPrivate(der) {
  18659. var version = readMPInt(der, 'version');
  18660. assert.strictEqual(version.readUInt8(0), 1);
  18661. // private key
  18662. var d = der.readString(asn1.Ber.OctetString, true);
  18663. der.readSequence(0xa0);
  18664. var curve = readECDSACurve(der);
  18665. assert.string(curve, 'a known elliptic curve');
  18666. der.readSequence(0xa1);
  18667. var Q = der.readString(asn1.Ber.BitString, true);
  18668. Q = utils.ecNormalize(Q);
  18669. var key = {
  18670. type: 'ecdsa',
  18671. parts: [
  18672. { name: 'curve', data: new Buffer(curve) },
  18673. { name: 'Q', data: Q },
  18674. { name: 'd', data: d }
  18675. ]
  18676. };
  18677. return (new PrivateKey(key));
  18678. }
  18679. function writePkcs1(der, key) {
  18680. der.startSequence();
  18681. switch (key.type) {
  18682. case 'rsa':
  18683. if (PrivateKey.isPrivateKey(key))
  18684. writePkcs1RSAPrivate(der, key);
  18685. else
  18686. writePkcs1RSAPublic(der, key);
  18687. break;
  18688. case 'dsa':
  18689. if (PrivateKey.isPrivateKey(key))
  18690. writePkcs1DSAPrivate(der, key);
  18691. else
  18692. writePkcs1DSAPublic(der, key);
  18693. break;
  18694. case 'ecdsa':
  18695. if (PrivateKey.isPrivateKey(key))
  18696. writePkcs1ECDSAPrivate(der, key);
  18697. else
  18698. writePkcs1ECDSAPublic(der, key);
  18699. break;
  18700. default:
  18701. throw (new Error('Unknown key algo: ' + key.type));
  18702. }
  18703. der.endSequence();
  18704. }
  18705. function writePkcs1RSAPublic(der, key) {
  18706. der.writeBuffer(key.part.n.data, asn1.Ber.Integer);
  18707. der.writeBuffer(key.part.e.data, asn1.Ber.Integer);
  18708. }
  18709. function writePkcs1RSAPrivate(der, key) {
  18710. var ver = new Buffer(1);
  18711. ver[0] = 0;
  18712. der.writeBuffer(ver, asn1.Ber.Integer);
  18713. der.writeBuffer(key.part.n.data, asn1.Ber.Integer);
  18714. der.writeBuffer(key.part.e.data, asn1.Ber.Integer);
  18715. der.writeBuffer(key.part.d.data, asn1.Ber.Integer);
  18716. der.writeBuffer(key.part.p.data, asn1.Ber.Integer);
  18717. der.writeBuffer(key.part.q.data, asn1.Ber.Integer);
  18718. if (!key.part.dmodp || !key.part.dmodq)
  18719. utils.addRSAMissing(key);
  18720. der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer);
  18721. der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer);
  18722. der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer);
  18723. }
  18724. function writePkcs1DSAPrivate(der, key) {
  18725. var ver = new Buffer(1);
  18726. ver[0] = 0;
  18727. der.writeBuffer(ver, asn1.Ber.Integer);
  18728. der.writeBuffer(key.part.p.data, asn1.Ber.Integer);
  18729. der.writeBuffer(key.part.q.data, asn1.Ber.Integer);
  18730. der.writeBuffer(key.part.g.data, asn1.Ber.Integer);
  18731. der.writeBuffer(key.part.y.data, asn1.Ber.Integer);
  18732. der.writeBuffer(key.part.x.data, asn1.Ber.Integer);
  18733. }
  18734. function writePkcs1DSAPublic(der, key) {
  18735. der.writeBuffer(key.part.y.data, asn1.Ber.Integer);
  18736. der.writeBuffer(key.part.p.data, asn1.Ber.Integer);
  18737. der.writeBuffer(key.part.q.data, asn1.Ber.Integer);
  18738. der.writeBuffer(key.part.g.data, asn1.Ber.Integer);
  18739. }
  18740. function writePkcs1ECDSAPublic(der, key) {
  18741. der.startSequence();
  18742. der.writeOID('1.2.840.10045.2.1'); /* ecPublicKey */
  18743. var curve = key.part.curve.data.toString();
  18744. var curveOid = algs.curves[curve].pkcs8oid;
  18745. assert.string(curveOid, 'a known ECDSA named curve');
  18746. der.writeOID(curveOid);
  18747. der.endSequence();
  18748. var Q = utils.ecNormalize(key.part.Q.data, true);
  18749. der.writeBuffer(Q, asn1.Ber.BitString);
  18750. }
  18751. function writePkcs1ECDSAPrivate(der, key) {
  18752. var ver = new Buffer(1);
  18753. ver[0] = 1;
  18754. der.writeBuffer(ver, asn1.Ber.Integer);
  18755. der.writeBuffer(key.part.d.data, asn1.Ber.OctetString);
  18756. der.startSequence(0xa0);
  18757. var curve = key.part.curve.data.toString();
  18758. var curveOid = algs.curves[curve].pkcs8oid;
  18759. assert.string(curveOid, 'a known ECDSA named curve');
  18760. der.writeOID(curveOid);
  18761. der.endSequence();
  18762. der.startSequence(0xa1);
  18763. var Q = utils.ecNormalize(key.part.Q.data, true);
  18764. der.writeBuffer(Q, asn1.Ber.BitString);
  18765. der.endSequence();
  18766. }
  18767. /***/ }),
  18768. /* 150 */
  18769. /***/ (function(module, exports) {
  18770. module.exports = require("string_decoder");
  18771. /***/ }),
  18772. /* 151 */
  18773. /***/ (function(module, exports) {
  18774. function Caseless (dict) {
  18775. this.dict = dict || {}
  18776. }
  18777. Caseless.prototype.set = function (name, value, clobber) {
  18778. if (typeof name === 'object') {
  18779. for (var i in name) {
  18780. this.set(i, name[i], value)
  18781. }
  18782. } else {
  18783. if (typeof clobber === 'undefined') clobber = true
  18784. var has = this.has(name)
  18785. if (!clobber && has) this.dict[has] = this.dict[has] + ',' + value
  18786. else this.dict[has || name] = value
  18787. return has
  18788. }
  18789. }
  18790. Caseless.prototype.has = function (name) {
  18791. var keys = Object.keys(this.dict)
  18792. , name = name.toLowerCase()
  18793. ;
  18794. for (var i=0;i<keys.length;i++) {
  18795. if (keys[i].toLowerCase() === name) return keys[i]
  18796. }
  18797. return false
  18798. }
  18799. Caseless.prototype.get = function (name) {
  18800. name = name.toLowerCase()
  18801. var result, _key
  18802. var headers = this.dict
  18803. Object.keys(headers).forEach(function (key) {
  18804. _key = key.toLowerCase()
  18805. if (name === _key) result = headers[key]
  18806. })
  18807. return result
  18808. }
  18809. Caseless.prototype.swap = function (name) {
  18810. var has = this.has(name)
  18811. if (has === name) return
  18812. if (!has) throw new Error('There is no header than matches "'+name+'"')
  18813. this.dict[name] = this.dict[has]
  18814. delete this.dict[has]
  18815. }
  18816. Caseless.prototype.del = function (name) {
  18817. var has = this.has(name)
  18818. return delete this.dict[has || name]
  18819. }
  18820. module.exports = function (dict) {return new Caseless(dict)}
  18821. module.exports.httpify = function (resp, headers) {
  18822. var c = new Caseless(headers)
  18823. resp.setHeader = function (key, value, clobber) {
  18824. if (typeof value === 'undefined') return
  18825. return c.set(key, value, clobber)
  18826. }
  18827. resp.hasHeader = function (key) {
  18828. return c.has(key)
  18829. }
  18830. resp.getHeader = function (key) {
  18831. return c.get(key)
  18832. }
  18833. resp.removeHeader = function (key) {
  18834. return c.del(key)
  18835. }
  18836. resp.headers = c.dict
  18837. return c
  18838. }
  18839. /***/ }),
  18840. /* 152 */
  18841. /***/ (function(module, exports, __webpack_require__) {
  18842. "use strict";
  18843. var url = __webpack_require__(14)
  18844. , equal = __webpack_require__(153)
  18845. , util = __webpack_require__(62)
  18846. , SchemaObject = __webpack_require__(366)
  18847. , traverse = __webpack_require__(577);
  18848. module.exports = resolve;
  18849. resolve.normalizeId = normalizeId;
  18850. resolve.fullPath = getFullPath;
  18851. resolve.url = resolveUrl;
  18852. resolve.ids = resolveIds;
  18853. resolve.inlineRef = inlineRef;
  18854. resolve.schema = resolveSchema;
  18855. /**
  18856. * [resolve and compile the references ($ref)]
  18857. * @this Ajv
  18858. * @param {Function} compile reference to schema compilation funciton (localCompile)
  18859. * @param {Object} root object with information about the root schema for the current schema
  18860. * @param {String} ref reference to resolve
  18861. * @return {Object|Function} schema object (if the schema can be inlined) or validation function
  18862. */
  18863. function resolve(compile, root, ref) {
  18864. /* jshint validthis: true */
  18865. var refVal = this._refs[ref];
  18866. if (typeof refVal == 'string') {
  18867. if (this._refs[refVal]) refVal = this._refs[refVal];
  18868. else return resolve.call(this, compile, root, refVal);
  18869. }
  18870. refVal = refVal || this._schemas[ref];
  18871. if (refVal instanceof SchemaObject) {
  18872. return inlineRef(refVal.schema, this._opts.inlineRefs)
  18873. ? refVal.schema
  18874. : refVal.validate || this._compile(refVal);
  18875. }
  18876. var res = resolveSchema.call(this, root, ref);
  18877. var schema, v, baseId;
  18878. if (res) {
  18879. schema = res.schema;
  18880. root = res.root;
  18881. baseId = res.baseId;
  18882. }
  18883. if (schema instanceof SchemaObject) {
  18884. v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId);
  18885. } else if (schema !== undefined) {
  18886. v = inlineRef(schema, this._opts.inlineRefs)
  18887. ? schema
  18888. : compile.call(this, schema, root, undefined, baseId);
  18889. }
  18890. return v;
  18891. }
  18892. /**
  18893. * Resolve schema, its root and baseId
  18894. * @this Ajv
  18895. * @param {Object} root root object with properties schema, refVal, refs
  18896. * @param {String} ref reference to resolve
  18897. * @return {Object} object with properties schema, root, baseId
  18898. */
  18899. function resolveSchema(root, ref) {
  18900. /* jshint validthis: true */
  18901. var p = url.parse(ref, false, true)
  18902. , refPath = _getFullPath(p)
  18903. , baseId = getFullPath(this._getId(root.schema));
  18904. if (refPath !== baseId) {
  18905. var id = normalizeId(refPath);
  18906. var refVal = this._refs[id];
  18907. if (typeof refVal == 'string') {
  18908. return resolveRecursive.call(this, root, refVal, p);
  18909. } else if (refVal instanceof SchemaObject) {
  18910. if (!refVal.validate) this._compile(refVal);
  18911. root = refVal;
  18912. } else {
  18913. refVal = this._schemas[id];
  18914. if (refVal instanceof SchemaObject) {
  18915. if (!refVal.validate) this._compile(refVal);
  18916. if (id == normalizeId(ref))
  18917. return { schema: refVal, root: root, baseId: baseId };
  18918. root = refVal;
  18919. } else {
  18920. return;
  18921. }
  18922. }
  18923. if (!root.schema) return;
  18924. baseId = getFullPath(this._getId(root.schema));
  18925. }
  18926. return getJsonPointer.call(this, p, baseId, root.schema, root);
  18927. }
  18928. /* @this Ajv */
  18929. function resolveRecursive(root, ref, parsedRef) {
  18930. /* jshint validthis: true */
  18931. var res = resolveSchema.call(this, root, ref);
  18932. if (res) {
  18933. var schema = res.schema;
  18934. var baseId = res.baseId;
  18935. root = res.root;
  18936. var id = this._getId(schema);
  18937. if (id) baseId = resolveUrl(baseId, id);
  18938. return getJsonPointer.call(this, parsedRef, baseId, schema, root);
  18939. }
  18940. }
  18941. var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']);
  18942. /* @this Ajv */
  18943. function getJsonPointer(parsedRef, baseId, schema, root) {
  18944. /* jshint validthis: true */
  18945. parsedRef.hash = parsedRef.hash || '';
  18946. if (parsedRef.hash.slice(0,2) != '#/') return;
  18947. var parts = parsedRef.hash.split('/');
  18948. for (var i = 1; i < parts.length; i++) {
  18949. var part = parts[i];
  18950. if (part) {
  18951. part = util.unescapeFragment(part);
  18952. schema = schema[part];
  18953. if (schema === undefined) break;
  18954. var id;
  18955. if (!PREVENT_SCOPE_CHANGE[part]) {
  18956. id = this._getId(schema);
  18957. if (id) baseId = resolveUrl(baseId, id);
  18958. if (schema.$ref) {
  18959. var $ref = resolveUrl(baseId, schema.$ref);
  18960. var res = resolveSchema.call(this, root, $ref);
  18961. if (res) {
  18962. schema = res.schema;
  18963. root = res.root;
  18964. baseId = res.baseId;
  18965. }
  18966. }
  18967. }
  18968. }
  18969. }
  18970. if (schema !== undefined && schema !== root.schema)
  18971. return { schema: schema, root: root, baseId: baseId };
  18972. }
  18973. var SIMPLE_INLINED = util.toHash([
  18974. 'type', 'format', 'pattern',
  18975. 'maxLength', 'minLength',
  18976. 'maxProperties', 'minProperties',
  18977. 'maxItems', 'minItems',
  18978. 'maximum', 'minimum',
  18979. 'uniqueItems', 'multipleOf',
  18980. 'required', 'enum'
  18981. ]);
  18982. function inlineRef(schema, limit) {
  18983. if (limit === false) return false;
  18984. if (limit === undefined || limit === true) return checkNoRef(schema);
  18985. else if (limit) return countKeys(schema) <= limit;
  18986. }
  18987. function checkNoRef(schema) {
  18988. var item;
  18989. if (Array.isArray(schema)) {
  18990. for (var i=0; i<schema.length; i++) {
  18991. item = schema[i];
  18992. if (typeof item == 'object' && !checkNoRef(item)) return false;
  18993. }
  18994. } else {
  18995. for (var key in schema) {
  18996. if (key == '$ref') return false;
  18997. item = schema[key];
  18998. if (typeof item == 'object' && !checkNoRef(item)) return false;
  18999. }
  19000. }
  19001. return true;
  19002. }
  19003. function countKeys(schema) {
  19004. var count = 0, item;
  19005. if (Array.isArray(schema)) {
  19006. for (var i=0; i<schema.length; i++) {
  19007. item = schema[i];
  19008. if (typeof item == 'object') count += countKeys(item);
  19009. if (count == Infinity) return Infinity;
  19010. }
  19011. } else {
  19012. for (var key in schema) {
  19013. if (key == '$ref') return Infinity;
  19014. if (SIMPLE_INLINED[key]) {
  19015. count++;
  19016. } else {
  19017. item = schema[key];
  19018. if (typeof item == 'object') count += countKeys(item) + 1;
  19019. if (count == Infinity) return Infinity;
  19020. }
  19021. }
  19022. }
  19023. return count;
  19024. }
  19025. function getFullPath(id, normalize) {
  19026. if (normalize !== false) id = normalizeId(id);
  19027. var p = url.parse(id, false, true);
  19028. return _getFullPath(p);
  19029. }
  19030. function _getFullPath(p) {
  19031. var protocolSeparator = p.protocol || p.href.slice(0,2) == '//' ? '//' : '';
  19032. return (p.protocol||'') + protocolSeparator + (p.host||'') + (p.path||'') + '#';
  19033. }
  19034. var TRAILING_SLASH_HASH = /#\/?$/;
  19035. function normalizeId(id) {
  19036. return id ? id.replace(TRAILING_SLASH_HASH, '') : '';
  19037. }
  19038. function resolveUrl(baseId, id) {
  19039. id = normalizeId(id);
  19040. return url.resolve(baseId, id);
  19041. }
  19042. /* @this Ajv */
  19043. function resolveIds(schema) {
  19044. var schemaId = normalizeId(this._getId(schema));
  19045. var baseIds = {'': schemaId};
  19046. var fullPaths = {'': getFullPath(schemaId, false)};
  19047. var localRefs = {};
  19048. var self = this;
  19049. traverse(schema, {allKeys: true}, function(sch, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
  19050. if (jsonPtr === '') return;
  19051. var id = self._getId(sch);
  19052. var baseId = baseIds[parentJsonPtr];
  19053. var fullPath = fullPaths[parentJsonPtr] + '/' + parentKeyword;
  19054. if (keyIndex !== undefined)
  19055. fullPath += '/' + (typeof keyIndex == 'number' ? keyIndex : util.escapeFragment(keyIndex));
  19056. if (typeof id == 'string') {
  19057. id = baseId = normalizeId(baseId ? url.resolve(baseId, id) : id);
  19058. var refVal = self._refs[id];
  19059. if (typeof refVal == 'string') refVal = self._refs[refVal];
  19060. if (refVal && refVal.schema) {
  19061. if (!equal(sch, refVal.schema))
  19062. throw new Error('id "' + id + '" resolves to more than one schema');
  19063. } else if (id != normalizeId(fullPath)) {
  19064. if (id[0] == '#') {
  19065. if (localRefs[id] && !equal(sch, localRefs[id]))
  19066. throw new Error('id "' + id + '" resolves to more than one schema');
  19067. localRefs[id] = sch;
  19068. } else {
  19069. self._refs[id] = fullPath;
  19070. }
  19071. }
  19072. }
  19073. baseIds[jsonPtr] = baseId;
  19074. fullPaths[jsonPtr] = fullPath;
  19075. });
  19076. return localRefs;
  19077. }
  19078. /***/ }),
  19079. /* 153 */
  19080. /***/ (function(module, exports, __webpack_require__) {
  19081. "use strict";
  19082. module.exports = function equal(a, b) {
  19083. if (a === b) return true;
  19084. var arrA = Array.isArray(a)
  19085. , arrB = Array.isArray(b)
  19086. , i;
  19087. if (arrA && arrB) {
  19088. if (a.length != b.length) return false;
  19089. for (i = 0; i < a.length; i++)
  19090. if (!equal(a[i], b[i])) return false;
  19091. return true;
  19092. }
  19093. if (arrA != arrB) return false;
  19094. if (a && b && typeof a === 'object' && typeof b === 'object') {
  19095. var keys = Object.keys(a);
  19096. if (keys.length !== Object.keys(b).length) return false;
  19097. var dateA = a instanceof Date
  19098. , dateB = b instanceof Date;
  19099. if (dateA && dateB) return a.getTime() == b.getTime();
  19100. if (dateA != dateB) return false;
  19101. var regexpA = a instanceof RegExp
  19102. , regexpB = b instanceof RegExp;
  19103. if (regexpA && regexpB) return a.toString() == b.toString();
  19104. if (regexpA != regexpB) return false;
  19105. for (i = 0; i < keys.length; i++)
  19106. if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
  19107. for (i = 0; i < keys.length; i++)
  19108. if(!equal(a[keys[i]], b[keys[i]])) return false;
  19109. return true;
  19110. }
  19111. return false;
  19112. };
  19113. /***/ }),
  19114. /* 154 */
  19115. /***/ (function(module, exports, __webpack_require__) {
  19116. "use strict";
  19117. var resolve = __webpack_require__(152);
  19118. module.exports = {
  19119. Validation: errorSubclass(ValidationError),
  19120. MissingRef: errorSubclass(MissingRefError)
  19121. };
  19122. function ValidationError(errors) {
  19123. this.message = 'validation failed';
  19124. this.errors = errors;
  19125. this.ajv = this.validation = true;
  19126. }
  19127. MissingRefError.message = function (baseId, ref) {
  19128. return 'can\'t resolve reference ' + ref + ' from id ' + baseId;
  19129. };
  19130. function MissingRefError(baseId, ref, message) {
  19131. this.message = message || MissingRefError.message(baseId, ref);
  19132. this.missingRef = resolve.url(baseId, ref);
  19133. this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef));
  19134. }
  19135. function errorSubclass(Subclass) {
  19136. Subclass.prototype = Object.create(Error.prototype);
  19137. Subclass.prototype.constructor = Subclass;
  19138. return Subclass;
  19139. }
  19140. /***/ }),
  19141. /* 155 */
  19142. /***/ (function(module, exports, __webpack_require__) {
  19143. var v1 = __webpack_require__(627);
  19144. var v4 = __webpack_require__(628);
  19145. var uuid = v4;
  19146. uuid.v1 = v1;
  19147. uuid.v4 = v4;
  19148. module.exports = uuid;
  19149. /***/ }),
  19150. /* 156 */
  19151. /***/ (function(module, exports) {
  19152. module.exports = require("events");
  19153. /***/ }),
  19154. /* 157 */
  19155. /***/ (function(module, exports) {
  19156. module.exports = {"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\"","QUOT":"\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}
  19157. /***/ }),
  19158. /* 158 */
  19159. /***/ (function(module, exports) {
  19160. module.exports = {"amp":"&","apos":"'","gt":">","lt":"<","quot":"\""}
  19161. /***/ }),
  19162. /* 159 */
  19163. /***/ (function(module, exports, __webpack_require__) {
  19164. /*
  19165. Module dependencies
  19166. */
  19167. var ElementType = __webpack_require__(652);
  19168. var entities = __webpack_require__(653);
  19169. /*
  19170. Boolean Attributes
  19171. */
  19172. var booleanAttributes = {
  19173. __proto__: null,
  19174. allowfullscreen: true,
  19175. async: true,
  19176. autofocus: true,
  19177. autoplay: true,
  19178. checked: true,
  19179. controls: true,
  19180. default: true,
  19181. defer: true,
  19182. disabled: true,
  19183. hidden: true,
  19184. ismap: true,
  19185. loop: true,
  19186. multiple: true,
  19187. muted: true,
  19188. open: true,
  19189. readonly: true,
  19190. required: true,
  19191. reversed: true,
  19192. scoped: true,
  19193. seamless: true,
  19194. selected: true,
  19195. typemustmatch: true
  19196. };
  19197. var unencodedElements = {
  19198. __proto__: null,
  19199. style: true,
  19200. script: true,
  19201. xmp: true,
  19202. iframe: true,
  19203. noembed: true,
  19204. noframes: true,
  19205. plaintext: true,
  19206. noscript: true
  19207. };
  19208. /*
  19209. Format attributes
  19210. */
  19211. function formatAttrs(attributes, opts) {
  19212. if (!attributes) return;
  19213. var output = '',
  19214. value;
  19215. // Loop through the attributes
  19216. for (var key in attributes) {
  19217. value = attributes[key];
  19218. if (output) {
  19219. output += ' ';
  19220. }
  19221. if (!value && booleanAttributes[key]) {
  19222. output += key;
  19223. } else {
  19224. output += key + '="' + (opts.decodeEntities ? entities.encodeXML(value) : value) + '"';
  19225. }
  19226. }
  19227. return output;
  19228. }
  19229. /*
  19230. Self-enclosing tags (stolen from node-htmlparser)
  19231. */
  19232. var singleTag = {
  19233. __proto__: null,
  19234. area: true,
  19235. base: true,
  19236. basefont: true,
  19237. br: true,
  19238. col: true,
  19239. command: true,
  19240. embed: true,
  19241. frame: true,
  19242. hr: true,
  19243. img: true,
  19244. input: true,
  19245. isindex: true,
  19246. keygen: true,
  19247. link: true,
  19248. meta: true,
  19249. param: true,
  19250. source: true,
  19251. track: true,
  19252. wbr: true,
  19253. };
  19254. var render = module.exports = function(dom, opts) {
  19255. if (!Array.isArray(dom) && !dom.cheerio) dom = [dom];
  19256. opts = opts || {};
  19257. var output = '';
  19258. for(var i = 0; i < dom.length; i++){
  19259. var elem = dom[i];
  19260. if (elem.type === 'root')
  19261. output += render(elem.children, opts);
  19262. else if (ElementType.isTag(elem))
  19263. output += renderTag(elem, opts);
  19264. else if (elem.type === ElementType.Directive)
  19265. output += renderDirective(elem);
  19266. else if (elem.type === ElementType.Comment)
  19267. output += renderComment(elem);
  19268. else if (elem.type === ElementType.CDATA)
  19269. output += renderCdata(elem);
  19270. else
  19271. output += renderText(elem, opts);
  19272. }
  19273. return output;
  19274. };
  19275. function renderTag(elem, opts) {
  19276. // Handle SVG
  19277. if (elem.name === "svg") opts = {decodeEntities: opts.decodeEntities, xmlMode: true};
  19278. var tag = '<' + elem.name,
  19279. attribs = formatAttrs(elem.attribs, opts);
  19280. if (attribs) {
  19281. tag += ' ' + attribs;
  19282. }
  19283. if (
  19284. opts.xmlMode
  19285. && (!elem.children || elem.children.length === 0)
  19286. ) {
  19287. tag += '/>';
  19288. } else {
  19289. tag += '>';
  19290. if (elem.children) {
  19291. tag += render(elem.children, opts);
  19292. }
  19293. if (!singleTag[elem.name] || opts.xmlMode) {
  19294. tag += '</' + elem.name + '>';
  19295. }
  19296. }
  19297. return tag;
  19298. }
  19299. function renderDirective(elem) {
  19300. return '<' + elem.data + '>';
  19301. }
  19302. function renderText(elem, opts) {
  19303. var data = elem.data || '';
  19304. // if entities weren't decoded, no need to encode them back
  19305. if (opts.decodeEntities && !(elem.parent && elem.parent.name in unencodedElements)) {
  19306. data = entities.encodeXML(data);
  19307. }
  19308. return data;
  19309. }
  19310. function renderCdata(elem) {
  19311. return '<![CDATA[' + elem.children[0].data + ']]>';
  19312. }
  19313. function renderComment(elem) {
  19314. return '<!--' + elem.data + '-->';
  19315. }
  19316. /***/ }),
  19317. /* 160 */
  19318. /***/ (function(module, exports, __webpack_require__) {
  19319. "use strict";
  19320. var DOCUMENT_MODE = __webpack_require__(29).DOCUMENT_MODE;
  19321. //Node construction
  19322. exports.createDocument = function () {
  19323. return {
  19324. nodeName: '#document',
  19325. mode: DOCUMENT_MODE.NO_QUIRKS,
  19326. childNodes: []
  19327. };
  19328. };
  19329. exports.createDocumentFragment = function () {
  19330. return {
  19331. nodeName: '#document-fragment',
  19332. childNodes: []
  19333. };
  19334. };
  19335. exports.createElement = function (tagName, namespaceURI, attrs) {
  19336. return {
  19337. nodeName: tagName,
  19338. tagName: tagName,
  19339. attrs: attrs,
  19340. namespaceURI: namespaceURI,
  19341. childNodes: [],
  19342. parentNode: null
  19343. };
  19344. };
  19345. exports.createCommentNode = function (data) {
  19346. return {
  19347. nodeName: '#comment',
  19348. data: data,
  19349. parentNode: null
  19350. };
  19351. };
  19352. var createTextNode = function (value) {
  19353. return {
  19354. nodeName: '#text',
  19355. value: value,
  19356. parentNode: null
  19357. };
  19358. };
  19359. //Tree mutation
  19360. var appendChild = exports.appendChild = function (parentNode, newNode) {
  19361. parentNode.childNodes.push(newNode);
  19362. newNode.parentNode = parentNode;
  19363. };
  19364. var insertBefore = exports.insertBefore = function (parentNode, newNode, referenceNode) {
  19365. var insertionIdx = parentNode.childNodes.indexOf(referenceNode);
  19366. parentNode.childNodes.splice(insertionIdx, 0, newNode);
  19367. newNode.parentNode = parentNode;
  19368. };
  19369. exports.setTemplateContent = function (templateElement, contentElement) {
  19370. templateElement.content = contentElement;
  19371. };
  19372. exports.getTemplateContent = function (templateElement) {
  19373. return templateElement.content;
  19374. };
  19375. exports.setDocumentType = function (document, name, publicId, systemId) {
  19376. var doctypeNode = null;
  19377. for (var i = 0; i < document.childNodes.length; i++) {
  19378. if (document.childNodes[i].nodeName === '#documentType') {
  19379. doctypeNode = document.childNodes[i];
  19380. break;
  19381. }
  19382. }
  19383. if (doctypeNode) {
  19384. doctypeNode.name = name;
  19385. doctypeNode.publicId = publicId;
  19386. doctypeNode.systemId = systemId;
  19387. }
  19388. else {
  19389. appendChild(document, {
  19390. nodeName: '#documentType',
  19391. name: name,
  19392. publicId: publicId,
  19393. systemId: systemId
  19394. });
  19395. }
  19396. };
  19397. exports.setDocumentMode = function (document, mode) {
  19398. document.mode = mode;
  19399. };
  19400. exports.getDocumentMode = function (document) {
  19401. return document.mode;
  19402. };
  19403. exports.detachNode = function (node) {
  19404. if (node.parentNode) {
  19405. var idx = node.parentNode.childNodes.indexOf(node);
  19406. node.parentNode.childNodes.splice(idx, 1);
  19407. node.parentNode = null;
  19408. }
  19409. };
  19410. exports.insertText = function (parentNode, text) {
  19411. if (parentNode.childNodes.length) {
  19412. var prevNode = parentNode.childNodes[parentNode.childNodes.length - 1];
  19413. if (prevNode.nodeName === '#text') {
  19414. prevNode.value += text;
  19415. return;
  19416. }
  19417. }
  19418. appendChild(parentNode, createTextNode(text));
  19419. };
  19420. exports.insertTextBefore = function (parentNode, text, referenceNode) {
  19421. var prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1];
  19422. if (prevNode && prevNode.nodeName === '#text')
  19423. prevNode.value += text;
  19424. else
  19425. insertBefore(parentNode, createTextNode(text), referenceNode);
  19426. };
  19427. exports.adoptAttributes = function (recipient, attrs) {
  19428. var recipientAttrsMap = [];
  19429. for (var i = 0; i < recipient.attrs.length; i++)
  19430. recipientAttrsMap.push(recipient.attrs[i].name);
  19431. for (var j = 0; j < attrs.length; j++) {
  19432. if (recipientAttrsMap.indexOf(attrs[j].name) === -1)
  19433. recipient.attrs.push(attrs[j]);
  19434. }
  19435. };
  19436. //Tree traversing
  19437. exports.getFirstChild = function (node) {
  19438. return node.childNodes[0];
  19439. };
  19440. exports.getChildNodes = function (node) {
  19441. return node.childNodes;
  19442. };
  19443. exports.getParentNode = function (node) {
  19444. return node.parentNode;
  19445. };
  19446. exports.getAttrList = function (element) {
  19447. return element.attrs;
  19448. };
  19449. //Node data
  19450. exports.getTagName = function (element) {
  19451. return element.tagName;
  19452. };
  19453. exports.getNamespaceURI = function (element) {
  19454. return element.namespaceURI;
  19455. };
  19456. exports.getTextNodeContent = function (textNode) {
  19457. return textNode.value;
  19458. };
  19459. exports.getCommentNodeContent = function (commentNode) {
  19460. return commentNode.data;
  19461. };
  19462. exports.getDocumentTypeNodeName = function (doctypeNode) {
  19463. return doctypeNode.name;
  19464. };
  19465. exports.getDocumentTypeNodePublicId = function (doctypeNode) {
  19466. return doctypeNode.publicId;
  19467. };
  19468. exports.getDocumentTypeNodeSystemId = function (doctypeNode) {
  19469. return doctypeNode.systemId;
  19470. };
  19471. //Node types
  19472. exports.isTextNode = function (node) {
  19473. return node.nodeName === '#text';
  19474. };
  19475. exports.isCommentNode = function (node) {
  19476. return node.nodeName === '#comment';
  19477. };
  19478. exports.isDocumentTypeNode = function (node) {
  19479. return node.nodeName === '#documentType';
  19480. };
  19481. exports.isElementNode = function (node) {
  19482. return !!node.tagName;
  19483. };
  19484. /***/ }),
  19485. /* 161 */
  19486. /***/ (function(module, exports, __webpack_require__) {
  19487. "use strict";
  19488. module.exports = function mergeOptions(defaults, options) {
  19489. options = options || Object.create(null);
  19490. return [defaults, options].reduce(function (merged, optObj) {
  19491. Object.keys(optObj).forEach(function (key) {
  19492. merged[key] = optObj[key];
  19493. });
  19494. return merged;
  19495. }, Object.create(null));
  19496. };
  19497. /***/ }),
  19498. /* 162 */
  19499. /***/ (function(module, exports, __webpack_require__) {
  19500. "use strict";
  19501. var DOCUMENT_MODE = __webpack_require__(29).DOCUMENT_MODE;
  19502. //Const
  19503. var VALID_DOCTYPE_NAME = 'html',
  19504. QUIRKS_MODE_SYSTEM_ID = 'http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd',
  19505. QUIRKS_MODE_PUBLIC_ID_PREFIXES = [
  19506. '+//silmaril//dtd html pro v0r11 19970101//en',
  19507. '-//advasoft ltd//dtd html 3.0 aswedit + extensions//en',
  19508. '-//as//dtd html 3.0 aswedit + extensions//en',
  19509. '-//ietf//dtd html 2.0 level 1//en',
  19510. '-//ietf//dtd html 2.0 level 2//en',
  19511. '-//ietf//dtd html 2.0 strict level 1//en',
  19512. '-//ietf//dtd html 2.0 strict level 2//en',
  19513. '-//ietf//dtd html 2.0 strict//en',
  19514. '-//ietf//dtd html 2.0//en',
  19515. '-//ietf//dtd html 2.1e//en',
  19516. '-//ietf//dtd html 3.0//en',
  19517. '-//ietf//dtd html 3.0//en//',
  19518. '-//ietf//dtd html 3.2 final//en',
  19519. '-//ietf//dtd html 3.2//en',
  19520. '-//ietf//dtd html 3//en',
  19521. '-//ietf//dtd html level 0//en',
  19522. '-//ietf//dtd html level 0//en//2.0',
  19523. '-//ietf//dtd html level 1//en',
  19524. '-//ietf//dtd html level 1//en//2.0',
  19525. '-//ietf//dtd html level 2//en',
  19526. '-//ietf//dtd html level 2//en//2.0',
  19527. '-//ietf//dtd html level 3//en',
  19528. '-//ietf//dtd html level 3//en//3.0',
  19529. '-//ietf//dtd html strict level 0//en',
  19530. '-//ietf//dtd html strict level 0//en//2.0',
  19531. '-//ietf//dtd html strict level 1//en',
  19532. '-//ietf//dtd html strict level 1//en//2.0',
  19533. '-//ietf//dtd html strict level 2//en',
  19534. '-//ietf//dtd html strict level 2//en//2.0',
  19535. '-//ietf//dtd html strict level 3//en',
  19536. '-//ietf//dtd html strict level 3//en//3.0',
  19537. '-//ietf//dtd html strict//en',
  19538. '-//ietf//dtd html strict//en//2.0',
  19539. '-//ietf//dtd html strict//en//3.0',
  19540. '-//ietf//dtd html//en',
  19541. '-//ietf//dtd html//en//2.0',
  19542. '-//ietf//dtd html//en//3.0',
  19543. '-//metrius//dtd metrius presentational//en',
  19544. '-//microsoft//dtd internet explorer 2.0 html strict//en',
  19545. '-//microsoft//dtd internet explorer 2.0 html//en',
  19546. '-//microsoft//dtd internet explorer 2.0 tables//en',
  19547. '-//microsoft//dtd internet explorer 3.0 html strict//en',
  19548. '-//microsoft//dtd internet explorer 3.0 html//en',
  19549. '-//microsoft//dtd internet explorer 3.0 tables//en',
  19550. '-//netscape comm. corp.//dtd html//en',
  19551. '-//netscape comm. corp.//dtd strict html//en',
  19552. '-//o\'reilly and associates//dtd html 2.0//en',
  19553. '-//o\'reilly and associates//dtd html extended 1.0//en',
  19554. '-//spyglass//dtd html 2.0 extended//en',
  19555. '-//sq//dtd html 2.0 hotmetal + extensions//en',
  19556. '-//sun microsystems corp.//dtd hotjava html//en',
  19557. '-//sun microsystems corp.//dtd hotjava strict html//en',
  19558. '-//w3c//dtd html 3 1995-03-24//en',
  19559. '-//w3c//dtd html 3.2 draft//en',
  19560. '-//w3c//dtd html 3.2 final//en',
  19561. '-//w3c//dtd html 3.2//en',
  19562. '-//w3c//dtd html 3.2s draft//en',
  19563. '-//w3c//dtd html 4.0 frameset//en',
  19564. '-//w3c//dtd html 4.0 transitional//en',
  19565. '-//w3c//dtd html experimental 19960712//en',
  19566. '-//w3c//dtd html experimental 970421//en',
  19567. '-//w3c//dtd w3 html//en',
  19568. '-//w3o//dtd w3 html 3.0//en',
  19569. '-//w3o//dtd w3 html 3.0//en//',
  19570. '-//webtechs//dtd mozilla html 2.0//en',
  19571. '-//webtechs//dtd mozilla html//en'
  19572. ],
  19573. QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = QUIRKS_MODE_PUBLIC_ID_PREFIXES.concat([
  19574. '-//w3c//dtd html 4.01 frameset//',
  19575. '-//w3c//dtd html 4.01 transitional//'
  19576. ]),
  19577. QUIRKS_MODE_PUBLIC_IDS = [
  19578. '-//w3o//dtd w3 html strict 3.0//en//',
  19579. '-/w3c/dtd html 4.0 transitional/en',
  19580. 'html'
  19581. ],
  19582. LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = [
  19583. '-//W3C//DTD XHTML 1.0 Frameset//',
  19584. '-//W3C//DTD XHTML 1.0 Transitional//'
  19585. ],
  19586. LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = LIMITED_QUIRKS_PUBLIC_ID_PREFIXES.concat([
  19587. '-//W3C//DTD HTML 4.01 Frameset//',
  19588. '-//W3C//DTD HTML 4.01 Transitional//'
  19589. ]);
  19590. //Utils
  19591. function enquoteDoctypeId(id) {
  19592. var quote = id.indexOf('"') !== -1 ? '\'' : '"';
  19593. return quote + id + quote;
  19594. }
  19595. function hasPrefix(publicId, prefixes) {
  19596. for (var i = 0; i < prefixes.length; i++) {
  19597. if (publicId.indexOf(prefixes[i]) === 0)
  19598. return true;
  19599. }
  19600. return false;
  19601. }
  19602. //API
  19603. exports.getDocumentMode = function (name, publicId, systemId) {
  19604. if (name !== VALID_DOCTYPE_NAME)
  19605. return DOCUMENT_MODE.QUIRKS;
  19606. if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID)
  19607. return DOCUMENT_MODE.QUIRKS;
  19608. if (publicId !== null) {
  19609. publicId = publicId.toLowerCase();
  19610. if (QUIRKS_MODE_PUBLIC_IDS.indexOf(publicId) > -1)
  19611. return DOCUMENT_MODE.QUIRKS;
  19612. var prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES;
  19613. if (hasPrefix(publicId, prefixes))
  19614. return DOCUMENT_MODE.QUIRKS;
  19615. prefixes = systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES;
  19616. if (hasPrefix(publicId, prefixes))
  19617. return DOCUMENT_MODE.LIMITED_QUIRKS;
  19618. }
  19619. return DOCUMENT_MODE.NO_QUIRKS;
  19620. };
  19621. exports.serializeContent = function (name, publicId, systemId) {
  19622. var str = '!DOCTYPE ';
  19623. if (name)
  19624. str += name;
  19625. if (publicId !== null)
  19626. str += ' PUBLIC ' + enquoteDoctypeId(publicId);
  19627. else if (systemId !== null)
  19628. str += ' SYSTEM';
  19629. if (systemId !== null)
  19630. str += ' ' + enquoteDoctypeId(systemId);
  19631. return str;
  19632. };
  19633. /***/ }),
  19634. /* 163 */
  19635. /***/ (function(module, exports, __webpack_require__) {
  19636. var baseAssignValue = __webpack_require__(164),
  19637. eq = __webpack_require__(67);
  19638. /** Used for built-in method references. */
  19639. var objectProto = Object.prototype;
  19640. /** Used to check objects for own properties. */
  19641. var hasOwnProperty = objectProto.hasOwnProperty;
  19642. /**
  19643. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  19644. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  19645. * for equality comparisons.
  19646. *
  19647. * @private
  19648. * @param {Object} object The object to modify.
  19649. * @param {string} key The key of the property to assign.
  19650. * @param {*} value The value to assign.
  19651. */
  19652. function assignValue(object, key, value) {
  19653. var objValue = object[key];
  19654. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
  19655. (value === undefined && !(key in object))) {
  19656. baseAssignValue(object, key, value);
  19657. }
  19658. }
  19659. module.exports = assignValue;
  19660. /***/ }),
  19661. /* 164 */
  19662. /***/ (function(module, exports, __webpack_require__) {
  19663. var defineProperty = __webpack_require__(395);
  19664. /**
  19665. * The base implementation of `assignValue` and `assignMergeValue` without
  19666. * value checks.
  19667. *
  19668. * @private
  19669. * @param {Object} object The object to modify.
  19670. * @param {string} key The key of the property to assign.
  19671. * @param {*} value The value to assign.
  19672. */
  19673. function baseAssignValue(object, key, value) {
  19674. if (key == '__proto__' && defineProperty) {
  19675. defineProperty(object, key, {
  19676. 'configurable': true,
  19677. 'enumerable': true,
  19678. 'value': value,
  19679. 'writable': true
  19680. });
  19681. } else {
  19682. object[key] = value;
  19683. }
  19684. }
  19685. module.exports = baseAssignValue;
  19686. /***/ }),
  19687. /* 165 */
  19688. /***/ (function(module, exports, __webpack_require__) {
  19689. var baseSetToString = __webpack_require__(679),
  19690. shortOut = __webpack_require__(398);
  19691. /**
  19692. * Sets the `toString` method of `func` to return `string`.
  19693. *
  19694. * @private
  19695. * @param {Function} func The function to modify.
  19696. * @param {Function} string The `toString` result.
  19697. * @returns {Function} Returns `func`.
  19698. */
  19699. var setToString = shortOut(baseSetToString);
  19700. module.exports = setToString;
  19701. /***/ }),
  19702. /* 166 */
  19703. /***/ (function(module, exports) {
  19704. /** Used as references for various `Number` constants. */
  19705. var MAX_SAFE_INTEGER = 9007199254740991;
  19706. /**
  19707. * Checks if `value` is a valid array-like length.
  19708. *
  19709. * **Note:** This method is loosely based on
  19710. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  19711. *
  19712. * @static
  19713. * @memberOf _
  19714. * @since 4.0.0
  19715. * @category Lang
  19716. * @param {*} value The value to check.
  19717. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  19718. * @example
  19719. *
  19720. * _.isLength(3);
  19721. * // => true
  19722. *
  19723. * _.isLength(Number.MIN_VALUE);
  19724. * // => false
  19725. *
  19726. * _.isLength(Infinity);
  19727. * // => false
  19728. *
  19729. * _.isLength('3');
  19730. * // => false
  19731. */
  19732. function isLength(value) {
  19733. return typeof value == 'number' &&
  19734. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  19735. }
  19736. module.exports = isLength;
  19737. /***/ }),
  19738. /* 167 */
  19739. /***/ (function(module, exports, __webpack_require__) {
  19740. /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(19),
  19741. stubFalse = __webpack_require__(683);
  19742. /** Detect free variable `exports`. */
  19743. var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
  19744. /** Detect free variable `module`. */
  19745. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  19746. /** Detect the popular CommonJS extension `module.exports`. */
  19747. var moduleExports = freeModule && freeModule.exports === freeExports;
  19748. /** Built-in value references. */
  19749. var Buffer = moduleExports ? root.Buffer : undefined;
  19750. /* Built-in method references for those with the same name as other `lodash` methods. */
  19751. var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
  19752. /**
  19753. * Checks if `value` is a buffer.
  19754. *
  19755. * @static
  19756. * @memberOf _
  19757. * @since 4.3.0
  19758. * @category Lang
  19759. * @param {*} value The value to check.
  19760. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  19761. * @example
  19762. *
  19763. * _.isBuffer(new Buffer(2));
  19764. * // => true
  19765. *
  19766. * _.isBuffer(new Uint8Array(2));
  19767. * // => false
  19768. */
  19769. var isBuffer = nativeIsBuffer || stubFalse;
  19770. module.exports = isBuffer;
  19771. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(58)(module)))
  19772. /***/ }),
  19773. /* 168 */
  19774. /***/ (function(module, exports, __webpack_require__) {
  19775. var baseIsTypedArray = __webpack_require__(684),
  19776. baseUnary = __webpack_require__(400),
  19777. nodeUtil = __webpack_require__(685);
  19778. /* Node.js helper references. */
  19779. var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  19780. /**
  19781. * Checks if `value` is classified as a typed array.
  19782. *
  19783. * @static
  19784. * @memberOf _
  19785. * @since 3.0.0
  19786. * @category Lang
  19787. * @param {*} value The value to check.
  19788. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  19789. * @example
  19790. *
  19791. * _.isTypedArray(new Uint8Array);
  19792. * // => true
  19793. *
  19794. * _.isTypedArray([]);
  19795. * // => false
  19796. */
  19797. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  19798. module.exports = isTypedArray;
  19799. /***/ }),
  19800. /* 169 */
  19801. /***/ (function(module, exports, __webpack_require__) {
  19802. var baseRest = __webpack_require__(120),
  19803. createWrap = __webpack_require__(690),
  19804. getHolder = __webpack_require__(173),
  19805. replaceHolders = __webpack_require__(128);
  19806. /** Used to compose bitmasks for function metadata. */
  19807. var WRAP_BIND_FLAG = 1,
  19808. WRAP_PARTIAL_FLAG = 32;
  19809. /**
  19810. * Creates a function that invokes `func` with the `this` binding of `thisArg`
  19811. * and `partials` prepended to the arguments it receives.
  19812. *
  19813. * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
  19814. * may be used as a placeholder for partially applied arguments.
  19815. *
  19816. * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
  19817. * property of bound functions.
  19818. *
  19819. * @static
  19820. * @memberOf _
  19821. * @since 0.1.0
  19822. * @category Function
  19823. * @param {Function} func The function to bind.
  19824. * @param {*} thisArg The `this` binding of `func`.
  19825. * @param {...*} [partials] The arguments to be partially applied.
  19826. * @returns {Function} Returns the new bound function.
  19827. * @example
  19828. *
  19829. * function greet(greeting, punctuation) {
  19830. * return greeting + ' ' + this.user + punctuation;
  19831. * }
  19832. *
  19833. * var object = { 'user': 'fred' };
  19834. *
  19835. * var bound = _.bind(greet, object, 'hi');
  19836. * bound('!');
  19837. * // => 'hi fred!'
  19838. *
  19839. * // Bound with placeholders.
  19840. * var bound = _.bind(greet, object, _, '!');
  19841. * bound('hi');
  19842. * // => 'hi fred!'
  19843. */
  19844. var bind = baseRest(function(func, thisArg, partials) {
  19845. var bitmask = WRAP_BIND_FLAG;
  19846. if (partials.length) {
  19847. var holders = replaceHolders(partials, getHolder(bind));
  19848. bitmask |= WRAP_PARTIAL_FLAG;
  19849. }
  19850. return createWrap(func, bitmask, thisArg, partials, holders);
  19851. });
  19852. // Assign default placeholders.
  19853. bind.placeholder = {};
  19854. module.exports = bind;
  19855. /***/ }),
  19856. /* 170 */
  19857. /***/ (function(module, exports, __webpack_require__) {
  19858. var baseCreate = __webpack_require__(127),
  19859. baseLodash = __webpack_require__(171);
  19860. /** Used as references for the maximum length and index of an array. */
  19861. var MAX_ARRAY_LENGTH = 4294967295;
  19862. /**
  19863. * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
  19864. *
  19865. * @private
  19866. * @constructor
  19867. * @param {*} value The value to wrap.
  19868. */
  19869. function LazyWrapper(value) {
  19870. this.__wrapped__ = value;
  19871. this.__actions__ = [];
  19872. this.__dir__ = 1;
  19873. this.__filtered__ = false;
  19874. this.__iteratees__ = [];
  19875. this.__takeCount__ = MAX_ARRAY_LENGTH;
  19876. this.__views__ = [];
  19877. }
  19878. // Ensure `LazyWrapper` is an instance of `baseLodash`.
  19879. LazyWrapper.prototype = baseCreate(baseLodash.prototype);
  19880. LazyWrapper.prototype.constructor = LazyWrapper;
  19881. module.exports = LazyWrapper;
  19882. /***/ }),
  19883. /* 171 */
  19884. /***/ (function(module, exports) {
  19885. /**
  19886. * The function whose prototype chain sequence wrappers inherit from.
  19887. *
  19888. * @private
  19889. */
  19890. function baseLodash() {
  19891. // No operation performed.
  19892. }
  19893. module.exports = baseLodash;
  19894. /***/ }),
  19895. /* 172 */
  19896. /***/ (function(module, exports) {
  19897. /**
  19898. * Copies the values of `source` to `array`.
  19899. *
  19900. * @private
  19901. * @param {Array} source The array to copy values from.
  19902. * @param {Array} [array=[]] The array to copy values to.
  19903. * @returns {Array} Returns `array`.
  19904. */
  19905. function copyArray(source, array) {
  19906. var index = -1,
  19907. length = source.length;
  19908. array || (array = Array(length));
  19909. while (++index < length) {
  19910. array[index] = source[index];
  19911. }
  19912. return array;
  19913. }
  19914. module.exports = copyArray;
  19915. /***/ }),
  19916. /* 173 */
  19917. /***/ (function(module, exports) {
  19918. /**
  19919. * Gets the argument placeholder value for `func`.
  19920. *
  19921. * @private
  19922. * @param {Function} func The function to inspect.
  19923. * @returns {*} Returns the placeholder value.
  19924. */
  19925. function getHolder(func) {
  19926. var object = func;
  19927. return object.placeholder;
  19928. }
  19929. module.exports = getHolder;
  19930. /***/ }),
  19931. /* 174 */
  19932. /***/ (function(module, exports, __webpack_require__) {
  19933. /**
  19934. * Module dependencies
  19935. */
  19936. var serialize = __webpack_require__(159),
  19937. defaultOptions = __webpack_require__(117).default,
  19938. flattenOptions = __webpack_require__(117).flatten,
  19939. select = __webpack_require__(419),
  19940. parse = __webpack_require__(114),
  19941. _ = {
  19942. merge: __webpack_require__(726),
  19943. defaults: __webpack_require__(418)
  19944. };
  19945. /**
  19946. * $.load(str)
  19947. */
  19948. exports.load = function(content, options, isDocument) {
  19949. var Cheerio = __webpack_require__(375);
  19950. options = _.defaults(flattenOptions(options || {}), defaultOptions);
  19951. if (isDocument === void 0)
  19952. isDocument = true;
  19953. var root = parse(content, options, isDocument);
  19954. var initialize = function(selector, context, r, opts) {
  19955. if (!(this instanceof initialize)) {
  19956. return new initialize(selector, context, r, opts);
  19957. }
  19958. opts = _.defaults(opts || {}, options);
  19959. return Cheerio.call(this, selector, context, r || root, opts);
  19960. };
  19961. // Ensure that selections created by the "loaded" `initialize` function are
  19962. // true Cheerio instances.
  19963. initialize.prototype = Object.create(Cheerio.prototype);
  19964. initialize.prototype.constructor = initialize;
  19965. // Mimic jQuery's prototype alias for plugin authors.
  19966. initialize.fn = initialize.prototype;
  19967. // Keep a reference to the top-level scope so we can chain methods that implicitly
  19968. // resolve selectors; e.g. $("<span>").(".bar"), which otherwise loses ._root
  19969. initialize.prototype._originalRoot = root;
  19970. // Add in the static methods
  19971. _.merge(initialize, exports);
  19972. // Add in the root
  19973. initialize._root = root;
  19974. // store options
  19975. initialize._options = options;
  19976. return initialize;
  19977. };
  19978. /*
  19979. * Helper function
  19980. */
  19981. function render(that, dom, options) {
  19982. if (!dom) {
  19983. if (that._root && that._root.children) {
  19984. dom = that._root.children;
  19985. } else {
  19986. return '';
  19987. }
  19988. } else if (typeof dom === 'string') {
  19989. dom = select(dom, that._root, options);
  19990. }
  19991. return serialize(dom, options);
  19992. }
  19993. /**
  19994. * $.html([selector | dom], [options])
  19995. */
  19996. exports.html = function(dom, options) {
  19997. // be flexible about parameters, sometimes we call html(),
  19998. // with options as only parameter
  19999. // check dom argument for dom element specific properties
  20000. // assume there is no 'length' or 'type' properties in the options object
  20001. if (Object.prototype.toString.call(dom) === '[object Object]' && !options && !('length' in dom) && !('type' in dom))
  20002. {
  20003. options = dom;
  20004. dom = undefined;
  20005. }
  20006. // sometimes $.html() used without preloading html
  20007. // so fallback non existing options to the default ones
  20008. options = _.defaults(flattenOptions(options || {}), this._options, defaultOptions);
  20009. return render(this, dom, options);
  20010. };
  20011. /**
  20012. * $.xml([selector | dom])
  20013. */
  20014. exports.xml = function(dom) {
  20015. var options = _.defaults({xml: true}, this._options);
  20016. return render(this, dom, options);
  20017. };
  20018. /**
  20019. * $.text(dom)
  20020. */
  20021. exports.text = function(elems) {
  20022. if (!elems) {
  20023. elems = this.root();
  20024. }
  20025. var ret = '',
  20026. len = elems.length,
  20027. elem;
  20028. for (var i = 0; i < len; i++) {
  20029. elem = elems[i];
  20030. if (elem.type === 'text') ret += elem.data;
  20031. else if (elem.children && elem.type !== 'comment' && elem.tagName !== 'script' && elem.tagName !== 'style') {
  20032. ret += exports.text(elem.children);
  20033. }
  20034. }
  20035. return ret;
  20036. };
  20037. /**
  20038. * $.parseHTML(data [, context ] [, keepScripts ])
  20039. * Parses a string into an array of DOM nodes. The `context` argument has no
  20040. * meaning for Cheerio, but it is maintained for API compatibility with jQuery.
  20041. */
  20042. exports.parseHTML = function(data, context, keepScripts) {
  20043. var parsed;
  20044. if (!data || typeof data !== 'string') {
  20045. return null;
  20046. }
  20047. if (typeof context === 'boolean') {
  20048. keepScripts = context;
  20049. }
  20050. parsed = this.load(data, defaultOptions, false);
  20051. if (!keepScripts) {
  20052. parsed('script').remove();
  20053. }
  20054. // The `children` array is used by Cheerio internally to group elements that
  20055. // share the same parents. When nodes created through `parseHTML` are
  20056. // inserted into previously-existing DOM structures, they will be removed
  20057. // from the `children` array. The results of `parseHTML` should remain
  20058. // constant across these operations, so a shallow copy should be returned.
  20059. return parsed.root()[0].children.slice();
  20060. };
  20061. /**
  20062. * $.root()
  20063. */
  20064. exports.root = function() {
  20065. return this(this._root);
  20066. };
  20067. /**
  20068. * $.contains()
  20069. */
  20070. exports.contains = function(container, contained) {
  20071. // According to the jQuery API, an element does not "contain" itself
  20072. if (contained === container) {
  20073. return false;
  20074. }
  20075. // Step up the descendants, stopping when the root element is reached
  20076. // (signaled by `.parent` returning a reference to the same object)
  20077. while (contained && contained !== contained.parent) {
  20078. contained = contained.parent;
  20079. if (contained === container) {
  20080. return true;
  20081. }
  20082. }
  20083. return false;
  20084. };
  20085. /**
  20086. * $.merge()
  20087. */
  20088. exports.merge = function(arr1, arr2) {
  20089. if(!(isArrayLike(arr1) && isArrayLike(arr2))){
  20090. return;
  20091. }
  20092. var newLength = arr1.length + arr2.length;
  20093. var i = 0;
  20094. while(i < arr2.length){
  20095. arr1[i + arr1.length] = arr2[i];
  20096. i++;
  20097. }
  20098. arr1.length = newLength;
  20099. return arr1;
  20100. };
  20101. function isArrayLike(item){
  20102. if(Array.isArray(item)){
  20103. return true;
  20104. }
  20105. if(typeof item !== 'object'){
  20106. return false;
  20107. }
  20108. if(!item.hasOwnProperty('length')){
  20109. return false;
  20110. }
  20111. if(typeof item.length !== 'number') {
  20112. return false;
  20113. }
  20114. if(item.length < 0){
  20115. return false;
  20116. }
  20117. var i = 0;
  20118. while(i < item.length){
  20119. if(!(i in item)){
  20120. return false;
  20121. }
  20122. i++;
  20123. }
  20124. return true;
  20125. }
  20126. /***/ }),
  20127. /* 175 */
  20128. /***/ (function(module, exports, __webpack_require__) {
  20129. /*
  20130. pseudo selectors
  20131. ---
  20132. they are available in two forms:
  20133. * filters called when the selector
  20134. is compiled and return a function
  20135. that needs to return next()
  20136. * pseudos get called on execution
  20137. they need to return a boolean
  20138. */
  20139. var DomUtils = __webpack_require__(65),
  20140. isTag = DomUtils.isTag,
  20141. getText = DomUtils.getText,
  20142. getParent = DomUtils.getParent,
  20143. getChildren = DomUtils.getChildren,
  20144. getSiblings = DomUtils.getSiblings,
  20145. hasAttrib = DomUtils.hasAttrib,
  20146. getName = DomUtils.getName,
  20147. getAttribute= DomUtils.getAttributeValue,
  20148. getNCheck = __webpack_require__(719),
  20149. checkAttrib = __webpack_require__(420).rules.equals,
  20150. BaseFuncs = __webpack_require__(94),
  20151. trueFunc = BaseFuncs.trueFunc,
  20152. falseFunc = BaseFuncs.falseFunc;
  20153. //helper methods
  20154. function getFirstElement(elems){
  20155. for(var i = 0; elems && i < elems.length; i++){
  20156. if(isTag(elems[i])) return elems[i];
  20157. }
  20158. }
  20159. function getAttribFunc(name, value){
  20160. var data = {name: name, value: value};
  20161. return function attribFunc(next){
  20162. return checkAttrib(next, data);
  20163. };
  20164. }
  20165. function getChildFunc(next){
  20166. return function(elem){
  20167. return !!getParent(elem) && next(elem);
  20168. };
  20169. }
  20170. var filters = {
  20171. contains: function(next, text){
  20172. return function contains(elem){
  20173. return next(elem) && getText(elem).indexOf(text) >= 0;
  20174. };
  20175. },
  20176. icontains: function(next, text){
  20177. var itext = text.toLowerCase();
  20178. return function icontains(elem){
  20179. return next(elem) &&
  20180. getText(elem).toLowerCase().indexOf(itext) >= 0;
  20181. };
  20182. },
  20183. //location specific methods
  20184. "nth-child": function(next, rule){
  20185. var func = getNCheck(rule);
  20186. if(func === falseFunc) return func;
  20187. if(func === trueFunc) return getChildFunc(next);
  20188. return function nthChild(elem){
  20189. var siblings = getSiblings(elem);
  20190. for(var i = 0, pos = 0; i < siblings.length; i++){
  20191. if(isTag(siblings[i])){
  20192. if(siblings[i] === elem) break;
  20193. else pos++;
  20194. }
  20195. }
  20196. return func(pos) && next(elem);
  20197. };
  20198. },
  20199. "nth-last-child": function(next, rule){
  20200. var func = getNCheck(rule);
  20201. if(func === falseFunc) return func;
  20202. if(func === trueFunc) return getChildFunc(next);
  20203. return function nthLastChild(elem){
  20204. var siblings = getSiblings(elem);
  20205. for(var pos = 0, i = siblings.length - 1; i >= 0; i--){
  20206. if(isTag(siblings[i])){
  20207. if(siblings[i] === elem) break;
  20208. else pos++;
  20209. }
  20210. }
  20211. return func(pos) && next(elem);
  20212. };
  20213. },
  20214. "nth-of-type": function(next, rule){
  20215. var func = getNCheck(rule);
  20216. if(func === falseFunc) return func;
  20217. if(func === trueFunc) return getChildFunc(next);
  20218. return function nthOfType(elem){
  20219. var siblings = getSiblings(elem);
  20220. for(var pos = 0, i = 0; i < siblings.length; i++){
  20221. if(isTag(siblings[i])){
  20222. if(siblings[i] === elem) break;
  20223. if(getName(siblings[i]) === getName(elem)) pos++;
  20224. }
  20225. }
  20226. return func(pos) && next(elem);
  20227. };
  20228. },
  20229. "nth-last-of-type": function(next, rule){
  20230. var func = getNCheck(rule);
  20231. if(func === falseFunc) return func;
  20232. if(func === trueFunc) return getChildFunc(next);
  20233. return function nthLastOfType(elem){
  20234. var siblings = getSiblings(elem);
  20235. for(var pos = 0, i = siblings.length - 1; i >= 0; i--){
  20236. if(isTag(siblings[i])){
  20237. if(siblings[i] === elem) break;
  20238. if(getName(siblings[i]) === getName(elem)) pos++;
  20239. }
  20240. }
  20241. return func(pos) && next(elem);
  20242. };
  20243. },
  20244. //TODO determine the actual root element
  20245. root: function(next){
  20246. return function(elem){
  20247. return !getParent(elem) && next(elem);
  20248. };
  20249. },
  20250. scope: function(next, rule, options, context){
  20251. if(!context || context.length === 0){
  20252. //equivalent to :root
  20253. return filters.root(next);
  20254. }
  20255. if(context.length === 1){
  20256. //NOTE: can't be unpacked, as :has uses this for side-effects
  20257. return function(elem){
  20258. return context[0] === elem && next(elem);
  20259. };
  20260. }
  20261. return function(elem){
  20262. return context.indexOf(elem) >= 0 && next(elem);
  20263. };
  20264. },
  20265. //jQuery extensions (others follow as pseudos)
  20266. checkbox: getAttribFunc("type", "checkbox"),
  20267. file: getAttribFunc("type", "file"),
  20268. password: getAttribFunc("type", "password"),
  20269. radio: getAttribFunc("type", "radio"),
  20270. reset: getAttribFunc("type", "reset"),
  20271. image: getAttribFunc("type", "image"),
  20272. submit: getAttribFunc("type", "submit")
  20273. };
  20274. //while filters are precompiled, pseudos get called when they are needed
  20275. var pseudos = {
  20276. empty: function(elem){
  20277. return !getChildren(elem).some(function(elem){
  20278. return isTag(elem) || elem.type === "text";
  20279. });
  20280. },
  20281. "first-child": function(elem){
  20282. return getFirstElement(getSiblings(elem)) === elem;
  20283. },
  20284. "last-child": function(elem){
  20285. var siblings = getSiblings(elem);
  20286. for(var i = siblings.length - 1; i >= 0; i--){
  20287. if(siblings[i] === elem) return true;
  20288. if(isTag(siblings[i])) break;
  20289. }
  20290. return false;
  20291. },
  20292. "first-of-type": function(elem){
  20293. var siblings = getSiblings(elem);
  20294. for(var i = 0; i < siblings.length; i++){
  20295. if(isTag(siblings[i])){
  20296. if(siblings[i] === elem) return true;
  20297. if(getName(siblings[i]) === getName(elem)) break;
  20298. }
  20299. }
  20300. return false;
  20301. },
  20302. "last-of-type": function(elem){
  20303. var siblings = getSiblings(elem);
  20304. for(var i = siblings.length-1; i >= 0; i--){
  20305. if(isTag(siblings[i])){
  20306. if(siblings[i] === elem) return true;
  20307. if(getName(siblings[i]) === getName(elem)) break;
  20308. }
  20309. }
  20310. return false;
  20311. },
  20312. "only-of-type": function(elem){
  20313. var siblings = getSiblings(elem);
  20314. for(var i = 0, j = siblings.length; i < j; i++){
  20315. if(isTag(siblings[i])){
  20316. if(siblings[i] === elem) continue;
  20317. if(getName(siblings[i]) === getName(elem)) return false;
  20318. }
  20319. }
  20320. return true;
  20321. },
  20322. "only-child": function(elem){
  20323. var siblings = getSiblings(elem);
  20324. for(var i = 0; i < siblings.length; i++){
  20325. if(isTag(siblings[i]) && siblings[i] !== elem) return false;
  20326. }
  20327. return true;
  20328. },
  20329. //:matches(a, area, link)[href]
  20330. link: function(elem){
  20331. return hasAttrib(elem, "href");
  20332. },
  20333. visited: falseFunc, //seems to be a valid implementation
  20334. //TODO: :any-link once the name is finalized (as an alias of :link)
  20335. //forms
  20336. //to consider: :target
  20337. //:matches([selected], select:not([multiple]):not(> option[selected]) > option:first-of-type)
  20338. selected: function(elem){
  20339. if(hasAttrib(elem, "selected")) return true;
  20340. else if(getName(elem) !== "option") return false;
  20341. //the first <option> in a <select> is also selected
  20342. var parent = getParent(elem);
  20343. if(
  20344. !parent ||
  20345. getName(parent) !== "select" ||
  20346. hasAttrib(parent, "multiple")
  20347. ) return false;
  20348. var siblings = getChildren(parent),
  20349. sawElem = false;
  20350. for(var i = 0; i < siblings.length; i++){
  20351. if(isTag(siblings[i])){
  20352. if(siblings[i] === elem){
  20353. sawElem = true;
  20354. } else if(!sawElem){
  20355. return false;
  20356. } else if(hasAttrib(siblings[i], "selected")){
  20357. return false;
  20358. }
  20359. }
  20360. }
  20361. return sawElem;
  20362. },
  20363. //https://html.spec.whatwg.org/multipage/scripting.html#disabled-elements
  20364. //:matches(
  20365. // :matches(button, input, select, textarea, menuitem, optgroup, option)[disabled],
  20366. // optgroup[disabled] > option),
  20367. // fieldset[disabled] * //TODO not child of first <legend>
  20368. //)
  20369. disabled: function(elem){
  20370. return hasAttrib(elem, "disabled");
  20371. },
  20372. enabled: function(elem){
  20373. return !hasAttrib(elem, "disabled");
  20374. },
  20375. //:matches(:matches(:radio, :checkbox)[checked], :selected) (TODO menuitem)
  20376. checked: function(elem){
  20377. return hasAttrib(elem, "checked") || pseudos.selected(elem);
  20378. },
  20379. //:matches(input, select, textarea)[required]
  20380. required: function(elem){
  20381. return hasAttrib(elem, "required");
  20382. },
  20383. //:matches(input, select, textarea):not([required])
  20384. optional: function(elem){
  20385. return !hasAttrib(elem, "required");
  20386. },
  20387. //jQuery extensions
  20388. //:not(:empty)
  20389. parent: function(elem){
  20390. return !pseudos.empty(elem);
  20391. },
  20392. //:matches(h1, h2, h3, h4, h5, h6)
  20393. header: function(elem){
  20394. var name = getName(elem);
  20395. return name === "h1" ||
  20396. name === "h2" ||
  20397. name === "h3" ||
  20398. name === "h4" ||
  20399. name === "h5" ||
  20400. name === "h6";
  20401. },
  20402. //:matches(button, input[type=button])
  20403. button: function(elem){
  20404. var name = getName(elem);
  20405. return name === "button" ||
  20406. name === "input" &&
  20407. getAttribute(elem, "type") === "button";
  20408. },
  20409. //:matches(input, textarea, select, button)
  20410. input: function(elem){
  20411. var name = getName(elem);
  20412. return name === "input" ||
  20413. name === "textarea" ||
  20414. name === "select" ||
  20415. name === "button";
  20416. },
  20417. //input:matches(:not([type!='']), [type='text' i])
  20418. text: function(elem){
  20419. var attr;
  20420. return getName(elem) === "input" && (
  20421. !(attr = getAttribute(elem, "type")) ||
  20422. attr.toLowerCase() === "text"
  20423. );
  20424. }
  20425. };
  20426. function verifyArgs(func, name, subselect){
  20427. if(subselect === null){
  20428. if(func.length > 1 && name !== "scope"){
  20429. throw new SyntaxError("pseudo-selector :" + name + " requires an argument");
  20430. }
  20431. } else {
  20432. if(func.length === 1){
  20433. throw new SyntaxError("pseudo-selector :" + name + " doesn't have any arguments");
  20434. }
  20435. }
  20436. }
  20437. //FIXME this feels hacky
  20438. var re_CSS3 = /^(?:(?:nth|last|first|only)-(?:child|of-type)|root|empty|(?:en|dis)abled|checked|not)$/;
  20439. module.exports = {
  20440. compile: function(next, data, options, context){
  20441. var name = data.name,
  20442. subselect = data.data;
  20443. if(options && options.strict && !re_CSS3.test(name)){
  20444. throw SyntaxError(":" + name + " isn't part of CSS3");
  20445. }
  20446. if(typeof filters[name] === "function"){
  20447. verifyArgs(filters[name], name, subselect);
  20448. return filters[name](next, subselect, options, context);
  20449. } else if(typeof pseudos[name] === "function"){
  20450. var func = pseudos[name];
  20451. verifyArgs(func, name, subselect);
  20452. if(next === trueFunc) return func;
  20453. return function pseudoArgs(elem){
  20454. return func(elem, subselect) && next(elem);
  20455. };
  20456. } else {
  20457. throw new SyntaxError("unmatched pseudo-class :" + name);
  20458. }
  20459. },
  20460. filters: filters,
  20461. pseudos: pseudos
  20462. };
  20463. /***/ }),
  20464. /* 176 */
  20465. /***/ (function(module, exports, __webpack_require__) {
  20466. var ListCache = __webpack_require__(130),
  20467. stackClear = __webpack_require__(733),
  20468. stackDelete = __webpack_require__(734),
  20469. stackGet = __webpack_require__(735),
  20470. stackHas = __webpack_require__(736),
  20471. stackSet = __webpack_require__(737);
  20472. /**
  20473. * Creates a stack cache object to store key-value pairs.
  20474. *
  20475. * @private
  20476. * @constructor
  20477. * @param {Array} [entries] The key-value pairs to cache.
  20478. */
  20479. function Stack(entries) {
  20480. var data = this.__data__ = new ListCache(entries);
  20481. this.size = data.size;
  20482. }
  20483. // Add methods to `Stack`.
  20484. Stack.prototype.clear = stackClear;
  20485. Stack.prototype['delete'] = stackDelete;
  20486. Stack.prototype.get = stackGet;
  20487. Stack.prototype.has = stackHas;
  20488. Stack.prototype.set = stackSet;
  20489. module.exports = Stack;
  20490. /***/ }),
  20491. /* 177 */
  20492. /***/ (function(module, exports, __webpack_require__) {
  20493. var getNative = __webpack_require__(49),
  20494. root = __webpack_require__(19);
  20495. /* Built-in method references that are verified to be native. */
  20496. var Map = getNative(root, 'Map');
  20497. module.exports = Map;
  20498. /***/ }),
  20499. /* 178 */
  20500. /***/ (function(module, exports, __webpack_require__) {
  20501. var mapCacheClear = __webpack_require__(738),
  20502. mapCacheDelete = __webpack_require__(745),
  20503. mapCacheGet = __webpack_require__(747),
  20504. mapCacheHas = __webpack_require__(748),
  20505. mapCacheSet = __webpack_require__(749);
  20506. /**
  20507. * Creates a map cache object to store key-value pairs.
  20508. *
  20509. * @private
  20510. * @constructor
  20511. * @param {Array} [entries] The key-value pairs to cache.
  20512. */
  20513. function MapCache(entries) {
  20514. var index = -1,
  20515. length = entries == null ? 0 : entries.length;
  20516. this.clear();
  20517. while (++index < length) {
  20518. var entry = entries[index];
  20519. this.set(entry[0], entry[1]);
  20520. }
  20521. }
  20522. // Add methods to `MapCache`.
  20523. MapCache.prototype.clear = mapCacheClear;
  20524. MapCache.prototype['delete'] = mapCacheDelete;
  20525. MapCache.prototype.get = mapCacheGet;
  20526. MapCache.prototype.has = mapCacheHas;
  20527. MapCache.prototype.set = mapCacheSet;
  20528. module.exports = MapCache;
  20529. /***/ }),
  20530. /* 179 */
  20531. /***/ (function(module, exports) {
  20532. /**
  20533. * A specialized version of `_.filter` for arrays without support for
  20534. * iteratee shorthands.
  20535. *
  20536. * @private
  20537. * @param {Array} [array] The array to iterate over.
  20538. * @param {Function} predicate The function invoked per iteration.
  20539. * @returns {Array} Returns the new filtered array.
  20540. */
  20541. function arrayFilter(array, predicate) {
  20542. var index = -1,
  20543. length = array == null ? 0 : array.length,
  20544. resIndex = 0,
  20545. result = [];
  20546. while (++index < length) {
  20547. var value = array[index];
  20548. if (predicate(value, index, array)) {
  20549. result[resIndex++] = value;
  20550. }
  20551. }
  20552. return result;
  20553. }
  20554. module.exports = arrayFilter;
  20555. /***/ }),
  20556. /* 180 */
  20557. /***/ (function(module, exports, __webpack_require__) {
  20558. var castPath = __webpack_require__(134),
  20559. toKey = __webpack_require__(95);
  20560. /**
  20561. * The base implementation of `_.get` without support for default values.
  20562. *
  20563. * @private
  20564. * @param {Object} object The object to query.
  20565. * @param {Array|string} path The path of the property to get.
  20566. * @returns {*} Returns the resolved value.
  20567. */
  20568. function baseGet(object, path) {
  20569. path = castPath(path, object);
  20570. var index = 0,
  20571. length = path.length;
  20572. while (object != null && index < length) {
  20573. object = object[toKey(path[index++])];
  20574. }
  20575. return (index && index == length) ? object : undefined;
  20576. }
  20577. module.exports = baseGet;
  20578. /***/ }),
  20579. /* 181 */
  20580. /***/ (function(module, exports, __webpack_require__) {
  20581. var isArray = __webpack_require__(9),
  20582. isSymbol = __webpack_require__(93);
  20583. /** Used to match property names within property paths. */
  20584. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  20585. reIsPlainProp = /^\w*$/;
  20586. /**
  20587. * Checks if `value` is a property name and not a property path.
  20588. *
  20589. * @private
  20590. * @param {*} value The value to check.
  20591. * @param {Object} [object] The object to query keys on.
  20592. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  20593. */
  20594. function isKey(value, object) {
  20595. if (isArray(value)) {
  20596. return false;
  20597. }
  20598. var type = typeof value;
  20599. if (type == 'number' || type == 'symbol' || type == 'boolean' ||
  20600. value == null || isSymbol(value)) {
  20601. return true;
  20602. }
  20603. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
  20604. (object != null && value in Object(object));
  20605. }
  20606. module.exports = isKey;
  20607. /***/ }),
  20608. /* 182 */
  20609. /***/ (function(module, exports, __webpack_require__) {
  20610. /**
  20611. * body.js
  20612. *
  20613. * Body interface provides common methods for Request and Response
  20614. */
  20615. var convert = __webpack_require__(812).convert;
  20616. var bodyStream = __webpack_require__(833);
  20617. var PassThrough = __webpack_require__(10).PassThrough;
  20618. var FetchError = __webpack_require__(440);
  20619. module.exports = Body;
  20620. /**
  20621. * Body class
  20622. *
  20623. * @param Stream body Readable stream
  20624. * @param Object opts Response options
  20625. * @return Void
  20626. */
  20627. function Body(body, opts) {
  20628. opts = opts || {};
  20629. this.body = body;
  20630. this.bodyUsed = false;
  20631. this.size = opts.size || 0;
  20632. this.timeout = opts.timeout || 0;
  20633. this._raw = [];
  20634. this._abort = false;
  20635. }
  20636. /**
  20637. * Decode response as json
  20638. *
  20639. * @return Promise
  20640. */
  20641. Body.prototype.json = function() {
  20642. var self = this;
  20643. return this._decode().then(function(buffer) {
  20644. try {
  20645. return JSON.parse(buffer.toString());
  20646. } catch (err) {
  20647. return Body.Promise.reject(new FetchError('invalid json response body at ' + self.url + ' reason: ' + err.message, 'invalid-json'));
  20648. }
  20649. });
  20650. };
  20651. /**
  20652. * Decode response as text
  20653. *
  20654. * @return Promise
  20655. */
  20656. Body.prototype.text = function() {
  20657. return this._decode().then(function(buffer) {
  20658. return buffer.toString();
  20659. });
  20660. };
  20661. /**
  20662. * Decode response as buffer (non-spec api)
  20663. *
  20664. * @return Promise
  20665. */
  20666. Body.prototype.buffer = function() {
  20667. return this._decode();
  20668. };
  20669. /**
  20670. * Decode buffers into utf-8 string
  20671. *
  20672. * @return Promise
  20673. */
  20674. Body.prototype._decode = function() {
  20675. var self = this;
  20676. if (this.bodyUsed) {
  20677. return Body.Promise.reject(new Error('body used already for: ' + this.url));
  20678. }
  20679. this.bodyUsed = true;
  20680. this._bytes = 0;
  20681. this._abort = false;
  20682. this._raw = [];
  20683. return new Body.Promise(function(resolve, reject) {
  20684. var resTimeout;
  20685. // body is string
  20686. if (typeof self.body === 'string') {
  20687. self._bytes = self.body.length;
  20688. self._raw = [new Buffer(self.body)];
  20689. return resolve(self._convert());
  20690. }
  20691. // body is buffer
  20692. if (self.body instanceof Buffer) {
  20693. self._bytes = self.body.length;
  20694. self._raw = [self.body];
  20695. return resolve(self._convert());
  20696. }
  20697. // allow timeout on slow response body
  20698. if (self.timeout) {
  20699. resTimeout = setTimeout(function() {
  20700. self._abort = true;
  20701. reject(new FetchError('response timeout at ' + self.url + ' over limit: ' + self.timeout, 'body-timeout'));
  20702. }, self.timeout);
  20703. }
  20704. // handle stream error, such as incorrect content-encoding
  20705. self.body.on('error', function(err) {
  20706. reject(new FetchError('invalid response body at: ' + self.url + ' reason: ' + err.message, 'system', err));
  20707. });
  20708. // body is stream
  20709. self.body.on('data', function(chunk) {
  20710. if (self._abort || chunk === null) {
  20711. return;
  20712. }
  20713. if (self.size && self._bytes + chunk.length > self.size) {
  20714. self._abort = true;
  20715. reject(new FetchError('content size at ' + self.url + ' over limit: ' + self.size, 'max-size'));
  20716. return;
  20717. }
  20718. self._bytes += chunk.length;
  20719. self._raw.push(chunk);
  20720. });
  20721. self.body.on('end', function() {
  20722. if (self._abort) {
  20723. return;
  20724. }
  20725. clearTimeout(resTimeout);
  20726. resolve(self._convert());
  20727. });
  20728. });
  20729. };
  20730. /**
  20731. * Detect buffer encoding and convert to target encoding
  20732. * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding
  20733. *
  20734. * @param String encoding Target encoding
  20735. * @return String
  20736. */
  20737. Body.prototype._convert = function(encoding) {
  20738. encoding = encoding || 'utf-8';
  20739. var ct = this.headers.get('content-type');
  20740. var charset = 'utf-8';
  20741. var res, str;
  20742. // header
  20743. if (ct) {
  20744. // skip encoding detection altogether if not html/xml/plain text
  20745. if (!/text\/html|text\/plain|\+xml|\/xml/i.test(ct)) {
  20746. return Buffer.concat(this._raw);
  20747. }
  20748. res = /charset=([^;]*)/i.exec(ct);
  20749. }
  20750. // no charset in content type, peek at response body for at most 1024 bytes
  20751. if (!res && this._raw.length > 0) {
  20752. for (var i = 0; i < this._raw.length; i++) {
  20753. str += this._raw[i].toString()
  20754. if (str.length > 1024) {
  20755. break;
  20756. }
  20757. }
  20758. str = str.substr(0, 1024);
  20759. }
  20760. // html5
  20761. if (!res && str) {
  20762. res = /<meta.+?charset=(['"])(.+?)\1/i.exec(str);
  20763. }
  20764. // html4
  20765. if (!res && str) {
  20766. res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str);
  20767. if (res) {
  20768. res = /charset=(.*)/i.exec(res.pop());
  20769. }
  20770. }
  20771. // xml
  20772. if (!res && str) {
  20773. res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str);
  20774. }
  20775. // found charset
  20776. if (res) {
  20777. charset = res.pop();
  20778. // prevent decode issues when sites use incorrect encoding
  20779. // ref: https://hsivonen.fi/encoding-menu/
  20780. if (charset === 'gb2312' || charset === 'gbk') {
  20781. charset = 'gb18030';
  20782. }
  20783. }
  20784. // turn raw buffers into a single utf-8 buffer
  20785. return convert(
  20786. Buffer.concat(this._raw)
  20787. , encoding
  20788. , charset
  20789. );
  20790. };
  20791. /**
  20792. * Clone body given Res/Req instance
  20793. *
  20794. * @param Mixed instance Response or Request instance
  20795. * @return Mixed
  20796. */
  20797. Body.prototype._clone = function(instance) {
  20798. var p1, p2;
  20799. var body = instance.body;
  20800. // don't allow cloning a used body
  20801. if (instance.bodyUsed) {
  20802. throw new Error('cannot clone body after it is used');
  20803. }
  20804. // check that body is a stream and not form-data object
  20805. // note: we can't clone the form-data object without having it as a dependency
  20806. if (bodyStream(body) && typeof body.getBoundary !== 'function') {
  20807. // tee instance body
  20808. p1 = new PassThrough();
  20809. p2 = new PassThrough();
  20810. body.pipe(p1);
  20811. body.pipe(p2);
  20812. // set instance body to teed body and return the other teed body
  20813. instance.body = p1;
  20814. body = p2;
  20815. }
  20816. return body;
  20817. }
  20818. // expose Promise
  20819. Body.Promise = global.Promise;
  20820. /***/ }),
  20821. /* 183 */
  20822. /***/ (function(module, exports) {
  20823. module.exports = [["0","\u0000",127,"€"],["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"],["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"],["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11],["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"],["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"],["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5],["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"],["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"],["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"],["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"],["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"],["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"],["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4],["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6],["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"],["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7],["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"],["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"],["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"],["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5],["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"],["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6],["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"],["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4],["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4],["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"],["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"],["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6],["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"],["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"],["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"],["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6],["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"],["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"],["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"],["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"],["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"],["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"],["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8],["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"],["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"],["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"],["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"],["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5],["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"],["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"],["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"],["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"],["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5],["9980","檧檨檪檭",114,"欥欦欨",6],["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"],["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"],["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"],["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"],["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"],["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5],["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"],["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"],["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6],["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"],["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"],["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4],["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19],["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"],["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"],["a2a1","ⅰ",9],["a2b1","⒈",19,"⑴",19,"①",9],["a2e5","㈠",9],["a2f1","Ⅰ",11],["a3a1","!"#¥%",88," ̄"],["a4a1","ぁ",82],["a5a1","ァ",85],["a6a1","Α",16,"Σ",6],["a6c1","α",16,"σ",6],["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"],["a6ee","︻︼︷︸︱"],["a6f4","︳︴"],["a7a1","А",5,"ЁЖ",25],["a7d1","а",5,"ёж",25],["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6],["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"],["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"],["a8bd","ńň"],["a8c0","ɡ"],["a8c5","ㄅ",36],["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"],["a959","℡㈱"],["a95c","‐"],["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8],["a980","﹢",4,"﹨﹩﹪﹫"],["a996","〇"],["a9a4","─",75],["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8],["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"],["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4],["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4],["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11],["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"],["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12],["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"],["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"],["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"],["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"],["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"],["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"],["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"],["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"],["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"],["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4],["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"],["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"],["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"],["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9],["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"],["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"],["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"],["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"],["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"],["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16],["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"],["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"],["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"],["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"],["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"],["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"],["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"],["bb40","籃",9,"籎",36,"籵",5,"籾",9],["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"],["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5],["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"],["bd40","紷",54,"絯",7],["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"],["be40","継",12,"綧",6,"綯",42],["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"],["bf40","緻",62],["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"],["c040","繞",35,"纃",23,"纜纝纞"],["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"],["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"],["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"],["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"],["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"],["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"],["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"],["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"],["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"],["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"],["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"],["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"],["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"],["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"],["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"],["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"],["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"],["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"],["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"],["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10],["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"],["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"],["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"],["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"],["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"],["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"],["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"],["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"],["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"],["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9],["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"],["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"],["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"],["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5],["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"],["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"],["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"],["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6],["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"],["d440","訞",31,"訿",8,"詉",21],["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"],["d540","誁",7,"誋",7,"誔",46],["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"],["d640","諤",34,"謈",27],["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"],["d740","譆",31,"譧",4,"譭",25],["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"],["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"],["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"],["d940","貮",62],["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"],["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"],["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"],["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"],["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"],["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7],["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"],["dd40","軥",62],["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"],["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"],["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"],["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"],["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"],["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"],["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"],["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"],["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"],["e240","釦",62],["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"],["e340","鉆",45,"鉵",16],["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"],["e440","銨",5,"銯",24,"鋉",31],["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"],["e540","錊",51,"錿",10],["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"],["e640","鍬",34,"鎐",27],["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"],["e740","鏎",7,"鏗",54],["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"],["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"],["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"],["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42],["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"],["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"],["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"],["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"],["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"],["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7],["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"],["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46],["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"],["ee40","頏",62],["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"],["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4],["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"],["f040","餈",4,"餎餏餑",28,"餯",26],["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"],["f140","馌馎馚",10,"馦馧馩",47],["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"],["f240","駺",62],["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"],["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"],["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"],["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5],["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"],["f540","魼",62],["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"],["f640","鯜",62],["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"],["f740","鰼",62],["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"],["f840","鳣",62],["f880","鴢",32],["f940","鵃",62],["f980","鶂",32],["fa40","鶣",62],["fa80","鷢",32],["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"],["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"],["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6],["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"],["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38],["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"],["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"]]
  20824. /***/ }),
  20825. /* 184 */
  20826. /***/ (function(module, exports) {
  20827. /**
  20828. * headers.js
  20829. *
  20830. * Headers class offers convenient helpers
  20831. */
  20832. module.exports = Headers;
  20833. /**
  20834. * Headers class
  20835. *
  20836. * @param Object headers Response headers
  20837. * @return Void
  20838. */
  20839. function Headers(headers) {
  20840. var self = this;
  20841. this._headers = {};
  20842. // Headers
  20843. if (headers instanceof Headers) {
  20844. headers = headers.raw();
  20845. }
  20846. // plain object
  20847. for (var prop in headers) {
  20848. if (!headers.hasOwnProperty(prop)) {
  20849. continue;
  20850. }
  20851. if (typeof headers[prop] === 'string') {
  20852. this.set(prop, headers[prop]);
  20853. } else if (typeof headers[prop] === 'number' && !isNaN(headers[prop])) {
  20854. this.set(prop, headers[prop].toString());
  20855. } else if (Array.isArray(headers[prop])) {
  20856. headers[prop].forEach(function(item) {
  20857. self.append(prop, item.toString());
  20858. });
  20859. }
  20860. }
  20861. }
  20862. /**
  20863. * Return first header value given name
  20864. *
  20865. * @param String name Header name
  20866. * @return Mixed
  20867. */
  20868. Headers.prototype.get = function(name) {
  20869. var list = this._headers[name.toLowerCase()];
  20870. return list ? list[0] : null;
  20871. };
  20872. /**
  20873. * Return all header values given name
  20874. *
  20875. * @param String name Header name
  20876. * @return Array
  20877. */
  20878. Headers.prototype.getAll = function(name) {
  20879. if (!this.has(name)) {
  20880. return [];
  20881. }
  20882. return this._headers[name.toLowerCase()];
  20883. };
  20884. /**
  20885. * Iterate over all headers
  20886. *
  20887. * @param Function callback Executed for each item with parameters (value, name, thisArg)
  20888. * @param Boolean thisArg `this` context for callback function
  20889. * @return Void
  20890. */
  20891. Headers.prototype.forEach = function(callback, thisArg) {
  20892. Object.getOwnPropertyNames(this._headers).forEach(function(name) {
  20893. this._headers[name].forEach(function(value) {
  20894. callback.call(thisArg, value, name, this)
  20895. }, this)
  20896. }, this)
  20897. }
  20898. /**
  20899. * Overwrite header values given name
  20900. *
  20901. * @param String name Header name
  20902. * @param String value Header value
  20903. * @return Void
  20904. */
  20905. Headers.prototype.set = function(name, value) {
  20906. this._headers[name.toLowerCase()] = [value];
  20907. };
  20908. /**
  20909. * Append a value onto existing header
  20910. *
  20911. * @param String name Header name
  20912. * @param String value Header value
  20913. * @return Void
  20914. */
  20915. Headers.prototype.append = function(name, value) {
  20916. if (!this.has(name)) {
  20917. this.set(name, value);
  20918. return;
  20919. }
  20920. this._headers[name.toLowerCase()].push(value);
  20921. };
  20922. /**
  20923. * Check for header name existence
  20924. *
  20925. * @param String name Header name
  20926. * @return Boolean
  20927. */
  20928. Headers.prototype.has = function(name) {
  20929. return this._headers.hasOwnProperty(name.toLowerCase());
  20930. };
  20931. /**
  20932. * Delete all header values given name
  20933. *
  20934. * @param String name Header name
  20935. * @return Void
  20936. */
  20937. Headers.prototype['delete'] = function(name) {
  20938. delete this._headers[name.toLowerCase()];
  20939. };
  20940. /**
  20941. * Return raw headers (non-spec api)
  20942. *
  20943. * @return Object
  20944. */
  20945. Headers.prototype.raw = function() {
  20946. return this._headers;
  20947. };
  20948. /***/ }),
  20949. /* 185 */
  20950. /***/ (function(module, exports, __webpack_require__) {
  20951. var isObject = __webpack_require__(8);
  20952. var document = __webpack_require__(6).document;
  20953. // typeof document.createElement is 'object' in old IE
  20954. var is = isObject(document) && isObject(document.createElement);
  20955. module.exports = function (it) {
  20956. return is ? document.createElement(it) : {};
  20957. };
  20958. /***/ }),
  20959. /* 186 */
  20960. /***/ (function(module, exports, __webpack_require__) {
  20961. var global = __webpack_require__(6);
  20962. var hide = __webpack_require__(27);
  20963. var uid = __webpack_require__(53);
  20964. var TYPED = uid('typed_array');
  20965. var VIEW = uid('view');
  20966. var ABV = !!(global.ArrayBuffer && global.DataView);
  20967. var CONSTR = ABV;
  20968. var i = 0;
  20969. var l = 9;
  20970. var Typed;
  20971. var TypedArrayConstructors = (
  20972. 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
  20973. ).split(',');
  20974. while (i < l) {
  20975. if (Typed = global[TypedArrayConstructors[i++]]) {
  20976. hide(Typed.prototype, TYPED, true);
  20977. hide(Typed.prototype, VIEW, true);
  20978. } else CONSTR = false;
  20979. }
  20980. module.exports = {
  20981. ABV: ABV,
  20982. CONSTR: CONSTR,
  20983. TYPED: TYPED,
  20984. VIEW: VIEW
  20985. };
  20986. /***/ }),
  20987. /* 187 */
  20988. /***/ (function(module, exports, __webpack_require__) {
  20989. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  20990. var cof = __webpack_require__(73);
  20991. // eslint-disable-next-line no-prototype-builtins
  20992. module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  20993. return cof(it) == 'String' ? it.split('') : Object(it);
  20994. };
  20995. /***/ }),
  20996. /* 188 */
  20997. /***/ (function(module, exports, __webpack_require__) {
  20998. // false -> Array#indexOf
  20999. // true -> Array#includes
  21000. var toIObject = __webpack_require__(35);
  21001. var toLength = __webpack_require__(20);
  21002. var toAbsoluteIndex = __webpack_require__(99);
  21003. module.exports = function (IS_INCLUDES) {
  21004. return function ($this, el, fromIndex) {
  21005. var O = toIObject($this);
  21006. var length = toLength(O.length);
  21007. var index = toAbsoluteIndex(fromIndex, length);
  21008. var value;
  21009. // Array#includes uses SameValueZero equality algorithm
  21010. // eslint-disable-next-line no-self-compare
  21011. if (IS_INCLUDES && el != el) while (length > index) {
  21012. value = O[index++];
  21013. // eslint-disable-next-line no-self-compare
  21014. if (value != value) return true;
  21015. // Array#indexOf ignores holes, Array#includes - not
  21016. } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
  21017. if (O[index] === el) return IS_INCLUDES || index || 0;
  21018. } return !IS_INCLUDES && -1;
  21019. };
  21020. };
  21021. /***/ }),
  21022. /* 189 */
  21023. /***/ (function(module, exports, __webpack_require__) {
  21024. var shared = __webpack_require__(190)('keys');
  21025. var uid = __webpack_require__(53);
  21026. module.exports = function (key) {
  21027. return shared[key] || (shared[key] = uid(key));
  21028. };
  21029. /***/ }),
  21030. /* 190 */
  21031. /***/ (function(module, exports, __webpack_require__) {
  21032. var global = __webpack_require__(6);
  21033. var SHARED = '__core-js_shared__';
  21034. var store = global[SHARED] || (global[SHARED] = {});
  21035. module.exports = function (key) {
  21036. return store[key] || (store[key] = {});
  21037. };
  21038. /***/ }),
  21039. /* 191 */
  21040. /***/ (function(module, exports) {
  21041. // IE 8- don't enum bug keys
  21042. module.exports = (
  21043. 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
  21044. ).split(',');
  21045. /***/ }),
  21046. /* 192 */
  21047. /***/ (function(module, exports, __webpack_require__) {
  21048. "use strict";
  21049. // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
  21050. var toObject = __webpack_require__(57);
  21051. var toAbsoluteIndex = __webpack_require__(99);
  21052. var toLength = __webpack_require__(20);
  21053. module.exports = function fill(value /* , start = 0, end = @length */) {
  21054. var O = toObject(this);
  21055. var length = toLength(O.length);
  21056. var aLen = arguments.length;
  21057. var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);
  21058. var end = aLen > 2 ? arguments[2] : undefined;
  21059. var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
  21060. while (endPos > index) O[index++] = value;
  21061. return O;
  21062. };
  21063. /***/ }),
  21064. /* 193 */
  21065. /***/ (function(module, exports, __webpack_require__) {
  21066. // getting tag from 19.1.3.6 Object.prototype.toString()
  21067. var cof = __webpack_require__(73);
  21068. var TAG = __webpack_require__(11)('toStringTag');
  21069. // ES3 wrong here
  21070. var ARG = cof(function () { return arguments; }()) == 'Arguments';
  21071. // fallback for IE11 Script Access Denied error
  21072. var tryGet = function (it, key) {
  21073. try {
  21074. return it[key];
  21075. } catch (e) { /* empty */ }
  21076. };
  21077. module.exports = function (it) {
  21078. var O, T, B;
  21079. return it === undefined ? 'Undefined' : it === null ? 'Null'
  21080. // @@toStringTag case
  21081. : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
  21082. // builtinTag case
  21083. : ARG ? cof(O)
  21084. // ES3 arguments fallback
  21085. : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
  21086. };
  21087. /***/ }),
  21088. /* 194 */
  21089. /***/ (function(module, exports, __webpack_require__) {
  21090. // check on default Array iterator
  21091. var Iterators = __webpack_require__(75);
  21092. var ITERATOR = __webpack_require__(11)('iterator');
  21093. var ArrayProto = Array.prototype;
  21094. module.exports = function (it) {
  21095. return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
  21096. };
  21097. /***/ }),
  21098. /* 195 */
  21099. /***/ (function(module, exports, __webpack_require__) {
  21100. var classof = __webpack_require__(193);
  21101. var ITERATOR = __webpack_require__(11)('iterator');
  21102. var Iterators = __webpack_require__(75);
  21103. module.exports = __webpack_require__(96).getIteratorMethod = function (it) {
  21104. if (it != undefined) return it[ITERATOR]
  21105. || it['@@iterator']
  21106. || Iterators[classof(it)];
  21107. };
  21108. /***/ }),
  21109. /* 196 */
  21110. /***/ (function(module, exports, __webpack_require__) {
  21111. "use strict";
  21112. var addToUnscopables = __webpack_require__(77);
  21113. var step = __webpack_require__(448);
  21114. var Iterators = __webpack_require__(75);
  21115. var toIObject = __webpack_require__(35);
  21116. // 22.1.3.4 Array.prototype.entries()
  21117. // 22.1.3.13 Array.prototype.keys()
  21118. // 22.1.3.29 Array.prototype.values()
  21119. // 22.1.3.30 Array.prototype[@@iterator]()
  21120. module.exports = __webpack_require__(449)(Array, 'Array', function (iterated, kind) {
  21121. this._t = toIObject(iterated); // target
  21122. this._i = 0; // next index
  21123. this._k = kind; // kind
  21124. // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
  21125. }, function () {
  21126. var O = this._t;
  21127. var kind = this._k;
  21128. var index = this._i++;
  21129. if (!O || index >= O.length) {
  21130. this._t = undefined;
  21131. return step(1);
  21132. }
  21133. if (kind == 'keys') return step(0, index);
  21134. if (kind == 'values') return step(0, O[index]);
  21135. return step(0, [index, O[index]]);
  21136. }, 'values');
  21137. // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
  21138. Iterators.Arguments = Iterators.Array;
  21139. addToUnscopables('keys');
  21140. addToUnscopables('values');
  21141. addToUnscopables('entries');
  21142. /***/ }),
  21143. /* 197 */
  21144. /***/ (function(module, exports, __webpack_require__) {
  21145. "use strict";
  21146. var global = __webpack_require__(6);
  21147. var dP = __webpack_require__(18);
  21148. var DESCRIPTORS = __webpack_require__(22);
  21149. var SPECIES = __webpack_require__(11)('species');
  21150. module.exports = function (KEY) {
  21151. var C = global[KEY];
  21152. if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
  21153. configurable: true,
  21154. get: function () { return this; }
  21155. });
  21156. };
  21157. /***/ }),
  21158. /* 198 */
  21159. /***/ (function(module, exports, __webpack_require__) {
  21160. // Works with __proto__ only. Old v8 can't work with null proto objects.
  21161. /* eslint-disable no-proto */
  21162. var isObject = __webpack_require__(8);
  21163. var anObject = __webpack_require__(7);
  21164. var check = function (O, proto) {
  21165. anObject(O);
  21166. if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
  21167. };
  21168. module.exports = {
  21169. set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
  21170. function (test, buggy, set) {
  21171. try {
  21172. set = __webpack_require__(34)(Function.call, __webpack_require__(42).f(Object.prototype, '__proto__').set, 2);
  21173. set(test, []);
  21174. buggy = !(test instanceof Array);
  21175. } catch (e) { buggy = true; }
  21176. return function setPrototypeOf(O, proto) {
  21177. check(O, proto);
  21178. if (buggy) O.__proto__ = proto;
  21179. else set(O, proto);
  21180. return O;
  21181. };
  21182. }({}, false) : undefined),
  21183. check: check
  21184. };
  21185. /***/ }),
  21186. /* 199 */
  21187. /***/ (function(module, exports, __webpack_require__) {
  21188. var ctx = __webpack_require__(34);
  21189. var invoke = __webpack_require__(455);
  21190. var html = __webpack_require__(445);
  21191. var cel = __webpack_require__(185);
  21192. var global = __webpack_require__(6);
  21193. var process = global.process;
  21194. var setTask = global.setImmediate;
  21195. var clearTask = global.clearImmediate;
  21196. var MessageChannel = global.MessageChannel;
  21197. var Dispatch = global.Dispatch;
  21198. var counter = 0;
  21199. var queue = {};
  21200. var ONREADYSTATECHANGE = 'onreadystatechange';
  21201. var defer, channel, port;
  21202. var run = function () {
  21203. var id = +this;
  21204. // eslint-disable-next-line no-prototype-builtins
  21205. if (queue.hasOwnProperty(id)) {
  21206. var fn = queue[id];
  21207. delete queue[id];
  21208. fn();
  21209. }
  21210. };
  21211. var listener = function (event) {
  21212. run.call(event.data);
  21213. };
  21214. // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
  21215. if (!setTask || !clearTask) {
  21216. setTask = function setImmediate(fn) {
  21217. var args = [];
  21218. var i = 1;
  21219. while (arguments.length > i) args.push(arguments[i++]);
  21220. queue[++counter] = function () {
  21221. // eslint-disable-next-line no-new-func
  21222. invoke(typeof fn == 'function' ? fn : Function(fn), args);
  21223. };
  21224. defer(counter);
  21225. return counter;
  21226. };
  21227. clearTask = function clearImmediate(id) {
  21228. delete queue[id];
  21229. };
  21230. // Node.js 0.8-
  21231. if (__webpack_require__(73)(process) == 'process') {
  21232. defer = function (id) {
  21233. process.nextTick(ctx(run, id, 1));
  21234. };
  21235. // Sphere (JS game engine) Dispatch API
  21236. } else if (Dispatch && Dispatch.now) {
  21237. defer = function (id) {
  21238. Dispatch.now(ctx(run, id, 1));
  21239. };
  21240. // Browsers with MessageChannel, includes WebWorkers
  21241. } else if (MessageChannel) {
  21242. channel = new MessageChannel();
  21243. port = channel.port2;
  21244. channel.port1.onmessage = listener;
  21245. defer = ctx(port.postMessage, port, 1);
  21246. // Browsers with postMessage, skip WebWorkers
  21247. // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  21248. } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
  21249. defer = function (id) {
  21250. global.postMessage(id + '', '*');
  21251. };
  21252. global.addEventListener('message', listener, false);
  21253. // IE8-
  21254. } else if (ONREADYSTATECHANGE in cel('script')) {
  21255. defer = function (id) {
  21256. html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
  21257. html.removeChild(this);
  21258. run.call(id);
  21259. };
  21260. };
  21261. // Rest old browsers
  21262. } else {
  21263. defer = function (id) {
  21264. setTimeout(ctx(run, id, 1), 0);
  21265. };
  21266. }
  21267. }
  21268. module.exports = {
  21269. set: setTask,
  21270. clear: clearTask
  21271. };
  21272. /***/ }),
  21273. /* 200 */
  21274. /***/ (function(module, exports, __webpack_require__) {
  21275. // helper for String#{startsWith, endsWith, includes}
  21276. var isRegExp = __webpack_require__(460);
  21277. var defined = __webpack_require__(56);
  21278. module.exports = function (that, searchString, NAME) {
  21279. if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
  21280. return String(defined(that));
  21281. };
  21282. /***/ }),
  21283. /* 201 */
  21284. /***/ (function(module, exports, __webpack_require__) {
  21285. var MATCH = __webpack_require__(11)('match');
  21286. module.exports = function (KEY) {
  21287. var re = /./;
  21288. try {
  21289. '/./'[KEY](re);
  21290. } catch (e) {
  21291. try {
  21292. re[MATCH] = false;
  21293. return !'/./'[KEY](re);
  21294. } catch (f) { /* empty */ }
  21295. } return true;
  21296. };
  21297. /***/ }),
  21298. /* 202 */
  21299. /***/ (function(module, exports, __webpack_require__) {
  21300. "use strict";
  21301. var $defineProperty = __webpack_require__(18);
  21302. var createDesc = __webpack_require__(52);
  21303. module.exports = function (object, index, value) {
  21304. if (index in object) $defineProperty.f(object, index, createDesc(0, value));
  21305. else object[index] = value;
  21306. };
  21307. /***/ }),
  21308. /* 203 */
  21309. /***/ (function(module, exports) {
  21310. // 20.2.2.28 Math.sign(x)
  21311. module.exports = Math.sign || function sign(x) {
  21312. // eslint-disable-next-line no-self-compare
  21313. return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
  21314. };
  21315. /***/ }),
  21316. /* 204 */
  21317. /***/ (function(module, exports) {
  21318. // 20.2.2.14 Math.expm1(x)
  21319. var $expm1 = Math.expm1;
  21320. module.exports = (!$expm1
  21321. // Old FF bug
  21322. || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
  21323. // Tor Browser bug
  21324. || $expm1(-2e-17) != -2e-17
  21325. ) ? function expm1(x) {
  21326. return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
  21327. } : $expm1;
  21328. /***/ }),
  21329. /* 205 */
  21330. /***/ (function(module, exports, __webpack_require__) {
  21331. var global = __webpack_require__(6);
  21332. var navigator = global.navigator;
  21333. module.exports = navigator && navigator.userAgent || '';
  21334. /***/ }),
  21335. /* 206 */
  21336. /***/ (function(module, exports, __webpack_require__) {
  21337. "use strict";
  21338. const log = __webpack_require__(24)
  21339. const MSG = {
  21340. TWOFACTOR: '2FA token requested'
  21341. }
  21342. function requireTwoFactor (extras = {}) {
  21343. const extrasStr = Buffer(JSON.stringify(extras), 'binary').toString('base64')
  21344. log('error', `${MSG.TWOFACTOR}||${extrasStr}`)
  21345. return extrasStr
  21346. }
  21347. /**
  21348. * The konnector could not login
  21349. * @type {String}
  21350. */
  21351. const LOGIN_FAILED = 'LOGIN_FAILED'
  21352. /**
  21353. * The folder specified as folder_to_save does not exist (checked by BaseKonnector)
  21354. * @type {String}
  21355. */
  21356. const NOT_EXISTING_DIRECTORY = 'NOT_EXISTING_DIRECTORY'
  21357. /**
  21358. * The vendor's website is down
  21359. * @type {String}
  21360. */
  21361. const VENDOR_DOWN = 'VENDOR_DOWN'
  21362. /**
  21363. * There was an unexpected error, please take a look at the logs to know what happened
  21364. * @type {String}
  21365. */
  21366. const USER_ACTION_NEEDED = 'USER_ACTION_NEEDED'
  21367. /**
  21368. * There was a problem while downloading a file
  21369. * @type {String}
  21370. */
  21371. const FILE_DOWNLOAD_FAILED = 'FILE_DOWNLOAD_FAILED'
  21372. module.exports = {
  21373. MSG: MSG,
  21374. LOGIN_FAILED,
  21375. NOT_EXISTING_DIRECTORY,
  21376. VENDOR_DOWN,
  21377. USER_ACTION_NEEDED,
  21378. FILE_DOWNLOAD_FAILED,
  21379. requireTwoFactor: requireTwoFactor
  21380. }
  21381. /***/ }),
  21382. /* 207 */
  21383. /***/ (function(module, exports, __webpack_require__) {
  21384. const sortBy = __webpack_require__(953)
  21385. const addDays = __webpack_require__(471)
  21386. const subDays = __webpack_require__(958)
  21387. const differenceInDays = __webpack_require__(959)
  21388. const getOperationAmountFromBill = (bill, options) => {
  21389. const isCredit = options && options.credit
  21390. return isCredit ? bill.amount : -(bill.originalAmount || bill.amount)
  21391. }
  21392. const getOperationDateFromBill = (bill, options) => {
  21393. const isCredit = options && options.credit
  21394. return new Date(isCredit ? bill.date : bill.originalDate || bill.date)
  21395. }
  21396. const getIdentifiers = options => options.identifiers
  21397. const getDateRangeFromBill = (bill, options) => {
  21398. const date = getOperationDateFromBill(bill, options)
  21399. return {
  21400. minDate: subDays(date, options.pastWindow),
  21401. maxDate: addDays(date, options.futureWindow)
  21402. }
  21403. }
  21404. const getAmountRangeFromBill = (bill, options) => {
  21405. const amount = getOperationAmountFromBill(bill, options)
  21406. return {
  21407. minAmount: amount - options.minAmountDelta,
  21408. maxAmount: amount + options.maxAmountDelta
  21409. }
  21410. }
  21411. const getTotalReimbursements = operation => {
  21412. if (!operation.reimbursements) return 0
  21413. return operation.reimbursements.reduce((s, r) => s + r.amount, 0)
  21414. }
  21415. // when we want to match an invoice with an operation according criteria,
  21416. // it is possible that several operations are returned to us.
  21417. // So we want to find the bill that comes closest.
  21418. // This function will sort this list
  21419. const sortedOperations = (bill, operations) => {
  21420. const buildSortFunction = bill => {
  21421. // it's not possible to sort with 2 parameters as the same time
  21422. // Date is more important so it have a biggest weight,
  21423. // but this value is random.
  21424. const dateWeight = 0.7
  21425. const amountWeight = 1 - dateWeight
  21426. const opDate = getOperationDateFromBill(bill)
  21427. const opAmount = getOperationAmountFromBill(bill)
  21428. return operation => {
  21429. const dateDiff = Math.abs(differenceInDays(opDate, operation.date))
  21430. const amountDiff = Math.abs(opAmount - operation.amount)
  21431. return dateWeight * dateDiff + amountWeight * amountDiff
  21432. }
  21433. }
  21434. return sortBy(operations, buildSortFunction(bill))
  21435. }
  21436. module.exports = {
  21437. getOperationAmountFromBill,
  21438. getOperationDateFromBill,
  21439. getIdentifiers,
  21440. getDateRangeFromBill,
  21441. getAmountRangeFromBill,
  21442. getTotalReimbursements,
  21443. sortedOperations
  21444. }
  21445. /***/ }),
  21446. /* 208 */
  21447. /***/ (function(module, exports, __webpack_require__) {
  21448. var startOfWeek = __webpack_require__(967)
  21449. /**
  21450. * @category ISO Week Helpers
  21451. * @summary Return the start of an ISO week for the given date.
  21452. *
  21453. * @description
  21454. * Return the start of an ISO week for the given date.
  21455. * The result will be in the local timezone.
  21456. *
  21457. * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
  21458. *
  21459. * @param {Date|String|Number} date - the original date
  21460. * @returns {Date} the start of an ISO week
  21461. *
  21462. * @example
  21463. * // The start of an ISO week for 2 September 2014 11:55:00:
  21464. * var result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
  21465. * //=> Mon Sep 01 2014 00:00:00
  21466. */
  21467. function startOfISOWeek (dirtyDate) {
  21468. return startOfWeek(dirtyDate, {weekStartsOn: 1})
  21469. }
  21470. module.exports = startOfISOWeek
  21471. /***/ }),
  21472. /* 209 */
  21473. /***/ (function(module, exports, __webpack_require__) {
  21474. //! moment.js locale configuration
  21475. //! locale : Afrikaans [af]
  21476. //! author : Werner Mollentze : https://github.com/wernerm
  21477. ;(function (global, factory) {
  21478. true ? factory(__webpack_require__(0)) :
  21479. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  21480. factory(global.moment)
  21481. }(this, (function (moment) { 'use strict';
  21482. var af = moment.defineLocale('af', {
  21483. months : 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'),
  21484. monthsShort : 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
  21485. weekdays : 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'),
  21486. weekdaysShort : 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),
  21487. weekdaysMin : 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),
  21488. meridiemParse: /vm|nm/i,
  21489. isPM : function (input) {
  21490. return /^nm$/i.test(input);
  21491. },
  21492. meridiem : function (hours, minutes, isLower) {
  21493. if (hours < 12) {
  21494. return isLower ? 'vm' : 'VM';
  21495. } else {
  21496. return isLower ? 'nm' : 'NM';
  21497. }
  21498. },
  21499. longDateFormat : {
  21500. LT : 'HH:mm',
  21501. LTS : 'HH:mm:ss',
  21502. L : 'DD/MM/YYYY',
  21503. LL : 'D MMMM YYYY',
  21504. LLL : 'D MMMM YYYY HH:mm',
  21505. LLLL : 'dddd, D MMMM YYYY HH:mm'
  21506. },
  21507. calendar : {
  21508. sameDay : '[Vandag om] LT',
  21509. nextDay : '[Môre om] LT',
  21510. nextWeek : 'dddd [om] LT',
  21511. lastDay : '[Gister om] LT',
  21512. lastWeek : '[Laas] dddd [om] LT',
  21513. sameElse : 'L'
  21514. },
  21515. relativeTime : {
  21516. future : 'oor %s',
  21517. past : '%s gelede',
  21518. s : '\'n paar sekondes',
  21519. ss : '%d sekondes',
  21520. m : '\'n minuut',
  21521. mm : '%d minute',
  21522. h : '\'n uur',
  21523. hh : '%d ure',
  21524. d : '\'n dag',
  21525. dd : '%d dae',
  21526. M : '\'n maand',
  21527. MM : '%d maande',
  21528. y : '\'n jaar',
  21529. yy : '%d jaar'
  21530. },
  21531. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  21532. ordinal : function (number) {
  21533. return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter
  21534. },
  21535. week : {
  21536. dow : 1, // Maandag is die eerste dag van die week.
  21537. doy : 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
  21538. }
  21539. });
  21540. return af;
  21541. })));
  21542. /***/ }),
  21543. /* 210 */
  21544. /***/ (function(module, exports, __webpack_require__) {
  21545. //! moment.js locale configuration
  21546. //! locale : Arabic [ar]
  21547. //! author : Abdel Said: https://github.com/abdelsaid
  21548. //! author : Ahmed Elkhatib
  21549. //! author : forabi https://github.com/forabi
  21550. ;(function (global, factory) {
  21551. true ? factory(__webpack_require__(0)) :
  21552. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  21553. factory(global.moment)
  21554. }(this, (function (moment) { 'use strict';
  21555. var symbolMap = {
  21556. '1': '١',
  21557. '2': '٢',
  21558. '3': '٣',
  21559. '4': '٤',
  21560. '5': '٥',
  21561. '6': '٦',
  21562. '7': '٧',
  21563. '8': '٨',
  21564. '9': '٩',
  21565. '0': '٠'
  21566. };
  21567. var numberMap = {
  21568. '١': '1',
  21569. '٢': '2',
  21570. '٣': '3',
  21571. '٤': '4',
  21572. '٥': '5',
  21573. '٦': '6',
  21574. '٧': '7',
  21575. '٨': '8',
  21576. '٩': '9',
  21577. '٠': '0'
  21578. };
  21579. var pluralForm = function (n) {
  21580. return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;
  21581. };
  21582. var plurals = {
  21583. s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],
  21584. m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],
  21585. h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],
  21586. d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],
  21587. M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],
  21588. y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']
  21589. };
  21590. var pluralize = function (u) {
  21591. return function (number, withoutSuffix, string, isFuture) {
  21592. var f = pluralForm(number),
  21593. str = plurals[u][pluralForm(number)];
  21594. if (f === 2) {
  21595. str = str[withoutSuffix ? 0 : 1];
  21596. }
  21597. return str.replace(/%d/i, number);
  21598. };
  21599. };
  21600. var months = [
  21601. 'يناير',
  21602. 'فبراير',
  21603. 'مارس',
  21604. 'أبريل',
  21605. 'مايو',
  21606. 'يونيو',
  21607. 'يوليو',
  21608. 'أغسطس',
  21609. 'سبتمبر',
  21610. 'أكتوبر',
  21611. 'نوفمبر',
  21612. 'ديسمبر'
  21613. ];
  21614. var ar = moment.defineLocale('ar', {
  21615. months : months,
  21616. monthsShort : months,
  21617. weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  21618. weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  21619. weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  21620. weekdaysParseExact : true,
  21621. longDateFormat : {
  21622. LT : 'HH:mm',
  21623. LTS : 'HH:mm:ss',
  21624. L : 'D/\u200FM/\u200FYYYY',
  21625. LL : 'D MMMM YYYY',
  21626. LLL : 'D MMMM YYYY HH:mm',
  21627. LLLL : 'dddd D MMMM YYYY HH:mm'
  21628. },
  21629. meridiemParse: /ص|م/,
  21630. isPM : function (input) {
  21631. return 'م' === input;
  21632. },
  21633. meridiem : function (hour, minute, isLower) {
  21634. if (hour < 12) {
  21635. return 'ص';
  21636. } else {
  21637. return 'م';
  21638. }
  21639. },
  21640. calendar : {
  21641. sameDay: '[اليوم عند الساعة] LT',
  21642. nextDay: '[غدًا عند الساعة] LT',
  21643. nextWeek: 'dddd [عند الساعة] LT',
  21644. lastDay: '[أمس عند الساعة] LT',
  21645. lastWeek: 'dddd [عند الساعة] LT',
  21646. sameElse: 'L'
  21647. },
  21648. relativeTime : {
  21649. future : 'بعد %s',
  21650. past : 'منذ %s',
  21651. s : pluralize('s'),
  21652. ss : pluralize('s'),
  21653. m : pluralize('m'),
  21654. mm : pluralize('m'),
  21655. h : pluralize('h'),
  21656. hh : pluralize('h'),
  21657. d : pluralize('d'),
  21658. dd : pluralize('d'),
  21659. M : pluralize('M'),
  21660. MM : pluralize('M'),
  21661. y : pluralize('y'),
  21662. yy : pluralize('y')
  21663. },
  21664. preparse: function (string) {
  21665. return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
  21666. return numberMap[match];
  21667. }).replace(/،/g, ',');
  21668. },
  21669. postformat: function (string) {
  21670. return string.replace(/\d/g, function (match) {
  21671. return symbolMap[match];
  21672. }).replace(/,/g, '،');
  21673. },
  21674. week : {
  21675. dow : 6, // Saturday is the first day of the week.
  21676. doy : 12 // The week that contains Jan 1st is the first week of the year.
  21677. }
  21678. });
  21679. return ar;
  21680. })));
  21681. /***/ }),
  21682. /* 211 */
  21683. /***/ (function(module, exports, __webpack_require__) {
  21684. //! moment.js locale configuration
  21685. //! locale : Arabic (Algeria) [ar-dz]
  21686. //! author : Noureddine LOUAHEDJ : https://github.com/noureddineme
  21687. ;(function (global, factory) {
  21688. true ? factory(__webpack_require__(0)) :
  21689. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  21690. factory(global.moment)
  21691. }(this, (function (moment) { 'use strict';
  21692. var arDz = moment.defineLocale('ar-dz', {
  21693. months : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
  21694. monthsShort : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
  21695. weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  21696. weekdaysShort : 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
  21697. weekdaysMin : 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'),
  21698. weekdaysParseExact : true,
  21699. longDateFormat : {
  21700. LT : 'HH:mm',
  21701. LTS : 'HH:mm:ss',
  21702. L : 'DD/MM/YYYY',
  21703. LL : 'D MMMM YYYY',
  21704. LLL : 'D MMMM YYYY HH:mm',
  21705. LLLL : 'dddd D MMMM YYYY HH:mm'
  21706. },
  21707. calendar : {
  21708. sameDay: '[اليوم على الساعة] LT',
  21709. nextDay: '[غدا على الساعة] LT',
  21710. nextWeek: 'dddd [على الساعة] LT',
  21711. lastDay: '[أمس على الساعة] LT',
  21712. lastWeek: 'dddd [على الساعة] LT',
  21713. sameElse: 'L'
  21714. },
  21715. relativeTime : {
  21716. future : 'في %s',
  21717. past : 'منذ %s',
  21718. s : 'ثوان',
  21719. ss : '%d ثانية',
  21720. m : 'دقيقة',
  21721. mm : '%d دقائق',
  21722. h : 'ساعة',
  21723. hh : '%d ساعات',
  21724. d : 'يوم',
  21725. dd : '%d أيام',
  21726. M : 'شهر',
  21727. MM : '%d أشهر',
  21728. y : 'سنة',
  21729. yy : '%d سنوات'
  21730. },
  21731. week : {
  21732. dow : 0, // Sunday is the first day of the week.
  21733. doy : 4 // The week that contains Jan 1st is the first week of the year.
  21734. }
  21735. });
  21736. return arDz;
  21737. })));
  21738. /***/ }),
  21739. /* 212 */
  21740. /***/ (function(module, exports, __webpack_require__) {
  21741. //! moment.js locale configuration
  21742. //! locale : Arabic (Kuwait) [ar-kw]
  21743. //! author : Nusret Parlak: https://github.com/nusretparlak
  21744. ;(function (global, factory) {
  21745. true ? factory(__webpack_require__(0)) :
  21746. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  21747. factory(global.moment)
  21748. }(this, (function (moment) { 'use strict';
  21749. var arKw = moment.defineLocale('ar-kw', {
  21750. months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
  21751. monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
  21752. weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  21753. weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
  21754. weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  21755. weekdaysParseExact : true,
  21756. longDateFormat : {
  21757. LT : 'HH:mm',
  21758. LTS : 'HH:mm:ss',
  21759. L : 'DD/MM/YYYY',
  21760. LL : 'D MMMM YYYY',
  21761. LLL : 'D MMMM YYYY HH:mm',
  21762. LLLL : 'dddd D MMMM YYYY HH:mm'
  21763. },
  21764. calendar : {
  21765. sameDay: '[اليوم على الساعة] LT',
  21766. nextDay: '[غدا على الساعة] LT',
  21767. nextWeek: 'dddd [على الساعة] LT',
  21768. lastDay: '[أمس على الساعة] LT',
  21769. lastWeek: 'dddd [على الساعة] LT',
  21770. sameElse: 'L'
  21771. },
  21772. relativeTime : {
  21773. future : 'في %s',
  21774. past : 'منذ %s',
  21775. s : 'ثوان',
  21776. ss : '%d ثانية',
  21777. m : 'دقيقة',
  21778. mm : '%d دقائق',
  21779. h : 'ساعة',
  21780. hh : '%d ساعات',
  21781. d : 'يوم',
  21782. dd : '%d أيام',
  21783. M : 'شهر',
  21784. MM : '%d أشهر',
  21785. y : 'سنة',
  21786. yy : '%d سنوات'
  21787. },
  21788. week : {
  21789. dow : 0, // Sunday is the first day of the week.
  21790. doy : 12 // The week that contains Jan 1st is the first week of the year.
  21791. }
  21792. });
  21793. return arKw;
  21794. })));
  21795. /***/ }),
  21796. /* 213 */
  21797. /***/ (function(module, exports, __webpack_require__) {
  21798. //! moment.js locale configuration
  21799. //! locale : Arabic (Lybia) [ar-ly]
  21800. //! author : Ali Hmer: https://github.com/kikoanis
  21801. ;(function (global, factory) {
  21802. true ? factory(__webpack_require__(0)) :
  21803. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  21804. factory(global.moment)
  21805. }(this, (function (moment) { 'use strict';
  21806. var symbolMap = {
  21807. '1': '1',
  21808. '2': '2',
  21809. '3': '3',
  21810. '4': '4',
  21811. '5': '5',
  21812. '6': '6',
  21813. '7': '7',
  21814. '8': '8',
  21815. '9': '9',
  21816. '0': '0'
  21817. };
  21818. var pluralForm = function (n) {
  21819. return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;
  21820. };
  21821. var plurals = {
  21822. s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],
  21823. m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],
  21824. h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],
  21825. d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],
  21826. M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],
  21827. y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']
  21828. };
  21829. var pluralize = function (u) {
  21830. return function (number, withoutSuffix, string, isFuture) {
  21831. var f = pluralForm(number),
  21832. str = plurals[u][pluralForm(number)];
  21833. if (f === 2) {
  21834. str = str[withoutSuffix ? 0 : 1];
  21835. }
  21836. return str.replace(/%d/i, number);
  21837. };
  21838. };
  21839. var months = [
  21840. 'يناير',
  21841. 'فبراير',
  21842. 'مارس',
  21843. 'أبريل',
  21844. 'مايو',
  21845. 'يونيو',
  21846. 'يوليو',
  21847. 'أغسطس',
  21848. 'سبتمبر',
  21849. 'أكتوبر',
  21850. 'نوفمبر',
  21851. 'ديسمبر'
  21852. ];
  21853. var arLy = moment.defineLocale('ar-ly', {
  21854. months : months,
  21855. monthsShort : months,
  21856. weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  21857. weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  21858. weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  21859. weekdaysParseExact : true,
  21860. longDateFormat : {
  21861. LT : 'HH:mm',
  21862. LTS : 'HH:mm:ss',
  21863. L : 'D/\u200FM/\u200FYYYY',
  21864. LL : 'D MMMM YYYY',
  21865. LLL : 'D MMMM YYYY HH:mm',
  21866. LLLL : 'dddd D MMMM YYYY HH:mm'
  21867. },
  21868. meridiemParse: /ص|م/,
  21869. isPM : function (input) {
  21870. return 'م' === input;
  21871. },
  21872. meridiem : function (hour, minute, isLower) {
  21873. if (hour < 12) {
  21874. return 'ص';
  21875. } else {
  21876. return 'م';
  21877. }
  21878. },
  21879. calendar : {
  21880. sameDay: '[اليوم عند الساعة] LT',
  21881. nextDay: '[غدًا عند الساعة] LT',
  21882. nextWeek: 'dddd [عند الساعة] LT',
  21883. lastDay: '[أمس عند الساعة] LT',
  21884. lastWeek: 'dddd [عند الساعة] LT',
  21885. sameElse: 'L'
  21886. },
  21887. relativeTime : {
  21888. future : 'بعد %s',
  21889. past : 'منذ %s',
  21890. s : pluralize('s'),
  21891. ss : pluralize('s'),
  21892. m : pluralize('m'),
  21893. mm : pluralize('m'),
  21894. h : pluralize('h'),
  21895. hh : pluralize('h'),
  21896. d : pluralize('d'),
  21897. dd : pluralize('d'),
  21898. M : pluralize('M'),
  21899. MM : pluralize('M'),
  21900. y : pluralize('y'),
  21901. yy : pluralize('y')
  21902. },
  21903. preparse: function (string) {
  21904. return string.replace(/،/g, ',');
  21905. },
  21906. postformat: function (string) {
  21907. return string.replace(/\d/g, function (match) {
  21908. return symbolMap[match];
  21909. }).replace(/,/g, '،');
  21910. },
  21911. week : {
  21912. dow : 6, // Saturday is the first day of the week.
  21913. doy : 12 // The week that contains Jan 1st is the first week of the year.
  21914. }
  21915. });
  21916. return arLy;
  21917. })));
  21918. /***/ }),
  21919. /* 214 */
  21920. /***/ (function(module, exports, __webpack_require__) {
  21921. //! moment.js locale configuration
  21922. //! locale : Arabic (Morocco) [ar-ma]
  21923. //! author : ElFadili Yassine : https://github.com/ElFadiliY
  21924. //! author : Abdel Said : https://github.com/abdelsaid
  21925. ;(function (global, factory) {
  21926. true ? factory(__webpack_require__(0)) :
  21927. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  21928. factory(global.moment)
  21929. }(this, (function (moment) { 'use strict';
  21930. var arMa = moment.defineLocale('ar-ma', {
  21931. months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
  21932. monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
  21933. weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  21934. weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
  21935. weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  21936. weekdaysParseExact : true,
  21937. longDateFormat : {
  21938. LT : 'HH:mm',
  21939. LTS : 'HH:mm:ss',
  21940. L : 'DD/MM/YYYY',
  21941. LL : 'D MMMM YYYY',
  21942. LLL : 'D MMMM YYYY HH:mm',
  21943. LLLL : 'dddd D MMMM YYYY HH:mm'
  21944. },
  21945. calendar : {
  21946. sameDay: '[اليوم على الساعة] LT',
  21947. nextDay: '[غدا على الساعة] LT',
  21948. nextWeek: 'dddd [على الساعة] LT',
  21949. lastDay: '[أمس على الساعة] LT',
  21950. lastWeek: 'dddd [على الساعة] LT',
  21951. sameElse: 'L'
  21952. },
  21953. relativeTime : {
  21954. future : 'في %s',
  21955. past : 'منذ %s',
  21956. s : 'ثوان',
  21957. ss : '%d ثانية',
  21958. m : 'دقيقة',
  21959. mm : '%d دقائق',
  21960. h : 'ساعة',
  21961. hh : '%d ساعات',
  21962. d : 'يوم',
  21963. dd : '%d أيام',
  21964. M : 'شهر',
  21965. MM : '%d أشهر',
  21966. y : 'سنة',
  21967. yy : '%d سنوات'
  21968. },
  21969. week : {
  21970. dow : 6, // Saturday is the first day of the week.
  21971. doy : 12 // The week that contains Jan 1st is the first week of the year.
  21972. }
  21973. });
  21974. return arMa;
  21975. })));
  21976. /***/ }),
  21977. /* 215 */
  21978. /***/ (function(module, exports, __webpack_require__) {
  21979. //! moment.js locale configuration
  21980. //! locale : Arabic (Saudi Arabia) [ar-sa]
  21981. //! author : Suhail Alkowaileet : https://github.com/xsoh
  21982. ;(function (global, factory) {
  21983. true ? factory(__webpack_require__(0)) :
  21984. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  21985. factory(global.moment)
  21986. }(this, (function (moment) { 'use strict';
  21987. var symbolMap = {
  21988. '1': '١',
  21989. '2': '٢',
  21990. '3': '٣',
  21991. '4': '٤',
  21992. '5': '٥',
  21993. '6': '٦',
  21994. '7': '٧',
  21995. '8': '٨',
  21996. '9': '٩',
  21997. '0': '٠'
  21998. };
  21999. var numberMap = {
  22000. '١': '1',
  22001. '٢': '2',
  22002. '٣': '3',
  22003. '٤': '4',
  22004. '٥': '5',
  22005. '٦': '6',
  22006. '٧': '7',
  22007. '٨': '8',
  22008. '٩': '9',
  22009. '٠': '0'
  22010. };
  22011. var arSa = moment.defineLocale('ar-sa', {
  22012. months : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
  22013. monthsShort : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
  22014. weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  22015. weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  22016. weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  22017. weekdaysParseExact : true,
  22018. longDateFormat : {
  22019. LT : 'HH:mm',
  22020. LTS : 'HH:mm:ss',
  22021. L : 'DD/MM/YYYY',
  22022. LL : 'D MMMM YYYY',
  22023. LLL : 'D MMMM YYYY HH:mm',
  22024. LLLL : 'dddd D MMMM YYYY HH:mm'
  22025. },
  22026. meridiemParse: /ص|م/,
  22027. isPM : function (input) {
  22028. return 'م' === input;
  22029. },
  22030. meridiem : function (hour, minute, isLower) {
  22031. if (hour < 12) {
  22032. return 'ص';
  22033. } else {
  22034. return 'م';
  22035. }
  22036. },
  22037. calendar : {
  22038. sameDay: '[اليوم على الساعة] LT',
  22039. nextDay: '[غدا على الساعة] LT',
  22040. nextWeek: 'dddd [على الساعة] LT',
  22041. lastDay: '[أمس على الساعة] LT',
  22042. lastWeek: 'dddd [على الساعة] LT',
  22043. sameElse: 'L'
  22044. },
  22045. relativeTime : {
  22046. future : 'في %s',
  22047. past : 'منذ %s',
  22048. s : 'ثوان',
  22049. ss : '%d ثانية',
  22050. m : 'دقيقة',
  22051. mm : '%d دقائق',
  22052. h : 'ساعة',
  22053. hh : '%d ساعات',
  22054. d : 'يوم',
  22055. dd : '%d أيام',
  22056. M : 'شهر',
  22057. MM : '%d أشهر',
  22058. y : 'سنة',
  22059. yy : '%d سنوات'
  22060. },
  22061. preparse: function (string) {
  22062. return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
  22063. return numberMap[match];
  22064. }).replace(/،/g, ',');
  22065. },
  22066. postformat: function (string) {
  22067. return string.replace(/\d/g, function (match) {
  22068. return symbolMap[match];
  22069. }).replace(/,/g, '،');
  22070. },
  22071. week : {
  22072. dow : 0, // Sunday is the first day of the week.
  22073. doy : 6 // The week that contains Jan 1st is the first week of the year.
  22074. }
  22075. });
  22076. return arSa;
  22077. })));
  22078. /***/ }),
  22079. /* 216 */
  22080. /***/ (function(module, exports, __webpack_require__) {
  22081. //! moment.js locale configuration
  22082. //! locale : Arabic (Tunisia) [ar-tn]
  22083. //! author : Nader Toukabri : https://github.com/naderio
  22084. ;(function (global, factory) {
  22085. true ? factory(__webpack_require__(0)) :
  22086. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  22087. factory(global.moment)
  22088. }(this, (function (moment) { 'use strict';
  22089. var arTn = moment.defineLocale('ar-tn', {
  22090. months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
  22091. monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
  22092. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  22093. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  22094. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  22095. weekdaysParseExact : true,
  22096. longDateFormat: {
  22097. LT: 'HH:mm',
  22098. LTS: 'HH:mm:ss',
  22099. L: 'DD/MM/YYYY',
  22100. LL: 'D MMMM YYYY',
  22101. LLL: 'D MMMM YYYY HH:mm',
  22102. LLLL: 'dddd D MMMM YYYY HH:mm'
  22103. },
  22104. calendar: {
  22105. sameDay: '[اليوم على الساعة] LT',
  22106. nextDay: '[غدا على الساعة] LT',
  22107. nextWeek: 'dddd [على الساعة] LT',
  22108. lastDay: '[أمس على الساعة] LT',
  22109. lastWeek: 'dddd [على الساعة] LT',
  22110. sameElse: 'L'
  22111. },
  22112. relativeTime: {
  22113. future: 'في %s',
  22114. past: 'منذ %s',
  22115. s: 'ثوان',
  22116. ss : '%d ثانية',
  22117. m: 'دقيقة',
  22118. mm: '%d دقائق',
  22119. h: 'ساعة',
  22120. hh: '%d ساعات',
  22121. d: 'يوم',
  22122. dd: '%d أيام',
  22123. M: 'شهر',
  22124. MM: '%d أشهر',
  22125. y: 'سنة',
  22126. yy: '%d سنوات'
  22127. },
  22128. week: {
  22129. dow: 1, // Monday is the first day of the week.
  22130. doy: 4 // The week that contains Jan 4th is the first week of the year.
  22131. }
  22132. });
  22133. return arTn;
  22134. })));
  22135. /***/ }),
  22136. /* 217 */
  22137. /***/ (function(module, exports, __webpack_require__) {
  22138. //! moment.js locale configuration
  22139. //! locale : Azerbaijani [az]
  22140. //! author : topchiyev : https://github.com/topchiyev
  22141. ;(function (global, factory) {
  22142. true ? factory(__webpack_require__(0)) :
  22143. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  22144. factory(global.moment)
  22145. }(this, (function (moment) { 'use strict';
  22146. var suffixes = {
  22147. 1: '-inci',
  22148. 5: '-inci',
  22149. 8: '-inci',
  22150. 70: '-inci',
  22151. 80: '-inci',
  22152. 2: '-nci',
  22153. 7: '-nci',
  22154. 20: '-nci',
  22155. 50: '-nci',
  22156. 3: '-üncü',
  22157. 4: '-üncü',
  22158. 100: '-üncü',
  22159. 6: '-ncı',
  22160. 9: '-uncu',
  22161. 10: '-uncu',
  22162. 30: '-uncu',
  22163. 60: '-ıncı',
  22164. 90: '-ıncı'
  22165. };
  22166. var az = moment.defineLocale('az', {
  22167. months : 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'),
  22168. monthsShort : 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
  22169. weekdays : 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'),
  22170. weekdaysShort : 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
  22171. weekdaysMin : 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
  22172. weekdaysParseExact : true,
  22173. longDateFormat : {
  22174. LT : 'HH:mm',
  22175. LTS : 'HH:mm:ss',
  22176. L : 'DD.MM.YYYY',
  22177. LL : 'D MMMM YYYY',
  22178. LLL : 'D MMMM YYYY HH:mm',
  22179. LLLL : 'dddd, D MMMM YYYY HH:mm'
  22180. },
  22181. calendar : {
  22182. sameDay : '[bugün saat] LT',
  22183. nextDay : '[sabah saat] LT',
  22184. nextWeek : '[gələn həftə] dddd [saat] LT',
  22185. lastDay : '[dünən] LT',
  22186. lastWeek : '[keçən həftə] dddd [saat] LT',
  22187. sameElse : 'L'
  22188. },
  22189. relativeTime : {
  22190. future : '%s sonra',
  22191. past : '%s əvvəl',
  22192. s : 'birneçə saniyyə',
  22193. ss : '%d saniyə',
  22194. m : 'bir dəqiqə',
  22195. mm : '%d dəqiqə',
  22196. h : 'bir saat',
  22197. hh : '%d saat',
  22198. d : 'bir gün',
  22199. dd : '%d gün',
  22200. M : 'bir ay',
  22201. MM : '%d ay',
  22202. y : 'bir il',
  22203. yy : '%d il'
  22204. },
  22205. meridiemParse: /gecə|səhər|gündüz|axşam/,
  22206. isPM : function (input) {
  22207. return /^(gündüz|axşam)$/.test(input);
  22208. },
  22209. meridiem : function (hour, minute, isLower) {
  22210. if (hour < 4) {
  22211. return 'gecə';
  22212. } else if (hour < 12) {
  22213. return 'səhər';
  22214. } else if (hour < 17) {
  22215. return 'gündüz';
  22216. } else {
  22217. return 'axşam';
  22218. }
  22219. },
  22220. dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
  22221. ordinal : function (number) {
  22222. if (number === 0) { // special case for zero
  22223. return number + '-ıncı';
  22224. }
  22225. var a = number % 10,
  22226. b = number % 100 - a,
  22227. c = number >= 100 ? 100 : null;
  22228. return number + (suffixes[a] || suffixes[b] || suffixes[c]);
  22229. },
  22230. week : {
  22231. dow : 1, // Monday is the first day of the week.
  22232. doy : 7 // The week that contains Jan 1st is the first week of the year.
  22233. }
  22234. });
  22235. return az;
  22236. })));
  22237. /***/ }),
  22238. /* 218 */
  22239. /***/ (function(module, exports, __webpack_require__) {
  22240. //! moment.js locale configuration
  22241. //! locale : Belarusian [be]
  22242. //! author : Dmitry Demidov : https://github.com/demidov91
  22243. //! author: Praleska: http://praleska.pro/
  22244. //! Author : Menelion Elensúle : https://github.com/Oire
  22245. ;(function (global, factory) {
  22246. true ? factory(__webpack_require__(0)) :
  22247. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  22248. factory(global.moment)
  22249. }(this, (function (moment) { 'use strict';
  22250. function plural(word, num) {
  22251. var forms = word.split('_');
  22252. return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
  22253. }
  22254. function relativeTimeWithPlural(number, withoutSuffix, key) {
  22255. var format = {
  22256. 'ss': withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
  22257. 'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
  22258. 'hh': withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
  22259. 'dd': 'дзень_дні_дзён',
  22260. 'MM': 'месяц_месяцы_месяцаў',
  22261. 'yy': 'год_гады_гадоў'
  22262. };
  22263. if (key === 'm') {
  22264. return withoutSuffix ? 'хвіліна' : 'хвіліну';
  22265. }
  22266. else if (key === 'h') {
  22267. return withoutSuffix ? 'гадзіна' : 'гадзіну';
  22268. }
  22269. else {
  22270. return number + ' ' + plural(format[key], +number);
  22271. }
  22272. }
  22273. var be = moment.defineLocale('be', {
  22274. months : {
  22275. format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'),
  22276. standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_')
  22277. },
  22278. monthsShort : 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),
  22279. weekdays : {
  22280. format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'),
  22281. standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'),
  22282. isFormat: /\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/
  22283. },
  22284. weekdaysShort : 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
  22285. weekdaysMin : 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
  22286. longDateFormat : {
  22287. LT : 'HH:mm',
  22288. LTS : 'HH:mm:ss',
  22289. L : 'DD.MM.YYYY',
  22290. LL : 'D MMMM YYYY г.',
  22291. LLL : 'D MMMM YYYY г., HH:mm',
  22292. LLLL : 'dddd, D MMMM YYYY г., HH:mm'
  22293. },
  22294. calendar : {
  22295. sameDay: '[Сёння ў] LT',
  22296. nextDay: '[Заўтра ў] LT',
  22297. lastDay: '[Учора ў] LT',
  22298. nextWeek: function () {
  22299. return '[У] dddd [ў] LT';
  22300. },
  22301. lastWeek: function () {
  22302. switch (this.day()) {
  22303. case 0:
  22304. case 3:
  22305. case 5:
  22306. case 6:
  22307. return '[У мінулую] dddd [ў] LT';
  22308. case 1:
  22309. case 2:
  22310. case 4:
  22311. return '[У мінулы] dddd [ў] LT';
  22312. }
  22313. },
  22314. sameElse: 'L'
  22315. },
  22316. relativeTime : {
  22317. future : 'праз %s',
  22318. past : '%s таму',
  22319. s : 'некалькі секунд',
  22320. m : relativeTimeWithPlural,
  22321. mm : relativeTimeWithPlural,
  22322. h : relativeTimeWithPlural,
  22323. hh : relativeTimeWithPlural,
  22324. d : 'дзень',
  22325. dd : relativeTimeWithPlural,
  22326. M : 'месяц',
  22327. MM : relativeTimeWithPlural,
  22328. y : 'год',
  22329. yy : relativeTimeWithPlural
  22330. },
  22331. meridiemParse: /ночы|раніцы|дня|вечара/,
  22332. isPM : function (input) {
  22333. return /^(дня|вечара)$/.test(input);
  22334. },
  22335. meridiem : function (hour, minute, isLower) {
  22336. if (hour < 4) {
  22337. return 'ночы';
  22338. } else if (hour < 12) {
  22339. return 'раніцы';
  22340. } else if (hour < 17) {
  22341. return 'дня';
  22342. } else {
  22343. return 'вечара';
  22344. }
  22345. },
  22346. dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
  22347. ordinal: function (number, period) {
  22348. switch (period) {
  22349. case 'M':
  22350. case 'd':
  22351. case 'DDD':
  22352. case 'w':
  22353. case 'W':
  22354. return (number % 10 === 2 || number % 10 === 3) && (number % 100 !== 12 && number % 100 !== 13) ? number + '-і' : number + '-ы';
  22355. case 'D':
  22356. return number + '-га';
  22357. default:
  22358. return number;
  22359. }
  22360. },
  22361. week : {
  22362. dow : 1, // Monday is the first day of the week.
  22363. doy : 7 // The week that contains Jan 1st is the first week of the year.
  22364. }
  22365. });
  22366. return be;
  22367. })));
  22368. /***/ }),
  22369. /* 219 */
  22370. /***/ (function(module, exports, __webpack_require__) {
  22371. //! moment.js locale configuration
  22372. //! locale : Bulgarian [bg]
  22373. //! author : Krasen Borisov : https://github.com/kraz
  22374. ;(function (global, factory) {
  22375. true ? factory(__webpack_require__(0)) :
  22376. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  22377. factory(global.moment)
  22378. }(this, (function (moment) { 'use strict';
  22379. var bg = moment.defineLocale('bg', {
  22380. months : 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'),
  22381. monthsShort : 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
  22382. weekdays : 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'),
  22383. weekdaysShort : 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
  22384. weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  22385. longDateFormat : {
  22386. LT : 'H:mm',
  22387. LTS : 'H:mm:ss',
  22388. L : 'D.MM.YYYY',
  22389. LL : 'D MMMM YYYY',
  22390. LLL : 'D MMMM YYYY H:mm',
  22391. LLLL : 'dddd, D MMMM YYYY H:mm'
  22392. },
  22393. calendar : {
  22394. sameDay : '[Днес в] LT',
  22395. nextDay : '[Утре в] LT',
  22396. nextWeek : 'dddd [в] LT',
  22397. lastDay : '[Вчера в] LT',
  22398. lastWeek : function () {
  22399. switch (this.day()) {
  22400. case 0:
  22401. case 3:
  22402. case 6:
  22403. return '[В изминалата] dddd [в] LT';
  22404. case 1:
  22405. case 2:
  22406. case 4:
  22407. case 5:
  22408. return '[В изминалия] dddd [в] LT';
  22409. }
  22410. },
  22411. sameElse : 'L'
  22412. },
  22413. relativeTime : {
  22414. future : 'след %s',
  22415. past : 'преди %s',
  22416. s : 'няколко секунди',
  22417. ss : '%d секунди',
  22418. m : 'минута',
  22419. mm : '%d минути',
  22420. h : 'час',
  22421. hh : '%d часа',
  22422. d : 'ден',
  22423. dd : '%d дни',
  22424. M : 'месец',
  22425. MM : '%d месеца',
  22426. y : 'година',
  22427. yy : '%d години'
  22428. },
  22429. dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
  22430. ordinal : function (number) {
  22431. var lastDigit = number % 10,
  22432. last2Digits = number % 100;
  22433. if (number === 0) {
  22434. return number + '-ев';
  22435. } else if (last2Digits === 0) {
  22436. return number + '-ен';
  22437. } else if (last2Digits > 10 && last2Digits < 20) {
  22438. return number + '-ти';
  22439. } else if (lastDigit === 1) {
  22440. return number + '-ви';
  22441. } else if (lastDigit === 2) {
  22442. return number + '-ри';
  22443. } else if (lastDigit === 7 || lastDigit === 8) {
  22444. return number + '-ми';
  22445. } else {
  22446. return number + '-ти';
  22447. }
  22448. },
  22449. week : {
  22450. dow : 1, // Monday is the first day of the week.
  22451. doy : 7 // The week that contains Jan 1st is the first week of the year.
  22452. }
  22453. });
  22454. return bg;
  22455. })));
  22456. /***/ }),
  22457. /* 220 */
  22458. /***/ (function(module, exports, __webpack_require__) {
  22459. //! moment.js locale configuration
  22460. //! locale : Bambara [bm]
  22461. //! author : Estelle Comment : https://github.com/estellecomment
  22462. ;(function (global, factory) {
  22463. true ? factory(__webpack_require__(0)) :
  22464. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  22465. factory(global.moment)
  22466. }(this, (function (moment) { 'use strict';
  22467. // Language contact person : Abdoufata Kane : https://github.com/abdoufata
  22468. var bm = moment.defineLocale('bm', {
  22469. months : 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split('_'),
  22470. monthsShort : 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),
  22471. weekdays : 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),
  22472. weekdaysShort : 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),
  22473. weekdaysMin : 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),
  22474. longDateFormat : {
  22475. LT : 'HH:mm',
  22476. LTS : 'HH:mm:ss',
  22477. L : 'DD/MM/YYYY',
  22478. LL : 'MMMM [tile] D [san] YYYY',
  22479. LLL : 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
  22480. LLLL : 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm'
  22481. },
  22482. calendar : {
  22483. sameDay : '[Bi lɛrɛ] LT',
  22484. nextDay : '[Sini lɛrɛ] LT',
  22485. nextWeek : 'dddd [don lɛrɛ] LT',
  22486. lastDay : '[Kunu lɛrɛ] LT',
  22487. lastWeek : 'dddd [tɛmɛnen lɛrɛ] LT',
  22488. sameElse : 'L'
  22489. },
  22490. relativeTime : {
  22491. future : '%s kɔnɔ',
  22492. past : 'a bɛ %s bɔ',
  22493. s : 'sanga dama dama',
  22494. ss : 'sekondi %d',
  22495. m : 'miniti kelen',
  22496. mm : 'miniti %d',
  22497. h : 'lɛrɛ kelen',
  22498. hh : 'lɛrɛ %d',
  22499. d : 'tile kelen',
  22500. dd : 'tile %d',
  22501. M : 'kalo kelen',
  22502. MM : 'kalo %d',
  22503. y : 'san kelen',
  22504. yy : 'san %d'
  22505. },
  22506. week : {
  22507. dow : 1, // Monday is the first day of the week.
  22508. doy : 4 // The week that contains Jan 4th is the first week of the year.
  22509. }
  22510. });
  22511. return bm;
  22512. })));
  22513. /***/ }),
  22514. /* 221 */
  22515. /***/ (function(module, exports, __webpack_require__) {
  22516. //! moment.js locale configuration
  22517. //! locale : Bengali [bn]
  22518. //! author : Kaushik Gandhi : https://github.com/kaushikgandhi
  22519. ;(function (global, factory) {
  22520. true ? factory(__webpack_require__(0)) :
  22521. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  22522. factory(global.moment)
  22523. }(this, (function (moment) { 'use strict';
  22524. var symbolMap = {
  22525. '1': '১',
  22526. '2': '২',
  22527. '3': '৩',
  22528. '4': '৪',
  22529. '5': '৫',
  22530. '6': '৬',
  22531. '7': '৭',
  22532. '8': '৮',
  22533. '9': '৯',
  22534. '0': '০'
  22535. };
  22536. var numberMap = {
  22537. '১': '1',
  22538. '২': '2',
  22539. '৩': '3',
  22540. '৪': '4',
  22541. '৫': '5',
  22542. '৬': '6',
  22543. '৭': '7',
  22544. '৮': '8',
  22545. '৯': '9',
  22546. '০': '0'
  22547. };
  22548. var bn = moment.defineLocale('bn', {
  22549. months : 'জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'),
  22550. monthsShort : 'জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'),
  22551. weekdays : 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'),
  22552. weekdaysShort : 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
  22553. weekdaysMin : 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'),
  22554. longDateFormat : {
  22555. LT : 'A h:mm সময়',
  22556. LTS : 'A h:mm:ss সময়',
  22557. L : 'DD/MM/YYYY',
  22558. LL : 'D MMMM YYYY',
  22559. LLL : 'D MMMM YYYY, A h:mm সময়',
  22560. LLLL : 'dddd, D MMMM YYYY, A h:mm সময়'
  22561. },
  22562. calendar : {
  22563. sameDay : '[আজ] LT',
  22564. nextDay : '[আগামীকাল] LT',
  22565. nextWeek : 'dddd, LT',
  22566. lastDay : '[গতকাল] LT',
  22567. lastWeek : '[গত] dddd, LT',
  22568. sameElse : 'L'
  22569. },
  22570. relativeTime : {
  22571. future : '%s পরে',
  22572. past : '%s আগে',
  22573. s : 'কয়েক সেকেন্ড',
  22574. ss : '%d সেকেন্ড',
  22575. m : 'এক মিনিট',
  22576. mm : '%d মিনিট',
  22577. h : 'এক ঘন্টা',
  22578. hh : '%d ঘন্টা',
  22579. d : 'এক দিন',
  22580. dd : '%d দিন',
  22581. M : 'এক মাস',
  22582. MM : '%d মাস',
  22583. y : 'এক বছর',
  22584. yy : '%d বছর'
  22585. },
  22586. preparse: function (string) {
  22587. return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
  22588. return numberMap[match];
  22589. });
  22590. },
  22591. postformat: function (string) {
  22592. return string.replace(/\d/g, function (match) {
  22593. return symbolMap[match];
  22594. });
  22595. },
  22596. meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,
  22597. meridiemHour : function (hour, meridiem) {
  22598. if (hour === 12) {
  22599. hour = 0;
  22600. }
  22601. if ((meridiem === 'রাত' && hour >= 4) ||
  22602. (meridiem === 'দুপুর' && hour < 5) ||
  22603. meridiem === 'বিকাল') {
  22604. return hour + 12;
  22605. } else {
  22606. return hour;
  22607. }
  22608. },
  22609. meridiem : function (hour, minute, isLower) {
  22610. if (hour < 4) {
  22611. return 'রাত';
  22612. } else if (hour < 10) {
  22613. return 'সকাল';
  22614. } else if (hour < 17) {
  22615. return 'দুপুর';
  22616. } else if (hour < 20) {
  22617. return 'বিকাল';
  22618. } else {
  22619. return 'রাত';
  22620. }
  22621. },
  22622. week : {
  22623. dow : 0, // Sunday is the first day of the week.
  22624. doy : 6 // The week that contains Jan 1st is the first week of the year.
  22625. }
  22626. });
  22627. return bn;
  22628. })));
  22629. /***/ }),
  22630. /* 222 */
  22631. /***/ (function(module, exports, __webpack_require__) {
  22632. //! moment.js locale configuration
  22633. //! locale : Tibetan [bo]
  22634. //! author : Thupten N. Chakrishar : https://github.com/vajradog
  22635. ;(function (global, factory) {
  22636. true ? factory(__webpack_require__(0)) :
  22637. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  22638. factory(global.moment)
  22639. }(this, (function (moment) { 'use strict';
  22640. var symbolMap = {
  22641. '1': '༡',
  22642. '2': '༢',
  22643. '3': '༣',
  22644. '4': '༤',
  22645. '5': '༥',
  22646. '6': '༦',
  22647. '7': '༧',
  22648. '8': '༨',
  22649. '9': '༩',
  22650. '0': '༠'
  22651. };
  22652. var numberMap = {
  22653. '༡': '1',
  22654. '༢': '2',
  22655. '༣': '3',
  22656. '༤': '4',
  22657. '༥': '5',
  22658. '༦': '6',
  22659. '༧': '7',
  22660. '༨': '8',
  22661. '༩': '9',
  22662. '༠': '0'
  22663. };
  22664. var bo = moment.defineLocale('bo', {
  22665. months : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),
  22666. monthsShort : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),
  22667. weekdays : 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'),
  22668. weekdaysShort : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),
  22669. weekdaysMin : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),
  22670. longDateFormat : {
  22671. LT : 'A h:mm',
  22672. LTS : 'A h:mm:ss',
  22673. L : 'DD/MM/YYYY',
  22674. LL : 'D MMMM YYYY',
  22675. LLL : 'D MMMM YYYY, A h:mm',
  22676. LLLL : 'dddd, D MMMM YYYY, A h:mm'
  22677. },
  22678. calendar : {
  22679. sameDay : '[དི་རིང] LT',
  22680. nextDay : '[སང་ཉིན] LT',
  22681. nextWeek : '[བདུན་ཕྲག་རྗེས་མ], LT',
  22682. lastDay : '[ཁ་སང] LT',
  22683. lastWeek : '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
  22684. sameElse : 'L'
  22685. },
  22686. relativeTime : {
  22687. future : '%s ལ་',
  22688. past : '%s སྔན་ལ',
  22689. s : 'ལམ་སང',
  22690. ss : '%d སྐར་ཆ།',
  22691. m : 'སྐར་མ་གཅིག',
  22692. mm : '%d སྐར་མ',
  22693. h : 'ཆུ་ཚོད་གཅིག',
  22694. hh : '%d ཆུ་ཚོད',
  22695. d : 'ཉིན་གཅིག',
  22696. dd : '%d ཉིན་',
  22697. M : 'ཟླ་བ་གཅིག',
  22698. MM : '%d ཟླ་བ',
  22699. y : 'ལོ་གཅིག',
  22700. yy : '%d ལོ'
  22701. },
  22702. preparse: function (string) {
  22703. return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
  22704. return numberMap[match];
  22705. });
  22706. },
  22707. postformat: function (string) {
  22708. return string.replace(/\d/g, function (match) {
  22709. return symbolMap[match];
  22710. });
  22711. },
  22712. meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
  22713. meridiemHour : function (hour, meridiem) {
  22714. if (hour === 12) {
  22715. hour = 0;
  22716. }
  22717. if ((meridiem === 'མཚན་མོ' && hour >= 4) ||
  22718. (meridiem === 'ཉིན་གུང' && hour < 5) ||
  22719. meridiem === 'དགོང་དག') {
  22720. return hour + 12;
  22721. } else {
  22722. return hour;
  22723. }
  22724. },
  22725. meridiem : function (hour, minute, isLower) {
  22726. if (hour < 4) {
  22727. return 'མཚན་མོ';
  22728. } else if (hour < 10) {
  22729. return 'ཞོགས་ཀས';
  22730. } else if (hour < 17) {
  22731. return 'ཉིན་གུང';
  22732. } else if (hour < 20) {
  22733. return 'དགོང་དག';
  22734. } else {
  22735. return 'མཚན་མོ';
  22736. }
  22737. },
  22738. week : {
  22739. dow : 0, // Sunday is the first day of the week.
  22740. doy : 6 // The week that contains Jan 1st is the first week of the year.
  22741. }
  22742. });
  22743. return bo;
  22744. })));
  22745. /***/ }),
  22746. /* 223 */
  22747. /***/ (function(module, exports, __webpack_require__) {
  22748. //! moment.js locale configuration
  22749. //! locale : Breton [br]
  22750. //! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
  22751. ;(function (global, factory) {
  22752. true ? factory(__webpack_require__(0)) :
  22753. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  22754. factory(global.moment)
  22755. }(this, (function (moment) { 'use strict';
  22756. function relativeTimeWithMutation(number, withoutSuffix, key) {
  22757. var format = {
  22758. 'mm': 'munutenn',
  22759. 'MM': 'miz',
  22760. 'dd': 'devezh'
  22761. };
  22762. return number + ' ' + mutation(format[key], number);
  22763. }
  22764. function specialMutationForYears(number) {
  22765. switch (lastNumber(number)) {
  22766. case 1:
  22767. case 3:
  22768. case 4:
  22769. case 5:
  22770. case 9:
  22771. return number + ' bloaz';
  22772. default:
  22773. return number + ' vloaz';
  22774. }
  22775. }
  22776. function lastNumber(number) {
  22777. if (number > 9) {
  22778. return lastNumber(number % 10);
  22779. }
  22780. return number;
  22781. }
  22782. function mutation(text, number) {
  22783. if (number === 2) {
  22784. return softMutation(text);
  22785. }
  22786. return text;
  22787. }
  22788. function softMutation(text) {
  22789. var mutationTable = {
  22790. 'm': 'v',
  22791. 'b': 'v',
  22792. 'd': 'z'
  22793. };
  22794. if (mutationTable[text.charAt(0)] === undefined) {
  22795. return text;
  22796. }
  22797. return mutationTable[text.charAt(0)] + text.substring(1);
  22798. }
  22799. var br = moment.defineLocale('br', {
  22800. months : 'Genver_C\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'),
  22801. monthsShort : 'Gen_C\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
  22802. weekdays : 'Sul_Lun_Meurzh_Merc\'her_Yaou_Gwener_Sadorn'.split('_'),
  22803. weekdaysShort : 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
  22804. weekdaysMin : 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
  22805. weekdaysParseExact : true,
  22806. longDateFormat : {
  22807. LT : 'h[e]mm A',
  22808. LTS : 'h[e]mm:ss A',
  22809. L : 'DD/MM/YYYY',
  22810. LL : 'D [a viz] MMMM YYYY',
  22811. LLL : 'D [a viz] MMMM YYYY h[e]mm A',
  22812. LLLL : 'dddd, D [a viz] MMMM YYYY h[e]mm A'
  22813. },
  22814. calendar : {
  22815. sameDay : '[Hiziv da] LT',
  22816. nextDay : '[Warc\'hoazh da] LT',
  22817. nextWeek : 'dddd [da] LT',
  22818. lastDay : '[Dec\'h da] LT',
  22819. lastWeek : 'dddd [paset da] LT',
  22820. sameElse : 'L'
  22821. },
  22822. relativeTime : {
  22823. future : 'a-benn %s',
  22824. past : '%s \'zo',
  22825. s : 'un nebeud segondennoù',
  22826. ss : '%d eilenn',
  22827. m : 'ur vunutenn',
  22828. mm : relativeTimeWithMutation,
  22829. h : 'un eur',
  22830. hh : '%d eur',
  22831. d : 'un devezh',
  22832. dd : relativeTimeWithMutation,
  22833. M : 'ur miz',
  22834. MM : relativeTimeWithMutation,
  22835. y : 'ur bloaz',
  22836. yy : specialMutationForYears
  22837. },
  22838. dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
  22839. ordinal : function (number) {
  22840. var output = (number === 1) ? 'añ' : 'vet';
  22841. return number + output;
  22842. },
  22843. week : {
  22844. dow : 1, // Monday is the first day of the week.
  22845. doy : 4 // The week that contains Jan 4th is the first week of the year.
  22846. }
  22847. });
  22848. return br;
  22849. })));
  22850. /***/ }),
  22851. /* 224 */
  22852. /***/ (function(module, exports, __webpack_require__) {
  22853. //! moment.js locale configuration
  22854. //! locale : Bosnian [bs]
  22855. //! author : Nedim Cholich : https://github.com/frontyard
  22856. //! based on (hr) translation by Bojan Marković
  22857. ;(function (global, factory) {
  22858. true ? factory(__webpack_require__(0)) :
  22859. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  22860. factory(global.moment)
  22861. }(this, (function (moment) { 'use strict';
  22862. function translate(number, withoutSuffix, key) {
  22863. var result = number + ' ';
  22864. switch (key) {
  22865. case 'ss':
  22866. if (number === 1) {
  22867. result += 'sekunda';
  22868. } else if (number === 2 || number === 3 || number === 4) {
  22869. result += 'sekunde';
  22870. } else {
  22871. result += 'sekundi';
  22872. }
  22873. return result;
  22874. case 'm':
  22875. return withoutSuffix ? 'jedna minuta' : 'jedne minute';
  22876. case 'mm':
  22877. if (number === 1) {
  22878. result += 'minuta';
  22879. } else if (number === 2 || number === 3 || number === 4) {
  22880. result += 'minute';
  22881. } else {
  22882. result += 'minuta';
  22883. }
  22884. return result;
  22885. case 'h':
  22886. return withoutSuffix ? 'jedan sat' : 'jednog sata';
  22887. case 'hh':
  22888. if (number === 1) {
  22889. result += 'sat';
  22890. } else if (number === 2 || number === 3 || number === 4) {
  22891. result += 'sata';
  22892. } else {
  22893. result += 'sati';
  22894. }
  22895. return result;
  22896. case 'dd':
  22897. if (number === 1) {
  22898. result += 'dan';
  22899. } else {
  22900. result += 'dana';
  22901. }
  22902. return result;
  22903. case 'MM':
  22904. if (number === 1) {
  22905. result += 'mjesec';
  22906. } else if (number === 2 || number === 3 || number === 4) {
  22907. result += 'mjeseca';
  22908. } else {
  22909. result += 'mjeseci';
  22910. }
  22911. return result;
  22912. case 'yy':
  22913. if (number === 1) {
  22914. result += 'godina';
  22915. } else if (number === 2 || number === 3 || number === 4) {
  22916. result += 'godine';
  22917. } else {
  22918. result += 'godina';
  22919. }
  22920. return result;
  22921. }
  22922. }
  22923. var bs = moment.defineLocale('bs', {
  22924. months : 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'),
  22925. monthsShort : 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'),
  22926. monthsParseExact: true,
  22927. weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
  22928. weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  22929. weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'),
  22930. weekdaysParseExact : true,
  22931. longDateFormat : {
  22932. LT : 'H:mm',
  22933. LTS : 'H:mm:ss',
  22934. L : 'DD.MM.YYYY',
  22935. LL : 'D. MMMM YYYY',
  22936. LLL : 'D. MMMM YYYY H:mm',
  22937. LLLL : 'dddd, D. MMMM YYYY H:mm'
  22938. },
  22939. calendar : {
  22940. sameDay : '[danas u] LT',
  22941. nextDay : '[sutra u] LT',
  22942. nextWeek : function () {
  22943. switch (this.day()) {
  22944. case 0:
  22945. return '[u] [nedjelju] [u] LT';
  22946. case 3:
  22947. return '[u] [srijedu] [u] LT';
  22948. case 6:
  22949. return '[u] [subotu] [u] LT';
  22950. case 1:
  22951. case 2:
  22952. case 4:
  22953. case 5:
  22954. return '[u] dddd [u] LT';
  22955. }
  22956. },
  22957. lastDay : '[jučer u] LT',
  22958. lastWeek : function () {
  22959. switch (this.day()) {
  22960. case 0:
  22961. case 3:
  22962. return '[prošlu] dddd [u] LT';
  22963. case 6:
  22964. return '[prošle] [subote] [u] LT';
  22965. case 1:
  22966. case 2:
  22967. case 4:
  22968. case 5:
  22969. return '[prošli] dddd [u] LT';
  22970. }
  22971. },
  22972. sameElse : 'L'
  22973. },
  22974. relativeTime : {
  22975. future : 'za %s',
  22976. past : 'prije %s',
  22977. s : 'par sekundi',
  22978. ss : translate,
  22979. m : translate,
  22980. mm : translate,
  22981. h : translate,
  22982. hh : translate,
  22983. d : 'dan',
  22984. dd : translate,
  22985. M : 'mjesec',
  22986. MM : translate,
  22987. y : 'godinu',
  22988. yy : translate
  22989. },
  22990. dayOfMonthOrdinalParse: /\d{1,2}\./,
  22991. ordinal : '%d.',
  22992. week : {
  22993. dow : 1, // Monday is the first day of the week.
  22994. doy : 7 // The week that contains Jan 1st is the first week of the year.
  22995. }
  22996. });
  22997. return bs;
  22998. })));
  22999. /***/ }),
  23000. /* 225 */
  23001. /***/ (function(module, exports, __webpack_require__) {
  23002. //! moment.js locale configuration
  23003. //! locale : Catalan [ca]
  23004. //! author : Juan G. Hurtado : https://github.com/juanghurtado
  23005. ;(function (global, factory) {
  23006. true ? factory(__webpack_require__(0)) :
  23007. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  23008. factory(global.moment)
  23009. }(this, (function (moment) { 'use strict';
  23010. var ca = moment.defineLocale('ca', {
  23011. months : {
  23012. standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
  23013. format: 'de gener_de febrer_de març_d\'abril_de maig_de juny_de juliol_d\'agost_de setembre_d\'octubre_de novembre_de desembre'.split('_'),
  23014. isFormat: /D[oD]?(\s)+MMMM/
  23015. },
  23016. monthsShort : 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'),
  23017. monthsParseExact : true,
  23018. weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
  23019. weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
  23020. weekdaysMin : 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
  23021. weekdaysParseExact : true,
  23022. longDateFormat : {
  23023. LT : 'H:mm',
  23024. LTS : 'H:mm:ss',
  23025. L : 'DD/MM/YYYY',
  23026. LL : 'D MMMM [de] YYYY',
  23027. ll : 'D MMM YYYY',
  23028. LLL : 'D MMMM [de] YYYY [a les] H:mm',
  23029. lll : 'D MMM YYYY, H:mm',
  23030. LLLL : 'dddd D MMMM [de] YYYY [a les] H:mm',
  23031. llll : 'ddd D MMM YYYY, H:mm'
  23032. },
  23033. calendar : {
  23034. sameDay : function () {
  23035. return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  23036. },
  23037. nextDay : function () {
  23038. return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  23039. },
  23040. nextWeek : function () {
  23041. return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  23042. },
  23043. lastDay : function () {
  23044. return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  23045. },
  23046. lastWeek : function () {
  23047. return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  23048. },
  23049. sameElse : 'L'
  23050. },
  23051. relativeTime : {
  23052. future : 'd\'aquí %s',
  23053. past : 'fa %s',
  23054. s : 'uns segons',
  23055. ss : '%d segons',
  23056. m : 'un minut',
  23057. mm : '%d minuts',
  23058. h : 'una hora',
  23059. hh : '%d hores',
  23060. d : 'un dia',
  23061. dd : '%d dies',
  23062. M : 'un mes',
  23063. MM : '%d mesos',
  23064. y : 'un any',
  23065. yy : '%d anys'
  23066. },
  23067. dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
  23068. ordinal : function (number, period) {
  23069. var output = (number === 1) ? 'r' :
  23070. (number === 2) ? 'n' :
  23071. (number === 3) ? 'r' :
  23072. (number === 4) ? 't' : 'è';
  23073. if (period === 'w' || period === 'W') {
  23074. output = 'a';
  23075. }
  23076. return number + output;
  23077. },
  23078. week : {
  23079. dow : 1, // Monday is the first day of the week.
  23080. doy : 4 // The week that contains Jan 4th is the first week of the year.
  23081. }
  23082. });
  23083. return ca;
  23084. })));
  23085. /***/ }),
  23086. /* 226 */
  23087. /***/ (function(module, exports, __webpack_require__) {
  23088. //! moment.js locale configuration
  23089. //! locale : Czech [cs]
  23090. //! author : petrbela : https://github.com/petrbela
  23091. ;(function (global, factory) {
  23092. true ? factory(__webpack_require__(0)) :
  23093. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  23094. factory(global.moment)
  23095. }(this, (function (moment) { 'use strict';
  23096. var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_');
  23097. var monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');
  23098. function plural(n) {
  23099. return (n > 1) && (n < 5) && (~~(n / 10) !== 1);
  23100. }
  23101. function translate(number, withoutSuffix, key, isFuture) {
  23102. var result = number + ' ';
  23103. switch (key) {
  23104. case 's': // a few seconds / in a few seconds / a few seconds ago
  23105. return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';
  23106. case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
  23107. if (withoutSuffix || isFuture) {
  23108. return result + (plural(number) ? 'sekundy' : 'sekund');
  23109. } else {
  23110. return result + 'sekundami';
  23111. }
  23112. break;
  23113. case 'm': // a minute / in a minute / a minute ago
  23114. return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');
  23115. case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
  23116. if (withoutSuffix || isFuture) {
  23117. return result + (plural(number) ? 'minuty' : 'minut');
  23118. } else {
  23119. return result + 'minutami';
  23120. }
  23121. break;
  23122. case 'h': // an hour / in an hour / an hour ago
  23123. return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
  23124. case 'hh': // 9 hours / in 9 hours / 9 hours ago
  23125. if (withoutSuffix || isFuture) {
  23126. return result + (plural(number) ? 'hodiny' : 'hodin');
  23127. } else {
  23128. return result + 'hodinami';
  23129. }
  23130. break;
  23131. case 'd': // a day / in a day / a day ago
  23132. return (withoutSuffix || isFuture) ? 'den' : 'dnem';
  23133. case 'dd': // 9 days / in 9 days / 9 days ago
  23134. if (withoutSuffix || isFuture) {
  23135. return result + (plural(number) ? 'dny' : 'dní');
  23136. } else {
  23137. return result + 'dny';
  23138. }
  23139. break;
  23140. case 'M': // a month / in a month / a month ago
  23141. return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';
  23142. case 'MM': // 9 months / in 9 months / 9 months ago
  23143. if (withoutSuffix || isFuture) {
  23144. return result + (plural(number) ? 'měsíce' : 'měsíců');
  23145. } else {
  23146. return result + 'měsíci';
  23147. }
  23148. break;
  23149. case 'y': // a year / in a year / a year ago
  23150. return (withoutSuffix || isFuture) ? 'rok' : 'rokem';
  23151. case 'yy': // 9 years / in 9 years / 9 years ago
  23152. if (withoutSuffix || isFuture) {
  23153. return result + (plural(number) ? 'roky' : 'let');
  23154. } else {
  23155. return result + 'lety';
  23156. }
  23157. break;
  23158. }
  23159. }
  23160. var cs = moment.defineLocale('cs', {
  23161. months : months,
  23162. monthsShort : monthsShort,
  23163. monthsParse : (function (months, monthsShort) {
  23164. var i, _monthsParse = [];
  23165. for (i = 0; i < 12; i++) {
  23166. // use custom parser to solve problem with July (červenec)
  23167. _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
  23168. }
  23169. return _monthsParse;
  23170. }(months, monthsShort)),
  23171. shortMonthsParse : (function (monthsShort) {
  23172. var i, _shortMonthsParse = [];
  23173. for (i = 0; i < 12; i++) {
  23174. _shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i');
  23175. }
  23176. return _shortMonthsParse;
  23177. }(monthsShort)),
  23178. longMonthsParse : (function (months) {
  23179. var i, _longMonthsParse = [];
  23180. for (i = 0; i < 12; i++) {
  23181. _longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i');
  23182. }
  23183. return _longMonthsParse;
  23184. }(months)),
  23185. weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
  23186. weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'),
  23187. weekdaysMin : 'ne_po_út_st_čt_pá_so'.split('_'),
  23188. longDateFormat : {
  23189. LT: 'H:mm',
  23190. LTS : 'H:mm:ss',
  23191. L : 'DD.MM.YYYY',
  23192. LL : 'D. MMMM YYYY',
  23193. LLL : 'D. MMMM YYYY H:mm',
  23194. LLLL : 'dddd D. MMMM YYYY H:mm',
  23195. l : 'D. M. YYYY'
  23196. },
  23197. calendar : {
  23198. sameDay: '[dnes v] LT',
  23199. nextDay: '[zítra v] LT',
  23200. nextWeek: function () {
  23201. switch (this.day()) {
  23202. case 0:
  23203. return '[v neděli v] LT';
  23204. case 1:
  23205. case 2:
  23206. return '[v] dddd [v] LT';
  23207. case 3:
  23208. return '[ve středu v] LT';
  23209. case 4:
  23210. return '[ve čtvrtek v] LT';
  23211. case 5:
  23212. return '[v pátek v] LT';
  23213. case 6:
  23214. return '[v sobotu v] LT';
  23215. }
  23216. },
  23217. lastDay: '[včera v] LT',
  23218. lastWeek: function () {
  23219. switch (this.day()) {
  23220. case 0:
  23221. return '[minulou neděli v] LT';
  23222. case 1:
  23223. case 2:
  23224. return '[minulé] dddd [v] LT';
  23225. case 3:
  23226. return '[minulou středu v] LT';
  23227. case 4:
  23228. case 5:
  23229. return '[minulý] dddd [v] LT';
  23230. case 6:
  23231. return '[minulou sobotu v] LT';
  23232. }
  23233. },
  23234. sameElse: 'L'
  23235. },
  23236. relativeTime : {
  23237. future : 'za %s',
  23238. past : 'před %s',
  23239. s : translate,
  23240. ss : translate,
  23241. m : translate,
  23242. mm : translate,
  23243. h : translate,
  23244. hh : translate,
  23245. d : translate,
  23246. dd : translate,
  23247. M : translate,
  23248. MM : translate,
  23249. y : translate,
  23250. yy : translate
  23251. },
  23252. dayOfMonthOrdinalParse : /\d{1,2}\./,
  23253. ordinal : '%d.',
  23254. week : {
  23255. dow : 1, // Monday is the first day of the week.
  23256. doy : 4 // The week that contains Jan 4th is the first week of the year.
  23257. }
  23258. });
  23259. return cs;
  23260. })));
  23261. /***/ }),
  23262. /* 227 */
  23263. /***/ (function(module, exports, __webpack_require__) {
  23264. //! moment.js locale configuration
  23265. //! locale : Chuvash [cv]
  23266. //! author : Anatoly Mironov : https://github.com/mirontoli
  23267. ;(function (global, factory) {
  23268. true ? factory(__webpack_require__(0)) :
  23269. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  23270. factory(global.moment)
  23271. }(this, (function (moment) { 'use strict';
  23272. var cv = moment.defineLocale('cv', {
  23273. months : 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'),
  23274. monthsShort : 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
  23275. weekdays : 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'),
  23276. weekdaysShort : 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
  23277. weekdaysMin : 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
  23278. longDateFormat : {
  23279. LT : 'HH:mm',
  23280. LTS : 'HH:mm:ss',
  23281. L : 'DD-MM-YYYY',
  23282. LL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
  23283. LLL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
  23284. LLLL : 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm'
  23285. },
  23286. calendar : {
  23287. sameDay: '[Паян] LT [сехетре]',
  23288. nextDay: '[Ыран] LT [сехетре]',
  23289. lastDay: '[Ӗнер] LT [сехетре]',
  23290. nextWeek: '[Ҫитес] dddd LT [сехетре]',
  23291. lastWeek: '[Иртнӗ] dddd LT [сехетре]',
  23292. sameElse: 'L'
  23293. },
  23294. relativeTime : {
  23295. future : function (output) {
  23296. var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран';
  23297. return output + affix;
  23298. },
  23299. past : '%s каялла',
  23300. s : 'пӗр-ик ҫеккунт',
  23301. ss : '%d ҫеккунт',
  23302. m : 'пӗр минут',
  23303. mm : '%d минут',
  23304. h : 'пӗр сехет',
  23305. hh : '%d сехет',
  23306. d : 'пӗр кун',
  23307. dd : '%d кун',
  23308. M : 'пӗр уйӑх',
  23309. MM : '%d уйӑх',
  23310. y : 'пӗр ҫул',
  23311. yy : '%d ҫул'
  23312. },
  23313. dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
  23314. ordinal : '%d-мӗш',
  23315. week : {
  23316. dow : 1, // Monday is the first day of the week.
  23317. doy : 7 // The week that contains Jan 1st is the first week of the year.
  23318. }
  23319. });
  23320. return cv;
  23321. })));
  23322. /***/ }),
  23323. /* 228 */
  23324. /***/ (function(module, exports, __webpack_require__) {
  23325. //! moment.js locale configuration
  23326. //! locale : Welsh [cy]
  23327. //! author : Robert Allen : https://github.com/robgallen
  23328. //! author : https://github.com/ryangreaves
  23329. ;(function (global, factory) {
  23330. true ? factory(__webpack_require__(0)) :
  23331. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  23332. factory(global.moment)
  23333. }(this, (function (moment) { 'use strict';
  23334. var cy = moment.defineLocale('cy', {
  23335. months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'),
  23336. monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'),
  23337. weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'),
  23338. weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
  23339. weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
  23340. weekdaysParseExact : true,
  23341. // time formats are the same as en-gb
  23342. longDateFormat: {
  23343. LT: 'HH:mm',
  23344. LTS : 'HH:mm:ss',
  23345. L: 'DD/MM/YYYY',
  23346. LL: 'D MMMM YYYY',
  23347. LLL: 'D MMMM YYYY HH:mm',
  23348. LLLL: 'dddd, D MMMM YYYY HH:mm'
  23349. },
  23350. calendar: {
  23351. sameDay: '[Heddiw am] LT',
  23352. nextDay: '[Yfory am] LT',
  23353. nextWeek: 'dddd [am] LT',
  23354. lastDay: '[Ddoe am] LT',
  23355. lastWeek: 'dddd [diwethaf am] LT',
  23356. sameElse: 'L'
  23357. },
  23358. relativeTime: {
  23359. future: 'mewn %s',
  23360. past: '%s yn ôl',
  23361. s: 'ychydig eiliadau',
  23362. ss: '%d eiliad',
  23363. m: 'munud',
  23364. mm: '%d munud',
  23365. h: 'awr',
  23366. hh: '%d awr',
  23367. d: 'diwrnod',
  23368. dd: '%d diwrnod',
  23369. M: 'mis',
  23370. MM: '%d mis',
  23371. y: 'blwyddyn',
  23372. yy: '%d flynedd'
  23373. },
  23374. dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
  23375. // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
  23376. ordinal: function (number) {
  23377. var b = number,
  23378. output = '',
  23379. lookup = [
  23380. '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed
  23381. 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed
  23382. ];
  23383. if (b > 20) {
  23384. if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
  23385. output = 'fed'; // not 30ain, 70ain or 90ain
  23386. } else {
  23387. output = 'ain';
  23388. }
  23389. } else if (b > 0) {
  23390. output = lookup[b];
  23391. }
  23392. return number + output;
  23393. },
  23394. week : {
  23395. dow : 1, // Monday is the first day of the week.
  23396. doy : 4 // The week that contains Jan 4th is the first week of the year.
  23397. }
  23398. });
  23399. return cy;
  23400. })));
  23401. /***/ }),
  23402. /* 229 */
  23403. /***/ (function(module, exports, __webpack_require__) {
  23404. //! moment.js locale configuration
  23405. //! locale : Danish [da]
  23406. //! author : Ulrik Nielsen : https://github.com/mrbase
  23407. ;(function (global, factory) {
  23408. true ? factory(__webpack_require__(0)) :
  23409. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  23410. factory(global.moment)
  23411. }(this, (function (moment) { 'use strict';
  23412. var da = moment.defineLocale('da', {
  23413. months : 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'),
  23414. monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
  23415. weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
  23416. weekdaysShort : 'søn_man_tir_ons_tor_fre_lør'.split('_'),
  23417. weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'),
  23418. longDateFormat : {
  23419. LT : 'HH:mm',
  23420. LTS : 'HH:mm:ss',
  23421. L : 'DD.MM.YYYY',
  23422. LL : 'D. MMMM YYYY',
  23423. LLL : 'D. MMMM YYYY HH:mm',
  23424. LLLL : 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'
  23425. },
  23426. calendar : {
  23427. sameDay : '[i dag kl.] LT',
  23428. nextDay : '[i morgen kl.] LT',
  23429. nextWeek : 'på dddd [kl.] LT',
  23430. lastDay : '[i går kl.] LT',
  23431. lastWeek : '[i] dddd[s kl.] LT',
  23432. sameElse : 'L'
  23433. },
  23434. relativeTime : {
  23435. future : 'om %s',
  23436. past : '%s siden',
  23437. s : 'få sekunder',
  23438. ss : '%d sekunder',
  23439. m : 'et minut',
  23440. mm : '%d minutter',
  23441. h : 'en time',
  23442. hh : '%d timer',
  23443. d : 'en dag',
  23444. dd : '%d dage',
  23445. M : 'en måned',
  23446. MM : '%d måneder',
  23447. y : 'et år',
  23448. yy : '%d år'
  23449. },
  23450. dayOfMonthOrdinalParse: /\d{1,2}\./,
  23451. ordinal : '%d.',
  23452. week : {
  23453. dow : 1, // Monday is the first day of the week.
  23454. doy : 4 // The week that contains Jan 4th is the first week of the year.
  23455. }
  23456. });
  23457. return da;
  23458. })));
  23459. /***/ }),
  23460. /* 230 */
  23461. /***/ (function(module, exports, __webpack_require__) {
  23462. //! moment.js locale configuration
  23463. //! locale : German [de]
  23464. //! author : lluchs : https://github.com/lluchs
  23465. //! author: Menelion Elensúle: https://github.com/Oire
  23466. //! author : Mikolaj Dadela : https://github.com/mik01aj
  23467. ;(function (global, factory) {
  23468. true ? factory(__webpack_require__(0)) :
  23469. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  23470. factory(global.moment)
  23471. }(this, (function (moment) { 'use strict';
  23472. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  23473. var format = {
  23474. 'm': ['eine Minute', 'einer Minute'],
  23475. 'h': ['eine Stunde', 'einer Stunde'],
  23476. 'd': ['ein Tag', 'einem Tag'],
  23477. 'dd': [number + ' Tage', number + ' Tagen'],
  23478. 'M': ['ein Monat', 'einem Monat'],
  23479. 'MM': [number + ' Monate', number + ' Monaten'],
  23480. 'y': ['ein Jahr', 'einem Jahr'],
  23481. 'yy': [number + ' Jahre', number + ' Jahren']
  23482. };
  23483. return withoutSuffix ? format[key][0] : format[key][1];
  23484. }
  23485. var de = moment.defineLocale('de', {
  23486. months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
  23487. monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
  23488. monthsParseExact : true,
  23489. weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
  23490. weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
  23491. weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  23492. weekdaysParseExact : true,
  23493. longDateFormat : {
  23494. LT: 'HH:mm',
  23495. LTS: 'HH:mm:ss',
  23496. L : 'DD.MM.YYYY',
  23497. LL : 'D. MMMM YYYY',
  23498. LLL : 'D. MMMM YYYY HH:mm',
  23499. LLLL : 'dddd, D. MMMM YYYY HH:mm'
  23500. },
  23501. calendar : {
  23502. sameDay: '[heute um] LT [Uhr]',
  23503. sameElse: 'L',
  23504. nextDay: '[morgen um] LT [Uhr]',
  23505. nextWeek: 'dddd [um] LT [Uhr]',
  23506. lastDay: '[gestern um] LT [Uhr]',
  23507. lastWeek: '[letzten] dddd [um] LT [Uhr]'
  23508. },
  23509. relativeTime : {
  23510. future : 'in %s',
  23511. past : 'vor %s',
  23512. s : 'ein paar Sekunden',
  23513. ss : '%d Sekunden',
  23514. m : processRelativeTime,
  23515. mm : '%d Minuten',
  23516. h : processRelativeTime,
  23517. hh : '%d Stunden',
  23518. d : processRelativeTime,
  23519. dd : processRelativeTime,
  23520. M : processRelativeTime,
  23521. MM : processRelativeTime,
  23522. y : processRelativeTime,
  23523. yy : processRelativeTime
  23524. },
  23525. dayOfMonthOrdinalParse: /\d{1,2}\./,
  23526. ordinal : '%d.',
  23527. week : {
  23528. dow : 1, // Monday is the first day of the week.
  23529. doy : 4 // The week that contains Jan 4th is the first week of the year.
  23530. }
  23531. });
  23532. return de;
  23533. })));
  23534. /***/ }),
  23535. /* 231 */
  23536. /***/ (function(module, exports, __webpack_require__) {
  23537. //! moment.js locale configuration
  23538. //! locale : German (Austria) [de-at]
  23539. //! author : lluchs : https://github.com/lluchs
  23540. //! author: Menelion Elensúle: https://github.com/Oire
  23541. //! author : Martin Groller : https://github.com/MadMG
  23542. //! author : Mikolaj Dadela : https://github.com/mik01aj
  23543. ;(function (global, factory) {
  23544. true ? factory(__webpack_require__(0)) :
  23545. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  23546. factory(global.moment)
  23547. }(this, (function (moment) { 'use strict';
  23548. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  23549. var format = {
  23550. 'm': ['eine Minute', 'einer Minute'],
  23551. 'h': ['eine Stunde', 'einer Stunde'],
  23552. 'd': ['ein Tag', 'einem Tag'],
  23553. 'dd': [number + ' Tage', number + ' Tagen'],
  23554. 'M': ['ein Monat', 'einem Monat'],
  23555. 'MM': [number + ' Monate', number + ' Monaten'],
  23556. 'y': ['ein Jahr', 'einem Jahr'],
  23557. 'yy': [number + ' Jahre', number + ' Jahren']
  23558. };
  23559. return withoutSuffix ? format[key][0] : format[key][1];
  23560. }
  23561. var deAt = moment.defineLocale('de-at', {
  23562. months : 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
  23563. monthsShort : 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
  23564. monthsParseExact : true,
  23565. weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
  23566. weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
  23567. weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  23568. weekdaysParseExact : true,
  23569. longDateFormat : {
  23570. LT: 'HH:mm',
  23571. LTS: 'HH:mm:ss',
  23572. L : 'DD.MM.YYYY',
  23573. LL : 'D. MMMM YYYY',
  23574. LLL : 'D. MMMM YYYY HH:mm',
  23575. LLLL : 'dddd, D. MMMM YYYY HH:mm'
  23576. },
  23577. calendar : {
  23578. sameDay: '[heute um] LT [Uhr]',
  23579. sameElse: 'L',
  23580. nextDay: '[morgen um] LT [Uhr]',
  23581. nextWeek: 'dddd [um] LT [Uhr]',
  23582. lastDay: '[gestern um] LT [Uhr]',
  23583. lastWeek: '[letzten] dddd [um] LT [Uhr]'
  23584. },
  23585. relativeTime : {
  23586. future : 'in %s',
  23587. past : 'vor %s',
  23588. s : 'ein paar Sekunden',
  23589. ss : '%d Sekunden',
  23590. m : processRelativeTime,
  23591. mm : '%d Minuten',
  23592. h : processRelativeTime,
  23593. hh : '%d Stunden',
  23594. d : processRelativeTime,
  23595. dd : processRelativeTime,
  23596. M : processRelativeTime,
  23597. MM : processRelativeTime,
  23598. y : processRelativeTime,
  23599. yy : processRelativeTime
  23600. },
  23601. dayOfMonthOrdinalParse: /\d{1,2}\./,
  23602. ordinal : '%d.',
  23603. week : {
  23604. dow : 1, // Monday is the first day of the week.
  23605. doy : 4 // The week that contains Jan 4th is the first week of the year.
  23606. }
  23607. });
  23608. return deAt;
  23609. })));
  23610. /***/ }),
  23611. /* 232 */
  23612. /***/ (function(module, exports, __webpack_require__) {
  23613. //! moment.js locale configuration
  23614. //! locale : German (Switzerland) [de-ch]
  23615. //! author : sschueller : https://github.com/sschueller
  23616. ;(function (global, factory) {
  23617. true ? factory(__webpack_require__(0)) :
  23618. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  23619. factory(global.moment)
  23620. }(this, (function (moment) { 'use strict';
  23621. // based on: https://www.bk.admin.ch/dokumentation/sprachen/04915/05016/index.html?lang=de#
  23622. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  23623. var format = {
  23624. 'm': ['eine Minute', 'einer Minute'],
  23625. 'h': ['eine Stunde', 'einer Stunde'],
  23626. 'd': ['ein Tag', 'einem Tag'],
  23627. 'dd': [number + ' Tage', number + ' Tagen'],
  23628. 'M': ['ein Monat', 'einem Monat'],
  23629. 'MM': [number + ' Monate', number + ' Monaten'],
  23630. 'y': ['ein Jahr', 'einem Jahr'],
  23631. 'yy': [number + ' Jahre', number + ' Jahren']
  23632. };
  23633. return withoutSuffix ? format[key][0] : format[key][1];
  23634. }
  23635. var deCh = moment.defineLocale('de-ch', {
  23636. months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
  23637. monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
  23638. monthsParseExact : true,
  23639. weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
  23640. weekdaysShort : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  23641. weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  23642. weekdaysParseExact : true,
  23643. longDateFormat : {
  23644. LT: 'HH:mm',
  23645. LTS: 'HH:mm:ss',
  23646. L : 'DD.MM.YYYY',
  23647. LL : 'D. MMMM YYYY',
  23648. LLL : 'D. MMMM YYYY HH:mm',
  23649. LLLL : 'dddd, D. MMMM YYYY HH:mm'
  23650. },
  23651. calendar : {
  23652. sameDay: '[heute um] LT [Uhr]',
  23653. sameElse: 'L',
  23654. nextDay: '[morgen um] LT [Uhr]',
  23655. nextWeek: 'dddd [um] LT [Uhr]',
  23656. lastDay: '[gestern um] LT [Uhr]',
  23657. lastWeek: '[letzten] dddd [um] LT [Uhr]'
  23658. },
  23659. relativeTime : {
  23660. future : 'in %s',
  23661. past : 'vor %s',
  23662. s : 'ein paar Sekunden',
  23663. ss : '%d Sekunden',
  23664. m : processRelativeTime,
  23665. mm : '%d Minuten',
  23666. h : processRelativeTime,
  23667. hh : '%d Stunden',
  23668. d : processRelativeTime,
  23669. dd : processRelativeTime,
  23670. M : processRelativeTime,
  23671. MM : processRelativeTime,
  23672. y : processRelativeTime,
  23673. yy : processRelativeTime
  23674. },
  23675. dayOfMonthOrdinalParse: /\d{1,2}\./,
  23676. ordinal : '%d.',
  23677. week : {
  23678. dow : 1, // Monday is the first day of the week.
  23679. doy : 4 // The week that contains Jan 4th is the first week of the year.
  23680. }
  23681. });
  23682. return deCh;
  23683. })));
  23684. /***/ }),
  23685. /* 233 */
  23686. /***/ (function(module, exports, __webpack_require__) {
  23687. //! moment.js locale configuration
  23688. //! locale : Maldivian [dv]
  23689. //! author : Jawish Hameed : https://github.com/jawish
  23690. ;(function (global, factory) {
  23691. true ? factory(__webpack_require__(0)) :
  23692. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  23693. factory(global.moment)
  23694. }(this, (function (moment) { 'use strict';
  23695. var months = [
  23696. 'ޖެނުއަރީ',
  23697. 'ފެބްރުއަރީ',
  23698. 'މާރިޗު',
  23699. 'އޭޕްރީލު',
  23700. 'މޭ',
  23701. 'ޖޫން',
  23702. 'ޖުލައި',
  23703. 'އޯގަސްޓު',
  23704. 'ސެޕްޓެމްބަރު',
  23705. 'އޮކްޓޯބަރު',
  23706. 'ނޮވެމްބަރު',
  23707. 'ޑިސެމްބަރު'
  23708. ];
  23709. var weekdays = [
  23710. 'އާދިއްތަ',
  23711. 'ހޯމަ',
  23712. 'އަންގާރަ',
  23713. 'ބުދަ',
  23714. 'ބުރާސްފަތި',
  23715. 'ހުކުރު',
  23716. 'ހޮނިހިރު'
  23717. ];
  23718. var dv = moment.defineLocale('dv', {
  23719. months : months,
  23720. monthsShort : months,
  23721. weekdays : weekdays,
  23722. weekdaysShort : weekdays,
  23723. weekdaysMin : 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
  23724. longDateFormat : {
  23725. LT : 'HH:mm',
  23726. LTS : 'HH:mm:ss',
  23727. L : 'D/M/YYYY',
  23728. LL : 'D MMMM YYYY',
  23729. LLL : 'D MMMM YYYY HH:mm',
  23730. LLLL : 'dddd D MMMM YYYY HH:mm'
  23731. },
  23732. meridiemParse: /މކ|މފ/,
  23733. isPM : function (input) {
  23734. return 'މފ' === input;
  23735. },
  23736. meridiem : function (hour, minute, isLower) {
  23737. if (hour < 12) {
  23738. return 'މކ';
  23739. } else {
  23740. return 'މފ';
  23741. }
  23742. },
  23743. calendar : {
  23744. sameDay : '[މިއަދު] LT',
  23745. nextDay : '[މާދަމާ] LT',
  23746. nextWeek : 'dddd LT',
  23747. lastDay : '[އިއްޔެ] LT',
  23748. lastWeek : '[ފާއިތުވި] dddd LT',
  23749. sameElse : 'L'
  23750. },
  23751. relativeTime : {
  23752. future : 'ތެރޭގައި %s',
  23753. past : 'ކުރިން %s',
  23754. s : 'ސިކުންތުކޮޅެއް',
  23755. ss : 'd% ސިކުންތު',
  23756. m : 'މިނިޓެއް',
  23757. mm : 'މިނިޓު %d',
  23758. h : 'ގަޑިއިރެއް',
  23759. hh : 'ގަޑިއިރު %d',
  23760. d : 'ދުވަހެއް',
  23761. dd : 'ދުވަސް %d',
  23762. M : 'މަހެއް',
  23763. MM : 'މަސް %d',
  23764. y : 'އަހަރެއް',
  23765. yy : 'އަހަރު %d'
  23766. },
  23767. preparse: function (string) {
  23768. return string.replace(/،/g, ',');
  23769. },
  23770. postformat: function (string) {
  23771. return string.replace(/,/g, '،');
  23772. },
  23773. week : {
  23774. dow : 7, // Sunday is the first day of the week.
  23775. doy : 12 // The week that contains Jan 1st is the first week of the year.
  23776. }
  23777. });
  23778. return dv;
  23779. })));
  23780. /***/ }),
  23781. /* 234 */
  23782. /***/ (function(module, exports, __webpack_require__) {
  23783. //! moment.js locale configuration
  23784. //! locale : Greek [el]
  23785. //! author : Aggelos Karalias : https://github.com/mehiel
  23786. ;(function (global, factory) {
  23787. true ? factory(__webpack_require__(0)) :
  23788. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  23789. factory(global.moment)
  23790. }(this, (function (moment) { 'use strict';
  23791. function isFunction(input) {
  23792. return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
  23793. }
  23794. var el = moment.defineLocale('el', {
  23795. monthsNominativeEl : 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'),
  23796. monthsGenitiveEl : 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'),
  23797. months : function (momentToFormat, format) {
  23798. if (!momentToFormat) {
  23799. return this._monthsNominativeEl;
  23800. } else if (typeof format === 'string' && /D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM'
  23801. return this._monthsGenitiveEl[momentToFormat.month()];
  23802. } else {
  23803. return this._monthsNominativeEl[momentToFormat.month()];
  23804. }
  23805. },
  23806. monthsShort : 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
  23807. weekdays : 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'),
  23808. weekdaysShort : 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
  23809. weekdaysMin : 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
  23810. meridiem : function (hours, minutes, isLower) {
  23811. if (hours > 11) {
  23812. return isLower ? 'μμ' : 'ΜΜ';
  23813. } else {
  23814. return isLower ? 'πμ' : 'ΠΜ';
  23815. }
  23816. },
  23817. isPM : function (input) {
  23818. return ((input + '').toLowerCase()[0] === 'μ');
  23819. },
  23820. meridiemParse : /[ΠΜ]\.?Μ?\.?/i,
  23821. longDateFormat : {
  23822. LT : 'h:mm A',
  23823. LTS : 'h:mm:ss A',
  23824. L : 'DD/MM/YYYY',
  23825. LL : 'D MMMM YYYY',
  23826. LLL : 'D MMMM YYYY h:mm A',
  23827. LLLL : 'dddd, D MMMM YYYY h:mm A'
  23828. },
  23829. calendarEl : {
  23830. sameDay : '[Σήμερα {}] LT',
  23831. nextDay : '[Αύριο {}] LT',
  23832. nextWeek : 'dddd [{}] LT',
  23833. lastDay : '[Χθες {}] LT',
  23834. lastWeek : function () {
  23835. switch (this.day()) {
  23836. case 6:
  23837. return '[το προηγούμενο] dddd [{}] LT';
  23838. default:
  23839. return '[την προηγούμενη] dddd [{}] LT';
  23840. }
  23841. },
  23842. sameElse : 'L'
  23843. },
  23844. calendar : function (key, mom) {
  23845. var output = this._calendarEl[key],
  23846. hours = mom && mom.hours();
  23847. if (isFunction(output)) {
  23848. output = output.apply(mom);
  23849. }
  23850. return output.replace('{}', (hours % 12 === 1 ? 'στη' : 'στις'));
  23851. },
  23852. relativeTime : {
  23853. future : 'σε %s',
  23854. past : '%s πριν',
  23855. s : 'λίγα δευτερόλεπτα',
  23856. ss : '%d δευτερόλεπτα',
  23857. m : 'ένα λεπτό',
  23858. mm : '%d λεπτά',
  23859. h : 'μία ώρα',
  23860. hh : '%d ώρες',
  23861. d : 'μία μέρα',
  23862. dd : '%d μέρες',
  23863. M : 'ένας μήνας',
  23864. MM : '%d μήνες',
  23865. y : 'ένας χρόνος',
  23866. yy : '%d χρόνια'
  23867. },
  23868. dayOfMonthOrdinalParse: /\d{1,2}η/,
  23869. ordinal: '%dη',
  23870. week : {
  23871. dow : 1, // Monday is the first day of the week.
  23872. doy : 4 // The week that contains Jan 4st is the first week of the year.
  23873. }
  23874. });
  23875. return el;
  23876. })));
  23877. /***/ }),
  23878. /* 235 */
  23879. /***/ (function(module, exports, __webpack_require__) {
  23880. //! moment.js locale configuration
  23881. //! locale : English (Australia) [en-au]
  23882. //! author : Jared Morse : https://github.com/jarcoal
  23883. ;(function (global, factory) {
  23884. true ? factory(__webpack_require__(0)) :
  23885. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  23886. factory(global.moment)
  23887. }(this, (function (moment) { 'use strict';
  23888. var enAu = moment.defineLocale('en-au', {
  23889. months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
  23890. monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  23891. weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
  23892. weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  23893. weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  23894. longDateFormat : {
  23895. LT : 'h:mm A',
  23896. LTS : 'h:mm:ss A',
  23897. L : 'DD/MM/YYYY',
  23898. LL : 'D MMMM YYYY',
  23899. LLL : 'D MMMM YYYY h:mm A',
  23900. LLLL : 'dddd, D MMMM YYYY h:mm A'
  23901. },
  23902. calendar : {
  23903. sameDay : '[Today at] LT',
  23904. nextDay : '[Tomorrow at] LT',
  23905. nextWeek : 'dddd [at] LT',
  23906. lastDay : '[Yesterday at] LT',
  23907. lastWeek : '[Last] dddd [at] LT',
  23908. sameElse : 'L'
  23909. },
  23910. relativeTime : {
  23911. future : 'in %s',
  23912. past : '%s ago',
  23913. s : 'a few seconds',
  23914. ss : '%d seconds',
  23915. m : 'a minute',
  23916. mm : '%d minutes',
  23917. h : 'an hour',
  23918. hh : '%d hours',
  23919. d : 'a day',
  23920. dd : '%d days',
  23921. M : 'a month',
  23922. MM : '%d months',
  23923. y : 'a year',
  23924. yy : '%d years'
  23925. },
  23926. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  23927. ordinal : function (number) {
  23928. var b = number % 10,
  23929. output = (~~(number % 100 / 10) === 1) ? 'th' :
  23930. (b === 1) ? 'st' :
  23931. (b === 2) ? 'nd' :
  23932. (b === 3) ? 'rd' : 'th';
  23933. return number + output;
  23934. },
  23935. week : {
  23936. dow : 1, // Monday is the first day of the week.
  23937. doy : 4 // The week that contains Jan 4th is the first week of the year.
  23938. }
  23939. });
  23940. return enAu;
  23941. })));
  23942. /***/ }),
  23943. /* 236 */
  23944. /***/ (function(module, exports, __webpack_require__) {
  23945. //! moment.js locale configuration
  23946. //! locale : English (Canada) [en-ca]
  23947. //! author : Jonathan Abourbih : https://github.com/jonbca
  23948. ;(function (global, factory) {
  23949. true ? factory(__webpack_require__(0)) :
  23950. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  23951. factory(global.moment)
  23952. }(this, (function (moment) { 'use strict';
  23953. var enCa = moment.defineLocale('en-ca', {
  23954. months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
  23955. monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  23956. weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
  23957. weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  23958. weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  23959. longDateFormat : {
  23960. LT : 'h:mm A',
  23961. LTS : 'h:mm:ss A',
  23962. L : 'YYYY-MM-DD',
  23963. LL : 'MMMM D, YYYY',
  23964. LLL : 'MMMM D, YYYY h:mm A',
  23965. LLLL : 'dddd, MMMM D, YYYY h:mm A'
  23966. },
  23967. calendar : {
  23968. sameDay : '[Today at] LT',
  23969. nextDay : '[Tomorrow at] LT',
  23970. nextWeek : 'dddd [at] LT',
  23971. lastDay : '[Yesterday at] LT',
  23972. lastWeek : '[Last] dddd [at] LT',
  23973. sameElse : 'L'
  23974. },
  23975. relativeTime : {
  23976. future : 'in %s',
  23977. past : '%s ago',
  23978. s : 'a few seconds',
  23979. ss : '%d seconds',
  23980. m : 'a minute',
  23981. mm : '%d minutes',
  23982. h : 'an hour',
  23983. hh : '%d hours',
  23984. d : 'a day',
  23985. dd : '%d days',
  23986. M : 'a month',
  23987. MM : '%d months',
  23988. y : 'a year',
  23989. yy : '%d years'
  23990. },
  23991. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  23992. ordinal : function (number) {
  23993. var b = number % 10,
  23994. output = (~~(number % 100 / 10) === 1) ? 'th' :
  23995. (b === 1) ? 'st' :
  23996. (b === 2) ? 'nd' :
  23997. (b === 3) ? 'rd' : 'th';
  23998. return number + output;
  23999. }
  24000. });
  24001. return enCa;
  24002. })));
  24003. /***/ }),
  24004. /* 237 */
  24005. /***/ (function(module, exports, __webpack_require__) {
  24006. //! moment.js locale configuration
  24007. //! locale : English (United Kingdom) [en-gb]
  24008. //! author : Chris Gedrim : https://github.com/chrisgedrim
  24009. ;(function (global, factory) {
  24010. true ? factory(__webpack_require__(0)) :
  24011. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  24012. factory(global.moment)
  24013. }(this, (function (moment) { 'use strict';
  24014. var enGb = moment.defineLocale('en-gb', {
  24015. months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
  24016. monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  24017. weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
  24018. weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  24019. weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  24020. longDateFormat : {
  24021. LT : 'HH:mm',
  24022. LTS : 'HH:mm:ss',
  24023. L : 'DD/MM/YYYY',
  24024. LL : 'D MMMM YYYY',
  24025. LLL : 'D MMMM YYYY HH:mm',
  24026. LLLL : 'dddd, D MMMM YYYY HH:mm'
  24027. },
  24028. calendar : {
  24029. sameDay : '[Today at] LT',
  24030. nextDay : '[Tomorrow at] LT',
  24031. nextWeek : 'dddd [at] LT',
  24032. lastDay : '[Yesterday at] LT',
  24033. lastWeek : '[Last] dddd [at] LT',
  24034. sameElse : 'L'
  24035. },
  24036. relativeTime : {
  24037. future : 'in %s',
  24038. past : '%s ago',
  24039. s : 'a few seconds',
  24040. ss : '%d seconds',
  24041. m : 'a minute',
  24042. mm : '%d minutes',
  24043. h : 'an hour',
  24044. hh : '%d hours',
  24045. d : 'a day',
  24046. dd : '%d days',
  24047. M : 'a month',
  24048. MM : '%d months',
  24049. y : 'a year',
  24050. yy : '%d years'
  24051. },
  24052. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  24053. ordinal : function (number) {
  24054. var b = number % 10,
  24055. output = (~~(number % 100 / 10) === 1) ? 'th' :
  24056. (b === 1) ? 'st' :
  24057. (b === 2) ? 'nd' :
  24058. (b === 3) ? 'rd' : 'th';
  24059. return number + output;
  24060. },
  24061. week : {
  24062. dow : 1, // Monday is the first day of the week.
  24063. doy : 4 // The week that contains Jan 4th is the first week of the year.
  24064. }
  24065. });
  24066. return enGb;
  24067. })));
  24068. /***/ }),
  24069. /* 238 */
  24070. /***/ (function(module, exports, __webpack_require__) {
  24071. //! moment.js locale configuration
  24072. //! locale : English (Ireland) [en-ie]
  24073. //! author : Chris Cartlidge : https://github.com/chriscartlidge
  24074. ;(function (global, factory) {
  24075. true ? factory(__webpack_require__(0)) :
  24076. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  24077. factory(global.moment)
  24078. }(this, (function (moment) { 'use strict';
  24079. var enIe = moment.defineLocale('en-ie', {
  24080. months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
  24081. monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  24082. weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
  24083. weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  24084. weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  24085. longDateFormat : {
  24086. LT : 'HH:mm',
  24087. LTS : 'HH:mm:ss',
  24088. L : 'DD-MM-YYYY',
  24089. LL : 'D MMMM YYYY',
  24090. LLL : 'D MMMM YYYY HH:mm',
  24091. LLLL : 'dddd D MMMM YYYY HH:mm'
  24092. },
  24093. calendar : {
  24094. sameDay : '[Today at] LT',
  24095. nextDay : '[Tomorrow at] LT',
  24096. nextWeek : 'dddd [at] LT',
  24097. lastDay : '[Yesterday at] LT',
  24098. lastWeek : '[Last] dddd [at] LT',
  24099. sameElse : 'L'
  24100. },
  24101. relativeTime : {
  24102. future : 'in %s',
  24103. past : '%s ago',
  24104. s : 'a few seconds',
  24105. ss : '%d seconds',
  24106. m : 'a minute',
  24107. mm : '%d minutes',
  24108. h : 'an hour',
  24109. hh : '%d hours',
  24110. d : 'a day',
  24111. dd : '%d days',
  24112. M : 'a month',
  24113. MM : '%d months',
  24114. y : 'a year',
  24115. yy : '%d years'
  24116. },
  24117. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  24118. ordinal : function (number) {
  24119. var b = number % 10,
  24120. output = (~~(number % 100 / 10) === 1) ? 'th' :
  24121. (b === 1) ? 'st' :
  24122. (b === 2) ? 'nd' :
  24123. (b === 3) ? 'rd' : 'th';
  24124. return number + output;
  24125. },
  24126. week : {
  24127. dow : 1, // Monday is the first day of the week.
  24128. doy : 4 // The week that contains Jan 4th is the first week of the year.
  24129. }
  24130. });
  24131. return enIe;
  24132. })));
  24133. /***/ }),
  24134. /* 239 */
  24135. /***/ (function(module, exports, __webpack_require__) {
  24136. //! moment.js locale configuration
  24137. //! locale : English (New Zealand) [en-nz]
  24138. //! author : Luke McGregor : https://github.com/lukemcgregor
  24139. ;(function (global, factory) {
  24140. true ? factory(__webpack_require__(0)) :
  24141. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  24142. factory(global.moment)
  24143. }(this, (function (moment) { 'use strict';
  24144. var enNz = moment.defineLocale('en-nz', {
  24145. months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
  24146. monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  24147. weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
  24148. weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  24149. weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  24150. longDateFormat : {
  24151. LT : 'h:mm A',
  24152. LTS : 'h:mm:ss A',
  24153. L : 'DD/MM/YYYY',
  24154. LL : 'D MMMM YYYY',
  24155. LLL : 'D MMMM YYYY h:mm A',
  24156. LLLL : 'dddd, D MMMM YYYY h:mm A'
  24157. },
  24158. calendar : {
  24159. sameDay : '[Today at] LT',
  24160. nextDay : '[Tomorrow at] LT',
  24161. nextWeek : 'dddd [at] LT',
  24162. lastDay : '[Yesterday at] LT',
  24163. lastWeek : '[Last] dddd [at] LT',
  24164. sameElse : 'L'
  24165. },
  24166. relativeTime : {
  24167. future : 'in %s',
  24168. past : '%s ago',
  24169. s : 'a few seconds',
  24170. ss : '%d seconds',
  24171. m : 'a minute',
  24172. mm : '%d minutes',
  24173. h : 'an hour',
  24174. hh : '%d hours',
  24175. d : 'a day',
  24176. dd : '%d days',
  24177. M : 'a month',
  24178. MM : '%d months',
  24179. y : 'a year',
  24180. yy : '%d years'
  24181. },
  24182. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  24183. ordinal : function (number) {
  24184. var b = number % 10,
  24185. output = (~~(number % 100 / 10) === 1) ? 'th' :
  24186. (b === 1) ? 'st' :
  24187. (b === 2) ? 'nd' :
  24188. (b === 3) ? 'rd' : 'th';
  24189. return number + output;
  24190. },
  24191. week : {
  24192. dow : 1, // Monday is the first day of the week.
  24193. doy : 4 // The week that contains Jan 4th is the first week of the year.
  24194. }
  24195. });
  24196. return enNz;
  24197. })));
  24198. /***/ }),
  24199. /* 240 */
  24200. /***/ (function(module, exports, __webpack_require__) {
  24201. //! moment.js locale configuration
  24202. //! locale : Esperanto [eo]
  24203. //! author : Colin Dean : https://github.com/colindean
  24204. //! author : Mia Nordentoft Imperatori : https://github.com/miestasmia
  24205. //! comment : miestasmia corrected the translation by colindean
  24206. ;(function (global, factory) {
  24207. true ? factory(__webpack_require__(0)) :
  24208. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  24209. factory(global.moment)
  24210. }(this, (function (moment) { 'use strict';
  24211. var eo = moment.defineLocale('eo', {
  24212. months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'),
  24213. monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'),
  24214. weekdays : 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),
  24215. weekdaysShort : 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),
  24216. weekdaysMin : 'di_lu_ma_me_ĵa_ve_sa'.split('_'),
  24217. longDateFormat : {
  24218. LT : 'HH:mm',
  24219. LTS : 'HH:mm:ss',
  24220. L : 'YYYY-MM-DD',
  24221. LL : 'D[-a de] MMMM, YYYY',
  24222. LLL : 'D[-a de] MMMM, YYYY HH:mm',
  24223. LLLL : 'dddd, [la] D[-a de] MMMM, YYYY HH:mm'
  24224. },
  24225. meridiemParse: /[ap]\.t\.m/i,
  24226. isPM: function (input) {
  24227. return input.charAt(0).toLowerCase() === 'p';
  24228. },
  24229. meridiem : function (hours, minutes, isLower) {
  24230. if (hours > 11) {
  24231. return isLower ? 'p.t.m.' : 'P.T.M.';
  24232. } else {
  24233. return isLower ? 'a.t.m.' : 'A.T.M.';
  24234. }
  24235. },
  24236. calendar : {
  24237. sameDay : '[Hodiaŭ je] LT',
  24238. nextDay : '[Morgaŭ je] LT',
  24239. nextWeek : 'dddd [je] LT',
  24240. lastDay : '[Hieraŭ je] LT',
  24241. lastWeek : '[pasinta] dddd [je] LT',
  24242. sameElse : 'L'
  24243. },
  24244. relativeTime : {
  24245. future : 'post %s',
  24246. past : 'antaŭ %s',
  24247. s : 'sekundoj',
  24248. ss : '%d sekundoj',
  24249. m : 'minuto',
  24250. mm : '%d minutoj',
  24251. h : 'horo',
  24252. hh : '%d horoj',
  24253. d : 'tago',//ne 'diurno', ĉar estas uzita por proksimumo
  24254. dd : '%d tagoj',
  24255. M : 'monato',
  24256. MM : '%d monatoj',
  24257. y : 'jaro',
  24258. yy : '%d jaroj'
  24259. },
  24260. dayOfMonthOrdinalParse: /\d{1,2}a/,
  24261. ordinal : '%da',
  24262. week : {
  24263. dow : 1, // Monday is the first day of the week.
  24264. doy : 7 // The week that contains Jan 1st is the first week of the year.
  24265. }
  24266. });
  24267. return eo;
  24268. })));
  24269. /***/ }),
  24270. /* 241 */
  24271. /***/ (function(module, exports, __webpack_require__) {
  24272. //! moment.js locale configuration
  24273. //! locale : Spanish [es]
  24274. //! author : Julio Napurí : https://github.com/julionc
  24275. ;(function (global, factory) {
  24276. true ? factory(__webpack_require__(0)) :
  24277. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  24278. factory(global.moment)
  24279. }(this, (function (moment) { 'use strict';
  24280. var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
  24281. var monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
  24282. var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];
  24283. var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
  24284. var es = moment.defineLocale('es', {
  24285. months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
  24286. monthsShort : function (m, format) {
  24287. if (!m) {
  24288. return monthsShortDot;
  24289. } else if (/-MMM-/.test(format)) {
  24290. return monthsShort[m.month()];
  24291. } else {
  24292. return monthsShortDot[m.month()];
  24293. }
  24294. },
  24295. monthsRegex : monthsRegex,
  24296. monthsShortRegex : monthsRegex,
  24297. monthsStrictRegex : /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  24298. monthsShortStrictRegex : /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  24299. monthsParse : monthsParse,
  24300. longMonthsParse : monthsParse,
  24301. shortMonthsParse : monthsParse,
  24302. weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  24303. weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  24304. weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  24305. weekdaysParseExact : true,
  24306. longDateFormat : {
  24307. LT : 'H:mm',
  24308. LTS : 'H:mm:ss',
  24309. L : 'DD/MM/YYYY',
  24310. LL : 'D [de] MMMM [de] YYYY',
  24311. LLL : 'D [de] MMMM [de] YYYY H:mm',
  24312. LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm'
  24313. },
  24314. calendar : {
  24315. sameDay : function () {
  24316. return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  24317. },
  24318. nextDay : function () {
  24319. return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  24320. },
  24321. nextWeek : function () {
  24322. return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  24323. },
  24324. lastDay : function () {
  24325. return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  24326. },
  24327. lastWeek : function () {
  24328. return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  24329. },
  24330. sameElse : 'L'
  24331. },
  24332. relativeTime : {
  24333. future : 'en %s',
  24334. past : 'hace %s',
  24335. s : 'unos segundos',
  24336. ss : '%d segundos',
  24337. m : 'un minuto',
  24338. mm : '%d minutos',
  24339. h : 'una hora',
  24340. hh : '%d horas',
  24341. d : 'un día',
  24342. dd : '%d días',
  24343. M : 'un mes',
  24344. MM : '%d meses',
  24345. y : 'un año',
  24346. yy : '%d años'
  24347. },
  24348. dayOfMonthOrdinalParse : /\d{1,2}º/,
  24349. ordinal : '%dº',
  24350. week : {
  24351. dow : 1, // Monday is the first day of the week.
  24352. doy : 4 // The week that contains Jan 4th is the first week of the year.
  24353. }
  24354. });
  24355. return es;
  24356. })));
  24357. /***/ }),
  24358. /* 242 */
  24359. /***/ (function(module, exports, __webpack_require__) {
  24360. //! moment.js locale configuration
  24361. //! locale : Spanish (Dominican Republic) [es-do]
  24362. ;(function (global, factory) {
  24363. true ? factory(__webpack_require__(0)) :
  24364. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  24365. factory(global.moment)
  24366. }(this, (function (moment) { 'use strict';
  24367. var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
  24368. var monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
  24369. var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];
  24370. var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
  24371. var esDo = moment.defineLocale('es-do', {
  24372. months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
  24373. monthsShort : function (m, format) {
  24374. if (!m) {
  24375. return monthsShortDot;
  24376. } else if (/-MMM-/.test(format)) {
  24377. return monthsShort[m.month()];
  24378. } else {
  24379. return monthsShortDot[m.month()];
  24380. }
  24381. },
  24382. monthsRegex: monthsRegex,
  24383. monthsShortRegex: monthsRegex,
  24384. monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  24385. monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  24386. monthsParse: monthsParse,
  24387. longMonthsParse: monthsParse,
  24388. shortMonthsParse: monthsParse,
  24389. weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  24390. weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  24391. weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  24392. weekdaysParseExact : true,
  24393. longDateFormat : {
  24394. LT : 'h:mm A',
  24395. LTS : 'h:mm:ss A',
  24396. L : 'DD/MM/YYYY',
  24397. LL : 'D [de] MMMM [de] YYYY',
  24398. LLL : 'D [de] MMMM [de] YYYY h:mm A',
  24399. LLLL : 'dddd, D [de] MMMM [de] YYYY h:mm A'
  24400. },
  24401. calendar : {
  24402. sameDay : function () {
  24403. return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  24404. },
  24405. nextDay : function () {
  24406. return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  24407. },
  24408. nextWeek : function () {
  24409. return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  24410. },
  24411. lastDay : function () {
  24412. return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  24413. },
  24414. lastWeek : function () {
  24415. return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  24416. },
  24417. sameElse : 'L'
  24418. },
  24419. relativeTime : {
  24420. future : 'en %s',
  24421. past : 'hace %s',
  24422. s : 'unos segundos',
  24423. ss : '%d segundos',
  24424. m : 'un minuto',
  24425. mm : '%d minutos',
  24426. h : 'una hora',
  24427. hh : '%d horas',
  24428. d : 'un día',
  24429. dd : '%d días',
  24430. M : 'un mes',
  24431. MM : '%d meses',
  24432. y : 'un año',
  24433. yy : '%d años'
  24434. },
  24435. dayOfMonthOrdinalParse : /\d{1,2}º/,
  24436. ordinal : '%dº',
  24437. week : {
  24438. dow : 1, // Monday is the first day of the week.
  24439. doy : 4 // The week that contains Jan 4th is the first week of the year.
  24440. }
  24441. });
  24442. return esDo;
  24443. })));
  24444. /***/ }),
  24445. /* 243 */
  24446. /***/ (function(module, exports, __webpack_require__) {
  24447. //! moment.js locale configuration
  24448. //! locale : Spanish (United States) [es-us]
  24449. //! author : bustta : https://github.com/bustta
  24450. ;(function (global, factory) {
  24451. true ? factory(__webpack_require__(0)) :
  24452. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  24453. factory(global.moment)
  24454. }(this, (function (moment) { 'use strict';
  24455. var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
  24456. var monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
  24457. var esUs = moment.defineLocale('es-us', {
  24458. months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
  24459. monthsShort : function (m, format) {
  24460. if (!m) {
  24461. return monthsShortDot;
  24462. } else if (/-MMM-/.test(format)) {
  24463. return monthsShort[m.month()];
  24464. } else {
  24465. return monthsShortDot[m.month()];
  24466. }
  24467. },
  24468. monthsParseExact : true,
  24469. weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  24470. weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  24471. weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  24472. weekdaysParseExact : true,
  24473. longDateFormat : {
  24474. LT : 'h:mm A',
  24475. LTS : 'h:mm:ss A',
  24476. L : 'MM/DD/YYYY',
  24477. LL : 'MMMM [de] D [de] YYYY',
  24478. LLL : 'MMMM [de] D [de] YYYY h:mm A',
  24479. LLLL : 'dddd, MMMM [de] D [de] YYYY h:mm A'
  24480. },
  24481. calendar : {
  24482. sameDay : function () {
  24483. return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  24484. },
  24485. nextDay : function () {
  24486. return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  24487. },
  24488. nextWeek : function () {
  24489. return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  24490. },
  24491. lastDay : function () {
  24492. return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  24493. },
  24494. lastWeek : function () {
  24495. return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  24496. },
  24497. sameElse : 'L'
  24498. },
  24499. relativeTime : {
  24500. future : 'en %s',
  24501. past : 'hace %s',
  24502. s : 'unos segundos',
  24503. ss : '%d segundos',
  24504. m : 'un minuto',
  24505. mm : '%d minutos',
  24506. h : 'una hora',
  24507. hh : '%d horas',
  24508. d : 'un día',
  24509. dd : '%d días',
  24510. M : 'un mes',
  24511. MM : '%d meses',
  24512. y : 'un año',
  24513. yy : '%d años'
  24514. },
  24515. dayOfMonthOrdinalParse : /\d{1,2}º/,
  24516. ordinal : '%dº',
  24517. week : {
  24518. dow : 0, // Sunday is the first day of the week.
  24519. doy : 6 // The week that contains Jan 1st is the first week of the year.
  24520. }
  24521. });
  24522. return esUs;
  24523. })));
  24524. /***/ }),
  24525. /* 244 */
  24526. /***/ (function(module, exports, __webpack_require__) {
  24527. //! moment.js locale configuration
  24528. //! locale : Estonian [et]
  24529. //! author : Henry Kehlmann : https://github.com/madhenry
  24530. //! improvements : Illimar Tambek : https://github.com/ragulka
  24531. ;(function (global, factory) {
  24532. true ? factory(__webpack_require__(0)) :
  24533. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  24534. factory(global.moment)
  24535. }(this, (function (moment) { 'use strict';
  24536. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  24537. var format = {
  24538. 's' : ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
  24539. 'ss': [number + 'sekundi', number + 'sekundit'],
  24540. 'm' : ['ühe minuti', 'üks minut'],
  24541. 'mm': [number + ' minuti', number + ' minutit'],
  24542. 'h' : ['ühe tunni', 'tund aega', 'üks tund'],
  24543. 'hh': [number + ' tunni', number + ' tundi'],
  24544. 'd' : ['ühe päeva', 'üks päev'],
  24545. 'M' : ['kuu aja', 'kuu aega', 'üks kuu'],
  24546. 'MM': [number + ' kuu', number + ' kuud'],
  24547. 'y' : ['ühe aasta', 'aasta', 'üks aasta'],
  24548. 'yy': [number + ' aasta', number + ' aastat']
  24549. };
  24550. if (withoutSuffix) {
  24551. return format[key][2] ? format[key][2] : format[key][1];
  24552. }
  24553. return isFuture ? format[key][0] : format[key][1];
  24554. }
  24555. var et = moment.defineLocale('et', {
  24556. months : 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'),
  24557. monthsShort : 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
  24558. weekdays : 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'),
  24559. weekdaysShort : 'P_E_T_K_N_R_L'.split('_'),
  24560. weekdaysMin : 'P_E_T_K_N_R_L'.split('_'),
  24561. longDateFormat : {
  24562. LT : 'H:mm',
  24563. LTS : 'H:mm:ss',
  24564. L : 'DD.MM.YYYY',
  24565. LL : 'D. MMMM YYYY',
  24566. LLL : 'D. MMMM YYYY H:mm',
  24567. LLLL : 'dddd, D. MMMM YYYY H:mm'
  24568. },
  24569. calendar : {
  24570. sameDay : '[Täna,] LT',
  24571. nextDay : '[Homme,] LT',
  24572. nextWeek : '[Järgmine] dddd LT',
  24573. lastDay : '[Eile,] LT',
  24574. lastWeek : '[Eelmine] dddd LT',
  24575. sameElse : 'L'
  24576. },
  24577. relativeTime : {
  24578. future : '%s pärast',
  24579. past : '%s tagasi',
  24580. s : processRelativeTime,
  24581. ss : processRelativeTime,
  24582. m : processRelativeTime,
  24583. mm : processRelativeTime,
  24584. h : processRelativeTime,
  24585. hh : processRelativeTime,
  24586. d : processRelativeTime,
  24587. dd : '%d päeva',
  24588. M : processRelativeTime,
  24589. MM : processRelativeTime,
  24590. y : processRelativeTime,
  24591. yy : processRelativeTime
  24592. },
  24593. dayOfMonthOrdinalParse: /\d{1,2}\./,
  24594. ordinal : '%d.',
  24595. week : {
  24596. dow : 1, // Monday is the first day of the week.
  24597. doy : 4 // The week that contains Jan 4th is the first week of the year.
  24598. }
  24599. });
  24600. return et;
  24601. })));
  24602. /***/ }),
  24603. /* 245 */
  24604. /***/ (function(module, exports, __webpack_require__) {
  24605. //! moment.js locale configuration
  24606. //! locale : Basque [eu]
  24607. //! author : Eneko Illarramendi : https://github.com/eillarra
  24608. ;(function (global, factory) {
  24609. true ? factory(__webpack_require__(0)) :
  24610. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  24611. factory(global.moment)
  24612. }(this, (function (moment) { 'use strict';
  24613. var eu = moment.defineLocale('eu', {
  24614. months : 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'),
  24615. monthsShort : 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'),
  24616. monthsParseExact : true,
  24617. weekdays : 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'),
  24618. weekdaysShort : 'ig._al._ar._az._og._ol._lr.'.split('_'),
  24619. weekdaysMin : 'ig_al_ar_az_og_ol_lr'.split('_'),
  24620. weekdaysParseExact : true,
  24621. longDateFormat : {
  24622. LT : 'HH:mm',
  24623. LTS : 'HH:mm:ss',
  24624. L : 'YYYY-MM-DD',
  24625. LL : 'YYYY[ko] MMMM[ren] D[a]',
  24626. LLL : 'YYYY[ko] MMMM[ren] D[a] HH:mm',
  24627. LLLL : 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',
  24628. l : 'YYYY-M-D',
  24629. ll : 'YYYY[ko] MMM D[a]',
  24630. lll : 'YYYY[ko] MMM D[a] HH:mm',
  24631. llll : 'ddd, YYYY[ko] MMM D[a] HH:mm'
  24632. },
  24633. calendar : {
  24634. sameDay : '[gaur] LT[etan]',
  24635. nextDay : '[bihar] LT[etan]',
  24636. nextWeek : 'dddd LT[etan]',
  24637. lastDay : '[atzo] LT[etan]',
  24638. lastWeek : '[aurreko] dddd LT[etan]',
  24639. sameElse : 'L'
  24640. },
  24641. relativeTime : {
  24642. future : '%s barru',
  24643. past : 'duela %s',
  24644. s : 'segundo batzuk',
  24645. ss : '%d segundo',
  24646. m : 'minutu bat',
  24647. mm : '%d minutu',
  24648. h : 'ordu bat',
  24649. hh : '%d ordu',
  24650. d : 'egun bat',
  24651. dd : '%d egun',
  24652. M : 'hilabete bat',
  24653. MM : '%d hilabete',
  24654. y : 'urte bat',
  24655. yy : '%d urte'
  24656. },
  24657. dayOfMonthOrdinalParse: /\d{1,2}\./,
  24658. ordinal : '%d.',
  24659. week : {
  24660. dow : 1, // Monday is the first day of the week.
  24661. doy : 7 // The week that contains Jan 1st is the first week of the year.
  24662. }
  24663. });
  24664. return eu;
  24665. })));
  24666. /***/ }),
  24667. /* 246 */
  24668. /***/ (function(module, exports, __webpack_require__) {
  24669. //! moment.js locale configuration
  24670. //! locale : Persian [fa]
  24671. //! author : Ebrahim Byagowi : https://github.com/ebraminio
  24672. ;(function (global, factory) {
  24673. true ? factory(__webpack_require__(0)) :
  24674. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  24675. factory(global.moment)
  24676. }(this, (function (moment) { 'use strict';
  24677. var symbolMap = {
  24678. '1': '۱',
  24679. '2': '۲',
  24680. '3': '۳',
  24681. '4': '۴',
  24682. '5': '۵',
  24683. '6': '۶',
  24684. '7': '۷',
  24685. '8': '۸',
  24686. '9': '۹',
  24687. '0': '۰'
  24688. };
  24689. var numberMap = {
  24690. '۱': '1',
  24691. '۲': '2',
  24692. '۳': '3',
  24693. '۴': '4',
  24694. '۵': '5',
  24695. '۶': '6',
  24696. '۷': '7',
  24697. '۸': '8',
  24698. '۹': '9',
  24699. '۰': '0'
  24700. };
  24701. var fa = moment.defineLocale('fa', {
  24702. months : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),
  24703. monthsShort : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),
  24704. weekdays : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'),
  24705. weekdaysShort : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'),
  24706. weekdaysMin : 'ی_د_س_چ_پ_ج_ش'.split('_'),
  24707. weekdaysParseExact : true,
  24708. longDateFormat : {
  24709. LT : 'HH:mm',
  24710. LTS : 'HH:mm:ss',
  24711. L : 'DD/MM/YYYY',
  24712. LL : 'D MMMM YYYY',
  24713. LLL : 'D MMMM YYYY HH:mm',
  24714. LLLL : 'dddd, D MMMM YYYY HH:mm'
  24715. },
  24716. meridiemParse: /قبل از ظهر|بعد از ظهر/,
  24717. isPM: function (input) {
  24718. return /بعد از ظهر/.test(input);
  24719. },
  24720. meridiem : function (hour, minute, isLower) {
  24721. if (hour < 12) {
  24722. return 'قبل از ظهر';
  24723. } else {
  24724. return 'بعد از ظهر';
  24725. }
  24726. },
  24727. calendar : {
  24728. sameDay : '[امروز ساعت] LT',
  24729. nextDay : '[فردا ساعت] LT',
  24730. nextWeek : 'dddd [ساعت] LT',
  24731. lastDay : '[دیروز ساعت] LT',
  24732. lastWeek : 'dddd [پیش] [ساعت] LT',
  24733. sameElse : 'L'
  24734. },
  24735. relativeTime : {
  24736. future : 'در %s',
  24737. past : '%s پیش',
  24738. s : 'چند ثانیه',
  24739. ss : 'ثانیه d%',
  24740. m : 'یک دقیقه',
  24741. mm : '%d دقیقه',
  24742. h : 'یک ساعت',
  24743. hh : '%d ساعت',
  24744. d : 'یک روز',
  24745. dd : '%d روز',
  24746. M : 'یک ماه',
  24747. MM : '%d ماه',
  24748. y : 'یک سال',
  24749. yy : '%d سال'
  24750. },
  24751. preparse: function (string) {
  24752. return string.replace(/[۰-۹]/g, function (match) {
  24753. return numberMap[match];
  24754. }).replace(/،/g, ',');
  24755. },
  24756. postformat: function (string) {
  24757. return string.replace(/\d/g, function (match) {
  24758. return symbolMap[match];
  24759. }).replace(/,/g, '،');
  24760. },
  24761. dayOfMonthOrdinalParse: /\d{1,2}م/,
  24762. ordinal : '%dم',
  24763. week : {
  24764. dow : 6, // Saturday is the first day of the week.
  24765. doy : 12 // The week that contains Jan 1st is the first week of the year.
  24766. }
  24767. });
  24768. return fa;
  24769. })));
  24770. /***/ }),
  24771. /* 247 */
  24772. /***/ (function(module, exports, __webpack_require__) {
  24773. //! moment.js locale configuration
  24774. //! locale : Finnish [fi]
  24775. //! author : Tarmo Aidantausta : https://github.com/bleadof
  24776. ;(function (global, factory) {
  24777. true ? factory(__webpack_require__(0)) :
  24778. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  24779. factory(global.moment)
  24780. }(this, (function (moment) { 'use strict';
  24781. var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' ');
  24782. var numbersFuture = [
  24783. 'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden',
  24784. numbersPast[7], numbersPast[8], numbersPast[9]
  24785. ];
  24786. function translate(number, withoutSuffix, key, isFuture) {
  24787. var result = '';
  24788. switch (key) {
  24789. case 's':
  24790. return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
  24791. case 'ss':
  24792. return isFuture ? 'sekunnin' : 'sekuntia';
  24793. case 'm':
  24794. return isFuture ? 'minuutin' : 'minuutti';
  24795. case 'mm':
  24796. result = isFuture ? 'minuutin' : 'minuuttia';
  24797. break;
  24798. case 'h':
  24799. return isFuture ? 'tunnin' : 'tunti';
  24800. case 'hh':
  24801. result = isFuture ? 'tunnin' : 'tuntia';
  24802. break;
  24803. case 'd':
  24804. return isFuture ? 'päivän' : 'päivä';
  24805. case 'dd':
  24806. result = isFuture ? 'päivän' : 'päivää';
  24807. break;
  24808. case 'M':
  24809. return isFuture ? 'kuukauden' : 'kuukausi';
  24810. case 'MM':
  24811. result = isFuture ? 'kuukauden' : 'kuukautta';
  24812. break;
  24813. case 'y':
  24814. return isFuture ? 'vuoden' : 'vuosi';
  24815. case 'yy':
  24816. result = isFuture ? 'vuoden' : 'vuotta';
  24817. break;
  24818. }
  24819. result = verbalNumber(number, isFuture) + ' ' + result;
  24820. return result;
  24821. }
  24822. function verbalNumber(number, isFuture) {
  24823. return number < 10 ? (isFuture ? numbersFuture[number] : numbersPast[number]) : number;
  24824. }
  24825. var fi = moment.defineLocale('fi', {
  24826. months : 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'),
  24827. monthsShort : 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'),
  24828. weekdays : 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'),
  24829. weekdaysShort : 'su_ma_ti_ke_to_pe_la'.split('_'),
  24830. weekdaysMin : 'su_ma_ti_ke_to_pe_la'.split('_'),
  24831. longDateFormat : {
  24832. LT : 'HH.mm',
  24833. LTS : 'HH.mm.ss',
  24834. L : 'DD.MM.YYYY',
  24835. LL : 'Do MMMM[ta] YYYY',
  24836. LLL : 'Do MMMM[ta] YYYY, [klo] HH.mm',
  24837. LLLL : 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
  24838. l : 'D.M.YYYY',
  24839. ll : 'Do MMM YYYY',
  24840. lll : 'Do MMM YYYY, [klo] HH.mm',
  24841. llll : 'ddd, Do MMM YYYY, [klo] HH.mm'
  24842. },
  24843. calendar : {
  24844. sameDay : '[tänään] [klo] LT',
  24845. nextDay : '[huomenna] [klo] LT',
  24846. nextWeek : 'dddd [klo] LT',
  24847. lastDay : '[eilen] [klo] LT',
  24848. lastWeek : '[viime] dddd[na] [klo] LT',
  24849. sameElse : 'L'
  24850. },
  24851. relativeTime : {
  24852. future : '%s päästä',
  24853. past : '%s sitten',
  24854. s : translate,
  24855. ss : translate,
  24856. m : translate,
  24857. mm : translate,
  24858. h : translate,
  24859. hh : translate,
  24860. d : translate,
  24861. dd : translate,
  24862. M : translate,
  24863. MM : translate,
  24864. y : translate,
  24865. yy : translate
  24866. },
  24867. dayOfMonthOrdinalParse: /\d{1,2}\./,
  24868. ordinal : '%d.',
  24869. week : {
  24870. dow : 1, // Monday is the first day of the week.
  24871. doy : 4 // The week that contains Jan 4th is the first week of the year.
  24872. }
  24873. });
  24874. return fi;
  24875. })));
  24876. /***/ }),
  24877. /* 248 */
  24878. /***/ (function(module, exports, __webpack_require__) {
  24879. //! moment.js locale configuration
  24880. //! locale : Faroese [fo]
  24881. //! author : Ragnar Johannesen : https://github.com/ragnar123
  24882. ;(function (global, factory) {
  24883. true ? factory(__webpack_require__(0)) :
  24884. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  24885. factory(global.moment)
  24886. }(this, (function (moment) { 'use strict';
  24887. var fo = moment.defineLocale('fo', {
  24888. months : 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
  24889. monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
  24890. weekdays : 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'),
  24891. weekdaysShort : 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
  24892. weekdaysMin : 'su_má_tý_mi_hó_fr_le'.split('_'),
  24893. longDateFormat : {
  24894. LT : 'HH:mm',
  24895. LTS : 'HH:mm:ss',
  24896. L : 'DD/MM/YYYY',
  24897. LL : 'D MMMM YYYY',
  24898. LLL : 'D MMMM YYYY HH:mm',
  24899. LLLL : 'dddd D. MMMM, YYYY HH:mm'
  24900. },
  24901. calendar : {
  24902. sameDay : '[Í dag kl.] LT',
  24903. nextDay : '[Í morgin kl.] LT',
  24904. nextWeek : 'dddd [kl.] LT',
  24905. lastDay : '[Í gjár kl.] LT',
  24906. lastWeek : '[síðstu] dddd [kl] LT',
  24907. sameElse : 'L'
  24908. },
  24909. relativeTime : {
  24910. future : 'um %s',
  24911. past : '%s síðani',
  24912. s : 'fá sekund',
  24913. ss : '%d sekundir',
  24914. m : 'ein minutt',
  24915. mm : '%d minuttir',
  24916. h : 'ein tími',
  24917. hh : '%d tímar',
  24918. d : 'ein dagur',
  24919. dd : '%d dagar',
  24920. M : 'ein mánaði',
  24921. MM : '%d mánaðir',
  24922. y : 'eitt ár',
  24923. yy : '%d ár'
  24924. },
  24925. dayOfMonthOrdinalParse: /\d{1,2}\./,
  24926. ordinal : '%d.',
  24927. week : {
  24928. dow : 1, // Monday is the first day of the week.
  24929. doy : 4 // The week that contains Jan 4th is the first week of the year.
  24930. }
  24931. });
  24932. return fo;
  24933. })));
  24934. /***/ }),
  24935. /* 249 */
  24936. /***/ (function(module, exports, __webpack_require__) {
  24937. //! moment.js locale configuration
  24938. //! locale : French [fr]
  24939. //! author : John Fischer : https://github.com/jfroffice
  24940. ;(function (global, factory) {
  24941. true ? factory(__webpack_require__(0)) :
  24942. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  24943. factory(global.moment)
  24944. }(this, (function (moment) { 'use strict';
  24945. var fr = moment.defineLocale('fr', {
  24946. months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
  24947. monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
  24948. monthsParseExact : true,
  24949. weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  24950. weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
  24951. weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'),
  24952. weekdaysParseExact : true,
  24953. longDateFormat : {
  24954. LT : 'HH:mm',
  24955. LTS : 'HH:mm:ss',
  24956. L : 'DD/MM/YYYY',
  24957. LL : 'D MMMM YYYY',
  24958. LLL : 'D MMMM YYYY HH:mm',
  24959. LLLL : 'dddd D MMMM YYYY HH:mm'
  24960. },
  24961. calendar : {
  24962. sameDay : '[Aujourd’hui à] LT',
  24963. nextDay : '[Demain à] LT',
  24964. nextWeek : 'dddd [à] LT',
  24965. lastDay : '[Hier à] LT',
  24966. lastWeek : 'dddd [dernier à] LT',
  24967. sameElse : 'L'
  24968. },
  24969. relativeTime : {
  24970. future : 'dans %s',
  24971. past : 'il y a %s',
  24972. s : 'quelques secondes',
  24973. ss : '%d secondes',
  24974. m : 'une minute',
  24975. mm : '%d minutes',
  24976. h : 'une heure',
  24977. hh : '%d heures',
  24978. d : 'un jour',
  24979. dd : '%d jours',
  24980. M : 'un mois',
  24981. MM : '%d mois',
  24982. y : 'un an',
  24983. yy : '%d ans'
  24984. },
  24985. dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
  24986. ordinal : function (number, period) {
  24987. switch (period) {
  24988. // TODO: Return 'e' when day of month > 1. Move this case inside
  24989. // block for masculine words below.
  24990. // See https://github.com/moment/moment/issues/3375
  24991. case 'D':
  24992. return number + (number === 1 ? 'er' : '');
  24993. // Words with masculine grammatical gender: mois, trimestre, jour
  24994. default:
  24995. case 'M':
  24996. case 'Q':
  24997. case 'DDD':
  24998. case 'd':
  24999. return number + (number === 1 ? 'er' : 'e');
  25000. // Words with feminine grammatical gender: semaine
  25001. case 'w':
  25002. case 'W':
  25003. return number + (number === 1 ? 're' : 'e');
  25004. }
  25005. },
  25006. week : {
  25007. dow : 1, // Monday is the first day of the week.
  25008. doy : 4 // The week that contains Jan 4th is the first week of the year.
  25009. }
  25010. });
  25011. return fr;
  25012. })));
  25013. /***/ }),
  25014. /* 250 */
  25015. /***/ (function(module, exports, __webpack_require__) {
  25016. //! moment.js locale configuration
  25017. //! locale : French (Canada) [fr-ca]
  25018. //! author : Jonathan Abourbih : https://github.com/jonbca
  25019. ;(function (global, factory) {
  25020. true ? factory(__webpack_require__(0)) :
  25021. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  25022. factory(global.moment)
  25023. }(this, (function (moment) { 'use strict';
  25024. var frCa = moment.defineLocale('fr-ca', {
  25025. months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
  25026. monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
  25027. monthsParseExact : true,
  25028. weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  25029. weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
  25030. weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'),
  25031. weekdaysParseExact : true,
  25032. longDateFormat : {
  25033. LT : 'HH:mm',
  25034. LTS : 'HH:mm:ss',
  25035. L : 'YYYY-MM-DD',
  25036. LL : 'D MMMM YYYY',
  25037. LLL : 'D MMMM YYYY HH:mm',
  25038. LLLL : 'dddd D MMMM YYYY HH:mm'
  25039. },
  25040. calendar : {
  25041. sameDay : '[Aujourd’hui à] LT',
  25042. nextDay : '[Demain à] LT',
  25043. nextWeek : 'dddd [à] LT',
  25044. lastDay : '[Hier à] LT',
  25045. lastWeek : 'dddd [dernier à] LT',
  25046. sameElse : 'L'
  25047. },
  25048. relativeTime : {
  25049. future : 'dans %s',
  25050. past : 'il y a %s',
  25051. s : 'quelques secondes',
  25052. ss : '%d secondes',
  25053. m : 'une minute',
  25054. mm : '%d minutes',
  25055. h : 'une heure',
  25056. hh : '%d heures',
  25057. d : 'un jour',
  25058. dd : '%d jours',
  25059. M : 'un mois',
  25060. MM : '%d mois',
  25061. y : 'un an',
  25062. yy : '%d ans'
  25063. },
  25064. dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
  25065. ordinal : function (number, period) {
  25066. switch (period) {
  25067. // Words with masculine grammatical gender: mois, trimestre, jour
  25068. default:
  25069. case 'M':
  25070. case 'Q':
  25071. case 'D':
  25072. case 'DDD':
  25073. case 'd':
  25074. return number + (number === 1 ? 'er' : 'e');
  25075. // Words with feminine grammatical gender: semaine
  25076. case 'w':
  25077. case 'W':
  25078. return number + (number === 1 ? 're' : 'e');
  25079. }
  25080. }
  25081. });
  25082. return frCa;
  25083. })));
  25084. /***/ }),
  25085. /* 251 */
  25086. /***/ (function(module, exports, __webpack_require__) {
  25087. //! moment.js locale configuration
  25088. //! locale : French (Switzerland) [fr-ch]
  25089. //! author : Gaspard Bucher : https://github.com/gaspard
  25090. ;(function (global, factory) {
  25091. true ? factory(__webpack_require__(0)) :
  25092. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  25093. factory(global.moment)
  25094. }(this, (function (moment) { 'use strict';
  25095. var frCh = moment.defineLocale('fr-ch', {
  25096. months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
  25097. monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
  25098. monthsParseExact : true,
  25099. weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  25100. weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
  25101. weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'),
  25102. weekdaysParseExact : true,
  25103. longDateFormat : {
  25104. LT : 'HH:mm',
  25105. LTS : 'HH:mm:ss',
  25106. L : 'DD.MM.YYYY',
  25107. LL : 'D MMMM YYYY',
  25108. LLL : 'D MMMM YYYY HH:mm',
  25109. LLLL : 'dddd D MMMM YYYY HH:mm'
  25110. },
  25111. calendar : {
  25112. sameDay : '[Aujourd’hui à] LT',
  25113. nextDay : '[Demain à] LT',
  25114. nextWeek : 'dddd [à] LT',
  25115. lastDay : '[Hier à] LT',
  25116. lastWeek : 'dddd [dernier à] LT',
  25117. sameElse : 'L'
  25118. },
  25119. relativeTime : {
  25120. future : 'dans %s',
  25121. past : 'il y a %s',
  25122. s : 'quelques secondes',
  25123. ss : '%d secondes',
  25124. m : 'une minute',
  25125. mm : '%d minutes',
  25126. h : 'une heure',
  25127. hh : '%d heures',
  25128. d : 'un jour',
  25129. dd : '%d jours',
  25130. M : 'un mois',
  25131. MM : '%d mois',
  25132. y : 'un an',
  25133. yy : '%d ans'
  25134. },
  25135. dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
  25136. ordinal : function (number, period) {
  25137. switch (period) {
  25138. // Words with masculine grammatical gender: mois, trimestre, jour
  25139. default:
  25140. case 'M':
  25141. case 'Q':
  25142. case 'D':
  25143. case 'DDD':
  25144. case 'd':
  25145. return number + (number === 1 ? 'er' : 'e');
  25146. // Words with feminine grammatical gender: semaine
  25147. case 'w':
  25148. case 'W':
  25149. return number + (number === 1 ? 're' : 'e');
  25150. }
  25151. },
  25152. week : {
  25153. dow : 1, // Monday is the first day of the week.
  25154. doy : 4 // The week that contains Jan 4th is the first week of the year.
  25155. }
  25156. });
  25157. return frCh;
  25158. })));
  25159. /***/ }),
  25160. /* 252 */
  25161. /***/ (function(module, exports, __webpack_require__) {
  25162. //! moment.js locale configuration
  25163. //! locale : Frisian [fy]
  25164. //! author : Robin van der Vliet : https://github.com/robin0van0der0v
  25165. ;(function (global, factory) {
  25166. true ? factory(__webpack_require__(0)) :
  25167. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  25168. factory(global.moment)
  25169. }(this, (function (moment) { 'use strict';
  25170. var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_');
  25171. var monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');
  25172. var fy = moment.defineLocale('fy', {
  25173. months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'),
  25174. monthsShort : function (m, format) {
  25175. if (!m) {
  25176. return monthsShortWithDots;
  25177. } else if (/-MMM-/.test(format)) {
  25178. return monthsShortWithoutDots[m.month()];
  25179. } else {
  25180. return monthsShortWithDots[m.month()];
  25181. }
  25182. },
  25183. monthsParseExact : true,
  25184. weekdays : 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'),
  25185. weekdaysShort : 'si._mo._ti._wo._to._fr._so.'.split('_'),
  25186. weekdaysMin : 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
  25187. weekdaysParseExact : true,
  25188. longDateFormat : {
  25189. LT : 'HH:mm',
  25190. LTS : 'HH:mm:ss',
  25191. L : 'DD-MM-YYYY',
  25192. LL : 'D MMMM YYYY',
  25193. LLL : 'D MMMM YYYY HH:mm',
  25194. LLLL : 'dddd D MMMM YYYY HH:mm'
  25195. },
  25196. calendar : {
  25197. sameDay: '[hjoed om] LT',
  25198. nextDay: '[moarn om] LT',
  25199. nextWeek: 'dddd [om] LT',
  25200. lastDay: '[juster om] LT',
  25201. lastWeek: '[ôfrûne] dddd [om] LT',
  25202. sameElse: 'L'
  25203. },
  25204. relativeTime : {
  25205. future : 'oer %s',
  25206. past : '%s lyn',
  25207. s : 'in pear sekonden',
  25208. ss : '%d sekonden',
  25209. m : 'ien minút',
  25210. mm : '%d minuten',
  25211. h : 'ien oere',
  25212. hh : '%d oeren',
  25213. d : 'ien dei',
  25214. dd : '%d dagen',
  25215. M : 'ien moanne',
  25216. MM : '%d moannen',
  25217. y : 'ien jier',
  25218. yy : '%d jierren'
  25219. },
  25220. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  25221. ordinal : function (number) {
  25222. return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
  25223. },
  25224. week : {
  25225. dow : 1, // Monday is the first day of the week.
  25226. doy : 4 // The week that contains Jan 4th is the first week of the year.
  25227. }
  25228. });
  25229. return fy;
  25230. })));
  25231. /***/ }),
  25232. /* 253 */
  25233. /***/ (function(module, exports, __webpack_require__) {
  25234. //! moment.js locale configuration
  25235. //! locale : Scottish Gaelic [gd]
  25236. //! author : Jon Ashdown : https://github.com/jonashdown
  25237. ;(function (global, factory) {
  25238. true ? factory(__webpack_require__(0)) :
  25239. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  25240. factory(global.moment)
  25241. }(this, (function (moment) { 'use strict';
  25242. var months = [
  25243. 'Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd'
  25244. ];
  25245. var monthsShort = ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh'];
  25246. var weekdays = ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne'];
  25247. var weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'];
  25248. var weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];
  25249. var gd = moment.defineLocale('gd', {
  25250. months : months,
  25251. monthsShort : monthsShort,
  25252. monthsParseExact : true,
  25253. weekdays : weekdays,
  25254. weekdaysShort : weekdaysShort,
  25255. weekdaysMin : weekdaysMin,
  25256. longDateFormat : {
  25257. LT : 'HH:mm',
  25258. LTS : 'HH:mm:ss',
  25259. L : 'DD/MM/YYYY',
  25260. LL : 'D MMMM YYYY',
  25261. LLL : 'D MMMM YYYY HH:mm',
  25262. LLLL : 'dddd, D MMMM YYYY HH:mm'
  25263. },
  25264. calendar : {
  25265. sameDay : '[An-diugh aig] LT',
  25266. nextDay : '[A-màireach aig] LT',
  25267. nextWeek : 'dddd [aig] LT',
  25268. lastDay : '[An-dè aig] LT',
  25269. lastWeek : 'dddd [seo chaidh] [aig] LT',
  25270. sameElse : 'L'
  25271. },
  25272. relativeTime : {
  25273. future : 'ann an %s',
  25274. past : 'bho chionn %s',
  25275. s : 'beagan diogan',
  25276. ss : '%d diogan',
  25277. m : 'mionaid',
  25278. mm : '%d mionaidean',
  25279. h : 'uair',
  25280. hh : '%d uairean',
  25281. d : 'latha',
  25282. dd : '%d latha',
  25283. M : 'mìos',
  25284. MM : '%d mìosan',
  25285. y : 'bliadhna',
  25286. yy : '%d bliadhna'
  25287. },
  25288. dayOfMonthOrdinalParse : /\d{1,2}(d|na|mh)/,
  25289. ordinal : function (number) {
  25290. var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
  25291. return number + output;
  25292. },
  25293. week : {
  25294. dow : 1, // Monday is the first day of the week.
  25295. doy : 4 // The week that contains Jan 4th is the first week of the year.
  25296. }
  25297. });
  25298. return gd;
  25299. })));
  25300. /***/ }),
  25301. /* 254 */
  25302. /***/ (function(module, exports, __webpack_require__) {
  25303. //! moment.js locale configuration
  25304. //! locale : Galician [gl]
  25305. //! author : Juan G. Hurtado : https://github.com/juanghurtado
  25306. ;(function (global, factory) {
  25307. true ? factory(__webpack_require__(0)) :
  25308. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  25309. factory(global.moment)
  25310. }(this, (function (moment) { 'use strict';
  25311. var gl = moment.defineLocale('gl', {
  25312. months : 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'),
  25313. monthsShort : 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_'),
  25314. monthsParseExact: true,
  25315. weekdays : 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
  25316. weekdaysShort : 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
  25317. weekdaysMin : 'do_lu_ma_mé_xo_ve_sá'.split('_'),
  25318. weekdaysParseExact : true,
  25319. longDateFormat : {
  25320. LT : 'H:mm',
  25321. LTS : 'H:mm:ss',
  25322. L : 'DD/MM/YYYY',
  25323. LL : 'D [de] MMMM [de] YYYY',
  25324. LLL : 'D [de] MMMM [de] YYYY H:mm',
  25325. LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm'
  25326. },
  25327. calendar : {
  25328. sameDay : function () {
  25329. return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT';
  25330. },
  25331. nextDay : function () {
  25332. return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT';
  25333. },
  25334. nextWeek : function () {
  25335. return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';
  25336. },
  25337. lastDay : function () {
  25338. return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT';
  25339. },
  25340. lastWeek : function () {
  25341. return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';
  25342. },
  25343. sameElse : 'L'
  25344. },
  25345. relativeTime : {
  25346. future : function (str) {
  25347. if (str.indexOf('un') === 0) {
  25348. return 'n' + str;
  25349. }
  25350. return 'en ' + str;
  25351. },
  25352. past : 'hai %s',
  25353. s : 'uns segundos',
  25354. ss : '%d segundos',
  25355. m : 'un minuto',
  25356. mm : '%d minutos',
  25357. h : 'unha hora',
  25358. hh : '%d horas',
  25359. d : 'un día',
  25360. dd : '%d días',
  25361. M : 'un mes',
  25362. MM : '%d meses',
  25363. y : 'un ano',
  25364. yy : '%d anos'
  25365. },
  25366. dayOfMonthOrdinalParse : /\d{1,2}º/,
  25367. ordinal : '%dº',
  25368. week : {
  25369. dow : 1, // Monday is the first day of the week.
  25370. doy : 4 // The week that contains Jan 4th is the first week of the year.
  25371. }
  25372. });
  25373. return gl;
  25374. })));
  25375. /***/ }),
  25376. /* 255 */
  25377. /***/ (function(module, exports, __webpack_require__) {
  25378. //! moment.js locale configuration
  25379. //! locale : Konkani Latin script [gom-latn]
  25380. //! author : The Discoverer : https://github.com/WikiDiscoverer
  25381. ;(function (global, factory) {
  25382. true ? factory(__webpack_require__(0)) :
  25383. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  25384. factory(global.moment)
  25385. }(this, (function (moment) { 'use strict';
  25386. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  25387. var format = {
  25388. 's': ['thodde secondanim', 'thodde second'],
  25389. 'ss': [number + ' secondanim', number + ' second'],
  25390. 'm': ['eka mintan', 'ek minute'],
  25391. 'mm': [number + ' mintanim', number + ' mintam'],
  25392. 'h': ['eka horan', 'ek hor'],
  25393. 'hh': [number + ' horanim', number + ' hor'],
  25394. 'd': ['eka disan', 'ek dis'],
  25395. 'dd': [number + ' disanim', number + ' dis'],
  25396. 'M': ['eka mhoinean', 'ek mhoino'],
  25397. 'MM': [number + ' mhoineanim', number + ' mhoine'],
  25398. 'y': ['eka vorsan', 'ek voros'],
  25399. 'yy': [number + ' vorsanim', number + ' vorsam']
  25400. };
  25401. return withoutSuffix ? format[key][0] : format[key][1];
  25402. }
  25403. var gomLatn = moment.defineLocale('gom-latn', {
  25404. months : 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'),
  25405. monthsShort : 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
  25406. monthsParseExact : true,
  25407. weekdays : 'Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son\'var'.split('_'),
  25408. weekdaysShort : 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
  25409. weekdaysMin : 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
  25410. weekdaysParseExact : true,
  25411. longDateFormat : {
  25412. LT : 'A h:mm [vazta]',
  25413. LTS : 'A h:mm:ss [vazta]',
  25414. L : 'DD-MM-YYYY',
  25415. LL : 'D MMMM YYYY',
  25416. LLL : 'D MMMM YYYY A h:mm [vazta]',
  25417. LLLL : 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]',
  25418. llll: 'ddd, D MMM YYYY, A h:mm [vazta]'
  25419. },
  25420. calendar : {
  25421. sameDay: '[Aiz] LT',
  25422. nextDay: '[Faleam] LT',
  25423. nextWeek: '[Ieta to] dddd[,] LT',
  25424. lastDay: '[Kal] LT',
  25425. lastWeek: '[Fatlo] dddd[,] LT',
  25426. sameElse: 'L'
  25427. },
  25428. relativeTime : {
  25429. future : '%s',
  25430. past : '%s adim',
  25431. s : processRelativeTime,
  25432. ss : processRelativeTime,
  25433. m : processRelativeTime,
  25434. mm : processRelativeTime,
  25435. h : processRelativeTime,
  25436. hh : processRelativeTime,
  25437. d : processRelativeTime,
  25438. dd : processRelativeTime,
  25439. M : processRelativeTime,
  25440. MM : processRelativeTime,
  25441. y : processRelativeTime,
  25442. yy : processRelativeTime
  25443. },
  25444. dayOfMonthOrdinalParse : /\d{1,2}(er)/,
  25445. ordinal : function (number, period) {
  25446. switch (period) {
  25447. // the ordinal 'er' only applies to day of the month
  25448. case 'D':
  25449. return number + 'er';
  25450. default:
  25451. case 'M':
  25452. case 'Q':
  25453. case 'DDD':
  25454. case 'd':
  25455. case 'w':
  25456. case 'W':
  25457. return number;
  25458. }
  25459. },
  25460. week : {
  25461. dow : 1, // Monday is the first day of the week.
  25462. doy : 4 // The week that contains Jan 4th is the first week of the year.
  25463. },
  25464. meridiemParse: /rati|sokalli|donparam|sanje/,
  25465. meridiemHour : function (hour, meridiem) {
  25466. if (hour === 12) {
  25467. hour = 0;
  25468. }
  25469. if (meridiem === 'rati') {
  25470. return hour < 4 ? hour : hour + 12;
  25471. } else if (meridiem === 'sokalli') {
  25472. return hour;
  25473. } else if (meridiem === 'donparam') {
  25474. return hour > 12 ? hour : hour + 12;
  25475. } else if (meridiem === 'sanje') {
  25476. return hour + 12;
  25477. }
  25478. },
  25479. meridiem : function (hour, minute, isLower) {
  25480. if (hour < 4) {
  25481. return 'rati';
  25482. } else if (hour < 12) {
  25483. return 'sokalli';
  25484. } else if (hour < 16) {
  25485. return 'donparam';
  25486. } else if (hour < 20) {
  25487. return 'sanje';
  25488. } else {
  25489. return 'rati';
  25490. }
  25491. }
  25492. });
  25493. return gomLatn;
  25494. })));
  25495. /***/ }),
  25496. /* 256 */
  25497. /***/ (function(module, exports, __webpack_require__) {
  25498. //! moment.js locale configuration
  25499. //! locale : Gujarati [gu]
  25500. //! author : Kaushik Thanki : https://github.com/Kaushik1987
  25501. ;(function (global, factory) {
  25502. true ? factory(__webpack_require__(0)) :
  25503. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  25504. factory(global.moment)
  25505. }(this, (function (moment) { 'use strict';
  25506. var symbolMap = {
  25507. '1': '૧',
  25508. '2': '૨',
  25509. '3': '૩',
  25510. '4': '૪',
  25511. '5': '૫',
  25512. '6': '૬',
  25513. '7': '૭',
  25514. '8': '૮',
  25515. '9': '૯',
  25516. '0': '૦'
  25517. };
  25518. var numberMap = {
  25519. '૧': '1',
  25520. '૨': '2',
  25521. '૩': '3',
  25522. '૪': '4',
  25523. '૫': '5',
  25524. '૬': '6',
  25525. '૭': '7',
  25526. '૮': '8',
  25527. '૯': '9',
  25528. '૦': '0'
  25529. };
  25530. var gu = moment.defineLocale('gu', {
  25531. months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split('_'),
  25532. monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split('_'),
  25533. monthsParseExact: true,
  25534. weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split('_'),
  25535. weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),
  25536. weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),
  25537. longDateFormat: {
  25538. LT: 'A h:mm વાગ્યે',
  25539. LTS: 'A h:mm:ss વાગ્યે',
  25540. L: 'DD/MM/YYYY',
  25541. LL: 'D MMMM YYYY',
  25542. LLL: 'D MMMM YYYY, A h:mm વાગ્યે',
  25543. LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે'
  25544. },
  25545. calendar: {
  25546. sameDay: '[આજ] LT',
  25547. nextDay: '[કાલે] LT',
  25548. nextWeek: 'dddd, LT',
  25549. lastDay: '[ગઇકાલે] LT',
  25550. lastWeek: '[પાછલા] dddd, LT',
  25551. sameElse: 'L'
  25552. },
  25553. relativeTime: {
  25554. future: '%s મા',
  25555. past: '%s પેહલા',
  25556. s: 'અમુક પળો',
  25557. ss: '%d સેકંડ',
  25558. m: 'એક મિનિટ',
  25559. mm: '%d મિનિટ',
  25560. h: 'એક કલાક',
  25561. hh: '%d કલાક',
  25562. d: 'એક દિવસ',
  25563. dd: '%d દિવસ',
  25564. M: 'એક મહિનો',
  25565. MM: '%d મહિનો',
  25566. y: 'એક વર્ષ',
  25567. yy: '%d વર્ષ'
  25568. },
  25569. preparse: function (string) {
  25570. return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {
  25571. return numberMap[match];
  25572. });
  25573. },
  25574. postformat: function (string) {
  25575. return string.replace(/\d/g, function (match) {
  25576. return symbolMap[match];
  25577. });
  25578. },
  25579. // Gujarati notation for meridiems are quite fuzzy in practice. While there exists
  25580. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.
  25581. meridiemParse: /રાત|બપોર|સવાર|સાંજ/,
  25582. meridiemHour: function (hour, meridiem) {
  25583. if (hour === 12) {
  25584. hour = 0;
  25585. }
  25586. if (meridiem === 'રાત') {
  25587. return hour < 4 ? hour : hour + 12;
  25588. } else if (meridiem === 'સવાર') {
  25589. return hour;
  25590. } else if (meridiem === 'બપોર') {
  25591. return hour >= 10 ? hour : hour + 12;
  25592. } else if (meridiem === 'સાંજ') {
  25593. return hour + 12;
  25594. }
  25595. },
  25596. meridiem: function (hour, minute, isLower) {
  25597. if (hour < 4) {
  25598. return 'રાત';
  25599. } else if (hour < 10) {
  25600. return 'સવાર';
  25601. } else if (hour < 17) {
  25602. return 'બપોર';
  25603. } else if (hour < 20) {
  25604. return 'સાંજ';
  25605. } else {
  25606. return 'રાત';
  25607. }
  25608. },
  25609. week: {
  25610. dow: 0, // Sunday is the first day of the week.
  25611. doy: 6 // The week that contains Jan 1st is the first week of the year.
  25612. }
  25613. });
  25614. return gu;
  25615. })));
  25616. /***/ }),
  25617. /* 257 */
  25618. /***/ (function(module, exports, __webpack_require__) {
  25619. //! moment.js locale configuration
  25620. //! locale : Hebrew [he]
  25621. //! author : Tomer Cohen : https://github.com/tomer
  25622. //! author : Moshe Simantov : https://github.com/DevelopmentIL
  25623. //! author : Tal Ater : https://github.com/TalAter
  25624. ;(function (global, factory) {
  25625. true ? factory(__webpack_require__(0)) :
  25626. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  25627. factory(global.moment)
  25628. }(this, (function (moment) { 'use strict';
  25629. var he = moment.defineLocale('he', {
  25630. months : 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'),
  25631. monthsShort : 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
  25632. weekdays : 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
  25633. weekdaysShort : 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
  25634. weekdaysMin : 'א_ב_ג_ד_ה_ו_ש'.split('_'),
  25635. longDateFormat : {
  25636. LT : 'HH:mm',
  25637. LTS : 'HH:mm:ss',
  25638. L : 'DD/MM/YYYY',
  25639. LL : 'D [ב]MMMM YYYY',
  25640. LLL : 'D [ב]MMMM YYYY HH:mm',
  25641. LLLL : 'dddd, D [ב]MMMM YYYY HH:mm',
  25642. l : 'D/M/YYYY',
  25643. ll : 'D MMM YYYY',
  25644. lll : 'D MMM YYYY HH:mm',
  25645. llll : 'ddd, D MMM YYYY HH:mm'
  25646. },
  25647. calendar : {
  25648. sameDay : '[היום ב־]LT',
  25649. nextDay : '[מחר ב־]LT',
  25650. nextWeek : 'dddd [בשעה] LT',
  25651. lastDay : '[אתמול ב־]LT',
  25652. lastWeek : '[ביום] dddd [האחרון בשעה] LT',
  25653. sameElse : 'L'
  25654. },
  25655. relativeTime : {
  25656. future : 'בעוד %s',
  25657. past : 'לפני %s',
  25658. s : 'מספר שניות',
  25659. ss : '%d שניות',
  25660. m : 'דקה',
  25661. mm : '%d דקות',
  25662. h : 'שעה',
  25663. hh : function (number) {
  25664. if (number === 2) {
  25665. return 'שעתיים';
  25666. }
  25667. return number + ' שעות';
  25668. },
  25669. d : 'יום',
  25670. dd : function (number) {
  25671. if (number === 2) {
  25672. return 'יומיים';
  25673. }
  25674. return number + ' ימים';
  25675. },
  25676. M : 'חודש',
  25677. MM : function (number) {
  25678. if (number === 2) {
  25679. return 'חודשיים';
  25680. }
  25681. return number + ' חודשים';
  25682. },
  25683. y : 'שנה',
  25684. yy : function (number) {
  25685. if (number === 2) {
  25686. return 'שנתיים';
  25687. } else if (number % 10 === 0 && number !== 10) {
  25688. return number + ' שנה';
  25689. }
  25690. return number + ' שנים';
  25691. }
  25692. },
  25693. meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
  25694. isPM : function (input) {
  25695. return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
  25696. },
  25697. meridiem : function (hour, minute, isLower) {
  25698. if (hour < 5) {
  25699. return 'לפנות בוקר';
  25700. } else if (hour < 10) {
  25701. return 'בבוקר';
  25702. } else if (hour < 12) {
  25703. return isLower ? 'לפנה"צ' : 'לפני הצהריים';
  25704. } else if (hour < 18) {
  25705. return isLower ? 'אחה"צ' : 'אחרי הצהריים';
  25706. } else {
  25707. return 'בערב';
  25708. }
  25709. }
  25710. });
  25711. return he;
  25712. })));
  25713. /***/ }),
  25714. /* 258 */
  25715. /***/ (function(module, exports, __webpack_require__) {
  25716. //! moment.js locale configuration
  25717. //! locale : Hindi [hi]
  25718. //! author : Mayank Singhal : https://github.com/mayanksinghal
  25719. ;(function (global, factory) {
  25720. true ? factory(__webpack_require__(0)) :
  25721. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  25722. factory(global.moment)
  25723. }(this, (function (moment) { 'use strict';
  25724. var symbolMap = {
  25725. '1': '१',
  25726. '2': '२',
  25727. '3': '३',
  25728. '4': '४',
  25729. '5': '५',
  25730. '6': '६',
  25731. '7': '७',
  25732. '8': '८',
  25733. '9': '९',
  25734. '0': '०'
  25735. };
  25736. var numberMap = {
  25737. '१': '1',
  25738. '२': '2',
  25739. '३': '3',
  25740. '४': '4',
  25741. '५': '5',
  25742. '६': '6',
  25743. '७': '7',
  25744. '८': '8',
  25745. '९': '9',
  25746. '०': '0'
  25747. };
  25748. var hi = moment.defineLocale('hi', {
  25749. months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),
  25750. monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
  25751. monthsParseExact: true,
  25752. weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
  25753. weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
  25754. weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'),
  25755. longDateFormat : {
  25756. LT : 'A h:mm बजे',
  25757. LTS : 'A h:mm:ss बजे',
  25758. L : 'DD/MM/YYYY',
  25759. LL : 'D MMMM YYYY',
  25760. LLL : 'D MMMM YYYY, A h:mm बजे',
  25761. LLLL : 'dddd, D MMMM YYYY, A h:mm बजे'
  25762. },
  25763. calendar : {
  25764. sameDay : '[आज] LT',
  25765. nextDay : '[कल] LT',
  25766. nextWeek : 'dddd, LT',
  25767. lastDay : '[कल] LT',
  25768. lastWeek : '[पिछले] dddd, LT',
  25769. sameElse : 'L'
  25770. },
  25771. relativeTime : {
  25772. future : '%s में',
  25773. past : '%s पहले',
  25774. s : 'कुछ ही क्षण',
  25775. ss : '%d सेकंड',
  25776. m : 'एक मिनट',
  25777. mm : '%d मिनट',
  25778. h : 'एक घंटा',
  25779. hh : '%d घंटे',
  25780. d : 'एक दिन',
  25781. dd : '%d दिन',
  25782. M : 'एक महीने',
  25783. MM : '%d महीने',
  25784. y : 'एक वर्ष',
  25785. yy : '%d वर्ष'
  25786. },
  25787. preparse: function (string) {
  25788. return string.replace(/[१२३४५६७८९०]/g, function (match) {
  25789. return numberMap[match];
  25790. });
  25791. },
  25792. postformat: function (string) {
  25793. return string.replace(/\d/g, function (match) {
  25794. return symbolMap[match];
  25795. });
  25796. },
  25797. // Hindi notation for meridiems are quite fuzzy in practice. While there exists
  25798. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
  25799. meridiemParse: /रात|सुबह|दोपहर|शाम/,
  25800. meridiemHour : function (hour, meridiem) {
  25801. if (hour === 12) {
  25802. hour = 0;
  25803. }
  25804. if (meridiem === 'रात') {
  25805. return hour < 4 ? hour : hour + 12;
  25806. } else if (meridiem === 'सुबह') {
  25807. return hour;
  25808. } else if (meridiem === 'दोपहर') {
  25809. return hour >= 10 ? hour : hour + 12;
  25810. } else if (meridiem === 'शाम') {
  25811. return hour + 12;
  25812. }
  25813. },
  25814. meridiem : function (hour, minute, isLower) {
  25815. if (hour < 4) {
  25816. return 'रात';
  25817. } else if (hour < 10) {
  25818. return 'सुबह';
  25819. } else if (hour < 17) {
  25820. return 'दोपहर';
  25821. } else if (hour < 20) {
  25822. return 'शाम';
  25823. } else {
  25824. return 'रात';
  25825. }
  25826. },
  25827. week : {
  25828. dow : 0, // Sunday is the first day of the week.
  25829. doy : 6 // The week that contains Jan 1st is the first week of the year.
  25830. }
  25831. });
  25832. return hi;
  25833. })));
  25834. /***/ }),
  25835. /* 259 */
  25836. /***/ (function(module, exports, __webpack_require__) {
  25837. //! moment.js locale configuration
  25838. //! locale : Croatian [hr]
  25839. //! author : Bojan Marković : https://github.com/bmarkovic
  25840. ;(function (global, factory) {
  25841. true ? factory(__webpack_require__(0)) :
  25842. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  25843. factory(global.moment)
  25844. }(this, (function (moment) { 'use strict';
  25845. function translate(number, withoutSuffix, key) {
  25846. var result = number + ' ';
  25847. switch (key) {
  25848. case 'ss':
  25849. if (number === 1) {
  25850. result += 'sekunda';
  25851. } else if (number === 2 || number === 3 || number === 4) {
  25852. result += 'sekunde';
  25853. } else {
  25854. result += 'sekundi';
  25855. }
  25856. return result;
  25857. case 'm':
  25858. return withoutSuffix ? 'jedna minuta' : 'jedne minute';
  25859. case 'mm':
  25860. if (number === 1) {
  25861. result += 'minuta';
  25862. } else if (number === 2 || number === 3 || number === 4) {
  25863. result += 'minute';
  25864. } else {
  25865. result += 'minuta';
  25866. }
  25867. return result;
  25868. case 'h':
  25869. return withoutSuffix ? 'jedan sat' : 'jednog sata';
  25870. case 'hh':
  25871. if (number === 1) {
  25872. result += 'sat';
  25873. } else if (number === 2 || number === 3 || number === 4) {
  25874. result += 'sata';
  25875. } else {
  25876. result += 'sati';
  25877. }
  25878. return result;
  25879. case 'dd':
  25880. if (number === 1) {
  25881. result += 'dan';
  25882. } else {
  25883. result += 'dana';
  25884. }
  25885. return result;
  25886. case 'MM':
  25887. if (number === 1) {
  25888. result += 'mjesec';
  25889. } else if (number === 2 || number === 3 || number === 4) {
  25890. result += 'mjeseca';
  25891. } else {
  25892. result += 'mjeseci';
  25893. }
  25894. return result;
  25895. case 'yy':
  25896. if (number === 1) {
  25897. result += 'godina';
  25898. } else if (number === 2 || number === 3 || number === 4) {
  25899. result += 'godine';
  25900. } else {
  25901. result += 'godina';
  25902. }
  25903. return result;
  25904. }
  25905. }
  25906. var hr = moment.defineLocale('hr', {
  25907. months : {
  25908. format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'),
  25909. standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_')
  25910. },
  25911. monthsShort : 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'),
  25912. monthsParseExact: true,
  25913. weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
  25914. weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  25915. weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'),
  25916. weekdaysParseExact : true,
  25917. longDateFormat : {
  25918. LT : 'H:mm',
  25919. LTS : 'H:mm:ss',
  25920. L : 'DD.MM.YYYY',
  25921. LL : 'D. MMMM YYYY',
  25922. LLL : 'D. MMMM YYYY H:mm',
  25923. LLLL : 'dddd, D. MMMM YYYY H:mm'
  25924. },
  25925. calendar : {
  25926. sameDay : '[danas u] LT',
  25927. nextDay : '[sutra u] LT',
  25928. nextWeek : function () {
  25929. switch (this.day()) {
  25930. case 0:
  25931. return '[u] [nedjelju] [u] LT';
  25932. case 3:
  25933. return '[u] [srijedu] [u] LT';
  25934. case 6:
  25935. return '[u] [subotu] [u] LT';
  25936. case 1:
  25937. case 2:
  25938. case 4:
  25939. case 5:
  25940. return '[u] dddd [u] LT';
  25941. }
  25942. },
  25943. lastDay : '[jučer u] LT',
  25944. lastWeek : function () {
  25945. switch (this.day()) {
  25946. case 0:
  25947. case 3:
  25948. return '[prošlu] dddd [u] LT';
  25949. case 6:
  25950. return '[prošle] [subote] [u] LT';
  25951. case 1:
  25952. case 2:
  25953. case 4:
  25954. case 5:
  25955. return '[prošli] dddd [u] LT';
  25956. }
  25957. },
  25958. sameElse : 'L'
  25959. },
  25960. relativeTime : {
  25961. future : 'za %s',
  25962. past : 'prije %s',
  25963. s : 'par sekundi',
  25964. ss : translate,
  25965. m : translate,
  25966. mm : translate,
  25967. h : translate,
  25968. hh : translate,
  25969. d : 'dan',
  25970. dd : translate,
  25971. M : 'mjesec',
  25972. MM : translate,
  25973. y : 'godinu',
  25974. yy : translate
  25975. },
  25976. dayOfMonthOrdinalParse: /\d{1,2}\./,
  25977. ordinal : '%d.',
  25978. week : {
  25979. dow : 1, // Monday is the first day of the week.
  25980. doy : 7 // The week that contains Jan 1st is the first week of the year.
  25981. }
  25982. });
  25983. return hr;
  25984. })));
  25985. /***/ }),
  25986. /* 260 */
  25987. /***/ (function(module, exports, __webpack_require__) {
  25988. //! moment.js locale configuration
  25989. //! locale : Hungarian [hu]
  25990. //! author : Adam Brunner : https://github.com/adambrunner
  25991. ;(function (global, factory) {
  25992. true ? factory(__webpack_require__(0)) :
  25993. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  25994. factory(global.moment)
  25995. }(this, (function (moment) { 'use strict';
  25996. var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
  25997. function translate(number, withoutSuffix, key, isFuture) {
  25998. var num = number;
  25999. switch (key) {
  26000. case 's':
  26001. return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
  26002. case 'ss':
  26003. return num + (isFuture || withoutSuffix) ? ' másodperc' : ' másodperce';
  26004. case 'm':
  26005. return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
  26006. case 'mm':
  26007. return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
  26008. case 'h':
  26009. return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
  26010. case 'hh':
  26011. return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
  26012. case 'd':
  26013. return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
  26014. case 'dd':
  26015. return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
  26016. case 'M':
  26017. return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
  26018. case 'MM':
  26019. return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
  26020. case 'y':
  26021. return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
  26022. case 'yy':
  26023. return num + (isFuture || withoutSuffix ? ' év' : ' éve');
  26024. }
  26025. return '';
  26026. }
  26027. function week(isFuture) {
  26028. return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';
  26029. }
  26030. var hu = moment.defineLocale('hu', {
  26031. months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),
  26032. monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'),
  26033. weekdays : 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
  26034. weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
  26035. weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'),
  26036. longDateFormat : {
  26037. LT : 'H:mm',
  26038. LTS : 'H:mm:ss',
  26039. L : 'YYYY.MM.DD.',
  26040. LL : 'YYYY. MMMM D.',
  26041. LLL : 'YYYY. MMMM D. H:mm',
  26042. LLLL : 'YYYY. MMMM D., dddd H:mm'
  26043. },
  26044. meridiemParse: /de|du/i,
  26045. isPM: function (input) {
  26046. return input.charAt(1).toLowerCase() === 'u';
  26047. },
  26048. meridiem : function (hours, minutes, isLower) {
  26049. if (hours < 12) {
  26050. return isLower === true ? 'de' : 'DE';
  26051. } else {
  26052. return isLower === true ? 'du' : 'DU';
  26053. }
  26054. },
  26055. calendar : {
  26056. sameDay : '[ma] LT[-kor]',
  26057. nextDay : '[holnap] LT[-kor]',
  26058. nextWeek : function () {
  26059. return week.call(this, true);
  26060. },
  26061. lastDay : '[tegnap] LT[-kor]',
  26062. lastWeek : function () {
  26063. return week.call(this, false);
  26064. },
  26065. sameElse : 'L'
  26066. },
  26067. relativeTime : {
  26068. future : '%s múlva',
  26069. past : '%s',
  26070. s : translate,
  26071. ss : translate,
  26072. m : translate,
  26073. mm : translate,
  26074. h : translate,
  26075. hh : translate,
  26076. d : translate,
  26077. dd : translate,
  26078. M : translate,
  26079. MM : translate,
  26080. y : translate,
  26081. yy : translate
  26082. },
  26083. dayOfMonthOrdinalParse: /\d{1,2}\./,
  26084. ordinal : '%d.',
  26085. week : {
  26086. dow : 1, // Monday is the first day of the week.
  26087. doy : 4 // The week that contains Jan 4th is the first week of the year.
  26088. }
  26089. });
  26090. return hu;
  26091. })));
  26092. /***/ }),
  26093. /* 261 */
  26094. /***/ (function(module, exports, __webpack_require__) {
  26095. //! moment.js locale configuration
  26096. //! locale : Armenian [hy-am]
  26097. //! author : Armendarabyan : https://github.com/armendarabyan
  26098. ;(function (global, factory) {
  26099. true ? factory(__webpack_require__(0)) :
  26100. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  26101. factory(global.moment)
  26102. }(this, (function (moment) { 'use strict';
  26103. var hyAm = moment.defineLocale('hy-am', {
  26104. months : {
  26105. format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'),
  26106. standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_')
  26107. },
  26108. monthsShort : 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
  26109. weekdays : 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'),
  26110. weekdaysShort : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
  26111. weekdaysMin : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
  26112. longDateFormat : {
  26113. LT : 'HH:mm',
  26114. LTS : 'HH:mm:ss',
  26115. L : 'DD.MM.YYYY',
  26116. LL : 'D MMMM YYYY թ.',
  26117. LLL : 'D MMMM YYYY թ., HH:mm',
  26118. LLLL : 'dddd, D MMMM YYYY թ., HH:mm'
  26119. },
  26120. calendar : {
  26121. sameDay: '[այսօր] LT',
  26122. nextDay: '[վաղը] LT',
  26123. lastDay: '[երեկ] LT',
  26124. nextWeek: function () {
  26125. return 'dddd [օրը ժամը] LT';
  26126. },
  26127. lastWeek: function () {
  26128. return '[անցած] dddd [օրը ժամը] LT';
  26129. },
  26130. sameElse: 'L'
  26131. },
  26132. relativeTime : {
  26133. future : '%s հետո',
  26134. past : '%s առաջ',
  26135. s : 'մի քանի վայրկյան',
  26136. ss : '%d վայրկյան',
  26137. m : 'րոպե',
  26138. mm : '%d րոպե',
  26139. h : 'ժամ',
  26140. hh : '%d ժամ',
  26141. d : 'օր',
  26142. dd : '%d օր',
  26143. M : 'ամիս',
  26144. MM : '%d ամիս',
  26145. y : 'տարի',
  26146. yy : '%d տարի'
  26147. },
  26148. meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,
  26149. isPM: function (input) {
  26150. return /^(ցերեկվա|երեկոյան)$/.test(input);
  26151. },
  26152. meridiem : function (hour) {
  26153. if (hour < 4) {
  26154. return 'գիշերվա';
  26155. } else if (hour < 12) {
  26156. return 'առավոտվա';
  26157. } else if (hour < 17) {
  26158. return 'ցերեկվա';
  26159. } else {
  26160. return 'երեկոյան';
  26161. }
  26162. },
  26163. dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
  26164. ordinal: function (number, period) {
  26165. switch (period) {
  26166. case 'DDD':
  26167. case 'w':
  26168. case 'W':
  26169. case 'DDDo':
  26170. if (number === 1) {
  26171. return number + '-ին';
  26172. }
  26173. return number + '-րդ';
  26174. default:
  26175. return number;
  26176. }
  26177. },
  26178. week : {
  26179. dow : 1, // Monday is the first day of the week.
  26180. doy : 7 // The week that contains Jan 1st is the first week of the year.
  26181. }
  26182. });
  26183. return hyAm;
  26184. })));
  26185. /***/ }),
  26186. /* 262 */
  26187. /***/ (function(module, exports, __webpack_require__) {
  26188. //! moment.js locale configuration
  26189. //! locale : Indonesian [id]
  26190. //! author : Mohammad Satrio Utomo : https://github.com/tyok
  26191. //! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan
  26192. ;(function (global, factory) {
  26193. true ? factory(__webpack_require__(0)) :
  26194. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  26195. factory(global.moment)
  26196. }(this, (function (moment) { 'use strict';
  26197. var id = moment.defineLocale('id', {
  26198. months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),
  26199. monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des'.split('_'),
  26200. weekdays : 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
  26201. weekdaysShort : 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
  26202. weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
  26203. longDateFormat : {
  26204. LT : 'HH.mm',
  26205. LTS : 'HH.mm.ss',
  26206. L : 'DD/MM/YYYY',
  26207. LL : 'D MMMM YYYY',
  26208. LLL : 'D MMMM YYYY [pukul] HH.mm',
  26209. LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'
  26210. },
  26211. meridiemParse: /pagi|siang|sore|malam/,
  26212. meridiemHour : function (hour, meridiem) {
  26213. if (hour === 12) {
  26214. hour = 0;
  26215. }
  26216. if (meridiem === 'pagi') {
  26217. return hour;
  26218. } else if (meridiem === 'siang') {
  26219. return hour >= 11 ? hour : hour + 12;
  26220. } else if (meridiem === 'sore' || meridiem === 'malam') {
  26221. return hour + 12;
  26222. }
  26223. },
  26224. meridiem : function (hours, minutes, isLower) {
  26225. if (hours < 11) {
  26226. return 'pagi';
  26227. } else if (hours < 15) {
  26228. return 'siang';
  26229. } else if (hours < 19) {
  26230. return 'sore';
  26231. } else {
  26232. return 'malam';
  26233. }
  26234. },
  26235. calendar : {
  26236. sameDay : '[Hari ini pukul] LT',
  26237. nextDay : '[Besok pukul] LT',
  26238. nextWeek : 'dddd [pukul] LT',
  26239. lastDay : '[Kemarin pukul] LT',
  26240. lastWeek : 'dddd [lalu pukul] LT',
  26241. sameElse : 'L'
  26242. },
  26243. relativeTime : {
  26244. future : 'dalam %s',
  26245. past : '%s yang lalu',
  26246. s : 'beberapa detik',
  26247. ss : '%d detik',
  26248. m : 'semenit',
  26249. mm : '%d menit',
  26250. h : 'sejam',
  26251. hh : '%d jam',
  26252. d : 'sehari',
  26253. dd : '%d hari',
  26254. M : 'sebulan',
  26255. MM : '%d bulan',
  26256. y : 'setahun',
  26257. yy : '%d tahun'
  26258. },
  26259. week : {
  26260. dow : 1, // Monday is the first day of the week.
  26261. doy : 7 // The week that contains Jan 1st is the first week of the year.
  26262. }
  26263. });
  26264. return id;
  26265. })));
  26266. /***/ }),
  26267. /* 263 */
  26268. /***/ (function(module, exports, __webpack_require__) {
  26269. //! moment.js locale configuration
  26270. //! locale : Icelandic [is]
  26271. //! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
  26272. ;(function (global, factory) {
  26273. true ? factory(__webpack_require__(0)) :
  26274. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  26275. factory(global.moment)
  26276. }(this, (function (moment) { 'use strict';
  26277. function plural(n) {
  26278. if (n % 100 === 11) {
  26279. return true;
  26280. } else if (n % 10 === 1) {
  26281. return false;
  26282. }
  26283. return true;
  26284. }
  26285. function translate(number, withoutSuffix, key, isFuture) {
  26286. var result = number + ' ';
  26287. switch (key) {
  26288. case 's':
  26289. return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum';
  26290. case 'ss':
  26291. if (plural(number)) {
  26292. return result + (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum');
  26293. }
  26294. return result + 'sekúnda';
  26295. case 'm':
  26296. return withoutSuffix ? 'mínúta' : 'mínútu';
  26297. case 'mm':
  26298. if (plural(number)) {
  26299. return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum');
  26300. } else if (withoutSuffix) {
  26301. return result + 'mínúta';
  26302. }
  26303. return result + 'mínútu';
  26304. case 'hh':
  26305. if (plural(number)) {
  26306. return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum');
  26307. }
  26308. return result + 'klukkustund';
  26309. case 'd':
  26310. if (withoutSuffix) {
  26311. return 'dagur';
  26312. }
  26313. return isFuture ? 'dag' : 'degi';
  26314. case 'dd':
  26315. if (plural(number)) {
  26316. if (withoutSuffix) {
  26317. return result + 'dagar';
  26318. }
  26319. return result + (isFuture ? 'daga' : 'dögum');
  26320. } else if (withoutSuffix) {
  26321. return result + 'dagur';
  26322. }
  26323. return result + (isFuture ? 'dag' : 'degi');
  26324. case 'M':
  26325. if (withoutSuffix) {
  26326. return 'mánuður';
  26327. }
  26328. return isFuture ? 'mánuð' : 'mánuði';
  26329. case 'MM':
  26330. if (plural(number)) {
  26331. if (withoutSuffix) {
  26332. return result + 'mánuðir';
  26333. }
  26334. return result + (isFuture ? 'mánuði' : 'mánuðum');
  26335. } else if (withoutSuffix) {
  26336. return result + 'mánuður';
  26337. }
  26338. return result + (isFuture ? 'mánuð' : 'mánuði');
  26339. case 'y':
  26340. return withoutSuffix || isFuture ? 'ár' : 'ári';
  26341. case 'yy':
  26342. if (plural(number)) {
  26343. return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
  26344. }
  26345. return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
  26346. }
  26347. }
  26348. var is = moment.defineLocale('is', {
  26349. months : 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'),
  26350. monthsShort : 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
  26351. weekdays : 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'),
  26352. weekdaysShort : 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
  26353. weekdaysMin : 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
  26354. longDateFormat : {
  26355. LT : 'H:mm',
  26356. LTS : 'H:mm:ss',
  26357. L : 'DD.MM.YYYY',
  26358. LL : 'D. MMMM YYYY',
  26359. LLL : 'D. MMMM YYYY [kl.] H:mm',
  26360. LLLL : 'dddd, D. MMMM YYYY [kl.] H:mm'
  26361. },
  26362. calendar : {
  26363. sameDay : '[í dag kl.] LT',
  26364. nextDay : '[á morgun kl.] LT',
  26365. nextWeek : 'dddd [kl.] LT',
  26366. lastDay : '[í gær kl.] LT',
  26367. lastWeek : '[síðasta] dddd [kl.] LT',
  26368. sameElse : 'L'
  26369. },
  26370. relativeTime : {
  26371. future : 'eftir %s',
  26372. past : 'fyrir %s síðan',
  26373. s : translate,
  26374. ss : translate,
  26375. m : translate,
  26376. mm : translate,
  26377. h : 'klukkustund',
  26378. hh : translate,
  26379. d : translate,
  26380. dd : translate,
  26381. M : translate,
  26382. MM : translate,
  26383. y : translate,
  26384. yy : translate
  26385. },
  26386. dayOfMonthOrdinalParse: /\d{1,2}\./,
  26387. ordinal : '%d.',
  26388. week : {
  26389. dow : 1, // Monday is the first day of the week.
  26390. doy : 4 // The week that contains Jan 4th is the first week of the year.
  26391. }
  26392. });
  26393. return is;
  26394. })));
  26395. /***/ }),
  26396. /* 264 */
  26397. /***/ (function(module, exports, __webpack_require__) {
  26398. //! moment.js locale configuration
  26399. //! locale : Italian [it]
  26400. //! author : Lorenzo : https://github.com/aliem
  26401. //! author: Mattia Larentis: https://github.com/nostalgiaz
  26402. ;(function (global, factory) {
  26403. true ? factory(__webpack_require__(0)) :
  26404. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  26405. factory(global.moment)
  26406. }(this, (function (moment) { 'use strict';
  26407. var it = moment.defineLocale('it', {
  26408. months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
  26409. monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
  26410. weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),
  26411. weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
  26412. weekdaysMin : 'do_lu_ma_me_gi_ve_sa'.split('_'),
  26413. longDateFormat : {
  26414. LT : 'HH:mm',
  26415. LTS : 'HH:mm:ss',
  26416. L : 'DD/MM/YYYY',
  26417. LL : 'D MMMM YYYY',
  26418. LLL : 'D MMMM YYYY HH:mm',
  26419. LLLL : 'dddd D MMMM YYYY HH:mm'
  26420. },
  26421. calendar : {
  26422. sameDay: '[Oggi alle] LT',
  26423. nextDay: '[Domani alle] LT',
  26424. nextWeek: 'dddd [alle] LT',
  26425. lastDay: '[Ieri alle] LT',
  26426. lastWeek: function () {
  26427. switch (this.day()) {
  26428. case 0:
  26429. return '[la scorsa] dddd [alle] LT';
  26430. default:
  26431. return '[lo scorso] dddd [alle] LT';
  26432. }
  26433. },
  26434. sameElse: 'L'
  26435. },
  26436. relativeTime : {
  26437. future : function (s) {
  26438. return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s;
  26439. },
  26440. past : '%s fa',
  26441. s : 'alcuni secondi',
  26442. ss : '%d secondi',
  26443. m : 'un minuto',
  26444. mm : '%d minuti',
  26445. h : 'un\'ora',
  26446. hh : '%d ore',
  26447. d : 'un giorno',
  26448. dd : '%d giorni',
  26449. M : 'un mese',
  26450. MM : '%d mesi',
  26451. y : 'un anno',
  26452. yy : '%d anni'
  26453. },
  26454. dayOfMonthOrdinalParse : /\d{1,2}º/,
  26455. ordinal: '%dº',
  26456. week : {
  26457. dow : 1, // Monday is the first day of the week.
  26458. doy : 4 // The week that contains Jan 4th is the first week of the year.
  26459. }
  26460. });
  26461. return it;
  26462. })));
  26463. /***/ }),
  26464. /* 265 */
  26465. /***/ (function(module, exports, __webpack_require__) {
  26466. //! moment.js locale configuration
  26467. //! locale : Japanese [ja]
  26468. //! author : LI Long : https://github.com/baryon
  26469. ;(function (global, factory) {
  26470. true ? factory(__webpack_require__(0)) :
  26471. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  26472. factory(global.moment)
  26473. }(this, (function (moment) { 'use strict';
  26474. var ja = moment.defineLocale('ja', {
  26475. months : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  26476. monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  26477. weekdays : '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
  26478. weekdaysShort : '日_月_火_水_木_金_土'.split('_'),
  26479. weekdaysMin : '日_月_火_水_木_金_土'.split('_'),
  26480. longDateFormat : {
  26481. LT : 'HH:mm',
  26482. LTS : 'HH:mm:ss',
  26483. L : 'YYYY/MM/DD',
  26484. LL : 'YYYY年M月D日',
  26485. LLL : 'YYYY年M月D日 HH:mm',
  26486. LLLL : 'YYYY年M月D日 HH:mm dddd',
  26487. l : 'YYYY/MM/DD',
  26488. ll : 'YYYY年M月D日',
  26489. lll : 'YYYY年M月D日 HH:mm',
  26490. llll : 'YYYY年M月D日 HH:mm dddd'
  26491. },
  26492. meridiemParse: /午前|午後/i,
  26493. isPM : function (input) {
  26494. return input === '午後';
  26495. },
  26496. meridiem : function (hour, minute, isLower) {
  26497. if (hour < 12) {
  26498. return '午前';
  26499. } else {
  26500. return '午後';
  26501. }
  26502. },
  26503. calendar : {
  26504. sameDay : '[今日] LT',
  26505. nextDay : '[明日] LT',
  26506. nextWeek : '[来週]dddd LT',
  26507. lastDay : '[昨日] LT',
  26508. lastWeek : '[前週]dddd LT',
  26509. sameElse : 'L'
  26510. },
  26511. dayOfMonthOrdinalParse : /\d{1,2}日/,
  26512. ordinal : function (number, period) {
  26513. switch (period) {
  26514. case 'd':
  26515. case 'D':
  26516. case 'DDD':
  26517. return number + '日';
  26518. default:
  26519. return number;
  26520. }
  26521. },
  26522. relativeTime : {
  26523. future : '%s後',
  26524. past : '%s前',
  26525. s : '数秒',
  26526. ss : '%d秒',
  26527. m : '1分',
  26528. mm : '%d分',
  26529. h : '1時間',
  26530. hh : '%d時間',
  26531. d : '1日',
  26532. dd : '%d日',
  26533. M : '1ヶ月',
  26534. MM : '%dヶ月',
  26535. y : '1年',
  26536. yy : '%d年'
  26537. }
  26538. });
  26539. return ja;
  26540. })));
  26541. /***/ }),
  26542. /* 266 */
  26543. /***/ (function(module, exports, __webpack_require__) {
  26544. //! moment.js locale configuration
  26545. //! locale : Javanese [jv]
  26546. //! author : Rony Lantip : https://github.com/lantip
  26547. //! reference: http://jv.wikipedia.org/wiki/Basa_Jawa
  26548. ;(function (global, factory) {
  26549. true ? factory(__webpack_require__(0)) :
  26550. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  26551. factory(global.moment)
  26552. }(this, (function (moment) { 'use strict';
  26553. var jv = moment.defineLocale('jv', {
  26554. months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'),
  26555. monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),
  26556. weekdays : 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),
  26557. weekdaysShort : 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),
  26558. weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),
  26559. longDateFormat : {
  26560. LT : 'HH.mm',
  26561. LTS : 'HH.mm.ss',
  26562. L : 'DD/MM/YYYY',
  26563. LL : 'D MMMM YYYY',
  26564. LLL : 'D MMMM YYYY [pukul] HH.mm',
  26565. LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'
  26566. },
  26567. meridiemParse: /enjing|siyang|sonten|ndalu/,
  26568. meridiemHour : function (hour, meridiem) {
  26569. if (hour === 12) {
  26570. hour = 0;
  26571. }
  26572. if (meridiem === 'enjing') {
  26573. return hour;
  26574. } else if (meridiem === 'siyang') {
  26575. return hour >= 11 ? hour : hour + 12;
  26576. } else if (meridiem === 'sonten' || meridiem === 'ndalu') {
  26577. return hour + 12;
  26578. }
  26579. },
  26580. meridiem : function (hours, minutes, isLower) {
  26581. if (hours < 11) {
  26582. return 'enjing';
  26583. } else if (hours < 15) {
  26584. return 'siyang';
  26585. } else if (hours < 19) {
  26586. return 'sonten';
  26587. } else {
  26588. return 'ndalu';
  26589. }
  26590. },
  26591. calendar : {
  26592. sameDay : '[Dinten puniko pukul] LT',
  26593. nextDay : '[Mbenjang pukul] LT',
  26594. nextWeek : 'dddd [pukul] LT',
  26595. lastDay : '[Kala wingi pukul] LT',
  26596. lastWeek : 'dddd [kepengker pukul] LT',
  26597. sameElse : 'L'
  26598. },
  26599. relativeTime : {
  26600. future : 'wonten ing %s',
  26601. past : '%s ingkang kepengker',
  26602. s : 'sawetawis detik',
  26603. ss : '%d detik',
  26604. m : 'setunggal menit',
  26605. mm : '%d menit',
  26606. h : 'setunggal jam',
  26607. hh : '%d jam',
  26608. d : 'sedinten',
  26609. dd : '%d dinten',
  26610. M : 'sewulan',
  26611. MM : '%d wulan',
  26612. y : 'setaun',
  26613. yy : '%d taun'
  26614. },
  26615. week : {
  26616. dow : 1, // Monday is the first day of the week.
  26617. doy : 7 // The week that contains Jan 1st is the first week of the year.
  26618. }
  26619. });
  26620. return jv;
  26621. })));
  26622. /***/ }),
  26623. /* 267 */
  26624. /***/ (function(module, exports, __webpack_require__) {
  26625. //! moment.js locale configuration
  26626. //! locale : Georgian [ka]
  26627. //! author : Irakli Janiashvili : https://github.com/irakli-janiashvili
  26628. ;(function (global, factory) {
  26629. true ? factory(__webpack_require__(0)) :
  26630. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  26631. factory(global.moment)
  26632. }(this, (function (moment) { 'use strict';
  26633. var ka = moment.defineLocale('ka', {
  26634. months : {
  26635. standalone: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'),
  26636. format: 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_')
  26637. },
  26638. monthsShort : 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),
  26639. weekdays : {
  26640. standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'),
  26641. format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_'),
  26642. isFormat: /(წინა|შემდეგ)/
  26643. },
  26644. weekdaysShort : 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),
  26645. weekdaysMin : 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),
  26646. longDateFormat : {
  26647. LT : 'h:mm A',
  26648. LTS : 'h:mm:ss A',
  26649. L : 'DD/MM/YYYY',
  26650. LL : 'D MMMM YYYY',
  26651. LLL : 'D MMMM YYYY h:mm A',
  26652. LLLL : 'dddd, D MMMM YYYY h:mm A'
  26653. },
  26654. calendar : {
  26655. sameDay : '[დღეს] LT[-ზე]',
  26656. nextDay : '[ხვალ] LT[-ზე]',
  26657. lastDay : '[გუშინ] LT[-ზე]',
  26658. nextWeek : '[შემდეგ] dddd LT[-ზე]',
  26659. lastWeek : '[წინა] dddd LT-ზე',
  26660. sameElse : 'L'
  26661. },
  26662. relativeTime : {
  26663. future : function (s) {
  26664. return (/(წამი|წუთი|საათი|წელი)/).test(s) ?
  26665. s.replace(/ი$/, 'ში') :
  26666. s + 'ში';
  26667. },
  26668. past : function (s) {
  26669. if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) {
  26670. return s.replace(/(ი|ე)$/, 'ის უკან');
  26671. }
  26672. if ((/წელი/).test(s)) {
  26673. return s.replace(/წელი$/, 'წლის უკან');
  26674. }
  26675. },
  26676. s : 'რამდენიმე წამი',
  26677. ss : '%d წამი',
  26678. m : 'წუთი',
  26679. mm : '%d წუთი',
  26680. h : 'საათი',
  26681. hh : '%d საათი',
  26682. d : 'დღე',
  26683. dd : '%d დღე',
  26684. M : 'თვე',
  26685. MM : '%d თვე',
  26686. y : 'წელი',
  26687. yy : '%d წელი'
  26688. },
  26689. dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
  26690. ordinal : function (number) {
  26691. if (number === 0) {
  26692. return number;
  26693. }
  26694. if (number === 1) {
  26695. return number + '-ლი';
  26696. }
  26697. if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) {
  26698. return 'მე-' + number;
  26699. }
  26700. return number + '-ე';
  26701. },
  26702. week : {
  26703. dow : 1,
  26704. doy : 7
  26705. }
  26706. });
  26707. return ka;
  26708. })));
  26709. /***/ }),
  26710. /* 268 */
  26711. /***/ (function(module, exports, __webpack_require__) {
  26712. //! moment.js locale configuration
  26713. //! locale : Kazakh [kk]
  26714. //! authors : Nurlan Rakhimzhanov : https://github.com/nurlan
  26715. ;(function (global, factory) {
  26716. true ? factory(__webpack_require__(0)) :
  26717. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  26718. factory(global.moment)
  26719. }(this, (function (moment) { 'use strict';
  26720. var suffixes = {
  26721. 0: '-ші',
  26722. 1: '-ші',
  26723. 2: '-ші',
  26724. 3: '-ші',
  26725. 4: '-ші',
  26726. 5: '-ші',
  26727. 6: '-шы',
  26728. 7: '-ші',
  26729. 8: '-ші',
  26730. 9: '-шы',
  26731. 10: '-шы',
  26732. 20: '-шы',
  26733. 30: '-шы',
  26734. 40: '-шы',
  26735. 50: '-ші',
  26736. 60: '-шы',
  26737. 70: '-ші',
  26738. 80: '-ші',
  26739. 90: '-шы',
  26740. 100: '-ші'
  26741. };
  26742. var kk = moment.defineLocale('kk', {
  26743. months : 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split('_'),
  26744. monthsShort : 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),
  26745. weekdays : 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split('_'),
  26746. weekdaysShort : 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),
  26747. weekdaysMin : 'жк_дй_сй_ср_бй_жм_сн'.split('_'),
  26748. longDateFormat : {
  26749. LT : 'HH:mm',
  26750. LTS : 'HH:mm:ss',
  26751. L : 'DD.MM.YYYY',
  26752. LL : 'D MMMM YYYY',
  26753. LLL : 'D MMMM YYYY HH:mm',
  26754. LLLL : 'dddd, D MMMM YYYY HH:mm'
  26755. },
  26756. calendar : {
  26757. sameDay : '[Бүгін сағат] LT',
  26758. nextDay : '[Ертең сағат] LT',
  26759. nextWeek : 'dddd [сағат] LT',
  26760. lastDay : '[Кеше сағат] LT',
  26761. lastWeek : '[Өткен аптаның] dddd [сағат] LT',
  26762. sameElse : 'L'
  26763. },
  26764. relativeTime : {
  26765. future : '%s ішінде',
  26766. past : '%s бұрын',
  26767. s : 'бірнеше секунд',
  26768. ss : '%d секунд',
  26769. m : 'бір минут',
  26770. mm : '%d минут',
  26771. h : 'бір сағат',
  26772. hh : '%d сағат',
  26773. d : 'бір күн',
  26774. dd : '%d күн',
  26775. M : 'бір ай',
  26776. MM : '%d ай',
  26777. y : 'бір жыл',
  26778. yy : '%d жыл'
  26779. },
  26780. dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/,
  26781. ordinal : function (number) {
  26782. var a = number % 10,
  26783. b = number >= 100 ? 100 : null;
  26784. return number + (suffixes[number] || suffixes[a] || suffixes[b]);
  26785. },
  26786. week : {
  26787. dow : 1, // Monday is the first day of the week.
  26788. doy : 7 // The week that contains Jan 1st is the first week of the year.
  26789. }
  26790. });
  26791. return kk;
  26792. })));
  26793. /***/ }),
  26794. /* 269 */
  26795. /***/ (function(module, exports, __webpack_require__) {
  26796. //! moment.js locale configuration
  26797. //! locale : Cambodian [km]
  26798. //! author : Kruy Vanna : https://github.com/kruyvanna
  26799. ;(function (global, factory) {
  26800. true ? factory(__webpack_require__(0)) :
  26801. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  26802. factory(global.moment)
  26803. }(this, (function (moment) { 'use strict';
  26804. var km = moment.defineLocale('km', {
  26805. months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),
  26806. monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),
  26807. weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
  26808. weekdaysShort: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
  26809. weekdaysMin: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
  26810. longDateFormat: {
  26811. LT: 'HH:mm',
  26812. LTS : 'HH:mm:ss',
  26813. L: 'DD/MM/YYYY',
  26814. LL: 'D MMMM YYYY',
  26815. LLL: 'D MMMM YYYY HH:mm',
  26816. LLLL: 'dddd, D MMMM YYYY HH:mm'
  26817. },
  26818. calendar: {
  26819. sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
  26820. nextDay: '[ស្អែក ម៉ោង] LT',
  26821. nextWeek: 'dddd [ម៉ោង] LT',
  26822. lastDay: '[ម្សិលមិញ ម៉ោង] LT',
  26823. lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',
  26824. sameElse: 'L'
  26825. },
  26826. relativeTime: {
  26827. future: '%sទៀត',
  26828. past: '%sមុន',
  26829. s: 'ប៉ុន្មានវិនាទី',
  26830. ss: '%d វិនាទី',
  26831. m: 'មួយនាទី',
  26832. mm: '%d នាទី',
  26833. h: 'មួយម៉ោង',
  26834. hh: '%d ម៉ោង',
  26835. d: 'មួយថ្ងៃ',
  26836. dd: '%d ថ្ងៃ',
  26837. M: 'មួយខែ',
  26838. MM: '%d ខែ',
  26839. y: 'មួយឆ្នាំ',
  26840. yy: '%d ឆ្នាំ'
  26841. },
  26842. week: {
  26843. dow: 1, // Monday is the first day of the week.
  26844. doy: 4 // The week that contains Jan 4th is the first week of the year.
  26845. }
  26846. });
  26847. return km;
  26848. })));
  26849. /***/ }),
  26850. /* 270 */
  26851. /***/ (function(module, exports, __webpack_require__) {
  26852. //! moment.js locale configuration
  26853. //! locale : Kannada [kn]
  26854. //! author : Rajeev Naik : https://github.com/rajeevnaikte
  26855. ;(function (global, factory) {
  26856. true ? factory(__webpack_require__(0)) :
  26857. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  26858. factory(global.moment)
  26859. }(this, (function (moment) { 'use strict';
  26860. var symbolMap = {
  26861. '1': '೧',
  26862. '2': '೨',
  26863. '3': '೩',
  26864. '4': '೪',
  26865. '5': '೫',
  26866. '6': '೬',
  26867. '7': '೭',
  26868. '8': '೮',
  26869. '9': '೯',
  26870. '0': '೦'
  26871. };
  26872. var numberMap = {
  26873. '೧': '1',
  26874. '೨': '2',
  26875. '೩': '3',
  26876. '೪': '4',
  26877. '೫': '5',
  26878. '೬': '6',
  26879. '೭': '7',
  26880. '೮': '8',
  26881. '೯': '9',
  26882. '೦': '0'
  26883. };
  26884. var kn = moment.defineLocale('kn', {
  26885. months : 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split('_'),
  26886. monthsShort : 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬ_ಅಕ್ಟೋಬ_ನವೆಂಬ_ಡಿಸೆಂಬ'.split('_'),
  26887. monthsParseExact: true,
  26888. weekdays : 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split('_'),
  26889. weekdaysShort : 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),
  26890. weekdaysMin : 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),
  26891. longDateFormat : {
  26892. LT : 'A h:mm',
  26893. LTS : 'A h:mm:ss',
  26894. L : 'DD/MM/YYYY',
  26895. LL : 'D MMMM YYYY',
  26896. LLL : 'D MMMM YYYY, A h:mm',
  26897. LLLL : 'dddd, D MMMM YYYY, A h:mm'
  26898. },
  26899. calendar : {
  26900. sameDay : '[ಇಂದು] LT',
  26901. nextDay : '[ನಾಳೆ] LT',
  26902. nextWeek : 'dddd, LT',
  26903. lastDay : '[ನಿನ್ನೆ] LT',
  26904. lastWeek : '[ಕೊನೆಯ] dddd, LT',
  26905. sameElse : 'L'
  26906. },
  26907. relativeTime : {
  26908. future : '%s ನಂತರ',
  26909. past : '%s ಹಿಂದೆ',
  26910. s : 'ಕೆಲವು ಕ್ಷಣಗಳು',
  26911. ss : '%d ಸೆಕೆಂಡುಗಳು',
  26912. m : 'ಒಂದು ನಿಮಿಷ',
  26913. mm : '%d ನಿಮಿಷ',
  26914. h : 'ಒಂದು ಗಂಟೆ',
  26915. hh : '%d ಗಂಟೆ',
  26916. d : 'ಒಂದು ದಿನ',
  26917. dd : '%d ದಿನ',
  26918. M : 'ಒಂದು ತಿಂಗಳು',
  26919. MM : '%d ತಿಂಗಳು',
  26920. y : 'ಒಂದು ವರ್ಷ',
  26921. yy : '%d ವರ್ಷ'
  26922. },
  26923. preparse: function (string) {
  26924. return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
  26925. return numberMap[match];
  26926. });
  26927. },
  26928. postformat: function (string) {
  26929. return string.replace(/\d/g, function (match) {
  26930. return symbolMap[match];
  26931. });
  26932. },
  26933. meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
  26934. meridiemHour : function (hour, meridiem) {
  26935. if (hour === 12) {
  26936. hour = 0;
  26937. }
  26938. if (meridiem === 'ರಾತ್ರಿ') {
  26939. return hour < 4 ? hour : hour + 12;
  26940. } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {
  26941. return hour;
  26942. } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {
  26943. return hour >= 10 ? hour : hour + 12;
  26944. } else if (meridiem === 'ಸಂಜೆ') {
  26945. return hour + 12;
  26946. }
  26947. },
  26948. meridiem : function (hour, minute, isLower) {
  26949. if (hour < 4) {
  26950. return 'ರಾತ್ರಿ';
  26951. } else if (hour < 10) {
  26952. return 'ಬೆಳಿಗ್ಗೆ';
  26953. } else if (hour < 17) {
  26954. return 'ಮಧ್ಯಾಹ್ನ';
  26955. } else if (hour < 20) {
  26956. return 'ಸಂಜೆ';
  26957. } else {
  26958. return 'ರಾತ್ರಿ';
  26959. }
  26960. },
  26961. dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
  26962. ordinal : function (number) {
  26963. return number + 'ನೇ';
  26964. },
  26965. week : {
  26966. dow : 0, // Sunday is the first day of the week.
  26967. doy : 6 // The week that contains Jan 1st is the first week of the year.
  26968. }
  26969. });
  26970. return kn;
  26971. })));
  26972. /***/ }),
  26973. /* 271 */
  26974. /***/ (function(module, exports, __webpack_require__) {
  26975. //! moment.js locale configuration
  26976. //! locale : Korean [ko]
  26977. //! author : Kyungwook, Park : https://github.com/kyungw00k
  26978. //! author : Jeeeyul Lee <jeeeyul@gmail.com>
  26979. ;(function (global, factory) {
  26980. true ? factory(__webpack_require__(0)) :
  26981. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  26982. factory(global.moment)
  26983. }(this, (function (moment) { 'use strict';
  26984. var ko = moment.defineLocale('ko', {
  26985. months : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
  26986. monthsShort : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
  26987. weekdays : '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
  26988. weekdaysShort : '일_월_화_수_목_금_토'.split('_'),
  26989. weekdaysMin : '일_월_화_수_목_금_토'.split('_'),
  26990. longDateFormat : {
  26991. LT : 'A h:mm',
  26992. LTS : 'A h:mm:ss',
  26993. L : 'YYYY.MM.DD',
  26994. LL : 'YYYY년 MMMM D일',
  26995. LLL : 'YYYY년 MMMM D일 A h:mm',
  26996. LLLL : 'YYYY년 MMMM D일 dddd A h:mm',
  26997. l : 'YYYY.MM.DD',
  26998. ll : 'YYYY년 MMMM D일',
  26999. lll : 'YYYY년 MMMM D일 A h:mm',
  27000. llll : 'YYYY년 MMMM D일 dddd A h:mm'
  27001. },
  27002. calendar : {
  27003. sameDay : '오늘 LT',
  27004. nextDay : '내일 LT',
  27005. nextWeek : 'dddd LT',
  27006. lastDay : '어제 LT',
  27007. lastWeek : '지난주 dddd LT',
  27008. sameElse : 'L'
  27009. },
  27010. relativeTime : {
  27011. future : '%s 후',
  27012. past : '%s 전',
  27013. s : '몇 초',
  27014. ss : '%d초',
  27015. m : '1분',
  27016. mm : '%d분',
  27017. h : '한 시간',
  27018. hh : '%d시간',
  27019. d : '하루',
  27020. dd : '%d일',
  27021. M : '한 달',
  27022. MM : '%d달',
  27023. y : '일 년',
  27024. yy : '%d년'
  27025. },
  27026. dayOfMonthOrdinalParse : /\d{1,2}(일|월|주)/,
  27027. ordinal : function (number, period) {
  27028. switch (period) {
  27029. case 'd':
  27030. case 'D':
  27031. case 'DDD':
  27032. return number + '일';
  27033. case 'M':
  27034. return number + '월';
  27035. case 'w':
  27036. case 'W':
  27037. return number + '주';
  27038. default:
  27039. return number;
  27040. }
  27041. },
  27042. meridiemParse : /오전|오후/,
  27043. isPM : function (token) {
  27044. return token === '오후';
  27045. },
  27046. meridiem : function (hour, minute, isUpper) {
  27047. return hour < 12 ? '오전' : '오후';
  27048. }
  27049. });
  27050. return ko;
  27051. })));
  27052. /***/ }),
  27053. /* 272 */
  27054. /***/ (function(module, exports, __webpack_require__) {
  27055. //! moment.js locale configuration
  27056. //! locale : Kyrgyz [ky]
  27057. //! author : Chyngyz Arystan uulu : https://github.com/chyngyz
  27058. ;(function (global, factory) {
  27059. true ? factory(__webpack_require__(0)) :
  27060. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  27061. factory(global.moment)
  27062. }(this, (function (moment) { 'use strict';
  27063. var suffixes = {
  27064. 0: '-чү',
  27065. 1: '-чи',
  27066. 2: '-чи',
  27067. 3: '-чү',
  27068. 4: '-чү',
  27069. 5: '-чи',
  27070. 6: '-чы',
  27071. 7: '-чи',
  27072. 8: '-чи',
  27073. 9: '-чу',
  27074. 10: '-чу',
  27075. 20: '-чы',
  27076. 30: '-чу',
  27077. 40: '-чы',
  27078. 50: '-чү',
  27079. 60: '-чы',
  27080. 70: '-чи',
  27081. 80: '-чи',
  27082. 90: '-чу',
  27083. 100: '-чү'
  27084. };
  27085. var ky = moment.defineLocale('ky', {
  27086. months : 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'),
  27087. monthsShort : 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'),
  27088. weekdays : 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split('_'),
  27089. weekdaysShort : 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),
  27090. weekdaysMin : 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),
  27091. longDateFormat : {
  27092. LT : 'HH:mm',
  27093. LTS : 'HH:mm:ss',
  27094. L : 'DD.MM.YYYY',
  27095. LL : 'D MMMM YYYY',
  27096. LLL : 'D MMMM YYYY HH:mm',
  27097. LLLL : 'dddd, D MMMM YYYY HH:mm'
  27098. },
  27099. calendar : {
  27100. sameDay : '[Бүгүн саат] LT',
  27101. nextDay : '[Эртең саат] LT',
  27102. nextWeek : 'dddd [саат] LT',
  27103. lastDay : '[Кече саат] LT',
  27104. lastWeek : '[Өткен аптанын] dddd [күнү] [саат] LT',
  27105. sameElse : 'L'
  27106. },
  27107. relativeTime : {
  27108. future : '%s ичинде',
  27109. past : '%s мурун',
  27110. s : 'бирнече секунд',
  27111. ss : '%d секунд',
  27112. m : 'бир мүнөт',
  27113. mm : '%d мүнөт',
  27114. h : 'бир саат',
  27115. hh : '%d саат',
  27116. d : 'бир күн',
  27117. dd : '%d күн',
  27118. M : 'бир ай',
  27119. MM : '%d ай',
  27120. y : 'бир жыл',
  27121. yy : '%d жыл'
  27122. },
  27123. dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
  27124. ordinal : function (number) {
  27125. var a = number % 10,
  27126. b = number >= 100 ? 100 : null;
  27127. return number + (suffixes[number] || suffixes[a] || suffixes[b]);
  27128. },
  27129. week : {
  27130. dow : 1, // Monday is the first day of the week.
  27131. doy : 7 // The week that contains Jan 1st is the first week of the year.
  27132. }
  27133. });
  27134. return ky;
  27135. })));
  27136. /***/ }),
  27137. /* 273 */
  27138. /***/ (function(module, exports, __webpack_require__) {
  27139. //! moment.js locale configuration
  27140. //! locale : Luxembourgish [lb]
  27141. //! author : mweimerskirch : https://github.com/mweimerskirch
  27142. //! author : David Raison : https://github.com/kwisatz
  27143. ;(function (global, factory) {
  27144. true ? factory(__webpack_require__(0)) :
  27145. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  27146. factory(global.moment)
  27147. }(this, (function (moment) { 'use strict';
  27148. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  27149. var format = {
  27150. 'm': ['eng Minutt', 'enger Minutt'],
  27151. 'h': ['eng Stonn', 'enger Stonn'],
  27152. 'd': ['een Dag', 'engem Dag'],
  27153. 'M': ['ee Mount', 'engem Mount'],
  27154. 'y': ['ee Joer', 'engem Joer']
  27155. };
  27156. return withoutSuffix ? format[key][0] : format[key][1];
  27157. }
  27158. function processFutureTime(string) {
  27159. var number = string.substr(0, string.indexOf(' '));
  27160. if (eifelerRegelAppliesToNumber(number)) {
  27161. return 'a ' + string;
  27162. }
  27163. return 'an ' + string;
  27164. }
  27165. function processPastTime(string) {
  27166. var number = string.substr(0, string.indexOf(' '));
  27167. if (eifelerRegelAppliesToNumber(number)) {
  27168. return 'viru ' + string;
  27169. }
  27170. return 'virun ' + string;
  27171. }
  27172. /**
  27173. * Returns true if the word before the given number loses the '-n' ending.
  27174. * e.g. 'an 10 Deeg' but 'a 5 Deeg'
  27175. *
  27176. * @param number {integer}
  27177. * @returns {boolean}
  27178. */
  27179. function eifelerRegelAppliesToNumber(number) {
  27180. number = parseInt(number, 10);
  27181. if (isNaN(number)) {
  27182. return false;
  27183. }
  27184. if (number < 0) {
  27185. // Negative Number --> always true
  27186. return true;
  27187. } else if (number < 10) {
  27188. // Only 1 digit
  27189. if (4 <= number && number <= 7) {
  27190. return true;
  27191. }
  27192. return false;
  27193. } else if (number < 100) {
  27194. // 2 digits
  27195. var lastDigit = number % 10, firstDigit = number / 10;
  27196. if (lastDigit === 0) {
  27197. return eifelerRegelAppliesToNumber(firstDigit);
  27198. }
  27199. return eifelerRegelAppliesToNumber(lastDigit);
  27200. } else if (number < 10000) {
  27201. // 3 or 4 digits --> recursively check first digit
  27202. while (number >= 10) {
  27203. number = number / 10;
  27204. }
  27205. return eifelerRegelAppliesToNumber(number);
  27206. } else {
  27207. // Anything larger than 4 digits: recursively check first n-3 digits
  27208. number = number / 1000;
  27209. return eifelerRegelAppliesToNumber(number);
  27210. }
  27211. }
  27212. var lb = moment.defineLocale('lb', {
  27213. months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
  27214. monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),
  27215. monthsParseExact : true,
  27216. weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'),
  27217. weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
  27218. weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
  27219. weekdaysParseExact : true,
  27220. longDateFormat: {
  27221. LT: 'H:mm [Auer]',
  27222. LTS: 'H:mm:ss [Auer]',
  27223. L: 'DD.MM.YYYY',
  27224. LL: 'D. MMMM YYYY',
  27225. LLL: 'D. MMMM YYYY H:mm [Auer]',
  27226. LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]'
  27227. },
  27228. calendar: {
  27229. sameDay: '[Haut um] LT',
  27230. sameElse: 'L',
  27231. nextDay: '[Muer um] LT',
  27232. nextWeek: 'dddd [um] LT',
  27233. lastDay: '[Gëschter um] LT',
  27234. lastWeek: function () {
  27235. // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
  27236. switch (this.day()) {
  27237. case 2:
  27238. case 4:
  27239. return '[Leschten] dddd [um] LT';
  27240. default:
  27241. return '[Leschte] dddd [um] LT';
  27242. }
  27243. }
  27244. },
  27245. relativeTime : {
  27246. future : processFutureTime,
  27247. past : processPastTime,
  27248. s : 'e puer Sekonnen',
  27249. ss : '%d Sekonnen',
  27250. m : processRelativeTime,
  27251. mm : '%d Minutten',
  27252. h : processRelativeTime,
  27253. hh : '%d Stonnen',
  27254. d : processRelativeTime,
  27255. dd : '%d Deeg',
  27256. M : processRelativeTime,
  27257. MM : '%d Méint',
  27258. y : processRelativeTime,
  27259. yy : '%d Joer'
  27260. },
  27261. dayOfMonthOrdinalParse: /\d{1,2}\./,
  27262. ordinal: '%d.',
  27263. week: {
  27264. dow: 1, // Monday is the first day of the week.
  27265. doy: 4 // The week that contains Jan 4th is the first week of the year.
  27266. }
  27267. });
  27268. return lb;
  27269. })));
  27270. /***/ }),
  27271. /* 274 */
  27272. /***/ (function(module, exports, __webpack_require__) {
  27273. //! moment.js locale configuration
  27274. //! locale : Lao [lo]
  27275. //! author : Ryan Hart : https://github.com/ryanhart2
  27276. ;(function (global, factory) {
  27277. true ? factory(__webpack_require__(0)) :
  27278. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  27279. factory(global.moment)
  27280. }(this, (function (moment) { 'use strict';
  27281. var lo = moment.defineLocale('lo', {
  27282. months : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),
  27283. monthsShort : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),
  27284. weekdays : 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
  27285. weekdaysShort : 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
  27286. weekdaysMin : 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
  27287. weekdaysParseExact : true,
  27288. longDateFormat : {
  27289. LT : 'HH:mm',
  27290. LTS : 'HH:mm:ss',
  27291. L : 'DD/MM/YYYY',
  27292. LL : 'D MMMM YYYY',
  27293. LLL : 'D MMMM YYYY HH:mm',
  27294. LLLL : 'ວັນdddd D MMMM YYYY HH:mm'
  27295. },
  27296. meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,
  27297. isPM: function (input) {
  27298. return input === 'ຕອນແລງ';
  27299. },
  27300. meridiem : function (hour, minute, isLower) {
  27301. if (hour < 12) {
  27302. return 'ຕອນເຊົ້າ';
  27303. } else {
  27304. return 'ຕອນແລງ';
  27305. }
  27306. },
  27307. calendar : {
  27308. sameDay : '[ມື້ນີ້ເວລາ] LT',
  27309. nextDay : '[ມື້ອື່ນເວລາ] LT',
  27310. nextWeek : '[ວັນ]dddd[ໜ້າເວລາ] LT',
  27311. lastDay : '[ມື້ວານນີ້ເວລາ] LT',
  27312. lastWeek : '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',
  27313. sameElse : 'L'
  27314. },
  27315. relativeTime : {
  27316. future : 'ອີກ %s',
  27317. past : '%sຜ່ານມາ',
  27318. s : 'ບໍ່ເທົ່າໃດວິນາທີ',
  27319. ss : '%d ວິນາທີ' ,
  27320. m : '1 ນາທີ',
  27321. mm : '%d ນາທີ',
  27322. h : '1 ຊົ່ວໂມງ',
  27323. hh : '%d ຊົ່ວໂມງ',
  27324. d : '1 ມື້',
  27325. dd : '%d ມື້',
  27326. M : '1 ເດືອນ',
  27327. MM : '%d ເດືອນ',
  27328. y : '1 ປີ',
  27329. yy : '%d ປີ'
  27330. },
  27331. dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
  27332. ordinal : function (number) {
  27333. return 'ທີ່' + number;
  27334. }
  27335. });
  27336. return lo;
  27337. })));
  27338. /***/ }),
  27339. /* 275 */
  27340. /***/ (function(module, exports, __webpack_require__) {
  27341. //! moment.js locale configuration
  27342. //! locale : Lithuanian [lt]
  27343. //! author : Mindaugas Mozūras : https://github.com/mmozuras
  27344. ;(function (global, factory) {
  27345. true ? factory(__webpack_require__(0)) :
  27346. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  27347. factory(global.moment)
  27348. }(this, (function (moment) { 'use strict';
  27349. var units = {
  27350. 'ss' : 'sekundė_sekundžių_sekundes',
  27351. 'm' : 'minutė_minutės_minutę',
  27352. 'mm': 'minutės_minučių_minutes',
  27353. 'h' : 'valanda_valandos_valandą',
  27354. 'hh': 'valandos_valandų_valandas',
  27355. 'd' : 'diena_dienos_dieną',
  27356. 'dd': 'dienos_dienų_dienas',
  27357. 'M' : 'mėnuo_mėnesio_mėnesį',
  27358. 'MM': 'mėnesiai_mėnesių_mėnesius',
  27359. 'y' : 'metai_metų_metus',
  27360. 'yy': 'metai_metų_metus'
  27361. };
  27362. function translateSeconds(number, withoutSuffix, key, isFuture) {
  27363. if (withoutSuffix) {
  27364. return 'kelios sekundės';
  27365. } else {
  27366. return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
  27367. }
  27368. }
  27369. function translateSingular(number, withoutSuffix, key, isFuture) {
  27370. return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]);
  27371. }
  27372. function special(number) {
  27373. return number % 10 === 0 || (number > 10 && number < 20);
  27374. }
  27375. function forms(key) {
  27376. return units[key].split('_');
  27377. }
  27378. function translate(number, withoutSuffix, key, isFuture) {
  27379. var result = number + ' ';
  27380. if (number === 1) {
  27381. return result + translateSingular(number, withoutSuffix, key[0], isFuture);
  27382. } else if (withoutSuffix) {
  27383. return result + (special(number) ? forms(key)[1] : forms(key)[0]);
  27384. } else {
  27385. if (isFuture) {
  27386. return result + forms(key)[1];
  27387. } else {
  27388. return result + (special(number) ? forms(key)[1] : forms(key)[2]);
  27389. }
  27390. }
  27391. }
  27392. var lt = moment.defineLocale('lt', {
  27393. months : {
  27394. format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'),
  27395. standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),
  27396. isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/
  27397. },
  27398. monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
  27399. weekdays : {
  27400. format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'),
  27401. standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'),
  27402. isFormat: /dddd HH:mm/
  27403. },
  27404. weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
  27405. weekdaysMin : 'S_P_A_T_K_Pn_Š'.split('_'),
  27406. weekdaysParseExact : true,
  27407. longDateFormat : {
  27408. LT : 'HH:mm',
  27409. LTS : 'HH:mm:ss',
  27410. L : 'YYYY-MM-DD',
  27411. LL : 'YYYY [m.] MMMM D [d.]',
  27412. LLL : 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
  27413. LLLL : 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
  27414. l : 'YYYY-MM-DD',
  27415. ll : 'YYYY [m.] MMMM D [d.]',
  27416. lll : 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
  27417. llll : 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]'
  27418. },
  27419. calendar : {
  27420. sameDay : '[Šiandien] LT',
  27421. nextDay : '[Rytoj] LT',
  27422. nextWeek : 'dddd LT',
  27423. lastDay : '[Vakar] LT',
  27424. lastWeek : '[Praėjusį] dddd LT',
  27425. sameElse : 'L'
  27426. },
  27427. relativeTime : {
  27428. future : 'po %s',
  27429. past : 'prieš %s',
  27430. s : translateSeconds,
  27431. ss : translate,
  27432. m : translateSingular,
  27433. mm : translate,
  27434. h : translateSingular,
  27435. hh : translate,
  27436. d : translateSingular,
  27437. dd : translate,
  27438. M : translateSingular,
  27439. MM : translate,
  27440. y : translateSingular,
  27441. yy : translate
  27442. },
  27443. dayOfMonthOrdinalParse: /\d{1,2}-oji/,
  27444. ordinal : function (number) {
  27445. return number + '-oji';
  27446. },
  27447. week : {
  27448. dow : 1, // Monday is the first day of the week.
  27449. doy : 4 // The week that contains Jan 4th is the first week of the year.
  27450. }
  27451. });
  27452. return lt;
  27453. })));
  27454. /***/ }),
  27455. /* 276 */
  27456. /***/ (function(module, exports, __webpack_require__) {
  27457. //! moment.js locale configuration
  27458. //! locale : Latvian [lv]
  27459. //! author : Kristaps Karlsons : https://github.com/skakri
  27460. //! author : Jānis Elmeris : https://github.com/JanisE
  27461. ;(function (global, factory) {
  27462. true ? factory(__webpack_require__(0)) :
  27463. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  27464. factory(global.moment)
  27465. }(this, (function (moment) { 'use strict';
  27466. var units = {
  27467. 'ss': 'sekundes_sekundēm_sekunde_sekundes'.split('_'),
  27468. 'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),
  27469. 'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),
  27470. 'h': 'stundas_stundām_stunda_stundas'.split('_'),
  27471. 'hh': 'stundas_stundām_stunda_stundas'.split('_'),
  27472. 'd': 'dienas_dienām_diena_dienas'.split('_'),
  27473. 'dd': 'dienas_dienām_diena_dienas'.split('_'),
  27474. 'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
  27475. 'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
  27476. 'y': 'gada_gadiem_gads_gadi'.split('_'),
  27477. 'yy': 'gada_gadiem_gads_gadi'.split('_')
  27478. };
  27479. /**
  27480. * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
  27481. */
  27482. function format(forms, number, withoutSuffix) {
  27483. if (withoutSuffix) {
  27484. // E.g. "21 minūte", "3 minūtes".
  27485. return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
  27486. } else {
  27487. // E.g. "21 minūtes" as in "pēc 21 minūtes".
  27488. // E.g. "3 minūtēm" as in "pēc 3 minūtēm".
  27489. return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
  27490. }
  27491. }
  27492. function relativeTimeWithPlural(number, withoutSuffix, key) {
  27493. return number + ' ' + format(units[key], number, withoutSuffix);
  27494. }
  27495. function relativeTimeWithSingular(number, withoutSuffix, key) {
  27496. return format(units[key], number, withoutSuffix);
  27497. }
  27498. function relativeSeconds(number, withoutSuffix) {
  27499. return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
  27500. }
  27501. var lv = moment.defineLocale('lv', {
  27502. months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'),
  27503. monthsShort : 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
  27504. weekdays : 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'),
  27505. weekdaysShort : 'Sv_P_O_T_C_Pk_S'.split('_'),
  27506. weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'),
  27507. weekdaysParseExact : true,
  27508. longDateFormat : {
  27509. LT : 'HH:mm',
  27510. LTS : 'HH:mm:ss',
  27511. L : 'DD.MM.YYYY.',
  27512. LL : 'YYYY. [gada] D. MMMM',
  27513. LLL : 'YYYY. [gada] D. MMMM, HH:mm',
  27514. LLLL : 'YYYY. [gada] D. MMMM, dddd, HH:mm'
  27515. },
  27516. calendar : {
  27517. sameDay : '[Šodien pulksten] LT',
  27518. nextDay : '[Rīt pulksten] LT',
  27519. nextWeek : 'dddd [pulksten] LT',
  27520. lastDay : '[Vakar pulksten] LT',
  27521. lastWeek : '[Pagājušā] dddd [pulksten] LT',
  27522. sameElse : 'L'
  27523. },
  27524. relativeTime : {
  27525. future : 'pēc %s',
  27526. past : 'pirms %s',
  27527. s : relativeSeconds,
  27528. ss : relativeTimeWithPlural,
  27529. m : relativeTimeWithSingular,
  27530. mm : relativeTimeWithPlural,
  27531. h : relativeTimeWithSingular,
  27532. hh : relativeTimeWithPlural,
  27533. d : relativeTimeWithSingular,
  27534. dd : relativeTimeWithPlural,
  27535. M : relativeTimeWithSingular,
  27536. MM : relativeTimeWithPlural,
  27537. y : relativeTimeWithSingular,
  27538. yy : relativeTimeWithPlural
  27539. },
  27540. dayOfMonthOrdinalParse: /\d{1,2}\./,
  27541. ordinal : '%d.',
  27542. week : {
  27543. dow : 1, // Monday is the first day of the week.
  27544. doy : 4 // The week that contains Jan 4th is the first week of the year.
  27545. }
  27546. });
  27547. return lv;
  27548. })));
  27549. /***/ }),
  27550. /* 277 */
  27551. /***/ (function(module, exports, __webpack_require__) {
  27552. //! moment.js locale configuration
  27553. //! locale : Montenegrin [me]
  27554. //! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac
  27555. ;(function (global, factory) {
  27556. true ? factory(__webpack_require__(0)) :
  27557. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  27558. factory(global.moment)
  27559. }(this, (function (moment) { 'use strict';
  27560. var translator = {
  27561. words: { //Different grammatical cases
  27562. ss: ['sekund', 'sekunda', 'sekundi'],
  27563. m: ['jedan minut', 'jednog minuta'],
  27564. mm: ['minut', 'minuta', 'minuta'],
  27565. h: ['jedan sat', 'jednog sata'],
  27566. hh: ['sat', 'sata', 'sati'],
  27567. dd: ['dan', 'dana', 'dana'],
  27568. MM: ['mjesec', 'mjeseca', 'mjeseci'],
  27569. yy: ['godina', 'godine', 'godina']
  27570. },
  27571. correctGrammaticalCase: function (number, wordKey) {
  27572. return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
  27573. },
  27574. translate: function (number, withoutSuffix, key) {
  27575. var wordKey = translator.words[key];
  27576. if (key.length === 1) {
  27577. return withoutSuffix ? wordKey[0] : wordKey[1];
  27578. } else {
  27579. return number + ' ' + translator.correctGrammaticalCase(number, wordKey);
  27580. }
  27581. }
  27582. };
  27583. var me = moment.defineLocale('me', {
  27584. months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),
  27585. monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
  27586. monthsParseExact : true,
  27587. weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
  27588. weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  27589. weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
  27590. weekdaysParseExact : true,
  27591. longDateFormat: {
  27592. LT: 'H:mm',
  27593. LTS : 'H:mm:ss',
  27594. L: 'DD.MM.YYYY',
  27595. LL: 'D. MMMM YYYY',
  27596. LLL: 'D. MMMM YYYY H:mm',
  27597. LLLL: 'dddd, D. MMMM YYYY H:mm'
  27598. },
  27599. calendar: {
  27600. sameDay: '[danas u] LT',
  27601. nextDay: '[sjutra u] LT',
  27602. nextWeek: function () {
  27603. switch (this.day()) {
  27604. case 0:
  27605. return '[u] [nedjelju] [u] LT';
  27606. case 3:
  27607. return '[u] [srijedu] [u] LT';
  27608. case 6:
  27609. return '[u] [subotu] [u] LT';
  27610. case 1:
  27611. case 2:
  27612. case 4:
  27613. case 5:
  27614. return '[u] dddd [u] LT';
  27615. }
  27616. },
  27617. lastDay : '[juče u] LT',
  27618. lastWeek : function () {
  27619. var lastWeekDays = [
  27620. '[prošle] [nedjelje] [u] LT',
  27621. '[prošlog] [ponedjeljka] [u] LT',
  27622. '[prošlog] [utorka] [u] LT',
  27623. '[prošle] [srijede] [u] LT',
  27624. '[prošlog] [četvrtka] [u] LT',
  27625. '[prošlog] [petka] [u] LT',
  27626. '[prošle] [subote] [u] LT'
  27627. ];
  27628. return lastWeekDays[this.day()];
  27629. },
  27630. sameElse : 'L'
  27631. },
  27632. relativeTime : {
  27633. future : 'za %s',
  27634. past : 'prije %s',
  27635. s : 'nekoliko sekundi',
  27636. ss : translator.translate,
  27637. m : translator.translate,
  27638. mm : translator.translate,
  27639. h : translator.translate,
  27640. hh : translator.translate,
  27641. d : 'dan',
  27642. dd : translator.translate,
  27643. M : 'mjesec',
  27644. MM : translator.translate,
  27645. y : 'godinu',
  27646. yy : translator.translate
  27647. },
  27648. dayOfMonthOrdinalParse: /\d{1,2}\./,
  27649. ordinal : '%d.',
  27650. week : {
  27651. dow : 1, // Monday is the first day of the week.
  27652. doy : 7 // The week that contains Jan 1st is the first week of the year.
  27653. }
  27654. });
  27655. return me;
  27656. })));
  27657. /***/ }),
  27658. /* 278 */
  27659. /***/ (function(module, exports, __webpack_require__) {
  27660. //! moment.js locale configuration
  27661. //! locale : Maori [mi]
  27662. //! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal
  27663. ;(function (global, factory) {
  27664. true ? factory(__webpack_require__(0)) :
  27665. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  27666. factory(global.moment)
  27667. }(this, (function (moment) { 'use strict';
  27668. var mi = moment.defineLocale('mi', {
  27669. months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split('_'),
  27670. monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split('_'),
  27671. monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
  27672. monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
  27673. monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
  27674. monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,
  27675. weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),
  27676. weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
  27677. weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
  27678. longDateFormat: {
  27679. LT: 'HH:mm',
  27680. LTS: 'HH:mm:ss',
  27681. L: 'DD/MM/YYYY',
  27682. LL: 'D MMMM YYYY',
  27683. LLL: 'D MMMM YYYY [i] HH:mm',
  27684. LLLL: 'dddd, D MMMM YYYY [i] HH:mm'
  27685. },
  27686. calendar: {
  27687. sameDay: '[i teie mahana, i] LT',
  27688. nextDay: '[apopo i] LT',
  27689. nextWeek: 'dddd [i] LT',
  27690. lastDay: '[inanahi i] LT',
  27691. lastWeek: 'dddd [whakamutunga i] LT',
  27692. sameElse: 'L'
  27693. },
  27694. relativeTime: {
  27695. future: 'i roto i %s',
  27696. past: '%s i mua',
  27697. s: 'te hēkona ruarua',
  27698. ss: '%d hēkona',
  27699. m: 'he meneti',
  27700. mm: '%d meneti',
  27701. h: 'te haora',
  27702. hh: '%d haora',
  27703. d: 'he ra',
  27704. dd: '%d ra',
  27705. M: 'he marama',
  27706. MM: '%d marama',
  27707. y: 'he tau',
  27708. yy: '%d tau'
  27709. },
  27710. dayOfMonthOrdinalParse: /\d{1,2}º/,
  27711. ordinal: '%dº',
  27712. week : {
  27713. dow : 1, // Monday is the first day of the week.
  27714. doy : 4 // The week that contains Jan 4th is the first week of the year.
  27715. }
  27716. });
  27717. return mi;
  27718. })));
  27719. /***/ }),
  27720. /* 279 */
  27721. /***/ (function(module, exports, __webpack_require__) {
  27722. //! moment.js locale configuration
  27723. //! locale : Macedonian [mk]
  27724. //! author : Borislav Mickov : https://github.com/B0k0
  27725. ;(function (global, factory) {
  27726. true ? factory(__webpack_require__(0)) :
  27727. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  27728. factory(global.moment)
  27729. }(this, (function (moment) { 'use strict';
  27730. var mk = moment.defineLocale('mk', {
  27731. months : 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'),
  27732. monthsShort : 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),
  27733. weekdays : 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'),
  27734. weekdaysShort : 'нед_пон_вто_сре_чет_пет_саб'.split('_'),
  27735. weekdaysMin : 'нe_пo_вт_ср_че_пе_сa'.split('_'),
  27736. longDateFormat : {
  27737. LT : 'H:mm',
  27738. LTS : 'H:mm:ss',
  27739. L : 'D.MM.YYYY',
  27740. LL : 'D MMMM YYYY',
  27741. LLL : 'D MMMM YYYY H:mm',
  27742. LLLL : 'dddd, D MMMM YYYY H:mm'
  27743. },
  27744. calendar : {
  27745. sameDay : '[Денес во] LT',
  27746. nextDay : '[Утре во] LT',
  27747. nextWeek : '[Во] dddd [во] LT',
  27748. lastDay : '[Вчера во] LT',
  27749. lastWeek : function () {
  27750. switch (this.day()) {
  27751. case 0:
  27752. case 3:
  27753. case 6:
  27754. return '[Изминатата] dddd [во] LT';
  27755. case 1:
  27756. case 2:
  27757. case 4:
  27758. case 5:
  27759. return '[Изминатиот] dddd [во] LT';
  27760. }
  27761. },
  27762. sameElse : 'L'
  27763. },
  27764. relativeTime : {
  27765. future : 'после %s',
  27766. past : 'пред %s',
  27767. s : 'неколку секунди',
  27768. ss : '%d секунди',
  27769. m : 'минута',
  27770. mm : '%d минути',
  27771. h : 'час',
  27772. hh : '%d часа',
  27773. d : 'ден',
  27774. dd : '%d дена',
  27775. M : 'месец',
  27776. MM : '%d месеци',
  27777. y : 'година',
  27778. yy : '%d години'
  27779. },
  27780. dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
  27781. ordinal : function (number) {
  27782. var lastDigit = number % 10,
  27783. last2Digits = number % 100;
  27784. if (number === 0) {
  27785. return number + '-ев';
  27786. } else if (last2Digits === 0) {
  27787. return number + '-ен';
  27788. } else if (last2Digits > 10 && last2Digits < 20) {
  27789. return number + '-ти';
  27790. } else if (lastDigit === 1) {
  27791. return number + '-ви';
  27792. } else if (lastDigit === 2) {
  27793. return number + '-ри';
  27794. } else if (lastDigit === 7 || lastDigit === 8) {
  27795. return number + '-ми';
  27796. } else {
  27797. return number + '-ти';
  27798. }
  27799. },
  27800. week : {
  27801. dow : 1, // Monday is the first day of the week.
  27802. doy : 7 // The week that contains Jan 1st is the first week of the year.
  27803. }
  27804. });
  27805. return mk;
  27806. })));
  27807. /***/ }),
  27808. /* 280 */
  27809. /***/ (function(module, exports, __webpack_require__) {
  27810. //! moment.js locale configuration
  27811. //! locale : Malayalam [ml]
  27812. //! author : Floyd Pink : https://github.com/floydpink
  27813. ;(function (global, factory) {
  27814. true ? factory(__webpack_require__(0)) :
  27815. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  27816. factory(global.moment)
  27817. }(this, (function (moment) { 'use strict';
  27818. var ml = moment.defineLocale('ml', {
  27819. months : 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'),
  27820. monthsShort : 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'),
  27821. monthsParseExact : true,
  27822. weekdays : 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'),
  27823. weekdaysShort : 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),
  27824. weekdaysMin : 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),
  27825. longDateFormat : {
  27826. LT : 'A h:mm -നു',
  27827. LTS : 'A h:mm:ss -നു',
  27828. L : 'DD/MM/YYYY',
  27829. LL : 'D MMMM YYYY',
  27830. LLL : 'D MMMM YYYY, A h:mm -നു',
  27831. LLLL : 'dddd, D MMMM YYYY, A h:mm -നു'
  27832. },
  27833. calendar : {
  27834. sameDay : '[ഇന്ന്] LT',
  27835. nextDay : '[നാളെ] LT',
  27836. nextWeek : 'dddd, LT',
  27837. lastDay : '[ഇന്നലെ] LT',
  27838. lastWeek : '[കഴിഞ്ഞ] dddd, LT',
  27839. sameElse : 'L'
  27840. },
  27841. relativeTime : {
  27842. future : '%s കഴിഞ്ഞ്',
  27843. past : '%s മുൻപ്',
  27844. s : 'അൽപ നിമിഷങ്ങൾ',
  27845. ss : '%d സെക്കൻഡ്',
  27846. m : 'ഒരു മിനിറ്റ്',
  27847. mm : '%d മിനിറ്റ്',
  27848. h : 'ഒരു മണിക്കൂർ',
  27849. hh : '%d മണിക്കൂർ',
  27850. d : 'ഒരു ദിവസം',
  27851. dd : '%d ദിവസം',
  27852. M : 'ഒരു മാസം',
  27853. MM : '%d മാസം',
  27854. y : 'ഒരു വർഷം',
  27855. yy : '%d വർഷം'
  27856. },
  27857. meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,
  27858. meridiemHour : function (hour, meridiem) {
  27859. if (hour === 12) {
  27860. hour = 0;
  27861. }
  27862. if ((meridiem === 'രാത്രി' && hour >= 4) ||
  27863. meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||
  27864. meridiem === 'വൈകുന്നേരം') {
  27865. return hour + 12;
  27866. } else {
  27867. return hour;
  27868. }
  27869. },
  27870. meridiem : function (hour, minute, isLower) {
  27871. if (hour < 4) {
  27872. return 'രാത്രി';
  27873. } else if (hour < 12) {
  27874. return 'രാവിലെ';
  27875. } else if (hour < 17) {
  27876. return 'ഉച്ച കഴിഞ്ഞ്';
  27877. } else if (hour < 20) {
  27878. return 'വൈകുന്നേരം';
  27879. } else {
  27880. return 'രാത്രി';
  27881. }
  27882. }
  27883. });
  27884. return ml;
  27885. })));
  27886. /***/ }),
  27887. /* 281 */
  27888. /***/ (function(module, exports, __webpack_require__) {
  27889. //! moment.js locale configuration
  27890. //! locale : Marathi [mr]
  27891. //! author : Harshad Kale : https://github.com/kalehv
  27892. //! author : Vivek Athalye : https://github.com/vnathalye
  27893. ;(function (global, factory) {
  27894. true ? factory(__webpack_require__(0)) :
  27895. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  27896. factory(global.moment)
  27897. }(this, (function (moment) { 'use strict';
  27898. var symbolMap = {
  27899. '1': '१',
  27900. '2': '२',
  27901. '3': '३',
  27902. '4': '४',
  27903. '5': '५',
  27904. '6': '६',
  27905. '7': '७',
  27906. '8': '८',
  27907. '9': '९',
  27908. '0': '०'
  27909. };
  27910. var numberMap = {
  27911. '१': '1',
  27912. '२': '2',
  27913. '३': '3',
  27914. '४': '4',
  27915. '५': '5',
  27916. '६': '6',
  27917. '७': '7',
  27918. '८': '8',
  27919. '९': '9',
  27920. '०': '0'
  27921. };
  27922. function relativeTimeMr(number, withoutSuffix, string, isFuture)
  27923. {
  27924. var output = '';
  27925. if (withoutSuffix) {
  27926. switch (string) {
  27927. case 's': output = 'काही सेकंद'; break;
  27928. case 'ss': output = '%d सेकंद'; break;
  27929. case 'm': output = 'एक मिनिट'; break;
  27930. case 'mm': output = '%d मिनिटे'; break;
  27931. case 'h': output = 'एक तास'; break;
  27932. case 'hh': output = '%d तास'; break;
  27933. case 'd': output = 'एक दिवस'; break;
  27934. case 'dd': output = '%d दिवस'; break;
  27935. case 'M': output = 'एक महिना'; break;
  27936. case 'MM': output = '%d महिने'; break;
  27937. case 'y': output = 'एक वर्ष'; break;
  27938. case 'yy': output = '%d वर्षे'; break;
  27939. }
  27940. }
  27941. else {
  27942. switch (string) {
  27943. case 's': output = 'काही सेकंदां'; break;
  27944. case 'ss': output = '%d सेकंदां'; break;
  27945. case 'm': output = 'एका मिनिटा'; break;
  27946. case 'mm': output = '%d मिनिटां'; break;
  27947. case 'h': output = 'एका तासा'; break;
  27948. case 'hh': output = '%d तासां'; break;
  27949. case 'd': output = 'एका दिवसा'; break;
  27950. case 'dd': output = '%d दिवसां'; break;
  27951. case 'M': output = 'एका महिन्या'; break;
  27952. case 'MM': output = '%d महिन्यां'; break;
  27953. case 'y': output = 'एका वर्षा'; break;
  27954. case 'yy': output = '%d वर्षां'; break;
  27955. }
  27956. }
  27957. return output.replace(/%d/i, number);
  27958. }
  27959. var mr = moment.defineLocale('mr', {
  27960. months : 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'),
  27961. monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'),
  27962. monthsParseExact : true,
  27963. weekdays : 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
  27964. weekdaysShort : 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),
  27965. weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'),
  27966. longDateFormat : {
  27967. LT : 'A h:mm वाजता',
  27968. LTS : 'A h:mm:ss वाजता',
  27969. L : 'DD/MM/YYYY',
  27970. LL : 'D MMMM YYYY',
  27971. LLL : 'D MMMM YYYY, A h:mm वाजता',
  27972. LLLL : 'dddd, D MMMM YYYY, A h:mm वाजता'
  27973. },
  27974. calendar : {
  27975. sameDay : '[आज] LT',
  27976. nextDay : '[उद्या] LT',
  27977. nextWeek : 'dddd, LT',
  27978. lastDay : '[काल] LT',
  27979. lastWeek: '[मागील] dddd, LT',
  27980. sameElse : 'L'
  27981. },
  27982. relativeTime : {
  27983. future: '%sमध्ये',
  27984. past: '%sपूर्वी',
  27985. s: relativeTimeMr,
  27986. ss: relativeTimeMr,
  27987. m: relativeTimeMr,
  27988. mm: relativeTimeMr,
  27989. h: relativeTimeMr,
  27990. hh: relativeTimeMr,
  27991. d: relativeTimeMr,
  27992. dd: relativeTimeMr,
  27993. M: relativeTimeMr,
  27994. MM: relativeTimeMr,
  27995. y: relativeTimeMr,
  27996. yy: relativeTimeMr
  27997. },
  27998. preparse: function (string) {
  27999. return string.replace(/[१२३४५६७८९०]/g, function (match) {
  28000. return numberMap[match];
  28001. });
  28002. },
  28003. postformat: function (string) {
  28004. return string.replace(/\d/g, function (match) {
  28005. return symbolMap[match];
  28006. });
  28007. },
  28008. meridiemParse: /रात्री|सकाळी|दुपारी|सायंकाळी/,
  28009. meridiemHour : function (hour, meridiem) {
  28010. if (hour === 12) {
  28011. hour = 0;
  28012. }
  28013. if (meridiem === 'रात्री') {
  28014. return hour < 4 ? hour : hour + 12;
  28015. } else if (meridiem === 'सकाळी') {
  28016. return hour;
  28017. } else if (meridiem === 'दुपारी') {
  28018. return hour >= 10 ? hour : hour + 12;
  28019. } else if (meridiem === 'सायंकाळी') {
  28020. return hour + 12;
  28021. }
  28022. },
  28023. meridiem: function (hour, minute, isLower) {
  28024. if (hour < 4) {
  28025. return 'रात्री';
  28026. } else if (hour < 10) {
  28027. return 'सकाळी';
  28028. } else if (hour < 17) {
  28029. return 'दुपारी';
  28030. } else if (hour < 20) {
  28031. return 'सायंकाळी';
  28032. } else {
  28033. return 'रात्री';
  28034. }
  28035. },
  28036. week : {
  28037. dow : 0, // Sunday is the first day of the week.
  28038. doy : 6 // The week that contains Jan 1st is the first week of the year.
  28039. }
  28040. });
  28041. return mr;
  28042. })));
  28043. /***/ }),
  28044. /* 282 */
  28045. /***/ (function(module, exports, __webpack_require__) {
  28046. //! moment.js locale configuration
  28047. //! locale : Malay [ms]
  28048. //! author : Weldan Jamili : https://github.com/weldan
  28049. ;(function (global, factory) {
  28050. true ? factory(__webpack_require__(0)) :
  28051. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  28052. factory(global.moment)
  28053. }(this, (function (moment) { 'use strict';
  28054. var ms = moment.defineLocale('ms', {
  28055. months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),
  28056. monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
  28057. weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
  28058. weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
  28059. weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
  28060. longDateFormat : {
  28061. LT : 'HH.mm',
  28062. LTS : 'HH.mm.ss',
  28063. L : 'DD/MM/YYYY',
  28064. LL : 'D MMMM YYYY',
  28065. LLL : 'D MMMM YYYY [pukul] HH.mm',
  28066. LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'
  28067. },
  28068. meridiemParse: /pagi|tengahari|petang|malam/,
  28069. meridiemHour: function (hour, meridiem) {
  28070. if (hour === 12) {
  28071. hour = 0;
  28072. }
  28073. if (meridiem === 'pagi') {
  28074. return hour;
  28075. } else if (meridiem === 'tengahari') {
  28076. return hour >= 11 ? hour : hour + 12;
  28077. } else if (meridiem === 'petang' || meridiem === 'malam') {
  28078. return hour + 12;
  28079. }
  28080. },
  28081. meridiem : function (hours, minutes, isLower) {
  28082. if (hours < 11) {
  28083. return 'pagi';
  28084. } else if (hours < 15) {
  28085. return 'tengahari';
  28086. } else if (hours < 19) {
  28087. return 'petang';
  28088. } else {
  28089. return 'malam';
  28090. }
  28091. },
  28092. calendar : {
  28093. sameDay : '[Hari ini pukul] LT',
  28094. nextDay : '[Esok pukul] LT',
  28095. nextWeek : 'dddd [pukul] LT',
  28096. lastDay : '[Kelmarin pukul] LT',
  28097. lastWeek : 'dddd [lepas pukul] LT',
  28098. sameElse : 'L'
  28099. },
  28100. relativeTime : {
  28101. future : 'dalam %s',
  28102. past : '%s yang lepas',
  28103. s : 'beberapa saat',
  28104. ss : '%d saat',
  28105. m : 'seminit',
  28106. mm : '%d minit',
  28107. h : 'sejam',
  28108. hh : '%d jam',
  28109. d : 'sehari',
  28110. dd : '%d hari',
  28111. M : 'sebulan',
  28112. MM : '%d bulan',
  28113. y : 'setahun',
  28114. yy : '%d tahun'
  28115. },
  28116. week : {
  28117. dow : 1, // Monday is the first day of the week.
  28118. doy : 7 // The week that contains Jan 1st is the first week of the year.
  28119. }
  28120. });
  28121. return ms;
  28122. })));
  28123. /***/ }),
  28124. /* 283 */
  28125. /***/ (function(module, exports, __webpack_require__) {
  28126. //! moment.js locale configuration
  28127. //! locale : Malay [ms-my]
  28128. //! note : DEPRECATED, the correct one is [ms]
  28129. //! author : Weldan Jamili : https://github.com/weldan
  28130. ;(function (global, factory) {
  28131. true ? factory(__webpack_require__(0)) :
  28132. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  28133. factory(global.moment)
  28134. }(this, (function (moment) { 'use strict';
  28135. var msMy = moment.defineLocale('ms-my', {
  28136. months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),
  28137. monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
  28138. weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
  28139. weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
  28140. weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
  28141. longDateFormat : {
  28142. LT : 'HH.mm',
  28143. LTS : 'HH.mm.ss',
  28144. L : 'DD/MM/YYYY',
  28145. LL : 'D MMMM YYYY',
  28146. LLL : 'D MMMM YYYY [pukul] HH.mm',
  28147. LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'
  28148. },
  28149. meridiemParse: /pagi|tengahari|petang|malam/,
  28150. meridiemHour: function (hour, meridiem) {
  28151. if (hour === 12) {
  28152. hour = 0;
  28153. }
  28154. if (meridiem === 'pagi') {
  28155. return hour;
  28156. } else if (meridiem === 'tengahari') {
  28157. return hour >= 11 ? hour : hour + 12;
  28158. } else if (meridiem === 'petang' || meridiem === 'malam') {
  28159. return hour + 12;
  28160. }
  28161. },
  28162. meridiem : function (hours, minutes, isLower) {
  28163. if (hours < 11) {
  28164. return 'pagi';
  28165. } else if (hours < 15) {
  28166. return 'tengahari';
  28167. } else if (hours < 19) {
  28168. return 'petang';
  28169. } else {
  28170. return 'malam';
  28171. }
  28172. },
  28173. calendar : {
  28174. sameDay : '[Hari ini pukul] LT',
  28175. nextDay : '[Esok pukul] LT',
  28176. nextWeek : 'dddd [pukul] LT',
  28177. lastDay : '[Kelmarin pukul] LT',
  28178. lastWeek : 'dddd [lepas pukul] LT',
  28179. sameElse : 'L'
  28180. },
  28181. relativeTime : {
  28182. future : 'dalam %s',
  28183. past : '%s yang lepas',
  28184. s : 'beberapa saat',
  28185. ss : '%d saat',
  28186. m : 'seminit',
  28187. mm : '%d minit',
  28188. h : 'sejam',
  28189. hh : '%d jam',
  28190. d : 'sehari',
  28191. dd : '%d hari',
  28192. M : 'sebulan',
  28193. MM : '%d bulan',
  28194. y : 'setahun',
  28195. yy : '%d tahun'
  28196. },
  28197. week : {
  28198. dow : 1, // Monday is the first day of the week.
  28199. doy : 7 // The week that contains Jan 1st is the first week of the year.
  28200. }
  28201. });
  28202. return msMy;
  28203. })));
  28204. /***/ }),
  28205. /* 284 */
  28206. /***/ (function(module, exports, __webpack_require__) {
  28207. //! moment.js locale configuration
  28208. //! locale : Maltese (Malta) [mt]
  28209. //! author : Alessandro Maruccia : https://github.com/alesma
  28210. ;(function (global, factory) {
  28211. true ? factory(__webpack_require__(0)) :
  28212. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  28213. factory(global.moment)
  28214. }(this, (function (moment) { 'use strict';
  28215. var mt = moment.defineLocale('mt', {
  28216. months : 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split('_'),
  28217. monthsShort : 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),
  28218. weekdays : 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split('_'),
  28219. weekdaysShort : 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),
  28220. weekdaysMin : 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),
  28221. longDateFormat : {
  28222. LT : 'HH:mm',
  28223. LTS : 'HH:mm:ss',
  28224. L : 'DD/MM/YYYY',
  28225. LL : 'D MMMM YYYY',
  28226. LLL : 'D MMMM YYYY HH:mm',
  28227. LLLL : 'dddd, D MMMM YYYY HH:mm'
  28228. },
  28229. calendar : {
  28230. sameDay : '[Illum fil-]LT',
  28231. nextDay : '[Għada fil-]LT',
  28232. nextWeek : 'dddd [fil-]LT',
  28233. lastDay : '[Il-bieraħ fil-]LT',
  28234. lastWeek : 'dddd [li għadda] [fil-]LT',
  28235. sameElse : 'L'
  28236. },
  28237. relativeTime : {
  28238. future : 'f’ %s',
  28239. past : '%s ilu',
  28240. s : 'ftit sekondi',
  28241. ss : '%d sekondi',
  28242. m : 'minuta',
  28243. mm : '%d minuti',
  28244. h : 'siegħa',
  28245. hh : '%d siegħat',
  28246. d : 'ġurnata',
  28247. dd : '%d ġranet',
  28248. M : 'xahar',
  28249. MM : '%d xhur',
  28250. y : 'sena',
  28251. yy : '%d sni'
  28252. },
  28253. dayOfMonthOrdinalParse : /\d{1,2}º/,
  28254. ordinal: '%dº',
  28255. week : {
  28256. dow : 1, // Monday is the first day of the week.
  28257. doy : 4 // The week that contains Jan 4th is the first week of the year.
  28258. }
  28259. });
  28260. return mt;
  28261. })));
  28262. /***/ }),
  28263. /* 285 */
  28264. /***/ (function(module, exports, __webpack_require__) {
  28265. //! moment.js locale configuration
  28266. //! locale : Burmese [my]
  28267. //! author : Squar team, mysquar.com
  28268. //! author : David Rossellat : https://github.com/gholadr
  28269. //! author : Tin Aung Lin : https://github.com/thanyawzinmin
  28270. ;(function (global, factory) {
  28271. true ? factory(__webpack_require__(0)) :
  28272. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  28273. factory(global.moment)
  28274. }(this, (function (moment) { 'use strict';
  28275. var symbolMap = {
  28276. '1': '၁',
  28277. '2': '၂',
  28278. '3': '၃',
  28279. '4': '၄',
  28280. '5': '၅',
  28281. '6': '၆',
  28282. '7': '၇',
  28283. '8': '၈',
  28284. '9': '၉',
  28285. '0': '၀'
  28286. };
  28287. var numberMap = {
  28288. '၁': '1',
  28289. '၂': '2',
  28290. '၃': '3',
  28291. '၄': '4',
  28292. '၅': '5',
  28293. '၆': '6',
  28294. '၇': '7',
  28295. '၈': '8',
  28296. '၉': '9',
  28297. '၀': '0'
  28298. };
  28299. var my = moment.defineLocale('my', {
  28300. months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'),
  28301. monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
  28302. weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'),
  28303. weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
  28304. weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
  28305. longDateFormat: {
  28306. LT: 'HH:mm',
  28307. LTS: 'HH:mm:ss',
  28308. L: 'DD/MM/YYYY',
  28309. LL: 'D MMMM YYYY',
  28310. LLL: 'D MMMM YYYY HH:mm',
  28311. LLLL: 'dddd D MMMM YYYY HH:mm'
  28312. },
  28313. calendar: {
  28314. sameDay: '[ယနေ.] LT [မှာ]',
  28315. nextDay: '[မနက်ဖြန်] LT [မှာ]',
  28316. nextWeek: 'dddd LT [မှာ]',
  28317. lastDay: '[မနေ.က] LT [မှာ]',
  28318. lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
  28319. sameElse: 'L'
  28320. },
  28321. relativeTime: {
  28322. future: 'လာမည့် %s မှာ',
  28323. past: 'လွန်ခဲ့သော %s က',
  28324. s: 'စက္ကန်.အနည်းငယ်',
  28325. ss : '%d စက္ကန့်',
  28326. m: 'တစ်မိနစ်',
  28327. mm: '%d မိနစ်',
  28328. h: 'တစ်နာရီ',
  28329. hh: '%d နာရီ',
  28330. d: 'တစ်ရက်',
  28331. dd: '%d ရက်',
  28332. M: 'တစ်လ',
  28333. MM: '%d လ',
  28334. y: 'တစ်နှစ်',
  28335. yy: '%d နှစ်'
  28336. },
  28337. preparse: function (string) {
  28338. return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
  28339. return numberMap[match];
  28340. });
  28341. },
  28342. postformat: function (string) {
  28343. return string.replace(/\d/g, function (match) {
  28344. return symbolMap[match];
  28345. });
  28346. },
  28347. week: {
  28348. dow: 1, // Monday is the first day of the week.
  28349. doy: 4 // The week that contains Jan 1st is the first week of the year.
  28350. }
  28351. });
  28352. return my;
  28353. })));
  28354. /***/ }),
  28355. /* 286 */
  28356. /***/ (function(module, exports, __webpack_require__) {
  28357. //! moment.js locale configuration
  28358. //! locale : Norwegian Bokmål [nb]
  28359. //! authors : Espen Hovlandsdal : https://github.com/rexxars
  28360. //! Sigurd Gartmann : https://github.com/sigurdga
  28361. ;(function (global, factory) {
  28362. true ? factory(__webpack_require__(0)) :
  28363. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  28364. factory(global.moment)
  28365. }(this, (function (moment) { 'use strict';
  28366. var nb = moment.defineLocale('nb', {
  28367. months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
  28368. monthsShort : 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
  28369. monthsParseExact : true,
  28370. weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
  28371. weekdaysShort : 'sø._ma._ti._on._to._fr._lø.'.split('_'),
  28372. weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'),
  28373. weekdaysParseExact : true,
  28374. longDateFormat : {
  28375. LT : 'HH:mm',
  28376. LTS : 'HH:mm:ss',
  28377. L : 'DD.MM.YYYY',
  28378. LL : 'D. MMMM YYYY',
  28379. LLL : 'D. MMMM YYYY [kl.] HH:mm',
  28380. LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm'
  28381. },
  28382. calendar : {
  28383. sameDay: '[i dag kl.] LT',
  28384. nextDay: '[i morgen kl.] LT',
  28385. nextWeek: 'dddd [kl.] LT',
  28386. lastDay: '[i går kl.] LT',
  28387. lastWeek: '[forrige] dddd [kl.] LT',
  28388. sameElse: 'L'
  28389. },
  28390. relativeTime : {
  28391. future : 'om %s',
  28392. past : '%s siden',
  28393. s : 'noen sekunder',
  28394. ss : '%d sekunder',
  28395. m : 'ett minutt',
  28396. mm : '%d minutter',
  28397. h : 'en time',
  28398. hh : '%d timer',
  28399. d : 'en dag',
  28400. dd : '%d dager',
  28401. M : 'en måned',
  28402. MM : '%d måneder',
  28403. y : 'ett år',
  28404. yy : '%d år'
  28405. },
  28406. dayOfMonthOrdinalParse: /\d{1,2}\./,
  28407. ordinal : '%d.',
  28408. week : {
  28409. dow : 1, // Monday is the first day of the week.
  28410. doy : 4 // The week that contains Jan 4th is the first week of the year.
  28411. }
  28412. });
  28413. return nb;
  28414. })));
  28415. /***/ }),
  28416. /* 287 */
  28417. /***/ (function(module, exports, __webpack_require__) {
  28418. //! moment.js locale configuration
  28419. //! locale : Nepalese [ne]
  28420. //! author : suvash : https://github.com/suvash
  28421. ;(function (global, factory) {
  28422. true ? factory(__webpack_require__(0)) :
  28423. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  28424. factory(global.moment)
  28425. }(this, (function (moment) { 'use strict';
  28426. var symbolMap = {
  28427. '1': '१',
  28428. '2': '२',
  28429. '3': '३',
  28430. '4': '४',
  28431. '5': '५',
  28432. '6': '६',
  28433. '7': '७',
  28434. '8': '८',
  28435. '9': '९',
  28436. '0': '०'
  28437. };
  28438. var numberMap = {
  28439. '१': '1',
  28440. '२': '2',
  28441. '३': '3',
  28442. '४': '4',
  28443. '५': '5',
  28444. '६': '6',
  28445. '७': '7',
  28446. '८': '8',
  28447. '९': '9',
  28448. '०': '0'
  28449. };
  28450. var ne = moment.defineLocale('ne', {
  28451. months : 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'),
  28452. monthsShort : 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'),
  28453. monthsParseExact : true,
  28454. weekdays : 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'),
  28455. weekdaysShort : 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
  28456. weekdaysMin : 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
  28457. weekdaysParseExact : true,
  28458. longDateFormat : {
  28459. LT : 'Aको h:mm बजे',
  28460. LTS : 'Aको h:mm:ss बजे',
  28461. L : 'DD/MM/YYYY',
  28462. LL : 'D MMMM YYYY',
  28463. LLL : 'D MMMM YYYY, Aको h:mm बजे',
  28464. LLLL : 'dddd, D MMMM YYYY, Aको h:mm बजे'
  28465. },
  28466. preparse: function (string) {
  28467. return string.replace(/[१२३४५६७८९०]/g, function (match) {
  28468. return numberMap[match];
  28469. });
  28470. },
  28471. postformat: function (string) {
  28472. return string.replace(/\d/g, function (match) {
  28473. return symbolMap[match];
  28474. });
  28475. },
  28476. meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
  28477. meridiemHour : function (hour, meridiem) {
  28478. if (hour === 12) {
  28479. hour = 0;
  28480. }
  28481. if (meridiem === 'राति') {
  28482. return hour < 4 ? hour : hour + 12;
  28483. } else if (meridiem === 'बिहान') {
  28484. return hour;
  28485. } else if (meridiem === 'दिउँसो') {
  28486. return hour >= 10 ? hour : hour + 12;
  28487. } else if (meridiem === 'साँझ') {
  28488. return hour + 12;
  28489. }
  28490. },
  28491. meridiem : function (hour, minute, isLower) {
  28492. if (hour < 3) {
  28493. return 'राति';
  28494. } else if (hour < 12) {
  28495. return 'बिहान';
  28496. } else if (hour < 16) {
  28497. return 'दिउँसो';
  28498. } else if (hour < 20) {
  28499. return 'साँझ';
  28500. } else {
  28501. return 'राति';
  28502. }
  28503. },
  28504. calendar : {
  28505. sameDay : '[आज] LT',
  28506. nextDay : '[भोलि] LT',
  28507. nextWeek : '[आउँदो] dddd[,] LT',
  28508. lastDay : '[हिजो] LT',
  28509. lastWeek : '[गएको] dddd[,] LT',
  28510. sameElse : 'L'
  28511. },
  28512. relativeTime : {
  28513. future : '%sमा',
  28514. past : '%s अगाडि',
  28515. s : 'केही क्षण',
  28516. ss : '%d सेकेण्ड',
  28517. m : 'एक मिनेट',
  28518. mm : '%d मिनेट',
  28519. h : 'एक घण्टा',
  28520. hh : '%d घण्टा',
  28521. d : 'एक दिन',
  28522. dd : '%d दिन',
  28523. M : 'एक महिना',
  28524. MM : '%d महिना',
  28525. y : 'एक बर्ष',
  28526. yy : '%d बर्ष'
  28527. },
  28528. week : {
  28529. dow : 0, // Sunday is the first day of the week.
  28530. doy : 6 // The week that contains Jan 1st is the first week of the year.
  28531. }
  28532. });
  28533. return ne;
  28534. })));
  28535. /***/ }),
  28536. /* 288 */
  28537. /***/ (function(module, exports, __webpack_require__) {
  28538. //! moment.js locale configuration
  28539. //! locale : Dutch [nl]
  28540. //! author : Joris Röling : https://github.com/jorisroling
  28541. //! author : Jacob Middag : https://github.com/middagj
  28542. ;(function (global, factory) {
  28543. true ? factory(__webpack_require__(0)) :
  28544. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  28545. factory(global.moment)
  28546. }(this, (function (moment) { 'use strict';
  28547. var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');
  28548. var monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
  28549. var monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];
  28550. var monthsRegex = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
  28551. var nl = moment.defineLocale('nl', {
  28552. months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
  28553. monthsShort : function (m, format) {
  28554. if (!m) {
  28555. return monthsShortWithDots;
  28556. } else if (/-MMM-/.test(format)) {
  28557. return monthsShortWithoutDots[m.month()];
  28558. } else {
  28559. return monthsShortWithDots[m.month()];
  28560. }
  28561. },
  28562. monthsRegex: monthsRegex,
  28563. monthsShortRegex: monthsRegex,
  28564. monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,
  28565. monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
  28566. monthsParse : monthsParse,
  28567. longMonthsParse : monthsParse,
  28568. shortMonthsParse : monthsParse,
  28569. weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
  28570. weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'),
  28571. weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'),
  28572. weekdaysParseExact : true,
  28573. longDateFormat : {
  28574. LT : 'HH:mm',
  28575. LTS : 'HH:mm:ss',
  28576. L : 'DD-MM-YYYY',
  28577. LL : 'D MMMM YYYY',
  28578. LLL : 'D MMMM YYYY HH:mm',
  28579. LLLL : 'dddd D MMMM YYYY HH:mm'
  28580. },
  28581. calendar : {
  28582. sameDay: '[vandaag om] LT',
  28583. nextDay: '[morgen om] LT',
  28584. nextWeek: 'dddd [om] LT',
  28585. lastDay: '[gisteren om] LT',
  28586. lastWeek: '[afgelopen] dddd [om] LT',
  28587. sameElse: 'L'
  28588. },
  28589. relativeTime : {
  28590. future : 'over %s',
  28591. past : '%s geleden',
  28592. s : 'een paar seconden',
  28593. ss : '%d seconden',
  28594. m : 'één minuut',
  28595. mm : '%d minuten',
  28596. h : 'één uur',
  28597. hh : '%d uur',
  28598. d : 'één dag',
  28599. dd : '%d dagen',
  28600. M : 'één maand',
  28601. MM : '%d maanden',
  28602. y : 'één jaar',
  28603. yy : '%d jaar'
  28604. },
  28605. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  28606. ordinal : function (number) {
  28607. return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
  28608. },
  28609. week : {
  28610. dow : 1, // Monday is the first day of the week.
  28611. doy : 4 // The week that contains Jan 4th is the first week of the year.
  28612. }
  28613. });
  28614. return nl;
  28615. })));
  28616. /***/ }),
  28617. /* 289 */
  28618. /***/ (function(module, exports, __webpack_require__) {
  28619. //! moment.js locale configuration
  28620. //! locale : Dutch (Belgium) [nl-be]
  28621. //! author : Joris Röling : https://github.com/jorisroling
  28622. //! author : Jacob Middag : https://github.com/middagj
  28623. ;(function (global, factory) {
  28624. true ? factory(__webpack_require__(0)) :
  28625. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  28626. factory(global.moment)
  28627. }(this, (function (moment) { 'use strict';
  28628. var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');
  28629. var monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
  28630. var monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];
  28631. var monthsRegex = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
  28632. var nlBe = moment.defineLocale('nl-be', {
  28633. months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
  28634. monthsShort : function (m, format) {
  28635. if (!m) {
  28636. return monthsShortWithDots;
  28637. } else if (/-MMM-/.test(format)) {
  28638. return monthsShortWithoutDots[m.month()];
  28639. } else {
  28640. return monthsShortWithDots[m.month()];
  28641. }
  28642. },
  28643. monthsRegex: monthsRegex,
  28644. monthsShortRegex: monthsRegex,
  28645. monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,
  28646. monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
  28647. monthsParse : monthsParse,
  28648. longMonthsParse : monthsParse,
  28649. shortMonthsParse : monthsParse,
  28650. weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
  28651. weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'),
  28652. weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'),
  28653. weekdaysParseExact : true,
  28654. longDateFormat : {
  28655. LT : 'HH:mm',
  28656. LTS : 'HH:mm:ss',
  28657. L : 'DD/MM/YYYY',
  28658. LL : 'D MMMM YYYY',
  28659. LLL : 'D MMMM YYYY HH:mm',
  28660. LLLL : 'dddd D MMMM YYYY HH:mm'
  28661. },
  28662. calendar : {
  28663. sameDay: '[vandaag om] LT',
  28664. nextDay: '[morgen om] LT',
  28665. nextWeek: 'dddd [om] LT',
  28666. lastDay: '[gisteren om] LT',
  28667. lastWeek: '[afgelopen] dddd [om] LT',
  28668. sameElse: 'L'
  28669. },
  28670. relativeTime : {
  28671. future : 'over %s',
  28672. past : '%s geleden',
  28673. s : 'een paar seconden',
  28674. ss : '%d seconden',
  28675. m : 'één minuut',
  28676. mm : '%d minuten',
  28677. h : 'één uur',
  28678. hh : '%d uur',
  28679. d : 'één dag',
  28680. dd : '%d dagen',
  28681. M : 'één maand',
  28682. MM : '%d maanden',
  28683. y : 'één jaar',
  28684. yy : '%d jaar'
  28685. },
  28686. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  28687. ordinal : function (number) {
  28688. return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
  28689. },
  28690. week : {
  28691. dow : 1, // Monday is the first day of the week.
  28692. doy : 4 // The week that contains Jan 4th is the first week of the year.
  28693. }
  28694. });
  28695. return nlBe;
  28696. })));
  28697. /***/ }),
  28698. /* 290 */
  28699. /***/ (function(module, exports, __webpack_require__) {
  28700. //! moment.js locale configuration
  28701. //! locale : Nynorsk [nn]
  28702. //! author : https://github.com/mechuwind
  28703. ;(function (global, factory) {
  28704. true ? factory(__webpack_require__(0)) :
  28705. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  28706. factory(global.moment)
  28707. }(this, (function (moment) { 'use strict';
  28708. var nn = moment.defineLocale('nn', {
  28709. months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
  28710. monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
  28711. weekdays : 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
  28712. weekdaysShort : 'sun_mån_tys_ons_tor_fre_lau'.split('_'),
  28713. weekdaysMin : 'su_må_ty_on_to_fr_lø'.split('_'),
  28714. longDateFormat : {
  28715. LT : 'HH:mm',
  28716. LTS : 'HH:mm:ss',
  28717. L : 'DD.MM.YYYY',
  28718. LL : 'D. MMMM YYYY',
  28719. LLL : 'D. MMMM YYYY [kl.] H:mm',
  28720. LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm'
  28721. },
  28722. calendar : {
  28723. sameDay: '[I dag klokka] LT',
  28724. nextDay: '[I morgon klokka] LT',
  28725. nextWeek: 'dddd [klokka] LT',
  28726. lastDay: '[I går klokka] LT',
  28727. lastWeek: '[Føregåande] dddd [klokka] LT',
  28728. sameElse: 'L'
  28729. },
  28730. relativeTime : {
  28731. future : 'om %s',
  28732. past : '%s sidan',
  28733. s : 'nokre sekund',
  28734. ss : '%d sekund',
  28735. m : 'eit minutt',
  28736. mm : '%d minutt',
  28737. h : 'ein time',
  28738. hh : '%d timar',
  28739. d : 'ein dag',
  28740. dd : '%d dagar',
  28741. M : 'ein månad',
  28742. MM : '%d månader',
  28743. y : 'eit år',
  28744. yy : '%d år'
  28745. },
  28746. dayOfMonthOrdinalParse: /\d{1,2}\./,
  28747. ordinal : '%d.',
  28748. week : {
  28749. dow : 1, // Monday is the first day of the week.
  28750. doy : 4 // The week that contains Jan 4th is the first week of the year.
  28751. }
  28752. });
  28753. return nn;
  28754. })));
  28755. /***/ }),
  28756. /* 291 */
  28757. /***/ (function(module, exports, __webpack_require__) {
  28758. //! moment.js locale configuration
  28759. //! locale : Punjabi (India) [pa-in]
  28760. //! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
  28761. ;(function (global, factory) {
  28762. true ? factory(__webpack_require__(0)) :
  28763. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  28764. factory(global.moment)
  28765. }(this, (function (moment) { 'use strict';
  28766. var symbolMap = {
  28767. '1': '੧',
  28768. '2': '੨',
  28769. '3': '੩',
  28770. '4': '੪',
  28771. '5': '੫',
  28772. '6': '੬',
  28773. '7': '੭',
  28774. '8': '੮',
  28775. '9': '੯',
  28776. '0': '੦'
  28777. };
  28778. var numberMap = {
  28779. '੧': '1',
  28780. '੨': '2',
  28781. '੩': '3',
  28782. '੪': '4',
  28783. '੫': '5',
  28784. '੬': '6',
  28785. '੭': '7',
  28786. '੮': '8',
  28787. '੯': '9',
  28788. '੦': '0'
  28789. };
  28790. var paIn = moment.defineLocale('pa-in', {
  28791. // There are months name as per Nanakshahi Calender but they are not used as rigidly in modern Punjabi.
  28792. months : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),
  28793. monthsShort : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),
  28794. weekdays : 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'),
  28795. weekdaysShort : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
  28796. weekdaysMin : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
  28797. longDateFormat : {
  28798. LT : 'A h:mm ਵਜੇ',
  28799. LTS : 'A h:mm:ss ਵਜੇ',
  28800. L : 'DD/MM/YYYY',
  28801. LL : 'D MMMM YYYY',
  28802. LLL : 'D MMMM YYYY, A h:mm ਵਜੇ',
  28803. LLLL : 'dddd, D MMMM YYYY, A h:mm ਵਜੇ'
  28804. },
  28805. calendar : {
  28806. sameDay : '[ਅਜ] LT',
  28807. nextDay : '[ਕਲ] LT',
  28808. nextWeek : 'dddd, LT',
  28809. lastDay : '[ਕਲ] LT',
  28810. lastWeek : '[ਪਿਛਲੇ] dddd, LT',
  28811. sameElse : 'L'
  28812. },
  28813. relativeTime : {
  28814. future : '%s ਵਿੱਚ',
  28815. past : '%s ਪਿਛਲੇ',
  28816. s : 'ਕੁਝ ਸਕਿੰਟ',
  28817. ss : '%d ਸਕਿੰਟ',
  28818. m : 'ਇਕ ਮਿੰਟ',
  28819. mm : '%d ਮਿੰਟ',
  28820. h : 'ਇੱਕ ਘੰਟਾ',
  28821. hh : '%d ਘੰਟੇ',
  28822. d : 'ਇੱਕ ਦਿਨ',
  28823. dd : '%d ਦਿਨ',
  28824. M : 'ਇੱਕ ਮਹੀਨਾ',
  28825. MM : '%d ਮਹੀਨੇ',
  28826. y : 'ਇੱਕ ਸਾਲ',
  28827. yy : '%d ਸਾਲ'
  28828. },
  28829. preparse: function (string) {
  28830. return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
  28831. return numberMap[match];
  28832. });
  28833. },
  28834. postformat: function (string) {
  28835. return string.replace(/\d/g, function (match) {
  28836. return symbolMap[match];
  28837. });
  28838. },
  28839. // Punjabi notation for meridiems are quite fuzzy in practice. While there exists
  28840. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
  28841. meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
  28842. meridiemHour : function (hour, meridiem) {
  28843. if (hour === 12) {
  28844. hour = 0;
  28845. }
  28846. if (meridiem === 'ਰਾਤ') {
  28847. return hour < 4 ? hour : hour + 12;
  28848. } else if (meridiem === 'ਸਵੇਰ') {
  28849. return hour;
  28850. } else if (meridiem === 'ਦੁਪਹਿਰ') {
  28851. return hour >= 10 ? hour : hour + 12;
  28852. } else if (meridiem === 'ਸ਼ਾਮ') {
  28853. return hour + 12;
  28854. }
  28855. },
  28856. meridiem : function (hour, minute, isLower) {
  28857. if (hour < 4) {
  28858. return 'ਰਾਤ';
  28859. } else if (hour < 10) {
  28860. return 'ਸਵੇਰ';
  28861. } else if (hour < 17) {
  28862. return 'ਦੁਪਹਿਰ';
  28863. } else if (hour < 20) {
  28864. return 'ਸ਼ਾਮ';
  28865. } else {
  28866. return 'ਰਾਤ';
  28867. }
  28868. },
  28869. week : {
  28870. dow : 0, // Sunday is the first day of the week.
  28871. doy : 6 // The week that contains Jan 1st is the first week of the year.
  28872. }
  28873. });
  28874. return paIn;
  28875. })));
  28876. /***/ }),
  28877. /* 292 */
  28878. /***/ (function(module, exports, __webpack_require__) {
  28879. //! moment.js locale configuration
  28880. //! locale : Polish [pl]
  28881. //! author : Rafal Hirsz : https://github.com/evoL
  28882. ;(function (global, factory) {
  28883. true ? factory(__webpack_require__(0)) :
  28884. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  28885. factory(global.moment)
  28886. }(this, (function (moment) { 'use strict';
  28887. var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_');
  28888. var monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');
  28889. function plural(n) {
  28890. return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1);
  28891. }
  28892. function translate(number, withoutSuffix, key) {
  28893. var result = number + ' ';
  28894. switch (key) {
  28895. case 'ss':
  28896. return result + (plural(number) ? 'sekundy' : 'sekund');
  28897. case 'm':
  28898. return withoutSuffix ? 'minuta' : 'minutę';
  28899. case 'mm':
  28900. return result + (plural(number) ? 'minuty' : 'minut');
  28901. case 'h':
  28902. return withoutSuffix ? 'godzina' : 'godzinę';
  28903. case 'hh':
  28904. return result + (plural(number) ? 'godziny' : 'godzin');
  28905. case 'MM':
  28906. return result + (plural(number) ? 'miesiące' : 'miesięcy');
  28907. case 'yy':
  28908. return result + (plural(number) ? 'lata' : 'lat');
  28909. }
  28910. }
  28911. var pl = moment.defineLocale('pl', {
  28912. months : function (momentToFormat, format) {
  28913. if (!momentToFormat) {
  28914. return monthsNominative;
  28915. } else if (format === '') {
  28916. // Hack: if format empty we know this is used to generate
  28917. // RegExp by moment. Give then back both valid forms of months
  28918. // in RegExp ready format.
  28919. return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')';
  28920. } else if (/D MMMM/.test(format)) {
  28921. return monthsSubjective[momentToFormat.month()];
  28922. } else {
  28923. return monthsNominative[momentToFormat.month()];
  28924. }
  28925. },
  28926. monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
  28927. weekdays : 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
  28928. weekdaysShort : 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
  28929. weekdaysMin : 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
  28930. longDateFormat : {
  28931. LT : 'HH:mm',
  28932. LTS : 'HH:mm:ss',
  28933. L : 'DD.MM.YYYY',
  28934. LL : 'D MMMM YYYY',
  28935. LLL : 'D MMMM YYYY HH:mm',
  28936. LLLL : 'dddd, D MMMM YYYY HH:mm'
  28937. },
  28938. calendar : {
  28939. sameDay: '[Dziś o] LT',
  28940. nextDay: '[Jutro o] LT',
  28941. nextWeek: function () {
  28942. switch (this.day()) {
  28943. case 0:
  28944. return '[W niedzielę o] LT';
  28945. case 2:
  28946. return '[We wtorek o] LT';
  28947. case 3:
  28948. return '[W środę o] LT';
  28949. case 6:
  28950. return '[W sobotę o] LT';
  28951. default:
  28952. return '[W] dddd [o] LT';
  28953. }
  28954. },
  28955. lastDay: '[Wczoraj o] LT',
  28956. lastWeek: function () {
  28957. switch (this.day()) {
  28958. case 0:
  28959. return '[W zeszłą niedzielę o] LT';
  28960. case 3:
  28961. return '[W zeszłą środę o] LT';
  28962. case 6:
  28963. return '[W zeszłą sobotę o] LT';
  28964. default:
  28965. return '[W zeszły] dddd [o] LT';
  28966. }
  28967. },
  28968. sameElse: 'L'
  28969. },
  28970. relativeTime : {
  28971. future : 'za %s',
  28972. past : '%s temu',
  28973. s : 'kilka sekund',
  28974. ss : translate,
  28975. m : translate,
  28976. mm : translate,
  28977. h : translate,
  28978. hh : translate,
  28979. d : '1 dzień',
  28980. dd : '%d dni',
  28981. M : 'miesiąc',
  28982. MM : translate,
  28983. y : 'rok',
  28984. yy : translate
  28985. },
  28986. dayOfMonthOrdinalParse: /\d{1,2}\./,
  28987. ordinal : '%d.',
  28988. week : {
  28989. dow : 1, // Monday is the first day of the week.
  28990. doy : 4 // The week that contains Jan 4th is the first week of the year.
  28991. }
  28992. });
  28993. return pl;
  28994. })));
  28995. /***/ }),
  28996. /* 293 */
  28997. /***/ (function(module, exports, __webpack_require__) {
  28998. //! moment.js locale configuration
  28999. //! locale : Portuguese [pt]
  29000. //! author : Jefferson : https://github.com/jalex79
  29001. ;(function (global, factory) {
  29002. true ? factory(__webpack_require__(0)) :
  29003. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  29004. factory(global.moment)
  29005. }(this, (function (moment) { 'use strict';
  29006. var pt = moment.defineLocale('pt', {
  29007. months : 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'),
  29008. monthsShort : 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
  29009. weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
  29010. weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
  29011. weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
  29012. weekdaysParseExact : true,
  29013. longDateFormat : {
  29014. LT : 'HH:mm',
  29015. LTS : 'HH:mm:ss',
  29016. L : 'DD/MM/YYYY',
  29017. LL : 'D [de] MMMM [de] YYYY',
  29018. LLL : 'D [de] MMMM [de] YYYY HH:mm',
  29019. LLLL : 'dddd, D [de] MMMM [de] YYYY HH:mm'
  29020. },
  29021. calendar : {
  29022. sameDay: '[Hoje às] LT',
  29023. nextDay: '[Amanhã às] LT',
  29024. nextWeek: 'dddd [às] LT',
  29025. lastDay: '[Ontem às] LT',
  29026. lastWeek: function () {
  29027. return (this.day() === 0 || this.day() === 6) ?
  29028. '[Último] dddd [às] LT' : // Saturday + Sunday
  29029. '[Última] dddd [às] LT'; // Monday - Friday
  29030. },
  29031. sameElse: 'L'
  29032. },
  29033. relativeTime : {
  29034. future : 'em %s',
  29035. past : 'há %s',
  29036. s : 'segundos',
  29037. ss : '%d segundos',
  29038. m : 'um minuto',
  29039. mm : '%d minutos',
  29040. h : 'uma hora',
  29041. hh : '%d horas',
  29042. d : 'um dia',
  29043. dd : '%d dias',
  29044. M : 'um mês',
  29045. MM : '%d meses',
  29046. y : 'um ano',
  29047. yy : '%d anos'
  29048. },
  29049. dayOfMonthOrdinalParse: /\d{1,2}º/,
  29050. ordinal : '%dº',
  29051. week : {
  29052. dow : 1, // Monday is the first day of the week.
  29053. doy : 4 // The week that contains Jan 4th is the first week of the year.
  29054. }
  29055. });
  29056. return pt;
  29057. })));
  29058. /***/ }),
  29059. /* 294 */
  29060. /***/ (function(module, exports, __webpack_require__) {
  29061. //! moment.js locale configuration
  29062. //! locale : Portuguese (Brazil) [pt-br]
  29063. //! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
  29064. ;(function (global, factory) {
  29065. true ? factory(__webpack_require__(0)) :
  29066. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  29067. factory(global.moment)
  29068. }(this, (function (moment) { 'use strict';
  29069. var ptBr = moment.defineLocale('pt-br', {
  29070. months : 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'),
  29071. monthsShort : 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
  29072. weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
  29073. weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
  29074. weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
  29075. weekdaysParseExact : true,
  29076. longDateFormat : {
  29077. LT : 'HH:mm',
  29078. LTS : 'HH:mm:ss',
  29079. L : 'DD/MM/YYYY',
  29080. LL : 'D [de] MMMM [de] YYYY',
  29081. LLL : 'D [de] MMMM [de] YYYY [às] HH:mm',
  29082. LLLL : 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'
  29083. },
  29084. calendar : {
  29085. sameDay: '[Hoje às] LT',
  29086. nextDay: '[Amanhã às] LT',
  29087. nextWeek: 'dddd [às] LT',
  29088. lastDay: '[Ontem às] LT',
  29089. lastWeek: function () {
  29090. return (this.day() === 0 || this.day() === 6) ?
  29091. '[Último] dddd [às] LT' : // Saturday + Sunday
  29092. '[Última] dddd [às] LT'; // Monday - Friday
  29093. },
  29094. sameElse: 'L'
  29095. },
  29096. relativeTime : {
  29097. future : 'em %s',
  29098. past : '%s atrás',
  29099. s : 'poucos segundos',
  29100. ss : '%d segundos',
  29101. m : 'um minuto',
  29102. mm : '%d minutos',
  29103. h : 'uma hora',
  29104. hh : '%d horas',
  29105. d : 'um dia',
  29106. dd : '%d dias',
  29107. M : 'um mês',
  29108. MM : '%d meses',
  29109. y : 'um ano',
  29110. yy : '%d anos'
  29111. },
  29112. dayOfMonthOrdinalParse: /\d{1,2}º/,
  29113. ordinal : '%dº'
  29114. });
  29115. return ptBr;
  29116. })));
  29117. /***/ }),
  29118. /* 295 */
  29119. /***/ (function(module, exports, __webpack_require__) {
  29120. //! moment.js locale configuration
  29121. //! locale : Romanian [ro]
  29122. //! author : Vlad Gurdiga : https://github.com/gurdiga
  29123. //! author : Valentin Agachi : https://github.com/avaly
  29124. ;(function (global, factory) {
  29125. true ? factory(__webpack_require__(0)) :
  29126. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  29127. factory(global.moment)
  29128. }(this, (function (moment) { 'use strict';
  29129. function relativeTimeWithPlural(number, withoutSuffix, key) {
  29130. var format = {
  29131. 'ss': 'secunde',
  29132. 'mm': 'minute',
  29133. 'hh': 'ore',
  29134. 'dd': 'zile',
  29135. 'MM': 'luni',
  29136. 'yy': 'ani'
  29137. },
  29138. separator = ' ';
  29139. if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
  29140. separator = ' de ';
  29141. }
  29142. return number + separator + format[key];
  29143. }
  29144. var ro = moment.defineLocale('ro', {
  29145. months : 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),
  29146. monthsShort : 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),
  29147. monthsParseExact: true,
  29148. weekdays : 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
  29149. weekdaysShort : 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
  29150. weekdaysMin : 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
  29151. longDateFormat : {
  29152. LT : 'H:mm',
  29153. LTS : 'H:mm:ss',
  29154. L : 'DD.MM.YYYY',
  29155. LL : 'D MMMM YYYY',
  29156. LLL : 'D MMMM YYYY H:mm',
  29157. LLLL : 'dddd, D MMMM YYYY H:mm'
  29158. },
  29159. calendar : {
  29160. sameDay: '[azi la] LT',
  29161. nextDay: '[mâine la] LT',
  29162. nextWeek: 'dddd [la] LT',
  29163. lastDay: '[ieri la] LT',
  29164. lastWeek: '[fosta] dddd [la] LT',
  29165. sameElse: 'L'
  29166. },
  29167. relativeTime : {
  29168. future : 'peste %s',
  29169. past : '%s în urmă',
  29170. s : 'câteva secunde',
  29171. ss : relativeTimeWithPlural,
  29172. m : 'un minut',
  29173. mm : relativeTimeWithPlural,
  29174. h : 'o oră',
  29175. hh : relativeTimeWithPlural,
  29176. d : 'o zi',
  29177. dd : relativeTimeWithPlural,
  29178. M : 'o lună',
  29179. MM : relativeTimeWithPlural,
  29180. y : 'un an',
  29181. yy : relativeTimeWithPlural
  29182. },
  29183. week : {
  29184. dow : 1, // Monday is the first day of the week.
  29185. doy : 7 // The week that contains Jan 1st is the first week of the year.
  29186. }
  29187. });
  29188. return ro;
  29189. })));
  29190. /***/ }),
  29191. /* 296 */
  29192. /***/ (function(module, exports, __webpack_require__) {
  29193. //! moment.js locale configuration
  29194. //! locale : Russian [ru]
  29195. //! author : Viktorminator : https://github.com/Viktorminator
  29196. //! Author : Menelion Elensúle : https://github.com/Oire
  29197. //! author : Коренберг Марк : https://github.com/socketpair
  29198. ;(function (global, factory) {
  29199. true ? factory(__webpack_require__(0)) :
  29200. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  29201. factory(global.moment)
  29202. }(this, (function (moment) { 'use strict';
  29203. function plural(word, num) {
  29204. var forms = word.split('_');
  29205. return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
  29206. }
  29207. function relativeTimeWithPlural(number, withoutSuffix, key) {
  29208. var format = {
  29209. 'ss': withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
  29210. 'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
  29211. 'hh': 'час_часа_часов',
  29212. 'dd': 'день_дня_дней',
  29213. 'MM': 'месяц_месяца_месяцев',
  29214. 'yy': 'год_года_лет'
  29215. };
  29216. if (key === 'm') {
  29217. return withoutSuffix ? 'минута' : 'минуту';
  29218. }
  29219. else {
  29220. return number + ' ' + plural(format[key], +number);
  29221. }
  29222. }
  29223. var monthsParse = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i];
  29224. // http://new.gramota.ru/spravka/rules/139-prop : § 103
  29225. // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
  29226. // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
  29227. var ru = moment.defineLocale('ru', {
  29228. months : {
  29229. format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),
  29230. standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_')
  29231. },
  29232. monthsShort : {
  29233. // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ?
  29234. format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'),
  29235. standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_')
  29236. },
  29237. weekdays : {
  29238. standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),
  29239. format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'),
  29240. isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/
  29241. },
  29242. weekdaysShort : 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
  29243. weekdaysMin : 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
  29244. monthsParse : monthsParse,
  29245. longMonthsParse : monthsParse,
  29246. shortMonthsParse : monthsParse,
  29247. // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
  29248. monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
  29249. // копия предыдущего
  29250. monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
  29251. // полные названия с падежами
  29252. monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
  29253. // Выражение, которое соотвествует только сокращённым формам
  29254. monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
  29255. longDateFormat : {
  29256. LT : 'H:mm',
  29257. LTS : 'H:mm:ss',
  29258. L : 'DD.MM.YYYY',
  29259. LL : 'D MMMM YYYY г.',
  29260. LLL : 'D MMMM YYYY г., H:mm',
  29261. LLLL : 'dddd, D MMMM YYYY г., H:mm'
  29262. },
  29263. calendar : {
  29264. sameDay: '[Сегодня в] LT',
  29265. nextDay: '[Завтра в] LT',
  29266. lastDay: '[Вчера в] LT',
  29267. nextWeek: function (now) {
  29268. if (now.week() !== this.week()) {
  29269. switch (this.day()) {
  29270. case 0:
  29271. return '[В следующее] dddd [в] LT';
  29272. case 1:
  29273. case 2:
  29274. case 4:
  29275. return '[В следующий] dddd [в] LT';
  29276. case 3:
  29277. case 5:
  29278. case 6:
  29279. return '[В следующую] dddd [в] LT';
  29280. }
  29281. } else {
  29282. if (this.day() === 2) {
  29283. return '[Во] dddd [в] LT';
  29284. } else {
  29285. return '[В] dddd [в] LT';
  29286. }
  29287. }
  29288. },
  29289. lastWeek: function (now) {
  29290. if (now.week() !== this.week()) {
  29291. switch (this.day()) {
  29292. case 0:
  29293. return '[В прошлое] dddd [в] LT';
  29294. case 1:
  29295. case 2:
  29296. case 4:
  29297. return '[В прошлый] dddd [в] LT';
  29298. case 3:
  29299. case 5:
  29300. case 6:
  29301. return '[В прошлую] dddd [в] LT';
  29302. }
  29303. } else {
  29304. if (this.day() === 2) {
  29305. return '[Во] dddd [в] LT';
  29306. } else {
  29307. return '[В] dddd [в] LT';
  29308. }
  29309. }
  29310. },
  29311. sameElse: 'L'
  29312. },
  29313. relativeTime : {
  29314. future : 'через %s',
  29315. past : '%s назад',
  29316. s : 'несколько секунд',
  29317. ss : relativeTimeWithPlural,
  29318. m : relativeTimeWithPlural,
  29319. mm : relativeTimeWithPlural,
  29320. h : 'час',
  29321. hh : relativeTimeWithPlural,
  29322. d : 'день',
  29323. dd : relativeTimeWithPlural,
  29324. M : 'месяц',
  29325. MM : relativeTimeWithPlural,
  29326. y : 'год',
  29327. yy : relativeTimeWithPlural
  29328. },
  29329. meridiemParse: /ночи|утра|дня|вечера/i,
  29330. isPM : function (input) {
  29331. return /^(дня|вечера)$/.test(input);
  29332. },
  29333. meridiem : function (hour, minute, isLower) {
  29334. if (hour < 4) {
  29335. return 'ночи';
  29336. } else if (hour < 12) {
  29337. return 'утра';
  29338. } else if (hour < 17) {
  29339. return 'дня';
  29340. } else {
  29341. return 'вечера';
  29342. }
  29343. },
  29344. dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
  29345. ordinal: function (number, period) {
  29346. switch (period) {
  29347. case 'M':
  29348. case 'd':
  29349. case 'DDD':
  29350. return number + '-й';
  29351. case 'D':
  29352. return number + '-го';
  29353. case 'w':
  29354. case 'W':
  29355. return number + '-я';
  29356. default:
  29357. return number;
  29358. }
  29359. },
  29360. week : {
  29361. dow : 1, // Monday is the first day of the week.
  29362. doy : 4 // The week that contains Jan 4th is the first week of the year.
  29363. }
  29364. });
  29365. return ru;
  29366. })));
  29367. /***/ }),
  29368. /* 297 */
  29369. /***/ (function(module, exports, __webpack_require__) {
  29370. //! moment.js locale configuration
  29371. //! locale : Sindhi [sd]
  29372. //! author : Narain Sagar : https://github.com/narainsagar
  29373. ;(function (global, factory) {
  29374. true ? factory(__webpack_require__(0)) :
  29375. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  29376. factory(global.moment)
  29377. }(this, (function (moment) { 'use strict';
  29378. var months = [
  29379. 'جنوري',
  29380. 'فيبروري',
  29381. 'مارچ',
  29382. 'اپريل',
  29383. 'مئي',
  29384. 'جون',
  29385. 'جولاءِ',
  29386. 'آگسٽ',
  29387. 'سيپٽمبر',
  29388. 'آڪٽوبر',
  29389. 'نومبر',
  29390. 'ڊسمبر'
  29391. ];
  29392. var days = [
  29393. 'آچر',
  29394. 'سومر',
  29395. 'اڱارو',
  29396. 'اربع',
  29397. 'خميس',
  29398. 'جمع',
  29399. 'ڇنڇر'
  29400. ];
  29401. var sd = moment.defineLocale('sd', {
  29402. months : months,
  29403. monthsShort : months,
  29404. weekdays : days,
  29405. weekdaysShort : days,
  29406. weekdaysMin : days,
  29407. longDateFormat : {
  29408. LT : 'HH:mm',
  29409. LTS : 'HH:mm:ss',
  29410. L : 'DD/MM/YYYY',
  29411. LL : 'D MMMM YYYY',
  29412. LLL : 'D MMMM YYYY HH:mm',
  29413. LLLL : 'dddd، D MMMM YYYY HH:mm'
  29414. },
  29415. meridiemParse: /صبح|شام/,
  29416. isPM : function (input) {
  29417. return 'شام' === input;
  29418. },
  29419. meridiem : function (hour, minute, isLower) {
  29420. if (hour < 12) {
  29421. return 'صبح';
  29422. }
  29423. return 'شام';
  29424. },
  29425. calendar : {
  29426. sameDay : '[اڄ] LT',
  29427. nextDay : '[سڀاڻي] LT',
  29428. nextWeek : 'dddd [اڳين هفتي تي] LT',
  29429. lastDay : '[ڪالهه] LT',
  29430. lastWeek : '[گزريل هفتي] dddd [تي] LT',
  29431. sameElse : 'L'
  29432. },
  29433. relativeTime : {
  29434. future : '%s پوء',
  29435. past : '%s اڳ',
  29436. s : 'چند سيڪنڊ',
  29437. ss : '%d سيڪنڊ',
  29438. m : 'هڪ منٽ',
  29439. mm : '%d منٽ',
  29440. h : 'هڪ ڪلاڪ',
  29441. hh : '%d ڪلاڪ',
  29442. d : 'هڪ ڏينهن',
  29443. dd : '%d ڏينهن',
  29444. M : 'هڪ مهينو',
  29445. MM : '%d مهينا',
  29446. y : 'هڪ سال',
  29447. yy : '%d سال'
  29448. },
  29449. preparse: function (string) {
  29450. return string.replace(/،/g, ',');
  29451. },
  29452. postformat: function (string) {
  29453. return string.replace(/,/g, '،');
  29454. },
  29455. week : {
  29456. dow : 1, // Monday is the first day of the week.
  29457. doy : 4 // The week that contains Jan 4th is the first week of the year.
  29458. }
  29459. });
  29460. return sd;
  29461. })));
  29462. /***/ }),
  29463. /* 298 */
  29464. /***/ (function(module, exports, __webpack_require__) {
  29465. //! moment.js locale configuration
  29466. //! locale : Northern Sami [se]
  29467. //! authors : Bård Rolstad Henriksen : https://github.com/karamell
  29468. ;(function (global, factory) {
  29469. true ? factory(__webpack_require__(0)) :
  29470. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  29471. factory(global.moment)
  29472. }(this, (function (moment) { 'use strict';
  29473. var se = moment.defineLocale('se', {
  29474. months : 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split('_'),
  29475. monthsShort : 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),
  29476. weekdays : 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split('_'),
  29477. weekdaysShort : 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),
  29478. weekdaysMin : 's_v_m_g_d_b_L'.split('_'),
  29479. longDateFormat : {
  29480. LT : 'HH:mm',
  29481. LTS : 'HH:mm:ss',
  29482. L : 'DD.MM.YYYY',
  29483. LL : 'MMMM D. [b.] YYYY',
  29484. LLL : 'MMMM D. [b.] YYYY [ti.] HH:mm',
  29485. LLLL : 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm'
  29486. },
  29487. calendar : {
  29488. sameDay: '[otne ti] LT',
  29489. nextDay: '[ihttin ti] LT',
  29490. nextWeek: 'dddd [ti] LT',
  29491. lastDay: '[ikte ti] LT',
  29492. lastWeek: '[ovddit] dddd [ti] LT',
  29493. sameElse: 'L'
  29494. },
  29495. relativeTime : {
  29496. future : '%s geažes',
  29497. past : 'maŋit %s',
  29498. s : 'moadde sekunddat',
  29499. ss: '%d sekunddat',
  29500. m : 'okta minuhta',
  29501. mm : '%d minuhtat',
  29502. h : 'okta diimmu',
  29503. hh : '%d diimmut',
  29504. d : 'okta beaivi',
  29505. dd : '%d beaivvit',
  29506. M : 'okta mánnu',
  29507. MM : '%d mánut',
  29508. y : 'okta jahki',
  29509. yy : '%d jagit'
  29510. },
  29511. dayOfMonthOrdinalParse: /\d{1,2}\./,
  29512. ordinal : '%d.',
  29513. week : {
  29514. dow : 1, // Monday is the first day of the week.
  29515. doy : 4 // The week that contains Jan 4th is the first week of the year.
  29516. }
  29517. });
  29518. return se;
  29519. })));
  29520. /***/ }),
  29521. /* 299 */
  29522. /***/ (function(module, exports, __webpack_require__) {
  29523. //! moment.js locale configuration
  29524. //! locale : Sinhalese [si]
  29525. //! author : Sampath Sitinamaluwa : https://github.com/sampathsris
  29526. ;(function (global, factory) {
  29527. true ? factory(__webpack_require__(0)) :
  29528. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  29529. factory(global.moment)
  29530. }(this, (function (moment) { 'use strict';
  29531. /*jshint -W100*/
  29532. var si = moment.defineLocale('si', {
  29533. months : 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'),
  29534. monthsShort : 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'),
  29535. weekdays : 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'),
  29536. weekdaysShort : 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),
  29537. weekdaysMin : 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),
  29538. weekdaysParseExact : true,
  29539. longDateFormat : {
  29540. LT : 'a h:mm',
  29541. LTS : 'a h:mm:ss',
  29542. L : 'YYYY/MM/DD',
  29543. LL : 'YYYY MMMM D',
  29544. LLL : 'YYYY MMMM D, a h:mm',
  29545. LLLL : 'YYYY MMMM D [වැනි] dddd, a h:mm:ss'
  29546. },
  29547. calendar : {
  29548. sameDay : '[අද] LT[ට]',
  29549. nextDay : '[හෙට] LT[ට]',
  29550. nextWeek : 'dddd LT[ට]',
  29551. lastDay : '[ඊයේ] LT[ට]',
  29552. lastWeek : '[පසුගිය] dddd LT[ට]',
  29553. sameElse : 'L'
  29554. },
  29555. relativeTime : {
  29556. future : '%sකින්',
  29557. past : '%sකට පෙර',
  29558. s : 'තත්පර කිහිපය',
  29559. ss : 'තත්පර %d',
  29560. m : 'මිනිත්තුව',
  29561. mm : 'මිනිත්තු %d',
  29562. h : 'පැය',
  29563. hh : 'පැය %d',
  29564. d : 'දිනය',
  29565. dd : 'දින %d',
  29566. M : 'මාසය',
  29567. MM : 'මාස %d',
  29568. y : 'වසර',
  29569. yy : 'වසර %d'
  29570. },
  29571. dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
  29572. ordinal : function (number) {
  29573. return number + ' වැනි';
  29574. },
  29575. meridiemParse : /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,
  29576. isPM : function (input) {
  29577. return input === 'ප.ව.' || input === 'පස් වරු';
  29578. },
  29579. meridiem : function (hours, minutes, isLower) {
  29580. if (hours > 11) {
  29581. return isLower ? 'ප.ව.' : 'පස් වරු';
  29582. } else {
  29583. return isLower ? 'පෙ.ව.' : 'පෙර වරු';
  29584. }
  29585. }
  29586. });
  29587. return si;
  29588. })));
  29589. /***/ }),
  29590. /* 300 */
  29591. /***/ (function(module, exports, __webpack_require__) {
  29592. //! moment.js locale configuration
  29593. //! locale : Slovak [sk]
  29594. //! author : Martin Minka : https://github.com/k2s
  29595. //! based on work of petrbela : https://github.com/petrbela
  29596. ;(function (global, factory) {
  29597. true ? factory(__webpack_require__(0)) :
  29598. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  29599. factory(global.moment)
  29600. }(this, (function (moment) { 'use strict';
  29601. var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_');
  29602. var monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
  29603. function plural(n) {
  29604. return (n > 1) && (n < 5);
  29605. }
  29606. function translate(number, withoutSuffix, key, isFuture) {
  29607. var result = number + ' ';
  29608. switch (key) {
  29609. case 's': // a few seconds / in a few seconds / a few seconds ago
  29610. return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
  29611. case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
  29612. if (withoutSuffix || isFuture) {
  29613. return result + (plural(number) ? 'sekundy' : 'sekúnd');
  29614. } else {
  29615. return result + 'sekundami';
  29616. }
  29617. break;
  29618. case 'm': // a minute / in a minute / a minute ago
  29619. return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');
  29620. case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
  29621. if (withoutSuffix || isFuture) {
  29622. return result + (plural(number) ? 'minúty' : 'minút');
  29623. } else {
  29624. return result + 'minútami';
  29625. }
  29626. break;
  29627. case 'h': // an hour / in an hour / an hour ago
  29628. return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
  29629. case 'hh': // 9 hours / in 9 hours / 9 hours ago
  29630. if (withoutSuffix || isFuture) {
  29631. return result + (plural(number) ? 'hodiny' : 'hodín');
  29632. } else {
  29633. return result + 'hodinami';
  29634. }
  29635. break;
  29636. case 'd': // a day / in a day / a day ago
  29637. return (withoutSuffix || isFuture) ? 'deň' : 'dňom';
  29638. case 'dd': // 9 days / in 9 days / 9 days ago
  29639. if (withoutSuffix || isFuture) {
  29640. return result + (plural(number) ? 'dni' : 'dní');
  29641. } else {
  29642. return result + 'dňami';
  29643. }
  29644. break;
  29645. case 'M': // a month / in a month / a month ago
  29646. return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';
  29647. case 'MM': // 9 months / in 9 months / 9 months ago
  29648. if (withoutSuffix || isFuture) {
  29649. return result + (plural(number) ? 'mesiace' : 'mesiacov');
  29650. } else {
  29651. return result + 'mesiacmi';
  29652. }
  29653. break;
  29654. case 'y': // a year / in a year / a year ago
  29655. return (withoutSuffix || isFuture) ? 'rok' : 'rokom';
  29656. case 'yy': // 9 years / in 9 years / 9 years ago
  29657. if (withoutSuffix || isFuture) {
  29658. return result + (plural(number) ? 'roky' : 'rokov');
  29659. } else {
  29660. return result + 'rokmi';
  29661. }
  29662. break;
  29663. }
  29664. }
  29665. var sk = moment.defineLocale('sk', {
  29666. months : months,
  29667. monthsShort : monthsShort,
  29668. weekdays : 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
  29669. weekdaysShort : 'ne_po_ut_st_št_pi_so'.split('_'),
  29670. weekdaysMin : 'ne_po_ut_st_št_pi_so'.split('_'),
  29671. longDateFormat : {
  29672. LT: 'H:mm',
  29673. LTS : 'H:mm:ss',
  29674. L : 'DD.MM.YYYY',
  29675. LL : 'D. MMMM YYYY',
  29676. LLL : 'D. MMMM YYYY H:mm',
  29677. LLLL : 'dddd D. MMMM YYYY H:mm'
  29678. },
  29679. calendar : {
  29680. sameDay: '[dnes o] LT',
  29681. nextDay: '[zajtra o] LT',
  29682. nextWeek: function () {
  29683. switch (this.day()) {
  29684. case 0:
  29685. return '[v nedeľu o] LT';
  29686. case 1:
  29687. case 2:
  29688. return '[v] dddd [o] LT';
  29689. case 3:
  29690. return '[v stredu o] LT';
  29691. case 4:
  29692. return '[vo štvrtok o] LT';
  29693. case 5:
  29694. return '[v piatok o] LT';
  29695. case 6:
  29696. return '[v sobotu o] LT';
  29697. }
  29698. },
  29699. lastDay: '[včera o] LT',
  29700. lastWeek: function () {
  29701. switch (this.day()) {
  29702. case 0:
  29703. return '[minulú nedeľu o] LT';
  29704. case 1:
  29705. case 2:
  29706. return '[minulý] dddd [o] LT';
  29707. case 3:
  29708. return '[minulú stredu o] LT';
  29709. case 4:
  29710. case 5:
  29711. return '[minulý] dddd [o] LT';
  29712. case 6:
  29713. return '[minulú sobotu o] LT';
  29714. }
  29715. },
  29716. sameElse: 'L'
  29717. },
  29718. relativeTime : {
  29719. future : 'za %s',
  29720. past : 'pred %s',
  29721. s : translate,
  29722. ss : translate,
  29723. m : translate,
  29724. mm : translate,
  29725. h : translate,
  29726. hh : translate,
  29727. d : translate,
  29728. dd : translate,
  29729. M : translate,
  29730. MM : translate,
  29731. y : translate,
  29732. yy : translate
  29733. },
  29734. dayOfMonthOrdinalParse: /\d{1,2}\./,
  29735. ordinal : '%d.',
  29736. week : {
  29737. dow : 1, // Monday is the first day of the week.
  29738. doy : 4 // The week that contains Jan 4th is the first week of the year.
  29739. }
  29740. });
  29741. return sk;
  29742. })));
  29743. /***/ }),
  29744. /* 301 */
  29745. /***/ (function(module, exports, __webpack_require__) {
  29746. //! moment.js locale configuration
  29747. //! locale : Slovenian [sl]
  29748. //! author : Robert Sedovšek : https://github.com/sedovsek
  29749. ;(function (global, factory) {
  29750. true ? factory(__webpack_require__(0)) :
  29751. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  29752. factory(global.moment)
  29753. }(this, (function (moment) { 'use strict';
  29754. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  29755. var result = number + ' ';
  29756. switch (key) {
  29757. case 's':
  29758. return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';
  29759. case 'ss':
  29760. if (number === 1) {
  29761. result += withoutSuffix ? 'sekundo' : 'sekundi';
  29762. } else if (number === 2) {
  29763. result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
  29764. } else if (number < 5) {
  29765. result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
  29766. } else {
  29767. result += withoutSuffix || isFuture ? 'sekund' : 'sekund';
  29768. }
  29769. return result;
  29770. case 'm':
  29771. return withoutSuffix ? 'ena minuta' : 'eno minuto';
  29772. case 'mm':
  29773. if (number === 1) {
  29774. result += withoutSuffix ? 'minuta' : 'minuto';
  29775. } else if (number === 2) {
  29776. result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
  29777. } else if (number < 5) {
  29778. result += withoutSuffix || isFuture ? 'minute' : 'minutami';
  29779. } else {
  29780. result += withoutSuffix || isFuture ? 'minut' : 'minutami';
  29781. }
  29782. return result;
  29783. case 'h':
  29784. return withoutSuffix ? 'ena ura' : 'eno uro';
  29785. case 'hh':
  29786. if (number === 1) {
  29787. result += withoutSuffix ? 'ura' : 'uro';
  29788. } else if (number === 2) {
  29789. result += withoutSuffix || isFuture ? 'uri' : 'urama';
  29790. } else if (number < 5) {
  29791. result += withoutSuffix || isFuture ? 'ure' : 'urami';
  29792. } else {
  29793. result += withoutSuffix || isFuture ? 'ur' : 'urami';
  29794. }
  29795. return result;
  29796. case 'd':
  29797. return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
  29798. case 'dd':
  29799. if (number === 1) {
  29800. result += withoutSuffix || isFuture ? 'dan' : 'dnem';
  29801. } else if (number === 2) {
  29802. result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
  29803. } else {
  29804. result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
  29805. }
  29806. return result;
  29807. case 'M':
  29808. return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
  29809. case 'MM':
  29810. if (number === 1) {
  29811. result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
  29812. } else if (number === 2) {
  29813. result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
  29814. } else if (number < 5) {
  29815. result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
  29816. } else {
  29817. result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
  29818. }
  29819. return result;
  29820. case 'y':
  29821. return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
  29822. case 'yy':
  29823. if (number === 1) {
  29824. result += withoutSuffix || isFuture ? 'leto' : 'letom';
  29825. } else if (number === 2) {
  29826. result += withoutSuffix || isFuture ? 'leti' : 'letoma';
  29827. } else if (number < 5) {
  29828. result += withoutSuffix || isFuture ? 'leta' : 'leti';
  29829. } else {
  29830. result += withoutSuffix || isFuture ? 'let' : 'leti';
  29831. }
  29832. return result;
  29833. }
  29834. }
  29835. var sl = moment.defineLocale('sl', {
  29836. months : 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'),
  29837. monthsShort : 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'),
  29838. monthsParseExact: true,
  29839. weekdays : 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
  29840. weekdaysShort : 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
  29841. weekdaysMin : 'ne_po_to_sr_če_pe_so'.split('_'),
  29842. weekdaysParseExact : true,
  29843. longDateFormat : {
  29844. LT : 'H:mm',
  29845. LTS : 'H:mm:ss',
  29846. L : 'DD.MM.YYYY',
  29847. LL : 'D. MMMM YYYY',
  29848. LLL : 'D. MMMM YYYY H:mm',
  29849. LLLL : 'dddd, D. MMMM YYYY H:mm'
  29850. },
  29851. calendar : {
  29852. sameDay : '[danes ob] LT',
  29853. nextDay : '[jutri ob] LT',
  29854. nextWeek : function () {
  29855. switch (this.day()) {
  29856. case 0:
  29857. return '[v] [nedeljo] [ob] LT';
  29858. case 3:
  29859. return '[v] [sredo] [ob] LT';
  29860. case 6:
  29861. return '[v] [soboto] [ob] LT';
  29862. case 1:
  29863. case 2:
  29864. case 4:
  29865. case 5:
  29866. return '[v] dddd [ob] LT';
  29867. }
  29868. },
  29869. lastDay : '[včeraj ob] LT',
  29870. lastWeek : function () {
  29871. switch (this.day()) {
  29872. case 0:
  29873. return '[prejšnjo] [nedeljo] [ob] LT';
  29874. case 3:
  29875. return '[prejšnjo] [sredo] [ob] LT';
  29876. case 6:
  29877. return '[prejšnjo] [soboto] [ob] LT';
  29878. case 1:
  29879. case 2:
  29880. case 4:
  29881. case 5:
  29882. return '[prejšnji] dddd [ob] LT';
  29883. }
  29884. },
  29885. sameElse : 'L'
  29886. },
  29887. relativeTime : {
  29888. future : 'čez %s',
  29889. past : 'pred %s',
  29890. s : processRelativeTime,
  29891. ss : processRelativeTime,
  29892. m : processRelativeTime,
  29893. mm : processRelativeTime,
  29894. h : processRelativeTime,
  29895. hh : processRelativeTime,
  29896. d : processRelativeTime,
  29897. dd : processRelativeTime,
  29898. M : processRelativeTime,
  29899. MM : processRelativeTime,
  29900. y : processRelativeTime,
  29901. yy : processRelativeTime
  29902. },
  29903. dayOfMonthOrdinalParse: /\d{1,2}\./,
  29904. ordinal : '%d.',
  29905. week : {
  29906. dow : 1, // Monday is the first day of the week.
  29907. doy : 7 // The week that contains Jan 1st is the first week of the year.
  29908. }
  29909. });
  29910. return sl;
  29911. })));
  29912. /***/ }),
  29913. /* 302 */
  29914. /***/ (function(module, exports, __webpack_require__) {
  29915. //! moment.js locale configuration
  29916. //! locale : Albanian [sq]
  29917. //! author : Flakërim Ismani : https://github.com/flakerimi
  29918. //! author : Menelion Elensúle : https://github.com/Oire
  29919. //! author : Oerd Cukalla : https://github.com/oerd
  29920. ;(function (global, factory) {
  29921. true ? factory(__webpack_require__(0)) :
  29922. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  29923. factory(global.moment)
  29924. }(this, (function (moment) { 'use strict';
  29925. var sq = moment.defineLocale('sq', {
  29926. months : 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'),
  29927. monthsShort : 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
  29928. weekdays : 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'),
  29929. weekdaysShort : 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
  29930. weekdaysMin : 'D_H_Ma_Më_E_P_Sh'.split('_'),
  29931. weekdaysParseExact : true,
  29932. meridiemParse: /PD|MD/,
  29933. isPM: function (input) {
  29934. return input.charAt(0) === 'M';
  29935. },
  29936. meridiem : function (hours, minutes, isLower) {
  29937. return hours < 12 ? 'PD' : 'MD';
  29938. },
  29939. longDateFormat : {
  29940. LT : 'HH:mm',
  29941. LTS : 'HH:mm:ss',
  29942. L : 'DD/MM/YYYY',
  29943. LL : 'D MMMM YYYY',
  29944. LLL : 'D MMMM YYYY HH:mm',
  29945. LLLL : 'dddd, D MMMM YYYY HH:mm'
  29946. },
  29947. calendar : {
  29948. sameDay : '[Sot në] LT',
  29949. nextDay : '[Nesër në] LT',
  29950. nextWeek : 'dddd [në] LT',
  29951. lastDay : '[Dje në] LT',
  29952. lastWeek : 'dddd [e kaluar në] LT',
  29953. sameElse : 'L'
  29954. },
  29955. relativeTime : {
  29956. future : 'në %s',
  29957. past : '%s më parë',
  29958. s : 'disa sekonda',
  29959. ss : '%d sekonda',
  29960. m : 'një minutë',
  29961. mm : '%d minuta',
  29962. h : 'një orë',
  29963. hh : '%d orë',
  29964. d : 'një ditë',
  29965. dd : '%d ditë',
  29966. M : 'një muaj',
  29967. MM : '%d muaj',
  29968. y : 'një vit',
  29969. yy : '%d vite'
  29970. },
  29971. dayOfMonthOrdinalParse: /\d{1,2}\./,
  29972. ordinal : '%d.',
  29973. week : {
  29974. dow : 1, // Monday is the first day of the week.
  29975. doy : 4 // The week that contains Jan 4th is the first week of the year.
  29976. }
  29977. });
  29978. return sq;
  29979. })));
  29980. /***/ }),
  29981. /* 303 */
  29982. /***/ (function(module, exports, __webpack_require__) {
  29983. //! moment.js locale configuration
  29984. //! locale : Serbian [sr]
  29985. //! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
  29986. ;(function (global, factory) {
  29987. true ? factory(__webpack_require__(0)) :
  29988. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  29989. factory(global.moment)
  29990. }(this, (function (moment) { 'use strict';
  29991. var translator = {
  29992. words: { //Different grammatical cases
  29993. ss: ['sekunda', 'sekunde', 'sekundi'],
  29994. m: ['jedan minut', 'jedne minute'],
  29995. mm: ['minut', 'minute', 'minuta'],
  29996. h: ['jedan sat', 'jednog sata'],
  29997. hh: ['sat', 'sata', 'sati'],
  29998. dd: ['dan', 'dana', 'dana'],
  29999. MM: ['mesec', 'meseca', 'meseci'],
  30000. yy: ['godina', 'godine', 'godina']
  30001. },
  30002. correctGrammaticalCase: function (number, wordKey) {
  30003. return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
  30004. },
  30005. translate: function (number, withoutSuffix, key) {
  30006. var wordKey = translator.words[key];
  30007. if (key.length === 1) {
  30008. return withoutSuffix ? wordKey[0] : wordKey[1];
  30009. } else {
  30010. return number + ' ' + translator.correctGrammaticalCase(number, wordKey);
  30011. }
  30012. }
  30013. };
  30014. var sr = moment.defineLocale('sr', {
  30015. months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),
  30016. monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
  30017. monthsParseExact: true,
  30018. weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'),
  30019. weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
  30020. weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
  30021. weekdaysParseExact : true,
  30022. longDateFormat: {
  30023. LT: 'H:mm',
  30024. LTS : 'H:mm:ss',
  30025. L: 'DD.MM.YYYY',
  30026. LL: 'D. MMMM YYYY',
  30027. LLL: 'D. MMMM YYYY H:mm',
  30028. LLLL: 'dddd, D. MMMM YYYY H:mm'
  30029. },
  30030. calendar: {
  30031. sameDay: '[danas u] LT',
  30032. nextDay: '[sutra u] LT',
  30033. nextWeek: function () {
  30034. switch (this.day()) {
  30035. case 0:
  30036. return '[u] [nedelju] [u] LT';
  30037. case 3:
  30038. return '[u] [sredu] [u] LT';
  30039. case 6:
  30040. return '[u] [subotu] [u] LT';
  30041. case 1:
  30042. case 2:
  30043. case 4:
  30044. case 5:
  30045. return '[u] dddd [u] LT';
  30046. }
  30047. },
  30048. lastDay : '[juče u] LT',
  30049. lastWeek : function () {
  30050. var lastWeekDays = [
  30051. '[prošle] [nedelje] [u] LT',
  30052. '[prošlog] [ponedeljka] [u] LT',
  30053. '[prošlog] [utorka] [u] LT',
  30054. '[prošle] [srede] [u] LT',
  30055. '[prošlog] [četvrtka] [u] LT',
  30056. '[prošlog] [petka] [u] LT',
  30057. '[prošle] [subote] [u] LT'
  30058. ];
  30059. return lastWeekDays[this.day()];
  30060. },
  30061. sameElse : 'L'
  30062. },
  30063. relativeTime : {
  30064. future : 'za %s',
  30065. past : 'pre %s',
  30066. s : 'nekoliko sekundi',
  30067. ss : translator.translate,
  30068. m : translator.translate,
  30069. mm : translator.translate,
  30070. h : translator.translate,
  30071. hh : translator.translate,
  30072. d : 'dan',
  30073. dd : translator.translate,
  30074. M : 'mesec',
  30075. MM : translator.translate,
  30076. y : 'godinu',
  30077. yy : translator.translate
  30078. },
  30079. dayOfMonthOrdinalParse: /\d{1,2}\./,
  30080. ordinal : '%d.',
  30081. week : {
  30082. dow : 1, // Monday is the first day of the week.
  30083. doy : 7 // The week that contains Jan 1st is the first week of the year.
  30084. }
  30085. });
  30086. return sr;
  30087. })));
  30088. /***/ }),
  30089. /* 304 */
  30090. /***/ (function(module, exports, __webpack_require__) {
  30091. //! moment.js locale configuration
  30092. //! locale : Serbian Cyrillic [sr-cyrl]
  30093. //! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
  30094. ;(function (global, factory) {
  30095. true ? factory(__webpack_require__(0)) :
  30096. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  30097. factory(global.moment)
  30098. }(this, (function (moment) { 'use strict';
  30099. var translator = {
  30100. words: { //Different grammatical cases
  30101. ss: ['секунда', 'секунде', 'секунди'],
  30102. m: ['један минут', 'једне минуте'],
  30103. mm: ['минут', 'минуте', 'минута'],
  30104. h: ['један сат', 'једног сата'],
  30105. hh: ['сат', 'сата', 'сати'],
  30106. dd: ['дан', 'дана', 'дана'],
  30107. MM: ['месец', 'месеца', 'месеци'],
  30108. yy: ['година', 'године', 'година']
  30109. },
  30110. correctGrammaticalCase: function (number, wordKey) {
  30111. return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
  30112. },
  30113. translate: function (number, withoutSuffix, key) {
  30114. var wordKey = translator.words[key];
  30115. if (key.length === 1) {
  30116. return withoutSuffix ? wordKey[0] : wordKey[1];
  30117. } else {
  30118. return number + ' ' + translator.correctGrammaticalCase(number, wordKey);
  30119. }
  30120. }
  30121. };
  30122. var srCyrl = moment.defineLocale('sr-cyrl', {
  30123. months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split('_'),
  30124. monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),
  30125. monthsParseExact: true,
  30126. weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
  30127. weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
  30128. weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
  30129. weekdaysParseExact : true,
  30130. longDateFormat: {
  30131. LT: 'H:mm',
  30132. LTS : 'H:mm:ss',
  30133. L: 'DD.MM.YYYY',
  30134. LL: 'D. MMMM YYYY',
  30135. LLL: 'D. MMMM YYYY H:mm',
  30136. LLLL: 'dddd, D. MMMM YYYY H:mm'
  30137. },
  30138. calendar: {
  30139. sameDay: '[данас у] LT',
  30140. nextDay: '[сутра у] LT',
  30141. nextWeek: function () {
  30142. switch (this.day()) {
  30143. case 0:
  30144. return '[у] [недељу] [у] LT';
  30145. case 3:
  30146. return '[у] [среду] [у] LT';
  30147. case 6:
  30148. return '[у] [суботу] [у] LT';
  30149. case 1:
  30150. case 2:
  30151. case 4:
  30152. case 5:
  30153. return '[у] dddd [у] LT';
  30154. }
  30155. },
  30156. lastDay : '[јуче у] LT',
  30157. lastWeek : function () {
  30158. var lastWeekDays = [
  30159. '[прошле] [недеље] [у] LT',
  30160. '[прошлог] [понедељка] [у] LT',
  30161. '[прошлог] [уторка] [у] LT',
  30162. '[прошле] [среде] [у] LT',
  30163. '[прошлог] [четвртка] [у] LT',
  30164. '[прошлог] [петка] [у] LT',
  30165. '[прошле] [суботе] [у] LT'
  30166. ];
  30167. return lastWeekDays[this.day()];
  30168. },
  30169. sameElse : 'L'
  30170. },
  30171. relativeTime : {
  30172. future : 'за %s',
  30173. past : 'пре %s',
  30174. s : 'неколико секунди',
  30175. ss : translator.translate,
  30176. m : translator.translate,
  30177. mm : translator.translate,
  30178. h : translator.translate,
  30179. hh : translator.translate,
  30180. d : 'дан',
  30181. dd : translator.translate,
  30182. M : 'месец',
  30183. MM : translator.translate,
  30184. y : 'годину',
  30185. yy : translator.translate
  30186. },
  30187. dayOfMonthOrdinalParse: /\d{1,2}\./,
  30188. ordinal : '%d.',
  30189. week : {
  30190. dow : 1, // Monday is the first day of the week.
  30191. doy : 7 // The week that contains Jan 1st is the first week of the year.
  30192. }
  30193. });
  30194. return srCyrl;
  30195. })));
  30196. /***/ }),
  30197. /* 305 */
  30198. /***/ (function(module, exports, __webpack_require__) {
  30199. //! moment.js locale configuration
  30200. //! locale : siSwati [ss]
  30201. //! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies
  30202. ;(function (global, factory) {
  30203. true ? factory(__webpack_require__(0)) :
  30204. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  30205. factory(global.moment)
  30206. }(this, (function (moment) { 'use strict';
  30207. var ss = moment.defineLocale('ss', {
  30208. months : "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split('_'),
  30209. monthsShort : 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
  30210. weekdays : 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split('_'),
  30211. weekdaysShort : 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
  30212. weekdaysMin : 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
  30213. weekdaysParseExact : true,
  30214. longDateFormat : {
  30215. LT : 'h:mm A',
  30216. LTS : 'h:mm:ss A',
  30217. L : 'DD/MM/YYYY',
  30218. LL : 'D MMMM YYYY',
  30219. LLL : 'D MMMM YYYY h:mm A',
  30220. LLLL : 'dddd, D MMMM YYYY h:mm A'
  30221. },
  30222. calendar : {
  30223. sameDay : '[Namuhla nga] LT',
  30224. nextDay : '[Kusasa nga] LT',
  30225. nextWeek : 'dddd [nga] LT',
  30226. lastDay : '[Itolo nga] LT',
  30227. lastWeek : 'dddd [leliphelile] [nga] LT',
  30228. sameElse : 'L'
  30229. },
  30230. relativeTime : {
  30231. future : 'nga %s',
  30232. past : 'wenteka nga %s',
  30233. s : 'emizuzwana lomcane',
  30234. ss : '%d mzuzwana',
  30235. m : 'umzuzu',
  30236. mm : '%d emizuzu',
  30237. h : 'lihora',
  30238. hh : '%d emahora',
  30239. d : 'lilanga',
  30240. dd : '%d emalanga',
  30241. M : 'inyanga',
  30242. MM : '%d tinyanga',
  30243. y : 'umnyaka',
  30244. yy : '%d iminyaka'
  30245. },
  30246. meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
  30247. meridiem : function (hours, minutes, isLower) {
  30248. if (hours < 11) {
  30249. return 'ekuseni';
  30250. } else if (hours < 15) {
  30251. return 'emini';
  30252. } else if (hours < 19) {
  30253. return 'entsambama';
  30254. } else {
  30255. return 'ebusuku';
  30256. }
  30257. },
  30258. meridiemHour : function (hour, meridiem) {
  30259. if (hour === 12) {
  30260. hour = 0;
  30261. }
  30262. if (meridiem === 'ekuseni') {
  30263. return hour;
  30264. } else if (meridiem === 'emini') {
  30265. return hour >= 11 ? hour : hour + 12;
  30266. } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
  30267. if (hour === 0) {
  30268. return 0;
  30269. }
  30270. return hour + 12;
  30271. }
  30272. },
  30273. dayOfMonthOrdinalParse: /\d{1,2}/,
  30274. ordinal : '%d',
  30275. week : {
  30276. dow : 1, // Monday is the first day of the week.
  30277. doy : 4 // The week that contains Jan 4th is the first week of the year.
  30278. }
  30279. });
  30280. return ss;
  30281. })));
  30282. /***/ }),
  30283. /* 306 */
  30284. /***/ (function(module, exports, __webpack_require__) {
  30285. //! moment.js locale configuration
  30286. //! locale : Swedish [sv]
  30287. //! author : Jens Alm : https://github.com/ulmus
  30288. ;(function (global, factory) {
  30289. true ? factory(__webpack_require__(0)) :
  30290. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  30291. factory(global.moment)
  30292. }(this, (function (moment) { 'use strict';
  30293. var sv = moment.defineLocale('sv', {
  30294. months : 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),
  30295. monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
  30296. weekdays : 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
  30297. weekdaysShort : 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
  30298. weekdaysMin : 'sö_må_ti_on_to_fr_lö'.split('_'),
  30299. longDateFormat : {
  30300. LT : 'HH:mm',
  30301. LTS : 'HH:mm:ss',
  30302. L : 'YYYY-MM-DD',
  30303. LL : 'D MMMM YYYY',
  30304. LLL : 'D MMMM YYYY [kl.] HH:mm',
  30305. LLLL : 'dddd D MMMM YYYY [kl.] HH:mm',
  30306. lll : 'D MMM YYYY HH:mm',
  30307. llll : 'ddd D MMM YYYY HH:mm'
  30308. },
  30309. calendar : {
  30310. sameDay: '[Idag] LT',
  30311. nextDay: '[Imorgon] LT',
  30312. lastDay: '[Igår] LT',
  30313. nextWeek: '[På] dddd LT',
  30314. lastWeek: '[I] dddd[s] LT',
  30315. sameElse: 'L'
  30316. },
  30317. relativeTime : {
  30318. future : 'om %s',
  30319. past : 'för %s sedan',
  30320. s : 'några sekunder',
  30321. ss : '%d sekunder',
  30322. m : 'en minut',
  30323. mm : '%d minuter',
  30324. h : 'en timme',
  30325. hh : '%d timmar',
  30326. d : 'en dag',
  30327. dd : '%d dagar',
  30328. M : 'en månad',
  30329. MM : '%d månader',
  30330. y : 'ett år',
  30331. yy : '%d år'
  30332. },
  30333. dayOfMonthOrdinalParse: /\d{1,2}(e|a)/,
  30334. ordinal : function (number) {
  30335. var b = number % 10,
  30336. output = (~~(number % 100 / 10) === 1) ? 'e' :
  30337. (b === 1) ? 'a' :
  30338. (b === 2) ? 'a' :
  30339. (b === 3) ? 'e' : 'e';
  30340. return number + output;
  30341. },
  30342. week : {
  30343. dow : 1, // Monday is the first day of the week.
  30344. doy : 4 // The week that contains Jan 4th is the first week of the year.
  30345. }
  30346. });
  30347. return sv;
  30348. })));
  30349. /***/ }),
  30350. /* 307 */
  30351. /***/ (function(module, exports, __webpack_require__) {
  30352. //! moment.js locale configuration
  30353. //! locale : Swahili [sw]
  30354. //! author : Fahad Kassim : https://github.com/fadsel
  30355. ;(function (global, factory) {
  30356. true ? factory(__webpack_require__(0)) :
  30357. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  30358. factory(global.moment)
  30359. }(this, (function (moment) { 'use strict';
  30360. var sw = moment.defineLocale('sw', {
  30361. months : 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'),
  30362. monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
  30363. weekdays : 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'),
  30364. weekdaysShort : 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
  30365. weekdaysMin : 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
  30366. weekdaysParseExact : true,
  30367. longDateFormat : {
  30368. LT : 'HH:mm',
  30369. LTS : 'HH:mm:ss',
  30370. L : 'DD.MM.YYYY',
  30371. LL : 'D MMMM YYYY',
  30372. LLL : 'D MMMM YYYY HH:mm',
  30373. LLLL : 'dddd, D MMMM YYYY HH:mm'
  30374. },
  30375. calendar : {
  30376. sameDay : '[leo saa] LT',
  30377. nextDay : '[kesho saa] LT',
  30378. nextWeek : '[wiki ijayo] dddd [saat] LT',
  30379. lastDay : '[jana] LT',
  30380. lastWeek : '[wiki iliyopita] dddd [saat] LT',
  30381. sameElse : 'L'
  30382. },
  30383. relativeTime : {
  30384. future : '%s baadaye',
  30385. past : 'tokea %s',
  30386. s : 'hivi punde',
  30387. ss : 'sekunde %d',
  30388. m : 'dakika moja',
  30389. mm : 'dakika %d',
  30390. h : 'saa limoja',
  30391. hh : 'masaa %d',
  30392. d : 'siku moja',
  30393. dd : 'masiku %d',
  30394. M : 'mwezi mmoja',
  30395. MM : 'miezi %d',
  30396. y : 'mwaka mmoja',
  30397. yy : 'miaka %d'
  30398. },
  30399. week : {
  30400. dow : 1, // Monday is the first day of the week.
  30401. doy : 7 // The week that contains Jan 1st is the first week of the year.
  30402. }
  30403. });
  30404. return sw;
  30405. })));
  30406. /***/ }),
  30407. /* 308 */
  30408. /***/ (function(module, exports, __webpack_require__) {
  30409. //! moment.js locale configuration
  30410. //! locale : Tamil [ta]
  30411. //! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404
  30412. ;(function (global, factory) {
  30413. true ? factory(__webpack_require__(0)) :
  30414. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  30415. factory(global.moment)
  30416. }(this, (function (moment) { 'use strict';
  30417. var symbolMap = {
  30418. '1': '௧',
  30419. '2': '௨',
  30420. '3': '௩',
  30421. '4': '௪',
  30422. '5': '௫',
  30423. '6': '௬',
  30424. '7': '௭',
  30425. '8': '௮',
  30426. '9': '௯',
  30427. '0': '௦'
  30428. };
  30429. var numberMap = {
  30430. '௧': '1',
  30431. '௨': '2',
  30432. '௩': '3',
  30433. '௪': '4',
  30434. '௫': '5',
  30435. '௬': '6',
  30436. '௭': '7',
  30437. '௮': '8',
  30438. '௯': '9',
  30439. '௦': '0'
  30440. };
  30441. var ta = moment.defineLocale('ta', {
  30442. months : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),
  30443. monthsShort : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),
  30444. weekdays : 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'),
  30445. weekdaysShort : 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'),
  30446. weekdaysMin : 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
  30447. longDateFormat : {
  30448. LT : 'HH:mm',
  30449. LTS : 'HH:mm:ss',
  30450. L : 'DD/MM/YYYY',
  30451. LL : 'D MMMM YYYY',
  30452. LLL : 'D MMMM YYYY, HH:mm',
  30453. LLLL : 'dddd, D MMMM YYYY, HH:mm'
  30454. },
  30455. calendar : {
  30456. sameDay : '[இன்று] LT',
  30457. nextDay : '[நாளை] LT',
  30458. nextWeek : 'dddd, LT',
  30459. lastDay : '[நேற்று] LT',
  30460. lastWeek : '[கடந்த வாரம்] dddd, LT',
  30461. sameElse : 'L'
  30462. },
  30463. relativeTime : {
  30464. future : '%s இல்',
  30465. past : '%s முன்',
  30466. s : 'ஒரு சில விநாடிகள்',
  30467. ss : '%d விநாடிகள்',
  30468. m : 'ஒரு நிமிடம்',
  30469. mm : '%d நிமிடங்கள்',
  30470. h : 'ஒரு மணி நேரம்',
  30471. hh : '%d மணி நேரம்',
  30472. d : 'ஒரு நாள்',
  30473. dd : '%d நாட்கள்',
  30474. M : 'ஒரு மாதம்',
  30475. MM : '%d மாதங்கள்',
  30476. y : 'ஒரு வருடம்',
  30477. yy : '%d ஆண்டுகள்'
  30478. },
  30479. dayOfMonthOrdinalParse: /\d{1,2}வது/,
  30480. ordinal : function (number) {
  30481. return number + 'வது';
  30482. },
  30483. preparse: function (string) {
  30484. return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
  30485. return numberMap[match];
  30486. });
  30487. },
  30488. postformat: function (string) {
  30489. return string.replace(/\d/g, function (match) {
  30490. return symbolMap[match];
  30491. });
  30492. },
  30493. // refer http://ta.wikipedia.org/s/1er1
  30494. meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
  30495. meridiem : function (hour, minute, isLower) {
  30496. if (hour < 2) {
  30497. return ' யாமம்';
  30498. } else if (hour < 6) {
  30499. return ' வைகறை'; // வைகறை
  30500. } else if (hour < 10) {
  30501. return ' காலை'; // காலை
  30502. } else if (hour < 14) {
  30503. return ' நண்பகல்'; // நண்பகல்
  30504. } else if (hour < 18) {
  30505. return ' எற்பாடு'; // எற்பாடு
  30506. } else if (hour < 22) {
  30507. return ' மாலை'; // மாலை
  30508. } else {
  30509. return ' யாமம்';
  30510. }
  30511. },
  30512. meridiemHour : function (hour, meridiem) {
  30513. if (hour === 12) {
  30514. hour = 0;
  30515. }
  30516. if (meridiem === 'யாமம்') {
  30517. return hour < 2 ? hour : hour + 12;
  30518. } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
  30519. return hour;
  30520. } else if (meridiem === 'நண்பகல்') {
  30521. return hour >= 10 ? hour : hour + 12;
  30522. } else {
  30523. return hour + 12;
  30524. }
  30525. },
  30526. week : {
  30527. dow : 0, // Sunday is the first day of the week.
  30528. doy : 6 // The week that contains Jan 1st is the first week of the year.
  30529. }
  30530. });
  30531. return ta;
  30532. })));
  30533. /***/ }),
  30534. /* 309 */
  30535. /***/ (function(module, exports, __webpack_require__) {
  30536. //! moment.js locale configuration
  30537. //! locale : Telugu [te]
  30538. //! author : Krishna Chaitanya Thota : https://github.com/kcthota
  30539. ;(function (global, factory) {
  30540. true ? factory(__webpack_require__(0)) :
  30541. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  30542. factory(global.moment)
  30543. }(this, (function (moment) { 'use strict';
  30544. var te = moment.defineLocale('te', {
  30545. months : 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జూలై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'),
  30546. monthsShort : 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జూలై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'),
  30547. monthsParseExact : true,
  30548. weekdays : 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'),
  30549. weekdaysShort : 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
  30550. weekdaysMin : 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
  30551. longDateFormat : {
  30552. LT : 'A h:mm',
  30553. LTS : 'A h:mm:ss',
  30554. L : 'DD/MM/YYYY',
  30555. LL : 'D MMMM YYYY',
  30556. LLL : 'D MMMM YYYY, A h:mm',
  30557. LLLL : 'dddd, D MMMM YYYY, A h:mm'
  30558. },
  30559. calendar : {
  30560. sameDay : '[నేడు] LT',
  30561. nextDay : '[రేపు] LT',
  30562. nextWeek : 'dddd, LT',
  30563. lastDay : '[నిన్న] LT',
  30564. lastWeek : '[గత] dddd, LT',
  30565. sameElse : 'L'
  30566. },
  30567. relativeTime : {
  30568. future : '%s లో',
  30569. past : '%s క్రితం',
  30570. s : 'కొన్ని క్షణాలు',
  30571. ss : '%d సెకన్లు',
  30572. m : 'ఒక నిమిషం',
  30573. mm : '%d నిమిషాలు',
  30574. h : 'ఒక గంట',
  30575. hh : '%d గంటలు',
  30576. d : 'ఒక రోజు',
  30577. dd : '%d రోజులు',
  30578. M : 'ఒక నెల',
  30579. MM : '%d నెలలు',
  30580. y : 'ఒక సంవత్సరం',
  30581. yy : '%d సంవత్సరాలు'
  30582. },
  30583. dayOfMonthOrdinalParse : /\d{1,2}వ/,
  30584. ordinal : '%dవ',
  30585. meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
  30586. meridiemHour : function (hour, meridiem) {
  30587. if (hour === 12) {
  30588. hour = 0;
  30589. }
  30590. if (meridiem === 'రాత్రి') {
  30591. return hour < 4 ? hour : hour + 12;
  30592. } else if (meridiem === 'ఉదయం') {
  30593. return hour;
  30594. } else if (meridiem === 'మధ్యాహ్నం') {
  30595. return hour >= 10 ? hour : hour + 12;
  30596. } else if (meridiem === 'సాయంత్రం') {
  30597. return hour + 12;
  30598. }
  30599. },
  30600. meridiem : function (hour, minute, isLower) {
  30601. if (hour < 4) {
  30602. return 'రాత్రి';
  30603. } else if (hour < 10) {
  30604. return 'ఉదయం';
  30605. } else if (hour < 17) {
  30606. return 'మధ్యాహ్నం';
  30607. } else if (hour < 20) {
  30608. return 'సాయంత్రం';
  30609. } else {
  30610. return 'రాత్రి';
  30611. }
  30612. },
  30613. week : {
  30614. dow : 0, // Sunday is the first day of the week.
  30615. doy : 6 // The week that contains Jan 1st is the first week of the year.
  30616. }
  30617. });
  30618. return te;
  30619. })));
  30620. /***/ }),
  30621. /* 310 */
  30622. /***/ (function(module, exports, __webpack_require__) {
  30623. //! moment.js locale configuration
  30624. //! locale : Tetun Dili (East Timor) [tet]
  30625. //! author : Joshua Brooks : https://github.com/joshbrooks
  30626. //! author : Onorio De J. Afonso : https://github.com/marobo
  30627. ;(function (global, factory) {
  30628. true ? factory(__webpack_require__(0)) :
  30629. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  30630. factory(global.moment)
  30631. }(this, (function (moment) { 'use strict';
  30632. var tet = moment.defineLocale('tet', {
  30633. months : 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juniu_Juliu_Augustu_Setembru_Outubru_Novembru_Dezembru'.split('_'),
  30634. monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Aug_Set_Out_Nov_Dez'.split('_'),
  30635. weekdays : 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sexta_Sabadu'.split('_'),
  30636. weekdaysShort : 'Dom_Seg_Ters_Kua_Kint_Sext_Sab'.split('_'),
  30637. weekdaysMin : 'Do_Seg_Te_Ku_Ki_Sex_Sa'.split('_'),
  30638. longDateFormat : {
  30639. LT : 'HH:mm',
  30640. LTS : 'HH:mm:ss',
  30641. L : 'DD/MM/YYYY',
  30642. LL : 'D MMMM YYYY',
  30643. LLL : 'D MMMM YYYY HH:mm',
  30644. LLLL : 'dddd, D MMMM YYYY HH:mm'
  30645. },
  30646. calendar : {
  30647. sameDay: '[Ohin iha] LT',
  30648. nextDay: '[Aban iha] LT',
  30649. nextWeek: 'dddd [iha] LT',
  30650. lastDay: '[Horiseik iha] LT',
  30651. lastWeek: 'dddd [semana kotuk] [iha] LT',
  30652. sameElse: 'L'
  30653. },
  30654. relativeTime : {
  30655. future : 'iha %s',
  30656. past : '%s liuba',
  30657. s : 'minutu balun',
  30658. ss : 'minutu %d',
  30659. m : 'minutu ida',
  30660. mm : 'minutus %d',
  30661. h : 'horas ida',
  30662. hh : 'horas %d',
  30663. d : 'loron ida',
  30664. dd : 'loron %d',
  30665. M : 'fulan ida',
  30666. MM : 'fulan %d',
  30667. y : 'tinan ida',
  30668. yy : 'tinan %d'
  30669. },
  30670. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  30671. ordinal : function (number) {
  30672. var b = number % 10,
  30673. output = (~~(number % 100 / 10) === 1) ? 'th' :
  30674. (b === 1) ? 'st' :
  30675. (b === 2) ? 'nd' :
  30676. (b === 3) ? 'rd' : 'th';
  30677. return number + output;
  30678. },
  30679. week : {
  30680. dow : 1, // Monday is the first day of the week.
  30681. doy : 4 // The week that contains Jan 4th is the first week of the year.
  30682. }
  30683. });
  30684. return tet;
  30685. })));
  30686. /***/ }),
  30687. /* 311 */
  30688. /***/ (function(module, exports, __webpack_require__) {
  30689. //! moment.js locale configuration
  30690. //! locale : Thai [th]
  30691. //! author : Kridsada Thanabulpong : https://github.com/sirn
  30692. ;(function (global, factory) {
  30693. true ? factory(__webpack_require__(0)) :
  30694. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  30695. factory(global.moment)
  30696. }(this, (function (moment) { 'use strict';
  30697. var th = moment.defineLocale('th', {
  30698. months : 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),
  30699. monthsShort : 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),
  30700. monthsParseExact: true,
  30701. weekdays : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
  30702. weekdaysShort : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
  30703. weekdaysMin : 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
  30704. weekdaysParseExact : true,
  30705. longDateFormat : {
  30706. LT : 'H:mm',
  30707. LTS : 'H:mm:ss',
  30708. L : 'DD/MM/YYYY',
  30709. LL : 'D MMMM YYYY',
  30710. LLL : 'D MMMM YYYY เวลา H:mm',
  30711. LLLL : 'วันddddที่ D MMMM YYYY เวลา H:mm'
  30712. },
  30713. meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
  30714. isPM: function (input) {
  30715. return input === 'หลังเที่ยง';
  30716. },
  30717. meridiem : function (hour, minute, isLower) {
  30718. if (hour < 12) {
  30719. return 'ก่อนเที่ยง';
  30720. } else {
  30721. return 'หลังเที่ยง';
  30722. }
  30723. },
  30724. calendar : {
  30725. sameDay : '[วันนี้ เวลา] LT',
  30726. nextDay : '[พรุ่งนี้ เวลา] LT',
  30727. nextWeek : 'dddd[หน้า เวลา] LT',
  30728. lastDay : '[เมื่อวานนี้ เวลา] LT',
  30729. lastWeek : '[วัน]dddd[ที่แล้ว เวลา] LT',
  30730. sameElse : 'L'
  30731. },
  30732. relativeTime : {
  30733. future : 'อีก %s',
  30734. past : '%sที่แล้ว',
  30735. s : 'ไม่กี่วินาที',
  30736. ss : '%d วินาที',
  30737. m : '1 นาที',
  30738. mm : '%d นาที',
  30739. h : '1 ชั่วโมง',
  30740. hh : '%d ชั่วโมง',
  30741. d : '1 วัน',
  30742. dd : '%d วัน',
  30743. M : '1 เดือน',
  30744. MM : '%d เดือน',
  30745. y : '1 ปี',
  30746. yy : '%d ปี'
  30747. }
  30748. });
  30749. return th;
  30750. })));
  30751. /***/ }),
  30752. /* 312 */
  30753. /***/ (function(module, exports, __webpack_require__) {
  30754. //! moment.js locale configuration
  30755. //! locale : Tagalog (Philippines) [tl-ph]
  30756. //! author : Dan Hagman : https://github.com/hagmandan
  30757. ;(function (global, factory) {
  30758. true ? factory(__webpack_require__(0)) :
  30759. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  30760. factory(global.moment)
  30761. }(this, (function (moment) { 'use strict';
  30762. var tlPh = moment.defineLocale('tl-ph', {
  30763. months : 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'),
  30764. monthsShort : 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
  30765. weekdays : 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'),
  30766. weekdaysShort : 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
  30767. weekdaysMin : 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
  30768. longDateFormat : {
  30769. LT : 'HH:mm',
  30770. LTS : 'HH:mm:ss',
  30771. L : 'MM/D/YYYY',
  30772. LL : 'MMMM D, YYYY',
  30773. LLL : 'MMMM D, YYYY HH:mm',
  30774. LLLL : 'dddd, MMMM DD, YYYY HH:mm'
  30775. },
  30776. calendar : {
  30777. sameDay: 'LT [ngayong araw]',
  30778. nextDay: '[Bukas ng] LT',
  30779. nextWeek: 'LT [sa susunod na] dddd',
  30780. lastDay: 'LT [kahapon]',
  30781. lastWeek: 'LT [noong nakaraang] dddd',
  30782. sameElse: 'L'
  30783. },
  30784. relativeTime : {
  30785. future : 'sa loob ng %s',
  30786. past : '%s ang nakalipas',
  30787. s : 'ilang segundo',
  30788. ss : '%d segundo',
  30789. m : 'isang minuto',
  30790. mm : '%d minuto',
  30791. h : 'isang oras',
  30792. hh : '%d oras',
  30793. d : 'isang araw',
  30794. dd : '%d araw',
  30795. M : 'isang buwan',
  30796. MM : '%d buwan',
  30797. y : 'isang taon',
  30798. yy : '%d taon'
  30799. },
  30800. dayOfMonthOrdinalParse: /\d{1,2}/,
  30801. ordinal : function (number) {
  30802. return number;
  30803. },
  30804. week : {
  30805. dow : 1, // Monday is the first day of the week.
  30806. doy : 4 // The week that contains Jan 4th is the first week of the year.
  30807. }
  30808. });
  30809. return tlPh;
  30810. })));
  30811. /***/ }),
  30812. /* 313 */
  30813. /***/ (function(module, exports, __webpack_require__) {
  30814. //! moment.js locale configuration
  30815. //! locale : Klingon [tlh]
  30816. //! author : Dominika Kruk : https://github.com/amaranthrose
  30817. ;(function (global, factory) {
  30818. true ? factory(__webpack_require__(0)) :
  30819. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  30820. factory(global.moment)
  30821. }(this, (function (moment) { 'use strict';
  30822. var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
  30823. function translateFuture(output) {
  30824. var time = output;
  30825. time = (output.indexOf('jaj') !== -1) ?
  30826. time.slice(0, -3) + 'leS' :
  30827. (output.indexOf('jar') !== -1) ?
  30828. time.slice(0, -3) + 'waQ' :
  30829. (output.indexOf('DIS') !== -1) ?
  30830. time.slice(0, -3) + 'nem' :
  30831. time + ' pIq';
  30832. return time;
  30833. }
  30834. function translatePast(output) {
  30835. var time = output;
  30836. time = (output.indexOf('jaj') !== -1) ?
  30837. time.slice(0, -3) + 'Hu’' :
  30838. (output.indexOf('jar') !== -1) ?
  30839. time.slice(0, -3) + 'wen' :
  30840. (output.indexOf('DIS') !== -1) ?
  30841. time.slice(0, -3) + 'ben' :
  30842. time + ' ret';
  30843. return time;
  30844. }
  30845. function translate(number, withoutSuffix, string, isFuture) {
  30846. var numberNoun = numberAsNoun(number);
  30847. switch (string) {
  30848. case 'ss':
  30849. return numberNoun + ' lup';
  30850. case 'mm':
  30851. return numberNoun + ' tup';
  30852. case 'hh':
  30853. return numberNoun + ' rep';
  30854. case 'dd':
  30855. return numberNoun + ' jaj';
  30856. case 'MM':
  30857. return numberNoun + ' jar';
  30858. case 'yy':
  30859. return numberNoun + ' DIS';
  30860. }
  30861. }
  30862. function numberAsNoun(number) {
  30863. var hundred = Math.floor((number % 1000) / 100),
  30864. ten = Math.floor((number % 100) / 10),
  30865. one = number % 10,
  30866. word = '';
  30867. if (hundred > 0) {
  30868. word += numbersNouns[hundred] + 'vatlh';
  30869. }
  30870. if (ten > 0) {
  30871. word += ((word !== '') ? ' ' : '') + numbersNouns[ten] + 'maH';
  30872. }
  30873. if (one > 0) {
  30874. word += ((word !== '') ? ' ' : '') + numbersNouns[one];
  30875. }
  30876. return (word === '') ? 'pagh' : word;
  30877. }
  30878. var tlh = moment.defineLocale('tlh', {
  30879. months : 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'),
  30880. monthsShort : 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'),
  30881. monthsParseExact : true,
  30882. weekdays : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
  30883. weekdaysShort : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
  30884. weekdaysMin : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
  30885. longDateFormat : {
  30886. LT : 'HH:mm',
  30887. LTS : 'HH:mm:ss',
  30888. L : 'DD.MM.YYYY',
  30889. LL : 'D MMMM YYYY',
  30890. LLL : 'D MMMM YYYY HH:mm',
  30891. LLLL : 'dddd, D MMMM YYYY HH:mm'
  30892. },
  30893. calendar : {
  30894. sameDay: '[DaHjaj] LT',
  30895. nextDay: '[wa’leS] LT',
  30896. nextWeek: 'LLL',
  30897. lastDay: '[wa’Hu’] LT',
  30898. lastWeek: 'LLL',
  30899. sameElse: 'L'
  30900. },
  30901. relativeTime : {
  30902. future : translateFuture,
  30903. past : translatePast,
  30904. s : 'puS lup',
  30905. ss : translate,
  30906. m : 'wa’ tup',
  30907. mm : translate,
  30908. h : 'wa’ rep',
  30909. hh : translate,
  30910. d : 'wa’ jaj',
  30911. dd : translate,
  30912. M : 'wa’ jar',
  30913. MM : translate,
  30914. y : 'wa’ DIS',
  30915. yy : translate
  30916. },
  30917. dayOfMonthOrdinalParse: /\d{1,2}\./,
  30918. ordinal : '%d.',
  30919. week : {
  30920. dow : 1, // Monday is the first day of the week.
  30921. doy : 4 // The week that contains Jan 4th is the first week of the year.
  30922. }
  30923. });
  30924. return tlh;
  30925. })));
  30926. /***/ }),
  30927. /* 314 */
  30928. /***/ (function(module, exports, __webpack_require__) {
  30929. //! moment.js locale configuration
  30930. //! locale : Turkish [tr]
  30931. //! authors : Erhan Gundogan : https://github.com/erhangundogan,
  30932. //! Burak Yiğit Kaya: https://github.com/BYK
  30933. ;(function (global, factory) {
  30934. true ? factory(__webpack_require__(0)) :
  30935. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  30936. factory(global.moment)
  30937. }(this, (function (moment) { 'use strict';
  30938. var suffixes = {
  30939. 1: '\'inci',
  30940. 5: '\'inci',
  30941. 8: '\'inci',
  30942. 70: '\'inci',
  30943. 80: '\'inci',
  30944. 2: '\'nci',
  30945. 7: '\'nci',
  30946. 20: '\'nci',
  30947. 50: '\'nci',
  30948. 3: '\'üncü',
  30949. 4: '\'üncü',
  30950. 100: '\'üncü',
  30951. 6: '\'ncı',
  30952. 9: '\'uncu',
  30953. 10: '\'uncu',
  30954. 30: '\'uncu',
  30955. 60: '\'ıncı',
  30956. 90: '\'ıncı'
  30957. };
  30958. var tr = moment.defineLocale('tr', {
  30959. months : 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),
  30960. monthsShort : 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
  30961. weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),
  30962. weekdaysShort : 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
  30963. weekdaysMin : 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
  30964. longDateFormat : {
  30965. LT : 'HH:mm',
  30966. LTS : 'HH:mm:ss',
  30967. L : 'DD.MM.YYYY',
  30968. LL : 'D MMMM YYYY',
  30969. LLL : 'D MMMM YYYY HH:mm',
  30970. LLLL : 'dddd, D MMMM YYYY HH:mm'
  30971. },
  30972. calendar : {
  30973. sameDay : '[bugün saat] LT',
  30974. nextDay : '[yarın saat] LT',
  30975. nextWeek : '[gelecek] dddd [saat] LT',
  30976. lastDay : '[dün] LT',
  30977. lastWeek : '[geçen] dddd [saat] LT',
  30978. sameElse : 'L'
  30979. },
  30980. relativeTime : {
  30981. future : '%s sonra',
  30982. past : '%s önce',
  30983. s : 'birkaç saniye',
  30984. ss : '%d saniye',
  30985. m : 'bir dakika',
  30986. mm : '%d dakika',
  30987. h : 'bir saat',
  30988. hh : '%d saat',
  30989. d : 'bir gün',
  30990. dd : '%d gün',
  30991. M : 'bir ay',
  30992. MM : '%d ay',
  30993. y : 'bir yıl',
  30994. yy : '%d yıl'
  30995. },
  30996. dayOfMonthOrdinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,
  30997. ordinal : function (number) {
  30998. if (number === 0) { // special case for zero
  30999. return number + '\'ıncı';
  31000. }
  31001. var a = number % 10,
  31002. b = number % 100 - a,
  31003. c = number >= 100 ? 100 : null;
  31004. return number + (suffixes[a] || suffixes[b] || suffixes[c]);
  31005. },
  31006. week : {
  31007. dow : 1, // Monday is the first day of the week.
  31008. doy : 7 // The week that contains Jan 1st is the first week of the year.
  31009. }
  31010. });
  31011. return tr;
  31012. })));
  31013. /***/ }),
  31014. /* 315 */
  31015. /***/ (function(module, exports, __webpack_require__) {
  31016. //! moment.js locale configuration
  31017. //! locale : Talossan [tzl]
  31018. //! author : Robin van der Vliet : https://github.com/robin0van0der0v
  31019. //! author : Iustì Canun
  31020. ;(function (global, factory) {
  31021. true ? factory(__webpack_require__(0)) :
  31022. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  31023. factory(global.moment)
  31024. }(this, (function (moment) { 'use strict';
  31025. // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.
  31026. // This is currently too difficult (maybe even impossible) to add.
  31027. var tzl = moment.defineLocale('tzl', {
  31028. months : 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'),
  31029. monthsShort : 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
  31030. weekdays : 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
  31031. weekdaysShort : 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
  31032. weekdaysMin : 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
  31033. longDateFormat : {
  31034. LT : 'HH.mm',
  31035. LTS : 'HH.mm.ss',
  31036. L : 'DD.MM.YYYY',
  31037. LL : 'D. MMMM [dallas] YYYY',
  31038. LLL : 'D. MMMM [dallas] YYYY HH.mm',
  31039. LLLL : 'dddd, [li] D. MMMM [dallas] YYYY HH.mm'
  31040. },
  31041. meridiemParse: /d\'o|d\'a/i,
  31042. isPM : function (input) {
  31043. return 'd\'o' === input.toLowerCase();
  31044. },
  31045. meridiem : function (hours, minutes, isLower) {
  31046. if (hours > 11) {
  31047. return isLower ? 'd\'o' : 'D\'O';
  31048. } else {
  31049. return isLower ? 'd\'a' : 'D\'A';
  31050. }
  31051. },
  31052. calendar : {
  31053. sameDay : '[oxhi à] LT',
  31054. nextDay : '[demà à] LT',
  31055. nextWeek : 'dddd [à] LT',
  31056. lastDay : '[ieiri à] LT',
  31057. lastWeek : '[sür el] dddd [lasteu à] LT',
  31058. sameElse : 'L'
  31059. },
  31060. relativeTime : {
  31061. future : 'osprei %s',
  31062. past : 'ja%s',
  31063. s : processRelativeTime,
  31064. ss : processRelativeTime,
  31065. m : processRelativeTime,
  31066. mm : processRelativeTime,
  31067. h : processRelativeTime,
  31068. hh : processRelativeTime,
  31069. d : processRelativeTime,
  31070. dd : processRelativeTime,
  31071. M : processRelativeTime,
  31072. MM : processRelativeTime,
  31073. y : processRelativeTime,
  31074. yy : processRelativeTime
  31075. },
  31076. dayOfMonthOrdinalParse: /\d{1,2}\./,
  31077. ordinal : '%d.',
  31078. week : {
  31079. dow : 1, // Monday is the first day of the week.
  31080. doy : 4 // The week that contains Jan 4th is the first week of the year.
  31081. }
  31082. });
  31083. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  31084. var format = {
  31085. 's': ['viensas secunds', '\'iensas secunds'],
  31086. 'ss': [number + ' secunds', '' + number + ' secunds'],
  31087. 'm': ['\'n míut', '\'iens míut'],
  31088. 'mm': [number + ' míuts', '' + number + ' míuts'],
  31089. 'h': ['\'n þora', '\'iensa þora'],
  31090. 'hh': [number + ' þoras', '' + number + ' þoras'],
  31091. 'd': ['\'n ziua', '\'iensa ziua'],
  31092. 'dd': [number + ' ziuas', '' + number + ' ziuas'],
  31093. 'M': ['\'n mes', '\'iens mes'],
  31094. 'MM': [number + ' mesen', '' + number + ' mesen'],
  31095. 'y': ['\'n ar', '\'iens ar'],
  31096. 'yy': [number + ' ars', '' + number + ' ars']
  31097. };
  31098. return isFuture ? format[key][0] : (withoutSuffix ? format[key][0] : format[key][1]);
  31099. }
  31100. return tzl;
  31101. })));
  31102. /***/ }),
  31103. /* 316 */
  31104. /***/ (function(module, exports, __webpack_require__) {
  31105. //! moment.js locale configuration
  31106. //! locale : Central Atlas Tamazight [tzm]
  31107. //! author : Abdel Said : https://github.com/abdelsaid
  31108. ;(function (global, factory) {
  31109. true ? factory(__webpack_require__(0)) :
  31110. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  31111. factory(global.moment)
  31112. }(this, (function (moment) { 'use strict';
  31113. var tzm = moment.defineLocale('tzm', {
  31114. months : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),
  31115. monthsShort : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),
  31116. weekdays : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
  31117. weekdaysShort : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
  31118. weekdaysMin : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
  31119. longDateFormat : {
  31120. LT : 'HH:mm',
  31121. LTS: 'HH:mm:ss',
  31122. L : 'DD/MM/YYYY',
  31123. LL : 'D MMMM YYYY',
  31124. LLL : 'D MMMM YYYY HH:mm',
  31125. LLLL : 'dddd D MMMM YYYY HH:mm'
  31126. },
  31127. calendar : {
  31128. sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
  31129. nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
  31130. nextWeek: 'dddd [ⴴ] LT',
  31131. lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
  31132. lastWeek: 'dddd [ⴴ] LT',
  31133. sameElse: 'L'
  31134. },
  31135. relativeTime : {
  31136. future : 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
  31137. past : 'ⵢⴰⵏ %s',
  31138. s : 'ⵉⵎⵉⴽ',
  31139. ss : '%d ⵉⵎⵉⴽ',
  31140. m : 'ⵎⵉⵏⵓⴺ',
  31141. mm : '%d ⵎⵉⵏⵓⴺ',
  31142. h : 'ⵙⴰⵄⴰ',
  31143. hh : '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
  31144. d : 'ⴰⵙⵙ',
  31145. dd : '%d oⵙⵙⴰⵏ',
  31146. M : 'ⴰⵢoⵓⵔ',
  31147. MM : '%d ⵉⵢⵢⵉⵔⵏ',
  31148. y : 'ⴰⵙⴳⴰⵙ',
  31149. yy : '%d ⵉⵙⴳⴰⵙⵏ'
  31150. },
  31151. week : {
  31152. dow : 6, // Saturday is the first day of the week.
  31153. doy : 12 // The week that contains Jan 1st is the first week of the year.
  31154. }
  31155. });
  31156. return tzm;
  31157. })));
  31158. /***/ }),
  31159. /* 317 */
  31160. /***/ (function(module, exports, __webpack_require__) {
  31161. //! moment.js locale configuration
  31162. //! locale : Central Atlas Tamazight Latin [tzm-latn]
  31163. //! author : Abdel Said : https://github.com/abdelsaid
  31164. ;(function (global, factory) {
  31165. true ? factory(__webpack_require__(0)) :
  31166. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  31167. factory(global.moment)
  31168. }(this, (function (moment) { 'use strict';
  31169. var tzmLatn = moment.defineLocale('tzm-latn', {
  31170. months : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),
  31171. monthsShort : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),
  31172. weekdays : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
  31173. weekdaysShort : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
  31174. weekdaysMin : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
  31175. longDateFormat : {
  31176. LT : 'HH:mm',
  31177. LTS : 'HH:mm:ss',
  31178. L : 'DD/MM/YYYY',
  31179. LL : 'D MMMM YYYY',
  31180. LLL : 'D MMMM YYYY HH:mm',
  31181. LLLL : 'dddd D MMMM YYYY HH:mm'
  31182. },
  31183. calendar : {
  31184. sameDay: '[asdkh g] LT',
  31185. nextDay: '[aska g] LT',
  31186. nextWeek: 'dddd [g] LT',
  31187. lastDay: '[assant g] LT',
  31188. lastWeek: 'dddd [g] LT',
  31189. sameElse: 'L'
  31190. },
  31191. relativeTime : {
  31192. future : 'dadkh s yan %s',
  31193. past : 'yan %s',
  31194. s : 'imik',
  31195. ss : '%d imik',
  31196. m : 'minuḍ',
  31197. mm : '%d minuḍ',
  31198. h : 'saɛa',
  31199. hh : '%d tassaɛin',
  31200. d : 'ass',
  31201. dd : '%d ossan',
  31202. M : 'ayowr',
  31203. MM : '%d iyyirn',
  31204. y : 'asgas',
  31205. yy : '%d isgasn'
  31206. },
  31207. week : {
  31208. dow : 6, // Saturday is the first day of the week.
  31209. doy : 12 // The week that contains Jan 1st is the first week of the year.
  31210. }
  31211. });
  31212. return tzmLatn;
  31213. })));
  31214. /***/ }),
  31215. /* 318 */
  31216. /***/ (function(module, exports, __webpack_require__) {
  31217. //! moment.js locale configuration
  31218. //! locale : Ukrainian [uk]
  31219. //! author : zemlanin : https://github.com/zemlanin
  31220. //! Author : Menelion Elensúle : https://github.com/Oire
  31221. ;(function (global, factory) {
  31222. true ? factory(__webpack_require__(0)) :
  31223. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  31224. factory(global.moment)
  31225. }(this, (function (moment) { 'use strict';
  31226. function plural(word, num) {
  31227. var forms = word.split('_');
  31228. return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
  31229. }
  31230. function relativeTimeWithPlural(number, withoutSuffix, key) {
  31231. var format = {
  31232. 'ss': withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',
  31233. 'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
  31234. 'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
  31235. 'dd': 'день_дні_днів',
  31236. 'MM': 'місяць_місяці_місяців',
  31237. 'yy': 'рік_роки_років'
  31238. };
  31239. if (key === 'm') {
  31240. return withoutSuffix ? 'хвилина' : 'хвилину';
  31241. }
  31242. else if (key === 'h') {
  31243. return withoutSuffix ? 'година' : 'годину';
  31244. }
  31245. else {
  31246. return number + ' ' + plural(format[key], +number);
  31247. }
  31248. }
  31249. function weekdaysCaseReplace(m, format) {
  31250. var weekdays = {
  31251. 'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
  31252. 'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),
  31253. 'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')
  31254. };
  31255. if (!m) {
  31256. return weekdays['nominative'];
  31257. }
  31258. var nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ?
  31259. 'accusative' :
  31260. ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ?
  31261. 'genitive' :
  31262. 'nominative');
  31263. return weekdays[nounCase][m.day()];
  31264. }
  31265. function processHoursFunction(str) {
  31266. return function () {
  31267. return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
  31268. };
  31269. }
  31270. var uk = moment.defineLocale('uk', {
  31271. months : {
  31272. 'format': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),
  31273. 'standalone': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_')
  31274. },
  31275. monthsShort : 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'),
  31276. weekdays : weekdaysCaseReplace,
  31277. weekdaysShort : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  31278. weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  31279. longDateFormat : {
  31280. LT : 'HH:mm',
  31281. LTS : 'HH:mm:ss',
  31282. L : 'DD.MM.YYYY',
  31283. LL : 'D MMMM YYYY р.',
  31284. LLL : 'D MMMM YYYY р., HH:mm',
  31285. LLLL : 'dddd, D MMMM YYYY р., HH:mm'
  31286. },
  31287. calendar : {
  31288. sameDay: processHoursFunction('[Сьогодні '),
  31289. nextDay: processHoursFunction('[Завтра '),
  31290. lastDay: processHoursFunction('[Вчора '),
  31291. nextWeek: processHoursFunction('[У] dddd ['),
  31292. lastWeek: function () {
  31293. switch (this.day()) {
  31294. case 0:
  31295. case 3:
  31296. case 5:
  31297. case 6:
  31298. return processHoursFunction('[Минулої] dddd [').call(this);
  31299. case 1:
  31300. case 2:
  31301. case 4:
  31302. return processHoursFunction('[Минулого] dddd [').call(this);
  31303. }
  31304. },
  31305. sameElse: 'L'
  31306. },
  31307. relativeTime : {
  31308. future : 'за %s',
  31309. past : '%s тому',
  31310. s : 'декілька секунд',
  31311. ss : relativeTimeWithPlural,
  31312. m : relativeTimeWithPlural,
  31313. mm : relativeTimeWithPlural,
  31314. h : 'годину',
  31315. hh : relativeTimeWithPlural,
  31316. d : 'день',
  31317. dd : relativeTimeWithPlural,
  31318. M : 'місяць',
  31319. MM : relativeTimeWithPlural,
  31320. y : 'рік',
  31321. yy : relativeTimeWithPlural
  31322. },
  31323. // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
  31324. meridiemParse: /ночі|ранку|дня|вечора/,
  31325. isPM: function (input) {
  31326. return /^(дня|вечора)$/.test(input);
  31327. },
  31328. meridiem : function (hour, minute, isLower) {
  31329. if (hour < 4) {
  31330. return 'ночі';
  31331. } else if (hour < 12) {
  31332. return 'ранку';
  31333. } else if (hour < 17) {
  31334. return 'дня';
  31335. } else {
  31336. return 'вечора';
  31337. }
  31338. },
  31339. dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
  31340. ordinal: function (number, period) {
  31341. switch (period) {
  31342. case 'M':
  31343. case 'd':
  31344. case 'DDD':
  31345. case 'w':
  31346. case 'W':
  31347. return number + '-й';
  31348. case 'D':
  31349. return number + '-го';
  31350. default:
  31351. return number;
  31352. }
  31353. },
  31354. week : {
  31355. dow : 1, // Monday is the first day of the week.
  31356. doy : 7 // The week that contains Jan 1st is the first week of the year.
  31357. }
  31358. });
  31359. return uk;
  31360. })));
  31361. /***/ }),
  31362. /* 319 */
  31363. /***/ (function(module, exports, __webpack_require__) {
  31364. //! moment.js locale configuration
  31365. //! locale : Urdu [ur]
  31366. //! author : Sawood Alam : https://github.com/ibnesayeed
  31367. //! author : Zack : https://github.com/ZackVision
  31368. ;(function (global, factory) {
  31369. true ? factory(__webpack_require__(0)) :
  31370. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  31371. factory(global.moment)
  31372. }(this, (function (moment) { 'use strict';
  31373. var months = [
  31374. 'جنوری',
  31375. 'فروری',
  31376. 'مارچ',
  31377. 'اپریل',
  31378. 'مئی',
  31379. 'جون',
  31380. 'جولائی',
  31381. 'اگست',
  31382. 'ستمبر',
  31383. 'اکتوبر',
  31384. 'نومبر',
  31385. 'دسمبر'
  31386. ];
  31387. var days = [
  31388. 'اتوار',
  31389. 'پیر',
  31390. 'منگل',
  31391. 'بدھ',
  31392. 'جمعرات',
  31393. 'جمعہ',
  31394. 'ہفتہ'
  31395. ];
  31396. var ur = moment.defineLocale('ur', {
  31397. months : months,
  31398. monthsShort : months,
  31399. weekdays : days,
  31400. weekdaysShort : days,
  31401. weekdaysMin : days,
  31402. longDateFormat : {
  31403. LT : 'HH:mm',
  31404. LTS : 'HH:mm:ss',
  31405. L : 'DD/MM/YYYY',
  31406. LL : 'D MMMM YYYY',
  31407. LLL : 'D MMMM YYYY HH:mm',
  31408. LLLL : 'dddd، D MMMM YYYY HH:mm'
  31409. },
  31410. meridiemParse: /صبح|شام/,
  31411. isPM : function (input) {
  31412. return 'شام' === input;
  31413. },
  31414. meridiem : function (hour, minute, isLower) {
  31415. if (hour < 12) {
  31416. return 'صبح';
  31417. }
  31418. return 'شام';
  31419. },
  31420. calendar : {
  31421. sameDay : '[آج بوقت] LT',
  31422. nextDay : '[کل بوقت] LT',
  31423. nextWeek : 'dddd [بوقت] LT',
  31424. lastDay : '[گذشتہ روز بوقت] LT',
  31425. lastWeek : '[گذشتہ] dddd [بوقت] LT',
  31426. sameElse : 'L'
  31427. },
  31428. relativeTime : {
  31429. future : '%s بعد',
  31430. past : '%s قبل',
  31431. s : 'چند سیکنڈ',
  31432. ss : '%d سیکنڈ',
  31433. m : 'ایک منٹ',
  31434. mm : '%d منٹ',
  31435. h : 'ایک گھنٹہ',
  31436. hh : '%d گھنٹے',
  31437. d : 'ایک دن',
  31438. dd : '%d دن',
  31439. M : 'ایک ماہ',
  31440. MM : '%d ماہ',
  31441. y : 'ایک سال',
  31442. yy : '%d سال'
  31443. },
  31444. preparse: function (string) {
  31445. return string.replace(/،/g, ',');
  31446. },
  31447. postformat: function (string) {
  31448. return string.replace(/,/g, '،');
  31449. },
  31450. week : {
  31451. dow : 1, // Monday is the first day of the week.
  31452. doy : 4 // The week that contains Jan 4th is the first week of the year.
  31453. }
  31454. });
  31455. return ur;
  31456. })));
  31457. /***/ }),
  31458. /* 320 */
  31459. /***/ (function(module, exports, __webpack_require__) {
  31460. //! moment.js locale configuration
  31461. //! locale : Uzbek [uz]
  31462. //! author : Sardor Muminov : https://github.com/muminoff
  31463. ;(function (global, factory) {
  31464. true ? factory(__webpack_require__(0)) :
  31465. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  31466. factory(global.moment)
  31467. }(this, (function (moment) { 'use strict';
  31468. var uz = moment.defineLocale('uz', {
  31469. months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'),
  31470. monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
  31471. weekdays : 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
  31472. weekdaysShort : 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
  31473. weekdaysMin : 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
  31474. longDateFormat : {
  31475. LT : 'HH:mm',
  31476. LTS : 'HH:mm:ss',
  31477. L : 'DD/MM/YYYY',
  31478. LL : 'D MMMM YYYY',
  31479. LLL : 'D MMMM YYYY HH:mm',
  31480. LLLL : 'D MMMM YYYY, dddd HH:mm'
  31481. },
  31482. calendar : {
  31483. sameDay : '[Бугун соат] LT [да]',
  31484. nextDay : '[Эртага] LT [да]',
  31485. nextWeek : 'dddd [куни соат] LT [да]',
  31486. lastDay : '[Кеча соат] LT [да]',
  31487. lastWeek : '[Утган] dddd [куни соат] LT [да]',
  31488. sameElse : 'L'
  31489. },
  31490. relativeTime : {
  31491. future : 'Якин %s ичида',
  31492. past : 'Бир неча %s олдин',
  31493. s : 'фурсат',
  31494. ss : '%d фурсат',
  31495. m : 'бир дакика',
  31496. mm : '%d дакика',
  31497. h : 'бир соат',
  31498. hh : '%d соат',
  31499. d : 'бир кун',
  31500. dd : '%d кун',
  31501. M : 'бир ой',
  31502. MM : '%d ой',
  31503. y : 'бир йил',
  31504. yy : '%d йил'
  31505. },
  31506. week : {
  31507. dow : 1, // Monday is the first day of the week.
  31508. doy : 7 // The week that contains Jan 4th is the first week of the year.
  31509. }
  31510. });
  31511. return uz;
  31512. })));
  31513. /***/ }),
  31514. /* 321 */
  31515. /***/ (function(module, exports, __webpack_require__) {
  31516. //! moment.js locale configuration
  31517. //! locale : Uzbek Latin [uz-latn]
  31518. //! author : Rasulbek Mirzayev : github.com/Rasulbeeek
  31519. ;(function (global, factory) {
  31520. true ? factory(__webpack_require__(0)) :
  31521. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  31522. factory(global.moment)
  31523. }(this, (function (moment) { 'use strict';
  31524. var uzLatn = moment.defineLocale('uz-latn', {
  31525. months : 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'),
  31526. monthsShort : 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
  31527. weekdays : 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'),
  31528. weekdaysShort : 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
  31529. weekdaysMin : 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
  31530. longDateFormat : {
  31531. LT : 'HH:mm',
  31532. LTS : 'HH:mm:ss',
  31533. L : 'DD/MM/YYYY',
  31534. LL : 'D MMMM YYYY',
  31535. LLL : 'D MMMM YYYY HH:mm',
  31536. LLLL : 'D MMMM YYYY, dddd HH:mm'
  31537. },
  31538. calendar : {
  31539. sameDay : '[Bugun soat] LT [da]',
  31540. nextDay : '[Ertaga] LT [da]',
  31541. nextWeek : 'dddd [kuni soat] LT [da]',
  31542. lastDay : '[Kecha soat] LT [da]',
  31543. lastWeek : '[O\'tgan] dddd [kuni soat] LT [da]',
  31544. sameElse : 'L'
  31545. },
  31546. relativeTime : {
  31547. future : 'Yaqin %s ichida',
  31548. past : 'Bir necha %s oldin',
  31549. s : 'soniya',
  31550. ss : '%d soniya',
  31551. m : 'bir daqiqa',
  31552. mm : '%d daqiqa',
  31553. h : 'bir soat',
  31554. hh : '%d soat',
  31555. d : 'bir kun',
  31556. dd : '%d kun',
  31557. M : 'bir oy',
  31558. MM : '%d oy',
  31559. y : 'bir yil',
  31560. yy : '%d yil'
  31561. },
  31562. week : {
  31563. dow : 1, // Monday is the first day of the week.
  31564. doy : 7 // The week that contains Jan 1st is the first week of the year.
  31565. }
  31566. });
  31567. return uzLatn;
  31568. })));
  31569. /***/ }),
  31570. /* 322 */
  31571. /***/ (function(module, exports, __webpack_require__) {
  31572. //! moment.js locale configuration
  31573. //! locale : Vietnamese [vi]
  31574. //! author : Bang Nguyen : https://github.com/bangnk
  31575. ;(function (global, factory) {
  31576. true ? factory(__webpack_require__(0)) :
  31577. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  31578. factory(global.moment)
  31579. }(this, (function (moment) { 'use strict';
  31580. var vi = moment.defineLocale('vi', {
  31581. months : 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'),
  31582. monthsShort : 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),
  31583. monthsParseExact : true,
  31584. weekdays : 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),
  31585. weekdaysShort : 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
  31586. weekdaysMin : 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
  31587. weekdaysParseExact : true,
  31588. meridiemParse: /sa|ch/i,
  31589. isPM : function (input) {
  31590. return /^ch$/i.test(input);
  31591. },
  31592. meridiem : function (hours, minutes, isLower) {
  31593. if (hours < 12) {
  31594. return isLower ? 'sa' : 'SA';
  31595. } else {
  31596. return isLower ? 'ch' : 'CH';
  31597. }
  31598. },
  31599. longDateFormat : {
  31600. LT : 'HH:mm',
  31601. LTS : 'HH:mm:ss',
  31602. L : 'DD/MM/YYYY',
  31603. LL : 'D MMMM [năm] YYYY',
  31604. LLL : 'D MMMM [năm] YYYY HH:mm',
  31605. LLLL : 'dddd, D MMMM [năm] YYYY HH:mm',
  31606. l : 'DD/M/YYYY',
  31607. ll : 'D MMM YYYY',
  31608. lll : 'D MMM YYYY HH:mm',
  31609. llll : 'ddd, D MMM YYYY HH:mm'
  31610. },
  31611. calendar : {
  31612. sameDay: '[Hôm nay lúc] LT',
  31613. nextDay: '[Ngày mai lúc] LT',
  31614. nextWeek: 'dddd [tuần tới lúc] LT',
  31615. lastDay: '[Hôm qua lúc] LT',
  31616. lastWeek: 'dddd [tuần rồi lúc] LT',
  31617. sameElse: 'L'
  31618. },
  31619. relativeTime : {
  31620. future : '%s tới',
  31621. past : '%s trước',
  31622. s : 'vài giây',
  31623. ss : '%d giây' ,
  31624. m : 'một phút',
  31625. mm : '%d phút',
  31626. h : 'một giờ',
  31627. hh : '%d giờ',
  31628. d : 'một ngày',
  31629. dd : '%d ngày',
  31630. M : 'một tháng',
  31631. MM : '%d tháng',
  31632. y : 'một năm',
  31633. yy : '%d năm'
  31634. },
  31635. dayOfMonthOrdinalParse: /\d{1,2}/,
  31636. ordinal : function (number) {
  31637. return number;
  31638. },
  31639. week : {
  31640. dow : 1, // Monday is the first day of the week.
  31641. doy : 4 // The week that contains Jan 4th is the first week of the year.
  31642. }
  31643. });
  31644. return vi;
  31645. })));
  31646. /***/ }),
  31647. /* 323 */
  31648. /***/ (function(module, exports, __webpack_require__) {
  31649. //! moment.js locale configuration
  31650. //! locale : Pseudo [x-pseudo]
  31651. //! author : Andrew Hood : https://github.com/andrewhood125
  31652. ;(function (global, factory) {
  31653. true ? factory(__webpack_require__(0)) :
  31654. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  31655. factory(global.moment)
  31656. }(this, (function (moment) { 'use strict';
  31657. var xPseudo = moment.defineLocale('x-pseudo', {
  31658. months : 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'),
  31659. monthsShort : 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split('_'),
  31660. monthsParseExact : true,
  31661. weekdays : 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'),
  31662. weekdaysShort : 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),
  31663. weekdaysMin : 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),
  31664. weekdaysParseExact : true,
  31665. longDateFormat : {
  31666. LT : 'HH:mm',
  31667. L : 'DD/MM/YYYY',
  31668. LL : 'D MMMM YYYY',
  31669. LLL : 'D MMMM YYYY HH:mm',
  31670. LLLL : 'dddd, D MMMM YYYY HH:mm'
  31671. },
  31672. calendar : {
  31673. sameDay : '[T~ódá~ý át] LT',
  31674. nextDay : '[T~ómó~rró~w át] LT',
  31675. nextWeek : 'dddd [át] LT',
  31676. lastDay : '[Ý~ést~érdá~ý át] LT',
  31677. lastWeek : '[L~ást] dddd [át] LT',
  31678. sameElse : 'L'
  31679. },
  31680. relativeTime : {
  31681. future : 'í~ñ %s',
  31682. past : '%s á~gó',
  31683. s : 'á ~féw ~sécó~ñds',
  31684. ss : '%d s~écóñ~ds',
  31685. m : 'á ~míñ~úté',
  31686. mm : '%d m~íñú~tés',
  31687. h : 'á~ñ hó~úr',
  31688. hh : '%d h~óúrs',
  31689. d : 'á ~dáý',
  31690. dd : '%d d~áýs',
  31691. M : 'á ~móñ~th',
  31692. MM : '%d m~óñt~hs',
  31693. y : 'á ~ýéár',
  31694. yy : '%d ý~éárs'
  31695. },
  31696. dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  31697. ordinal : function (number) {
  31698. var b = number % 10,
  31699. output = (~~(number % 100 / 10) === 1) ? 'th' :
  31700. (b === 1) ? 'st' :
  31701. (b === 2) ? 'nd' :
  31702. (b === 3) ? 'rd' : 'th';
  31703. return number + output;
  31704. },
  31705. week : {
  31706. dow : 1, // Monday is the first day of the week.
  31707. doy : 4 // The week that contains Jan 4th is the first week of the year.
  31708. }
  31709. });
  31710. return xPseudo;
  31711. })));
  31712. /***/ }),
  31713. /* 324 */
  31714. /***/ (function(module, exports, __webpack_require__) {
  31715. //! moment.js locale configuration
  31716. //! locale : Yoruba Nigeria [yo]
  31717. //! author : Atolagbe Abisoye : https://github.com/andela-batolagbe
  31718. ;(function (global, factory) {
  31719. true ? factory(__webpack_require__(0)) :
  31720. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  31721. factory(global.moment)
  31722. }(this, (function (moment) { 'use strict';
  31723. var yo = moment.defineLocale('yo', {
  31724. months : 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'),
  31725. monthsShort : 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),
  31726. weekdays : 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),
  31727. weekdaysShort : 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),
  31728. weekdaysMin : 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),
  31729. longDateFormat : {
  31730. LT : 'h:mm A',
  31731. LTS : 'h:mm:ss A',
  31732. L : 'DD/MM/YYYY',
  31733. LL : 'D MMMM YYYY',
  31734. LLL : 'D MMMM YYYY h:mm A',
  31735. LLLL : 'dddd, D MMMM YYYY h:mm A'
  31736. },
  31737. calendar : {
  31738. sameDay : '[Ònì ni] LT',
  31739. nextDay : '[Ọ̀la ni] LT',
  31740. nextWeek : 'dddd [Ọsẹ̀ tón\'bọ] [ni] LT',
  31741. lastDay : '[Àna ni] LT',
  31742. lastWeek : 'dddd [Ọsẹ̀ tólọ́] [ni] LT',
  31743. sameElse : 'L'
  31744. },
  31745. relativeTime : {
  31746. future : 'ní %s',
  31747. past : '%s kọjá',
  31748. s : 'ìsẹjú aayá die',
  31749. ss :'aayá %d',
  31750. m : 'ìsẹjú kan',
  31751. mm : 'ìsẹjú %d',
  31752. h : 'wákati kan',
  31753. hh : 'wákati %d',
  31754. d : 'ọjọ́ kan',
  31755. dd : 'ọjọ́ %d',
  31756. M : 'osù kan',
  31757. MM : 'osù %d',
  31758. y : 'ọdún kan',
  31759. yy : 'ọdún %d'
  31760. },
  31761. dayOfMonthOrdinalParse : /ọjọ́\s\d{1,2}/,
  31762. ordinal : 'ọjọ́ %d',
  31763. week : {
  31764. dow : 1, // Monday is the first day of the week.
  31765. doy : 4 // The week that contains Jan 4th is the first week of the year.
  31766. }
  31767. });
  31768. return yo;
  31769. })));
  31770. /***/ }),
  31771. /* 325 */
  31772. /***/ (function(module, exports, __webpack_require__) {
  31773. //! moment.js locale configuration
  31774. //! locale : Chinese (China) [zh-cn]
  31775. //! author : suupic : https://github.com/suupic
  31776. //! author : Zeno Zeng : https://github.com/zenozeng
  31777. ;(function (global, factory) {
  31778. true ? factory(__webpack_require__(0)) :
  31779. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  31780. factory(global.moment)
  31781. }(this, (function (moment) { 'use strict';
  31782. var zhCn = moment.defineLocale('zh-cn', {
  31783. months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
  31784. monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  31785. weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  31786. weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'),
  31787. weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
  31788. longDateFormat : {
  31789. LT : 'HH:mm',
  31790. LTS : 'HH:mm:ss',
  31791. L : 'YYYY/MM/DD',
  31792. LL : 'YYYY年M月D日',
  31793. LLL : 'YYYY年M月D日Ah点mm分',
  31794. LLLL : 'YYYY年M月D日ddddAh点mm分',
  31795. l : 'YYYY/M/D',
  31796. ll : 'YYYY年M月D日',
  31797. lll : 'YYYY年M月D日 HH:mm',
  31798. llll : 'YYYY年M月D日dddd HH:mm'
  31799. },
  31800. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  31801. meridiemHour: function (hour, meridiem) {
  31802. if (hour === 12) {
  31803. hour = 0;
  31804. }
  31805. if (meridiem === '凌晨' || meridiem === '早上' ||
  31806. meridiem === '上午') {
  31807. return hour;
  31808. } else if (meridiem === '下午' || meridiem === '晚上') {
  31809. return hour + 12;
  31810. } else {
  31811. // '中午'
  31812. return hour >= 11 ? hour : hour + 12;
  31813. }
  31814. },
  31815. meridiem : function (hour, minute, isLower) {
  31816. var hm = hour * 100 + minute;
  31817. if (hm < 600) {
  31818. return '凌晨';
  31819. } else if (hm < 900) {
  31820. return '早上';
  31821. } else if (hm < 1130) {
  31822. return '上午';
  31823. } else if (hm < 1230) {
  31824. return '中午';
  31825. } else if (hm < 1800) {
  31826. return '下午';
  31827. } else {
  31828. return '晚上';
  31829. }
  31830. },
  31831. calendar : {
  31832. sameDay : '[今天]LT',
  31833. nextDay : '[明天]LT',
  31834. nextWeek : '[下]ddddLT',
  31835. lastDay : '[昨天]LT',
  31836. lastWeek : '[上]ddddLT',
  31837. sameElse : 'L'
  31838. },
  31839. dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
  31840. ordinal : function (number, period) {
  31841. switch (period) {
  31842. case 'd':
  31843. case 'D':
  31844. case 'DDD':
  31845. return number + '日';
  31846. case 'M':
  31847. return number + '月';
  31848. case 'w':
  31849. case 'W':
  31850. return number + '周';
  31851. default:
  31852. return number;
  31853. }
  31854. },
  31855. relativeTime : {
  31856. future : '%s内',
  31857. past : '%s前',
  31858. s : '几秒',
  31859. ss : '%d 秒',
  31860. m : '1 分钟',
  31861. mm : '%d 分钟',
  31862. h : '1 小时',
  31863. hh : '%d 小时',
  31864. d : '1 天',
  31865. dd : '%d 天',
  31866. M : '1 个月',
  31867. MM : '%d 个月',
  31868. y : '1 年',
  31869. yy : '%d 年'
  31870. },
  31871. week : {
  31872. // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
  31873. dow : 1, // Monday is the first day of the week.
  31874. doy : 4 // The week that contains Jan 4th is the first week of the year.
  31875. }
  31876. });
  31877. return zhCn;
  31878. })));
  31879. /***/ }),
  31880. /* 326 */
  31881. /***/ (function(module, exports, __webpack_require__) {
  31882. //! moment.js locale configuration
  31883. //! locale : Chinese (Hong Kong) [zh-hk]
  31884. //! author : Ben : https://github.com/ben-lin
  31885. //! author : Chris Lam : https://github.com/hehachris
  31886. //! author : Konstantin : https://github.com/skfd
  31887. ;(function (global, factory) {
  31888. true ? factory(__webpack_require__(0)) :
  31889. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  31890. factory(global.moment)
  31891. }(this, (function (moment) { 'use strict';
  31892. var zhHk = moment.defineLocale('zh-hk', {
  31893. months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
  31894. monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  31895. weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  31896. weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),
  31897. weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
  31898. longDateFormat : {
  31899. LT : 'HH:mm',
  31900. LTS : 'HH:mm:ss',
  31901. L : 'YYYY/MM/DD',
  31902. LL : 'YYYY年M月D日',
  31903. LLL : 'YYYY年M月D日 HH:mm',
  31904. LLLL : 'YYYY年M月D日dddd HH:mm',
  31905. l : 'YYYY/M/D',
  31906. ll : 'YYYY年M月D日',
  31907. lll : 'YYYY年M月D日 HH:mm',
  31908. llll : 'YYYY年M月D日dddd HH:mm'
  31909. },
  31910. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  31911. meridiemHour : function (hour, meridiem) {
  31912. if (hour === 12) {
  31913. hour = 0;
  31914. }
  31915. if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
  31916. return hour;
  31917. } else if (meridiem === '中午') {
  31918. return hour >= 11 ? hour : hour + 12;
  31919. } else if (meridiem === '下午' || meridiem === '晚上') {
  31920. return hour + 12;
  31921. }
  31922. },
  31923. meridiem : function (hour, minute, isLower) {
  31924. var hm = hour * 100 + minute;
  31925. if (hm < 600) {
  31926. return '凌晨';
  31927. } else if (hm < 900) {
  31928. return '早上';
  31929. } else if (hm < 1130) {
  31930. return '上午';
  31931. } else if (hm < 1230) {
  31932. return '中午';
  31933. } else if (hm < 1800) {
  31934. return '下午';
  31935. } else {
  31936. return '晚上';
  31937. }
  31938. },
  31939. calendar : {
  31940. sameDay : '[今天]LT',
  31941. nextDay : '[明天]LT',
  31942. nextWeek : '[下]ddddLT',
  31943. lastDay : '[昨天]LT',
  31944. lastWeek : '[上]ddddLT',
  31945. sameElse : 'L'
  31946. },
  31947. dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
  31948. ordinal : function (number, period) {
  31949. switch (period) {
  31950. case 'd' :
  31951. case 'D' :
  31952. case 'DDD' :
  31953. return number + '日';
  31954. case 'M' :
  31955. return number + '月';
  31956. case 'w' :
  31957. case 'W' :
  31958. return number + '週';
  31959. default :
  31960. return number;
  31961. }
  31962. },
  31963. relativeTime : {
  31964. future : '%s內',
  31965. past : '%s前',
  31966. s : '幾秒',
  31967. ss : '%d 秒',
  31968. m : '1 分鐘',
  31969. mm : '%d 分鐘',
  31970. h : '1 小時',
  31971. hh : '%d 小時',
  31972. d : '1 天',
  31973. dd : '%d 天',
  31974. M : '1 個月',
  31975. MM : '%d 個月',
  31976. y : '1 年',
  31977. yy : '%d 年'
  31978. }
  31979. });
  31980. return zhHk;
  31981. })));
  31982. /***/ }),
  31983. /* 327 */
  31984. /***/ (function(module, exports, __webpack_require__) {
  31985. //! moment.js locale configuration
  31986. //! locale : Chinese (Taiwan) [zh-tw]
  31987. //! author : Ben : https://github.com/ben-lin
  31988. //! author : Chris Lam : https://github.com/hehachris
  31989. ;(function (global, factory) {
  31990. true ? factory(__webpack_require__(0)) :
  31991. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  31992. factory(global.moment)
  31993. }(this, (function (moment) { 'use strict';
  31994. var zhTw = moment.defineLocale('zh-tw', {
  31995. months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
  31996. monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  31997. weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  31998. weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),
  31999. weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
  32000. longDateFormat : {
  32001. LT : 'HH:mm',
  32002. LTS : 'HH:mm:ss',
  32003. L : 'YYYY/MM/DD',
  32004. LL : 'YYYY年M月D日',
  32005. LLL : 'YYYY年M月D日 HH:mm',
  32006. LLLL : 'YYYY年M月D日dddd HH:mm',
  32007. l : 'YYYY/M/D',
  32008. ll : 'YYYY年M月D日',
  32009. lll : 'YYYY年M月D日 HH:mm',
  32010. llll : 'YYYY年M月D日dddd HH:mm'
  32011. },
  32012. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  32013. meridiemHour : function (hour, meridiem) {
  32014. if (hour === 12) {
  32015. hour = 0;
  32016. }
  32017. if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
  32018. return hour;
  32019. } else if (meridiem === '中午') {
  32020. return hour >= 11 ? hour : hour + 12;
  32021. } else if (meridiem === '下午' || meridiem === '晚上') {
  32022. return hour + 12;
  32023. }
  32024. },
  32025. meridiem : function (hour, minute, isLower) {
  32026. var hm = hour * 100 + minute;
  32027. if (hm < 600) {
  32028. return '凌晨';
  32029. } else if (hm < 900) {
  32030. return '早上';
  32031. } else if (hm < 1130) {
  32032. return '上午';
  32033. } else if (hm < 1230) {
  32034. return '中午';
  32035. } else if (hm < 1800) {
  32036. return '下午';
  32037. } else {
  32038. return '晚上';
  32039. }
  32040. },
  32041. calendar : {
  32042. sameDay : '[今天]LT',
  32043. nextDay : '[明天]LT',
  32044. nextWeek : '[下]ddddLT',
  32045. lastDay : '[昨天]LT',
  32046. lastWeek : '[上]ddddLT',
  32047. sameElse : 'L'
  32048. },
  32049. dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
  32050. ordinal : function (number, period) {
  32051. switch (period) {
  32052. case 'd' :
  32053. case 'D' :
  32054. case 'DDD' :
  32055. return number + '日';
  32056. case 'M' :
  32057. return number + '月';
  32058. case 'w' :
  32059. case 'W' :
  32060. return number + '週';
  32061. default :
  32062. return number;
  32063. }
  32064. },
  32065. relativeTime : {
  32066. future : '%s內',
  32067. past : '%s前',
  32068. s : '幾秒',
  32069. ss : '%d 秒',
  32070. m : '1 分鐘',
  32071. mm : '%d 分鐘',
  32072. h : '1 小時',
  32073. hh : '%d 小時',
  32074. d : '1 天',
  32075. dd : '%d 天',
  32076. M : '1 個月',
  32077. MM : '%d 個月',
  32078. y : '1 年',
  32079. yy : '%d 年'
  32080. }
  32081. });
  32082. return zhTw;
  32083. })));
  32084. /***/ }),
  32085. /* 328 */
  32086. /***/ (function(module, exports, __webpack_require__) {
  32087. /* MIT license */
  32088. var cssKeywords = __webpack_require__(483);
  32089. // NOTE: conversions should only return primitive values (i.e. arrays, or
  32090. // values that give correct `typeof` results).
  32091. // do not use box values types (i.e. Number(), String(), etc.)
  32092. var reverseKeywords = {};
  32093. for (var key in cssKeywords) {
  32094. if (cssKeywords.hasOwnProperty(key)) {
  32095. reverseKeywords[cssKeywords[key]] = key;
  32096. }
  32097. }
  32098. var convert = module.exports = {
  32099. rgb: {channels: 3, labels: 'rgb'},
  32100. hsl: {channels: 3, labels: 'hsl'},
  32101. hsv: {channels: 3, labels: 'hsv'},
  32102. hwb: {channels: 3, labels: 'hwb'},
  32103. cmyk: {channels: 4, labels: 'cmyk'},
  32104. xyz: {channels: 3, labels: 'xyz'},
  32105. lab: {channels: 3, labels: 'lab'},
  32106. lch: {channels: 3, labels: 'lch'},
  32107. hex: {channels: 1, labels: ['hex']},
  32108. keyword: {channels: 1, labels: ['keyword']},
  32109. ansi16: {channels: 1, labels: ['ansi16']},
  32110. ansi256: {channels: 1, labels: ['ansi256']},
  32111. hcg: {channels: 3, labels: ['h', 'c', 'g']},
  32112. apple: {channels: 3, labels: ['r16', 'g16', 'b16']},
  32113. gray: {channels: 1, labels: ['gray']}
  32114. };
  32115. // hide .channels and .labels properties
  32116. for (var model in convert) {
  32117. if (convert.hasOwnProperty(model)) {
  32118. if (!('channels' in convert[model])) {
  32119. throw new Error('missing channels property: ' + model);
  32120. }
  32121. if (!('labels' in convert[model])) {
  32122. throw new Error('missing channel labels property: ' + model);
  32123. }
  32124. if (convert[model].labels.length !== convert[model].channels) {
  32125. throw new Error('channel and label counts mismatch: ' + model);
  32126. }
  32127. var channels = convert[model].channels;
  32128. var labels = convert[model].labels;
  32129. delete convert[model].channels;
  32130. delete convert[model].labels;
  32131. Object.defineProperty(convert[model], 'channels', {value: channels});
  32132. Object.defineProperty(convert[model], 'labels', {value: labels});
  32133. }
  32134. }
  32135. convert.rgb.hsl = function (rgb) {
  32136. var r = rgb[0] / 255;
  32137. var g = rgb[1] / 255;
  32138. var b = rgb[2] / 255;
  32139. var min = Math.min(r, g, b);
  32140. var max = Math.max(r, g, b);
  32141. var delta = max - min;
  32142. var h;
  32143. var s;
  32144. var l;
  32145. if (max === min) {
  32146. h = 0;
  32147. } else if (r === max) {
  32148. h = (g - b) / delta;
  32149. } else if (g === max) {
  32150. h = 2 + (b - r) / delta;
  32151. } else if (b === max) {
  32152. h = 4 + (r - g) / delta;
  32153. }
  32154. h = Math.min(h * 60, 360);
  32155. if (h < 0) {
  32156. h += 360;
  32157. }
  32158. l = (min + max) / 2;
  32159. if (max === min) {
  32160. s = 0;
  32161. } else if (l <= 0.5) {
  32162. s = delta / (max + min);
  32163. } else {
  32164. s = delta / (2 - max - min);
  32165. }
  32166. return [h, s * 100, l * 100];
  32167. };
  32168. convert.rgb.hsv = function (rgb) {
  32169. var r = rgb[0];
  32170. var g = rgb[1];
  32171. var b = rgb[2];
  32172. var min = Math.min(r, g, b);
  32173. var max = Math.max(r, g, b);
  32174. var delta = max - min;
  32175. var h;
  32176. var s;
  32177. var v;
  32178. if (max === 0) {
  32179. s = 0;
  32180. } else {
  32181. s = (delta / max * 1000) / 10;
  32182. }
  32183. if (max === min) {
  32184. h = 0;
  32185. } else if (r === max) {
  32186. h = (g - b) / delta;
  32187. } else if (g === max) {
  32188. h = 2 + (b - r) / delta;
  32189. } else if (b === max) {
  32190. h = 4 + (r - g) / delta;
  32191. }
  32192. h = Math.min(h * 60, 360);
  32193. if (h < 0) {
  32194. h += 360;
  32195. }
  32196. v = ((max / 255) * 1000) / 10;
  32197. return [h, s, v];
  32198. };
  32199. convert.rgb.hwb = function (rgb) {
  32200. var r = rgb[0];
  32201. var g = rgb[1];
  32202. var b = rgb[2];
  32203. var h = convert.rgb.hsl(rgb)[0];
  32204. var w = 1 / 255 * Math.min(r, Math.min(g, b));
  32205. b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
  32206. return [h, w * 100, b * 100];
  32207. };
  32208. convert.rgb.cmyk = function (rgb) {
  32209. var r = rgb[0] / 255;
  32210. var g = rgb[1] / 255;
  32211. var b = rgb[2] / 255;
  32212. var c;
  32213. var m;
  32214. var y;
  32215. var k;
  32216. k = Math.min(1 - r, 1 - g, 1 - b);
  32217. c = (1 - r - k) / (1 - k) || 0;
  32218. m = (1 - g - k) / (1 - k) || 0;
  32219. y = (1 - b - k) / (1 - k) || 0;
  32220. return [c * 100, m * 100, y * 100, k * 100];
  32221. };
  32222. /**
  32223. * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
  32224. * */
  32225. function comparativeDistance(x, y) {
  32226. return (
  32227. Math.pow(x[0] - y[0], 2) +
  32228. Math.pow(x[1] - y[1], 2) +
  32229. Math.pow(x[2] - y[2], 2)
  32230. );
  32231. }
  32232. convert.rgb.keyword = function (rgb) {
  32233. var reversed = reverseKeywords[rgb];
  32234. if (reversed) {
  32235. return reversed;
  32236. }
  32237. var currentClosestDistance = Infinity;
  32238. var currentClosestKeyword;
  32239. for (var keyword in cssKeywords) {
  32240. if (cssKeywords.hasOwnProperty(keyword)) {
  32241. var value = cssKeywords[keyword];
  32242. // Compute comparative distance
  32243. var distance = comparativeDistance(rgb, value);
  32244. // Check if its less, if so set as closest
  32245. if (distance < currentClosestDistance) {
  32246. currentClosestDistance = distance;
  32247. currentClosestKeyword = keyword;
  32248. }
  32249. }
  32250. }
  32251. return currentClosestKeyword;
  32252. };
  32253. convert.keyword.rgb = function (keyword) {
  32254. return cssKeywords[keyword];
  32255. };
  32256. convert.rgb.xyz = function (rgb) {
  32257. var r = rgb[0] / 255;
  32258. var g = rgb[1] / 255;
  32259. var b = rgb[2] / 255;
  32260. // assume sRGB
  32261. r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);
  32262. g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);
  32263. b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);
  32264. var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
  32265. var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
  32266. var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);
  32267. return [x * 100, y * 100, z * 100];
  32268. };
  32269. convert.rgb.lab = function (rgb) {
  32270. var xyz = convert.rgb.xyz(rgb);
  32271. var x = xyz[0];
  32272. var y = xyz[1];
  32273. var z = xyz[2];
  32274. var l;
  32275. var a;
  32276. var b;
  32277. x /= 95.047;
  32278. y /= 100;
  32279. z /= 108.883;
  32280. x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);
  32281. y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);
  32282. z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);
  32283. l = (116 * y) - 16;
  32284. a = 500 * (x - y);
  32285. b = 200 * (y - z);
  32286. return [l, a, b];
  32287. };
  32288. convert.hsl.rgb = function (hsl) {
  32289. var h = hsl[0] / 360;
  32290. var s = hsl[1] / 100;
  32291. var l = hsl[2] / 100;
  32292. var t1;
  32293. var t2;
  32294. var t3;
  32295. var rgb;
  32296. var val;
  32297. if (s === 0) {
  32298. val = l * 255;
  32299. return [val, val, val];
  32300. }
  32301. if (l < 0.5) {
  32302. t2 = l * (1 + s);
  32303. } else {
  32304. t2 = l + s - l * s;
  32305. }
  32306. t1 = 2 * l - t2;
  32307. rgb = [0, 0, 0];
  32308. for (var i = 0; i < 3; i++) {
  32309. t3 = h + 1 / 3 * -(i - 1);
  32310. if (t3 < 0) {
  32311. t3++;
  32312. }
  32313. if (t3 > 1) {
  32314. t3--;
  32315. }
  32316. if (6 * t3 < 1) {
  32317. val = t1 + (t2 - t1) * 6 * t3;
  32318. } else if (2 * t3 < 1) {
  32319. val = t2;
  32320. } else if (3 * t3 < 2) {
  32321. val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
  32322. } else {
  32323. val = t1;
  32324. }
  32325. rgb[i] = val * 255;
  32326. }
  32327. return rgb;
  32328. };
  32329. convert.hsl.hsv = function (hsl) {
  32330. var h = hsl[0];
  32331. var s = hsl[1] / 100;
  32332. var l = hsl[2] / 100;
  32333. var smin = s;
  32334. var lmin = Math.max(l, 0.01);
  32335. var sv;
  32336. var v;
  32337. l *= 2;
  32338. s *= (l <= 1) ? l : 2 - l;
  32339. smin *= lmin <= 1 ? lmin : 2 - lmin;
  32340. v = (l + s) / 2;
  32341. sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);
  32342. return [h, sv * 100, v * 100];
  32343. };
  32344. convert.hsv.rgb = function (hsv) {
  32345. var h = hsv[0] / 60;
  32346. var s = hsv[1] / 100;
  32347. var v = hsv[2] / 100;
  32348. var hi = Math.floor(h) % 6;
  32349. var f = h - Math.floor(h);
  32350. var p = 255 * v * (1 - s);
  32351. var q = 255 * v * (1 - (s * f));
  32352. var t = 255 * v * (1 - (s * (1 - f)));
  32353. v *= 255;
  32354. switch (hi) {
  32355. case 0:
  32356. return [v, t, p];
  32357. case 1:
  32358. return [q, v, p];
  32359. case 2:
  32360. return [p, v, t];
  32361. case 3:
  32362. return [p, q, v];
  32363. case 4:
  32364. return [t, p, v];
  32365. case 5:
  32366. return [v, p, q];
  32367. }
  32368. };
  32369. convert.hsv.hsl = function (hsv) {
  32370. var h = hsv[0];
  32371. var s = hsv[1] / 100;
  32372. var v = hsv[2] / 100;
  32373. var vmin = Math.max(v, 0.01);
  32374. var lmin;
  32375. var sl;
  32376. var l;
  32377. l = (2 - s) * v;
  32378. lmin = (2 - s) * vmin;
  32379. sl = s * vmin;
  32380. sl /= (lmin <= 1) ? lmin : 2 - lmin;
  32381. sl = sl || 0;
  32382. l /= 2;
  32383. return [h, sl * 100, l * 100];
  32384. };
  32385. // http://dev.w3.org/csswg/css-color/#hwb-to-rgb
  32386. convert.hwb.rgb = function (hwb) {
  32387. var h = hwb[0] / 360;
  32388. var wh = hwb[1] / 100;
  32389. var bl = hwb[2] / 100;
  32390. var ratio = wh + bl;
  32391. var i;
  32392. var v;
  32393. var f;
  32394. var n;
  32395. // wh + bl cant be > 1
  32396. if (ratio > 1) {
  32397. wh /= ratio;
  32398. bl /= ratio;
  32399. }
  32400. i = Math.floor(6 * h);
  32401. v = 1 - bl;
  32402. f = 6 * h - i;
  32403. if ((i & 0x01) !== 0) {
  32404. f = 1 - f;
  32405. }
  32406. n = wh + f * (v - wh); // linear interpolation
  32407. var r;
  32408. var g;
  32409. var b;
  32410. switch (i) {
  32411. default:
  32412. case 6:
  32413. case 0: r = v; g = n; b = wh; break;
  32414. case 1: r = n; g = v; b = wh; break;
  32415. case 2: r = wh; g = v; b = n; break;
  32416. case 3: r = wh; g = n; b = v; break;
  32417. case 4: r = n; g = wh; b = v; break;
  32418. case 5: r = v; g = wh; b = n; break;
  32419. }
  32420. return [r * 255, g * 255, b * 255];
  32421. };
  32422. convert.cmyk.rgb = function (cmyk) {
  32423. var c = cmyk[0] / 100;
  32424. var m = cmyk[1] / 100;
  32425. var y = cmyk[2] / 100;
  32426. var k = cmyk[3] / 100;
  32427. var r;
  32428. var g;
  32429. var b;
  32430. r = 1 - Math.min(1, c * (1 - k) + k);
  32431. g = 1 - Math.min(1, m * (1 - k) + k);
  32432. b = 1 - Math.min(1, y * (1 - k) + k);
  32433. return [r * 255, g * 255, b * 255];
  32434. };
  32435. convert.xyz.rgb = function (xyz) {
  32436. var x = xyz[0] / 100;
  32437. var y = xyz[1] / 100;
  32438. var z = xyz[2] / 100;
  32439. var r;
  32440. var g;
  32441. var b;
  32442. r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
  32443. g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
  32444. b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);
  32445. // assume sRGB
  32446. r = r > 0.0031308
  32447. ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)
  32448. : r * 12.92;
  32449. g = g > 0.0031308
  32450. ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)
  32451. : g * 12.92;
  32452. b = b > 0.0031308
  32453. ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)
  32454. : b * 12.92;
  32455. r = Math.min(Math.max(0, r), 1);
  32456. g = Math.min(Math.max(0, g), 1);
  32457. b = Math.min(Math.max(0, b), 1);
  32458. return [r * 255, g * 255, b * 255];
  32459. };
  32460. convert.xyz.lab = function (xyz) {
  32461. var x = xyz[0];
  32462. var y = xyz[1];
  32463. var z = xyz[2];
  32464. var l;
  32465. var a;
  32466. var b;
  32467. x /= 95.047;
  32468. y /= 100;
  32469. z /= 108.883;
  32470. x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);
  32471. y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);
  32472. z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);
  32473. l = (116 * y) - 16;
  32474. a = 500 * (x - y);
  32475. b = 200 * (y - z);
  32476. return [l, a, b];
  32477. };
  32478. convert.lab.xyz = function (lab) {
  32479. var l = lab[0];
  32480. var a = lab[1];
  32481. var b = lab[2];
  32482. var x;
  32483. var y;
  32484. var z;
  32485. y = (l + 16) / 116;
  32486. x = a / 500 + y;
  32487. z = y - b / 200;
  32488. var y2 = Math.pow(y, 3);
  32489. var x2 = Math.pow(x, 3);
  32490. var z2 = Math.pow(z, 3);
  32491. y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
  32492. x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
  32493. z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
  32494. x *= 95.047;
  32495. y *= 100;
  32496. z *= 108.883;
  32497. return [x, y, z];
  32498. };
  32499. convert.lab.lch = function (lab) {
  32500. var l = lab[0];
  32501. var a = lab[1];
  32502. var b = lab[2];
  32503. var hr;
  32504. var h;
  32505. var c;
  32506. hr = Math.atan2(b, a);
  32507. h = hr * 360 / 2 / Math.PI;
  32508. if (h < 0) {
  32509. h += 360;
  32510. }
  32511. c = Math.sqrt(a * a + b * b);
  32512. return [l, c, h];
  32513. };
  32514. convert.lch.lab = function (lch) {
  32515. var l = lch[0];
  32516. var c = lch[1];
  32517. var h = lch[2];
  32518. var a;
  32519. var b;
  32520. var hr;
  32521. hr = h / 360 * 2 * Math.PI;
  32522. a = c * Math.cos(hr);
  32523. b = c * Math.sin(hr);
  32524. return [l, a, b];
  32525. };
  32526. convert.rgb.ansi16 = function (args) {
  32527. var r = args[0];
  32528. var g = args[1];
  32529. var b = args[2];
  32530. var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization
  32531. value = Math.round(value / 50);
  32532. if (value === 0) {
  32533. return 30;
  32534. }
  32535. var ansi = 30
  32536. + ((Math.round(b / 255) << 2)
  32537. | (Math.round(g / 255) << 1)
  32538. | Math.round(r / 255));
  32539. if (value === 2) {
  32540. ansi += 60;
  32541. }
  32542. return ansi;
  32543. };
  32544. convert.hsv.ansi16 = function (args) {
  32545. // optimization here; we already know the value and don't need to get
  32546. // it converted for us.
  32547. return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
  32548. };
  32549. convert.rgb.ansi256 = function (args) {
  32550. var r = args[0];
  32551. var g = args[1];
  32552. var b = args[2];
  32553. // we use the extended greyscale palette here, with the exception of
  32554. // black and white. normal palette only has 4 greyscale shades.
  32555. if (r === g && g === b) {
  32556. if (r < 8) {
  32557. return 16;
  32558. }
  32559. if (r > 248) {
  32560. return 231;
  32561. }
  32562. return Math.round(((r - 8) / 247) * 24) + 232;
  32563. }
  32564. var ansi = 16
  32565. + (36 * Math.round(r / 255 * 5))
  32566. + (6 * Math.round(g / 255 * 5))
  32567. + Math.round(b / 255 * 5);
  32568. return ansi;
  32569. };
  32570. convert.ansi16.rgb = function (args) {
  32571. var color = args % 10;
  32572. // handle greyscale
  32573. if (color === 0 || color === 7) {
  32574. if (args > 50) {
  32575. color += 3.5;
  32576. }
  32577. color = color / 10.5 * 255;
  32578. return [color, color, color];
  32579. }
  32580. var mult = (~~(args > 50) + 1) * 0.5;
  32581. var r = ((color & 1) * mult) * 255;
  32582. var g = (((color >> 1) & 1) * mult) * 255;
  32583. var b = (((color >> 2) & 1) * mult) * 255;
  32584. return [r, g, b];
  32585. };
  32586. convert.ansi256.rgb = function (args) {
  32587. // handle greyscale
  32588. if (args >= 232) {
  32589. var c = (args - 232) * 10 + 8;
  32590. return [c, c, c];
  32591. }
  32592. args -= 16;
  32593. var rem;
  32594. var r = Math.floor(args / 36) / 5 * 255;
  32595. var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
  32596. var b = (rem % 6) / 5 * 255;
  32597. return [r, g, b];
  32598. };
  32599. convert.rgb.hex = function (args) {
  32600. var integer = ((Math.round(args[0]) & 0xFF) << 16)
  32601. + ((Math.round(args[1]) & 0xFF) << 8)
  32602. + (Math.round(args[2]) & 0xFF);
  32603. var string = integer.toString(16).toUpperCase();
  32604. return '000000'.substring(string.length) + string;
  32605. };
  32606. convert.hex.rgb = function (args) {
  32607. var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
  32608. if (!match) {
  32609. return [0, 0, 0];
  32610. }
  32611. var colorString = match[0];
  32612. if (match[0].length === 3) {
  32613. colorString = colorString.split('').map(function (char) {
  32614. return char + char;
  32615. }).join('');
  32616. }
  32617. var integer = parseInt(colorString, 16);
  32618. var r = (integer >> 16) & 0xFF;
  32619. var g = (integer >> 8) & 0xFF;
  32620. var b = integer & 0xFF;
  32621. return [r, g, b];
  32622. };
  32623. convert.rgb.hcg = function (rgb) {
  32624. var r = rgb[0] / 255;
  32625. var g = rgb[1] / 255;
  32626. var b = rgb[2] / 255;
  32627. var max = Math.max(Math.max(r, g), b);
  32628. var min = Math.min(Math.min(r, g), b);
  32629. var chroma = (max - min);
  32630. var grayscale;
  32631. var hue;
  32632. if (chroma < 1) {
  32633. grayscale = min / (1 - chroma);
  32634. } else {
  32635. grayscale = 0;
  32636. }
  32637. if (chroma <= 0) {
  32638. hue = 0;
  32639. } else
  32640. if (max === r) {
  32641. hue = ((g - b) / chroma) % 6;
  32642. } else
  32643. if (max === g) {
  32644. hue = 2 + (b - r) / chroma;
  32645. } else {
  32646. hue = 4 + (r - g) / chroma + 4;
  32647. }
  32648. hue /= 6;
  32649. hue %= 1;
  32650. return [hue * 360, chroma * 100, grayscale * 100];
  32651. };
  32652. convert.hsl.hcg = function (hsl) {
  32653. var s = hsl[1] / 100;
  32654. var l = hsl[2] / 100;
  32655. var c = 1;
  32656. var f = 0;
  32657. if (l < 0.5) {
  32658. c = 2.0 * s * l;
  32659. } else {
  32660. c = 2.0 * s * (1.0 - l);
  32661. }
  32662. if (c < 1.0) {
  32663. f = (l - 0.5 * c) / (1.0 - c);
  32664. }
  32665. return [hsl[0], c * 100, f * 100];
  32666. };
  32667. convert.hsv.hcg = function (hsv) {
  32668. var s = hsv[1] / 100;
  32669. var v = hsv[2] / 100;
  32670. var c = s * v;
  32671. var f = 0;
  32672. if (c < 1.0) {
  32673. f = (v - c) / (1 - c);
  32674. }
  32675. return [hsv[0], c * 100, f * 100];
  32676. };
  32677. convert.hcg.rgb = function (hcg) {
  32678. var h = hcg[0] / 360;
  32679. var c = hcg[1] / 100;
  32680. var g = hcg[2] / 100;
  32681. if (c === 0.0) {
  32682. return [g * 255, g * 255, g * 255];
  32683. }
  32684. var pure = [0, 0, 0];
  32685. var hi = (h % 1) * 6;
  32686. var v = hi % 1;
  32687. var w = 1 - v;
  32688. var mg = 0;
  32689. switch (Math.floor(hi)) {
  32690. case 0:
  32691. pure[0] = 1; pure[1] = v; pure[2] = 0; break;
  32692. case 1:
  32693. pure[0] = w; pure[1] = 1; pure[2] = 0; break;
  32694. case 2:
  32695. pure[0] = 0; pure[1] = 1; pure[2] = v; break;
  32696. case 3:
  32697. pure[0] = 0; pure[1] = w; pure[2] = 1; break;
  32698. case 4:
  32699. pure[0] = v; pure[1] = 0; pure[2] = 1; break;
  32700. default:
  32701. pure[0] = 1; pure[1] = 0; pure[2] = w;
  32702. }
  32703. mg = (1.0 - c) * g;
  32704. return [
  32705. (c * pure[0] + mg) * 255,
  32706. (c * pure[1] + mg) * 255,
  32707. (c * pure[2] + mg) * 255
  32708. ];
  32709. };
  32710. convert.hcg.hsv = function (hcg) {
  32711. var c = hcg[1] / 100;
  32712. var g = hcg[2] / 100;
  32713. var v = c + g * (1.0 - c);
  32714. var f = 0;
  32715. if (v > 0.0) {
  32716. f = c / v;
  32717. }
  32718. return [hcg[0], f * 100, v * 100];
  32719. };
  32720. convert.hcg.hsl = function (hcg) {
  32721. var c = hcg[1] / 100;
  32722. var g = hcg[2] / 100;
  32723. var l = g * (1.0 - c) + 0.5 * c;
  32724. var s = 0;
  32725. if (l > 0.0 && l < 0.5) {
  32726. s = c / (2 * l);
  32727. } else
  32728. if (l >= 0.5 && l < 1.0) {
  32729. s = c / (2 * (1 - l));
  32730. }
  32731. return [hcg[0], s * 100, l * 100];
  32732. };
  32733. convert.hcg.hwb = function (hcg) {
  32734. var c = hcg[1] / 100;
  32735. var g = hcg[2] / 100;
  32736. var v = c + g * (1.0 - c);
  32737. return [hcg[0], (v - c) * 100, (1 - v) * 100];
  32738. };
  32739. convert.hwb.hcg = function (hwb) {
  32740. var w = hwb[1] / 100;
  32741. var b = hwb[2] / 100;
  32742. var v = 1 - b;
  32743. var c = v - w;
  32744. var g = 0;
  32745. if (c < 1) {
  32746. g = (v - c) / (1 - c);
  32747. }
  32748. return [hwb[0], c * 100, g * 100];
  32749. };
  32750. convert.apple.rgb = function (apple) {
  32751. return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];
  32752. };
  32753. convert.rgb.apple = function (rgb) {
  32754. return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];
  32755. };
  32756. convert.gray.rgb = function (args) {
  32757. return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
  32758. };
  32759. convert.gray.hsl = convert.gray.hsv = function (args) {
  32760. return [0, 0, args[0]];
  32761. };
  32762. convert.gray.hwb = function (gray) {
  32763. return [0, 100, gray[0]];
  32764. };
  32765. convert.gray.cmyk = function (gray) {
  32766. return [0, 0, 0, gray[0]];
  32767. };
  32768. convert.gray.lab = function (gray) {
  32769. return [gray[0], 0, 0];
  32770. };
  32771. convert.gray.hex = function (gray) {
  32772. var val = Math.round(gray[0] / 100 * 255) & 0xFF;
  32773. var integer = (val << 16) + (val << 8) + val;
  32774. var string = integer.toString(16).toUpperCase();
  32775. return '000000'.substring(string.length) + string;
  32776. };
  32777. convert.rgb.gray = function (rgb) {
  32778. var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
  32779. return [val / 255 * 100];
  32780. };
  32781. /***/ }),
  32782. /* 329 */
  32783. /***/ (function(module, exports) {
  32784. module.exports = require("os");
  32785. /***/ }),
  32786. /* 330 */
  32787. /***/ (function(module, exports) {
  32788. const Secret = function (data) {
  32789. Object.assign(this, data)
  32790. return this
  32791. }
  32792. Secret.prototype.toString = function () {
  32793. throw new Error('Cannot convert Secret to string')
  32794. }
  32795. module.exports = Secret
  32796. /***/ }),
  32797. /* 331 */
  32798. /***/ (function(module, exports, __webpack_require__) {
  32799. /**
  32800. * This is a function which returns an instance of
  32801. * [request-promise](https://www.npmjs.com/package/request-promise) initialized with
  32802. * defaults often used in connector development.
  32803. *
  32804. * ```js
  32805. * // Showing defaults
  32806. * req = request({
  32807. * cheerio: false,
  32808. * jar: true,
  32809. * json: true
  32810. * })
  32811. * ```
  32812. *
  32813. * - `cheerio` will parse automatically the `response.body` in a cheerio instance
  32814. *
  32815. * ```js
  32816. * req = request({ cheerio: true })
  32817. * req('http://github.com', $ => {
  32818. * const repos = $('#repo_listing .repo')
  32819. * })
  32820. * ```
  32821. *
  32822. * - `jar` is passed to `request` options. Remembers cookies for future use.
  32823. * - `json` will parse the `response.body` as JSON
  32824. *
  32825. * @module request
  32826. */
  32827. let request = __webpack_require__(489)
  32828. const requestdebug = __webpack_require__(636)
  32829. let singleton = null
  32830. let requestClass = null
  32831. module.exports = function (options = {}) {
  32832. if (singleton) return singleton
  32833. if (request.Request) requestClass = request.Request
  32834. const defaultOptions = {
  32835. debug: false,
  32836. json: true,
  32837. cheerio: false,
  32838. strictSSL: false,
  32839. headers: {},
  32840. followAllRedirects: true
  32841. }
  32842. options = Object.assign(defaultOptions, options)
  32843. if (options.cheerio === true && !options.json) options.json = false
  32844. if (options.debug) {
  32845. // This avoids an error message comming from request-debug
  32846. // see https://github.com/request/request-debug/blob/0.2.0/index.js#L15
  32847. if (!request.Request) request.Request = requestClass
  32848. requestdebug(request)
  32849. }
  32850. const requestOptions = {}
  32851. requestOptions.json = options.json
  32852. requestOptions.jar = options.jar
  32853. requestOptions.headers = options.headers
  32854. requestOptions.followAllRedirects = options.followAllRedirects
  32855. requestOptions.strictSSL = options.strictSSL
  32856. if (options.cheerio) {
  32857. // a lot of web service do not want to be called by robots and then check the user agent to
  32858. // be sure they are called by a browser. This user agent works most of the time.
  32859. options.userAgent = true
  32860. requestOptions.transform = function (body, response, resolveWithFullResponse) {
  32861. let result = __webpack_require__(638).load(body)
  32862. if (resolveWithFullResponse === true) {
  32863. response.body = result
  32864. result = response
  32865. }
  32866. return result
  32867. }
  32868. } else {
  32869. requestOptions.transform = function (body, response, resolveWithFullResponse) {
  32870. let result = body
  32871. if (resolveWithFullResponse === true) {
  32872. result = response
  32873. }
  32874. return result
  32875. }
  32876. }
  32877. if (options.userAgent === true) {
  32878. requestOptions.headers['User-Agent'] = 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:36.0) ' +
  32879. 'Gecko/20100101 Firefox/36.0'
  32880. }
  32881. request = request.defaults(requestOptions)
  32882. return request
  32883. }
  32884. /***/ }),
  32885. /* 332 */
  32886. /***/ (function(module, exports, __webpack_require__) {
  32887. "use strict";
  32888. module.exports = function(NEXT_FILTER) {
  32889. var util = __webpack_require__(4);
  32890. var getKeys = __webpack_require__(59).keys;
  32891. var tryCatch = util.tryCatch;
  32892. var errorObj = util.errorObj;
  32893. function catchFilter(instances, cb, promise) {
  32894. return function(e) {
  32895. var boundTo = promise._boundValue();
  32896. predicateLoop: for (var i = 0; i < instances.length; ++i) {
  32897. var item = instances[i];
  32898. if (item === Error ||
  32899. (item != null && item.prototype instanceof Error)) {
  32900. if (e instanceof item) {
  32901. return tryCatch(cb).call(boundTo, e);
  32902. }
  32903. } else if (typeof item === "function") {
  32904. var matchesPredicate = tryCatch(item).call(boundTo, e);
  32905. if (matchesPredicate === errorObj) {
  32906. return matchesPredicate;
  32907. } else if (matchesPredicate) {
  32908. return tryCatch(cb).call(boundTo, e);
  32909. }
  32910. } else if (util.isObject(e)) {
  32911. var keys = getKeys(item);
  32912. for (var j = 0; j < keys.length; ++j) {
  32913. var key = keys[j];
  32914. if (item[key] != e[key]) {
  32915. continue predicateLoop;
  32916. }
  32917. }
  32918. return tryCatch(cb).call(boundTo, e);
  32919. }
  32920. }
  32921. return NEXT_FILTER;
  32922. };
  32923. }
  32924. return catchFilter;
  32925. };
  32926. /***/ }),
  32927. /* 333 */
  32928. /***/ (function(module, exports, __webpack_require__) {
  32929. "use strict";
  32930. var util = __webpack_require__(4);
  32931. var maybeWrapAsError = util.maybeWrapAsError;
  32932. var errors = __webpack_require__(37);
  32933. var OperationalError = errors.OperationalError;
  32934. var es5 = __webpack_require__(59);
  32935. function isUntypedError(obj) {
  32936. return obj instanceof Error &&
  32937. es5.getPrototypeOf(obj) === Error.prototype;
  32938. }
  32939. var rErrorKey = /^(?:name|message|stack|cause)$/;
  32940. function wrapAsOperationalError(obj) {
  32941. var ret;
  32942. if (isUntypedError(obj)) {
  32943. ret = new OperationalError(obj);
  32944. ret.name = obj.name;
  32945. ret.message = obj.message;
  32946. ret.stack = obj.stack;
  32947. var keys = es5.keys(obj);
  32948. for (var i = 0; i < keys.length; ++i) {
  32949. var key = keys[i];
  32950. if (!rErrorKey.test(key)) {
  32951. ret[key] = obj[key];
  32952. }
  32953. }
  32954. return ret;
  32955. }
  32956. util.markAsOriginatingFromRejection(obj);
  32957. return obj;
  32958. }
  32959. function nodebackForPromise(promise, multiArgs) {
  32960. return function(err, value) {
  32961. if (promise === null) return;
  32962. if (err) {
  32963. var wrapped = wrapAsOperationalError(maybeWrapAsError(err));
  32964. promise._attachExtraTrace(wrapped);
  32965. promise._reject(wrapped);
  32966. } else if (!multiArgs) {
  32967. promise._fulfill(value);
  32968. } else {
  32969. var $_len = arguments.length;var args = new Array(Math.max($_len - 1, 0)); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];};
  32970. promise._fulfill(args);
  32971. }
  32972. promise = null;
  32973. };
  32974. }
  32975. module.exports = nodebackForPromise;
  32976. /***/ }),
  32977. /* 334 */
  32978. /***/ (function(module, exports) {
  32979. /** Detect free variable `global` from Node.js. */
  32980. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  32981. module.exports = freeGlobal;
  32982. /***/ }),
  32983. /* 335 */
  32984. /***/ (function(module, exports, __webpack_require__) {
  32985. var baseGetTag = __webpack_require__(44),
  32986. isArray = __webpack_require__(9),
  32987. isObjectLike = __webpack_require__(26);
  32988. /** `Object#toString` result references. */
  32989. var stringTag = '[object String]';
  32990. /**
  32991. * Checks if `value` is classified as a `String` primitive or object.
  32992. *
  32993. * @static
  32994. * @since 0.1.0
  32995. * @memberOf _
  32996. * @category Lang
  32997. * @param {*} value The value to check.
  32998. * @returns {boolean} Returns `true` if `value` is a string, else `false`.
  32999. * @example
  33000. *
  33001. * _.isString('abc');
  33002. * // => true
  33003. *
  33004. * _.isString(1);
  33005. * // => false
  33006. */
  33007. function isString(value) {
  33008. return typeof value == 'string' ||
  33009. (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
  33010. }
  33011. module.exports = isString;
  33012. /***/ }),
  33013. /* 336 */
  33014. /***/ (function(module, exports, __webpack_require__) {
  33015. "use strict";
  33016. var tough = __webpack_require__(337)
  33017. var Cookie = tough.Cookie
  33018. var CookieJar = tough.CookieJar
  33019. exports.parse = function (str) {
  33020. if (str && str.uri) {
  33021. str = str.uri
  33022. }
  33023. if (typeof str !== 'string') {
  33024. throw new Error('The cookie function only accepts STRING as param')
  33025. }
  33026. return Cookie.parse(str, {loose: true})
  33027. }
  33028. // Adapt the sometimes-Async api of tough.CookieJar to our requirements
  33029. function RequestJar (store) {
  33030. var self = this
  33031. self._jar = new CookieJar(store, {looseMode: true})
  33032. }
  33033. RequestJar.prototype.setCookie = function (cookieOrStr, uri, options) {
  33034. var self = this
  33035. return self._jar.setCookieSync(cookieOrStr, uri, options || {})
  33036. }
  33037. RequestJar.prototype.getCookieString = function (uri) {
  33038. var self = this
  33039. return self._jar.getCookieStringSync(uri)
  33040. }
  33041. RequestJar.prototype.getCookies = function (uri) {
  33042. var self = this
  33043. return self._jar.getCookiesSync(uri)
  33044. }
  33045. exports.jar = function (store) {
  33046. return new RequestJar(store)
  33047. }
  33048. /***/ }),
  33049. /* 337 */
  33050. /***/ (function(module, exports, __webpack_require__) {
  33051. "use strict";
  33052. /*!
  33053. * Copyright (c) 2015, Salesforce.com, Inc.
  33054. * All rights reserved.
  33055. *
  33056. * Redistribution and use in source and binary forms, with or without
  33057. * modification, are permitted provided that the following conditions are met:
  33058. *
  33059. * 1. Redistributions of source code must retain the above copyright notice,
  33060. * this list of conditions and the following disclaimer.
  33061. *
  33062. * 2. Redistributions in binary form must reproduce the above copyright notice,
  33063. * this list of conditions and the following disclaimer in the documentation
  33064. * and/or other materials provided with the distribution.
  33065. *
  33066. * 3. Neither the name of Salesforce.com nor the names of its contributors may
  33067. * be used to endorse or promote products derived from this software without
  33068. * specific prior written permission.
  33069. *
  33070. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  33071. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  33072. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  33073. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
  33074. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  33075. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  33076. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  33077. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  33078. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  33079. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  33080. * POSSIBILITY OF SUCH DAMAGE.
  33081. */
  33082. var net = __webpack_require__(142);
  33083. var urlParse = __webpack_require__(14).parse;
  33084. var pubsuffix = __webpack_require__(338);
  33085. var Store = __webpack_require__(340).Store;
  33086. var MemoryCookieStore = __webpack_require__(528).MemoryCookieStore;
  33087. var pathMatch = __webpack_require__(342).pathMatch;
  33088. var VERSION = __webpack_require__(529).version;
  33089. var punycode;
  33090. try {
  33091. punycode = __webpack_require__(339);
  33092. } catch(e) {
  33093. console.warn("cookie: can't load punycode; won't use punycode for domain normalization");
  33094. }
  33095. var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/;
  33096. // From RFC6265 S4.1.1
  33097. // note that it excludes \x3B ";"
  33098. var COOKIE_OCTET = /[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/;
  33099. var COOKIE_OCTETS = new RegExp('^'+COOKIE_OCTET.source+'+$');
  33100. var CONTROL_CHARS = /[\x00-\x1F]/;
  33101. // For COOKIE_PAIR and LOOSE_COOKIE_PAIR below, the number of spaces has been
  33102. // restricted to 256 to side-step a ReDoS issue reported here:
  33103. // https://github.com/salesforce/tough-cookie/issues/92
  33104. // Double quotes are part of the value (see: S4.1.1).
  33105. // '\r', '\n' and '\0' should be treated as a terminator in the "relaxed" mode
  33106. // (see: https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L60)
  33107. // '=' and ';' are attribute/values separators
  33108. // (see: https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L64)
  33109. var COOKIE_PAIR = /^(([^=;]+))\s{0,256}=\s*([^\n\r\0]*)/;
  33110. // Used to parse non-RFC-compliant cookies like '=abc' when given the `loose`
  33111. // option in Cookie.parse:
  33112. var LOOSE_COOKIE_PAIR = /^((?:=)?([^=;]*)\s{0,256}=\s*)?([^\n\r\0]*)/;
  33113. // RFC6265 S4.1.1 defines path value as 'any CHAR except CTLs or ";"'
  33114. // Note ';' is \x3B
  33115. var PATH_VALUE = /[\x20-\x3A\x3C-\x7E]+/;
  33116. var DAY_OF_MONTH = /^(\d{1,2})[^\d]*$/;
  33117. var TIME = /^(\d{1,2})[^\d]*:(\d{1,2})[^\d]*:(\d{1,2})[^\d]*$/;
  33118. var MONTH = /^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)/i;
  33119. var MONTH_TO_NUM = {
  33120. jan:0, feb:1, mar:2, apr:3, may:4, jun:5,
  33121. jul:6, aug:7, sep:8, oct:9, nov:10, dec:11
  33122. };
  33123. var NUM_TO_MONTH = [
  33124. 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'
  33125. ];
  33126. var NUM_TO_DAY = [
  33127. 'Sun','Mon','Tue','Wed','Thu','Fri','Sat'
  33128. ];
  33129. var YEAR = /^(\d{2}|\d{4})$/; // 2 to 4 digits
  33130. var MAX_TIME = 2147483647000; // 31-bit max
  33131. var MIN_TIME = 0; // 31-bit min
  33132. // RFC6265 S5.1.1 date parser:
  33133. function parseDate(str) {
  33134. if (!str) {
  33135. return;
  33136. }
  33137. /* RFC6265 S5.1.1:
  33138. * 2. Process each date-token sequentially in the order the date-tokens
  33139. * appear in the cookie-date
  33140. */
  33141. var tokens = str.split(DATE_DELIM);
  33142. if (!tokens) {
  33143. return;
  33144. }
  33145. var hour = null;
  33146. var minutes = null;
  33147. var seconds = null;
  33148. var day = null;
  33149. var month = null;
  33150. var year = null;
  33151. for (var i=0; i<tokens.length; i++) {
  33152. var token = tokens[i].trim();
  33153. if (!token.length) {
  33154. continue;
  33155. }
  33156. var result;
  33157. /* 2.1. If the found-time flag is not set and the token matches the time
  33158. * production, set the found-time flag and set the hour- value,
  33159. * minute-value, and second-value to the numbers denoted by the digits in
  33160. * the date-token, respectively. Skip the remaining sub-steps and continue
  33161. * to the next date-token.
  33162. */
  33163. if (seconds === null) {
  33164. result = TIME.exec(token);
  33165. if (result) {
  33166. hour = parseInt(result[1], 10);
  33167. minutes = parseInt(result[2], 10);
  33168. seconds = parseInt(result[3], 10);
  33169. /* RFC6265 S5.1.1.5:
  33170. * [fail if]
  33171. * * the hour-value is greater than 23,
  33172. * * the minute-value is greater than 59, or
  33173. * * the second-value is greater than 59.
  33174. */
  33175. if(hour > 23 || minutes > 59 || seconds > 59) {
  33176. return;
  33177. }
  33178. continue;
  33179. }
  33180. }
  33181. /* 2.2. If the found-day-of-month flag is not set and the date-token matches
  33182. * the day-of-month production, set the found-day-of- month flag and set
  33183. * the day-of-month-value to the number denoted by the date-token. Skip
  33184. * the remaining sub-steps and continue to the next date-token.
  33185. */
  33186. if (day === null) {
  33187. result = DAY_OF_MONTH.exec(token);
  33188. if (result) {
  33189. day = parseInt(result, 10);
  33190. /* RFC6265 S5.1.1.5:
  33191. * [fail if] the day-of-month-value is less than 1 or greater than 31
  33192. */
  33193. if(day < 1 || day > 31) {
  33194. return;
  33195. }
  33196. continue;
  33197. }
  33198. }
  33199. /* 2.3. If the found-month flag is not set and the date-token matches the
  33200. * month production, set the found-month flag and set the month-value to
  33201. * the month denoted by the date-token. Skip the remaining sub-steps and
  33202. * continue to the next date-token.
  33203. */
  33204. if (month === null) {
  33205. result = MONTH.exec(token);
  33206. if (result) {
  33207. month = MONTH_TO_NUM[result[1].toLowerCase()];
  33208. continue;
  33209. }
  33210. }
  33211. /* 2.4. If the found-year flag is not set and the date-token matches the year
  33212. * production, set the found-year flag and set the year-value to the number
  33213. * denoted by the date-token. Skip the remaining sub-steps and continue to
  33214. * the next date-token.
  33215. */
  33216. if (year === null) {
  33217. result = YEAR.exec(token);
  33218. if (result) {
  33219. year = parseInt(result[0], 10);
  33220. /* From S5.1.1:
  33221. * 3. If the year-value is greater than or equal to 70 and less
  33222. * than or equal to 99, increment the year-value by 1900.
  33223. * 4. If the year-value is greater than or equal to 0 and less
  33224. * than or equal to 69, increment the year-value by 2000.
  33225. */
  33226. if (70 <= year && year <= 99) {
  33227. year += 1900;
  33228. } else if (0 <= year && year <= 69) {
  33229. year += 2000;
  33230. }
  33231. if (year < 1601) {
  33232. return; // 5. ... the year-value is less than 1601
  33233. }
  33234. }
  33235. }
  33236. }
  33237. if (seconds === null || day === null || month === null || year === null) {
  33238. return; // 5. ... at least one of the found-day-of-month, found-month, found-
  33239. // year, or found-time flags is not set,
  33240. }
  33241. return new Date(Date.UTC(year, month, day, hour, minutes, seconds));
  33242. }
  33243. function formatDate(date) {
  33244. var d = date.getUTCDate(); d = d >= 10 ? d : '0'+d;
  33245. var h = date.getUTCHours(); h = h >= 10 ? h : '0'+h;
  33246. var m = date.getUTCMinutes(); m = m >= 10 ? m : '0'+m;
  33247. var s = date.getUTCSeconds(); s = s >= 10 ? s : '0'+s;
  33248. return NUM_TO_DAY[date.getUTCDay()] + ', ' +
  33249. d+' '+ NUM_TO_MONTH[date.getUTCMonth()] +' '+ date.getUTCFullYear() +' '+
  33250. h+':'+m+':'+s+' GMT';
  33251. }
  33252. // S5.1.2 Canonicalized Host Names
  33253. function canonicalDomain(str) {
  33254. if (str == null) {
  33255. return null;
  33256. }
  33257. str = str.trim().replace(/^\./,''); // S4.1.2.3 & S5.2.3: ignore leading .
  33258. // convert to IDN if any non-ASCII characters
  33259. if (punycode && /[^\u0001-\u007f]/.test(str)) {
  33260. str = punycode.toASCII(str);
  33261. }
  33262. return str.toLowerCase();
  33263. }
  33264. // S5.1.3 Domain Matching
  33265. function domainMatch(str, domStr, canonicalize) {
  33266. if (str == null || domStr == null) {
  33267. return null;
  33268. }
  33269. if (canonicalize !== false) {
  33270. str = canonicalDomain(str);
  33271. domStr = canonicalDomain(domStr);
  33272. }
  33273. /*
  33274. * "The domain string and the string are identical. (Note that both the
  33275. * domain string and the string will have been canonicalized to lower case at
  33276. * this point)"
  33277. */
  33278. if (str == domStr) {
  33279. return true;
  33280. }
  33281. /* "All of the following [three] conditions hold:" (order adjusted from the RFC) */
  33282. /* "* The string is a host name (i.e., not an IP address)." */
  33283. if (net.isIP(str)) {
  33284. return false;
  33285. }
  33286. /* "* The domain string is a suffix of the string" */
  33287. var idx = str.indexOf(domStr);
  33288. if (idx <= 0) {
  33289. return false; // it's a non-match (-1) or prefix (0)
  33290. }
  33291. // e.g "a.b.c".indexOf("b.c") === 2
  33292. // 5 === 3+2
  33293. if (str.length !== domStr.length + idx) { // it's not a suffix
  33294. return false;
  33295. }
  33296. /* "* The last character of the string that is not included in the domain
  33297. * string is a %x2E (".") character." */
  33298. if (str.substr(idx-1,1) !== '.') {
  33299. return false;
  33300. }
  33301. return true;
  33302. }
  33303. // RFC6265 S5.1.4 Paths and Path-Match
  33304. /*
  33305. * "The user agent MUST use an algorithm equivalent to the following algorithm
  33306. * to compute the default-path of a cookie:"
  33307. *
  33308. * Assumption: the path (and not query part or absolute uri) is passed in.
  33309. */
  33310. function defaultPath(path) {
  33311. // "2. If the uri-path is empty or if the first character of the uri-path is not
  33312. // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps.
  33313. if (!path || path.substr(0,1) !== "/") {
  33314. return "/";
  33315. }
  33316. // "3. If the uri-path contains no more than one %x2F ("/") character, output
  33317. // %x2F ("/") and skip the remaining step."
  33318. if (path === "/") {
  33319. return path;
  33320. }
  33321. var rightSlash = path.lastIndexOf("/");
  33322. if (rightSlash === 0) {
  33323. return "/";
  33324. }
  33325. // "4. Output the characters of the uri-path from the first character up to,
  33326. // but not including, the right-most %x2F ("/")."
  33327. return path.slice(0, rightSlash);
  33328. }
  33329. function parse(str, options) {
  33330. if (!options || typeof options !== 'object') {
  33331. options = {};
  33332. }
  33333. str = str.trim();
  33334. // We use a regex to parse the "name-value-pair" part of S5.2
  33335. var firstSemi = str.indexOf(';'); // S5.2 step 1
  33336. var pairRe = options.loose ? LOOSE_COOKIE_PAIR : COOKIE_PAIR;
  33337. var result = pairRe.exec(firstSemi === -1 ? str : str.substr(0,firstSemi));
  33338. // Rx satisfies the "the name string is empty" and "lacks a %x3D ("=")"
  33339. // constraints as well as trimming any whitespace.
  33340. if (!result) {
  33341. return;
  33342. }
  33343. var c = new Cookie();
  33344. if (result[1]) {
  33345. c.key = result[2].trim();
  33346. } else {
  33347. c.key = '';
  33348. }
  33349. c.value = result[3].trim();
  33350. if (CONTROL_CHARS.test(c.key) || CONTROL_CHARS.test(c.value)) {
  33351. return;
  33352. }
  33353. if (firstSemi === -1) {
  33354. return c;
  33355. }
  33356. // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string
  33357. // (including the %x3B (";") in question)." plus later on in the same section
  33358. // "discard the first ";" and trim".
  33359. var unparsed = str.slice(firstSemi + 1).trim();
  33360. // "If the unparsed-attributes string is empty, skip the rest of these
  33361. // steps."
  33362. if (unparsed.length === 0) {
  33363. return c;
  33364. }
  33365. /*
  33366. * S5.2 says that when looping over the items "[p]rocess the attribute-name
  33367. * and attribute-value according to the requirements in the following
  33368. * subsections" for every item. Plus, for many of the individual attributes
  33369. * in S5.3 it says to use the "attribute-value of the last attribute in the
  33370. * cookie-attribute-list". Therefore, in this implementation, we overwrite
  33371. * the previous value.
  33372. */
  33373. var cookie_avs = unparsed.split(';');
  33374. while (cookie_avs.length) {
  33375. var av = cookie_avs.shift().trim();
  33376. if (av.length === 0) { // happens if ";;" appears
  33377. continue;
  33378. }
  33379. var av_sep = av.indexOf('=');
  33380. var av_key, av_value;
  33381. if (av_sep === -1) {
  33382. av_key = av;
  33383. av_value = null;
  33384. } else {
  33385. av_key = av.substr(0,av_sep);
  33386. av_value = av.substr(av_sep+1);
  33387. }
  33388. av_key = av_key.trim().toLowerCase();
  33389. if (av_value) {
  33390. av_value = av_value.trim();
  33391. }
  33392. switch(av_key) {
  33393. case 'expires': // S5.2.1
  33394. if (av_value) {
  33395. var exp = parseDate(av_value);
  33396. // "If the attribute-value failed to parse as a cookie date, ignore the
  33397. // cookie-av."
  33398. if (exp) {
  33399. // over and underflow not realistically a concern: V8's getTime() seems to
  33400. // store something larger than a 32-bit time_t (even with 32-bit node)
  33401. c.expires = exp;
  33402. }
  33403. }
  33404. break;
  33405. case 'max-age': // S5.2.2
  33406. if (av_value) {
  33407. // "If the first character of the attribute-value is not a DIGIT or a "-"
  33408. // character ...[or]... If the remainder of attribute-value contains a
  33409. // non-DIGIT character, ignore the cookie-av."
  33410. if (/^-?[0-9]+$/.test(av_value)) {
  33411. var delta = parseInt(av_value, 10);
  33412. // "If delta-seconds is less than or equal to zero (0), let expiry-time
  33413. // be the earliest representable date and time."
  33414. c.setMaxAge(delta);
  33415. }
  33416. }
  33417. break;
  33418. case 'domain': // S5.2.3
  33419. // "If the attribute-value is empty, the behavior is undefined. However,
  33420. // the user agent SHOULD ignore the cookie-av entirely."
  33421. if (av_value) {
  33422. // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E
  33423. // (".") character."
  33424. var domain = av_value.trim().replace(/^\./, '');
  33425. if (domain) {
  33426. // "Convert the cookie-domain to lower case."
  33427. c.domain = domain.toLowerCase();
  33428. }
  33429. }
  33430. break;
  33431. case 'path': // S5.2.4
  33432. /*
  33433. * "If the attribute-value is empty or if the first character of the
  33434. * attribute-value is not %x2F ("/"):
  33435. * Let cookie-path be the default-path.
  33436. * Otherwise:
  33437. * Let cookie-path be the attribute-value."
  33438. *
  33439. * We'll represent the default-path as null since it depends on the
  33440. * context of the parsing.
  33441. */
  33442. c.path = av_value && av_value[0] === "/" ? av_value : null;
  33443. break;
  33444. case 'secure': // S5.2.5
  33445. /*
  33446. * "If the attribute-name case-insensitively matches the string "Secure",
  33447. * the user agent MUST append an attribute to the cookie-attribute-list
  33448. * with an attribute-name of Secure and an empty attribute-value."
  33449. */
  33450. c.secure = true;
  33451. break;
  33452. case 'httponly': // S5.2.6 -- effectively the same as 'secure'
  33453. c.httpOnly = true;
  33454. break;
  33455. default:
  33456. c.extensions = c.extensions || [];
  33457. c.extensions.push(av);
  33458. break;
  33459. }
  33460. }
  33461. return c;
  33462. }
  33463. // avoid the V8 deoptimization monster!
  33464. function jsonParse(str) {
  33465. var obj;
  33466. try {
  33467. obj = JSON.parse(str);
  33468. } catch (e) {
  33469. return e;
  33470. }
  33471. return obj;
  33472. }
  33473. function fromJSON(str) {
  33474. if (!str) {
  33475. return null;
  33476. }
  33477. var obj;
  33478. if (typeof str === 'string') {
  33479. obj = jsonParse(str);
  33480. if (obj instanceof Error) {
  33481. return null;
  33482. }
  33483. } else {
  33484. // assume it's an Object
  33485. obj = str;
  33486. }
  33487. var c = new Cookie();
  33488. for (var i=0; i<Cookie.serializableProperties.length; i++) {
  33489. var prop = Cookie.serializableProperties[i];
  33490. if (obj[prop] === undefined ||
  33491. obj[prop] === Cookie.prototype[prop])
  33492. {
  33493. continue; // leave as prototype default
  33494. }
  33495. if (prop === 'expires' ||
  33496. prop === 'creation' ||
  33497. prop === 'lastAccessed')
  33498. {
  33499. if (obj[prop] === null) {
  33500. c[prop] = null;
  33501. } else {
  33502. c[prop] = obj[prop] == "Infinity" ?
  33503. "Infinity" : new Date(obj[prop]);
  33504. }
  33505. } else {
  33506. c[prop] = obj[prop];
  33507. }
  33508. }
  33509. return c;
  33510. }
  33511. /* Section 5.4 part 2:
  33512. * "* Cookies with longer paths are listed before cookies with
  33513. * shorter paths.
  33514. *
  33515. * * Among cookies that have equal-length path fields, cookies with
  33516. * earlier creation-times are listed before cookies with later
  33517. * creation-times."
  33518. */
  33519. function cookieCompare(a,b) {
  33520. var cmp = 0;
  33521. // descending for length: b CMP a
  33522. var aPathLen = a.path ? a.path.length : 0;
  33523. var bPathLen = b.path ? b.path.length : 0;
  33524. cmp = bPathLen - aPathLen;
  33525. if (cmp !== 0) {
  33526. return cmp;
  33527. }
  33528. // ascending for time: a CMP b
  33529. var aTime = a.creation ? a.creation.getTime() : MAX_TIME;
  33530. var bTime = b.creation ? b.creation.getTime() : MAX_TIME;
  33531. cmp = aTime - bTime;
  33532. if (cmp !== 0) {
  33533. return cmp;
  33534. }
  33535. // break ties for the same millisecond (precision of JavaScript's clock)
  33536. cmp = a.creationIndex - b.creationIndex;
  33537. return cmp;
  33538. }
  33539. // Gives the permutation of all possible pathMatch()es of a given path. The
  33540. // array is in longest-to-shortest order. Handy for indexing.
  33541. function permutePath(path) {
  33542. if (path === '/') {
  33543. return ['/'];
  33544. }
  33545. if (path.lastIndexOf('/') === path.length-1) {
  33546. path = path.substr(0,path.length-1);
  33547. }
  33548. var permutations = [path];
  33549. while (path.length > 1) {
  33550. var lindex = path.lastIndexOf('/');
  33551. if (lindex === 0) {
  33552. break;
  33553. }
  33554. path = path.substr(0,lindex);
  33555. permutations.push(path);
  33556. }
  33557. permutations.push('/');
  33558. return permutations;
  33559. }
  33560. function getCookieContext(url) {
  33561. if (url instanceof Object) {
  33562. return url;
  33563. }
  33564. // NOTE: decodeURI will throw on malformed URIs (see GH-32).
  33565. // Therefore, we will just skip decoding for such URIs.
  33566. try {
  33567. url = decodeURI(url);
  33568. }
  33569. catch(err) {
  33570. // Silently swallow error
  33571. }
  33572. return urlParse(url);
  33573. }
  33574. function Cookie(options) {
  33575. options = options || {};
  33576. Object.keys(options).forEach(function(prop) {
  33577. if (Cookie.prototype.hasOwnProperty(prop) &&
  33578. Cookie.prototype[prop] !== options[prop] &&
  33579. prop.substr(0,1) !== '_')
  33580. {
  33581. this[prop] = options[prop];
  33582. }
  33583. }, this);
  33584. this.creation = this.creation || new Date();
  33585. // used to break creation ties in cookieCompare():
  33586. Object.defineProperty(this, 'creationIndex', {
  33587. configurable: false,
  33588. enumerable: false, // important for assert.deepEqual checks
  33589. writable: true,
  33590. value: ++Cookie.cookiesCreated
  33591. });
  33592. }
  33593. Cookie.cookiesCreated = 0; // incremented each time a cookie is created
  33594. Cookie.parse = parse;
  33595. Cookie.fromJSON = fromJSON;
  33596. Cookie.prototype.key = "";
  33597. Cookie.prototype.value = "";
  33598. // the order in which the RFC has them:
  33599. Cookie.prototype.expires = "Infinity"; // coerces to literal Infinity
  33600. Cookie.prototype.maxAge = null; // takes precedence over expires for TTL
  33601. Cookie.prototype.domain = null;
  33602. Cookie.prototype.path = null;
  33603. Cookie.prototype.secure = false;
  33604. Cookie.prototype.httpOnly = false;
  33605. Cookie.prototype.extensions = null;
  33606. // set by the CookieJar:
  33607. Cookie.prototype.hostOnly = null; // boolean when set
  33608. Cookie.prototype.pathIsDefault = null; // boolean when set
  33609. Cookie.prototype.creation = null; // Date when set; defaulted by Cookie.parse
  33610. Cookie.prototype.lastAccessed = null; // Date when set
  33611. Object.defineProperty(Cookie.prototype, 'creationIndex', {
  33612. configurable: true,
  33613. enumerable: false,
  33614. writable: true,
  33615. value: 0
  33616. });
  33617. Cookie.serializableProperties = Object.keys(Cookie.prototype)
  33618. .filter(function(prop) {
  33619. return !(
  33620. Cookie.prototype[prop] instanceof Function ||
  33621. prop === 'creationIndex' ||
  33622. prop.substr(0,1) === '_'
  33623. );
  33624. });
  33625. Cookie.prototype.inspect = function inspect() {
  33626. var now = Date.now();
  33627. return 'Cookie="'+this.toString() +
  33628. '; hostOnly='+(this.hostOnly != null ? this.hostOnly : '?') +
  33629. '; aAge='+(this.lastAccessed ? (now-this.lastAccessed.getTime())+'ms' : '?') +
  33630. '; cAge='+(this.creation ? (now-this.creation.getTime())+'ms' : '?') +
  33631. '"';
  33632. };
  33633. Cookie.prototype.toJSON = function() {
  33634. var obj = {};
  33635. var props = Cookie.serializableProperties;
  33636. for (var i=0; i<props.length; i++) {
  33637. var prop = props[i];
  33638. if (this[prop] === Cookie.prototype[prop]) {
  33639. continue; // leave as prototype default
  33640. }
  33641. if (prop === 'expires' ||
  33642. prop === 'creation' ||
  33643. prop === 'lastAccessed')
  33644. {
  33645. if (this[prop] === null) {
  33646. obj[prop] = null;
  33647. } else {
  33648. obj[prop] = this[prop] == "Infinity" ? // intentionally not ===
  33649. "Infinity" : this[prop].toISOString();
  33650. }
  33651. } else if (prop === 'maxAge') {
  33652. if (this[prop] !== null) {
  33653. // again, intentionally not ===
  33654. obj[prop] = (this[prop] == Infinity || this[prop] == -Infinity) ?
  33655. this[prop].toString() : this[prop];
  33656. }
  33657. } else {
  33658. if (this[prop] !== Cookie.prototype[prop]) {
  33659. obj[prop] = this[prop];
  33660. }
  33661. }
  33662. }
  33663. return obj;
  33664. };
  33665. Cookie.prototype.clone = function() {
  33666. return fromJSON(this.toJSON());
  33667. };
  33668. Cookie.prototype.validate = function validate() {
  33669. if (!COOKIE_OCTETS.test(this.value)) {
  33670. return false;
  33671. }
  33672. if (this.expires != Infinity && !(this.expires instanceof Date) && !parseDate(this.expires)) {
  33673. return false;
  33674. }
  33675. if (this.maxAge != null && this.maxAge <= 0) {
  33676. return false; // "Max-Age=" non-zero-digit *DIGIT
  33677. }
  33678. if (this.path != null && !PATH_VALUE.test(this.path)) {
  33679. return false;
  33680. }
  33681. var cdomain = this.cdomain();
  33682. if (cdomain) {
  33683. if (cdomain.match(/\.$/)) {
  33684. return false; // S4.1.2.3 suggests that this is bad. domainMatch() tests confirm this
  33685. }
  33686. var suffix = pubsuffix.getPublicSuffix(cdomain);
  33687. if (suffix == null) { // it's a public suffix
  33688. return false;
  33689. }
  33690. }
  33691. return true;
  33692. };
  33693. Cookie.prototype.setExpires = function setExpires(exp) {
  33694. if (exp instanceof Date) {
  33695. this.expires = exp;
  33696. } else {
  33697. this.expires = parseDate(exp) || "Infinity";
  33698. }
  33699. };
  33700. Cookie.prototype.setMaxAge = function setMaxAge(age) {
  33701. if (age === Infinity || age === -Infinity) {
  33702. this.maxAge = age.toString(); // so JSON.stringify() works
  33703. } else {
  33704. this.maxAge = age;
  33705. }
  33706. };
  33707. // gives Cookie header format
  33708. Cookie.prototype.cookieString = function cookieString() {
  33709. var val = this.value;
  33710. if (val == null) {
  33711. val = '';
  33712. }
  33713. if (this.key === '') {
  33714. return val;
  33715. }
  33716. return this.key+'='+val;
  33717. };
  33718. // gives Set-Cookie header format
  33719. Cookie.prototype.toString = function toString() {
  33720. var str = this.cookieString();
  33721. if (this.expires != Infinity) {
  33722. if (this.expires instanceof Date) {
  33723. str += '; Expires='+formatDate(this.expires);
  33724. } else {
  33725. str += '; Expires='+this.expires;
  33726. }
  33727. }
  33728. if (this.maxAge != null && this.maxAge != Infinity) {
  33729. str += '; Max-Age='+this.maxAge;
  33730. }
  33731. if (this.domain && !this.hostOnly) {
  33732. str += '; Domain='+this.domain;
  33733. }
  33734. if (this.path) {
  33735. str += '; Path='+this.path;
  33736. }
  33737. if (this.secure) {
  33738. str += '; Secure';
  33739. }
  33740. if (this.httpOnly) {
  33741. str += '; HttpOnly';
  33742. }
  33743. if (this.extensions) {
  33744. this.extensions.forEach(function(ext) {
  33745. str += '; '+ext;
  33746. });
  33747. }
  33748. return str;
  33749. };
  33750. // TTL() partially replaces the "expiry-time" parts of S5.3 step 3 (setCookie()
  33751. // elsewhere)
  33752. // S5.3 says to give the "latest representable date" for which we use Infinity
  33753. // For "expired" we use 0
  33754. Cookie.prototype.TTL = function TTL(now) {
  33755. /* RFC6265 S4.1.2.2 If a cookie has both the Max-Age and the Expires
  33756. * attribute, the Max-Age attribute has precedence and controls the
  33757. * expiration date of the cookie.
  33758. * (Concurs with S5.3 step 3)
  33759. */
  33760. if (this.maxAge != null) {
  33761. return this.maxAge<=0 ? 0 : this.maxAge*1000;
  33762. }
  33763. var expires = this.expires;
  33764. if (expires != Infinity) {
  33765. if (!(expires instanceof Date)) {
  33766. expires = parseDate(expires) || Infinity;
  33767. }
  33768. if (expires == Infinity) {
  33769. return Infinity;
  33770. }
  33771. return expires.getTime() - (now || Date.now());
  33772. }
  33773. return Infinity;
  33774. };
  33775. // expiryTime() replaces the "expiry-time" parts of S5.3 step 3 (setCookie()
  33776. // elsewhere)
  33777. Cookie.prototype.expiryTime = function expiryTime(now) {
  33778. if (this.maxAge != null) {
  33779. var relativeTo = now || this.creation || new Date();
  33780. var age = (this.maxAge <= 0) ? -Infinity : this.maxAge*1000;
  33781. return relativeTo.getTime() + age;
  33782. }
  33783. if (this.expires == Infinity) {
  33784. return Infinity;
  33785. }
  33786. return this.expires.getTime();
  33787. };
  33788. // expiryDate() replaces the "expiry-time" parts of S5.3 step 3 (setCookie()
  33789. // elsewhere), except it returns a Date
  33790. Cookie.prototype.expiryDate = function expiryDate(now) {
  33791. var millisec = this.expiryTime(now);
  33792. if (millisec == Infinity) {
  33793. return new Date(MAX_TIME);
  33794. } else if (millisec == -Infinity) {
  33795. return new Date(MIN_TIME);
  33796. } else {
  33797. return new Date(millisec);
  33798. }
  33799. };
  33800. // This replaces the "persistent-flag" parts of S5.3 step 3
  33801. Cookie.prototype.isPersistent = function isPersistent() {
  33802. return (this.maxAge != null || this.expires != Infinity);
  33803. };
  33804. // Mostly S5.1.2 and S5.2.3:
  33805. Cookie.prototype.cdomain =
  33806. Cookie.prototype.canonicalizedDomain = function canonicalizedDomain() {
  33807. if (this.domain == null) {
  33808. return null;
  33809. }
  33810. return canonicalDomain(this.domain);
  33811. };
  33812. function CookieJar(store, options) {
  33813. if (typeof options === "boolean") {
  33814. options = {rejectPublicSuffixes: options};
  33815. } else if (options == null) {
  33816. options = {};
  33817. }
  33818. if (options.rejectPublicSuffixes != null) {
  33819. this.rejectPublicSuffixes = options.rejectPublicSuffixes;
  33820. }
  33821. if (options.looseMode != null) {
  33822. this.enableLooseMode = options.looseMode;
  33823. }
  33824. if (!store) {
  33825. store = new MemoryCookieStore();
  33826. }
  33827. this.store = store;
  33828. }
  33829. CookieJar.prototype.store = null;
  33830. CookieJar.prototype.rejectPublicSuffixes = true;
  33831. CookieJar.prototype.enableLooseMode = false;
  33832. var CAN_BE_SYNC = [];
  33833. CAN_BE_SYNC.push('setCookie');
  33834. CookieJar.prototype.setCookie = function(cookie, url, options, cb) {
  33835. var err;
  33836. var context = getCookieContext(url);
  33837. if (options instanceof Function) {
  33838. cb = options;
  33839. options = {};
  33840. }
  33841. var host = canonicalDomain(context.hostname);
  33842. var loose = this.enableLooseMode;
  33843. if (options.loose != null) {
  33844. loose = options.loose;
  33845. }
  33846. // S5.3 step 1
  33847. if (!(cookie instanceof Cookie)) {
  33848. cookie = Cookie.parse(cookie, { loose: loose });
  33849. }
  33850. if (!cookie) {
  33851. err = new Error("Cookie failed to parse");
  33852. return cb(options.ignoreError ? null : err);
  33853. }
  33854. // S5.3 step 2
  33855. var now = options.now || new Date(); // will assign later to save effort in the face of errors
  33856. // S5.3 step 3: NOOP; persistent-flag and expiry-time is handled by getCookie()
  33857. // S5.3 step 4: NOOP; domain is null by default
  33858. // S5.3 step 5: public suffixes
  33859. if (this.rejectPublicSuffixes && cookie.domain) {
  33860. var suffix = pubsuffix.getPublicSuffix(cookie.cdomain());
  33861. if (suffix == null) { // e.g. "com"
  33862. err = new Error("Cookie has domain set to a public suffix");
  33863. return cb(options.ignoreError ? null : err);
  33864. }
  33865. }
  33866. // S5.3 step 6:
  33867. if (cookie.domain) {
  33868. if (!domainMatch(host, cookie.cdomain(), false)) {
  33869. err = new Error("Cookie not in this host's domain. Cookie:"+cookie.cdomain()+" Request:"+host);
  33870. return cb(options.ignoreError ? null : err);
  33871. }
  33872. if (cookie.hostOnly == null) { // don't reset if already set
  33873. cookie.hostOnly = false;
  33874. }
  33875. } else {
  33876. cookie.hostOnly = true;
  33877. cookie.domain = host;
  33878. }
  33879. //S5.2.4 If the attribute-value is empty or if the first character of the
  33880. //attribute-value is not %x2F ("/"):
  33881. //Let cookie-path be the default-path.
  33882. if (!cookie.path || cookie.path[0] !== '/') {
  33883. cookie.path = defaultPath(context.pathname);
  33884. cookie.pathIsDefault = true;
  33885. }
  33886. // S5.3 step 8: NOOP; secure attribute
  33887. // S5.3 step 9: NOOP; httpOnly attribute
  33888. // S5.3 step 10
  33889. if (options.http === false && cookie.httpOnly) {
  33890. err = new Error("Cookie is HttpOnly and this isn't an HTTP API");
  33891. return cb(options.ignoreError ? null : err);
  33892. }
  33893. var store = this.store;
  33894. if (!store.updateCookie) {
  33895. store.updateCookie = function(oldCookie, newCookie, cb) {
  33896. this.putCookie(newCookie, cb);
  33897. };
  33898. }
  33899. function withCookie(err, oldCookie) {
  33900. if (err) {
  33901. return cb(err);
  33902. }
  33903. var next = function(err) {
  33904. if (err) {
  33905. return cb(err);
  33906. } else {
  33907. cb(null, cookie);
  33908. }
  33909. };
  33910. if (oldCookie) {
  33911. // S5.3 step 11 - "If the cookie store contains a cookie with the same name,
  33912. // domain, and path as the newly created cookie:"
  33913. if (options.http === false && oldCookie.httpOnly) { // step 11.2
  33914. err = new Error("old Cookie is HttpOnly and this isn't an HTTP API");
  33915. return cb(options.ignoreError ? null : err);
  33916. }
  33917. cookie.creation = oldCookie.creation; // step 11.3
  33918. cookie.creationIndex = oldCookie.creationIndex; // preserve tie-breaker
  33919. cookie.lastAccessed = now;
  33920. // Step 11.4 (delete cookie) is implied by just setting the new one:
  33921. store.updateCookie(oldCookie, cookie, next); // step 12
  33922. } else {
  33923. cookie.creation = cookie.lastAccessed = now;
  33924. store.putCookie(cookie, next); // step 12
  33925. }
  33926. }
  33927. store.findCookie(cookie.domain, cookie.path, cookie.key, withCookie);
  33928. };
  33929. // RFC6365 S5.4
  33930. CAN_BE_SYNC.push('getCookies');
  33931. CookieJar.prototype.getCookies = function(url, options, cb) {
  33932. var context = getCookieContext(url);
  33933. if (options instanceof Function) {
  33934. cb = options;
  33935. options = {};
  33936. }
  33937. var host = canonicalDomain(context.hostname);
  33938. var path = context.pathname || '/';
  33939. var secure = options.secure;
  33940. if (secure == null && context.protocol &&
  33941. (context.protocol == 'https:' || context.protocol == 'wss:'))
  33942. {
  33943. secure = true;
  33944. }
  33945. var http = options.http;
  33946. if (http == null) {
  33947. http = true;
  33948. }
  33949. var now = options.now || Date.now();
  33950. var expireCheck = options.expire !== false;
  33951. var allPaths = !!options.allPaths;
  33952. var store = this.store;
  33953. function matchingCookie(c) {
  33954. // "Either:
  33955. // The cookie's host-only-flag is true and the canonicalized
  33956. // request-host is identical to the cookie's domain.
  33957. // Or:
  33958. // The cookie's host-only-flag is false and the canonicalized
  33959. // request-host domain-matches the cookie's domain."
  33960. if (c.hostOnly) {
  33961. if (c.domain != host) {
  33962. return false;
  33963. }
  33964. } else {
  33965. if (!domainMatch(host, c.domain, false)) {
  33966. return false;
  33967. }
  33968. }
  33969. // "The request-uri's path path-matches the cookie's path."
  33970. if (!allPaths && !pathMatch(path, c.path)) {
  33971. return false;
  33972. }
  33973. // "If the cookie's secure-only-flag is true, then the request-uri's
  33974. // scheme must denote a "secure" protocol"
  33975. if (c.secure && !secure) {
  33976. return false;
  33977. }
  33978. // "If the cookie's http-only-flag is true, then exclude the cookie if the
  33979. // cookie-string is being generated for a "non-HTTP" API"
  33980. if (c.httpOnly && !http) {
  33981. return false;
  33982. }
  33983. // deferred from S5.3
  33984. // non-RFC: allow retention of expired cookies by choice
  33985. if (expireCheck && c.expiryTime() <= now) {
  33986. store.removeCookie(c.domain, c.path, c.key, function(){}); // result ignored
  33987. return false;
  33988. }
  33989. return true;
  33990. }
  33991. store.findCookies(host, allPaths ? null : path, function(err,cookies) {
  33992. if (err) {
  33993. return cb(err);
  33994. }
  33995. cookies = cookies.filter(matchingCookie);
  33996. // sorting of S5.4 part 2
  33997. if (options.sort !== false) {
  33998. cookies = cookies.sort(cookieCompare);
  33999. }
  34000. // S5.4 part 3
  34001. var now = new Date();
  34002. cookies.forEach(function(c) {
  34003. c.lastAccessed = now;
  34004. });
  34005. // TODO persist lastAccessed
  34006. cb(null,cookies);
  34007. });
  34008. };
  34009. CAN_BE_SYNC.push('getCookieString');
  34010. CookieJar.prototype.getCookieString = function(/*..., cb*/) {
  34011. var args = Array.prototype.slice.call(arguments,0);
  34012. var cb = args.pop();
  34013. var next = function(err,cookies) {
  34014. if (err) {
  34015. cb(err);
  34016. } else {
  34017. cb(null, cookies
  34018. .sort(cookieCompare)
  34019. .map(function(c){
  34020. return c.cookieString();
  34021. })
  34022. .join('; '));
  34023. }
  34024. };
  34025. args.push(next);
  34026. this.getCookies.apply(this,args);
  34027. };
  34028. CAN_BE_SYNC.push('getSetCookieStrings');
  34029. CookieJar.prototype.getSetCookieStrings = function(/*..., cb*/) {
  34030. var args = Array.prototype.slice.call(arguments,0);
  34031. var cb = args.pop();
  34032. var next = function(err,cookies) {
  34033. if (err) {
  34034. cb(err);
  34035. } else {
  34036. cb(null, cookies.map(function(c){
  34037. return c.toString();
  34038. }));
  34039. }
  34040. };
  34041. args.push(next);
  34042. this.getCookies.apply(this,args);
  34043. };
  34044. CAN_BE_SYNC.push('serialize');
  34045. CookieJar.prototype.serialize = function(cb) {
  34046. var type = this.store.constructor.name;
  34047. if (type === 'Object') {
  34048. type = null;
  34049. }
  34050. // update README.md "Serialization Format" if you change this, please!
  34051. var serialized = {
  34052. // The version of tough-cookie that serialized this jar. Generally a good
  34053. // practice since future versions can make data import decisions based on
  34054. // known past behavior. When/if this matters, use `semver`.
  34055. version: 'tough-cookie@'+VERSION,
  34056. // add the store type, to make humans happy:
  34057. storeType: type,
  34058. // CookieJar configuration:
  34059. rejectPublicSuffixes: !!this.rejectPublicSuffixes,
  34060. // this gets filled from getAllCookies:
  34061. cookies: []
  34062. };
  34063. if (!(this.store.getAllCookies &&
  34064. typeof this.store.getAllCookies === 'function'))
  34065. {
  34066. return cb(new Error('store does not support getAllCookies and cannot be serialized'));
  34067. }
  34068. this.store.getAllCookies(function(err,cookies) {
  34069. if (err) {
  34070. return cb(err);
  34071. }
  34072. serialized.cookies = cookies.map(function(cookie) {
  34073. // convert to serialized 'raw' cookies
  34074. cookie = (cookie instanceof Cookie) ? cookie.toJSON() : cookie;
  34075. // Remove the index so new ones get assigned during deserialization
  34076. delete cookie.creationIndex;
  34077. return cookie;
  34078. });
  34079. return cb(null, serialized);
  34080. });
  34081. };
  34082. // well-known name that JSON.stringify calls
  34083. CookieJar.prototype.toJSON = function() {
  34084. return this.serializeSync();
  34085. };
  34086. // use the class method CookieJar.deserialize instead of calling this directly
  34087. CAN_BE_SYNC.push('_importCookies');
  34088. CookieJar.prototype._importCookies = function(serialized, cb) {
  34089. var jar = this;
  34090. var cookies = serialized.cookies;
  34091. if (!cookies || !Array.isArray(cookies)) {
  34092. return cb(new Error('serialized jar has no cookies array'));
  34093. }
  34094. cookies = cookies.slice(); // do not modify the original
  34095. function putNext(err) {
  34096. if (err) {
  34097. return cb(err);
  34098. }
  34099. if (!cookies.length) {
  34100. return cb(err, jar);
  34101. }
  34102. var cookie;
  34103. try {
  34104. cookie = fromJSON(cookies.shift());
  34105. } catch (e) {
  34106. return cb(e);
  34107. }
  34108. if (cookie === null) {
  34109. return putNext(null); // skip this cookie
  34110. }
  34111. jar.store.putCookie(cookie, putNext);
  34112. }
  34113. putNext();
  34114. };
  34115. CookieJar.deserialize = function(strOrObj, store, cb) {
  34116. if (arguments.length !== 3) {
  34117. // store is optional
  34118. cb = store;
  34119. store = null;
  34120. }
  34121. var serialized;
  34122. if (typeof strOrObj === 'string') {
  34123. serialized = jsonParse(strOrObj);
  34124. if (serialized instanceof Error) {
  34125. return cb(serialized);
  34126. }
  34127. } else {
  34128. serialized = strOrObj;
  34129. }
  34130. var jar = new CookieJar(store, serialized.rejectPublicSuffixes);
  34131. jar._importCookies(serialized, function(err) {
  34132. if (err) {
  34133. return cb(err);
  34134. }
  34135. cb(null, jar);
  34136. });
  34137. };
  34138. CookieJar.deserializeSync = function(strOrObj, store) {
  34139. var serialized = typeof strOrObj === 'string' ?
  34140. JSON.parse(strOrObj) : strOrObj;
  34141. var jar = new CookieJar(store, serialized.rejectPublicSuffixes);
  34142. // catch this mistake early:
  34143. if (!jar.store.synchronous) {
  34144. throw new Error('CookieJar store is not synchronous; use async API instead.');
  34145. }
  34146. jar._importCookiesSync(serialized);
  34147. return jar;
  34148. };
  34149. CookieJar.fromJSON = CookieJar.deserializeSync;
  34150. CAN_BE_SYNC.push('clone');
  34151. CookieJar.prototype.clone = function(newStore, cb) {
  34152. if (arguments.length === 1) {
  34153. cb = newStore;
  34154. newStore = null;
  34155. }
  34156. this.serialize(function(err,serialized) {
  34157. if (err) {
  34158. return cb(err);
  34159. }
  34160. CookieJar.deserialize(newStore, serialized, cb);
  34161. });
  34162. };
  34163. // Use a closure to provide a true imperative API for synchronous stores.
  34164. function syncWrap(method) {
  34165. return function() {
  34166. if (!this.store.synchronous) {
  34167. throw new Error('CookieJar store is not synchronous; use async API instead.');
  34168. }
  34169. var args = Array.prototype.slice.call(arguments);
  34170. var syncErr, syncResult;
  34171. args.push(function syncCb(err, result) {
  34172. syncErr = err;
  34173. syncResult = result;
  34174. });
  34175. this[method].apply(this, args);
  34176. if (syncErr) {
  34177. throw syncErr;
  34178. }
  34179. return syncResult;
  34180. };
  34181. }
  34182. // wrap all declared CAN_BE_SYNC methods in the sync wrapper
  34183. CAN_BE_SYNC.forEach(function(method) {
  34184. CookieJar.prototype[method+'Sync'] = syncWrap(method);
  34185. });
  34186. module.exports = {
  34187. CookieJar: CookieJar,
  34188. Cookie: Cookie,
  34189. Store: Store,
  34190. MemoryCookieStore: MemoryCookieStore,
  34191. parseDate: parseDate,
  34192. formatDate: formatDate,
  34193. parse: parse,
  34194. fromJSON: fromJSON,
  34195. domainMatch: domainMatch,
  34196. defaultPath: defaultPath,
  34197. pathMatch: pathMatch,
  34198. getPublicSuffix: pubsuffix.getPublicSuffix,
  34199. cookieCompare: cookieCompare,
  34200. permuteDomain: __webpack_require__(341).permuteDomain,
  34201. permutePath: permutePath,
  34202. canonicalDomain: canonicalDomain
  34203. };
  34204. /***/ }),
  34205. /* 338 */
  34206. /***/ (function(module, exports, __webpack_require__) {
  34207. "use strict";
  34208. /****************************************************
  34209. * AUTOMATICALLY GENERATED by generate-pubsuffix.js *
  34210. * DO NOT EDIT! *
  34211. ****************************************************/
  34212. var punycode = __webpack_require__(339);
  34213. module.exports.getPublicSuffix = function getPublicSuffix(domain) {
  34214. /*!
  34215. * Copyright (c) 2015, Salesforce.com, Inc.
  34216. * All rights reserved.
  34217. *
  34218. * Redistribution and use in source and binary forms, with or without
  34219. * modification, are permitted provided that the following conditions are met:
  34220. *
  34221. * 1. Redistributions of source code must retain the above copyright notice,
  34222. * this list of conditions and the following disclaimer.
  34223. *
  34224. * 2. Redistributions in binary form must reproduce the above copyright notice,
  34225. * this list of conditions and the following disclaimer in the documentation
  34226. * and/or other materials provided with the distribution.
  34227. *
  34228. * 3. Neither the name of Salesforce.com nor the names of its contributors may
  34229. * be used to endorse or promote products derived from this software without
  34230. * specific prior written permission.
  34231. *
  34232. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  34233. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  34234. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  34235. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
  34236. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  34237. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  34238. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  34239. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  34240. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  34241. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  34242. * POSSIBILITY OF SUCH DAMAGE.
  34243. */
  34244. if (!domain) {
  34245. return null;
  34246. }
  34247. if (domain.match(/^\./)) {
  34248. return null;
  34249. }
  34250. var asciiDomain = punycode.toASCII(domain);
  34251. var converted = false;
  34252. if (asciiDomain !== domain) {
  34253. domain = asciiDomain;
  34254. converted = true;
  34255. }
  34256. if (index[domain]) {
  34257. return null;
  34258. }
  34259. domain = domain.toLowerCase();
  34260. var parts = domain.split('.').reverse();
  34261. var suffix = '';
  34262. var suffixLen = 0;
  34263. for (var i=0; i<parts.length; i++) {
  34264. var part = parts[i];
  34265. var starstr = '*'+suffix;
  34266. var partstr = part+suffix;
  34267. if (index[starstr]) { // star rule matches
  34268. suffixLen = i+1;
  34269. if (index[partstr] === false) { // exception rule matches (NB: false, not undefined)
  34270. suffixLen--;
  34271. }
  34272. } else if (index[partstr]) { // exact match, not exception
  34273. suffixLen = i+1;
  34274. }
  34275. suffix = '.'+partstr;
  34276. }
  34277. if (index['*'+suffix]) { // *.domain exists (e.g. *.kyoto.jp for domain='kyoto.jp');
  34278. return null;
  34279. }
  34280. suffixLen = suffixLen || 1;
  34281. if (parts.length > suffixLen) {
  34282. var publicSuffix = parts.slice(0,suffixLen+1).reverse().join('.');
  34283. return converted ? punycode.toUnicode(publicSuffix) : publicSuffix;
  34284. }
  34285. return null;
  34286. };
  34287. // The following generated structure is used under the MPL version 2.0
  34288. // See public-suffix.txt for more information
  34289. var index = module.exports.index = Object.freeze(
  34290. {"ac":true,"com.ac":true,"edu.ac":true,"gov.ac":true,"net.ac":true,"mil.ac":true,"org.ac":true,"ad":true,"nom.ad":true,"ae":true,"co.ae":true,"net.ae":true,"org.ae":true,"sch.ae":true,"ac.ae":true,"gov.ae":true,"mil.ae":true,"aero":true,"accident-investigation.aero":true,"accident-prevention.aero":true,"aerobatic.aero":true,"aeroclub.aero":true,"aerodrome.aero":true,"agents.aero":true,"aircraft.aero":true,"airline.aero":true,"airport.aero":true,"air-surveillance.aero":true,"airtraffic.aero":true,"air-traffic-control.aero":true,"ambulance.aero":true,"amusement.aero":true,"association.aero":true,"author.aero":true,"ballooning.aero":true,"broker.aero":true,"caa.aero":true,"cargo.aero":true,"catering.aero":true,"certification.aero":true,"championship.aero":true,"charter.aero":true,"civilaviation.aero":true,"club.aero":true,"conference.aero":true,"consultant.aero":true,"consulting.aero":true,"control.aero":true,"council.aero":true,"crew.aero":true,"design.aero":true,"dgca.aero":true,"educator.aero":true,"emergency.aero":true,"engine.aero":true,"engineer.aero":true,"entertainment.aero":true,"equipment.aero":true,"exchange.aero":true,"express.aero":true,"federation.aero":true,"flight.aero":true,"freight.aero":true,"fuel.aero":true,"gliding.aero":true,"government.aero":true,"groundhandling.aero":true,"group.aero":true,"hanggliding.aero":true,"homebuilt.aero":true,"insurance.aero":true,"journal.aero":true,"journalist.aero":true,"leasing.aero":true,"logistics.aero":true,"magazine.aero":true,"maintenance.aero":true,"media.aero":true,"microlight.aero":true,"modelling.aero":true,"navigation.aero":true,"parachuting.aero":true,"paragliding.aero":true,"passenger-association.aero":true,"pilot.aero":true,"press.aero":true,"production.aero":true,"recreation.aero":true,"repbody.aero":true,"res.aero":true,"research.aero":true,"rotorcraft.aero":true,"safety.aero":true,"scientist.aero":true,"services.aero":true,"show.aero":true,"skydiving.aero":true,"software.aero":true,"student.aero":true,"trader.aero":true,"trading.aero":true,"trainer.aero":true,"union.aero":true,"workinggroup.aero":true,"works.aero":true,"af":true,"gov.af":true,"com.af":true,"org.af":true,"net.af":true,"edu.af":true,"ag":true,"com.ag":true,"org.ag":true,"net.ag":true,"co.ag":true,"nom.ag":true,"ai":true,"off.ai":true,"com.ai":true,"net.ai":true,"org.ai":true,"al":true,"com.al":true,"edu.al":true,"gov.al":true,"mil.al":true,"net.al":true,"org.al":true,"am":true,"ao":true,"ed.ao":true,"gv.ao":true,"og.ao":true,"co.ao":true,"pb.ao":true,"it.ao":true,"aq":true,"ar":true,"com.ar":true,"edu.ar":true,"gob.ar":true,"gov.ar":true,"int.ar":true,"mil.ar":true,"net.ar":true,"org.ar":true,"tur.ar":true,"arpa":true,"e164.arpa":true,"in-addr.arpa":true,"ip6.arpa":true,"iris.arpa":true,"uri.arpa":true,"urn.arpa":true,"as":true,"gov.as":true,"asia":true,"at":true,"ac.at":true,"co.at":true,"gv.at":true,"or.at":true,"au":true,"com.au":true,"net.au":true,"org.au":true,"edu.au":true,"gov.au":true,"asn.au":true,"id.au":true,"info.au":true,"conf.au":true,"oz.au":true,"act.au":true,"nsw.au":true,"nt.au":true,"qld.au":true,"sa.au":true,"tas.au":true,"vic.au":true,"wa.au":true,"act.edu.au":true,"nsw.edu.au":true,"nt.edu.au":true,"qld.edu.au":true,"sa.edu.au":true,"tas.edu.au":true,"vic.edu.au":true,"wa.edu.au":true,"qld.gov.au":true,"sa.gov.au":true,"tas.gov.au":true,"vic.gov.au":true,"wa.gov.au":true,"aw":true,"com.aw":true,"ax":true,"az":true,"com.az":true,"net.az":true,"int.az":true,"gov.az":true,"org.az":true,"edu.az":true,"info.az":true,"pp.az":true,"mil.az":true,"name.az":true,"pro.az":true,"biz.az":true,"ba":true,"com.ba":true,"edu.ba":true,"gov.ba":true,"mil.ba":true,"net.ba":true,"org.ba":true,"bb":true,"biz.bb":true,"co.bb":true,"com.bb":true,"edu.bb":true,"gov.bb":true,"info.bb":true,"net.bb":true,"org.bb":true,"store.bb":true,"tv.bb":true,"*.bd":true,"be":true,"ac.be":true,"bf":true,"gov.bf":true,"bg":true,"a.bg":true,"b.bg":true,"c.bg":true,"d.bg":true,"e.bg":true,"f.bg":true,"g.bg":true,"h.bg":true,"i.bg":true,"j.bg":true,"k.bg":true,"l.bg":true,"m.bg":true,"n.bg":true,"o.bg":true,"p.bg":true,"q.bg":true,"r.bg":true,"s.bg":true,"t.bg":true,"u.bg":true,"v.bg":true,"w.bg":true,"x.bg":true,"y.bg":true,"z.bg":true,"0.bg":true,"1.bg":true,"2.bg":true,"3.bg":true,"4.bg":true,"5.bg":true,"6.bg":true,"7.bg":true,"8.bg":true,"9.bg":true,"bh":true,"com.bh":true,"edu.bh":true,"net.bh":true,"org.bh":true,"gov.bh":true,"bi":true,"co.bi":true,"com.bi":true,"edu.bi":true,"or.bi":true,"org.bi":true,"biz":true,"bj":true,"asso.bj":true,"barreau.bj":true,"gouv.bj":true,"bm":true,"com.bm":true,"edu.bm":true,"gov.bm":true,"net.bm":true,"org.bm":true,"*.bn":true,"bo":true,"com.bo":true,"edu.bo":true,"gov.bo":true,"gob.bo":true,"int.bo":true,"org.bo":true,"net.bo":true,"mil.bo":true,"tv.bo":true,"br":true,"adm.br":true,"adv.br":true,"agr.br":true,"am.br":true,"arq.br":true,"art.br":true,"ato.br":true,"b.br":true,"bio.br":true,"blog.br":true,"bmd.br":true,"cim.br":true,"cng.br":true,"cnt.br":true,"com.br":true,"coop.br":true,"ecn.br":true,"eco.br":true,"edu.br":true,"emp.br":true,"eng.br":true,"esp.br":true,"etc.br":true,"eti.br":true,"far.br":true,"flog.br":true,"fm.br":true,"fnd.br":true,"fot.br":true,"fst.br":true,"g12.br":true,"ggf.br":true,"gov.br":true,"imb.br":true,"ind.br":true,"inf.br":true,"jor.br":true,"jus.br":true,"leg.br":true,"lel.br":true,"mat.br":true,"med.br":true,"mil.br":true,"mp.br":true,"mus.br":true,"net.br":true,"*.nom.br":true,"not.br":true,"ntr.br":true,"odo.br":true,"org.br":true,"ppg.br":true,"pro.br":true,"psc.br":true,"psi.br":true,"qsl.br":true,"radio.br":true,"rec.br":true,"slg.br":true,"srv.br":true,"taxi.br":true,"teo.br":true,"tmp.br":true,"trd.br":true,"tur.br":true,"tv.br":true,"vet.br":true,"vlog.br":true,"wiki.br":true,"zlg.br":true,"bs":true,"com.bs":true,"net.bs":true,"org.bs":true,"edu.bs":true,"gov.bs":true,"bt":true,"com.bt":true,"edu.bt":true,"gov.bt":true,"net.bt":true,"org.bt":true,"bv":true,"bw":true,"co.bw":true,"org.bw":true,"by":true,"gov.by":true,"mil.by":true,"com.by":true,"of.by":true,"bz":true,"com.bz":true,"net.bz":true,"org.bz":true,"edu.bz":true,"gov.bz":true,"ca":true,"ab.ca":true,"bc.ca":true,"mb.ca":true,"nb.ca":true,"nf.ca":true,"nl.ca":true,"ns.ca":true,"nt.ca":true,"nu.ca":true,"on.ca":true,"pe.ca":true,"qc.ca":true,"sk.ca":true,"yk.ca":true,"gc.ca":true,"cat":true,"cc":true,"cd":true,"gov.cd":true,"cf":true,"cg":true,"ch":true,"ci":true,"org.ci":true,"or.ci":true,"com.ci":true,"co.ci":true,"edu.ci":true,"ed.ci":true,"ac.ci":true,"net.ci":true,"go.ci":true,"asso.ci":true,"xn--aroport-bya.ci":true,"int.ci":true,"presse.ci":true,"md.ci":true,"gouv.ci":true,"*.ck":true,"www.ck":false,"cl":true,"gov.cl":true,"gob.cl":true,"co.cl":true,"mil.cl":true,"cm":true,"co.cm":true,"com.cm":true,"gov.cm":true,"net.cm":true,"cn":true,"ac.cn":true,"com.cn":true,"edu.cn":true,"gov.cn":true,"net.cn":true,"org.cn":true,"mil.cn":true,"xn--55qx5d.cn":true,"xn--io0a7i.cn":true,"xn--od0alg.cn":true,"ah.cn":true,"bj.cn":true,"cq.cn":true,"fj.cn":true,"gd.cn":true,"gs.cn":true,"gz.cn":true,"gx.cn":true,"ha.cn":true,"hb.cn":true,"he.cn":true,"hi.cn":true,"hl.cn":true,"hn.cn":true,"jl.cn":true,"js.cn":true,"jx.cn":true,"ln.cn":true,"nm.cn":true,"nx.cn":true,"qh.cn":true,"sc.cn":true,"sd.cn":true,"sh.cn":true,"sn.cn":true,"sx.cn":true,"tj.cn":true,"xj.cn":true,"xz.cn":true,"yn.cn":true,"zj.cn":true,"hk.cn":true,"mo.cn":true,"tw.cn":true,"co":true,"arts.co":true,"com.co":true,"edu.co":true,"firm.co":true,"gov.co":true,"info.co":true,"int.co":true,"mil.co":true,"net.co":true,"nom.co":true,"org.co":true,"rec.co":true,"web.co":true,"com":true,"coop":true,"cr":true,"ac.cr":true,"co.cr":true,"ed.cr":true,"fi.cr":true,"go.cr":true,"or.cr":true,"sa.cr":true,"cu":true,"com.cu":true,"edu.cu":true,"org.cu":true,"net.cu":true,"gov.cu":true,"inf.cu":true,"cv":true,"cw":true,"com.cw":true,"edu.cw":true,"net.cw":true,"org.cw":true,"cx":true,"gov.cx":true,"cy":true,"ac.cy":true,"biz.cy":true,"com.cy":true,"ekloges.cy":true,"gov.cy":true,"ltd.cy":true,"name.cy":true,"net.cy":true,"org.cy":true,"parliament.cy":true,"press.cy":true,"pro.cy":true,"tm.cy":true,"cz":true,"de":true,"dj":true,"dk":true,"dm":true,"com.dm":true,"net.dm":true,"org.dm":true,"edu.dm":true,"gov.dm":true,"do":true,"art.do":true,"com.do":true,"edu.do":true,"gob.do":true,"gov.do":true,"mil.do":true,"net.do":true,"org.do":true,"sld.do":true,"web.do":true,"dz":true,"com.dz":true,"org.dz":true,"net.dz":true,"gov.dz":true,"edu.dz":true,"asso.dz":true,"pol.dz":true,"art.dz":true,"ec":true,"com.ec":true,"info.ec":true,"net.ec":true,"fin.ec":true,"k12.ec":true,"med.ec":true,"pro.ec":true,"org.ec":true,"edu.ec":true,"gov.ec":true,"gob.ec":true,"mil.ec":true,"edu":true,"ee":true,"edu.ee":true,"gov.ee":true,"riik.ee":true,"lib.ee":true,"med.ee":true,"com.ee":true,"pri.ee":true,"aip.ee":true,"org.ee":true,"fie.ee":true,"eg":true,"com.eg":true,"edu.eg":true,"eun.eg":true,"gov.eg":true,"mil.eg":true,"name.eg":true,"net.eg":true,"org.eg":true,"sci.eg":true,"*.er":true,"es":true,"com.es":true,"nom.es":true,"org.es":true,"gob.es":true,"edu.es":true,"et":true,"com.et":true,"gov.et":true,"org.et":true,"edu.et":true,"biz.et":true,"name.et":true,"info.et":true,"net.et":true,"eu":true,"fi":true,"aland.fi":true,"*.fj":true,"*.fk":true,"fm":true,"fo":true,"fr":true,"com.fr":true,"asso.fr":true,"nom.fr":true,"prd.fr":true,"presse.fr":true,"tm.fr":true,"aeroport.fr":true,"assedic.fr":true,"avocat.fr":true,"avoues.fr":true,"cci.fr":true,"chambagri.fr":true,"chirurgiens-dentistes.fr":true,"experts-comptables.fr":true,"geometre-expert.fr":true,"gouv.fr":true,"greta.fr":true,"huissier-justice.fr":true,"medecin.fr":true,"notaires.fr":true,"pharmacien.fr":true,"port.fr":true,"veterinaire.fr":true,"ga":true,"gb":true,"gd":true,"ge":true,"com.ge":true,"edu.ge":true,"gov.ge":true,"org.ge":true,"mil.ge":true,"net.ge":true,"pvt.ge":true,"gf":true,"gg":true,"co.gg":true,"net.gg":true,"org.gg":true,"gh":true,"com.gh":true,"edu.gh":true,"gov.gh":true,"org.gh":true,"mil.gh":true,"gi":true,"com.gi":true,"ltd.gi":true,"gov.gi":true,"mod.gi":true,"edu.gi":true,"org.gi":true,"gl":true,"co.gl":true,"com.gl":true,"edu.gl":true,"net.gl":true,"org.gl":true,"gm":true,"gn":true,"ac.gn":true,"com.gn":true,"edu.gn":true,"gov.gn":true,"org.gn":true,"net.gn":true,"gov":true,"gp":true,"com.gp":true,"net.gp":true,"mobi.gp":true,"edu.gp":true,"org.gp":true,"asso.gp":true,"gq":true,"gr":true,"com.gr":true,"edu.gr":true,"net.gr":true,"org.gr":true,"gov.gr":true,"gs":true,"gt":true,"com.gt":true,"edu.gt":true,"gob.gt":true,"ind.gt":true,"mil.gt":true,"net.gt":true,"org.gt":true,"*.gu":true,"gw":true,"gy":true,"co.gy":true,"com.gy":true,"edu.gy":true,"gov.gy":true,"net.gy":true,"org.gy":true,"hk":true,"com.hk":true,"edu.hk":true,"gov.hk":true,"idv.hk":true,"net.hk":true,"org.hk":true,"xn--55qx5d.hk":true,"xn--wcvs22d.hk":true,"xn--lcvr32d.hk":true,"xn--mxtq1m.hk":true,"xn--gmqw5a.hk":true,"xn--ciqpn.hk":true,"xn--gmq050i.hk":true,"xn--zf0avx.hk":true,"xn--io0a7i.hk":true,"xn--mk0axi.hk":true,"xn--od0alg.hk":true,"xn--od0aq3b.hk":true,"xn--tn0ag.hk":true,"xn--uc0atv.hk":true,"xn--uc0ay4a.hk":true,"hm":true,"hn":true,"com.hn":true,"edu.hn":true,"org.hn":true,"net.hn":true,"mil.hn":true,"gob.hn":true,"hr":true,"iz.hr":true,"from.hr":true,"name.hr":true,"com.hr":true,"ht":true,"com.ht":true,"shop.ht":true,"firm.ht":true,"info.ht":true,"adult.ht":true,"net.ht":true,"pro.ht":true,"org.ht":true,"med.ht":true,"art.ht":true,"coop.ht":true,"pol.ht":true,"asso.ht":true,"edu.ht":true,"rel.ht":true,"gouv.ht":true,"perso.ht":true,"hu":true,"co.hu":true,"info.hu":true,"org.hu":true,"priv.hu":true,"sport.hu":true,"tm.hu":true,"2000.hu":true,"agrar.hu":true,"bolt.hu":true,"casino.hu":true,"city.hu":true,"erotica.hu":true,"erotika.hu":true,"film.hu":true,"forum.hu":true,"games.hu":true,"hotel.hu":true,"ingatlan.hu":true,"jogasz.hu":true,"konyvelo.hu":true,"lakas.hu":true,"media.hu":true,"news.hu":true,"reklam.hu":true,"sex.hu":true,"shop.hu":true,"suli.hu":true,"szex.hu":true,"tozsde.hu":true,"utazas.hu":true,"video.hu":true,"id":true,"ac.id":true,"biz.id":true,"co.id":true,"desa.id":true,"go.id":true,"mil.id":true,"my.id":true,"net.id":true,"or.id":true,"sch.id":true,"web.id":true,"ie":true,"gov.ie":true,"il":true,"ac.il":true,"co.il":true,"gov.il":true,"idf.il":true,"k12.il":true,"muni.il":true,"net.il":true,"org.il":true,"im":true,"ac.im":true,"co.im":true,"com.im":true,"ltd.co.im":true,"net.im":true,"org.im":true,"plc.co.im":true,"tt.im":true,"tv.im":true,"in":true,"co.in":true,"firm.in":true,"net.in":true,"org.in":true,"gen.in":true,"ind.in":true,"nic.in":true,"ac.in":true,"edu.in":true,"res.in":true,"gov.in":true,"mil.in":true,"info":true,"int":true,"eu.int":true,"io":true,"com.io":true,"iq":true,"gov.iq":true,"edu.iq":true,"mil.iq":true,"com.iq":true,"org.iq":true,"net.iq":true,"ir":true,"ac.ir":true,"co.ir":true,"gov.ir":true,"id.ir":true,"net.ir":true,"org.ir":true,"sch.ir":true,"xn--mgba3a4f16a.ir":true,"xn--mgba3a4fra.ir":true,"is":true,"net.is":true,"com.is":true,"edu.is":true,"gov.is":true,"org.is":true,"int.is":true,"it":true,"gov.it":true,"edu.it":true,"abr.it":true,"abruzzo.it":true,"aosta-valley.it":true,"aostavalley.it":true,"bas.it":true,"basilicata.it":true,"cal.it":true,"calabria.it":true,"cam.it":true,"campania.it":true,"emilia-romagna.it":true,"emiliaromagna.it":true,"emr.it":true,"friuli-v-giulia.it":true,"friuli-ve-giulia.it":true,"friuli-vegiulia.it":true,"friuli-venezia-giulia.it":true,"friuli-veneziagiulia.it":true,"friuli-vgiulia.it":true,"friuliv-giulia.it":true,"friulive-giulia.it":true,"friulivegiulia.it":true,"friulivenezia-giulia.it":true,"friuliveneziagiulia.it":true,"friulivgiulia.it":true,"fvg.it":true,"laz.it":true,"lazio.it":true,"lig.it":true,"liguria.it":true,"lom.it":true,"lombardia.it":true,"lombardy.it":true,"lucania.it":true,"mar.it":true,"marche.it":true,"mol.it":true,"molise.it":true,"piedmont.it":true,"piemonte.it":true,"pmn.it":true,"pug.it":true,"puglia.it":true,"sar.it":true,"sardegna.it":true,"sardinia.it":true,"sic.it":true,"sicilia.it":true,"sicily.it":true,"taa.it":true,"tos.it":true,"toscana.it":true,"trentino-a-adige.it":true,"trentino-aadige.it":true,"trentino-alto-adige.it":true,"trentino-altoadige.it":true,"trentino-s-tirol.it":true,"trentino-stirol.it":true,"trentino-sud-tirol.it":true,"trentino-sudtirol.it":true,"trentino-sued-tirol.it":true,"trentino-suedtirol.it":true,"trentinoa-adige.it":true,"trentinoaadige.it":true,"trentinoalto-adige.it":true,"trentinoaltoadige.it":true,"trentinos-tirol.it":true,"trentinostirol.it":true,"trentinosud-tirol.it":true,"trentinosudtirol.it":true,"trentinosued-tirol.it":true,"trentinosuedtirol.it":true,"tuscany.it":true,"umb.it":true,"umbria.it":true,"val-d-aosta.it":true,"val-daosta.it":true,"vald-aosta.it":true,"valdaosta.it":true,"valle-aosta.it":true,"valle-d-aosta.it":true,"valle-daosta.it":true,"valleaosta.it":true,"valled-aosta.it":true,"valledaosta.it":true,"vallee-aoste.it":true,"valleeaoste.it":true,"vao.it":true,"vda.it":true,"ven.it":true,"veneto.it":true,"ag.it":true,"agrigento.it":true,"al.it":true,"alessandria.it":true,"alto-adige.it":true,"altoadige.it":true,"an.it":true,"ancona.it":true,"andria-barletta-trani.it":true,"andria-trani-barletta.it":true,"andriabarlettatrani.it":true,"andriatranibarletta.it":true,"ao.it":true,"aosta.it":true,"aoste.it":true,"ap.it":true,"aq.it":true,"aquila.it":true,"ar.it":true,"arezzo.it":true,"ascoli-piceno.it":true,"ascolipiceno.it":true,"asti.it":true,"at.it":true,"av.it":true,"avellino.it":true,"ba.it":true,"balsan.it":true,"bari.it":true,"barletta-trani-andria.it":true,"barlettatraniandria.it":true,"belluno.it":true,"benevento.it":true,"bergamo.it":true,"bg.it":true,"bi.it":true,"biella.it":true,"bl.it":true,"bn.it":true,"bo.it":true,"bologna.it":true,"bolzano.it":true,"bozen.it":true,"br.it":true,"brescia.it":true,"brindisi.it":true,"bs.it":true,"bt.it":true,"bz.it":true,"ca.it":true,"cagliari.it":true,"caltanissetta.it":true,"campidano-medio.it":true,"campidanomedio.it":true,"campobasso.it":true,"carbonia-iglesias.it":true,"carboniaiglesias.it":true,"carrara-massa.it":true,"carraramassa.it":true,"caserta.it":true,"catania.it":true,"catanzaro.it":true,"cb.it":true,"ce.it":true,"cesena-forli.it":true,"cesenaforli.it":true,"ch.it":true,"chieti.it":true,"ci.it":true,"cl.it":true,"cn.it":true,"co.it":true,"como.it":true,"cosenza.it":true,"cr.it":true,"cremona.it":true,"crotone.it":true,"cs.it":true,"ct.it":true,"cuneo.it":true,"cz.it":true,"dell-ogliastra.it":true,"dellogliastra.it":true,"en.it":true,"enna.it":true,"fc.it":true,"fe.it":true,"fermo.it":true,"ferrara.it":true,"fg.it":true,"fi.it":true,"firenze.it":true,"florence.it":true,"fm.it":true,"foggia.it":true,"forli-cesena.it":true,"forlicesena.it":true,"fr.it":true,"frosinone.it":true,"ge.it":true,"genoa.it":true,"genova.it":true,"go.it":true,"gorizia.it":true,"gr.it":true,"grosseto.it":true,"iglesias-carbonia.it":true,"iglesiascarbonia.it":true,"im.it":true,"imperia.it":true,"is.it":true,"isernia.it":true,"kr.it":true,"la-spezia.it":true,"laquila.it":true,"laspezia.it":true,"latina.it":true,"lc.it":true,"le.it":true,"lecce.it":true,"lecco.it":true,"li.it":true,"livorno.it":true,"lo.it":true,"lodi.it":true,"lt.it":true,"lu.it":true,"lucca.it":true,"macerata.it":true,"mantova.it":true,"massa-carrara.it":true,"massacarrara.it":true,"matera.it":true,"mb.it":true,"mc.it":true,"me.it":true,"medio-campidano.it":true,"mediocampidano.it":true,"messina.it":true,"mi.it":true,"milan.it":true,"milano.it":true,"mn.it":true,"mo.it":true,"modena.it":true,"monza-brianza.it":true,"monza-e-della-brianza.it":true,"monza.it":true,"monzabrianza.it":true,"monzaebrianza.it":true,"monzaedellabrianza.it":true,"ms.it":true,"mt.it":true,"na.it":true,"naples.it":true,"napoli.it":true,"no.it":true,"novara.it":true,"nu.it":true,"nuoro.it":true,"og.it":true,"ogliastra.it":true,"olbia-tempio.it":true,"olbiatempio.it":true,"or.it":true,"oristano.it":true,"ot.it":true,"pa.it":true,"padova.it":true,"padua.it":true,"palermo.it":true,"parma.it":true,"pavia.it":true,"pc.it":true,"pd.it":true,"pe.it":true,"perugia.it":true,"pesaro-urbino.it":true,"pesarourbino.it":true,"pescara.it":true,"pg.it":true,"pi.it":true,"piacenza.it":true,"pisa.it":true,"pistoia.it":true,"pn.it":true,"po.it":true,"pordenone.it":true,"potenza.it":true,"pr.it":true,"prato.it":true,"pt.it":true,"pu.it":true,"pv.it":true,"pz.it":true,"ra.it":true,"ragusa.it":true,"ravenna.it":true,"rc.it":true,"re.it":true,"reggio-calabria.it":true,"reggio-emilia.it":true,"reggiocalabria.it":true,"reggioemilia.it":true,"rg.it":true,"ri.it":true,"rieti.it":true,"rimini.it":true,"rm.it":true,"rn.it":true,"ro.it":true,"roma.it":true,"rome.it":true,"rovigo.it":true,"sa.it":true,"salerno.it":true,"sassari.it":true,"savona.it":true,"si.it":true,"siena.it":true,"siracusa.it":true,"so.it":true,"sondrio.it":true,"sp.it":true,"sr.it":true,"ss.it":true,"suedtirol.it":true,"sv.it":true,"ta.it":true,"taranto.it":true,"te.it":true,"tempio-olbia.it":true,"tempioolbia.it":true,"teramo.it":true,"terni.it":true,"tn.it":true,"to.it":true,"torino.it":true,"tp.it":true,"tr.it":true,"trani-andria-barletta.it":true,"trani-barletta-andria.it":true,"traniandriabarletta.it":true,"tranibarlettaandria.it":true,"trapani.it":true,"trentino.it":true,"trento.it":true,"treviso.it":true,"trieste.it":true,"ts.it":true,"turin.it":true,"tv.it":true,"ud.it":true,"udine.it":true,"urbino-pesaro.it":true,"urbinopesaro.it":true,"va.it":true,"varese.it":true,"vb.it":true,"vc.it":true,"ve.it":true,"venezia.it":true,"venice.it":true,"verbania.it":true,"vercelli.it":true,"verona.it":true,"vi.it":true,"vibo-valentia.it":true,"vibovalentia.it":true,"vicenza.it":true,"viterbo.it":true,"vr.it":true,"vs.it":true,"vt.it":true,"vv.it":true,"je":true,"co.je":true,"net.je":true,"org.je":true,"*.jm":true,"jo":true,"com.jo":true,"org.jo":true,"net.jo":true,"edu.jo":true,"sch.jo":true,"gov.jo":true,"mil.jo":true,"name.jo":true,"jobs":true,"jp":true,"ac.jp":true,"ad.jp":true,"co.jp":true,"ed.jp":true,"go.jp":true,"gr.jp":true,"lg.jp":true,"ne.jp":true,"or.jp":true,"aichi.jp":true,"akita.jp":true,"aomori.jp":true,"chiba.jp":true,"ehime.jp":true,"fukui.jp":true,"fukuoka.jp":true,"fukushima.jp":true,"gifu.jp":true,"gunma.jp":true,"hiroshima.jp":true,"hokkaido.jp":true,"hyogo.jp":true,"ibaraki.jp":true,"ishikawa.jp":true,"iwate.jp":true,"kagawa.jp":true,"kagoshima.jp":true,"kanagawa.jp":true,"kochi.jp":true,"kumamoto.jp":true,"kyoto.jp":true,"mie.jp":true,"miyagi.jp":true,"miyazaki.jp":true,"nagano.jp":true,"nagasaki.jp":true,"nara.jp":true,"niigata.jp":true,"oita.jp":true,"okayama.jp":true,"okinawa.jp":true,"osaka.jp":true,"saga.jp":true,"saitama.jp":true,"shiga.jp":true,"shimane.jp":true,"shizuoka.jp":true,"tochigi.jp":true,"tokushima.jp":true,"tokyo.jp":true,"tottori.jp":true,"toyama.jp":true,"wakayama.jp":true,"yamagata.jp":true,"yamaguchi.jp":true,"yamanashi.jp":true,"xn--4pvxs.jp":true,"xn--vgu402c.jp":true,"xn--c3s14m.jp":true,"xn--f6qx53a.jp":true,"xn--8pvr4u.jp":true,"xn--uist22h.jp":true,"xn--djrs72d6uy.jp":true,"xn--mkru45i.jp":true,"xn--0trq7p7nn.jp":true,"xn--8ltr62k.jp":true,"xn--2m4a15e.jp":true,"xn--efvn9s.jp":true,"xn--32vp30h.jp":true,"xn--4it797k.jp":true,"xn--1lqs71d.jp":true,"xn--5rtp49c.jp":true,"xn--5js045d.jp":true,"xn--ehqz56n.jp":true,"xn--1lqs03n.jp":true,"xn--qqqt11m.jp":true,"xn--kbrq7o.jp":true,"xn--pssu33l.jp":true,"xn--ntsq17g.jp":true,"xn--uisz3g.jp":true,"xn--6btw5a.jp":true,"xn--1ctwo.jp":true,"xn--6orx2r.jp":true,"xn--rht61e.jp":true,"xn--rht27z.jp":true,"xn--djty4k.jp":true,"xn--nit225k.jp":true,"xn--rht3d.jp":true,"xn--klty5x.jp":true,"xn--kltx9a.jp":true,"xn--kltp7d.jp":true,"xn--uuwu58a.jp":true,"xn--zbx025d.jp":true,"xn--ntso0iqx3a.jp":true,"xn--elqq16h.jp":true,"xn--4it168d.jp":true,"xn--klt787d.jp":true,"xn--rny31h.jp":true,"xn--7t0a264c.jp":true,"xn--5rtq34k.jp":true,"xn--k7yn95e.jp":true,"xn--tor131o.jp":true,"xn--d5qv7z876c.jp":true,"*.kawasaki.jp":true,"*.kitakyushu.jp":true,"*.kobe.jp":true,"*.nagoya.jp":true,"*.sapporo.jp":true,"*.sendai.jp":true,"*.yokohama.jp":true,"city.kawasaki.jp":false,"city.kitakyushu.jp":false,"city.kobe.jp":false,"city.nagoya.jp":false,"city.sapporo.jp":false,"city.sendai.jp":false,"city.yokohama.jp":false,"aisai.aichi.jp":true,"ama.aichi.jp":true,"anjo.aichi.jp":true,"asuke.aichi.jp":true,"chiryu.aichi.jp":true,"chita.aichi.jp":true,"fuso.aichi.jp":true,"gamagori.aichi.jp":true,"handa.aichi.jp":true,"hazu.aichi.jp":true,"hekinan.aichi.jp":true,"higashiura.aichi.jp":true,"ichinomiya.aichi.jp":true,"inazawa.aichi.jp":true,"inuyama.aichi.jp":true,"isshiki.aichi.jp":true,"iwakura.aichi.jp":true,"kanie.aichi.jp":true,"kariya.aichi.jp":true,"kasugai.aichi.jp":true,"kira.aichi.jp":true,"kiyosu.aichi.jp":true,"komaki.aichi.jp":true,"konan.aichi.jp":true,"kota.aichi.jp":true,"mihama.aichi.jp":true,"miyoshi.aichi.jp":true,"nishio.aichi.jp":true,"nisshin.aichi.jp":true,"obu.aichi.jp":true,"oguchi.aichi.jp":true,"oharu.aichi.jp":true,"okazaki.aichi.jp":true,"owariasahi.aichi.jp":true,"seto.aichi.jp":true,"shikatsu.aichi.jp":true,"shinshiro.aichi.jp":true,"shitara.aichi.jp":true,"tahara.aichi.jp":true,"takahama.aichi.jp":true,"tobishima.aichi.jp":true,"toei.aichi.jp":true,"togo.aichi.jp":true,"tokai.aichi.jp":true,"tokoname.aichi.jp":true,"toyoake.aichi.jp":true,"toyohashi.aichi.jp":true,"toyokawa.aichi.jp":true,"toyone.aichi.jp":true,"toyota.aichi.jp":true,"tsushima.aichi.jp":true,"yatomi.aichi.jp":true,"akita.akita.jp":true,"daisen.akita.jp":true,"fujisato.akita.jp":true,"gojome.akita.jp":true,"hachirogata.akita.jp":true,"happou.akita.jp":true,"higashinaruse.akita.jp":true,"honjo.akita.jp":true,"honjyo.akita.jp":true,"ikawa.akita.jp":true,"kamikoani.akita.jp":true,"kamioka.akita.jp":true,"katagami.akita.jp":true,"kazuno.akita.jp":true,"kitaakita.akita.jp":true,"kosaka.akita.jp":true,"kyowa.akita.jp":true,"misato.akita.jp":true,"mitane.akita.jp":true,"moriyoshi.akita.jp":true,"nikaho.akita.jp":true,"noshiro.akita.jp":true,"odate.akita.jp":true,"oga.akita.jp":true,"ogata.akita.jp":true,"semboku.akita.jp":true,"yokote.akita.jp":true,"yurihonjo.akita.jp":true,"aomori.aomori.jp":true,"gonohe.aomori.jp":true,"hachinohe.aomori.jp":true,"hashikami.aomori.jp":true,"hiranai.aomori.jp":true,"hirosaki.aomori.jp":true,"itayanagi.aomori.jp":true,"kuroishi.aomori.jp":true,"misawa.aomori.jp":true,"mutsu.aomori.jp":true,"nakadomari.aomori.jp":true,"noheji.aomori.jp":true,"oirase.aomori.jp":true,"owani.aomori.jp":true,"rokunohe.aomori.jp":true,"sannohe.aomori.jp":true,"shichinohe.aomori.jp":true,"shingo.aomori.jp":true,"takko.aomori.jp":true,"towada.aomori.jp":true,"tsugaru.aomori.jp":true,"tsuruta.aomori.jp":true,"abiko.chiba.jp":true,"asahi.chiba.jp":true,"chonan.chiba.jp":true,"chosei.chiba.jp":true,"choshi.chiba.jp":true,"chuo.chiba.jp":true,"funabashi.chiba.jp":true,"futtsu.chiba.jp":true,"hanamigawa.chiba.jp":true,"ichihara.chiba.jp":true,"ichikawa.chiba.jp":true,"ichinomiya.chiba.jp":true,"inzai.chiba.jp":true,"isumi.chiba.jp":true,"kamagaya.chiba.jp":true,"kamogawa.chiba.jp":true,"kashiwa.chiba.jp":true,"katori.chiba.jp":true,"katsuura.chiba.jp":true,"kimitsu.chiba.jp":true,"kisarazu.chiba.jp":true,"kozaki.chiba.jp":true,"kujukuri.chiba.jp":true,"kyonan.chiba.jp":true,"matsudo.chiba.jp":true,"midori.chiba.jp":true,"mihama.chiba.jp":true,"minamiboso.chiba.jp":true,"mobara.chiba.jp":true,"mutsuzawa.chiba.jp":true,"nagara.chiba.jp":true,"nagareyama.chiba.jp":true,"narashino.chiba.jp":true,"narita.chiba.jp":true,"noda.chiba.jp":true,"oamishirasato.chiba.jp":true,"omigawa.chiba.jp":true,"onjuku.chiba.jp":true,"otaki.chiba.jp":true,"sakae.chiba.jp":true,"sakura.chiba.jp":true,"shimofusa.chiba.jp":true,"shirako.chiba.jp":true,"shiroi.chiba.jp":true,"shisui.chiba.jp":true,"sodegaura.chiba.jp":true,"sosa.chiba.jp":true,"tako.chiba.jp":true,"tateyama.chiba.jp":true,"togane.chiba.jp":true,"tohnosho.chiba.jp":true,"tomisato.chiba.jp":true,"urayasu.chiba.jp":true,"yachimata.chiba.jp":true,"yachiyo.chiba.jp":true,"yokaichiba.chiba.jp":true,"yokoshibahikari.chiba.jp":true,"yotsukaido.chiba.jp":true,"ainan.ehime.jp":true,"honai.ehime.jp":true,"ikata.ehime.jp":true,"imabari.ehime.jp":true,"iyo.ehime.jp":true,"kamijima.ehime.jp":true,"kihoku.ehime.jp":true,"kumakogen.ehime.jp":true,"masaki.ehime.jp":true,"matsuno.ehime.jp":true,"matsuyama.ehime.jp":true,"namikata.ehime.jp":true,"niihama.ehime.jp":true,"ozu.ehime.jp":true,"saijo.ehime.jp":true,"seiyo.ehime.jp":true,"shikokuchuo.ehime.jp":true,"tobe.ehime.jp":true,"toon.ehime.jp":true,"uchiko.ehime.jp":true,"uwajima.ehime.jp":true,"yawatahama.ehime.jp":true,"echizen.fukui.jp":true,"eiheiji.fukui.jp":true,"fukui.fukui.jp":true,"ikeda.fukui.jp":true,"katsuyama.fukui.jp":true,"mihama.fukui.jp":true,"minamiechizen.fukui.jp":true,"obama.fukui.jp":true,"ohi.fukui.jp":true,"ono.fukui.jp":true,"sabae.fukui.jp":true,"sakai.fukui.jp":true,"takahama.fukui.jp":true,"tsuruga.fukui.jp":true,"wakasa.fukui.jp":true,"ashiya.fukuoka.jp":true,"buzen.fukuoka.jp":true,"chikugo.fukuoka.jp":true,"chikuho.fukuoka.jp":true,"chikujo.fukuoka.jp":true,"chikushino.fukuoka.jp":true,"chikuzen.fukuoka.jp":true,"chuo.fukuoka.jp":true,"dazaifu.fukuoka.jp":true,"fukuchi.fukuoka.jp":true,"hakata.fukuoka.jp":true,"higashi.fukuoka.jp":true,"hirokawa.fukuoka.jp":true,"hisayama.fukuoka.jp":true,"iizuka.fukuoka.jp":true,"inatsuki.fukuoka.jp":true,"kaho.fukuoka.jp":true,"kasuga.fukuoka.jp":true,"kasuya.fukuoka.jp":true,"kawara.fukuoka.jp":true,"keisen.fukuoka.jp":true,"koga.fukuoka.jp":true,"kurate.fukuoka.jp":true,"kurogi.fukuoka.jp":true,"kurume.fukuoka.jp":true,"minami.fukuoka.jp":true,"miyako.fukuoka.jp":true,"miyama.fukuoka.jp":true,"miyawaka.fukuoka.jp":true,"mizumaki.fukuoka.jp":true,"munakata.fukuoka.jp":true,"nakagawa.fukuoka.jp":true,"nakama.fukuoka.jp":true,"nishi.fukuoka.jp":true,"nogata.fukuoka.jp":true,"ogori.fukuoka.jp":true,"okagaki.fukuoka.jp":true,"okawa.fukuoka.jp":true,"oki.fukuoka.jp":true,"omuta.fukuoka.jp":true,"onga.fukuoka.jp":true,"onojo.fukuoka.jp":true,"oto.fukuoka.jp":true,"saigawa.fukuoka.jp":true,"sasaguri.fukuoka.jp":true,"shingu.fukuoka.jp":true,"shinyoshitomi.fukuoka.jp":true,"shonai.fukuoka.jp":true,"soeda.fukuoka.jp":true,"sue.fukuoka.jp":true,"tachiarai.fukuoka.jp":true,"tagawa.fukuoka.jp":true,"takata.fukuoka.jp":true,"toho.fukuoka.jp":true,"toyotsu.fukuoka.jp":true,"tsuiki.fukuoka.jp":true,"ukiha.fukuoka.jp":true,"umi.fukuoka.jp":true,"usui.fukuoka.jp":true,"yamada.fukuoka.jp":true,"yame.fukuoka.jp":true,"yanagawa.fukuoka.jp":true,"yukuhashi.fukuoka.jp":true,"aizubange.fukushima.jp":true,"aizumisato.fukushima.jp":true,"aizuwakamatsu.fukushima.jp":true,"asakawa.fukushima.jp":true,"bandai.fukushima.jp":true,"date.fukushima.jp":true,"fukushima.fukushima.jp":true,"furudono.fukushima.jp":true,"futaba.fukushima.jp":true,"hanawa.fukushima.jp":true,"higashi.fukushima.jp":true,"hirata.fukushima.jp":true,"hirono.fukushima.jp":true,"iitate.fukushima.jp":true,"inawashiro.fukushima.jp":true,"ishikawa.fukushima.jp":true,"iwaki.fukushima.jp":true,"izumizaki.fukushima.jp":true,"kagamiishi.fukushima.jp":true,"kaneyama.fukushima.jp":true,"kawamata.fukushima.jp":true,"kitakata.fukushima.jp":true,"kitashiobara.fukushima.jp":true,"koori.fukushima.jp":true,"koriyama.fukushima.jp":true,"kunimi.fukushima.jp":true,"miharu.fukushima.jp":true,"mishima.fukushima.jp":true,"namie.fukushima.jp":true,"nango.fukushima.jp":true,"nishiaizu.fukushima.jp":true,"nishigo.fukushima.jp":true,"okuma.fukushima.jp":true,"omotego.fukushima.jp":true,"ono.fukushima.jp":true,"otama.fukushima.jp":true,"samegawa.fukushima.jp":true,"shimogo.fukushima.jp":true,"shirakawa.fukushima.jp":true,"showa.fukushima.jp":true,"soma.fukushima.jp":true,"sukagawa.fukushima.jp":true,"taishin.fukushima.jp":true,"tamakawa.fukushima.jp":true,"tanagura.fukushima.jp":true,"tenei.fukushima.jp":true,"yabuki.fukushima.jp":true,"yamato.fukushima.jp":true,"yamatsuri.fukushima.jp":true,"yanaizu.fukushima.jp":true,"yugawa.fukushima.jp":true,"anpachi.gifu.jp":true,"ena.gifu.jp":true,"gifu.gifu.jp":true,"ginan.gifu.jp":true,"godo.gifu.jp":true,"gujo.gifu.jp":true,"hashima.gifu.jp":true,"hichiso.gifu.jp":true,"hida.gifu.jp":true,"higashishirakawa.gifu.jp":true,"ibigawa.gifu.jp":true,"ikeda.gifu.jp":true,"kakamigahara.gifu.jp":true,"kani.gifu.jp":true,"kasahara.gifu.jp":true,"kasamatsu.gifu.jp":true,"kawaue.gifu.jp":true,"kitagata.gifu.jp":true,"mino.gifu.jp":true,"minokamo.gifu.jp":true,"mitake.gifu.jp":true,"mizunami.gifu.jp":true,"motosu.gifu.jp":true,"nakatsugawa.gifu.jp":true,"ogaki.gifu.jp":true,"sakahogi.gifu.jp":true,"seki.gifu.jp":true,"sekigahara.gifu.jp":true,"shirakawa.gifu.jp":true,"tajimi.gifu.jp":true,"takayama.gifu.jp":true,"tarui.gifu.jp":true,"toki.gifu.jp":true,"tomika.gifu.jp":true,"wanouchi.gifu.jp":true,"yamagata.gifu.jp":true,"yaotsu.gifu.jp":true,"yoro.gifu.jp":true,"annaka.gunma.jp":true,"chiyoda.gunma.jp":true,"fujioka.gunma.jp":true,"higashiagatsuma.gunma.jp":true,"isesaki.gunma.jp":true,"itakura.gunma.jp":true,"kanna.gunma.jp":true,"kanra.gunma.jp":true,"katashina.gunma.jp":true,"kawaba.gunma.jp":true,"kiryu.gunma.jp":true,"kusatsu.gunma.jp":true,"maebashi.gunma.jp":true,"meiwa.gunma.jp":true,"midori.gunma.jp":true,"minakami.gunma.jp":true,"naganohara.gunma.jp":true,"nakanojo.gunma.jp":true,"nanmoku.gunma.jp":true,"numata.gunma.jp":true,"oizumi.gunma.jp":true,"ora.gunma.jp":true,"ota.gunma.jp":true,"shibukawa.gunma.jp":true,"shimonita.gunma.jp":true,"shinto.gunma.jp":true,"showa.gunma.jp":true,"takasaki.gunma.jp":true,"takayama.gunma.jp":true,"tamamura.gunma.jp":true,"tatebayashi.gunma.jp":true,"tomioka.gunma.jp":true,"tsukiyono.gunma.jp":true,"tsumagoi.gunma.jp":true,"ueno.gunma.jp":true,"yoshioka.gunma.jp":true,"asaminami.hiroshima.jp":true,"daiwa.hiroshima.jp":true,"etajima.hiroshima.jp":true,"fuchu.hiroshima.jp":true,"fukuyama.hiroshima.jp":true,"hatsukaichi.hiroshima.jp":true,"higashihiroshima.hiroshima.jp":true,"hongo.hiroshima.jp":true,"jinsekikogen.hiroshima.jp":true,"kaita.hiroshima.jp":true,"kui.hiroshima.jp":true,"kumano.hiroshima.jp":true,"kure.hiroshima.jp":true,"mihara.hiroshima.jp":true,"miyoshi.hiroshima.jp":true,"naka.hiroshima.jp":true,"onomichi.hiroshima.jp":true,"osakikamijima.hiroshima.jp":true,"otake.hiroshima.jp":true,"saka.hiroshima.jp":true,"sera.hiroshima.jp":true,"seranishi.hiroshima.jp":true,"shinichi.hiroshima.jp":true,"shobara.hiroshima.jp":true,"takehara.hiroshima.jp":true,"abashiri.hokkaido.jp":true,"abira.hokkaido.jp":true,"aibetsu.hokkaido.jp":true,"akabira.hokkaido.jp":true,"akkeshi.hokkaido.jp":true,"asahikawa.hokkaido.jp":true,"ashibetsu.hokkaido.jp":true,"ashoro.hokkaido.jp":true,"assabu.hokkaido.jp":true,"atsuma.hokkaido.jp":true,"bibai.hokkaido.jp":true,"biei.hokkaido.jp":true,"bifuka.hokkaido.jp":true,"bihoro.hokkaido.jp":true,"biratori.hokkaido.jp":true,"chippubetsu.hokkaido.jp":true,"chitose.hokkaido.jp":true,"date.hokkaido.jp":true,"ebetsu.hokkaido.jp":true,"embetsu.hokkaido.jp":true,"eniwa.hokkaido.jp":true,"erimo.hokkaido.jp":true,"esan.hokkaido.jp":true,"esashi.hokkaido.jp":true,"fukagawa.hokkaido.jp":true,"fukushima.hokkaido.jp":true,"furano.hokkaido.jp":true,"furubira.hokkaido.jp":true,"haboro.hokkaido.jp":true,"hakodate.hokkaido.jp":true,"hamatonbetsu.hokkaido.jp":true,"hidaka.hokkaido.jp":true,"higashikagura.hokkaido.jp":true,"higashikawa.hokkaido.jp":true,"hiroo.hokkaido.jp":true,"hokuryu.hokkaido.jp":true,"hokuto.hokkaido.jp":true,"honbetsu.hokkaido.jp":true,"horokanai.hokkaido.jp":true,"horonobe.hokkaido.jp":true,"ikeda.hokkaido.jp":true,"imakane.hokkaido.jp":true,"ishikari.hokkaido.jp":true,"iwamizawa.hokkaido.jp":true,"iwanai.hokkaido.jp":true,"kamifurano.hokkaido.jp":true,"kamikawa.hokkaido.jp":true,"kamishihoro.hokkaido.jp":true,"kamisunagawa.hokkaido.jp":true,"kamoenai.hokkaido.jp":true,"kayabe.hokkaido.jp":true,"kembuchi.hokkaido.jp":true,"kikonai.hokkaido.jp":true,"kimobetsu.hokkaido.jp":true,"kitahiroshima.hokkaido.jp":true,"kitami.hokkaido.jp":true,"kiyosato.hokkaido.jp":true,"koshimizu.hokkaido.jp":true,"kunneppu.hokkaido.jp":true,"kuriyama.hokkaido.jp":true,"kuromatsunai.hokkaido.jp":true,"kushiro.hokkaido.jp":true,"kutchan.hokkaido.jp":true,"kyowa.hokkaido.jp":true,"mashike.hokkaido.jp":true,"matsumae.hokkaido.jp":true,"mikasa.hokkaido.jp":true,"minamifurano.hokkaido.jp":true,"mombetsu.hokkaido.jp":true,"moseushi.hokkaido.jp":true,"mukawa.hokkaido.jp":true,"muroran.hokkaido.jp":true,"naie.hokkaido.jp":true,"nakagawa.hokkaido.jp":true,"nakasatsunai.hokkaido.jp":true,"nakatombetsu.hokkaido.jp":true,"nanae.hokkaido.jp":true,"nanporo.hokkaido.jp":true,"nayoro.hokkaido.jp":true,"nemuro.hokkaido.jp":true,"niikappu.hokkaido.jp":true,"niki.hokkaido.jp":true,"nishiokoppe.hokkaido.jp":true,"noboribetsu.hokkaido.jp":true,"numata.hokkaido.jp":true,"obihiro.hokkaido.jp":true,"obira.hokkaido.jp":true,"oketo.hokkaido.jp":true,"okoppe.hokkaido.jp":true,"otaru.hokkaido.jp":true,"otobe.hokkaido.jp":true,"otofuke.hokkaido.jp":true,"otoineppu.hokkaido.jp":true,"oumu.hokkaido.jp":true,"ozora.hokkaido.jp":true,"pippu.hokkaido.jp":true,"rankoshi.hokkaido.jp":true,"rebun.hokkaido.jp":true,"rikubetsu.hokkaido.jp":true,"rishiri.hokkaido.jp":true,"rishirifuji.hokkaido.jp":true,"saroma.hokkaido.jp":true,"sarufutsu.hokkaido.jp":true,"shakotan.hokkaido.jp":true,"shari.hokkaido.jp":true,"shibecha.hokkaido.jp":true,"shibetsu.hokkaido.jp":true,"shikabe.hokkaido.jp":true,"shikaoi.hokkaido.jp":true,"shimamaki.hokkaido.jp":true,"shimizu.hokkaido.jp":true,"shimokawa.hokkaido.jp":true,"shinshinotsu.hokkaido.jp":true,"shintoku.hokkaido.jp":true,"shiranuka.hokkaido.jp":true,"shiraoi.hokkaido.jp":true,"shiriuchi.hokkaido.jp":true,"sobetsu.hokkaido.jp":true,"sunagawa.hokkaido.jp":true,"taiki.hokkaido.jp":true,"takasu.hokkaido.jp":true,"takikawa.hokkaido.jp":true,"takinoue.hokkaido.jp":true,"teshikaga.hokkaido.jp":true,"tobetsu.hokkaido.jp":true,"tohma.hokkaido.jp":true,"tomakomai.hokkaido.jp":true,"tomari.hokkaido.jp":true,"toya.hokkaido.jp":true,"toyako.hokkaido.jp":true,"toyotomi.hokkaido.jp":true,"toyoura.hokkaido.jp":true,"tsubetsu.hokkaido.jp":true,"tsukigata.hokkaido.jp":true,"urakawa.hokkaido.jp":true,"urausu.hokkaido.jp":true,"uryu.hokkaido.jp":true,"utashinai.hokkaido.jp":true,"wakkanai.hokkaido.jp":true,"wassamu.hokkaido.jp":true,"yakumo.hokkaido.jp":true,"yoichi.hokkaido.jp":true,"aioi.hyogo.jp":true,"akashi.hyogo.jp":true,"ako.hyogo.jp":true,"amagasaki.hyogo.jp":true,"aogaki.hyogo.jp":true,"asago.hyogo.jp":true,"ashiya.hyogo.jp":true,"awaji.hyogo.jp":true,"fukusaki.hyogo.jp":true,"goshiki.hyogo.jp":true,"harima.hyogo.jp":true,"himeji.hyogo.jp":true,"ichikawa.hyogo.jp":true,"inagawa.hyogo.jp":true,"itami.hyogo.jp":true,"kakogawa.hyogo.jp":true,"kamigori.hyogo.jp":true,"kamikawa.hyogo.jp":true,"kasai.hyogo.jp":true,"kasuga.hyogo.jp":true,"kawanishi.hyogo.jp":true,"miki.hyogo.jp":true,"minamiawaji.hyogo.jp":true,"nishinomiya.hyogo.jp":true,"nishiwaki.hyogo.jp":true,"ono.hyogo.jp":true,"sanda.hyogo.jp":true,"sannan.hyogo.jp":true,"sasayama.hyogo.jp":true,"sayo.hyogo.jp":true,"shingu.hyogo.jp":true,"shinonsen.hyogo.jp":true,"shiso.hyogo.jp":true,"sumoto.hyogo.jp":true,"taishi.hyogo.jp":true,"taka.hyogo.jp":true,"takarazuka.hyogo.jp":true,"takasago.hyogo.jp":true,"takino.hyogo.jp":true,"tamba.hyogo.jp":true,"tatsuno.hyogo.jp":true,"toyooka.hyogo.jp":true,"yabu.hyogo.jp":true,"yashiro.hyogo.jp":true,"yoka.hyogo.jp":true,"yokawa.hyogo.jp":true,"ami.ibaraki.jp":true,"asahi.ibaraki.jp":true,"bando.ibaraki.jp":true,"chikusei.ibaraki.jp":true,"daigo.ibaraki.jp":true,"fujishiro.ibaraki.jp":true,"hitachi.ibaraki.jp":true,"hitachinaka.ibaraki.jp":true,"hitachiomiya.ibaraki.jp":true,"hitachiota.ibaraki.jp":true,"ibaraki.ibaraki.jp":true,"ina.ibaraki.jp":true,"inashiki.ibaraki.jp":true,"itako.ibaraki.jp":true,"iwama.ibaraki.jp":true,"joso.ibaraki.jp":true,"kamisu.ibaraki.jp":true,"kasama.ibaraki.jp":true,"kashima.ibaraki.jp":true,"kasumigaura.ibaraki.jp":true,"koga.ibaraki.jp":true,"miho.ibaraki.jp":true,"mito.ibaraki.jp":true,"moriya.ibaraki.jp":true,"naka.ibaraki.jp":true,"namegata.ibaraki.jp":true,"oarai.ibaraki.jp":true,"ogawa.ibaraki.jp":true,"omitama.ibaraki.jp":true,"ryugasaki.ibaraki.jp":true,"sakai.ibaraki.jp":true,"sakuragawa.ibaraki.jp":true,"shimodate.ibaraki.jp":true,"shimotsuma.ibaraki.jp":true,"shirosato.ibaraki.jp":true,"sowa.ibaraki.jp":true,"suifu.ibaraki.jp":true,"takahagi.ibaraki.jp":true,"tamatsukuri.ibaraki.jp":true,"tokai.ibaraki.jp":true,"tomobe.ibaraki.jp":true,"tone.ibaraki.jp":true,"toride.ibaraki.jp":true,"tsuchiura.ibaraki.jp":true,"tsukuba.ibaraki.jp":true,"uchihara.ibaraki.jp":true,"ushiku.ibaraki.jp":true,"yachiyo.ibaraki.jp":true,"yamagata.ibaraki.jp":true,"yawara.ibaraki.jp":true,"yuki.ibaraki.jp":true,"anamizu.ishikawa.jp":true,"hakui.ishikawa.jp":true,"hakusan.ishikawa.jp":true,"kaga.ishikawa.jp":true,"kahoku.ishikawa.jp":true,"kanazawa.ishikawa.jp":true,"kawakita.ishikawa.jp":true,"komatsu.ishikawa.jp":true,"nakanoto.ishikawa.jp":true,"nanao.ishikawa.jp":true,"nomi.ishikawa.jp":true,"nonoichi.ishikawa.jp":true,"noto.ishikawa.jp":true,"shika.ishikawa.jp":true,"suzu.ishikawa.jp":true,"tsubata.ishikawa.jp":true,"tsurugi.ishikawa.jp":true,"uchinada.ishikawa.jp":true,"wajima.ishikawa.jp":true,"fudai.iwate.jp":true,"fujisawa.iwate.jp":true,"hanamaki.iwate.jp":true,"hiraizumi.iwate.jp":true,"hirono.iwate.jp":true,"ichinohe.iwate.jp":true,"ichinoseki.iwate.jp":true,"iwaizumi.iwate.jp":true,"iwate.iwate.jp":true,"joboji.iwate.jp":true,"kamaishi.iwate.jp":true,"kanegasaki.iwate.jp":true,"karumai.iwate.jp":true,"kawai.iwate.jp":true,"kitakami.iwate.jp":true,"kuji.iwate.jp":true,"kunohe.iwate.jp":true,"kuzumaki.iwate.jp":true,"miyako.iwate.jp":true,"mizusawa.iwate.jp":true,"morioka.iwate.jp":true,"ninohe.iwate.jp":true,"noda.iwate.jp":true,"ofunato.iwate.jp":true,"oshu.iwate.jp":true,"otsuchi.iwate.jp":true,"rikuzentakata.iwate.jp":true,"shiwa.iwate.jp":true,"shizukuishi.iwate.jp":true,"sumita.iwate.jp":true,"tanohata.iwate.jp":true,"tono.iwate.jp":true,"yahaba.iwate.jp":true,"yamada.iwate.jp":true,"ayagawa.kagawa.jp":true,"higashikagawa.kagawa.jp":true,"kanonji.kagawa.jp":true,"kotohira.kagawa.jp":true,"manno.kagawa.jp":true,"marugame.kagawa.jp":true,"mitoyo.kagawa.jp":true,"naoshima.kagawa.jp":true,"sanuki.kagawa.jp":true,"tadotsu.kagawa.jp":true,"takamatsu.kagawa.jp":true,"tonosho.kagawa.jp":true,"uchinomi.kagawa.jp":true,"utazu.kagawa.jp":true,"zentsuji.kagawa.jp":true,"akune.kagoshima.jp":true,"amami.kagoshima.jp":true,"hioki.kagoshima.jp":true,"isa.kagoshima.jp":true,"isen.kagoshima.jp":true,"izumi.kagoshima.jp":true,"kagoshima.kagoshima.jp":true,"kanoya.kagoshima.jp":true,"kawanabe.kagoshima.jp":true,"kinko.kagoshima.jp":true,"kouyama.kagoshima.jp":true,"makurazaki.kagoshima.jp":true,"matsumoto.kagoshima.jp":true,"minamitane.kagoshima.jp":true,"nakatane.kagoshima.jp":true,"nishinoomote.kagoshima.jp":true,"satsumasendai.kagoshima.jp":true,"soo.kagoshima.jp":true,"tarumizu.kagoshima.jp":true,"yusui.kagoshima.jp":true,"aikawa.kanagawa.jp":true,"atsugi.kanagawa.jp":true,"ayase.kanagawa.jp":true,"chigasaki.kanagawa.jp":true,"ebina.kanagawa.jp":true,"fujisawa.kanagawa.jp":true,"hadano.kanagawa.jp":true,"hakone.kanagawa.jp":true,"hiratsuka.kanagawa.jp":true,"isehara.kanagawa.jp":true,"kaisei.kanagawa.jp":true,"kamakura.kanagawa.jp":true,"kiyokawa.kanagawa.jp":true,"matsuda.kanagawa.jp":true,"minamiashigara.kanagawa.jp":true,"miura.kanagawa.jp":true,"nakai.kanagawa.jp":true,"ninomiya.kanagawa.jp":true,"odawara.kanagawa.jp":true,"oi.kanagawa.jp":true,"oiso.kanagawa.jp":true,"sagamihara.kanagawa.jp":true,"samukawa.kanagawa.jp":true,"tsukui.kanagawa.jp":true,"yamakita.kanagawa.jp":true,"yamato.kanagawa.jp":true,"yokosuka.kanagawa.jp":true,"yugawara.kanagawa.jp":true,"zama.kanagawa.jp":true,"zushi.kanagawa.jp":true,"aki.kochi.jp":true,"geisei.kochi.jp":true,"hidaka.kochi.jp":true,"higashitsuno.kochi.jp":true,"ino.kochi.jp":true,"kagami.kochi.jp":true,"kami.kochi.jp":true,"kitagawa.kochi.jp":true,"kochi.kochi.jp":true,"mihara.kochi.jp":true,"motoyama.kochi.jp":true,"muroto.kochi.jp":true,"nahari.kochi.jp":true,"nakamura.kochi.jp":true,"nankoku.kochi.jp":true,"nishitosa.kochi.jp":true,"niyodogawa.kochi.jp":true,"ochi.kochi.jp":true,"okawa.kochi.jp":true,"otoyo.kochi.jp":true,"otsuki.kochi.jp":true,"sakawa.kochi.jp":true,"sukumo.kochi.jp":true,"susaki.kochi.jp":true,"tosa.kochi.jp":true,"tosashimizu.kochi.jp":true,"toyo.kochi.jp":true,"tsuno.kochi.jp":true,"umaji.kochi.jp":true,"yasuda.kochi.jp":true,"yusuhara.kochi.jp":true,"amakusa.kumamoto.jp":true,"arao.kumamoto.jp":true,"aso.kumamoto.jp":true,"choyo.kumamoto.jp":true,"gyokuto.kumamoto.jp":true,"kamiamakusa.kumamoto.jp":true,"kikuchi.kumamoto.jp":true,"kumamoto.kumamoto.jp":true,"mashiki.kumamoto.jp":true,"mifune.kumamoto.jp":true,"minamata.kumamoto.jp":true,"minamioguni.kumamoto.jp":true,"nagasu.kumamoto.jp":true,"nishihara.kumamoto.jp":true,"oguni.kumamoto.jp":true,"ozu.kumamoto.jp":true,"sumoto.kumamoto.jp":true,"takamori.kumamoto.jp":true,"uki.kumamoto.jp":true,"uto.kumamoto.jp":true,"yamaga.kumamoto.jp":true,"yamato.kumamoto.jp":true,"yatsushiro.kumamoto.jp":true,"ayabe.kyoto.jp":true,"fukuchiyama.kyoto.jp":true,"higashiyama.kyoto.jp":true,"ide.kyoto.jp":true,"ine.kyoto.jp":true,"joyo.kyoto.jp":true,"kameoka.kyoto.jp":true,"kamo.kyoto.jp":true,"kita.kyoto.jp":true,"kizu.kyoto.jp":true,"kumiyama.kyoto.jp":true,"kyotamba.kyoto.jp":true,"kyotanabe.kyoto.jp":true,"kyotango.kyoto.jp":true,"maizuru.kyoto.jp":true,"minami.kyoto.jp":true,"minamiyamashiro.kyoto.jp":true,"miyazu.kyoto.jp":true,"muko.kyoto.jp":true,"nagaokakyo.kyoto.jp":true,"nakagyo.kyoto.jp":true,"nantan.kyoto.jp":true,"oyamazaki.kyoto.jp":true,"sakyo.kyoto.jp":true,"seika.kyoto.jp":true,"tanabe.kyoto.jp":true,"uji.kyoto.jp":true,"ujitawara.kyoto.jp":true,"wazuka.kyoto.jp":true,"yamashina.kyoto.jp":true,"yawata.kyoto.jp":true,"asahi.mie.jp":true,"inabe.mie.jp":true,"ise.mie.jp":true,"kameyama.mie.jp":true,"kawagoe.mie.jp":true,"kiho.mie.jp":true,"kisosaki.mie.jp":true,"kiwa.mie.jp":true,"komono.mie.jp":true,"kumano.mie.jp":true,"kuwana.mie.jp":true,"matsusaka.mie.jp":true,"meiwa.mie.jp":true,"mihama.mie.jp":true,"minamiise.mie.jp":true,"misugi.mie.jp":true,"miyama.mie.jp":true,"nabari.mie.jp":true,"shima.mie.jp":true,"suzuka.mie.jp":true,"tado.mie.jp":true,"taiki.mie.jp":true,"taki.mie.jp":true,"tamaki.mie.jp":true,"toba.mie.jp":true,"tsu.mie.jp":true,"udono.mie.jp":true,"ureshino.mie.jp":true,"watarai.mie.jp":true,"yokkaichi.mie.jp":true,"furukawa.miyagi.jp":true,"higashimatsushima.miyagi.jp":true,"ishinomaki.miyagi.jp":true,"iwanuma.miyagi.jp":true,"kakuda.miyagi.jp":true,"kami.miyagi.jp":true,"kawasaki.miyagi.jp":true,"marumori.miyagi.jp":true,"matsushima.miyagi.jp":true,"minamisanriku.miyagi.jp":true,"misato.miyagi.jp":true,"murata.miyagi.jp":true,"natori.miyagi.jp":true,"ogawara.miyagi.jp":true,"ohira.miyagi.jp":true,"onagawa.miyagi.jp":true,"osaki.miyagi.jp":true,"rifu.miyagi.jp":true,"semine.miyagi.jp":true,"shibata.miyagi.jp":true,"shichikashuku.miyagi.jp":true,"shikama.miyagi.jp":true,"shiogama.miyagi.jp":true,"shiroishi.miyagi.jp":true,"tagajo.miyagi.jp":true,"taiwa.miyagi.jp":true,"tome.miyagi.jp":true,"tomiya.miyagi.jp":true,"wakuya.miyagi.jp":true,"watari.miyagi.jp":true,"yamamoto.miyagi.jp":true,"zao.miyagi.jp":true,"aya.miyazaki.jp":true,"ebino.miyazaki.jp":true,"gokase.miyazaki.jp":true,"hyuga.miyazaki.jp":true,"kadogawa.miyazaki.jp":true,"kawaminami.miyazaki.jp":true,"kijo.miyazaki.jp":true,"kitagawa.miyazaki.jp":true,"kitakata.miyazaki.jp":true,"kitaura.miyazaki.jp":true,"kobayashi.miyazaki.jp":true,"kunitomi.miyazaki.jp":true,"kushima.miyazaki.jp":true,"mimata.miyazaki.jp":true,"miyakonojo.miyazaki.jp":true,"miyazaki.miyazaki.jp":true,"morotsuka.miyazaki.jp":true,"nichinan.miyazaki.jp":true,"nishimera.miyazaki.jp":true,"nobeoka.miyazaki.jp":true,"saito.miyazaki.jp":true,"shiiba.miyazaki.jp":true,"shintomi.miyazaki.jp":true,"takaharu.miyazaki.jp":true,"takanabe.miyazaki.jp":true,"takazaki.miyazaki.jp":true,"tsuno.miyazaki.jp":true,"achi.nagano.jp":true,"agematsu.nagano.jp":true,"anan.nagano.jp":true,"aoki.nagano.jp":true,"asahi.nagano.jp":true,"azumino.nagano.jp":true,"chikuhoku.nagano.jp":true,"chikuma.nagano.jp":true,"chino.nagano.jp":true,"fujimi.nagano.jp":true,"hakuba.nagano.jp":true,"hara.nagano.jp":true,"hiraya.nagano.jp":true,"iida.nagano.jp":true,"iijima.nagano.jp":true,"iiyama.nagano.jp":true,"iizuna.nagano.jp":true,"ikeda.nagano.jp":true,"ikusaka.nagano.jp":true,"ina.nagano.jp":true,"karuizawa.nagano.jp":true,"kawakami.nagano.jp":true,"kiso.nagano.jp":true,"kisofukushima.nagano.jp":true,"kitaaiki.nagano.jp":true,"komagane.nagano.jp":true,"komoro.nagano.jp":true,"matsukawa.nagano.jp":true,"matsumoto.nagano.jp":true,"miasa.nagano.jp":true,"minamiaiki.nagano.jp":true,"minamimaki.nagano.jp":true,"minamiminowa.nagano.jp":true,"minowa.nagano.jp":true,"miyada.nagano.jp":true,"miyota.nagano.jp":true,"mochizuki.nagano.jp":true,"nagano.nagano.jp":true,"nagawa.nagano.jp":true,"nagiso.nagano.jp":true,"nakagawa.nagano.jp":true,"nakano.nagano.jp":true,"nozawaonsen.nagano.jp":true,"obuse.nagano.jp":true,"ogawa.nagano.jp":true,"okaya.nagano.jp":true,"omachi.nagano.jp":true,"omi.nagano.jp":true,"ookuwa.nagano.jp":true,"ooshika.nagano.jp":true,"otaki.nagano.jp":true,"otari.nagano.jp":true,"sakae.nagano.jp":true,"sakaki.nagano.jp":true,"saku.nagano.jp":true,"sakuho.nagano.jp":true,"shimosuwa.nagano.jp":true,"shinanomachi.nagano.jp":true,"shiojiri.nagano.jp":true,"suwa.nagano.jp":true,"suzaka.nagano.jp":true,"takagi.nagano.jp":true,"takamori.nagano.jp":true,"takayama.nagano.jp":true,"tateshina.nagano.jp":true,"tatsuno.nagano.jp":true,"togakushi.nagano.jp":true,"togura.nagano.jp":true,"tomi.nagano.jp":true,"ueda.nagano.jp":true,"wada.nagano.jp":true,"yamagata.nagano.jp":true,"yamanouchi.nagano.jp":true,"yasaka.nagano.jp":true,"yasuoka.nagano.jp":true,"chijiwa.nagasaki.jp":true,"futsu.nagasaki.jp":true,"goto.nagasaki.jp":true,"hasami.nagasaki.jp":true,"hirado.nagasaki.jp":true,"iki.nagasaki.jp":true,"isahaya.nagasaki.jp":true,"kawatana.nagasaki.jp":true,"kuchinotsu.nagasaki.jp":true,"matsuura.nagasaki.jp":true,"nagasaki.nagasaki.jp":true,"obama.nagasaki.jp":true,"omura.nagasaki.jp":true,"oseto.nagasaki.jp":true,"saikai.nagasaki.jp":true,"sasebo.nagasaki.jp":true,"seihi.nagasaki.jp":true,"shimabara.nagasaki.jp":true,"shinkamigoto.nagasaki.jp":true,"togitsu.nagasaki.jp":true,"tsushima.nagasaki.jp":true,"unzen.nagasaki.jp":true,"ando.nara.jp":true,"gose.nara.jp":true,"heguri.nara.jp":true,"higashiyoshino.nara.jp":true,"ikaruga.nara.jp":true,"ikoma.nara.jp":true,"kamikitayama.nara.jp":true,"kanmaki.nara.jp":true,"kashiba.nara.jp":true,"kashihara.nara.jp":true,"katsuragi.nara.jp":true,"kawai.nara.jp":true,"kawakami.nara.jp":true,"kawanishi.nara.jp":true,"koryo.nara.jp":true,"kurotaki.nara.jp":true,"mitsue.nara.jp":true,"miyake.nara.jp":true,"nara.nara.jp":true,"nosegawa.nara.jp":true,"oji.nara.jp":true,"ouda.nara.jp":true,"oyodo.nara.jp":true,"sakurai.nara.jp":true,"sango.nara.jp":true,"shimoichi.nara.jp":true,"shimokitayama.nara.jp":true,"shinjo.nara.jp":true,"soni.nara.jp":true,"takatori.nara.jp":true,"tawaramoto.nara.jp":true,"tenkawa.nara.jp":true,"tenri.nara.jp":true,"uda.nara.jp":true,"yamatokoriyama.nara.jp":true,"yamatotakada.nara.jp":true,"yamazoe.nara.jp":true,"yoshino.nara.jp":true,"aga.niigata.jp":true,"agano.niigata.jp":true,"gosen.niigata.jp":true,"itoigawa.niigata.jp":true,"izumozaki.niigata.jp":true,"joetsu.niigata.jp":true,"kamo.niigata.jp":true,"kariwa.niigata.jp":true,"kashiwazaki.niigata.jp":true,"minamiuonuma.niigata.jp":true,"mitsuke.niigata.jp":true,"muika.niigata.jp":true,"murakami.niigata.jp":true,"myoko.niigata.jp":true,"nagaoka.niigata.jp":true,"niigata.niigata.jp":true,"ojiya.niigata.jp":true,"omi.niigata.jp":true,"sado.niigata.jp":true,"sanjo.niigata.jp":true,"seiro.niigata.jp":true,"seirou.niigata.jp":true,"sekikawa.niigata.jp":true,"shibata.niigata.jp":true,"tagami.niigata.jp":true,"tainai.niigata.jp":true,"tochio.niigata.jp":true,"tokamachi.niigata.jp":true,"tsubame.niigata.jp":true,"tsunan.niigata.jp":true,"uonuma.niigata.jp":true,"yahiko.niigata.jp":true,"yoita.niigata.jp":true,"yuzawa.niigata.jp":true,"beppu.oita.jp":true,"bungoono.oita.jp":true,"bungotakada.oita.jp":true,"hasama.oita.jp":true,"hiji.oita.jp":true,"himeshima.oita.jp":true,"hita.oita.jp":true,"kamitsue.oita.jp":true,"kokonoe.oita.jp":true,"kuju.oita.jp":true,"kunisaki.oita.jp":true,"kusu.oita.jp":true,"oita.oita.jp":true,"saiki.oita.jp":true,"taketa.oita.jp":true,"tsukumi.oita.jp":true,"usa.oita.jp":true,"usuki.oita.jp":true,"yufu.oita.jp":true,"akaiwa.okayama.jp":true,"asakuchi.okayama.jp":true,"bizen.okayama.jp":true,"hayashima.okayama.jp":true,"ibara.okayama.jp":true,"kagamino.okayama.jp":true,"kasaoka.okayama.jp":true,"kibichuo.okayama.jp":true,"kumenan.okayama.jp":true,"kurashiki.okayama.jp":true,"maniwa.okayama.jp":true,"misaki.okayama.jp":true,"nagi.okayama.jp":true,"niimi.okayama.jp":true,"nishiawakura.okayama.jp":true,"okayama.okayama.jp":true,"satosho.okayama.jp":true,"setouchi.okayama.jp":true,"shinjo.okayama.jp":true,"shoo.okayama.jp":true,"soja.okayama.jp":true,"takahashi.okayama.jp":true,"tamano.okayama.jp":true,"tsuyama.okayama.jp":true,"wake.okayama.jp":true,"yakage.okayama.jp":true,"aguni.okinawa.jp":true,"ginowan.okinawa.jp":true,"ginoza.okinawa.jp":true,"gushikami.okinawa.jp":true,"haebaru.okinawa.jp":true,"higashi.okinawa.jp":true,"hirara.okinawa.jp":true,"iheya.okinawa.jp":true,"ishigaki.okinawa.jp":true,"ishikawa.okinawa.jp":true,"itoman.okinawa.jp":true,"izena.okinawa.jp":true,"kadena.okinawa.jp":true,"kin.okinawa.jp":true,"kitadaito.okinawa.jp":true,"kitanakagusuku.okinawa.jp":true,"kumejima.okinawa.jp":true,"kunigami.okinawa.jp":true,"minamidaito.okinawa.jp":true,"motobu.okinawa.jp":true,"nago.okinawa.jp":true,"naha.okinawa.jp":true,"nakagusuku.okinawa.jp":true,"nakijin.okinawa.jp":true,"nanjo.okinawa.jp":true,"nishihara.okinawa.jp":true,"ogimi.okinawa.jp":true,"okinawa.okinawa.jp":true,"onna.okinawa.jp":true,"shimoji.okinawa.jp":true,"taketomi.okinawa.jp":true,"tarama.okinawa.jp":true,"tokashiki.okinawa.jp":true,"tomigusuku.okinawa.jp":true,"tonaki.okinawa.jp":true,"urasoe.okinawa.jp":true,"uruma.okinawa.jp":true,"yaese.okinawa.jp":true,"yomitan.okinawa.jp":true,"yonabaru.okinawa.jp":true,"yonaguni.okinawa.jp":true,"zamami.okinawa.jp":true,"abeno.osaka.jp":true,"chihayaakasaka.osaka.jp":true,"chuo.osaka.jp":true,"daito.osaka.jp":true,"fujiidera.osaka.jp":true,"habikino.osaka.jp":true,"hannan.osaka.jp":true,"higashiosaka.osaka.jp":true,"higashisumiyoshi.osaka.jp":true,"higashiyodogawa.osaka.jp":true,"hirakata.osaka.jp":true,"ibaraki.osaka.jp":true,"ikeda.osaka.jp":true,"izumi.osaka.jp":true,"izumiotsu.osaka.jp":true,"izumisano.osaka.jp":true,"kadoma.osaka.jp":true,"kaizuka.osaka.jp":true,"kanan.osaka.jp":true,"kashiwara.osaka.jp":true,"katano.osaka.jp":true,"kawachinagano.osaka.jp":true,"kishiwada.osaka.jp":true,"kita.osaka.jp":true,"kumatori.osaka.jp":true,"matsubara.osaka.jp":true,"minato.osaka.jp":true,"minoh.osaka.jp":true,"misaki.osaka.jp":true,"moriguchi.osaka.jp":true,"neyagawa.osaka.jp":true,"nishi.osaka.jp":true,"nose.osaka.jp":true,"osakasayama.osaka.jp":true,"sakai.osaka.jp":true,"sayama.osaka.jp":true,"sennan.osaka.jp":true,"settsu.osaka.jp":true,"shijonawate.osaka.jp":true,"shimamoto.osaka.jp":true,"suita.osaka.jp":true,"tadaoka.osaka.jp":true,"taishi.osaka.jp":true,"tajiri.osaka.jp":true,"takaishi.osaka.jp":true,"takatsuki.osaka.jp":true,"tondabayashi.osaka.jp":true,"toyonaka.osaka.jp":true,"toyono.osaka.jp":true,"yao.osaka.jp":true,"ariake.saga.jp":true,"arita.saga.jp":true,"fukudomi.saga.jp":true,"genkai.saga.jp":true,"hamatama.saga.jp":true,"hizen.saga.jp":true,"imari.saga.jp":true,"kamimine.saga.jp":true,"kanzaki.saga.jp":true,"karatsu.saga.jp":true,"kashima.saga.jp":true,"kitagata.saga.jp":true,"kitahata.saga.jp":true,"kiyama.saga.jp":true,"kouhoku.saga.jp":true,"kyuragi.saga.jp":true,"nishiarita.saga.jp":true,"ogi.saga.jp":true,"omachi.saga.jp":true,"ouchi.saga.jp":true,"saga.saga.jp":true,"shiroishi.saga.jp":true,"taku.saga.jp":true,"tara.saga.jp":true,"tosu.saga.jp":true,"yoshinogari.saga.jp":true,"arakawa.saitama.jp":true,"asaka.saitama.jp":true,"chichibu.saitama.jp":true,"fujimi.saitama.jp":true,"fujimino.saitama.jp":true,"fukaya.saitama.jp":true,"hanno.saitama.jp":true,"hanyu.saitama.jp":true,"hasuda.saitama.jp":true,"hatogaya.saitama.jp":true,"hatoyama.saitama.jp":true,"hidaka.saitama.jp":true,"higashichichibu.saitama.jp":true,"higashimatsuyama.saitama.jp":true,"honjo.saitama.jp":true,"ina.saitama.jp":true,"iruma.saitama.jp":true,"iwatsuki.saitama.jp":true,"kamiizumi.saitama.jp":true,"kamikawa.saitama.jp":true,"kamisato.saitama.jp":true,"kasukabe.saitama.jp":true,"kawagoe.saitama.jp":true,"kawaguchi.saitama.jp":true,"kawajima.saitama.jp":true,"kazo.saitama.jp":true,"kitamoto.saitama.jp":true,"koshigaya.saitama.jp":true,"kounosu.saitama.jp":true,"kuki.saitama.jp":true,"kumagaya.saitama.jp":true,"matsubushi.saitama.jp":true,"minano.saitama.jp":true,"misato.saitama.jp":true,"miyashiro.saitama.jp":true,"miyoshi.saitama.jp":true,"moroyama.saitama.jp":true,"nagatoro.saitama.jp":true,"namegawa.saitama.jp":true,"niiza.saitama.jp":true,"ogano.saitama.jp":true,"ogawa.saitama.jp":true,"ogose.saitama.jp":true,"okegawa.saitama.jp":true,"omiya.saitama.jp":true,"otaki.saitama.jp":true,"ranzan.saitama.jp":true,"ryokami.saitama.jp":true,"saitama.saitama.jp":true,"sakado.saitama.jp":true,"satte.saitama.jp":true,"sayama.saitama.jp":true,"shiki.saitama.jp":true,"shiraoka.saitama.jp":true,"soka.saitama.jp":true,"sugito.saitama.jp":true,"toda.saitama.jp":true,"tokigawa.saitama.jp":true,"tokorozawa.saitama.jp":true,"tsurugashima.saitama.jp":true,"urawa.saitama.jp":true,"warabi.saitama.jp":true,"yashio.saitama.jp":true,"yokoze.saitama.jp":true,"yono.saitama.jp":true,"yorii.saitama.jp":true,"yoshida.saitama.jp":true,"yoshikawa.saitama.jp":true,"yoshimi.saitama.jp":true,"aisho.shiga.jp":true,"gamo.shiga.jp":true,"higashiomi.shiga.jp":true,"hikone.shiga.jp":true,"koka.shiga.jp":true,"konan.shiga.jp":true,"kosei.shiga.jp":true,"koto.shiga.jp":true,"kusatsu.shiga.jp":true,"maibara.shiga.jp":true,"moriyama.shiga.jp":true,"nagahama.shiga.jp":true,"nishiazai.shiga.jp":true,"notogawa.shiga.jp":true,"omihachiman.shiga.jp":true,"otsu.shiga.jp":true,"ritto.shiga.jp":true,"ryuoh.shiga.jp":true,"takashima.shiga.jp":true,"takatsuki.shiga.jp":true,"torahime.shiga.jp":true,"toyosato.shiga.jp":true,"yasu.shiga.jp":true,"akagi.shimane.jp":true,"ama.shimane.jp":true,"gotsu.shimane.jp":true,"hamada.shimane.jp":true,"higashiizumo.shimane.jp":true,"hikawa.shimane.jp":true,"hikimi.shimane.jp":true,"izumo.shimane.jp":true,"kakinoki.shimane.jp":true,"masuda.shimane.jp":true,"matsue.shimane.jp":true,"misato.shimane.jp":true,"nishinoshima.shimane.jp":true,"ohda.shimane.jp":true,"okinoshima.shimane.jp":true,"okuizumo.shimane.jp":true,"shimane.shimane.jp":true,"tamayu.shimane.jp":true,"tsuwano.shimane.jp":true,"unnan.shimane.jp":true,"yakumo.shimane.jp":true,"yasugi.shimane.jp":true,"yatsuka.shimane.jp":true,"arai.shizuoka.jp":true,"atami.shizuoka.jp":true,"fuji.shizuoka.jp":true,"fujieda.shizuoka.jp":true,"fujikawa.shizuoka.jp":true,"fujinomiya.shizuoka.jp":true,"fukuroi.shizuoka.jp":true,"gotemba.shizuoka.jp":true,"haibara.shizuoka.jp":true,"hamamatsu.shizuoka.jp":true,"higashiizu.shizuoka.jp":true,"ito.shizuoka.jp":true,"iwata.shizuoka.jp":true,"izu.shizuoka.jp":true,"izunokuni.shizuoka.jp":true,"kakegawa.shizuoka.jp":true,"kannami.shizuoka.jp":true,"kawanehon.shizuoka.jp":true,"kawazu.shizuoka.jp":true,"kikugawa.shizuoka.jp":true,"kosai.shizuoka.jp":true,"makinohara.shizuoka.jp":true,"matsuzaki.shizuoka.jp":true,"minamiizu.shizuoka.jp":true,"mishima.shizuoka.jp":true,"morimachi.shizuoka.jp":true,"nishiizu.shizuoka.jp":true,"numazu.shizuoka.jp":true,"omaezaki.shizuoka.jp":true,"shimada.shizuoka.jp":true,"shimizu.shizuoka.jp":true,"shimoda.shizuoka.jp":true,"shizuoka.shizuoka.jp":true,"susono.shizuoka.jp":true,"yaizu.shizuoka.jp":true,"yoshida.shizuoka.jp":true,"ashikaga.tochigi.jp":true,"bato.tochigi.jp":true,"haga.tochigi.jp":true,"ichikai.tochigi.jp":true,"iwafune.tochigi.jp":true,"kaminokawa.tochigi.jp":true,"kanuma.tochigi.jp":true,"karasuyama.tochigi.jp":true,"kuroiso.tochigi.jp":true,"mashiko.tochigi.jp":true,"mibu.tochigi.jp":true,"moka.tochigi.jp":true,"motegi.tochigi.jp":true,"nasu.tochigi.jp":true,"nasushiobara.tochigi.jp":true,"nikko.tochigi.jp":true,"nishikata.tochigi.jp":true,"nogi.tochigi.jp":true,"ohira.tochigi.jp":true,"ohtawara.tochigi.jp":true,"oyama.tochigi.jp":true,"sakura.tochigi.jp":true,"sano.tochigi.jp":true,"shimotsuke.tochigi.jp":true,"shioya.tochigi.jp":true,"takanezawa.tochigi.jp":true,"tochigi.tochigi.jp":true,"tsuga.tochigi.jp":true,"ujiie.tochigi.jp":true,"utsunomiya.tochigi.jp":true,"yaita.tochigi.jp":true,"aizumi.tokushima.jp":true,"anan.tokushima.jp":true,"ichiba.tokushima.jp":true,"itano.tokushima.jp":true,"kainan.tokushima.jp":true,"komatsushima.tokushima.jp":true,"matsushige.tokushima.jp":true,"mima.tokushima.jp":true,"minami.tokushima.jp":true,"miyoshi.tokushima.jp":true,"mugi.tokushima.jp":true,"nakagawa.tokushima.jp":true,"naruto.tokushima.jp":true,"sanagochi.tokushima.jp":true,"shishikui.tokushima.jp":true,"tokushima.tokushima.jp":true,"wajiki.tokushima.jp":true,"adachi.tokyo.jp":true,"akiruno.tokyo.jp":true,"akishima.tokyo.jp":true,"aogashima.tokyo.jp":true,"arakawa.tokyo.jp":true,"bunkyo.tokyo.jp":true,"chiyoda.tokyo.jp":true,"chofu.tokyo.jp":true,"chuo.tokyo.jp":true,"edogawa.tokyo.jp":true,"fuchu.tokyo.jp":true,"fussa.tokyo.jp":true,"hachijo.tokyo.jp":true,"hachioji.tokyo.jp":true,"hamura.tokyo.jp":true,"higashikurume.tokyo.jp":true,"higashimurayama.tokyo.jp":true,"higashiyamato.tokyo.jp":true,"hino.tokyo.jp":true,"hinode.tokyo.jp":true,"hinohara.tokyo.jp":true,"inagi.tokyo.jp":true,"itabashi.tokyo.jp":true,"katsushika.tokyo.jp":true,"kita.tokyo.jp":true,"kiyose.tokyo.jp":true,"kodaira.tokyo.jp":true,"koganei.tokyo.jp":true,"kokubunji.tokyo.jp":true,"komae.tokyo.jp":true,"koto.tokyo.jp":true,"kouzushima.tokyo.jp":true,"kunitachi.tokyo.jp":true,"machida.tokyo.jp":true,"meguro.tokyo.jp":true,"minato.tokyo.jp":true,"mitaka.tokyo.jp":true,"mizuho.tokyo.jp":true,"musashimurayama.tokyo.jp":true,"musashino.tokyo.jp":true,"nakano.tokyo.jp":true,"nerima.tokyo.jp":true,"ogasawara.tokyo.jp":true,"okutama.tokyo.jp":true,"ome.tokyo.jp":true,"oshima.tokyo.jp":true,"ota.tokyo.jp":true,"setagaya.tokyo.jp":true,"shibuya.tokyo.jp":true,"shinagawa.tokyo.jp":true,"shinjuku.tokyo.jp":true,"suginami.tokyo.jp":true,"sumida.tokyo.jp":true,"tachikawa.tokyo.jp":true,"taito.tokyo.jp":true,"tama.tokyo.jp":true,"toshima.tokyo.jp":true,"chizu.tottori.jp":true,"hino.tottori.jp":true,"kawahara.tottori.jp":true,"koge.tottori.jp":true,"kotoura.tottori.jp":true,"misasa.tottori.jp":true,"nanbu.tottori.jp":true,"nichinan.tottori.jp":true,"sakaiminato.tottori.jp":true,"tottori.tottori.jp":true,"wakasa.tottori.jp":true,"yazu.tottori.jp":true,"yonago.tottori.jp":true,"asahi.toyama.jp":true,"fuchu.toyama.jp":true,"fukumitsu.toyama.jp":true,"funahashi.toyama.jp":true,"himi.toyama.jp":true,"imizu.toyama.jp":true,"inami.toyama.jp":true,"johana.toyama.jp":true,"kamiichi.toyama.jp":true,"kurobe.toyama.jp":true,"nakaniikawa.toyama.jp":true,"namerikawa.toyama.jp":true,"nanto.toyama.jp":true,"nyuzen.toyama.jp":true,"oyabe.toyama.jp":true,"taira.toyama.jp":true,"takaoka.toyama.jp":true,"tateyama.toyama.jp":true,"toga.toyama.jp":true,"tonami.toyama.jp":true,"toyama.toyama.jp":true,"unazuki.toyama.jp":true,"uozu.toyama.jp":true,"yamada.toyama.jp":true,"arida.wakayama.jp":true,"aridagawa.wakayama.jp":true,"gobo.wakayama.jp":true,"hashimoto.wakayama.jp":true,"hidaka.wakayama.jp":true,"hirogawa.wakayama.jp":true,"inami.wakayama.jp":true,"iwade.wakayama.jp":true,"kainan.wakayama.jp":true,"kamitonda.wakayama.jp":true,"katsuragi.wakayama.jp":true,"kimino.wakayama.jp":true,"kinokawa.wakayama.jp":true,"kitayama.wakayama.jp":true,"koya.wakayama.jp":true,"koza.wakayama.jp":true,"kozagawa.wakayama.jp":true,"kudoyama.wakayama.jp":true,"kushimoto.wakayama.jp":true,"mihama.wakayama.jp":true,"misato.wakayama.jp":true,"nachikatsuura.wakayama.jp":true,"shingu.wakayama.jp":true,"shirahama.wakayama.jp":true,"taiji.wakayama.jp":true,"tanabe.wakayama.jp":true,"wakayama.wakayama.jp":true,"yuasa.wakayama.jp":true,"yura.wakayama.jp":true,"asahi.yamagata.jp":true,"funagata.yamagata.jp":true,"higashine.yamagata.jp":true,"iide.yamagata.jp":true,"kahoku.yamagata.jp":true,"kaminoyama.yamagata.jp":true,"kaneyama.yamagata.jp":true,"kawanishi.yamagata.jp":true,"mamurogawa.yamagata.jp":true,"mikawa.yamagata.jp":true,"murayama.yamagata.jp":true,"nagai.yamagata.jp":true,"nakayama.yamagata.jp":true,"nanyo.yamagata.jp":true,"nishikawa.yamagata.jp":true,"obanazawa.yamagata.jp":true,"oe.yamagata.jp":true,"oguni.yamagata.jp":true,"ohkura.yamagata.jp":true,"oishida.yamagata.jp":true,"sagae.yamagata.jp":true,"sakata.yamagata.jp":true,"sakegawa.yamagata.jp":true,"shinjo.yamagata.jp":true,"shirataka.yamagata.jp":true,"shonai.yamagata.jp":true,"takahata.yamagata.jp":true,"tendo.yamagata.jp":true,"tozawa.yamagata.jp":true,"tsuruoka.yamagata.jp":true,"yamagata.yamagata.jp":true,"yamanobe.yamagata.jp":true,"yonezawa.yamagata.jp":true,"yuza.yamagata.jp":true,"abu.yamaguchi.jp":true,"hagi.yamaguchi.jp":true,"hikari.yamaguchi.jp":true,"hofu.yamaguchi.jp":true,"iwakuni.yamaguchi.jp":true,"kudamatsu.yamaguchi.jp":true,"mitou.yamaguchi.jp":true,"nagato.yamaguchi.jp":true,"oshima.yamaguchi.jp":true,"shimonoseki.yamaguchi.jp":true,"shunan.yamaguchi.jp":true,"tabuse.yamaguchi.jp":true,"tokuyama.yamaguchi.jp":true,"toyota.yamaguchi.jp":true,"ube.yamaguchi.jp":true,"yuu.yamaguchi.jp":true,"chuo.yamanashi.jp":true,"doshi.yamanashi.jp":true,"fuefuki.yamanashi.jp":true,"fujikawa.yamanashi.jp":true,"fujikawaguchiko.yamanashi.jp":true,"fujiyoshida.yamanashi.jp":true,"hayakawa.yamanashi.jp":true,"hokuto.yamanashi.jp":true,"ichikawamisato.yamanashi.jp":true,"kai.yamanashi.jp":true,"kofu.yamanashi.jp":true,"koshu.yamanashi.jp":true,"kosuge.yamanashi.jp":true,"minami-alps.yamanashi.jp":true,"minobu.yamanashi.jp":true,"nakamichi.yamanashi.jp":true,"nanbu.yamanashi.jp":true,"narusawa.yamanashi.jp":true,"nirasaki.yamanashi.jp":true,"nishikatsura.yamanashi.jp":true,"oshino.yamanashi.jp":true,"otsuki.yamanashi.jp":true,"showa.yamanashi.jp":true,"tabayama.yamanashi.jp":true,"tsuru.yamanashi.jp":true,"uenohara.yamanashi.jp":true,"yamanakako.yamanashi.jp":true,"yamanashi.yamanashi.jp":true,"*.ke":true,"kg":true,"org.kg":true,"net.kg":true,"com.kg":true,"edu.kg":true,"gov.kg":true,"mil.kg":true,"*.kh":true,"ki":true,"edu.ki":true,"biz.ki":true,"net.ki":true,"org.ki":true,"gov.ki":true,"info.ki":true,"com.ki":true,"km":true,"org.km":true,"nom.km":true,"gov.km":true,"prd.km":true,"tm.km":true,"edu.km":true,"mil.km":true,"ass.km":true,"com.km":true,"coop.km":true,"asso.km":true,"presse.km":true,"medecin.km":true,"notaires.km":true,"pharmaciens.km":true,"veterinaire.km":true,"gouv.km":true,"kn":true,"net.kn":true,"org.kn":true,"edu.kn":true,"gov.kn":true,"kp":true,"com.kp":true,"edu.kp":true,"gov.kp":true,"org.kp":true,"rep.kp":true,"tra.kp":true,"kr":true,"ac.kr":true,"co.kr":true,"es.kr":true,"go.kr":true,"hs.kr":true,"kg.kr":true,"mil.kr":true,"ms.kr":true,"ne.kr":true,"or.kr":true,"pe.kr":true,"re.kr":true,"sc.kr":true,"busan.kr":true,"chungbuk.kr":true,"chungnam.kr":true,"daegu.kr":true,"daejeon.kr":true,"gangwon.kr":true,"gwangju.kr":true,"gyeongbuk.kr":true,"gyeonggi.kr":true,"gyeongnam.kr":true,"incheon.kr":true,"jeju.kr":true,"jeonbuk.kr":true,"jeonnam.kr":true,"seoul.kr":true,"ulsan.kr":true,"*.kw":true,"ky":true,"edu.ky":true,"gov.ky":true,"com.ky":true,"org.ky":true,"net.ky":true,"kz":true,"org.kz":true,"edu.kz":true,"net.kz":true,"gov.kz":true,"mil.kz":true,"com.kz":true,"la":true,"int.la":true,"net.la":true,"info.la":true,"edu.la":true,"gov.la":true,"per.la":true,"com.la":true,"org.la":true,"lb":true,"com.lb":true,"edu.lb":true,"gov.lb":true,"net.lb":true,"org.lb":true,"lc":true,"com.lc":true,"net.lc":true,"co.lc":true,"org.lc":true,"edu.lc":true,"gov.lc":true,"li":true,"lk":true,"gov.lk":true,"sch.lk":true,"net.lk":true,"int.lk":true,"com.lk":true,"org.lk":true,"edu.lk":true,"ngo.lk":true,"soc.lk":true,"web.lk":true,"ltd.lk":true,"assn.lk":true,"grp.lk":true,"hotel.lk":true,"ac.lk":true,"lr":true,"com.lr":true,"edu.lr":true,"gov.lr":true,"org.lr":true,"net.lr":true,"ls":true,"co.ls":true,"org.ls":true,"lt":true,"gov.lt":true,"lu":true,"lv":true,"com.lv":true,"edu.lv":true,"gov.lv":true,"org.lv":true,"mil.lv":true,"id.lv":true,"net.lv":true,"asn.lv":true,"conf.lv":true,"ly":true,"com.ly":true,"net.ly":true,"gov.ly":true,"plc.ly":true,"edu.ly":true,"sch.ly":true,"med.ly":true,"org.ly":true,"id.ly":true,"ma":true,"co.ma":true,"net.ma":true,"gov.ma":true,"org.ma":true,"ac.ma":true,"press.ma":true,"mc":true,"tm.mc":true,"asso.mc":true,"md":true,"me":true,"co.me":true,"net.me":true,"org.me":true,"edu.me":true,"ac.me":true,"gov.me":true,"its.me":true,"priv.me":true,"mg":true,"org.mg":true,"nom.mg":true,"gov.mg":true,"prd.mg":true,"tm.mg":true,"edu.mg":true,"mil.mg":true,"com.mg":true,"co.mg":true,"mh":true,"mil":true,"mk":true,"com.mk":true,"org.mk":true,"net.mk":true,"edu.mk":true,"gov.mk":true,"inf.mk":true,"name.mk":true,"ml":true,"com.ml":true,"edu.ml":true,"gouv.ml":true,"gov.ml":true,"net.ml":true,"org.ml":true,"presse.ml":true,"*.mm":true,"mn":true,"gov.mn":true,"edu.mn":true,"org.mn":true,"mo":true,"com.mo":true,"net.mo":true,"org.mo":true,"edu.mo":true,"gov.mo":true,"mobi":true,"mp":true,"mq":true,"mr":true,"gov.mr":true,"ms":true,"com.ms":true,"edu.ms":true,"gov.ms":true,"net.ms":true,"org.ms":true,"mt":true,"com.mt":true,"edu.mt":true,"net.mt":true,"org.mt":true,"mu":true,"com.mu":true,"net.mu":true,"org.mu":true,"gov.mu":true,"ac.mu":true,"co.mu":true,"or.mu":true,"museum":true,"academy.museum":true,"agriculture.museum":true,"air.museum":true,"airguard.museum":true,"alabama.museum":true,"alaska.museum":true,"amber.museum":true,"ambulance.museum":true,"american.museum":true,"americana.museum":true,"americanantiques.museum":true,"americanart.museum":true,"amsterdam.museum":true,"and.museum":true,"annefrank.museum":true,"anthro.museum":true,"anthropology.museum":true,"antiques.museum":true,"aquarium.museum":true,"arboretum.museum":true,"archaeological.museum":true,"archaeology.museum":true,"architecture.museum":true,"art.museum":true,"artanddesign.museum":true,"artcenter.museum":true,"artdeco.museum":true,"arteducation.museum":true,"artgallery.museum":true,"arts.museum":true,"artsandcrafts.museum":true,"asmatart.museum":true,"assassination.museum":true,"assisi.museum":true,"association.museum":true,"astronomy.museum":true,"atlanta.museum":true,"austin.museum":true,"australia.museum":true,"automotive.museum":true,"aviation.museum":true,"axis.museum":true,"badajoz.museum":true,"baghdad.museum":true,"bahn.museum":true,"bale.museum":true,"baltimore.museum":true,"barcelona.museum":true,"baseball.museum":true,"basel.museum":true,"baths.museum":true,"bauern.museum":true,"beauxarts.museum":true,"beeldengeluid.museum":true,"bellevue.museum":true,"bergbau.museum":true,"berkeley.museum":true,"berlin.museum":true,"bern.museum":true,"bible.museum":true,"bilbao.museum":true,"bill.museum":true,"birdart.museum":true,"birthplace.museum":true,"bonn.museum":true,"boston.museum":true,"botanical.museum":true,"botanicalgarden.museum":true,"botanicgarden.museum":true,"botany.museum":true,"brandywinevalley.museum":true,"brasil.museum":true,"bristol.museum":true,"british.museum":true,"britishcolumbia.museum":true,"broadcast.museum":true,"brunel.museum":true,"brussel.museum":true,"brussels.museum":true,"bruxelles.museum":true,"building.museum":true,"burghof.museum":true,"bus.museum":true,"bushey.museum":true,"cadaques.museum":true,"california.museum":true,"cambridge.museum":true,"can.museum":true,"canada.museum":true,"capebreton.museum":true,"carrier.museum":true,"cartoonart.museum":true,"casadelamoneda.museum":true,"castle.museum":true,"castres.museum":true,"celtic.museum":true,"center.museum":true,"chattanooga.museum":true,"cheltenham.museum":true,"chesapeakebay.museum":true,"chicago.museum":true,"children.museum":true,"childrens.museum":true,"childrensgarden.museum":true,"chiropractic.museum":true,"chocolate.museum":true,"christiansburg.museum":true,"cincinnati.museum":true,"cinema.museum":true,"circus.museum":true,"civilisation.museum":true,"civilization.museum":true,"civilwar.museum":true,"clinton.museum":true,"clock.museum":true,"coal.museum":true,"coastaldefence.museum":true,"cody.museum":true,"coldwar.museum":true,"collection.museum":true,"colonialwilliamsburg.museum":true,"coloradoplateau.museum":true,"columbia.museum":true,"columbus.museum":true,"communication.museum":true,"communications.museum":true,"community.museum":true,"computer.museum":true,"computerhistory.museum":true,"xn--comunicaes-v6a2o.museum":true,"contemporary.museum":true,"contemporaryart.museum":true,"convent.museum":true,"copenhagen.museum":true,"corporation.museum":true,"xn--correios-e-telecomunicaes-ghc29a.museum":true,"corvette.museum":true,"costume.museum":true,"countryestate.museum":true,"county.museum":true,"crafts.museum":true,"cranbrook.museum":true,"creation.museum":true,"cultural.museum":true,"culturalcenter.museum":true,"culture.museum":true,"cyber.museum":true,"cymru.museum":true,"dali.museum":true,"dallas.museum":true,"database.museum":true,"ddr.museum":true,"decorativearts.museum":true,"delaware.museum":true,"delmenhorst.museum":true,"denmark.museum":true,"depot.museum":true,"design.museum":true,"detroit.museum":true,"dinosaur.museum":true,"discovery.museum":true,"dolls.museum":true,"donostia.museum":true,"durham.museum":true,"eastafrica.museum":true,"eastcoast.museum":true,"education.museum":true,"educational.museum":true,"egyptian.museum":true,"eisenbahn.museum":true,"elburg.museum":true,"elvendrell.museum":true,"embroidery.museum":true,"encyclopedic.museum":true,"england.museum":true,"entomology.museum":true,"environment.museum":true,"environmentalconservation.museum":true,"epilepsy.museum":true,"essex.museum":true,"estate.museum":true,"ethnology.museum":true,"exeter.museum":true,"exhibition.museum":true,"family.museum":true,"farm.museum":true,"farmequipment.museum":true,"farmers.museum":true,"farmstead.museum":true,"field.museum":true,"figueres.museum":true,"filatelia.museum":true,"film.museum":true,"fineart.museum":true,"finearts.museum":true,"finland.museum":true,"flanders.museum":true,"florida.museum":true,"force.museum":true,"fortmissoula.museum":true,"fortworth.museum":true,"foundation.museum":true,"francaise.museum":true,"frankfurt.museum":true,"franziskaner.museum":true,"freemasonry.museum":true,"freiburg.museum":true,"fribourg.museum":true,"frog.museum":true,"fundacio.museum":true,"furniture.museum":true,"gallery.museum":true,"garden.museum":true,"gateway.museum":true,"geelvinck.museum":true,"gemological.museum":true,"geology.museum":true,"georgia.museum":true,"giessen.museum":true,"glas.museum":true,"glass.museum":true,"gorge.museum":true,"grandrapids.museum":true,"graz.museum":true,"guernsey.museum":true,"halloffame.museum":true,"hamburg.museum":true,"handson.museum":true,"harvestcelebration.museum":true,"hawaii.museum":true,"health.museum":true,"heimatunduhren.museum":true,"hellas.museum":true,"helsinki.museum":true,"hembygdsforbund.museum":true,"heritage.museum":true,"histoire.museum":true,"historical.museum":true,"historicalsociety.museum":true,"historichouses.museum":true,"historisch.museum":true,"historisches.museum":true,"history.museum":true,"historyofscience.museum":true,"horology.museum":true,"house.museum":true,"humanities.museum":true,"illustration.museum":true,"imageandsound.museum":true,"indian.museum":true,"indiana.museum":true,"indianapolis.museum":true,"indianmarket.museum":true,"intelligence.museum":true,"interactive.museum":true,"iraq.museum":true,"iron.museum":true,"isleofman.museum":true,"jamison.museum":true,"jefferson.museum":true,"jerusalem.museum":true,"jewelry.museum":true,"jewish.museum":true,"jewishart.museum":true,"jfk.museum":true,"journalism.museum":true,"judaica.museum":true,"judygarland.museum":true,"juedisches.museum":true,"juif.museum":true,"karate.museum":true,"karikatur.museum":true,"kids.museum":true,"koebenhavn.museum":true,"koeln.museum":true,"kunst.museum":true,"kunstsammlung.museum":true,"kunstunddesign.museum":true,"labor.museum":true,"labour.museum":true,"lajolla.museum":true,"lancashire.museum":true,"landes.museum":true,"lans.museum":true,"xn--lns-qla.museum":true,"larsson.museum":true,"lewismiller.museum":true,"lincoln.museum":true,"linz.museum":true,"living.museum":true,"livinghistory.museum":true,"localhistory.museum":true,"london.museum":true,"losangeles.museum":true,"louvre.museum":true,"loyalist.museum":true,"lucerne.museum":true,"luxembourg.museum":true,"luzern.museum":true,"mad.museum":true,"madrid.museum":true,"mallorca.museum":true,"manchester.museum":true,"mansion.museum":true,"mansions.museum":true,"manx.museum":true,"marburg.museum":true,"maritime.museum":true,"maritimo.museum":true,"maryland.museum":true,"marylhurst.museum":true,"media.museum":true,"medical.museum":true,"medizinhistorisches.museum":true,"meeres.museum":true,"memorial.museum":true,"mesaverde.museum":true,"michigan.museum":true,"midatlantic.museum":true,"military.museum":true,"mill.museum":true,"miners.museum":true,"mining.museum":true,"minnesota.museum":true,"missile.museum":true,"missoula.museum":true,"modern.museum":true,"moma.museum":true,"money.museum":true,"monmouth.museum":true,"monticello.museum":true,"montreal.museum":true,"moscow.museum":true,"motorcycle.museum":true,"muenchen.museum":true,"muenster.museum":true,"mulhouse.museum":true,"muncie.museum":true,"museet.museum":true,"museumcenter.museum":true,"museumvereniging.museum":true,"music.museum":true,"national.museum":true,"nationalfirearms.museum":true,"nationalheritage.museum":true,"nativeamerican.museum":true,"naturalhistory.museum":true,"naturalhistorymuseum.museum":true,"naturalsciences.museum":true,"nature.museum":true,"naturhistorisches.museum":true,"natuurwetenschappen.museum":true,"naumburg.museum":true,"naval.museum":true,"nebraska.museum":true,"neues.museum":true,"newhampshire.museum":true,"newjersey.museum":true,"newmexico.museum":true,"newport.museum":true,"newspaper.museum":true,"newyork.museum":true,"niepce.museum":true,"norfolk.museum":true,"north.museum":true,"nrw.museum":true,"nuernberg.museum":true,"nuremberg.museum":true,"nyc.museum":true,"nyny.museum":true,"oceanographic.museum":true,"oceanographique.museum":true,"omaha.museum":true,"online.museum":true,"ontario.museum":true,"openair.museum":true,"oregon.museum":true,"oregontrail.museum":true,"otago.museum":true,"oxford.museum":true,"pacific.museum":true,"paderborn.museum":true,"palace.museum":true,"paleo.museum":true,"palmsprings.museum":true,"panama.museum":true,"paris.museum":true,"pasadena.museum":true,"pharmacy.museum":true,"philadelphia.museum":true,"philadelphiaarea.museum":true,"philately.museum":true,"phoenix.museum":true,"photography.museum":true,"pilots.museum":true,"pittsburgh.museum":true,"planetarium.museum":true,"plantation.museum":true,"plants.museum":true,"plaza.museum":true,"portal.museum":true,"portland.museum":true,"portlligat.museum":true,"posts-and-telecommunications.museum":true,"preservation.museum":true,"presidio.museum":true,"press.museum":true,"project.museum":true,"public.museum":true,"pubol.museum":true,"quebec.museum":true,"railroad.museum":true,"railway.museum":true,"research.museum":true,"resistance.museum":true,"riodejaneiro.museum":true,"rochester.museum":true,"rockart.museum":true,"roma.museum":true,"russia.museum":true,"saintlouis.museum":true,"salem.museum":true,"salvadordali.museum":true,"salzburg.museum":true,"sandiego.museum":true,"sanfrancisco.museum":true,"santabarbara.museum":true,"santacruz.museum":true,"santafe.museum":true,"saskatchewan.museum":true,"satx.museum":true,"savannahga.museum":true,"schlesisches.museum":true,"schoenbrunn.museum":true,"schokoladen.museum":true,"school.museum":true,"schweiz.museum":true,"science.museum":true,"scienceandhistory.museum":true,"scienceandindustry.museum":true,"sciencecenter.museum":true,"sciencecenters.museum":true,"science-fiction.museum":true,"sciencehistory.museum":true,"sciences.museum":true,"sciencesnaturelles.museum":true,"scotland.museum":true,"seaport.museum":true,"settlement.museum":true,"settlers.museum":true,"shell.museum":true,"sherbrooke.museum":true,"sibenik.museum":true,"silk.museum":true,"ski.museum":true,"skole.museum":true,"society.museum":true,"sologne.museum":true,"soundandvision.museum":true,"southcarolina.museum":true,"southwest.museum":true,"space.museum":true,"spy.museum":true,"square.museum":true,"stadt.museum":true,"stalbans.museum":true,"starnberg.museum":true,"state.museum":true,"stateofdelaware.museum":true,"station.museum":true,"steam.museum":true,"steiermark.museum":true,"stjohn.museum":true,"stockholm.museum":true,"stpetersburg.museum":true,"stuttgart.museum":true,"suisse.museum":true,"surgeonshall.museum":true,"surrey.museum":true,"svizzera.museum":true,"sweden.museum":true,"sydney.museum":true,"tank.museum":true,"tcm.museum":true,"technology.museum":true,"telekommunikation.museum":true,"television.museum":true,"texas.museum":true,"textile.museum":true,"theater.museum":true,"time.museum":true,"timekeeping.museum":true,"topology.museum":true,"torino.museum":true,"touch.museum":true,"town.museum":true,"transport.museum":true,"tree.museum":true,"trolley.museum":true,"trust.museum":true,"trustee.museum":true,"uhren.museum":true,"ulm.museum":true,"undersea.museum":true,"university.museum":true,"usa.museum":true,"usantiques.museum":true,"usarts.museum":true,"uscountryestate.museum":true,"usculture.museum":true,"usdecorativearts.museum":true,"usgarden.museum":true,"ushistory.museum":true,"ushuaia.museum":true,"uslivinghistory.museum":true,"utah.museum":true,"uvic.museum":true,"valley.museum":true,"vantaa.museum":true,"versailles.museum":true,"viking.museum":true,"village.museum":true,"virginia.museum":true,"virtual.museum":true,"virtuel.museum":true,"vlaanderen.museum":true,"volkenkunde.museum":true,"wales.museum":true,"wallonie.museum":true,"war.museum":true,"washingtondc.museum":true,"watchandclock.museum":true,"watch-and-clock.museum":true,"western.museum":true,"westfalen.museum":true,"whaling.museum":true,"wildlife.museum":true,"williamsburg.museum":true,"windmill.museum":true,"workshop.museum":true,"york.museum":true,"yorkshire.museum":true,"yosemite.museum":true,"youth.museum":true,"zoological.museum":true,"zoology.museum":true,"xn--9dbhblg6di.museum":true,"xn--h1aegh.museum":true,"mv":true,"aero.mv":true,"biz.mv":true,"com.mv":true,"coop.mv":true,"edu.mv":true,"gov.mv":true,"info.mv":true,"int.mv":true,"mil.mv":true,"museum.mv":true,"name.mv":true,"net.mv":true,"org.mv":true,"pro.mv":true,"mw":true,"ac.mw":true,"biz.mw":true,"co.mw":true,"com.mw":true,"coop.mw":true,"edu.mw":true,"gov.mw":true,"int.mw":true,"museum.mw":true,"net.mw":true,"org.mw":true,"mx":true,"com.mx":true,"org.mx":true,"gob.mx":true,"edu.mx":true,"net.mx":true,"my":true,"com.my":true,"net.my":true,"org.my":true,"gov.my":true,"edu.my":true,"mil.my":true,"name.my":true,"mz":true,"ac.mz":true,"adv.mz":true,"co.mz":true,"edu.mz":true,"gov.mz":true,"mil.mz":true,"net.mz":true,"org.mz":true,"na":true,"info.na":true,"pro.na":true,"name.na":true,"school.na":true,"or.na":true,"dr.na":true,"us.na":true,"mx.na":true,"ca.na":true,"in.na":true,"cc.na":true,"tv.na":true,"ws.na":true,"mobi.na":true,"co.na":true,"com.na":true,"org.na":true,"name":true,"nc":true,"asso.nc":true,"ne":true,"net":true,"nf":true,"com.nf":true,"net.nf":true,"per.nf":true,"rec.nf":true,"web.nf":true,"arts.nf":true,"firm.nf":true,"info.nf":true,"other.nf":true,"store.nf":true,"ng":true,"com.ng":true,"edu.ng":true,"gov.ng":true,"i.ng":true,"mil.ng":true,"mobi.ng":true,"name.ng":true,"net.ng":true,"org.ng":true,"sch.ng":true,"com.ni":true,"gob.ni":true,"edu.ni":true,"org.ni":true,"nom.ni":true,"net.ni":true,"mil.ni":true,"co.ni":true,"biz.ni":true,"web.ni":true,"int.ni":true,"ac.ni":true,"in.ni":true,"info.ni":true,"nl":true,"bv.nl":true,"no":true,"fhs.no":true,"vgs.no":true,"fylkesbibl.no":true,"folkebibl.no":true,"museum.no":true,"idrett.no":true,"priv.no":true,"mil.no":true,"stat.no":true,"dep.no":true,"kommune.no":true,"herad.no":true,"aa.no":true,"ah.no":true,"bu.no":true,"fm.no":true,"hl.no":true,"hm.no":true,"jan-mayen.no":true,"mr.no":true,"nl.no":true,"nt.no":true,"of.no":true,"ol.no":true,"oslo.no":true,"rl.no":true,"sf.no":true,"st.no":true,"svalbard.no":true,"tm.no":true,"tr.no":true,"va.no":true,"vf.no":true,"gs.aa.no":true,"gs.ah.no":true,"gs.bu.no":true,"gs.fm.no":true,"gs.hl.no":true,"gs.hm.no":true,"gs.jan-mayen.no":true,"gs.mr.no":true,"gs.nl.no":true,"gs.nt.no":true,"gs.of.no":true,"gs.ol.no":true,"gs.oslo.no":true,"gs.rl.no":true,"gs.sf.no":true,"gs.st.no":true,"gs.svalbard.no":true,"gs.tm.no":true,"gs.tr.no":true,"gs.va.no":true,"gs.vf.no":true,"akrehamn.no":true,"xn--krehamn-dxa.no":true,"algard.no":true,"xn--lgrd-poac.no":true,"arna.no":true,"brumunddal.no":true,"bryne.no":true,"bronnoysund.no":true,"xn--brnnysund-m8ac.no":true,"drobak.no":true,"xn--drbak-wua.no":true,"egersund.no":true,"fetsund.no":true,"floro.no":true,"xn--flor-jra.no":true,"fredrikstad.no":true,"hokksund.no":true,"honefoss.no":true,"xn--hnefoss-q1a.no":true,"jessheim.no":true,"jorpeland.no":true,"xn--jrpeland-54a.no":true,"kirkenes.no":true,"kopervik.no":true,"krokstadelva.no":true,"langevag.no":true,"xn--langevg-jxa.no":true,"leirvik.no":true,"mjondalen.no":true,"xn--mjndalen-64a.no":true,"mo-i-rana.no":true,"mosjoen.no":true,"xn--mosjen-eya.no":true,"nesoddtangen.no":true,"orkanger.no":true,"osoyro.no":true,"xn--osyro-wua.no":true,"raholt.no":true,"xn--rholt-mra.no":true,"sandnessjoen.no":true,"xn--sandnessjen-ogb.no":true,"skedsmokorset.no":true,"slattum.no":true,"spjelkavik.no":true,"stathelle.no":true,"stavern.no":true,"stjordalshalsen.no":true,"xn--stjrdalshalsen-sqb.no":true,"tananger.no":true,"tranby.no":true,"vossevangen.no":true,"afjord.no":true,"xn--fjord-lra.no":true,"agdenes.no":true,"al.no":true,"xn--l-1fa.no":true,"alesund.no":true,"xn--lesund-hua.no":true,"alstahaug.no":true,"alta.no":true,"xn--lt-liac.no":true,"alaheadju.no":true,"xn--laheadju-7ya.no":true,"alvdal.no":true,"amli.no":true,"xn--mli-tla.no":true,"amot.no":true,"xn--mot-tla.no":true,"andebu.no":true,"andoy.no":true,"xn--andy-ira.no":true,"andasuolo.no":true,"ardal.no":true,"xn--rdal-poa.no":true,"aremark.no":true,"arendal.no":true,"xn--s-1fa.no":true,"aseral.no":true,"xn--seral-lra.no":true,"asker.no":true,"askim.no":true,"askvoll.no":true,"askoy.no":true,"xn--asky-ira.no":true,"asnes.no":true,"xn--snes-poa.no":true,"audnedaln.no":true,"aukra.no":true,"aure.no":true,"aurland.no":true,"aurskog-holand.no":true,"xn--aurskog-hland-jnb.no":true,"austevoll.no":true,"austrheim.no":true,"averoy.no":true,"xn--avery-yua.no":true,"balestrand.no":true,"ballangen.no":true,"balat.no":true,"xn--blt-elab.no":true,"balsfjord.no":true,"bahccavuotna.no":true,"xn--bhccavuotna-k7a.no":true,"bamble.no":true,"bardu.no":true,"beardu.no":true,"beiarn.no":true,"bajddar.no":true,"xn--bjddar-pta.no":true,"baidar.no":true,"xn--bidr-5nac.no":true,"berg.no":true,"bergen.no":true,"berlevag.no":true,"xn--berlevg-jxa.no":true,"bearalvahki.no":true,"xn--bearalvhki-y4a.no":true,"bindal.no":true,"birkenes.no":true,"bjarkoy.no":true,"xn--bjarky-fya.no":true,"bjerkreim.no":true,"bjugn.no":true,"bodo.no":true,"xn--bod-2na.no":true,"badaddja.no":true,"xn--bdddj-mrabd.no":true,"budejju.no":true,"bokn.no":true,"bremanger.no":true,"bronnoy.no":true,"xn--brnny-wuac.no":true,"bygland.no":true,"bykle.no":true,"barum.no":true,"xn--brum-voa.no":true,"bo.telemark.no":true,"xn--b-5ga.telemark.no":true,"bo.nordland.no":true,"xn--b-5ga.nordland.no":true,"bievat.no":true,"xn--bievt-0qa.no":true,"bomlo.no":true,"xn--bmlo-gra.no":true,"batsfjord.no":true,"xn--btsfjord-9za.no":true,"bahcavuotna.no":true,"xn--bhcavuotna-s4a.no":true,"dovre.no":true,"drammen.no":true,"drangedal.no":true,"dyroy.no":true,"xn--dyry-ira.no":true,"donna.no":true,"xn--dnna-gra.no":true,"eid.no":true,"eidfjord.no":true,"eidsberg.no":true,"eidskog.no":true,"eidsvoll.no":true,"eigersund.no":true,"elverum.no":true,"enebakk.no":true,"engerdal.no":true,"etne.no":true,"etnedal.no":true,"evenes.no":true,"evenassi.no":true,"xn--eveni-0qa01ga.no":true,"evje-og-hornnes.no":true,"farsund.no":true,"fauske.no":true,"fuossko.no":true,"fuoisku.no":true,"fedje.no":true,"fet.no":true,"finnoy.no":true,"xn--finny-yua.no":true,"fitjar.no":true,"fjaler.no":true,"fjell.no":true,"flakstad.no":true,"flatanger.no":true,"flekkefjord.no":true,"flesberg.no":true,"flora.no":true,"fla.no":true,"xn--fl-zia.no":true,"folldal.no":true,"forsand.no":true,"fosnes.no":true,"frei.no":true,"frogn.no":true,"froland.no":true,"frosta.no":true,"frana.no":true,"xn--frna-woa.no":true,"froya.no":true,"xn--frya-hra.no":true,"fusa.no":true,"fyresdal.no":true,"forde.no":true,"xn--frde-gra.no":true,"gamvik.no":true,"gangaviika.no":true,"xn--ggaviika-8ya47h.no":true,"gaular.no":true,"gausdal.no":true,"gildeskal.no":true,"xn--gildeskl-g0a.no":true,"giske.no":true,"gjemnes.no":true,"gjerdrum.no":true,"gjerstad.no":true,"gjesdal.no":true,"gjovik.no":true,"xn--gjvik-wua.no":true,"gloppen.no":true,"gol.no":true,"gran.no":true,"grane.no":true,"granvin.no":true,"gratangen.no":true,"grimstad.no":true,"grong.no":true,"kraanghke.no":true,"xn--kranghke-b0a.no":true,"grue.no":true,"gulen.no":true,"hadsel.no":true,"halden.no":true,"halsa.no":true,"hamar.no":true,"hamaroy.no":true,"habmer.no":true,"xn--hbmer-xqa.no":true,"hapmir.no":true,"xn--hpmir-xqa.no":true,"hammerfest.no":true,"hammarfeasta.no":true,"xn--hmmrfeasta-s4ac.no":true,"haram.no":true,"hareid.no":true,"harstad.no":true,"hasvik.no":true,"aknoluokta.no":true,"xn--koluokta-7ya57h.no":true,"hattfjelldal.no":true,"aarborte.no":true,"haugesund.no":true,"hemne.no":true,"hemnes.no":true,"hemsedal.no":true,"heroy.more-og-romsdal.no":true,"xn--hery-ira.xn--mre-og-romsdal-qqb.no":true,"heroy.nordland.no":true,"xn--hery-ira.nordland.no":true,"hitra.no":true,"hjartdal.no":true,"hjelmeland.no":true,"hobol.no":true,"xn--hobl-ira.no":true,"hof.no":true,"hol.no":true,"hole.no":true,"holmestrand.no":true,"holtalen.no":true,"xn--holtlen-hxa.no":true,"hornindal.no":true,"horten.no":true,"hurdal.no":true,"hurum.no":true,"hvaler.no":true,"hyllestad.no":true,"hagebostad.no":true,"xn--hgebostad-g3a.no":true,"hoyanger.no":true,"xn--hyanger-q1a.no":true,"hoylandet.no":true,"xn--hylandet-54a.no":true,"ha.no":true,"xn--h-2fa.no":true,"ibestad.no":true,"inderoy.no":true,"xn--indery-fya.no":true,"iveland.no":true,"jevnaker.no":true,"jondal.no":true,"jolster.no":true,"xn--jlster-bya.no":true,"karasjok.no":true,"karasjohka.no":true,"xn--krjohka-hwab49j.no":true,"karlsoy.no":true,"galsa.no":true,"xn--gls-elac.no":true,"karmoy.no":true,"xn--karmy-yua.no":true,"kautokeino.no":true,"guovdageaidnu.no":true,"klepp.no":true,"klabu.no":true,"xn--klbu-woa.no":true,"kongsberg.no":true,"kongsvinger.no":true,"kragero.no":true,"xn--krager-gya.no":true,"kristiansand.no":true,"kristiansund.no":true,"krodsherad.no":true,"xn--krdsherad-m8a.no":true,"kvalsund.no":true,"rahkkeravju.no":true,"xn--rhkkervju-01af.no":true,"kvam.no":true,"kvinesdal.no":true,"kvinnherad.no":true,"kviteseid.no":true,"kvitsoy.no":true,"xn--kvitsy-fya.no":true,"kvafjord.no":true,"xn--kvfjord-nxa.no":true,"giehtavuoatna.no":true,"kvanangen.no":true,"xn--kvnangen-k0a.no":true,"navuotna.no":true,"xn--nvuotna-hwa.no":true,"kafjord.no":true,"xn--kfjord-iua.no":true,"gaivuotna.no":true,"xn--givuotna-8ya.no":true,"larvik.no":true,"lavangen.no":true,"lavagis.no":true,"loabat.no":true,"xn--loabt-0qa.no":true,"lebesby.no":true,"davvesiida.no":true,"leikanger.no":true,"leirfjord.no":true,"leka.no":true,"leksvik.no":true,"lenvik.no":true,"leangaviika.no":true,"xn--leagaviika-52b.no":true,"lesja.no":true,"levanger.no":true,"lier.no":true,"lierne.no":true,"lillehammer.no":true,"lillesand.no":true,"lindesnes.no":true,"lindas.no":true,"xn--linds-pra.no":true,"lom.no":true,"loppa.no":true,"lahppi.no":true,"xn--lhppi-xqa.no":true,"lund.no":true,"lunner.no":true,"luroy.no":true,"xn--lury-ira.no":true,"luster.no":true,"lyngdal.no":true,"lyngen.no":true,"ivgu.no":true,"lardal.no":true,"lerdal.no":true,"xn--lrdal-sra.no":true,"lodingen.no":true,"xn--ldingen-q1a.no":true,"lorenskog.no":true,"xn--lrenskog-54a.no":true,"loten.no":true,"xn--lten-gra.no":true,"malvik.no":true,"masoy.no":true,"xn--msy-ula0h.no":true,"muosat.no":true,"xn--muost-0qa.no":true,"mandal.no":true,"marker.no":true,"marnardal.no":true,"masfjorden.no":true,"meland.no":true,"meldal.no":true,"melhus.no":true,"meloy.no":true,"xn--mely-ira.no":true,"meraker.no":true,"xn--merker-kua.no":true,"moareke.no":true,"xn--moreke-jua.no":true,"midsund.no":true,"midtre-gauldal.no":true,"modalen.no":true,"modum.no":true,"molde.no":true,"moskenes.no":true,"moss.no":true,"mosvik.no":true,"malselv.no":true,"xn--mlselv-iua.no":true,"malatvuopmi.no":true,"xn--mlatvuopmi-s4a.no":true,"namdalseid.no":true,"aejrie.no":true,"namsos.no":true,"namsskogan.no":true,"naamesjevuemie.no":true,"xn--nmesjevuemie-tcba.no":true,"laakesvuemie.no":true,"nannestad.no":true,"narvik.no":true,"narviika.no":true,"naustdal.no":true,"nedre-eiker.no":true,"nes.akershus.no":true,"nes.buskerud.no":true,"nesna.no":true,"nesodden.no":true,"nesseby.no":true,"unjarga.no":true,"xn--unjrga-rta.no":true,"nesset.no":true,"nissedal.no":true,"nittedal.no":true,"nord-aurdal.no":true,"nord-fron.no":true,"nord-odal.no":true,"norddal.no":true,"nordkapp.no":true,"davvenjarga.no":true,"xn--davvenjrga-y4a.no":true,"nordre-land.no":true,"nordreisa.no":true,"raisa.no":true,"xn--risa-5na.no":true,"nore-og-uvdal.no":true,"notodden.no":true,"naroy.no":true,"xn--nry-yla5g.no":true,"notteroy.no":true,"xn--nttery-byae.no":true,"odda.no":true,"oksnes.no":true,"xn--ksnes-uua.no":true,"oppdal.no":true,"oppegard.no":true,"xn--oppegrd-ixa.no":true,"orkdal.no":true,"orland.no":true,"xn--rland-uua.no":true,"orskog.no":true,"xn--rskog-uua.no":true,"orsta.no":true,"xn--rsta-fra.no":true,"os.hedmark.no":true,"os.hordaland.no":true,"osen.no":true,"osteroy.no":true,"xn--ostery-fya.no":true,"ostre-toten.no":true,"xn--stre-toten-zcb.no":true,"overhalla.no":true,"ovre-eiker.no":true,"xn--vre-eiker-k8a.no":true,"oyer.no":true,"xn--yer-zna.no":true,"oygarden.no":true,"xn--ygarden-p1a.no":true,"oystre-slidre.no":true,"xn--ystre-slidre-ujb.no":true,"porsanger.no":true,"porsangu.no":true,"xn--porsgu-sta26f.no":true,"porsgrunn.no":true,"radoy.no":true,"xn--rady-ira.no":true,"rakkestad.no":true,"rana.no":true,"ruovat.no":true,"randaberg.no":true,"rauma.no":true,"rendalen.no":true,"rennebu.no":true,"rennesoy.no":true,"xn--rennesy-v1a.no":true,"rindal.no":true,"ringebu.no":true,"ringerike.no":true,"ringsaker.no":true,"rissa.no":true,"risor.no":true,"xn--risr-ira.no":true,"roan.no":true,"rollag.no":true,"rygge.no":true,"ralingen.no":true,"xn--rlingen-mxa.no":true,"rodoy.no":true,"xn--rdy-0nab.no":true,"romskog.no":true,"xn--rmskog-bya.no":true,"roros.no":true,"xn--rros-gra.no":true,"rost.no":true,"xn--rst-0na.no":true,"royken.no":true,"xn--ryken-vua.no":true,"royrvik.no":true,"xn--ryrvik-bya.no":true,"rade.no":true,"xn--rde-ula.no":true,"salangen.no":true,"siellak.no":true,"saltdal.no":true,"salat.no":true,"xn--slt-elab.no":true,"xn--slat-5na.no":true,"samnanger.no":true,"sande.more-og-romsdal.no":true,"sande.xn--mre-og-romsdal-qqb.no":true,"sande.vestfold.no":true,"sandefjord.no":true,"sandnes.no":true,"sandoy.no":true,"xn--sandy-yua.no":true,"sarpsborg.no":true,"sauda.no":true,"sauherad.no":true,"sel.no":true,"selbu.no":true,"selje.no":true,"seljord.no":true,"sigdal.no":true,"siljan.no":true,"sirdal.no":true,"skaun.no":true,"skedsmo.no":true,"ski.no":true,"skien.no":true,"skiptvet.no":true,"skjervoy.no":true,"xn--skjervy-v1a.no":true,"skierva.no":true,"xn--skierv-uta.no":true,"skjak.no":true,"xn--skjk-soa.no":true,"skodje.no":true,"skanland.no":true,"xn--sknland-fxa.no":true,"skanit.no":true,"xn--sknit-yqa.no":true,"smola.no":true,"xn--smla-hra.no":true,"snillfjord.no":true,"snasa.no":true,"xn--snsa-roa.no":true,"snoasa.no":true,"snaase.no":true,"xn--snase-nra.no":true,"sogndal.no":true,"sokndal.no":true,"sola.no":true,"solund.no":true,"songdalen.no":true,"sortland.no":true,"spydeberg.no":true,"stange.no":true,"stavanger.no":true,"steigen.no":true,"steinkjer.no":true,"stjordal.no":true,"xn--stjrdal-s1a.no":true,"stokke.no":true,"stor-elvdal.no":true,"stord.no":true,"stordal.no":true,"storfjord.no":true,"omasvuotna.no":true,"strand.no":true,"stranda.no":true,"stryn.no":true,"sula.no":true,"suldal.no":true,"sund.no":true,"sunndal.no":true,"surnadal.no":true,"sveio.no":true,"svelvik.no":true,"sykkylven.no":true,"sogne.no":true,"xn--sgne-gra.no":true,"somna.no":true,"xn--smna-gra.no":true,"sondre-land.no":true,"xn--sndre-land-0cb.no":true,"sor-aurdal.no":true,"xn--sr-aurdal-l8a.no":true,"sor-fron.no":true,"xn--sr-fron-q1a.no":true,"sor-odal.no":true,"xn--sr-odal-q1a.no":true,"sor-varanger.no":true,"xn--sr-varanger-ggb.no":true,"matta-varjjat.no":true,"xn--mtta-vrjjat-k7af.no":true,"sorfold.no":true,"xn--srfold-bya.no":true,"sorreisa.no":true,"xn--srreisa-q1a.no":true,"sorum.no":true,"xn--srum-gra.no":true,"tana.no":true,"deatnu.no":true,"time.no":true,"tingvoll.no":true,"tinn.no":true,"tjeldsund.no":true,"dielddanuorri.no":true,"tjome.no":true,"xn--tjme-hra.no":true,"tokke.no":true,"tolga.no":true,"torsken.no":true,"tranoy.no":true,"xn--trany-yua.no":true,"tromso.no":true,"xn--troms-zua.no":true,"tromsa.no":true,"romsa.no":true,"trondheim.no":true,"troandin.no":true,"trysil.no":true,"trana.no":true,"xn--trna-woa.no":true,"trogstad.no":true,"xn--trgstad-r1a.no":true,"tvedestrand.no":true,"tydal.no":true,"tynset.no":true,"tysfjord.no":true,"divtasvuodna.no":true,"divttasvuotna.no":true,"tysnes.no":true,"tysvar.no":true,"xn--tysvr-vra.no":true,"tonsberg.no":true,"xn--tnsberg-q1a.no":true,"ullensaker.no":true,"ullensvang.no":true,"ulvik.no":true,"utsira.no":true,"vadso.no":true,"xn--vads-jra.no":true,"cahcesuolo.no":true,"xn--hcesuolo-7ya35b.no":true,"vaksdal.no":true,"valle.no":true,"vang.no":true,"vanylven.no":true,"vardo.no":true,"xn--vard-jra.no":true,"varggat.no":true,"xn--vrggt-xqad.no":true,"vefsn.no":true,"vaapste.no":true,"vega.no":true,"vegarshei.no":true,"xn--vegrshei-c0a.no":true,"vennesla.no":true,"verdal.no":true,"verran.no":true,"vestby.no":true,"vestnes.no":true,"vestre-slidre.no":true,"vestre-toten.no":true,"vestvagoy.no":true,"xn--vestvgy-ixa6o.no":true,"vevelstad.no":true,"vik.no":true,"vikna.no":true,"vindafjord.no":true,"volda.no":true,"voss.no":true,"varoy.no":true,"xn--vry-yla5g.no":true,"vagan.no":true,"xn--vgan-qoa.no":true,"voagat.no":true,"vagsoy.no":true,"xn--vgsy-qoa0j.no":true,"vaga.no":true,"xn--vg-yiab.no":true,"valer.ostfold.no":true,"xn--vler-qoa.xn--stfold-9xa.no":true,"valer.hedmark.no":true,"xn--vler-qoa.hedmark.no":true,"*.np":true,"nr":true,"biz.nr":true,"info.nr":true,"gov.nr":true,"edu.nr":true,"org.nr":true,"net.nr":true,"com.nr":true,"nu":true,"nz":true,"ac.nz":true,"co.nz":true,"cri.nz":true,"geek.nz":true,"gen.nz":true,"govt.nz":true,"health.nz":true,"iwi.nz":true,"kiwi.nz":true,"maori.nz":true,"mil.nz":true,"xn--mori-qsa.nz":true,"net.nz":true,"org.nz":true,"parliament.nz":true,"school.nz":true,"om":true,"co.om":true,"com.om":true,"edu.om":true,"gov.om":true,"med.om":true,"museum.om":true,"net.om":true,"org.om":true,"pro.om":true,"org":true,"pa":true,"ac.pa":true,"gob.pa":true,"com.pa":true,"org.pa":true,"sld.pa":true,"edu.pa":true,"net.pa":true,"ing.pa":true,"abo.pa":true,"med.pa":true,"nom.pa":true,"pe":true,"edu.pe":true,"gob.pe":true,"nom.pe":true,"mil.pe":true,"org.pe":true,"com.pe":true,"net.pe":true,"pf":true,"com.pf":true,"org.pf":true,"edu.pf":true,"*.pg":true,"ph":true,"com.ph":true,"net.ph":true,"org.ph":true,"gov.ph":true,"edu.ph":true,"ngo.ph":true,"mil.ph":true,"i.ph":true,"pk":true,"com.pk":true,"net.pk":true,"edu.pk":true,"org.pk":true,"fam.pk":true,"biz.pk":true,"web.pk":true,"gov.pk":true,"gob.pk":true,"gok.pk":true,"gon.pk":true,"gop.pk":true,"gos.pk":true,"info.pk":true,"pl":true,"com.pl":true,"net.pl":true,"org.pl":true,"aid.pl":true,"agro.pl":true,"atm.pl":true,"auto.pl":true,"biz.pl":true,"edu.pl":true,"gmina.pl":true,"gsm.pl":true,"info.pl":true,"mail.pl":true,"miasta.pl":true,"media.pl":true,"mil.pl":true,"nieruchomosci.pl":true,"nom.pl":true,"pc.pl":true,"powiat.pl":true,"priv.pl":true,"realestate.pl":true,"rel.pl":true,"sex.pl":true,"shop.pl":true,"sklep.pl":true,"sos.pl":true,"szkola.pl":true,"targi.pl":true,"tm.pl":true,"tourism.pl":true,"travel.pl":true,"turystyka.pl":true,"gov.pl":true,"ap.gov.pl":true,"ic.gov.pl":true,"is.gov.pl":true,"us.gov.pl":true,"kmpsp.gov.pl":true,"kppsp.gov.pl":true,"kwpsp.gov.pl":true,"psp.gov.pl":true,"wskr.gov.pl":true,"kwp.gov.pl":true,"mw.gov.pl":true,"ug.gov.pl":true,"um.gov.pl":true,"umig.gov.pl":true,"ugim.gov.pl":true,"upow.gov.pl":true,"uw.gov.pl":true,"starostwo.gov.pl":true,"pa.gov.pl":true,"po.gov.pl":true,"psse.gov.pl":true,"pup.gov.pl":true,"rzgw.gov.pl":true,"sa.gov.pl":true,"so.gov.pl":true,"sr.gov.pl":true,"wsa.gov.pl":true,"sko.gov.pl":true,"uzs.gov.pl":true,"wiih.gov.pl":true,"winb.gov.pl":true,"pinb.gov.pl":true,"wios.gov.pl":true,"witd.gov.pl":true,"wzmiuw.gov.pl":true,"piw.gov.pl":true,"wiw.gov.pl":true,"griw.gov.pl":true,"wif.gov.pl":true,"oum.gov.pl":true,"sdn.gov.pl":true,"zp.gov.pl":true,"uppo.gov.pl":true,"mup.gov.pl":true,"wuoz.gov.pl":true,"konsulat.gov.pl":true,"oirm.gov.pl":true,"augustow.pl":true,"babia-gora.pl":true,"bedzin.pl":true,"beskidy.pl":true,"bialowieza.pl":true,"bialystok.pl":true,"bielawa.pl":true,"bieszczady.pl":true,"boleslawiec.pl":true,"bydgoszcz.pl":true,"bytom.pl":true,"cieszyn.pl":true,"czeladz.pl":true,"czest.pl":true,"dlugoleka.pl":true,"elblag.pl":true,"elk.pl":true,"glogow.pl":true,"gniezno.pl":true,"gorlice.pl":true,"grajewo.pl":true,"ilawa.pl":true,"jaworzno.pl":true,"jelenia-gora.pl":true,"jgora.pl":true,"kalisz.pl":true,"kazimierz-dolny.pl":true,"karpacz.pl":true,"kartuzy.pl":true,"kaszuby.pl":true,"katowice.pl":true,"kepno.pl":true,"ketrzyn.pl":true,"klodzko.pl":true,"kobierzyce.pl":true,"kolobrzeg.pl":true,"konin.pl":true,"konskowola.pl":true,"kutno.pl":true,"lapy.pl":true,"lebork.pl":true,"legnica.pl":true,"lezajsk.pl":true,"limanowa.pl":true,"lomza.pl":true,"lowicz.pl":true,"lubin.pl":true,"lukow.pl":true,"malbork.pl":true,"malopolska.pl":true,"mazowsze.pl":true,"mazury.pl":true,"mielec.pl":true,"mielno.pl":true,"mragowo.pl":true,"naklo.pl":true,"nowaruda.pl":true,"nysa.pl":true,"olawa.pl":true,"olecko.pl":true,"olkusz.pl":true,"olsztyn.pl":true,"opoczno.pl":true,"opole.pl":true,"ostroda.pl":true,"ostroleka.pl":true,"ostrowiec.pl":true,"ostrowwlkp.pl":true,"pila.pl":true,"pisz.pl":true,"podhale.pl":true,"podlasie.pl":true,"polkowice.pl":true,"pomorze.pl":true,"pomorskie.pl":true,"prochowice.pl":true,"pruszkow.pl":true,"przeworsk.pl":true,"pulawy.pl":true,"radom.pl":true,"rawa-maz.pl":true,"rybnik.pl":true,"rzeszow.pl":true,"sanok.pl":true,"sejny.pl":true,"slask.pl":true,"slupsk.pl":true,"sosnowiec.pl":true,"stalowa-wola.pl":true,"skoczow.pl":true,"starachowice.pl":true,"stargard.pl":true,"suwalki.pl":true,"swidnica.pl":true,"swiebodzin.pl":true,"swinoujscie.pl":true,"szczecin.pl":true,"szczytno.pl":true,"tarnobrzeg.pl":true,"tgory.pl":true,"turek.pl":true,"tychy.pl":true,"ustka.pl":true,"walbrzych.pl":true,"warmia.pl":true,"warszawa.pl":true,"waw.pl":true,"wegrow.pl":true,"wielun.pl":true,"wlocl.pl":true,"wloclawek.pl":true,"wodzislaw.pl":true,"wolomin.pl":true,"wroclaw.pl":true,"zachpomor.pl":true,"zagan.pl":true,"zarow.pl":true,"zgora.pl":true,"zgorzelec.pl":true,"pm":true,"pn":true,"gov.pn":true,"co.pn":true,"org.pn":true,"edu.pn":true,"net.pn":true,"post":true,"pr":true,"com.pr":true,"net.pr":true,"org.pr":true,"gov.pr":true,"edu.pr":true,"isla.pr":true,"pro.pr":true,"biz.pr":true,"info.pr":true,"name.pr":true,"est.pr":true,"prof.pr":true,"ac.pr":true,"pro":true,"aaa.pro":true,"aca.pro":true,"acct.pro":true,"avocat.pro":true,"bar.pro":true,"cpa.pro":true,"eng.pro":true,"jur.pro":true,"law.pro":true,"med.pro":true,"recht.pro":true,"ps":true,"edu.ps":true,"gov.ps":true,"sec.ps":true,"plo.ps":true,"com.ps":true,"org.ps":true,"net.ps":true,"pt":true,"net.pt":true,"gov.pt":true,"org.pt":true,"edu.pt":true,"int.pt":true,"publ.pt":true,"com.pt":true,"nome.pt":true,"pw":true,"co.pw":true,"ne.pw":true,"or.pw":true,"ed.pw":true,"go.pw":true,"belau.pw":true,"py":true,"com.py":true,"coop.py":true,"edu.py":true,"gov.py":true,"mil.py":true,"net.py":true,"org.py":true,"qa":true,"com.qa":true,"edu.qa":true,"gov.qa":true,"mil.qa":true,"name.qa":true,"net.qa":true,"org.qa":true,"sch.qa":true,"re":true,"asso.re":true,"com.re":true,"nom.re":true,"ro":true,"arts.ro":true,"com.ro":true,"firm.ro":true,"info.ro":true,"nom.ro":true,"nt.ro":true,"org.ro":true,"rec.ro":true,"store.ro":true,"tm.ro":true,"www.ro":true,"rs":true,"ac.rs":true,"co.rs":true,"edu.rs":true,"gov.rs":true,"in.rs":true,"org.rs":true,"ru":true,"ac.ru":true,"com.ru":true,"edu.ru":true,"int.ru":true,"net.ru":true,"org.ru":true,"pp.ru":true,"adygeya.ru":true,"altai.ru":true,"amur.ru":true,"arkhangelsk.ru":true,"astrakhan.ru":true,"bashkiria.ru":true,"belgorod.ru":true,"bir.ru":true,"bryansk.ru":true,"buryatia.ru":true,"cbg.ru":true,"chel.ru":true,"chelyabinsk.ru":true,"chita.ru":true,"chukotka.ru":true,"chuvashia.ru":true,"dagestan.ru":true,"dudinka.ru":true,"e-burg.ru":true,"grozny.ru":true,"irkutsk.ru":true,"ivanovo.ru":true,"izhevsk.ru":true,"jar.ru":true,"joshkar-ola.ru":true,"kalmykia.ru":true,"kaluga.ru":true,"kamchatka.ru":true,"karelia.ru":true,"kazan.ru":true,"kchr.ru":true,"kemerovo.ru":true,"khabarovsk.ru":true,"khakassia.ru":true,"khv.ru":true,"kirov.ru":true,"koenig.ru":true,"komi.ru":true,"kostroma.ru":true,"krasnoyarsk.ru":true,"kuban.ru":true,"kurgan.ru":true,"kursk.ru":true,"lipetsk.ru":true,"magadan.ru":true,"mari.ru":true,"mari-el.ru":true,"marine.ru":true,"mordovia.ru":true,"msk.ru":true,"murmansk.ru":true,"nalchik.ru":true,"nnov.ru":true,"nov.ru":true,"novosibirsk.ru":true,"nsk.ru":true,"omsk.ru":true,"orenburg.ru":true,"oryol.ru":true,"palana.ru":true,"penza.ru":true,"perm.ru":true,"ptz.ru":true,"rnd.ru":true,"ryazan.ru":true,"sakhalin.ru":true,"samara.ru":true,"saratov.ru":true,"simbirsk.ru":true,"smolensk.ru":true,"spb.ru":true,"stavropol.ru":true,"stv.ru":true,"surgut.ru":true,"tambov.ru":true,"tatarstan.ru":true,"tom.ru":true,"tomsk.ru":true,"tsaritsyn.ru":true,"tsk.ru":true,"tula.ru":true,"tuva.ru":true,"tver.ru":true,"tyumen.ru":true,"udm.ru":true,"udmurtia.ru":true,"ulan-ude.ru":true,"vladikavkaz.ru":true,"vladimir.ru":true,"vladivostok.ru":true,"volgograd.ru":true,"vologda.ru":true,"voronezh.ru":true,"vrn.ru":true,"vyatka.ru":true,"yakutia.ru":true,"yamal.ru":true,"yaroslavl.ru":true,"yekaterinburg.ru":true,"yuzhno-sakhalinsk.ru":true,"amursk.ru":true,"baikal.ru":true,"cmw.ru":true,"fareast.ru":true,"jamal.ru":true,"kms.ru":true,"k-uralsk.ru":true,"kustanai.ru":true,"kuzbass.ru":true,"mytis.ru":true,"nakhodka.ru":true,"nkz.ru":true,"norilsk.ru":true,"oskol.ru":true,"pyatigorsk.ru":true,"rubtsovsk.ru":true,"snz.ru":true,"syzran.ru":true,"vdonsk.ru":true,"zgrad.ru":true,"gov.ru":true,"mil.ru":true,"test.ru":true,"rw":true,"gov.rw":true,"net.rw":true,"edu.rw":true,"ac.rw":true,"com.rw":true,"co.rw":true,"int.rw":true,"mil.rw":true,"gouv.rw":true,"sa":true,"com.sa":true,"net.sa":true,"org.sa":true,"gov.sa":true,"med.sa":true,"pub.sa":true,"edu.sa":true,"sch.sa":true,"sb":true,"com.sb":true,"edu.sb":true,"gov.sb":true,"net.sb":true,"org.sb":true,"sc":true,"com.sc":true,"gov.sc":true,"net.sc":true,"org.sc":true,"edu.sc":true,"sd":true,"com.sd":true,"net.sd":true,"org.sd":true,"edu.sd":true,"med.sd":true,"tv.sd":true,"gov.sd":true,"info.sd":true,"se":true,"a.se":true,"ac.se":true,"b.se":true,"bd.se":true,"brand.se":true,"c.se":true,"d.se":true,"e.se":true,"f.se":true,"fh.se":true,"fhsk.se":true,"fhv.se":true,"g.se":true,"h.se":true,"i.se":true,"k.se":true,"komforb.se":true,"kommunalforbund.se":true,"komvux.se":true,"l.se":true,"lanbib.se":true,"m.se":true,"n.se":true,"naturbruksgymn.se":true,"o.se":true,"org.se":true,"p.se":true,"parti.se":true,"pp.se":true,"press.se":true,"r.se":true,"s.se":true,"t.se":true,"tm.se":true,"u.se":true,"w.se":true,"x.se":true,"y.se":true,"z.se":true,"sg":true,"com.sg":true,"net.sg":true,"org.sg":true,"gov.sg":true,"edu.sg":true,"per.sg":true,"sh":true,"com.sh":true,"net.sh":true,"gov.sh":true,"org.sh":true,"mil.sh":true,"si":true,"sj":true,"sk":true,"sl":true,"com.sl":true,"net.sl":true,"edu.sl":true,"gov.sl":true,"org.sl":true,"sm":true,"sn":true,"art.sn":true,"com.sn":true,"edu.sn":true,"gouv.sn":true,"org.sn":true,"perso.sn":true,"univ.sn":true,"so":true,"com.so":true,"net.so":true,"org.so":true,"sr":true,"st":true,"co.st":true,"com.st":true,"consulado.st":true,"edu.st":true,"embaixada.st":true,"gov.st":true,"mil.st":true,"net.st":true,"org.st":true,"principe.st":true,"saotome.st":true,"store.st":true,"su":true,"adygeya.su":true,"arkhangelsk.su":true,"balashov.su":true,"bashkiria.su":true,"bryansk.su":true,"dagestan.su":true,"grozny.su":true,"ivanovo.su":true,"kalmykia.su":true,"kaluga.su":true,"karelia.su":true,"khakassia.su":true,"krasnodar.su":true,"kurgan.su":true,"lenug.su":true,"mordovia.su":true,"msk.su":true,"murmansk.su":true,"nalchik.su":true,"nov.su":true,"obninsk.su":true,"penza.su":true,"pokrovsk.su":true,"sochi.su":true,"spb.su":true,"togliatti.su":true,"troitsk.su":true,"tula.su":true,"tuva.su":true,"vladikavkaz.su":true,"vladimir.su":true,"vologda.su":true,"sv":true,"com.sv":true,"edu.sv":true,"gob.sv":true,"org.sv":true,"red.sv":true,"sx":true,"gov.sx":true,"sy":true,"edu.sy":true,"gov.sy":true,"net.sy":true,"mil.sy":true,"com.sy":true,"org.sy":true,"sz":true,"co.sz":true,"ac.sz":true,"org.sz":true,"tc":true,"td":true,"tel":true,"tf":true,"tg":true,"th":true,"ac.th":true,"co.th":true,"go.th":true,"in.th":true,"mi.th":true,"net.th":true,"or.th":true,"tj":true,"ac.tj":true,"biz.tj":true,"co.tj":true,"com.tj":true,"edu.tj":true,"go.tj":true,"gov.tj":true,"int.tj":true,"mil.tj":true,"name.tj":true,"net.tj":true,"nic.tj":true,"org.tj":true,"test.tj":true,"web.tj":true,"tk":true,"tl":true,"gov.tl":true,"tm":true,"com.tm":true,"co.tm":true,"org.tm":true,"net.tm":true,"nom.tm":true,"gov.tm":true,"mil.tm":true,"edu.tm":true,"tn":true,"com.tn":true,"ens.tn":true,"fin.tn":true,"gov.tn":true,"ind.tn":true,"intl.tn":true,"nat.tn":true,"net.tn":true,"org.tn":true,"info.tn":true,"perso.tn":true,"tourism.tn":true,"edunet.tn":true,"rnrt.tn":true,"rns.tn":true,"rnu.tn":true,"mincom.tn":true,"agrinet.tn":true,"defense.tn":true,"turen.tn":true,"to":true,"com.to":true,"gov.to":true,"net.to":true,"org.to":true,"edu.to":true,"mil.to":true,"tr":true,"com.tr":true,"info.tr":true,"biz.tr":true,"net.tr":true,"org.tr":true,"web.tr":true,"gen.tr":true,"tv.tr":true,"av.tr":true,"dr.tr":true,"bbs.tr":true,"name.tr":true,"tel.tr":true,"gov.tr":true,"bel.tr":true,"pol.tr":true,"mil.tr":true,"k12.tr":true,"edu.tr":true,"kep.tr":true,"nc.tr":true,"gov.nc.tr":true,"travel":true,"tt":true,"co.tt":true,"com.tt":true,"org.tt":true,"net.tt":true,"biz.tt":true,"info.tt":true,"pro.tt":true,"int.tt":true,"coop.tt":true,"jobs.tt":true,"mobi.tt":true,"travel.tt":true,"museum.tt":true,"aero.tt":true,"name.tt":true,"gov.tt":true,"edu.tt":true,"tv":true,"tw":true,"edu.tw":true,"gov.tw":true,"mil.tw":true,"com.tw":true,"net.tw":true,"org.tw":true,"idv.tw":true,"game.tw":true,"ebiz.tw":true,"club.tw":true,"xn--zf0ao64a.tw":true,"xn--uc0atv.tw":true,"xn--czrw28b.tw":true,"tz":true,"ac.tz":true,"co.tz":true,"go.tz":true,"hotel.tz":true,"info.tz":true,"me.tz":true,"mil.tz":true,"mobi.tz":true,"ne.tz":true,"or.tz":true,"sc.tz":true,"tv.tz":true,"ua":true,"com.ua":true,"edu.ua":true,"gov.ua":true,"in.ua":true,"net.ua":true,"org.ua":true,"cherkassy.ua":true,"cherkasy.ua":true,"chernigov.ua":true,"chernihiv.ua":true,"chernivtsi.ua":true,"chernovtsy.ua":true,"ck.ua":true,"cn.ua":true,"cr.ua":true,"crimea.ua":true,"cv.ua":true,"dn.ua":true,"dnepropetrovsk.ua":true,"dnipropetrovsk.ua":true,"dominic.ua":true,"donetsk.ua":true,"dp.ua":true,"if.ua":true,"ivano-frankivsk.ua":true,"kh.ua":true,"kharkiv.ua":true,"kharkov.ua":true,"kherson.ua":true,"khmelnitskiy.ua":true,"khmelnytskyi.ua":true,"kiev.ua":true,"kirovograd.ua":true,"km.ua":true,"kr.ua":true,"krym.ua":true,"ks.ua":true,"kv.ua":true,"kyiv.ua":true,"lg.ua":true,"lt.ua":true,"lugansk.ua":true,"lutsk.ua":true,"lv.ua":true,"lviv.ua":true,"mk.ua":true,"mykolaiv.ua":true,"nikolaev.ua":true,"od.ua":true,"odesa.ua":true,"odessa.ua":true,"pl.ua":true,"poltava.ua":true,"rivne.ua":true,"rovno.ua":true,"rv.ua":true,"sb.ua":true,"sebastopol.ua":true,"sevastopol.ua":true,"sm.ua":true,"sumy.ua":true,"te.ua":true,"ternopil.ua":true,"uz.ua":true,"uzhgorod.ua":true,"vinnica.ua":true,"vinnytsia.ua":true,"vn.ua":true,"volyn.ua":true,"yalta.ua":true,"zaporizhzhe.ua":true,"zaporizhzhia.ua":true,"zhitomir.ua":true,"zhytomyr.ua":true,"zp.ua":true,"zt.ua":true,"ug":true,"co.ug":true,"or.ug":true,"ac.ug":true,"sc.ug":true,"go.ug":true,"ne.ug":true,"com.ug":true,"org.ug":true,"uk":true,"ac.uk":true,"co.uk":true,"gov.uk":true,"ltd.uk":true,"me.uk":true,"net.uk":true,"nhs.uk":true,"org.uk":true,"plc.uk":true,"police.uk":true,"*.sch.uk":true,"us":true,"dni.us":true,"fed.us":true,"isa.us":true,"kids.us":true,"nsn.us":true,"ak.us":true,"al.us":true,"ar.us":true,"as.us":true,"az.us":true,"ca.us":true,"co.us":true,"ct.us":true,"dc.us":true,"de.us":true,"fl.us":true,"ga.us":true,"gu.us":true,"hi.us":true,"ia.us":true,"id.us":true,"il.us":true,"in.us":true,"ks.us":true,"ky.us":true,"la.us":true,"ma.us":true,"md.us":true,"me.us":true,"mi.us":true,"mn.us":true,"mo.us":true,"ms.us":true,"mt.us":true,"nc.us":true,"nd.us":true,"ne.us":true,"nh.us":true,"nj.us":true,"nm.us":true,"nv.us":true,"ny.us":true,"oh.us":true,"ok.us":true,"or.us":true,"pa.us":true,"pr.us":true,"ri.us":true,"sc.us":true,"sd.us":true,"tn.us":true,"tx.us":true,"ut.us":true,"vi.us":true,"vt.us":true,"va.us":true,"wa.us":true,"wi.us":true,"wv.us":true,"wy.us":true,"k12.ak.us":true,"k12.al.us":true,"k12.ar.us":true,"k12.as.us":true,"k12.az.us":true,"k12.ca.us":true,"k12.co.us":true,"k12.ct.us":true,"k12.dc.us":true,"k12.de.us":true,"k12.fl.us":true,"k12.ga.us":true,"k12.gu.us":true,"k12.ia.us":true,"k12.id.us":true,"k12.il.us":true,"k12.in.us":true,"k12.ks.us":true,"k12.ky.us":true,"k12.la.us":true,"k12.ma.us":true,"k12.md.us":true,"k12.me.us":true,"k12.mi.us":true,"k12.mn.us":true,"k12.mo.us":true,"k12.ms.us":true,"k12.mt.us":true,"k12.nc.us":true,"k12.ne.us":true,"k12.nh.us":true,"k12.nj.us":true,"k12.nm.us":true,"k12.nv.us":true,"k12.ny.us":true,"k12.oh.us":true,"k12.ok.us":true,"k12.or.us":true,"k12.pa.us":true,"k12.pr.us":true,"k12.ri.us":true,"k12.sc.us":true,"k12.tn.us":true,"k12.tx.us":true,"k12.ut.us":true,"k12.vi.us":true,"k12.vt.us":true,"k12.va.us":true,"k12.wa.us":true,"k12.wi.us":true,"k12.wy.us":true,"cc.ak.us":true,"cc.al.us":true,"cc.ar.us":true,"cc.as.us":true,"cc.az.us":true,"cc.ca.us":true,"cc.co.us":true,"cc.ct.us":true,"cc.dc.us":true,"cc.de.us":true,"cc.fl.us":true,"cc.ga.us":true,"cc.gu.us":true,"cc.hi.us":true,"cc.ia.us":true,"cc.id.us":true,"cc.il.us":true,"cc.in.us":true,"cc.ks.us":true,"cc.ky.us":true,"cc.la.us":true,"cc.ma.us":true,"cc.md.us":true,"cc.me.us":true,"cc.mi.us":true,"cc.mn.us":true,"cc.mo.us":true,"cc.ms.us":true,"cc.mt.us":true,"cc.nc.us":true,"cc.nd.us":true,"cc.ne.us":true,"cc.nh.us":true,"cc.nj.us":true,"cc.nm.us":true,"cc.nv.us":true,"cc.ny.us":true,"cc.oh.us":true,"cc.ok.us":true,"cc.or.us":true,"cc.pa.us":true,"cc.pr.us":true,"cc.ri.us":true,"cc.sc.us":true,"cc.sd.us":true,"cc.tn.us":true,"cc.tx.us":true,"cc.ut.us":true,"cc.vi.us":true,"cc.vt.us":true,"cc.va.us":true,"cc.wa.us":true,"cc.wi.us":true,"cc.wv.us":true,"cc.wy.us":true,"lib.ak.us":true,"lib.al.us":true,"lib.ar.us":true,"lib.as.us":true,"lib.az.us":true,"lib.ca.us":true,"lib.co.us":true,"lib.ct.us":true,"lib.dc.us":true,"lib.fl.us":true,"lib.ga.us":true,"lib.gu.us":true,"lib.hi.us":true,"lib.ia.us":true,"lib.id.us":true,"lib.il.us":true,"lib.in.us":true,"lib.ks.us":true,"lib.ky.us":true,"lib.la.us":true,"lib.ma.us":true,"lib.md.us":true,"lib.me.us":true,"lib.mi.us":true,"lib.mn.us":true,"lib.mo.us":true,"lib.ms.us":true,"lib.mt.us":true,"lib.nc.us":true,"lib.nd.us":true,"lib.ne.us":true,"lib.nh.us":true,"lib.nj.us":true,"lib.nm.us":true,"lib.nv.us":true,"lib.ny.us":true,"lib.oh.us":true,"lib.ok.us":true,"lib.or.us":true,"lib.pa.us":true,"lib.pr.us":true,"lib.ri.us":true,"lib.sc.us":true,"lib.sd.us":true,"lib.tn.us":true,"lib.tx.us":true,"lib.ut.us":true,"lib.vi.us":true,"lib.vt.us":true,"lib.va.us":true,"lib.wa.us":true,"lib.wi.us":true,"lib.wy.us":true,"pvt.k12.ma.us":true,"chtr.k12.ma.us":true,"paroch.k12.ma.us":true,"uy":true,"com.uy":true,"edu.uy":true,"gub.uy":true,"mil.uy":true,"net.uy":true,"org.uy":true,"uz":true,"co.uz":true,"com.uz":true,"net.uz":true,"org.uz":true,"va":true,"vc":true,"com.vc":true,"net.vc":true,"org.vc":true,"gov.vc":true,"mil.vc":true,"edu.vc":true,"ve":true,"arts.ve":true,"co.ve":true,"com.ve":true,"e12.ve":true,"edu.ve":true,"firm.ve":true,"gob.ve":true,"gov.ve":true,"info.ve":true,"int.ve":true,"mil.ve":true,"net.ve":true,"org.ve":true,"rec.ve":true,"store.ve":true,"tec.ve":true,"web.ve":true,"vg":true,"vi":true,"co.vi":true,"com.vi":true,"k12.vi":true,"net.vi":true,"org.vi":true,"vn":true,"com.vn":true,"net.vn":true,"org.vn":true,"edu.vn":true,"gov.vn":true,"int.vn":true,"ac.vn":true,"biz.vn":true,"info.vn":true,"name.vn":true,"pro.vn":true,"health.vn":true,"vu":true,"com.vu":true,"edu.vu":true,"net.vu":true,"org.vu":true,"wf":true,"ws":true,"com.ws":true,"net.ws":true,"org.ws":true,"gov.ws":true,"edu.ws":true,"yt":true,"xn--mgbaam7a8h":true,"xn--y9a3aq":true,"xn--54b7fta0cc":true,"xn--90ais":true,"xn--fiqs8s":true,"xn--fiqz9s":true,"xn--lgbbat1ad8j":true,"xn--wgbh1c":true,"xn--e1a4c":true,"xn--node":true,"xn--qxam":true,"xn--j6w193g":true,"xn--h2brj9c":true,"xn--mgbbh1a71e":true,"xn--fpcrj9c3d":true,"xn--gecrj9c":true,"xn--s9brj9c":true,"xn--45brj9c":true,"xn--xkc2dl3a5ee0h":true,"xn--mgba3a4f16a":true,"xn--mgba3a4fra":true,"xn--mgbtx2b":true,"xn--mgbayh7gpa":true,"xn--3e0b707e":true,"xn--80ao21a":true,"xn--fzc2c9e2c":true,"xn--xkc2al3hye2a":true,"xn--mgbc0a9azcg":true,"xn--d1alf":true,"xn--l1acc":true,"xn--mix891f":true,"xn--mix082f":true,"xn--mgbx4cd0ab":true,"xn--mgb9awbf":true,"xn--mgbai9azgqp6j":true,"xn--mgbai9a5eva00b":true,"xn--ygbi2ammx":true,"xn--90a3ac":true,"xn--o1ac.xn--90a3ac":true,"xn--c1avg.xn--90a3ac":true,"xn--90azh.xn--90a3ac":true,"xn--d1at.xn--90a3ac":true,"xn--o1ach.xn--90a3ac":true,"xn--80au.xn--90a3ac":true,"xn--p1ai":true,"xn--wgbl6a":true,"xn--mgberp4a5d4ar":true,"xn--mgberp4a5d4a87g":true,"xn--mgbqly7c0a67fbc":true,"xn--mgbqly7cvafr":true,"xn--mgbpl2fh":true,"xn--yfro4i67o":true,"xn--clchc0ea0b2g2a9gcd":true,"xn--ogbpf8fl":true,"xn--mgbtf8fl":true,"xn--o3cw4h":true,"xn--pgbs0dh":true,"xn--kpry57d":true,"xn--kprw13d":true,"xn--nnx388a":true,"xn--j1amh":true,"xn--mgb2ddes":true,"xxx":true,"*.ye":true,"ac.za":true,"agric.za":true,"alt.za":true,"co.za":true,"edu.za":true,"gov.za":true,"grondar.za":true,"law.za":true,"mil.za":true,"net.za":true,"ngo.za":true,"nis.za":true,"nom.za":true,"org.za":true,"school.za":true,"tm.za":true,"web.za":true,"zm":true,"ac.zm":true,"biz.zm":true,"co.zm":true,"com.zm":true,"edu.zm":true,"gov.zm":true,"info.zm":true,"mil.zm":true,"net.zm":true,"org.zm":true,"sch.zm":true,"*.zw":true,"aaa":true,"aarp":true,"abarth":true,"abb":true,"abbott":true,"abbvie":true,"abc":true,"able":true,"abogado":true,"abudhabi":true,"academy":true,"accenture":true,"accountant":true,"accountants":true,"aco":true,"active":true,"actor":true,"adac":true,"ads":true,"adult":true,"aeg":true,"aetna":true,"afamilycompany":true,"afl":true,"africa":true,"agakhan":true,"agency":true,"aig":true,"aigo":true,"airbus":true,"airforce":true,"airtel":true,"akdn":true,"alfaromeo":true,"alibaba":true,"alipay":true,"allfinanz":true,"allstate":true,"ally":true,"alsace":true,"alstom":true,"americanexpress":true,"americanfamily":true,"amex":true,"amfam":true,"amica":true,"amsterdam":true,"analytics":true,"android":true,"anquan":true,"anz":true,"aol":true,"apartments":true,"app":true,"apple":true,"aquarelle":true,"arab":true,"aramco":true,"archi":true,"army":true,"art":true,"arte":true,"asda":true,"associates":true,"athleta":true,"attorney":true,"auction":true,"audi":true,"audible":true,"audio":true,"auspost":true,"author":true,"auto":true,"autos":true,"avianca":true,"aws":true,"axa":true,"azure":true,"baby":true,"baidu":true,"banamex":true,"bananarepublic":true,"band":true,"bank":true,"bar":true,"barcelona":true,"barclaycard":true,"barclays":true,"barefoot":true,"bargains":true,"baseball":true,"basketball":true,"bauhaus":true,"bayern":true,"bbc":true,"bbt":true,"bbva":true,"bcg":true,"bcn":true,"beats":true,"beauty":true,"beer":true,"bentley":true,"berlin":true,"best":true,"bestbuy":true,"bet":true,"bharti":true,"bible":true,"bid":true,"bike":true,"bing":true,"bingo":true,"bio":true,"black":true,"blackfriday":true,"blanco":true,"blockbuster":true,"blog":true,"bloomberg":true,"blue":true,"bms":true,"bmw":true,"bnl":true,"bnpparibas":true,"boats":true,"boehringer":true,"bofa":true,"bom":true,"bond":true,"boo":true,"book":true,"booking":true,"boots":true,"bosch":true,"bostik":true,"boston":true,"bot":true,"boutique":true,"box":true,"bradesco":true,"bridgestone":true,"broadway":true,"broker":true,"brother":true,"brussels":true,"budapest":true,"bugatti":true,"build":true,"builders":true,"business":true,"buy":true,"buzz":true,"bzh":true,"cab":true,"cafe":true,"cal":true,"call":true,"calvinklein":true,"cam":true,"camera":true,"camp":true,"cancerresearch":true,"canon":true,"capetown":true,"capital":true,"capitalone":true,"car":true,"caravan":true,"cards":true,"care":true,"career":true,"careers":true,"cars":true,"cartier":true,"casa":true,"case":true,"caseih":true,"cash":true,"casino":true,"catering":true,"catholic":true,"cba":true,"cbn":true,"cbre":true,"cbs":true,"ceb":true,"center":true,"ceo":true,"cern":true,"cfa":true,"cfd":true,"chanel":true,"channel":true,"chase":true,"chat":true,"cheap":true,"chintai":true,"chloe":true,"christmas":true,"chrome":true,"chrysler":true,"church":true,"cipriani":true,"circle":true,"cisco":true,"citadel":true,"citi":true,"citic":true,"city":true,"cityeats":true,"claims":true,"cleaning":true,"click":true,"clinic":true,"clinique":true,"clothing":true,"cloud":true,"club":true,"clubmed":true,"coach":true,"codes":true,"coffee":true,"college":true,"cologne":true,"comcast":true,"commbank":true,"community":true,"company":true,"compare":true,"computer":true,"comsec":true,"condos":true,"construction":true,"consulting":true,"contact":true,"contractors":true,"cooking":true,"cookingchannel":true,"cool":true,"corsica":true,"country":true,"coupon":true,"coupons":true,"courses":true,"credit":true,"creditcard":true,"creditunion":true,"cricket":true,"crown":true,"crs":true,"cruise":true,"cruises":true,"csc":true,"cuisinella":true,"cymru":true,"cyou":true,"dabur":true,"dad":true,"dance":true,"data":true,"date":true,"dating":true,"datsun":true,"day":true,"dclk":true,"dds":true,"deal":true,"dealer":true,"deals":true,"degree":true,"delivery":true,"dell":true,"deloitte":true,"delta":true,"democrat":true,"dental":true,"dentist":true,"desi":true,"design":true,"dev":true,"dhl":true,"diamonds":true,"diet":true,"digital":true,"direct":true,"directory":true,"discount":true,"discover":true,"dish":true,"diy":true,"dnp":true,"docs":true,"doctor":true,"dodge":true,"dog":true,"doha":true,"domains":true,"dot":true,"download":true,"drive":true,"dtv":true,"dubai":true,"duck":true,"dunlop":true,"duns":true,"dupont":true,"durban":true,"dvag":true,"dvr":true,"dwg":true,"earth":true,"eat":true,"eco":true,"edeka":true,"education":true,"email":true,"emerck":true,"emerson":true,"energy":true,"engineer":true,"engineering":true,"enterprises":true,"epost":true,"epson":true,"equipment":true,"ericsson":true,"erni":true,"esq":true,"estate":true,"esurance":true,"etisalat":true,"eurovision":true,"eus":true,"events":true,"everbank":true,"exchange":true,"expert":true,"exposed":true,"express":true,"extraspace":true,"fage":true,"fail":true,"fairwinds":true,"faith":true,"family":true,"fan":true,"fans":true,"farm":true,"farmers":true,"fashion":true,"fast":true,"fedex":true,"feedback":true,"ferrari":true,"ferrero":true,"fiat":true,"fidelity":true,"fido":true,"film":true,"final":true,"finance":true,"financial":true,"fire":true,"firestone":true,"firmdale":true,"fish":true,"fishing":true,"fit":true,"fitness":true,"flickr":true,"flights":true,"flir":true,"florist":true,"flowers":true,"fly":true,"foo":true,"food":true,"foodnetwork":true,"football":true,"ford":true,"forex":true,"forsale":true,"forum":true,"foundation":true,"fox":true,"free":true,"fresenius":true,"frl":true,"frogans":true,"frontdoor":true,"frontier":true,"ftr":true,"fujitsu":true,"fujixerox":true,"fun":true,"fund":true,"furniture":true,"futbol":true,"fyi":true,"gal":true,"gallery":true,"gallo":true,"gallup":true,"game":true,"games":true,"gap":true,"garden":true,"gbiz":true,"gdn":true,"gea":true,"gent":true,"genting":true,"george":true,"ggee":true,"gift":true,"gifts":true,"gives":true,"giving":true,"glade":true,"glass":true,"gle":true,"global":true,"globo":true,"gmail":true,"gmbh":true,"gmo":true,"gmx":true,"godaddy":true,"gold":true,"goldpoint":true,"golf":true,"goo":true,"goodhands":true,"goodyear":true,"goog":true,"google":true,"gop":true,"got":true,"grainger":true,"graphics":true,"gratis":true,"green":true,"gripe":true,"grocery":true,"group":true,"guardian":true,"gucci":true,"guge":true,"guide":true,"guitars":true,"guru":true,"hair":true,"hamburg":true,"hangout":true,"haus":true,"hbo":true,"hdfc":true,"hdfcbank":true,"health":true,"healthcare":true,"help":true,"helsinki":true,"here":true,"hermes":true,"hgtv":true,"hiphop":true,"hisamitsu":true,"hitachi":true,"hiv":true,"hkt":true,"hockey":true,"holdings":true,"holiday":true,"homedepot":true,"homegoods":true,"homes":true,"homesense":true,"honda":true,"honeywell":true,"horse":true,"host":true,"hosting":true,"hot":true,"hoteles":true,"hotels":true,"hotmail":true,"house":true,"how":true,"hsbc":true,"htc":true,"hughes":true,"hyatt":true,"hyundai":true,"ibm":true,"icbc":true,"ice":true,"icu":true,"ieee":true,"ifm":true,"iinet":true,"ikano":true,"imamat":true,"imdb":true,"immo":true,"immobilien":true,"industries":true,"infiniti":true,"ing":true,"ink":true,"institute":true,"insurance":true,"insure":true,"intel":true,"international":true,"intuit":true,"investments":true,"ipiranga":true,"irish":true,"iselect":true,"ismaili":true,"ist":true,"istanbul":true,"itau":true,"itv":true,"iveco":true,"iwc":true,"jaguar":true,"java":true,"jcb":true,"jcp":true,"jeep":true,"jetzt":true,"jewelry":true,"jio":true,"jlc":true,"jll":true,"jmp":true,"jnj":true,"joburg":true,"jot":true,"joy":true,"jpmorgan":true,"jprs":true,"juegos":true,"juniper":true,"kaufen":true,"kddi":true,"kerryhotels":true,"kerrylogistics":true,"kerryproperties":true,"kfh":true,"kia":true,"kim":true,"kinder":true,"kindle":true,"kitchen":true,"kiwi":true,"koeln":true,"komatsu":true,"kosher":true,"kpmg":true,"kpn":true,"krd":true,"kred":true,"kuokgroup":true,"kyoto":true,"lacaixa":true,"ladbrokes":true,"lamborghini":true,"lamer":true,"lancaster":true,"lancia":true,"lancome":true,"land":true,"landrover":true,"lanxess":true,"lasalle":true,"lat":true,"latino":true,"latrobe":true,"law":true,"lawyer":true,"lds":true,"lease":true,"leclerc":true,"lefrak":true,"legal":true,"lego":true,"lexus":true,"lgbt":true,"liaison":true,"lidl":true,"life":true,"lifeinsurance":true,"lifestyle":true,"lighting":true,"like":true,"lilly":true,"limited":true,"limo":true,"lincoln":true,"linde":true,"link":true,"lipsy":true,"live":true,"living":true,"lixil":true,"loan":true,"loans":true,"locker":true,"locus":true,"loft":true,"lol":true,"london":true,"lotte":true,"lotto":true,"love":true,"lpl":true,"lplfinancial":true,"ltd":true,"ltda":true,"lundbeck":true,"lupin":true,"luxe":true,"luxury":true,"macys":true,"madrid":true,"maif":true,"maison":true,"makeup":true,"man":true,"management":true,"mango":true,"map":true,"market":true,"marketing":true,"markets":true,"marriott":true,"marshalls":true,"maserati":true,"mattel":true,"mba":true,"mcd":true,"mcdonalds":true,"mckinsey":true,"med":true,"media":true,"meet":true,"melbourne":true,"meme":true,"memorial":true,"men":true,"menu":true,"meo":true,"merckmsd":true,"metlife":true,"miami":true,"microsoft":true,"mini":true,"mint":true,"mit":true,"mitsubishi":true,"mlb":true,"mls":true,"mma":true,"mobile":true,"mobily":true,"moda":true,"moe":true,"moi":true,"mom":true,"monash":true,"money":true,"monster":true,"montblanc":true,"mopar":true,"mormon":true,"mortgage":true,"moscow":true,"moto":true,"motorcycles":true,"mov":true,"movie":true,"movistar":true,"msd":true,"mtn":true,"mtpc":true,"mtr":true,"mutual":true,"mutuelle":true,"nab":true,"nadex":true,"nagoya":true,"nationwide":true,"natura":true,"navy":true,"nba":true,"nec":true,"netbank":true,"netflix":true,"network":true,"neustar":true,"new":true,"newholland":true,"news":true,"next":true,"nextdirect":true,"nexus":true,"nfl":true,"ngo":true,"nhk":true,"nico":true,"nike":true,"nikon":true,"ninja":true,"nissan":true,"nissay":true,"nokia":true,"northwesternmutual":true,"norton":true,"now":true,"nowruz":true,"nowtv":true,"nra":true,"nrw":true,"ntt":true,"nyc":true,"obi":true,"observer":true,"off":true,"office":true,"okinawa":true,"olayan":true,"olayangroup":true,"oldnavy":true,"ollo":true,"omega":true,"one":true,"ong":true,"onl":true,"online":true,"onyourside":true,"ooo":true,"open":true,"oracle":true,"orange":true,"organic":true,"orientexpress":true,"origins":true,"osaka":true,"otsuka":true,"ott":true,"ovh":true,"page":true,"pamperedchef":true,"panasonic":true,"panerai":true,"paris":true,"pars":true,"partners":true,"parts":true,"party":true,"passagens":true,"pay":true,"pccw":true,"pet":true,"pfizer":true,"pharmacy":true,"phd":true,"philips":true,"phone":true,"photo":true,"photography":true,"photos":true,"physio":true,"piaget":true,"pics":true,"pictet":true,"pictures":true,"pid":true,"pin":true,"ping":true,"pink":true,"pioneer":true,"pizza":true,"place":true,"play":true,"playstation":true,"plumbing":true,"plus":true,"pnc":true,"pohl":true,"poker":true,"politie":true,"porn":true,"pramerica":true,"praxi":true,"press":true,"prime":true,"prod":true,"productions":true,"prof":true,"progressive":true,"promo":true,"properties":true,"property":true,"protection":true,"pru":true,"prudential":true,"pub":true,"pwc":true,"qpon":true,"quebec":true,"quest":true,"qvc":true,"racing":true,"radio":true,"raid":true,"read":true,"realestate":true,"realtor":true,"realty":true,"recipes":true,"red":true,"redstone":true,"redumbrella":true,"rehab":true,"reise":true,"reisen":true,"reit":true,"reliance":true,"ren":true,"rent":true,"rentals":true,"repair":true,"report":true,"republican":true,"rest":true,"restaurant":true,"review":true,"reviews":true,"rexroth":true,"rich":true,"richardli":true,"ricoh":true,"rightathome":true,"ril":true,"rio":true,"rip":true,"rmit":true,"rocher":true,"rocks":true,"rodeo":true,"rogers":true,"room":true,"rsvp":true,"ruhr":true,"run":true,"rwe":true,"ryukyu":true,"saarland":true,"safe":true,"safety":true,"sakura":true,"sale":true,"salon":true,"samsclub":true,"samsung":true,"sandvik":true,"sandvikcoromant":true,"sanofi":true,"sap":true,"sapo":true,"sarl":true,"sas":true,"save":true,"saxo":true,"sbi":true,"sbs":true,"sca":true,"scb":true,"schaeffler":true,"schmidt":true,"scholarships":true,"school":true,"schule":true,"schwarz":true,"science":true,"scjohnson":true,"scor":true,"scot":true,"search":true,"seat":true,"secure":true,"security":true,"seek":true,"select":true,"sener":true,"services":true,"ses":true,"seven":true,"sew":true,"sex":true,"sexy":true,"sfr":true,"shangrila":true,"sharp":true,"shaw":true,"shell":true,"shia":true,"shiksha":true,"shoes":true,"shop":true,"shopping":true,"shouji":true,"show":true,"showtime":true,"shriram":true,"silk":true,"sina":true,"singles":true,"site":true,"ski":true,"skin":true,"sky":true,"skype":true,"sling":true,"smart":true,"smile":true,"sncf":true,"soccer":true,"social":true,"softbank":true,"software":true,"sohu":true,"solar":true,"solutions":true,"song":true,"sony":true,"soy":true,"space":true,"spiegel":true,"spot":true,"spreadbetting":true,"srl":true,"srt":true,"stada":true,"staples":true,"star":true,"starhub":true,"statebank":true,"statefarm":true,"statoil":true,"stc":true,"stcgroup":true,"stockholm":true,"storage":true,"store":true,"stream":true,"studio":true,"study":true,"style":true,"sucks":true,"supplies":true,"supply":true,"support":true,"surf":true,"surgery":true,"suzuki":true,"swatch":true,"swiftcover":true,"swiss":true,"sydney":true,"symantec":true,"systems":true,"tab":true,"taipei":true,"talk":true,"taobao":true,"target":true,"tatamotors":true,"tatar":true,"tattoo":true,"tax":true,"taxi":true,"tci":true,"tdk":true,"team":true,"tech":true,"technology":true,"telecity":true,"telefonica":true,"temasek":true,"tennis":true,"teva":true,"thd":true,"theater":true,"theatre":true,"theguardian":true,"tiaa":true,"tickets":true,"tienda":true,"tiffany":true,"tips":true,"tires":true,"tirol":true,"tjmaxx":true,"tjx":true,"tkmaxx":true,"tmall":true,"today":true,"tokyo":true,"tools":true,"top":true,"toray":true,"toshiba":true,"total":true,"tours":true,"town":true,"toyota":true,"toys":true,"trade":true,"trading":true,"training":true,"travelchannel":true,"travelers":true,"travelersinsurance":true,"trust":true,"trv":true,"tube":true,"tui":true,"tunes":true,"tushu":true,"tvs":true,"ubank":true,"ubs":true,"uconnect":true,"unicom":true,"university":true,"uno":true,"uol":true,"ups":true,"vacations":true,"vana":true,"vanguard":true,"vegas":true,"ventures":true,"verisign":true,"versicherung":true,"vet":true,"viajes":true,"video":true,"vig":true,"viking":true,"villas":true,"vin":true,"vip":true,"virgin":true,"visa":true,"vision":true,"vista":true,"vistaprint":true,"viva":true,"vivo":true,"vlaanderen":true,"vodka":true,"volkswagen":true,"volvo":true,"vote":true,"voting":true,"voto":true,"voyage":true,"vuelos":true,"wales":true,"walmart":true,"walter":true,"wang":true,"wanggou":true,"warman":true,"watch":true,"watches":true,"weather":true,"weatherchannel":true,"webcam":true,"weber":true,"website":true,"wed":true,"wedding":true,"weibo":true,"weir":true,"whoswho":true,"wien":true,"wiki":true,"williamhill":true,"win":true,"windows":true,"wine":true,"winners":true,"wme":true,"wolterskluwer":true,"woodside":true,"work":true,"works":true,"world":true,"wow":true,"wtc":true,"wtf":true,"xbox":true,"xerox":true,"xfinity":true,"xihuan":true,"xin":true,"xn--11b4c3d":true,"xn--1ck2e1b":true,"xn--1qqw23a":true,"xn--30rr7y":true,"xn--3bst00m":true,"xn--3ds443g":true,"xn--3oq18vl8pn36a":true,"xn--3pxu8k":true,"xn--42c2d9a":true,"xn--45q11c":true,"xn--4gbrim":true,"xn--4gq48lf9j":true,"xn--55qw42g":true,"xn--55qx5d":true,"xn--5su34j936bgsg":true,"xn--5tzm5g":true,"xn--6frz82g":true,"xn--6qq986b3xl":true,"xn--80adxhks":true,"xn--80aqecdr1a":true,"xn--80asehdb":true,"xn--80aswg":true,"xn--8y0a063a":true,"xn--9dbq2a":true,"xn--9et52u":true,"xn--9krt00a":true,"xn--b4w605ferd":true,"xn--bck1b9a5dre4c":true,"xn--c1avg":true,"xn--c2br7g":true,"xn--cck2b3b":true,"xn--cg4bki":true,"xn--czr694b":true,"xn--czrs0t":true,"xn--czru2d":true,"xn--d1acj3b":true,"xn--eckvdtc9d":true,"xn--efvy88h":true,"xn--estv75g":true,"xn--fct429k":true,"xn--fhbei":true,"xn--fiq228c5hs":true,"xn--fiq64b":true,"xn--fjq720a":true,"xn--flw351e":true,"xn--fzys8d69uvgm":true,"xn--g2xx48c":true,"xn--gckr3f0f":true,"xn--gk3at1e":true,"xn--hxt814e":true,"xn--i1b6b1a6a2e":true,"xn--imr513n":true,"xn--io0a7i":true,"xn--j1aef":true,"xn--jlq61u9w7b":true,"xn--jvr189m":true,"xn--kcrx77d1x4a":true,"xn--kpu716f":true,"xn--kput3i":true,"xn--mgba3a3ejt":true,"xn--mgba7c0bbn0a":true,"xn--mgbaakc7dvf":true,"xn--mgbab2bd":true,"xn--mgbb9fbpob":true,"xn--mgbca7dzdo":true,"xn--mgbi4ecexp":true,"xn--mgbt3dhd":true,"xn--mk1bu44c":true,"xn--mxtq1m":true,"xn--ngbc5azd":true,"xn--ngbe9e0a":true,"xn--ngbrx":true,"xn--nqv7f":true,"xn--nqv7fs00ema":true,"xn--nyqy26a":true,"xn--p1acf":true,"xn--pbt977c":true,"xn--pssy2u":true,"xn--q9jyb4c":true,"xn--qcka1pmc":true,"xn--rhqv96g":true,"xn--rovu88b":true,"xn--ses554g":true,"xn--t60b56a":true,"xn--tckwe":true,"xn--tiq49xqyj":true,"xn--unup4y":true,"xn--vermgensberater-ctb":true,"xn--vermgensberatung-pwb":true,"xn--vhquv":true,"xn--vuq861b":true,"xn--w4r85el8fhu5dnra":true,"xn--w4rs40l":true,"xn--xhq521b":true,"xn--zfr164b":true,"xperia":true,"xyz":true,"yachts":true,"yahoo":true,"yamaxun":true,"yandex":true,"yodobashi":true,"yoga":true,"yokohama":true,"you":true,"youtube":true,"yun":true,"zappos":true,"zara":true,"zero":true,"zip":true,"zippo":true,"zone":true,"zuerich":true,"beep.pl":true,"*.compute.estate":true,"*.alces.network":true,"*.alwaysdata.net":true,"cloudfront.net":true,"compute.amazonaws.com":true,"ap-northeast-1.compute.amazonaws.com":true,"ap-northeast-2.compute.amazonaws.com":true,"ap-southeast-1.compute.amazonaws.com":true,"ap-southeast-2.compute.amazonaws.com":true,"eu-central-1.compute.amazonaws.com":true,"eu-west-1.compute.amazonaws.com":true,"sa-east-1.compute.amazonaws.com":true,"us-gov-west-1.compute.amazonaws.com":true,"us-west-1.compute.amazonaws.com":true,"us-west-2.compute.amazonaws.com":true,"compute-1.amazonaws.com":true,"z-1.compute-1.amazonaws.com":true,"z-2.compute-1.amazonaws.com":true,"us-east-1.amazonaws.com":true,"compute.amazonaws.com.cn":true,"cn-north-1.compute.amazonaws.com.cn":true,"elasticbeanstalk.com":true,"elb.amazonaws.com":true,"s3.amazonaws.com":true,"s3-ap-northeast-1.amazonaws.com":true,"s3-ap-northeast-2.amazonaws.com":true,"s3-ap-southeast-1.amazonaws.com":true,"s3-ap-southeast-2.amazonaws.com":true,"s3-eu-central-1.amazonaws.com":true,"s3-eu-west-1.amazonaws.com":true,"s3-external-1.amazonaws.com":true,"s3-external-2.amazonaws.com":true,"s3-fips-us-gov-west-1.amazonaws.com":true,"s3-sa-east-1.amazonaws.com":true,"s3-us-gov-west-1.amazonaws.com":true,"s3-us-west-1.amazonaws.com":true,"s3-us-west-2.amazonaws.com":true,"s3.ap-northeast-2.amazonaws.com":true,"s3.cn-north-1.amazonaws.com.cn":true,"s3.eu-central-1.amazonaws.com":true,"on-aptible.com":true,"pimienta.org":true,"poivron.org":true,"potager.org":true,"sweetpepper.org":true,"myasustor.com":true,"myfritz.net":true,"backplaneapp.io":true,"betainabox.com":true,"bnr.la":true,"boxfuse.io":true,"browsersafetymark.io":true,"mycd.eu":true,"ae.org":true,"ar.com":true,"br.com":true,"cn.com":true,"com.de":true,"com.se":true,"de.com":true,"eu.com":true,"gb.com":true,"gb.net":true,"hu.com":true,"hu.net":true,"jp.net":true,"jpn.com":true,"kr.com":true,"mex.com":true,"no.com":true,"qc.com":true,"ru.com":true,"sa.com":true,"se.com":true,"se.net":true,"uk.com":true,"uk.net":true,"us.com":true,"uy.com":true,"za.bz":true,"za.com":true,"africa.com":true,"gr.com":true,"in.net":true,"us.org":true,"co.com":true,"c.la":true,"certmgr.org":true,"xenapponazure.com":true,"virtueeldomein.nl":true,"cloudcontrolled.com":true,"cloudcontrolapp.com":true,"co.ca":true,"co.cz":true,"c.cdn77.org":true,"cdn77-ssl.net":true,"r.cdn77.net":true,"rsc.cdn77.org":true,"ssl.origin.cdn77-secure.org":true,"cloudns.asia":true,"cloudns.biz":true,"cloudns.club":true,"cloudns.cc":true,"cloudns.eu":true,"cloudns.in":true,"cloudns.info":true,"cloudns.org":true,"cloudns.pro":true,"cloudns.pw":true,"cloudns.us":true,"co.nl":true,"co.no":true,"*.platform.sh":true,"realm.cz":true,"*.cryptonomic.net":true,"cupcake.is":true,"cyon.link":true,"cyon.site":true,"daplie.me":true,"biz.dk":true,"co.dk":true,"firm.dk":true,"reg.dk":true,"store.dk":true,"dedyn.io":true,"dnshome.de":true,"dreamhosters.com":true,"mydrobo.com":true,"drud.io":true,"drud.us":true,"duckdns.org":true,"dy.fi":true,"tunk.org":true,"dyndns-at-home.com":true,"dyndns-at-work.com":true,"dyndns-blog.com":true,"dyndns-free.com":true,"dyndns-home.com":true,"dyndns-ip.com":true,"dyndns-mail.com":true,"dyndns-office.com":true,"dyndns-pics.com":true,"dyndns-remote.com":true,"dyndns-server.com":true,"dyndns-web.com":true,"dyndns-wiki.com":true,"dyndns-work.com":true,"dyndns.biz":true,"dyndns.info":true,"dyndns.org":true,"dyndns.tv":true,"at-band-camp.net":true,"ath.cx":true,"barrel-of-knowledge.info":true,"barrell-of-knowledge.info":true,"better-than.tv":true,"blogdns.com":true,"blogdns.net":true,"blogdns.org":true,"blogsite.org":true,"boldlygoingnowhere.org":true,"broke-it.net":true,"buyshouses.net":true,"cechire.com":true,"dnsalias.com":true,"dnsalias.net":true,"dnsalias.org":true,"dnsdojo.com":true,"dnsdojo.net":true,"dnsdojo.org":true,"does-it.net":true,"doesntexist.com":true,"doesntexist.org":true,"dontexist.com":true,"dontexist.net":true,"dontexist.org":true,"doomdns.com":true,"doomdns.org":true,"dvrdns.org":true,"dyn-o-saur.com":true,"dynalias.com":true,"dynalias.net":true,"dynalias.org":true,"dynathome.net":true,"dyndns.ws":true,"endofinternet.net":true,"endofinternet.org":true,"endoftheinternet.org":true,"est-a-la-maison.com":true,"est-a-la-masion.com":true,"est-le-patron.com":true,"est-mon-blogueur.com":true,"for-better.biz":true,"for-more.biz":true,"for-our.info":true,"for-some.biz":true,"for-the.biz":true,"forgot.her.name":true,"forgot.his.name":true,"from-ak.com":true,"from-al.com":true,"from-ar.com":true,"from-az.net":true,"from-ca.com":true,"from-co.net":true,"from-ct.com":true,"from-dc.com":true,"from-de.com":true,"from-fl.com":true,"from-ga.com":true,"from-hi.com":true,"from-ia.com":true,"from-id.com":true,"from-il.com":true,"from-in.com":true,"from-ks.com":true,"from-ky.com":true,"from-la.net":true,"from-ma.com":true,"from-md.com":true,"from-me.org":true,"from-mi.com":true,"from-mn.com":true,"from-mo.com":true,"from-ms.com":true,"from-mt.com":true,"from-nc.com":true,"from-nd.com":true,"from-ne.com":true,"from-nh.com":true,"from-nj.com":true,"from-nm.com":true,"from-nv.com":true,"from-ny.net":true,"from-oh.com":true,"from-ok.com":true,"from-or.com":true,"from-pa.com":true,"from-pr.com":true,"from-ri.com":true,"from-sc.com":true,"from-sd.com":true,"from-tn.com":true,"from-tx.com":true,"from-ut.com":true,"from-va.com":true,"from-vt.com":true,"from-wa.com":true,"from-wi.com":true,"from-wv.com":true,"from-wy.com":true,"ftpaccess.cc":true,"fuettertdasnetz.de":true,"game-host.org":true,"game-server.cc":true,"getmyip.com":true,"gets-it.net":true,"go.dyndns.org":true,"gotdns.com":true,"gotdns.org":true,"groks-the.info":true,"groks-this.info":true,"ham-radio-op.net":true,"here-for-more.info":true,"hobby-site.com":true,"hobby-site.org":true,"home.dyndns.org":true,"homedns.org":true,"homeftp.net":true,"homeftp.org":true,"homeip.net":true,"homelinux.com":true,"homelinux.net":true,"homelinux.org":true,"homeunix.com":true,"homeunix.net":true,"homeunix.org":true,"iamallama.com":true,"in-the-band.net":true,"is-a-anarchist.com":true,"is-a-blogger.com":true,"is-a-bookkeeper.com":true,"is-a-bruinsfan.org":true,"is-a-bulls-fan.com":true,"is-a-candidate.org":true,"is-a-caterer.com":true,"is-a-celticsfan.org":true,"is-a-chef.com":true,"is-a-chef.net":true,"is-a-chef.org":true,"is-a-conservative.com":true,"is-a-cpa.com":true,"is-a-cubicle-slave.com":true,"is-a-democrat.com":true,"is-a-designer.com":true,"is-a-doctor.com":true,"is-a-financialadvisor.com":true,"is-a-geek.com":true,"is-a-geek.net":true,"is-a-geek.org":true,"is-a-green.com":true,"is-a-guru.com":true,"is-a-hard-worker.com":true,"is-a-hunter.com":true,"is-a-knight.org":true,"is-a-landscaper.com":true,"is-a-lawyer.com":true,"is-a-liberal.com":true,"is-a-libertarian.com":true,"is-a-linux-user.org":true,"is-a-llama.com":true,"is-a-musician.com":true,"is-a-nascarfan.com":true,"is-a-nurse.com":true,"is-a-painter.com":true,"is-a-patsfan.org":true,"is-a-personaltrainer.com":true,"is-a-photographer.com":true,"is-a-player.com":true,"is-a-republican.com":true,"is-a-rockstar.com":true,"is-a-socialist.com":true,"is-a-soxfan.org":true,"is-a-student.com":true,"is-a-teacher.com":true,"is-a-techie.com":true,"is-a-therapist.com":true,"is-an-accountant.com":true,"is-an-actor.com":true,"is-an-actress.com":true,"is-an-anarchist.com":true,"is-an-artist.com":true,"is-an-engineer.com":true,"is-an-entertainer.com":true,"is-by.us":true,"is-certified.com":true,"is-found.org":true,"is-gone.com":true,"is-into-anime.com":true,"is-into-cars.com":true,"is-into-cartoons.com":true,"is-into-games.com":true,"is-leet.com":true,"is-lost.org":true,"is-not-certified.com":true,"is-saved.org":true,"is-slick.com":true,"is-uberleet.com":true,"is-very-bad.org":true,"is-very-evil.org":true,"is-very-good.org":true,"is-very-nice.org":true,"is-very-sweet.org":true,"is-with-theband.com":true,"isa-geek.com":true,"isa-geek.net":true,"isa-geek.org":true,"isa-hockeynut.com":true,"issmarterthanyou.com":true,"isteingeek.de":true,"istmein.de":true,"kicks-ass.net":true,"kicks-ass.org":true,"knowsitall.info":true,"land-4-sale.us":true,"lebtimnetz.de":true,"leitungsen.de":true,"likes-pie.com":true,"likescandy.com":true,"merseine.nu":true,"mine.nu":true,"misconfused.org":true,"mypets.ws":true,"myphotos.cc":true,"neat-url.com":true,"office-on-the.net":true,"on-the-web.tv":true,"podzone.net":true,"podzone.org":true,"readmyblog.org":true,"saves-the-whales.com":true,"scrapper-site.net":true,"scrapping.cc":true,"selfip.biz":true,"selfip.com":true,"selfip.info":true,"selfip.net":true,"selfip.org":true,"sells-for-less.com":true,"sells-for-u.com":true,"sells-it.net":true,"sellsyourhome.org":true,"servebbs.com":true,"servebbs.net":true,"servebbs.org":true,"serveftp.net":true,"serveftp.org":true,"servegame.org":true,"shacknet.nu":true,"simple-url.com":true,"space-to-rent.com":true,"stuff-4-sale.org":true,"stuff-4-sale.us":true,"teaches-yoga.com":true,"thruhere.net":true,"traeumtgerade.de":true,"webhop.biz":true,"webhop.info":true,"webhop.net":true,"webhop.org":true,"worse-than.tv":true,"writesthisblog.com":true,"ddnss.de":true,"dyn.ddnss.de":true,"dyndns.ddnss.de":true,"dyndns1.de":true,"dyn-ip24.de":true,"home-webserver.de":true,"dyn.home-webserver.de":true,"myhome-server.de":true,"ddnss.org":true,"dynv6.net":true,"e4.cz":true,"eu.org":true,"al.eu.org":true,"asso.eu.org":true,"at.eu.org":true,"au.eu.org":true,"be.eu.org":true,"bg.eu.org":true,"ca.eu.org":true,"cd.eu.org":true,"ch.eu.org":true,"cn.eu.org":true,"cy.eu.org":true,"cz.eu.org":true,"de.eu.org":true,"dk.eu.org":true,"edu.eu.org":true,"ee.eu.org":true,"es.eu.org":true,"fi.eu.org":true,"fr.eu.org":true,"gr.eu.org":true,"hr.eu.org":true,"hu.eu.org":true,"ie.eu.org":true,"il.eu.org":true,"in.eu.org":true,"int.eu.org":true,"is.eu.org":true,"it.eu.org":true,"jp.eu.org":true,"kr.eu.org":true,"lt.eu.org":true,"lu.eu.org":true,"lv.eu.org":true,"mc.eu.org":true,"me.eu.org":true,"mk.eu.org":true,"mt.eu.org":true,"my.eu.org":true,"net.eu.org":true,"ng.eu.org":true,"nl.eu.org":true,"no.eu.org":true,"nz.eu.org":true,"paris.eu.org":true,"pl.eu.org":true,"pt.eu.org":true,"q-a.eu.org":true,"ro.eu.org":true,"ru.eu.org":true,"se.eu.org":true,"si.eu.org":true,"sk.eu.org":true,"tr.eu.org":true,"uk.eu.org":true,"us.eu.org":true,"eu-1.evennode.com":true,"eu-2.evennode.com":true,"us-1.evennode.com":true,"us-2.evennode.com":true,"apps.fbsbx.com":true,"a.ssl.fastly.net":true,"b.ssl.fastly.net":true,"global.ssl.fastly.net":true,"a.prod.fastly.net":true,"global.prod.fastly.net":true,"fhapp.xyz":true,"firebaseapp.com":true,"flynnhub.com":true,"freebox-os.com":true,"freeboxos.com":true,"fbx-os.fr":true,"fbxos.fr":true,"freebox-os.fr":true,"freeboxos.fr":true,"myfusion.cloud":true,"futuremailing.at":true,"*.ex.ortsinfo.at":true,"*.kunden.ortsinfo.at":true,"service.gov.uk":true,"github.io":true,"githubusercontent.com":true,"githubcloud.com":true,"*.api.githubcloud.com":true,"*.ext.githubcloud.com":true,"gist.githubcloud.com":true,"*.githubcloudusercontent.com":true,"gitlab.io":true,"ro.com":true,"ro.im":true,"shop.ro":true,"goip.de":true,"*.0emm.com":true,"appspot.com":true,"blogspot.ae":true,"blogspot.al":true,"blogspot.am":true,"blogspot.ba":true,"blogspot.be":true,"blogspot.bg":true,"blogspot.bj":true,"blogspot.ca":true,"blogspot.cf":true,"blogspot.ch":true,"blogspot.cl":true,"blogspot.co.at":true,"blogspot.co.id":true,"blogspot.co.il":true,"blogspot.co.ke":true,"blogspot.co.nz":true,"blogspot.co.uk":true,"blogspot.co.za":true,"blogspot.com":true,"blogspot.com.ar":true,"blogspot.com.au":true,"blogspot.com.br":true,"blogspot.com.by":true,"blogspot.com.co":true,"blogspot.com.cy":true,"blogspot.com.ee":true,"blogspot.com.eg":true,"blogspot.com.es":true,"blogspot.com.mt":true,"blogspot.com.ng":true,"blogspot.com.tr":true,"blogspot.com.uy":true,"blogspot.cv":true,"blogspot.cz":true,"blogspot.de":true,"blogspot.dk":true,"blogspot.fi":true,"blogspot.fr":true,"blogspot.gr":true,"blogspot.hk":true,"blogspot.hr":true,"blogspot.hu":true,"blogspot.ie":true,"blogspot.in":true,"blogspot.is":true,"blogspot.it":true,"blogspot.jp":true,"blogspot.kr":true,"blogspot.li":true,"blogspot.lt":true,"blogspot.lu":true,"blogspot.md":true,"blogspot.mk":true,"blogspot.mr":true,"blogspot.mx":true,"blogspot.my":true,"blogspot.nl":true,"blogspot.no":true,"blogspot.pe":true,"blogspot.pt":true,"blogspot.qa":true,"blogspot.re":true,"blogspot.ro":true,"blogspot.rs":true,"blogspot.ru":true,"blogspot.se":true,"blogspot.sg":true,"blogspot.si":true,"blogspot.sk":true,"blogspot.sn":true,"blogspot.td":true,"blogspot.tw":true,"blogspot.ug":true,"blogspot.vn":true,"cloudfunctions.net":true,"codespot.com":true,"googleapis.com":true,"googlecode.com":true,"pagespeedmobilizer.com":true,"publishproxy.com":true,"withgoogle.com":true,"withyoutube.com":true,"hashbang.sh":true,"hasura-app.io":true,"hepforge.org":true,"herokuapp.com":true,"herokussl.com":true,"iki.fi":true,"biz.at":true,"info.at":true,"ac.leg.br":true,"al.leg.br":true,"am.leg.br":true,"ap.leg.br":true,"ba.leg.br":true,"ce.leg.br":true,"df.leg.br":true,"es.leg.br":true,"go.leg.br":true,"ma.leg.br":true,"mg.leg.br":true,"ms.leg.br":true,"mt.leg.br":true,"pa.leg.br":true,"pb.leg.br":true,"pe.leg.br":true,"pi.leg.br":true,"pr.leg.br":true,"rj.leg.br":true,"rn.leg.br":true,"ro.leg.br":true,"rr.leg.br":true,"rs.leg.br":true,"sc.leg.br":true,"se.leg.br":true,"sp.leg.br":true,"to.leg.br":true,"*.triton.zone":true,"*.cns.joyent.com":true,"js.org":true,"keymachine.de":true,"knightpoint.systems":true,"co.krd":true,"edu.krd":true,"*.magentosite.cloud":true,"meteorapp.com":true,"eu.meteorapp.com":true,"co.pl":true,"azurewebsites.net":true,"azure-mobile.net":true,"cloudapp.net":true,"bmoattachments.org":true,"4u.com":true,"ngrok.io":true,"nfshost.com":true,"nsupdate.info":true,"nerdpol.ovh":true,"blogsyte.com":true,"brasilia.me":true,"cable-modem.org":true,"ciscofreak.com":true,"collegefan.org":true,"couchpotatofries.org":true,"damnserver.com":true,"ddns.me":true,"ditchyourip.com":true,"dnsfor.me":true,"dnsiskinky.com":true,"dvrcam.info":true,"dynns.com":true,"eating-organic.net":true,"fantasyleague.cc":true,"geekgalaxy.com":true,"golffan.us":true,"health-carereform.com":true,"homesecuritymac.com":true,"homesecuritypc.com":true,"hopto.me":true,"ilovecollege.info":true,"loginto.me":true,"mlbfan.org":true,"mmafan.biz":true,"myactivedirectory.com":true,"mydissent.net":true,"myeffect.net":true,"mymediapc.net":true,"mypsx.net":true,"mysecuritycamera.com":true,"mysecuritycamera.net":true,"mysecuritycamera.org":true,"net-freaks.com":true,"nflfan.org":true,"nhlfan.net":true,"no-ip.ca":true,"no-ip.co.uk":true,"no-ip.net":true,"noip.us":true,"onthewifi.com":true,"pgafan.net":true,"point2this.com":true,"pointto.us":true,"privatizehealthinsurance.net":true,"quicksytes.com":true,"read-books.org":true,"securitytactics.com":true,"serveexchange.com":true,"servehumour.com":true,"servep2p.com":true,"servesarcasm.com":true,"stufftoread.com":true,"ufcfan.org":true,"unusualperson.com":true,"workisboring.com":true,"3utilities.com":true,"bounceme.net":true,"ddns.net":true,"ddnsking.com":true,"gotdns.ch":true,"hopto.org":true,"myftp.biz":true,"myftp.org":true,"myvnc.com":true,"no-ip.biz":true,"no-ip.info":true,"no-ip.org":true,"noip.me":true,"redirectme.net":true,"servebeer.com":true,"serveblog.net":true,"servecounterstrike.com":true,"serveftp.com":true,"servegame.com":true,"servehalflife.com":true,"servehttp.com":true,"serveirc.com":true,"serveminecraft.net":true,"servemp3.com":true,"servepics.com":true,"servequake.com":true,"sytes.net":true,"webhop.me":true,"zapto.org":true,"nyc.mn":true,"nid.io":true,"opencraft.hosting":true,"operaunite.com":true,"outsystemscloud.com":true,"ownprovider.com":true,"oy.lc":true,"pgfog.com":true,"pagefrontapp.com":true,"art.pl":true,"gliwice.pl":true,"krakow.pl":true,"poznan.pl":true,"wroc.pl":true,"zakopane.pl":true,"pantheonsite.io":true,"gotpantheon.com":true,"mypep.link":true,"xen.prgmr.com":true,"priv.at":true,"protonet.io":true,"chirurgiens-dentistes-en-france.fr":true,"qa2.com":true,"dev-myqnapcloud.com":true,"alpha-myqnapcloud.com":true,"myqnapcloud.com":true,"rackmaze.com":true,"rackmaze.net":true,"rhcloud.com":true,"hzc.io":true,"wellbeingzone.eu":true,"ptplus.fit":true,"wellbeingzone.co.uk":true,"sandcats.io":true,"logoip.de":true,"logoip.com":true,"firewall-gateway.com":true,"firewall-gateway.de":true,"my-gateway.de":true,"my-router.de":true,"spdns.de":true,"spdns.eu":true,"firewall-gateway.net":true,"my-firewall.org":true,"myfirewall.org":true,"spdns.org":true,"biz.ua":true,"co.ua":true,"pp.ua":true,"shiftedit.io":true,"myshopblocks.com":true,"1kapp.com":true,"appchizi.com":true,"applinzi.com":true,"sinaapp.com":true,"vipsinaapp.com":true,"bounty-full.com":true,"alpha.bounty-full.com":true,"beta.bounty-full.com":true,"static.land":true,"dev.static.land":true,"sites.static.land":true,"apps.lair.io":true,"*.stolos.io":true,"spacekit.io":true,"stackspace.space":true,"diskstation.me":true,"dscloud.biz":true,"dscloud.me":true,"dscloud.mobi":true,"dsmynas.com":true,"dsmynas.net":true,"dsmynas.org":true,"familyds.com":true,"familyds.net":true,"familyds.org":true,"i234.me":true,"myds.me":true,"synology.me":true,"taifun-dns.de":true,"gda.pl":true,"gdansk.pl":true,"gdynia.pl":true,"med.pl":true,"sopot.pl":true,"bloxcms.com":true,"townnews-staging.com":true,"*.transurl.be":true,"*.transurl.eu":true,"*.transurl.nl":true,"tuxfamily.org":true,"hk.com":true,"hk.org":true,"ltd.hk":true,"inc.hk":true,"lib.de.us":true,"router.management":true,"wmflabs.org":true,"yolasite.com":true,"za.net":true,"za.org":true,"now.sh":true});
  34291. // END of automatically generated file
  34292. /***/ }),
  34293. /* 339 */
  34294. /***/ (function(module, exports) {
  34295. module.exports = require("punycode");
  34296. /***/ }),
  34297. /* 340 */
  34298. /***/ (function(module, exports, __webpack_require__) {
  34299. "use strict";
  34300. /*!
  34301. * Copyright (c) 2015, Salesforce.com, Inc.
  34302. * All rights reserved.
  34303. *
  34304. * Redistribution and use in source and binary forms, with or without
  34305. * modification, are permitted provided that the following conditions are met:
  34306. *
  34307. * 1. Redistributions of source code must retain the above copyright notice,
  34308. * this list of conditions and the following disclaimer.
  34309. *
  34310. * 2. Redistributions in binary form must reproduce the above copyright notice,
  34311. * this list of conditions and the following disclaimer in the documentation
  34312. * and/or other materials provided with the distribution.
  34313. *
  34314. * 3. Neither the name of Salesforce.com nor the names of its contributors may
  34315. * be used to endorse or promote products derived from this software without
  34316. * specific prior written permission.
  34317. *
  34318. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  34319. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  34320. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  34321. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
  34322. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  34323. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  34324. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  34325. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  34326. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  34327. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  34328. * POSSIBILITY OF SUCH DAMAGE.
  34329. */
  34330. /*jshint unused:false */
  34331. function Store() {
  34332. }
  34333. exports.Store = Store;
  34334. // Stores may be synchronous, but are still required to use a
  34335. // Continuation-Passing Style API. The CookieJar itself will expose a "*Sync"
  34336. // API that converts from synchronous-callbacks to imperative style.
  34337. Store.prototype.synchronous = false;
  34338. Store.prototype.findCookie = function(domain, path, key, cb) {
  34339. throw new Error('findCookie is not implemented');
  34340. };
  34341. Store.prototype.findCookies = function(domain, path, cb) {
  34342. throw new Error('findCookies is not implemented');
  34343. };
  34344. Store.prototype.putCookie = function(cookie, cb) {
  34345. throw new Error('putCookie is not implemented');
  34346. };
  34347. Store.prototype.updateCookie = function(oldCookie, newCookie, cb) {
  34348. // recommended default implementation:
  34349. // return this.putCookie(newCookie, cb);
  34350. throw new Error('updateCookie is not implemented');
  34351. };
  34352. Store.prototype.removeCookie = function(domain, path, key, cb) {
  34353. throw new Error('removeCookie is not implemented');
  34354. };
  34355. Store.prototype.removeCookies = function(domain, path, cb) {
  34356. throw new Error('removeCookies is not implemented');
  34357. };
  34358. Store.prototype.getAllCookies = function(cb) {
  34359. throw new Error('getAllCookies is not implemented (therefore jar cannot be serialized)');
  34360. };
  34361. /***/ }),
  34362. /* 341 */
  34363. /***/ (function(module, exports, __webpack_require__) {
  34364. "use strict";
  34365. /*!
  34366. * Copyright (c) 2015, Salesforce.com, Inc.
  34367. * All rights reserved.
  34368. *
  34369. * Redistribution and use in source and binary forms, with or without
  34370. * modification, are permitted provided that the following conditions are met:
  34371. *
  34372. * 1. Redistributions of source code must retain the above copyright notice,
  34373. * this list of conditions and the following disclaimer.
  34374. *
  34375. * 2. Redistributions in binary form must reproduce the above copyright notice,
  34376. * this list of conditions and the following disclaimer in the documentation
  34377. * and/or other materials provided with the distribution.
  34378. *
  34379. * 3. Neither the name of Salesforce.com nor the names of its contributors may
  34380. * be used to endorse or promote products derived from this software without
  34381. * specific prior written permission.
  34382. *
  34383. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  34384. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  34385. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  34386. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
  34387. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  34388. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  34389. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  34390. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  34391. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  34392. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  34393. * POSSIBILITY OF SUCH DAMAGE.
  34394. */
  34395. var pubsuffix = __webpack_require__(338);
  34396. // Gives the permutation of all possible domainMatch()es of a given domain. The
  34397. // array is in shortest-to-longest order. Handy for indexing.
  34398. function permuteDomain (domain) {
  34399. var pubSuf = pubsuffix.getPublicSuffix(domain);
  34400. if (!pubSuf) {
  34401. return null;
  34402. }
  34403. if (pubSuf == domain) {
  34404. return [domain];
  34405. }
  34406. var prefix = domain.slice(0, -(pubSuf.length + 1)); // ".example.com"
  34407. var parts = prefix.split('.').reverse();
  34408. var cur = pubSuf;
  34409. var permutations = [cur];
  34410. while (parts.length) {
  34411. cur = parts.shift() + '.' + cur;
  34412. permutations.push(cur);
  34413. }
  34414. return permutations;
  34415. }
  34416. exports.permuteDomain = permuteDomain;
  34417. /***/ }),
  34418. /* 342 */
  34419. /***/ (function(module, exports, __webpack_require__) {
  34420. "use strict";
  34421. /*!
  34422. * Copyright (c) 2015, Salesforce.com, Inc.
  34423. * All rights reserved.
  34424. *
  34425. * Redistribution and use in source and binary forms, with or without
  34426. * modification, are permitted provided that the following conditions are met:
  34427. *
  34428. * 1. Redistributions of source code must retain the above copyright notice,
  34429. * this list of conditions and the following disclaimer.
  34430. *
  34431. * 2. Redistributions in binary form must reproduce the above copyright notice,
  34432. * this list of conditions and the following disclaimer in the documentation
  34433. * and/or other materials provided with the distribution.
  34434. *
  34435. * 3. Neither the name of Salesforce.com nor the names of its contributors may
  34436. * be used to endorse or promote products derived from this software without
  34437. * specific prior written permission.
  34438. *
  34439. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  34440. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  34441. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  34442. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
  34443. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  34444. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  34445. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  34446. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  34447. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  34448. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  34449. * POSSIBILITY OF SUCH DAMAGE.
  34450. */
  34451. /*
  34452. * "A request-path path-matches a given cookie-path if at least one of the
  34453. * following conditions holds:"
  34454. */
  34455. function pathMatch (reqPath, cookiePath) {
  34456. // "o The cookie-path and the request-path are identical."
  34457. if (cookiePath === reqPath) {
  34458. return true;
  34459. }
  34460. var idx = reqPath.indexOf(cookiePath);
  34461. if (idx === 0) {
  34462. // "o The cookie-path is a prefix of the request-path, and the last
  34463. // character of the cookie-path is %x2F ("/")."
  34464. if (cookiePath.substr(-1) === "/") {
  34465. return true;
  34466. }
  34467. // " o The cookie-path is a prefix of the request-path, and the first
  34468. // character of the request-path that is not included in the cookie- path
  34469. // is a %x2F ("/") character."
  34470. if (reqPath.substr(cookiePath.length, 1) === "/") {
  34471. return true;
  34472. }
  34473. }
  34474. return false;
  34475. }
  34476. exports.pathMatch = pathMatch;
  34477. /***/ }),
  34478. /* 343 */
  34479. /***/ (function(module, exports) {
  34480. module.exports = require("zlib");
  34481. /***/ }),
  34482. /* 344 */
  34483. /***/ (function(module, exports, __webpack_require__) {
  34484. "use strict";
  34485. // Load modules
  34486. const Dgram = __webpack_require__(534);
  34487. const Dns = __webpack_require__(535);
  34488. const Hoek = __webpack_require__(82);
  34489. // Declare internals
  34490. const internals = {};
  34491. exports.time = function (options, callback) {
  34492. if (arguments.length !== 2) {
  34493. callback = arguments[0];
  34494. options = {};
  34495. }
  34496. const settings = Hoek.clone(options);
  34497. settings.host = settings.host || 'time.google.com';
  34498. settings.port = settings.port || 123;
  34499. settings.resolveReference = settings.resolveReference || false;
  34500. // Declare variables used by callback
  34501. let timeoutId = null;
  34502. let sent = 0;
  34503. // Ensure callback is only called once
  34504. const finish = Hoek.once((err, result) => {
  34505. clearTimeout(timeoutId);
  34506. socket.removeAllListeners();
  34507. socket.once('error', Hoek.ignore);
  34508. try {
  34509. socket.close();
  34510. }
  34511. catch (ignoreErr) { } // Ignore errors if the socket is already closed
  34512. return callback(err, result);
  34513. });
  34514. // Set timeout
  34515. if (settings.timeout) {
  34516. timeoutId = setTimeout(() => {
  34517. return finish(new Error('Timeout'));
  34518. }, settings.timeout);
  34519. }
  34520. // Create UDP socket
  34521. const socket = Dgram.createSocket('udp4');
  34522. socket.once('error', (err) => finish(err));
  34523. // Listen to incoming messages
  34524. socket.on('message', (buffer, rinfo) => {
  34525. const received = Date.now();
  34526. const message = new internals.NtpMessage(buffer);
  34527. if (!message.isValid) {
  34528. return finish(new Error('Invalid server response'), message);
  34529. }
  34530. if (message.originateTimestamp !== sent) {
  34531. return finish(new Error('Wrong originate timestamp'), message);
  34532. }
  34533. // Timestamp Name ID When Generated
  34534. // ------------------------------------------------------------
  34535. // Originate Timestamp T1 time request sent by client
  34536. // Receive Timestamp T2 time request received by server
  34537. // Transmit Timestamp T3 time reply sent by server
  34538. // Destination Timestamp T4 time reply received by client
  34539. //
  34540. // The roundtrip delay d and system clock offset t are defined as:
  34541. //
  34542. // d = (T4 - T1) - (T3 - T2) t = ((T2 - T1) + (T3 - T4)) / 2
  34543. const T1 = message.originateTimestamp;
  34544. const T2 = message.receiveTimestamp;
  34545. const T3 = message.transmitTimestamp;
  34546. const T4 = received;
  34547. message.d = (T4 - T1) - (T3 - T2);
  34548. message.t = ((T2 - T1) + (T3 - T4)) / 2;
  34549. message.receivedLocally = received;
  34550. if (!settings.resolveReference ||
  34551. message.stratum !== 'secondary') {
  34552. return finish(null, message);
  34553. }
  34554. // Resolve reference IP address
  34555. Dns.reverse(message.referenceId, (err, domains) => {
  34556. if (/* $lab:coverage:off$ */ !err /* $lab:coverage:on$ */) {
  34557. message.referenceHost = domains[0];
  34558. }
  34559. return finish(null, message);
  34560. });
  34561. });
  34562. // Construct NTP message
  34563. const message = new Buffer(48);
  34564. for (let i = 0; i < 48; ++i) { // Zero message
  34565. message[i] = 0;
  34566. }
  34567. message[0] = (0 << 6) + (4 << 3) + (3 << 0); // Set version number to 4 and Mode to 3 (client)
  34568. sent = Date.now();
  34569. internals.fromMsecs(sent, message, 40); // Set transmit timestamp (returns as originate)
  34570. // Send NTP request
  34571. socket.send(message, 0, message.length, settings.port, settings.host, (err, bytes) => {
  34572. if (err ||
  34573. bytes !== 48) {
  34574. return finish(err || new Error('Could not send entire message'));
  34575. }
  34576. });
  34577. };
  34578. internals.NtpMessage = function (buffer) {
  34579. this.isValid = false;
  34580. // Validate
  34581. if (buffer.length !== 48) {
  34582. return;
  34583. }
  34584. // Leap indicator
  34585. const li = (buffer[0] >> 6);
  34586. switch (li) {
  34587. case 0: this.leapIndicator = 'no-warning'; break;
  34588. case 1: this.leapIndicator = 'last-minute-61'; break;
  34589. case 2: this.leapIndicator = 'last-minute-59'; break;
  34590. case 3: this.leapIndicator = 'alarm'; break;
  34591. }
  34592. // Version
  34593. const vn = ((buffer[0] & 0x38) >> 3);
  34594. this.version = vn;
  34595. // Mode
  34596. const mode = (buffer[0] & 0x7);
  34597. switch (mode) {
  34598. case 1: this.mode = 'symmetric-active'; break;
  34599. case 2: this.mode = 'symmetric-passive'; break;
  34600. case 3: this.mode = 'client'; break;
  34601. case 4: this.mode = 'server'; break;
  34602. case 5: this.mode = 'broadcast'; break;
  34603. case 0:
  34604. case 6:
  34605. case 7: this.mode = 'reserved'; break;
  34606. }
  34607. // Stratum
  34608. const stratum = buffer[1];
  34609. if (stratum === 0) {
  34610. this.stratum = 'death';
  34611. }
  34612. else if (stratum === 1) {
  34613. this.stratum = 'primary';
  34614. }
  34615. else if (stratum <= 15) {
  34616. this.stratum = 'secondary';
  34617. }
  34618. else {
  34619. this.stratum = 'reserved';
  34620. }
  34621. // Poll interval (msec)
  34622. this.pollInterval = Math.round(Math.pow(2, buffer[2])) * 1000;
  34623. // Precision (msecs)
  34624. this.precision = Math.pow(2, buffer[3]) * 1000;
  34625. // Root delay (msecs)
  34626. const rootDelay = 256 * (256 * (256 * buffer[4] + buffer[5]) + buffer[6]) + buffer[7];
  34627. this.rootDelay = 1000 * (rootDelay / 0x10000);
  34628. // Root dispersion (msecs)
  34629. this.rootDispersion = ((buffer[8] << 8) + buffer[9] + ((buffer[10] << 8) + buffer[11]) / Math.pow(2, 16)) * 1000;
  34630. // Reference identifier
  34631. this.referenceId = '';
  34632. switch (this.stratum) {
  34633. case 'death':
  34634. case 'primary':
  34635. this.referenceId = String.fromCharCode(buffer[12]) + String.fromCharCode(buffer[13]) + String.fromCharCode(buffer[14]) + String.fromCharCode(buffer[15]);
  34636. break;
  34637. case 'secondary':
  34638. this.referenceId = '' + buffer[12] + '.' + buffer[13] + '.' + buffer[14] + '.' + buffer[15];
  34639. break;
  34640. }
  34641. // Reference timestamp
  34642. this.referenceTimestamp = internals.toMsecs(buffer, 16);
  34643. // Originate timestamp
  34644. this.originateTimestamp = internals.toMsecs(buffer, 24);
  34645. // Receive timestamp
  34646. this.receiveTimestamp = internals.toMsecs(buffer, 32);
  34647. // Transmit timestamp
  34648. this.transmitTimestamp = internals.toMsecs(buffer, 40);
  34649. // Validate
  34650. if (this.version === 4 &&
  34651. this.stratum !== 'reserved' &&
  34652. this.mode === 'server' &&
  34653. this.originateTimestamp &&
  34654. this.receiveTimestamp &&
  34655. this.transmitTimestamp) {
  34656. this.isValid = true;
  34657. }
  34658. return this;
  34659. };
  34660. internals.toMsecs = function (buffer, offset) {
  34661. let seconds = 0;
  34662. let fraction = 0;
  34663. for (let i = 0; i < 4; ++i) {
  34664. seconds = (seconds * 256) + buffer[offset + i];
  34665. }
  34666. for (let i = 4; i < 8; ++i) {
  34667. fraction = (fraction * 256) + buffer[offset + i];
  34668. }
  34669. return ((seconds - 2208988800 + (fraction / Math.pow(2, 32))) * 1000);
  34670. };
  34671. internals.fromMsecs = function (ts, buffer, offset) {
  34672. const seconds = Math.floor(ts / 1000) + 2208988800;
  34673. const fraction = Math.round((ts % 1000) / 1000 * Math.pow(2, 32));
  34674. buffer[offset + 0] = (seconds & 0xFF000000) >> 24;
  34675. buffer[offset + 1] = (seconds & 0x00FF0000) >> 16;
  34676. buffer[offset + 2] = (seconds & 0x0000FF00) >> 8;
  34677. buffer[offset + 3] = (seconds & 0x000000FF);
  34678. buffer[offset + 4] = (fraction & 0xFF000000) >> 24;
  34679. buffer[offset + 5] = (fraction & 0x00FF0000) >> 16;
  34680. buffer[offset + 6] = (fraction & 0x0000FF00) >> 8;
  34681. buffer[offset + 7] = (fraction & 0x000000FF);
  34682. };
  34683. // Offset singleton
  34684. internals.last = {
  34685. offset: 0,
  34686. expires: 0,
  34687. host: '',
  34688. port: 0
  34689. };
  34690. exports.offset = function (options, callback) {
  34691. if (arguments.length !== 2) {
  34692. callback = arguments[0];
  34693. options = {};
  34694. }
  34695. const now = Date.now();
  34696. const clockSyncRefresh = options.clockSyncRefresh || 24 * 60 * 60 * 1000; // Daily
  34697. if (internals.last.offset &&
  34698. internals.last.host === options.host &&
  34699. internals.last.port === options.port &&
  34700. now < internals.last.expires) {
  34701. process.nextTick(() => callback(null, internals.last.offset));
  34702. return;
  34703. }
  34704. exports.time(options, (err, time) => {
  34705. if (err) {
  34706. return callback(err, 0);
  34707. }
  34708. internals.last = {
  34709. offset: Math.round(time.t),
  34710. expires: now + clockSyncRefresh,
  34711. host: options.host,
  34712. port: options.port
  34713. };
  34714. return callback(null, internals.last.offset);
  34715. });
  34716. };
  34717. // Now singleton
  34718. internals.now = {
  34719. started: false,
  34720. intervalId: null
  34721. };
  34722. exports.start = function (options, callback) {
  34723. if (arguments.length !== 2) {
  34724. callback = arguments[0];
  34725. options = {};
  34726. }
  34727. if (internals.now.started) {
  34728. process.nextTick(() => callback());
  34729. return;
  34730. }
  34731. const report = (err) => {
  34732. if (err &&
  34733. options.onError) {
  34734. options.onError(err);
  34735. }
  34736. };
  34737. internals.now.started = true;
  34738. exports.offset(options, (err, offset) => {
  34739. report(err);
  34740. internals.now.intervalId = setInterval(() => {
  34741. exports.offset(options, report);
  34742. }, options.clockSyncRefresh || 24 * 60 * 60 * 1000); // Daily
  34743. return callback();
  34744. });
  34745. };
  34746. exports.stop = function () {
  34747. if (!internals.now.started) {
  34748. return;
  34749. }
  34750. clearInterval(internals.now.intervalId);
  34751. internals.now.started = false;
  34752. internals.now.intervalId = null;
  34753. };
  34754. exports.isLive = function () {
  34755. return internals.now.started;
  34756. };
  34757. exports.now = function () {
  34758. const now = Date.now();
  34759. if (!exports.isLive() ||
  34760. now >= internals.last.expires) {
  34761. return now;
  34762. }
  34763. return now + internals.last.offset;
  34764. };
  34765. /***/ }),
  34766. /* 345 */
  34767. /***/ (function(module, exports, __webpack_require__) {
  34768. "use strict";
  34769. // Load modules
  34770. const Crypto = __webpack_require__(5);
  34771. const Boom = __webpack_require__(537);
  34772. // Declare internals
  34773. const internals = {};
  34774. // Generate a cryptographically strong pseudo-random data
  34775. exports.randomString = function (size) {
  34776. const buffer = exports.randomBits((size + 1) * 6);
  34777. if (buffer instanceof Error) {
  34778. return buffer;
  34779. }
  34780. const string = buffer.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, '');
  34781. return string.slice(0, size);
  34782. };
  34783. // Return a random string of digits
  34784. exports.randomDigits = function (size) {
  34785. const buffer = exports.randomBits(size * 8);
  34786. if (buffer instanceof Error) {
  34787. return buffer;
  34788. }
  34789. const digits = [];
  34790. for (let i = 0; i < buffer.length; ++i) {
  34791. digits.push(Math.floor(buffer[i] / 25.6));
  34792. }
  34793. return digits.join('');
  34794. };
  34795. // Generate a buffer of random bits
  34796. exports.randomBits = function (bits) {
  34797. if (!bits ||
  34798. bits < 0) {
  34799. return Boom.internal('Invalid random bits count');
  34800. }
  34801. const bytes = Math.ceil(bits / 8);
  34802. try {
  34803. return Crypto.randomBytes(bytes);
  34804. }
  34805. catch (err) {
  34806. return Boom.internal('Failed generating random bits: ' + err.message);
  34807. }
  34808. };
  34809. // Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match)
  34810. exports.fixedTimeComparison = function (a, b) {
  34811. if (typeof a !== 'string' ||
  34812. typeof b !== 'string') {
  34813. return false;
  34814. }
  34815. let mismatch = (a.length === b.length ? 0 : 1);
  34816. if (mismatch) {
  34817. b = a;
  34818. }
  34819. for (let i = 0; i < a.length; ++i) {
  34820. const ac = a.charCodeAt(i);
  34821. const bc = b.charCodeAt(i);
  34822. mismatch |= (ac ^ bc);
  34823. }
  34824. return (mismatch === 0);
  34825. };
  34826. /***/ }),
  34827. /* 346 */
  34828. /***/ (function(module, exports, __webpack_require__) {
  34829. // Copyright 2017 Joyent, Inc.
  34830. module.exports = {
  34831. DiffieHellman: DiffieHellman,
  34832. generateECDSA: generateECDSA,
  34833. generateED25519: generateED25519
  34834. };
  34835. var assert = __webpack_require__(3);
  34836. var crypto = __webpack_require__(5);
  34837. var algs = __webpack_require__(16);
  34838. var utils = __webpack_require__(12);
  34839. var nacl;
  34840. var Key = __webpack_require__(15);
  34841. var PrivateKey = __webpack_require__(17);
  34842. var CRYPTO_HAVE_ECDH = (crypto.createECDH !== undefined);
  34843. var ecdh, ec, jsbn;
  34844. function DiffieHellman(key) {
  34845. utils.assertCompatible(key, Key, [1, 4], 'key');
  34846. this._isPriv = PrivateKey.isPrivateKey(key, [1, 3]);
  34847. this._algo = key.type;
  34848. this._curve = key.curve;
  34849. this._key = key;
  34850. if (key.type === 'dsa') {
  34851. if (!CRYPTO_HAVE_ECDH) {
  34852. throw (new Error('Due to bugs in the node 0.10 ' +
  34853. 'crypto API, node 0.12.x or later is required ' +
  34854. 'to use DH'));
  34855. }
  34856. this._dh = crypto.createDiffieHellman(
  34857. key.part.p.data, undefined,
  34858. key.part.g.data, undefined);
  34859. this._p = key.part.p;
  34860. this._g = key.part.g;
  34861. if (this._isPriv)
  34862. this._dh.setPrivateKey(key.part.x.data);
  34863. this._dh.setPublicKey(key.part.y.data);
  34864. } else if (key.type === 'ecdsa') {
  34865. if (!CRYPTO_HAVE_ECDH) {
  34866. if (ecdh === undefined)
  34867. ecdh = __webpack_require__(347);
  34868. if (ec === undefined)
  34869. ec = __webpack_require__(108);
  34870. if (jsbn === undefined)
  34871. jsbn = __webpack_require__(46).BigInteger;
  34872. this._ecParams = new X9ECParameters(this._curve);
  34873. if (this._isPriv) {
  34874. this._priv = new ECPrivate(
  34875. this._ecParams, key.part.d.data);
  34876. }
  34877. return;
  34878. }
  34879. var curve = {
  34880. 'nistp256': 'prime256v1',
  34881. 'nistp384': 'secp384r1',
  34882. 'nistp521': 'secp521r1'
  34883. }[key.curve];
  34884. this._dh = crypto.createECDH(curve);
  34885. if (typeof (this._dh) !== 'object' ||
  34886. typeof (this._dh.setPrivateKey) !== 'function') {
  34887. CRYPTO_HAVE_ECDH = false;
  34888. DiffieHellman.call(this, key);
  34889. return;
  34890. }
  34891. if (this._isPriv)
  34892. this._dh.setPrivateKey(key.part.d.data);
  34893. this._dh.setPublicKey(key.part.Q.data);
  34894. } else if (key.type === 'curve25519') {
  34895. if (nacl === undefined)
  34896. nacl = __webpack_require__(47);
  34897. if (this._isPriv) {
  34898. this._priv = key.part.r.data;
  34899. }
  34900. } else {
  34901. throw (new Error('DH not supported for ' + key.type + ' keys'));
  34902. }
  34903. }
  34904. DiffieHellman.prototype.getPublicKey = function () {
  34905. if (this._isPriv)
  34906. return (this._key.toPublic());
  34907. return (this._key);
  34908. };
  34909. DiffieHellman.prototype.getPrivateKey = function () {
  34910. if (this._isPriv)
  34911. return (this._key);
  34912. else
  34913. return (undefined);
  34914. };
  34915. DiffieHellman.prototype.getKey = DiffieHellman.prototype.getPrivateKey;
  34916. DiffieHellman.prototype._keyCheck = function (pk, isPub) {
  34917. assert.object(pk, 'key');
  34918. if (!isPub)
  34919. utils.assertCompatible(pk, PrivateKey, [1, 3], 'key');
  34920. utils.assertCompatible(pk, Key, [1, 4], 'key');
  34921. if (pk.type !== this._algo) {
  34922. throw (new Error('A ' + pk.type + ' key cannot be used in ' +
  34923. this._algo + ' Diffie-Hellman'));
  34924. }
  34925. if (pk.curve !== this._curve) {
  34926. throw (new Error('A key from the ' + pk.curve + ' curve ' +
  34927. 'cannot be used with a ' + this._curve +
  34928. ' Diffie-Hellman'));
  34929. }
  34930. if (pk.type === 'dsa') {
  34931. assert.deepEqual(pk.part.p, this._p,
  34932. 'DSA key prime does not match');
  34933. assert.deepEqual(pk.part.g, this._g,
  34934. 'DSA key generator does not match');
  34935. }
  34936. };
  34937. DiffieHellman.prototype.setKey = function (pk) {
  34938. this._keyCheck(pk);
  34939. if (pk.type === 'dsa') {
  34940. this._dh.setPrivateKey(pk.part.x.data);
  34941. this._dh.setPublicKey(pk.part.y.data);
  34942. } else if (pk.type === 'ecdsa') {
  34943. if (CRYPTO_HAVE_ECDH) {
  34944. this._dh.setPrivateKey(pk.part.d.data);
  34945. this._dh.setPublicKey(pk.part.Q.data);
  34946. } else {
  34947. this._priv = new ECPrivate(
  34948. this._ecParams, pk.part.d.data);
  34949. }
  34950. } else if (pk.type === 'curve25519') {
  34951. this._priv = pk.part.r.data;
  34952. if (this._priv[0] === 0x00)
  34953. this._priv = this._priv.slice(1);
  34954. this._priv = this._priv.slice(0, 32);
  34955. }
  34956. this._key = pk;
  34957. this._isPriv = true;
  34958. };
  34959. DiffieHellman.prototype.setPrivateKey = DiffieHellman.prototype.setKey;
  34960. DiffieHellman.prototype.computeSecret = function (otherpk) {
  34961. this._keyCheck(otherpk, true);
  34962. if (!this._isPriv)
  34963. throw (new Error('DH exchange has not been initialized with ' +
  34964. 'a private key yet'));
  34965. var pub;
  34966. if (this._algo === 'dsa') {
  34967. return (this._dh.computeSecret(
  34968. otherpk.part.y.data));
  34969. } else if (this._algo === 'ecdsa') {
  34970. if (CRYPTO_HAVE_ECDH) {
  34971. return (this._dh.computeSecret(
  34972. otherpk.part.Q.data));
  34973. } else {
  34974. pub = new ECPublic(
  34975. this._ecParams, otherpk.part.Q.data);
  34976. return (this._priv.deriveSharedSecret(pub));
  34977. }
  34978. } else if (this._algo === 'curve25519') {
  34979. pub = otherpk.part.R.data;
  34980. while (pub[0] === 0x00 && pub.length > 32)
  34981. pub = pub.slice(1);
  34982. assert.strictEqual(pub.length, 32);
  34983. assert.strictEqual(this._priv.length, 64);
  34984. var priv = this._priv.slice(0, 32);
  34985. var secret = nacl.box.before(new Uint8Array(pub),
  34986. new Uint8Array(priv));
  34987. return (new Buffer(secret));
  34988. }
  34989. throw (new Error('Invalid algorithm: ' + this._algo));
  34990. };
  34991. DiffieHellman.prototype.generateKey = function () {
  34992. var parts = [];
  34993. var priv, pub;
  34994. if (this._algo === 'dsa') {
  34995. this._dh.generateKeys();
  34996. parts.push({name: 'p', data: this._p.data});
  34997. parts.push({name: 'q', data: this._key.part.q.data});
  34998. parts.push({name: 'g', data: this._g.data});
  34999. parts.push({name: 'y', data: this._dh.getPublicKey()});
  35000. parts.push({name: 'x', data: this._dh.getPrivateKey()});
  35001. this._key = new PrivateKey({
  35002. type: 'dsa',
  35003. parts: parts
  35004. });
  35005. this._isPriv = true;
  35006. return (this._key);
  35007. } else if (this._algo === 'ecdsa') {
  35008. if (CRYPTO_HAVE_ECDH) {
  35009. this._dh.generateKeys();
  35010. parts.push({name: 'curve',
  35011. data: new Buffer(this._curve)});
  35012. parts.push({name: 'Q', data: this._dh.getPublicKey()});
  35013. parts.push({name: 'd', data: this._dh.getPrivateKey()});
  35014. this._key = new PrivateKey({
  35015. type: 'ecdsa',
  35016. curve: this._curve,
  35017. parts: parts
  35018. });
  35019. this._isPriv = true;
  35020. return (this._key);
  35021. } else {
  35022. var n = this._ecParams.getN();
  35023. var r = new jsbn(crypto.randomBytes(n.bitLength()));
  35024. var n1 = n.subtract(jsbn.ONE);
  35025. priv = r.mod(n1).add(jsbn.ONE);
  35026. pub = this._ecParams.getG().multiply(priv);
  35027. priv = new Buffer(priv.toByteArray());
  35028. pub = new Buffer(this._ecParams.getCurve().
  35029. encodePointHex(pub), 'hex');
  35030. this._priv = new ECPrivate(this._ecParams, priv);
  35031. parts.push({name: 'curve',
  35032. data: new Buffer(this._curve)});
  35033. parts.push({name: 'Q', data: pub});
  35034. parts.push({name: 'd', data: priv});
  35035. this._key = new PrivateKey({
  35036. type: 'ecdsa',
  35037. curve: this._curve,
  35038. parts: parts
  35039. });
  35040. this._isPriv = true;
  35041. return (this._key);
  35042. }
  35043. } else if (this._algo === 'curve25519') {
  35044. var pair = nacl.box.keyPair();
  35045. priv = new Buffer(pair.secretKey);
  35046. pub = new Buffer(pair.publicKey);
  35047. priv = Buffer.concat([priv, pub]);
  35048. assert.strictEqual(priv.length, 64);
  35049. assert.strictEqual(pub.length, 32);
  35050. parts.push({name: 'R', data: pub});
  35051. parts.push({name: 'r', data: priv});
  35052. this._key = new PrivateKey({
  35053. type: 'curve25519',
  35054. parts: parts
  35055. });
  35056. this._isPriv = true;
  35057. return (this._key);
  35058. }
  35059. throw (new Error('Invalid algorithm: ' + this._algo));
  35060. };
  35061. DiffieHellman.prototype.generateKeys = DiffieHellman.prototype.generateKey;
  35062. /* These are helpers for using ecc-jsbn (for node 0.10 compatibility). */
  35063. function X9ECParameters(name) {
  35064. var params = algs.curves[name];
  35065. assert.object(params);
  35066. var p = new jsbn(params.p);
  35067. var a = new jsbn(params.a);
  35068. var b = new jsbn(params.b);
  35069. var n = new jsbn(params.n);
  35070. var h = jsbn.ONE;
  35071. var curve = new ec.ECCurveFp(p, a, b);
  35072. var G = curve.decodePointHex(params.G.toString('hex'));
  35073. this.curve = curve;
  35074. this.g = G;
  35075. this.n = n;
  35076. this.h = h;
  35077. }
  35078. X9ECParameters.prototype.getCurve = function () { return (this.curve); };
  35079. X9ECParameters.prototype.getG = function () { return (this.g); };
  35080. X9ECParameters.prototype.getN = function () { return (this.n); };
  35081. X9ECParameters.prototype.getH = function () { return (this.h); };
  35082. function ECPublic(params, buffer) {
  35083. this._params = params;
  35084. if (buffer[0] === 0x00)
  35085. buffer = buffer.slice(1);
  35086. this._pub = params.getCurve().decodePointHex(buffer.toString('hex'));
  35087. }
  35088. function ECPrivate(params, buffer) {
  35089. this._params = params;
  35090. this._priv = new jsbn(utils.mpNormalize(buffer));
  35091. }
  35092. ECPrivate.prototype.deriveSharedSecret = function (pubKey) {
  35093. assert.ok(pubKey instanceof ECPublic);
  35094. var S = pubKey._pub.multiply(this._priv);
  35095. return (new Buffer(S.getX().toBigInteger().toByteArray()));
  35096. };
  35097. function generateED25519() {
  35098. if (nacl === undefined)
  35099. nacl = __webpack_require__(47);
  35100. var pair = nacl.sign.keyPair();
  35101. var priv = new Buffer(pair.secretKey);
  35102. var pub = new Buffer(pair.publicKey);
  35103. assert.strictEqual(priv.length, 64);
  35104. assert.strictEqual(pub.length, 32);
  35105. var parts = [];
  35106. parts.push({name: 'R', data: pub});
  35107. parts.push({name: 'r', data: priv});
  35108. var key = new PrivateKey({
  35109. type: 'ed25519',
  35110. parts: parts
  35111. });
  35112. return (key);
  35113. }
  35114. /* Generates a new ECDSA private key on a given curve. */
  35115. function generateECDSA(curve) {
  35116. var parts = [];
  35117. var key;
  35118. if (CRYPTO_HAVE_ECDH) {
  35119. /*
  35120. * Node crypto doesn't expose key generation directly, but the
  35121. * ECDH instances can generate keys. It turns out this just
  35122. * calls into the OpenSSL generic key generator, and we can
  35123. * read its output happily without doing an actual DH. So we
  35124. * use that here.
  35125. */
  35126. var osCurve = {
  35127. 'nistp256': 'prime256v1',
  35128. 'nistp384': 'secp384r1',
  35129. 'nistp521': 'secp521r1'
  35130. }[curve];
  35131. var dh = crypto.createECDH(osCurve);
  35132. dh.generateKeys();
  35133. parts.push({name: 'curve',
  35134. data: new Buffer(curve)});
  35135. parts.push({name: 'Q', data: dh.getPublicKey()});
  35136. parts.push({name: 'd', data: dh.getPrivateKey()});
  35137. key = new PrivateKey({
  35138. type: 'ecdsa',
  35139. curve: curve,
  35140. parts: parts
  35141. });
  35142. return (key);
  35143. } else {
  35144. if (ecdh === undefined)
  35145. ecdh = __webpack_require__(347);
  35146. if (ec === undefined)
  35147. ec = __webpack_require__(108);
  35148. if (jsbn === undefined)
  35149. jsbn = __webpack_require__(46).BigInteger;
  35150. var ecParams = new X9ECParameters(curve);
  35151. /* This algorithm taken from FIPS PUB 186-4 (section B.4.1) */
  35152. var n = ecParams.getN();
  35153. /*
  35154. * The crypto.randomBytes() function can only give us whole
  35155. * bytes, so taking a nod from X9.62, we round up.
  35156. */
  35157. var cByteLen = Math.ceil((n.bitLength() + 64) / 8);
  35158. var c = new jsbn(crypto.randomBytes(cByteLen));
  35159. var n1 = n.subtract(jsbn.ONE);
  35160. var priv = c.mod(n1).add(jsbn.ONE);
  35161. var pub = ecParams.getG().multiply(priv);
  35162. priv = new Buffer(priv.toByteArray());
  35163. pub = new Buffer(ecParams.getCurve().
  35164. encodePointHex(pub), 'hex');
  35165. parts.push({name: 'curve', data: new Buffer(curve)});
  35166. parts.push({name: 'Q', data: pub});
  35167. parts.push({name: 'd', data: priv});
  35168. key = new PrivateKey({
  35169. type: 'ecdsa',
  35170. curve: curve,
  35171. parts: parts
  35172. });
  35173. return (key);
  35174. }
  35175. }
  35176. /***/ }),
  35177. /* 347 */
  35178. /***/ (function(module, exports, __webpack_require__) {
  35179. var crypto = __webpack_require__(5);
  35180. var BigInteger = __webpack_require__(46).BigInteger;
  35181. var ECPointFp = __webpack_require__(108).ECPointFp;
  35182. exports.ECCurves = __webpack_require__(545);
  35183. // zero prepad
  35184. function unstupid(hex,len)
  35185. {
  35186. return (hex.length >= len) ? hex : unstupid("0"+hex,len);
  35187. }
  35188. exports.ECKey = function(curve, key, isPublic)
  35189. {
  35190. var priv;
  35191. var c = curve();
  35192. var n = c.getN();
  35193. var bytes = Math.floor(n.bitLength()/8);
  35194. if(key)
  35195. {
  35196. if(isPublic)
  35197. {
  35198. var curve = c.getCurve();
  35199. // var x = key.slice(1,bytes+1); // skip the 04 for uncompressed format
  35200. // var y = key.slice(bytes+1);
  35201. // this.P = new ECPointFp(curve,
  35202. // curve.fromBigInteger(new BigInteger(x.toString("hex"), 16)),
  35203. // curve.fromBigInteger(new BigInteger(y.toString("hex"), 16)));
  35204. this.P = curve.decodePointHex(key.toString("hex"));
  35205. }else{
  35206. if(key.length != bytes) return false;
  35207. priv = new BigInteger(key.toString("hex"), 16);
  35208. }
  35209. }else{
  35210. var n1 = n.subtract(BigInteger.ONE);
  35211. var r = new BigInteger(crypto.randomBytes(n.bitLength()));
  35212. priv = r.mod(n1).add(BigInteger.ONE);
  35213. this.P = c.getG().multiply(priv);
  35214. }
  35215. if(this.P)
  35216. {
  35217. // var pubhex = unstupid(this.P.getX().toBigInteger().toString(16),bytes*2)+unstupid(this.P.getY().toBigInteger().toString(16),bytes*2);
  35218. // this.PublicKey = new Buffer("04"+pubhex,"hex");
  35219. this.PublicKey = new Buffer(c.getCurve().encodeCompressedPointHex(this.P),"hex");
  35220. }
  35221. if(priv)
  35222. {
  35223. this.PrivateKey = new Buffer(unstupid(priv.toString(16),bytes*2),"hex");
  35224. this.deriveSharedSecret = function(key)
  35225. {
  35226. if(!key || !key.P) return false;
  35227. var S = key.P.multiply(priv);
  35228. return new Buffer(unstupid(S.getX().toBigInteger().toString(16),bytes*2),"hex");
  35229. }
  35230. }
  35231. }
  35232. /***/ }),
  35233. /* 348 */
  35234. /***/ (function(module, exports, __webpack_require__) {
  35235. // Copyright 2015 Joyent, Inc.
  35236. module.exports = {
  35237. Verifier: Verifier,
  35238. Signer: Signer
  35239. };
  35240. var nacl;
  35241. var stream = __webpack_require__(10);
  35242. var util = __webpack_require__(2);
  35243. var assert = __webpack_require__(3);
  35244. var Signature = __webpack_require__(32);
  35245. function Verifier(key, hashAlgo) {
  35246. if (nacl === undefined)
  35247. nacl = __webpack_require__(47);
  35248. if (hashAlgo.toLowerCase() !== 'sha512')
  35249. throw (new Error('ED25519 only supports the use of ' +
  35250. 'SHA-512 hashes'));
  35251. this.key = key;
  35252. this.chunks = [];
  35253. stream.Writable.call(this, {});
  35254. }
  35255. util.inherits(Verifier, stream.Writable);
  35256. Verifier.prototype._write = function (chunk, enc, cb) {
  35257. this.chunks.push(chunk);
  35258. cb();
  35259. };
  35260. Verifier.prototype.update = function (chunk) {
  35261. if (typeof (chunk) === 'string')
  35262. chunk = new Buffer(chunk, 'binary');
  35263. this.chunks.push(chunk);
  35264. };
  35265. Verifier.prototype.verify = function (signature, fmt) {
  35266. var sig;
  35267. if (Signature.isSignature(signature, [2, 0])) {
  35268. if (signature.type !== 'ed25519')
  35269. return (false);
  35270. sig = signature.toBuffer('raw');
  35271. } else if (typeof (signature) === 'string') {
  35272. sig = new Buffer(signature, 'base64');
  35273. } else if (Signature.isSignature(signature, [1, 0])) {
  35274. throw (new Error('signature was created by too old ' +
  35275. 'a version of sshpk and cannot be verified'));
  35276. }
  35277. assert.buffer(sig);
  35278. return (nacl.sign.detached.verify(
  35279. new Uint8Array(Buffer.concat(this.chunks)),
  35280. new Uint8Array(sig),
  35281. new Uint8Array(this.key.part.R.data)));
  35282. };
  35283. function Signer(key, hashAlgo) {
  35284. if (nacl === undefined)
  35285. nacl = __webpack_require__(47);
  35286. if (hashAlgo.toLowerCase() !== 'sha512')
  35287. throw (new Error('ED25519 only supports the use of ' +
  35288. 'SHA-512 hashes'));
  35289. this.key = key;
  35290. this.chunks = [];
  35291. stream.Writable.call(this, {});
  35292. }
  35293. util.inherits(Signer, stream.Writable);
  35294. Signer.prototype._write = function (chunk, enc, cb) {
  35295. this.chunks.push(chunk);
  35296. cb();
  35297. };
  35298. Signer.prototype.update = function (chunk) {
  35299. if (typeof (chunk) === 'string')
  35300. chunk = new Buffer(chunk, 'binary');
  35301. this.chunks.push(chunk);
  35302. };
  35303. Signer.prototype.sign = function () {
  35304. var sig = nacl.sign.detached(
  35305. new Uint8Array(Buffer.concat(this.chunks)),
  35306. new Uint8Array(this.key.part.r.data));
  35307. var sigBuf = new Buffer(sig);
  35308. var sigObj = Signature.parse(sigBuf, 'ed25519', 'raw');
  35309. sigObj.hashAlgorithm = 'sha512';
  35310. return (sigObj);
  35311. };
  35312. /***/ }),
  35313. /* 349 */
  35314. /***/ (function(module, exports, __webpack_require__) {
  35315. // Copyright 2015 Joyent, Inc.
  35316. module.exports = {
  35317. read: read,
  35318. write: write
  35319. };
  35320. var assert = __webpack_require__(3);
  35321. var utils = __webpack_require__(12);
  35322. var Key = __webpack_require__(15);
  35323. var PrivateKey = __webpack_require__(17);
  35324. var pem = __webpack_require__(38);
  35325. var ssh = __webpack_require__(351);
  35326. var rfc4253 = __webpack_require__(48);
  35327. function read(buf, options) {
  35328. if (typeof (buf) === 'string') {
  35329. if (buf.trim().match(/^[-]+[ ]*BEGIN/))
  35330. return (pem.read(buf, options));
  35331. if (buf.match(/^\s*ssh-[a-z]/))
  35332. return (ssh.read(buf, options));
  35333. if (buf.match(/^\s*ecdsa-/))
  35334. return (ssh.read(buf, options));
  35335. buf = new Buffer(buf, 'binary');
  35336. } else {
  35337. assert.buffer(buf);
  35338. if (findPEMHeader(buf))
  35339. return (pem.read(buf, options));
  35340. if (findSSHHeader(buf))
  35341. return (ssh.read(buf, options));
  35342. }
  35343. if (buf.readUInt32BE(0) < buf.length)
  35344. return (rfc4253.read(buf, options));
  35345. throw (new Error('Failed to auto-detect format of key'));
  35346. }
  35347. function findSSHHeader(buf) {
  35348. var offset = 0;
  35349. while (offset < buf.length &&
  35350. (buf[offset] === 32 || buf[offset] === 10 || buf[offset] === 9))
  35351. ++offset;
  35352. if (offset + 4 <= buf.length &&
  35353. buf.slice(offset, offset + 4).toString('ascii') === 'ssh-')
  35354. return (true);
  35355. if (offset + 6 <= buf.length &&
  35356. buf.slice(offset, offset + 6).toString('ascii') === 'ecdsa-')
  35357. return (true);
  35358. return (false);
  35359. }
  35360. function findPEMHeader(buf) {
  35361. var offset = 0;
  35362. while (offset < buf.length &&
  35363. (buf[offset] === 32 || buf[offset] === 10))
  35364. ++offset;
  35365. if (buf[offset] !== 45)
  35366. return (false);
  35367. while (offset < buf.length &&
  35368. (buf[offset] === 45))
  35369. ++offset;
  35370. while (offset < buf.length &&
  35371. (buf[offset] === 32))
  35372. ++offset;
  35373. if (offset + 5 > buf.length ||
  35374. buf.slice(offset, offset + 5).toString('ascii') !== 'BEGIN')
  35375. return (false);
  35376. return (true);
  35377. }
  35378. function write(key, options) {
  35379. throw (new Error('"auto" format cannot be used for writing'));
  35380. }
  35381. /***/ }),
  35382. /* 350 */
  35383. /***/ (function(module, exports, __webpack_require__) {
  35384. "use strict";
  35385. var crypto_hash_sha512 = __webpack_require__(47).lowlevel.crypto_hash;
  35386. /*
  35387. * This file is a 1:1 port from the OpenBSD blowfish.c and bcrypt_pbkdf.c. As a
  35388. * result, it retains the original copyright and license. The two files are
  35389. * under slightly different (but compatible) licenses, and are here combined in
  35390. * one file.
  35391. *
  35392. * Credit for the actual porting work goes to:
  35393. * Devi Mandiri <me@devi.web.id>
  35394. */
  35395. /*
  35396. * The Blowfish portions are under the following license:
  35397. *
  35398. * Blowfish block cipher for OpenBSD
  35399. * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
  35400. * All rights reserved.
  35401. *
  35402. * Implementation advice by David Mazieres <dm@lcs.mit.edu>.
  35403. *
  35404. * Redistribution and use in source and binary forms, with or without
  35405. * modification, are permitted provided that the following conditions
  35406. * are met:
  35407. * 1. Redistributions of source code must retain the above copyright
  35408. * notice, this list of conditions and the following disclaimer.
  35409. * 2. Redistributions in binary form must reproduce the above copyright
  35410. * notice, this list of conditions and the following disclaimer in the
  35411. * documentation and/or other materials provided with the distribution.
  35412. * 3. The name of the author may not be used to endorse or promote products
  35413. * derived from this software without specific prior written permission.
  35414. *
  35415. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  35416. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  35417. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  35418. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  35419. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  35420. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  35421. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  35422. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  35423. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  35424. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  35425. */
  35426. /*
  35427. * The bcrypt_pbkdf portions are under the following license:
  35428. *
  35429. * Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
  35430. *
  35431. * Permission to use, copy, modify, and distribute this software for any
  35432. * purpose with or without fee is hereby granted, provided that the above
  35433. * copyright notice and this permission notice appear in all copies.
  35434. *
  35435. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  35436. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  35437. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  35438. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  35439. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  35440. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  35441. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  35442. */
  35443. /*
  35444. * Performance improvements (Javascript-specific):
  35445. *
  35446. * Copyright 2016, Joyent Inc
  35447. * Author: Alex Wilson <alex.wilson@joyent.com>
  35448. *
  35449. * Permission to use, copy, modify, and distribute this software for any
  35450. * purpose with or without fee is hereby granted, provided that the above
  35451. * copyright notice and this permission notice appear in all copies.
  35452. *
  35453. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  35454. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  35455. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  35456. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  35457. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  35458. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  35459. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  35460. */
  35461. // Ported from OpenBSD bcrypt_pbkdf.c v1.9
  35462. var BLF_J = 0;
  35463. var Blowfish = function() {
  35464. this.S = [
  35465. new Uint32Array([
  35466. 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7,
  35467. 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99,
  35468. 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16,
  35469. 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e,
  35470. 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee,
  35471. 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013,
  35472. 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef,
  35473. 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e,
  35474. 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60,
  35475. 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440,
  35476. 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce,
  35477. 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a,
  35478. 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e,
  35479. 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677,
  35480. 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,
  35481. 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032,
  35482. 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88,
  35483. 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,
  35484. 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e,
  35485. 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0,
  35486. 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3,
  35487. 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98,
  35488. 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88,
  35489. 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe,
  35490. 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6,
  35491. 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d,
  35492. 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b,
  35493. 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7,
  35494. 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba,
  35495. 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463,
  35496. 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f,
  35497. 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09,
  35498. 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3,
  35499. 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb,
  35500. 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279,
  35501. 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8,
  35502. 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab,
  35503. 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82,
  35504. 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db,
  35505. 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573,
  35506. 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0,
  35507. 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b,
  35508. 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790,
  35509. 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8,
  35510. 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,
  35511. 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0,
  35512. 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7,
  35513. 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c,
  35514. 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad,
  35515. 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1,
  35516. 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299,
  35517. 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9,
  35518. 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477,
  35519. 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf,
  35520. 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49,
  35521. 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af,
  35522. 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa,
  35523. 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5,
  35524. 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41,
  35525. 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915,
  35526. 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400,
  35527. 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915,
  35528. 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664,
  35529. 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a]),
  35530. new Uint32Array([
  35531. 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623,
  35532. 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266,
  35533. 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1,
  35534. 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e,
  35535. 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6,
  35536. 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1,
  35537. 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e,
  35538. 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1,
  35539. 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737,
  35540. 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8,
  35541. 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff,
  35542. 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd,
  35543. 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701,
  35544. 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7,
  35545. 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41,
  35546. 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331,
  35547. 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf,
  35548. 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af,
  35549. 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e,
  35550. 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87,
  35551. 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c,
  35552. 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2,
  35553. 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16,
  35554. 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd,
  35555. 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b,
  35556. 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509,
  35557. 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e,
  35558. 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3,
  35559. 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f,
  35560. 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a,
  35561. 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4,
  35562. 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960,
  35563. 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66,
  35564. 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28,
  35565. 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802,
  35566. 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84,
  35567. 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510,
  35568. 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf,
  35569. 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14,
  35570. 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e,
  35571. 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50,
  35572. 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7,
  35573. 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8,
  35574. 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281,
  35575. 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99,
  35576. 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696,
  35577. 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128,
  35578. 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73,
  35579. 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0,
  35580. 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0,
  35581. 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105,
  35582. 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250,
  35583. 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3,
  35584. 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285,
  35585. 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00,
  35586. 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061,
  35587. 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb,
  35588. 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e,
  35589. 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735,
  35590. 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc,
  35591. 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9,
  35592. 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340,
  35593. 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20,
  35594. 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7]),
  35595. new Uint32Array([
  35596. 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934,
  35597. 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068,
  35598. 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af,
  35599. 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840,
  35600. 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45,
  35601. 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504,
  35602. 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a,
  35603. 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb,
  35604. 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee,
  35605. 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6,
  35606. 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42,
  35607. 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b,
  35608. 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2,
  35609. 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb,
  35610. 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527,
  35611. 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b,
  35612. 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33,
  35613. 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c,
  35614. 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3,
  35615. 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc,
  35616. 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17,
  35617. 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564,
  35618. 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b,
  35619. 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115,
  35620. 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922,
  35621. 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728,
  35622. 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0,
  35623. 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e,
  35624. 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37,
  35625. 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d,
  35626. 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804,
  35627. 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b,
  35628. 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3,
  35629. 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb,
  35630. 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d,
  35631. 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c,
  35632. 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350,
  35633. 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9,
  35634. 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a,
  35635. 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe,
  35636. 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d,
  35637. 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc,
  35638. 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f,
  35639. 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61,
  35640. 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2,
  35641. 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9,
  35642. 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2,
  35643. 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c,
  35644. 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e,
  35645. 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633,
  35646. 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10,
  35647. 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169,
  35648. 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52,
  35649. 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027,
  35650. 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5,
  35651. 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62,
  35652. 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634,
  35653. 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76,
  35654. 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24,
  35655. 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc,
  35656. 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4,
  35657. 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c,
  35658. 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837,
  35659. 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0]),
  35660. new Uint32Array([
  35661. 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b,
  35662. 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe,
  35663. 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b,
  35664. 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4,
  35665. 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8,
  35666. 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6,
  35667. 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304,
  35668. 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22,
  35669. 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4,
  35670. 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6,
  35671. 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9,
  35672. 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59,
  35673. 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593,
  35674. 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51,
  35675. 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28,
  35676. 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c,
  35677. 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b,
  35678. 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28,
  35679. 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c,
  35680. 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd,
  35681. 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a,
  35682. 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319,
  35683. 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb,
  35684. 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f,
  35685. 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991,
  35686. 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32,
  35687. 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680,
  35688. 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166,
  35689. 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae,
  35690. 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb,
  35691. 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5,
  35692. 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47,
  35693. 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,
  35694. 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d,
  35695. 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84,
  35696. 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048,
  35697. 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8,
  35698. 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd,
  35699. 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9,
  35700. 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7,
  35701. 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38,
  35702. 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f,
  35703. 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c,
  35704. 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525,
  35705. 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1,
  35706. 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442,
  35707. 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964,
  35708. 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e,
  35709. 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8,
  35710. 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d,
  35711. 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f,
  35712. 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299,
  35713. 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02,
  35714. 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc,
  35715. 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614,
  35716. 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a,
  35717. 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6,
  35718. 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b,
  35719. 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0,
  35720. 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060,
  35721. 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e,
  35722. 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9,
  35723. 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,
  35724. 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6])
  35725. ];
  35726. this.P = new Uint32Array([
  35727. 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344,
  35728. 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89,
  35729. 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,
  35730. 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917,
  35731. 0x9216d5d9, 0x8979fb1b]);
  35732. };
  35733. function F(S, x8, i) {
  35734. return (((S[0][x8[i+3]] +
  35735. S[1][x8[i+2]]) ^
  35736. S[2][x8[i+1]]) +
  35737. S[3][x8[i]]);
  35738. };
  35739. Blowfish.prototype.encipher = function(x, x8) {
  35740. if (x8 === undefined) {
  35741. x8 = new Uint8Array(x.buffer);
  35742. if (x.byteOffset !== 0)
  35743. x8 = x8.subarray(x.byteOffset);
  35744. }
  35745. x[0] ^= this.P[0];
  35746. for (var i = 1; i < 16; i += 2) {
  35747. x[1] ^= F(this.S, x8, 0) ^ this.P[i];
  35748. x[0] ^= F(this.S, x8, 4) ^ this.P[i+1];
  35749. }
  35750. var t = x[0];
  35751. x[0] = x[1] ^ this.P[17];
  35752. x[1] = t;
  35753. };
  35754. Blowfish.prototype.decipher = function(x) {
  35755. var x8 = new Uint8Array(x.buffer);
  35756. if (x.byteOffset !== 0)
  35757. x8 = x8.subarray(x.byteOffset);
  35758. x[0] ^= this.P[17];
  35759. for (var i = 16; i > 0; i -= 2) {
  35760. x[1] ^= F(this.S, x8, 0) ^ this.P[i];
  35761. x[0] ^= F(this.S, x8, 4) ^ this.P[i-1];
  35762. }
  35763. var t = x[0];
  35764. x[0] = x[1] ^ this.P[0];
  35765. x[1] = t;
  35766. };
  35767. function stream2word(data, databytes){
  35768. var i, temp = 0;
  35769. for (i = 0; i < 4; i++, BLF_J++) {
  35770. if (BLF_J >= databytes) BLF_J = 0;
  35771. temp = (temp << 8) | data[BLF_J];
  35772. }
  35773. return temp;
  35774. };
  35775. Blowfish.prototype.expand0state = function(key, keybytes) {
  35776. var d = new Uint32Array(2), i, k;
  35777. var d8 = new Uint8Array(d.buffer);
  35778. for (i = 0, BLF_J = 0; i < 18; i++) {
  35779. this.P[i] ^= stream2word(key, keybytes);
  35780. }
  35781. BLF_J = 0;
  35782. for (i = 0; i < 18; i += 2) {
  35783. this.encipher(d, d8);
  35784. this.P[i] = d[0];
  35785. this.P[i+1] = d[1];
  35786. }
  35787. for (i = 0; i < 4; i++) {
  35788. for (k = 0; k < 256; k += 2) {
  35789. this.encipher(d, d8);
  35790. this.S[i][k] = d[0];
  35791. this.S[i][k+1] = d[1];
  35792. }
  35793. }
  35794. };
  35795. Blowfish.prototype.expandstate = function(data, databytes, key, keybytes) {
  35796. var d = new Uint32Array(2), i, k;
  35797. for (i = 0, BLF_J = 0; i < 18; i++) {
  35798. this.P[i] ^= stream2word(key, keybytes);
  35799. }
  35800. for (i = 0, BLF_J = 0; i < 18; i += 2) {
  35801. d[0] ^= stream2word(data, databytes);
  35802. d[1] ^= stream2word(data, databytes);
  35803. this.encipher(d);
  35804. this.P[i] = d[0];
  35805. this.P[i+1] = d[1];
  35806. }
  35807. for (i = 0; i < 4; i++) {
  35808. for (k = 0; k < 256; k += 2) {
  35809. d[0] ^= stream2word(data, databytes);
  35810. d[1] ^= stream2word(data, databytes);
  35811. this.encipher(d);
  35812. this.S[i][k] = d[0];
  35813. this.S[i][k+1] = d[1];
  35814. }
  35815. }
  35816. BLF_J = 0;
  35817. };
  35818. Blowfish.prototype.enc = function(data, blocks) {
  35819. for (var i = 0; i < blocks; i++) {
  35820. this.encipher(data.subarray(i*2));
  35821. }
  35822. };
  35823. Blowfish.prototype.dec = function(data, blocks) {
  35824. for (var i = 0; i < blocks; i++) {
  35825. this.decipher(data.subarray(i*2));
  35826. }
  35827. };
  35828. var BCRYPT_BLOCKS = 8,
  35829. BCRYPT_HASHSIZE = 32;
  35830. function bcrypt_hash(sha2pass, sha2salt, out) {
  35831. var state = new Blowfish(),
  35832. cdata = new Uint32Array(BCRYPT_BLOCKS), i,
  35833. ciphertext = new Uint8Array([79,120,121,99,104,114,111,109,97,116,105,
  35834. 99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109,
  35835. 105,116,101]); //"OxychromaticBlowfishSwatDynamite"
  35836. state.expandstate(sha2salt, 64, sha2pass, 64);
  35837. for (i = 0; i < 64; i++) {
  35838. state.expand0state(sha2salt, 64);
  35839. state.expand0state(sha2pass, 64);
  35840. }
  35841. for (i = 0; i < BCRYPT_BLOCKS; i++)
  35842. cdata[i] = stream2word(ciphertext, ciphertext.byteLength);
  35843. for (i = 0; i < 64; i++)
  35844. state.enc(cdata, cdata.byteLength / 8);
  35845. for (i = 0; i < BCRYPT_BLOCKS; i++) {
  35846. out[4*i+3] = cdata[i] >>> 24;
  35847. out[4*i+2] = cdata[i] >>> 16;
  35848. out[4*i+1] = cdata[i] >>> 8;
  35849. out[4*i+0] = cdata[i];
  35850. }
  35851. };
  35852. function bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) {
  35853. var sha2pass = new Uint8Array(64),
  35854. sha2salt = new Uint8Array(64),
  35855. out = new Uint8Array(BCRYPT_HASHSIZE),
  35856. tmpout = new Uint8Array(BCRYPT_HASHSIZE),
  35857. countsalt = new Uint8Array(saltlen+4),
  35858. i, j, amt, stride, dest, count,
  35859. origkeylen = keylen;
  35860. if (rounds < 1)
  35861. return -1;
  35862. if (passlen === 0 || saltlen === 0 || keylen === 0 ||
  35863. keylen > (out.byteLength * out.byteLength) || saltlen > (1<<20))
  35864. return -1;
  35865. stride = Math.floor((keylen + out.byteLength - 1) / out.byteLength);
  35866. amt = Math.floor((keylen + stride - 1) / stride);
  35867. for (i = 0; i < saltlen; i++)
  35868. countsalt[i] = salt[i];
  35869. crypto_hash_sha512(sha2pass, pass, passlen);
  35870. for (count = 1; keylen > 0; count++) {
  35871. countsalt[saltlen+0] = count >>> 24;
  35872. countsalt[saltlen+1] = count >>> 16;
  35873. countsalt[saltlen+2] = count >>> 8;
  35874. countsalt[saltlen+3] = count;
  35875. crypto_hash_sha512(sha2salt, countsalt, saltlen + 4);
  35876. bcrypt_hash(sha2pass, sha2salt, tmpout);
  35877. for (i = out.byteLength; i--;)
  35878. out[i] = tmpout[i];
  35879. for (i = 1; i < rounds; i++) {
  35880. crypto_hash_sha512(sha2salt, tmpout, tmpout.byteLength);
  35881. bcrypt_hash(sha2pass, sha2salt, tmpout);
  35882. for (j = 0; j < out.byteLength; j++)
  35883. out[j] ^= tmpout[j];
  35884. }
  35885. amt = Math.min(amt, keylen);
  35886. for (i = 0; i < amt; i++) {
  35887. dest = i * stride + (count - 1);
  35888. if (dest >= origkeylen)
  35889. break;
  35890. key[dest] = out[i];
  35891. }
  35892. keylen -= i;
  35893. }
  35894. return 0;
  35895. };
  35896. module.exports = {
  35897. BLOCKS: BCRYPT_BLOCKS,
  35898. HASHSIZE: BCRYPT_HASHSIZE,
  35899. hash: bcrypt_hash,
  35900. pbkdf: bcrypt_pbkdf
  35901. };
  35902. /***/ }),
  35903. /* 351 */
  35904. /***/ (function(module, exports, __webpack_require__) {
  35905. // Copyright 2015 Joyent, Inc.
  35906. module.exports = {
  35907. read: read,
  35908. write: write
  35909. };
  35910. var assert = __webpack_require__(3);
  35911. var rfc4253 = __webpack_require__(48);
  35912. var utils = __webpack_require__(12);
  35913. var Key = __webpack_require__(15);
  35914. var PrivateKey = __webpack_require__(17);
  35915. var sshpriv = __webpack_require__(109);
  35916. /*JSSTYLED*/
  35917. var SSHKEY_RE = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([\n \t]+([^\n]+))?$/;
  35918. /*JSSTYLED*/
  35919. var SSHKEY_RE2 = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/ \t\n]+[=]*)(.*)$/;
  35920. function read(buf, options) {
  35921. if (typeof (buf) !== 'string') {
  35922. assert.buffer(buf, 'buf');
  35923. buf = buf.toString('ascii');
  35924. }
  35925. var trimmed = buf.trim().replace(/[\\\r]/g, '');
  35926. var m = trimmed.match(SSHKEY_RE);
  35927. if (!m)
  35928. m = trimmed.match(SSHKEY_RE2);
  35929. assert.ok(m, 'key must match regex');
  35930. var type = rfc4253.algToKeyType(m[1]);
  35931. var kbuf = new Buffer(m[2], 'base64');
  35932. /*
  35933. * This is a bit tricky. If we managed to parse the key and locate the
  35934. * key comment with the regex, then do a non-partial read and assert
  35935. * that we have consumed all bytes. If we couldn't locate the key
  35936. * comment, though, there may be whitespace shenanigans going on that
  35937. * have conjoined the comment to the rest of the key. We do a partial
  35938. * read in this case to try to make the best out of a sorry situation.
  35939. */
  35940. var key;
  35941. var ret = {};
  35942. if (m[4]) {
  35943. try {
  35944. key = rfc4253.read(kbuf);
  35945. } catch (e) {
  35946. m = trimmed.match(SSHKEY_RE2);
  35947. assert.ok(m, 'key must match regex');
  35948. kbuf = new Buffer(m[2], 'base64');
  35949. key = rfc4253.readInternal(ret, 'public', kbuf);
  35950. }
  35951. } else {
  35952. key = rfc4253.readInternal(ret, 'public', kbuf);
  35953. }
  35954. assert.strictEqual(type, key.type);
  35955. if (m[4] && m[4].length > 0) {
  35956. key.comment = m[4];
  35957. } else if (ret.consumed) {
  35958. /*
  35959. * Now the magic: trying to recover the key comment when it's
  35960. * gotten conjoined to the key or otherwise shenanigan'd.
  35961. *
  35962. * Work out how much base64 we used, then drop all non-base64
  35963. * chars from the beginning up to this point in the the string.
  35964. * Then offset in this and try to make up for missing = chars.
  35965. */
  35966. var data = m[2] + m[3];
  35967. var realOffset = Math.ceil(ret.consumed / 3) * 4;
  35968. data = data.slice(0, realOffset - 2). /*JSSTYLED*/
  35969. replace(/[^a-zA-Z0-9+\/=]/g, '') +
  35970. data.slice(realOffset - 2);
  35971. var padding = ret.consumed % 3;
  35972. if (padding > 0 &&
  35973. data.slice(realOffset - 1, realOffset) !== '=')
  35974. realOffset--;
  35975. while (data.slice(realOffset, realOffset + 1) === '=')
  35976. realOffset++;
  35977. /* Finally, grab what we think is the comment & clean it up. */
  35978. var trailer = data.slice(realOffset);
  35979. trailer = trailer.replace(/[\r\n]/g, ' ').
  35980. replace(/^\s+/, '');
  35981. if (trailer.match(/^[a-zA-Z0-9]/))
  35982. key.comment = trailer;
  35983. }
  35984. return (key);
  35985. }
  35986. function write(key, options) {
  35987. assert.object(key);
  35988. if (!Key.isKey(key))
  35989. throw (new Error('Must be a public key'));
  35990. var parts = [];
  35991. var alg = rfc4253.keyTypeToAlg(key);
  35992. parts.push(alg);
  35993. var buf = rfc4253.write(key);
  35994. parts.push(buf.toString('base64'));
  35995. if (key.comment)
  35996. parts.push(key.comment);
  35997. return (new Buffer(parts.join(' ')));
  35998. }
  35999. /***/ }),
  36000. /* 352 */
  36001. /***/ (function(module, exports, __webpack_require__) {
  36002. // Copyright 2017 Joyent, Inc.
  36003. module.exports = {
  36004. read: read,
  36005. verify: verify,
  36006. sign: sign,
  36007. signAsync: signAsync,
  36008. write: write
  36009. };
  36010. var assert = __webpack_require__(3);
  36011. var asn1 = __webpack_require__(39);
  36012. var algs = __webpack_require__(16);
  36013. var utils = __webpack_require__(12);
  36014. var Key = __webpack_require__(15);
  36015. var PrivateKey = __webpack_require__(17);
  36016. var pem = __webpack_require__(38);
  36017. var Identity = __webpack_require__(87);
  36018. var Signature = __webpack_require__(32);
  36019. var Certificate = __webpack_require__(85);
  36020. var pkcs8 = __webpack_require__(86);
  36021. /*
  36022. * This file is based on RFC5280 (X.509).
  36023. */
  36024. /* Helper to read in a single mpint */
  36025. function readMPInt(der, nm) {
  36026. assert.strictEqual(der.peek(), asn1.Ber.Integer,
  36027. nm + ' is not an Integer');
  36028. return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true)));
  36029. }
  36030. function verify(cert, key) {
  36031. var sig = cert.signatures.x509;
  36032. assert.object(sig, 'x509 signature');
  36033. var algParts = sig.algo.split('-');
  36034. if (algParts[0] !== key.type)
  36035. return (false);
  36036. var blob = sig.cache;
  36037. if (blob === undefined) {
  36038. var der = new asn1.BerWriter();
  36039. writeTBSCert(cert, der);
  36040. blob = der.buffer;
  36041. }
  36042. var verifier = key.createVerify(algParts[1]);
  36043. verifier.write(blob);
  36044. return (verifier.verify(sig.signature));
  36045. }
  36046. function Local(i) {
  36047. return (asn1.Ber.Context | asn1.Ber.Constructor | i);
  36048. }
  36049. function Context(i) {
  36050. return (asn1.Ber.Context | i);
  36051. }
  36052. var SIGN_ALGS = {
  36053. 'rsa-md5': '1.2.840.113549.1.1.4',
  36054. 'rsa-sha1': '1.2.840.113549.1.1.5',
  36055. 'rsa-sha256': '1.2.840.113549.1.1.11',
  36056. 'rsa-sha384': '1.2.840.113549.1.1.12',
  36057. 'rsa-sha512': '1.2.840.113549.1.1.13',
  36058. 'dsa-sha1': '1.2.840.10040.4.3',
  36059. 'dsa-sha256': '2.16.840.1.101.3.4.3.2',
  36060. 'ecdsa-sha1': '1.2.840.10045.4.1',
  36061. 'ecdsa-sha256': '1.2.840.10045.4.3.2',
  36062. 'ecdsa-sha384': '1.2.840.10045.4.3.3',
  36063. 'ecdsa-sha512': '1.2.840.10045.4.3.4'
  36064. };
  36065. Object.keys(SIGN_ALGS).forEach(function (k) {
  36066. SIGN_ALGS[SIGN_ALGS[k]] = k;
  36067. });
  36068. SIGN_ALGS['1.3.14.3.2.3'] = 'rsa-md5';
  36069. SIGN_ALGS['1.3.14.3.2.29'] = 'rsa-sha1';
  36070. var EXTS = {
  36071. 'issuerKeyId': '2.5.29.35',
  36072. 'altName': '2.5.29.17',
  36073. 'basicConstraints': '2.5.29.19',
  36074. 'keyUsage': '2.5.29.15',
  36075. 'extKeyUsage': '2.5.29.37'
  36076. };
  36077. function read(buf, options) {
  36078. if (typeof (buf) === 'string') {
  36079. buf = new Buffer(buf, 'binary');
  36080. }
  36081. assert.buffer(buf, 'buf');
  36082. var der = new asn1.BerReader(buf);
  36083. der.readSequence();
  36084. if (Math.abs(der.length - der.remain) > 1) {
  36085. throw (new Error('DER sequence does not contain whole byte ' +
  36086. 'stream'));
  36087. }
  36088. var tbsStart = der.offset;
  36089. der.readSequence();
  36090. var sigOffset = der.offset + der.length;
  36091. var tbsEnd = sigOffset;
  36092. if (der.peek() === Local(0)) {
  36093. der.readSequence(Local(0));
  36094. var version = der.readInt();
  36095. assert.ok(version <= 3,
  36096. 'only x.509 versions up to v3 supported');
  36097. }
  36098. var cert = {};
  36099. cert.signatures = {};
  36100. var sig = (cert.signatures.x509 = {});
  36101. sig.extras = {};
  36102. cert.serial = readMPInt(der, 'serial');
  36103. der.readSequence();
  36104. var after = der.offset + der.length;
  36105. var certAlgOid = der.readOID();
  36106. var certAlg = SIGN_ALGS[certAlgOid];
  36107. if (certAlg === undefined)
  36108. throw (new Error('unknown signature algorithm ' + certAlgOid));
  36109. der._offset = after;
  36110. cert.issuer = Identity.parseAsn1(der);
  36111. der.readSequence();
  36112. cert.validFrom = readDate(der);
  36113. cert.validUntil = readDate(der);
  36114. cert.subjects = [Identity.parseAsn1(der)];
  36115. der.readSequence();
  36116. after = der.offset + der.length;
  36117. cert.subjectKey = pkcs8.readPkcs8(undefined, 'public', der);
  36118. der._offset = after;
  36119. /* issuerUniqueID */
  36120. if (der.peek() === Local(1)) {
  36121. der.readSequence(Local(1));
  36122. sig.extras.issuerUniqueID =
  36123. buf.slice(der.offset, der.offset + der.length);
  36124. der._offset += der.length;
  36125. }
  36126. /* subjectUniqueID */
  36127. if (der.peek() === Local(2)) {
  36128. der.readSequence(Local(2));
  36129. sig.extras.subjectUniqueID =
  36130. buf.slice(der.offset, der.offset + der.length);
  36131. der._offset += der.length;
  36132. }
  36133. /* extensions */
  36134. if (der.peek() === Local(3)) {
  36135. der.readSequence(Local(3));
  36136. var extEnd = der.offset + der.length;
  36137. der.readSequence();
  36138. while (der.offset < extEnd)
  36139. readExtension(cert, buf, der);
  36140. assert.strictEqual(der.offset, extEnd);
  36141. }
  36142. assert.strictEqual(der.offset, sigOffset);
  36143. der.readSequence();
  36144. after = der.offset + der.length;
  36145. var sigAlgOid = der.readOID();
  36146. var sigAlg = SIGN_ALGS[sigAlgOid];
  36147. if (sigAlg === undefined)
  36148. throw (new Error('unknown signature algorithm ' + sigAlgOid));
  36149. der._offset = after;
  36150. var sigData = der.readString(asn1.Ber.BitString, true);
  36151. if (sigData[0] === 0)
  36152. sigData = sigData.slice(1);
  36153. var algParts = sigAlg.split('-');
  36154. sig.signature = Signature.parse(sigData, algParts[0], 'asn1');
  36155. sig.signature.hashAlgorithm = algParts[1];
  36156. sig.algo = sigAlg;
  36157. sig.cache = buf.slice(tbsStart, tbsEnd);
  36158. return (new Certificate(cert));
  36159. }
  36160. function readDate(der) {
  36161. if (der.peek() === asn1.Ber.UTCTime) {
  36162. return (utcTimeToDate(der.readString(asn1.Ber.UTCTime)));
  36163. } else if (der.peek() === asn1.Ber.GeneralizedTime) {
  36164. return (gTimeToDate(der.readString(asn1.Ber.GeneralizedTime)));
  36165. } else {
  36166. throw (new Error('Unsupported date format'));
  36167. }
  36168. }
  36169. /* RFC5280, section 4.2.1.6 (GeneralName type) */
  36170. var ALTNAME = {
  36171. OtherName: Local(0),
  36172. RFC822Name: Context(1),
  36173. DNSName: Context(2),
  36174. X400Address: Local(3),
  36175. DirectoryName: Local(4),
  36176. EDIPartyName: Local(5),
  36177. URI: Context(6),
  36178. IPAddress: Context(7),
  36179. OID: Context(8)
  36180. };
  36181. /* RFC5280, section 4.2.1.12 (KeyPurposeId) */
  36182. var EXTPURPOSE = {
  36183. 'serverAuth': '1.3.6.1.5.5.7.3.1',
  36184. 'clientAuth': '1.3.6.1.5.5.7.3.2',
  36185. 'codeSigning': '1.3.6.1.5.5.7.3.3',
  36186. /* See https://github.com/joyent/oid-docs/blob/master/root.md */
  36187. 'joyentDocker': '1.3.6.1.4.1.38678.1.4.1',
  36188. 'joyentCmon': '1.3.6.1.4.1.38678.1.4.2'
  36189. };
  36190. var EXTPURPOSE_REV = {};
  36191. Object.keys(EXTPURPOSE).forEach(function (k) {
  36192. EXTPURPOSE_REV[EXTPURPOSE[k]] = k;
  36193. });
  36194. var KEYUSEBITS = [
  36195. 'signature', 'identity', 'keyEncryption',
  36196. 'encryption', 'keyAgreement', 'ca', 'crl'
  36197. ];
  36198. function readExtension(cert, buf, der) {
  36199. der.readSequence();
  36200. var after = der.offset + der.length;
  36201. var extId = der.readOID();
  36202. var id;
  36203. var sig = cert.signatures.x509;
  36204. sig.extras.exts = [];
  36205. var critical;
  36206. if (der.peek() === asn1.Ber.Boolean)
  36207. critical = der.readBoolean();
  36208. switch (extId) {
  36209. case (EXTS.basicConstraints):
  36210. der.readSequence(asn1.Ber.OctetString);
  36211. der.readSequence();
  36212. var bcEnd = der.offset + der.length;
  36213. var ca = false;
  36214. if (der.peek() === asn1.Ber.Boolean)
  36215. ca = der.readBoolean();
  36216. if (cert.purposes === undefined)
  36217. cert.purposes = [];
  36218. if (ca === true)
  36219. cert.purposes.push('ca');
  36220. var bc = { oid: extId, critical: critical };
  36221. if (der.offset < bcEnd && der.peek() === asn1.Ber.Integer)
  36222. bc.pathLen = der.readInt();
  36223. sig.extras.exts.push(bc);
  36224. break;
  36225. case (EXTS.extKeyUsage):
  36226. der.readSequence(asn1.Ber.OctetString);
  36227. der.readSequence();
  36228. if (cert.purposes === undefined)
  36229. cert.purposes = [];
  36230. var ekEnd = der.offset + der.length;
  36231. while (der.offset < ekEnd) {
  36232. var oid = der.readOID();
  36233. cert.purposes.push(EXTPURPOSE_REV[oid] || oid);
  36234. }
  36235. /*
  36236. * This is a bit of a hack: in the case where we have a cert
  36237. * that's only allowed to do serverAuth or clientAuth (and not
  36238. * the other), we want to make sure all our Subjects are of
  36239. * the right type. But we already parsed our Subjects and
  36240. * decided if they were hosts or users earlier (since it appears
  36241. * first in the cert).
  36242. *
  36243. * So we go through and mutate them into the right kind here if
  36244. * it doesn't match. This might not be hugely beneficial, as it
  36245. * seems that single-purpose certs are not often seen in the
  36246. * wild.
  36247. */
  36248. if (cert.purposes.indexOf('serverAuth') !== -1 &&
  36249. cert.purposes.indexOf('clientAuth') === -1) {
  36250. cert.subjects.forEach(function (ide) {
  36251. if (ide.type !== 'host') {
  36252. ide.type = 'host';
  36253. ide.hostname = ide.uid ||
  36254. ide.email ||
  36255. ide.components[0].value;
  36256. }
  36257. });
  36258. } else if (cert.purposes.indexOf('clientAuth') !== -1 &&
  36259. cert.purposes.indexOf('serverAuth') === -1) {
  36260. cert.subjects.forEach(function (ide) {
  36261. if (ide.type !== 'user') {
  36262. ide.type = 'user';
  36263. ide.uid = ide.hostname ||
  36264. ide.email ||
  36265. ide.components[0].value;
  36266. }
  36267. });
  36268. }
  36269. sig.extras.exts.push({ oid: extId, critical: critical });
  36270. break;
  36271. case (EXTS.keyUsage):
  36272. der.readSequence(asn1.Ber.OctetString);
  36273. var bits = der.readString(asn1.Ber.BitString, true);
  36274. var setBits = readBitField(bits, KEYUSEBITS);
  36275. setBits.forEach(function (bit) {
  36276. if (cert.purposes === undefined)
  36277. cert.purposes = [];
  36278. if (cert.purposes.indexOf(bit) === -1)
  36279. cert.purposes.push(bit);
  36280. });
  36281. sig.extras.exts.push({ oid: extId, critical: critical,
  36282. bits: bits });
  36283. break;
  36284. case (EXTS.altName):
  36285. der.readSequence(asn1.Ber.OctetString);
  36286. der.readSequence();
  36287. var aeEnd = der.offset + der.length;
  36288. while (der.offset < aeEnd) {
  36289. switch (der.peek()) {
  36290. case ALTNAME.OtherName:
  36291. case ALTNAME.EDIPartyName:
  36292. der.readSequence();
  36293. der._offset += der.length;
  36294. break;
  36295. case ALTNAME.OID:
  36296. der.readOID(ALTNAME.OID);
  36297. break;
  36298. case ALTNAME.RFC822Name:
  36299. /* RFC822 specifies email addresses */
  36300. var email = der.readString(ALTNAME.RFC822Name);
  36301. id = Identity.forEmail(email);
  36302. if (!cert.subjects[0].equals(id))
  36303. cert.subjects.push(id);
  36304. break;
  36305. case ALTNAME.DirectoryName:
  36306. der.readSequence(ALTNAME.DirectoryName);
  36307. id = Identity.parseAsn1(der);
  36308. if (!cert.subjects[0].equals(id))
  36309. cert.subjects.push(id);
  36310. break;
  36311. case ALTNAME.DNSName:
  36312. var host = der.readString(
  36313. ALTNAME.DNSName);
  36314. id = Identity.forHost(host);
  36315. if (!cert.subjects[0].equals(id))
  36316. cert.subjects.push(id);
  36317. break;
  36318. default:
  36319. der.readString(der.peek());
  36320. break;
  36321. }
  36322. }
  36323. sig.extras.exts.push({ oid: extId, critical: critical });
  36324. break;
  36325. default:
  36326. sig.extras.exts.push({
  36327. oid: extId,
  36328. critical: critical,
  36329. data: der.readString(asn1.Ber.OctetString, true)
  36330. });
  36331. break;
  36332. }
  36333. der._offset = after;
  36334. }
  36335. var UTCTIME_RE =
  36336. /^([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/;
  36337. function utcTimeToDate(t) {
  36338. var m = t.match(UTCTIME_RE);
  36339. assert.ok(m, 'timestamps must be in UTC');
  36340. var d = new Date();
  36341. var thisYear = d.getUTCFullYear();
  36342. var century = Math.floor(thisYear / 100) * 100;
  36343. var year = parseInt(m[1], 10);
  36344. if (thisYear % 100 < 50 && year >= 60)
  36345. year += (century - 1);
  36346. else
  36347. year += century;
  36348. d.setUTCFullYear(year, parseInt(m[2], 10) - 1, parseInt(m[3], 10));
  36349. d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10));
  36350. if (m[6] && m[6].length > 0)
  36351. d.setUTCSeconds(parseInt(m[6], 10));
  36352. return (d);
  36353. }
  36354. var GTIME_RE =
  36355. /^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/;
  36356. function gTimeToDate(t) {
  36357. var m = t.match(GTIME_RE);
  36358. assert.ok(m);
  36359. var d = new Date();
  36360. d.setUTCFullYear(parseInt(m[1], 10), parseInt(m[2], 10) - 1,
  36361. parseInt(m[3], 10));
  36362. d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10));
  36363. if (m[6] && m[6].length > 0)
  36364. d.setUTCSeconds(parseInt(m[6], 10));
  36365. return (d);
  36366. }
  36367. function zeroPad(n) {
  36368. var s = '' + n;
  36369. while (s.length < 2)
  36370. s = '0' + s;
  36371. return (s);
  36372. }
  36373. function dateToUTCTime(d) {
  36374. var s = '';
  36375. s += zeroPad(d.getUTCFullYear() % 100);
  36376. s += zeroPad(d.getUTCMonth() + 1);
  36377. s += zeroPad(d.getUTCDate());
  36378. s += zeroPad(d.getUTCHours());
  36379. s += zeroPad(d.getUTCMinutes());
  36380. s += zeroPad(d.getUTCSeconds());
  36381. s += 'Z';
  36382. return (s);
  36383. }
  36384. function sign(cert, key) {
  36385. if (cert.signatures.x509 === undefined)
  36386. cert.signatures.x509 = {};
  36387. var sig = cert.signatures.x509;
  36388. sig.algo = key.type + '-' + key.defaultHashAlgorithm();
  36389. if (SIGN_ALGS[sig.algo] === undefined)
  36390. return (false);
  36391. var der = new asn1.BerWriter();
  36392. writeTBSCert(cert, der);
  36393. var blob = der.buffer;
  36394. sig.cache = blob;
  36395. var signer = key.createSign();
  36396. signer.write(blob);
  36397. cert.signatures.x509.signature = signer.sign();
  36398. return (true);
  36399. }
  36400. function signAsync(cert, signer, done) {
  36401. if (cert.signatures.x509 === undefined)
  36402. cert.signatures.x509 = {};
  36403. var sig = cert.signatures.x509;
  36404. var der = new asn1.BerWriter();
  36405. writeTBSCert(cert, der);
  36406. var blob = der.buffer;
  36407. sig.cache = blob;
  36408. signer(blob, function (err, signature) {
  36409. if (err) {
  36410. done(err);
  36411. return;
  36412. }
  36413. sig.algo = signature.type + '-' + signature.hashAlgorithm;
  36414. if (SIGN_ALGS[sig.algo] === undefined) {
  36415. done(new Error('Invalid signing algorithm "' +
  36416. sig.algo + '"'));
  36417. return;
  36418. }
  36419. sig.signature = signature;
  36420. done();
  36421. });
  36422. }
  36423. function write(cert, options) {
  36424. var sig = cert.signatures.x509;
  36425. assert.object(sig, 'x509 signature');
  36426. var der = new asn1.BerWriter();
  36427. der.startSequence();
  36428. if (sig.cache) {
  36429. der._ensure(sig.cache.length);
  36430. sig.cache.copy(der._buf, der._offset);
  36431. der._offset += sig.cache.length;
  36432. } else {
  36433. writeTBSCert(cert, der);
  36434. }
  36435. der.startSequence();
  36436. der.writeOID(SIGN_ALGS[sig.algo]);
  36437. if (sig.algo.match(/^rsa-/))
  36438. der.writeNull();
  36439. der.endSequence();
  36440. var sigData = sig.signature.toBuffer('asn1');
  36441. var data = new Buffer(sigData.length + 1);
  36442. data[0] = 0;
  36443. sigData.copy(data, 1);
  36444. der.writeBuffer(data, asn1.Ber.BitString);
  36445. der.endSequence();
  36446. return (der.buffer);
  36447. }
  36448. function writeTBSCert(cert, der) {
  36449. var sig = cert.signatures.x509;
  36450. assert.object(sig, 'x509 signature');
  36451. der.startSequence();
  36452. der.startSequence(Local(0));
  36453. der.writeInt(2);
  36454. der.endSequence();
  36455. der.writeBuffer(utils.mpNormalize(cert.serial), asn1.Ber.Integer);
  36456. der.startSequence();
  36457. der.writeOID(SIGN_ALGS[sig.algo]);
  36458. der.endSequence();
  36459. cert.issuer.toAsn1(der);
  36460. der.startSequence();
  36461. der.writeString(dateToUTCTime(cert.validFrom), asn1.Ber.UTCTime);
  36462. der.writeString(dateToUTCTime(cert.validUntil), asn1.Ber.UTCTime);
  36463. der.endSequence();
  36464. var subject = cert.subjects[0];
  36465. var altNames = cert.subjects.slice(1);
  36466. subject.toAsn1(der);
  36467. pkcs8.writePkcs8(der, cert.subjectKey);
  36468. if (sig.extras && sig.extras.issuerUniqueID) {
  36469. der.writeBuffer(sig.extras.issuerUniqueID, Local(1));
  36470. }
  36471. if (sig.extras && sig.extras.subjectUniqueID) {
  36472. der.writeBuffer(sig.extras.subjectUniqueID, Local(2));
  36473. }
  36474. if (altNames.length > 0 || subject.type === 'host' ||
  36475. (cert.purposes !== undefined && cert.purposes.length > 0) ||
  36476. (sig.extras && sig.extras.exts)) {
  36477. der.startSequence(Local(3));
  36478. der.startSequence();
  36479. var exts = [];
  36480. if (cert.purposes !== undefined && cert.purposes.length > 0) {
  36481. exts.push({
  36482. oid: EXTS.basicConstraints,
  36483. critical: true
  36484. });
  36485. exts.push({
  36486. oid: EXTS.keyUsage,
  36487. critical: true
  36488. });
  36489. exts.push({
  36490. oid: EXTS.extKeyUsage,
  36491. critical: true
  36492. });
  36493. }
  36494. exts.push({ oid: EXTS.altName });
  36495. if (sig.extras && sig.extras.exts)
  36496. exts = sig.extras.exts;
  36497. for (var i = 0; i < exts.length; ++i) {
  36498. der.startSequence();
  36499. der.writeOID(exts[i].oid);
  36500. if (exts[i].critical !== undefined)
  36501. der.writeBoolean(exts[i].critical);
  36502. if (exts[i].oid === EXTS.altName) {
  36503. der.startSequence(asn1.Ber.OctetString);
  36504. der.startSequence();
  36505. if (subject.type === 'host') {
  36506. der.writeString(subject.hostname,
  36507. Context(2));
  36508. }
  36509. for (var j = 0; j < altNames.length; ++j) {
  36510. if (altNames[j].type === 'host') {
  36511. der.writeString(
  36512. altNames[j].hostname,
  36513. ALTNAME.DNSName);
  36514. } else if (altNames[j].type ===
  36515. 'email') {
  36516. der.writeString(
  36517. altNames[j].email,
  36518. ALTNAME.RFC822Name);
  36519. } else {
  36520. /*
  36521. * Encode anything else as a
  36522. * DN style name for now.
  36523. */
  36524. der.startSequence(
  36525. ALTNAME.DirectoryName);
  36526. altNames[j].toAsn1(der);
  36527. der.endSequence();
  36528. }
  36529. }
  36530. der.endSequence();
  36531. der.endSequence();
  36532. } else if (exts[i].oid === EXTS.basicConstraints) {
  36533. der.startSequence(asn1.Ber.OctetString);
  36534. der.startSequence();
  36535. var ca = (cert.purposes.indexOf('ca') !== -1);
  36536. var pathLen = exts[i].pathLen;
  36537. der.writeBoolean(ca);
  36538. if (pathLen !== undefined)
  36539. der.writeInt(pathLen);
  36540. der.endSequence();
  36541. der.endSequence();
  36542. } else if (exts[i].oid === EXTS.extKeyUsage) {
  36543. der.startSequence(asn1.Ber.OctetString);
  36544. der.startSequence();
  36545. cert.purposes.forEach(function (purpose) {
  36546. if (purpose === 'ca')
  36547. return;
  36548. if (KEYUSEBITS.indexOf(purpose) !== -1)
  36549. return;
  36550. var oid = purpose;
  36551. if (EXTPURPOSE[purpose] !== undefined)
  36552. oid = EXTPURPOSE[purpose];
  36553. der.writeOID(oid);
  36554. });
  36555. der.endSequence();
  36556. der.endSequence();
  36557. } else if (exts[i].oid === EXTS.keyUsage) {
  36558. der.startSequence(asn1.Ber.OctetString);
  36559. /*
  36560. * If we parsed this certificate from a byte
  36561. * stream (i.e. we didn't generate it in sshpk)
  36562. * then we'll have a ".bits" property on the
  36563. * ext with the original raw byte contents.
  36564. *
  36565. * If we have this, use it here instead of
  36566. * regenerating it. This guarantees we output
  36567. * the same data we parsed, so signatures still
  36568. * validate.
  36569. */
  36570. if (exts[i].bits !== undefined) {
  36571. der.writeBuffer(exts[i].bits,
  36572. asn1.Ber.BitString);
  36573. } else {
  36574. var bits = writeBitField(cert.purposes,
  36575. KEYUSEBITS);
  36576. der.writeBuffer(bits,
  36577. asn1.Ber.BitString);
  36578. }
  36579. der.endSequence();
  36580. } else {
  36581. der.writeBuffer(exts[i].data,
  36582. asn1.Ber.OctetString);
  36583. }
  36584. der.endSequence();
  36585. }
  36586. der.endSequence();
  36587. der.endSequence();
  36588. }
  36589. der.endSequence();
  36590. }
  36591. /*
  36592. * Reads an ASN.1 BER bitfield out of the Buffer produced by doing
  36593. * `BerReader#readString(asn1.Ber.BitString)`. That function gives us the raw
  36594. * contents of the BitString tag, which is a count of unused bits followed by
  36595. * the bits as a right-padded byte string.
  36596. *
  36597. * `bits` is the Buffer, `bitIndex` should contain an array of string names
  36598. * for the bits in the string, ordered starting with bit #0 in the ASN.1 spec.
  36599. *
  36600. * Returns an array of Strings, the names of the bits that were set to 1.
  36601. */
  36602. function readBitField(bits, bitIndex) {
  36603. var bitLen = 8 * (bits.length - 1) - bits[0];
  36604. var setBits = {};
  36605. for (var i = 0; i < bitLen; ++i) {
  36606. var byteN = 1 + Math.floor(i / 8);
  36607. var bit = 7 - (i % 8);
  36608. var mask = 1 << bit;
  36609. var bitVal = ((bits[byteN] & mask) !== 0);
  36610. var name = bitIndex[i];
  36611. if (bitVal && typeof (name) === 'string') {
  36612. setBits[name] = true;
  36613. }
  36614. }
  36615. return (Object.keys(setBits));
  36616. }
  36617. /*
  36618. * `setBits` is an array of strings, containing the names for each bit that
  36619. * sould be set to 1. `bitIndex` is same as in `readBitField()`.
  36620. *
  36621. * Returns a Buffer, ready to be written out with `BerWriter#writeString()`.
  36622. */
  36623. function writeBitField(setBits, bitIndex) {
  36624. var bitLen = bitIndex.length;
  36625. var blen = Math.ceil(bitLen / 8);
  36626. var unused = blen * 8 - bitLen;
  36627. var bits = new Buffer(1 + blen);
  36628. bits.fill(0);
  36629. bits[0] = unused;
  36630. for (var i = 0; i < bitLen; ++i) {
  36631. var byteN = 1 + Math.floor(i / 8);
  36632. var bit = 7 - (i % 8);
  36633. var mask = 1 << bit;
  36634. var name = bitIndex[i];
  36635. if (name === undefined)
  36636. continue;
  36637. var bitVal = (setBits.indexOf(name) !== -1);
  36638. if (bitVal) {
  36639. bits[byteN] |= mask;
  36640. }
  36641. }
  36642. return (bits);
  36643. }
  36644. /***/ }),
  36645. /* 353 */
  36646. /***/ (function(module, exports, __webpack_require__) {
  36647. /*
  36648. * extsprintf.js: extended POSIX-style sprintf
  36649. */
  36650. var mod_assert = __webpack_require__(83);
  36651. var mod_util = __webpack_require__(2);
  36652. /*
  36653. * Public interface
  36654. */
  36655. exports.sprintf = jsSprintf;
  36656. exports.printf = jsPrintf;
  36657. exports.fprintf = jsFprintf;
  36658. /*
  36659. * Stripped down version of s[n]printf(3c). We make a best effort to throw an
  36660. * exception when given a format string we don't understand, rather than
  36661. * ignoring it, so that we won't break existing programs if/when we go implement
  36662. * the rest of this.
  36663. *
  36664. * This implementation currently supports specifying
  36665. * - field alignment ('-' flag),
  36666. * - zero-pad ('0' flag)
  36667. * - always show numeric sign ('+' flag),
  36668. * - field width
  36669. * - conversions for strings, decimal integers, and floats (numbers).
  36670. * - argument size specifiers. These are all accepted but ignored, since
  36671. * Javascript has no notion of the physical size of an argument.
  36672. *
  36673. * Everything else is currently unsupported, most notably precision, unsigned
  36674. * numbers, non-decimal numbers, and characters.
  36675. */
  36676. function jsSprintf(fmt)
  36677. {
  36678. var regex = [
  36679. '([^%]*)', /* normal text */
  36680. '%', /* start of format */
  36681. '([\'\\-+ #0]*?)', /* flags (optional) */
  36682. '([1-9]\\d*)?', /* width (optional) */
  36683. '(\\.([1-9]\\d*))?', /* precision (optional) */
  36684. '[lhjztL]*?', /* length mods (ignored) */
  36685. '([diouxXfFeEgGaAcCsSp%jr])' /* conversion */
  36686. ].join('');
  36687. var re = new RegExp(regex);
  36688. var args = Array.prototype.slice.call(arguments, 1);
  36689. var flags, width, precision, conversion;
  36690. var left, pad, sign, arg, match;
  36691. var ret = '';
  36692. var argn = 1;
  36693. mod_assert.equal('string', typeof (fmt));
  36694. while ((match = re.exec(fmt)) !== null) {
  36695. ret += match[1];
  36696. fmt = fmt.substring(match[0].length);
  36697. flags = match[2] || '';
  36698. width = match[3] || 0;
  36699. precision = match[4] || '';
  36700. conversion = match[6];
  36701. left = false;
  36702. sign = false;
  36703. pad = ' ';
  36704. if (conversion == '%') {
  36705. ret += '%';
  36706. continue;
  36707. }
  36708. if (args.length === 0)
  36709. throw (new Error('too few args to sprintf'));
  36710. arg = args.shift();
  36711. argn++;
  36712. if (flags.match(/[\' #]/))
  36713. throw (new Error(
  36714. 'unsupported flags: ' + flags));
  36715. if (precision.length > 0)
  36716. throw (new Error(
  36717. 'non-zero precision not supported'));
  36718. if (flags.match(/-/))
  36719. left = true;
  36720. if (flags.match(/0/))
  36721. pad = '0';
  36722. if (flags.match(/\+/))
  36723. sign = true;
  36724. switch (conversion) {
  36725. case 's':
  36726. if (arg === undefined || arg === null)
  36727. throw (new Error('argument ' + argn +
  36728. ': attempted to print undefined or null ' +
  36729. 'as a string'));
  36730. ret += doPad(pad, width, left, arg.toString());
  36731. break;
  36732. case 'd':
  36733. arg = Math.floor(arg);
  36734. /*jsl:fallthru*/
  36735. case 'f':
  36736. sign = sign && arg > 0 ? '+' : '';
  36737. ret += sign + doPad(pad, width, left,
  36738. arg.toString());
  36739. break;
  36740. case 'x':
  36741. ret += doPad(pad, width, left, arg.toString(16));
  36742. break;
  36743. case 'j': /* non-standard */
  36744. if (width === 0)
  36745. width = 10;
  36746. ret += mod_util.inspect(arg, false, width);
  36747. break;
  36748. case 'r': /* non-standard */
  36749. ret += dumpException(arg);
  36750. break;
  36751. default:
  36752. throw (new Error('unsupported conversion: ' +
  36753. conversion));
  36754. }
  36755. }
  36756. ret += fmt;
  36757. return (ret);
  36758. }
  36759. function jsPrintf() {
  36760. var args = Array.prototype.slice.call(arguments);
  36761. args.unshift(process.stdout);
  36762. jsFprintf.apply(null, args);
  36763. }
  36764. function jsFprintf(stream) {
  36765. var args = Array.prototype.slice.call(arguments, 1);
  36766. return (stream.write(jsSprintf.apply(this, args)));
  36767. }
  36768. function doPad(chr, width, left, str)
  36769. {
  36770. var ret = str;
  36771. while (ret.length < width) {
  36772. if (left)
  36773. ret += chr;
  36774. else
  36775. ret = chr + ret;
  36776. }
  36777. return (ret);
  36778. }
  36779. /*
  36780. * This function dumps long stack traces for exceptions having a cause() method.
  36781. * See node-verror for an example.
  36782. */
  36783. function dumpException(ex)
  36784. {
  36785. var ret;
  36786. if (!(ex instanceof Error))
  36787. throw (new Error(jsSprintf('invalid type for %%r: %j', ex)));
  36788. /* Note that V8 prepends "ex.stack" with ex.toString(). */
  36789. ret = 'EXCEPTION: ' + ex.constructor.name + ': ' + ex.stack;
  36790. if (ex.cause && typeof (ex.cause) === 'function') {
  36791. var cex = ex.cause();
  36792. if (cex) {
  36793. ret += '\nCaused by: ' + dumpException(cex);
  36794. }
  36795. }
  36796. return (ret);
  36797. }
  36798. /***/ }),
  36799. /* 354 */
  36800. /***/ (function(module, exports) {
  36801. module.exports = require("tls");
  36802. /***/ }),
  36803. /* 355 */
  36804. /***/ (function(module, exports, __webpack_require__) {
  36805. var util = __webpack_require__(2);
  36806. var Stream = __webpack_require__(10).Stream;
  36807. var DelayedStream = __webpack_require__(561);
  36808. module.exports = CombinedStream;
  36809. function CombinedStream() {
  36810. this.writable = false;
  36811. this.readable = true;
  36812. this.dataSize = 0;
  36813. this.maxDataSize = 2 * 1024 * 1024;
  36814. this.pauseStreams = true;
  36815. this._released = false;
  36816. this._streams = [];
  36817. this._currentStream = null;
  36818. }
  36819. util.inherits(CombinedStream, Stream);
  36820. CombinedStream.create = function(options) {
  36821. var combinedStream = new this();
  36822. options = options || {};
  36823. for (var option in options) {
  36824. combinedStream[option] = options[option];
  36825. }
  36826. return combinedStream;
  36827. };
  36828. CombinedStream.isStreamLike = function(stream) {
  36829. return (typeof stream !== 'function')
  36830. && (typeof stream !== 'string')
  36831. && (typeof stream !== 'boolean')
  36832. && (typeof stream !== 'number')
  36833. && (!Buffer.isBuffer(stream));
  36834. };
  36835. CombinedStream.prototype.append = function(stream) {
  36836. var isStreamLike = CombinedStream.isStreamLike(stream);
  36837. if (isStreamLike) {
  36838. if (!(stream instanceof DelayedStream)) {
  36839. var newStream = DelayedStream.create(stream, {
  36840. maxDataSize: Infinity,
  36841. pauseStream: this.pauseStreams,
  36842. });
  36843. stream.on('data', this._checkDataSize.bind(this));
  36844. stream = newStream;
  36845. }
  36846. this._handleErrors(stream);
  36847. if (this.pauseStreams) {
  36848. stream.pause();
  36849. }
  36850. }
  36851. this._streams.push(stream);
  36852. return this;
  36853. };
  36854. CombinedStream.prototype.pipe = function(dest, options) {
  36855. Stream.prototype.pipe.call(this, dest, options);
  36856. this.resume();
  36857. return dest;
  36858. };
  36859. CombinedStream.prototype._getNext = function() {
  36860. this._currentStream = null;
  36861. var stream = this._streams.shift();
  36862. if (typeof stream == 'undefined') {
  36863. this.end();
  36864. return;
  36865. }
  36866. if (typeof stream !== 'function') {
  36867. this._pipeNext(stream);
  36868. return;
  36869. }
  36870. var getStream = stream;
  36871. getStream(function(stream) {
  36872. var isStreamLike = CombinedStream.isStreamLike(stream);
  36873. if (isStreamLike) {
  36874. stream.on('data', this._checkDataSize.bind(this));
  36875. this._handleErrors(stream);
  36876. }
  36877. this._pipeNext(stream);
  36878. }.bind(this));
  36879. };
  36880. CombinedStream.prototype._pipeNext = function(stream) {
  36881. this._currentStream = stream;
  36882. var isStreamLike = CombinedStream.isStreamLike(stream);
  36883. if (isStreamLike) {
  36884. stream.on('end', this._getNext.bind(this));
  36885. stream.pipe(this, {end: false});
  36886. return;
  36887. }
  36888. var value = stream;
  36889. this.write(value);
  36890. this._getNext();
  36891. };
  36892. CombinedStream.prototype._handleErrors = function(stream) {
  36893. var self = this;
  36894. stream.on('error', function(err) {
  36895. self._emitError(err);
  36896. });
  36897. };
  36898. CombinedStream.prototype.write = function(data) {
  36899. this.emit('data', data);
  36900. };
  36901. CombinedStream.prototype.pause = function() {
  36902. if (!this.pauseStreams) {
  36903. return;
  36904. }
  36905. if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause();
  36906. this.emit('pause');
  36907. };
  36908. CombinedStream.prototype.resume = function() {
  36909. if (!this._released) {
  36910. this._released = true;
  36911. this.writable = true;
  36912. this._getNext();
  36913. }
  36914. if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume();
  36915. this.emit('resume');
  36916. };
  36917. CombinedStream.prototype.end = function() {
  36918. this._reset();
  36919. this.emit('end');
  36920. };
  36921. CombinedStream.prototype.destroy = function() {
  36922. this._reset();
  36923. this.emit('close');
  36924. };
  36925. CombinedStream.prototype._reset = function() {
  36926. this.writable = false;
  36927. this._streams = [];
  36928. this._currentStream = null;
  36929. };
  36930. CombinedStream.prototype._checkDataSize = function() {
  36931. this._updateDataSize();
  36932. if (this.dataSize <= this.maxDataSize) {
  36933. return;
  36934. }
  36935. var message =
  36936. 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.';
  36937. this._emitError(new Error(message));
  36938. };
  36939. CombinedStream.prototype._updateDataSize = function() {
  36940. this.dataSize = 0;
  36941. var self = this;
  36942. this._streams.forEach(function(stream) {
  36943. if (!stream.dataSize) {
  36944. return;
  36945. }
  36946. self.dataSize += stream.dataSize;
  36947. });
  36948. if (this._currentStream && this._currentStream.dataSize) {
  36949. this.dataSize += this._currentStream.dataSize;
  36950. }
  36951. };
  36952. CombinedStream.prototype._emitError = function(err) {
  36953. this._reset();
  36954. this.emit('error', err);
  36955. };
  36956. /***/ }),
  36957. /* 356 */
  36958. /***/ (function(module, exports, __webpack_require__) {
  36959. var async = __webpack_require__(357)
  36960. , abort = __webpack_require__(358)
  36961. ;
  36962. // API
  36963. module.exports = iterate;
  36964. /**
  36965. * Iterates over each job object
  36966. *
  36967. * @param {array|object} list - array or object (named list) to iterate over
  36968. * @param {function} iterator - iterator to run
  36969. * @param {object} state - current job status
  36970. * @param {function} callback - invoked when all elements processed
  36971. */
  36972. function iterate(list, iterator, state, callback)
  36973. {
  36974. // store current index
  36975. var key = state['keyedList'] ? state['keyedList'][state.index] : state.index;
  36976. state.jobs[key] = runJob(iterator, key, list[key], function(error, output)
  36977. {
  36978. // don't repeat yourself
  36979. // skip secondary callbacks
  36980. if (!(key in state.jobs))
  36981. {
  36982. return;
  36983. }
  36984. // clean up jobs
  36985. delete state.jobs[key];
  36986. if (error)
  36987. {
  36988. // don't process rest of the results
  36989. // stop still active jobs
  36990. // and reset the list
  36991. abort(state);
  36992. }
  36993. else
  36994. {
  36995. state.results[key] = output;
  36996. }
  36997. // return salvaged results
  36998. callback(error, state.results);
  36999. });
  37000. }
  37001. /**
  37002. * Runs iterator over provided job element
  37003. *
  37004. * @param {function} iterator - iterator to invoke
  37005. * @param {string|number} key - key/index of the element in the list of jobs
  37006. * @param {mixed} item - job description
  37007. * @param {function} callback - invoked after iterator is done with the job
  37008. * @returns {function|mixed} - job abort function or something else
  37009. */
  37010. function runJob(iterator, key, item, callback)
  37011. {
  37012. var aborter;
  37013. // allow shortcut if iterator expects only two arguments
  37014. if (iterator.length == 2)
  37015. {
  37016. aborter = iterator(item, async(callback));
  37017. }
  37018. // otherwise go with full three arguments
  37019. else
  37020. {
  37021. aborter = iterator(item, key, async(callback));
  37022. }
  37023. return aborter;
  37024. }
  37025. /***/ }),
  37026. /* 357 */
  37027. /***/ (function(module, exports, __webpack_require__) {
  37028. var defer = __webpack_require__(564);
  37029. // API
  37030. module.exports = async;
  37031. /**
  37032. * Runs provided callback asynchronously
  37033. * even if callback itself is not
  37034. *
  37035. * @param {function} callback - callback to invoke
  37036. * @returns {function} - augmented callback
  37037. */
  37038. function async(callback)
  37039. {
  37040. var isAsync = false;
  37041. // check if async happened
  37042. defer(function() { isAsync = true; });
  37043. return function async_callback(err, result)
  37044. {
  37045. if (isAsync)
  37046. {
  37047. callback(err, result);
  37048. }
  37049. else
  37050. {
  37051. defer(function nextTick_callback()
  37052. {
  37053. callback(err, result);
  37054. });
  37055. }
  37056. };
  37057. }
  37058. /***/ }),
  37059. /* 358 */
  37060. /***/ (function(module, exports) {
  37061. // API
  37062. module.exports = abort;
  37063. /**
  37064. * Aborts leftover active jobs
  37065. *
  37066. * @param {object} state - current state object
  37067. */
  37068. function abort(state)
  37069. {
  37070. Object.keys(state.jobs).forEach(clean.bind(state));
  37071. // reset leftover jobs
  37072. state.jobs = {};
  37073. }
  37074. /**
  37075. * Cleans up leftover job by invoking abort function for the provided job id
  37076. *
  37077. * @this state
  37078. * @param {string|number} key - job id to abort
  37079. */
  37080. function clean(key)
  37081. {
  37082. if (typeof this.jobs[key] == 'function')
  37083. {
  37084. this.jobs[key]();
  37085. }
  37086. }
  37087. /***/ }),
  37088. /* 359 */
  37089. /***/ (function(module, exports) {
  37090. // API
  37091. module.exports = state;
  37092. /**
  37093. * Creates initial state object
  37094. * for iteration over list
  37095. *
  37096. * @param {array|object} list - list to iterate over
  37097. * @param {function|null} sortMethod - function to use for keys sort,
  37098. * or `null` to keep them as is
  37099. * @returns {object} - initial state object
  37100. */
  37101. function state(list, sortMethod)
  37102. {
  37103. var isNamedList = !Array.isArray(list)
  37104. , initState =
  37105. {
  37106. index : 0,
  37107. keyedList: isNamedList || sortMethod ? Object.keys(list) : null,
  37108. jobs : {},
  37109. results : isNamedList ? {} : [],
  37110. size : isNamedList ? Object.keys(list).length : list.length
  37111. }
  37112. ;
  37113. if (sortMethod)
  37114. {
  37115. // sort array keys based on it's values
  37116. // sort object's keys just on own merit
  37117. initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)
  37118. {
  37119. return sortMethod(list[a], list[b]);
  37120. });
  37121. }
  37122. return initState;
  37123. }
  37124. /***/ }),
  37125. /* 360 */
  37126. /***/ (function(module, exports, __webpack_require__) {
  37127. var abort = __webpack_require__(358)
  37128. , async = __webpack_require__(357)
  37129. ;
  37130. // API
  37131. module.exports = terminator;
  37132. /**
  37133. * Terminates jobs in the attached state context
  37134. *
  37135. * @this AsyncKitState#
  37136. * @param {function} callback - final callback to invoke after termination
  37137. */
  37138. function terminator(callback)
  37139. {
  37140. if (!Object.keys(this.jobs).length)
  37141. {
  37142. return;
  37143. }
  37144. // fast forward iteration index
  37145. this.index = this.size;
  37146. // abort jobs
  37147. abort(this);
  37148. // send back results we have so far
  37149. async(callback)(null, this.results);
  37150. }
  37151. /***/ }),
  37152. /* 361 */
  37153. /***/ (function(module, exports, __webpack_require__) {
  37154. var iterate = __webpack_require__(356)
  37155. , initState = __webpack_require__(359)
  37156. , terminator = __webpack_require__(360)
  37157. ;
  37158. // Public API
  37159. module.exports = serialOrdered;
  37160. // sorting helpers
  37161. module.exports.ascending = ascending;
  37162. module.exports.descending = descending;
  37163. /**
  37164. * Runs iterator over provided sorted array elements in series
  37165. *
  37166. * @param {array|object} list - array or object (named list) to iterate over
  37167. * @param {function} iterator - iterator to run
  37168. * @param {function} sortMethod - custom sort function
  37169. * @param {function} callback - invoked when all elements processed
  37170. * @returns {function} - jobs terminator
  37171. */
  37172. function serialOrdered(list, iterator, sortMethod, callback)
  37173. {
  37174. var state = initState(list, sortMethod);
  37175. iterate(list, iterator, state, function iteratorHandler(error, result)
  37176. {
  37177. if (error)
  37178. {
  37179. callback(error, result);
  37180. return;
  37181. }
  37182. state.index++;
  37183. // are we there yet?
  37184. if (state.index < (state['keyedList'] || list).length)
  37185. {
  37186. iterate(list, iterator, state, iteratorHandler);
  37187. return;
  37188. }
  37189. // done here
  37190. callback(null, state.results);
  37191. });
  37192. return terminator.bind(state, callback);
  37193. }
  37194. /*
  37195. * -- Sort methods
  37196. */
  37197. /**
  37198. * sort helper to sort array elements in ascending order
  37199. *
  37200. * @param {mixed} a - an item to compare
  37201. * @param {mixed} b - an item to compare
  37202. * @returns {number} - comparison result
  37203. */
  37204. function ascending(a, b)
  37205. {
  37206. return a < b ? -1 : a > b ? 1 : 0;
  37207. }
  37208. /**
  37209. * sort helper to sort array elements in descending order
  37210. *
  37211. * @param {mixed} a - an item to compare
  37212. * @param {mixed} b - an item to compare
  37213. * @returns {number} - comparison result
  37214. */
  37215. function descending(a, b)
  37216. {
  37217. return -1 * ascending(a, b);
  37218. }
  37219. /***/ }),
  37220. /* 362 */
  37221. /***/ (function(module, exports, __webpack_require__) {
  37222. var stream = __webpack_require__(10)
  37223. function isStream (obj) {
  37224. return obj instanceof stream.Stream
  37225. }
  37226. function isReadable (obj) {
  37227. return isStream(obj) && typeof obj._read == 'function' && typeof obj._readableState == 'object'
  37228. }
  37229. function isWritable (obj) {
  37230. return isStream(obj) && typeof obj._write == 'function' && typeof obj._writableState == 'object'
  37231. }
  37232. function isDuplex (obj) {
  37233. return isReadable(obj) && isWritable(obj)
  37234. }
  37235. module.exports = isStream
  37236. module.exports.isReadable = isReadable
  37237. module.exports.isWritable = isWritable
  37238. module.exports.isDuplex = isDuplex
  37239. /***/ }),
  37240. /* 363 */
  37241. /***/ (function(module, exports, __webpack_require__) {
  37242. "use strict";
  37243. var stringify = __webpack_require__(570);
  37244. var parse = __webpack_require__(571);
  37245. var formats = __webpack_require__(365);
  37246. module.exports = {
  37247. formats: formats,
  37248. parse: parse,
  37249. stringify: stringify
  37250. };
  37251. /***/ }),
  37252. /* 364 */
  37253. /***/ (function(module, exports, __webpack_require__) {
  37254. "use strict";
  37255. var has = Object.prototype.hasOwnProperty;
  37256. var hexTable = (function () {
  37257. var array = [];
  37258. for (var i = 0; i < 256; ++i) {
  37259. array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
  37260. }
  37261. return array;
  37262. }());
  37263. var compactQueue = function compactQueue(queue) {
  37264. var obj;
  37265. while (queue.length) {
  37266. var item = queue.pop();
  37267. obj = item.obj[item.prop];
  37268. if (Array.isArray(obj)) {
  37269. var compacted = [];
  37270. for (var j = 0; j < obj.length; ++j) {
  37271. if (typeof obj[j] !== 'undefined') {
  37272. compacted.push(obj[j]);
  37273. }
  37274. }
  37275. item.obj[item.prop] = compacted;
  37276. }
  37277. }
  37278. return obj;
  37279. };
  37280. exports.arrayToObject = function arrayToObject(source, options) {
  37281. var obj = options && options.plainObjects ? Object.create(null) : {};
  37282. for (var i = 0; i < source.length; ++i) {
  37283. if (typeof source[i] !== 'undefined') {
  37284. obj[i] = source[i];
  37285. }
  37286. }
  37287. return obj;
  37288. };
  37289. exports.merge = function merge(target, source, options) {
  37290. if (!source) {
  37291. return target;
  37292. }
  37293. if (typeof source !== 'object') {
  37294. if (Array.isArray(target)) {
  37295. target.push(source);
  37296. } else if (typeof target === 'object') {
  37297. if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) {
  37298. target[source] = true;
  37299. }
  37300. } else {
  37301. return [target, source];
  37302. }
  37303. return target;
  37304. }
  37305. if (typeof target !== 'object') {
  37306. return [target].concat(source);
  37307. }
  37308. var mergeTarget = target;
  37309. if (Array.isArray(target) && !Array.isArray(source)) {
  37310. mergeTarget = exports.arrayToObject(target, options);
  37311. }
  37312. if (Array.isArray(target) && Array.isArray(source)) {
  37313. source.forEach(function (item, i) {
  37314. if (has.call(target, i)) {
  37315. if (target[i] && typeof target[i] === 'object') {
  37316. target[i] = exports.merge(target[i], item, options);
  37317. } else {
  37318. target.push(item);
  37319. }
  37320. } else {
  37321. target[i] = item;
  37322. }
  37323. });
  37324. return target;
  37325. }
  37326. return Object.keys(source).reduce(function (acc, key) {
  37327. var value = source[key];
  37328. if (has.call(acc, key)) {
  37329. acc[key] = exports.merge(acc[key], value, options);
  37330. } else {
  37331. acc[key] = value;
  37332. }
  37333. return acc;
  37334. }, mergeTarget);
  37335. };
  37336. exports.assign = function assignSingleSource(target, source) {
  37337. return Object.keys(source).reduce(function (acc, key) {
  37338. acc[key] = source[key];
  37339. return acc;
  37340. }, target);
  37341. };
  37342. exports.decode = function (str) {
  37343. try {
  37344. return decodeURIComponent(str.replace(/\+/g, ' '));
  37345. } catch (e) {
  37346. return str;
  37347. }
  37348. };
  37349. exports.encode = function encode(str) {
  37350. // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
  37351. // It has been adapted here for stricter adherence to RFC 3986
  37352. if (str.length === 0) {
  37353. return str;
  37354. }
  37355. var string = typeof str === 'string' ? str : String(str);
  37356. var out = '';
  37357. for (var i = 0; i < string.length; ++i) {
  37358. var c = string.charCodeAt(i);
  37359. if (
  37360. c === 0x2D // -
  37361. || c === 0x2E // .
  37362. || c === 0x5F // _
  37363. || c === 0x7E // ~
  37364. || (c >= 0x30 && c <= 0x39) // 0-9
  37365. || (c >= 0x41 && c <= 0x5A) // a-z
  37366. || (c >= 0x61 && c <= 0x7A) // A-Z
  37367. ) {
  37368. out += string.charAt(i);
  37369. continue;
  37370. }
  37371. if (c < 0x80) {
  37372. out = out + hexTable[c];
  37373. continue;
  37374. }
  37375. if (c < 0x800) {
  37376. out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
  37377. continue;
  37378. }
  37379. if (c < 0xD800 || c >= 0xE000) {
  37380. out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
  37381. continue;
  37382. }
  37383. i += 1;
  37384. c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
  37385. out += hexTable[0xF0 | (c >> 18)]
  37386. + hexTable[0x80 | ((c >> 12) & 0x3F)]
  37387. + hexTable[0x80 | ((c >> 6) & 0x3F)]
  37388. + hexTable[0x80 | (c & 0x3F)];
  37389. }
  37390. return out;
  37391. };
  37392. exports.compact = function compact(value) {
  37393. var queue = [{ obj: { o: value }, prop: 'o' }];
  37394. var refs = [];
  37395. for (var i = 0; i < queue.length; ++i) {
  37396. var item = queue[i];
  37397. var obj = item.obj[item.prop];
  37398. var keys = Object.keys(obj);
  37399. for (var j = 0; j < keys.length; ++j) {
  37400. var key = keys[j];
  37401. var val = obj[key];
  37402. if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
  37403. queue.push({ obj: obj, prop: key });
  37404. refs.push(val);
  37405. }
  37406. }
  37407. }
  37408. return compactQueue(queue);
  37409. };
  37410. exports.isRegExp = function isRegExp(obj) {
  37411. return Object.prototype.toString.call(obj) === '[object RegExp]';
  37412. };
  37413. exports.isBuffer = function isBuffer(obj) {
  37414. if (obj === null || typeof obj === 'undefined') {
  37415. return false;
  37416. }
  37417. return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
  37418. };
  37419. /***/ }),
  37420. /* 365 */
  37421. /***/ (function(module, exports, __webpack_require__) {
  37422. "use strict";
  37423. var replace = String.prototype.replace;
  37424. var percentTwenties = /%20/g;
  37425. module.exports = {
  37426. 'default': 'RFC3986',
  37427. formatters: {
  37428. RFC1738: function (value) {
  37429. return replace.call(value, percentTwenties, '+');
  37430. },
  37431. RFC3986: function (value) {
  37432. return value;
  37433. }
  37434. },
  37435. RFC1738: 'RFC1738',
  37436. RFC3986: 'RFC3986'
  37437. };
  37438. /***/ }),
  37439. /* 366 */
  37440. /***/ (function(module, exports, __webpack_require__) {
  37441. "use strict";
  37442. var util = __webpack_require__(62);
  37443. module.exports = SchemaObject;
  37444. function SchemaObject(obj) {
  37445. util.copy(obj, this);
  37446. }
  37447. /***/ }),
  37448. /* 367 */
  37449. /***/ (function(module, exports, __webpack_require__) {
  37450. "use strict";
  37451. module.exports = function (data, opts) {
  37452. if (!opts) opts = {};
  37453. if (typeof opts === 'function') opts = { cmp: opts };
  37454. var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;
  37455. var cmp = opts.cmp && (function (f) {
  37456. return function (node) {
  37457. return function (a, b) {
  37458. var aobj = { key: a, value: node[a] };
  37459. var bobj = { key: b, value: node[b] };
  37460. return f(aobj, bobj);
  37461. };
  37462. };
  37463. })(opts.cmp);
  37464. var seen = [];
  37465. return (function stringify (node) {
  37466. if (node && node.toJSON && typeof node.toJSON === 'function') {
  37467. node = node.toJSON();
  37468. }
  37469. if (node === undefined) return;
  37470. if (typeof node == 'number') return isFinite(node) ? '' + node : 'null';
  37471. if (typeof node !== 'object') return JSON.stringify(node);
  37472. var i, out;
  37473. if (Array.isArray(node)) {
  37474. out = '[';
  37475. for (i = 0; i < node.length; i++) {
  37476. if (i) out += ',';
  37477. out += stringify(node[i]) || 'null';
  37478. }
  37479. return out + ']';
  37480. }
  37481. if (node === null) return 'null';
  37482. if (seen.indexOf(node) !== -1) {
  37483. if (cycles) return JSON.stringify('__cycle__');
  37484. throw new TypeError('Converting circular structure to JSON');
  37485. }
  37486. var seenIndex = seen.push(node) - 1;
  37487. var keys = Object.keys(node).sort(cmp && cmp(node));
  37488. out = '';
  37489. for (i = 0; i < keys.length; i++) {
  37490. var key = keys[i];
  37491. var value = stringify(node[key]);
  37492. if (!value) continue;
  37493. if (out) out += ',';
  37494. out += JSON.stringify(key) + ':' + value;
  37495. }
  37496. seen.splice(seenIndex, 1);
  37497. return '{' + out + '}';
  37498. })(data);
  37499. };
  37500. /***/ }),
  37501. /* 368 */
  37502. /***/ (function(module, exports, __webpack_require__) {
  37503. "use strict";
  37504. module.exports = function generate_validate(it, $keyword, $ruleType) {
  37505. var out = '';
  37506. var $async = it.schema.$async === true,
  37507. $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'),
  37508. $id = it.self._getId(it.schema);
  37509. if (it.isTop) {
  37510. if ($async) {
  37511. it.async = true;
  37512. var $es7 = it.opts.async == 'es7';
  37513. it.yieldAwait = $es7 ? 'await' : 'yield';
  37514. }
  37515. out += ' var validate = ';
  37516. if ($async) {
  37517. if ($es7) {
  37518. out += ' (async function ';
  37519. } else {
  37520. if (it.opts.async != '*') {
  37521. out += 'co.wrap';
  37522. }
  37523. out += '(function* ';
  37524. }
  37525. } else {
  37526. out += ' (function ';
  37527. }
  37528. out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; ';
  37529. if ($id && (it.opts.sourceCode || it.opts.processCode)) {
  37530. out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' ';
  37531. }
  37532. }
  37533. if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) {
  37534. var $keyword = 'false schema';
  37535. var $lvl = it.level;
  37536. var $dataLvl = it.dataLevel;
  37537. var $schema = it.schema[$keyword];
  37538. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  37539. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  37540. var $breakOnError = !it.opts.allErrors;
  37541. var $errorKeyword;
  37542. var $data = 'data' + ($dataLvl || '');
  37543. var $valid = 'valid' + $lvl;
  37544. if (it.schema === false) {
  37545. if (it.isTop) {
  37546. $breakOnError = true;
  37547. } else {
  37548. out += ' var ' + ($valid) + ' = false; ';
  37549. }
  37550. var $$outStack = $$outStack || [];
  37551. $$outStack.push(out);
  37552. out = ''; /* istanbul ignore else */
  37553. if (it.createErrors !== false) {
  37554. out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
  37555. if (it.opts.messages !== false) {
  37556. out += ' , message: \'boolean schema is false\' ';
  37557. }
  37558. if (it.opts.verbose) {
  37559. out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  37560. }
  37561. out += ' } ';
  37562. } else {
  37563. out += ' {} ';
  37564. }
  37565. var __err = out;
  37566. out = $$outStack.pop();
  37567. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  37568. if (it.async) {
  37569. out += ' throw new ValidationError([' + (__err) + ']); ';
  37570. } else {
  37571. out += ' validate.errors = [' + (__err) + ']; return false; ';
  37572. }
  37573. } else {
  37574. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  37575. }
  37576. } else {
  37577. if (it.isTop) {
  37578. if ($async) {
  37579. out += ' return data; ';
  37580. } else {
  37581. out += ' validate.errors = null; return true; ';
  37582. }
  37583. } else {
  37584. out += ' var ' + ($valid) + ' = true; ';
  37585. }
  37586. }
  37587. if (it.isTop) {
  37588. out += ' }); return validate; ';
  37589. }
  37590. return out;
  37591. }
  37592. if (it.isTop) {
  37593. var $top = it.isTop,
  37594. $lvl = it.level = 0,
  37595. $dataLvl = it.dataLevel = 0,
  37596. $data = 'data';
  37597. it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema));
  37598. it.baseId = it.baseId || it.rootId;
  37599. delete it.isTop;
  37600. it.dataPathArr = [undefined];
  37601. out += ' var vErrors = null; ';
  37602. out += ' var errors = 0; ';
  37603. out += ' if (rootData === undefined) rootData = data; ';
  37604. } else {
  37605. var $lvl = it.level,
  37606. $dataLvl = it.dataLevel,
  37607. $data = 'data' + ($dataLvl || '');
  37608. if ($id) it.baseId = it.resolve.url(it.baseId, $id);
  37609. if ($async && !it.async) throw new Error('async schema in sync schema');
  37610. out += ' var errs_' + ($lvl) + ' = errors;';
  37611. }
  37612. var $valid = 'valid' + $lvl,
  37613. $breakOnError = !it.opts.allErrors,
  37614. $closingBraces1 = '',
  37615. $closingBraces2 = '';
  37616. var $errorKeyword;
  37617. var $typeSchema = it.schema.type,
  37618. $typeIsArray = Array.isArray($typeSchema);
  37619. if ($typeIsArray && $typeSchema.length == 1) {
  37620. $typeSchema = $typeSchema[0];
  37621. $typeIsArray = false;
  37622. }
  37623. if (it.schema.$ref && $refKeywords) {
  37624. if (it.opts.extendRefs == 'fail') {
  37625. throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)');
  37626. } else if (it.opts.extendRefs !== true) {
  37627. $refKeywords = false;
  37628. it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"');
  37629. }
  37630. }
  37631. if ($typeSchema) {
  37632. if (it.opts.coerceTypes) {
  37633. var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema);
  37634. }
  37635. var $rulesGroup = it.RULES.types[$typeSchema];
  37636. if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) {
  37637. var $schemaPath = it.schemaPath + '.type',
  37638. $errSchemaPath = it.errSchemaPath + '/type';
  37639. var $schemaPath = it.schemaPath + '.type',
  37640. $errSchemaPath = it.errSchemaPath + '/type',
  37641. $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
  37642. out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { ';
  37643. if ($coerceToTypes) {
  37644. var $dataType = 'dataType' + $lvl,
  37645. $coerced = 'coerced' + $lvl;
  37646. out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; ';
  37647. if (it.opts.coerceTypes == 'array') {
  37648. out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; ';
  37649. }
  37650. out += ' var ' + ($coerced) + ' = undefined; ';
  37651. var $bracesCoercion = '';
  37652. var arr1 = $coerceToTypes;
  37653. if (arr1) {
  37654. var $type, $i = -1,
  37655. l1 = arr1.length - 1;
  37656. while ($i < l1) {
  37657. $type = arr1[$i += 1];
  37658. if ($i) {
  37659. out += ' if (' + ($coerced) + ' === undefined) { ';
  37660. $bracesCoercion += '}';
  37661. }
  37662. if (it.opts.coerceTypes == 'array' && $type != 'array') {
  37663. out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } ';
  37664. }
  37665. if ($type == 'string') {
  37666. out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; ';
  37667. } else if ($type == 'number' || $type == 'integer') {
  37668. out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' ';
  37669. if ($type == 'integer') {
  37670. out += ' && !(' + ($data) + ' % 1)';
  37671. }
  37672. out += ')) ' + ($coerced) + ' = +' + ($data) + '; ';
  37673. } else if ($type == 'boolean') {
  37674. out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; ';
  37675. } else if ($type == 'null') {
  37676. out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; ';
  37677. } else if (it.opts.coerceTypes == 'array' && $type == 'array') {
  37678. out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; ';
  37679. }
  37680. }
  37681. }
  37682. out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { ';
  37683. var $$outStack = $$outStack || [];
  37684. $$outStack.push(out);
  37685. out = ''; /* istanbul ignore else */
  37686. if (it.createErrors !== false) {
  37687. out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
  37688. if ($typeIsArray) {
  37689. out += '' + ($typeSchema.join(","));
  37690. } else {
  37691. out += '' + ($typeSchema);
  37692. }
  37693. out += '\' } ';
  37694. if (it.opts.messages !== false) {
  37695. out += ' , message: \'should be ';
  37696. if ($typeIsArray) {
  37697. out += '' + ($typeSchema.join(","));
  37698. } else {
  37699. out += '' + ($typeSchema);
  37700. }
  37701. out += '\' ';
  37702. }
  37703. if (it.opts.verbose) {
  37704. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  37705. }
  37706. out += ' } ';
  37707. } else {
  37708. out += ' {} ';
  37709. }
  37710. var __err = out;
  37711. out = $$outStack.pop();
  37712. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  37713. if (it.async) {
  37714. out += ' throw new ValidationError([' + (__err) + ']); ';
  37715. } else {
  37716. out += ' validate.errors = [' + (__err) + ']; return false; ';
  37717. }
  37718. } else {
  37719. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  37720. }
  37721. out += ' } else { ';
  37722. var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
  37723. $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
  37724. out += ' ' + ($data) + ' = ' + ($coerced) + '; ';
  37725. if (!$dataLvl) {
  37726. out += 'if (' + ($parentData) + ' !== undefined)';
  37727. }
  37728. out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } ';
  37729. } else {
  37730. var $$outStack = $$outStack || [];
  37731. $$outStack.push(out);
  37732. out = ''; /* istanbul ignore else */
  37733. if (it.createErrors !== false) {
  37734. out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
  37735. if ($typeIsArray) {
  37736. out += '' + ($typeSchema.join(","));
  37737. } else {
  37738. out += '' + ($typeSchema);
  37739. }
  37740. out += '\' } ';
  37741. if (it.opts.messages !== false) {
  37742. out += ' , message: \'should be ';
  37743. if ($typeIsArray) {
  37744. out += '' + ($typeSchema.join(","));
  37745. } else {
  37746. out += '' + ($typeSchema);
  37747. }
  37748. out += '\' ';
  37749. }
  37750. if (it.opts.verbose) {
  37751. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  37752. }
  37753. out += ' } ';
  37754. } else {
  37755. out += ' {} ';
  37756. }
  37757. var __err = out;
  37758. out = $$outStack.pop();
  37759. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  37760. if (it.async) {
  37761. out += ' throw new ValidationError([' + (__err) + ']); ';
  37762. } else {
  37763. out += ' validate.errors = [' + (__err) + ']; return false; ';
  37764. }
  37765. } else {
  37766. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  37767. }
  37768. }
  37769. out += ' } ';
  37770. }
  37771. }
  37772. if (it.schema.$ref && !$refKeywords) {
  37773. out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' ';
  37774. if ($breakOnError) {
  37775. out += ' } if (errors === ';
  37776. if ($top) {
  37777. out += '0';
  37778. } else {
  37779. out += 'errs_' + ($lvl);
  37780. }
  37781. out += ') { ';
  37782. $closingBraces2 += '}';
  37783. }
  37784. } else {
  37785. if (it.opts.v5 && it.schema.patternGroups) {
  37786. it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.');
  37787. }
  37788. var arr2 = it.RULES;
  37789. if (arr2) {
  37790. var $rulesGroup, i2 = -1,
  37791. l2 = arr2.length - 1;
  37792. while (i2 < l2) {
  37793. $rulesGroup = arr2[i2 += 1];
  37794. if ($shouldUseGroup($rulesGroup)) {
  37795. if ($rulesGroup.type) {
  37796. out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { ';
  37797. }
  37798. if (it.opts.useDefaults && !it.compositeRule) {
  37799. if ($rulesGroup.type == 'object' && it.schema.properties) {
  37800. var $schema = it.schema.properties,
  37801. $schemaKeys = Object.keys($schema);
  37802. var arr3 = $schemaKeys;
  37803. if (arr3) {
  37804. var $propertyKey, i3 = -1,
  37805. l3 = arr3.length - 1;
  37806. while (i3 < l3) {
  37807. $propertyKey = arr3[i3 += 1];
  37808. var $sch = $schema[$propertyKey];
  37809. if ($sch.default !== undefined) {
  37810. var $passData = $data + it.util.getProperty($propertyKey);
  37811. out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';
  37812. if (it.opts.useDefaults == 'shared') {
  37813. out += ' ' + (it.useDefault($sch.default)) + ' ';
  37814. } else {
  37815. out += ' ' + (JSON.stringify($sch.default)) + ' ';
  37816. }
  37817. out += '; ';
  37818. }
  37819. }
  37820. }
  37821. } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) {
  37822. var arr4 = it.schema.items;
  37823. if (arr4) {
  37824. var $sch, $i = -1,
  37825. l4 = arr4.length - 1;
  37826. while ($i < l4) {
  37827. $sch = arr4[$i += 1];
  37828. if ($sch.default !== undefined) {
  37829. var $passData = $data + '[' + $i + ']';
  37830. out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = ';
  37831. if (it.opts.useDefaults == 'shared') {
  37832. out += ' ' + (it.useDefault($sch.default)) + ' ';
  37833. } else {
  37834. out += ' ' + (JSON.stringify($sch.default)) + ' ';
  37835. }
  37836. out += '; ';
  37837. }
  37838. }
  37839. }
  37840. }
  37841. }
  37842. var arr5 = $rulesGroup.rules;
  37843. if (arr5) {
  37844. var $rule, i5 = -1,
  37845. l5 = arr5.length - 1;
  37846. while (i5 < l5) {
  37847. $rule = arr5[i5 += 1];
  37848. if ($shouldUseRule($rule)) {
  37849. var $code = $rule.code(it, $rule.keyword, $rulesGroup.type);
  37850. if ($code) {
  37851. out += ' ' + ($code) + ' ';
  37852. if ($breakOnError) {
  37853. $closingBraces1 += '}';
  37854. }
  37855. }
  37856. }
  37857. }
  37858. }
  37859. if ($breakOnError) {
  37860. out += ' ' + ($closingBraces1) + ' ';
  37861. $closingBraces1 = '';
  37862. }
  37863. if ($rulesGroup.type) {
  37864. out += ' } ';
  37865. if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) {
  37866. out += ' else { ';
  37867. var $schemaPath = it.schemaPath + '.type',
  37868. $errSchemaPath = it.errSchemaPath + '/type';
  37869. var $$outStack = $$outStack || [];
  37870. $$outStack.push(out);
  37871. out = ''; /* istanbul ignore else */
  37872. if (it.createErrors !== false) {
  37873. out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \'';
  37874. if ($typeIsArray) {
  37875. out += '' + ($typeSchema.join(","));
  37876. } else {
  37877. out += '' + ($typeSchema);
  37878. }
  37879. out += '\' } ';
  37880. if (it.opts.messages !== false) {
  37881. out += ' , message: \'should be ';
  37882. if ($typeIsArray) {
  37883. out += '' + ($typeSchema.join(","));
  37884. } else {
  37885. out += '' + ($typeSchema);
  37886. }
  37887. out += '\' ';
  37888. }
  37889. if (it.opts.verbose) {
  37890. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  37891. }
  37892. out += ' } ';
  37893. } else {
  37894. out += ' {} ';
  37895. }
  37896. var __err = out;
  37897. out = $$outStack.pop();
  37898. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  37899. if (it.async) {
  37900. out += ' throw new ValidationError([' + (__err) + ']); ';
  37901. } else {
  37902. out += ' validate.errors = [' + (__err) + ']; return false; ';
  37903. }
  37904. } else {
  37905. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  37906. }
  37907. out += ' } ';
  37908. }
  37909. }
  37910. if ($breakOnError) {
  37911. out += ' if (errors === ';
  37912. if ($top) {
  37913. out += '0';
  37914. } else {
  37915. out += 'errs_' + ($lvl);
  37916. }
  37917. out += ') { ';
  37918. $closingBraces2 += '}';
  37919. }
  37920. }
  37921. }
  37922. }
  37923. }
  37924. if ($breakOnError) {
  37925. out += ' ' + ($closingBraces2) + ' ';
  37926. }
  37927. if ($top) {
  37928. if ($async) {
  37929. out += ' if (errors === 0) return data; ';
  37930. out += ' else throw new ValidationError(vErrors); ';
  37931. } else {
  37932. out += ' validate.errors = vErrors; ';
  37933. out += ' return errors === 0; ';
  37934. }
  37935. out += ' }); return validate;';
  37936. } else {
  37937. out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';';
  37938. }
  37939. out = it.util.cleanUpCode(out);
  37940. if ($top) {
  37941. out = it.util.finalCleanUpCode(out, $async);
  37942. }
  37943. function $shouldUseGroup($rulesGroup) {
  37944. var rules = $rulesGroup.rules;
  37945. for (var i = 0; i < rules.length; i++)
  37946. if ($shouldUseRule(rules[i])) return true;
  37947. }
  37948. function $shouldUseRule($rule) {
  37949. return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule));
  37950. }
  37951. function $ruleImplementsSomeKeyword($rule) {
  37952. var impl = $rule.implements;
  37953. for (var i = 0; i < impl.length; i++)
  37954. if (it.schema[impl[i]] !== undefined) return true;
  37955. }
  37956. return out;
  37957. }
  37958. /***/ }),
  37959. /* 369 */
  37960. /***/ (function(module, exports) {
  37961. /**
  37962. * slice() reference.
  37963. */
  37964. var slice = Array.prototype.slice;
  37965. /**
  37966. * Expose `co`.
  37967. */
  37968. module.exports = co['default'] = co.co = co;
  37969. /**
  37970. * Wrap the given generator `fn` into a
  37971. * function that returns a promise.
  37972. * This is a separate function so that
  37973. * every `co()` call doesn't create a new,
  37974. * unnecessary closure.
  37975. *
  37976. * @param {GeneratorFunction} fn
  37977. * @return {Function}
  37978. * @api public
  37979. */
  37980. co.wrap = function (fn) {
  37981. createPromise.__generatorFunction__ = fn;
  37982. return createPromise;
  37983. function createPromise() {
  37984. return co.call(this, fn.apply(this, arguments));
  37985. }
  37986. };
  37987. /**
  37988. * Execute the generator function or a generator
  37989. * and return a promise.
  37990. *
  37991. * @param {Function} fn
  37992. * @return {Promise}
  37993. * @api public
  37994. */
  37995. function co(gen) {
  37996. var ctx = this;
  37997. var args = slice.call(arguments, 1)
  37998. // we wrap everything in a promise to avoid promise chaining,
  37999. // which leads to memory leak errors.
  38000. // see https://github.com/tj/co/issues/180
  38001. return new Promise(function(resolve, reject) {
  38002. if (typeof gen === 'function') gen = gen.apply(ctx, args);
  38003. if (!gen || typeof gen.next !== 'function') return resolve(gen);
  38004. onFulfilled();
  38005. /**
  38006. * @param {Mixed} res
  38007. * @return {Promise}
  38008. * @api private
  38009. */
  38010. function onFulfilled(res) {
  38011. var ret;
  38012. try {
  38013. ret = gen.next(res);
  38014. } catch (e) {
  38015. return reject(e);
  38016. }
  38017. next(ret);
  38018. }
  38019. /**
  38020. * @param {Error} err
  38021. * @return {Promise}
  38022. * @api private
  38023. */
  38024. function onRejected(err) {
  38025. var ret;
  38026. try {
  38027. ret = gen.throw(err);
  38028. } catch (e) {
  38029. return reject(e);
  38030. }
  38031. next(ret);
  38032. }
  38033. /**
  38034. * Get the next value in the generator,
  38035. * return a promise.
  38036. *
  38037. * @param {Object} ret
  38038. * @return {Promise}
  38039. * @api private
  38040. */
  38041. function next(ret) {
  38042. if (ret.done) return resolve(ret.value);
  38043. var value = toPromise.call(ctx, ret.value);
  38044. if (value && isPromise(value)) return value.then(onFulfilled, onRejected);
  38045. return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, '
  38046. + 'but the following object was passed: "' + String(ret.value) + '"'));
  38047. }
  38048. });
  38049. }
  38050. /**
  38051. * Convert a `yield`ed value into a promise.
  38052. *
  38053. * @param {Mixed} obj
  38054. * @return {Promise}
  38055. * @api private
  38056. */
  38057. function toPromise(obj) {
  38058. if (!obj) return obj;
  38059. if (isPromise(obj)) return obj;
  38060. if (isGeneratorFunction(obj) || isGenerator(obj)) return co.call(this, obj);
  38061. if ('function' == typeof obj) return thunkToPromise.call(this, obj);
  38062. if (Array.isArray(obj)) return arrayToPromise.call(this, obj);
  38063. if (isObject(obj)) return objectToPromise.call(this, obj);
  38064. return obj;
  38065. }
  38066. /**
  38067. * Convert a thunk to a promise.
  38068. *
  38069. * @param {Function}
  38070. * @return {Promise}
  38071. * @api private
  38072. */
  38073. function thunkToPromise(fn) {
  38074. var ctx = this;
  38075. return new Promise(function (resolve, reject) {
  38076. fn.call(ctx, function (err, res) {
  38077. if (err) return reject(err);
  38078. if (arguments.length > 2) res = slice.call(arguments, 1);
  38079. resolve(res);
  38080. });
  38081. });
  38082. }
  38083. /**
  38084. * Convert an array of "yieldables" to a promise.
  38085. * Uses `Promise.all()` internally.
  38086. *
  38087. * @param {Array} obj
  38088. * @return {Promise}
  38089. * @api private
  38090. */
  38091. function arrayToPromise(obj) {
  38092. return Promise.all(obj.map(toPromise, this));
  38093. }
  38094. /**
  38095. * Convert an object of "yieldables" to a promise.
  38096. * Uses `Promise.all()` internally.
  38097. *
  38098. * @param {Object} obj
  38099. * @return {Promise}
  38100. * @api private
  38101. */
  38102. function objectToPromise(obj){
  38103. var results = new obj.constructor();
  38104. var keys = Object.keys(obj);
  38105. var promises = [];
  38106. for (var i = 0; i < keys.length; i++) {
  38107. var key = keys[i];
  38108. var promise = toPromise.call(this, obj[key]);
  38109. if (promise && isPromise(promise)) defer(promise, key);
  38110. else results[key] = obj[key];
  38111. }
  38112. return Promise.all(promises).then(function () {
  38113. return results;
  38114. });
  38115. function defer(promise, key) {
  38116. // predefine the key in the result
  38117. results[key] = undefined;
  38118. promises.push(promise.then(function (res) {
  38119. results[key] = res;
  38120. }));
  38121. }
  38122. }
  38123. /**
  38124. * Check if `obj` is a promise.
  38125. *
  38126. * @param {Object} obj
  38127. * @return {Boolean}
  38128. * @api private
  38129. */
  38130. function isPromise(obj) {
  38131. return 'function' == typeof obj.then;
  38132. }
  38133. /**
  38134. * Check if `obj` is a generator.
  38135. *
  38136. * @param {Mixed} obj
  38137. * @return {Boolean}
  38138. * @api private
  38139. */
  38140. function isGenerator(obj) {
  38141. return 'function' == typeof obj.next && 'function' == typeof obj.throw;
  38142. }
  38143. /**
  38144. * Check if `obj` is a generator function.
  38145. *
  38146. * @param {Mixed} obj
  38147. * @return {Boolean}
  38148. * @api private
  38149. */
  38150. function isGeneratorFunction(obj) {
  38151. var constructor = obj.constructor;
  38152. if (!constructor) return false;
  38153. if ('GeneratorFunction' === constructor.name || 'GeneratorFunction' === constructor.displayName) return true;
  38154. return isGenerator(constructor.prototype);
  38155. }
  38156. /**
  38157. * Check for plain object.
  38158. *
  38159. * @param {Mixed} val
  38160. * @return {Boolean}
  38161. * @api private
  38162. */
  38163. function isObject(val) {
  38164. return Object == val.constructor;
  38165. }
  38166. /***/ }),
  38167. /* 370 */
  38168. /***/ (function(module, exports, __webpack_require__) {
  38169. "use strict";
  38170. module.exports = function generate__limit(it, $keyword, $ruleType) {
  38171. var out = ' ';
  38172. var $lvl = it.level;
  38173. var $dataLvl = it.dataLevel;
  38174. var $schema = it.schema[$keyword];
  38175. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  38176. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  38177. var $breakOnError = !it.opts.allErrors;
  38178. var $errorKeyword;
  38179. var $data = 'data' + ($dataLvl || '');
  38180. var $isData = it.opts.$data && $schema && $schema.$data,
  38181. $schemaValue;
  38182. if ($isData) {
  38183. out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
  38184. $schemaValue = 'schema' + $lvl;
  38185. } else {
  38186. $schemaValue = $schema;
  38187. }
  38188. var $isMax = $keyword == 'maximum',
  38189. $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum',
  38190. $schemaExcl = it.schema[$exclusiveKeyword],
  38191. $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data,
  38192. $op = $isMax ? '<' : '>',
  38193. $notOp = $isMax ? '>' : '<',
  38194. $errorKeyword = undefined;
  38195. if ($isDataExcl) {
  38196. var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),
  38197. $exclusive = 'exclusive' + $lvl,
  38198. $exclType = 'exclType' + $lvl,
  38199. $exclIsNumber = 'exclIsNumber' + $lvl,
  38200. $opExpr = 'op' + $lvl,
  38201. $opStr = '\' + ' + $opExpr + ' + \'';
  38202. out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';
  38203. $schemaValueExcl = 'schemaExcl' + $lvl;
  38204. out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { ';
  38205. var $errorKeyword = $exclusiveKeyword;
  38206. var $$outStack = $$outStack || [];
  38207. $$outStack.push(out);
  38208. out = ''; /* istanbul ignore else */
  38209. if (it.createErrors !== false) {
  38210. out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
  38211. if (it.opts.messages !== false) {
  38212. out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' ';
  38213. }
  38214. if (it.opts.verbose) {
  38215. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  38216. }
  38217. out += ' } ';
  38218. } else {
  38219. out += ' {} ';
  38220. }
  38221. var __err = out;
  38222. out = $$outStack.pop();
  38223. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  38224. if (it.async) {
  38225. out += ' throw new ValidationError([' + (__err) + ']); ';
  38226. } else {
  38227. out += ' validate.errors = [' + (__err) + ']; return false; ';
  38228. }
  38229. } else {
  38230. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  38231. }
  38232. out += ' } else if ( ';
  38233. if ($isData) {
  38234. out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
  38235. }
  38236. out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';';
  38237. } else {
  38238. var $exclIsNumber = typeof $schemaExcl == 'number',
  38239. $opStr = $op;
  38240. if ($exclIsNumber && $isData) {
  38241. var $opExpr = '\'' + $opStr + '\'';
  38242. out += ' if ( ';
  38243. if ($isData) {
  38244. out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
  38245. }
  38246. out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { ';
  38247. } else {
  38248. if ($exclIsNumber && $schema === undefined) {
  38249. $exclusive = true;
  38250. $errorKeyword = $exclusiveKeyword;
  38251. $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
  38252. $schemaValue = $schemaExcl;
  38253. $notOp += '=';
  38254. } else {
  38255. if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);
  38256. if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {
  38257. $exclusive = true;
  38258. $errorKeyword = $exclusiveKeyword;
  38259. $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;
  38260. $notOp += '=';
  38261. } else {
  38262. $exclusive = false;
  38263. $opStr += '=';
  38264. }
  38265. }
  38266. var $opExpr = '\'' + $opStr + '\'';
  38267. out += ' if ( ';
  38268. if ($isData) {
  38269. out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
  38270. }
  38271. out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { ';
  38272. }
  38273. }
  38274. $errorKeyword = $errorKeyword || $keyword;
  38275. var $$outStack = $$outStack || [];
  38276. $$outStack.push(out);
  38277. out = ''; /* istanbul ignore else */
  38278. if (it.createErrors !== false) {
  38279. out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } ';
  38280. if (it.opts.messages !== false) {
  38281. out += ' , message: \'should be ' + ($opStr) + ' ';
  38282. if ($isData) {
  38283. out += '\' + ' + ($schemaValue);
  38284. } else {
  38285. out += '' + ($schemaValue) + '\'';
  38286. }
  38287. }
  38288. if (it.opts.verbose) {
  38289. out += ' , schema: ';
  38290. if ($isData) {
  38291. out += 'validate.schema' + ($schemaPath);
  38292. } else {
  38293. out += '' + ($schema);
  38294. }
  38295. out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  38296. }
  38297. out += ' } ';
  38298. } else {
  38299. out += ' {} ';
  38300. }
  38301. var __err = out;
  38302. out = $$outStack.pop();
  38303. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  38304. if (it.async) {
  38305. out += ' throw new ValidationError([' + (__err) + ']); ';
  38306. } else {
  38307. out += ' validate.errors = [' + (__err) + ']; return false; ';
  38308. }
  38309. } else {
  38310. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  38311. }
  38312. out += ' } ';
  38313. if ($breakOnError) {
  38314. out += ' else { ';
  38315. }
  38316. return out;
  38317. }
  38318. /***/ }),
  38319. /* 371 */
  38320. /***/ (function(module, exports, __webpack_require__) {
  38321. "use strict";
  38322. module.exports = function generate__limitItems(it, $keyword, $ruleType) {
  38323. var out = ' ';
  38324. var $lvl = it.level;
  38325. var $dataLvl = it.dataLevel;
  38326. var $schema = it.schema[$keyword];
  38327. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  38328. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  38329. var $breakOnError = !it.opts.allErrors;
  38330. var $errorKeyword;
  38331. var $data = 'data' + ($dataLvl || '');
  38332. var $isData = it.opts.$data && $schema && $schema.$data,
  38333. $schemaValue;
  38334. if ($isData) {
  38335. out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
  38336. $schemaValue = 'schema' + $lvl;
  38337. } else {
  38338. $schemaValue = $schema;
  38339. }
  38340. var $op = $keyword == 'maxItems' ? '>' : '<';
  38341. out += 'if ( ';
  38342. if ($isData) {
  38343. out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
  38344. }
  38345. out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { ';
  38346. var $errorKeyword = $keyword;
  38347. var $$outStack = $$outStack || [];
  38348. $$outStack.push(out);
  38349. out = ''; /* istanbul ignore else */
  38350. if (it.createErrors !== false) {
  38351. out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
  38352. if (it.opts.messages !== false) {
  38353. out += ' , message: \'should NOT have ';
  38354. if ($keyword == 'maxItems') {
  38355. out += 'more';
  38356. } else {
  38357. out += 'less';
  38358. }
  38359. out += ' than ';
  38360. if ($isData) {
  38361. out += '\' + ' + ($schemaValue) + ' + \'';
  38362. } else {
  38363. out += '' + ($schema);
  38364. }
  38365. out += ' items\' ';
  38366. }
  38367. if (it.opts.verbose) {
  38368. out += ' , schema: ';
  38369. if ($isData) {
  38370. out += 'validate.schema' + ($schemaPath);
  38371. } else {
  38372. out += '' + ($schema);
  38373. }
  38374. out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  38375. }
  38376. out += ' } ';
  38377. } else {
  38378. out += ' {} ';
  38379. }
  38380. var __err = out;
  38381. out = $$outStack.pop();
  38382. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  38383. if (it.async) {
  38384. out += ' throw new ValidationError([' + (__err) + ']); ';
  38385. } else {
  38386. out += ' validate.errors = [' + (__err) + ']; return false; ';
  38387. }
  38388. } else {
  38389. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  38390. }
  38391. out += '} ';
  38392. if ($breakOnError) {
  38393. out += ' else { ';
  38394. }
  38395. return out;
  38396. }
  38397. /***/ }),
  38398. /* 372 */
  38399. /***/ (function(module, exports, __webpack_require__) {
  38400. "use strict";
  38401. module.exports = function generate__limitLength(it, $keyword, $ruleType) {
  38402. var out = ' ';
  38403. var $lvl = it.level;
  38404. var $dataLvl = it.dataLevel;
  38405. var $schema = it.schema[$keyword];
  38406. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  38407. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  38408. var $breakOnError = !it.opts.allErrors;
  38409. var $errorKeyword;
  38410. var $data = 'data' + ($dataLvl || '');
  38411. var $isData = it.opts.$data && $schema && $schema.$data,
  38412. $schemaValue;
  38413. if ($isData) {
  38414. out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
  38415. $schemaValue = 'schema' + $lvl;
  38416. } else {
  38417. $schemaValue = $schema;
  38418. }
  38419. var $op = $keyword == 'maxLength' ? '>' : '<';
  38420. out += 'if ( ';
  38421. if ($isData) {
  38422. out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
  38423. }
  38424. if (it.opts.unicode === false) {
  38425. out += ' ' + ($data) + '.length ';
  38426. } else {
  38427. out += ' ucs2length(' + ($data) + ') ';
  38428. }
  38429. out += ' ' + ($op) + ' ' + ($schemaValue) + ') { ';
  38430. var $errorKeyword = $keyword;
  38431. var $$outStack = $$outStack || [];
  38432. $$outStack.push(out);
  38433. out = ''; /* istanbul ignore else */
  38434. if (it.createErrors !== false) {
  38435. out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
  38436. if (it.opts.messages !== false) {
  38437. out += ' , message: \'should NOT be ';
  38438. if ($keyword == 'maxLength') {
  38439. out += 'longer';
  38440. } else {
  38441. out += 'shorter';
  38442. }
  38443. out += ' than ';
  38444. if ($isData) {
  38445. out += '\' + ' + ($schemaValue) + ' + \'';
  38446. } else {
  38447. out += '' + ($schema);
  38448. }
  38449. out += ' characters\' ';
  38450. }
  38451. if (it.opts.verbose) {
  38452. out += ' , schema: ';
  38453. if ($isData) {
  38454. out += 'validate.schema' + ($schemaPath);
  38455. } else {
  38456. out += '' + ($schema);
  38457. }
  38458. out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  38459. }
  38460. out += ' } ';
  38461. } else {
  38462. out += ' {} ';
  38463. }
  38464. var __err = out;
  38465. out = $$outStack.pop();
  38466. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  38467. if (it.async) {
  38468. out += ' throw new ValidationError([' + (__err) + ']); ';
  38469. } else {
  38470. out += ' validate.errors = [' + (__err) + ']; return false; ';
  38471. }
  38472. } else {
  38473. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  38474. }
  38475. out += '} ';
  38476. if ($breakOnError) {
  38477. out += ' else { ';
  38478. }
  38479. return out;
  38480. }
  38481. /***/ }),
  38482. /* 373 */
  38483. /***/ (function(module, exports, __webpack_require__) {
  38484. "use strict";
  38485. module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
  38486. var out = ' ';
  38487. var $lvl = it.level;
  38488. var $dataLvl = it.dataLevel;
  38489. var $schema = it.schema[$keyword];
  38490. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  38491. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  38492. var $breakOnError = !it.opts.allErrors;
  38493. var $errorKeyword;
  38494. var $data = 'data' + ($dataLvl || '');
  38495. var $isData = it.opts.$data && $schema && $schema.$data,
  38496. $schemaValue;
  38497. if ($isData) {
  38498. out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
  38499. $schemaValue = 'schema' + $lvl;
  38500. } else {
  38501. $schemaValue = $schema;
  38502. }
  38503. var $op = $keyword == 'maxProperties' ? '>' : '<';
  38504. out += 'if ( ';
  38505. if ($isData) {
  38506. out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
  38507. }
  38508. out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { ';
  38509. var $errorKeyword = $keyword;
  38510. var $$outStack = $$outStack || [];
  38511. $$outStack.push(out);
  38512. out = ''; /* istanbul ignore else */
  38513. if (it.createErrors !== false) {
  38514. out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
  38515. if (it.opts.messages !== false) {
  38516. out += ' , message: \'should NOT have ';
  38517. if ($keyword == 'maxProperties') {
  38518. out += 'more';
  38519. } else {
  38520. out += 'less';
  38521. }
  38522. out += ' than ';
  38523. if ($isData) {
  38524. out += '\' + ' + ($schemaValue) + ' + \'';
  38525. } else {
  38526. out += '' + ($schema);
  38527. }
  38528. out += ' properties\' ';
  38529. }
  38530. if (it.opts.verbose) {
  38531. out += ' , schema: ';
  38532. if ($isData) {
  38533. out += 'validate.schema' + ($schemaPath);
  38534. } else {
  38535. out += '' + ($schema);
  38536. }
  38537. out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  38538. }
  38539. out += ' } ';
  38540. } else {
  38541. out += ' {} ';
  38542. }
  38543. var __err = out;
  38544. out = $$outStack.pop();
  38545. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  38546. if (it.async) {
  38547. out += ' throw new ValidationError([' + (__err) + ']); ';
  38548. } else {
  38549. out += ' validate.errors = [' + (__err) + ']; return false; ';
  38550. }
  38551. } else {
  38552. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  38553. }
  38554. out += '} ';
  38555. if ($breakOnError) {
  38556. out += ' else { ';
  38557. }
  38558. return out;
  38559. }
  38560. /***/ }),
  38561. /* 374 */
  38562. /***/ (function(module, exports, __webpack_require__) {
  38563. // Unique ID creation requires a high quality random # generator. In node.js
  38564. // this is pretty straight-forward - we use the crypto API.
  38565. var crypto = __webpack_require__(5);
  38566. module.exports = function nodeRNG() {
  38567. return crypto.randomBytes(16);
  38568. };
  38569. /***/ }),
  38570. /* 375 */
  38571. /***/ (function(module, exports, __webpack_require__) {
  38572. /*
  38573. Module dependencies
  38574. */
  38575. var parse = __webpack_require__(114),
  38576. defaultOptions = __webpack_require__(117).default,
  38577. flattenOptions = __webpack_require__(117).flatten,
  38578. isHtml = __webpack_require__(92).isHtml,
  38579. _ = {
  38580. extend: __webpack_require__(402),
  38581. bind: __webpack_require__(169),
  38582. forEach: __webpack_require__(129),
  38583. defaults: __webpack_require__(418)
  38584. };
  38585. /*
  38586. * The API
  38587. */
  38588. var api = [
  38589. __webpack_require__(718),
  38590. __webpack_require__(791),
  38591. __webpack_require__(798),
  38592. __webpack_require__(800),
  38593. __webpack_require__(806)
  38594. ];
  38595. /*
  38596. * Instance of cheerio
  38597. */
  38598. var Cheerio = module.exports = function(selector, context, root, options) {
  38599. if (!(this instanceof Cheerio)) return new Cheerio(selector, context, root, options);
  38600. this.options = _.defaults(flattenOptions(options), this.options, defaultOptions);
  38601. // $(), $(null), $(undefined), $(false)
  38602. if (!selector) return this;
  38603. if (root) {
  38604. if (typeof root === 'string') root = parse(root, this.options, false);
  38605. this._root = Cheerio.call(this, root);
  38606. }
  38607. // $($)
  38608. if (selector.cheerio) return selector;
  38609. // $(dom)
  38610. if (isNode(selector))
  38611. selector = [selector];
  38612. // $([dom])
  38613. if (Array.isArray(selector)) {
  38614. _.forEach(selector, _.bind(function(elem, idx) {
  38615. this[idx] = elem;
  38616. }, this));
  38617. this.length = selector.length;
  38618. return this;
  38619. }
  38620. // $(<html>)
  38621. if (typeof selector === 'string' && isHtml(selector)) {
  38622. return Cheerio.call(this, parse(selector, this.options, false).children);
  38623. }
  38624. // If we don't have a context, maybe we have a root, from loading
  38625. if (!context) {
  38626. context = this._root;
  38627. } else if (typeof context === 'string') {
  38628. if (isHtml(context)) {
  38629. // $('li', '<ul>...</ul>')
  38630. context = parse(context, this.options, false);
  38631. context = Cheerio.call(this, context);
  38632. } else {
  38633. // $('li', 'ul')
  38634. selector = [context, selector].join(' ');
  38635. context = this._root;
  38636. }
  38637. // $('li', node), $('li', [nodes])
  38638. } else if (!context.cheerio) {
  38639. context = Cheerio.call(this, context);
  38640. }
  38641. // If we still don't have a context, return
  38642. if (!context) return this;
  38643. // #id, .class, tag
  38644. return context.find(selector);
  38645. };
  38646. /**
  38647. * Mix in `static`
  38648. */
  38649. _.extend(Cheerio, __webpack_require__(174));
  38650. /*
  38651. * Set a signature of the object
  38652. */
  38653. Cheerio.prototype.cheerio = '[cheerio object]';
  38654. /*
  38655. * Make cheerio an array-like object
  38656. */
  38657. Cheerio.prototype.length = 0;
  38658. Cheerio.prototype.splice = Array.prototype.splice;
  38659. /*
  38660. * Make a cheerio object
  38661. *
  38662. * @api private
  38663. */
  38664. Cheerio.prototype._make = function(dom, context) {
  38665. var cheerio = new this.constructor(dom, context, this._root, this.options);
  38666. cheerio.prevObject = this;
  38667. return cheerio;
  38668. };
  38669. /**
  38670. * Turn a cheerio object into an array
  38671. */
  38672. Cheerio.prototype.toArray = function() {
  38673. return this.get();
  38674. };
  38675. /**
  38676. * Plug in the API
  38677. */
  38678. api.forEach(function(mod) {
  38679. _.extend(Cheerio.prototype, mod);
  38680. });
  38681. var isNode = function(obj) {
  38682. return obj.name || obj.type === 'text' || obj.type === 'comment';
  38683. };
  38684. /***/ }),
  38685. /* 376 */
  38686. /***/ (function(module, exports, __webpack_require__) {
  38687. var Tokenizer = __webpack_require__(377);
  38688. /*
  38689. Options:
  38690. xmlMode: Disables the special behavior for script/style tags (false by default)
  38691. lowerCaseAttributeNames: call .toLowerCase for each attribute name (true if xmlMode is `false`)
  38692. lowerCaseTags: call .toLowerCase for each tag name (true if xmlMode is `false`)
  38693. */
  38694. /*
  38695. Callbacks:
  38696. oncdataend,
  38697. oncdatastart,
  38698. onclosetag,
  38699. oncomment,
  38700. oncommentend,
  38701. onerror,
  38702. onopentag,
  38703. onprocessinginstruction,
  38704. onreset,
  38705. ontext
  38706. */
  38707. var formTags = {
  38708. input: true,
  38709. option: true,
  38710. optgroup: true,
  38711. select: true,
  38712. button: true,
  38713. datalist: true,
  38714. textarea: true
  38715. };
  38716. var openImpliesClose = {
  38717. tr : { tr:true, th:true, td:true },
  38718. th : { th:true },
  38719. td : { thead:true, th:true, td:true },
  38720. body : { head:true, link:true, script:true },
  38721. li : { li:true },
  38722. p : { p:true },
  38723. h1 : { p:true },
  38724. h2 : { p:true },
  38725. h3 : { p:true },
  38726. h4 : { p:true },
  38727. h5 : { p:true },
  38728. h6 : { p:true },
  38729. select : formTags,
  38730. input : formTags,
  38731. output : formTags,
  38732. button : formTags,
  38733. datalist: formTags,
  38734. textarea: formTags,
  38735. option : { option:true },
  38736. optgroup: { optgroup:true }
  38737. };
  38738. var voidElements = {
  38739. __proto__: null,
  38740. area: true,
  38741. base: true,
  38742. basefont: true,
  38743. br: true,
  38744. col: true,
  38745. command: true,
  38746. embed: true,
  38747. frame: true,
  38748. hr: true,
  38749. img: true,
  38750. input: true,
  38751. isindex: true,
  38752. keygen: true,
  38753. link: true,
  38754. meta: true,
  38755. param: true,
  38756. source: true,
  38757. track: true,
  38758. wbr: true,
  38759. //common self closing svg elements
  38760. path: true,
  38761. circle: true,
  38762. ellipse: true,
  38763. line: true,
  38764. rect: true,
  38765. use: true,
  38766. stop: true,
  38767. polyline: true,
  38768. polygon: true
  38769. };
  38770. var re_nameEnd = /\s|\//;
  38771. function Parser(cbs, options){
  38772. this._options = options || {};
  38773. this._cbs = cbs || {};
  38774. this._tagname = "";
  38775. this._attribname = "";
  38776. this._attribvalue = "";
  38777. this._attribs = null;
  38778. this._stack = [];
  38779. this.startIndex = 0;
  38780. this.endIndex = null;
  38781. this._lowerCaseTagNames = "lowerCaseTags" in this._options ?
  38782. !!this._options.lowerCaseTags :
  38783. !this._options.xmlMode;
  38784. this._lowerCaseAttributeNames = "lowerCaseAttributeNames" in this._options ?
  38785. !!this._options.lowerCaseAttributeNames :
  38786. !this._options.xmlMode;
  38787. if(this._options.Tokenizer) {
  38788. Tokenizer = this._options.Tokenizer;
  38789. }
  38790. this._tokenizer = new Tokenizer(this._options, this);
  38791. if(this._cbs.onparserinit) this._cbs.onparserinit(this);
  38792. }
  38793. __webpack_require__(33)(Parser, __webpack_require__(156).EventEmitter);
  38794. Parser.prototype._updatePosition = function(initialOffset){
  38795. if(this.endIndex === null){
  38796. if(this._tokenizer._sectionStart <= initialOffset){
  38797. this.startIndex = 0;
  38798. } else {
  38799. this.startIndex = this._tokenizer._sectionStart - initialOffset;
  38800. }
  38801. }
  38802. else this.startIndex = this.endIndex + 1;
  38803. this.endIndex = this._tokenizer.getAbsoluteIndex();
  38804. };
  38805. //Tokenizer event handlers
  38806. Parser.prototype.ontext = function(data){
  38807. this._updatePosition(1);
  38808. this.endIndex--;
  38809. if(this._cbs.ontext) this._cbs.ontext(data);
  38810. };
  38811. Parser.prototype.onopentagname = function(name){
  38812. if(this._lowerCaseTagNames){
  38813. name = name.toLowerCase();
  38814. }
  38815. this._tagname = name;
  38816. if(!this._options.xmlMode && name in openImpliesClose) {
  38817. for(
  38818. var el;
  38819. (el = this._stack[this._stack.length - 1]) in openImpliesClose[name];
  38820. this.onclosetag(el)
  38821. );
  38822. }
  38823. if(this._options.xmlMode || !(name in voidElements)){
  38824. this._stack.push(name);
  38825. }
  38826. if(this._cbs.onopentagname) this._cbs.onopentagname(name);
  38827. if(this._cbs.onopentag) this._attribs = {};
  38828. };
  38829. Parser.prototype.onopentagend = function(){
  38830. this._updatePosition(1);
  38831. if(this._attribs){
  38832. if(this._cbs.onopentag) this._cbs.onopentag(this._tagname, this._attribs);
  38833. this._attribs = null;
  38834. }
  38835. if(!this._options.xmlMode && this._cbs.onclosetag && this._tagname in voidElements){
  38836. this._cbs.onclosetag(this._tagname);
  38837. }
  38838. this._tagname = "";
  38839. };
  38840. Parser.prototype.onclosetag = function(name){
  38841. this._updatePosition(1);
  38842. if(this._lowerCaseTagNames){
  38843. name = name.toLowerCase();
  38844. }
  38845. if(this._stack.length && (!(name in voidElements) || this._options.xmlMode)){
  38846. var pos = this._stack.lastIndexOf(name);
  38847. if(pos !== -1){
  38848. if(this._cbs.onclosetag){
  38849. pos = this._stack.length - pos;
  38850. while(pos--) this._cbs.onclosetag(this._stack.pop());
  38851. }
  38852. else this._stack.length = pos;
  38853. } else if(name === "p" && !this._options.xmlMode){
  38854. this.onopentagname(name);
  38855. this._closeCurrentTag();
  38856. }
  38857. } else if(!this._options.xmlMode && (name === "br" || name === "p")){
  38858. this.onopentagname(name);
  38859. this._closeCurrentTag();
  38860. }
  38861. };
  38862. Parser.prototype.onselfclosingtag = function(){
  38863. if(this._options.xmlMode || this._options.recognizeSelfClosing){
  38864. this._closeCurrentTag();
  38865. } else {
  38866. this.onopentagend();
  38867. }
  38868. };
  38869. Parser.prototype._closeCurrentTag = function(){
  38870. var name = this._tagname;
  38871. this.onopentagend();
  38872. //self-closing tags will be on the top of the stack
  38873. //(cheaper check than in onclosetag)
  38874. if(this._stack[this._stack.length - 1] === name){
  38875. if(this._cbs.onclosetag){
  38876. this._cbs.onclosetag(name);
  38877. }
  38878. this._stack.pop();
  38879. }
  38880. };
  38881. Parser.prototype.onattribname = function(name){
  38882. if(this._lowerCaseAttributeNames){
  38883. name = name.toLowerCase();
  38884. }
  38885. this._attribname = name;
  38886. };
  38887. Parser.prototype.onattribdata = function(value){
  38888. this._attribvalue += value;
  38889. };
  38890. Parser.prototype.onattribend = function(){
  38891. if(this._cbs.onattribute) this._cbs.onattribute(this._attribname, this._attribvalue);
  38892. if(
  38893. this._attribs &&
  38894. !Object.prototype.hasOwnProperty.call(this._attribs, this._attribname)
  38895. ){
  38896. this._attribs[this._attribname] = this._attribvalue;
  38897. }
  38898. this._attribname = "";
  38899. this._attribvalue = "";
  38900. };
  38901. Parser.prototype._getInstructionName = function(value){
  38902. var idx = value.search(re_nameEnd),
  38903. name = idx < 0 ? value : value.substr(0, idx);
  38904. if(this._lowerCaseTagNames){
  38905. name = name.toLowerCase();
  38906. }
  38907. return name;
  38908. };
  38909. Parser.prototype.ondeclaration = function(value){
  38910. if(this._cbs.onprocessinginstruction){
  38911. var name = this._getInstructionName(value);
  38912. this._cbs.onprocessinginstruction("!" + name, "!" + value);
  38913. }
  38914. };
  38915. Parser.prototype.onprocessinginstruction = function(value){
  38916. if(this._cbs.onprocessinginstruction){
  38917. var name = this._getInstructionName(value);
  38918. this._cbs.onprocessinginstruction("?" + name, "?" + value);
  38919. }
  38920. };
  38921. Parser.prototype.oncomment = function(value){
  38922. this._updatePosition(4);
  38923. if(this._cbs.oncomment) this._cbs.oncomment(value);
  38924. if(this._cbs.oncommentend) this._cbs.oncommentend();
  38925. };
  38926. Parser.prototype.oncdata = function(value){
  38927. this._updatePosition(1);
  38928. if(this._options.xmlMode || this._options.recognizeCDATA){
  38929. if(this._cbs.oncdatastart) this._cbs.oncdatastart();
  38930. if(this._cbs.ontext) this._cbs.ontext(value);
  38931. if(this._cbs.oncdataend) this._cbs.oncdataend();
  38932. } else {
  38933. this.oncomment("[CDATA[" + value + "]]");
  38934. }
  38935. };
  38936. Parser.prototype.onerror = function(err){
  38937. if(this._cbs.onerror) this._cbs.onerror(err);
  38938. };
  38939. Parser.prototype.onend = function(){
  38940. if(this._cbs.onclosetag){
  38941. for(
  38942. var i = this._stack.length;
  38943. i > 0;
  38944. this._cbs.onclosetag(this._stack[--i])
  38945. );
  38946. }
  38947. if(this._cbs.onend) this._cbs.onend();
  38948. };
  38949. //Resets the parser to a blank state, ready to parse a new HTML document
  38950. Parser.prototype.reset = function(){
  38951. if(this._cbs.onreset) this._cbs.onreset();
  38952. this._tokenizer.reset();
  38953. this._tagname = "";
  38954. this._attribname = "";
  38955. this._attribs = null;
  38956. this._stack = [];
  38957. if(this._cbs.onparserinit) this._cbs.onparserinit(this);
  38958. };
  38959. //Parses a complete HTML document and pushes it to the handler
  38960. Parser.prototype.parseComplete = function(data){
  38961. this.reset();
  38962. this.end(data);
  38963. };
  38964. Parser.prototype.write = function(chunk){
  38965. this._tokenizer.write(chunk);
  38966. };
  38967. Parser.prototype.end = function(chunk){
  38968. this._tokenizer.end(chunk);
  38969. };
  38970. Parser.prototype.pause = function(){
  38971. this._tokenizer.pause();
  38972. };
  38973. Parser.prototype.resume = function(){
  38974. this._tokenizer.resume();
  38975. };
  38976. //alias for backwards compat
  38977. Parser.prototype.parseChunk = Parser.prototype.write;
  38978. Parser.prototype.done = Parser.prototype.end;
  38979. module.exports = Parser;
  38980. /***/ }),
  38981. /* 377 */
  38982. /***/ (function(module, exports, __webpack_require__) {
  38983. module.exports = Tokenizer;
  38984. var decodeCodePoint = __webpack_require__(378),
  38985. entityMap = __webpack_require__(157),
  38986. legacyMap = __webpack_require__(379),
  38987. xmlMap = __webpack_require__(158),
  38988. i = 0,
  38989. TEXT = i++,
  38990. BEFORE_TAG_NAME = i++, //after <
  38991. IN_TAG_NAME = i++,
  38992. IN_SELF_CLOSING_TAG = i++,
  38993. BEFORE_CLOSING_TAG_NAME = i++,
  38994. IN_CLOSING_TAG_NAME = i++,
  38995. AFTER_CLOSING_TAG_NAME = i++,
  38996. //attributes
  38997. BEFORE_ATTRIBUTE_NAME = i++,
  38998. IN_ATTRIBUTE_NAME = i++,
  38999. AFTER_ATTRIBUTE_NAME = i++,
  39000. BEFORE_ATTRIBUTE_VALUE = i++,
  39001. IN_ATTRIBUTE_VALUE_DQ = i++, // "
  39002. IN_ATTRIBUTE_VALUE_SQ = i++, // '
  39003. IN_ATTRIBUTE_VALUE_NQ = i++,
  39004. //declarations
  39005. BEFORE_DECLARATION = i++, // !
  39006. IN_DECLARATION = i++,
  39007. //processing instructions
  39008. IN_PROCESSING_INSTRUCTION = i++, // ?
  39009. //comments
  39010. BEFORE_COMMENT = i++,
  39011. IN_COMMENT = i++,
  39012. AFTER_COMMENT_1 = i++,
  39013. AFTER_COMMENT_2 = i++,
  39014. //cdata
  39015. BEFORE_CDATA_1 = i++, // [
  39016. BEFORE_CDATA_2 = i++, // C
  39017. BEFORE_CDATA_3 = i++, // D
  39018. BEFORE_CDATA_4 = i++, // A
  39019. BEFORE_CDATA_5 = i++, // T
  39020. BEFORE_CDATA_6 = i++, // A
  39021. IN_CDATA = i++, // [
  39022. AFTER_CDATA_1 = i++, // ]
  39023. AFTER_CDATA_2 = i++, // ]
  39024. //special tags
  39025. BEFORE_SPECIAL = i++, //S
  39026. BEFORE_SPECIAL_END = i++, //S
  39027. BEFORE_SCRIPT_1 = i++, //C
  39028. BEFORE_SCRIPT_2 = i++, //R
  39029. BEFORE_SCRIPT_3 = i++, //I
  39030. BEFORE_SCRIPT_4 = i++, //P
  39031. BEFORE_SCRIPT_5 = i++, //T
  39032. AFTER_SCRIPT_1 = i++, //C
  39033. AFTER_SCRIPT_2 = i++, //R
  39034. AFTER_SCRIPT_3 = i++, //I
  39035. AFTER_SCRIPT_4 = i++, //P
  39036. AFTER_SCRIPT_5 = i++, //T
  39037. BEFORE_STYLE_1 = i++, //T
  39038. BEFORE_STYLE_2 = i++, //Y
  39039. BEFORE_STYLE_3 = i++, //L
  39040. BEFORE_STYLE_4 = i++, //E
  39041. AFTER_STYLE_1 = i++, //T
  39042. AFTER_STYLE_2 = i++, //Y
  39043. AFTER_STYLE_3 = i++, //L
  39044. AFTER_STYLE_4 = i++, //E
  39045. BEFORE_ENTITY = i++, //&
  39046. BEFORE_NUMERIC_ENTITY = i++, //#
  39047. IN_NAMED_ENTITY = i++,
  39048. IN_NUMERIC_ENTITY = i++,
  39049. IN_HEX_ENTITY = i++, //X
  39050. j = 0,
  39051. SPECIAL_NONE = j++,
  39052. SPECIAL_SCRIPT = j++,
  39053. SPECIAL_STYLE = j++;
  39054. function whitespace(c){
  39055. return c === " " || c === "\n" || c === "\t" || c === "\f" || c === "\r";
  39056. }
  39057. function characterState(char, SUCCESS){
  39058. return function(c){
  39059. if(c === char) this._state = SUCCESS;
  39060. };
  39061. }
  39062. function ifElseState(upper, SUCCESS, FAILURE){
  39063. var lower = upper.toLowerCase();
  39064. if(upper === lower){
  39065. return function(c){
  39066. if(c === lower){
  39067. this._state = SUCCESS;
  39068. } else {
  39069. this._state = FAILURE;
  39070. this._index--;
  39071. }
  39072. };
  39073. } else {
  39074. return function(c){
  39075. if(c === lower || c === upper){
  39076. this._state = SUCCESS;
  39077. } else {
  39078. this._state = FAILURE;
  39079. this._index--;
  39080. }
  39081. };
  39082. }
  39083. }
  39084. function consumeSpecialNameChar(upper, NEXT_STATE){
  39085. var lower = upper.toLowerCase();
  39086. return function(c){
  39087. if(c === lower || c === upper){
  39088. this._state = NEXT_STATE;
  39089. } else {
  39090. this._state = IN_TAG_NAME;
  39091. this._index--; //consume the token again
  39092. }
  39093. };
  39094. }
  39095. function Tokenizer(options, cbs){
  39096. this._state = TEXT;
  39097. this._buffer = "";
  39098. this._sectionStart = 0;
  39099. this._index = 0;
  39100. this._bufferOffset = 0; //chars removed from _buffer
  39101. this._baseState = TEXT;
  39102. this._special = SPECIAL_NONE;
  39103. this._cbs = cbs;
  39104. this._running = true;
  39105. this._ended = false;
  39106. this._xmlMode = !!(options && options.xmlMode);
  39107. this._decodeEntities = !!(options && options.decodeEntities);
  39108. }
  39109. Tokenizer.prototype._stateText = function(c){
  39110. if(c === "<"){
  39111. if(this._index > this._sectionStart){
  39112. this._cbs.ontext(this._getSection());
  39113. }
  39114. this._state = BEFORE_TAG_NAME;
  39115. this._sectionStart = this._index;
  39116. } else if(this._decodeEntities && this._special === SPECIAL_NONE && c === "&"){
  39117. if(this._index > this._sectionStart){
  39118. this._cbs.ontext(this._getSection());
  39119. }
  39120. this._baseState = TEXT;
  39121. this._state = BEFORE_ENTITY;
  39122. this._sectionStart = this._index;
  39123. }
  39124. };
  39125. Tokenizer.prototype._stateBeforeTagName = function(c){
  39126. if(c === "/"){
  39127. this._state = BEFORE_CLOSING_TAG_NAME;
  39128. } else if(c === "<"){
  39129. this._cbs.ontext(this._getSection());
  39130. this._sectionStart = this._index;
  39131. } else if(c === ">" || this._special !== SPECIAL_NONE || whitespace(c)) {
  39132. this._state = TEXT;
  39133. } else if(c === "!"){
  39134. this._state = BEFORE_DECLARATION;
  39135. this._sectionStart = this._index + 1;
  39136. } else if(c === "?"){
  39137. this._state = IN_PROCESSING_INSTRUCTION;
  39138. this._sectionStart = this._index + 1;
  39139. } else {
  39140. this._state = (!this._xmlMode && (c === "s" || c === "S")) ?
  39141. BEFORE_SPECIAL : IN_TAG_NAME;
  39142. this._sectionStart = this._index;
  39143. }
  39144. };
  39145. Tokenizer.prototype._stateInTagName = function(c){
  39146. if(c === "/" || c === ">" || whitespace(c)){
  39147. this._emitToken("onopentagname");
  39148. this._state = BEFORE_ATTRIBUTE_NAME;
  39149. this._index--;
  39150. }
  39151. };
  39152. Tokenizer.prototype._stateBeforeCloseingTagName = function(c){
  39153. if(whitespace(c));
  39154. else if(c === ">"){
  39155. this._state = TEXT;
  39156. } else if(this._special !== SPECIAL_NONE){
  39157. if(c === "s" || c === "S"){
  39158. this._state = BEFORE_SPECIAL_END;
  39159. } else {
  39160. this._state = TEXT;
  39161. this._index--;
  39162. }
  39163. } else {
  39164. this._state = IN_CLOSING_TAG_NAME;
  39165. this._sectionStart = this._index;
  39166. }
  39167. };
  39168. Tokenizer.prototype._stateInCloseingTagName = function(c){
  39169. if(c === ">" || whitespace(c)){
  39170. this._emitToken("onclosetag");
  39171. this._state = AFTER_CLOSING_TAG_NAME;
  39172. this._index--;
  39173. }
  39174. };
  39175. Tokenizer.prototype._stateAfterCloseingTagName = function(c){
  39176. //skip everything until ">"
  39177. if(c === ">"){
  39178. this._state = TEXT;
  39179. this._sectionStart = this._index + 1;
  39180. }
  39181. };
  39182. Tokenizer.prototype._stateBeforeAttributeName = function(c){
  39183. if(c === ">"){
  39184. this._cbs.onopentagend();
  39185. this._state = TEXT;
  39186. this._sectionStart = this._index + 1;
  39187. } else if(c === "/"){
  39188. this._state = IN_SELF_CLOSING_TAG;
  39189. } else if(!whitespace(c)){
  39190. this._state = IN_ATTRIBUTE_NAME;
  39191. this._sectionStart = this._index;
  39192. }
  39193. };
  39194. Tokenizer.prototype._stateInSelfClosingTag = function(c){
  39195. if(c === ">"){
  39196. this._cbs.onselfclosingtag();
  39197. this._state = TEXT;
  39198. this._sectionStart = this._index + 1;
  39199. } else if(!whitespace(c)){
  39200. this._state = BEFORE_ATTRIBUTE_NAME;
  39201. this._index--;
  39202. }
  39203. };
  39204. Tokenizer.prototype._stateInAttributeName = function(c){
  39205. if(c === "=" || c === "/" || c === ">" || whitespace(c)){
  39206. this._cbs.onattribname(this._getSection());
  39207. this._sectionStart = -1;
  39208. this._state = AFTER_ATTRIBUTE_NAME;
  39209. this._index--;
  39210. }
  39211. };
  39212. Tokenizer.prototype._stateAfterAttributeName = function(c){
  39213. if(c === "="){
  39214. this._state = BEFORE_ATTRIBUTE_VALUE;
  39215. } else if(c === "/" || c === ">"){
  39216. this._cbs.onattribend();
  39217. this._state = BEFORE_ATTRIBUTE_NAME;
  39218. this._index--;
  39219. } else if(!whitespace(c)){
  39220. this._cbs.onattribend();
  39221. this._state = IN_ATTRIBUTE_NAME;
  39222. this._sectionStart = this._index;
  39223. }
  39224. };
  39225. Tokenizer.prototype._stateBeforeAttributeValue = function(c){
  39226. if(c === "\""){
  39227. this._state = IN_ATTRIBUTE_VALUE_DQ;
  39228. this._sectionStart = this._index + 1;
  39229. } else if(c === "'"){
  39230. this._state = IN_ATTRIBUTE_VALUE_SQ;
  39231. this._sectionStart = this._index + 1;
  39232. } else if(!whitespace(c)){
  39233. this._state = IN_ATTRIBUTE_VALUE_NQ;
  39234. this._sectionStart = this._index;
  39235. this._index--; //reconsume token
  39236. }
  39237. };
  39238. Tokenizer.prototype._stateInAttributeValueDoubleQuotes = function(c){
  39239. if(c === "\""){
  39240. this._emitToken("onattribdata");
  39241. this._cbs.onattribend();
  39242. this._state = BEFORE_ATTRIBUTE_NAME;
  39243. } else if(this._decodeEntities && c === "&"){
  39244. this._emitToken("onattribdata");
  39245. this._baseState = this._state;
  39246. this._state = BEFORE_ENTITY;
  39247. this._sectionStart = this._index;
  39248. }
  39249. };
  39250. Tokenizer.prototype._stateInAttributeValueSingleQuotes = function(c){
  39251. if(c === "'"){
  39252. this._emitToken("onattribdata");
  39253. this._cbs.onattribend();
  39254. this._state = BEFORE_ATTRIBUTE_NAME;
  39255. } else if(this._decodeEntities && c === "&"){
  39256. this._emitToken("onattribdata");
  39257. this._baseState = this._state;
  39258. this._state = BEFORE_ENTITY;
  39259. this._sectionStart = this._index;
  39260. }
  39261. };
  39262. Tokenizer.prototype._stateInAttributeValueNoQuotes = function(c){
  39263. if(whitespace(c) || c === ">"){
  39264. this._emitToken("onattribdata");
  39265. this._cbs.onattribend();
  39266. this._state = BEFORE_ATTRIBUTE_NAME;
  39267. this._index--;
  39268. } else if(this._decodeEntities && c === "&"){
  39269. this._emitToken("onattribdata");
  39270. this._baseState = this._state;
  39271. this._state = BEFORE_ENTITY;
  39272. this._sectionStart = this._index;
  39273. }
  39274. };
  39275. Tokenizer.prototype._stateBeforeDeclaration = function(c){
  39276. this._state = c === "[" ? BEFORE_CDATA_1 :
  39277. c === "-" ? BEFORE_COMMENT :
  39278. IN_DECLARATION;
  39279. };
  39280. Tokenizer.prototype._stateInDeclaration = function(c){
  39281. if(c === ">"){
  39282. this._cbs.ondeclaration(this._getSection());
  39283. this._state = TEXT;
  39284. this._sectionStart = this._index + 1;
  39285. }
  39286. };
  39287. Tokenizer.prototype._stateInProcessingInstruction = function(c){
  39288. if(c === ">"){
  39289. this._cbs.onprocessinginstruction(this._getSection());
  39290. this._state = TEXT;
  39291. this._sectionStart = this._index + 1;
  39292. }
  39293. };
  39294. Tokenizer.prototype._stateBeforeComment = function(c){
  39295. if(c === "-"){
  39296. this._state = IN_COMMENT;
  39297. this._sectionStart = this._index + 1;
  39298. } else {
  39299. this._state = IN_DECLARATION;
  39300. }
  39301. };
  39302. Tokenizer.prototype._stateInComment = function(c){
  39303. if(c === "-") this._state = AFTER_COMMENT_1;
  39304. };
  39305. Tokenizer.prototype._stateAfterComment1 = function(c){
  39306. if(c === "-"){
  39307. this._state = AFTER_COMMENT_2;
  39308. } else {
  39309. this._state = IN_COMMENT;
  39310. }
  39311. };
  39312. Tokenizer.prototype._stateAfterComment2 = function(c){
  39313. if(c === ">"){
  39314. //remove 2 trailing chars
  39315. this._cbs.oncomment(this._buffer.substring(this._sectionStart, this._index - 2));
  39316. this._state = TEXT;
  39317. this._sectionStart = this._index + 1;
  39318. } else if(c !== "-"){
  39319. this._state = IN_COMMENT;
  39320. }
  39321. // else: stay in AFTER_COMMENT_2 (`--->`)
  39322. };
  39323. Tokenizer.prototype._stateBeforeCdata1 = ifElseState("C", BEFORE_CDATA_2, IN_DECLARATION);
  39324. Tokenizer.prototype._stateBeforeCdata2 = ifElseState("D", BEFORE_CDATA_3, IN_DECLARATION);
  39325. Tokenizer.prototype._stateBeforeCdata3 = ifElseState("A", BEFORE_CDATA_4, IN_DECLARATION);
  39326. Tokenizer.prototype._stateBeforeCdata4 = ifElseState("T", BEFORE_CDATA_5, IN_DECLARATION);
  39327. Tokenizer.prototype._stateBeforeCdata5 = ifElseState("A", BEFORE_CDATA_6, IN_DECLARATION);
  39328. Tokenizer.prototype._stateBeforeCdata6 = function(c){
  39329. if(c === "["){
  39330. this._state = IN_CDATA;
  39331. this._sectionStart = this._index + 1;
  39332. } else {
  39333. this._state = IN_DECLARATION;
  39334. this._index--;
  39335. }
  39336. };
  39337. Tokenizer.prototype._stateInCdata = function(c){
  39338. if(c === "]") this._state = AFTER_CDATA_1;
  39339. };
  39340. Tokenizer.prototype._stateAfterCdata1 = characterState("]", AFTER_CDATA_2);
  39341. Tokenizer.prototype._stateAfterCdata2 = function(c){
  39342. if(c === ">"){
  39343. //remove 2 trailing chars
  39344. this._cbs.oncdata(this._buffer.substring(this._sectionStart, this._index - 2));
  39345. this._state = TEXT;
  39346. this._sectionStart = this._index + 1;
  39347. } else if(c !== "]") {
  39348. this._state = IN_CDATA;
  39349. }
  39350. //else: stay in AFTER_CDATA_2 (`]]]>`)
  39351. };
  39352. Tokenizer.prototype._stateBeforeSpecial = function(c){
  39353. if(c === "c" || c === "C"){
  39354. this._state = BEFORE_SCRIPT_1;
  39355. } else if(c === "t" || c === "T"){
  39356. this._state = BEFORE_STYLE_1;
  39357. } else {
  39358. this._state = IN_TAG_NAME;
  39359. this._index--; //consume the token again
  39360. }
  39361. };
  39362. Tokenizer.prototype._stateBeforeSpecialEnd = function(c){
  39363. if(this._special === SPECIAL_SCRIPT && (c === "c" || c === "C")){
  39364. this._state = AFTER_SCRIPT_1;
  39365. } else if(this._special === SPECIAL_STYLE && (c === "t" || c === "T")){
  39366. this._state = AFTER_STYLE_1;
  39367. }
  39368. else this._state = TEXT;
  39369. };
  39370. Tokenizer.prototype._stateBeforeScript1 = consumeSpecialNameChar("R", BEFORE_SCRIPT_2);
  39371. Tokenizer.prototype._stateBeforeScript2 = consumeSpecialNameChar("I", BEFORE_SCRIPT_3);
  39372. Tokenizer.prototype._stateBeforeScript3 = consumeSpecialNameChar("P", BEFORE_SCRIPT_4);
  39373. Tokenizer.prototype._stateBeforeScript4 = consumeSpecialNameChar("T", BEFORE_SCRIPT_5);
  39374. Tokenizer.prototype._stateBeforeScript5 = function(c){
  39375. if(c === "/" || c === ">" || whitespace(c)){
  39376. this._special = SPECIAL_SCRIPT;
  39377. }
  39378. this._state = IN_TAG_NAME;
  39379. this._index--; //consume the token again
  39380. };
  39381. Tokenizer.prototype._stateAfterScript1 = ifElseState("R", AFTER_SCRIPT_2, TEXT);
  39382. Tokenizer.prototype._stateAfterScript2 = ifElseState("I", AFTER_SCRIPT_3, TEXT);
  39383. Tokenizer.prototype._stateAfterScript3 = ifElseState("P", AFTER_SCRIPT_4, TEXT);
  39384. Tokenizer.prototype._stateAfterScript4 = ifElseState("T", AFTER_SCRIPT_5, TEXT);
  39385. Tokenizer.prototype._stateAfterScript5 = function(c){
  39386. if(c === ">" || whitespace(c)){
  39387. this._special = SPECIAL_NONE;
  39388. this._state = IN_CLOSING_TAG_NAME;
  39389. this._sectionStart = this._index - 6;
  39390. this._index--; //reconsume the token
  39391. }
  39392. else this._state = TEXT;
  39393. };
  39394. Tokenizer.prototype._stateBeforeStyle1 = consumeSpecialNameChar("Y", BEFORE_STYLE_2);
  39395. Tokenizer.prototype._stateBeforeStyle2 = consumeSpecialNameChar("L", BEFORE_STYLE_3);
  39396. Tokenizer.prototype._stateBeforeStyle3 = consumeSpecialNameChar("E", BEFORE_STYLE_4);
  39397. Tokenizer.prototype._stateBeforeStyle4 = function(c){
  39398. if(c === "/" || c === ">" || whitespace(c)){
  39399. this._special = SPECIAL_STYLE;
  39400. }
  39401. this._state = IN_TAG_NAME;
  39402. this._index--; //consume the token again
  39403. };
  39404. Tokenizer.prototype._stateAfterStyle1 = ifElseState("Y", AFTER_STYLE_2, TEXT);
  39405. Tokenizer.prototype._stateAfterStyle2 = ifElseState("L", AFTER_STYLE_3, TEXT);
  39406. Tokenizer.prototype._stateAfterStyle3 = ifElseState("E", AFTER_STYLE_4, TEXT);
  39407. Tokenizer.prototype._stateAfterStyle4 = function(c){
  39408. if(c === ">" || whitespace(c)){
  39409. this._special = SPECIAL_NONE;
  39410. this._state = IN_CLOSING_TAG_NAME;
  39411. this._sectionStart = this._index - 5;
  39412. this._index--; //reconsume the token
  39413. }
  39414. else this._state = TEXT;
  39415. };
  39416. Tokenizer.prototype._stateBeforeEntity = ifElseState("#", BEFORE_NUMERIC_ENTITY, IN_NAMED_ENTITY);
  39417. Tokenizer.prototype._stateBeforeNumericEntity = ifElseState("X", IN_HEX_ENTITY, IN_NUMERIC_ENTITY);
  39418. //for entities terminated with a semicolon
  39419. Tokenizer.prototype._parseNamedEntityStrict = function(){
  39420. //offset = 1
  39421. if(this._sectionStart + 1 < this._index){
  39422. var entity = this._buffer.substring(this._sectionStart + 1, this._index),
  39423. map = this._xmlMode ? xmlMap : entityMap;
  39424. if(map.hasOwnProperty(entity)){
  39425. this._emitPartial(map[entity]);
  39426. this._sectionStart = this._index + 1;
  39427. }
  39428. }
  39429. };
  39430. //parses legacy entities (without trailing semicolon)
  39431. Tokenizer.prototype._parseLegacyEntity = function(){
  39432. var start = this._sectionStart + 1,
  39433. limit = this._index - start;
  39434. if(limit > 6) limit = 6; //the max length of legacy entities is 6
  39435. while(limit >= 2){ //the min length of legacy entities is 2
  39436. var entity = this._buffer.substr(start, limit);
  39437. if(legacyMap.hasOwnProperty(entity)){
  39438. this._emitPartial(legacyMap[entity]);
  39439. this._sectionStart += limit + 1;
  39440. return;
  39441. } else {
  39442. limit--;
  39443. }
  39444. }
  39445. };
  39446. Tokenizer.prototype._stateInNamedEntity = function(c){
  39447. if(c === ";"){
  39448. this._parseNamedEntityStrict();
  39449. if(this._sectionStart + 1 < this._index && !this._xmlMode){
  39450. this._parseLegacyEntity();
  39451. }
  39452. this._state = this._baseState;
  39453. } else if((c < "a" || c > "z") && (c < "A" || c > "Z") && (c < "0" || c > "9")){
  39454. if(this._xmlMode);
  39455. else if(this._sectionStart + 1 === this._index);
  39456. else if(this._baseState !== TEXT){
  39457. if(c !== "="){
  39458. this._parseNamedEntityStrict();
  39459. }
  39460. } else {
  39461. this._parseLegacyEntity();
  39462. }
  39463. this._state = this._baseState;
  39464. this._index--;
  39465. }
  39466. };
  39467. Tokenizer.prototype._decodeNumericEntity = function(offset, base){
  39468. var sectionStart = this._sectionStart + offset;
  39469. if(sectionStart !== this._index){
  39470. //parse entity
  39471. var entity = this._buffer.substring(sectionStart, this._index);
  39472. var parsed = parseInt(entity, base);
  39473. this._emitPartial(decodeCodePoint(parsed));
  39474. this._sectionStart = this._index;
  39475. } else {
  39476. this._sectionStart--;
  39477. }
  39478. this._state = this._baseState;
  39479. };
  39480. Tokenizer.prototype._stateInNumericEntity = function(c){
  39481. if(c === ";"){
  39482. this._decodeNumericEntity(2, 10);
  39483. this._sectionStart++;
  39484. } else if(c < "0" || c > "9"){
  39485. if(!this._xmlMode){
  39486. this._decodeNumericEntity(2, 10);
  39487. } else {
  39488. this._state = this._baseState;
  39489. }
  39490. this._index--;
  39491. }
  39492. };
  39493. Tokenizer.prototype._stateInHexEntity = function(c){
  39494. if(c === ";"){
  39495. this._decodeNumericEntity(3, 16);
  39496. this._sectionStart++;
  39497. } else if((c < "a" || c > "f") && (c < "A" || c > "F") && (c < "0" || c > "9")){
  39498. if(!this._xmlMode){
  39499. this._decodeNumericEntity(3, 16);
  39500. } else {
  39501. this._state = this._baseState;
  39502. }
  39503. this._index--;
  39504. }
  39505. };
  39506. Tokenizer.prototype._cleanup = function (){
  39507. if(this._sectionStart < 0){
  39508. this._buffer = "";
  39509. this._bufferOffset += this._index;
  39510. this._index = 0;
  39511. } else if(this._running){
  39512. if(this._state === TEXT){
  39513. if(this._sectionStart !== this._index){
  39514. this._cbs.ontext(this._buffer.substr(this._sectionStart));
  39515. }
  39516. this._buffer = "";
  39517. this._bufferOffset += this._index;
  39518. this._index = 0;
  39519. } else if(this._sectionStart === this._index){
  39520. //the section just started
  39521. this._buffer = "";
  39522. this._bufferOffset += this._index;
  39523. this._index = 0;
  39524. } else {
  39525. //remove everything unnecessary
  39526. this._buffer = this._buffer.substr(this._sectionStart);
  39527. this._index -= this._sectionStart;
  39528. this._bufferOffset += this._sectionStart;
  39529. }
  39530. this._sectionStart = 0;
  39531. }
  39532. };
  39533. //TODO make events conditional
  39534. Tokenizer.prototype.write = function(chunk){
  39535. if(this._ended) this._cbs.onerror(Error(".write() after done!"));
  39536. this._buffer += chunk;
  39537. this._parse();
  39538. };
  39539. Tokenizer.prototype._parse = function(){
  39540. while(this._index < this._buffer.length && this._running){
  39541. var c = this._buffer.charAt(this._index);
  39542. if(this._state === TEXT) {
  39543. this._stateText(c);
  39544. } else if(this._state === BEFORE_TAG_NAME){
  39545. this._stateBeforeTagName(c);
  39546. } else if(this._state === IN_TAG_NAME) {
  39547. this._stateInTagName(c);
  39548. } else if(this._state === BEFORE_CLOSING_TAG_NAME){
  39549. this._stateBeforeCloseingTagName(c);
  39550. } else if(this._state === IN_CLOSING_TAG_NAME){
  39551. this._stateInCloseingTagName(c);
  39552. } else if(this._state === AFTER_CLOSING_TAG_NAME){
  39553. this._stateAfterCloseingTagName(c);
  39554. } else if(this._state === IN_SELF_CLOSING_TAG){
  39555. this._stateInSelfClosingTag(c);
  39556. }
  39557. /*
  39558. * attributes
  39559. */
  39560. else if(this._state === BEFORE_ATTRIBUTE_NAME){
  39561. this._stateBeforeAttributeName(c);
  39562. } else if(this._state === IN_ATTRIBUTE_NAME){
  39563. this._stateInAttributeName(c);
  39564. } else if(this._state === AFTER_ATTRIBUTE_NAME){
  39565. this._stateAfterAttributeName(c);
  39566. } else if(this._state === BEFORE_ATTRIBUTE_VALUE){
  39567. this._stateBeforeAttributeValue(c);
  39568. } else if(this._state === IN_ATTRIBUTE_VALUE_DQ){
  39569. this._stateInAttributeValueDoubleQuotes(c);
  39570. } else if(this._state === IN_ATTRIBUTE_VALUE_SQ){
  39571. this._stateInAttributeValueSingleQuotes(c);
  39572. } else if(this._state === IN_ATTRIBUTE_VALUE_NQ){
  39573. this._stateInAttributeValueNoQuotes(c);
  39574. }
  39575. /*
  39576. * declarations
  39577. */
  39578. else if(this._state === BEFORE_DECLARATION){
  39579. this._stateBeforeDeclaration(c);
  39580. } else if(this._state === IN_DECLARATION){
  39581. this._stateInDeclaration(c);
  39582. }
  39583. /*
  39584. * processing instructions
  39585. */
  39586. else if(this._state === IN_PROCESSING_INSTRUCTION){
  39587. this._stateInProcessingInstruction(c);
  39588. }
  39589. /*
  39590. * comments
  39591. */
  39592. else if(this._state === BEFORE_COMMENT){
  39593. this._stateBeforeComment(c);
  39594. } else if(this._state === IN_COMMENT){
  39595. this._stateInComment(c);
  39596. } else if(this._state === AFTER_COMMENT_1){
  39597. this._stateAfterComment1(c);
  39598. } else if(this._state === AFTER_COMMENT_2){
  39599. this._stateAfterComment2(c);
  39600. }
  39601. /*
  39602. * cdata
  39603. */
  39604. else if(this._state === BEFORE_CDATA_1){
  39605. this._stateBeforeCdata1(c);
  39606. } else if(this._state === BEFORE_CDATA_2){
  39607. this._stateBeforeCdata2(c);
  39608. } else if(this._state === BEFORE_CDATA_3){
  39609. this._stateBeforeCdata3(c);
  39610. } else if(this._state === BEFORE_CDATA_4){
  39611. this._stateBeforeCdata4(c);
  39612. } else if(this._state === BEFORE_CDATA_5){
  39613. this._stateBeforeCdata5(c);
  39614. } else if(this._state === BEFORE_CDATA_6){
  39615. this._stateBeforeCdata6(c);
  39616. } else if(this._state === IN_CDATA){
  39617. this._stateInCdata(c);
  39618. } else if(this._state === AFTER_CDATA_1){
  39619. this._stateAfterCdata1(c);
  39620. } else if(this._state === AFTER_CDATA_2){
  39621. this._stateAfterCdata2(c);
  39622. }
  39623. /*
  39624. * special tags
  39625. */
  39626. else if(this._state === BEFORE_SPECIAL){
  39627. this._stateBeforeSpecial(c);
  39628. } else if(this._state === BEFORE_SPECIAL_END){
  39629. this._stateBeforeSpecialEnd(c);
  39630. }
  39631. /*
  39632. * script
  39633. */
  39634. else if(this._state === BEFORE_SCRIPT_1){
  39635. this._stateBeforeScript1(c);
  39636. } else if(this._state === BEFORE_SCRIPT_2){
  39637. this._stateBeforeScript2(c);
  39638. } else if(this._state === BEFORE_SCRIPT_3){
  39639. this._stateBeforeScript3(c);
  39640. } else if(this._state === BEFORE_SCRIPT_4){
  39641. this._stateBeforeScript4(c);
  39642. } else if(this._state === BEFORE_SCRIPT_5){
  39643. this._stateBeforeScript5(c);
  39644. }
  39645. else if(this._state === AFTER_SCRIPT_1){
  39646. this._stateAfterScript1(c);
  39647. } else if(this._state === AFTER_SCRIPT_2){
  39648. this._stateAfterScript2(c);
  39649. } else if(this._state === AFTER_SCRIPT_3){
  39650. this._stateAfterScript3(c);
  39651. } else if(this._state === AFTER_SCRIPT_4){
  39652. this._stateAfterScript4(c);
  39653. } else if(this._state === AFTER_SCRIPT_5){
  39654. this._stateAfterScript5(c);
  39655. }
  39656. /*
  39657. * style
  39658. */
  39659. else if(this._state === BEFORE_STYLE_1){
  39660. this._stateBeforeStyle1(c);
  39661. } else if(this._state === BEFORE_STYLE_2){
  39662. this._stateBeforeStyle2(c);
  39663. } else if(this._state === BEFORE_STYLE_3){
  39664. this._stateBeforeStyle3(c);
  39665. } else if(this._state === BEFORE_STYLE_4){
  39666. this._stateBeforeStyle4(c);
  39667. }
  39668. else if(this._state === AFTER_STYLE_1){
  39669. this._stateAfterStyle1(c);
  39670. } else if(this._state === AFTER_STYLE_2){
  39671. this._stateAfterStyle2(c);
  39672. } else if(this._state === AFTER_STYLE_3){
  39673. this._stateAfterStyle3(c);
  39674. } else if(this._state === AFTER_STYLE_4){
  39675. this._stateAfterStyle4(c);
  39676. }
  39677. /*
  39678. * entities
  39679. */
  39680. else if(this._state === BEFORE_ENTITY){
  39681. this._stateBeforeEntity(c);
  39682. } else if(this._state === BEFORE_NUMERIC_ENTITY){
  39683. this._stateBeforeNumericEntity(c);
  39684. } else if(this._state === IN_NAMED_ENTITY){
  39685. this._stateInNamedEntity(c);
  39686. } else if(this._state === IN_NUMERIC_ENTITY){
  39687. this._stateInNumericEntity(c);
  39688. } else if(this._state === IN_HEX_ENTITY){
  39689. this._stateInHexEntity(c);
  39690. }
  39691. else {
  39692. this._cbs.onerror(Error("unknown _state"), this._state);
  39693. }
  39694. this._index++;
  39695. }
  39696. this._cleanup();
  39697. };
  39698. Tokenizer.prototype.pause = function(){
  39699. this._running = false;
  39700. };
  39701. Tokenizer.prototype.resume = function(){
  39702. this._running = true;
  39703. if(this._index < this._buffer.length){
  39704. this._parse();
  39705. }
  39706. if(this._ended){
  39707. this._finish();
  39708. }
  39709. };
  39710. Tokenizer.prototype.end = function(chunk){
  39711. if(this._ended) this._cbs.onerror(Error(".end() after done!"));
  39712. if(chunk) this.write(chunk);
  39713. this._ended = true;
  39714. if(this._running) this._finish();
  39715. };
  39716. Tokenizer.prototype._finish = function(){
  39717. //if there is remaining data, emit it in a reasonable way
  39718. if(this._sectionStart < this._index){
  39719. this._handleTrailingData();
  39720. }
  39721. this._cbs.onend();
  39722. };
  39723. Tokenizer.prototype._handleTrailingData = function(){
  39724. var data = this._buffer.substr(this._sectionStart);
  39725. if(this._state === IN_CDATA || this._state === AFTER_CDATA_1 || this._state === AFTER_CDATA_2){
  39726. this._cbs.oncdata(data);
  39727. } else if(this._state === IN_COMMENT || this._state === AFTER_COMMENT_1 || this._state === AFTER_COMMENT_2){
  39728. this._cbs.oncomment(data);
  39729. } else if(this._state === IN_NAMED_ENTITY && !this._xmlMode){
  39730. this._parseLegacyEntity();
  39731. if(this._sectionStart < this._index){
  39732. this._state = this._baseState;
  39733. this._handleTrailingData();
  39734. }
  39735. } else if(this._state === IN_NUMERIC_ENTITY && !this._xmlMode){
  39736. this._decodeNumericEntity(2, 10);
  39737. if(this._sectionStart < this._index){
  39738. this._state = this._baseState;
  39739. this._handleTrailingData();
  39740. }
  39741. } else if(this._state === IN_HEX_ENTITY && !this._xmlMode){
  39742. this._decodeNumericEntity(3, 16);
  39743. if(this._sectionStart < this._index){
  39744. this._state = this._baseState;
  39745. this._handleTrailingData();
  39746. }
  39747. } else if(
  39748. this._state !== IN_TAG_NAME &&
  39749. this._state !== BEFORE_ATTRIBUTE_NAME &&
  39750. this._state !== BEFORE_ATTRIBUTE_VALUE &&
  39751. this._state !== AFTER_ATTRIBUTE_NAME &&
  39752. this._state !== IN_ATTRIBUTE_NAME &&
  39753. this._state !== IN_ATTRIBUTE_VALUE_SQ &&
  39754. this._state !== IN_ATTRIBUTE_VALUE_DQ &&
  39755. this._state !== IN_ATTRIBUTE_VALUE_NQ &&
  39756. this._state !== IN_CLOSING_TAG_NAME
  39757. ){
  39758. this._cbs.ontext(data);
  39759. }
  39760. //else, ignore remaining data
  39761. //TODO add a way to remove current tag
  39762. };
  39763. Tokenizer.prototype.reset = function(){
  39764. Tokenizer.call(this, {xmlMode: this._xmlMode, decodeEntities: this._decodeEntities}, this._cbs);
  39765. };
  39766. Tokenizer.prototype.getAbsoluteIndex = function(){
  39767. return this._bufferOffset + this._index;
  39768. };
  39769. Tokenizer.prototype._getSection = function(){
  39770. return this._buffer.substring(this._sectionStart, this._index);
  39771. };
  39772. Tokenizer.prototype._emitToken = function(name){
  39773. this._cbs[name](this._getSection());
  39774. this._sectionStart = -1;
  39775. };
  39776. Tokenizer.prototype._emitPartial = function(value){
  39777. if(this._baseState !== TEXT){
  39778. this._cbs.onattribdata(value); //TODO implement the new event
  39779. } else {
  39780. this._cbs.ontext(value);
  39781. }
  39782. };
  39783. /***/ }),
  39784. /* 378 */
  39785. /***/ (function(module, exports, __webpack_require__) {
  39786. var decodeMap = __webpack_require__(639);
  39787. module.exports = decodeCodePoint;
  39788. // modified version of https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119
  39789. function decodeCodePoint(codePoint){
  39790. if((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF){
  39791. return "\uFFFD";
  39792. }
  39793. if(codePoint in decodeMap){
  39794. codePoint = decodeMap[codePoint];
  39795. }
  39796. var output = "";
  39797. if(codePoint > 0xFFFF){
  39798. codePoint -= 0x10000;
  39799. output += String.fromCharCode(codePoint >>> 10 & 0x3FF | 0xD800);
  39800. codePoint = 0xDC00 | codePoint & 0x3FF;
  39801. }
  39802. output += String.fromCharCode(codePoint);
  39803. return output;
  39804. }
  39805. /***/ }),
  39806. /* 379 */
  39807. /***/ (function(module, exports) {
  39808. module.exports = {"Aacute":"Á","aacute":"á","Acirc":"Â","acirc":"â","acute":"´","AElig":"Æ","aelig":"æ","Agrave":"À","agrave":"à","amp":"&","AMP":"&","Aring":"Å","aring":"å","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","brvbar":"¦","Ccedil":"Ç","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","COPY":"©","curren":"¤","deg":"°","divide":"÷","Eacute":"É","eacute":"é","Ecirc":"Ê","ecirc":"ê","Egrave":"È","egrave":"è","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","GT":">","Iacute":"Í","iacute":"í","Icirc":"Î","icirc":"î","iexcl":"¡","Igrave":"Ì","igrave":"ì","iquest":"¿","Iuml":"Ï","iuml":"ï","laquo":"«","lt":"<","LT":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","Ntilde":"Ñ","ntilde":"ñ","Oacute":"Ó","oacute":"ó","Ocirc":"Ô","ocirc":"ô","Ograve":"Ò","ograve":"ò","ordf":"ª","ordm":"º","Oslash":"Ø","oslash":"ø","Otilde":"Õ","otilde":"õ","Ouml":"Ö","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\"","QUOT":"\"","raquo":"»","reg":"®","REG":"®","sect":"§","shy":"­","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","THORN":"Þ","thorn":"þ","times":"×","Uacute":"Ú","uacute":"ú","Ucirc":"Û","ucirc":"û","Ugrave":"Ù","ugrave":"ù","uml":"¨","Uuml":"Ü","uuml":"ü","Yacute":"Ý","yacute":"ý","yen":"¥","yuml":"ÿ"}
  39809. /***/ }),
  39810. /* 380 */
  39811. /***/ (function(module, exports) {
  39812. // This object will be used as the prototype for Nodes when creating a
  39813. // DOM-Level-1-compliant structure.
  39814. var NodePrototype = module.exports = {
  39815. get firstChild() {
  39816. var children = this.children;
  39817. return children && children[0] || null;
  39818. },
  39819. get lastChild() {
  39820. var children = this.children;
  39821. return children && children[children.length - 1] || null;
  39822. },
  39823. get nodeType() {
  39824. return nodeTypes[this.type] || nodeTypes.element;
  39825. }
  39826. };
  39827. var domLvl1 = {
  39828. tagName: "name",
  39829. childNodes: "children",
  39830. parentNode: "parent",
  39831. previousSibling: "prev",
  39832. nextSibling: "next",
  39833. nodeValue: "data"
  39834. };
  39835. var nodeTypes = {
  39836. element: 1,
  39837. text: 3,
  39838. cdata: 4,
  39839. comment: 8
  39840. };
  39841. Object.keys(domLvl1).forEach(function(key) {
  39842. var shorthand = domLvl1[key];
  39843. Object.defineProperty(NodePrototype, key, {
  39844. get: function() {
  39845. return this[shorthand] || null;
  39846. },
  39847. set: function(val) {
  39848. this[shorthand] = val;
  39849. return val;
  39850. }
  39851. });
  39852. });
  39853. /***/ }),
  39854. /* 381 */
  39855. /***/ (function(module, exports, __webpack_require__) {
  39856. module.exports = Stream;
  39857. var Parser = __webpack_require__(376),
  39858. WritableStream = __webpack_require__(10).Writable || __webpack_require__(645).Writable,
  39859. StringDecoder = __webpack_require__(150).StringDecoder,
  39860. Buffer = __webpack_require__(21).Buffer;
  39861. function Stream(cbs, options){
  39862. var parser = this._parser = new Parser(cbs, options);
  39863. var decoder = this._decoder = new StringDecoder();
  39864. WritableStream.call(this, {decodeStrings: false});
  39865. this.once("finish", function(){
  39866. parser.end(decoder.end());
  39867. });
  39868. }
  39869. __webpack_require__(33)(Stream, WritableStream);
  39870. WritableStream.prototype._write = function(chunk, encoding, cb){
  39871. if(chunk instanceof Buffer) chunk = this._decoder.write(chunk);
  39872. this._parser.write(chunk);
  39873. cb();
  39874. };
  39875. /***/ }),
  39876. /* 382 */
  39877. /***/ (function(module, exports, __webpack_require__) {
  39878. "use strict";
  39879. // Copyright Joyent, Inc. and other Node contributors.
  39880. //
  39881. // Permission is hereby granted, free of charge, to any person obtaining a
  39882. // copy of this software and associated documentation files (the
  39883. // "Software"), to deal in the Software without restriction, including
  39884. // without limitation the rights to use, copy, modify, merge, publish,
  39885. // distribute, sublicense, and/or sell copies of the Software, and to permit
  39886. // persons to whom the Software is furnished to do so, subject to the
  39887. // following conditions:
  39888. //
  39889. // The above copyright notice and this permission notice shall be included
  39890. // in all copies or substantial portions of the Software.
  39891. //
  39892. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  39893. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  39894. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  39895. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  39896. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  39897. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  39898. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  39899. /*<replacement>*/
  39900. var processNextTick = __webpack_require__(115);
  39901. /*</replacement>*/
  39902. module.exports = Readable;
  39903. /*<replacement>*/
  39904. var isArray = __webpack_require__(646);
  39905. /*</replacement>*/
  39906. /*<replacement>*/
  39907. var Duplex;
  39908. /*</replacement>*/
  39909. Readable.ReadableState = ReadableState;
  39910. /*<replacement>*/
  39911. var EE = __webpack_require__(156).EventEmitter;
  39912. var EElistenerCount = function (emitter, type) {
  39913. return emitter.listeners(type).length;
  39914. };
  39915. /*</replacement>*/
  39916. /*<replacement>*/
  39917. var Stream = __webpack_require__(383);
  39918. /*</replacement>*/
  39919. // TODO(bmeurer): Change this back to const once hole checks are
  39920. // properly optimized away early in Ignition+TurboFan.
  39921. /*<replacement>*/
  39922. var Buffer = __webpack_require__(30).Buffer;
  39923. var OurUint8Array = global.Uint8Array || function () {};
  39924. function _uint8ArrayToBuffer(chunk) {
  39925. return Buffer.from(chunk);
  39926. }
  39927. function _isUint8Array(obj) {
  39928. return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
  39929. }
  39930. /*</replacement>*/
  39931. /*<replacement>*/
  39932. var util = __webpack_require__(61);
  39933. util.inherits = __webpack_require__(33);
  39934. /*</replacement>*/
  39935. /*<replacement>*/
  39936. var debugUtil = __webpack_require__(2);
  39937. var debug = void 0;
  39938. if (debugUtil && debugUtil.debuglog) {
  39939. debug = debugUtil.debuglog('stream');
  39940. } else {
  39941. debug = function () {};
  39942. }
  39943. /*</replacement>*/
  39944. var BufferList = __webpack_require__(647);
  39945. var destroyImpl = __webpack_require__(384);
  39946. var StringDecoder;
  39947. util.inherits(Readable, Stream);
  39948. var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
  39949. function prependListener(emitter, event, fn) {
  39950. // Sadly this is not cacheable as some libraries bundle their own
  39951. // event emitter implementation with them.
  39952. if (typeof emitter.prependListener === 'function') {
  39953. return emitter.prependListener(event, fn);
  39954. } else {
  39955. // This is a hack to make sure that our error handler is attached before any
  39956. // userland ones. NEVER DO THIS. This is here only because this code needs
  39957. // to continue to work with older versions of Node.js that do not include
  39958. // the prependListener() method. The goal is to eventually remove this hack.
  39959. if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
  39960. }
  39961. }
  39962. function ReadableState(options, stream) {
  39963. Duplex = Duplex || __webpack_require__(64);
  39964. options = options || {};
  39965. // object stream flag. Used to make read(n) ignore n and to
  39966. // make all the buffer merging and length checks go away
  39967. this.objectMode = !!options.objectMode;
  39968. if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
  39969. // the point at which it stops calling _read() to fill the buffer
  39970. // Note: 0 is a valid value, means "don't call _read preemptively ever"
  39971. var hwm = options.highWaterMark;
  39972. var defaultHwm = this.objectMode ? 16 : 16 * 1024;
  39973. this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
  39974. // cast to ints.
  39975. this.highWaterMark = Math.floor(this.highWaterMark);
  39976. // A linked list is used to store data chunks instead of an array because the
  39977. // linked list can remove elements from the beginning faster than
  39978. // array.shift()
  39979. this.buffer = new BufferList();
  39980. this.length = 0;
  39981. this.pipes = null;
  39982. this.pipesCount = 0;
  39983. this.flowing = null;
  39984. this.ended = false;
  39985. this.endEmitted = false;
  39986. this.reading = false;
  39987. // a flag to be able to tell if the event 'readable'/'data' is emitted
  39988. // immediately, or on a later tick. We set this to true at first, because
  39989. // any actions that shouldn't happen until "later" should generally also
  39990. // not happen before the first read call.
  39991. this.sync = true;
  39992. // whenever we return null, then we set a flag to say
  39993. // that we're awaiting a 'readable' event emission.
  39994. this.needReadable = false;
  39995. this.emittedReadable = false;
  39996. this.readableListening = false;
  39997. this.resumeScheduled = false;
  39998. // has it been destroyed
  39999. this.destroyed = false;
  40000. // Crypto is kind of old and crusty. Historically, its default string
  40001. // encoding is 'binary' so we have to make this configurable.
  40002. // Everything else in the universe uses 'utf8', though.
  40003. this.defaultEncoding = options.defaultEncoding || 'utf8';
  40004. // the number of writers that are awaiting a drain event in .pipe()s
  40005. this.awaitDrain = 0;
  40006. // if true, a maybeReadMore has been scheduled
  40007. this.readingMore = false;
  40008. this.decoder = null;
  40009. this.encoding = null;
  40010. if (options.encoding) {
  40011. if (!StringDecoder) StringDecoder = __webpack_require__(386).StringDecoder;
  40012. this.decoder = new StringDecoder(options.encoding);
  40013. this.encoding = options.encoding;
  40014. }
  40015. }
  40016. function Readable(options) {
  40017. Duplex = Duplex || __webpack_require__(64);
  40018. if (!(this instanceof Readable)) return new Readable(options);
  40019. this._readableState = new ReadableState(options, this);
  40020. // legacy
  40021. this.readable = true;
  40022. if (options) {
  40023. if (typeof options.read === 'function') this._read = options.read;
  40024. if (typeof options.destroy === 'function') this._destroy = options.destroy;
  40025. }
  40026. Stream.call(this);
  40027. }
  40028. Object.defineProperty(Readable.prototype, 'destroyed', {
  40029. get: function () {
  40030. if (this._readableState === undefined) {
  40031. return false;
  40032. }
  40033. return this._readableState.destroyed;
  40034. },
  40035. set: function (value) {
  40036. // we ignore the value if the stream
  40037. // has not been initialized yet
  40038. if (!this._readableState) {
  40039. return;
  40040. }
  40041. // backward compatibility, the user is explicitly
  40042. // managing destroyed
  40043. this._readableState.destroyed = value;
  40044. }
  40045. });
  40046. Readable.prototype.destroy = destroyImpl.destroy;
  40047. Readable.prototype._undestroy = destroyImpl.undestroy;
  40048. Readable.prototype._destroy = function (err, cb) {
  40049. this.push(null);
  40050. cb(err);
  40051. };
  40052. // Manually shove something into the read() buffer.
  40053. // This returns true if the highWaterMark has not been hit yet,
  40054. // similar to how Writable.write() returns true if you should
  40055. // write() some more.
  40056. Readable.prototype.push = function (chunk, encoding) {
  40057. var state = this._readableState;
  40058. var skipChunkCheck;
  40059. if (!state.objectMode) {
  40060. if (typeof chunk === 'string') {
  40061. encoding = encoding || state.defaultEncoding;
  40062. if (encoding !== state.encoding) {
  40063. chunk = Buffer.from(chunk, encoding);
  40064. encoding = '';
  40065. }
  40066. skipChunkCheck = true;
  40067. }
  40068. } else {
  40069. skipChunkCheck = true;
  40070. }
  40071. return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
  40072. };
  40073. // Unshift should *always* be something directly out of read()
  40074. Readable.prototype.unshift = function (chunk) {
  40075. return readableAddChunk(this, chunk, null, true, false);
  40076. };
  40077. function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
  40078. var state = stream._readableState;
  40079. if (chunk === null) {
  40080. state.reading = false;
  40081. onEofChunk(stream, state);
  40082. } else {
  40083. var er;
  40084. if (!skipChunkCheck) er = chunkInvalid(state, chunk);
  40085. if (er) {
  40086. stream.emit('error', er);
  40087. } else if (state.objectMode || chunk && chunk.length > 0) {
  40088. if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
  40089. chunk = _uint8ArrayToBuffer(chunk);
  40090. }
  40091. if (addToFront) {
  40092. if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
  40093. } else if (state.ended) {
  40094. stream.emit('error', new Error('stream.push() after EOF'));
  40095. } else {
  40096. state.reading = false;
  40097. if (state.decoder && !encoding) {
  40098. chunk = state.decoder.write(chunk);
  40099. if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
  40100. } else {
  40101. addChunk(stream, state, chunk, false);
  40102. }
  40103. }
  40104. } else if (!addToFront) {
  40105. state.reading = false;
  40106. }
  40107. }
  40108. return needMoreData(state);
  40109. }
  40110. function addChunk(stream, state, chunk, addToFront) {
  40111. if (state.flowing && state.length === 0 && !state.sync) {
  40112. stream.emit('data', chunk);
  40113. stream.read(0);
  40114. } else {
  40115. // update the buffer info.
  40116. state.length += state.objectMode ? 1 : chunk.length;
  40117. if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
  40118. if (state.needReadable) emitReadable(stream);
  40119. }
  40120. maybeReadMore(stream, state);
  40121. }
  40122. function chunkInvalid(state, chunk) {
  40123. var er;
  40124. if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
  40125. er = new TypeError('Invalid non-string/buffer chunk');
  40126. }
  40127. return er;
  40128. }
  40129. // if it's past the high water mark, we can push in some more.
  40130. // Also, if we have no data yet, we can stand some
  40131. // more bytes. This is to work around cases where hwm=0,
  40132. // such as the repl. Also, if the push() triggered a
  40133. // readable event, and the user called read(largeNumber) such that
  40134. // needReadable was set, then we ought to push more, so that another
  40135. // 'readable' event will be triggered.
  40136. function needMoreData(state) {
  40137. return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
  40138. }
  40139. Readable.prototype.isPaused = function () {
  40140. return this._readableState.flowing === false;
  40141. };
  40142. // backwards compatibility.
  40143. Readable.prototype.setEncoding = function (enc) {
  40144. if (!StringDecoder) StringDecoder = __webpack_require__(386).StringDecoder;
  40145. this._readableState.decoder = new StringDecoder(enc);
  40146. this._readableState.encoding = enc;
  40147. return this;
  40148. };
  40149. // Don't raise the hwm > 8MB
  40150. var MAX_HWM = 0x800000;
  40151. function computeNewHighWaterMark(n) {
  40152. if (n >= MAX_HWM) {
  40153. n = MAX_HWM;
  40154. } else {
  40155. // Get the next highest power of 2 to prevent increasing hwm excessively in
  40156. // tiny amounts
  40157. n--;
  40158. n |= n >>> 1;
  40159. n |= n >>> 2;
  40160. n |= n >>> 4;
  40161. n |= n >>> 8;
  40162. n |= n >>> 16;
  40163. n++;
  40164. }
  40165. return n;
  40166. }
  40167. // This function is designed to be inlinable, so please take care when making
  40168. // changes to the function body.
  40169. function howMuchToRead(n, state) {
  40170. if (n <= 0 || state.length === 0 && state.ended) return 0;
  40171. if (state.objectMode) return 1;
  40172. if (n !== n) {
  40173. // Only flow one buffer at a time
  40174. if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
  40175. }
  40176. // If we're asking for more than the current hwm, then raise the hwm.
  40177. if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
  40178. if (n <= state.length) return n;
  40179. // Don't have enough
  40180. if (!state.ended) {
  40181. state.needReadable = true;
  40182. return 0;
  40183. }
  40184. return state.length;
  40185. }
  40186. // you can override either this method, or the async _read(n) below.
  40187. Readable.prototype.read = function (n) {
  40188. debug('read', n);
  40189. n = parseInt(n, 10);
  40190. var state = this._readableState;
  40191. var nOrig = n;
  40192. if (n !== 0) state.emittedReadable = false;
  40193. // if we're doing read(0) to trigger a readable event, but we
  40194. // already have a bunch of data in the buffer, then just trigger
  40195. // the 'readable' event and move on.
  40196. if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
  40197. debug('read: emitReadable', state.length, state.ended);
  40198. if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
  40199. return null;
  40200. }
  40201. n = howMuchToRead(n, state);
  40202. // if we've ended, and we're now clear, then finish it up.
  40203. if (n === 0 && state.ended) {
  40204. if (state.length === 0) endReadable(this);
  40205. return null;
  40206. }
  40207. // All the actual chunk generation logic needs to be
  40208. // *below* the call to _read. The reason is that in certain
  40209. // synthetic stream cases, such as passthrough streams, _read
  40210. // may be a completely synchronous operation which may change
  40211. // the state of the read buffer, providing enough data when
  40212. // before there was *not* enough.
  40213. //
  40214. // So, the steps are:
  40215. // 1. Figure out what the state of things will be after we do
  40216. // a read from the buffer.
  40217. //
  40218. // 2. If that resulting state will trigger a _read, then call _read.
  40219. // Note that this may be asynchronous, or synchronous. Yes, it is
  40220. // deeply ugly to write APIs this way, but that still doesn't mean
  40221. // that the Readable class should behave improperly, as streams are
  40222. // designed to be sync/async agnostic.
  40223. // Take note if the _read call is sync or async (ie, if the read call
  40224. // has returned yet), so that we know whether or not it's safe to emit
  40225. // 'readable' etc.
  40226. //
  40227. // 3. Actually pull the requested chunks out of the buffer and return.
  40228. // if we need a readable event, then we need to do some reading.
  40229. var doRead = state.needReadable;
  40230. debug('need readable', doRead);
  40231. // if we currently have less than the highWaterMark, then also read some
  40232. if (state.length === 0 || state.length - n < state.highWaterMark) {
  40233. doRead = true;
  40234. debug('length less than watermark', doRead);
  40235. }
  40236. // however, if we've ended, then there's no point, and if we're already
  40237. // reading, then it's unnecessary.
  40238. if (state.ended || state.reading) {
  40239. doRead = false;
  40240. debug('reading or ended', doRead);
  40241. } else if (doRead) {
  40242. debug('do read');
  40243. state.reading = true;
  40244. state.sync = true;
  40245. // if the length is currently zero, then we *need* a readable event.
  40246. if (state.length === 0) state.needReadable = true;
  40247. // call internal read method
  40248. this._read(state.highWaterMark);
  40249. state.sync = false;
  40250. // If _read pushed data synchronously, then `reading` will be false,
  40251. // and we need to re-evaluate how much data we can return to the user.
  40252. if (!state.reading) n = howMuchToRead(nOrig, state);
  40253. }
  40254. var ret;
  40255. if (n > 0) ret = fromList(n, state);else ret = null;
  40256. if (ret === null) {
  40257. state.needReadable = true;
  40258. n = 0;
  40259. } else {
  40260. state.length -= n;
  40261. }
  40262. if (state.length === 0) {
  40263. // If we have nothing in the buffer, then we want to know
  40264. // as soon as we *do* get something into the buffer.
  40265. if (!state.ended) state.needReadable = true;
  40266. // If we tried to read() past the EOF, then emit end on the next tick.
  40267. if (nOrig !== n && state.ended) endReadable(this);
  40268. }
  40269. if (ret !== null) this.emit('data', ret);
  40270. return ret;
  40271. };
  40272. function onEofChunk(stream, state) {
  40273. if (state.ended) return;
  40274. if (state.decoder) {
  40275. var chunk = state.decoder.end();
  40276. if (chunk && chunk.length) {
  40277. state.buffer.push(chunk);
  40278. state.length += state.objectMode ? 1 : chunk.length;
  40279. }
  40280. }
  40281. state.ended = true;
  40282. // emit 'readable' now to make sure it gets picked up.
  40283. emitReadable(stream);
  40284. }
  40285. // Don't emit readable right away in sync mode, because this can trigger
  40286. // another read() call => stack overflow. This way, it might trigger
  40287. // a nextTick recursion warning, but that's not so bad.
  40288. function emitReadable(stream) {
  40289. var state = stream._readableState;
  40290. state.needReadable = false;
  40291. if (!state.emittedReadable) {
  40292. debug('emitReadable', state.flowing);
  40293. state.emittedReadable = true;
  40294. if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);
  40295. }
  40296. }
  40297. function emitReadable_(stream) {
  40298. debug('emit readable');
  40299. stream.emit('readable');
  40300. flow(stream);
  40301. }
  40302. // at this point, the user has presumably seen the 'readable' event,
  40303. // and called read() to consume some data. that may have triggered
  40304. // in turn another _read(n) call, in which case reading = true if
  40305. // it's in progress.
  40306. // However, if we're not ended, or reading, and the length < hwm,
  40307. // then go ahead and try to read some more preemptively.
  40308. function maybeReadMore(stream, state) {
  40309. if (!state.readingMore) {
  40310. state.readingMore = true;
  40311. processNextTick(maybeReadMore_, stream, state);
  40312. }
  40313. }
  40314. function maybeReadMore_(stream, state) {
  40315. var len = state.length;
  40316. while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
  40317. debug('maybeReadMore read 0');
  40318. stream.read(0);
  40319. if (len === state.length)
  40320. // didn't get any data, stop spinning.
  40321. break;else len = state.length;
  40322. }
  40323. state.readingMore = false;
  40324. }
  40325. // abstract method. to be overridden in specific implementation classes.
  40326. // call cb(er, data) where data is <= n in length.
  40327. // for virtual (non-string, non-buffer) streams, "length" is somewhat
  40328. // arbitrary, and perhaps not very meaningful.
  40329. Readable.prototype._read = function (n) {
  40330. this.emit('error', new Error('_read() is not implemented'));
  40331. };
  40332. Readable.prototype.pipe = function (dest, pipeOpts) {
  40333. var src = this;
  40334. var state = this._readableState;
  40335. switch (state.pipesCount) {
  40336. case 0:
  40337. state.pipes = dest;
  40338. break;
  40339. case 1:
  40340. state.pipes = [state.pipes, dest];
  40341. break;
  40342. default:
  40343. state.pipes.push(dest);
  40344. break;
  40345. }
  40346. state.pipesCount += 1;
  40347. debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
  40348. var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
  40349. var endFn = doEnd ? onend : unpipe;
  40350. if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn);
  40351. dest.on('unpipe', onunpipe);
  40352. function onunpipe(readable, unpipeInfo) {
  40353. debug('onunpipe');
  40354. if (readable === src) {
  40355. if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
  40356. unpipeInfo.hasUnpiped = true;
  40357. cleanup();
  40358. }
  40359. }
  40360. }
  40361. function onend() {
  40362. debug('onend');
  40363. dest.end();
  40364. }
  40365. // when the dest drains, it reduces the awaitDrain counter
  40366. // on the source. This would be more elegant with a .once()
  40367. // handler in flow(), but adding and removing repeatedly is
  40368. // too slow.
  40369. var ondrain = pipeOnDrain(src);
  40370. dest.on('drain', ondrain);
  40371. var cleanedUp = false;
  40372. function cleanup() {
  40373. debug('cleanup');
  40374. // cleanup event handlers once the pipe is broken
  40375. dest.removeListener('close', onclose);
  40376. dest.removeListener('finish', onfinish);
  40377. dest.removeListener('drain', ondrain);
  40378. dest.removeListener('error', onerror);
  40379. dest.removeListener('unpipe', onunpipe);
  40380. src.removeListener('end', onend);
  40381. src.removeListener('end', unpipe);
  40382. src.removeListener('data', ondata);
  40383. cleanedUp = true;
  40384. // if the reader is waiting for a drain event from this
  40385. // specific writer, then it would cause it to never start
  40386. // flowing again.
  40387. // So, if this is awaiting a drain, then we just call it now.
  40388. // If we don't know, then assume that we are waiting for one.
  40389. if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
  40390. }
  40391. // If the user pushes more data while we're writing to dest then we'll end up
  40392. // in ondata again. However, we only want to increase awaitDrain once because
  40393. // dest will only emit one 'drain' event for the multiple writes.
  40394. // => Introduce a guard on increasing awaitDrain.
  40395. var increasedAwaitDrain = false;
  40396. src.on('data', ondata);
  40397. function ondata(chunk) {
  40398. debug('ondata');
  40399. increasedAwaitDrain = false;
  40400. var ret = dest.write(chunk);
  40401. if (false === ret && !increasedAwaitDrain) {
  40402. // If the user unpiped during `dest.write()`, it is possible
  40403. // to get stuck in a permanently paused state if that write
  40404. // also returned false.
  40405. // => Check whether `dest` is still a piping destination.
  40406. if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
  40407. debug('false write response, pause', src._readableState.awaitDrain);
  40408. src._readableState.awaitDrain++;
  40409. increasedAwaitDrain = true;
  40410. }
  40411. src.pause();
  40412. }
  40413. }
  40414. // if the dest has an error, then stop piping into it.
  40415. // however, don't suppress the throwing behavior for this.
  40416. function onerror(er) {
  40417. debug('onerror', er);
  40418. unpipe();
  40419. dest.removeListener('error', onerror);
  40420. if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
  40421. }
  40422. // Make sure our error handler is attached before userland ones.
  40423. prependListener(dest, 'error', onerror);
  40424. // Both close and finish should trigger unpipe, but only once.
  40425. function onclose() {
  40426. dest.removeListener('finish', onfinish);
  40427. unpipe();
  40428. }
  40429. dest.once('close', onclose);
  40430. function onfinish() {
  40431. debug('onfinish');
  40432. dest.removeListener('close', onclose);
  40433. unpipe();
  40434. }
  40435. dest.once('finish', onfinish);
  40436. function unpipe() {
  40437. debug('unpipe');
  40438. src.unpipe(dest);
  40439. }
  40440. // tell the dest that it's being piped to
  40441. dest.emit('pipe', src);
  40442. // start the flow if it hasn't been started already.
  40443. if (!state.flowing) {
  40444. debug('pipe resume');
  40445. src.resume();
  40446. }
  40447. return dest;
  40448. };
  40449. function pipeOnDrain(src) {
  40450. return function () {
  40451. var state = src._readableState;
  40452. debug('pipeOnDrain', state.awaitDrain);
  40453. if (state.awaitDrain) state.awaitDrain--;
  40454. if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
  40455. state.flowing = true;
  40456. flow(src);
  40457. }
  40458. };
  40459. }
  40460. Readable.prototype.unpipe = function (dest) {
  40461. var state = this._readableState;
  40462. var unpipeInfo = { hasUnpiped: false };
  40463. // if we're not piping anywhere, then do nothing.
  40464. if (state.pipesCount === 0) return this;
  40465. // just one destination. most common case.
  40466. if (state.pipesCount === 1) {
  40467. // passed in one, but it's not the right one.
  40468. if (dest && dest !== state.pipes) return this;
  40469. if (!dest) dest = state.pipes;
  40470. // got a match.
  40471. state.pipes = null;
  40472. state.pipesCount = 0;
  40473. state.flowing = false;
  40474. if (dest) dest.emit('unpipe', this, unpipeInfo);
  40475. return this;
  40476. }
  40477. // slow case. multiple pipe destinations.
  40478. if (!dest) {
  40479. // remove all.
  40480. var dests = state.pipes;
  40481. var len = state.pipesCount;
  40482. state.pipes = null;
  40483. state.pipesCount = 0;
  40484. state.flowing = false;
  40485. for (var i = 0; i < len; i++) {
  40486. dests[i].emit('unpipe', this, unpipeInfo);
  40487. }return this;
  40488. }
  40489. // try to find the right one.
  40490. var index = indexOf(state.pipes, dest);
  40491. if (index === -1) return this;
  40492. state.pipes.splice(index, 1);
  40493. state.pipesCount -= 1;
  40494. if (state.pipesCount === 1) state.pipes = state.pipes[0];
  40495. dest.emit('unpipe', this, unpipeInfo);
  40496. return this;
  40497. };
  40498. // set up data events if they are asked for
  40499. // Ensure readable listeners eventually get something
  40500. Readable.prototype.on = function (ev, fn) {
  40501. var res = Stream.prototype.on.call(this, ev, fn);
  40502. if (ev === 'data') {
  40503. // Start flowing on next tick if stream isn't explicitly paused
  40504. if (this._readableState.flowing !== false) this.resume();
  40505. } else if (ev === 'readable') {
  40506. var state = this._readableState;
  40507. if (!state.endEmitted && !state.readableListening) {
  40508. state.readableListening = state.needReadable = true;
  40509. state.emittedReadable = false;
  40510. if (!state.reading) {
  40511. processNextTick(nReadingNextTick, this);
  40512. } else if (state.length) {
  40513. emitReadable(this);
  40514. }
  40515. }
  40516. }
  40517. return res;
  40518. };
  40519. Readable.prototype.addListener = Readable.prototype.on;
  40520. function nReadingNextTick(self) {
  40521. debug('readable nexttick read 0');
  40522. self.read(0);
  40523. }
  40524. // pause() and resume() are remnants of the legacy readable stream API
  40525. // If the user uses them, then switch into old mode.
  40526. Readable.prototype.resume = function () {
  40527. var state = this._readableState;
  40528. if (!state.flowing) {
  40529. debug('resume');
  40530. state.flowing = true;
  40531. resume(this, state);
  40532. }
  40533. return this;
  40534. };
  40535. function resume(stream, state) {
  40536. if (!state.resumeScheduled) {
  40537. state.resumeScheduled = true;
  40538. processNextTick(resume_, stream, state);
  40539. }
  40540. }
  40541. function resume_(stream, state) {
  40542. if (!state.reading) {
  40543. debug('resume read 0');
  40544. stream.read(0);
  40545. }
  40546. state.resumeScheduled = false;
  40547. state.awaitDrain = 0;
  40548. stream.emit('resume');
  40549. flow(stream);
  40550. if (state.flowing && !state.reading) stream.read(0);
  40551. }
  40552. Readable.prototype.pause = function () {
  40553. debug('call pause flowing=%j', this._readableState.flowing);
  40554. if (false !== this._readableState.flowing) {
  40555. debug('pause');
  40556. this._readableState.flowing = false;
  40557. this.emit('pause');
  40558. }
  40559. return this;
  40560. };
  40561. function flow(stream) {
  40562. var state = stream._readableState;
  40563. debug('flow', state.flowing);
  40564. while (state.flowing && stream.read() !== null) {}
  40565. }
  40566. // wrap an old-style stream as the async data source.
  40567. // This is *not* part of the readable stream interface.
  40568. // It is an ugly unfortunate mess of history.
  40569. Readable.prototype.wrap = function (stream) {
  40570. var state = this._readableState;
  40571. var paused = false;
  40572. var self = this;
  40573. stream.on('end', function () {
  40574. debug('wrapped end');
  40575. if (state.decoder && !state.ended) {
  40576. var chunk = state.decoder.end();
  40577. if (chunk && chunk.length) self.push(chunk);
  40578. }
  40579. self.push(null);
  40580. });
  40581. stream.on('data', function (chunk) {
  40582. debug('wrapped data');
  40583. if (state.decoder) chunk = state.decoder.write(chunk);
  40584. // don't skip over falsy values in objectMode
  40585. if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
  40586. var ret = self.push(chunk);
  40587. if (!ret) {
  40588. paused = true;
  40589. stream.pause();
  40590. }
  40591. });
  40592. // proxy all the other methods.
  40593. // important when wrapping filters and duplexes.
  40594. for (var i in stream) {
  40595. if (this[i] === undefined && typeof stream[i] === 'function') {
  40596. this[i] = function (method) {
  40597. return function () {
  40598. return stream[method].apply(stream, arguments);
  40599. };
  40600. }(i);
  40601. }
  40602. }
  40603. // proxy certain important events.
  40604. for (var n = 0; n < kProxyEvents.length; n++) {
  40605. stream.on(kProxyEvents[n], self.emit.bind(self, kProxyEvents[n]));
  40606. }
  40607. // when we try to consume some more bytes, simply unpause the
  40608. // underlying stream.
  40609. self._read = function (n) {
  40610. debug('wrapped _read', n);
  40611. if (paused) {
  40612. paused = false;
  40613. stream.resume();
  40614. }
  40615. };
  40616. return self;
  40617. };
  40618. // exposed for testing purposes only.
  40619. Readable._fromList = fromList;
  40620. // Pluck off n bytes from an array of buffers.
  40621. // Length is the combined lengths of all the buffers in the list.
  40622. // This function is designed to be inlinable, so please take care when making
  40623. // changes to the function body.
  40624. function fromList(n, state) {
  40625. // nothing buffered
  40626. if (state.length === 0) return null;
  40627. var ret;
  40628. if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
  40629. // read it all, truncate the list
  40630. if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
  40631. state.buffer.clear();
  40632. } else {
  40633. // read part of list
  40634. ret = fromListPartial(n, state.buffer, state.decoder);
  40635. }
  40636. return ret;
  40637. }
  40638. // Extracts only enough buffered data to satisfy the amount requested.
  40639. // This function is designed to be inlinable, so please take care when making
  40640. // changes to the function body.
  40641. function fromListPartial(n, list, hasStrings) {
  40642. var ret;
  40643. if (n < list.head.data.length) {
  40644. // slice is the same for buffers and strings
  40645. ret = list.head.data.slice(0, n);
  40646. list.head.data = list.head.data.slice(n);
  40647. } else if (n === list.head.data.length) {
  40648. // first chunk is a perfect match
  40649. ret = list.shift();
  40650. } else {
  40651. // result spans more than one buffer
  40652. ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
  40653. }
  40654. return ret;
  40655. }
  40656. // Copies a specified amount of characters from the list of buffered data
  40657. // chunks.
  40658. // This function is designed to be inlinable, so please take care when making
  40659. // changes to the function body.
  40660. function copyFromBufferString(n, list) {
  40661. var p = list.head;
  40662. var c = 1;
  40663. var ret = p.data;
  40664. n -= ret.length;
  40665. while (p = p.next) {
  40666. var str = p.data;
  40667. var nb = n > str.length ? str.length : n;
  40668. if (nb === str.length) ret += str;else ret += str.slice(0, n);
  40669. n -= nb;
  40670. if (n === 0) {
  40671. if (nb === str.length) {
  40672. ++c;
  40673. if (p.next) list.head = p.next;else list.head = list.tail = null;
  40674. } else {
  40675. list.head = p;
  40676. p.data = str.slice(nb);
  40677. }
  40678. break;
  40679. }
  40680. ++c;
  40681. }
  40682. list.length -= c;
  40683. return ret;
  40684. }
  40685. // Copies a specified amount of bytes from the list of buffered data chunks.
  40686. // This function is designed to be inlinable, so please take care when making
  40687. // changes to the function body.
  40688. function copyFromBuffer(n, list) {
  40689. var ret = Buffer.allocUnsafe(n);
  40690. var p = list.head;
  40691. var c = 1;
  40692. p.data.copy(ret);
  40693. n -= p.data.length;
  40694. while (p = p.next) {
  40695. var buf = p.data;
  40696. var nb = n > buf.length ? buf.length : n;
  40697. buf.copy(ret, ret.length - n, 0, nb);
  40698. n -= nb;
  40699. if (n === 0) {
  40700. if (nb === buf.length) {
  40701. ++c;
  40702. if (p.next) list.head = p.next;else list.head = list.tail = null;
  40703. } else {
  40704. list.head = p;
  40705. p.data = buf.slice(nb);
  40706. }
  40707. break;
  40708. }
  40709. ++c;
  40710. }
  40711. list.length -= c;
  40712. return ret;
  40713. }
  40714. function endReadable(stream) {
  40715. var state = stream._readableState;
  40716. // If we get here before consuming all the bytes, then that is a
  40717. // bug in node. Should never happen.
  40718. if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
  40719. if (!state.endEmitted) {
  40720. state.ended = true;
  40721. processNextTick(endReadableNT, state, stream);
  40722. }
  40723. }
  40724. function endReadableNT(state, stream) {
  40725. // Check that we didn't get one last unshift.
  40726. if (!state.endEmitted && state.length === 0) {
  40727. state.endEmitted = true;
  40728. stream.readable = false;
  40729. stream.emit('end');
  40730. }
  40731. }
  40732. function forEach(xs, f) {
  40733. for (var i = 0, l = xs.length; i < l; i++) {
  40734. f(xs[i], i);
  40735. }
  40736. }
  40737. function indexOf(xs, x) {
  40738. for (var i = 0, l = xs.length; i < l; i++) {
  40739. if (xs[i] === x) return i;
  40740. }
  40741. return -1;
  40742. }
  40743. /***/ }),
  40744. /* 383 */
  40745. /***/ (function(module, exports, __webpack_require__) {
  40746. module.exports = __webpack_require__(10);
  40747. /***/ }),
  40748. /* 384 */
  40749. /***/ (function(module, exports, __webpack_require__) {
  40750. "use strict";
  40751. /*<replacement>*/
  40752. var processNextTick = __webpack_require__(115);
  40753. /*</replacement>*/
  40754. // undocumented cb() API, needed for core, not for public API
  40755. function destroy(err, cb) {
  40756. var _this = this;
  40757. var readableDestroyed = this._readableState && this._readableState.destroyed;
  40758. var writableDestroyed = this._writableState && this._writableState.destroyed;
  40759. if (readableDestroyed || writableDestroyed) {
  40760. if (cb) {
  40761. cb(err);
  40762. } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
  40763. processNextTick(emitErrorNT, this, err);
  40764. }
  40765. return;
  40766. }
  40767. // we set destroyed to true before firing error callbacks in order
  40768. // to make it re-entrance safe in case destroy() is called within callbacks
  40769. if (this._readableState) {
  40770. this._readableState.destroyed = true;
  40771. }
  40772. // if this is a duplex stream mark the writable part as destroyed as well
  40773. if (this._writableState) {
  40774. this._writableState.destroyed = true;
  40775. }
  40776. this._destroy(err || null, function (err) {
  40777. if (!cb && err) {
  40778. processNextTick(emitErrorNT, _this, err);
  40779. if (_this._writableState) {
  40780. _this._writableState.errorEmitted = true;
  40781. }
  40782. } else if (cb) {
  40783. cb(err);
  40784. }
  40785. });
  40786. }
  40787. function undestroy() {
  40788. if (this._readableState) {
  40789. this._readableState.destroyed = false;
  40790. this._readableState.reading = false;
  40791. this._readableState.ended = false;
  40792. this._readableState.endEmitted = false;
  40793. }
  40794. if (this._writableState) {
  40795. this._writableState.destroyed = false;
  40796. this._writableState.ended = false;
  40797. this._writableState.ending = false;
  40798. this._writableState.finished = false;
  40799. this._writableState.errorEmitted = false;
  40800. }
  40801. }
  40802. function emitErrorNT(self, err) {
  40803. self.emit('error', err);
  40804. }
  40805. module.exports = {
  40806. destroy: destroy,
  40807. undestroy: undestroy
  40808. };
  40809. /***/ }),
  40810. /* 385 */
  40811. /***/ (function(module, exports, __webpack_require__) {
  40812. "use strict";
  40813. // Copyright Joyent, Inc. and other Node contributors.
  40814. //
  40815. // Permission is hereby granted, free of charge, to any person obtaining a
  40816. // copy of this software and associated documentation files (the
  40817. // "Software"), to deal in the Software without restriction, including
  40818. // without limitation the rights to use, copy, modify, merge, publish,
  40819. // distribute, sublicense, and/or sell copies of the Software, and to permit
  40820. // persons to whom the Software is furnished to do so, subject to the
  40821. // following conditions:
  40822. //
  40823. // The above copyright notice and this permission notice shall be included
  40824. // in all copies or substantial portions of the Software.
  40825. //
  40826. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  40827. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  40828. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  40829. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  40830. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  40831. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  40832. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  40833. // A bit simpler than readable streams.
  40834. // Implement an async ._write(chunk, encoding, cb), and it'll handle all
  40835. // the drain event emission and buffering.
  40836. /*<replacement>*/
  40837. var processNextTick = __webpack_require__(115);
  40838. /*</replacement>*/
  40839. module.exports = Writable;
  40840. /* <replacement> */
  40841. function WriteReq(chunk, encoding, cb) {
  40842. this.chunk = chunk;
  40843. this.encoding = encoding;
  40844. this.callback = cb;
  40845. this.next = null;
  40846. }
  40847. // It seems a linked list but it is not
  40848. // there will be only 2 of these for each stream
  40849. function CorkedRequest(state) {
  40850. var _this = this;
  40851. this.next = null;
  40852. this.entry = null;
  40853. this.finish = function () {
  40854. onCorkedFinish(_this, state);
  40855. };
  40856. }
  40857. /* </replacement> */
  40858. /*<replacement>*/
  40859. var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick;
  40860. /*</replacement>*/
  40861. /*<replacement>*/
  40862. var Duplex;
  40863. /*</replacement>*/
  40864. Writable.WritableState = WritableState;
  40865. /*<replacement>*/
  40866. var util = __webpack_require__(61);
  40867. util.inherits = __webpack_require__(33);
  40868. /*</replacement>*/
  40869. /*<replacement>*/
  40870. var internalUtil = {
  40871. deprecate: __webpack_require__(648)
  40872. };
  40873. /*</replacement>*/
  40874. /*<replacement>*/
  40875. var Stream = __webpack_require__(383);
  40876. /*</replacement>*/
  40877. /*<replacement>*/
  40878. var Buffer = __webpack_require__(30).Buffer;
  40879. var OurUint8Array = global.Uint8Array || function () {};
  40880. function _uint8ArrayToBuffer(chunk) {
  40881. return Buffer.from(chunk);
  40882. }
  40883. function _isUint8Array(obj) {
  40884. return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
  40885. }
  40886. /*</replacement>*/
  40887. var destroyImpl = __webpack_require__(384);
  40888. util.inherits(Writable, Stream);
  40889. function nop() {}
  40890. function WritableState(options, stream) {
  40891. Duplex = Duplex || __webpack_require__(64);
  40892. options = options || {};
  40893. // object stream flag to indicate whether or not this stream
  40894. // contains buffers or objects.
  40895. this.objectMode = !!options.objectMode;
  40896. if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
  40897. // the point at which write() starts returning false
  40898. // Note: 0 is a valid value, means that we always return false if
  40899. // the entire buffer is not flushed immediately on write()
  40900. var hwm = options.highWaterMark;
  40901. var defaultHwm = this.objectMode ? 16 : 16 * 1024;
  40902. this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
  40903. // cast to ints.
  40904. this.highWaterMark = Math.floor(this.highWaterMark);
  40905. // if _final has been called
  40906. this.finalCalled = false;
  40907. // drain event flag.
  40908. this.needDrain = false;
  40909. // at the start of calling end()
  40910. this.ending = false;
  40911. // when end() has been called, and returned
  40912. this.ended = false;
  40913. // when 'finish' is emitted
  40914. this.finished = false;
  40915. // has it been destroyed
  40916. this.destroyed = false;
  40917. // should we decode strings into buffers before passing to _write?
  40918. // this is here so that some node-core streams can optimize string
  40919. // handling at a lower level.
  40920. var noDecode = options.decodeStrings === false;
  40921. this.decodeStrings = !noDecode;
  40922. // Crypto is kind of old and crusty. Historically, its default string
  40923. // encoding is 'binary' so we have to make this configurable.
  40924. // Everything else in the universe uses 'utf8', though.
  40925. this.defaultEncoding = options.defaultEncoding || 'utf8';
  40926. // not an actual buffer we keep track of, but a measurement
  40927. // of how much we're waiting to get pushed to some underlying
  40928. // socket or file.
  40929. this.length = 0;
  40930. // a flag to see when we're in the middle of a write.
  40931. this.writing = false;
  40932. // when true all writes will be buffered until .uncork() call
  40933. this.corked = 0;
  40934. // a flag to be able to tell if the onwrite cb is called immediately,
  40935. // or on a later tick. We set this to true at first, because any
  40936. // actions that shouldn't happen until "later" should generally also
  40937. // not happen before the first write call.
  40938. this.sync = true;
  40939. // a flag to know if we're processing previously buffered items, which
  40940. // may call the _write() callback in the same tick, so that we don't
  40941. // end up in an overlapped onwrite situation.
  40942. this.bufferProcessing = false;
  40943. // the callback that's passed to _write(chunk,cb)
  40944. this.onwrite = function (er) {
  40945. onwrite(stream, er);
  40946. };
  40947. // the callback that the user supplies to write(chunk,encoding,cb)
  40948. this.writecb = null;
  40949. // the amount that is being written when _write is called.
  40950. this.writelen = 0;
  40951. this.bufferedRequest = null;
  40952. this.lastBufferedRequest = null;
  40953. // number of pending user-supplied write callbacks
  40954. // this must be 0 before 'finish' can be emitted
  40955. this.pendingcb = 0;
  40956. // emit prefinish if the only thing we're waiting for is _write cbs
  40957. // This is relevant for synchronous Transform streams
  40958. this.prefinished = false;
  40959. // True if the error was already emitted and should not be thrown again
  40960. this.errorEmitted = false;
  40961. // count buffered requests
  40962. this.bufferedRequestCount = 0;
  40963. // allocate the first CorkedRequest, there is always
  40964. // one allocated and free to use, and we maintain at most two
  40965. this.corkedRequestsFree = new CorkedRequest(this);
  40966. }
  40967. WritableState.prototype.getBuffer = function getBuffer() {
  40968. var current = this.bufferedRequest;
  40969. var out = [];
  40970. while (current) {
  40971. out.push(current);
  40972. current = current.next;
  40973. }
  40974. return out;
  40975. };
  40976. (function () {
  40977. try {
  40978. Object.defineProperty(WritableState.prototype, 'buffer', {
  40979. get: internalUtil.deprecate(function () {
  40980. return this.getBuffer();
  40981. }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
  40982. });
  40983. } catch (_) {}
  40984. })();
  40985. // Test _writableState for inheritance to account for Duplex streams,
  40986. // whose prototype chain only points to Readable.
  40987. var realHasInstance;
  40988. if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
  40989. realHasInstance = Function.prototype[Symbol.hasInstance];
  40990. Object.defineProperty(Writable, Symbol.hasInstance, {
  40991. value: function (object) {
  40992. if (realHasInstance.call(this, object)) return true;
  40993. return object && object._writableState instanceof WritableState;
  40994. }
  40995. });
  40996. } else {
  40997. realHasInstance = function (object) {
  40998. return object instanceof this;
  40999. };
  41000. }
  41001. function Writable(options) {
  41002. Duplex = Duplex || __webpack_require__(64);
  41003. // Writable ctor is applied to Duplexes, too.
  41004. // `realHasInstance` is necessary because using plain `instanceof`
  41005. // would return false, as no `_writableState` property is attached.
  41006. // Trying to use the custom `instanceof` for Writable here will also break the
  41007. // Node.js LazyTransform implementation, which has a non-trivial getter for
  41008. // `_writableState` that would lead to infinite recursion.
  41009. if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
  41010. return new Writable(options);
  41011. }
  41012. this._writableState = new WritableState(options, this);
  41013. // legacy.
  41014. this.writable = true;
  41015. if (options) {
  41016. if (typeof options.write === 'function') this._write = options.write;
  41017. if (typeof options.writev === 'function') this._writev = options.writev;
  41018. if (typeof options.destroy === 'function') this._destroy = options.destroy;
  41019. if (typeof options.final === 'function') this._final = options.final;
  41020. }
  41021. Stream.call(this);
  41022. }
  41023. // Otherwise people can pipe Writable streams, which is just wrong.
  41024. Writable.prototype.pipe = function () {
  41025. this.emit('error', new Error('Cannot pipe, not readable'));
  41026. };
  41027. function writeAfterEnd(stream, cb) {
  41028. var er = new Error('write after end');
  41029. // TODO: defer error events consistently everywhere, not just the cb
  41030. stream.emit('error', er);
  41031. processNextTick(cb, er);
  41032. }
  41033. // Checks that a user-supplied chunk is valid, especially for the particular
  41034. // mode the stream is in. Currently this means that `null` is never accepted
  41035. // and undefined/non-string values are only allowed in object mode.
  41036. function validChunk(stream, state, chunk, cb) {
  41037. var valid = true;
  41038. var er = false;
  41039. if (chunk === null) {
  41040. er = new TypeError('May not write null values to stream');
  41041. } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
  41042. er = new TypeError('Invalid non-string/buffer chunk');
  41043. }
  41044. if (er) {
  41045. stream.emit('error', er);
  41046. processNextTick(cb, er);
  41047. valid = false;
  41048. }
  41049. return valid;
  41050. }
  41051. Writable.prototype.write = function (chunk, encoding, cb) {
  41052. var state = this._writableState;
  41053. var ret = false;
  41054. var isBuf = _isUint8Array(chunk) && !state.objectMode;
  41055. if (isBuf && !Buffer.isBuffer(chunk)) {
  41056. chunk = _uint8ArrayToBuffer(chunk);
  41057. }
  41058. if (typeof encoding === 'function') {
  41059. cb = encoding;
  41060. encoding = null;
  41061. }
  41062. if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
  41063. if (typeof cb !== 'function') cb = nop;
  41064. if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
  41065. state.pendingcb++;
  41066. ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
  41067. }
  41068. return ret;
  41069. };
  41070. Writable.prototype.cork = function () {
  41071. var state = this._writableState;
  41072. state.corked++;
  41073. };
  41074. Writable.prototype.uncork = function () {
  41075. var state = this._writableState;
  41076. if (state.corked) {
  41077. state.corked--;
  41078. if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
  41079. }
  41080. };
  41081. Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
  41082. // node::ParseEncoding() requires lower case.
  41083. if (typeof encoding === 'string') encoding = encoding.toLowerCase();
  41084. if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
  41085. this._writableState.defaultEncoding = encoding;
  41086. return this;
  41087. };
  41088. function decodeChunk(state, chunk, encoding) {
  41089. if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
  41090. chunk = Buffer.from(chunk, encoding);
  41091. }
  41092. return chunk;
  41093. }
  41094. // if we're already writing something, then just put this
  41095. // in the queue, and wait our turn. Otherwise, call _write
  41096. // If we return false, then we need a drain event, so set that flag.
  41097. function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
  41098. if (!isBuf) {
  41099. var newChunk = decodeChunk(state, chunk, encoding);
  41100. if (chunk !== newChunk) {
  41101. isBuf = true;
  41102. encoding = 'buffer';
  41103. chunk = newChunk;
  41104. }
  41105. }
  41106. var len = state.objectMode ? 1 : chunk.length;
  41107. state.length += len;
  41108. var ret = state.length < state.highWaterMark;
  41109. // we must ensure that previous needDrain will not be reset to false.
  41110. if (!ret) state.needDrain = true;
  41111. if (state.writing || state.corked) {
  41112. var last = state.lastBufferedRequest;
  41113. state.lastBufferedRequest = {
  41114. chunk: chunk,
  41115. encoding: encoding,
  41116. isBuf: isBuf,
  41117. callback: cb,
  41118. next: null
  41119. };
  41120. if (last) {
  41121. last.next = state.lastBufferedRequest;
  41122. } else {
  41123. state.bufferedRequest = state.lastBufferedRequest;
  41124. }
  41125. state.bufferedRequestCount += 1;
  41126. } else {
  41127. doWrite(stream, state, false, len, chunk, encoding, cb);
  41128. }
  41129. return ret;
  41130. }
  41131. function doWrite(stream, state, writev, len, chunk, encoding, cb) {
  41132. state.writelen = len;
  41133. state.writecb = cb;
  41134. state.writing = true;
  41135. state.sync = true;
  41136. if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
  41137. state.sync = false;
  41138. }
  41139. function onwriteError(stream, state, sync, er, cb) {
  41140. --state.pendingcb;
  41141. if (sync) {
  41142. // defer the callback if we are being called synchronously
  41143. // to avoid piling up things on the stack
  41144. processNextTick(cb, er);
  41145. // this can emit finish, and it will always happen
  41146. // after error
  41147. processNextTick(finishMaybe, stream, state);
  41148. stream._writableState.errorEmitted = true;
  41149. stream.emit('error', er);
  41150. } else {
  41151. // the caller expect this to happen before if
  41152. // it is async
  41153. cb(er);
  41154. stream._writableState.errorEmitted = true;
  41155. stream.emit('error', er);
  41156. // this can emit finish, but finish must
  41157. // always follow error
  41158. finishMaybe(stream, state);
  41159. }
  41160. }
  41161. function onwriteStateUpdate(state) {
  41162. state.writing = false;
  41163. state.writecb = null;
  41164. state.length -= state.writelen;
  41165. state.writelen = 0;
  41166. }
  41167. function onwrite(stream, er) {
  41168. var state = stream._writableState;
  41169. var sync = state.sync;
  41170. var cb = state.writecb;
  41171. onwriteStateUpdate(state);
  41172. if (er) onwriteError(stream, state, sync, er, cb);else {
  41173. // Check if we're actually ready to finish, but don't emit yet
  41174. var finished = needFinish(state);
  41175. if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
  41176. clearBuffer(stream, state);
  41177. }
  41178. if (sync) {
  41179. /*<replacement>*/
  41180. asyncWrite(afterWrite, stream, state, finished, cb);
  41181. /*</replacement>*/
  41182. } else {
  41183. afterWrite(stream, state, finished, cb);
  41184. }
  41185. }
  41186. }
  41187. function afterWrite(stream, state, finished, cb) {
  41188. if (!finished) onwriteDrain(stream, state);
  41189. state.pendingcb--;
  41190. cb();
  41191. finishMaybe(stream, state);
  41192. }
  41193. // Must force callback to be called on nextTick, so that we don't
  41194. // emit 'drain' before the write() consumer gets the 'false' return
  41195. // value, and has a chance to attach a 'drain' listener.
  41196. function onwriteDrain(stream, state) {
  41197. if (state.length === 0 && state.needDrain) {
  41198. state.needDrain = false;
  41199. stream.emit('drain');
  41200. }
  41201. }
  41202. // if there's something in the buffer waiting, then process it
  41203. function clearBuffer(stream, state) {
  41204. state.bufferProcessing = true;
  41205. var entry = state.bufferedRequest;
  41206. if (stream._writev && entry && entry.next) {
  41207. // Fast case, write everything using _writev()
  41208. var l = state.bufferedRequestCount;
  41209. var buffer = new Array(l);
  41210. var holder = state.corkedRequestsFree;
  41211. holder.entry = entry;
  41212. var count = 0;
  41213. var allBuffers = true;
  41214. while (entry) {
  41215. buffer[count] = entry;
  41216. if (!entry.isBuf) allBuffers = false;
  41217. entry = entry.next;
  41218. count += 1;
  41219. }
  41220. buffer.allBuffers = allBuffers;
  41221. doWrite(stream, state, true, state.length, buffer, '', holder.finish);
  41222. // doWrite is almost always async, defer these to save a bit of time
  41223. // as the hot path ends with doWrite
  41224. state.pendingcb++;
  41225. state.lastBufferedRequest = null;
  41226. if (holder.next) {
  41227. state.corkedRequestsFree = holder.next;
  41228. holder.next = null;
  41229. } else {
  41230. state.corkedRequestsFree = new CorkedRequest(state);
  41231. }
  41232. } else {
  41233. // Slow case, write chunks one-by-one
  41234. while (entry) {
  41235. var chunk = entry.chunk;
  41236. var encoding = entry.encoding;
  41237. var cb = entry.callback;
  41238. var len = state.objectMode ? 1 : chunk.length;
  41239. doWrite(stream, state, false, len, chunk, encoding, cb);
  41240. entry = entry.next;
  41241. // if we didn't call the onwrite immediately, then
  41242. // it means that we need to wait until it does.
  41243. // also, that means that the chunk and cb are currently
  41244. // being processed, so move the buffer counter past them.
  41245. if (state.writing) {
  41246. break;
  41247. }
  41248. }
  41249. if (entry === null) state.lastBufferedRequest = null;
  41250. }
  41251. state.bufferedRequestCount = 0;
  41252. state.bufferedRequest = entry;
  41253. state.bufferProcessing = false;
  41254. }
  41255. Writable.prototype._write = function (chunk, encoding, cb) {
  41256. cb(new Error('_write() is not implemented'));
  41257. };
  41258. Writable.prototype._writev = null;
  41259. Writable.prototype.end = function (chunk, encoding, cb) {
  41260. var state = this._writableState;
  41261. if (typeof chunk === 'function') {
  41262. cb = chunk;
  41263. chunk = null;
  41264. encoding = null;
  41265. } else if (typeof encoding === 'function') {
  41266. cb = encoding;
  41267. encoding = null;
  41268. }
  41269. if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
  41270. // .end() fully uncorks
  41271. if (state.corked) {
  41272. state.corked = 1;
  41273. this.uncork();
  41274. }
  41275. // ignore unnecessary end() calls.
  41276. if (!state.ending && !state.finished) endWritable(this, state, cb);
  41277. };
  41278. function needFinish(state) {
  41279. return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
  41280. }
  41281. function callFinal(stream, state) {
  41282. stream._final(function (err) {
  41283. state.pendingcb--;
  41284. if (err) {
  41285. stream.emit('error', err);
  41286. }
  41287. state.prefinished = true;
  41288. stream.emit('prefinish');
  41289. finishMaybe(stream, state);
  41290. });
  41291. }
  41292. function prefinish(stream, state) {
  41293. if (!state.prefinished && !state.finalCalled) {
  41294. if (typeof stream._final === 'function') {
  41295. state.pendingcb++;
  41296. state.finalCalled = true;
  41297. processNextTick(callFinal, stream, state);
  41298. } else {
  41299. state.prefinished = true;
  41300. stream.emit('prefinish');
  41301. }
  41302. }
  41303. }
  41304. function finishMaybe(stream, state) {
  41305. var need = needFinish(state);
  41306. if (need) {
  41307. prefinish(stream, state);
  41308. if (state.pendingcb === 0) {
  41309. state.finished = true;
  41310. stream.emit('finish');
  41311. }
  41312. }
  41313. return need;
  41314. }
  41315. function endWritable(stream, state, cb) {
  41316. state.ending = true;
  41317. finishMaybe(stream, state);
  41318. if (cb) {
  41319. if (state.finished) processNextTick(cb);else stream.once('finish', cb);
  41320. }
  41321. state.ended = true;
  41322. stream.writable = false;
  41323. }
  41324. function onCorkedFinish(corkReq, state, err) {
  41325. var entry = corkReq.entry;
  41326. corkReq.entry = null;
  41327. while (entry) {
  41328. var cb = entry.callback;
  41329. state.pendingcb--;
  41330. cb(err);
  41331. entry = entry.next;
  41332. }
  41333. if (state.corkedRequestsFree) {
  41334. state.corkedRequestsFree.next = corkReq;
  41335. } else {
  41336. state.corkedRequestsFree = corkReq;
  41337. }
  41338. }
  41339. Object.defineProperty(Writable.prototype, 'destroyed', {
  41340. get: function () {
  41341. if (this._writableState === undefined) {
  41342. return false;
  41343. }
  41344. return this._writableState.destroyed;
  41345. },
  41346. set: function (value) {
  41347. // we ignore the value if the stream
  41348. // has not been initialized yet
  41349. if (!this._writableState) {
  41350. return;
  41351. }
  41352. // backward compatibility, the user is explicitly
  41353. // managing destroyed
  41354. this._writableState.destroyed = value;
  41355. }
  41356. });
  41357. Writable.prototype.destroy = destroyImpl.destroy;
  41358. Writable.prototype._undestroy = destroyImpl.undestroy;
  41359. Writable.prototype._destroy = function (err, cb) {
  41360. this.end();
  41361. cb(err);
  41362. };
  41363. /***/ }),
  41364. /* 386 */
  41365. /***/ (function(module, exports, __webpack_require__) {
  41366. "use strict";
  41367. var Buffer = __webpack_require__(30).Buffer;
  41368. var isEncoding = Buffer.isEncoding || function (encoding) {
  41369. encoding = '' + encoding;
  41370. switch (encoding && encoding.toLowerCase()) {
  41371. case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
  41372. return true;
  41373. default:
  41374. return false;
  41375. }
  41376. };
  41377. function _normalizeEncoding(enc) {
  41378. if (!enc) return 'utf8';
  41379. var retried;
  41380. while (true) {
  41381. switch (enc) {
  41382. case 'utf8':
  41383. case 'utf-8':
  41384. return 'utf8';
  41385. case 'ucs2':
  41386. case 'ucs-2':
  41387. case 'utf16le':
  41388. case 'utf-16le':
  41389. return 'utf16le';
  41390. case 'latin1':
  41391. case 'binary':
  41392. return 'latin1';
  41393. case 'base64':
  41394. case 'ascii':
  41395. case 'hex':
  41396. return enc;
  41397. default:
  41398. if (retried) return; // undefined
  41399. enc = ('' + enc).toLowerCase();
  41400. retried = true;
  41401. }
  41402. }
  41403. };
  41404. // Do not cache `Buffer.isEncoding` when checking encoding names as some
  41405. // modules monkey-patch it to support additional encodings
  41406. function normalizeEncoding(enc) {
  41407. var nenc = _normalizeEncoding(enc);
  41408. if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
  41409. return nenc || enc;
  41410. }
  41411. // StringDecoder provides an interface for efficiently splitting a series of
  41412. // buffers into a series of JS strings without breaking apart multi-byte
  41413. // characters.
  41414. exports.StringDecoder = StringDecoder;
  41415. function StringDecoder(encoding) {
  41416. this.encoding = normalizeEncoding(encoding);
  41417. var nb;
  41418. switch (this.encoding) {
  41419. case 'utf16le':
  41420. this.text = utf16Text;
  41421. this.end = utf16End;
  41422. nb = 4;
  41423. break;
  41424. case 'utf8':
  41425. this.fillLast = utf8FillLast;
  41426. nb = 4;
  41427. break;
  41428. case 'base64':
  41429. this.text = base64Text;
  41430. this.end = base64End;
  41431. nb = 3;
  41432. break;
  41433. default:
  41434. this.write = simpleWrite;
  41435. this.end = simpleEnd;
  41436. return;
  41437. }
  41438. this.lastNeed = 0;
  41439. this.lastTotal = 0;
  41440. this.lastChar = Buffer.allocUnsafe(nb);
  41441. }
  41442. StringDecoder.prototype.write = function (buf) {
  41443. if (buf.length === 0) return '';
  41444. var r;
  41445. var i;
  41446. if (this.lastNeed) {
  41447. r = this.fillLast(buf);
  41448. if (r === undefined) return '';
  41449. i = this.lastNeed;
  41450. this.lastNeed = 0;
  41451. } else {
  41452. i = 0;
  41453. }
  41454. if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
  41455. return r || '';
  41456. };
  41457. StringDecoder.prototype.end = utf8End;
  41458. // Returns only complete characters in a Buffer
  41459. StringDecoder.prototype.text = utf8Text;
  41460. // Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
  41461. StringDecoder.prototype.fillLast = function (buf) {
  41462. if (this.lastNeed <= buf.length) {
  41463. buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
  41464. return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  41465. }
  41466. buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
  41467. this.lastNeed -= buf.length;
  41468. };
  41469. // Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
  41470. // continuation byte.
  41471. function utf8CheckByte(byte) {
  41472. if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
  41473. return -1;
  41474. }
  41475. // Checks at most 3 bytes at the end of a Buffer in order to detect an
  41476. // incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
  41477. // needed to complete the UTF-8 character (if applicable) are returned.
  41478. function utf8CheckIncomplete(self, buf, i) {
  41479. var j = buf.length - 1;
  41480. if (j < i) return 0;
  41481. var nb = utf8CheckByte(buf[j]);
  41482. if (nb >= 0) {
  41483. if (nb > 0) self.lastNeed = nb - 1;
  41484. return nb;
  41485. }
  41486. if (--j < i) return 0;
  41487. nb = utf8CheckByte(buf[j]);
  41488. if (nb >= 0) {
  41489. if (nb > 0) self.lastNeed = nb - 2;
  41490. return nb;
  41491. }
  41492. if (--j < i) return 0;
  41493. nb = utf8CheckByte(buf[j]);
  41494. if (nb >= 0) {
  41495. if (nb > 0) {
  41496. if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
  41497. }
  41498. return nb;
  41499. }
  41500. return 0;
  41501. }
  41502. // Validates as many continuation bytes for a multi-byte UTF-8 character as
  41503. // needed or are available. If we see a non-continuation byte where we expect
  41504. // one, we "replace" the validated continuation bytes we've seen so far with
  41505. // UTF-8 replacement characters ('\ufffd'), to match v8's UTF-8 decoding
  41506. // behavior. The continuation byte check is included three times in the case
  41507. // where all of the continuation bytes for a character exist in the same buffer.
  41508. // It is also done this way as a slight performance increase instead of using a
  41509. // loop.
  41510. function utf8CheckExtraBytes(self, buf, p) {
  41511. if ((buf[0] & 0xC0) !== 0x80) {
  41512. self.lastNeed = 0;
  41513. return '\ufffd'.repeat(p);
  41514. }
  41515. if (self.lastNeed > 1 && buf.length > 1) {
  41516. if ((buf[1] & 0xC0) !== 0x80) {
  41517. self.lastNeed = 1;
  41518. return '\ufffd'.repeat(p + 1);
  41519. }
  41520. if (self.lastNeed > 2 && buf.length > 2) {
  41521. if ((buf[2] & 0xC0) !== 0x80) {
  41522. self.lastNeed = 2;
  41523. return '\ufffd'.repeat(p + 2);
  41524. }
  41525. }
  41526. }
  41527. }
  41528. // Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
  41529. function utf8FillLast(buf) {
  41530. var p = this.lastTotal - this.lastNeed;
  41531. var r = utf8CheckExtraBytes(this, buf, p);
  41532. if (r !== undefined) return r;
  41533. if (this.lastNeed <= buf.length) {
  41534. buf.copy(this.lastChar, p, 0, this.lastNeed);
  41535. return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  41536. }
  41537. buf.copy(this.lastChar, p, 0, buf.length);
  41538. this.lastNeed -= buf.length;
  41539. }
  41540. // Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
  41541. // partial character, the character's bytes are buffered until the required
  41542. // number of bytes are available.
  41543. function utf8Text(buf, i) {
  41544. var total = utf8CheckIncomplete(this, buf, i);
  41545. if (!this.lastNeed) return buf.toString('utf8', i);
  41546. this.lastTotal = total;
  41547. var end = buf.length - (total - this.lastNeed);
  41548. buf.copy(this.lastChar, 0, end);
  41549. return buf.toString('utf8', i, end);
  41550. }
  41551. // For UTF-8, a replacement character for each buffered byte of a (partial)
  41552. // character needs to be added to the output.
  41553. function utf8End(buf) {
  41554. var r = buf && buf.length ? this.write(buf) : '';
  41555. if (this.lastNeed) return r + '\ufffd'.repeat(this.lastTotal - this.lastNeed);
  41556. return r;
  41557. }
  41558. // UTF-16LE typically needs two bytes per character, but even if we have an even
  41559. // number of bytes available, we need to check if we end on a leading/high
  41560. // surrogate. In that case, we need to wait for the next two bytes in order to
  41561. // decode the last character properly.
  41562. function utf16Text(buf, i) {
  41563. if ((buf.length - i) % 2 === 0) {
  41564. var r = buf.toString('utf16le', i);
  41565. if (r) {
  41566. var c = r.charCodeAt(r.length - 1);
  41567. if (c >= 0xD800 && c <= 0xDBFF) {
  41568. this.lastNeed = 2;
  41569. this.lastTotal = 4;
  41570. this.lastChar[0] = buf[buf.length - 2];
  41571. this.lastChar[1] = buf[buf.length - 1];
  41572. return r.slice(0, -1);
  41573. }
  41574. }
  41575. return r;
  41576. }
  41577. this.lastNeed = 1;
  41578. this.lastTotal = 2;
  41579. this.lastChar[0] = buf[buf.length - 1];
  41580. return buf.toString('utf16le', i, buf.length - 1);
  41581. }
  41582. // For UTF-16LE we do not explicitly append special replacement characters if we
  41583. // end on a partial character, we simply let v8 handle that.
  41584. function utf16End(buf) {
  41585. var r = buf && buf.length ? this.write(buf) : '';
  41586. if (this.lastNeed) {
  41587. var end = this.lastTotal - this.lastNeed;
  41588. return r + this.lastChar.toString('utf16le', 0, end);
  41589. }
  41590. return r;
  41591. }
  41592. function base64Text(buf, i) {
  41593. var n = (buf.length - i) % 3;
  41594. if (n === 0) return buf.toString('base64', i);
  41595. this.lastNeed = 3 - n;
  41596. this.lastTotal = 3;
  41597. if (n === 1) {
  41598. this.lastChar[0] = buf[buf.length - 1];
  41599. } else {
  41600. this.lastChar[0] = buf[buf.length - 2];
  41601. this.lastChar[1] = buf[buf.length - 1];
  41602. }
  41603. return buf.toString('base64', i, buf.length - n);
  41604. }
  41605. function base64End(buf) {
  41606. var r = buf && buf.length ? this.write(buf) : '';
  41607. if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
  41608. return r;
  41609. }
  41610. // Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
  41611. function simpleWrite(buf) {
  41612. return buf.toString(this.encoding);
  41613. }
  41614. function simpleEnd(buf) {
  41615. return buf && buf.length ? this.write(buf) : '';
  41616. }
  41617. /***/ }),
  41618. /* 387 */
  41619. /***/ (function(module, exports, __webpack_require__) {
  41620. "use strict";
  41621. // Copyright Joyent, Inc. and other Node contributors.
  41622. //
  41623. // Permission is hereby granted, free of charge, to any person obtaining a
  41624. // copy of this software and associated documentation files (the
  41625. // "Software"), to deal in the Software without restriction, including
  41626. // without limitation the rights to use, copy, modify, merge, publish,
  41627. // distribute, sublicense, and/or sell copies of the Software, and to permit
  41628. // persons to whom the Software is furnished to do so, subject to the
  41629. // following conditions:
  41630. //
  41631. // The above copyright notice and this permission notice shall be included
  41632. // in all copies or substantial portions of the Software.
  41633. //
  41634. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  41635. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  41636. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  41637. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  41638. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  41639. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  41640. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  41641. // a transform stream is a readable/writable stream where you do
  41642. // something with the data. Sometimes it's called a "filter",
  41643. // but that's not a great name for it, since that implies a thing where
  41644. // some bits pass through, and others are simply ignored. (That would
  41645. // be a valid example of a transform, of course.)
  41646. //
  41647. // While the output is causally related to the input, it's not a
  41648. // necessarily symmetric or synchronous transformation. For example,
  41649. // a zlib stream might take multiple plain-text writes(), and then
  41650. // emit a single compressed chunk some time in the future.
  41651. //
  41652. // Here's how this works:
  41653. //
  41654. // The Transform stream has all the aspects of the readable and writable
  41655. // stream classes. When you write(chunk), that calls _write(chunk,cb)
  41656. // internally, and returns false if there's a lot of pending writes
  41657. // buffered up. When you call read(), that calls _read(n) until
  41658. // there's enough pending readable data buffered up.
  41659. //
  41660. // In a transform stream, the written data is placed in a buffer. When
  41661. // _read(n) is called, it transforms the queued up data, calling the
  41662. // buffered _write cb's as it consumes chunks. If consuming a single
  41663. // written chunk would result in multiple output chunks, then the first
  41664. // outputted bit calls the readcb, and subsequent chunks just go into
  41665. // the read buffer, and will cause it to emit 'readable' if necessary.
  41666. //
  41667. // This way, back-pressure is actually determined by the reading side,
  41668. // since _read has to be called to start processing a new chunk. However,
  41669. // a pathological inflate type of transform can cause excessive buffering
  41670. // here. For example, imagine a stream where every byte of input is
  41671. // interpreted as an integer from 0-255, and then results in that many
  41672. // bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
  41673. // 1kb of data being output. In this case, you could write a very small
  41674. // amount of input, and end up with a very large amount of output. In
  41675. // such a pathological inflating mechanism, there'd be no way to tell
  41676. // the system to stop doing the transform. A single 4MB write could
  41677. // cause the system to run out of memory.
  41678. //
  41679. // However, even in such a pathological case, only a single written chunk
  41680. // would be consumed, and then the rest would wait (un-transformed) until
  41681. // the results of the previous transformed chunk were consumed.
  41682. module.exports = Transform;
  41683. var Duplex = __webpack_require__(64);
  41684. /*<replacement>*/
  41685. var util = __webpack_require__(61);
  41686. util.inherits = __webpack_require__(33);
  41687. /*</replacement>*/
  41688. util.inherits(Transform, Duplex);
  41689. function TransformState(stream) {
  41690. this.afterTransform = function (er, data) {
  41691. return afterTransform(stream, er, data);
  41692. };
  41693. this.needTransform = false;
  41694. this.transforming = false;
  41695. this.writecb = null;
  41696. this.writechunk = null;
  41697. this.writeencoding = null;
  41698. }
  41699. function afterTransform(stream, er, data) {
  41700. var ts = stream._transformState;
  41701. ts.transforming = false;
  41702. var cb = ts.writecb;
  41703. if (!cb) {
  41704. return stream.emit('error', new Error('write callback called multiple times'));
  41705. }
  41706. ts.writechunk = null;
  41707. ts.writecb = null;
  41708. if (data !== null && data !== undefined) stream.push(data);
  41709. cb(er);
  41710. var rs = stream._readableState;
  41711. rs.reading = false;
  41712. if (rs.needReadable || rs.length < rs.highWaterMark) {
  41713. stream._read(rs.highWaterMark);
  41714. }
  41715. }
  41716. function Transform(options) {
  41717. if (!(this instanceof Transform)) return new Transform(options);
  41718. Duplex.call(this, options);
  41719. this._transformState = new TransformState(this);
  41720. var stream = this;
  41721. // start out asking for a readable event once data is transformed.
  41722. this._readableState.needReadable = true;
  41723. // we have implemented the _read method, and done the other things
  41724. // that Readable wants before the first _read call, so unset the
  41725. // sync guard flag.
  41726. this._readableState.sync = false;
  41727. if (options) {
  41728. if (typeof options.transform === 'function') this._transform = options.transform;
  41729. if (typeof options.flush === 'function') this._flush = options.flush;
  41730. }
  41731. // When the writable side finishes, then flush out anything remaining.
  41732. this.once('prefinish', function () {
  41733. if (typeof this._flush === 'function') this._flush(function (er, data) {
  41734. done(stream, er, data);
  41735. });else done(stream);
  41736. });
  41737. }
  41738. Transform.prototype.push = function (chunk, encoding) {
  41739. this._transformState.needTransform = false;
  41740. return Duplex.prototype.push.call(this, chunk, encoding);
  41741. };
  41742. // This is the part where you do stuff!
  41743. // override this function in implementation classes.
  41744. // 'chunk' is an input chunk.
  41745. //
  41746. // Call `push(newChunk)` to pass along transformed output
  41747. // to the readable side. You may call 'push' zero or more times.
  41748. //
  41749. // Call `cb(err)` when you are done with this chunk. If you pass
  41750. // an error, then that'll put the hurt on the whole operation. If you
  41751. // never call cb(), then you'll never get another chunk.
  41752. Transform.prototype._transform = function (chunk, encoding, cb) {
  41753. throw new Error('_transform() is not implemented');
  41754. };
  41755. Transform.prototype._write = function (chunk, encoding, cb) {
  41756. var ts = this._transformState;
  41757. ts.writecb = cb;
  41758. ts.writechunk = chunk;
  41759. ts.writeencoding = encoding;
  41760. if (!ts.transforming) {
  41761. var rs = this._readableState;
  41762. if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
  41763. }
  41764. };
  41765. // Doesn't matter what the args are here.
  41766. // _transform does all the work.
  41767. // That we got here means that the readable side wants more data.
  41768. Transform.prototype._read = function (n) {
  41769. var ts = this._transformState;
  41770. if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
  41771. ts.transforming = true;
  41772. this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
  41773. } else {
  41774. // mark that we need a transform, so that any data that comes in
  41775. // will get processed, now that we've asked for it.
  41776. ts.needTransform = true;
  41777. }
  41778. };
  41779. Transform.prototype._destroy = function (err, cb) {
  41780. var _this = this;
  41781. Duplex.prototype._destroy.call(this, err, function (err2) {
  41782. cb(err2);
  41783. _this.emit('close');
  41784. });
  41785. };
  41786. function done(stream, er, data) {
  41787. if (er) return stream.emit('error', er);
  41788. if (data !== null && data !== undefined) stream.push(data);
  41789. // if there's nothing in the write buffer, then that means
  41790. // that nothing more will ever be provided
  41791. var ws = stream._writableState;
  41792. var ts = stream._transformState;
  41793. if (ws.length) throw new Error('Calling transform done when ws.length != 0');
  41794. if (ts.transforming) throw new Error('Calling transform done when still transforming');
  41795. return stream.push(null);
  41796. }
  41797. /***/ }),
  41798. /* 388 */
  41799. /***/ (function(module, exports, __webpack_require__) {
  41800. "use strict";
  41801. var Tokenizer = __webpack_require__(66),
  41802. OpenElementStack = __webpack_require__(665),
  41803. FormattingElementList = __webpack_require__(666),
  41804. LocationInfoParserMixin = __webpack_require__(667),
  41805. defaultTreeAdapter = __webpack_require__(160),
  41806. mergeOptions = __webpack_require__(161),
  41807. doctype = __webpack_require__(162),
  41808. foreignContent = __webpack_require__(391),
  41809. UNICODE = __webpack_require__(89),
  41810. HTML = __webpack_require__(29);
  41811. //Aliases
  41812. var $ = HTML.TAG_NAMES,
  41813. NS = HTML.NAMESPACES,
  41814. ATTRS = HTML.ATTRS;
  41815. var DEFAULT_OPTIONS = {
  41816. locationInfo: false,
  41817. treeAdapter: defaultTreeAdapter
  41818. };
  41819. //Misc constants
  41820. var HIDDEN_INPUT_TYPE = 'hidden';
  41821. //Adoption agency loops iteration count
  41822. var AA_OUTER_LOOP_ITER = 8,
  41823. AA_INNER_LOOP_ITER = 3;
  41824. //Insertion modes
  41825. var INITIAL_MODE = 'INITIAL_MODE',
  41826. BEFORE_HTML_MODE = 'BEFORE_HTML_MODE',
  41827. BEFORE_HEAD_MODE = 'BEFORE_HEAD_MODE',
  41828. IN_HEAD_MODE = 'IN_HEAD_MODE',
  41829. AFTER_HEAD_MODE = 'AFTER_HEAD_MODE',
  41830. IN_BODY_MODE = 'IN_BODY_MODE',
  41831. TEXT_MODE = 'TEXT_MODE',
  41832. IN_TABLE_MODE = 'IN_TABLE_MODE',
  41833. IN_TABLE_TEXT_MODE = 'IN_TABLE_TEXT_MODE',
  41834. IN_CAPTION_MODE = 'IN_CAPTION_MODE',
  41835. IN_COLUMN_GROUP_MODE = 'IN_COLUMN_GROUP_MODE',
  41836. IN_TABLE_BODY_MODE = 'IN_TABLE_BODY_MODE',
  41837. IN_ROW_MODE = 'IN_ROW_MODE',
  41838. IN_CELL_MODE = 'IN_CELL_MODE',
  41839. IN_SELECT_MODE = 'IN_SELECT_MODE',
  41840. IN_SELECT_IN_TABLE_MODE = 'IN_SELECT_IN_TABLE_MODE',
  41841. IN_TEMPLATE_MODE = 'IN_TEMPLATE_MODE',
  41842. AFTER_BODY_MODE = 'AFTER_BODY_MODE',
  41843. IN_FRAMESET_MODE = 'IN_FRAMESET_MODE',
  41844. AFTER_FRAMESET_MODE = 'AFTER_FRAMESET_MODE',
  41845. AFTER_AFTER_BODY_MODE = 'AFTER_AFTER_BODY_MODE',
  41846. AFTER_AFTER_FRAMESET_MODE = 'AFTER_AFTER_FRAMESET_MODE';
  41847. //Insertion mode reset map
  41848. var INSERTION_MODE_RESET_MAP = Object.create(null);
  41849. INSERTION_MODE_RESET_MAP[$.TR] = IN_ROW_MODE;
  41850. INSERTION_MODE_RESET_MAP[$.TBODY] =
  41851. INSERTION_MODE_RESET_MAP[$.THEAD] =
  41852. INSERTION_MODE_RESET_MAP[$.TFOOT] = IN_TABLE_BODY_MODE;
  41853. INSERTION_MODE_RESET_MAP[$.CAPTION] = IN_CAPTION_MODE;
  41854. INSERTION_MODE_RESET_MAP[$.COLGROUP] = IN_COLUMN_GROUP_MODE;
  41855. INSERTION_MODE_RESET_MAP[$.TABLE] = IN_TABLE_MODE;
  41856. INSERTION_MODE_RESET_MAP[$.BODY] = IN_BODY_MODE;
  41857. INSERTION_MODE_RESET_MAP[$.FRAMESET] = IN_FRAMESET_MODE;
  41858. //Template insertion mode switch map
  41859. var TEMPLATE_INSERTION_MODE_SWITCH_MAP = Object.create(null);
  41860. TEMPLATE_INSERTION_MODE_SWITCH_MAP[$.CAPTION] =
  41861. TEMPLATE_INSERTION_MODE_SWITCH_MAP[$.COLGROUP] =
  41862. TEMPLATE_INSERTION_MODE_SWITCH_MAP[$.TBODY] =
  41863. TEMPLATE_INSERTION_MODE_SWITCH_MAP[$.TFOOT] =
  41864. TEMPLATE_INSERTION_MODE_SWITCH_MAP[$.THEAD] = IN_TABLE_MODE;
  41865. TEMPLATE_INSERTION_MODE_SWITCH_MAP[$.COL] = IN_COLUMN_GROUP_MODE;
  41866. TEMPLATE_INSERTION_MODE_SWITCH_MAP[$.TR] = IN_TABLE_BODY_MODE;
  41867. TEMPLATE_INSERTION_MODE_SWITCH_MAP[$.TD] =
  41868. TEMPLATE_INSERTION_MODE_SWITCH_MAP[$.TH] = IN_ROW_MODE;
  41869. //Token handlers map for insertion modes
  41870. var _ = Object.create(null);
  41871. _[INITIAL_MODE] = Object.create(null);
  41872. _[INITIAL_MODE][Tokenizer.CHARACTER_TOKEN] =
  41873. _[INITIAL_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = tokenInInitialMode;
  41874. _[INITIAL_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = ignoreToken;
  41875. _[INITIAL_MODE][Tokenizer.COMMENT_TOKEN] = appendComment;
  41876. _[INITIAL_MODE][Tokenizer.DOCTYPE_TOKEN] = doctypeInInitialMode;
  41877. _[INITIAL_MODE][Tokenizer.START_TAG_TOKEN] =
  41878. _[INITIAL_MODE][Tokenizer.END_TAG_TOKEN] =
  41879. _[INITIAL_MODE][Tokenizer.EOF_TOKEN] = tokenInInitialMode;
  41880. _[BEFORE_HTML_MODE] = Object.create(null);
  41881. _[BEFORE_HTML_MODE][Tokenizer.CHARACTER_TOKEN] =
  41882. _[BEFORE_HTML_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = tokenBeforeHtml;
  41883. _[BEFORE_HTML_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = ignoreToken;
  41884. _[BEFORE_HTML_MODE][Tokenizer.COMMENT_TOKEN] = appendComment;
  41885. _[BEFORE_HTML_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  41886. _[BEFORE_HTML_MODE][Tokenizer.START_TAG_TOKEN] = startTagBeforeHtml;
  41887. _[BEFORE_HTML_MODE][Tokenizer.END_TAG_TOKEN] = endTagBeforeHtml;
  41888. _[BEFORE_HTML_MODE][Tokenizer.EOF_TOKEN] = tokenBeforeHtml;
  41889. _[BEFORE_HEAD_MODE] = Object.create(null);
  41890. _[BEFORE_HEAD_MODE][Tokenizer.CHARACTER_TOKEN] =
  41891. _[BEFORE_HEAD_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = tokenBeforeHead;
  41892. _[BEFORE_HEAD_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = ignoreToken;
  41893. _[BEFORE_HEAD_MODE][Tokenizer.COMMENT_TOKEN] = appendComment;
  41894. _[BEFORE_HEAD_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  41895. _[BEFORE_HEAD_MODE][Tokenizer.START_TAG_TOKEN] = startTagBeforeHead;
  41896. _[BEFORE_HEAD_MODE][Tokenizer.END_TAG_TOKEN] = endTagBeforeHead;
  41897. _[BEFORE_HEAD_MODE][Tokenizer.EOF_TOKEN] = tokenBeforeHead;
  41898. _[IN_HEAD_MODE] = Object.create(null);
  41899. _[IN_HEAD_MODE][Tokenizer.CHARACTER_TOKEN] =
  41900. _[IN_HEAD_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = tokenInHead;
  41901. _[IN_HEAD_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = insertCharacters;
  41902. _[IN_HEAD_MODE][Tokenizer.COMMENT_TOKEN] = appendComment;
  41903. _[IN_HEAD_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  41904. _[IN_HEAD_MODE][Tokenizer.START_TAG_TOKEN] = startTagInHead;
  41905. _[IN_HEAD_MODE][Tokenizer.END_TAG_TOKEN] = endTagInHead;
  41906. _[IN_HEAD_MODE][Tokenizer.EOF_TOKEN] = tokenInHead;
  41907. _[AFTER_HEAD_MODE] = Object.create(null);
  41908. _[AFTER_HEAD_MODE][Tokenizer.CHARACTER_TOKEN] =
  41909. _[AFTER_HEAD_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = tokenAfterHead;
  41910. _[AFTER_HEAD_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = insertCharacters;
  41911. _[AFTER_HEAD_MODE][Tokenizer.COMMENT_TOKEN] = appendComment;
  41912. _[AFTER_HEAD_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  41913. _[AFTER_HEAD_MODE][Tokenizer.START_TAG_TOKEN] = startTagAfterHead;
  41914. _[AFTER_HEAD_MODE][Tokenizer.END_TAG_TOKEN] = endTagAfterHead;
  41915. _[AFTER_HEAD_MODE][Tokenizer.EOF_TOKEN] = tokenAfterHead;
  41916. _[IN_BODY_MODE] = Object.create(null);
  41917. _[IN_BODY_MODE][Tokenizer.CHARACTER_TOKEN] = characterInBody;
  41918. _[IN_BODY_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken;
  41919. _[IN_BODY_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = whitespaceCharacterInBody;
  41920. _[IN_BODY_MODE][Tokenizer.COMMENT_TOKEN] = appendComment;
  41921. _[IN_BODY_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  41922. _[IN_BODY_MODE][Tokenizer.START_TAG_TOKEN] = startTagInBody;
  41923. _[IN_BODY_MODE][Tokenizer.END_TAG_TOKEN] = endTagInBody;
  41924. _[IN_BODY_MODE][Tokenizer.EOF_TOKEN] = eofInBody;
  41925. _[TEXT_MODE] = Object.create(null);
  41926. _[TEXT_MODE][Tokenizer.CHARACTER_TOKEN] =
  41927. _[TEXT_MODE][Tokenizer.NULL_CHARACTER_TOKEN] =
  41928. _[TEXT_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = insertCharacters;
  41929. _[TEXT_MODE][Tokenizer.COMMENT_TOKEN] =
  41930. _[TEXT_MODE][Tokenizer.DOCTYPE_TOKEN] =
  41931. _[TEXT_MODE][Tokenizer.START_TAG_TOKEN] = ignoreToken;
  41932. _[TEXT_MODE][Tokenizer.END_TAG_TOKEN] = endTagInText;
  41933. _[TEXT_MODE][Tokenizer.EOF_TOKEN] = eofInText;
  41934. _[IN_TABLE_MODE] = Object.create(null);
  41935. _[IN_TABLE_MODE][Tokenizer.CHARACTER_TOKEN] =
  41936. _[IN_TABLE_MODE][Tokenizer.NULL_CHARACTER_TOKEN] =
  41937. _[IN_TABLE_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = characterInTable;
  41938. _[IN_TABLE_MODE][Tokenizer.COMMENT_TOKEN] = appendComment;
  41939. _[IN_TABLE_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  41940. _[IN_TABLE_MODE][Tokenizer.START_TAG_TOKEN] = startTagInTable;
  41941. _[IN_TABLE_MODE][Tokenizer.END_TAG_TOKEN] = endTagInTable;
  41942. _[IN_TABLE_MODE][Tokenizer.EOF_TOKEN] = eofInBody;
  41943. _[IN_TABLE_TEXT_MODE] = Object.create(null);
  41944. _[IN_TABLE_TEXT_MODE][Tokenizer.CHARACTER_TOKEN] = characterInTableText;
  41945. _[IN_TABLE_TEXT_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken;
  41946. _[IN_TABLE_TEXT_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = whitespaceCharacterInTableText;
  41947. _[IN_TABLE_TEXT_MODE][Tokenizer.COMMENT_TOKEN] =
  41948. _[IN_TABLE_TEXT_MODE][Tokenizer.DOCTYPE_TOKEN] =
  41949. _[IN_TABLE_TEXT_MODE][Tokenizer.START_TAG_TOKEN] =
  41950. _[IN_TABLE_TEXT_MODE][Tokenizer.END_TAG_TOKEN] =
  41951. _[IN_TABLE_TEXT_MODE][Tokenizer.EOF_TOKEN] = tokenInTableText;
  41952. _[IN_CAPTION_MODE] = Object.create(null);
  41953. _[IN_CAPTION_MODE][Tokenizer.CHARACTER_TOKEN] = characterInBody;
  41954. _[IN_CAPTION_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken;
  41955. _[IN_CAPTION_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = whitespaceCharacterInBody;
  41956. _[IN_CAPTION_MODE][Tokenizer.COMMENT_TOKEN] = appendComment;
  41957. _[IN_CAPTION_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  41958. _[IN_CAPTION_MODE][Tokenizer.START_TAG_TOKEN] = startTagInCaption;
  41959. _[IN_CAPTION_MODE][Tokenizer.END_TAG_TOKEN] = endTagInCaption;
  41960. _[IN_CAPTION_MODE][Tokenizer.EOF_TOKEN] = eofInBody;
  41961. _[IN_COLUMN_GROUP_MODE] = Object.create(null);
  41962. _[IN_COLUMN_GROUP_MODE][Tokenizer.CHARACTER_TOKEN] =
  41963. _[IN_COLUMN_GROUP_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = tokenInColumnGroup;
  41964. _[IN_COLUMN_GROUP_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = insertCharacters;
  41965. _[IN_COLUMN_GROUP_MODE][Tokenizer.COMMENT_TOKEN] = appendComment;
  41966. _[IN_COLUMN_GROUP_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  41967. _[IN_COLUMN_GROUP_MODE][Tokenizer.START_TAG_TOKEN] = startTagInColumnGroup;
  41968. _[IN_COLUMN_GROUP_MODE][Tokenizer.END_TAG_TOKEN] = endTagInColumnGroup;
  41969. _[IN_COLUMN_GROUP_MODE][Tokenizer.EOF_TOKEN] = eofInBody;
  41970. _[IN_TABLE_BODY_MODE] = Object.create(null);
  41971. _[IN_TABLE_BODY_MODE][Tokenizer.CHARACTER_TOKEN] =
  41972. _[IN_TABLE_BODY_MODE][Tokenizer.NULL_CHARACTER_TOKEN] =
  41973. _[IN_TABLE_BODY_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = characterInTable;
  41974. _[IN_TABLE_BODY_MODE][Tokenizer.COMMENT_TOKEN] = appendComment;
  41975. _[IN_TABLE_BODY_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  41976. _[IN_TABLE_BODY_MODE][Tokenizer.START_TAG_TOKEN] = startTagInTableBody;
  41977. _[IN_TABLE_BODY_MODE][Tokenizer.END_TAG_TOKEN] = endTagInTableBody;
  41978. _[IN_TABLE_BODY_MODE][Tokenizer.EOF_TOKEN] = eofInBody;
  41979. _[IN_ROW_MODE] = Object.create(null);
  41980. _[IN_ROW_MODE][Tokenizer.CHARACTER_TOKEN] =
  41981. _[IN_ROW_MODE][Tokenizer.NULL_CHARACTER_TOKEN] =
  41982. _[IN_ROW_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = characterInTable;
  41983. _[IN_ROW_MODE][Tokenizer.COMMENT_TOKEN] = appendComment;
  41984. _[IN_ROW_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  41985. _[IN_ROW_MODE][Tokenizer.START_TAG_TOKEN] = startTagInRow;
  41986. _[IN_ROW_MODE][Tokenizer.END_TAG_TOKEN] = endTagInRow;
  41987. _[IN_ROW_MODE][Tokenizer.EOF_TOKEN] = eofInBody;
  41988. _[IN_CELL_MODE] = Object.create(null);
  41989. _[IN_CELL_MODE][Tokenizer.CHARACTER_TOKEN] = characterInBody;
  41990. _[IN_CELL_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken;
  41991. _[IN_CELL_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = whitespaceCharacterInBody;
  41992. _[IN_CELL_MODE][Tokenizer.COMMENT_TOKEN] = appendComment;
  41993. _[IN_CELL_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  41994. _[IN_CELL_MODE][Tokenizer.START_TAG_TOKEN] = startTagInCell;
  41995. _[IN_CELL_MODE][Tokenizer.END_TAG_TOKEN] = endTagInCell;
  41996. _[IN_CELL_MODE][Tokenizer.EOF_TOKEN] = eofInBody;
  41997. _[IN_SELECT_MODE] = Object.create(null);
  41998. _[IN_SELECT_MODE][Tokenizer.CHARACTER_TOKEN] = insertCharacters;
  41999. _[IN_SELECT_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken;
  42000. _[IN_SELECT_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = insertCharacters;
  42001. _[IN_SELECT_MODE][Tokenizer.COMMENT_TOKEN] = appendComment;
  42002. _[IN_SELECT_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  42003. _[IN_SELECT_MODE][Tokenizer.START_TAG_TOKEN] = startTagInSelect;
  42004. _[IN_SELECT_MODE][Tokenizer.END_TAG_TOKEN] = endTagInSelect;
  42005. _[IN_SELECT_MODE][Tokenizer.EOF_TOKEN] = eofInBody;
  42006. _[IN_SELECT_IN_TABLE_MODE] = Object.create(null);
  42007. _[IN_SELECT_IN_TABLE_MODE][Tokenizer.CHARACTER_TOKEN] = insertCharacters;
  42008. _[IN_SELECT_IN_TABLE_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken;
  42009. _[IN_SELECT_IN_TABLE_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = insertCharacters;
  42010. _[IN_SELECT_IN_TABLE_MODE][Tokenizer.COMMENT_TOKEN] = appendComment;
  42011. _[IN_SELECT_IN_TABLE_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  42012. _[IN_SELECT_IN_TABLE_MODE][Tokenizer.START_TAG_TOKEN] = startTagInSelectInTable;
  42013. _[IN_SELECT_IN_TABLE_MODE][Tokenizer.END_TAG_TOKEN] = endTagInSelectInTable;
  42014. _[IN_SELECT_IN_TABLE_MODE][Tokenizer.EOF_TOKEN] = eofInBody;
  42015. _[IN_TEMPLATE_MODE] = Object.create(null);
  42016. _[IN_TEMPLATE_MODE][Tokenizer.CHARACTER_TOKEN] = characterInBody;
  42017. _[IN_TEMPLATE_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken;
  42018. _[IN_TEMPLATE_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = whitespaceCharacterInBody;
  42019. _[IN_TEMPLATE_MODE][Tokenizer.COMMENT_TOKEN] = appendComment;
  42020. _[IN_TEMPLATE_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  42021. _[IN_TEMPLATE_MODE][Tokenizer.START_TAG_TOKEN] = startTagInTemplate;
  42022. _[IN_TEMPLATE_MODE][Tokenizer.END_TAG_TOKEN] = endTagInTemplate;
  42023. _[IN_TEMPLATE_MODE][Tokenizer.EOF_TOKEN] = eofInTemplate;
  42024. _[AFTER_BODY_MODE] = Object.create(null);
  42025. _[AFTER_BODY_MODE][Tokenizer.CHARACTER_TOKEN] =
  42026. _[AFTER_BODY_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = tokenAfterBody;
  42027. _[AFTER_BODY_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = whitespaceCharacterInBody;
  42028. _[AFTER_BODY_MODE][Tokenizer.COMMENT_TOKEN] = appendCommentToRootHtmlElement;
  42029. _[AFTER_BODY_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  42030. _[AFTER_BODY_MODE][Tokenizer.START_TAG_TOKEN] = startTagAfterBody;
  42031. _[AFTER_BODY_MODE][Tokenizer.END_TAG_TOKEN] = endTagAfterBody;
  42032. _[AFTER_BODY_MODE][Tokenizer.EOF_TOKEN] = stopParsing;
  42033. _[IN_FRAMESET_MODE] = Object.create(null);
  42034. _[IN_FRAMESET_MODE][Tokenizer.CHARACTER_TOKEN] =
  42035. _[IN_FRAMESET_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken;
  42036. _[IN_FRAMESET_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = insertCharacters;
  42037. _[IN_FRAMESET_MODE][Tokenizer.COMMENT_TOKEN] = appendComment;
  42038. _[IN_FRAMESET_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  42039. _[IN_FRAMESET_MODE][Tokenizer.START_TAG_TOKEN] = startTagInFrameset;
  42040. _[IN_FRAMESET_MODE][Tokenizer.END_TAG_TOKEN] = endTagInFrameset;
  42041. _[IN_FRAMESET_MODE][Tokenizer.EOF_TOKEN] = stopParsing;
  42042. _[AFTER_FRAMESET_MODE] = Object.create(null);
  42043. _[AFTER_FRAMESET_MODE][Tokenizer.CHARACTER_TOKEN] =
  42044. _[AFTER_FRAMESET_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken;
  42045. _[AFTER_FRAMESET_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = insertCharacters;
  42046. _[AFTER_FRAMESET_MODE][Tokenizer.COMMENT_TOKEN] = appendComment;
  42047. _[AFTER_FRAMESET_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  42048. _[AFTER_FRAMESET_MODE][Tokenizer.START_TAG_TOKEN] = startTagAfterFrameset;
  42049. _[AFTER_FRAMESET_MODE][Tokenizer.END_TAG_TOKEN] = endTagAfterFrameset;
  42050. _[AFTER_FRAMESET_MODE][Tokenizer.EOF_TOKEN] = stopParsing;
  42051. _[AFTER_AFTER_BODY_MODE] = Object.create(null);
  42052. _[AFTER_AFTER_BODY_MODE][Tokenizer.CHARACTER_TOKEN] = tokenAfterAfterBody;
  42053. _[AFTER_AFTER_BODY_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = tokenAfterAfterBody;
  42054. _[AFTER_AFTER_BODY_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = whitespaceCharacterInBody;
  42055. _[AFTER_AFTER_BODY_MODE][Tokenizer.COMMENT_TOKEN] = appendCommentToDocument;
  42056. _[AFTER_AFTER_BODY_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  42057. _[AFTER_AFTER_BODY_MODE][Tokenizer.START_TAG_TOKEN] = startTagAfterAfterBody;
  42058. _[AFTER_AFTER_BODY_MODE][Tokenizer.END_TAG_TOKEN] = tokenAfterAfterBody;
  42059. _[AFTER_AFTER_BODY_MODE][Tokenizer.EOF_TOKEN] = stopParsing;
  42060. _[AFTER_AFTER_FRAMESET_MODE] = Object.create(null);
  42061. _[AFTER_AFTER_FRAMESET_MODE][Tokenizer.CHARACTER_TOKEN] =
  42062. _[AFTER_AFTER_FRAMESET_MODE][Tokenizer.NULL_CHARACTER_TOKEN] = ignoreToken;
  42063. _[AFTER_AFTER_FRAMESET_MODE][Tokenizer.WHITESPACE_CHARACTER_TOKEN] = whitespaceCharacterInBody;
  42064. _[AFTER_AFTER_FRAMESET_MODE][Tokenizer.COMMENT_TOKEN] = appendCommentToDocument;
  42065. _[AFTER_AFTER_FRAMESET_MODE][Tokenizer.DOCTYPE_TOKEN] = ignoreToken;
  42066. _[AFTER_AFTER_FRAMESET_MODE][Tokenizer.START_TAG_TOKEN] = startTagAfterAfterFrameset;
  42067. _[AFTER_AFTER_FRAMESET_MODE][Tokenizer.END_TAG_TOKEN] = ignoreToken;
  42068. _[AFTER_AFTER_FRAMESET_MODE][Tokenizer.EOF_TOKEN] = stopParsing;
  42069. //Parser
  42070. var Parser = module.exports = function (options) {
  42071. this.options = mergeOptions(DEFAULT_OPTIONS, options);
  42072. this.treeAdapter = this.options.treeAdapter;
  42073. this.pendingScript = null;
  42074. if (this.options.locationInfo)
  42075. new LocationInfoParserMixin(this);
  42076. };
  42077. // API
  42078. Parser.prototype.parse = function (html) {
  42079. var document = this.treeAdapter.createDocument();
  42080. this._bootstrap(document, null);
  42081. this.tokenizer.write(html, true);
  42082. this._runParsingLoop(null);
  42083. return document;
  42084. };
  42085. Parser.prototype.parseFragment = function (html, fragmentContext) {
  42086. //NOTE: use <template> element as a fragment context if context element was not provided,
  42087. //so we will parse in "forgiving" manner
  42088. if (!fragmentContext)
  42089. fragmentContext = this.treeAdapter.createElement($.TEMPLATE, NS.HTML, []);
  42090. //NOTE: create fake element which will be used as 'document' for fragment parsing.
  42091. //This is important for jsdom there 'document' can't be recreated, therefore
  42092. //fragment parsing causes messing of the main `document`.
  42093. var documentMock = this.treeAdapter.createElement('documentmock', NS.HTML, []);
  42094. this._bootstrap(documentMock, fragmentContext);
  42095. if (this.treeAdapter.getTagName(fragmentContext) === $.TEMPLATE)
  42096. this._pushTmplInsertionMode(IN_TEMPLATE_MODE);
  42097. this._initTokenizerForFragmentParsing();
  42098. this._insertFakeRootElement();
  42099. this._resetInsertionMode();
  42100. this._findFormInFragmentContext();
  42101. this.tokenizer.write(html, true);
  42102. this._runParsingLoop(null);
  42103. var rootElement = this.treeAdapter.getFirstChild(documentMock),
  42104. fragment = this.treeAdapter.createDocumentFragment();
  42105. this._adoptNodes(rootElement, fragment);
  42106. return fragment;
  42107. };
  42108. //Bootstrap parser
  42109. Parser.prototype._bootstrap = function (document, fragmentContext) {
  42110. this.tokenizer = new Tokenizer(this.options);
  42111. this.stopped = false;
  42112. this.insertionMode = INITIAL_MODE;
  42113. this.originalInsertionMode = '';
  42114. this.document = document;
  42115. this.fragmentContext = fragmentContext;
  42116. this.headElement = null;
  42117. this.formElement = null;
  42118. this.openElements = new OpenElementStack(this.document, this.treeAdapter);
  42119. this.activeFormattingElements = new FormattingElementList(this.treeAdapter);
  42120. this.tmplInsertionModeStack = [];
  42121. this.tmplInsertionModeStackTop = -1;
  42122. this.currentTmplInsertionMode = null;
  42123. this.pendingCharacterTokens = [];
  42124. this.hasNonWhitespacePendingCharacterToken = false;
  42125. this.framesetOk = true;
  42126. this.skipNextNewLine = false;
  42127. this.fosterParentingEnabled = false;
  42128. };
  42129. //Parsing loop
  42130. Parser.prototype._runParsingLoop = function (scriptHandler) {
  42131. while (!this.stopped) {
  42132. this._setupTokenizerCDATAMode();
  42133. var token = this.tokenizer.getNextToken();
  42134. if (token.type === Tokenizer.HIBERNATION_TOKEN)
  42135. break;
  42136. if (this.skipNextNewLine) {
  42137. this.skipNextNewLine = false;
  42138. if (token.type === Tokenizer.WHITESPACE_CHARACTER_TOKEN && token.chars[0] === '\n') {
  42139. if (token.chars.length === 1)
  42140. continue;
  42141. token.chars = token.chars.substr(1);
  42142. }
  42143. }
  42144. this._processInputToken(token);
  42145. if (scriptHandler && this.pendingScript)
  42146. break;
  42147. }
  42148. };
  42149. Parser.prototype.runParsingLoopForCurrentChunk = function (writeCallback, scriptHandler) {
  42150. this._runParsingLoop(scriptHandler);
  42151. if (scriptHandler && this.pendingScript) {
  42152. var script = this.pendingScript;
  42153. this.pendingScript = null;
  42154. scriptHandler(script);
  42155. return;
  42156. }
  42157. if (writeCallback)
  42158. writeCallback();
  42159. };
  42160. //Text parsing
  42161. Parser.prototype._setupTokenizerCDATAMode = function () {
  42162. var current = this._getAdjustedCurrentElement();
  42163. this.tokenizer.allowCDATA = current && current !== this.document &&
  42164. this.treeAdapter.getNamespaceURI(current) !== NS.HTML && !this._isIntegrationPoint(current);
  42165. };
  42166. Parser.prototype._switchToTextParsing = function (currentToken, nextTokenizerState) {
  42167. this._insertElement(currentToken, NS.HTML);
  42168. this.tokenizer.state = nextTokenizerState;
  42169. this.originalInsertionMode = this.insertionMode;
  42170. this.insertionMode = TEXT_MODE;
  42171. };
  42172. Parser.prototype.switchToPlaintextParsing = function () {
  42173. this.insertionMode = TEXT_MODE;
  42174. this.originalInsertionMode = IN_BODY_MODE;
  42175. this.tokenizer.state = Tokenizer.MODE.PLAINTEXT;
  42176. };
  42177. //Fragment parsing
  42178. Parser.prototype._getAdjustedCurrentElement = function () {
  42179. return this.openElements.stackTop === 0 && this.fragmentContext ?
  42180. this.fragmentContext :
  42181. this.openElements.current;
  42182. };
  42183. Parser.prototype._findFormInFragmentContext = function () {
  42184. var node = this.fragmentContext;
  42185. do {
  42186. if (this.treeAdapter.getTagName(node) === $.FORM) {
  42187. this.formElement = node;
  42188. break;
  42189. }
  42190. node = this.treeAdapter.getParentNode(node);
  42191. } while (node);
  42192. };
  42193. Parser.prototype._initTokenizerForFragmentParsing = function () {
  42194. if (this.treeAdapter.getNamespaceURI(this.fragmentContext) === NS.HTML) {
  42195. var tn = this.treeAdapter.getTagName(this.fragmentContext);
  42196. if (tn === $.TITLE || tn === $.TEXTAREA)
  42197. this.tokenizer.state = Tokenizer.MODE.RCDATA;
  42198. else if (tn === $.STYLE || tn === $.XMP || tn === $.IFRAME ||
  42199. tn === $.NOEMBED || tn === $.NOFRAMES || tn === $.NOSCRIPT)
  42200. this.tokenizer.state = Tokenizer.MODE.RAWTEXT;
  42201. else if (tn === $.SCRIPT)
  42202. this.tokenizer.state = Tokenizer.MODE.SCRIPT_DATA;
  42203. else if (tn === $.PLAINTEXT)
  42204. this.tokenizer.state = Tokenizer.MODE.PLAINTEXT;
  42205. }
  42206. };
  42207. //Tree mutation
  42208. Parser.prototype._setDocumentType = function (token) {
  42209. this.treeAdapter.setDocumentType(this.document, token.name, token.publicId, token.systemId);
  42210. };
  42211. Parser.prototype._attachElementToTree = function (element) {
  42212. if (this._shouldFosterParentOnInsertion())
  42213. this._fosterParentElement(element);
  42214. else {
  42215. var parent = this.openElements.currentTmplContent || this.openElements.current;
  42216. this.treeAdapter.appendChild(parent, element);
  42217. }
  42218. };
  42219. Parser.prototype._appendElement = function (token, namespaceURI) {
  42220. var element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);
  42221. this._attachElementToTree(element);
  42222. };
  42223. Parser.prototype._insertElement = function (token, namespaceURI) {
  42224. var element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);
  42225. this._attachElementToTree(element);
  42226. this.openElements.push(element);
  42227. };
  42228. Parser.prototype._insertFakeElement = function (tagName) {
  42229. var element = this.treeAdapter.createElement(tagName, NS.HTML, []);
  42230. this._attachElementToTree(element);
  42231. this.openElements.push(element);
  42232. };
  42233. Parser.prototype._insertTemplate = function (token) {
  42234. var tmpl = this.treeAdapter.createElement(token.tagName, NS.HTML, token.attrs),
  42235. content = this.treeAdapter.createDocumentFragment();
  42236. this.treeAdapter.setTemplateContent(tmpl, content);
  42237. this._attachElementToTree(tmpl);
  42238. this.openElements.push(tmpl);
  42239. };
  42240. Parser.prototype._insertFakeRootElement = function () {
  42241. var element = this.treeAdapter.createElement($.HTML, NS.HTML, []);
  42242. this.treeAdapter.appendChild(this.openElements.current, element);
  42243. this.openElements.push(element);
  42244. };
  42245. Parser.prototype._appendCommentNode = function (token, parent) {
  42246. var commentNode = this.treeAdapter.createCommentNode(token.data);
  42247. this.treeAdapter.appendChild(parent, commentNode);
  42248. };
  42249. Parser.prototype._insertCharacters = function (token) {
  42250. if (this._shouldFosterParentOnInsertion())
  42251. this._fosterParentText(token.chars);
  42252. else {
  42253. var parent = this.openElements.currentTmplContent || this.openElements.current;
  42254. this.treeAdapter.insertText(parent, token.chars);
  42255. }
  42256. };
  42257. Parser.prototype._adoptNodes = function (donor, recipient) {
  42258. while (true) {
  42259. var child = this.treeAdapter.getFirstChild(donor);
  42260. if (!child)
  42261. break;
  42262. this.treeAdapter.detachNode(child);
  42263. this.treeAdapter.appendChild(recipient, child);
  42264. }
  42265. };
  42266. //Token processing
  42267. Parser.prototype._shouldProcessTokenInForeignContent = function (token) {
  42268. var current = this._getAdjustedCurrentElement();
  42269. if (!current || current === this.document)
  42270. return false;
  42271. var ns = this.treeAdapter.getNamespaceURI(current);
  42272. if (ns === NS.HTML)
  42273. return false;
  42274. if (this.treeAdapter.getTagName(current) === $.ANNOTATION_XML && ns === NS.MATHML &&
  42275. token.type === Tokenizer.START_TAG_TOKEN && token.tagName === $.SVG)
  42276. return false;
  42277. var isCharacterToken = token.type === Tokenizer.CHARACTER_TOKEN ||
  42278. token.type === Tokenizer.NULL_CHARACTER_TOKEN ||
  42279. token.type === Tokenizer.WHITESPACE_CHARACTER_TOKEN,
  42280. isMathMLTextStartTag = token.type === Tokenizer.START_TAG_TOKEN &&
  42281. token.tagName !== $.MGLYPH &&
  42282. token.tagName !== $.MALIGNMARK;
  42283. if ((isMathMLTextStartTag || isCharacterToken) && this._isIntegrationPoint(current, NS.MATHML))
  42284. return false;
  42285. if ((token.type === Tokenizer.START_TAG_TOKEN || isCharacterToken) && this._isIntegrationPoint(current, NS.HTML))
  42286. return false;
  42287. return token.type !== Tokenizer.EOF_TOKEN;
  42288. };
  42289. Parser.prototype._processToken = function (token) {
  42290. _[this.insertionMode][token.type](this, token);
  42291. };
  42292. Parser.prototype._processTokenInBodyMode = function (token) {
  42293. _[IN_BODY_MODE][token.type](this, token);
  42294. };
  42295. Parser.prototype._processTokenInForeignContent = function (token) {
  42296. if (token.type === Tokenizer.CHARACTER_TOKEN)
  42297. characterInForeignContent(this, token);
  42298. else if (token.type === Tokenizer.NULL_CHARACTER_TOKEN)
  42299. nullCharacterInForeignContent(this, token);
  42300. else if (token.type === Tokenizer.WHITESPACE_CHARACTER_TOKEN)
  42301. insertCharacters(this, token);
  42302. else if (token.type === Tokenizer.COMMENT_TOKEN)
  42303. appendComment(this, token);
  42304. else if (token.type === Tokenizer.START_TAG_TOKEN)
  42305. startTagInForeignContent(this, token);
  42306. else if (token.type === Tokenizer.END_TAG_TOKEN)
  42307. endTagInForeignContent(this, token);
  42308. };
  42309. Parser.prototype._processInputToken = function (token) {
  42310. if (this._shouldProcessTokenInForeignContent(token))
  42311. this._processTokenInForeignContent(token);
  42312. else
  42313. this._processToken(token);
  42314. };
  42315. //Integration points
  42316. Parser.prototype._isIntegrationPoint = function (element, foreignNS) {
  42317. var tn = this.treeAdapter.getTagName(element),
  42318. ns = this.treeAdapter.getNamespaceURI(element),
  42319. attrs = this.treeAdapter.getAttrList(element);
  42320. return foreignContent.isIntegrationPoint(tn, ns, attrs, foreignNS);
  42321. };
  42322. //Active formatting elements reconstruction
  42323. Parser.prototype._reconstructActiveFormattingElements = function () {
  42324. var listLength = this.activeFormattingElements.length;
  42325. if (listLength) {
  42326. var unopenIdx = listLength,
  42327. entry = null;
  42328. do {
  42329. unopenIdx--;
  42330. entry = this.activeFormattingElements.entries[unopenIdx];
  42331. if (entry.type === FormattingElementList.MARKER_ENTRY || this.openElements.contains(entry.element)) {
  42332. unopenIdx++;
  42333. break;
  42334. }
  42335. } while (unopenIdx > 0);
  42336. for (var i = unopenIdx; i < listLength; i++) {
  42337. entry = this.activeFormattingElements.entries[i];
  42338. this._insertElement(entry.token, this.treeAdapter.getNamespaceURI(entry.element));
  42339. entry.element = this.openElements.current;
  42340. }
  42341. }
  42342. };
  42343. //Close elements
  42344. Parser.prototype._closeTableCell = function () {
  42345. this.openElements.generateImpliedEndTags();
  42346. this.openElements.popUntilTableCellPopped();
  42347. this.activeFormattingElements.clearToLastMarker();
  42348. this.insertionMode = IN_ROW_MODE;
  42349. };
  42350. Parser.prototype._closePElement = function () {
  42351. this.openElements.generateImpliedEndTagsWithExclusion($.P);
  42352. this.openElements.popUntilTagNamePopped($.P);
  42353. };
  42354. //Insertion modes
  42355. Parser.prototype._resetInsertionMode = function () {
  42356. for (var i = this.openElements.stackTop, last = false; i >= 0; i--) {
  42357. var element = this.openElements.items[i];
  42358. if (i === 0) {
  42359. last = true;
  42360. if (this.fragmentContext)
  42361. element = this.fragmentContext;
  42362. }
  42363. var tn = this.treeAdapter.getTagName(element),
  42364. newInsertionMode = INSERTION_MODE_RESET_MAP[tn];
  42365. if (newInsertionMode) {
  42366. this.insertionMode = newInsertionMode;
  42367. break;
  42368. }
  42369. else if (!last && (tn === $.TD || tn === $.TH)) {
  42370. this.insertionMode = IN_CELL_MODE;
  42371. break;
  42372. }
  42373. else if (!last && tn === $.HEAD) {
  42374. this.insertionMode = IN_HEAD_MODE;
  42375. break;
  42376. }
  42377. else if (tn === $.SELECT) {
  42378. this._resetInsertionModeForSelect(i);
  42379. break;
  42380. }
  42381. else if (tn === $.TEMPLATE) {
  42382. this.insertionMode = this.currentTmplInsertionMode;
  42383. break;
  42384. }
  42385. else if (tn === $.HTML) {
  42386. this.insertionMode = this.headElement ? AFTER_HEAD_MODE : BEFORE_HEAD_MODE;
  42387. break;
  42388. }
  42389. else if (last) {
  42390. this.insertionMode = IN_BODY_MODE;
  42391. break;
  42392. }
  42393. }
  42394. };
  42395. Parser.prototype._resetInsertionModeForSelect = function (selectIdx) {
  42396. if (selectIdx > 0) {
  42397. for (var i = selectIdx - 1; i > 0; i--) {
  42398. var ancestor = this.openElements.items[i],
  42399. tn = this.treeAdapter.getTagName(ancestor);
  42400. if (tn === $.TEMPLATE)
  42401. break;
  42402. else if (tn === $.TABLE) {
  42403. this.insertionMode = IN_SELECT_IN_TABLE_MODE;
  42404. return;
  42405. }
  42406. }
  42407. }
  42408. this.insertionMode = IN_SELECT_MODE;
  42409. };
  42410. Parser.prototype._pushTmplInsertionMode = function (mode) {
  42411. this.tmplInsertionModeStack.push(mode);
  42412. this.tmplInsertionModeStackTop++;
  42413. this.currentTmplInsertionMode = mode;
  42414. };
  42415. Parser.prototype._popTmplInsertionMode = function () {
  42416. this.tmplInsertionModeStack.pop();
  42417. this.tmplInsertionModeStackTop--;
  42418. this.currentTmplInsertionMode = this.tmplInsertionModeStack[this.tmplInsertionModeStackTop];
  42419. };
  42420. //Foster parenting
  42421. Parser.prototype._isElementCausesFosterParenting = function (element) {
  42422. var tn = this.treeAdapter.getTagName(element);
  42423. return tn === $.TABLE || tn === $.TBODY || tn === $.TFOOT || tn === $.THEAD || tn === $.TR;
  42424. };
  42425. Parser.prototype._shouldFosterParentOnInsertion = function () {
  42426. return this.fosterParentingEnabled && this._isElementCausesFosterParenting(this.openElements.current);
  42427. };
  42428. Parser.prototype._findFosterParentingLocation = function () {
  42429. var location = {
  42430. parent: null,
  42431. beforeElement: null
  42432. };
  42433. for (var i = this.openElements.stackTop; i >= 0; i--) {
  42434. var openElement = this.openElements.items[i],
  42435. tn = this.treeAdapter.getTagName(openElement),
  42436. ns = this.treeAdapter.getNamespaceURI(openElement);
  42437. if (tn === $.TEMPLATE && ns === NS.HTML) {
  42438. location.parent = this.treeAdapter.getTemplateContent(openElement);
  42439. break;
  42440. }
  42441. else if (tn === $.TABLE) {
  42442. location.parent = this.treeAdapter.getParentNode(openElement);
  42443. if (location.parent)
  42444. location.beforeElement = openElement;
  42445. else
  42446. location.parent = this.openElements.items[i - 1];
  42447. break;
  42448. }
  42449. }
  42450. if (!location.parent)
  42451. location.parent = this.openElements.items[0];
  42452. return location;
  42453. };
  42454. Parser.prototype._fosterParentElement = function (element) {
  42455. var location = this._findFosterParentingLocation();
  42456. if (location.beforeElement)
  42457. this.treeAdapter.insertBefore(location.parent, element, location.beforeElement);
  42458. else
  42459. this.treeAdapter.appendChild(location.parent, element);
  42460. };
  42461. Parser.prototype._fosterParentText = function (chars) {
  42462. var location = this._findFosterParentingLocation();
  42463. if (location.beforeElement)
  42464. this.treeAdapter.insertTextBefore(location.parent, chars, location.beforeElement);
  42465. else
  42466. this.treeAdapter.insertText(location.parent, chars);
  42467. };
  42468. //Special elements
  42469. Parser.prototype._isSpecialElement = function (element) {
  42470. var tn = this.treeAdapter.getTagName(element),
  42471. ns = this.treeAdapter.getNamespaceURI(element);
  42472. return HTML.SPECIAL_ELEMENTS[ns][tn];
  42473. };
  42474. //Adoption agency algorithm
  42475. //(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#adoptionAgency)
  42476. //------------------------------------------------------------------
  42477. //Steps 5-8 of the algorithm
  42478. function aaObtainFormattingElementEntry(p, token) {
  42479. var formattingElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName(token.tagName);
  42480. if (formattingElementEntry) {
  42481. if (!p.openElements.contains(formattingElementEntry.element)) {
  42482. p.activeFormattingElements.removeEntry(formattingElementEntry);
  42483. formattingElementEntry = null;
  42484. }
  42485. else if (!p.openElements.hasInScope(token.tagName))
  42486. formattingElementEntry = null;
  42487. }
  42488. else
  42489. genericEndTagInBody(p, token);
  42490. return formattingElementEntry;
  42491. }
  42492. //Steps 9 and 10 of the algorithm
  42493. function aaObtainFurthestBlock(p, formattingElementEntry) {
  42494. var furthestBlock = null;
  42495. for (var i = p.openElements.stackTop; i >= 0; i--) {
  42496. var element = p.openElements.items[i];
  42497. if (element === formattingElementEntry.element)
  42498. break;
  42499. if (p._isSpecialElement(element))
  42500. furthestBlock = element;
  42501. }
  42502. if (!furthestBlock) {
  42503. p.openElements.popUntilElementPopped(formattingElementEntry.element);
  42504. p.activeFormattingElements.removeEntry(formattingElementEntry);
  42505. }
  42506. return furthestBlock;
  42507. }
  42508. //Step 13 of the algorithm
  42509. function aaInnerLoop(p, furthestBlock, formattingElement) {
  42510. var lastElement = furthestBlock,
  42511. nextElement = p.openElements.getCommonAncestor(furthestBlock);
  42512. for (var i = 0, element = nextElement; element !== formattingElement; i++, element = nextElement) {
  42513. //NOTE: store next element for the next loop iteration (it may be deleted from the stack by step 9.5)
  42514. nextElement = p.openElements.getCommonAncestor(element);
  42515. var elementEntry = p.activeFormattingElements.getElementEntry(element),
  42516. counterOverflow = elementEntry && i >= AA_INNER_LOOP_ITER,
  42517. shouldRemoveFromOpenElements = !elementEntry || counterOverflow;
  42518. if (shouldRemoveFromOpenElements) {
  42519. if (counterOverflow)
  42520. p.activeFormattingElements.removeEntry(elementEntry);
  42521. p.openElements.remove(element);
  42522. }
  42523. else {
  42524. element = aaRecreateElementFromEntry(p, elementEntry);
  42525. if (lastElement === furthestBlock)
  42526. p.activeFormattingElements.bookmark = elementEntry;
  42527. p.treeAdapter.detachNode(lastElement);
  42528. p.treeAdapter.appendChild(element, lastElement);
  42529. lastElement = element;
  42530. }
  42531. }
  42532. return lastElement;
  42533. }
  42534. //Step 13.7 of the algorithm
  42535. function aaRecreateElementFromEntry(p, elementEntry) {
  42536. var ns = p.treeAdapter.getNamespaceURI(elementEntry.element),
  42537. newElement = p.treeAdapter.createElement(elementEntry.token.tagName, ns, elementEntry.token.attrs);
  42538. p.openElements.replace(elementEntry.element, newElement);
  42539. elementEntry.element = newElement;
  42540. return newElement;
  42541. }
  42542. //Step 14 of the algorithm
  42543. function aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement) {
  42544. if (p._isElementCausesFosterParenting(commonAncestor))
  42545. p._fosterParentElement(lastElement);
  42546. else {
  42547. var tn = p.treeAdapter.getTagName(commonAncestor),
  42548. ns = p.treeAdapter.getNamespaceURI(commonAncestor);
  42549. if (tn === $.TEMPLATE && ns === NS.HTML)
  42550. commonAncestor = p.treeAdapter.getTemplateContent(commonAncestor);
  42551. p.treeAdapter.appendChild(commonAncestor, lastElement);
  42552. }
  42553. }
  42554. //Steps 15-19 of the algorithm
  42555. function aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry) {
  42556. var ns = p.treeAdapter.getNamespaceURI(formattingElementEntry.element),
  42557. token = formattingElementEntry.token,
  42558. newElement = p.treeAdapter.createElement(token.tagName, ns, token.attrs);
  42559. p._adoptNodes(furthestBlock, newElement);
  42560. p.treeAdapter.appendChild(furthestBlock, newElement);
  42561. p.activeFormattingElements.insertElementAfterBookmark(newElement, formattingElementEntry.token);
  42562. p.activeFormattingElements.removeEntry(formattingElementEntry);
  42563. p.openElements.remove(formattingElementEntry.element);
  42564. p.openElements.insertAfter(furthestBlock, newElement);
  42565. }
  42566. //Algorithm entry point
  42567. function callAdoptionAgency(p, token) {
  42568. var formattingElementEntry;
  42569. for (var i = 0; i < AA_OUTER_LOOP_ITER; i++) {
  42570. formattingElementEntry = aaObtainFormattingElementEntry(p, token, formattingElementEntry);
  42571. if (!formattingElementEntry)
  42572. break;
  42573. var furthestBlock = aaObtainFurthestBlock(p, formattingElementEntry);
  42574. if (!furthestBlock)
  42575. break;
  42576. p.activeFormattingElements.bookmark = formattingElementEntry;
  42577. var lastElement = aaInnerLoop(p, furthestBlock, formattingElementEntry.element),
  42578. commonAncestor = p.openElements.getCommonAncestor(formattingElementEntry.element);
  42579. p.treeAdapter.detachNode(lastElement);
  42580. aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement);
  42581. aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry);
  42582. }
  42583. }
  42584. //Generic token handlers
  42585. //------------------------------------------------------------------
  42586. function ignoreToken() {
  42587. //NOTE: do nothing =)
  42588. }
  42589. function appendComment(p, token) {
  42590. p._appendCommentNode(token, p.openElements.currentTmplContent || p.openElements.current);
  42591. }
  42592. function appendCommentToRootHtmlElement(p, token) {
  42593. p._appendCommentNode(token, p.openElements.items[0]);
  42594. }
  42595. function appendCommentToDocument(p, token) {
  42596. p._appendCommentNode(token, p.document);
  42597. }
  42598. function insertCharacters(p, token) {
  42599. p._insertCharacters(token);
  42600. }
  42601. function stopParsing(p) {
  42602. p.stopped = true;
  42603. }
  42604. //12.2.5.4.1 The "initial" insertion mode
  42605. //------------------------------------------------------------------
  42606. function doctypeInInitialMode(p, token) {
  42607. p._setDocumentType(token);
  42608. var mode = token.forceQuirks ?
  42609. HTML.DOCUMENT_MODE.QUIRKS :
  42610. doctype.getDocumentMode(token.name, token.publicId, token.systemId);
  42611. p.treeAdapter.setDocumentMode(p.document, mode);
  42612. p.insertionMode = BEFORE_HTML_MODE;
  42613. }
  42614. function tokenInInitialMode(p, token) {
  42615. p.treeAdapter.setDocumentMode(p.document, HTML.DOCUMENT_MODE.QUIRKS);
  42616. p.insertionMode = BEFORE_HTML_MODE;
  42617. p._processToken(token);
  42618. }
  42619. //12.2.5.4.2 The "before html" insertion mode
  42620. //------------------------------------------------------------------
  42621. function startTagBeforeHtml(p, token) {
  42622. if (token.tagName === $.HTML) {
  42623. p._insertElement(token, NS.HTML);
  42624. p.insertionMode = BEFORE_HEAD_MODE;
  42625. }
  42626. else
  42627. tokenBeforeHtml(p, token);
  42628. }
  42629. function endTagBeforeHtml(p, token) {
  42630. var tn = token.tagName;
  42631. if (tn === $.HTML || tn === $.HEAD || tn === $.BODY || tn === $.BR)
  42632. tokenBeforeHtml(p, token);
  42633. }
  42634. function tokenBeforeHtml(p, token) {
  42635. p._insertFakeRootElement();
  42636. p.insertionMode = BEFORE_HEAD_MODE;
  42637. p._processToken(token);
  42638. }
  42639. //12.2.5.4.3 The "before head" insertion mode
  42640. //------------------------------------------------------------------
  42641. function startTagBeforeHead(p, token) {
  42642. var tn = token.tagName;
  42643. if (tn === $.HTML)
  42644. startTagInBody(p, token);
  42645. else if (tn === $.HEAD) {
  42646. p._insertElement(token, NS.HTML);
  42647. p.headElement = p.openElements.current;
  42648. p.insertionMode = IN_HEAD_MODE;
  42649. }
  42650. else
  42651. tokenBeforeHead(p, token);
  42652. }
  42653. function endTagBeforeHead(p, token) {
  42654. var tn = token.tagName;
  42655. if (tn === $.HEAD || tn === $.BODY || tn === $.HTML || tn === $.BR)
  42656. tokenBeforeHead(p, token);
  42657. }
  42658. function tokenBeforeHead(p, token) {
  42659. p._insertFakeElement($.HEAD);
  42660. p.headElement = p.openElements.current;
  42661. p.insertionMode = IN_HEAD_MODE;
  42662. p._processToken(token);
  42663. }
  42664. //12.2.5.4.4 The "in head" insertion mode
  42665. //------------------------------------------------------------------
  42666. function startTagInHead(p, token) {
  42667. var tn = token.tagName;
  42668. if (tn === $.HTML)
  42669. startTagInBody(p, token);
  42670. else if (tn === $.BASE || tn === $.BASEFONT || tn === $.BGSOUND || tn === $.LINK || tn === $.META)
  42671. p._appendElement(token, NS.HTML);
  42672. else if (tn === $.TITLE)
  42673. p._switchToTextParsing(token, Tokenizer.MODE.RCDATA);
  42674. //NOTE: here we assume that we always act as an interactive user agent with enabled scripting, so we parse
  42675. //<noscript> as a rawtext.
  42676. else if (tn === $.NOSCRIPT || tn === $.NOFRAMES || tn === $.STYLE)
  42677. p._switchToTextParsing(token, Tokenizer.MODE.RAWTEXT);
  42678. else if (tn === $.SCRIPT)
  42679. p._switchToTextParsing(token, Tokenizer.MODE.SCRIPT_DATA);
  42680. else if (tn === $.TEMPLATE) {
  42681. p._insertTemplate(token, NS.HTML);
  42682. p.activeFormattingElements.insertMarker();
  42683. p.framesetOk = false;
  42684. p.insertionMode = IN_TEMPLATE_MODE;
  42685. p._pushTmplInsertionMode(IN_TEMPLATE_MODE);
  42686. }
  42687. else if (tn !== $.HEAD)
  42688. tokenInHead(p, token);
  42689. }
  42690. function endTagInHead(p, token) {
  42691. var tn = token.tagName;
  42692. if (tn === $.HEAD) {
  42693. p.openElements.pop();
  42694. p.insertionMode = AFTER_HEAD_MODE;
  42695. }
  42696. else if (tn === $.BODY || tn === $.BR || tn === $.HTML)
  42697. tokenInHead(p, token);
  42698. else if (tn === $.TEMPLATE && p.openElements.tmplCount > 0) {
  42699. p.openElements.generateImpliedEndTags();
  42700. p.openElements.popUntilTagNamePopped($.TEMPLATE);
  42701. p.activeFormattingElements.clearToLastMarker();
  42702. p._popTmplInsertionMode();
  42703. p._resetInsertionMode();
  42704. }
  42705. }
  42706. function tokenInHead(p, token) {
  42707. p.openElements.pop();
  42708. p.insertionMode = AFTER_HEAD_MODE;
  42709. p._processToken(token);
  42710. }
  42711. //12.2.5.4.6 The "after head" insertion mode
  42712. //------------------------------------------------------------------
  42713. function startTagAfterHead(p, token) {
  42714. var tn = token.tagName;
  42715. if (tn === $.HTML)
  42716. startTagInBody(p, token);
  42717. else if (tn === $.BODY) {
  42718. p._insertElement(token, NS.HTML);
  42719. p.framesetOk = false;
  42720. p.insertionMode = IN_BODY_MODE;
  42721. }
  42722. else if (tn === $.FRAMESET) {
  42723. p._insertElement(token, NS.HTML);
  42724. p.insertionMode = IN_FRAMESET_MODE;
  42725. }
  42726. else if (tn === $.BASE || tn === $.BASEFONT || tn === $.BGSOUND || tn === $.LINK || tn === $.META ||
  42727. tn === $.NOFRAMES || tn === $.SCRIPT || tn === $.STYLE || tn === $.TEMPLATE || tn === $.TITLE) {
  42728. p.openElements.push(p.headElement);
  42729. startTagInHead(p, token);
  42730. p.openElements.remove(p.headElement);
  42731. }
  42732. else if (tn !== $.HEAD)
  42733. tokenAfterHead(p, token);
  42734. }
  42735. function endTagAfterHead(p, token) {
  42736. var tn = token.tagName;
  42737. if (tn === $.BODY || tn === $.HTML || tn === $.BR)
  42738. tokenAfterHead(p, token);
  42739. else if (tn === $.TEMPLATE)
  42740. endTagInHead(p, token);
  42741. }
  42742. function tokenAfterHead(p, token) {
  42743. p._insertFakeElement($.BODY);
  42744. p.insertionMode = IN_BODY_MODE;
  42745. p._processToken(token);
  42746. }
  42747. //12.2.5.4.7 The "in body" insertion mode
  42748. //------------------------------------------------------------------
  42749. function whitespaceCharacterInBody(p, token) {
  42750. p._reconstructActiveFormattingElements();
  42751. p._insertCharacters(token);
  42752. }
  42753. function characterInBody(p, token) {
  42754. p._reconstructActiveFormattingElements();
  42755. p._insertCharacters(token);
  42756. p.framesetOk = false;
  42757. }
  42758. function htmlStartTagInBody(p, token) {
  42759. if (p.openElements.tmplCount === 0)
  42760. p.treeAdapter.adoptAttributes(p.openElements.items[0], token.attrs);
  42761. }
  42762. function bodyStartTagInBody(p, token) {
  42763. var bodyElement = p.openElements.tryPeekProperlyNestedBodyElement();
  42764. if (bodyElement && p.openElements.tmplCount === 0) {
  42765. p.framesetOk = false;
  42766. p.treeAdapter.adoptAttributes(bodyElement, token.attrs);
  42767. }
  42768. }
  42769. function framesetStartTagInBody(p, token) {
  42770. var bodyElement = p.openElements.tryPeekProperlyNestedBodyElement();
  42771. if (p.framesetOk && bodyElement) {
  42772. p.treeAdapter.detachNode(bodyElement);
  42773. p.openElements.popAllUpToHtmlElement();
  42774. p._insertElement(token, NS.HTML);
  42775. p.insertionMode = IN_FRAMESET_MODE;
  42776. }
  42777. }
  42778. function addressStartTagInBody(p, token) {
  42779. if (p.openElements.hasInButtonScope($.P))
  42780. p._closePElement();
  42781. p._insertElement(token, NS.HTML);
  42782. }
  42783. function numberedHeaderStartTagInBody(p, token) {
  42784. if (p.openElements.hasInButtonScope($.P))
  42785. p._closePElement();
  42786. var tn = p.openElements.currentTagName;
  42787. if (tn === $.H1 || tn === $.H2 || tn === $.H3 || tn === $.H4 || tn === $.H5 || tn === $.H6)
  42788. p.openElements.pop();
  42789. p._insertElement(token, NS.HTML);
  42790. }
  42791. function preStartTagInBody(p, token) {
  42792. if (p.openElements.hasInButtonScope($.P))
  42793. p._closePElement();
  42794. p._insertElement(token, NS.HTML);
  42795. //NOTE: If the next token is a U+000A LINE FEED (LF) character token, then ignore that token and move
  42796. //on to the next one. (Newlines at the start of pre blocks are ignored as an authoring convenience.)
  42797. p.skipNextNewLine = true;
  42798. p.framesetOk = false;
  42799. }
  42800. function formStartTagInBody(p, token) {
  42801. var inTemplate = p.openElements.tmplCount > 0;
  42802. if (!p.formElement || inTemplate) {
  42803. if (p.openElements.hasInButtonScope($.P))
  42804. p._closePElement();
  42805. p._insertElement(token, NS.HTML);
  42806. if (!inTemplate)
  42807. p.formElement = p.openElements.current;
  42808. }
  42809. }
  42810. function listItemStartTagInBody(p, token) {
  42811. p.framesetOk = false;
  42812. var tn = token.tagName;
  42813. for (var i = p.openElements.stackTop; i >= 0; i--) {
  42814. var element = p.openElements.items[i],
  42815. elementTn = p.treeAdapter.getTagName(element),
  42816. closeTn = null;
  42817. if (tn === $.LI && elementTn === $.LI)
  42818. closeTn = $.LI;
  42819. else if ((tn === $.DD || tn === $.DT) && (elementTn === $.DD || elementTn === $.DT))
  42820. closeTn = elementTn;
  42821. if (closeTn) {
  42822. p.openElements.generateImpliedEndTagsWithExclusion(closeTn);
  42823. p.openElements.popUntilTagNamePopped(closeTn);
  42824. break;
  42825. }
  42826. if (elementTn !== $.ADDRESS && elementTn !== $.DIV && elementTn !== $.P && p._isSpecialElement(element))
  42827. break;
  42828. }
  42829. if (p.openElements.hasInButtonScope($.P))
  42830. p._closePElement();
  42831. p._insertElement(token, NS.HTML);
  42832. }
  42833. function plaintextStartTagInBody(p, token) {
  42834. if (p.openElements.hasInButtonScope($.P))
  42835. p._closePElement();
  42836. p._insertElement(token, NS.HTML);
  42837. p.tokenizer.state = Tokenizer.MODE.PLAINTEXT;
  42838. }
  42839. function buttonStartTagInBody(p, token) {
  42840. if (p.openElements.hasInScope($.BUTTON)) {
  42841. p.openElements.generateImpliedEndTags();
  42842. p.openElements.popUntilTagNamePopped($.BUTTON);
  42843. }
  42844. p._reconstructActiveFormattingElements();
  42845. p._insertElement(token, NS.HTML);
  42846. p.framesetOk = false;
  42847. }
  42848. function aStartTagInBody(p, token) {
  42849. var activeElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName($.A);
  42850. if (activeElementEntry) {
  42851. callAdoptionAgency(p, token);
  42852. p.openElements.remove(activeElementEntry.element);
  42853. p.activeFormattingElements.removeEntry(activeElementEntry);
  42854. }
  42855. p._reconstructActiveFormattingElements();
  42856. p._insertElement(token, NS.HTML);
  42857. p.activeFormattingElements.pushElement(p.openElements.current, token);
  42858. }
  42859. function bStartTagInBody(p, token) {
  42860. p._reconstructActiveFormattingElements();
  42861. p._insertElement(token, NS.HTML);
  42862. p.activeFormattingElements.pushElement(p.openElements.current, token);
  42863. }
  42864. function nobrStartTagInBody(p, token) {
  42865. p._reconstructActiveFormattingElements();
  42866. if (p.openElements.hasInScope($.NOBR)) {
  42867. callAdoptionAgency(p, token);
  42868. p._reconstructActiveFormattingElements();
  42869. }
  42870. p._insertElement(token, NS.HTML);
  42871. p.activeFormattingElements.pushElement(p.openElements.current, token);
  42872. }
  42873. function appletStartTagInBody(p, token) {
  42874. p._reconstructActiveFormattingElements();
  42875. p._insertElement(token, NS.HTML);
  42876. p.activeFormattingElements.insertMarker();
  42877. p.framesetOk = false;
  42878. }
  42879. function tableStartTagInBody(p, token) {
  42880. if (p.treeAdapter.getDocumentMode(p.document) !== HTML.DOCUMENT_MODE.QUIRKS && p.openElements.hasInButtonScope($.P))
  42881. p._closePElement();
  42882. p._insertElement(token, NS.HTML);
  42883. p.framesetOk = false;
  42884. p.insertionMode = IN_TABLE_MODE;
  42885. }
  42886. function areaStartTagInBody(p, token) {
  42887. p._reconstructActiveFormattingElements();
  42888. p._appendElement(token, NS.HTML);
  42889. p.framesetOk = false;
  42890. }
  42891. function inputStartTagInBody(p, token) {
  42892. p._reconstructActiveFormattingElements();
  42893. p._appendElement(token, NS.HTML);
  42894. var inputType = Tokenizer.getTokenAttr(token, ATTRS.TYPE);
  42895. if (!inputType || inputType.toLowerCase() !== HIDDEN_INPUT_TYPE)
  42896. p.framesetOk = false;
  42897. }
  42898. function paramStartTagInBody(p, token) {
  42899. p._appendElement(token, NS.HTML);
  42900. }
  42901. function hrStartTagInBody(p, token) {
  42902. if (p.openElements.hasInButtonScope($.P))
  42903. p._closePElement();
  42904. if (p.openElements.currentTagName === $.MENUITEM)
  42905. p.openElements.pop();
  42906. p._appendElement(token, NS.HTML);
  42907. p.framesetOk = false;
  42908. }
  42909. function imageStartTagInBody(p, token) {
  42910. token.tagName = $.IMG;
  42911. areaStartTagInBody(p, token);
  42912. }
  42913. function textareaStartTagInBody(p, token) {
  42914. p._insertElement(token, NS.HTML);
  42915. //NOTE: If the next token is a U+000A LINE FEED (LF) character token, then ignore that token and move
  42916. //on to the next one. (Newlines at the start of textarea elements are ignored as an authoring convenience.)
  42917. p.skipNextNewLine = true;
  42918. p.tokenizer.state = Tokenizer.MODE.RCDATA;
  42919. p.originalInsertionMode = p.insertionMode;
  42920. p.framesetOk = false;
  42921. p.insertionMode = TEXT_MODE;
  42922. }
  42923. function xmpStartTagInBody(p, token) {
  42924. if (p.openElements.hasInButtonScope($.P))
  42925. p._closePElement();
  42926. p._reconstructActiveFormattingElements();
  42927. p.framesetOk = false;
  42928. p._switchToTextParsing(token, Tokenizer.MODE.RAWTEXT);
  42929. }
  42930. function iframeStartTagInBody(p, token) {
  42931. p.framesetOk = false;
  42932. p._switchToTextParsing(token, Tokenizer.MODE.RAWTEXT);
  42933. }
  42934. //NOTE: here we assume that we always act as an user agent with enabled plugins, so we parse
  42935. //<noembed> as a rawtext.
  42936. function noembedStartTagInBody(p, token) {
  42937. p._switchToTextParsing(token, Tokenizer.MODE.RAWTEXT);
  42938. }
  42939. function selectStartTagInBody(p, token) {
  42940. p._reconstructActiveFormattingElements();
  42941. p._insertElement(token, NS.HTML);
  42942. p.framesetOk = false;
  42943. if (p.insertionMode === IN_TABLE_MODE ||
  42944. p.insertionMode === IN_CAPTION_MODE ||
  42945. p.insertionMode === IN_TABLE_BODY_MODE ||
  42946. p.insertionMode === IN_ROW_MODE ||
  42947. p.insertionMode === IN_CELL_MODE)
  42948. p.insertionMode = IN_SELECT_IN_TABLE_MODE;
  42949. else
  42950. p.insertionMode = IN_SELECT_MODE;
  42951. }
  42952. function optgroupStartTagInBody(p, token) {
  42953. if (p.openElements.currentTagName === $.OPTION)
  42954. p.openElements.pop();
  42955. p._reconstructActiveFormattingElements();
  42956. p._insertElement(token, NS.HTML);
  42957. }
  42958. function rbStartTagInBody(p, token) {
  42959. if (p.openElements.hasInScope($.RUBY))
  42960. p.openElements.generateImpliedEndTags();
  42961. p._insertElement(token, NS.HTML);
  42962. }
  42963. function rtStartTagInBody(p, token) {
  42964. if (p.openElements.hasInScope($.RUBY))
  42965. p.openElements.generateImpliedEndTagsWithExclusion($.RTC);
  42966. p._insertElement(token, NS.HTML);
  42967. }
  42968. function menuitemStartTagInBody(p, token) {
  42969. if (p.openElements.currentTagName === $.MENUITEM)
  42970. p.openElements.pop();
  42971. // TODO needs clarification, see https://github.com/whatwg/html/pull/907/files#r73505877
  42972. p._reconstructActiveFormattingElements();
  42973. p._insertElement(token, NS.HTML);
  42974. }
  42975. function menuStartTagInBody(p, token) {
  42976. if (p.openElements.hasInButtonScope($.P))
  42977. p._closePElement();
  42978. if (p.openElements.currentTagName === $.MENUITEM)
  42979. p.openElements.pop();
  42980. p._insertElement(token, NS.HTML);
  42981. }
  42982. function mathStartTagInBody(p, token) {
  42983. p._reconstructActiveFormattingElements();
  42984. foreignContent.adjustTokenMathMLAttrs(token);
  42985. foreignContent.adjustTokenXMLAttrs(token);
  42986. if (token.selfClosing)
  42987. p._appendElement(token, NS.MATHML);
  42988. else
  42989. p._insertElement(token, NS.MATHML);
  42990. }
  42991. function svgStartTagInBody(p, token) {
  42992. p._reconstructActiveFormattingElements();
  42993. foreignContent.adjustTokenSVGAttrs(token);
  42994. foreignContent.adjustTokenXMLAttrs(token);
  42995. if (token.selfClosing)
  42996. p._appendElement(token, NS.SVG);
  42997. else
  42998. p._insertElement(token, NS.SVG);
  42999. }
  43000. function genericStartTagInBody(p, token) {
  43001. p._reconstructActiveFormattingElements();
  43002. p._insertElement(token, NS.HTML);
  43003. }
  43004. //OPTIMIZATION: Integer comparisons are low-cost, so we can use very fast tag name length filters here.
  43005. //It's faster than using dictionary.
  43006. function startTagInBody(p, token) {
  43007. var tn = token.tagName;
  43008. switch (tn.length) {
  43009. case 1:
  43010. if (tn === $.I || tn === $.S || tn === $.B || tn === $.U)
  43011. bStartTagInBody(p, token);
  43012. else if (tn === $.P)
  43013. addressStartTagInBody(p, token);
  43014. else if (tn === $.A)
  43015. aStartTagInBody(p, token);
  43016. else
  43017. genericStartTagInBody(p, token);
  43018. break;
  43019. case 2:
  43020. if (tn === $.DL || tn === $.OL || tn === $.UL)
  43021. addressStartTagInBody(p, token);
  43022. else if (tn === $.H1 || tn === $.H2 || tn === $.H3 || tn === $.H4 || tn === $.H5 || tn === $.H6)
  43023. numberedHeaderStartTagInBody(p, token);
  43024. else if (tn === $.LI || tn === $.DD || tn === $.DT)
  43025. listItemStartTagInBody(p, token);
  43026. else if (tn === $.EM || tn === $.TT)
  43027. bStartTagInBody(p, token);
  43028. else if (tn === $.BR)
  43029. areaStartTagInBody(p, token);
  43030. else if (tn === $.HR)
  43031. hrStartTagInBody(p, token);
  43032. else if (tn === $.RB)
  43033. rbStartTagInBody(p, token);
  43034. else if (tn === $.RT || tn === $.RP)
  43035. rtStartTagInBody(p, token);
  43036. else if (tn !== $.TH && tn !== $.TD && tn !== $.TR)
  43037. genericStartTagInBody(p, token);
  43038. break;
  43039. case 3:
  43040. if (tn === $.DIV || tn === $.DIR || tn === $.NAV)
  43041. addressStartTagInBody(p, token);
  43042. else if (tn === $.PRE)
  43043. preStartTagInBody(p, token);
  43044. else if (tn === $.BIG)
  43045. bStartTagInBody(p, token);
  43046. else if (tn === $.IMG || tn === $.WBR)
  43047. areaStartTagInBody(p, token);
  43048. else if (tn === $.XMP)
  43049. xmpStartTagInBody(p, token);
  43050. else if (tn === $.SVG)
  43051. svgStartTagInBody(p, token);
  43052. else if (tn === $.RTC)
  43053. rbStartTagInBody(p, token);
  43054. else if (tn !== $.COL)
  43055. genericStartTagInBody(p, token);
  43056. break;
  43057. case 4:
  43058. if (tn === $.HTML)
  43059. htmlStartTagInBody(p, token);
  43060. else if (tn === $.BASE || tn === $.LINK || tn === $.META)
  43061. startTagInHead(p, token);
  43062. else if (tn === $.BODY)
  43063. bodyStartTagInBody(p, token);
  43064. else if (tn === $.MAIN)
  43065. addressStartTagInBody(p, token);
  43066. else if (tn === $.FORM)
  43067. formStartTagInBody(p, token);
  43068. else if (tn === $.CODE || tn === $.FONT)
  43069. bStartTagInBody(p, token);
  43070. else if (tn === $.NOBR)
  43071. nobrStartTagInBody(p, token);
  43072. else if (tn === $.AREA)
  43073. areaStartTagInBody(p, token);
  43074. else if (tn === $.MATH)
  43075. mathStartTagInBody(p, token);
  43076. else if (tn === $.MENU)
  43077. menuStartTagInBody(p, token);
  43078. else if (tn !== $.HEAD)
  43079. genericStartTagInBody(p, token);
  43080. break;
  43081. case 5:
  43082. if (tn === $.STYLE || tn === $.TITLE)
  43083. startTagInHead(p, token);
  43084. else if (tn === $.ASIDE)
  43085. addressStartTagInBody(p, token);
  43086. else if (tn === $.SMALL)
  43087. bStartTagInBody(p, token);
  43088. else if (tn === $.TABLE)
  43089. tableStartTagInBody(p, token);
  43090. else if (tn === $.EMBED)
  43091. areaStartTagInBody(p, token);
  43092. else if (tn === $.INPUT)
  43093. inputStartTagInBody(p, token);
  43094. else if (tn === $.PARAM || tn === $.TRACK)
  43095. paramStartTagInBody(p, token);
  43096. else if (tn === $.IMAGE)
  43097. imageStartTagInBody(p, token);
  43098. else if (tn !== $.FRAME && tn !== $.TBODY && tn !== $.TFOOT && tn !== $.THEAD)
  43099. genericStartTagInBody(p, token);
  43100. break;
  43101. case 6:
  43102. if (tn === $.SCRIPT)
  43103. startTagInHead(p, token);
  43104. else if (tn === $.CENTER || tn === $.FIGURE || tn === $.FOOTER || tn === $.HEADER || tn === $.HGROUP)
  43105. addressStartTagInBody(p, token);
  43106. else if (tn === $.BUTTON)
  43107. buttonStartTagInBody(p, token);
  43108. else if (tn === $.STRIKE || tn === $.STRONG)
  43109. bStartTagInBody(p, token);
  43110. else if (tn === $.APPLET || tn === $.OBJECT)
  43111. appletStartTagInBody(p, token);
  43112. else if (tn === $.KEYGEN)
  43113. areaStartTagInBody(p, token);
  43114. else if (tn === $.SOURCE)
  43115. paramStartTagInBody(p, token);
  43116. else if (tn === $.IFRAME)
  43117. iframeStartTagInBody(p, token);
  43118. else if (tn === $.SELECT)
  43119. selectStartTagInBody(p, token);
  43120. else if (tn === $.OPTION)
  43121. optgroupStartTagInBody(p, token);
  43122. else
  43123. genericStartTagInBody(p, token);
  43124. break;
  43125. case 7:
  43126. if (tn === $.BGSOUND)
  43127. startTagInHead(p, token);
  43128. else if (tn === $.DETAILS || tn === $.ADDRESS || tn === $.ARTICLE || tn === $.SECTION || tn === $.SUMMARY)
  43129. addressStartTagInBody(p, token);
  43130. else if (tn === $.LISTING)
  43131. preStartTagInBody(p, token);
  43132. else if (tn === $.MARQUEE)
  43133. appletStartTagInBody(p, token);
  43134. else if (tn === $.NOEMBED)
  43135. noembedStartTagInBody(p, token);
  43136. else if (tn !== $.CAPTION)
  43137. genericStartTagInBody(p, token);
  43138. break;
  43139. case 8:
  43140. if (tn === $.BASEFONT)
  43141. startTagInHead(p, token);
  43142. else if (tn === $.MENUITEM)
  43143. menuitemStartTagInBody(p, token);
  43144. else if (tn === $.FRAMESET)
  43145. framesetStartTagInBody(p, token);
  43146. else if (tn === $.FIELDSET)
  43147. addressStartTagInBody(p, token);
  43148. else if (tn === $.TEXTAREA)
  43149. textareaStartTagInBody(p, token);
  43150. else if (tn === $.TEMPLATE)
  43151. startTagInHead(p, token);
  43152. else if (tn === $.NOSCRIPT)
  43153. noembedStartTagInBody(p, token);
  43154. else if (tn === $.OPTGROUP)
  43155. optgroupStartTagInBody(p, token);
  43156. else if (tn !== $.COLGROUP)
  43157. genericStartTagInBody(p, token);
  43158. break;
  43159. case 9:
  43160. if (tn === $.PLAINTEXT)
  43161. plaintextStartTagInBody(p, token);
  43162. else
  43163. genericStartTagInBody(p, token);
  43164. break;
  43165. case 10:
  43166. if (tn === $.BLOCKQUOTE || tn === $.FIGCAPTION)
  43167. addressStartTagInBody(p, token);
  43168. else
  43169. genericStartTagInBody(p, token);
  43170. break;
  43171. default:
  43172. genericStartTagInBody(p, token);
  43173. }
  43174. }
  43175. function bodyEndTagInBody(p) {
  43176. if (p.openElements.hasInScope($.BODY))
  43177. p.insertionMode = AFTER_BODY_MODE;
  43178. }
  43179. function htmlEndTagInBody(p, token) {
  43180. if (p.openElements.hasInScope($.BODY)) {
  43181. p.insertionMode = AFTER_BODY_MODE;
  43182. p._processToken(token);
  43183. }
  43184. }
  43185. function addressEndTagInBody(p, token) {
  43186. var tn = token.tagName;
  43187. if (p.openElements.hasInScope(tn)) {
  43188. p.openElements.generateImpliedEndTags();
  43189. p.openElements.popUntilTagNamePopped(tn);
  43190. }
  43191. }
  43192. function formEndTagInBody(p) {
  43193. var inTemplate = p.openElements.tmplCount > 0,
  43194. formElement = p.formElement;
  43195. if (!inTemplate)
  43196. p.formElement = null;
  43197. if ((formElement || inTemplate) && p.openElements.hasInScope($.FORM)) {
  43198. p.openElements.generateImpliedEndTags();
  43199. if (inTemplate)
  43200. p.openElements.popUntilTagNamePopped($.FORM);
  43201. else
  43202. p.openElements.remove(formElement);
  43203. }
  43204. }
  43205. function pEndTagInBody(p) {
  43206. if (!p.openElements.hasInButtonScope($.P))
  43207. p._insertFakeElement($.P);
  43208. p._closePElement();
  43209. }
  43210. function liEndTagInBody(p) {
  43211. if (p.openElements.hasInListItemScope($.LI)) {
  43212. p.openElements.generateImpliedEndTagsWithExclusion($.LI);
  43213. p.openElements.popUntilTagNamePopped($.LI);
  43214. }
  43215. }
  43216. function ddEndTagInBody(p, token) {
  43217. var tn = token.tagName;
  43218. if (p.openElements.hasInScope(tn)) {
  43219. p.openElements.generateImpliedEndTagsWithExclusion(tn);
  43220. p.openElements.popUntilTagNamePopped(tn);
  43221. }
  43222. }
  43223. function numberedHeaderEndTagInBody(p) {
  43224. if (p.openElements.hasNumberedHeaderInScope()) {
  43225. p.openElements.generateImpliedEndTags();
  43226. p.openElements.popUntilNumberedHeaderPopped();
  43227. }
  43228. }
  43229. function appletEndTagInBody(p, token) {
  43230. var tn = token.tagName;
  43231. if (p.openElements.hasInScope(tn)) {
  43232. p.openElements.generateImpliedEndTags();
  43233. p.openElements.popUntilTagNamePopped(tn);
  43234. p.activeFormattingElements.clearToLastMarker();
  43235. }
  43236. }
  43237. function brEndTagInBody(p) {
  43238. p._reconstructActiveFormattingElements();
  43239. p._insertFakeElement($.BR);
  43240. p.openElements.pop();
  43241. p.framesetOk = false;
  43242. }
  43243. function genericEndTagInBody(p, token) {
  43244. var tn = token.tagName;
  43245. for (var i = p.openElements.stackTop; i > 0; i--) {
  43246. var element = p.openElements.items[i];
  43247. if (p.treeAdapter.getTagName(element) === tn) {
  43248. p.openElements.generateImpliedEndTagsWithExclusion(tn);
  43249. p.openElements.popUntilElementPopped(element);
  43250. break;
  43251. }
  43252. if (p._isSpecialElement(element))
  43253. break;
  43254. }
  43255. }
  43256. //OPTIMIZATION: Integer comparisons are low-cost, so we can use very fast tag name length filters here.
  43257. //It's faster than using dictionary.
  43258. function endTagInBody(p, token) {
  43259. var tn = token.tagName;
  43260. switch (tn.length) {
  43261. case 1:
  43262. if (tn === $.A || tn === $.B || tn === $.I || tn === $.S || tn === $.U)
  43263. callAdoptionAgency(p, token);
  43264. else if (tn === $.P)
  43265. pEndTagInBody(p, token);
  43266. else
  43267. genericEndTagInBody(p, token);
  43268. break;
  43269. case 2:
  43270. if (tn === $.DL || tn === $.UL || tn === $.OL)
  43271. addressEndTagInBody(p, token);
  43272. else if (tn === $.LI)
  43273. liEndTagInBody(p, token);
  43274. else if (tn === $.DD || tn === $.DT)
  43275. ddEndTagInBody(p, token);
  43276. else if (tn === $.H1 || tn === $.H2 || tn === $.H3 || tn === $.H4 || tn === $.H5 || tn === $.H6)
  43277. numberedHeaderEndTagInBody(p, token);
  43278. else if (tn === $.BR)
  43279. brEndTagInBody(p, token);
  43280. else if (tn === $.EM || tn === $.TT)
  43281. callAdoptionAgency(p, token);
  43282. else
  43283. genericEndTagInBody(p, token);
  43284. break;
  43285. case 3:
  43286. if (tn === $.BIG)
  43287. callAdoptionAgency(p, token);
  43288. else if (tn === $.DIR || tn === $.DIV || tn === $.NAV)
  43289. addressEndTagInBody(p, token);
  43290. else
  43291. genericEndTagInBody(p, token);
  43292. break;
  43293. case 4:
  43294. if (tn === $.BODY)
  43295. bodyEndTagInBody(p, token);
  43296. else if (tn === $.HTML)
  43297. htmlEndTagInBody(p, token);
  43298. else if (tn === $.FORM)
  43299. formEndTagInBody(p, token);
  43300. else if (tn === $.CODE || tn === $.FONT || tn === $.NOBR)
  43301. callAdoptionAgency(p, token);
  43302. else if (tn === $.MAIN || tn === $.MENU)
  43303. addressEndTagInBody(p, token);
  43304. else
  43305. genericEndTagInBody(p, token);
  43306. break;
  43307. case 5:
  43308. if (tn === $.ASIDE)
  43309. addressEndTagInBody(p, token);
  43310. else if (tn === $.SMALL)
  43311. callAdoptionAgency(p, token);
  43312. else
  43313. genericEndTagInBody(p, token);
  43314. break;
  43315. case 6:
  43316. if (tn === $.CENTER || tn === $.FIGURE || tn === $.FOOTER || tn === $.HEADER || tn === $.HGROUP)
  43317. addressEndTagInBody(p, token);
  43318. else if (tn === $.APPLET || tn === $.OBJECT)
  43319. appletEndTagInBody(p, token);
  43320. else if (tn === $.STRIKE || tn === $.STRONG)
  43321. callAdoptionAgency(p, token);
  43322. else
  43323. genericEndTagInBody(p, token);
  43324. break;
  43325. case 7:
  43326. if (tn === $.ADDRESS || tn === $.ARTICLE || tn === $.DETAILS || tn === $.SECTION || tn === $.SUMMARY)
  43327. addressEndTagInBody(p, token);
  43328. else if (tn === $.MARQUEE)
  43329. appletEndTagInBody(p, token);
  43330. else
  43331. genericEndTagInBody(p, token);
  43332. break;
  43333. case 8:
  43334. if (tn === $.FIELDSET)
  43335. addressEndTagInBody(p, token);
  43336. else if (tn === $.TEMPLATE)
  43337. endTagInHead(p, token);
  43338. else
  43339. genericEndTagInBody(p, token);
  43340. break;
  43341. case 10:
  43342. if (tn === $.BLOCKQUOTE || tn === $.FIGCAPTION)
  43343. addressEndTagInBody(p, token);
  43344. else
  43345. genericEndTagInBody(p, token);
  43346. break;
  43347. default :
  43348. genericEndTagInBody(p, token);
  43349. }
  43350. }
  43351. function eofInBody(p, token) {
  43352. if (p.tmplInsertionModeStackTop > -1)
  43353. eofInTemplate(p, token);
  43354. else
  43355. p.stopped = true;
  43356. }
  43357. //12.2.5.4.8 The "text" insertion mode
  43358. //------------------------------------------------------------------
  43359. function endTagInText(p, token) {
  43360. if (token.tagName === $.SCRIPT)
  43361. p.pendingScript = p.openElements.current;
  43362. p.openElements.pop();
  43363. p.insertionMode = p.originalInsertionMode;
  43364. }
  43365. function eofInText(p, token) {
  43366. p.openElements.pop();
  43367. p.insertionMode = p.originalInsertionMode;
  43368. p._processToken(token);
  43369. }
  43370. //12.2.5.4.9 The "in table" insertion mode
  43371. //------------------------------------------------------------------
  43372. function characterInTable(p, token) {
  43373. var curTn = p.openElements.currentTagName;
  43374. if (curTn === $.TABLE || curTn === $.TBODY || curTn === $.TFOOT || curTn === $.THEAD || curTn === $.TR) {
  43375. p.pendingCharacterTokens = [];
  43376. p.hasNonWhitespacePendingCharacterToken = false;
  43377. p.originalInsertionMode = p.insertionMode;
  43378. p.insertionMode = IN_TABLE_TEXT_MODE;
  43379. p._processToken(token);
  43380. }
  43381. else
  43382. tokenInTable(p, token);
  43383. }
  43384. function captionStartTagInTable(p, token) {
  43385. p.openElements.clearBackToTableContext();
  43386. p.activeFormattingElements.insertMarker();
  43387. p._insertElement(token, NS.HTML);
  43388. p.insertionMode = IN_CAPTION_MODE;
  43389. }
  43390. function colgroupStartTagInTable(p, token) {
  43391. p.openElements.clearBackToTableContext();
  43392. p._insertElement(token, NS.HTML);
  43393. p.insertionMode = IN_COLUMN_GROUP_MODE;
  43394. }
  43395. function colStartTagInTable(p, token) {
  43396. p.openElements.clearBackToTableContext();
  43397. p._insertFakeElement($.COLGROUP);
  43398. p.insertionMode = IN_COLUMN_GROUP_MODE;
  43399. p._processToken(token);
  43400. }
  43401. function tbodyStartTagInTable(p, token) {
  43402. p.openElements.clearBackToTableContext();
  43403. p._insertElement(token, NS.HTML);
  43404. p.insertionMode = IN_TABLE_BODY_MODE;
  43405. }
  43406. function tdStartTagInTable(p, token) {
  43407. p.openElements.clearBackToTableContext();
  43408. p._insertFakeElement($.TBODY);
  43409. p.insertionMode = IN_TABLE_BODY_MODE;
  43410. p._processToken(token);
  43411. }
  43412. function tableStartTagInTable(p, token) {
  43413. if (p.openElements.hasInTableScope($.TABLE)) {
  43414. p.openElements.popUntilTagNamePopped($.TABLE);
  43415. p._resetInsertionMode();
  43416. p._processToken(token);
  43417. }
  43418. }
  43419. function inputStartTagInTable(p, token) {
  43420. var inputType = Tokenizer.getTokenAttr(token, ATTRS.TYPE);
  43421. if (inputType && inputType.toLowerCase() === HIDDEN_INPUT_TYPE)
  43422. p._appendElement(token, NS.HTML);
  43423. else
  43424. tokenInTable(p, token);
  43425. }
  43426. function formStartTagInTable(p, token) {
  43427. if (!p.formElement && p.openElements.tmplCount === 0) {
  43428. p._insertElement(token, NS.HTML);
  43429. p.formElement = p.openElements.current;
  43430. p.openElements.pop();
  43431. }
  43432. }
  43433. function startTagInTable(p, token) {
  43434. var tn = token.tagName;
  43435. switch (tn.length) {
  43436. case 2:
  43437. if (tn === $.TD || tn === $.TH || tn === $.TR)
  43438. tdStartTagInTable(p, token);
  43439. else
  43440. tokenInTable(p, token);
  43441. break;
  43442. case 3:
  43443. if (tn === $.COL)
  43444. colStartTagInTable(p, token);
  43445. else
  43446. tokenInTable(p, token);
  43447. break;
  43448. case 4:
  43449. if (tn === $.FORM)
  43450. formStartTagInTable(p, token);
  43451. else
  43452. tokenInTable(p, token);
  43453. break;
  43454. case 5:
  43455. if (tn === $.TABLE)
  43456. tableStartTagInTable(p, token);
  43457. else if (tn === $.STYLE)
  43458. startTagInHead(p, token);
  43459. else if (tn === $.TBODY || tn === $.TFOOT || tn === $.THEAD)
  43460. tbodyStartTagInTable(p, token);
  43461. else if (tn === $.INPUT)
  43462. inputStartTagInTable(p, token);
  43463. else
  43464. tokenInTable(p, token);
  43465. break;
  43466. case 6:
  43467. if (tn === $.SCRIPT)
  43468. startTagInHead(p, token);
  43469. else
  43470. tokenInTable(p, token);
  43471. break;
  43472. case 7:
  43473. if (tn === $.CAPTION)
  43474. captionStartTagInTable(p, token);
  43475. else
  43476. tokenInTable(p, token);
  43477. break;
  43478. case 8:
  43479. if (tn === $.COLGROUP)
  43480. colgroupStartTagInTable(p, token);
  43481. else if (tn === $.TEMPLATE)
  43482. startTagInHead(p, token);
  43483. else
  43484. tokenInTable(p, token);
  43485. break;
  43486. default:
  43487. tokenInTable(p, token);
  43488. }
  43489. }
  43490. function endTagInTable(p, token) {
  43491. var tn = token.tagName;
  43492. if (tn === $.TABLE) {
  43493. if (p.openElements.hasInTableScope($.TABLE)) {
  43494. p.openElements.popUntilTagNamePopped($.TABLE);
  43495. p._resetInsertionMode();
  43496. }
  43497. }
  43498. else if (tn === $.TEMPLATE)
  43499. endTagInHead(p, token);
  43500. else if (tn !== $.BODY && tn !== $.CAPTION && tn !== $.COL && tn !== $.COLGROUP && tn !== $.HTML &&
  43501. tn !== $.TBODY && tn !== $.TD && tn !== $.TFOOT && tn !== $.TH && tn !== $.THEAD && tn !== $.TR)
  43502. tokenInTable(p, token);
  43503. }
  43504. function tokenInTable(p, token) {
  43505. var savedFosterParentingState = p.fosterParentingEnabled;
  43506. p.fosterParentingEnabled = true;
  43507. p._processTokenInBodyMode(token);
  43508. p.fosterParentingEnabled = savedFosterParentingState;
  43509. }
  43510. //12.2.5.4.10 The "in table text" insertion mode
  43511. //------------------------------------------------------------------
  43512. function whitespaceCharacterInTableText(p, token) {
  43513. p.pendingCharacterTokens.push(token);
  43514. }
  43515. function characterInTableText(p, token) {
  43516. p.pendingCharacterTokens.push(token);
  43517. p.hasNonWhitespacePendingCharacterToken = true;
  43518. }
  43519. function tokenInTableText(p, token) {
  43520. var i = 0;
  43521. if (p.hasNonWhitespacePendingCharacterToken) {
  43522. for (; i < p.pendingCharacterTokens.length; i++)
  43523. tokenInTable(p, p.pendingCharacterTokens[i]);
  43524. }
  43525. else {
  43526. for (; i < p.pendingCharacterTokens.length; i++)
  43527. p._insertCharacters(p.pendingCharacterTokens[i]);
  43528. }
  43529. p.insertionMode = p.originalInsertionMode;
  43530. p._processToken(token);
  43531. }
  43532. //12.2.5.4.11 The "in caption" insertion mode
  43533. //------------------------------------------------------------------
  43534. function startTagInCaption(p, token) {
  43535. var tn = token.tagName;
  43536. if (tn === $.CAPTION || tn === $.COL || tn === $.COLGROUP || tn === $.TBODY ||
  43537. tn === $.TD || tn === $.TFOOT || tn === $.TH || tn === $.THEAD || tn === $.TR) {
  43538. if (p.openElements.hasInTableScope($.CAPTION)) {
  43539. p.openElements.generateImpliedEndTags();
  43540. p.openElements.popUntilTagNamePopped($.CAPTION);
  43541. p.activeFormattingElements.clearToLastMarker();
  43542. p.insertionMode = IN_TABLE_MODE;
  43543. p._processToken(token);
  43544. }
  43545. }
  43546. else
  43547. startTagInBody(p, token);
  43548. }
  43549. function endTagInCaption(p, token) {
  43550. var tn = token.tagName;
  43551. if (tn === $.CAPTION || tn === $.TABLE) {
  43552. if (p.openElements.hasInTableScope($.CAPTION)) {
  43553. p.openElements.generateImpliedEndTags();
  43554. p.openElements.popUntilTagNamePopped($.CAPTION);
  43555. p.activeFormattingElements.clearToLastMarker();
  43556. p.insertionMode = IN_TABLE_MODE;
  43557. if (tn === $.TABLE)
  43558. p._processToken(token);
  43559. }
  43560. }
  43561. else if (tn !== $.BODY && tn !== $.COL && tn !== $.COLGROUP && tn !== $.HTML && tn !== $.TBODY &&
  43562. tn !== $.TD && tn !== $.TFOOT && tn !== $.TH && tn !== $.THEAD && tn !== $.TR)
  43563. endTagInBody(p, token);
  43564. }
  43565. //12.2.5.4.12 The "in column group" insertion mode
  43566. //------------------------------------------------------------------
  43567. function startTagInColumnGroup(p, token) {
  43568. var tn = token.tagName;
  43569. if (tn === $.HTML)
  43570. startTagInBody(p, token);
  43571. else if (tn === $.COL)
  43572. p._appendElement(token, NS.HTML);
  43573. else if (tn === $.TEMPLATE)
  43574. startTagInHead(p, token);
  43575. else
  43576. tokenInColumnGroup(p, token);
  43577. }
  43578. function endTagInColumnGroup(p, token) {
  43579. var tn = token.tagName;
  43580. if (tn === $.COLGROUP) {
  43581. if (p.openElements.currentTagName === $.COLGROUP) {
  43582. p.openElements.pop();
  43583. p.insertionMode = IN_TABLE_MODE;
  43584. }
  43585. }
  43586. else if (tn === $.TEMPLATE)
  43587. endTagInHead(p, token);
  43588. else if (tn !== $.COL)
  43589. tokenInColumnGroup(p, token);
  43590. }
  43591. function tokenInColumnGroup(p, token) {
  43592. if (p.openElements.currentTagName === $.COLGROUP) {
  43593. p.openElements.pop();
  43594. p.insertionMode = IN_TABLE_MODE;
  43595. p._processToken(token);
  43596. }
  43597. }
  43598. //12.2.5.4.13 The "in table body" insertion mode
  43599. //------------------------------------------------------------------
  43600. function startTagInTableBody(p, token) {
  43601. var tn = token.tagName;
  43602. if (tn === $.TR) {
  43603. p.openElements.clearBackToTableBodyContext();
  43604. p._insertElement(token, NS.HTML);
  43605. p.insertionMode = IN_ROW_MODE;
  43606. }
  43607. else if (tn === $.TH || tn === $.TD) {
  43608. p.openElements.clearBackToTableBodyContext();
  43609. p._insertFakeElement($.TR);
  43610. p.insertionMode = IN_ROW_MODE;
  43611. p._processToken(token);
  43612. }
  43613. else if (tn === $.CAPTION || tn === $.COL || tn === $.COLGROUP ||
  43614. tn === $.TBODY || tn === $.TFOOT || tn === $.THEAD) {
  43615. if (p.openElements.hasTableBodyContextInTableScope()) {
  43616. p.openElements.clearBackToTableBodyContext();
  43617. p.openElements.pop();
  43618. p.insertionMode = IN_TABLE_MODE;
  43619. p._processToken(token);
  43620. }
  43621. }
  43622. else
  43623. startTagInTable(p, token);
  43624. }
  43625. function endTagInTableBody(p, token) {
  43626. var tn = token.tagName;
  43627. if (tn === $.TBODY || tn === $.TFOOT || tn === $.THEAD) {
  43628. if (p.openElements.hasInTableScope(tn)) {
  43629. p.openElements.clearBackToTableBodyContext();
  43630. p.openElements.pop();
  43631. p.insertionMode = IN_TABLE_MODE;
  43632. }
  43633. }
  43634. else if (tn === $.TABLE) {
  43635. if (p.openElements.hasTableBodyContextInTableScope()) {
  43636. p.openElements.clearBackToTableBodyContext();
  43637. p.openElements.pop();
  43638. p.insertionMode = IN_TABLE_MODE;
  43639. p._processToken(token);
  43640. }
  43641. }
  43642. else if (tn !== $.BODY && tn !== $.CAPTION && tn !== $.COL && tn !== $.COLGROUP ||
  43643. tn !== $.HTML && tn !== $.TD && tn !== $.TH && tn !== $.TR)
  43644. endTagInTable(p, token);
  43645. }
  43646. //12.2.5.4.14 The "in row" insertion mode
  43647. //------------------------------------------------------------------
  43648. function startTagInRow(p, token) {
  43649. var tn = token.tagName;
  43650. if (tn === $.TH || tn === $.TD) {
  43651. p.openElements.clearBackToTableRowContext();
  43652. p._insertElement(token, NS.HTML);
  43653. p.insertionMode = IN_CELL_MODE;
  43654. p.activeFormattingElements.insertMarker();
  43655. }
  43656. else if (tn === $.CAPTION || tn === $.COL || tn === $.COLGROUP || tn === $.TBODY ||
  43657. tn === $.TFOOT || tn === $.THEAD || tn === $.TR) {
  43658. if (p.openElements.hasInTableScope($.TR)) {
  43659. p.openElements.clearBackToTableRowContext();
  43660. p.openElements.pop();
  43661. p.insertionMode = IN_TABLE_BODY_MODE;
  43662. p._processToken(token);
  43663. }
  43664. }
  43665. else
  43666. startTagInTable(p, token);
  43667. }
  43668. function endTagInRow(p, token) {
  43669. var tn = token.tagName;
  43670. if (tn === $.TR) {
  43671. if (p.openElements.hasInTableScope($.TR)) {
  43672. p.openElements.clearBackToTableRowContext();
  43673. p.openElements.pop();
  43674. p.insertionMode = IN_TABLE_BODY_MODE;
  43675. }
  43676. }
  43677. else if (tn === $.TABLE) {
  43678. if (p.openElements.hasInTableScope($.TR)) {
  43679. p.openElements.clearBackToTableRowContext();
  43680. p.openElements.pop();
  43681. p.insertionMode = IN_TABLE_BODY_MODE;
  43682. p._processToken(token);
  43683. }
  43684. }
  43685. else if (tn === $.TBODY || tn === $.TFOOT || tn === $.THEAD) {
  43686. if (p.openElements.hasInTableScope(tn) || p.openElements.hasInTableScope($.TR)) {
  43687. p.openElements.clearBackToTableRowContext();
  43688. p.openElements.pop();
  43689. p.insertionMode = IN_TABLE_BODY_MODE;
  43690. p._processToken(token);
  43691. }
  43692. }
  43693. else if (tn !== $.BODY && tn !== $.CAPTION && tn !== $.COL && tn !== $.COLGROUP ||
  43694. tn !== $.HTML && tn !== $.TD && tn !== $.TH)
  43695. endTagInTable(p, token);
  43696. }
  43697. //12.2.5.4.15 The "in cell" insertion mode
  43698. //------------------------------------------------------------------
  43699. function startTagInCell(p, token) {
  43700. var tn = token.tagName;
  43701. if (tn === $.CAPTION || tn === $.COL || tn === $.COLGROUP || tn === $.TBODY ||
  43702. tn === $.TD || tn === $.TFOOT || tn === $.TH || tn === $.THEAD || tn === $.TR) {
  43703. if (p.openElements.hasInTableScope($.TD) || p.openElements.hasInTableScope($.TH)) {
  43704. p._closeTableCell();
  43705. p._processToken(token);
  43706. }
  43707. }
  43708. else
  43709. startTagInBody(p, token);
  43710. }
  43711. function endTagInCell(p, token) {
  43712. var tn = token.tagName;
  43713. if (tn === $.TD || tn === $.TH) {
  43714. if (p.openElements.hasInTableScope(tn)) {
  43715. p.openElements.generateImpliedEndTags();
  43716. p.openElements.popUntilTagNamePopped(tn);
  43717. p.activeFormattingElements.clearToLastMarker();
  43718. p.insertionMode = IN_ROW_MODE;
  43719. }
  43720. }
  43721. else if (tn === $.TABLE || tn === $.TBODY || tn === $.TFOOT || tn === $.THEAD || tn === $.TR) {
  43722. if (p.openElements.hasInTableScope(tn)) {
  43723. p._closeTableCell();
  43724. p._processToken(token);
  43725. }
  43726. }
  43727. else if (tn !== $.BODY && tn !== $.CAPTION && tn !== $.COL && tn !== $.COLGROUP && tn !== $.HTML)
  43728. endTagInBody(p, token);
  43729. }
  43730. //12.2.5.4.16 The "in select" insertion mode
  43731. //------------------------------------------------------------------
  43732. function startTagInSelect(p, token) {
  43733. var tn = token.tagName;
  43734. if (tn === $.HTML)
  43735. startTagInBody(p, token);
  43736. else if (tn === $.OPTION) {
  43737. if (p.openElements.currentTagName === $.OPTION)
  43738. p.openElements.pop();
  43739. p._insertElement(token, NS.HTML);
  43740. }
  43741. else if (tn === $.OPTGROUP) {
  43742. if (p.openElements.currentTagName === $.OPTION)
  43743. p.openElements.pop();
  43744. if (p.openElements.currentTagName === $.OPTGROUP)
  43745. p.openElements.pop();
  43746. p._insertElement(token, NS.HTML);
  43747. }
  43748. else if (tn === $.INPUT || tn === $.KEYGEN || tn === $.TEXTAREA || tn === $.SELECT) {
  43749. if (p.openElements.hasInSelectScope($.SELECT)) {
  43750. p.openElements.popUntilTagNamePopped($.SELECT);
  43751. p._resetInsertionMode();
  43752. if (tn !== $.SELECT)
  43753. p._processToken(token);
  43754. }
  43755. }
  43756. else if (tn === $.SCRIPT || tn === $.TEMPLATE)
  43757. startTagInHead(p, token);
  43758. }
  43759. function endTagInSelect(p, token) {
  43760. var tn = token.tagName;
  43761. if (tn === $.OPTGROUP) {
  43762. var prevOpenElement = p.openElements.items[p.openElements.stackTop - 1],
  43763. prevOpenElementTn = prevOpenElement && p.treeAdapter.getTagName(prevOpenElement);
  43764. if (p.openElements.currentTagName === $.OPTION && prevOpenElementTn === $.OPTGROUP)
  43765. p.openElements.pop();
  43766. if (p.openElements.currentTagName === $.OPTGROUP)
  43767. p.openElements.pop();
  43768. }
  43769. else if (tn === $.OPTION) {
  43770. if (p.openElements.currentTagName === $.OPTION)
  43771. p.openElements.pop();
  43772. }
  43773. else if (tn === $.SELECT && p.openElements.hasInSelectScope($.SELECT)) {
  43774. p.openElements.popUntilTagNamePopped($.SELECT);
  43775. p._resetInsertionMode();
  43776. }
  43777. else if (tn === $.TEMPLATE)
  43778. endTagInHead(p, token);
  43779. }
  43780. //12.2.5.4.17 The "in select in table" insertion mode
  43781. //------------------------------------------------------------------
  43782. function startTagInSelectInTable(p, token) {
  43783. var tn = token.tagName;
  43784. if (tn === $.CAPTION || tn === $.TABLE || tn === $.TBODY || tn === $.TFOOT ||
  43785. tn === $.THEAD || tn === $.TR || tn === $.TD || tn === $.TH) {
  43786. p.openElements.popUntilTagNamePopped($.SELECT);
  43787. p._resetInsertionMode();
  43788. p._processToken(token);
  43789. }
  43790. else
  43791. startTagInSelect(p, token);
  43792. }
  43793. function endTagInSelectInTable(p, token) {
  43794. var tn = token.tagName;
  43795. if (tn === $.CAPTION || tn === $.TABLE || tn === $.TBODY || tn === $.TFOOT ||
  43796. tn === $.THEAD || tn === $.TR || tn === $.TD || tn === $.TH) {
  43797. if (p.openElements.hasInTableScope(tn)) {
  43798. p.openElements.popUntilTagNamePopped($.SELECT);
  43799. p._resetInsertionMode();
  43800. p._processToken(token);
  43801. }
  43802. }
  43803. else
  43804. endTagInSelect(p, token);
  43805. }
  43806. //12.2.5.4.18 The "in template" insertion mode
  43807. //------------------------------------------------------------------
  43808. function startTagInTemplate(p, token) {
  43809. var tn = token.tagName;
  43810. if (tn === $.BASE || tn === $.BASEFONT || tn === $.BGSOUND || tn === $.LINK || tn === $.META ||
  43811. tn === $.NOFRAMES || tn === $.SCRIPT || tn === $.STYLE || tn === $.TEMPLATE || tn === $.TITLE)
  43812. startTagInHead(p, token);
  43813. else {
  43814. var newInsertionMode = TEMPLATE_INSERTION_MODE_SWITCH_MAP[tn] || IN_BODY_MODE;
  43815. p._popTmplInsertionMode();
  43816. p._pushTmplInsertionMode(newInsertionMode);
  43817. p.insertionMode = newInsertionMode;
  43818. p._processToken(token);
  43819. }
  43820. }
  43821. function endTagInTemplate(p, token) {
  43822. if (token.tagName === $.TEMPLATE)
  43823. endTagInHead(p, token);
  43824. }
  43825. function eofInTemplate(p, token) {
  43826. if (p.openElements.tmplCount > 0) {
  43827. p.openElements.popUntilTagNamePopped($.TEMPLATE);
  43828. p.activeFormattingElements.clearToLastMarker();
  43829. p._popTmplInsertionMode();
  43830. p._resetInsertionMode();
  43831. p._processToken(token);
  43832. }
  43833. else
  43834. p.stopped = true;
  43835. }
  43836. //12.2.5.4.19 The "after body" insertion mode
  43837. //------------------------------------------------------------------
  43838. function startTagAfterBody(p, token) {
  43839. if (token.tagName === $.HTML)
  43840. startTagInBody(p, token);
  43841. else
  43842. tokenAfterBody(p, token);
  43843. }
  43844. function endTagAfterBody(p, token) {
  43845. if (token.tagName === $.HTML) {
  43846. if (!p.fragmentContext)
  43847. p.insertionMode = AFTER_AFTER_BODY_MODE;
  43848. }
  43849. else
  43850. tokenAfterBody(p, token);
  43851. }
  43852. function tokenAfterBody(p, token) {
  43853. p.insertionMode = IN_BODY_MODE;
  43854. p._processToken(token);
  43855. }
  43856. //12.2.5.4.20 The "in frameset" insertion mode
  43857. //------------------------------------------------------------------
  43858. function startTagInFrameset(p, token) {
  43859. var tn = token.tagName;
  43860. if (tn === $.HTML)
  43861. startTagInBody(p, token);
  43862. else if (tn === $.FRAMESET)
  43863. p._insertElement(token, NS.HTML);
  43864. else if (tn === $.FRAME)
  43865. p._appendElement(token, NS.HTML);
  43866. else if (tn === $.NOFRAMES)
  43867. startTagInHead(p, token);
  43868. }
  43869. function endTagInFrameset(p, token) {
  43870. if (token.tagName === $.FRAMESET && !p.openElements.isRootHtmlElementCurrent()) {
  43871. p.openElements.pop();
  43872. if (!p.fragmentContext && p.openElements.currentTagName !== $.FRAMESET)
  43873. p.insertionMode = AFTER_FRAMESET_MODE;
  43874. }
  43875. }
  43876. //12.2.5.4.21 The "after frameset" insertion mode
  43877. //------------------------------------------------------------------
  43878. function startTagAfterFrameset(p, token) {
  43879. var tn = token.tagName;
  43880. if (tn === $.HTML)
  43881. startTagInBody(p, token);
  43882. else if (tn === $.NOFRAMES)
  43883. startTagInHead(p, token);
  43884. }
  43885. function endTagAfterFrameset(p, token) {
  43886. if (token.tagName === $.HTML)
  43887. p.insertionMode = AFTER_AFTER_FRAMESET_MODE;
  43888. }
  43889. //12.2.5.4.22 The "after after body" insertion mode
  43890. //------------------------------------------------------------------
  43891. function startTagAfterAfterBody(p, token) {
  43892. if (token.tagName === $.HTML)
  43893. startTagInBody(p, token);
  43894. else
  43895. tokenAfterAfterBody(p, token);
  43896. }
  43897. function tokenAfterAfterBody(p, token) {
  43898. p.insertionMode = IN_BODY_MODE;
  43899. p._processToken(token);
  43900. }
  43901. //12.2.5.4.23 The "after after frameset" insertion mode
  43902. //------------------------------------------------------------------
  43903. function startTagAfterAfterFrameset(p, token) {
  43904. var tn = token.tagName;
  43905. if (tn === $.HTML)
  43906. startTagInBody(p, token);
  43907. else if (tn === $.NOFRAMES)
  43908. startTagInHead(p, token);
  43909. }
  43910. //12.2.5.5 The rules for parsing tokens in foreign content
  43911. //------------------------------------------------------------------
  43912. function nullCharacterInForeignContent(p, token) {
  43913. token.chars = UNICODE.REPLACEMENT_CHARACTER;
  43914. p._insertCharacters(token);
  43915. }
  43916. function characterInForeignContent(p, token) {
  43917. p._insertCharacters(token);
  43918. p.framesetOk = false;
  43919. }
  43920. function startTagInForeignContent(p, token) {
  43921. if (foreignContent.causesExit(token) && !p.fragmentContext) {
  43922. while (p.treeAdapter.getNamespaceURI(p.openElements.current) !== NS.HTML && !p._isIntegrationPoint(p.openElements.current))
  43923. p.openElements.pop();
  43924. p._processToken(token);
  43925. }
  43926. else {
  43927. var current = p._getAdjustedCurrentElement(),
  43928. currentNs = p.treeAdapter.getNamespaceURI(current);
  43929. if (currentNs === NS.MATHML)
  43930. foreignContent.adjustTokenMathMLAttrs(token);
  43931. else if (currentNs === NS.SVG) {
  43932. foreignContent.adjustTokenSVGTagName(token);
  43933. foreignContent.adjustTokenSVGAttrs(token);
  43934. }
  43935. foreignContent.adjustTokenXMLAttrs(token);
  43936. if (token.selfClosing)
  43937. p._appendElement(token, currentNs);
  43938. else
  43939. p._insertElement(token, currentNs);
  43940. }
  43941. }
  43942. function endTagInForeignContent(p, token) {
  43943. for (var i = p.openElements.stackTop; i > 0; i--) {
  43944. var element = p.openElements.items[i];
  43945. if (p.treeAdapter.getNamespaceURI(element) === NS.HTML) {
  43946. p._processToken(token);
  43947. break;
  43948. }
  43949. if (p.treeAdapter.getTagName(element).toLowerCase() === token.tagName) {
  43950. p.openElements.popUntilElementPopped(element);
  43951. break;
  43952. }
  43953. }
  43954. }
  43955. /***/ }),
  43956. /* 389 */
  43957. /***/ (function(module, exports, __webpack_require__) {
  43958. "use strict";
  43959. var Mixin = __webpack_require__(116),
  43960. Tokenizer = __webpack_require__(66),
  43961. PositionTrackingPreprocessorMixin = __webpack_require__(390),
  43962. inherits = __webpack_require__(2).inherits;
  43963. var LocationInfoTokenizerMixin = module.exports = function (tokenizer) {
  43964. Mixin.call(this, tokenizer);
  43965. this.tokenizer = tokenizer;
  43966. this.posTracker = new PositionTrackingPreprocessorMixin(tokenizer.preprocessor);
  43967. this.currentAttrLocation = null;
  43968. this.currentTokenLocation = null;
  43969. };
  43970. inherits(LocationInfoTokenizerMixin, Mixin);
  43971. LocationInfoTokenizerMixin.prototype._getCurrentLocation = function () {
  43972. return {
  43973. line: this.posTracker.line,
  43974. col: this.posTracker.col,
  43975. startOffset: this.posTracker.offset,
  43976. endOffset: -1
  43977. };
  43978. };
  43979. LocationInfoTokenizerMixin.prototype._attachCurrentAttrLocationInfo = function () {
  43980. this.currentAttrLocation.endOffset = this.posTracker.offset;
  43981. var currentToken = this.tokenizer.currentToken,
  43982. currentAttr = this.tokenizer.currentAttr;
  43983. if (!currentToken.location.attrs)
  43984. currentToken.location.attrs = Object.create(null);
  43985. currentToken.location.attrs[currentAttr.name] = this.currentAttrLocation;
  43986. };
  43987. LocationInfoTokenizerMixin.prototype._getOverriddenMethods = function (mxn, orig) {
  43988. var methods = {
  43989. _createStartTagToken: function () {
  43990. orig._createStartTagToken.call(this);
  43991. this.currentToken.location = mxn.currentTokenLocation;
  43992. },
  43993. _createEndTagToken: function () {
  43994. orig._createEndTagToken.call(this);
  43995. this.currentToken.location = mxn.currentTokenLocation;
  43996. },
  43997. _createCommentToken: function () {
  43998. orig._createCommentToken.call(this);
  43999. this.currentToken.location = mxn.currentTokenLocation;
  44000. },
  44001. _createDoctypeToken: function (initialName) {
  44002. orig._createDoctypeToken.call(this, initialName);
  44003. this.currentToken.location = mxn.currentTokenLocation;
  44004. },
  44005. _createCharacterToken: function (type, ch) {
  44006. orig._createCharacterToken.call(this, type, ch);
  44007. this.currentCharacterToken.location = mxn.currentTokenLocation;
  44008. },
  44009. _createAttr: function (attrNameFirstCh) {
  44010. orig._createAttr.call(this, attrNameFirstCh);
  44011. mxn.currentAttrLocation = mxn._getCurrentLocation();
  44012. },
  44013. _leaveAttrName: function (toState) {
  44014. orig._leaveAttrName.call(this, toState);
  44015. mxn._attachCurrentAttrLocationInfo();
  44016. },
  44017. _leaveAttrValue: function (toState) {
  44018. orig._leaveAttrValue.call(this, toState);
  44019. mxn._attachCurrentAttrLocationInfo();
  44020. },
  44021. _emitCurrentToken: function () {
  44022. //NOTE: if we have pending character token make it's end location equal to the
  44023. //current token's start location.
  44024. if (this.currentCharacterToken)
  44025. this.currentCharacterToken.location.endOffset = this.currentToken.location.startOffset;
  44026. this.currentToken.location.endOffset = mxn.posTracker.offset + 1;
  44027. orig._emitCurrentToken.call(this);
  44028. },
  44029. _emitCurrentCharacterToken: function () {
  44030. //NOTE: if we have character token and it's location wasn't set in the _emitCurrentToken(),
  44031. //then set it's location at the current preprocessor position.
  44032. //We don't need to increment preprocessor position, since character token
  44033. //emission is always forced by the start of the next character token here.
  44034. //So, we already have advanced position.
  44035. if (this.currentCharacterToken && this.currentCharacterToken.location.endOffset === -1)
  44036. this.currentCharacterToken.location.endOffset = mxn.posTracker.offset;
  44037. orig._emitCurrentCharacterToken.call(this);
  44038. }
  44039. };
  44040. //NOTE: patch initial states for each mode to obtain token start position
  44041. Object.keys(Tokenizer.MODE).forEach(function (modeName) {
  44042. var state = Tokenizer.MODE[modeName];
  44043. methods[state] = function (cp) {
  44044. mxn.currentTokenLocation = mxn._getCurrentLocation();
  44045. orig[state].call(this, cp);
  44046. };
  44047. });
  44048. return methods;
  44049. };
  44050. /***/ }),
  44051. /* 390 */
  44052. /***/ (function(module, exports, __webpack_require__) {
  44053. "use strict";
  44054. var Mixin = __webpack_require__(116),
  44055. inherits = __webpack_require__(2).inherits,
  44056. UNICODE = __webpack_require__(89);
  44057. //Aliases
  44058. var $ = UNICODE.CODE_POINTS;
  44059. var PositionTrackingPreprocessorMixin = module.exports = function (preprocessor) {
  44060. // NOTE: avoid installing tracker twice
  44061. if (!preprocessor.__locTracker) {
  44062. preprocessor.__locTracker = this;
  44063. Mixin.call(this, preprocessor);
  44064. this.preprocessor = preprocessor;
  44065. this.isEol = false;
  44066. this.lineStartPos = 0;
  44067. this.droppedBufferSize = 0;
  44068. this.col = -1;
  44069. this.line = 1;
  44070. }
  44071. return preprocessor.__locTracker;
  44072. };
  44073. inherits(PositionTrackingPreprocessorMixin, Mixin);
  44074. Object.defineProperty(PositionTrackingPreprocessorMixin.prototype, 'offset', {
  44075. get: function () {
  44076. return this.droppedBufferSize + this.preprocessor.pos;
  44077. }
  44078. });
  44079. PositionTrackingPreprocessorMixin.prototype._getOverriddenMethods = function (mxn, orig) {
  44080. return {
  44081. advance: function () {
  44082. var cp = orig.advance.call(this);
  44083. //NOTE: LF should be in the last column of the line
  44084. if (mxn.isEol) {
  44085. mxn.isEol = false;
  44086. mxn.line++;
  44087. mxn.lineStartPos = mxn.offset;
  44088. }
  44089. if (cp === $.LINE_FEED)
  44090. mxn.isEol = true;
  44091. mxn.col = mxn.offset - mxn.lineStartPos + 1;
  44092. return cp;
  44093. },
  44094. retreat: function () {
  44095. orig.retreat.call(this);
  44096. mxn.isEol = false;
  44097. mxn.col = mxn.offset - mxn.lineStartPos + 1;
  44098. },
  44099. dropParsedChunk: function () {
  44100. var prevPos = this.pos;
  44101. orig.dropParsedChunk.call(this);
  44102. mxn.droppedBufferSize += prevPos - this.pos;
  44103. }
  44104. };
  44105. };
  44106. /***/ }),
  44107. /* 391 */
  44108. /***/ (function(module, exports, __webpack_require__) {
  44109. "use strict";
  44110. var Tokenizer = __webpack_require__(66),
  44111. HTML = __webpack_require__(29);
  44112. //Aliases
  44113. var $ = HTML.TAG_NAMES,
  44114. NS = HTML.NAMESPACES,
  44115. ATTRS = HTML.ATTRS;
  44116. //MIME types
  44117. var MIME_TYPES = {
  44118. TEXT_HTML: 'text/html',
  44119. APPLICATION_XML: 'application/xhtml+xml'
  44120. };
  44121. //Attributes
  44122. var DEFINITION_URL_ATTR = 'definitionurl',
  44123. ADJUSTED_DEFINITION_URL_ATTR = 'definitionURL',
  44124. SVG_ATTRS_ADJUSTMENT_MAP = {
  44125. 'attributename': 'attributeName',
  44126. 'attributetype': 'attributeType',
  44127. 'basefrequency': 'baseFrequency',
  44128. 'baseprofile': 'baseProfile',
  44129. 'calcmode': 'calcMode',
  44130. 'clippathunits': 'clipPathUnits',
  44131. 'diffuseconstant': 'diffuseConstant',
  44132. 'edgemode': 'edgeMode',
  44133. 'filterunits': 'filterUnits',
  44134. 'glyphref': 'glyphRef',
  44135. 'gradienttransform': 'gradientTransform',
  44136. 'gradientunits': 'gradientUnits',
  44137. 'kernelmatrix': 'kernelMatrix',
  44138. 'kernelunitlength': 'kernelUnitLength',
  44139. 'keypoints': 'keyPoints',
  44140. 'keysplines': 'keySplines',
  44141. 'keytimes': 'keyTimes',
  44142. 'lengthadjust': 'lengthAdjust',
  44143. 'limitingconeangle': 'limitingConeAngle',
  44144. 'markerheight': 'markerHeight',
  44145. 'markerunits': 'markerUnits',
  44146. 'markerwidth': 'markerWidth',
  44147. 'maskcontentunits': 'maskContentUnits',
  44148. 'maskunits': 'maskUnits',
  44149. 'numoctaves': 'numOctaves',
  44150. 'pathlength': 'pathLength',
  44151. 'patterncontentunits': 'patternContentUnits',
  44152. 'patterntransform': 'patternTransform',
  44153. 'patternunits': 'patternUnits',
  44154. 'pointsatx': 'pointsAtX',
  44155. 'pointsaty': 'pointsAtY',
  44156. 'pointsatz': 'pointsAtZ',
  44157. 'preservealpha': 'preserveAlpha',
  44158. 'preserveaspectratio': 'preserveAspectRatio',
  44159. 'primitiveunits': 'primitiveUnits',
  44160. 'refx': 'refX',
  44161. 'refy': 'refY',
  44162. 'repeatcount': 'repeatCount',
  44163. 'repeatdur': 'repeatDur',
  44164. 'requiredextensions': 'requiredExtensions',
  44165. 'requiredfeatures': 'requiredFeatures',
  44166. 'specularconstant': 'specularConstant',
  44167. 'specularexponent': 'specularExponent',
  44168. 'spreadmethod': 'spreadMethod',
  44169. 'startoffset': 'startOffset',
  44170. 'stddeviation': 'stdDeviation',
  44171. 'stitchtiles': 'stitchTiles',
  44172. 'surfacescale': 'surfaceScale',
  44173. 'systemlanguage': 'systemLanguage',
  44174. 'tablevalues': 'tableValues',
  44175. 'targetx': 'targetX',
  44176. 'targety': 'targetY',
  44177. 'textlength': 'textLength',
  44178. 'viewbox': 'viewBox',
  44179. 'viewtarget': 'viewTarget',
  44180. 'xchannelselector': 'xChannelSelector',
  44181. 'ychannelselector': 'yChannelSelector',
  44182. 'zoomandpan': 'zoomAndPan'
  44183. },
  44184. XML_ATTRS_ADJUSTMENT_MAP = {
  44185. 'xlink:actuate': {prefix: 'xlink', name: 'actuate', namespace: NS.XLINK},
  44186. 'xlink:arcrole': {prefix: 'xlink', name: 'arcrole', namespace: NS.XLINK},
  44187. 'xlink:href': {prefix: 'xlink', name: 'href', namespace: NS.XLINK},
  44188. 'xlink:role': {prefix: 'xlink', name: 'role', namespace: NS.XLINK},
  44189. 'xlink:show': {prefix: 'xlink', name: 'show', namespace: NS.XLINK},
  44190. 'xlink:title': {prefix: 'xlink', name: 'title', namespace: NS.XLINK},
  44191. 'xlink:type': {prefix: 'xlink', name: 'type', namespace: NS.XLINK},
  44192. 'xml:base': {prefix: 'xml', name: 'base', namespace: NS.XML},
  44193. 'xml:lang': {prefix: 'xml', name: 'lang', namespace: NS.XML},
  44194. 'xml:space': {prefix: 'xml', name: 'space', namespace: NS.XML},
  44195. 'xmlns': {prefix: '', name: 'xmlns', namespace: NS.XMLNS},
  44196. 'xmlns:xlink': {prefix: 'xmlns', name: 'xlink', namespace: NS.XMLNS}
  44197. };
  44198. //SVG tag names adjustment map
  44199. var SVG_TAG_NAMES_ADJUSTMENT_MAP = exports.SVG_TAG_NAMES_ADJUSTMENT_MAP = {
  44200. 'altglyph': 'altGlyph',
  44201. 'altglyphdef': 'altGlyphDef',
  44202. 'altglyphitem': 'altGlyphItem',
  44203. 'animatecolor': 'animateColor',
  44204. 'animatemotion': 'animateMotion',
  44205. 'animatetransform': 'animateTransform',
  44206. 'clippath': 'clipPath',
  44207. 'feblend': 'feBlend',
  44208. 'fecolormatrix': 'feColorMatrix',
  44209. 'fecomponenttransfer': 'feComponentTransfer',
  44210. 'fecomposite': 'feComposite',
  44211. 'feconvolvematrix': 'feConvolveMatrix',
  44212. 'fediffuselighting': 'feDiffuseLighting',
  44213. 'fedisplacementmap': 'feDisplacementMap',
  44214. 'fedistantlight': 'feDistantLight',
  44215. 'feflood': 'feFlood',
  44216. 'fefunca': 'feFuncA',
  44217. 'fefuncb': 'feFuncB',
  44218. 'fefuncg': 'feFuncG',
  44219. 'fefuncr': 'feFuncR',
  44220. 'fegaussianblur': 'feGaussianBlur',
  44221. 'feimage': 'feImage',
  44222. 'femerge': 'feMerge',
  44223. 'femergenode': 'feMergeNode',
  44224. 'femorphology': 'feMorphology',
  44225. 'feoffset': 'feOffset',
  44226. 'fepointlight': 'fePointLight',
  44227. 'fespecularlighting': 'feSpecularLighting',
  44228. 'fespotlight': 'feSpotLight',
  44229. 'fetile': 'feTile',
  44230. 'feturbulence': 'feTurbulence',
  44231. 'foreignobject': 'foreignObject',
  44232. 'glyphref': 'glyphRef',
  44233. 'lineargradient': 'linearGradient',
  44234. 'radialgradient': 'radialGradient',
  44235. 'textpath': 'textPath'
  44236. };
  44237. //Tags that causes exit from foreign content
  44238. var EXITS_FOREIGN_CONTENT = Object.create(null);
  44239. EXITS_FOREIGN_CONTENT[$.B] = true;
  44240. EXITS_FOREIGN_CONTENT[$.BIG] = true;
  44241. EXITS_FOREIGN_CONTENT[$.BLOCKQUOTE] = true;
  44242. EXITS_FOREIGN_CONTENT[$.BODY] = true;
  44243. EXITS_FOREIGN_CONTENT[$.BR] = true;
  44244. EXITS_FOREIGN_CONTENT[$.CENTER] = true;
  44245. EXITS_FOREIGN_CONTENT[$.CODE] = true;
  44246. EXITS_FOREIGN_CONTENT[$.DD] = true;
  44247. EXITS_FOREIGN_CONTENT[$.DIV] = true;
  44248. EXITS_FOREIGN_CONTENT[$.DL] = true;
  44249. EXITS_FOREIGN_CONTENT[$.DT] = true;
  44250. EXITS_FOREIGN_CONTENT[$.EM] = true;
  44251. EXITS_FOREIGN_CONTENT[$.EMBED] = true;
  44252. EXITS_FOREIGN_CONTENT[$.H1] = true;
  44253. EXITS_FOREIGN_CONTENT[$.H2] = true;
  44254. EXITS_FOREIGN_CONTENT[$.H3] = true;
  44255. EXITS_FOREIGN_CONTENT[$.H4] = true;
  44256. EXITS_FOREIGN_CONTENT[$.H5] = true;
  44257. EXITS_FOREIGN_CONTENT[$.H6] = true;
  44258. EXITS_FOREIGN_CONTENT[$.HEAD] = true;
  44259. EXITS_FOREIGN_CONTENT[$.HR] = true;
  44260. EXITS_FOREIGN_CONTENT[$.I] = true;
  44261. EXITS_FOREIGN_CONTENT[$.IMG] = true;
  44262. EXITS_FOREIGN_CONTENT[$.LI] = true;
  44263. EXITS_FOREIGN_CONTENT[$.LISTING] = true;
  44264. EXITS_FOREIGN_CONTENT[$.MENU] = true;
  44265. EXITS_FOREIGN_CONTENT[$.META] = true;
  44266. EXITS_FOREIGN_CONTENT[$.NOBR] = true;
  44267. EXITS_FOREIGN_CONTENT[$.OL] = true;
  44268. EXITS_FOREIGN_CONTENT[$.P] = true;
  44269. EXITS_FOREIGN_CONTENT[$.PRE] = true;
  44270. EXITS_FOREIGN_CONTENT[$.RUBY] = true;
  44271. EXITS_FOREIGN_CONTENT[$.S] = true;
  44272. EXITS_FOREIGN_CONTENT[$.SMALL] = true;
  44273. EXITS_FOREIGN_CONTENT[$.SPAN] = true;
  44274. EXITS_FOREIGN_CONTENT[$.STRONG] = true;
  44275. EXITS_FOREIGN_CONTENT[$.STRIKE] = true;
  44276. EXITS_FOREIGN_CONTENT[$.SUB] = true;
  44277. EXITS_FOREIGN_CONTENT[$.SUP] = true;
  44278. EXITS_FOREIGN_CONTENT[$.TABLE] = true;
  44279. EXITS_FOREIGN_CONTENT[$.TT] = true;
  44280. EXITS_FOREIGN_CONTENT[$.U] = true;
  44281. EXITS_FOREIGN_CONTENT[$.UL] = true;
  44282. EXITS_FOREIGN_CONTENT[$.VAR] = true;
  44283. //Check exit from foreign content
  44284. exports.causesExit = function (startTagToken) {
  44285. var tn = startTagToken.tagName;
  44286. var isFontWithAttrs = tn === $.FONT && (Tokenizer.getTokenAttr(startTagToken, ATTRS.COLOR) !== null ||
  44287. Tokenizer.getTokenAttr(startTagToken, ATTRS.SIZE) !== null ||
  44288. Tokenizer.getTokenAttr(startTagToken, ATTRS.FACE) !== null);
  44289. return isFontWithAttrs ? true : EXITS_FOREIGN_CONTENT[tn];
  44290. };
  44291. //Token adjustments
  44292. exports.adjustTokenMathMLAttrs = function (token) {
  44293. for (var i = 0; i < token.attrs.length; i++) {
  44294. if (token.attrs[i].name === DEFINITION_URL_ATTR) {
  44295. token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR;
  44296. break;
  44297. }
  44298. }
  44299. };
  44300. exports.adjustTokenSVGAttrs = function (token) {
  44301. for (var i = 0; i < token.attrs.length; i++) {
  44302. var adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP[token.attrs[i].name];
  44303. if (adjustedAttrName)
  44304. token.attrs[i].name = adjustedAttrName;
  44305. }
  44306. };
  44307. exports.adjustTokenXMLAttrs = function (token) {
  44308. for (var i = 0; i < token.attrs.length; i++) {
  44309. var adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP[token.attrs[i].name];
  44310. if (adjustedAttrEntry) {
  44311. token.attrs[i].prefix = adjustedAttrEntry.prefix;
  44312. token.attrs[i].name = adjustedAttrEntry.name;
  44313. token.attrs[i].namespace = adjustedAttrEntry.namespace;
  44314. }
  44315. }
  44316. };
  44317. exports.adjustTokenSVGTagName = function (token) {
  44318. var adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP[token.tagName];
  44319. if (adjustedTagName)
  44320. token.tagName = adjustedTagName;
  44321. };
  44322. //Integration points
  44323. function isMathMLTextIntegrationPoint(tn, ns) {
  44324. return ns === NS.MATHML && (tn === $.MI || tn === $.MO || tn === $.MN || tn === $.MS || tn === $.MTEXT);
  44325. }
  44326. function isHtmlIntegrationPoint(tn, ns, attrs) {
  44327. if (ns === NS.MATHML && tn === $.ANNOTATION_XML) {
  44328. for (var i = 0; i < attrs.length; i++) {
  44329. if (attrs[i].name === ATTRS.ENCODING) {
  44330. var value = attrs[i].value.toLowerCase();
  44331. return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML;
  44332. }
  44333. }
  44334. }
  44335. return ns === NS.SVG && (tn === $.FOREIGN_OBJECT || tn === $.DESC || tn === $.TITLE);
  44336. }
  44337. exports.isIntegrationPoint = function (tn, ns, attrs, foreignNS) {
  44338. if ((!foreignNS || foreignNS === NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs))
  44339. return true;
  44340. if ((!foreignNS || foreignNS === NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns))
  44341. return true;
  44342. return false;
  44343. };
  44344. /***/ }),
  44345. /* 392 */
  44346. /***/ (function(module, exports, __webpack_require__) {
  44347. "use strict";
  44348. var defaultTreeAdapter = __webpack_require__(160),
  44349. mergeOptions = __webpack_require__(161),
  44350. doctype = __webpack_require__(162),
  44351. HTML = __webpack_require__(29);
  44352. //Aliases
  44353. var $ = HTML.TAG_NAMES,
  44354. NS = HTML.NAMESPACES;
  44355. //Default serializer options
  44356. var DEFAULT_OPTIONS = {
  44357. treeAdapter: defaultTreeAdapter
  44358. };
  44359. //Escaping regexes
  44360. var AMP_REGEX = /&/g,
  44361. NBSP_REGEX = /\u00a0/g,
  44362. DOUBLE_QUOTE_REGEX = /"/g,
  44363. LT_REGEX = /</g,
  44364. GT_REGEX = />/g;
  44365. //Serializer
  44366. var Serializer = module.exports = function (node, options) {
  44367. this.options = mergeOptions(DEFAULT_OPTIONS, options);
  44368. this.treeAdapter = this.options.treeAdapter;
  44369. this.html = '';
  44370. this.startNode = node;
  44371. };
  44372. // NOTE: exported as static method for the testing purposes
  44373. Serializer.escapeString = function (str, attrMode) {
  44374. str = str
  44375. .replace(AMP_REGEX, '&amp;')
  44376. .replace(NBSP_REGEX, '&nbsp;');
  44377. if (attrMode)
  44378. str = str.replace(DOUBLE_QUOTE_REGEX, '&quot;');
  44379. else {
  44380. str = str
  44381. .replace(LT_REGEX, '&lt;')
  44382. .replace(GT_REGEX, '&gt;');
  44383. }
  44384. return str;
  44385. };
  44386. //API
  44387. Serializer.prototype.serialize = function () {
  44388. this._serializeChildNodes(this.startNode);
  44389. return this.html;
  44390. };
  44391. //Internals
  44392. Serializer.prototype._serializeChildNodes = function (parentNode) {
  44393. var childNodes = this.treeAdapter.getChildNodes(parentNode);
  44394. if (childNodes) {
  44395. for (var i = 0, cnLength = childNodes.length; i < cnLength; i++) {
  44396. var currentNode = childNodes[i];
  44397. if (this.treeAdapter.isElementNode(currentNode))
  44398. this._serializeElement(currentNode);
  44399. else if (this.treeAdapter.isTextNode(currentNode))
  44400. this._serializeTextNode(currentNode);
  44401. else if (this.treeAdapter.isCommentNode(currentNode))
  44402. this._serializeCommentNode(currentNode);
  44403. else if (this.treeAdapter.isDocumentTypeNode(currentNode))
  44404. this._serializeDocumentTypeNode(currentNode);
  44405. }
  44406. }
  44407. };
  44408. Serializer.prototype._serializeElement = function (node) {
  44409. var tn = this.treeAdapter.getTagName(node),
  44410. ns = this.treeAdapter.getNamespaceURI(node);
  44411. this.html += '<' + tn;
  44412. this._serializeAttributes(node);
  44413. this.html += '>';
  44414. if (tn !== $.AREA && tn !== $.BASE && tn !== $.BASEFONT && tn !== $.BGSOUND && tn !== $.BR && tn !== $.BR &&
  44415. tn !== $.COL && tn !== $.EMBED && tn !== $.FRAME && tn !== $.HR && tn !== $.IMG && tn !== $.INPUT &&
  44416. tn !== $.KEYGEN && tn !== $.LINK && tn !== $.MENUITEM && tn !== $.META && tn !== $.PARAM && tn !== $.SOURCE &&
  44417. tn !== $.TRACK && tn !== $.WBR) {
  44418. var childNodesHolder = tn === $.TEMPLATE && ns === NS.HTML ?
  44419. this.treeAdapter.getTemplateContent(node) :
  44420. node;
  44421. this._serializeChildNodes(childNodesHolder);
  44422. this.html += '</' + tn + '>';
  44423. }
  44424. };
  44425. Serializer.prototype._serializeAttributes = function (node) {
  44426. var attrs = this.treeAdapter.getAttrList(node);
  44427. for (var i = 0, attrsLength = attrs.length; i < attrsLength; i++) {
  44428. var attr = attrs[i],
  44429. value = Serializer.escapeString(attr.value, true);
  44430. this.html += ' ';
  44431. if (!attr.namespace)
  44432. this.html += attr.name;
  44433. else if (attr.namespace === NS.XML)
  44434. this.html += 'xml:' + attr.name;
  44435. else if (attr.namespace === NS.XMLNS) {
  44436. if (attr.name !== 'xmlns')
  44437. this.html += 'xmlns:';
  44438. this.html += attr.name;
  44439. }
  44440. else if (attr.namespace === NS.XLINK)
  44441. this.html += 'xlink:' + attr.name;
  44442. else
  44443. this.html += attr.namespace + ':' + attr.name;
  44444. this.html += '="' + value + '"';
  44445. }
  44446. };
  44447. Serializer.prototype._serializeTextNode = function (node) {
  44448. var content = this.treeAdapter.getTextNodeContent(node),
  44449. parent = this.treeAdapter.getParentNode(node),
  44450. parentTn = void 0;
  44451. if (parent && this.treeAdapter.isElementNode(parent))
  44452. parentTn = this.treeAdapter.getTagName(parent);
  44453. if (parentTn === $.STYLE || parentTn === $.SCRIPT || parentTn === $.XMP || parentTn === $.IFRAME ||
  44454. parentTn === $.NOEMBED || parentTn === $.NOFRAMES || parentTn === $.PLAINTEXT || parentTn === $.NOSCRIPT)
  44455. this.html += content;
  44456. else
  44457. this.html += Serializer.escapeString(content, false);
  44458. };
  44459. Serializer.prototype._serializeCommentNode = function (node) {
  44460. this.html += '<!--' + this.treeAdapter.getCommentNodeContent(node) + '-->';
  44461. };
  44462. Serializer.prototype._serializeDocumentTypeNode = function (node) {
  44463. var name = this.treeAdapter.getDocumentTypeNodeName(node);
  44464. this.html += '<' + doctype.serializeContent(name, null, null) + '>';
  44465. };
  44466. /***/ }),
  44467. /* 393 */
  44468. /***/ (function(module, exports, __webpack_require__) {
  44469. "use strict";
  44470. var WritableStream = __webpack_require__(10).Writable,
  44471. inherits = __webpack_require__(2).inherits,
  44472. Parser = __webpack_require__(388);
  44473. var ParserStream = module.exports = function (options) {
  44474. WritableStream.call(this);
  44475. this.parser = new Parser(options);
  44476. this.lastChunkWritten = false;
  44477. this.writeCallback = null;
  44478. this.pausedByScript = false;
  44479. this.document = this.parser.treeAdapter.createDocument();
  44480. this.pendingHtmlInsertions = [];
  44481. this._resume = this._resume.bind(this);
  44482. this._documentWrite = this._documentWrite.bind(this);
  44483. this._scriptHandler = this._scriptHandler.bind(this);
  44484. this.parser._bootstrap(this.document, null);
  44485. };
  44486. inherits(ParserStream, WritableStream);
  44487. //WritableStream implementation
  44488. ParserStream.prototype._write = function (chunk, encoding, callback) {
  44489. this.writeCallback = callback;
  44490. this.parser.tokenizer.write(chunk.toString('utf8'), this.lastChunkWritten);
  44491. this._runParsingLoop();
  44492. };
  44493. ParserStream.prototype.end = function (chunk, encoding, callback) {
  44494. this.lastChunkWritten = true;
  44495. WritableStream.prototype.end.call(this, chunk || '', encoding, callback);
  44496. };
  44497. //Scriptable parser implementation
  44498. ParserStream.prototype._runParsingLoop = function () {
  44499. this.parser.runParsingLoopForCurrentChunk(this.writeCallback, this._scriptHandler);
  44500. };
  44501. ParserStream.prototype._resume = function () {
  44502. if (!this.pausedByScript)
  44503. throw new Error('Parser was already resumed');
  44504. while (this.pendingHtmlInsertions.length) {
  44505. var html = this.pendingHtmlInsertions.pop();
  44506. this.parser.tokenizer.insertHtmlAtCurrentPos(html);
  44507. }
  44508. this.pausedByScript = false;
  44509. //NOTE: keep parsing if we don't wait for the next input chunk
  44510. if (this.parser.tokenizer.active)
  44511. this._runParsingLoop();
  44512. };
  44513. ParserStream.prototype._documentWrite = function (html) {
  44514. if (!this.parser.stopped)
  44515. this.pendingHtmlInsertions.push(html);
  44516. };
  44517. ParserStream.prototype._scriptHandler = function (scriptElement) {
  44518. if (this.listeners('script').length) {
  44519. this.pausedByScript = true;
  44520. this.emit('script', scriptElement, this._documentWrite, this._resume);
  44521. }
  44522. else
  44523. this._runParsingLoop();
  44524. };
  44525. /***/ }),
  44526. /* 394 */
  44527. /***/ (function(module, exports, __webpack_require__) {
  44528. var assignValue = __webpack_require__(163),
  44529. copyObject = __webpack_require__(118),
  44530. createAssigner = __webpack_require__(119),
  44531. isArrayLike = __webpack_require__(40),
  44532. isPrototype = __webpack_require__(123),
  44533. keys = __webpack_require__(91);
  44534. /** Used for built-in method references. */
  44535. var objectProto = Object.prototype;
  44536. /** Used to check objects for own properties. */
  44537. var hasOwnProperty = objectProto.hasOwnProperty;
  44538. /**
  44539. * Assigns own enumerable string keyed properties of source objects to the
  44540. * destination object. Source objects are applied from left to right.
  44541. * Subsequent sources overwrite property assignments of previous sources.
  44542. *
  44543. * **Note:** This method mutates `object` and is loosely based on
  44544. * [`Object.assign`](https://mdn.io/Object/assign).
  44545. *
  44546. * @static
  44547. * @memberOf _
  44548. * @since 0.10.0
  44549. * @category Object
  44550. * @param {Object} object The destination object.
  44551. * @param {...Object} [sources] The source objects.
  44552. * @returns {Object} Returns `object`.
  44553. * @see _.assignIn
  44554. * @example
  44555. *
  44556. * function Foo() {
  44557. * this.a = 1;
  44558. * }
  44559. *
  44560. * function Bar() {
  44561. * this.c = 3;
  44562. * }
  44563. *
  44564. * Foo.prototype.b = 2;
  44565. * Bar.prototype.d = 4;
  44566. *
  44567. * _.assign({ 'a': 0 }, new Foo, new Bar);
  44568. * // => { 'a': 1, 'c': 3 }
  44569. */
  44570. var assign = createAssigner(function(object, source) {
  44571. if (isPrototype(source) || isArrayLike(source)) {
  44572. copyObject(source, keys(source), object);
  44573. return;
  44574. }
  44575. for (var key in source) {
  44576. if (hasOwnProperty.call(source, key)) {
  44577. assignValue(object, key, source[key]);
  44578. }
  44579. }
  44580. });
  44581. module.exports = assign;
  44582. /***/ }),
  44583. /* 395 */
  44584. /***/ (function(module, exports, __webpack_require__) {
  44585. var getNative = __webpack_require__(49);
  44586. var defineProperty = (function() {
  44587. try {
  44588. var func = getNative(Object, 'defineProperty');
  44589. func({}, '', {});
  44590. return func;
  44591. } catch (e) {}
  44592. }());
  44593. module.exports = defineProperty;
  44594. /***/ }),
  44595. /* 396 */
  44596. /***/ (function(module, exports) {
  44597. /** Used for built-in method references. */
  44598. var funcProto = Function.prototype;
  44599. /** Used to resolve the decompiled source of functions. */
  44600. var funcToString = funcProto.toString;
  44601. /**
  44602. * Converts `func` to its source code.
  44603. *
  44604. * @private
  44605. * @param {Function} func The function to convert.
  44606. * @returns {string} Returns the source code.
  44607. */
  44608. function toSource(func) {
  44609. if (func != null) {
  44610. try {
  44611. return funcToString.call(func);
  44612. } catch (e) {}
  44613. try {
  44614. return (func + '');
  44615. } catch (e) {}
  44616. }
  44617. return '';
  44618. }
  44619. module.exports = toSource;
  44620. /***/ }),
  44621. /* 397 */
  44622. /***/ (function(module, exports, __webpack_require__) {
  44623. var apply = __webpack_require__(121);
  44624. /* Built-in method references for those with the same name as other `lodash` methods. */
  44625. var nativeMax = Math.max;
  44626. /**
  44627. * A specialized version of `baseRest` which transforms the rest array.
  44628. *
  44629. * @private
  44630. * @param {Function} func The function to apply a rest parameter to.
  44631. * @param {number} [start=func.length-1] The start position of the rest parameter.
  44632. * @param {Function} transform The rest array transform.
  44633. * @returns {Function} Returns the new function.
  44634. */
  44635. function overRest(func, start, transform) {
  44636. start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
  44637. return function() {
  44638. var args = arguments,
  44639. index = -1,
  44640. length = nativeMax(args.length - start, 0),
  44641. array = Array(length);
  44642. while (++index < length) {
  44643. array[index] = args[start + index];
  44644. }
  44645. index = -1;
  44646. var otherArgs = Array(start + 1);
  44647. while (++index < start) {
  44648. otherArgs[index] = args[index];
  44649. }
  44650. otherArgs[start] = transform(array);
  44651. return apply(func, this, otherArgs);
  44652. };
  44653. }
  44654. module.exports = overRest;
  44655. /***/ }),
  44656. /* 398 */
  44657. /***/ (function(module, exports) {
  44658. /** Used to detect hot functions by number of calls within a span of milliseconds. */
  44659. var HOT_COUNT = 800,
  44660. HOT_SPAN = 16;
  44661. /* Built-in method references for those with the same name as other `lodash` methods. */
  44662. var nativeNow = Date.now;
  44663. /**
  44664. * Creates a function that'll short out and invoke `identity` instead
  44665. * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
  44666. * milliseconds.
  44667. *
  44668. * @private
  44669. * @param {Function} func The function to restrict.
  44670. * @returns {Function} Returns the new shortable function.
  44671. */
  44672. function shortOut(func) {
  44673. var count = 0,
  44674. lastCalled = 0;
  44675. return function() {
  44676. var stamp = nativeNow(),
  44677. remaining = HOT_SPAN - (stamp - lastCalled);
  44678. lastCalled = stamp;
  44679. if (remaining > 0) {
  44680. if (++count >= HOT_COUNT) {
  44681. return arguments[0];
  44682. }
  44683. } else {
  44684. count = 0;
  44685. }
  44686. return func.apply(undefined, arguments);
  44687. };
  44688. }
  44689. module.exports = shortOut;
  44690. /***/ }),
  44691. /* 399 */
  44692. /***/ (function(module, exports, __webpack_require__) {
  44693. var baseTimes = __webpack_require__(681),
  44694. isArguments = __webpack_require__(124),
  44695. isArray = __webpack_require__(9),
  44696. isBuffer = __webpack_require__(167),
  44697. isIndex = __webpack_require__(90),
  44698. isTypedArray = __webpack_require__(168);
  44699. /** Used for built-in method references. */
  44700. var objectProto = Object.prototype;
  44701. /** Used to check objects for own properties. */
  44702. var hasOwnProperty = objectProto.hasOwnProperty;
  44703. /**
  44704. * Creates an array of the enumerable property names of the array-like `value`.
  44705. *
  44706. * @private
  44707. * @param {*} value The value to query.
  44708. * @param {boolean} inherited Specify returning inherited property names.
  44709. * @returns {Array} Returns the array of property names.
  44710. */
  44711. function arrayLikeKeys(value, inherited) {
  44712. var isArr = isArray(value),
  44713. isArg = !isArr && isArguments(value),
  44714. isBuff = !isArr && !isArg && isBuffer(value),
  44715. isType = !isArr && !isArg && !isBuff && isTypedArray(value),
  44716. skipIndexes = isArr || isArg || isBuff || isType,
  44717. result = skipIndexes ? baseTimes(value.length, String) : [],
  44718. length = result.length;
  44719. for (var key in value) {
  44720. if ((inherited || hasOwnProperty.call(value, key)) &&
  44721. !(skipIndexes && (
  44722. // Safari 9 has enumerable `arguments.length` in strict mode.
  44723. key == 'length' ||
  44724. // Node.js 0.10 has enumerable non-index properties on buffers.
  44725. (isBuff && (key == 'offset' || key == 'parent')) ||
  44726. // PhantomJS 2 has enumerable non-index properties on typed arrays.
  44727. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
  44728. // Skip index properties.
  44729. isIndex(key, length)
  44730. ))) {
  44731. result.push(key);
  44732. }
  44733. }
  44734. return result;
  44735. }
  44736. module.exports = arrayLikeKeys;
  44737. /***/ }),
  44738. /* 400 */
  44739. /***/ (function(module, exports) {
  44740. /**
  44741. * The base implementation of `_.unary` without support for storing metadata.
  44742. *
  44743. * @private
  44744. * @param {Function} func The function to cap arguments for.
  44745. * @returns {Function} Returns the new capped function.
  44746. */
  44747. function baseUnary(func) {
  44748. return function(value) {
  44749. return func(value);
  44750. };
  44751. }
  44752. module.exports = baseUnary;
  44753. /***/ }),
  44754. /* 401 */
  44755. /***/ (function(module, exports) {
  44756. /**
  44757. * Creates a unary function that invokes `func` with its argument transformed.
  44758. *
  44759. * @private
  44760. * @param {Function} func The function to wrap.
  44761. * @param {Function} transform The argument transform.
  44762. * @returns {Function} Returns the new function.
  44763. */
  44764. function overArg(func, transform) {
  44765. return function(arg) {
  44766. return func(transform(arg));
  44767. };
  44768. }
  44769. module.exports = overArg;
  44770. /***/ }),
  44771. /* 402 */
  44772. /***/ (function(module, exports, __webpack_require__) {
  44773. var copyObject = __webpack_require__(118),
  44774. createAssigner = __webpack_require__(119),
  44775. keysIn = __webpack_require__(125);
  44776. /**
  44777. * This method is like `_.assign` except that it iterates over own and
  44778. * inherited source properties.
  44779. *
  44780. * **Note:** This method mutates `object`.
  44781. *
  44782. * @static
  44783. * @memberOf _
  44784. * @since 4.0.0
  44785. * @alias extend
  44786. * @category Object
  44787. * @param {Object} object The destination object.
  44788. * @param {...Object} [sources] The source objects.
  44789. * @returns {Object} Returns `object`.
  44790. * @see _.assign
  44791. * @example
  44792. *
  44793. * function Foo() {
  44794. * this.a = 1;
  44795. * }
  44796. *
  44797. * function Bar() {
  44798. * this.c = 3;
  44799. * }
  44800. *
  44801. * Foo.prototype.b = 2;
  44802. * Bar.prototype.d = 4;
  44803. *
  44804. * _.assignIn({ 'a': 0 }, new Foo, new Bar);
  44805. * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
  44806. */
  44807. var assignIn = createAssigner(function(object, source) {
  44808. copyObject(source, keysIn(source), object);
  44809. });
  44810. module.exports = assignIn;
  44811. /***/ }),
  44812. /* 403 */
  44813. /***/ (function(module, exports, __webpack_require__) {
  44814. var identity = __webpack_require__(68),
  44815. metaMap = __webpack_require__(404);
  44816. /**
  44817. * The base implementation of `setData` without support for hot loop shorting.
  44818. *
  44819. * @private
  44820. * @param {Function} func The function to associate metadata with.
  44821. * @param {*} data The metadata.
  44822. * @returns {Function} Returns `func`.
  44823. */
  44824. var baseSetData = !metaMap ? identity : function(func, data) {
  44825. metaMap.set(func, data);
  44826. return func;
  44827. };
  44828. module.exports = baseSetData;
  44829. /***/ }),
  44830. /* 404 */
  44831. /***/ (function(module, exports, __webpack_require__) {
  44832. var WeakMap = __webpack_require__(405);
  44833. /** Used to store function metadata. */
  44834. var metaMap = WeakMap && new WeakMap;
  44835. module.exports = metaMap;
  44836. /***/ }),
  44837. /* 405 */
  44838. /***/ (function(module, exports, __webpack_require__) {
  44839. var getNative = __webpack_require__(49),
  44840. root = __webpack_require__(19);
  44841. /* Built-in method references that are verified to be native. */
  44842. var WeakMap = getNative(root, 'WeakMap');
  44843. module.exports = WeakMap;
  44844. /***/ }),
  44845. /* 406 */
  44846. /***/ (function(module, exports, __webpack_require__) {
  44847. var composeArgs = __webpack_require__(407),
  44848. composeArgsRight = __webpack_require__(408),
  44849. countHolders = __webpack_require__(693),
  44850. createCtor = __webpack_require__(126),
  44851. createRecurry = __webpack_require__(409),
  44852. getHolder = __webpack_require__(173),
  44853. reorder = __webpack_require__(707),
  44854. replaceHolders = __webpack_require__(128),
  44855. root = __webpack_require__(19);
  44856. /** Used to compose bitmasks for function metadata. */
  44857. var WRAP_BIND_FLAG = 1,
  44858. WRAP_BIND_KEY_FLAG = 2,
  44859. WRAP_CURRY_FLAG = 8,
  44860. WRAP_CURRY_RIGHT_FLAG = 16,
  44861. WRAP_ARY_FLAG = 128,
  44862. WRAP_FLIP_FLAG = 512;
  44863. /**
  44864. * Creates a function that wraps `func` to invoke it with optional `this`
  44865. * binding of `thisArg`, partial application, and currying.
  44866. *
  44867. * @private
  44868. * @param {Function|string} func The function or method name to wrap.
  44869. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  44870. * @param {*} [thisArg] The `this` binding of `func`.
  44871. * @param {Array} [partials] The arguments to prepend to those provided to
  44872. * the new function.
  44873. * @param {Array} [holders] The `partials` placeholder indexes.
  44874. * @param {Array} [partialsRight] The arguments to append to those provided
  44875. * to the new function.
  44876. * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
  44877. * @param {Array} [argPos] The argument positions of the new function.
  44878. * @param {number} [ary] The arity cap of `func`.
  44879. * @param {number} [arity] The arity of `func`.
  44880. * @returns {Function} Returns the new wrapped function.
  44881. */
  44882. function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
  44883. var isAry = bitmask & WRAP_ARY_FLAG,
  44884. isBind = bitmask & WRAP_BIND_FLAG,
  44885. isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
  44886. isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
  44887. isFlip = bitmask & WRAP_FLIP_FLAG,
  44888. Ctor = isBindKey ? undefined : createCtor(func);
  44889. function wrapper() {
  44890. var length = arguments.length,
  44891. args = Array(length),
  44892. index = length;
  44893. while (index--) {
  44894. args[index] = arguments[index];
  44895. }
  44896. if (isCurried) {
  44897. var placeholder = getHolder(wrapper),
  44898. holdersCount = countHolders(args, placeholder);
  44899. }
  44900. if (partials) {
  44901. args = composeArgs(args, partials, holders, isCurried);
  44902. }
  44903. if (partialsRight) {
  44904. args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
  44905. }
  44906. length -= holdersCount;
  44907. if (isCurried && length < arity) {
  44908. var newHolders = replaceHolders(args, placeholder);
  44909. return createRecurry(
  44910. func, bitmask, createHybrid, wrapper.placeholder, thisArg,
  44911. args, newHolders, argPos, ary, arity - length
  44912. );
  44913. }
  44914. var thisBinding = isBind ? thisArg : this,
  44915. fn = isBindKey ? thisBinding[func] : func;
  44916. length = args.length;
  44917. if (argPos) {
  44918. args = reorder(args, argPos);
  44919. } else if (isFlip && length > 1) {
  44920. args.reverse();
  44921. }
  44922. if (isAry && ary < length) {
  44923. args.length = ary;
  44924. }
  44925. if (this && this !== root && this instanceof wrapper) {
  44926. fn = Ctor || createCtor(fn);
  44927. }
  44928. return fn.apply(thisBinding, args);
  44929. }
  44930. return wrapper;
  44931. }
  44932. module.exports = createHybrid;
  44933. /***/ }),
  44934. /* 407 */
  44935. /***/ (function(module, exports) {
  44936. /* Built-in method references for those with the same name as other `lodash` methods. */
  44937. var nativeMax = Math.max;
  44938. /**
  44939. * Creates an array that is the composition of partially applied arguments,
  44940. * placeholders, and provided arguments into a single array of arguments.
  44941. *
  44942. * @private
  44943. * @param {Array} args The provided arguments.
  44944. * @param {Array} partials The arguments to prepend to those provided.
  44945. * @param {Array} holders The `partials` placeholder indexes.
  44946. * @params {boolean} [isCurried] Specify composing for a curried function.
  44947. * @returns {Array} Returns the new array of composed arguments.
  44948. */
  44949. function composeArgs(args, partials, holders, isCurried) {
  44950. var argsIndex = -1,
  44951. argsLength = args.length,
  44952. holdersLength = holders.length,
  44953. leftIndex = -1,
  44954. leftLength = partials.length,
  44955. rangeLength = nativeMax(argsLength - holdersLength, 0),
  44956. result = Array(leftLength + rangeLength),
  44957. isUncurried = !isCurried;
  44958. while (++leftIndex < leftLength) {
  44959. result[leftIndex] = partials[leftIndex];
  44960. }
  44961. while (++argsIndex < holdersLength) {
  44962. if (isUncurried || argsIndex < argsLength) {
  44963. result[holders[argsIndex]] = args[argsIndex];
  44964. }
  44965. }
  44966. while (rangeLength--) {
  44967. result[leftIndex++] = args[argsIndex++];
  44968. }
  44969. return result;
  44970. }
  44971. module.exports = composeArgs;
  44972. /***/ }),
  44973. /* 408 */
  44974. /***/ (function(module, exports) {
  44975. /* Built-in method references for those with the same name as other `lodash` methods. */
  44976. var nativeMax = Math.max;
  44977. /**
  44978. * This function is like `composeArgs` except that the arguments composition
  44979. * is tailored for `_.partialRight`.
  44980. *
  44981. * @private
  44982. * @param {Array} args The provided arguments.
  44983. * @param {Array} partials The arguments to append to those provided.
  44984. * @param {Array} holders The `partials` placeholder indexes.
  44985. * @params {boolean} [isCurried] Specify composing for a curried function.
  44986. * @returns {Array} Returns the new array of composed arguments.
  44987. */
  44988. function composeArgsRight(args, partials, holders, isCurried) {
  44989. var argsIndex = -1,
  44990. argsLength = args.length,
  44991. holdersIndex = -1,
  44992. holdersLength = holders.length,
  44993. rightIndex = -1,
  44994. rightLength = partials.length,
  44995. rangeLength = nativeMax(argsLength - holdersLength, 0),
  44996. result = Array(rangeLength + rightLength),
  44997. isUncurried = !isCurried;
  44998. while (++argsIndex < rangeLength) {
  44999. result[argsIndex] = args[argsIndex];
  45000. }
  45001. var offset = argsIndex;
  45002. while (++rightIndex < rightLength) {
  45003. result[offset + rightIndex] = partials[rightIndex];
  45004. }
  45005. while (++holdersIndex < holdersLength) {
  45006. if (isUncurried || argsIndex < argsLength) {
  45007. result[offset + holders[holdersIndex]] = args[argsIndex++];
  45008. }
  45009. }
  45010. return result;
  45011. }
  45012. module.exports = composeArgsRight;
  45013. /***/ }),
  45014. /* 409 */
  45015. /***/ (function(module, exports, __webpack_require__) {
  45016. var isLaziable = __webpack_require__(694),
  45017. setData = __webpack_require__(412),
  45018. setWrapToString = __webpack_require__(413);
  45019. /** Used to compose bitmasks for function metadata. */
  45020. var WRAP_BIND_FLAG = 1,
  45021. WRAP_BIND_KEY_FLAG = 2,
  45022. WRAP_CURRY_BOUND_FLAG = 4,
  45023. WRAP_CURRY_FLAG = 8,
  45024. WRAP_PARTIAL_FLAG = 32,
  45025. WRAP_PARTIAL_RIGHT_FLAG = 64;
  45026. /**
  45027. * Creates a function that wraps `func` to continue currying.
  45028. *
  45029. * @private
  45030. * @param {Function} func The function to wrap.
  45031. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  45032. * @param {Function} wrapFunc The function to create the `func` wrapper.
  45033. * @param {*} placeholder The placeholder value.
  45034. * @param {*} [thisArg] The `this` binding of `func`.
  45035. * @param {Array} [partials] The arguments to prepend to those provided to
  45036. * the new function.
  45037. * @param {Array} [holders] The `partials` placeholder indexes.
  45038. * @param {Array} [argPos] The argument positions of the new function.
  45039. * @param {number} [ary] The arity cap of `func`.
  45040. * @param {number} [arity] The arity of `func`.
  45041. * @returns {Function} Returns the new wrapped function.
  45042. */
  45043. function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
  45044. var isCurry = bitmask & WRAP_CURRY_FLAG,
  45045. newHolders = isCurry ? holders : undefined,
  45046. newHoldersRight = isCurry ? undefined : holders,
  45047. newPartials = isCurry ? partials : undefined,
  45048. newPartialsRight = isCurry ? undefined : partials;
  45049. bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
  45050. bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
  45051. if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
  45052. bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
  45053. }
  45054. var newData = [
  45055. func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
  45056. newHoldersRight, argPos, ary, arity
  45057. ];
  45058. var result = wrapFunc.apply(undefined, newData);
  45059. if (isLaziable(func)) {
  45060. setData(result, newData);
  45061. }
  45062. result.placeholder = placeholder;
  45063. return setWrapToString(result, func, bitmask);
  45064. }
  45065. module.exports = createRecurry;
  45066. /***/ }),
  45067. /* 410 */
  45068. /***/ (function(module, exports, __webpack_require__) {
  45069. var metaMap = __webpack_require__(404),
  45070. noop = __webpack_require__(695);
  45071. /**
  45072. * Gets metadata for `func`.
  45073. *
  45074. * @private
  45075. * @param {Function} func The function to query.
  45076. * @returns {*} Returns the metadata for `func`.
  45077. */
  45078. var getData = !metaMap ? noop : function(func) {
  45079. return metaMap.get(func);
  45080. };
  45081. module.exports = getData;
  45082. /***/ }),
  45083. /* 411 */
  45084. /***/ (function(module, exports, __webpack_require__) {
  45085. var baseCreate = __webpack_require__(127),
  45086. baseLodash = __webpack_require__(171);
  45087. /**
  45088. * The base constructor for creating `lodash` wrapper objects.
  45089. *
  45090. * @private
  45091. * @param {*} value The value to wrap.
  45092. * @param {boolean} [chainAll] Enable explicit method chain sequences.
  45093. */
  45094. function LodashWrapper(value, chainAll) {
  45095. this.__wrapped__ = value;
  45096. this.__actions__ = [];
  45097. this.__chain__ = !!chainAll;
  45098. this.__index__ = 0;
  45099. this.__values__ = undefined;
  45100. }
  45101. LodashWrapper.prototype = baseCreate(baseLodash.prototype);
  45102. LodashWrapper.prototype.constructor = LodashWrapper;
  45103. module.exports = LodashWrapper;
  45104. /***/ }),
  45105. /* 412 */
  45106. /***/ (function(module, exports, __webpack_require__) {
  45107. var baseSetData = __webpack_require__(403),
  45108. shortOut = __webpack_require__(398);
  45109. /**
  45110. * Sets metadata for `func`.
  45111. *
  45112. * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
  45113. * period of time, it will trip its breaker and transition to an identity
  45114. * function to avoid garbage collection pauses in V8. See
  45115. * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
  45116. * for more details.
  45117. *
  45118. * @private
  45119. * @param {Function} func The function to associate metadata with.
  45120. * @param {*} data The metadata.
  45121. * @returns {Function} Returns `func`.
  45122. */
  45123. var setData = shortOut(baseSetData);
  45124. module.exports = setData;
  45125. /***/ }),
  45126. /* 413 */
  45127. /***/ (function(module, exports, __webpack_require__) {
  45128. var getWrapDetails = __webpack_require__(700),
  45129. insertWrapDetails = __webpack_require__(701),
  45130. setToString = __webpack_require__(165),
  45131. updateWrapDetails = __webpack_require__(702);
  45132. /**
  45133. * Sets the `toString` method of `wrapper` to mimic the source of `reference`
  45134. * with wrapper details in a comment at the top of the source body.
  45135. *
  45136. * @private
  45137. * @param {Function} wrapper The function to modify.
  45138. * @param {Function} reference The reference function.
  45139. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  45140. * @returns {Function} Returns `wrapper`.
  45141. */
  45142. function setWrapToString(wrapper, reference, bitmask) {
  45143. var source = (reference + '');
  45144. return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
  45145. }
  45146. module.exports = setWrapToString;
  45147. /***/ }),
  45148. /* 414 */
  45149. /***/ (function(module, exports) {
  45150. /**
  45151. * A specialized version of `_.forEach` for arrays without support for
  45152. * iteratee shorthands.
  45153. *
  45154. * @private
  45155. * @param {Array} [array] The array to iterate over.
  45156. * @param {Function} iteratee The function invoked per iteration.
  45157. * @returns {Array} Returns `array`.
  45158. */
  45159. function arrayEach(array, iteratee) {
  45160. var index = -1,
  45161. length = array == null ? 0 : array.length;
  45162. while (++index < length) {
  45163. if (iteratee(array[index], index, array) === false) {
  45164. break;
  45165. }
  45166. }
  45167. return array;
  45168. }
  45169. module.exports = arrayEach;
  45170. /***/ }),
  45171. /* 415 */
  45172. /***/ (function(module, exports, __webpack_require__) {
  45173. var baseFindIndex = __webpack_require__(704),
  45174. baseIsNaN = __webpack_require__(705),
  45175. strictIndexOf = __webpack_require__(706);
  45176. /**
  45177. * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
  45178. *
  45179. * @private
  45180. * @param {Array} array The array to inspect.
  45181. * @param {*} value The value to search for.
  45182. * @param {number} fromIndex The index to search from.
  45183. * @returns {number} Returns the index of the matched value, else `-1`.
  45184. */
  45185. function baseIndexOf(array, value, fromIndex) {
  45186. return value === value
  45187. ? strictIndexOf(array, value, fromIndex)
  45188. : baseFindIndex(array, baseIsNaN, fromIndex);
  45189. }
  45190. module.exports = baseIndexOf;
  45191. /***/ }),
  45192. /* 416 */
  45193. /***/ (function(module, exports, __webpack_require__) {
  45194. var toFinite = __webpack_require__(710);
  45195. /**
  45196. * Converts `value` to an integer.
  45197. *
  45198. * **Note:** This method is loosely based on
  45199. * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
  45200. *
  45201. * @static
  45202. * @memberOf _
  45203. * @since 4.0.0
  45204. * @category Lang
  45205. * @param {*} value The value to convert.
  45206. * @returns {number} Returns the converted integer.
  45207. * @example
  45208. *
  45209. * _.toInteger(3.2);
  45210. * // => 3
  45211. *
  45212. * _.toInteger(Number.MIN_VALUE);
  45213. * // => 0
  45214. *
  45215. * _.toInteger(Infinity);
  45216. * // => 1.7976931348623157e+308
  45217. *
  45218. * _.toInteger('3.2');
  45219. * // => 3
  45220. */
  45221. function toInteger(value) {
  45222. var result = toFinite(value),
  45223. remainder = result % 1;
  45224. return result === result ? (remainder ? result - remainder : result) : 0;
  45225. }
  45226. module.exports = toInteger;
  45227. /***/ }),
  45228. /* 417 */
  45229. /***/ (function(module, exports, __webpack_require__) {
  45230. var createBaseFor = __webpack_require__(713);
  45231. /**
  45232. * The base implementation of `baseForOwn` which iterates over `object`
  45233. * properties returned by `keysFunc` and invokes `iteratee` for each property.
  45234. * Iteratee functions may exit iteration early by explicitly returning `false`.
  45235. *
  45236. * @private
  45237. * @param {Object} object The object to iterate over.
  45238. * @param {Function} iteratee The function invoked per iteration.
  45239. * @param {Function} keysFunc The function to get the keys of `object`.
  45240. * @returns {Object} Returns `object`.
  45241. */
  45242. var baseFor = createBaseFor();
  45243. module.exports = baseFor;
  45244. /***/ }),
  45245. /* 418 */
  45246. /***/ (function(module, exports, __webpack_require__) {
  45247. var apply = __webpack_require__(121),
  45248. assignInWith = __webpack_require__(716),
  45249. baseRest = __webpack_require__(120),
  45250. customDefaultsAssignIn = __webpack_require__(717);
  45251. /**
  45252. * Assigns own and inherited enumerable string keyed properties of source
  45253. * objects to the destination object for all destination properties that
  45254. * resolve to `undefined`. Source objects are applied from left to right.
  45255. * Once a property is set, additional values of the same property are ignored.
  45256. *
  45257. * **Note:** This method mutates `object`.
  45258. *
  45259. * @static
  45260. * @since 0.1.0
  45261. * @memberOf _
  45262. * @category Object
  45263. * @param {Object} object The destination object.
  45264. * @param {...Object} [sources] The source objects.
  45265. * @returns {Object} Returns `object`.
  45266. * @see _.defaultsDeep
  45267. * @example
  45268. *
  45269. * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  45270. * // => { 'a': 1, 'b': 2 }
  45271. */
  45272. var defaults = baseRest(function(args) {
  45273. args.push(undefined, customDefaultsAssignIn);
  45274. return apply(assignInWith, undefined, args);
  45275. });
  45276. module.exports = defaults;
  45277. /***/ }),
  45278. /* 419 */
  45279. /***/ (function(module, exports, __webpack_require__) {
  45280. "use strict";
  45281. module.exports = CSSselect;
  45282. var Pseudos = __webpack_require__(175),
  45283. DomUtils = __webpack_require__(65),
  45284. findOne = DomUtils.findOne,
  45285. findAll = DomUtils.findAll,
  45286. getChildren = DomUtils.getChildren,
  45287. removeSubsets = DomUtils.removeSubsets,
  45288. falseFunc = __webpack_require__(94).falseFunc,
  45289. compile = __webpack_require__(722),
  45290. compileUnsafe = compile.compileUnsafe,
  45291. compileToken = compile.compileToken;
  45292. function getSelectorFunc(searchFunc){
  45293. return function select(query, elems, options){
  45294. if(typeof query !== "function") query = compileUnsafe(query, options, elems);
  45295. if(!Array.isArray(elems)) elems = getChildren(elems);
  45296. else elems = removeSubsets(elems);
  45297. return searchFunc(query, elems);
  45298. };
  45299. }
  45300. var selectAll = getSelectorFunc(function selectAll(query, elems){
  45301. return (query === falseFunc || !elems || elems.length === 0) ? [] : findAll(query, elems);
  45302. });
  45303. var selectOne = getSelectorFunc(function selectOne(query, elems){
  45304. return (query === falseFunc || !elems || elems.length === 0) ? null : findOne(query, elems);
  45305. });
  45306. function is(elem, query, options){
  45307. return (typeof query === "function" ? query : compile(query, options))(elem);
  45308. }
  45309. /*
  45310. the exported interface
  45311. */
  45312. function CSSselect(query, elems, options){
  45313. return selectAll(query, elems, options);
  45314. }
  45315. CSSselect.compile = compile;
  45316. CSSselect.filters = Pseudos.filters;
  45317. CSSselect.pseudos = Pseudos.pseudos;
  45318. CSSselect.selectAll = selectAll;
  45319. CSSselect.selectOne = selectOne;
  45320. CSSselect.is = is;
  45321. //legacy methods (might be removed)
  45322. CSSselect.parse = compile;
  45323. CSSselect.iterate = selectAll;
  45324. //hooks
  45325. CSSselect._compileUnsafe = compileUnsafe;
  45326. CSSselect._compileToken = compileToken;
  45327. /***/ }),
  45328. /* 420 */
  45329. /***/ (function(module, exports, __webpack_require__) {
  45330. var DomUtils = __webpack_require__(65),
  45331. hasAttrib = DomUtils.hasAttrib,
  45332. getAttributeValue = DomUtils.getAttributeValue,
  45333. falseFunc = __webpack_require__(94).falseFunc;
  45334. //https://github.com/slevithan/XRegExp/blob/master/src/xregexp.js#L469
  45335. var reChars = /[-[\]{}()*+?.,\\^$|#\s]/g;
  45336. /*
  45337. attribute selectors
  45338. */
  45339. var attributeRules = {
  45340. __proto__: null,
  45341. equals: function(next, data){
  45342. var name = data.name,
  45343. value = data.value;
  45344. if(data.ignoreCase){
  45345. value = value.toLowerCase();
  45346. return function equalsIC(elem){
  45347. var attr = getAttributeValue(elem, name);
  45348. return attr != null && attr.toLowerCase() === value && next(elem);
  45349. };
  45350. }
  45351. return function equals(elem){
  45352. return getAttributeValue(elem, name) === value && next(elem);
  45353. };
  45354. },
  45355. hyphen: function(next, data){
  45356. var name = data.name,
  45357. value = data.value,
  45358. len = value.length;
  45359. if(data.ignoreCase){
  45360. value = value.toLowerCase();
  45361. return function hyphenIC(elem){
  45362. var attr = getAttributeValue(elem, name);
  45363. return attr != null &&
  45364. (attr.length === len || attr.charAt(len) === "-") &&
  45365. attr.substr(0, len).toLowerCase() === value &&
  45366. next(elem);
  45367. };
  45368. }
  45369. return function hyphen(elem){
  45370. var attr = getAttributeValue(elem, name);
  45371. return attr != null &&
  45372. attr.substr(0, len) === value &&
  45373. (attr.length === len || attr.charAt(len) === "-") &&
  45374. next(elem);
  45375. };
  45376. },
  45377. element: function(next, data){
  45378. var name = data.name,
  45379. value = data.value;
  45380. if(/\s/.test(value)){
  45381. return falseFunc;
  45382. }
  45383. value = value.replace(reChars, "\\$&");
  45384. var pattern = "(?:^|\\s)" + value + "(?:$|\\s)",
  45385. flags = data.ignoreCase ? "i" : "",
  45386. regex = new RegExp(pattern, flags);
  45387. return function element(elem){
  45388. var attr = getAttributeValue(elem, name);
  45389. return attr != null && regex.test(attr) && next(elem);
  45390. };
  45391. },
  45392. exists: function(next, data){
  45393. var name = data.name;
  45394. return function exists(elem){
  45395. return hasAttrib(elem, name) && next(elem);
  45396. };
  45397. },
  45398. start: function(next, data){
  45399. var name = data.name,
  45400. value = data.value,
  45401. len = value.length;
  45402. if(len === 0){
  45403. return falseFunc;
  45404. }
  45405. if(data.ignoreCase){
  45406. value = value.toLowerCase();
  45407. return function startIC(elem){
  45408. var attr = getAttributeValue(elem, name);
  45409. return attr != null && attr.substr(0, len).toLowerCase() === value && next(elem);
  45410. };
  45411. }
  45412. return function start(elem){
  45413. var attr = getAttributeValue(elem, name);
  45414. return attr != null && attr.substr(0, len) === value && next(elem);
  45415. };
  45416. },
  45417. end: function(next, data){
  45418. var name = data.name,
  45419. value = data.value,
  45420. len = -value.length;
  45421. if(len === 0){
  45422. return falseFunc;
  45423. }
  45424. if(data.ignoreCase){
  45425. value = value.toLowerCase();
  45426. return function endIC(elem){
  45427. var attr = getAttributeValue(elem, name);
  45428. return attr != null && attr.substr(len).toLowerCase() === value && next(elem);
  45429. };
  45430. }
  45431. return function end(elem){
  45432. var attr = getAttributeValue(elem, name);
  45433. return attr != null && attr.substr(len) === value && next(elem);
  45434. };
  45435. },
  45436. any: function(next, data){
  45437. var name = data.name,
  45438. value = data.value;
  45439. if(value === ""){
  45440. return falseFunc;
  45441. }
  45442. if(data.ignoreCase){
  45443. var regex = new RegExp(value.replace(reChars, "\\$&"), "i");
  45444. return function anyIC(elem){
  45445. var attr = getAttributeValue(elem, name);
  45446. return attr != null && regex.test(attr) && next(elem);
  45447. };
  45448. }
  45449. return function any(elem){
  45450. var attr = getAttributeValue(elem, name);
  45451. return attr != null && attr.indexOf(value) >= 0 && next(elem);
  45452. };
  45453. },
  45454. not: function(next, data){
  45455. var name = data.name,
  45456. value = data.value;
  45457. if(value === ""){
  45458. return function notEmpty(elem){
  45459. return !!getAttributeValue(elem, name) && next(elem);
  45460. };
  45461. } else if(data.ignoreCase){
  45462. value = value.toLowerCase();
  45463. return function notIC(elem){
  45464. var attr = getAttributeValue(elem, name);
  45465. return attr != null && attr.toLowerCase() !== value && next(elem);
  45466. };
  45467. }
  45468. return function not(elem){
  45469. return getAttributeValue(elem, name) !== value && next(elem);
  45470. };
  45471. }
  45472. };
  45473. module.exports = {
  45474. compile: function(next, data, options){
  45475. if(options && options.strict && (
  45476. data.ignoreCase || data.action === "not"
  45477. )) throw SyntaxError("Unsupported attribute selector");
  45478. return attributeRules[data.action](next, data);
  45479. },
  45480. rules: attributeRules
  45481. };
  45482. /***/ }),
  45483. /* 421 */
  45484. /***/ (function(module, exports) {
  45485. module.exports = {"universal":50,"tag":30,"attribute":1,"pseudo":0,"descendant":-1,"child":-1,"parent":-1,"sibling":-1,"adjacent":-1}
  45486. /***/ }),
  45487. /* 422 */
  45488. /***/ (function(module, exports, __webpack_require__) {
  45489. var baseAssignValue = __webpack_require__(164),
  45490. eq = __webpack_require__(67);
  45491. /**
  45492. * This function is like `assignValue` except that it doesn't assign
  45493. * `undefined` values.
  45494. *
  45495. * @private
  45496. * @param {Object} object The object to modify.
  45497. * @param {string} key The key of the property to assign.
  45498. * @param {*} value The value to assign.
  45499. */
  45500. function assignMergeValue(object, key, value) {
  45501. if ((value !== undefined && !eq(object[key], value)) ||
  45502. (value === undefined && !(key in object))) {
  45503. baseAssignValue(object, key, value);
  45504. }
  45505. }
  45506. module.exports = assignMergeValue;
  45507. /***/ }),
  45508. /* 423 */
  45509. /***/ (function(module, exports, __webpack_require__) {
  45510. var root = __webpack_require__(19);
  45511. /** Built-in value references. */
  45512. var Uint8Array = root.Uint8Array;
  45513. module.exports = Uint8Array;
  45514. /***/ }),
  45515. /* 424 */
  45516. /***/ (function(module, exports, __webpack_require__) {
  45517. var overArg = __webpack_require__(401);
  45518. /** Built-in value references. */
  45519. var getPrototype = overArg(Object.getPrototypeOf, Object);
  45520. module.exports = getPrototype;
  45521. /***/ }),
  45522. /* 425 */
  45523. /***/ (function(module, exports, __webpack_require__) {
  45524. var arraySome = __webpack_require__(426),
  45525. baseIteratee = __webpack_require__(50),
  45526. baseSome = __webpack_require__(790),
  45527. isArray = __webpack_require__(9),
  45528. isIterateeCall = __webpack_require__(122);
  45529. /**
  45530. * Checks if `predicate` returns truthy for **any** element of `collection`.
  45531. * Iteration is stopped once `predicate` returns truthy. The predicate is
  45532. * invoked with three arguments: (value, index|key, collection).
  45533. *
  45534. * @static
  45535. * @memberOf _
  45536. * @since 0.1.0
  45537. * @category Collection
  45538. * @param {Array|Object} collection The collection to iterate over.
  45539. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  45540. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  45541. * @returns {boolean} Returns `true` if any element passes the predicate check,
  45542. * else `false`.
  45543. * @example
  45544. *
  45545. * _.some([null, 0, 'yes', false], Boolean);
  45546. * // => true
  45547. *
  45548. * var users = [
  45549. * { 'user': 'barney', 'active': true },
  45550. * { 'user': 'fred', 'active': false }
  45551. * ];
  45552. *
  45553. * // The `_.matches` iteratee shorthand.
  45554. * _.some(users, { 'user': 'barney', 'active': false });
  45555. * // => false
  45556. *
  45557. * // The `_.matchesProperty` iteratee shorthand.
  45558. * _.some(users, ['active', false]);
  45559. * // => true
  45560. *
  45561. * // The `_.property` iteratee shorthand.
  45562. * _.some(users, 'active');
  45563. * // => true
  45564. */
  45565. function some(collection, predicate, guard) {
  45566. var func = isArray(collection) ? arraySome : baseSome;
  45567. if (guard && isIterateeCall(collection, predicate, guard)) {
  45568. predicate = undefined;
  45569. }
  45570. return func(collection, baseIteratee(predicate, 3));
  45571. }
  45572. module.exports = some;
  45573. /***/ }),
  45574. /* 426 */
  45575. /***/ (function(module, exports) {
  45576. /**
  45577. * A specialized version of `_.some` for arrays without support for iteratee
  45578. * shorthands.
  45579. *
  45580. * @private
  45581. * @param {Array} [array] The array to iterate over.
  45582. * @param {Function} predicate The function invoked per iteration.
  45583. * @returns {boolean} Returns `true` if any element passes the predicate check,
  45584. * else `false`.
  45585. */
  45586. function arraySome(array, predicate) {
  45587. var index = -1,
  45588. length = array == null ? 0 : array.length;
  45589. while (++index < length) {
  45590. if (predicate(array[index], index, array)) {
  45591. return true;
  45592. }
  45593. }
  45594. return false;
  45595. }
  45596. module.exports = arraySome;
  45597. /***/ }),
  45598. /* 427 */
  45599. /***/ (function(module, exports, __webpack_require__) {
  45600. var baseIsEqualDeep = __webpack_require__(760),
  45601. isObjectLike = __webpack_require__(26);
  45602. /**
  45603. * The base implementation of `_.isEqual` which supports partial comparisons
  45604. * and tracks traversed objects.
  45605. *
  45606. * @private
  45607. * @param {*} value The value to compare.
  45608. * @param {*} other The other value to compare.
  45609. * @param {boolean} bitmask The bitmask flags.
  45610. * 1 - Unordered comparison
  45611. * 2 - Partial comparison
  45612. * @param {Function} [customizer] The function to customize comparisons.
  45613. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  45614. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  45615. */
  45616. function baseIsEqual(value, other, bitmask, customizer, stack) {
  45617. if (value === other) {
  45618. return true;
  45619. }
  45620. if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
  45621. return value !== value && other !== other;
  45622. }
  45623. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  45624. }
  45625. module.exports = baseIsEqual;
  45626. /***/ }),
  45627. /* 428 */
  45628. /***/ (function(module, exports, __webpack_require__) {
  45629. var SetCache = __webpack_require__(761),
  45630. arraySome = __webpack_require__(426),
  45631. cacheHas = __webpack_require__(764);
  45632. /** Used to compose bitmasks for value comparisons. */
  45633. var COMPARE_PARTIAL_FLAG = 1,
  45634. COMPARE_UNORDERED_FLAG = 2;
  45635. /**
  45636. * A specialized version of `baseIsEqualDeep` for arrays with support for
  45637. * partial deep comparisons.
  45638. *
  45639. * @private
  45640. * @param {Array} array The array to compare.
  45641. * @param {Array} other The other array to compare.
  45642. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  45643. * @param {Function} customizer The function to customize comparisons.
  45644. * @param {Function} equalFunc The function to determine equivalents of values.
  45645. * @param {Object} stack Tracks traversed `array` and `other` objects.
  45646. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  45647. */
  45648. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  45649. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  45650. arrLength = array.length,
  45651. othLength = other.length;
  45652. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  45653. return false;
  45654. }
  45655. // Assume cyclic values are equal.
  45656. var stacked = stack.get(array);
  45657. if (stacked && stack.get(other)) {
  45658. return stacked == other;
  45659. }
  45660. var index = -1,
  45661. result = true,
  45662. seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
  45663. stack.set(array, other);
  45664. stack.set(other, array);
  45665. // Ignore non-index properties.
  45666. while (++index < arrLength) {
  45667. var arrValue = array[index],
  45668. othValue = other[index];
  45669. if (customizer) {
  45670. var compared = isPartial
  45671. ? customizer(othValue, arrValue, index, other, array, stack)
  45672. : customizer(arrValue, othValue, index, array, other, stack);
  45673. }
  45674. if (compared !== undefined) {
  45675. if (compared) {
  45676. continue;
  45677. }
  45678. result = false;
  45679. break;
  45680. }
  45681. // Recursively compare arrays (susceptible to call stack limits).
  45682. if (seen) {
  45683. if (!arraySome(other, function(othValue, othIndex) {
  45684. if (!cacheHas(seen, othIndex) &&
  45685. (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  45686. return seen.push(othIndex);
  45687. }
  45688. })) {
  45689. result = false;
  45690. break;
  45691. }
  45692. } else if (!(
  45693. arrValue === othValue ||
  45694. equalFunc(arrValue, othValue, bitmask, customizer, stack)
  45695. )) {
  45696. result = false;
  45697. break;
  45698. }
  45699. }
  45700. stack['delete'](array);
  45701. stack['delete'](other);
  45702. return result;
  45703. }
  45704. module.exports = equalArrays;
  45705. /***/ }),
  45706. /* 429 */
  45707. /***/ (function(module, exports) {
  45708. /**
  45709. * Appends the elements of `values` to `array`.
  45710. *
  45711. * @private
  45712. * @param {Array} array The array to modify.
  45713. * @param {Array} values The values to append.
  45714. * @returns {Array} Returns `array`.
  45715. */
  45716. function arrayPush(array, values) {
  45717. var index = -1,
  45718. length = values.length,
  45719. offset = array.length;
  45720. while (++index < length) {
  45721. array[offset + index] = values[index];
  45722. }
  45723. return array;
  45724. }
  45725. module.exports = arrayPush;
  45726. /***/ }),
  45727. /* 430 */
  45728. /***/ (function(module, exports, __webpack_require__) {
  45729. var isObject = __webpack_require__(25);
  45730. /**
  45731. * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  45732. *
  45733. * @private
  45734. * @param {*} value The value to check.
  45735. * @returns {boolean} Returns `true` if `value` if suitable for strict
  45736. * equality comparisons, else `false`.
  45737. */
  45738. function isStrictComparable(value) {
  45739. return value === value && !isObject(value);
  45740. }
  45741. module.exports = isStrictComparable;
  45742. /***/ }),
  45743. /* 431 */
  45744. /***/ (function(module, exports) {
  45745. /**
  45746. * A specialized version of `matchesProperty` for source values suitable
  45747. * for strict equality comparisons, i.e. `===`.
  45748. *
  45749. * @private
  45750. * @param {string} key The key of the property to get.
  45751. * @param {*} srcValue The value to match.
  45752. * @returns {Function} Returns the new spec function.
  45753. */
  45754. function matchesStrictComparable(key, srcValue) {
  45755. return function(object) {
  45756. if (object == null) {
  45757. return false;
  45758. }
  45759. return object[key] === srcValue &&
  45760. (srcValue !== undefined || (key in Object(object)));
  45761. };
  45762. }
  45763. module.exports = matchesStrictComparable;
  45764. /***/ }),
  45765. /* 432 */
  45766. /***/ (function(module, exports, __webpack_require__) {
  45767. var baseHasIn = __webpack_require__(785),
  45768. hasPath = __webpack_require__(786);
  45769. /**
  45770. * Checks if `path` is a direct or inherited property of `object`.
  45771. *
  45772. * @static
  45773. * @memberOf _
  45774. * @since 4.0.0
  45775. * @category Object
  45776. * @param {Object} object The object to query.
  45777. * @param {Array|string} path The path to check.
  45778. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  45779. * @example
  45780. *
  45781. * var object = _.create({ 'a': _.create({ 'b': 2 }) });
  45782. *
  45783. * _.hasIn(object, 'a');
  45784. * // => true
  45785. *
  45786. * _.hasIn(object, 'a.b');
  45787. * // => true
  45788. *
  45789. * _.hasIn(object, ['a', 'b']);
  45790. * // => true
  45791. *
  45792. * _.hasIn(object, 'b');
  45793. * // => false
  45794. */
  45795. function hasIn(object, path) {
  45796. return object != null && hasPath(object, path, baseHasIn);
  45797. }
  45798. module.exports = hasIn;
  45799. /***/ }),
  45800. /* 433 */
  45801. /***/ (function(module, exports, __webpack_require__) {
  45802. var baseEach = __webpack_require__(69);
  45803. /**
  45804. * The base implementation of `_.filter` without support for iteratee shorthands.
  45805. *
  45806. * @private
  45807. * @param {Array|Object} collection The collection to iterate over.
  45808. * @param {Function} predicate The function invoked per iteration.
  45809. * @returns {Array} Returns the new filtered array.
  45810. */
  45811. function baseFilter(collection, predicate) {
  45812. var result = [];
  45813. baseEach(collection, function(value, index, collection) {
  45814. if (predicate(value, index, collection)) {
  45815. result.push(value);
  45816. }
  45817. });
  45818. return result;
  45819. }
  45820. module.exports = baseFilter;
  45821. /***/ }),
  45822. /* 434 */
  45823. /***/ (function(module, exports, __webpack_require__) {
  45824. var baseFlatten = __webpack_require__(435);
  45825. /**
  45826. * Flattens `array` a single level deep.
  45827. *
  45828. * @static
  45829. * @memberOf _
  45830. * @since 0.1.0
  45831. * @category Array
  45832. * @param {Array} array The array to flatten.
  45833. * @returns {Array} Returns the new flattened array.
  45834. * @example
  45835. *
  45836. * _.flatten([1, [2, [3, [4]], 5]]);
  45837. * // => [1, 2, [3, [4]], 5]
  45838. */
  45839. function flatten(array) {
  45840. var length = array == null ? 0 : array.length;
  45841. return length ? baseFlatten(array, 1) : [];
  45842. }
  45843. module.exports = flatten;
  45844. /***/ }),
  45845. /* 435 */
  45846. /***/ (function(module, exports, __webpack_require__) {
  45847. var arrayPush = __webpack_require__(429),
  45848. isFlattenable = __webpack_require__(799);
  45849. /**
  45850. * The base implementation of `_.flatten` with support for restricting flattening.
  45851. *
  45852. * @private
  45853. * @param {Array} array The array to flatten.
  45854. * @param {number} depth The maximum recursion depth.
  45855. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
  45856. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
  45857. * @param {Array} [result=[]] The initial result value.
  45858. * @returns {Array} Returns the new flattened array.
  45859. */
  45860. function baseFlatten(array, depth, predicate, isStrict, result) {
  45861. var index = -1,
  45862. length = array.length;
  45863. predicate || (predicate = isFlattenable);
  45864. result || (result = []);
  45865. while (++index < length) {
  45866. var value = array[index];
  45867. if (depth > 0 && predicate(value)) {
  45868. if (depth > 1) {
  45869. // Recursively flatten arrays (susceptible to call stack limits).
  45870. baseFlatten(value, depth - 1, predicate, isStrict, result);
  45871. } else {
  45872. arrayPush(result, value);
  45873. }
  45874. } else if (!isStrict) {
  45875. result[result.length] = value;
  45876. }
  45877. }
  45878. return result;
  45879. }
  45880. module.exports = baseFlatten;
  45881. /***/ }),
  45882. /* 436 */
  45883. /***/ (function(module, exports, __webpack_require__) {
  45884. var baseEach = __webpack_require__(69),
  45885. isArrayLike = __webpack_require__(40);
  45886. /**
  45887. * The base implementation of `_.map` without support for iteratee shorthands.
  45888. *
  45889. * @private
  45890. * @param {Array|Object} collection The collection to iterate over.
  45891. * @param {Function} iteratee The function invoked per iteration.
  45892. * @returns {Array} Returns the new mapped array.
  45893. */
  45894. function baseMap(collection, iteratee) {
  45895. var index = -1,
  45896. result = isArrayLike(collection) ? Array(collection.length) : [];
  45897. baseEach(collection, function(value, key, collection) {
  45898. result[++index] = iteratee(value, key, collection);
  45899. });
  45900. return result;
  45901. }
  45902. module.exports = baseMap;
  45903. /***/ }),
  45904. /* 437 */
  45905. /***/ (function(module, exports, __webpack_require__) {
  45906. /**
  45907. * Used not to duplicate data.
  45908. *
  45909. * * `options` :
  45910. * - `keys` : List of keys used to check that two items are the same. By default it is set to `['id']'.
  45911. * - `index` : Return value returned by `cozy.data.defineIndex`, the default will correspond to all documents of the selected doctype.
  45912. * - `selector` : Mango request to get records. Default is built from the keys `{selector: {_id: {"$gt": null}}}` to get all the records.
  45913. *
  45914. * @module filterData
  45915. */
  45916. const bluebird = __webpack_require__(43)
  45917. const log = __webpack_require__(24).namespace('hydrateAndFilter')
  45918. const hydrateAndFilter = (entries, doctype, options = {}) => {
  45919. const cozy = __webpack_require__(51)
  45920. log('debug', String(entries.length), 'Number of items before hydrateAndFilter')
  45921. if (!doctype) return Promise.reject(new Error(`Doctype is mandatory to filter the connector data.`))
  45922. // expected options:
  45923. // - index : this is return value which returned by cozy.data.defineIndex, the default will
  45924. // correspond to all document of the selected doctype
  45925. // - selector : this the mango request : default one will be {selector: {_id: {"$gt": null}}} to
  45926. // get all the records
  45927. // - keys : this is the list of keys used to check that two items are the same
  45928. const keys = options.keys ? options.keys : ['_id']
  45929. const store = {}
  45930. log('debug', keys, 'keys')
  45931. const createHash = item => {
  45932. return keys.map(key => {
  45933. let result = item[key]
  45934. if (key === 'date') result = new Date(result)
  45935. return result
  45936. }).join('####')
  45937. }
  45938. const getIndex = () => {
  45939. const index = options.index ? options.index : cozy.data.defineIndex(doctype, keys)
  45940. return index
  45941. }
  45942. const getItems = index => {
  45943. log('debug', index, 'index')
  45944. const selector = options.selector ? options.selector : keys.reduce((memo, key) => {
  45945. memo[key] = {'$gt': null}
  45946. return memo
  45947. }, {})
  45948. log('debug', selector, 'selector')
  45949. return cozy.data.query(index, {selector})
  45950. }
  45951. const populateStore = store => dbitems => {
  45952. dbitems.forEach(dbitem => {
  45953. store[createHash(dbitem)] = dbitem
  45954. })
  45955. }
  45956. // We add _id to `entries` that we find in the database.
  45957. // This is useful when linking with bank operations (a bill
  45958. // can already be in the database but not already matched
  45959. // to an operation) since the linking operation need the _id
  45960. // of the entry
  45961. const hydrateExistingEntries = store => () => {
  45962. entries.forEach(entry => {
  45963. const key = createHash(entry)
  45964. if (store[key]) {
  45965. entry._id = store[key]._id
  45966. }
  45967. })
  45968. return entries
  45969. }
  45970. const filterEntries = store => () => {
  45971. // filter out existing items
  45972. return bluebird.filter(entries, entry => {
  45973. return !store[createHash(entry)]
  45974. })
  45975. }
  45976. const formatOutput = entries => {
  45977. log('debug', String(entries.length), 'Number of items after hydrateAndFilter')
  45978. // filter out wrong entries
  45979. return entries.filter(entry => entry)
  45980. }
  45981. return getIndex()
  45982. .then(getItems)
  45983. .then(populateStore(store))
  45984. .then(hydrateExistingEntries(store))
  45985. .then(filterEntries(store))
  45986. .then(formatOutput)
  45987. }
  45988. module.exports = hydrateAndFilter
  45989. /***/ }),
  45990. /* 438 */
  45991. /***/ (function(module, exports) {
  45992. module.exports = [["a140","",62],["a180","",32],["a240","",62],["a280","",32],["a2ab","",5],["a2e3","€"],["a2ef",""],["a2fd",""],["a340","",62],["a380","",31," "],["a440","",62],["a480","",32],["a4f4","",10],["a540","",62],["a580","",32],["a5f7","",7],["a640","",62],["a680","",32],["a6b9","",7],["a6d9","",6],["a6ec",""],["a6f3",""],["a6f6","",8],["a740","",62],["a780","",32],["a7c2","",14],["a7f2","",12],["a896","",10],["a8bc",""],["a8bf","ǹ"],["a8c1",""],["a8ea","",20],["a958",""],["a95b",""],["a95d",""],["a989","〾⿰",11],["a997","",12],["a9f0","",14],["aaa1","",93],["aba1","",93],["aca1","",93],["ada1","",93],["aea1","",93],["afa1","",93],["d7fa","",4],["f8a1","",93],["f9a1","",93],["faa1","",93],["fba1","",93],["fca1","",93],["fda1","",93],["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"],["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93]]
  45993. /***/ }),
  45994. /* 439 */
  45995. /***/ (function(module, exports) {
  45996. module.exports = [["0","\u0000",127],["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"],["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"],["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"],["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21],["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10],["a3a1","ㄐ",25,"˙ˉˊˇˋ"],["a3e1","€"],["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"],["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"],["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"],["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"],["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"],["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"],["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"],["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"],["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"],["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"],["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"],["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"],["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"],["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"],["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"],["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"],["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"],["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"],["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"],["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"],["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"],["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"],["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"],["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"],["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"],["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"],["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"],["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"],["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"],["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"],["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"],["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"],["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"],["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"],["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"],["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"],["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"],["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"],["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"],["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"],["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"],["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"],["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"],["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"],["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"],["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"],["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"],["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"],["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"],["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"],["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"],["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"],["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"],["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"],["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"],["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"],["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"],["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"],["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"],["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"],["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"],["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"],["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"],["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"],["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"],["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"],["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"],["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"],["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"],["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"],["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"],["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"],["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"],["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"],["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"],["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"],["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"],["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"],["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"],["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"],["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"],["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"],["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"],["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"],["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"],["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"],["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"],["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"],["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"],["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"],["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"],["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"],["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"],["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"],["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"],["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"],["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"],["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"],["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"],["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"],["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"],["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"],["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"],["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"],["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"],["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"],["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"],["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"],["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"],["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"],["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"],["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"],["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"],["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"],["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"],["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"],["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"],["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"],["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"],["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"],["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"],["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"],["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"],["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"],["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"],["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"],["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"],["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"],["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"],["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"],["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"],["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"],["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"],["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"],["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"],["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"],["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"],["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"],["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"],["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"],["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"],["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"],["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"],["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"],["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"],["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"],["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"],["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"],["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"],["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"],["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"],["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"],["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"],["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"],["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"],["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"],["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"],["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"],["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"],["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"],["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"],["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"],["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"],["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"],["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"],["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"],["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"]]
  45997. /***/ }),
  45998. /* 440 */
  45999. /***/ (function(module, exports, __webpack_require__) {
  46000. /**
  46001. * fetch-error.js
  46002. *
  46003. * FetchError interface for operational errors
  46004. */
  46005. module.exports = FetchError;
  46006. /**
  46007. * Create FetchError instance
  46008. *
  46009. * @param String message Error message for human
  46010. * @param String type Error type for machine
  46011. * @param String systemError For Node.js system error
  46012. * @return FetchError
  46013. */
  46014. function FetchError(message, type, systemError) {
  46015. this.name = this.constructor.name;
  46016. this.message = message;
  46017. this.type = type;
  46018. // when err.type is `system`, err.code contains system error code
  46019. if (systemError) {
  46020. this.code = this.errno = systemError.code;
  46021. }
  46022. // hide custom error implementation details from end-users
  46023. Error.captureStackTrace(this, this.constructor);
  46024. }
  46025. __webpack_require__(2).inherits(FetchError, Error);
  46026. /***/ }),
  46027. /* 441 */
  46028. /***/ (function(module, exports, __webpack_require__) {
  46029. module.exports = !__webpack_require__(22) && !__webpack_require__(13)(function () {
  46030. return Object.defineProperty(__webpack_require__(185)('div'), 'a', { get: function () { return 7; } }).a != 7;
  46031. });
  46032. /***/ }),
  46033. /* 442 */
  46034. /***/ (function(module, exports, __webpack_require__) {
  46035. "use strict";
  46036. var global = __webpack_require__(6);
  46037. var DESCRIPTORS = __webpack_require__(22);
  46038. var LIBRARY = __webpack_require__(70);
  46039. var $typed = __webpack_require__(186);
  46040. var hide = __webpack_require__(27);
  46041. var redefineAll = __webpack_require__(71);
  46042. var fails = __webpack_require__(13);
  46043. var anInstance = __webpack_require__(72);
  46044. var toInteger = __webpack_require__(55);
  46045. var toLength = __webpack_require__(20);
  46046. var toIndex = __webpack_require__(443);
  46047. var gOPN = __webpack_require__(98).f;
  46048. var dP = __webpack_require__(18).f;
  46049. var arrayFill = __webpack_require__(192);
  46050. var setToStringTag = __webpack_require__(74);
  46051. var ARRAY_BUFFER = 'ArrayBuffer';
  46052. var DATA_VIEW = 'DataView';
  46053. var PROTOTYPE = 'prototype';
  46054. var WRONG_LENGTH = 'Wrong length!';
  46055. var WRONG_INDEX = 'Wrong index!';
  46056. var $ArrayBuffer = global[ARRAY_BUFFER];
  46057. var $DataView = global[DATA_VIEW];
  46058. var Math = global.Math;
  46059. var RangeError = global.RangeError;
  46060. // eslint-disable-next-line no-shadow-restricted-names
  46061. var Infinity = global.Infinity;
  46062. var BaseBuffer = $ArrayBuffer;
  46063. var abs = Math.abs;
  46064. var pow = Math.pow;
  46065. var floor = Math.floor;
  46066. var log = Math.log;
  46067. var LN2 = Math.LN2;
  46068. var BUFFER = 'buffer';
  46069. var BYTE_LENGTH = 'byteLength';
  46070. var BYTE_OFFSET = 'byteOffset';
  46071. var $BUFFER = DESCRIPTORS ? '_b' : BUFFER;
  46072. var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;
  46073. var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
  46074. // IEEE754 conversions based on https://github.com/feross/ieee754
  46075. function packIEEE754(value, mLen, nBytes) {
  46076. var buffer = new Array(nBytes);
  46077. var eLen = nBytes * 8 - mLen - 1;
  46078. var eMax = (1 << eLen) - 1;
  46079. var eBias = eMax >> 1;
  46080. var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;
  46081. var i = 0;
  46082. var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
  46083. var e, m, c;
  46084. value = abs(value);
  46085. // eslint-disable-next-line no-self-compare
  46086. if (value != value || value === Infinity) {
  46087. // eslint-disable-next-line no-self-compare
  46088. m = value != value ? 1 : 0;
  46089. e = eMax;
  46090. } else {
  46091. e = floor(log(value) / LN2);
  46092. if (value * (c = pow(2, -e)) < 1) {
  46093. e--;
  46094. c *= 2;
  46095. }
  46096. if (e + eBias >= 1) {
  46097. value += rt / c;
  46098. } else {
  46099. value += rt * pow(2, 1 - eBias);
  46100. }
  46101. if (value * c >= 2) {
  46102. e++;
  46103. c /= 2;
  46104. }
  46105. if (e + eBias >= eMax) {
  46106. m = 0;
  46107. e = eMax;
  46108. } else if (e + eBias >= 1) {
  46109. m = (value * c - 1) * pow(2, mLen);
  46110. e = e + eBias;
  46111. } else {
  46112. m = value * pow(2, eBias - 1) * pow(2, mLen);
  46113. e = 0;
  46114. }
  46115. }
  46116. for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
  46117. e = e << mLen | m;
  46118. eLen += mLen;
  46119. for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
  46120. buffer[--i] |= s * 128;
  46121. return buffer;
  46122. }
  46123. function unpackIEEE754(buffer, mLen, nBytes) {
  46124. var eLen = nBytes * 8 - mLen - 1;
  46125. var eMax = (1 << eLen) - 1;
  46126. var eBias = eMax >> 1;
  46127. var nBits = eLen - 7;
  46128. var i = nBytes - 1;
  46129. var s = buffer[i--];
  46130. var e = s & 127;
  46131. var m;
  46132. s >>= 7;
  46133. for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
  46134. m = e & (1 << -nBits) - 1;
  46135. e >>= -nBits;
  46136. nBits += mLen;
  46137. for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
  46138. if (e === 0) {
  46139. e = 1 - eBias;
  46140. } else if (e === eMax) {
  46141. return m ? NaN : s ? -Infinity : Infinity;
  46142. } else {
  46143. m = m + pow(2, mLen);
  46144. e = e - eBias;
  46145. } return (s ? -1 : 1) * m * pow(2, e - mLen);
  46146. }
  46147. function unpackI32(bytes) {
  46148. return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
  46149. }
  46150. function packI8(it) {
  46151. return [it & 0xff];
  46152. }
  46153. function packI16(it) {
  46154. return [it & 0xff, it >> 8 & 0xff];
  46155. }
  46156. function packI32(it) {
  46157. return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
  46158. }
  46159. function packF64(it) {
  46160. return packIEEE754(it, 52, 8);
  46161. }
  46162. function packF32(it) {
  46163. return packIEEE754(it, 23, 4);
  46164. }
  46165. function addGetter(C, key, internal) {
  46166. dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });
  46167. }
  46168. function get(view, bytes, index, isLittleEndian) {
  46169. var numIndex = +index;
  46170. var intIndex = toIndex(numIndex);
  46171. if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
  46172. var store = view[$BUFFER]._b;
  46173. var start = intIndex + view[$OFFSET];
  46174. var pack = store.slice(start, start + bytes);
  46175. return isLittleEndian ? pack : pack.reverse();
  46176. }
  46177. function set(view, bytes, index, conversion, value, isLittleEndian) {
  46178. var numIndex = +index;
  46179. var intIndex = toIndex(numIndex);
  46180. if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
  46181. var store = view[$BUFFER]._b;
  46182. var start = intIndex + view[$OFFSET];
  46183. var pack = conversion(+value);
  46184. for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
  46185. }
  46186. if (!$typed.ABV) {
  46187. $ArrayBuffer = function ArrayBuffer(length) {
  46188. anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
  46189. var byteLength = toIndex(length);
  46190. this._b = arrayFill.call(new Array(byteLength), 0);
  46191. this[$LENGTH] = byteLength;
  46192. };
  46193. $DataView = function DataView(buffer, byteOffset, byteLength) {
  46194. anInstance(this, $DataView, DATA_VIEW);
  46195. anInstance(buffer, $ArrayBuffer, DATA_VIEW);
  46196. var bufferLength = buffer[$LENGTH];
  46197. var offset = toInteger(byteOffset);
  46198. if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');
  46199. byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
  46200. if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
  46201. this[$BUFFER] = buffer;
  46202. this[$OFFSET] = offset;
  46203. this[$LENGTH] = byteLength;
  46204. };
  46205. if (DESCRIPTORS) {
  46206. addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
  46207. addGetter($DataView, BUFFER, '_b');
  46208. addGetter($DataView, BYTE_LENGTH, '_l');
  46209. addGetter($DataView, BYTE_OFFSET, '_o');
  46210. }
  46211. redefineAll($DataView[PROTOTYPE], {
  46212. getInt8: function getInt8(byteOffset) {
  46213. return get(this, 1, byteOffset)[0] << 24 >> 24;
  46214. },
  46215. getUint8: function getUint8(byteOffset) {
  46216. return get(this, 1, byteOffset)[0];
  46217. },
  46218. getInt16: function getInt16(byteOffset /* , littleEndian */) {
  46219. var bytes = get(this, 2, byteOffset, arguments[1]);
  46220. return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
  46221. },
  46222. getUint16: function getUint16(byteOffset /* , littleEndian */) {
  46223. var bytes = get(this, 2, byteOffset, arguments[1]);
  46224. return bytes[1] << 8 | bytes[0];
  46225. },
  46226. getInt32: function getInt32(byteOffset /* , littleEndian */) {
  46227. return unpackI32(get(this, 4, byteOffset, arguments[1]));
  46228. },
  46229. getUint32: function getUint32(byteOffset /* , littleEndian */) {
  46230. return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
  46231. },
  46232. getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
  46233. return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
  46234. },
  46235. getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
  46236. return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
  46237. },
  46238. setInt8: function setInt8(byteOffset, value) {
  46239. set(this, 1, byteOffset, packI8, value);
  46240. },
  46241. setUint8: function setUint8(byteOffset, value) {
  46242. set(this, 1, byteOffset, packI8, value);
  46243. },
  46244. setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
  46245. set(this, 2, byteOffset, packI16, value, arguments[2]);
  46246. },
  46247. setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
  46248. set(this, 2, byteOffset, packI16, value, arguments[2]);
  46249. },
  46250. setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
  46251. set(this, 4, byteOffset, packI32, value, arguments[2]);
  46252. },
  46253. setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
  46254. set(this, 4, byteOffset, packI32, value, arguments[2]);
  46255. },
  46256. setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
  46257. set(this, 4, byteOffset, packF32, value, arguments[2]);
  46258. },
  46259. setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
  46260. set(this, 8, byteOffset, packF64, value, arguments[2]);
  46261. }
  46262. });
  46263. } else {
  46264. if (!fails(function () {
  46265. $ArrayBuffer(1);
  46266. }) || !fails(function () {
  46267. new $ArrayBuffer(-1); // eslint-disable-line no-new
  46268. }) || fails(function () {
  46269. new $ArrayBuffer(); // eslint-disable-line no-new
  46270. new $ArrayBuffer(1.5); // eslint-disable-line no-new
  46271. new $ArrayBuffer(NaN); // eslint-disable-line no-new
  46272. return $ArrayBuffer.name != ARRAY_BUFFER;
  46273. })) {
  46274. $ArrayBuffer = function ArrayBuffer(length) {
  46275. anInstance(this, $ArrayBuffer);
  46276. return new BaseBuffer(toIndex(length));
  46277. };
  46278. var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
  46279. for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {
  46280. if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);
  46281. }
  46282. if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;
  46283. }
  46284. // iOS Safari 7.x bug
  46285. var view = new $DataView(new $ArrayBuffer(2));
  46286. var $setInt8 = $DataView[PROTOTYPE].setInt8;
  46287. view.setInt8(0, 2147483648);
  46288. view.setInt8(1, 2147483649);
  46289. if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {
  46290. setInt8: function setInt8(byteOffset, value) {
  46291. $setInt8.call(this, byteOffset, value << 24 >> 24);
  46292. },
  46293. setUint8: function setUint8(byteOffset, value) {
  46294. $setInt8.call(this, byteOffset, value << 24 >> 24);
  46295. }
  46296. }, true);
  46297. }
  46298. setToStringTag($ArrayBuffer, ARRAY_BUFFER);
  46299. setToStringTag($DataView, DATA_VIEW);
  46300. hide($DataView[PROTOTYPE], $typed.VIEW, true);
  46301. exports[ARRAY_BUFFER] = $ArrayBuffer;
  46302. exports[DATA_VIEW] = $DataView;
  46303. /***/ }),
  46304. /* 443 */
  46305. /***/ (function(module, exports, __webpack_require__) {
  46306. // https://tc39.github.io/ecma262/#sec-toindex
  46307. var toInteger = __webpack_require__(55);
  46308. var toLength = __webpack_require__(20);
  46309. module.exports = function (it) {
  46310. if (it === undefined) return 0;
  46311. var number = toInteger(it);
  46312. var length = toLength(number);
  46313. if (number !== length) throw RangeError('Wrong length!');
  46314. return length;
  46315. };
  46316. /***/ }),
  46317. /* 444 */
  46318. /***/ (function(module, exports, __webpack_require__) {
  46319. var has = __webpack_require__(23);
  46320. var toIObject = __webpack_require__(35);
  46321. var arrayIndexOf = __webpack_require__(188)(false);
  46322. var IE_PROTO = __webpack_require__(189)('IE_PROTO');
  46323. module.exports = function (object, names) {
  46324. var O = toIObject(object);
  46325. var i = 0;
  46326. var result = [];
  46327. var key;
  46328. for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
  46329. // Don't enum bug & hidden keys
  46330. while (names.length > i) if (has(O, key = names[i++])) {
  46331. ~arrayIndexOf(result, key) || result.push(key);
  46332. }
  46333. return result;
  46334. };
  46335. /***/ }),
  46336. /* 445 */
  46337. /***/ (function(module, exports, __webpack_require__) {
  46338. var document = __webpack_require__(6).document;
  46339. module.exports = document && document.documentElement;
  46340. /***/ }),
  46341. /* 446 */
  46342. /***/ (function(module, exports, __webpack_require__) {
  46343. // 7.2.2 IsArray(argument)
  46344. var cof = __webpack_require__(73);
  46345. module.exports = Array.isArray || function isArray(arg) {
  46346. return cof(arg) == 'Array';
  46347. };
  46348. /***/ }),
  46349. /* 447 */
  46350. /***/ (function(module, exports, __webpack_require__) {
  46351. // 7.3.20 SpeciesConstructor(O, defaultConstructor)
  46352. var anObject = __webpack_require__(7);
  46353. var aFunction = __webpack_require__(54);
  46354. var SPECIES = __webpack_require__(11)('species');
  46355. module.exports = function (O, D) {
  46356. var C = anObject(O).constructor;
  46357. var S;
  46358. return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
  46359. };
  46360. /***/ }),
  46361. /* 448 */
  46362. /***/ (function(module, exports) {
  46363. module.exports = function (done, value) {
  46364. return { value: value, done: !!done };
  46365. };
  46366. /***/ }),
  46367. /* 449 */
  46368. /***/ (function(module, exports, __webpack_require__) {
  46369. "use strict";
  46370. var LIBRARY = __webpack_require__(70);
  46371. var $export = __webpack_require__(1);
  46372. var redefine = __webpack_require__(41);
  46373. var hide = __webpack_require__(27);
  46374. var has = __webpack_require__(23);
  46375. var Iterators = __webpack_require__(75);
  46376. var $iterCreate = __webpack_require__(841);
  46377. var setToStringTag = __webpack_require__(74);
  46378. var getPrototypeOf = __webpack_require__(101);
  46379. var ITERATOR = __webpack_require__(11)('iterator');
  46380. var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
  46381. var FF_ITERATOR = '@@iterator';
  46382. var KEYS = 'keys';
  46383. var VALUES = 'values';
  46384. var returnThis = function () { return this; };
  46385. module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  46386. $iterCreate(Constructor, NAME, next);
  46387. var getMethod = function (kind) {
  46388. if (!BUGGY && kind in proto) return proto[kind];
  46389. switch (kind) {
  46390. case KEYS: return function keys() { return new Constructor(this, kind); };
  46391. case VALUES: return function values() { return new Constructor(this, kind); };
  46392. } return function entries() { return new Constructor(this, kind); };
  46393. };
  46394. var TAG = NAME + ' Iterator';
  46395. var DEF_VALUES = DEFAULT == VALUES;
  46396. var VALUES_BUG = false;
  46397. var proto = Base.prototype;
  46398. var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
  46399. var $default = (!BUGGY && $native) || getMethod(DEFAULT);
  46400. var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
  46401. var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
  46402. var methods, key, IteratorPrototype;
  46403. // Fix native
  46404. if ($anyNative) {
  46405. IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
  46406. if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
  46407. // Set @@toStringTag to native iterators
  46408. setToStringTag(IteratorPrototype, TAG, true);
  46409. // fix for some old engines
  46410. if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
  46411. }
  46412. }
  46413. // fix Array#{values, @@iterator}.name in V8 / FF
  46414. if (DEF_VALUES && $native && $native.name !== VALUES) {
  46415. VALUES_BUG = true;
  46416. $default = function values() { return $native.call(this); };
  46417. }
  46418. // Define iterator
  46419. if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
  46420. hide(proto, ITERATOR, $default);
  46421. }
  46422. // Plug for library
  46423. Iterators[NAME] = $default;
  46424. Iterators[TAG] = returnThis;
  46425. if (DEFAULT) {
  46426. methods = {
  46427. values: DEF_VALUES ? $default : getMethod(VALUES),
  46428. keys: IS_SET ? $default : getMethod(KEYS),
  46429. entries: $entries
  46430. };
  46431. if (FORCED) for (key in methods) {
  46432. if (!(key in proto)) redefine(proto, key, methods[key]);
  46433. } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  46434. }
  46435. return methods;
  46436. };
  46437. /***/ }),
  46438. /* 450 */
  46439. /***/ (function(module, exports, __webpack_require__) {
  46440. "use strict";
  46441. // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
  46442. var toObject = __webpack_require__(57);
  46443. var toAbsoluteIndex = __webpack_require__(99);
  46444. var toLength = __webpack_require__(20);
  46445. module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
  46446. var O = toObject(this);
  46447. var len = toLength(O.length);
  46448. var to = toAbsoluteIndex(target, len);
  46449. var from = toAbsoluteIndex(start, len);
  46450. var end = arguments.length > 2 ? arguments[2] : undefined;
  46451. var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
  46452. var inc = 1;
  46453. if (from < to && to < from + count) {
  46454. inc = -1;
  46455. from += count - 1;
  46456. to += count - 1;
  46457. }
  46458. while (count-- > 0) {
  46459. if (from in O) O[to] = O[from];
  46460. else delete O[to];
  46461. to += inc;
  46462. from += inc;
  46463. } return O;
  46464. };
  46465. /***/ }),
  46466. /* 451 */
  46467. /***/ (function(module, exports, __webpack_require__) {
  46468. "use strict";
  46469. var dP = __webpack_require__(18).f;
  46470. var create = __webpack_require__(100);
  46471. var redefineAll = __webpack_require__(71);
  46472. var ctx = __webpack_require__(34);
  46473. var anInstance = __webpack_require__(72);
  46474. var forOf = __webpack_require__(137);
  46475. var $iterDefine = __webpack_require__(449);
  46476. var step = __webpack_require__(448);
  46477. var setSpecies = __webpack_require__(197);
  46478. var DESCRIPTORS = __webpack_require__(22);
  46479. var fastKey = __webpack_require__(104).fastKey;
  46480. var validate = __webpack_require__(78);
  46481. var SIZE = DESCRIPTORS ? '_s' : 'size';
  46482. var getEntry = function (that, key) {
  46483. // fast case
  46484. var index = fastKey(key);
  46485. var entry;
  46486. if (index !== 'F') return that._i[index];
  46487. // frozen object case
  46488. for (entry = that._f; entry; entry = entry.n) {
  46489. if (entry.k == key) return entry;
  46490. }
  46491. };
  46492. module.exports = {
  46493. getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
  46494. var C = wrapper(function (that, iterable) {
  46495. anInstance(that, C, NAME, '_i');
  46496. that._t = NAME; // collection type
  46497. that._i = create(null); // index
  46498. that._f = undefined; // first entry
  46499. that._l = undefined; // last entry
  46500. that[SIZE] = 0; // size
  46501. if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
  46502. });
  46503. redefineAll(C.prototype, {
  46504. // 23.1.3.1 Map.prototype.clear()
  46505. // 23.2.3.2 Set.prototype.clear()
  46506. clear: function clear() {
  46507. for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
  46508. entry.r = true;
  46509. if (entry.p) entry.p = entry.p.n = undefined;
  46510. delete data[entry.i];
  46511. }
  46512. that._f = that._l = undefined;
  46513. that[SIZE] = 0;
  46514. },
  46515. // 23.1.3.3 Map.prototype.delete(key)
  46516. // 23.2.3.4 Set.prototype.delete(value)
  46517. 'delete': function (key) {
  46518. var that = validate(this, NAME);
  46519. var entry = getEntry(that, key);
  46520. if (entry) {
  46521. var next = entry.n;
  46522. var prev = entry.p;
  46523. delete that._i[entry.i];
  46524. entry.r = true;
  46525. if (prev) prev.n = next;
  46526. if (next) next.p = prev;
  46527. if (that._f == entry) that._f = next;
  46528. if (that._l == entry) that._l = prev;
  46529. that[SIZE]--;
  46530. } return !!entry;
  46531. },
  46532. // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
  46533. // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
  46534. forEach: function forEach(callbackfn /* , that = undefined */) {
  46535. validate(this, NAME);
  46536. var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
  46537. var entry;
  46538. while (entry = entry ? entry.n : this._f) {
  46539. f(entry.v, entry.k, this);
  46540. // revert to the last existing entry
  46541. while (entry && entry.r) entry = entry.p;
  46542. }
  46543. },
  46544. // 23.1.3.7 Map.prototype.has(key)
  46545. // 23.2.3.7 Set.prototype.has(value)
  46546. has: function has(key) {
  46547. return !!getEntry(validate(this, NAME), key);
  46548. }
  46549. });
  46550. if (DESCRIPTORS) dP(C.prototype, 'size', {
  46551. get: function () {
  46552. return validate(this, NAME)[SIZE];
  46553. }
  46554. });
  46555. return C;
  46556. },
  46557. def: function (that, key, value) {
  46558. var entry = getEntry(that, key);
  46559. var prev, index;
  46560. // change existing entry
  46561. if (entry) {
  46562. entry.v = value;
  46563. // create new entry
  46564. } else {
  46565. that._l = entry = {
  46566. i: index = fastKey(key, true), // <- index
  46567. k: key, // <- key
  46568. v: value, // <- value
  46569. p: prev = that._l, // <- previous entry
  46570. n: undefined, // <- next entry
  46571. r: false // <- removed
  46572. };
  46573. if (!that._f) that._f = entry;
  46574. if (prev) prev.n = entry;
  46575. that[SIZE]++;
  46576. // add to index
  46577. if (index !== 'F') that._i[index] = entry;
  46578. } return that;
  46579. },
  46580. getEntry: getEntry,
  46581. setStrong: function (C, NAME, IS_MAP) {
  46582. // add .keys, .values, .entries, [@@iterator]
  46583. // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
  46584. $iterDefine(C, NAME, function (iterated, kind) {
  46585. this._t = validate(iterated, NAME); // target
  46586. this._k = kind; // kind
  46587. this._l = undefined; // previous
  46588. }, function () {
  46589. var that = this;
  46590. var kind = that._k;
  46591. var entry = that._l;
  46592. // revert to the last existing entry
  46593. while (entry && entry.r) entry = entry.p;
  46594. // get next entry
  46595. if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
  46596. // or finish the iteration
  46597. that._t = undefined;
  46598. return step(1);
  46599. }
  46600. // return step by kind
  46601. if (kind == 'keys') return step(0, entry.k);
  46602. if (kind == 'values') return step(0, entry.v);
  46603. return step(0, [entry.k, entry.v]);
  46604. }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
  46605. // add [@@species], 23.1.2.2, 23.2.2.2
  46606. setSpecies(NAME);
  46607. }
  46608. };
  46609. /***/ }),
  46610. /* 452 */
  46611. /***/ (function(module, exports, __webpack_require__) {
  46612. // call something on iterator step with safe closing on error
  46613. var anObject = __webpack_require__(7);
  46614. module.exports = function (iterator, fn, value, entries) {
  46615. try {
  46616. return entries ? fn(anObject(value)[0], value[1]) : fn(value);
  46617. // 7.4.6 IteratorClose(iterator, completion)
  46618. } catch (e) {
  46619. var ret = iterator['return'];
  46620. if (ret !== undefined) anObject(ret.call(iterator));
  46621. throw e;
  46622. }
  46623. };
  46624. /***/ }),
  46625. /* 453 */
  46626. /***/ (function(module, exports, __webpack_require__) {
  46627. "use strict";
  46628. // 19.1.2.1 Object.assign(target, source, ...)
  46629. var getKeys = __webpack_require__(76);
  46630. var gOPS = __webpack_require__(139);
  46631. var pIE = __webpack_require__(103);
  46632. var toObject = __webpack_require__(57);
  46633. var IObject = __webpack_require__(187);
  46634. var $assign = Object.assign;
  46635. // should work with symbols and should have deterministic property order (V8 bug)
  46636. module.exports = !$assign || __webpack_require__(13)(function () {
  46637. var A = {};
  46638. var B = {};
  46639. // eslint-disable-next-line no-undef
  46640. var S = Symbol();
  46641. var K = 'abcdefghijklmnopqrst';
  46642. A[S] = 7;
  46643. K.split('').forEach(function (k) { B[k] = k; });
  46644. return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
  46645. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  46646. var T = toObject(target);
  46647. var aLen = arguments.length;
  46648. var index = 1;
  46649. var getSymbols = gOPS.f;
  46650. var isEnum = pIE.f;
  46651. while (aLen > index) {
  46652. var S = IObject(arguments[index++]);
  46653. var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
  46654. var length = keys.length;
  46655. var j = 0;
  46656. var key;
  46657. while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
  46658. } return T;
  46659. } : $assign;
  46660. /***/ }),
  46661. /* 454 */
  46662. /***/ (function(module, exports, __webpack_require__) {
  46663. "use strict";
  46664. var redefineAll = __webpack_require__(71);
  46665. var getWeak = __webpack_require__(104).getWeak;
  46666. var anObject = __webpack_require__(7);
  46667. var isObject = __webpack_require__(8);
  46668. var anInstance = __webpack_require__(72);
  46669. var forOf = __webpack_require__(137);
  46670. var createArrayMethod = __webpack_require__(102);
  46671. var $has = __webpack_require__(23);
  46672. var validate = __webpack_require__(78);
  46673. var arrayFind = createArrayMethod(5);
  46674. var arrayFindIndex = createArrayMethod(6);
  46675. var id = 0;
  46676. // fallback for uncaught frozen keys
  46677. var uncaughtFrozenStore = function (that) {
  46678. return that._l || (that._l = new UncaughtFrozenStore());
  46679. };
  46680. var UncaughtFrozenStore = function () {
  46681. this.a = [];
  46682. };
  46683. var findUncaughtFrozen = function (store, key) {
  46684. return arrayFind(store.a, function (it) {
  46685. return it[0] === key;
  46686. });
  46687. };
  46688. UncaughtFrozenStore.prototype = {
  46689. get: function (key) {
  46690. var entry = findUncaughtFrozen(this, key);
  46691. if (entry) return entry[1];
  46692. },
  46693. has: function (key) {
  46694. return !!findUncaughtFrozen(this, key);
  46695. },
  46696. set: function (key, value) {
  46697. var entry = findUncaughtFrozen(this, key);
  46698. if (entry) entry[1] = value;
  46699. else this.a.push([key, value]);
  46700. },
  46701. 'delete': function (key) {
  46702. var index = arrayFindIndex(this.a, function (it) {
  46703. return it[0] === key;
  46704. });
  46705. if (~index) this.a.splice(index, 1);
  46706. return !!~index;
  46707. }
  46708. };
  46709. module.exports = {
  46710. getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
  46711. var C = wrapper(function (that, iterable) {
  46712. anInstance(that, C, NAME, '_i');
  46713. that._t = NAME; // collection type
  46714. that._i = id++; // collection id
  46715. that._l = undefined; // leak store for uncaught frozen objects
  46716. if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
  46717. });
  46718. redefineAll(C.prototype, {
  46719. // 23.3.3.2 WeakMap.prototype.delete(key)
  46720. // 23.4.3.3 WeakSet.prototype.delete(value)
  46721. 'delete': function (key) {
  46722. if (!isObject(key)) return false;
  46723. var data = getWeak(key);
  46724. if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);
  46725. return data && $has(data, this._i) && delete data[this._i];
  46726. },
  46727. // 23.3.3.4 WeakMap.prototype.has(key)
  46728. // 23.4.3.4 WeakSet.prototype.has(value)
  46729. has: function has(key) {
  46730. if (!isObject(key)) return false;
  46731. var data = getWeak(key);
  46732. if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);
  46733. return data && $has(data, this._i);
  46734. }
  46735. });
  46736. return C;
  46737. },
  46738. def: function (that, key, value) {
  46739. var data = getWeak(anObject(key), true);
  46740. if (data === true) uncaughtFrozenStore(that).set(key, value);
  46741. else data[that._i] = value;
  46742. return that;
  46743. },
  46744. ufstore: uncaughtFrozenStore
  46745. };
  46746. /***/ }),
  46747. /* 455 */
  46748. /***/ (function(module, exports) {
  46749. // fast apply, http://jsperf.lnkit.com/fast-apply/5
  46750. module.exports = function (fn, args, that) {
  46751. var un = that === undefined;
  46752. switch (args.length) {
  46753. case 0: return un ? fn()
  46754. : fn.call(that);
  46755. case 1: return un ? fn(args[0])
  46756. : fn.call(that, args[0]);
  46757. case 2: return un ? fn(args[0], args[1])
  46758. : fn.call(that, args[0], args[1]);
  46759. case 3: return un ? fn(args[0], args[1], args[2])
  46760. : fn.call(that, args[0], args[1], args[2]);
  46761. case 4: return un ? fn(args[0], args[1], args[2], args[3])
  46762. : fn.call(that, args[0], args[1], args[2], args[3]);
  46763. } return fn.apply(that, args);
  46764. };
  46765. /***/ }),
  46766. /* 456 */
  46767. /***/ (function(module, exports, __webpack_require__) {
  46768. // all object keys, includes non-enumerable and symbols
  46769. var gOPN = __webpack_require__(98);
  46770. var gOPS = __webpack_require__(139);
  46771. var anObject = __webpack_require__(7);
  46772. var Reflect = __webpack_require__(6).Reflect;
  46773. module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
  46774. var keys = gOPN.f(anObject(it));
  46775. var getSymbols = gOPS.f;
  46776. return getSymbols ? keys.concat(getSymbols(it)) : keys;
  46777. };
  46778. /***/ }),
  46779. /* 457 */
  46780. /***/ (function(module, exports, __webpack_require__) {
  46781. "use strict";
  46782. // 25.4.1.5 NewPromiseCapability(C)
  46783. var aFunction = __webpack_require__(54);
  46784. function PromiseCapability(C) {
  46785. var resolve, reject;
  46786. this.promise = new C(function ($$resolve, $$reject) {
  46787. if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
  46788. resolve = $$resolve;
  46789. reject = $$reject;
  46790. });
  46791. this.resolve = aFunction(resolve);
  46792. this.reject = aFunction(reject);
  46793. }
  46794. module.exports.f = function (C) {
  46795. return new PromiseCapability(C);
  46796. };
  46797. /***/ }),
  46798. /* 458 */
  46799. /***/ (function(module, exports, __webpack_require__) {
  46800. exports.f = __webpack_require__(11);
  46801. /***/ }),
  46802. /* 459 */
  46803. /***/ (function(module, exports, __webpack_require__) {
  46804. "use strict";
  46805. var toInteger = __webpack_require__(55);
  46806. var defined = __webpack_require__(56);
  46807. module.exports = function repeat(count) {
  46808. var str = String(defined(this));
  46809. var res = '';
  46810. var n = toInteger(count);
  46811. if (n < 0 || n == Infinity) throw RangeError("Count can't be negative");
  46812. for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str;
  46813. return res;
  46814. };
  46815. /***/ }),
  46816. /* 460 */
  46817. /***/ (function(module, exports, __webpack_require__) {
  46818. // 7.2.8 IsRegExp(argument)
  46819. var isObject = __webpack_require__(8);
  46820. var cof = __webpack_require__(73);
  46821. var MATCH = __webpack_require__(11)('match');
  46822. module.exports = function (it) {
  46823. var isRegExp;
  46824. return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
  46825. };
  46826. /***/ }),
  46827. /* 461 */
  46828. /***/ (function(module, exports, __webpack_require__) {
  46829. // 20.1.2.3 Number.isInteger(number)
  46830. var isObject = __webpack_require__(8);
  46831. var floor = Math.floor;
  46832. module.exports = function isInteger(it) {
  46833. return !isObject(it) && isFinite(it) && floor(it) === it;
  46834. };
  46835. /***/ }),
  46836. /* 462 */
  46837. /***/ (function(module, exports) {
  46838. // 20.2.2.20 Math.log1p(x)
  46839. module.exports = Math.log1p || function log1p(x) {
  46840. return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
  46841. };
  46842. /***/ }),
  46843. /* 463 */
  46844. /***/ (function(module, exports, __webpack_require__) {
  46845. var getKeys = __webpack_require__(76);
  46846. var toIObject = __webpack_require__(35);
  46847. var isEnum = __webpack_require__(103).f;
  46848. module.exports = function (isEntries) {
  46849. return function (it) {
  46850. var O = toIObject(it);
  46851. var keys = getKeys(O);
  46852. var length = keys.length;
  46853. var i = 0;
  46854. var result = [];
  46855. var key;
  46856. while (length > i) if (isEnum.call(O, key = keys[i++])) {
  46857. result.push(isEntries ? [key, O[key]] : O[key]);
  46858. } return result;
  46859. };
  46860. };
  46861. /***/ }),
  46862. /* 464 */
  46863. /***/ (function(module, exports, __webpack_require__) {
  46864. // https://github.com/tc39/proposal-string-pad-start-end
  46865. var toLength = __webpack_require__(20);
  46866. var repeat = __webpack_require__(459);
  46867. var defined = __webpack_require__(56);
  46868. module.exports = function (that, maxLength, fillString, left) {
  46869. var S = String(defined(that));
  46870. var stringLength = S.length;
  46871. var fillStr = fillString === undefined ? ' ' : String(fillString);
  46872. var intMaxLength = toLength(maxLength);
  46873. if (intMaxLength <= stringLength || fillStr == '') return S;
  46874. var fillLen = intMaxLength - stringLength;
  46875. var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
  46876. if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);
  46877. return left ? stringFiller + S : S + stringFiller;
  46878. };
  46879. /***/ }),
  46880. /* 465 */
  46881. /***/ (function(module, exports, __webpack_require__) {
  46882. "use strict";
  46883. var crypto = __webpack_require__(5);
  46884. function sha1(bytes) {
  46885. if (typeof Buffer.from === 'function') {
  46886. // Modern Buffer API
  46887. if (Array.isArray(bytes)) {
  46888. bytes = Buffer.from(bytes);
  46889. } else if (typeof bytes === 'string') {
  46890. bytes = Buffer.from(bytes, 'utf8');
  46891. }
  46892. } else {
  46893. // Pre-v4 Buffer API
  46894. if (Array.isArray(bytes)) {
  46895. bytes = new Buffer(bytes);
  46896. } else if (typeof bytes === 'string') {
  46897. bytes = new Buffer(bytes, 'utf8');
  46898. }
  46899. }
  46900. return crypto.createHash('sha1').update(bytes).digest();
  46901. }
  46902. module.exports = sha1;
  46903. /***/ }),
  46904. /* 466 */
  46905. /***/ (function(module, exports) {
  46906. function webpackEmptyContext(req) {
  46907. throw new Error("Cannot find module '" + req + "'.");
  46908. }
  46909. webpackEmptyContext.keys = function() { return []; };
  46910. webpackEmptyContext.resolve = webpackEmptyContext;
  46911. module.exports = webpackEmptyContext;
  46912. webpackEmptyContext.id = 466;
  46913. /***/ }),
  46914. /* 467 */
  46915. /***/ (function(module, exports, __webpack_require__) {
  46916. /**
  46917. * The goal of this function is to save the given files in the given folder via the Cozy API.
  46918. *
  46919. * - `files` is an array of `{ fileurl, filename }` :
  46920. *
  46921. * + fileurl: The url of the file. This attribute is mandatory or
  46922. * this item will be ignored
  46923. * + filename : The file name of the item written on disk. This attribute is optional and as default value, the
  46924. * file name will be "smartly" guessed by the function. Use this attribute if the guess is not smart
  46925. * enough for you.
  46926. *
  46927. * - `folderPath` (string) is relative to the main path given by the `cozy-collect` application to the connector. If the connector is run
  46928. * in standalone mode, the main path is the path of the connector.
  46929. *
  46930. * - `options` (object) is optional. Possible options :
  46931. *
  46932. * + `timeout` (timestamp) can be used if your connector
  46933. * needs to fetch a lot of files and if the the stack does not give enough time to your connector to
  46934. * fetch it all. It could happen that the connector is stopped right in the middle of the download of
  46935. * the file and the file will be broken. With the `timeout` option, the `saveFiles` function will check
  46936. * if the timeout has passed right after downloading each file and then will be sure to be stopped
  46937. * cleanly if the timeout is not too long. And since it is really fast to check that a file has
  46938. * already been downloaded, on the next run of the connector, it will be able to download some more
  46939. * files, and so on. If you want the timeout to be in 10s, do `Date.now() + 10*1000`. You can try it in the previous code.
  46940. *
  46941. * @module saveFiles
  46942. */
  46943. const bluebird = __webpack_require__(43)
  46944. const path = __webpack_require__(60)
  46945. const request = __webpack_require__(331)
  46946. const rq = request({
  46947. json: false,
  46948. headers: {
  46949. 'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0'
  46950. }
  46951. })
  46952. const log = __webpack_require__(24).namespace('saveFiles')
  46953. const cozy = __webpack_require__(51)
  46954. const mimetypes = __webpack_require__(111)
  46955. const errors = __webpack_require__(206)
  46956. const sanitizeEntry = function (entry) {
  46957. delete entry.requestOptions
  46958. return entry
  46959. }
  46960. const downloadEntry = function (entry, options) {
  46961. const reqOptions = Object.assign({
  46962. uri: entry.fileurl,
  46963. method: 'GET',
  46964. jar: true
  46965. }, entry.requestOptions)
  46966. return cozy.files
  46967. .statByPath(options.folderPath)
  46968. .then(folder => {
  46969. let filePromise = rq(reqOptions)
  46970. const createFileOptions = {
  46971. name: getFileName(entry),
  46972. dirID: folder._id,
  46973. contentType: options.contentType
  46974. }
  46975. // we have to do this since the result of filePromise is not a stream and cannot be taken by
  46976. // cozy.files.create
  46977. if (options.postProcessFile) {
  46978. return filePromise
  46979. .then(data => options.postProcessFile(data))
  46980. .then(data => cozy.files.create(data, createFileOptions))
  46981. }
  46982. return cozy.files.create(filePromise, createFileOptions)
  46983. })
  46984. .then(fileDocument => {
  46985. // This allows us to have the warning message at the first run
  46986. checkMimeWithPath(fileDocument.attributes.mime, fileDocument.attributes.name)
  46987. checkFileSize(fileDocument)
  46988. return fileDocument
  46989. })
  46990. }
  46991. const attachFileToEntry = function (entry, fileDocument) {
  46992. entry.fileDocument = fileDocument
  46993. return entry
  46994. }
  46995. const saveEntry = function (entry, options) {
  46996. if (!entry.fileurl && !entry.requestOptions) return entry
  46997. if (options.timeout && Date.now() > options.timeout) {
  46998. const remainingTime = Math.floor((options.timeout - Date.now()) / 1000)
  46999. log('info', `${remainingTime}s timeout finished for ${options.folderPath}`)
  47000. throw new Error('TIMEOUT')
  47001. }
  47002. const filepath = path.join(options.folderPath, getFileName(entry))
  47003. return cozy.files
  47004. .statByPath(filepath)
  47005. .then(file => {
  47006. // check that the extension and mime type of the existing file in cozy match
  47007. // if this is not the case, we redownload it
  47008. const mime = file.attributes.mime
  47009. if (!checkMimeWithPath(mime, filepath) || !checkFileSize(file)) {
  47010. return cozy.files.trashById(file._id)
  47011. .then(() => Promise.reject(new Error('BAD_DOWNLOADED_FILE')))
  47012. }
  47013. return file
  47014. })
  47015. .then(file => {
  47016. return file
  47017. }, () => {
  47018. log('debug', entry)
  47019. log('debug', `File ${filepath} does not exist yet or is not valid`)
  47020. return downloadEntry(entry, options)
  47021. })
  47022. .then(file => {
  47023. attachFileToEntry(entry, file)
  47024. return entry
  47025. })
  47026. .then(sanitizeEntry)
  47027. .then(entry => {
  47028. return options.postProcess ? options.postProcess(entry) : entry
  47029. })
  47030. .catch(err => {
  47031. log('warn', errors.FILE_DOWNLOAD_FAILED)
  47032. log('warn', err.message, `Error caught while trying to save the file ${entry.fileurl}`)
  47033. return entry
  47034. })
  47035. }
  47036. // Saves the files given in the fileurl attribute of each entries
  47037. module.exports = (entries, fields, options = {}) => {
  47038. if (typeof fields !== 'object') {
  47039. log(
  47040. 'debug',
  47041. 'Deprecation warning, saveFiles 2nd argument should not be a string'
  47042. )
  47043. fields = {
  47044. folderPath: fields
  47045. }
  47046. }
  47047. const saveOptions = {
  47048. folderPath: fields.folderPath,
  47049. timeout: options.timeout,
  47050. postProcess: options.postProcess,
  47051. postProcessFile: options.postProcessFile,
  47052. contentType: options.contentType
  47053. }
  47054. return bluebird
  47055. .mapSeries(entries, entry => saveEntry(entry, saveOptions))
  47056. .catch(err => {
  47057. // do not count TIMEOUT error as an error outside
  47058. if (err.message !== 'TIMEOUT') throw err
  47059. })
  47060. }
  47061. function getFileName (entry) {
  47062. let filename
  47063. if (entry.filename) {
  47064. filename = entry.filename
  47065. } else {
  47066. // try to get the file name from the url
  47067. const parsed = __webpack_require__(14).parse(entry.fileurl)
  47068. filename = path.basename(parsed.pathname)
  47069. }
  47070. return sanitizeFileName(filename)
  47071. }
  47072. function sanitizeFileName (filename) {
  47073. return filename.replace(/^\.+$/, '').replace(/[/?<>\\:*|":]/g, '')
  47074. }
  47075. function checkFileSize (fileobject) {
  47076. if (fileobject.attributes.size === 0) {
  47077. log('warn', `${fileobject.attributes.name} is empty`)
  47078. log('warn', 'BAD_FILE_SIZE')
  47079. return false
  47080. }
  47081. return true
  47082. }
  47083. function checkMimeWithPath (mime, filepath) {
  47084. const extension = path.extname(filepath).substr(1)
  47085. if (extension && mime && mimetypes.lookup(extension) !== mime) {
  47086. log('warn', `${filepath} and ${mime} do not correspond`)
  47087. log('warn', 'BAD_MIME_TYPE')
  47088. return false
  47089. }
  47090. return true
  47091. }
  47092. /***/ }),
  47093. /* 468 */
  47094. /***/ (function(module, exports, __webpack_require__) {
  47095. /**
  47096. * Creates the records in the given doctype.
  47097. *
  47098. * @module addData
  47099. */
  47100. const bluebird = __webpack_require__(43)
  47101. const log = __webpack_require__(24).namespace('addData')
  47102. module.exports = (entries, doctype) => {
  47103. const cozy = __webpack_require__(51)
  47104. return bluebird.mapSeries(entries, entry => {
  47105. log('debug', entry, 'Adding this entry')
  47106. return cozy.data.create(doctype, entry)
  47107. .then(dbEntry => {
  47108. // also update the original entry _id to allow saveBills' linkBankOperation entries to have
  47109. // an id
  47110. entry._id = dbEntry._id
  47111. return dbEntry
  47112. })
  47113. })
  47114. }
  47115. /***/ }),
  47116. /* 469 */
  47117. /***/ (function(module, exports, __webpack_require__) {
  47118. /**
  47119. * ### linkBankOperations ( entries, doctype, fields, options = {} )
  47120. *
  47121. * This function will soon move to a dedicated service. You should not use it.
  47122. * The goal of this function is to find links between bills and bank operations.
  47123. *
  47124. * @module linkBankOperations
  47125. */
  47126. const bluebird = __webpack_require__(43)
  47127. const log = __webpack_require__(24).namespace('linkBankOperations')
  47128. const { findDebitOperation, findCreditOperation } = __webpack_require__(944)
  47129. const DOCTYPE_OPERATIONS = 'io.cozy.bank.operations'
  47130. const DEFAULT_AMOUNT_DELTA = 0.001
  47131. const DEFAULT_PAST_WINDOW = 15
  47132. const DEFAULT_FUTURE_WINDOW = 29
  47133. class Linker {
  47134. constructor (cozyClient) {
  47135. this.cozyClient = cozyClient
  47136. }
  47137. // TODO: to rename addBillToDebitOperation
  47138. addBillToOperation (bill, operation) {
  47139. if (!bill._id) {
  47140. log('warn', 'bill has no id, impossible to add it to an operation')
  47141. return Promise.resolve()
  47142. }
  47143. const billId = `io.cozy.bills:${bill._id}`
  47144. if (operation.bills && operation.bills.indexOf(billId) > -1) {
  47145. return Promise.resolve()
  47146. }
  47147. const billIds = operation.bills || []
  47148. billIds.push(billId)
  47149. const attributes = { bills: billIds }
  47150. return this.cozyClient.data.updateAttributes(
  47151. DOCTYPE_OPERATIONS,
  47152. operation._id,
  47153. attributes
  47154. )
  47155. }
  47156. // TODO: to rename addBillToCreditOperation
  47157. addReimbursementToOperation (bill, debitOperation, matchingOperation) {
  47158. if (!bill._id) {
  47159. log('warn', 'bill has no id, impossible to add it as a reimbursement')
  47160. return Promise.resolve()
  47161. }
  47162. const billId = `io.cozy.bills:${bill._id}`
  47163. if (
  47164. debitOperation.reimbursements &&
  47165. debitOperation.reimbursements.map(b => b.billId).indexOf(billId) > -1
  47166. ) {
  47167. return Promise.resolve()
  47168. }
  47169. const reimbursements = debitOperation.reimbursements || []
  47170. reimbursements.push({
  47171. billId,
  47172. amount: bill.amount,
  47173. operationId: matchingOperation && matchingOperation._id
  47174. })
  47175. return this.cozyClient.data.updateAttributes(
  47176. DOCTYPE_OPERATIONS,
  47177. debitOperation._id,
  47178. { reimbursements: reimbursements }
  47179. )
  47180. }
  47181. /**
  47182. * Link bills to
  47183. * - their matching banking operation (debit)
  47184. * - to their reimbursement (credit)
  47185. */
  47186. linkBillsToOperations (bills, options) {
  47187. const result = {}
  47188. // when bill comes from a third party payer,
  47189. // no transaction is visible on the bank account
  47190. bills = bills.filter(bill => !bill.isThirdPartyPayer === true)
  47191. return bluebird.each(bills, bill => {
  47192. const res = result[bill._id] = {}
  47193. const linkBillToDebitOperation = () => {
  47194. return findDebitOperation(this.cozyClient, bill, options)
  47195. .then(operation => {
  47196. if (operation) {
  47197. res.debitOperation = operation
  47198. log('debug', bill, 'Matching bill')
  47199. log('debug', operation, 'Matching debit operation')
  47200. return this.addBillToOperation(bill, operation).then(() => operation)
  47201. }
  47202. })
  47203. }
  47204. const linkBillToCreditOperation = debitOperation => {
  47205. return findCreditOperation(this.cozyClient, bill, options)
  47206. .then(creditOperation => {
  47207. const creditPromise = Promise.resolve()
  47208. if (creditOperation) {
  47209. res.creditOperation = creditOperation
  47210. creditPromise.then(() => this.addBillToOperation(bill, creditOperation))
  47211. }
  47212. const debitPromise = Promise.resolve()
  47213. if (creditOperation && debitOperation) {
  47214. log('debug', bill, 'Matching bill')
  47215. log('debug', creditOperation, 'Matching credit creditOperation')
  47216. debitPromise.then(() => this.addReimbursementToOperation(bill, debitOperation, creditOperation))
  47217. }
  47218. return Promise.all([creditOperation, debitOperation])
  47219. })
  47220. }
  47221. return linkBillToDebitOperation().then(debitOperation => {
  47222. if (bill.isRefund) {
  47223. return linkBillToCreditOperation(debitOperation)
  47224. }
  47225. })
  47226. })
  47227. .then(() => {
  47228. return result
  47229. })
  47230. }
  47231. }
  47232. module.exports = (bills, doctype, fields, options = {}) => {
  47233. // Use the custom bank identifier from user if any
  47234. if (fields.bank_identifier && fields.bank_identifier.length) {
  47235. options.identifiers = [fields.bank_identifier]
  47236. }
  47237. if (typeof options.identifiers === 'string') {
  47238. options.identifiers = [options.identifiers.toLowerCase()]
  47239. } else if (Array.isArray(options.identifiers)) {
  47240. options.identifiers = options.identifiers.map(id => id.toLowerCase())
  47241. } else {
  47242. throw new Error(
  47243. 'linkBankOperations cannot be called without "identifiers" option'
  47244. )
  47245. }
  47246. options.amountDelta = options.amountDelta || DEFAULT_AMOUNT_DELTA
  47247. options.minAmountDelta = options.minAmountDelta || options.amountDelta
  47248. options.maxAmountDelta = options.maxAmountDelta || options.amountDelta
  47249. options.pastWindow = options.pastWindow || DEFAULT_PAST_WINDOW
  47250. options.futureWindow = options.futureWindow || DEFAULT_FUTURE_WINDOW
  47251. const cozyClient = __webpack_require__(51)
  47252. const linker = new Linker(cozyClient)
  47253. return linker.linkBillsToOperations(bills, options)
  47254. }
  47255. Object.assign(module.exports, {
  47256. Linker
  47257. })
  47258. /***/ }),
  47259. /* 470 */
  47260. /***/ (function(module, exports) {
  47261. /**
  47262. * @category Common Helpers
  47263. * @summary Is the given argument an instance of Date?
  47264. *
  47265. * @description
  47266. * Is the given argument an instance of Date?
  47267. *
  47268. * @param {*} argument - the argument to check
  47269. * @returns {Boolean} the given argument is an instance of Date
  47270. *
  47271. * @example
  47272. * // Is 'mayonnaise' a Date?
  47273. * var result = isDate('mayonnaise')
  47274. * //=> false
  47275. */
  47276. function isDate (argument) {
  47277. return argument instanceof Date
  47278. }
  47279. module.exports = isDate
  47280. /***/ }),
  47281. /* 471 */
  47282. /***/ (function(module, exports, __webpack_require__) {
  47283. var parse = __webpack_require__(28)
  47284. /**
  47285. * @category Day Helpers
  47286. * @summary Add the specified number of days to the given date.
  47287. *
  47288. * @description
  47289. * Add the specified number of days to the given date.
  47290. *
  47291. * @param {Date|String|Number} date - the date to be changed
  47292. * @param {Number} amount - the amount of days to be added
  47293. * @returns {Date} the new date with the days added
  47294. *
  47295. * @example
  47296. * // Add 10 days to 1 September 2014:
  47297. * var result = addDays(new Date(2014, 8, 1), 10)
  47298. * //=> Thu Sep 11 2014 00:00:00
  47299. */
  47300. function addDays (dirtyDate, dirtyAmount) {
  47301. var date = parse(dirtyDate)
  47302. var amount = Number(dirtyAmount)
  47303. date.setDate(date.getDate() + amount)
  47304. return date
  47305. }
  47306. module.exports = addDays
  47307. /***/ }),
  47308. /* 472 */
  47309. /***/ (function(module, exports, __webpack_require__) {
  47310. var startOfDay = __webpack_require__(960)
  47311. var MILLISECONDS_IN_MINUTE = 60000
  47312. var MILLISECONDS_IN_DAY = 86400000
  47313. /**
  47314. * @category Day Helpers
  47315. * @summary Get the number of calendar days between the given dates.
  47316. *
  47317. * @description
  47318. * Get the number of calendar days between the given dates.
  47319. *
  47320. * @param {Date|String|Number} dateLeft - the later date
  47321. * @param {Date|String|Number} dateRight - the earlier date
  47322. * @returns {Number} the number of calendar days
  47323. *
  47324. * @example
  47325. * // How many calendar days are between
  47326. * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
  47327. * var result = differenceInCalendarDays(
  47328. * new Date(2012, 6, 2, 0, 0),
  47329. * new Date(2011, 6, 2, 23, 0)
  47330. * )
  47331. * //=> 366
  47332. */
  47333. function differenceInCalendarDays (dirtyDateLeft, dirtyDateRight) {
  47334. var startOfDayLeft = startOfDay(dirtyDateLeft)
  47335. var startOfDayRight = startOfDay(dirtyDateRight)
  47336. var timestampLeft = startOfDayLeft.getTime() -
  47337. startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE
  47338. var timestampRight = startOfDayRight.getTime() -
  47339. startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE
  47340. // Round the number of days to the nearest integer
  47341. // because the number of milliseconds in a day is not constant
  47342. // (e.g. it's different in the day of the daylight saving time clock shift)
  47343. return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY)
  47344. }
  47345. module.exports = differenceInCalendarDays
  47346. /***/ }),
  47347. /* 473 */
  47348. /***/ (function(module, exports, __webpack_require__) {
  47349. var parse = __webpack_require__(28)
  47350. var startOfISOWeek = __webpack_require__(208)
  47351. /**
  47352. * @category ISO Week-Numbering Year Helpers
  47353. * @summary Get the ISO week-numbering year of the given date.
  47354. *
  47355. * @description
  47356. * Get the ISO week-numbering year of the given date,
  47357. * which always starts 3 days before the year's first Thursday.
  47358. *
  47359. * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
  47360. *
  47361. * @param {Date|String|Number} date - the given date
  47362. * @returns {Number} the ISO week-numbering year
  47363. *
  47364. * @example
  47365. * // Which ISO-week numbering year is 2 January 2005?
  47366. * var result = getISOYear(new Date(2005, 0, 2))
  47367. * //=> 2004
  47368. */
  47369. function getISOYear (dirtyDate) {
  47370. var date = parse(dirtyDate)
  47371. var year = date.getFullYear()
  47372. var fourthOfJanuaryOfNextYear = new Date(0)
  47373. fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4)
  47374. fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0)
  47375. var startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear)
  47376. var fourthOfJanuaryOfThisYear = new Date(0)
  47377. fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4)
  47378. fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0)
  47379. var startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear)
  47380. if (date.getTime() >= startOfNextYear.getTime()) {
  47381. return year + 1
  47382. } else if (date.getTime() >= startOfThisYear.getTime()) {
  47383. return year
  47384. } else {
  47385. return year - 1
  47386. }
  47387. }
  47388. module.exports = getISOYear
  47389. /***/ }),
  47390. /* 474 */
  47391. /***/ (function(module, exports, __webpack_require__) {
  47392. const moment = __webpack_require__(0)
  47393. const {log, BaseKonnector, saveBills, requestFactory} = __webpack_require__(476)
  47394. const baseUrl = 'https://espace-client.enercoop.fr'
  47395. const loginUrl = baseUrl + '/login'
  47396. const billUrl = baseUrl + '/mon-espace/factures/'
  47397. moment.locale('fr')
  47398. let rq = requestFactory({
  47399. cheerio: true,
  47400. json: false,
  47401. debug: false,
  47402. jar: true
  47403. })
  47404. module.exports = new BaseKonnector(function fetch (fields) {
  47405. return logIn(fields)
  47406. .then(parsePage)
  47407. .then(entries => saveBills(entries, fields.folderPath, {
  47408. timeout: Date.now() + 60 * 1000,
  47409. identifiers: ['free telecom', 'free hautdebit']
  47410. }))
  47411. })
  47412. // Procedure to login to Enercoop website.
  47413. function logIn (fields) {
  47414. const form = {
  47415. form: {
  47416. email: fields.login,
  47417. password: fields.password,
  47418. }
  47419. }
  47420. const options = {
  47421. url: loginUrl,
  47422. method: 'POST',
  47423. form: {
  47424. email: 'jerome@choj.io',
  47425. password: 'Ch4t0ns!',
  47426. //csrf_token: $('[name="csrf_token"]').val(),
  47427. },
  47428. resolveWithFullResponse: true,
  47429. followAllRedirects: true,
  47430. simple: false
  47431. }
  47432. return rq(options)
  47433. .then(res => {
  47434. //const isNoLocation = !res.headers.location
  47435. const isNot200 = res.statusCode !== 200
  47436. //const isError = res.headers.location && res.headers.location.indexOf('error') !== -1
  47437. if (isNot200) {
  47438. log('info', 'Authentification error')
  47439. throw new Error('LOGIN_FAILED')
  47440. }
  47441. const url = `${billUrl}`
  47442. return rq(url)
  47443. .catch(err => {
  47444. console.log(err, 'authentication error details')
  47445. throw new Error('LOGIN_FAILED')
  47446. })
  47447. })
  47448. }
  47449. // Parse the fetched page to extract bill data.
  47450. function parsePage ($) {
  47451. const bills = []
  47452. $('.invoice-line').each(function () {
  47453. //console.log($(this).html())
  47454. let billId = $(this).data('invoice-id')
  47455. let amount = $(this).find('.amount').text()
  47456. amount = amount.replace('€','')
  47457. amount = amount.replace(',', '.').trim()
  47458. amount = parseFloat(amount)
  47459. let pdfUrl = $(this).find('a > i').data('url')
  47460. pdfUrl = baseUrl + pdfUrl
  47461. //pdfUrl = `https://adsl.free.fr/${pdfUrl}`
  47462. let billDate = $(this).find('.invoiceDate').text().trim()
  47463. let monthAndYear = billDate.split('-')
  47464. let billYear = monthAndYear[0].trim()
  47465. let billMonth = monthAndYear[1].trim()
  47466. //console.log(billMonth.toLowerCase())
  47467. billMonth = moment.months().indexOf(billMonth.toLowerCase()) + 1
  47468. billMonth = billMonth < 10 ? '0' + billMonth : billMonth
  47469. //console.log(billMonth+"*"+billYear + "-----|" + billId + '->' + amount + "|||"+pdfUrl)
  47470. //let month = "12"//pdfUrl.split('&')[2].split('=')[1]
  47471. let date = moment(billYear + billMonth, 'YYYYMM')
  47472. let bill = {
  47473. amount,
  47474. date: date.toDate(),
  47475. vendor: 'Enercoop',
  47476. filename: `${date.format('YYYYMM')}_enercoop.pdf`,
  47477. fileurl: pdfUrl
  47478. }
  47479. bills.push(bill)
  47480. })
  47481. return bills
  47482. }
  47483. /***/ }),
  47484. /* 475 */
  47485. /***/ (function(module, exports, __webpack_require__) {
  47486. var map = {
  47487. "./af": 209,
  47488. "./af.js": 209,
  47489. "./ar": 210,
  47490. "./ar-dz": 211,
  47491. "./ar-dz.js": 211,
  47492. "./ar-kw": 212,
  47493. "./ar-kw.js": 212,
  47494. "./ar-ly": 213,
  47495. "./ar-ly.js": 213,
  47496. "./ar-ma": 214,
  47497. "./ar-ma.js": 214,
  47498. "./ar-sa": 215,
  47499. "./ar-sa.js": 215,
  47500. "./ar-tn": 216,
  47501. "./ar-tn.js": 216,
  47502. "./ar.js": 210,
  47503. "./az": 217,
  47504. "./az.js": 217,
  47505. "./be": 218,
  47506. "./be.js": 218,
  47507. "./bg": 219,
  47508. "./bg.js": 219,
  47509. "./bm": 220,
  47510. "./bm.js": 220,
  47511. "./bn": 221,
  47512. "./bn.js": 221,
  47513. "./bo": 222,
  47514. "./bo.js": 222,
  47515. "./br": 223,
  47516. "./br.js": 223,
  47517. "./bs": 224,
  47518. "./bs.js": 224,
  47519. "./ca": 225,
  47520. "./ca.js": 225,
  47521. "./cs": 226,
  47522. "./cs.js": 226,
  47523. "./cv": 227,
  47524. "./cv.js": 227,
  47525. "./cy": 228,
  47526. "./cy.js": 228,
  47527. "./da": 229,
  47528. "./da.js": 229,
  47529. "./de": 230,
  47530. "./de-at": 231,
  47531. "./de-at.js": 231,
  47532. "./de-ch": 232,
  47533. "./de-ch.js": 232,
  47534. "./de.js": 230,
  47535. "./dv": 233,
  47536. "./dv.js": 233,
  47537. "./el": 234,
  47538. "./el.js": 234,
  47539. "./en-au": 235,
  47540. "./en-au.js": 235,
  47541. "./en-ca": 236,
  47542. "./en-ca.js": 236,
  47543. "./en-gb": 237,
  47544. "./en-gb.js": 237,
  47545. "./en-ie": 238,
  47546. "./en-ie.js": 238,
  47547. "./en-nz": 239,
  47548. "./en-nz.js": 239,
  47549. "./eo": 240,
  47550. "./eo.js": 240,
  47551. "./es": 241,
  47552. "./es-do": 242,
  47553. "./es-do.js": 242,
  47554. "./es-us": 243,
  47555. "./es-us.js": 243,
  47556. "./es.js": 241,
  47557. "./et": 244,
  47558. "./et.js": 244,
  47559. "./eu": 245,
  47560. "./eu.js": 245,
  47561. "./fa": 246,
  47562. "./fa.js": 246,
  47563. "./fi": 247,
  47564. "./fi.js": 247,
  47565. "./fo": 248,
  47566. "./fo.js": 248,
  47567. "./fr": 249,
  47568. "./fr-ca": 250,
  47569. "./fr-ca.js": 250,
  47570. "./fr-ch": 251,
  47571. "./fr-ch.js": 251,
  47572. "./fr.js": 249,
  47573. "./fy": 252,
  47574. "./fy.js": 252,
  47575. "./gd": 253,
  47576. "./gd.js": 253,
  47577. "./gl": 254,
  47578. "./gl.js": 254,
  47579. "./gom-latn": 255,
  47580. "./gom-latn.js": 255,
  47581. "./gu": 256,
  47582. "./gu.js": 256,
  47583. "./he": 257,
  47584. "./he.js": 257,
  47585. "./hi": 258,
  47586. "./hi.js": 258,
  47587. "./hr": 259,
  47588. "./hr.js": 259,
  47589. "./hu": 260,
  47590. "./hu.js": 260,
  47591. "./hy-am": 261,
  47592. "./hy-am.js": 261,
  47593. "./id": 262,
  47594. "./id.js": 262,
  47595. "./is": 263,
  47596. "./is.js": 263,
  47597. "./it": 264,
  47598. "./it.js": 264,
  47599. "./ja": 265,
  47600. "./ja.js": 265,
  47601. "./jv": 266,
  47602. "./jv.js": 266,
  47603. "./ka": 267,
  47604. "./ka.js": 267,
  47605. "./kk": 268,
  47606. "./kk.js": 268,
  47607. "./km": 269,
  47608. "./km.js": 269,
  47609. "./kn": 270,
  47610. "./kn.js": 270,
  47611. "./ko": 271,
  47612. "./ko.js": 271,
  47613. "./ky": 272,
  47614. "./ky.js": 272,
  47615. "./lb": 273,
  47616. "./lb.js": 273,
  47617. "./lo": 274,
  47618. "./lo.js": 274,
  47619. "./lt": 275,
  47620. "./lt.js": 275,
  47621. "./lv": 276,
  47622. "./lv.js": 276,
  47623. "./me": 277,
  47624. "./me.js": 277,
  47625. "./mi": 278,
  47626. "./mi.js": 278,
  47627. "./mk": 279,
  47628. "./mk.js": 279,
  47629. "./ml": 280,
  47630. "./ml.js": 280,
  47631. "./mr": 281,
  47632. "./mr.js": 281,
  47633. "./ms": 282,
  47634. "./ms-my": 283,
  47635. "./ms-my.js": 283,
  47636. "./ms.js": 282,
  47637. "./mt": 284,
  47638. "./mt.js": 284,
  47639. "./my": 285,
  47640. "./my.js": 285,
  47641. "./nb": 286,
  47642. "./nb.js": 286,
  47643. "./ne": 287,
  47644. "./ne.js": 287,
  47645. "./nl": 288,
  47646. "./nl-be": 289,
  47647. "./nl-be.js": 289,
  47648. "./nl.js": 288,
  47649. "./nn": 290,
  47650. "./nn.js": 290,
  47651. "./pa-in": 291,
  47652. "./pa-in.js": 291,
  47653. "./pl": 292,
  47654. "./pl.js": 292,
  47655. "./pt": 293,
  47656. "./pt-br": 294,
  47657. "./pt-br.js": 294,
  47658. "./pt.js": 293,
  47659. "./ro": 295,
  47660. "./ro.js": 295,
  47661. "./ru": 296,
  47662. "./ru.js": 296,
  47663. "./sd": 297,
  47664. "./sd.js": 297,
  47665. "./se": 298,
  47666. "./se.js": 298,
  47667. "./si": 299,
  47668. "./si.js": 299,
  47669. "./sk": 300,
  47670. "./sk.js": 300,
  47671. "./sl": 301,
  47672. "./sl.js": 301,
  47673. "./sq": 302,
  47674. "./sq.js": 302,
  47675. "./sr": 303,
  47676. "./sr-cyrl": 304,
  47677. "./sr-cyrl.js": 304,
  47678. "./sr.js": 303,
  47679. "./ss": 305,
  47680. "./ss.js": 305,
  47681. "./sv": 306,
  47682. "./sv.js": 306,
  47683. "./sw": 307,
  47684. "./sw.js": 307,
  47685. "./ta": 308,
  47686. "./ta.js": 308,
  47687. "./te": 309,
  47688. "./te.js": 309,
  47689. "./tet": 310,
  47690. "./tet.js": 310,
  47691. "./th": 311,
  47692. "./th.js": 311,
  47693. "./tl-ph": 312,
  47694. "./tl-ph.js": 312,
  47695. "./tlh": 313,
  47696. "./tlh.js": 313,
  47697. "./tr": 314,
  47698. "./tr.js": 314,
  47699. "./tzl": 315,
  47700. "./tzl.js": 315,
  47701. "./tzm": 316,
  47702. "./tzm-latn": 317,
  47703. "./tzm-latn.js": 317,
  47704. "./tzm.js": 316,
  47705. "./uk": 318,
  47706. "./uk.js": 318,
  47707. "./ur": 319,
  47708. "./ur.js": 319,
  47709. "./uz": 320,
  47710. "./uz-latn": 321,
  47711. "./uz-latn.js": 321,
  47712. "./uz.js": 320,
  47713. "./vi": 322,
  47714. "./vi.js": 322,
  47715. "./x-pseudo": 323,
  47716. "./x-pseudo.js": 323,
  47717. "./yo": 324,
  47718. "./yo.js": 324,
  47719. "./zh-cn": 325,
  47720. "./zh-cn.js": 325,
  47721. "./zh-hk": 326,
  47722. "./zh-hk.js": 326,
  47723. "./zh-tw": 327,
  47724. "./zh-tw.js": 327
  47725. };
  47726. function webpackContext(req) {
  47727. return __webpack_require__(webpackContextResolve(req));
  47728. };
  47729. function webpackContextResolve(req) {
  47730. var id = map[req];
  47731. if(!(id + 1)) // check for number or string
  47732. throw new Error("Cannot find module '" + req + "'.");
  47733. return id;
  47734. };
  47735. webpackContext.keys = function webpackContextKeys() {
  47736. return Object.keys(map);
  47737. };
  47738. webpackContext.resolve = webpackContextResolve;
  47739. module.exports = webpackContext;
  47740. webpackContext.id = 475;
  47741. /***/ }),
  47742. /* 476 */
  47743. /***/ (function(module, exports, __webpack_require__) {
  47744. __webpack_require__(477)
  47745. const requestFactory = __webpack_require__(331)
  47746. const hydrateAndFilter = __webpack_require__(437)
  47747. const log = __webpack_require__(24).namespace('cozy-konnector-libs')
  47748. module.exports = {
  47749. BaseKonnector: __webpack_require__(942),
  47750. cozyClient: __webpack_require__(51),
  47751. errors: __webpack_require__(206),
  47752. log,
  47753. saveFiles: __webpack_require__(467),
  47754. saveBills: __webpack_require__(943),
  47755. linkBankOperations: __webpack_require__(469),
  47756. addData: __webpack_require__(468),
  47757. hydrateAndFilter,
  47758. filterData: deprecate(hydrateAndFilter, 'Use hydrateAndFilter now. filterData will be removed in cozy-konnector-libs@4'),
  47759. updateOrCreate: __webpack_require__(974),
  47760. request: deprecate(requestFactory, 'Use requestFactory instead of request. It will be removed in cozy-konnector-libs@4'),
  47761. requestFactory,
  47762. retry: __webpack_require__(975)
  47763. }
  47764. function deprecate (wrapped, message) {
  47765. return function () {
  47766. log('warn', message)
  47767. return wrapped.apply(this, arguments)
  47768. }
  47769. }
  47770. /***/ }),
  47771. /* 477 */
  47772. /***/ (function(module, exports, __webpack_require__) {
  47773. const log = __webpack_require__(24).namespace('Error Interception')
  47774. // This will catch exception which would be uncaught by the connector script itself
  47775. process.on('uncaughtException', err => {
  47776. console.error(err, 'uncaught exception')
  47777. log('critical', err.message, 'uncaught exception')
  47778. })
  47779. process.on('SIGTERM', () => {
  47780. log('critical', 'The konnector got a SIGTERM')
  47781. })
  47782. process.on('SIGINT', () => {
  47783. log('critical', 'The konnector got a SIGINT')
  47784. })
  47785. /***/ }),
  47786. /* 478 */
  47787. /***/ (function(module, exports, __webpack_require__) {
  47788. const chalk = __webpack_require__(479)
  47789. const util = __webpack_require__(2)
  47790. util.inspect.defaultOptions.maxArrayLength = null
  47791. util.inspect.defaultOptions.depth = null
  47792. util.inspect.defaultOptions.colors = true
  47793. const type2color = {
  47794. debug: 'cyan',
  47795. warn: 'yellow',
  47796. info: 'blue',
  47797. error: 'red',
  47798. ok: 'green',
  47799. secret: 'red',
  47800. critical: 'red'
  47801. }
  47802. function prodFormat (type, message, label, namespace) {
  47803. // properly display error messages
  47804. if (message.stack) message = message.stack
  47805. if (message.toString) message = message.toString()
  47806. return JSON.stringify({ time: new Date(), type, message, label, namespace })
  47807. }
  47808. function devFormat (type, message, label, namespace) {
  47809. let formatmessage = message
  47810. if (typeof formatmessage !== 'string') {
  47811. formatmessage = util.inspect(formatmessage)
  47812. }
  47813. let formatlabel = label ? ` : "${label}" ` : ''
  47814. let formatnamespace = namespace ? chalk.magenta(`${namespace}: `) : ''
  47815. let color = type2color[type]
  47816. let formattype = color ? chalk[color](type) : type
  47817. return `${formatnamespace}${formattype}${formatlabel} : ${formatmessage}`
  47818. }
  47819. const env2formats = {
  47820. production: prodFormat,
  47821. development: devFormat,
  47822. standalone: devFormat,
  47823. test: devFormat
  47824. }
  47825. module.exports = { prodFormat, devFormat, env2formats }
  47826. /***/ }),
  47827. /* 479 */
  47828. /***/ (function(module, exports, __webpack_require__) {
  47829. "use strict";
  47830. const escapeStringRegexp = __webpack_require__(480);
  47831. const ansiStyles = __webpack_require__(481);
  47832. const supportsColor = __webpack_require__(485);
  47833. const template = __webpack_require__(487);
  47834. const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');
  47835. // `supportsColor.level` → `ansiStyles.color[name]` mapping
  47836. const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];
  47837. // `color-convert` models to exclude from the Chalk API due to conflicts and such
  47838. const skipModels = new Set(['gray']);
  47839. const styles = Object.create(null);
  47840. function applyOptions(obj, options) {
  47841. options = options || {};
  47842. // Detect level if not set manually
  47843. const scLevel = supportsColor ? supportsColor.level : 0;
  47844. obj.level = options.level === undefined ? scLevel : options.level;
  47845. obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;
  47846. }
  47847. function Chalk(options) {
  47848. // We check for this.template here since calling `chalk.constructor()`
  47849. // by itself will have a `this` of a previously constructed chalk object
  47850. if (!this || !(this instanceof Chalk) || this.template) {
  47851. const chalk = {};
  47852. applyOptions(chalk, options);
  47853. chalk.template = function () {
  47854. const args = [].slice.call(arguments);
  47855. return chalkTag.apply(null, [chalk.template].concat(args));
  47856. };
  47857. Object.setPrototypeOf(chalk, Chalk.prototype);
  47858. Object.setPrototypeOf(chalk.template, chalk);
  47859. chalk.template.constructor = Chalk;
  47860. return chalk.template;
  47861. }
  47862. applyOptions(this, options);
  47863. }
  47864. // Use bright blue on Windows as the normal blue color is illegible
  47865. if (isSimpleWindowsTerm) {
  47866. ansiStyles.blue.open = '\u001B[94m';
  47867. }
  47868. for (const key of Object.keys(ansiStyles)) {
  47869. ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
  47870. styles[key] = {
  47871. get() {
  47872. const codes = ansiStyles[key];
  47873. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
  47874. }
  47875. };
  47876. }
  47877. styles.visible = {
  47878. get() {
  47879. return build.call(this, this._styles || [], true, 'visible');
  47880. }
  47881. };
  47882. ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
  47883. for (const model of Object.keys(ansiStyles.color.ansi)) {
  47884. if (skipModels.has(model)) {
  47885. continue;
  47886. }
  47887. styles[model] = {
  47888. get() {
  47889. const level = this.level;
  47890. return function () {
  47891. const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
  47892. const codes = {
  47893. open,
  47894. close: ansiStyles.color.close,
  47895. closeRe: ansiStyles.color.closeRe
  47896. };
  47897. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  47898. };
  47899. }
  47900. };
  47901. }
  47902. ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');
  47903. for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
  47904. if (skipModels.has(model)) {
  47905. continue;
  47906. }
  47907. const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
  47908. styles[bgModel] = {
  47909. get() {
  47910. const level = this.level;
  47911. return function () {
  47912. const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
  47913. const codes = {
  47914. open,
  47915. close: ansiStyles.bgColor.close,
  47916. closeRe: ansiStyles.bgColor.closeRe
  47917. };
  47918. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  47919. };
  47920. }
  47921. };
  47922. }
  47923. const proto = Object.defineProperties(() => {}, styles);
  47924. function build(_styles, _empty, key) {
  47925. const builder = function () {
  47926. return applyStyle.apply(builder, arguments);
  47927. };
  47928. builder._styles = _styles;
  47929. builder._empty = _empty;
  47930. const self = this;
  47931. Object.defineProperty(builder, 'level', {
  47932. enumerable: true,
  47933. get() {
  47934. return self.level;
  47935. },
  47936. set(level) {
  47937. self.level = level;
  47938. }
  47939. });
  47940. Object.defineProperty(builder, 'enabled', {
  47941. enumerable: true,
  47942. get() {
  47943. return self.enabled;
  47944. },
  47945. set(enabled) {
  47946. self.enabled = enabled;
  47947. }
  47948. });
  47949. // See below for fix regarding invisible grey/dim combination on Windows
  47950. builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey';
  47951. // `__proto__` is used because we must return a function, but there is
  47952. // no way to create a function with a different prototype
  47953. builder.__proto__ = proto; // eslint-disable-line no-proto
  47954. return builder;
  47955. }
  47956. function applyStyle() {
  47957. // Support varags, but simply cast to string in case there's only one arg
  47958. const args = arguments;
  47959. const argsLen = args.length;
  47960. let str = String(arguments[0]);
  47961. if (argsLen === 0) {
  47962. return '';
  47963. }
  47964. if (argsLen > 1) {
  47965. // Don't slice `arguments`, it prevents V8 optimizations
  47966. for (let a = 1; a < argsLen; a++) {
  47967. str += ' ' + args[a];
  47968. }
  47969. }
  47970. if (!this.enabled || this.level <= 0 || !str) {
  47971. return this._empty ? '' : str;
  47972. }
  47973. // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
  47974. // see https://github.com/chalk/chalk/issues/58
  47975. // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
  47976. const originalDim = ansiStyles.dim.open;
  47977. if (isSimpleWindowsTerm && this.hasGrey) {
  47978. ansiStyles.dim.open = '';
  47979. }
  47980. for (const code of this._styles.slice().reverse()) {
  47981. // Replace any instances already present with a re-opening code
  47982. // otherwise only the part of the string until said closing code
  47983. // will be colored, and the rest will simply be 'plain'.
  47984. str = code.open + str.replace(code.closeRe, code.open) + code.close;
  47985. // Close the styling before a linebreak and reopen
  47986. // after next line to fix a bleed issue on macOS
  47987. // https://github.com/chalk/chalk/pull/92
  47988. str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`);
  47989. }
  47990. // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue
  47991. ansiStyles.dim.open = originalDim;
  47992. return str;
  47993. }
  47994. function chalkTag(chalk, strings) {
  47995. if (!Array.isArray(strings)) {
  47996. // If chalk() was called by itself or with a string,
  47997. // return the string itself as a string.
  47998. return [].slice.call(arguments, 1).join(' ');
  47999. }
  48000. const args = [].slice.call(arguments, 2);
  48001. const parts = [strings.raw[0]];
  48002. for (let i = 1; i < strings.length; i++) {
  48003. parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&'));
  48004. parts.push(String(strings.raw[i]));
  48005. }
  48006. return template(chalk, parts.join(''));
  48007. }
  48008. Object.defineProperties(Chalk.prototype, styles);
  48009. module.exports = Chalk(); // eslint-disable-line new-cap
  48010. module.exports.supportsColor = supportsColor;
  48011. module.exports.default = module.exports; // For TypeScript
  48012. /***/ }),
  48013. /* 480 */
  48014. /***/ (function(module, exports, __webpack_require__) {
  48015. "use strict";
  48016. var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
  48017. module.exports = function (str) {
  48018. if (typeof str !== 'string') {
  48019. throw new TypeError('Expected a string');
  48020. }
  48021. return str.replace(matchOperatorsRe, '\\$&');
  48022. };
  48023. /***/ }),
  48024. /* 481 */
  48025. /***/ (function(module, exports, __webpack_require__) {
  48026. "use strict";
  48027. /* WEBPACK VAR INJECTION */(function(module) {
  48028. const colorConvert = __webpack_require__(482);
  48029. const wrapAnsi16 = (fn, offset) => function () {
  48030. const code = fn.apply(colorConvert, arguments);
  48031. return `\u001B[${code + offset}m`;
  48032. };
  48033. const wrapAnsi256 = (fn, offset) => function () {
  48034. const code = fn.apply(colorConvert, arguments);
  48035. return `\u001B[${38 + offset};5;${code}m`;
  48036. };
  48037. const wrapAnsi16m = (fn, offset) => function () {
  48038. const rgb = fn.apply(colorConvert, arguments);
  48039. return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
  48040. };
  48041. function assembleStyles() {
  48042. const codes = new Map();
  48043. const styles = {
  48044. modifier: {
  48045. reset: [0, 0],
  48046. // 21 isn't widely supported and 22 does the same thing
  48047. bold: [1, 22],
  48048. dim: [2, 22],
  48049. italic: [3, 23],
  48050. underline: [4, 24],
  48051. inverse: [7, 27],
  48052. hidden: [8, 28],
  48053. strikethrough: [9, 29]
  48054. },
  48055. color: {
  48056. black: [30, 39],
  48057. red: [31, 39],
  48058. green: [32, 39],
  48059. yellow: [33, 39],
  48060. blue: [34, 39],
  48061. magenta: [35, 39],
  48062. cyan: [36, 39],
  48063. white: [37, 39],
  48064. gray: [90, 39],
  48065. // Bright color
  48066. redBright: [91, 39],
  48067. greenBright: [92, 39],
  48068. yellowBright: [93, 39],
  48069. blueBright: [94, 39],
  48070. magentaBright: [95, 39],
  48071. cyanBright: [96, 39],
  48072. whiteBright: [97, 39]
  48073. },
  48074. bgColor: {
  48075. bgBlack: [40, 49],
  48076. bgRed: [41, 49],
  48077. bgGreen: [42, 49],
  48078. bgYellow: [43, 49],
  48079. bgBlue: [44, 49],
  48080. bgMagenta: [45, 49],
  48081. bgCyan: [46, 49],
  48082. bgWhite: [47, 49],
  48083. // Bright color
  48084. bgBlackBright: [100, 49],
  48085. bgRedBright: [101, 49],
  48086. bgGreenBright: [102, 49],
  48087. bgYellowBright: [103, 49],
  48088. bgBlueBright: [104, 49],
  48089. bgMagentaBright: [105, 49],
  48090. bgCyanBright: [106, 49],
  48091. bgWhiteBright: [107, 49]
  48092. }
  48093. };
  48094. // Fix humans
  48095. styles.color.grey = styles.color.gray;
  48096. for (const groupName of Object.keys(styles)) {
  48097. const group = styles[groupName];
  48098. for (const styleName of Object.keys(group)) {
  48099. const style = group[styleName];
  48100. styles[styleName] = {
  48101. open: `\u001B[${style[0]}m`,
  48102. close: `\u001B[${style[1]}m`
  48103. };
  48104. group[styleName] = styles[styleName];
  48105. codes.set(style[0], style[1]);
  48106. }
  48107. Object.defineProperty(styles, groupName, {
  48108. value: group,
  48109. enumerable: false
  48110. });
  48111. Object.defineProperty(styles, 'codes', {
  48112. value: codes,
  48113. enumerable: false
  48114. });
  48115. }
  48116. const rgb2rgb = (r, g, b) => [r, g, b];
  48117. styles.color.close = '\u001B[39m';
  48118. styles.bgColor.close = '\u001B[49m';
  48119. styles.color.ansi = {};
  48120. styles.color.ansi256 = {};
  48121. styles.color.ansi16m = {
  48122. rgb: wrapAnsi16m(rgb2rgb, 0)
  48123. };
  48124. styles.bgColor.ansi = {};
  48125. styles.bgColor.ansi256 = {};
  48126. styles.bgColor.ansi16m = {
  48127. rgb: wrapAnsi16m(rgb2rgb, 10)
  48128. };
  48129. for (const key of Object.keys(colorConvert)) {
  48130. if (typeof colorConvert[key] !== 'object') {
  48131. continue;
  48132. }
  48133. const suite = colorConvert[key];
  48134. if ('ansi16' in suite) {
  48135. styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
  48136. styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
  48137. }
  48138. if ('ansi256' in suite) {
  48139. styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
  48140. styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
  48141. }
  48142. if ('rgb' in suite) {
  48143. styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
  48144. styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
  48145. }
  48146. }
  48147. return styles;
  48148. }
  48149. // Make the export immutable
  48150. Object.defineProperty(module, 'exports', {
  48151. enumerable: true,
  48152. get: assembleStyles
  48153. });
  48154. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(58)(module)))
  48155. /***/ }),
  48156. /* 482 */
  48157. /***/ (function(module, exports, __webpack_require__) {
  48158. var conversions = __webpack_require__(328);
  48159. var route = __webpack_require__(484);
  48160. var convert = {};
  48161. var models = Object.keys(conversions);
  48162. function wrapRaw(fn) {
  48163. var wrappedFn = function (args) {
  48164. if (args === undefined || args === null) {
  48165. return args;
  48166. }
  48167. if (arguments.length > 1) {
  48168. args = Array.prototype.slice.call(arguments);
  48169. }
  48170. return fn(args);
  48171. };
  48172. // preserve .conversion property if there is one
  48173. if ('conversion' in fn) {
  48174. wrappedFn.conversion = fn.conversion;
  48175. }
  48176. return wrappedFn;
  48177. }
  48178. function wrapRounded(fn) {
  48179. var wrappedFn = function (args) {
  48180. if (args === undefined || args === null) {
  48181. return args;
  48182. }
  48183. if (arguments.length > 1) {
  48184. args = Array.prototype.slice.call(arguments);
  48185. }
  48186. var result = fn(args);
  48187. // we're assuming the result is an array here.
  48188. // see notice in conversions.js; don't use box types
  48189. // in conversion functions.
  48190. if (typeof result === 'object') {
  48191. for (var len = result.length, i = 0; i < len; i++) {
  48192. result[i] = Math.round(result[i]);
  48193. }
  48194. }
  48195. return result;
  48196. };
  48197. // preserve .conversion property if there is one
  48198. if ('conversion' in fn) {
  48199. wrappedFn.conversion = fn.conversion;
  48200. }
  48201. return wrappedFn;
  48202. }
  48203. models.forEach(function (fromModel) {
  48204. convert[fromModel] = {};
  48205. Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});
  48206. Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});
  48207. var routes = route(fromModel);
  48208. var routeModels = Object.keys(routes);
  48209. routeModels.forEach(function (toModel) {
  48210. var fn = routes[toModel];
  48211. convert[fromModel][toModel] = wrapRounded(fn);
  48212. convert[fromModel][toModel].raw = wrapRaw(fn);
  48213. });
  48214. });
  48215. module.exports = convert;
  48216. /***/ }),
  48217. /* 483 */
  48218. /***/ (function(module, exports, __webpack_require__) {
  48219. "use strict";
  48220. module.exports = {
  48221. "aliceblue": [240, 248, 255],
  48222. "antiquewhite": [250, 235, 215],
  48223. "aqua": [0, 255, 255],
  48224. "aquamarine": [127, 255, 212],
  48225. "azure": [240, 255, 255],
  48226. "beige": [245, 245, 220],
  48227. "bisque": [255, 228, 196],
  48228. "black": [0, 0, 0],
  48229. "blanchedalmond": [255, 235, 205],
  48230. "blue": [0, 0, 255],
  48231. "blueviolet": [138, 43, 226],
  48232. "brown": [165, 42, 42],
  48233. "burlywood": [222, 184, 135],
  48234. "cadetblue": [95, 158, 160],
  48235. "chartreuse": [127, 255, 0],
  48236. "chocolate": [210, 105, 30],
  48237. "coral": [255, 127, 80],
  48238. "cornflowerblue": [100, 149, 237],
  48239. "cornsilk": [255, 248, 220],
  48240. "crimson": [220, 20, 60],
  48241. "cyan": [0, 255, 255],
  48242. "darkblue": [0, 0, 139],
  48243. "darkcyan": [0, 139, 139],
  48244. "darkgoldenrod": [184, 134, 11],
  48245. "darkgray": [169, 169, 169],
  48246. "darkgreen": [0, 100, 0],
  48247. "darkgrey": [169, 169, 169],
  48248. "darkkhaki": [189, 183, 107],
  48249. "darkmagenta": [139, 0, 139],
  48250. "darkolivegreen": [85, 107, 47],
  48251. "darkorange": [255, 140, 0],
  48252. "darkorchid": [153, 50, 204],
  48253. "darkred": [139, 0, 0],
  48254. "darksalmon": [233, 150, 122],
  48255. "darkseagreen": [143, 188, 143],
  48256. "darkslateblue": [72, 61, 139],
  48257. "darkslategray": [47, 79, 79],
  48258. "darkslategrey": [47, 79, 79],
  48259. "darkturquoise": [0, 206, 209],
  48260. "darkviolet": [148, 0, 211],
  48261. "deeppink": [255, 20, 147],
  48262. "deepskyblue": [0, 191, 255],
  48263. "dimgray": [105, 105, 105],
  48264. "dimgrey": [105, 105, 105],
  48265. "dodgerblue": [30, 144, 255],
  48266. "firebrick": [178, 34, 34],
  48267. "floralwhite": [255, 250, 240],
  48268. "forestgreen": [34, 139, 34],
  48269. "fuchsia": [255, 0, 255],
  48270. "gainsboro": [220, 220, 220],
  48271. "ghostwhite": [248, 248, 255],
  48272. "gold": [255, 215, 0],
  48273. "goldenrod": [218, 165, 32],
  48274. "gray": [128, 128, 128],
  48275. "green": [0, 128, 0],
  48276. "greenyellow": [173, 255, 47],
  48277. "grey": [128, 128, 128],
  48278. "honeydew": [240, 255, 240],
  48279. "hotpink": [255, 105, 180],
  48280. "indianred": [205, 92, 92],
  48281. "indigo": [75, 0, 130],
  48282. "ivory": [255, 255, 240],
  48283. "khaki": [240, 230, 140],
  48284. "lavender": [230, 230, 250],
  48285. "lavenderblush": [255, 240, 245],
  48286. "lawngreen": [124, 252, 0],
  48287. "lemonchiffon": [255, 250, 205],
  48288. "lightblue": [173, 216, 230],
  48289. "lightcoral": [240, 128, 128],
  48290. "lightcyan": [224, 255, 255],
  48291. "lightgoldenrodyellow": [250, 250, 210],
  48292. "lightgray": [211, 211, 211],
  48293. "lightgreen": [144, 238, 144],
  48294. "lightgrey": [211, 211, 211],
  48295. "lightpink": [255, 182, 193],
  48296. "lightsalmon": [255, 160, 122],
  48297. "lightseagreen": [32, 178, 170],
  48298. "lightskyblue": [135, 206, 250],
  48299. "lightslategray": [119, 136, 153],
  48300. "lightslategrey": [119, 136, 153],
  48301. "lightsteelblue": [176, 196, 222],
  48302. "lightyellow": [255, 255, 224],
  48303. "lime": [0, 255, 0],
  48304. "limegreen": [50, 205, 50],
  48305. "linen": [250, 240, 230],
  48306. "magenta": [255, 0, 255],
  48307. "maroon": [128, 0, 0],
  48308. "mediumaquamarine": [102, 205, 170],
  48309. "mediumblue": [0, 0, 205],
  48310. "mediumorchid": [186, 85, 211],
  48311. "mediumpurple": [147, 112, 219],
  48312. "mediumseagreen": [60, 179, 113],
  48313. "mediumslateblue": [123, 104, 238],
  48314. "mediumspringgreen": [0, 250, 154],
  48315. "mediumturquoise": [72, 209, 204],
  48316. "mediumvioletred": [199, 21, 133],
  48317. "midnightblue": [25, 25, 112],
  48318. "mintcream": [245, 255, 250],
  48319. "mistyrose": [255, 228, 225],
  48320. "moccasin": [255, 228, 181],
  48321. "navajowhite": [255, 222, 173],
  48322. "navy": [0, 0, 128],
  48323. "oldlace": [253, 245, 230],
  48324. "olive": [128, 128, 0],
  48325. "olivedrab": [107, 142, 35],
  48326. "orange": [255, 165, 0],
  48327. "orangered": [255, 69, 0],
  48328. "orchid": [218, 112, 214],
  48329. "palegoldenrod": [238, 232, 170],
  48330. "palegreen": [152, 251, 152],
  48331. "paleturquoise": [175, 238, 238],
  48332. "palevioletred": [219, 112, 147],
  48333. "papayawhip": [255, 239, 213],
  48334. "peachpuff": [255, 218, 185],
  48335. "peru": [205, 133, 63],
  48336. "pink": [255, 192, 203],
  48337. "plum": [221, 160, 221],
  48338. "powderblue": [176, 224, 230],
  48339. "purple": [128, 0, 128],
  48340. "rebeccapurple": [102, 51, 153],
  48341. "red": [255, 0, 0],
  48342. "rosybrown": [188, 143, 143],
  48343. "royalblue": [65, 105, 225],
  48344. "saddlebrown": [139, 69, 19],
  48345. "salmon": [250, 128, 114],
  48346. "sandybrown": [244, 164, 96],
  48347. "seagreen": [46, 139, 87],
  48348. "seashell": [255, 245, 238],
  48349. "sienna": [160, 82, 45],
  48350. "silver": [192, 192, 192],
  48351. "skyblue": [135, 206, 235],
  48352. "slateblue": [106, 90, 205],
  48353. "slategray": [112, 128, 144],
  48354. "slategrey": [112, 128, 144],
  48355. "snow": [255, 250, 250],
  48356. "springgreen": [0, 255, 127],
  48357. "steelblue": [70, 130, 180],
  48358. "tan": [210, 180, 140],
  48359. "teal": [0, 128, 128],
  48360. "thistle": [216, 191, 216],
  48361. "tomato": [255, 99, 71],
  48362. "turquoise": [64, 224, 208],
  48363. "violet": [238, 130, 238],
  48364. "wheat": [245, 222, 179],
  48365. "white": [255, 255, 255],
  48366. "whitesmoke": [245, 245, 245],
  48367. "yellow": [255, 255, 0],
  48368. "yellowgreen": [154, 205, 50]
  48369. };
  48370. /***/ }),
  48371. /* 484 */
  48372. /***/ (function(module, exports, __webpack_require__) {
  48373. var conversions = __webpack_require__(328);
  48374. /*
  48375. this function routes a model to all other models.
  48376. all functions that are routed have a property `.conversion` attached
  48377. to the returned synthetic function. This property is an array
  48378. of strings, each with the steps in between the 'from' and 'to'
  48379. color models (inclusive).
  48380. conversions that are not possible simply are not included.
  48381. */
  48382. function buildGraph() {
  48383. var graph = {};
  48384. // https://jsperf.com/object-keys-vs-for-in-with-closure/3
  48385. var models = Object.keys(conversions);
  48386. for (var len = models.length, i = 0; i < len; i++) {
  48387. graph[models[i]] = {
  48388. // http://jsperf.com/1-vs-infinity
  48389. // micro-opt, but this is simple.
  48390. distance: -1,
  48391. parent: null
  48392. };
  48393. }
  48394. return graph;
  48395. }
  48396. // https://en.wikipedia.org/wiki/Breadth-first_search
  48397. function deriveBFS(fromModel) {
  48398. var graph = buildGraph();
  48399. var queue = [fromModel]; // unshift -> queue -> pop
  48400. graph[fromModel].distance = 0;
  48401. while (queue.length) {
  48402. var current = queue.pop();
  48403. var adjacents = Object.keys(conversions[current]);
  48404. for (var len = adjacents.length, i = 0; i < len; i++) {
  48405. var adjacent = adjacents[i];
  48406. var node = graph[adjacent];
  48407. if (node.distance === -1) {
  48408. node.distance = graph[current].distance + 1;
  48409. node.parent = current;
  48410. queue.unshift(adjacent);
  48411. }
  48412. }
  48413. }
  48414. return graph;
  48415. }
  48416. function link(from, to) {
  48417. return function (args) {
  48418. return to(from(args));
  48419. };
  48420. }
  48421. function wrapConversion(toModel, graph) {
  48422. var path = [graph[toModel].parent, toModel];
  48423. var fn = conversions[graph[toModel].parent][toModel];
  48424. var cur = graph[toModel].parent;
  48425. while (graph[cur].parent) {
  48426. path.unshift(graph[cur].parent);
  48427. fn = link(conversions[graph[cur].parent][cur], fn);
  48428. cur = graph[cur].parent;
  48429. }
  48430. fn.conversion = path;
  48431. return fn;
  48432. }
  48433. module.exports = function (fromModel) {
  48434. var graph = deriveBFS(fromModel);
  48435. var conversion = {};
  48436. var models = Object.keys(graph);
  48437. for (var len = models.length, i = 0; i < len; i++) {
  48438. var toModel = models[i];
  48439. var node = graph[toModel];
  48440. if (node.parent === null) {
  48441. // no possible conversion, or this node is the source model.
  48442. continue;
  48443. }
  48444. conversion[toModel] = wrapConversion(toModel, graph);
  48445. }
  48446. return conversion;
  48447. };
  48448. /***/ }),
  48449. /* 485 */
  48450. /***/ (function(module, exports, __webpack_require__) {
  48451. "use strict";
  48452. const os = __webpack_require__(329);
  48453. const hasFlag = __webpack_require__(486);
  48454. const env = process.env;
  48455. const support = level => {
  48456. if (level === 0) {
  48457. return false;
  48458. }
  48459. return {
  48460. level,
  48461. hasBasic: true,
  48462. has256: level >= 2,
  48463. has16m: level >= 3
  48464. };
  48465. };
  48466. let supportLevel = (() => {
  48467. if (hasFlag('no-color') ||
  48468. hasFlag('no-colors') ||
  48469. hasFlag('color=false')) {
  48470. return 0;
  48471. }
  48472. if (hasFlag('color=16m') ||
  48473. hasFlag('color=full') ||
  48474. hasFlag('color=truecolor')) {
  48475. return 3;
  48476. }
  48477. if (hasFlag('color=256')) {
  48478. return 2;
  48479. }
  48480. if (hasFlag('color') ||
  48481. hasFlag('colors') ||
  48482. hasFlag('color=true') ||
  48483. hasFlag('color=always')) {
  48484. return 1;
  48485. }
  48486. if (process.stdout && !process.stdout.isTTY) {
  48487. return 0;
  48488. }
  48489. if (process.platform === 'win32') {
  48490. // Node.js 7.5.0 is the first version of Node.js to include a patch to
  48491. // libuv that enables 256 color output on Windows. Anything earlier and it
  48492. // won't work. However, here we target Node.js 8 at minimum as it is an LTS
  48493. // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
  48494. // release that supports 256 colors.
  48495. const osRelease = os.release().split('.');
  48496. if (
  48497. Number(process.versions.node.split('.')[0]) >= 8 &&
  48498. Number(osRelease[0]) >= 10 &&
  48499. Number(osRelease[2]) >= 10586
  48500. ) {
  48501. return 2;
  48502. }
  48503. return 1;
  48504. }
  48505. if ('CI' in env) {
  48506. if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
  48507. return 1;
  48508. }
  48509. return 0;
  48510. }
  48511. if ('TEAMCITY_VERSION' in env) {
  48512. return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
  48513. }
  48514. if ('TERM_PROGRAM' in env) {
  48515. const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
  48516. switch (env.TERM_PROGRAM) {
  48517. case 'iTerm.app':
  48518. return version >= 3 ? 3 : 2;
  48519. case 'Hyper':
  48520. return 3;
  48521. case 'Apple_Terminal':
  48522. return 2;
  48523. // No default
  48524. }
  48525. }
  48526. if (/-256(color)?$/i.test(env.TERM)) {
  48527. return 2;
  48528. }
  48529. if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
  48530. return 1;
  48531. }
  48532. if ('COLORTERM' in env) {
  48533. return 1;
  48534. }
  48535. if (env.TERM === 'dumb') {
  48536. return 0;
  48537. }
  48538. return 0;
  48539. })();
  48540. if ('FORCE_COLOR' in env) {
  48541. supportLevel = parseInt(env.FORCE_COLOR, 10) === 0 ? 0 : (supportLevel || 1);
  48542. }
  48543. module.exports = process && support(supportLevel);
  48544. /***/ }),
  48545. /* 486 */
  48546. /***/ (function(module, exports, __webpack_require__) {
  48547. "use strict";
  48548. module.exports = function (flag, argv) {
  48549. argv = argv || process.argv;
  48550. var terminatorPos = argv.indexOf('--');
  48551. var prefix = /^-{1,2}/.test(flag) ? '' : '--';
  48552. var pos = argv.indexOf(prefix + flag);
  48553. return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
  48554. };
  48555. /***/ }),
  48556. /* 487 */
  48557. /***/ (function(module, exports, __webpack_require__) {
  48558. "use strict";
  48559. const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
  48560. const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
  48561. const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
  48562. const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
  48563. const ESCAPES = new Map([
  48564. ['n', '\n'],
  48565. ['r', '\r'],
  48566. ['t', '\t'],
  48567. ['b', '\b'],
  48568. ['f', '\f'],
  48569. ['v', '\v'],
  48570. ['0', '\0'],
  48571. ['\\', '\\'],
  48572. ['e', '\u001B'],
  48573. ['a', '\u0007']
  48574. ]);
  48575. function unescape(c) {
  48576. if ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) {
  48577. return String.fromCharCode(parseInt(c.slice(1), 16));
  48578. }
  48579. return ESCAPES.get(c) || c;
  48580. }
  48581. function parseArguments(name, args) {
  48582. const results = [];
  48583. const chunks = args.trim().split(/\s*,\s*/g);
  48584. let matches;
  48585. for (const chunk of chunks) {
  48586. if (!isNaN(chunk)) {
  48587. results.push(Number(chunk));
  48588. } else if ((matches = chunk.match(STRING_REGEX))) {
  48589. results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
  48590. } else {
  48591. throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
  48592. }
  48593. }
  48594. return results;
  48595. }
  48596. function parseStyle(style) {
  48597. STYLE_REGEX.lastIndex = 0;
  48598. const results = [];
  48599. let matches;
  48600. while ((matches = STYLE_REGEX.exec(style)) !== null) {
  48601. const name = matches[1];
  48602. if (matches[2]) {
  48603. const args = parseArguments(name, matches[2]);
  48604. results.push([name].concat(args));
  48605. } else {
  48606. results.push([name]);
  48607. }
  48608. }
  48609. return results;
  48610. }
  48611. function buildStyle(chalk, styles) {
  48612. const enabled = {};
  48613. for (const layer of styles) {
  48614. for (const style of layer.styles) {
  48615. enabled[style[0]] = layer.inverse ? null : style.slice(1);
  48616. }
  48617. }
  48618. let current = chalk;
  48619. for (const styleName of Object.keys(enabled)) {
  48620. if (Array.isArray(enabled[styleName])) {
  48621. if (!(styleName in current)) {
  48622. throw new Error(`Unknown Chalk style: ${styleName}`);
  48623. }
  48624. if (enabled[styleName].length > 0) {
  48625. current = current[styleName].apply(current, enabled[styleName]);
  48626. } else {
  48627. current = current[styleName];
  48628. }
  48629. }
  48630. }
  48631. return current;
  48632. }
  48633. module.exports = (chalk, tmp) => {
  48634. const styles = [];
  48635. const chunks = [];
  48636. let chunk = [];
  48637. // eslint-disable-next-line max-params
  48638. tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
  48639. if (escapeChar) {
  48640. chunk.push(unescape(escapeChar));
  48641. } else if (style) {
  48642. const str = chunk.join('');
  48643. chunk = [];
  48644. chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
  48645. styles.push({inverse, styles: parseStyle(style)});
  48646. } else if (close) {
  48647. if (styles.length === 0) {
  48648. throw new Error('Found extraneous } in Chalk template literal');
  48649. }
  48650. chunks.push(buildStyle(chalk, styles)(chunk.join('')));
  48651. chunk = [];
  48652. styles.pop();
  48653. } else {
  48654. chunk.push(chr);
  48655. }
  48656. });
  48657. chunks.push(chunk.join(''));
  48658. if (styles.length > 0) {
  48659. const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`;
  48660. throw new Error(errMsg);
  48661. }
  48662. return chunks.join('');
  48663. };
  48664. /***/ }),
  48665. /* 488 */
  48666. /***/ (function(module, exports, __webpack_require__) {
  48667. const levels = {
  48668. debug: 0,
  48669. secret: 0,
  48670. info: 10,
  48671. warn: 20,
  48672. error: 30,
  48673. ok: 40,
  48674. critical: 40
  48675. }
  48676. const Secret = __webpack_require__(330)
  48677. const filterSecrets = function (level, type, message, label, namespace) {
  48678. if (type !== 'secret' && message instanceof Secret) {
  48679. throw new Error('You should log a secret with log.secret')
  48680. }
  48681. }
  48682. const filterLevel = function (level, type, message, label, namespace) {
  48683. return levels[type] >= levels[level]
  48684. }
  48685. module.exports = {
  48686. filterSecrets,
  48687. filterLevel
  48688. }
  48689. /***/ }),
  48690. /* 489 */
  48691. /***/ (function(module, exports, __webpack_require__) {
  48692. "use strict";
  48693. /* WEBPACK VAR INJECTION */(function(module) {
  48694. var Bluebird = __webpack_require__(43).getNewLibraryCopy(),
  48695. configure = __webpack_require__(520),
  48696. stealthyRequire = __webpack_require__(526);
  48697. try {
  48698. // Load Request freshly - so that users can require an unaltered request instance!
  48699. var request = stealthyRequire(__webpack_require__.c, function () {
  48700. return __webpack_require__(527);
  48701. },
  48702. function () {
  48703. __webpack_require__(337);
  48704. }, module);
  48705. } catch (err) {
  48706. /* istanbul ignore next */
  48707. var EOL = __webpack_require__(329).EOL;
  48708. /* istanbul ignore next */
  48709. console.error(EOL + '###' + EOL + '### The "request" library is not installed automatically anymore.' + EOL + '### But required by "request-promise".' + EOL + '###' + EOL + '### npm install request --save' + EOL + '###' + EOL);
  48710. /* istanbul ignore next */
  48711. throw err;
  48712. }
  48713. Bluebird.config({cancellation: true});
  48714. configure({
  48715. request: request,
  48716. PromiseImpl: Bluebird,
  48717. expose: [
  48718. 'then',
  48719. 'catch',
  48720. 'finally',
  48721. 'cancel',
  48722. 'promise'
  48723. // Would you like to expose more Bluebird methods? Try e.g. `rp(...).promise().tap(...)` first. `.promise()` returns the full-fledged Bluebird promise.
  48724. ],
  48725. constructorMixin: function (resolve, reject, onCancel) {
  48726. var self = this;
  48727. onCancel(function () {
  48728. self.abort();
  48729. });
  48730. }
  48731. });
  48732. request.bindCLS = function RP$bindCLS() {
  48733. throw new Error('CLS support was dropped. To get it back read: https://github.com/request/request-promise/wiki/Getting-Back-Support-for-Continuation-Local-Storage');
  48734. };
  48735. module.exports = request;
  48736. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(58)(module)))
  48737. /***/ }),
  48738. /* 490 */
  48739. /***/ (function(module, exports, __webpack_require__) {
  48740. "use strict";
  48741. module.exports = function() {
  48742. var makeSelfResolutionError = function () {
  48743. return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/MqrFmX\u000a");
  48744. };
  48745. var reflectHandler = function() {
  48746. return new Promise.PromiseInspection(this._target());
  48747. };
  48748. var apiRejection = function(msg) {
  48749. return Promise.reject(new TypeError(msg));
  48750. };
  48751. function Proxyable() {}
  48752. var UNDEFINED_BINDING = {};
  48753. var util = __webpack_require__(4);
  48754. var getDomain;
  48755. if (util.isNode) {
  48756. getDomain = function() {
  48757. var ret = process.domain;
  48758. if (ret === undefined) ret = null;
  48759. return ret;
  48760. };
  48761. } else {
  48762. getDomain = function() {
  48763. return null;
  48764. };
  48765. }
  48766. util.notEnumerableProp(Promise, "_getDomain", getDomain);
  48767. var es5 = __webpack_require__(59);
  48768. var Async = __webpack_require__(491);
  48769. var async = new Async();
  48770. es5.defineProperty(Promise, "_async", {value: async});
  48771. var errors = __webpack_require__(37);
  48772. var TypeError = Promise.TypeError = errors.TypeError;
  48773. Promise.RangeError = errors.RangeError;
  48774. var CancellationError = Promise.CancellationError = errors.CancellationError;
  48775. Promise.TimeoutError = errors.TimeoutError;
  48776. Promise.OperationalError = errors.OperationalError;
  48777. Promise.RejectionError = errors.OperationalError;
  48778. Promise.AggregateError = errors.AggregateError;
  48779. var INTERNAL = function(){};
  48780. var APPLY = {};
  48781. var NEXT_FILTER = {};
  48782. var tryConvertToPromise = __webpack_require__(494)(Promise, INTERNAL);
  48783. var PromiseArray =
  48784. __webpack_require__(495)(Promise, INTERNAL,
  48785. tryConvertToPromise, apiRejection, Proxyable);
  48786. var Context = __webpack_require__(496)(Promise);
  48787. /*jshint unused:false*/
  48788. var createContext = Context.create;
  48789. var debug = __webpack_require__(497)(Promise, Context);
  48790. var CapturedTrace = debug.CapturedTrace;
  48791. var PassThroughHandlerContext =
  48792. __webpack_require__(498)(Promise, tryConvertToPromise, NEXT_FILTER);
  48793. var catchFilter = __webpack_require__(332)(NEXT_FILTER);
  48794. var nodebackForPromise = __webpack_require__(333);
  48795. var errorObj = util.errorObj;
  48796. var tryCatch = util.tryCatch;
  48797. function check(self, executor) {
  48798. if (self == null || self.constructor !== Promise) {
  48799. throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a");
  48800. }
  48801. if (typeof executor !== "function") {
  48802. throw new TypeError("expecting a function but got " + util.classString(executor));
  48803. }
  48804. }
  48805. function Promise(executor) {
  48806. if (executor !== INTERNAL) {
  48807. check(this, executor);
  48808. }
  48809. this._bitField = 0;
  48810. this._fulfillmentHandler0 = undefined;
  48811. this._rejectionHandler0 = undefined;
  48812. this._promise0 = undefined;
  48813. this._receiver0 = undefined;
  48814. this._resolveFromExecutor(executor);
  48815. this._promiseCreated();
  48816. this._fireEvent("promiseCreated", this);
  48817. }
  48818. Promise.prototype.toString = function () {
  48819. return "[object Promise]";
  48820. };
  48821. Promise.prototype.caught = Promise.prototype["catch"] = function (fn) {
  48822. var len = arguments.length;
  48823. if (len > 1) {
  48824. var catchInstances = new Array(len - 1),
  48825. j = 0, i;
  48826. for (i = 0; i < len - 1; ++i) {
  48827. var item = arguments[i];
  48828. if (util.isObject(item)) {
  48829. catchInstances[j++] = item;
  48830. } else {
  48831. return apiRejection("Catch statement predicate: " +
  48832. "expecting an object but got " + util.classString(item));
  48833. }
  48834. }
  48835. catchInstances.length = j;
  48836. fn = arguments[i];
  48837. return this.then(undefined, catchFilter(catchInstances, fn, this));
  48838. }
  48839. return this.then(undefined, fn);
  48840. };
  48841. Promise.prototype.reflect = function () {
  48842. return this._then(reflectHandler,
  48843. reflectHandler, undefined, this, undefined);
  48844. };
  48845. Promise.prototype.then = function (didFulfill, didReject) {
  48846. if (debug.warnings() && arguments.length > 0 &&
  48847. typeof didFulfill !== "function" &&
  48848. typeof didReject !== "function") {
  48849. var msg = ".then() only accepts functions but was passed: " +
  48850. util.classString(didFulfill);
  48851. if (arguments.length > 1) {
  48852. msg += ", " + util.classString(didReject);
  48853. }
  48854. this._warn(msg);
  48855. }
  48856. return this._then(didFulfill, didReject, undefined, undefined, undefined);
  48857. };
  48858. Promise.prototype.done = function (didFulfill, didReject) {
  48859. var promise =
  48860. this._then(didFulfill, didReject, undefined, undefined, undefined);
  48861. promise._setIsFinal();
  48862. };
  48863. Promise.prototype.spread = function (fn) {
  48864. if (typeof fn !== "function") {
  48865. return apiRejection("expecting a function but got " + util.classString(fn));
  48866. }
  48867. return this.all()._then(fn, undefined, undefined, APPLY, undefined);
  48868. };
  48869. Promise.prototype.toJSON = function () {
  48870. var ret = {
  48871. isFulfilled: false,
  48872. isRejected: false,
  48873. fulfillmentValue: undefined,
  48874. rejectionReason: undefined
  48875. };
  48876. if (this.isFulfilled()) {
  48877. ret.fulfillmentValue = this.value();
  48878. ret.isFulfilled = true;
  48879. } else if (this.isRejected()) {
  48880. ret.rejectionReason = this.reason();
  48881. ret.isRejected = true;
  48882. }
  48883. return ret;
  48884. };
  48885. Promise.prototype.all = function () {
  48886. if (arguments.length > 0) {
  48887. this._warn(".all() was passed arguments but it does not take any");
  48888. }
  48889. return new PromiseArray(this).promise();
  48890. };
  48891. Promise.prototype.error = function (fn) {
  48892. return this.caught(util.originatesFromRejection, fn);
  48893. };
  48894. Promise.getNewLibraryCopy = module.exports;
  48895. Promise.is = function (val) {
  48896. return val instanceof Promise;
  48897. };
  48898. Promise.fromNode = Promise.fromCallback = function(fn) {
  48899. var ret = new Promise(INTERNAL);
  48900. ret._captureStackTrace();
  48901. var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs
  48902. : false;
  48903. var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs));
  48904. if (result === errorObj) {
  48905. ret._rejectCallback(result.e, true);
  48906. }
  48907. if (!ret._isFateSealed()) ret._setAsyncGuaranteed();
  48908. return ret;
  48909. };
  48910. Promise.all = function (promises) {
  48911. return new PromiseArray(promises).promise();
  48912. };
  48913. Promise.cast = function (obj) {
  48914. var ret = tryConvertToPromise(obj);
  48915. if (!(ret instanceof Promise)) {
  48916. ret = new Promise(INTERNAL);
  48917. ret._captureStackTrace();
  48918. ret._setFulfilled();
  48919. ret._rejectionHandler0 = obj;
  48920. }
  48921. return ret;
  48922. };
  48923. Promise.resolve = Promise.fulfilled = Promise.cast;
  48924. Promise.reject = Promise.rejected = function (reason) {
  48925. var ret = new Promise(INTERNAL);
  48926. ret._captureStackTrace();
  48927. ret._rejectCallback(reason, true);
  48928. return ret;
  48929. };
  48930. Promise.setScheduler = function(fn) {
  48931. if (typeof fn !== "function") {
  48932. throw new TypeError("expecting a function but got " + util.classString(fn));
  48933. }
  48934. return async.setScheduler(fn);
  48935. };
  48936. Promise.prototype._then = function (
  48937. didFulfill,
  48938. didReject,
  48939. _, receiver,
  48940. internalData
  48941. ) {
  48942. var haveInternalData = internalData !== undefined;
  48943. var promise = haveInternalData ? internalData : new Promise(INTERNAL);
  48944. var target = this._target();
  48945. var bitField = target._bitField;
  48946. if (!haveInternalData) {
  48947. promise._propagateFrom(this, 3);
  48948. promise._captureStackTrace();
  48949. if (receiver === undefined &&
  48950. ((this._bitField & 2097152) !== 0)) {
  48951. if (!((bitField & 50397184) === 0)) {
  48952. receiver = this._boundValue();
  48953. } else {
  48954. receiver = target === this ? undefined : this._boundTo;
  48955. }
  48956. }
  48957. this._fireEvent("promiseChained", this, promise);
  48958. }
  48959. var domain = getDomain();
  48960. if (!((bitField & 50397184) === 0)) {
  48961. var handler, value, settler = target._settlePromiseCtx;
  48962. if (((bitField & 33554432) !== 0)) {
  48963. value = target._rejectionHandler0;
  48964. handler = didFulfill;
  48965. } else if (((bitField & 16777216) !== 0)) {
  48966. value = target._fulfillmentHandler0;
  48967. handler = didReject;
  48968. target._unsetRejectionIsUnhandled();
  48969. } else {
  48970. settler = target._settlePromiseLateCancellationObserver;
  48971. value = new CancellationError("late cancellation observer");
  48972. target._attachExtraTrace(value);
  48973. handler = didReject;
  48974. }
  48975. async.invoke(settler, target, {
  48976. handler: domain === null ? handler
  48977. : (typeof handler === "function" &&
  48978. util.domainBind(domain, handler)),
  48979. promise: promise,
  48980. receiver: receiver,
  48981. value: value
  48982. });
  48983. } else {
  48984. target._addCallbacks(didFulfill, didReject, promise, receiver, domain);
  48985. }
  48986. return promise;
  48987. };
  48988. Promise.prototype._length = function () {
  48989. return this._bitField & 65535;
  48990. };
  48991. Promise.prototype._isFateSealed = function () {
  48992. return (this._bitField & 117506048) !== 0;
  48993. };
  48994. Promise.prototype._isFollowing = function () {
  48995. return (this._bitField & 67108864) === 67108864;
  48996. };
  48997. Promise.prototype._setLength = function (len) {
  48998. this._bitField = (this._bitField & -65536) |
  48999. (len & 65535);
  49000. };
  49001. Promise.prototype._setFulfilled = function () {
  49002. this._bitField = this._bitField | 33554432;
  49003. this._fireEvent("promiseFulfilled", this);
  49004. };
  49005. Promise.prototype._setRejected = function () {
  49006. this._bitField = this._bitField | 16777216;
  49007. this._fireEvent("promiseRejected", this);
  49008. };
  49009. Promise.prototype._setFollowing = function () {
  49010. this._bitField = this._bitField | 67108864;
  49011. this._fireEvent("promiseResolved", this);
  49012. };
  49013. Promise.prototype._setIsFinal = function () {
  49014. this._bitField = this._bitField | 4194304;
  49015. };
  49016. Promise.prototype._isFinal = function () {
  49017. return (this._bitField & 4194304) > 0;
  49018. };
  49019. Promise.prototype._unsetCancelled = function() {
  49020. this._bitField = this._bitField & (~65536);
  49021. };
  49022. Promise.prototype._setCancelled = function() {
  49023. this._bitField = this._bitField | 65536;
  49024. this._fireEvent("promiseCancelled", this);
  49025. };
  49026. Promise.prototype._setWillBeCancelled = function() {
  49027. this._bitField = this._bitField | 8388608;
  49028. };
  49029. Promise.prototype._setAsyncGuaranteed = function() {
  49030. if (async.hasCustomScheduler()) return;
  49031. this._bitField = this._bitField | 134217728;
  49032. };
  49033. Promise.prototype._receiverAt = function (index) {
  49034. var ret = index === 0 ? this._receiver0 : this[
  49035. index * 4 - 4 + 3];
  49036. if (ret === UNDEFINED_BINDING) {
  49037. return undefined;
  49038. } else if (ret === undefined && this._isBound()) {
  49039. return this._boundValue();
  49040. }
  49041. return ret;
  49042. };
  49043. Promise.prototype._promiseAt = function (index) {
  49044. return this[
  49045. index * 4 - 4 + 2];
  49046. };
  49047. Promise.prototype._fulfillmentHandlerAt = function (index) {
  49048. return this[
  49049. index * 4 - 4 + 0];
  49050. };
  49051. Promise.prototype._rejectionHandlerAt = function (index) {
  49052. return this[
  49053. index * 4 - 4 + 1];
  49054. };
  49055. Promise.prototype._boundValue = function() {};
  49056. Promise.prototype._migrateCallback0 = function (follower) {
  49057. var bitField = follower._bitField;
  49058. var fulfill = follower._fulfillmentHandler0;
  49059. var reject = follower._rejectionHandler0;
  49060. var promise = follower._promise0;
  49061. var receiver = follower._receiverAt(0);
  49062. if (receiver === undefined) receiver = UNDEFINED_BINDING;
  49063. this._addCallbacks(fulfill, reject, promise, receiver, null);
  49064. };
  49065. Promise.prototype._migrateCallbackAt = function (follower, index) {
  49066. var fulfill = follower._fulfillmentHandlerAt(index);
  49067. var reject = follower._rejectionHandlerAt(index);
  49068. var promise = follower._promiseAt(index);
  49069. var receiver = follower._receiverAt(index);
  49070. if (receiver === undefined) receiver = UNDEFINED_BINDING;
  49071. this._addCallbacks(fulfill, reject, promise, receiver, null);
  49072. };
  49073. Promise.prototype._addCallbacks = function (
  49074. fulfill,
  49075. reject,
  49076. promise,
  49077. receiver,
  49078. domain
  49079. ) {
  49080. var index = this._length();
  49081. if (index >= 65535 - 4) {
  49082. index = 0;
  49083. this._setLength(0);
  49084. }
  49085. if (index === 0) {
  49086. this._promise0 = promise;
  49087. this._receiver0 = receiver;
  49088. if (typeof fulfill === "function") {
  49089. this._fulfillmentHandler0 =
  49090. domain === null ? fulfill : util.domainBind(domain, fulfill);
  49091. }
  49092. if (typeof reject === "function") {
  49093. this._rejectionHandler0 =
  49094. domain === null ? reject : util.domainBind(domain, reject);
  49095. }
  49096. } else {
  49097. var base = index * 4 - 4;
  49098. this[base + 2] = promise;
  49099. this[base + 3] = receiver;
  49100. if (typeof fulfill === "function") {
  49101. this[base + 0] =
  49102. domain === null ? fulfill : util.domainBind(domain, fulfill);
  49103. }
  49104. if (typeof reject === "function") {
  49105. this[base + 1] =
  49106. domain === null ? reject : util.domainBind(domain, reject);
  49107. }
  49108. }
  49109. this._setLength(index + 1);
  49110. return index;
  49111. };
  49112. Promise.prototype._proxy = function (proxyable, arg) {
  49113. this._addCallbacks(undefined, undefined, arg, proxyable, null);
  49114. };
  49115. Promise.prototype._resolveCallback = function(value, shouldBind) {
  49116. if (((this._bitField & 117506048) !== 0)) return;
  49117. if (value === this)
  49118. return this._rejectCallback(makeSelfResolutionError(), false);
  49119. var maybePromise = tryConvertToPromise(value, this);
  49120. if (!(maybePromise instanceof Promise)) return this._fulfill(value);
  49121. if (shouldBind) this._propagateFrom(maybePromise, 2);
  49122. var promise = maybePromise._target();
  49123. if (promise === this) {
  49124. this._reject(makeSelfResolutionError());
  49125. return;
  49126. }
  49127. var bitField = promise._bitField;
  49128. if (((bitField & 50397184) === 0)) {
  49129. var len = this._length();
  49130. if (len > 0) promise._migrateCallback0(this);
  49131. for (var i = 1; i < len; ++i) {
  49132. promise._migrateCallbackAt(this, i);
  49133. }
  49134. this._setFollowing();
  49135. this._setLength(0);
  49136. this._setFollowee(promise);
  49137. } else if (((bitField & 33554432) !== 0)) {
  49138. this._fulfill(promise._value());
  49139. } else if (((bitField & 16777216) !== 0)) {
  49140. this._reject(promise._reason());
  49141. } else {
  49142. var reason = new CancellationError("late cancellation observer");
  49143. promise._attachExtraTrace(reason);
  49144. this._reject(reason);
  49145. }
  49146. };
  49147. Promise.prototype._rejectCallback =
  49148. function(reason, synchronous, ignoreNonErrorWarnings) {
  49149. var trace = util.ensureErrorObject(reason);
  49150. var hasStack = trace === reason;
  49151. if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) {
  49152. var message = "a promise was rejected with a non-error: " +
  49153. util.classString(reason);
  49154. this._warn(message, true);
  49155. }
  49156. this._attachExtraTrace(trace, synchronous ? hasStack : false);
  49157. this._reject(reason);
  49158. };
  49159. Promise.prototype._resolveFromExecutor = function (executor) {
  49160. if (executor === INTERNAL) return;
  49161. var promise = this;
  49162. this._captureStackTrace();
  49163. this._pushContext();
  49164. var synchronous = true;
  49165. var r = this._execute(executor, function(value) {
  49166. promise._resolveCallback(value);
  49167. }, function (reason) {
  49168. promise._rejectCallback(reason, synchronous);
  49169. });
  49170. synchronous = false;
  49171. this._popContext();
  49172. if (r !== undefined) {
  49173. promise._rejectCallback(r, true);
  49174. }
  49175. };
  49176. Promise.prototype._settlePromiseFromHandler = function (
  49177. handler, receiver, value, promise
  49178. ) {
  49179. var bitField = promise._bitField;
  49180. if (((bitField & 65536) !== 0)) return;
  49181. promise._pushContext();
  49182. var x;
  49183. if (receiver === APPLY) {
  49184. if (!value || typeof value.length !== "number") {
  49185. x = errorObj;
  49186. x.e = new TypeError("cannot .spread() a non-array: " +
  49187. util.classString(value));
  49188. } else {
  49189. x = tryCatch(handler).apply(this._boundValue(), value);
  49190. }
  49191. } else {
  49192. x = tryCatch(handler).call(receiver, value);
  49193. }
  49194. var promiseCreated = promise._popContext();
  49195. bitField = promise._bitField;
  49196. if (((bitField & 65536) !== 0)) return;
  49197. if (x === NEXT_FILTER) {
  49198. promise._reject(value);
  49199. } else if (x === errorObj) {
  49200. promise._rejectCallback(x.e, false);
  49201. } else {
  49202. debug.checkForgottenReturns(x, promiseCreated, "", promise, this);
  49203. promise._resolveCallback(x);
  49204. }
  49205. };
  49206. Promise.prototype._target = function() {
  49207. var ret = this;
  49208. while (ret._isFollowing()) ret = ret._followee();
  49209. return ret;
  49210. };
  49211. Promise.prototype._followee = function() {
  49212. return this._rejectionHandler0;
  49213. };
  49214. Promise.prototype._setFollowee = function(promise) {
  49215. this._rejectionHandler0 = promise;
  49216. };
  49217. Promise.prototype._settlePromise = function(promise, handler, receiver, value) {
  49218. var isPromise = promise instanceof Promise;
  49219. var bitField = this._bitField;
  49220. var asyncGuaranteed = ((bitField & 134217728) !== 0);
  49221. if (((bitField & 65536) !== 0)) {
  49222. if (isPromise) promise._invokeInternalOnCancel();
  49223. if (receiver instanceof PassThroughHandlerContext &&
  49224. receiver.isFinallyHandler()) {
  49225. receiver.cancelPromise = promise;
  49226. if (tryCatch(handler).call(receiver, value) === errorObj) {
  49227. promise._reject(errorObj.e);
  49228. }
  49229. } else if (handler === reflectHandler) {
  49230. promise._fulfill(reflectHandler.call(receiver));
  49231. } else if (receiver instanceof Proxyable) {
  49232. receiver._promiseCancelled(promise);
  49233. } else if (isPromise || promise instanceof PromiseArray) {
  49234. promise._cancel();
  49235. } else {
  49236. receiver.cancel();
  49237. }
  49238. } else if (typeof handler === "function") {
  49239. if (!isPromise) {
  49240. handler.call(receiver, value, promise);
  49241. } else {
  49242. if (asyncGuaranteed) promise._setAsyncGuaranteed();
  49243. this._settlePromiseFromHandler(handler, receiver, value, promise);
  49244. }
  49245. } else if (receiver instanceof Proxyable) {
  49246. if (!receiver._isResolved()) {
  49247. if (((bitField & 33554432) !== 0)) {
  49248. receiver._promiseFulfilled(value, promise);
  49249. } else {
  49250. receiver._promiseRejected(value, promise);
  49251. }
  49252. }
  49253. } else if (isPromise) {
  49254. if (asyncGuaranteed) promise._setAsyncGuaranteed();
  49255. if (((bitField & 33554432) !== 0)) {
  49256. promise._fulfill(value);
  49257. } else {
  49258. promise._reject(value);
  49259. }
  49260. }
  49261. };
  49262. Promise.prototype._settlePromiseLateCancellationObserver = function(ctx) {
  49263. var handler = ctx.handler;
  49264. var promise = ctx.promise;
  49265. var receiver = ctx.receiver;
  49266. var value = ctx.value;
  49267. if (typeof handler === "function") {
  49268. if (!(promise instanceof Promise)) {
  49269. handler.call(receiver, value, promise);
  49270. } else {
  49271. this._settlePromiseFromHandler(handler, receiver, value, promise);
  49272. }
  49273. } else if (promise instanceof Promise) {
  49274. promise._reject(value);
  49275. }
  49276. };
  49277. Promise.prototype._settlePromiseCtx = function(ctx) {
  49278. this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value);
  49279. };
  49280. Promise.prototype._settlePromise0 = function(handler, value, bitField) {
  49281. var promise = this._promise0;
  49282. var receiver = this._receiverAt(0);
  49283. this._promise0 = undefined;
  49284. this._receiver0 = undefined;
  49285. this._settlePromise(promise, handler, receiver, value);
  49286. };
  49287. Promise.prototype._clearCallbackDataAtIndex = function(index) {
  49288. var base = index * 4 - 4;
  49289. this[base + 2] =
  49290. this[base + 3] =
  49291. this[base + 0] =
  49292. this[base + 1] = undefined;
  49293. };
  49294. Promise.prototype._fulfill = function (value) {
  49295. var bitField = this._bitField;
  49296. if (((bitField & 117506048) >>> 16)) return;
  49297. if (value === this) {
  49298. var err = makeSelfResolutionError();
  49299. this._attachExtraTrace(err);
  49300. return this._reject(err);
  49301. }
  49302. this._setFulfilled();
  49303. this._rejectionHandler0 = value;
  49304. if ((bitField & 65535) > 0) {
  49305. if (((bitField & 134217728) !== 0)) {
  49306. this._settlePromises();
  49307. } else {
  49308. async.settlePromises(this);
  49309. }
  49310. }
  49311. };
  49312. Promise.prototype._reject = function (reason) {
  49313. var bitField = this._bitField;
  49314. if (((bitField & 117506048) >>> 16)) return;
  49315. this._setRejected();
  49316. this._fulfillmentHandler0 = reason;
  49317. if (this._isFinal()) {
  49318. return async.fatalError(reason, util.isNode);
  49319. }
  49320. if ((bitField & 65535) > 0) {
  49321. async.settlePromises(this);
  49322. } else {
  49323. this._ensurePossibleRejectionHandled();
  49324. }
  49325. };
  49326. Promise.prototype._fulfillPromises = function (len, value) {
  49327. for (var i = 1; i < len; i++) {
  49328. var handler = this._fulfillmentHandlerAt(i);
  49329. var promise = this._promiseAt(i);
  49330. var receiver = this._receiverAt(i);
  49331. this._clearCallbackDataAtIndex(i);
  49332. this._settlePromise(promise, handler, receiver, value);
  49333. }
  49334. };
  49335. Promise.prototype._rejectPromises = function (len, reason) {
  49336. for (var i = 1; i < len; i++) {
  49337. var handler = this._rejectionHandlerAt(i);
  49338. var promise = this._promiseAt(i);
  49339. var receiver = this._receiverAt(i);
  49340. this._clearCallbackDataAtIndex(i);
  49341. this._settlePromise(promise, handler, receiver, reason);
  49342. }
  49343. };
  49344. Promise.prototype._settlePromises = function () {
  49345. var bitField = this._bitField;
  49346. var len = (bitField & 65535);
  49347. if (len > 0) {
  49348. if (((bitField & 16842752) !== 0)) {
  49349. var reason = this._fulfillmentHandler0;
  49350. this._settlePromise0(this._rejectionHandler0, reason, bitField);
  49351. this._rejectPromises(len, reason);
  49352. } else {
  49353. var value = this._rejectionHandler0;
  49354. this._settlePromise0(this._fulfillmentHandler0, value, bitField);
  49355. this._fulfillPromises(len, value);
  49356. }
  49357. this._setLength(0);
  49358. }
  49359. this._clearCancellationData();
  49360. };
  49361. Promise.prototype._settledValue = function() {
  49362. var bitField = this._bitField;
  49363. if (((bitField & 33554432) !== 0)) {
  49364. return this._rejectionHandler0;
  49365. } else if (((bitField & 16777216) !== 0)) {
  49366. return this._fulfillmentHandler0;
  49367. }
  49368. };
  49369. function deferResolve(v) {this.promise._resolveCallback(v);}
  49370. function deferReject(v) {this.promise._rejectCallback(v, false);}
  49371. Promise.defer = Promise.pending = function() {
  49372. debug.deprecated("Promise.defer", "new Promise");
  49373. var promise = new Promise(INTERNAL);
  49374. return {
  49375. promise: promise,
  49376. resolve: deferResolve,
  49377. reject: deferReject
  49378. };
  49379. };
  49380. util.notEnumerableProp(Promise,
  49381. "_makeSelfResolutionError",
  49382. makeSelfResolutionError);
  49383. __webpack_require__(499)(Promise, INTERNAL, tryConvertToPromise, apiRejection,
  49384. debug);
  49385. __webpack_require__(500)(Promise, INTERNAL, tryConvertToPromise, debug);
  49386. __webpack_require__(501)(Promise, PromiseArray, apiRejection, debug);
  49387. __webpack_require__(502)(Promise);
  49388. __webpack_require__(503)(Promise);
  49389. __webpack_require__(504)(
  49390. Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain);
  49391. Promise.Promise = Promise;
  49392. Promise.version = "3.5.1";
  49393. __webpack_require__(505)(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);
  49394. __webpack_require__(506)(Promise);
  49395. __webpack_require__(507)(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug);
  49396. __webpack_require__(508)(Promise, INTERNAL, debug);
  49397. __webpack_require__(509)(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug);
  49398. __webpack_require__(510)(Promise);
  49399. __webpack_require__(511)(Promise, INTERNAL);
  49400. __webpack_require__(512)(Promise, PromiseArray, tryConvertToPromise, apiRejection);
  49401. __webpack_require__(513)(Promise, INTERNAL, tryConvertToPromise, apiRejection);
  49402. __webpack_require__(514)(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);
  49403. __webpack_require__(515)(Promise, PromiseArray, debug);
  49404. __webpack_require__(516)(Promise, PromiseArray, apiRejection);
  49405. __webpack_require__(517)(Promise, INTERNAL);
  49406. __webpack_require__(518)(Promise, INTERNAL);
  49407. __webpack_require__(519)(Promise);
  49408. util.toFastProperties(Promise);
  49409. util.toFastProperties(Promise.prototype);
  49410. function fillTypes(value) {
  49411. var p = new Promise(INTERNAL);
  49412. p._fulfillmentHandler0 = value;
  49413. p._rejectionHandler0 = value;
  49414. p._promise0 = value;
  49415. p._receiver0 = value;
  49416. }
  49417. // Complete slack tracking, opt out of field-type tracking and
  49418. // stabilize map
  49419. fillTypes({a: 1});
  49420. fillTypes({b: 2});
  49421. fillTypes({c: 3});
  49422. fillTypes(1);
  49423. fillTypes(function(){});
  49424. fillTypes(undefined);
  49425. fillTypes(false);
  49426. fillTypes(new Promise(INTERNAL));
  49427. debug.setBounds(Async.firstLineError, util.lastLineError);
  49428. return Promise;
  49429. };
  49430. /***/ }),
  49431. /* 491 */
  49432. /***/ (function(module, exports, __webpack_require__) {
  49433. "use strict";
  49434. var firstLineError;
  49435. try {throw new Error(); } catch (e) {firstLineError = e;}
  49436. var schedule = __webpack_require__(492);
  49437. var Queue = __webpack_require__(493);
  49438. var util = __webpack_require__(4);
  49439. function Async() {
  49440. this._customScheduler = false;
  49441. this._isTickUsed = false;
  49442. this._lateQueue = new Queue(16);
  49443. this._normalQueue = new Queue(16);
  49444. this._haveDrainedQueues = false;
  49445. this._trampolineEnabled = true;
  49446. var self = this;
  49447. this.drainQueues = function () {
  49448. self._drainQueues();
  49449. };
  49450. this._schedule = schedule;
  49451. }
  49452. Async.prototype.setScheduler = function(fn) {
  49453. var prev = this._schedule;
  49454. this._schedule = fn;
  49455. this._customScheduler = true;
  49456. return prev;
  49457. };
  49458. Async.prototype.hasCustomScheduler = function() {
  49459. return this._customScheduler;
  49460. };
  49461. Async.prototype.enableTrampoline = function() {
  49462. this._trampolineEnabled = true;
  49463. };
  49464. Async.prototype.disableTrampolineIfNecessary = function() {
  49465. if (util.hasDevTools) {
  49466. this._trampolineEnabled = false;
  49467. }
  49468. };
  49469. Async.prototype.haveItemsQueued = function () {
  49470. return this._isTickUsed || this._haveDrainedQueues;
  49471. };
  49472. Async.prototype.fatalError = function(e, isNode) {
  49473. if (isNode) {
  49474. process.stderr.write("Fatal " + (e instanceof Error ? e.stack : e) +
  49475. "\n");
  49476. process.exit(2);
  49477. } else {
  49478. this.throwLater(e);
  49479. }
  49480. };
  49481. Async.prototype.throwLater = function(fn, arg) {
  49482. if (arguments.length === 1) {
  49483. arg = fn;
  49484. fn = function () { throw arg; };
  49485. }
  49486. if (typeof setTimeout !== "undefined") {
  49487. setTimeout(function() {
  49488. fn(arg);
  49489. }, 0);
  49490. } else try {
  49491. this._schedule(function() {
  49492. fn(arg);
  49493. });
  49494. } catch (e) {
  49495. throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
  49496. }
  49497. };
  49498. function AsyncInvokeLater(fn, receiver, arg) {
  49499. this._lateQueue.push(fn, receiver, arg);
  49500. this._queueTick();
  49501. }
  49502. function AsyncInvoke(fn, receiver, arg) {
  49503. this._normalQueue.push(fn, receiver, arg);
  49504. this._queueTick();
  49505. }
  49506. function AsyncSettlePromises(promise) {
  49507. this._normalQueue._pushOne(promise);
  49508. this._queueTick();
  49509. }
  49510. if (!util.hasDevTools) {
  49511. Async.prototype.invokeLater = AsyncInvokeLater;
  49512. Async.prototype.invoke = AsyncInvoke;
  49513. Async.prototype.settlePromises = AsyncSettlePromises;
  49514. } else {
  49515. Async.prototype.invokeLater = function (fn, receiver, arg) {
  49516. if (this._trampolineEnabled) {
  49517. AsyncInvokeLater.call(this, fn, receiver, arg);
  49518. } else {
  49519. this._schedule(function() {
  49520. setTimeout(function() {
  49521. fn.call(receiver, arg);
  49522. }, 100);
  49523. });
  49524. }
  49525. };
  49526. Async.prototype.invoke = function (fn, receiver, arg) {
  49527. if (this._trampolineEnabled) {
  49528. AsyncInvoke.call(this, fn, receiver, arg);
  49529. } else {
  49530. this._schedule(function() {
  49531. fn.call(receiver, arg);
  49532. });
  49533. }
  49534. };
  49535. Async.prototype.settlePromises = function(promise) {
  49536. if (this._trampolineEnabled) {
  49537. AsyncSettlePromises.call(this, promise);
  49538. } else {
  49539. this._schedule(function() {
  49540. promise._settlePromises();
  49541. });
  49542. }
  49543. };
  49544. }
  49545. Async.prototype._drainQueue = function(queue) {
  49546. while (queue.length() > 0) {
  49547. var fn = queue.shift();
  49548. if (typeof fn !== "function") {
  49549. fn._settlePromises();
  49550. continue;
  49551. }
  49552. var receiver = queue.shift();
  49553. var arg = queue.shift();
  49554. fn.call(receiver, arg);
  49555. }
  49556. };
  49557. Async.prototype._drainQueues = function () {
  49558. this._drainQueue(this._normalQueue);
  49559. this._reset();
  49560. this._haveDrainedQueues = true;
  49561. this._drainQueue(this._lateQueue);
  49562. };
  49563. Async.prototype._queueTick = function () {
  49564. if (!this._isTickUsed) {
  49565. this._isTickUsed = true;
  49566. this._schedule(this.drainQueues);
  49567. }
  49568. };
  49569. Async.prototype._reset = function () {
  49570. this._isTickUsed = false;
  49571. };
  49572. module.exports = Async;
  49573. module.exports.firstLineError = firstLineError;
  49574. /***/ }),
  49575. /* 492 */
  49576. /***/ (function(module, exports, __webpack_require__) {
  49577. "use strict";
  49578. var util = __webpack_require__(4);
  49579. var schedule;
  49580. var noAsyncScheduler = function() {
  49581. throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
  49582. };
  49583. var NativePromise = util.getNativePromise();
  49584. if (util.isNode && typeof MutationObserver === "undefined") {
  49585. var GlobalSetImmediate = global.setImmediate;
  49586. var ProcessNextTick = process.nextTick;
  49587. schedule = util.isRecentNode
  49588. ? function(fn) { GlobalSetImmediate.call(global, fn); }
  49589. : function(fn) { ProcessNextTick.call(process, fn); };
  49590. } else if (typeof NativePromise === "function" &&
  49591. typeof NativePromise.resolve === "function") {
  49592. var nativePromise = NativePromise.resolve();
  49593. schedule = function(fn) {
  49594. nativePromise.then(fn);
  49595. };
  49596. } else if ((typeof MutationObserver !== "undefined") &&
  49597. !(typeof window !== "undefined" &&
  49598. window.navigator &&
  49599. (window.navigator.standalone || window.cordova))) {
  49600. schedule = (function() {
  49601. var div = document.createElement("div");
  49602. var opts = {attributes: true};
  49603. var toggleScheduled = false;
  49604. var div2 = document.createElement("div");
  49605. var o2 = new MutationObserver(function() {
  49606. div.classList.toggle("foo");
  49607. toggleScheduled = false;
  49608. });
  49609. o2.observe(div2, opts);
  49610. var scheduleToggle = function() {
  49611. if (toggleScheduled) return;
  49612. toggleScheduled = true;
  49613. div2.classList.toggle("foo");
  49614. };
  49615. return function schedule(fn) {
  49616. var o = new MutationObserver(function() {
  49617. o.disconnect();
  49618. fn();
  49619. });
  49620. o.observe(div, opts);
  49621. scheduleToggle();
  49622. };
  49623. })();
  49624. } else if (typeof setImmediate !== "undefined") {
  49625. schedule = function (fn) {
  49626. setImmediate(fn);
  49627. };
  49628. } else if (typeof setTimeout !== "undefined") {
  49629. schedule = function (fn) {
  49630. setTimeout(fn, 0);
  49631. };
  49632. } else {
  49633. schedule = noAsyncScheduler;
  49634. }
  49635. module.exports = schedule;
  49636. /***/ }),
  49637. /* 493 */
  49638. /***/ (function(module, exports, __webpack_require__) {
  49639. "use strict";
  49640. function arrayMove(src, srcIndex, dst, dstIndex, len) {
  49641. for (var j = 0; j < len; ++j) {
  49642. dst[j + dstIndex] = src[j + srcIndex];
  49643. src[j + srcIndex] = void 0;
  49644. }
  49645. }
  49646. function Queue(capacity) {
  49647. this._capacity = capacity;
  49648. this._length = 0;
  49649. this._front = 0;
  49650. }
  49651. Queue.prototype._willBeOverCapacity = function (size) {
  49652. return this._capacity < size;
  49653. };
  49654. Queue.prototype._pushOne = function (arg) {
  49655. var length = this.length();
  49656. this._checkCapacity(length + 1);
  49657. var i = (this._front + length) & (this._capacity - 1);
  49658. this[i] = arg;
  49659. this._length = length + 1;
  49660. };
  49661. Queue.prototype.push = function (fn, receiver, arg) {
  49662. var length = this.length() + 3;
  49663. if (this._willBeOverCapacity(length)) {
  49664. this._pushOne(fn);
  49665. this._pushOne(receiver);
  49666. this._pushOne(arg);
  49667. return;
  49668. }
  49669. var j = this._front + length - 3;
  49670. this._checkCapacity(length);
  49671. var wrapMask = this._capacity - 1;
  49672. this[(j + 0) & wrapMask] = fn;
  49673. this[(j + 1) & wrapMask] = receiver;
  49674. this[(j + 2) & wrapMask] = arg;
  49675. this._length = length;
  49676. };
  49677. Queue.prototype.shift = function () {
  49678. var front = this._front,
  49679. ret = this[front];
  49680. this[front] = undefined;
  49681. this._front = (front + 1) & (this._capacity - 1);
  49682. this._length--;
  49683. return ret;
  49684. };
  49685. Queue.prototype.length = function () {
  49686. return this._length;
  49687. };
  49688. Queue.prototype._checkCapacity = function (size) {
  49689. if (this._capacity < size) {
  49690. this._resizeTo(this._capacity << 1);
  49691. }
  49692. };
  49693. Queue.prototype._resizeTo = function (capacity) {
  49694. var oldCapacity = this._capacity;
  49695. this._capacity = capacity;
  49696. var front = this._front;
  49697. var length = this._length;
  49698. var moveItemsCount = (front + length) & (oldCapacity - 1);
  49699. arrayMove(this, 0, this, oldCapacity, moveItemsCount);
  49700. };
  49701. module.exports = Queue;
  49702. /***/ }),
  49703. /* 494 */
  49704. /***/ (function(module, exports, __webpack_require__) {
  49705. "use strict";
  49706. module.exports = function(Promise, INTERNAL) {
  49707. var util = __webpack_require__(4);
  49708. var errorObj = util.errorObj;
  49709. var isObject = util.isObject;
  49710. function tryConvertToPromise(obj, context) {
  49711. if (isObject(obj)) {
  49712. if (obj instanceof Promise) return obj;
  49713. var then = getThen(obj);
  49714. if (then === errorObj) {
  49715. if (context) context._pushContext();
  49716. var ret = Promise.reject(then.e);
  49717. if (context) context._popContext();
  49718. return ret;
  49719. } else if (typeof then === "function") {
  49720. if (isAnyBluebirdPromise(obj)) {
  49721. var ret = new Promise(INTERNAL);
  49722. obj._then(
  49723. ret._fulfill,
  49724. ret._reject,
  49725. undefined,
  49726. ret,
  49727. null
  49728. );
  49729. return ret;
  49730. }
  49731. return doThenable(obj, then, context);
  49732. }
  49733. }
  49734. return obj;
  49735. }
  49736. function doGetThen(obj) {
  49737. return obj.then;
  49738. }
  49739. function getThen(obj) {
  49740. try {
  49741. return doGetThen(obj);
  49742. } catch (e) {
  49743. errorObj.e = e;
  49744. return errorObj;
  49745. }
  49746. }
  49747. var hasProp = {}.hasOwnProperty;
  49748. function isAnyBluebirdPromise(obj) {
  49749. try {
  49750. return hasProp.call(obj, "_promise0");
  49751. } catch (e) {
  49752. return false;
  49753. }
  49754. }
  49755. function doThenable(x, then, context) {
  49756. var promise = new Promise(INTERNAL);
  49757. var ret = promise;
  49758. if (context) context._pushContext();
  49759. promise._captureStackTrace();
  49760. if (context) context._popContext();
  49761. var synchronous = true;
  49762. var result = util.tryCatch(then).call(x, resolve, reject);
  49763. synchronous = false;
  49764. if (promise && result === errorObj) {
  49765. promise._rejectCallback(result.e, true, true);
  49766. promise = null;
  49767. }
  49768. function resolve(value) {
  49769. if (!promise) return;
  49770. promise._resolveCallback(value);
  49771. promise = null;
  49772. }
  49773. function reject(reason) {
  49774. if (!promise) return;
  49775. promise._rejectCallback(reason, synchronous, true);
  49776. promise = null;
  49777. }
  49778. return ret;
  49779. }
  49780. return tryConvertToPromise;
  49781. };
  49782. /***/ }),
  49783. /* 495 */
  49784. /***/ (function(module, exports, __webpack_require__) {
  49785. "use strict";
  49786. module.exports = function(Promise, INTERNAL, tryConvertToPromise,
  49787. apiRejection, Proxyable) {
  49788. var util = __webpack_require__(4);
  49789. var isArray = util.isArray;
  49790. function toResolutionValue(val) {
  49791. switch(val) {
  49792. case -2: return [];
  49793. case -3: return {};
  49794. case -6: return new Map();
  49795. }
  49796. }
  49797. function PromiseArray(values) {
  49798. var promise = this._promise = new Promise(INTERNAL);
  49799. if (values instanceof Promise) {
  49800. promise._propagateFrom(values, 3);
  49801. }
  49802. promise._setOnCancel(this);
  49803. this._values = values;
  49804. this._length = 0;
  49805. this._totalResolved = 0;
  49806. this._init(undefined, -2);
  49807. }
  49808. util.inherits(PromiseArray, Proxyable);
  49809. PromiseArray.prototype.length = function () {
  49810. return this._length;
  49811. };
  49812. PromiseArray.prototype.promise = function () {
  49813. return this._promise;
  49814. };
  49815. PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {
  49816. var values = tryConvertToPromise(this._values, this._promise);
  49817. if (values instanceof Promise) {
  49818. values = values._target();
  49819. var bitField = values._bitField;
  49820. ;
  49821. this._values = values;
  49822. if (((bitField & 50397184) === 0)) {
  49823. this._promise._setAsyncGuaranteed();
  49824. return values._then(
  49825. init,
  49826. this._reject,
  49827. undefined,
  49828. this,
  49829. resolveValueIfEmpty
  49830. );
  49831. } else if (((bitField & 33554432) !== 0)) {
  49832. values = values._value();
  49833. } else if (((bitField & 16777216) !== 0)) {
  49834. return this._reject(values._reason());
  49835. } else {
  49836. return this._cancel();
  49837. }
  49838. }
  49839. values = util.asArray(values);
  49840. if (values === null) {
  49841. var err = apiRejection(
  49842. "expecting an array or an iterable object but got " + util.classString(values)).reason();
  49843. this._promise._rejectCallback(err, false);
  49844. return;
  49845. }
  49846. if (values.length === 0) {
  49847. if (resolveValueIfEmpty === -5) {
  49848. this._resolveEmptyArray();
  49849. }
  49850. else {
  49851. this._resolve(toResolutionValue(resolveValueIfEmpty));
  49852. }
  49853. return;
  49854. }
  49855. this._iterate(values);
  49856. };
  49857. PromiseArray.prototype._iterate = function(values) {
  49858. var len = this.getActualLength(values.length);
  49859. this._length = len;
  49860. this._values = this.shouldCopyValues() ? new Array(len) : this._values;
  49861. var result = this._promise;
  49862. var isResolved = false;
  49863. var bitField = null;
  49864. for (var i = 0; i < len; ++i) {
  49865. var maybePromise = tryConvertToPromise(values[i], result);
  49866. if (maybePromise instanceof Promise) {
  49867. maybePromise = maybePromise._target();
  49868. bitField = maybePromise._bitField;
  49869. } else {
  49870. bitField = null;
  49871. }
  49872. if (isResolved) {
  49873. if (bitField !== null) {
  49874. maybePromise.suppressUnhandledRejections();
  49875. }
  49876. } else if (bitField !== null) {
  49877. if (((bitField & 50397184) === 0)) {
  49878. maybePromise._proxy(this, i);
  49879. this._values[i] = maybePromise;
  49880. } else if (((bitField & 33554432) !== 0)) {
  49881. isResolved = this._promiseFulfilled(maybePromise._value(), i);
  49882. } else if (((bitField & 16777216) !== 0)) {
  49883. isResolved = this._promiseRejected(maybePromise._reason(), i);
  49884. } else {
  49885. isResolved = this._promiseCancelled(i);
  49886. }
  49887. } else {
  49888. isResolved = this._promiseFulfilled(maybePromise, i);
  49889. }
  49890. }
  49891. if (!isResolved) result._setAsyncGuaranteed();
  49892. };
  49893. PromiseArray.prototype._isResolved = function () {
  49894. return this._values === null;
  49895. };
  49896. PromiseArray.prototype._resolve = function (value) {
  49897. this._values = null;
  49898. this._promise._fulfill(value);
  49899. };
  49900. PromiseArray.prototype._cancel = function() {
  49901. if (this._isResolved() || !this._promise._isCancellable()) return;
  49902. this._values = null;
  49903. this._promise._cancel();
  49904. };
  49905. PromiseArray.prototype._reject = function (reason) {
  49906. this._values = null;
  49907. this._promise._rejectCallback(reason, false);
  49908. };
  49909. PromiseArray.prototype._promiseFulfilled = function (value, index) {
  49910. this._values[index] = value;
  49911. var totalResolved = ++this._totalResolved;
  49912. if (totalResolved >= this._length) {
  49913. this._resolve(this._values);
  49914. return true;
  49915. }
  49916. return false;
  49917. };
  49918. PromiseArray.prototype._promiseCancelled = function() {
  49919. this._cancel();
  49920. return true;
  49921. };
  49922. PromiseArray.prototype._promiseRejected = function (reason) {
  49923. this._totalResolved++;
  49924. this._reject(reason);
  49925. return true;
  49926. };
  49927. PromiseArray.prototype._resultCancelled = function() {
  49928. if (this._isResolved()) return;
  49929. var values = this._values;
  49930. this._cancel();
  49931. if (values instanceof Promise) {
  49932. values.cancel();
  49933. } else {
  49934. for (var i = 0; i < values.length; ++i) {
  49935. if (values[i] instanceof Promise) {
  49936. values[i].cancel();
  49937. }
  49938. }
  49939. }
  49940. };
  49941. PromiseArray.prototype.shouldCopyValues = function () {
  49942. return true;
  49943. };
  49944. PromiseArray.prototype.getActualLength = function (len) {
  49945. return len;
  49946. };
  49947. return PromiseArray;
  49948. };
  49949. /***/ }),
  49950. /* 496 */
  49951. /***/ (function(module, exports, __webpack_require__) {
  49952. "use strict";
  49953. module.exports = function(Promise) {
  49954. var longStackTraces = false;
  49955. var contextStack = [];
  49956. Promise.prototype._promiseCreated = function() {};
  49957. Promise.prototype._pushContext = function() {};
  49958. Promise.prototype._popContext = function() {return null;};
  49959. Promise._peekContext = Promise.prototype._peekContext = function() {};
  49960. function Context() {
  49961. this._trace = new Context.CapturedTrace(peekContext());
  49962. }
  49963. Context.prototype._pushContext = function () {
  49964. if (this._trace !== undefined) {
  49965. this._trace._promiseCreated = null;
  49966. contextStack.push(this._trace);
  49967. }
  49968. };
  49969. Context.prototype._popContext = function () {
  49970. if (this._trace !== undefined) {
  49971. var trace = contextStack.pop();
  49972. var ret = trace._promiseCreated;
  49973. trace._promiseCreated = null;
  49974. return ret;
  49975. }
  49976. return null;
  49977. };
  49978. function createContext() {
  49979. if (longStackTraces) return new Context();
  49980. }
  49981. function peekContext() {
  49982. var lastIndex = contextStack.length - 1;
  49983. if (lastIndex >= 0) {
  49984. return contextStack[lastIndex];
  49985. }
  49986. return undefined;
  49987. }
  49988. Context.CapturedTrace = null;
  49989. Context.create = createContext;
  49990. Context.deactivateLongStackTraces = function() {};
  49991. Context.activateLongStackTraces = function() {
  49992. var Promise_pushContext = Promise.prototype._pushContext;
  49993. var Promise_popContext = Promise.prototype._popContext;
  49994. var Promise_PeekContext = Promise._peekContext;
  49995. var Promise_peekContext = Promise.prototype._peekContext;
  49996. var Promise_promiseCreated = Promise.prototype._promiseCreated;
  49997. Context.deactivateLongStackTraces = function() {
  49998. Promise.prototype._pushContext = Promise_pushContext;
  49999. Promise.prototype._popContext = Promise_popContext;
  50000. Promise._peekContext = Promise_PeekContext;
  50001. Promise.prototype._peekContext = Promise_peekContext;
  50002. Promise.prototype._promiseCreated = Promise_promiseCreated;
  50003. longStackTraces = false;
  50004. };
  50005. longStackTraces = true;
  50006. Promise.prototype._pushContext = Context.prototype._pushContext;
  50007. Promise.prototype._popContext = Context.prototype._popContext;
  50008. Promise._peekContext = Promise.prototype._peekContext = peekContext;
  50009. Promise.prototype._promiseCreated = function() {
  50010. var ctx = this._peekContext();
  50011. if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this;
  50012. };
  50013. };
  50014. return Context;
  50015. };
  50016. /***/ }),
  50017. /* 497 */
  50018. /***/ (function(module, exports, __webpack_require__) {
  50019. "use strict";
  50020. module.exports = function(Promise, Context) {
  50021. var getDomain = Promise._getDomain;
  50022. var async = Promise._async;
  50023. var Warning = __webpack_require__(37).Warning;
  50024. var util = __webpack_require__(4);
  50025. var canAttachTrace = util.canAttachTrace;
  50026. var unhandledRejectionHandled;
  50027. var possiblyUnhandledRejection;
  50028. var bluebirdFramePattern =
  50029. /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/;
  50030. var nodeFramePattern = /\((?:timers\.js):\d+:\d+\)/;
  50031. var parseLinePattern = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/;
  50032. var stackFramePattern = null;
  50033. var formatStack = null;
  50034. var indentStackFrames = false;
  50035. var printWarning;
  50036. var debugging = !!(util.env("BLUEBIRD_DEBUG") != 0 &&
  50037. (false ||
  50038. util.env("BLUEBIRD_DEBUG") ||
  50039. util.env("NODE_ENV") === "development"));
  50040. var warnings = !!(util.env("BLUEBIRD_WARNINGS") != 0 &&
  50041. (debugging || util.env("BLUEBIRD_WARNINGS")));
  50042. var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 &&
  50043. (debugging || util.env("BLUEBIRD_LONG_STACK_TRACES")));
  50044. var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 &&
  50045. (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN"));
  50046. Promise.prototype.suppressUnhandledRejections = function() {
  50047. var target = this._target();
  50048. target._bitField = ((target._bitField & (~1048576)) |
  50049. 524288);
  50050. };
  50051. Promise.prototype._ensurePossibleRejectionHandled = function () {
  50052. if ((this._bitField & 524288) !== 0) return;
  50053. this._setRejectionIsUnhandled();
  50054. var self = this;
  50055. setTimeout(function() {
  50056. self._notifyUnhandledRejection();
  50057. }, 1);
  50058. };
  50059. Promise.prototype._notifyUnhandledRejectionIsHandled = function () {
  50060. fireRejectionEvent("rejectionHandled",
  50061. unhandledRejectionHandled, undefined, this);
  50062. };
  50063. Promise.prototype._setReturnedNonUndefined = function() {
  50064. this._bitField = this._bitField | 268435456;
  50065. };
  50066. Promise.prototype._returnedNonUndefined = function() {
  50067. return (this._bitField & 268435456) !== 0;
  50068. };
  50069. Promise.prototype._notifyUnhandledRejection = function () {
  50070. if (this._isRejectionUnhandled()) {
  50071. var reason = this._settledValue();
  50072. this._setUnhandledRejectionIsNotified();
  50073. fireRejectionEvent("unhandledRejection",
  50074. possiblyUnhandledRejection, reason, this);
  50075. }
  50076. };
  50077. Promise.prototype._setUnhandledRejectionIsNotified = function () {
  50078. this._bitField = this._bitField | 262144;
  50079. };
  50080. Promise.prototype._unsetUnhandledRejectionIsNotified = function () {
  50081. this._bitField = this._bitField & (~262144);
  50082. };
  50083. Promise.prototype._isUnhandledRejectionNotified = function () {
  50084. return (this._bitField & 262144) > 0;
  50085. };
  50086. Promise.prototype._setRejectionIsUnhandled = function () {
  50087. this._bitField = this._bitField | 1048576;
  50088. };
  50089. Promise.prototype._unsetRejectionIsUnhandled = function () {
  50090. this._bitField = this._bitField & (~1048576);
  50091. if (this._isUnhandledRejectionNotified()) {
  50092. this._unsetUnhandledRejectionIsNotified();
  50093. this._notifyUnhandledRejectionIsHandled();
  50094. }
  50095. };
  50096. Promise.prototype._isRejectionUnhandled = function () {
  50097. return (this._bitField & 1048576) > 0;
  50098. };
  50099. Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) {
  50100. return warn(message, shouldUseOwnTrace, promise || this);
  50101. };
  50102. Promise.onPossiblyUnhandledRejection = function (fn) {
  50103. var domain = getDomain();
  50104. possiblyUnhandledRejection =
  50105. typeof fn === "function" ? (domain === null ?
  50106. fn : util.domainBind(domain, fn))
  50107. : undefined;
  50108. };
  50109. Promise.onUnhandledRejectionHandled = function (fn) {
  50110. var domain = getDomain();
  50111. unhandledRejectionHandled =
  50112. typeof fn === "function" ? (domain === null ?
  50113. fn : util.domainBind(domain, fn))
  50114. : undefined;
  50115. };
  50116. var disableLongStackTraces = function() {};
  50117. Promise.longStackTraces = function () {
  50118. if (async.haveItemsQueued() && !config.longStackTraces) {
  50119. throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a");
  50120. }
  50121. if (!config.longStackTraces && longStackTracesIsSupported()) {
  50122. var Promise_captureStackTrace = Promise.prototype._captureStackTrace;
  50123. var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace;
  50124. config.longStackTraces = true;
  50125. disableLongStackTraces = function() {
  50126. if (async.haveItemsQueued() && !config.longStackTraces) {
  50127. throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a");
  50128. }
  50129. Promise.prototype._captureStackTrace = Promise_captureStackTrace;
  50130. Promise.prototype._attachExtraTrace = Promise_attachExtraTrace;
  50131. Context.deactivateLongStackTraces();
  50132. async.enableTrampoline();
  50133. config.longStackTraces = false;
  50134. };
  50135. Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace;
  50136. Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace;
  50137. Context.activateLongStackTraces();
  50138. async.disableTrampolineIfNecessary();
  50139. }
  50140. };
  50141. Promise.hasLongStackTraces = function () {
  50142. return config.longStackTraces && longStackTracesIsSupported();
  50143. };
  50144. var fireDomEvent = (function() {
  50145. try {
  50146. if (typeof CustomEvent === "function") {
  50147. var event = new CustomEvent("CustomEvent");
  50148. util.global.dispatchEvent(event);
  50149. return function(name, event) {
  50150. var domEvent = new CustomEvent(name.toLowerCase(), {
  50151. detail: event,
  50152. cancelable: true
  50153. });
  50154. return !util.global.dispatchEvent(domEvent);
  50155. };
  50156. } else if (typeof Event === "function") {
  50157. var event = new Event("CustomEvent");
  50158. util.global.dispatchEvent(event);
  50159. return function(name, event) {
  50160. var domEvent = new Event(name.toLowerCase(), {
  50161. cancelable: true
  50162. });
  50163. domEvent.detail = event;
  50164. return !util.global.dispatchEvent(domEvent);
  50165. };
  50166. } else {
  50167. var event = document.createEvent("CustomEvent");
  50168. event.initCustomEvent("testingtheevent", false, true, {});
  50169. util.global.dispatchEvent(event);
  50170. return function(name, event) {
  50171. var domEvent = document.createEvent("CustomEvent");
  50172. domEvent.initCustomEvent(name.toLowerCase(), false, true,
  50173. event);
  50174. return !util.global.dispatchEvent(domEvent);
  50175. };
  50176. }
  50177. } catch (e) {}
  50178. return function() {
  50179. return false;
  50180. };
  50181. })();
  50182. var fireGlobalEvent = (function() {
  50183. if (util.isNode) {
  50184. return function() {
  50185. return process.emit.apply(process, arguments);
  50186. };
  50187. } else {
  50188. if (!util.global) {
  50189. return function() {
  50190. return false;
  50191. };
  50192. }
  50193. return function(name) {
  50194. var methodName = "on" + name.toLowerCase();
  50195. var method = util.global[methodName];
  50196. if (!method) return false;
  50197. method.apply(util.global, [].slice.call(arguments, 1));
  50198. return true;
  50199. };
  50200. }
  50201. })();
  50202. function generatePromiseLifecycleEventObject(name, promise) {
  50203. return {promise: promise};
  50204. }
  50205. var eventToObjectGenerator = {
  50206. promiseCreated: generatePromiseLifecycleEventObject,
  50207. promiseFulfilled: generatePromiseLifecycleEventObject,
  50208. promiseRejected: generatePromiseLifecycleEventObject,
  50209. promiseResolved: generatePromiseLifecycleEventObject,
  50210. promiseCancelled: generatePromiseLifecycleEventObject,
  50211. promiseChained: function(name, promise, child) {
  50212. return {promise: promise, child: child};
  50213. },
  50214. warning: function(name, warning) {
  50215. return {warning: warning};
  50216. },
  50217. unhandledRejection: function (name, reason, promise) {
  50218. return {reason: reason, promise: promise};
  50219. },
  50220. rejectionHandled: generatePromiseLifecycleEventObject
  50221. };
  50222. var activeFireEvent = function (name) {
  50223. var globalEventFired = false;
  50224. try {
  50225. globalEventFired = fireGlobalEvent.apply(null, arguments);
  50226. } catch (e) {
  50227. async.throwLater(e);
  50228. globalEventFired = true;
  50229. }
  50230. var domEventFired = false;
  50231. try {
  50232. domEventFired = fireDomEvent(name,
  50233. eventToObjectGenerator[name].apply(null, arguments));
  50234. } catch (e) {
  50235. async.throwLater(e);
  50236. domEventFired = true;
  50237. }
  50238. return domEventFired || globalEventFired;
  50239. };
  50240. Promise.config = function(opts) {
  50241. opts = Object(opts);
  50242. if ("longStackTraces" in opts) {
  50243. if (opts.longStackTraces) {
  50244. Promise.longStackTraces();
  50245. } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) {
  50246. disableLongStackTraces();
  50247. }
  50248. }
  50249. if ("warnings" in opts) {
  50250. var warningsOption = opts.warnings;
  50251. config.warnings = !!warningsOption;
  50252. wForgottenReturn = config.warnings;
  50253. if (util.isObject(warningsOption)) {
  50254. if ("wForgottenReturn" in warningsOption) {
  50255. wForgottenReturn = !!warningsOption.wForgottenReturn;
  50256. }
  50257. }
  50258. }
  50259. if ("cancellation" in opts && opts.cancellation && !config.cancellation) {
  50260. if (async.haveItemsQueued()) {
  50261. throw new Error(
  50262. "cannot enable cancellation after promises are in use");
  50263. }
  50264. Promise.prototype._clearCancellationData =
  50265. cancellationClearCancellationData;
  50266. Promise.prototype._propagateFrom = cancellationPropagateFrom;
  50267. Promise.prototype._onCancel = cancellationOnCancel;
  50268. Promise.prototype._setOnCancel = cancellationSetOnCancel;
  50269. Promise.prototype._attachCancellationCallback =
  50270. cancellationAttachCancellationCallback;
  50271. Promise.prototype._execute = cancellationExecute;
  50272. propagateFromFunction = cancellationPropagateFrom;
  50273. config.cancellation = true;
  50274. }
  50275. if ("monitoring" in opts) {
  50276. if (opts.monitoring && !config.monitoring) {
  50277. config.monitoring = true;
  50278. Promise.prototype._fireEvent = activeFireEvent;
  50279. } else if (!opts.monitoring && config.monitoring) {
  50280. config.monitoring = false;
  50281. Promise.prototype._fireEvent = defaultFireEvent;
  50282. }
  50283. }
  50284. return Promise;
  50285. };
  50286. function defaultFireEvent() { return false; }
  50287. Promise.prototype._fireEvent = defaultFireEvent;
  50288. Promise.prototype._execute = function(executor, resolve, reject) {
  50289. try {
  50290. executor(resolve, reject);
  50291. } catch (e) {
  50292. return e;
  50293. }
  50294. };
  50295. Promise.prototype._onCancel = function () {};
  50296. Promise.prototype._setOnCancel = function (handler) { ; };
  50297. Promise.prototype._attachCancellationCallback = function(onCancel) {
  50298. ;
  50299. };
  50300. Promise.prototype._captureStackTrace = function () {};
  50301. Promise.prototype._attachExtraTrace = function () {};
  50302. Promise.prototype._clearCancellationData = function() {};
  50303. Promise.prototype._propagateFrom = function (parent, flags) {
  50304. ;
  50305. ;
  50306. };
  50307. function cancellationExecute(executor, resolve, reject) {
  50308. var promise = this;
  50309. try {
  50310. executor(resolve, reject, function(onCancel) {
  50311. if (typeof onCancel !== "function") {
  50312. throw new TypeError("onCancel must be a function, got: " +
  50313. util.toString(onCancel));
  50314. }
  50315. promise._attachCancellationCallback(onCancel);
  50316. });
  50317. } catch (e) {
  50318. return e;
  50319. }
  50320. }
  50321. function cancellationAttachCancellationCallback(onCancel) {
  50322. if (!this._isCancellable()) return this;
  50323. var previousOnCancel = this._onCancel();
  50324. if (previousOnCancel !== undefined) {
  50325. if (util.isArray(previousOnCancel)) {
  50326. previousOnCancel.push(onCancel);
  50327. } else {
  50328. this._setOnCancel([previousOnCancel, onCancel]);
  50329. }
  50330. } else {
  50331. this._setOnCancel(onCancel);
  50332. }
  50333. }
  50334. function cancellationOnCancel() {
  50335. return this._onCancelField;
  50336. }
  50337. function cancellationSetOnCancel(onCancel) {
  50338. this._onCancelField = onCancel;
  50339. }
  50340. function cancellationClearCancellationData() {
  50341. this._cancellationParent = undefined;
  50342. this._onCancelField = undefined;
  50343. }
  50344. function cancellationPropagateFrom(parent, flags) {
  50345. if ((flags & 1) !== 0) {
  50346. this._cancellationParent = parent;
  50347. var branchesRemainingToCancel = parent._branchesRemainingToCancel;
  50348. if (branchesRemainingToCancel === undefined) {
  50349. branchesRemainingToCancel = 0;
  50350. }
  50351. parent._branchesRemainingToCancel = branchesRemainingToCancel + 1;
  50352. }
  50353. if ((flags & 2) !== 0 && parent._isBound()) {
  50354. this._setBoundTo(parent._boundTo);
  50355. }
  50356. }
  50357. function bindingPropagateFrom(parent, flags) {
  50358. if ((flags & 2) !== 0 && parent._isBound()) {
  50359. this._setBoundTo(parent._boundTo);
  50360. }
  50361. }
  50362. var propagateFromFunction = bindingPropagateFrom;
  50363. function boundValueFunction() {
  50364. var ret = this._boundTo;
  50365. if (ret !== undefined) {
  50366. if (ret instanceof Promise) {
  50367. if (ret.isFulfilled()) {
  50368. return ret.value();
  50369. } else {
  50370. return undefined;
  50371. }
  50372. }
  50373. }
  50374. return ret;
  50375. }
  50376. function longStackTracesCaptureStackTrace() {
  50377. this._trace = new CapturedTrace(this._peekContext());
  50378. }
  50379. function longStackTracesAttachExtraTrace(error, ignoreSelf) {
  50380. if (canAttachTrace(error)) {
  50381. var trace = this._trace;
  50382. if (trace !== undefined) {
  50383. if (ignoreSelf) trace = trace._parent;
  50384. }
  50385. if (trace !== undefined) {
  50386. trace.attachExtraTrace(error);
  50387. } else if (!error.__stackCleaned__) {
  50388. var parsed = parseStackAndMessage(error);
  50389. util.notEnumerableProp(error, "stack",
  50390. parsed.message + "\n" + parsed.stack.join("\n"));
  50391. util.notEnumerableProp(error, "__stackCleaned__", true);
  50392. }
  50393. }
  50394. }
  50395. function checkForgottenReturns(returnValue, promiseCreated, name, promise,
  50396. parent) {
  50397. if (returnValue === undefined && promiseCreated !== null &&
  50398. wForgottenReturn) {
  50399. if (parent !== undefined && parent._returnedNonUndefined()) return;
  50400. if ((promise._bitField & 65535) === 0) return;
  50401. if (name) name = name + " ";
  50402. var handlerLine = "";
  50403. var creatorLine = "";
  50404. if (promiseCreated._trace) {
  50405. var traceLines = promiseCreated._trace.stack.split("\n");
  50406. var stack = cleanStack(traceLines);
  50407. for (var i = stack.length - 1; i >= 0; --i) {
  50408. var line = stack[i];
  50409. if (!nodeFramePattern.test(line)) {
  50410. var lineMatches = line.match(parseLinePattern);
  50411. if (lineMatches) {
  50412. handlerLine = "at " + lineMatches[1] +
  50413. ":" + lineMatches[2] + ":" + lineMatches[3] + " ";
  50414. }
  50415. break;
  50416. }
  50417. }
  50418. if (stack.length > 0) {
  50419. var firstUserLine = stack[0];
  50420. for (var i = 0; i < traceLines.length; ++i) {
  50421. if (traceLines[i] === firstUserLine) {
  50422. if (i > 0) {
  50423. creatorLine = "\n" + traceLines[i - 1];
  50424. }
  50425. break;
  50426. }
  50427. }
  50428. }
  50429. }
  50430. var msg = "a promise was created in a " + name +
  50431. "handler " + handlerLine + "but was not returned from it, " +
  50432. "see http://goo.gl/rRqMUw" +
  50433. creatorLine;
  50434. promise._warn(msg, true, promiseCreated);
  50435. }
  50436. }
  50437. function deprecated(name, replacement) {
  50438. var message = name +
  50439. " is deprecated and will be removed in a future version.";
  50440. if (replacement) message += " Use " + replacement + " instead.";
  50441. return warn(message);
  50442. }
  50443. function warn(message, shouldUseOwnTrace, promise) {
  50444. if (!config.warnings) return;
  50445. var warning = new Warning(message);
  50446. var ctx;
  50447. if (shouldUseOwnTrace) {
  50448. promise._attachExtraTrace(warning);
  50449. } else if (config.longStackTraces && (ctx = Promise._peekContext())) {
  50450. ctx.attachExtraTrace(warning);
  50451. } else {
  50452. var parsed = parseStackAndMessage(warning);
  50453. warning.stack = parsed.message + "\n" + parsed.stack.join("\n");
  50454. }
  50455. if (!activeFireEvent("warning", warning)) {
  50456. formatAndLogError(warning, "", true);
  50457. }
  50458. }
  50459. function reconstructStack(message, stacks) {
  50460. for (var i = 0; i < stacks.length - 1; ++i) {
  50461. stacks[i].push("From previous event:");
  50462. stacks[i] = stacks[i].join("\n");
  50463. }
  50464. if (i < stacks.length) {
  50465. stacks[i] = stacks[i].join("\n");
  50466. }
  50467. return message + "\n" + stacks.join("\n");
  50468. }
  50469. function removeDuplicateOrEmptyJumps(stacks) {
  50470. for (var i = 0; i < stacks.length; ++i) {
  50471. if (stacks[i].length === 0 ||
  50472. ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {
  50473. stacks.splice(i, 1);
  50474. i--;
  50475. }
  50476. }
  50477. }
  50478. function removeCommonRoots(stacks) {
  50479. var current = stacks[0];
  50480. for (var i = 1; i < stacks.length; ++i) {
  50481. var prev = stacks[i];
  50482. var currentLastIndex = current.length - 1;
  50483. var currentLastLine = current[currentLastIndex];
  50484. var commonRootMeetPoint = -1;
  50485. for (var j = prev.length - 1; j >= 0; --j) {
  50486. if (prev[j] === currentLastLine) {
  50487. commonRootMeetPoint = j;
  50488. break;
  50489. }
  50490. }
  50491. for (var j = commonRootMeetPoint; j >= 0; --j) {
  50492. var line = prev[j];
  50493. if (current[currentLastIndex] === line) {
  50494. current.pop();
  50495. currentLastIndex--;
  50496. } else {
  50497. break;
  50498. }
  50499. }
  50500. current = prev;
  50501. }
  50502. }
  50503. function cleanStack(stack) {
  50504. var ret = [];
  50505. for (var i = 0; i < stack.length; ++i) {
  50506. var line = stack[i];
  50507. var isTraceLine = " (No stack trace)" === line ||
  50508. stackFramePattern.test(line);
  50509. var isInternalFrame = isTraceLine && shouldIgnore(line);
  50510. if (isTraceLine && !isInternalFrame) {
  50511. if (indentStackFrames && line.charAt(0) !== " ") {
  50512. line = " " + line;
  50513. }
  50514. ret.push(line);
  50515. }
  50516. }
  50517. return ret;
  50518. }
  50519. function stackFramesAsArray(error) {
  50520. var stack = error.stack.replace(/\s+$/g, "").split("\n");
  50521. for (var i = 0; i < stack.length; ++i) {
  50522. var line = stack[i];
  50523. if (" (No stack trace)" === line || stackFramePattern.test(line)) {
  50524. break;
  50525. }
  50526. }
  50527. if (i > 0 && error.name != "SyntaxError") {
  50528. stack = stack.slice(i);
  50529. }
  50530. return stack;
  50531. }
  50532. function parseStackAndMessage(error) {
  50533. var stack = error.stack;
  50534. var message = error.toString();
  50535. stack = typeof stack === "string" && stack.length > 0
  50536. ? stackFramesAsArray(error) : [" (No stack trace)"];
  50537. return {
  50538. message: message,
  50539. stack: error.name == "SyntaxError" ? stack : cleanStack(stack)
  50540. };
  50541. }
  50542. function formatAndLogError(error, title, isSoft) {
  50543. if (typeof console !== "undefined") {
  50544. var message;
  50545. if (util.isObject(error)) {
  50546. var stack = error.stack;
  50547. message = title + formatStack(stack, error);
  50548. } else {
  50549. message = title + String(error);
  50550. }
  50551. if (typeof printWarning === "function") {
  50552. printWarning(message, isSoft);
  50553. } else if (typeof console.log === "function" ||
  50554. typeof console.log === "object") {
  50555. console.log(message);
  50556. }
  50557. }
  50558. }
  50559. function fireRejectionEvent(name, localHandler, reason, promise) {
  50560. var localEventFired = false;
  50561. try {
  50562. if (typeof localHandler === "function") {
  50563. localEventFired = true;
  50564. if (name === "rejectionHandled") {
  50565. localHandler(promise);
  50566. } else {
  50567. localHandler(reason, promise);
  50568. }
  50569. }
  50570. } catch (e) {
  50571. async.throwLater(e);
  50572. }
  50573. if (name === "unhandledRejection") {
  50574. if (!activeFireEvent(name, reason, promise) && !localEventFired) {
  50575. formatAndLogError(reason, "Unhandled rejection ");
  50576. }
  50577. } else {
  50578. activeFireEvent(name, promise);
  50579. }
  50580. }
  50581. function formatNonError(obj) {
  50582. var str;
  50583. if (typeof obj === "function") {
  50584. str = "[function " +
  50585. (obj.name || "anonymous") +
  50586. "]";
  50587. } else {
  50588. str = obj && typeof obj.toString === "function"
  50589. ? obj.toString() : util.toString(obj);
  50590. var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/;
  50591. if (ruselessToString.test(str)) {
  50592. try {
  50593. var newStr = JSON.stringify(obj);
  50594. str = newStr;
  50595. }
  50596. catch(e) {
  50597. }
  50598. }
  50599. if (str.length === 0) {
  50600. str = "(empty array)";
  50601. }
  50602. }
  50603. return ("(<" + snip(str) + ">, no stack trace)");
  50604. }
  50605. function snip(str) {
  50606. var maxChars = 41;
  50607. if (str.length < maxChars) {
  50608. return str;
  50609. }
  50610. return str.substr(0, maxChars - 3) + "...";
  50611. }
  50612. function longStackTracesIsSupported() {
  50613. return typeof captureStackTrace === "function";
  50614. }
  50615. var shouldIgnore = function() { return false; };
  50616. var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;
  50617. function parseLineInfo(line) {
  50618. var matches = line.match(parseLineInfoRegex);
  50619. if (matches) {
  50620. return {
  50621. fileName: matches[1],
  50622. line: parseInt(matches[2], 10)
  50623. };
  50624. }
  50625. }
  50626. function setBounds(firstLineError, lastLineError) {
  50627. if (!longStackTracesIsSupported()) return;
  50628. var firstStackLines = firstLineError.stack.split("\n");
  50629. var lastStackLines = lastLineError.stack.split("\n");
  50630. var firstIndex = -1;
  50631. var lastIndex = -1;
  50632. var firstFileName;
  50633. var lastFileName;
  50634. for (var i = 0; i < firstStackLines.length; ++i) {
  50635. var result = parseLineInfo(firstStackLines[i]);
  50636. if (result) {
  50637. firstFileName = result.fileName;
  50638. firstIndex = result.line;
  50639. break;
  50640. }
  50641. }
  50642. for (var i = 0; i < lastStackLines.length; ++i) {
  50643. var result = parseLineInfo(lastStackLines[i]);
  50644. if (result) {
  50645. lastFileName = result.fileName;
  50646. lastIndex = result.line;
  50647. break;
  50648. }
  50649. }
  50650. if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||
  50651. firstFileName !== lastFileName || firstIndex >= lastIndex) {
  50652. return;
  50653. }
  50654. shouldIgnore = function(line) {
  50655. if (bluebirdFramePattern.test(line)) return true;
  50656. var info = parseLineInfo(line);
  50657. if (info) {
  50658. if (info.fileName === firstFileName &&
  50659. (firstIndex <= info.line && info.line <= lastIndex)) {
  50660. return true;
  50661. }
  50662. }
  50663. return false;
  50664. };
  50665. }
  50666. function CapturedTrace(parent) {
  50667. this._parent = parent;
  50668. this._promisesCreated = 0;
  50669. var length = this._length = 1 + (parent === undefined ? 0 : parent._length);
  50670. captureStackTrace(this, CapturedTrace);
  50671. if (length > 32) this.uncycle();
  50672. }
  50673. util.inherits(CapturedTrace, Error);
  50674. Context.CapturedTrace = CapturedTrace;
  50675. CapturedTrace.prototype.uncycle = function() {
  50676. var length = this._length;
  50677. if (length < 2) return;
  50678. var nodes = [];
  50679. var stackToIndex = {};
  50680. for (var i = 0, node = this; node !== undefined; ++i) {
  50681. nodes.push(node);
  50682. node = node._parent;
  50683. }
  50684. length = this._length = i;
  50685. for (var i = length - 1; i >= 0; --i) {
  50686. var stack = nodes[i].stack;
  50687. if (stackToIndex[stack] === undefined) {
  50688. stackToIndex[stack] = i;
  50689. }
  50690. }
  50691. for (var i = 0; i < length; ++i) {
  50692. var currentStack = nodes[i].stack;
  50693. var index = stackToIndex[currentStack];
  50694. if (index !== undefined && index !== i) {
  50695. if (index > 0) {
  50696. nodes[index - 1]._parent = undefined;
  50697. nodes[index - 1]._length = 1;
  50698. }
  50699. nodes[i]._parent = undefined;
  50700. nodes[i]._length = 1;
  50701. var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;
  50702. if (index < length - 1) {
  50703. cycleEdgeNode._parent = nodes[index + 1];
  50704. cycleEdgeNode._parent.uncycle();
  50705. cycleEdgeNode._length =
  50706. cycleEdgeNode._parent._length + 1;
  50707. } else {
  50708. cycleEdgeNode._parent = undefined;
  50709. cycleEdgeNode._length = 1;
  50710. }
  50711. var currentChildLength = cycleEdgeNode._length + 1;
  50712. for (var j = i - 2; j >= 0; --j) {
  50713. nodes[j]._length = currentChildLength;
  50714. currentChildLength++;
  50715. }
  50716. return;
  50717. }
  50718. }
  50719. };
  50720. CapturedTrace.prototype.attachExtraTrace = function(error) {
  50721. if (error.__stackCleaned__) return;
  50722. this.uncycle();
  50723. var parsed = parseStackAndMessage(error);
  50724. var message = parsed.message;
  50725. var stacks = [parsed.stack];
  50726. var trace = this;
  50727. while (trace !== undefined) {
  50728. stacks.push(cleanStack(trace.stack.split("\n")));
  50729. trace = trace._parent;
  50730. }
  50731. removeCommonRoots(stacks);
  50732. removeDuplicateOrEmptyJumps(stacks);
  50733. util.notEnumerableProp(error, "stack", reconstructStack(message, stacks));
  50734. util.notEnumerableProp(error, "__stackCleaned__", true);
  50735. };
  50736. var captureStackTrace = (function stackDetection() {
  50737. var v8stackFramePattern = /^\s*at\s*/;
  50738. var v8stackFormatter = function(stack, error) {
  50739. if (typeof stack === "string") return stack;
  50740. if (error.name !== undefined &&
  50741. error.message !== undefined) {
  50742. return error.toString();
  50743. }
  50744. return formatNonError(error);
  50745. };
  50746. if (typeof Error.stackTraceLimit === "number" &&
  50747. typeof Error.captureStackTrace === "function") {
  50748. Error.stackTraceLimit += 6;
  50749. stackFramePattern = v8stackFramePattern;
  50750. formatStack = v8stackFormatter;
  50751. var captureStackTrace = Error.captureStackTrace;
  50752. shouldIgnore = function(line) {
  50753. return bluebirdFramePattern.test(line);
  50754. };
  50755. return function(receiver, ignoreUntil) {
  50756. Error.stackTraceLimit += 6;
  50757. captureStackTrace(receiver, ignoreUntil);
  50758. Error.stackTraceLimit -= 6;
  50759. };
  50760. }
  50761. var err = new Error();
  50762. if (typeof err.stack === "string" &&
  50763. err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) {
  50764. stackFramePattern = /@/;
  50765. formatStack = v8stackFormatter;
  50766. indentStackFrames = true;
  50767. return function captureStackTrace(o) {
  50768. o.stack = new Error().stack;
  50769. };
  50770. }
  50771. var hasStackAfterThrow;
  50772. try { throw new Error(); }
  50773. catch(e) {
  50774. hasStackAfterThrow = ("stack" in e);
  50775. }
  50776. if (!("stack" in err) && hasStackAfterThrow &&
  50777. typeof Error.stackTraceLimit === "number") {
  50778. stackFramePattern = v8stackFramePattern;
  50779. formatStack = v8stackFormatter;
  50780. return function captureStackTrace(o) {
  50781. Error.stackTraceLimit += 6;
  50782. try { throw new Error(); }
  50783. catch(e) { o.stack = e.stack; }
  50784. Error.stackTraceLimit -= 6;
  50785. };
  50786. }
  50787. formatStack = function(stack, error) {
  50788. if (typeof stack === "string") return stack;
  50789. if ((typeof error === "object" ||
  50790. typeof error === "function") &&
  50791. error.name !== undefined &&
  50792. error.message !== undefined) {
  50793. return error.toString();
  50794. }
  50795. return formatNonError(error);
  50796. };
  50797. return null;
  50798. })([]);
  50799. if (typeof console !== "undefined" && typeof console.warn !== "undefined") {
  50800. printWarning = function (message) {
  50801. console.warn(message);
  50802. };
  50803. if (util.isNode && process.stderr.isTTY) {
  50804. printWarning = function(message, isSoft) {
  50805. var color = isSoft ? "\u001b[33m" : "\u001b[31m";
  50806. console.warn(color + message + "\u001b[0m\n");
  50807. };
  50808. } else if (!util.isNode && typeof (new Error().stack) === "string") {
  50809. printWarning = function(message, isSoft) {
  50810. console.warn("%c" + message,
  50811. isSoft ? "color: darkorange" : "color: red");
  50812. };
  50813. }
  50814. }
  50815. var config = {
  50816. warnings: warnings,
  50817. longStackTraces: false,
  50818. cancellation: false,
  50819. monitoring: false
  50820. };
  50821. if (longStackTraces) Promise.longStackTraces();
  50822. return {
  50823. longStackTraces: function() {
  50824. return config.longStackTraces;
  50825. },
  50826. warnings: function() {
  50827. return config.warnings;
  50828. },
  50829. cancellation: function() {
  50830. return config.cancellation;
  50831. },
  50832. monitoring: function() {
  50833. return config.monitoring;
  50834. },
  50835. propagateFromFunction: function() {
  50836. return propagateFromFunction;
  50837. },
  50838. boundValueFunction: function() {
  50839. return boundValueFunction;
  50840. },
  50841. checkForgottenReturns: checkForgottenReturns,
  50842. setBounds: setBounds,
  50843. warn: warn,
  50844. deprecated: deprecated,
  50845. CapturedTrace: CapturedTrace,
  50846. fireDomEvent: fireDomEvent,
  50847. fireGlobalEvent: fireGlobalEvent
  50848. };
  50849. };
  50850. /***/ }),
  50851. /* 498 */
  50852. /***/ (function(module, exports, __webpack_require__) {
  50853. "use strict";
  50854. module.exports = function(Promise, tryConvertToPromise, NEXT_FILTER) {
  50855. var util = __webpack_require__(4);
  50856. var CancellationError = Promise.CancellationError;
  50857. var errorObj = util.errorObj;
  50858. var catchFilter = __webpack_require__(332)(NEXT_FILTER);
  50859. function PassThroughHandlerContext(promise, type, handler) {
  50860. this.promise = promise;
  50861. this.type = type;
  50862. this.handler = handler;
  50863. this.called = false;
  50864. this.cancelPromise = null;
  50865. }
  50866. PassThroughHandlerContext.prototype.isFinallyHandler = function() {
  50867. return this.type === 0;
  50868. };
  50869. function FinallyHandlerCancelReaction(finallyHandler) {
  50870. this.finallyHandler = finallyHandler;
  50871. }
  50872. FinallyHandlerCancelReaction.prototype._resultCancelled = function() {
  50873. checkCancel(this.finallyHandler);
  50874. };
  50875. function checkCancel(ctx, reason) {
  50876. if (ctx.cancelPromise != null) {
  50877. if (arguments.length > 1) {
  50878. ctx.cancelPromise._reject(reason);
  50879. } else {
  50880. ctx.cancelPromise._cancel();
  50881. }
  50882. ctx.cancelPromise = null;
  50883. return true;
  50884. }
  50885. return false;
  50886. }
  50887. function succeed() {
  50888. return finallyHandler.call(this, this.promise._target()._settledValue());
  50889. }
  50890. function fail(reason) {
  50891. if (checkCancel(this, reason)) return;
  50892. errorObj.e = reason;
  50893. return errorObj;
  50894. }
  50895. function finallyHandler(reasonOrValue) {
  50896. var promise = this.promise;
  50897. var handler = this.handler;
  50898. if (!this.called) {
  50899. this.called = true;
  50900. var ret = this.isFinallyHandler()
  50901. ? handler.call(promise._boundValue())
  50902. : handler.call(promise._boundValue(), reasonOrValue);
  50903. if (ret === NEXT_FILTER) {
  50904. return ret;
  50905. } else if (ret !== undefined) {
  50906. promise._setReturnedNonUndefined();
  50907. var maybePromise = tryConvertToPromise(ret, promise);
  50908. if (maybePromise instanceof Promise) {
  50909. if (this.cancelPromise != null) {
  50910. if (maybePromise._isCancelled()) {
  50911. var reason =
  50912. new CancellationError("late cancellation observer");
  50913. promise._attachExtraTrace(reason);
  50914. errorObj.e = reason;
  50915. return errorObj;
  50916. } else if (maybePromise.isPending()) {
  50917. maybePromise._attachCancellationCallback(
  50918. new FinallyHandlerCancelReaction(this));
  50919. }
  50920. }
  50921. return maybePromise._then(
  50922. succeed, fail, undefined, this, undefined);
  50923. }
  50924. }
  50925. }
  50926. if (promise.isRejected()) {
  50927. checkCancel(this);
  50928. errorObj.e = reasonOrValue;
  50929. return errorObj;
  50930. } else {
  50931. checkCancel(this);
  50932. return reasonOrValue;
  50933. }
  50934. }
  50935. Promise.prototype._passThrough = function(handler, type, success, fail) {
  50936. if (typeof handler !== "function") return this.then();
  50937. return this._then(success,
  50938. fail,
  50939. undefined,
  50940. new PassThroughHandlerContext(this, type, handler),
  50941. undefined);
  50942. };
  50943. Promise.prototype.lastly =
  50944. Promise.prototype["finally"] = function (handler) {
  50945. return this._passThrough(handler,
  50946. 0,
  50947. finallyHandler,
  50948. finallyHandler);
  50949. };
  50950. Promise.prototype.tap = function (handler) {
  50951. return this._passThrough(handler, 1, finallyHandler);
  50952. };
  50953. Promise.prototype.tapCatch = function (handlerOrPredicate) {
  50954. var len = arguments.length;
  50955. if(len === 1) {
  50956. return this._passThrough(handlerOrPredicate,
  50957. 1,
  50958. undefined,
  50959. finallyHandler);
  50960. } else {
  50961. var catchInstances = new Array(len - 1),
  50962. j = 0, i;
  50963. for (i = 0; i < len - 1; ++i) {
  50964. var item = arguments[i];
  50965. if (util.isObject(item)) {
  50966. catchInstances[j++] = item;
  50967. } else {
  50968. return Promise.reject(new TypeError(
  50969. "tapCatch statement predicate: "
  50970. + "expecting an object but got " + util.classString(item)
  50971. ));
  50972. }
  50973. }
  50974. catchInstances.length = j;
  50975. var handler = arguments[i];
  50976. return this._passThrough(catchFilter(catchInstances, handler, this),
  50977. 1,
  50978. undefined,
  50979. finallyHandler);
  50980. }
  50981. };
  50982. return PassThroughHandlerContext;
  50983. };
  50984. /***/ }),
  50985. /* 499 */
  50986. /***/ (function(module, exports, __webpack_require__) {
  50987. "use strict";
  50988. module.exports =
  50989. function(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) {
  50990. var util = __webpack_require__(4);
  50991. var tryCatch = util.tryCatch;
  50992. Promise.method = function (fn) {
  50993. if (typeof fn !== "function") {
  50994. throw new Promise.TypeError("expecting a function but got " + util.classString(fn));
  50995. }
  50996. return function () {
  50997. var ret = new Promise(INTERNAL);
  50998. ret._captureStackTrace();
  50999. ret._pushContext();
  51000. var value = tryCatch(fn).apply(this, arguments);
  51001. var promiseCreated = ret._popContext();
  51002. debug.checkForgottenReturns(
  51003. value, promiseCreated, "Promise.method", ret);
  51004. ret._resolveFromSyncValue(value);
  51005. return ret;
  51006. };
  51007. };
  51008. Promise.attempt = Promise["try"] = function (fn) {
  51009. if (typeof fn !== "function") {
  51010. return apiRejection("expecting a function but got " + util.classString(fn));
  51011. }
  51012. var ret = new Promise(INTERNAL);
  51013. ret._captureStackTrace();
  51014. ret._pushContext();
  51015. var value;
  51016. if (arguments.length > 1) {
  51017. debug.deprecated("calling Promise.try with more than 1 argument");
  51018. var arg = arguments[1];
  51019. var ctx = arguments[2];
  51020. value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg)
  51021. : tryCatch(fn).call(ctx, arg);
  51022. } else {
  51023. value = tryCatch(fn)();
  51024. }
  51025. var promiseCreated = ret._popContext();
  51026. debug.checkForgottenReturns(
  51027. value, promiseCreated, "Promise.try", ret);
  51028. ret._resolveFromSyncValue(value);
  51029. return ret;
  51030. };
  51031. Promise.prototype._resolveFromSyncValue = function (value) {
  51032. if (value === util.errorObj) {
  51033. this._rejectCallback(value.e, false);
  51034. } else {
  51035. this._resolveCallback(value, true);
  51036. }
  51037. };
  51038. };
  51039. /***/ }),
  51040. /* 500 */
  51041. /***/ (function(module, exports, __webpack_require__) {
  51042. "use strict";
  51043. module.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) {
  51044. var calledBind = false;
  51045. var rejectThis = function(_, e) {
  51046. this._reject(e);
  51047. };
  51048. var targetRejected = function(e, context) {
  51049. context.promiseRejectionQueued = true;
  51050. context.bindingPromise._then(rejectThis, rejectThis, null, this, e);
  51051. };
  51052. var bindingResolved = function(thisArg, context) {
  51053. if (((this._bitField & 50397184) === 0)) {
  51054. this._resolveCallback(context.target);
  51055. }
  51056. };
  51057. var bindingRejected = function(e, context) {
  51058. if (!context.promiseRejectionQueued) this._reject(e);
  51059. };
  51060. Promise.prototype.bind = function (thisArg) {
  51061. if (!calledBind) {
  51062. calledBind = true;
  51063. Promise.prototype._propagateFrom = debug.propagateFromFunction();
  51064. Promise.prototype._boundValue = debug.boundValueFunction();
  51065. }
  51066. var maybePromise = tryConvertToPromise(thisArg);
  51067. var ret = new Promise(INTERNAL);
  51068. ret._propagateFrom(this, 1);
  51069. var target = this._target();
  51070. ret._setBoundTo(maybePromise);
  51071. if (maybePromise instanceof Promise) {
  51072. var context = {
  51073. promiseRejectionQueued: false,
  51074. promise: ret,
  51075. target: target,
  51076. bindingPromise: maybePromise
  51077. };
  51078. target._then(INTERNAL, targetRejected, undefined, ret, context);
  51079. maybePromise._then(
  51080. bindingResolved, bindingRejected, undefined, ret, context);
  51081. ret._setOnCancel(maybePromise);
  51082. } else {
  51083. ret._resolveCallback(target);
  51084. }
  51085. return ret;
  51086. };
  51087. Promise.prototype._setBoundTo = function (obj) {
  51088. if (obj !== undefined) {
  51089. this._bitField = this._bitField | 2097152;
  51090. this._boundTo = obj;
  51091. } else {
  51092. this._bitField = this._bitField & (~2097152);
  51093. }
  51094. };
  51095. Promise.prototype._isBound = function () {
  51096. return (this._bitField & 2097152) === 2097152;
  51097. };
  51098. Promise.bind = function (thisArg, value) {
  51099. return Promise.resolve(value).bind(thisArg);
  51100. };
  51101. };
  51102. /***/ }),
  51103. /* 501 */
  51104. /***/ (function(module, exports, __webpack_require__) {
  51105. "use strict";
  51106. module.exports = function(Promise, PromiseArray, apiRejection, debug) {
  51107. var util = __webpack_require__(4);
  51108. var tryCatch = util.tryCatch;
  51109. var errorObj = util.errorObj;
  51110. var async = Promise._async;
  51111. Promise.prototype["break"] = Promise.prototype.cancel = function() {
  51112. if (!debug.cancellation()) return this._warn("cancellation is disabled");
  51113. var promise = this;
  51114. var child = promise;
  51115. while (promise._isCancellable()) {
  51116. if (!promise._cancelBy(child)) {
  51117. if (child._isFollowing()) {
  51118. child._followee().cancel();
  51119. } else {
  51120. child._cancelBranched();
  51121. }
  51122. break;
  51123. }
  51124. var parent = promise._cancellationParent;
  51125. if (parent == null || !parent._isCancellable()) {
  51126. if (promise._isFollowing()) {
  51127. promise._followee().cancel();
  51128. } else {
  51129. promise._cancelBranched();
  51130. }
  51131. break;
  51132. } else {
  51133. if (promise._isFollowing()) promise._followee().cancel();
  51134. promise._setWillBeCancelled();
  51135. child = promise;
  51136. promise = parent;
  51137. }
  51138. }
  51139. };
  51140. Promise.prototype._branchHasCancelled = function() {
  51141. this._branchesRemainingToCancel--;
  51142. };
  51143. Promise.prototype._enoughBranchesHaveCancelled = function() {
  51144. return this._branchesRemainingToCancel === undefined ||
  51145. this._branchesRemainingToCancel <= 0;
  51146. };
  51147. Promise.prototype._cancelBy = function(canceller) {
  51148. if (canceller === this) {
  51149. this._branchesRemainingToCancel = 0;
  51150. this._invokeOnCancel();
  51151. return true;
  51152. } else {
  51153. this._branchHasCancelled();
  51154. if (this._enoughBranchesHaveCancelled()) {
  51155. this._invokeOnCancel();
  51156. return true;
  51157. }
  51158. }
  51159. return false;
  51160. };
  51161. Promise.prototype._cancelBranched = function() {
  51162. if (this._enoughBranchesHaveCancelled()) {
  51163. this._cancel();
  51164. }
  51165. };
  51166. Promise.prototype._cancel = function() {
  51167. if (!this._isCancellable()) return;
  51168. this._setCancelled();
  51169. async.invoke(this._cancelPromises, this, undefined);
  51170. };
  51171. Promise.prototype._cancelPromises = function() {
  51172. if (this._length() > 0) this._settlePromises();
  51173. };
  51174. Promise.prototype._unsetOnCancel = function() {
  51175. this._onCancelField = undefined;
  51176. };
  51177. Promise.prototype._isCancellable = function() {
  51178. return this.isPending() && !this._isCancelled();
  51179. };
  51180. Promise.prototype.isCancellable = function() {
  51181. return this.isPending() && !this.isCancelled();
  51182. };
  51183. Promise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) {
  51184. if (util.isArray(onCancelCallback)) {
  51185. for (var i = 0; i < onCancelCallback.length; ++i) {
  51186. this._doInvokeOnCancel(onCancelCallback[i], internalOnly);
  51187. }
  51188. } else if (onCancelCallback !== undefined) {
  51189. if (typeof onCancelCallback === "function") {
  51190. if (!internalOnly) {
  51191. var e = tryCatch(onCancelCallback).call(this._boundValue());
  51192. if (e === errorObj) {
  51193. this._attachExtraTrace(e.e);
  51194. async.throwLater(e.e);
  51195. }
  51196. }
  51197. } else {
  51198. onCancelCallback._resultCancelled(this);
  51199. }
  51200. }
  51201. };
  51202. Promise.prototype._invokeOnCancel = function() {
  51203. var onCancelCallback = this._onCancel();
  51204. this._unsetOnCancel();
  51205. async.invoke(this._doInvokeOnCancel, this, onCancelCallback);
  51206. };
  51207. Promise.prototype._invokeInternalOnCancel = function() {
  51208. if (this._isCancellable()) {
  51209. this._doInvokeOnCancel(this._onCancel(), true);
  51210. this._unsetOnCancel();
  51211. }
  51212. };
  51213. Promise.prototype._resultCancelled = function() {
  51214. this.cancel();
  51215. };
  51216. };
  51217. /***/ }),
  51218. /* 502 */
  51219. /***/ (function(module, exports, __webpack_require__) {
  51220. "use strict";
  51221. module.exports = function(Promise) {
  51222. function returner() {
  51223. return this.value;
  51224. }
  51225. function thrower() {
  51226. throw this.reason;
  51227. }
  51228. Promise.prototype["return"] =
  51229. Promise.prototype.thenReturn = function (value) {
  51230. if (value instanceof Promise) value.suppressUnhandledRejections();
  51231. return this._then(
  51232. returner, undefined, undefined, {value: value}, undefined);
  51233. };
  51234. Promise.prototype["throw"] =
  51235. Promise.prototype.thenThrow = function (reason) {
  51236. return this._then(
  51237. thrower, undefined, undefined, {reason: reason}, undefined);
  51238. };
  51239. Promise.prototype.catchThrow = function (reason) {
  51240. if (arguments.length <= 1) {
  51241. return this._then(
  51242. undefined, thrower, undefined, {reason: reason}, undefined);
  51243. } else {
  51244. var _reason = arguments[1];
  51245. var handler = function() {throw _reason;};
  51246. return this.caught(reason, handler);
  51247. }
  51248. };
  51249. Promise.prototype.catchReturn = function (value) {
  51250. if (arguments.length <= 1) {
  51251. if (value instanceof Promise) value.suppressUnhandledRejections();
  51252. return this._then(
  51253. undefined, returner, undefined, {value: value}, undefined);
  51254. } else {
  51255. var _value = arguments[1];
  51256. if (_value instanceof Promise) _value.suppressUnhandledRejections();
  51257. var handler = function() {return _value;};
  51258. return this.caught(value, handler);
  51259. }
  51260. };
  51261. };
  51262. /***/ }),
  51263. /* 503 */
  51264. /***/ (function(module, exports, __webpack_require__) {
  51265. "use strict";
  51266. module.exports = function(Promise) {
  51267. function PromiseInspection(promise) {
  51268. if (promise !== undefined) {
  51269. promise = promise._target();
  51270. this._bitField = promise._bitField;
  51271. this._settledValueField = promise._isFateSealed()
  51272. ? promise._settledValue() : undefined;
  51273. }
  51274. else {
  51275. this._bitField = 0;
  51276. this._settledValueField = undefined;
  51277. }
  51278. }
  51279. PromiseInspection.prototype._settledValue = function() {
  51280. return this._settledValueField;
  51281. };
  51282. var value = PromiseInspection.prototype.value = function () {
  51283. if (!this.isFulfilled()) {
  51284. throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
  51285. }
  51286. return this._settledValue();
  51287. };
  51288. var reason = PromiseInspection.prototype.error =
  51289. PromiseInspection.prototype.reason = function () {
  51290. if (!this.isRejected()) {
  51291. throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
  51292. }
  51293. return this._settledValue();
  51294. };
  51295. var isFulfilled = PromiseInspection.prototype.isFulfilled = function() {
  51296. return (this._bitField & 33554432) !== 0;
  51297. };
  51298. var isRejected = PromiseInspection.prototype.isRejected = function () {
  51299. return (this._bitField & 16777216) !== 0;
  51300. };
  51301. var isPending = PromiseInspection.prototype.isPending = function () {
  51302. return (this._bitField & 50397184) === 0;
  51303. };
  51304. var isResolved = PromiseInspection.prototype.isResolved = function () {
  51305. return (this._bitField & 50331648) !== 0;
  51306. };
  51307. PromiseInspection.prototype.isCancelled = function() {
  51308. return (this._bitField & 8454144) !== 0;
  51309. };
  51310. Promise.prototype.__isCancelled = function() {
  51311. return (this._bitField & 65536) === 65536;
  51312. };
  51313. Promise.prototype._isCancelled = function() {
  51314. return this._target().__isCancelled();
  51315. };
  51316. Promise.prototype.isCancelled = function() {
  51317. return (this._target()._bitField & 8454144) !== 0;
  51318. };
  51319. Promise.prototype.isPending = function() {
  51320. return isPending.call(this._target());
  51321. };
  51322. Promise.prototype.isRejected = function() {
  51323. return isRejected.call(this._target());
  51324. };
  51325. Promise.prototype.isFulfilled = function() {
  51326. return isFulfilled.call(this._target());
  51327. };
  51328. Promise.prototype.isResolved = function() {
  51329. return isResolved.call(this._target());
  51330. };
  51331. Promise.prototype.value = function() {
  51332. return value.call(this._target());
  51333. };
  51334. Promise.prototype.reason = function() {
  51335. var target = this._target();
  51336. target._unsetRejectionIsUnhandled();
  51337. return reason.call(target);
  51338. };
  51339. Promise.prototype._value = function() {
  51340. return this._settledValue();
  51341. };
  51342. Promise.prototype._reason = function() {
  51343. this._unsetRejectionIsUnhandled();
  51344. return this._settledValue();
  51345. };
  51346. Promise.PromiseInspection = PromiseInspection;
  51347. };
  51348. /***/ }),
  51349. /* 504 */
  51350. /***/ (function(module, exports, __webpack_require__) {
  51351. "use strict";
  51352. module.exports =
  51353. function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async,
  51354. getDomain) {
  51355. var util = __webpack_require__(4);
  51356. var canEvaluate = util.canEvaluate;
  51357. var tryCatch = util.tryCatch;
  51358. var errorObj = util.errorObj;
  51359. var reject;
  51360. if (true) {
  51361. if (canEvaluate) {
  51362. var thenCallback = function(i) {
  51363. return new Function("value", "holder", " \n\
  51364. 'use strict'; \n\
  51365. holder.pIndex = value; \n\
  51366. holder.checkFulfillment(this); \n\
  51367. ".replace(/Index/g, i));
  51368. };
  51369. var promiseSetter = function(i) {
  51370. return new Function("promise", "holder", " \n\
  51371. 'use strict'; \n\
  51372. holder.pIndex = promise; \n\
  51373. ".replace(/Index/g, i));
  51374. };
  51375. var generateHolderClass = function(total) {
  51376. var props = new Array(total);
  51377. for (var i = 0; i < props.length; ++i) {
  51378. props[i] = "this.p" + (i+1);
  51379. }
  51380. var assignment = props.join(" = ") + " = null;";
  51381. var cancellationCode= "var promise;\n" + props.map(function(prop) {
  51382. return " \n\
  51383. promise = " + prop + "; \n\
  51384. if (promise instanceof Promise) { \n\
  51385. promise.cancel(); \n\
  51386. } \n\
  51387. ";
  51388. }).join("\n");
  51389. var passedArguments = props.join(", ");
  51390. var name = "Holder$" + total;
  51391. var code = "return function(tryCatch, errorObj, Promise, async) { \n\
  51392. 'use strict'; \n\
  51393. function [TheName](fn) { \n\
  51394. [TheProperties] \n\
  51395. this.fn = fn; \n\
  51396. this.asyncNeeded = true; \n\
  51397. this.now = 0; \n\
  51398. } \n\
  51399. \n\
  51400. [TheName].prototype._callFunction = function(promise) { \n\
  51401. promise._pushContext(); \n\
  51402. var ret = tryCatch(this.fn)([ThePassedArguments]); \n\
  51403. promise._popContext(); \n\
  51404. if (ret === errorObj) { \n\
  51405. promise._rejectCallback(ret.e, false); \n\
  51406. } else { \n\
  51407. promise._resolveCallback(ret); \n\
  51408. } \n\
  51409. }; \n\
  51410. \n\
  51411. [TheName].prototype.checkFulfillment = function(promise) { \n\
  51412. var now = ++this.now; \n\
  51413. if (now === [TheTotal]) { \n\
  51414. if (this.asyncNeeded) { \n\
  51415. async.invoke(this._callFunction, this, promise); \n\
  51416. } else { \n\
  51417. this._callFunction(promise); \n\
  51418. } \n\
  51419. \n\
  51420. } \n\
  51421. }; \n\
  51422. \n\
  51423. [TheName].prototype._resultCancelled = function() { \n\
  51424. [CancellationCode] \n\
  51425. }; \n\
  51426. \n\
  51427. return [TheName]; \n\
  51428. }(tryCatch, errorObj, Promise, async); \n\
  51429. ";
  51430. code = code.replace(/\[TheName\]/g, name)
  51431. .replace(/\[TheTotal\]/g, total)
  51432. .replace(/\[ThePassedArguments\]/g, passedArguments)
  51433. .replace(/\[TheProperties\]/g, assignment)
  51434. .replace(/\[CancellationCode\]/g, cancellationCode);
  51435. return new Function("tryCatch", "errorObj", "Promise", "async", code)
  51436. (tryCatch, errorObj, Promise, async);
  51437. };
  51438. var holderClasses = [];
  51439. var thenCallbacks = [];
  51440. var promiseSetters = [];
  51441. for (var i = 0; i < 8; ++i) {
  51442. holderClasses.push(generateHolderClass(i + 1));
  51443. thenCallbacks.push(thenCallback(i + 1));
  51444. promiseSetters.push(promiseSetter(i + 1));
  51445. }
  51446. reject = function (reason) {
  51447. this._reject(reason);
  51448. };
  51449. }}
  51450. Promise.join = function () {
  51451. var last = arguments.length - 1;
  51452. var fn;
  51453. if (last > 0 && typeof arguments[last] === "function") {
  51454. fn = arguments[last];
  51455. if (true) {
  51456. if (last <= 8 && canEvaluate) {
  51457. var ret = new Promise(INTERNAL);
  51458. ret._captureStackTrace();
  51459. var HolderClass = holderClasses[last - 1];
  51460. var holder = new HolderClass(fn);
  51461. var callbacks = thenCallbacks;
  51462. for (var i = 0; i < last; ++i) {
  51463. var maybePromise = tryConvertToPromise(arguments[i], ret);
  51464. if (maybePromise instanceof Promise) {
  51465. maybePromise = maybePromise._target();
  51466. var bitField = maybePromise._bitField;
  51467. ;
  51468. if (((bitField & 50397184) === 0)) {
  51469. maybePromise._then(callbacks[i], reject,
  51470. undefined, ret, holder);
  51471. promiseSetters[i](maybePromise, holder);
  51472. holder.asyncNeeded = false;
  51473. } else if (((bitField & 33554432) !== 0)) {
  51474. callbacks[i].call(ret,
  51475. maybePromise._value(), holder);
  51476. } else if (((bitField & 16777216) !== 0)) {
  51477. ret._reject(maybePromise._reason());
  51478. } else {
  51479. ret._cancel();
  51480. }
  51481. } else {
  51482. callbacks[i].call(ret, maybePromise, holder);
  51483. }
  51484. }
  51485. if (!ret._isFateSealed()) {
  51486. if (holder.asyncNeeded) {
  51487. var domain = getDomain();
  51488. if (domain !== null) {
  51489. holder.fn = util.domainBind(domain, holder.fn);
  51490. }
  51491. }
  51492. ret._setAsyncGuaranteed();
  51493. ret._setOnCancel(holder);
  51494. }
  51495. return ret;
  51496. }
  51497. }
  51498. }
  51499. var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];};
  51500. if (fn) args.pop();
  51501. var ret = new PromiseArray(args).promise();
  51502. return fn !== undefined ? ret.spread(fn) : ret;
  51503. };
  51504. };
  51505. /***/ }),
  51506. /* 505 */
  51507. /***/ (function(module, exports, __webpack_require__) {
  51508. "use strict";
  51509. module.exports = function(Promise,
  51510. PromiseArray,
  51511. apiRejection,
  51512. tryConvertToPromise,
  51513. INTERNAL,
  51514. debug) {
  51515. var getDomain = Promise._getDomain;
  51516. var util = __webpack_require__(4);
  51517. var tryCatch = util.tryCatch;
  51518. var errorObj = util.errorObj;
  51519. var async = Promise._async;
  51520. function MappingPromiseArray(promises, fn, limit, _filter) {
  51521. this.constructor$(promises);
  51522. this._promise._captureStackTrace();
  51523. var domain = getDomain();
  51524. this._callback = domain === null ? fn : util.domainBind(domain, fn);
  51525. this._preservedValues = _filter === INTERNAL
  51526. ? new Array(this.length())
  51527. : null;
  51528. this._limit = limit;
  51529. this._inFlight = 0;
  51530. this._queue = [];
  51531. async.invoke(this._asyncInit, this, undefined);
  51532. }
  51533. util.inherits(MappingPromiseArray, PromiseArray);
  51534. MappingPromiseArray.prototype._asyncInit = function() {
  51535. this._init$(undefined, -2);
  51536. };
  51537. MappingPromiseArray.prototype._init = function () {};
  51538. MappingPromiseArray.prototype._promiseFulfilled = function (value, index) {
  51539. var values = this._values;
  51540. var length = this.length();
  51541. var preservedValues = this._preservedValues;
  51542. var limit = this._limit;
  51543. if (index < 0) {
  51544. index = (index * -1) - 1;
  51545. values[index] = value;
  51546. if (limit >= 1) {
  51547. this._inFlight--;
  51548. this._drainQueue();
  51549. if (this._isResolved()) return true;
  51550. }
  51551. } else {
  51552. if (limit >= 1 && this._inFlight >= limit) {
  51553. values[index] = value;
  51554. this._queue.push(index);
  51555. return false;
  51556. }
  51557. if (preservedValues !== null) preservedValues[index] = value;
  51558. var promise = this._promise;
  51559. var callback = this._callback;
  51560. var receiver = promise._boundValue();
  51561. promise._pushContext();
  51562. var ret = tryCatch(callback).call(receiver, value, index, length);
  51563. var promiseCreated = promise._popContext();
  51564. debug.checkForgottenReturns(
  51565. ret,
  51566. promiseCreated,
  51567. preservedValues !== null ? "Promise.filter" : "Promise.map",
  51568. promise
  51569. );
  51570. if (ret === errorObj) {
  51571. this._reject(ret.e);
  51572. return true;
  51573. }
  51574. var maybePromise = tryConvertToPromise(ret, this._promise);
  51575. if (maybePromise instanceof Promise) {
  51576. maybePromise = maybePromise._target();
  51577. var bitField = maybePromise._bitField;
  51578. ;
  51579. if (((bitField & 50397184) === 0)) {
  51580. if (limit >= 1) this._inFlight++;
  51581. values[index] = maybePromise;
  51582. maybePromise._proxy(this, (index + 1) * -1);
  51583. return false;
  51584. } else if (((bitField & 33554432) !== 0)) {
  51585. ret = maybePromise._value();
  51586. } else if (((bitField & 16777216) !== 0)) {
  51587. this._reject(maybePromise._reason());
  51588. return true;
  51589. } else {
  51590. this._cancel();
  51591. return true;
  51592. }
  51593. }
  51594. values[index] = ret;
  51595. }
  51596. var totalResolved = ++this._totalResolved;
  51597. if (totalResolved >= length) {
  51598. if (preservedValues !== null) {
  51599. this._filter(values, preservedValues);
  51600. } else {
  51601. this._resolve(values);
  51602. }
  51603. return true;
  51604. }
  51605. return false;
  51606. };
  51607. MappingPromiseArray.prototype._drainQueue = function () {
  51608. var queue = this._queue;
  51609. var limit = this._limit;
  51610. var values = this._values;
  51611. while (queue.length > 0 && this._inFlight < limit) {
  51612. if (this._isResolved()) return;
  51613. var index = queue.pop();
  51614. this._promiseFulfilled(values[index], index);
  51615. }
  51616. };
  51617. MappingPromiseArray.prototype._filter = function (booleans, values) {
  51618. var len = values.length;
  51619. var ret = new Array(len);
  51620. var j = 0;
  51621. for (var i = 0; i < len; ++i) {
  51622. if (booleans[i]) ret[j++] = values[i];
  51623. }
  51624. ret.length = j;
  51625. this._resolve(ret);
  51626. };
  51627. MappingPromiseArray.prototype.preservedValues = function () {
  51628. return this._preservedValues;
  51629. };
  51630. function map(promises, fn, options, _filter) {
  51631. if (typeof fn !== "function") {
  51632. return apiRejection("expecting a function but got " + util.classString(fn));
  51633. }
  51634. var limit = 0;
  51635. if (options !== undefined) {
  51636. if (typeof options === "object" && options !== null) {
  51637. if (typeof options.concurrency !== "number") {
  51638. return Promise.reject(
  51639. new TypeError("'concurrency' must be a number but it is " +
  51640. util.classString(options.concurrency)));
  51641. }
  51642. limit = options.concurrency;
  51643. } else {
  51644. return Promise.reject(new TypeError(
  51645. "options argument must be an object but it is " +
  51646. util.classString(options)));
  51647. }
  51648. }
  51649. limit = typeof limit === "number" &&
  51650. isFinite(limit) && limit >= 1 ? limit : 0;
  51651. return new MappingPromiseArray(promises, fn, limit, _filter).promise();
  51652. }
  51653. Promise.prototype.map = function (fn, options) {
  51654. return map(this, fn, options, null);
  51655. };
  51656. Promise.map = function (promises, fn, options, _filter) {
  51657. return map(promises, fn, options, _filter);
  51658. };
  51659. };
  51660. /***/ }),
  51661. /* 506 */
  51662. /***/ (function(module, exports, __webpack_require__) {
  51663. "use strict";
  51664. var cr = Object.create;
  51665. if (cr) {
  51666. var callerCache = cr(null);
  51667. var getterCache = cr(null);
  51668. callerCache[" size"] = getterCache[" size"] = 0;
  51669. }
  51670. module.exports = function(Promise) {
  51671. var util = __webpack_require__(4);
  51672. var canEvaluate = util.canEvaluate;
  51673. var isIdentifier = util.isIdentifier;
  51674. var getMethodCaller;
  51675. var getGetter;
  51676. if (true) {
  51677. var makeMethodCaller = function (methodName) {
  51678. return new Function("ensureMethod", " \n\
  51679. return function(obj) { \n\
  51680. 'use strict' \n\
  51681. var len = this.length; \n\
  51682. ensureMethod(obj, 'methodName'); \n\
  51683. switch(len) { \n\
  51684. case 1: return obj.methodName(this[0]); \n\
  51685. case 2: return obj.methodName(this[0], this[1]); \n\
  51686. case 3: return obj.methodName(this[0], this[1], this[2]); \n\
  51687. case 0: return obj.methodName(); \n\
  51688. default: \n\
  51689. return obj.methodName.apply(obj, this); \n\
  51690. } \n\
  51691. }; \n\
  51692. ".replace(/methodName/g, methodName))(ensureMethod);
  51693. };
  51694. var makeGetter = function (propertyName) {
  51695. return new Function("obj", " \n\
  51696. 'use strict'; \n\
  51697. return obj.propertyName; \n\
  51698. ".replace("propertyName", propertyName));
  51699. };
  51700. var getCompiled = function(name, compiler, cache) {
  51701. var ret = cache[name];
  51702. if (typeof ret !== "function") {
  51703. if (!isIdentifier(name)) {
  51704. return null;
  51705. }
  51706. ret = compiler(name);
  51707. cache[name] = ret;
  51708. cache[" size"]++;
  51709. if (cache[" size"] > 512) {
  51710. var keys = Object.keys(cache);
  51711. for (var i = 0; i < 256; ++i) delete cache[keys[i]];
  51712. cache[" size"] = keys.length - 256;
  51713. }
  51714. }
  51715. return ret;
  51716. };
  51717. getMethodCaller = function(name) {
  51718. return getCompiled(name, makeMethodCaller, callerCache);
  51719. };
  51720. getGetter = function(name) {
  51721. return getCompiled(name, makeGetter, getterCache);
  51722. };
  51723. }
  51724. function ensureMethod(obj, methodName) {
  51725. var fn;
  51726. if (obj != null) fn = obj[methodName];
  51727. if (typeof fn !== "function") {
  51728. var message = "Object " + util.classString(obj) + " has no method '" +
  51729. util.toString(methodName) + "'";
  51730. throw new Promise.TypeError(message);
  51731. }
  51732. return fn;
  51733. }
  51734. function caller(obj) {
  51735. var methodName = this.pop();
  51736. var fn = ensureMethod(obj, methodName);
  51737. return fn.apply(obj, this);
  51738. }
  51739. Promise.prototype.call = function (methodName) {
  51740. var $_len = arguments.length;var args = new Array(Math.max($_len - 1, 0)); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];};
  51741. if (true) {
  51742. if (canEvaluate) {
  51743. var maybeCaller = getMethodCaller(methodName);
  51744. if (maybeCaller !== null) {
  51745. return this._then(
  51746. maybeCaller, undefined, undefined, args, undefined);
  51747. }
  51748. }
  51749. }
  51750. args.push(methodName);
  51751. return this._then(caller, undefined, undefined, args, undefined);
  51752. };
  51753. function namedGetter(obj) {
  51754. return obj[this];
  51755. }
  51756. function indexedGetter(obj) {
  51757. var index = +this;
  51758. if (index < 0) index = Math.max(0, index + obj.length);
  51759. return obj[index];
  51760. }
  51761. Promise.prototype.get = function (propertyName) {
  51762. var isIndex = (typeof propertyName === "number");
  51763. var getter;
  51764. if (!isIndex) {
  51765. if (canEvaluate) {
  51766. var maybeGetter = getGetter(propertyName);
  51767. getter = maybeGetter !== null ? maybeGetter : namedGetter;
  51768. } else {
  51769. getter = namedGetter;
  51770. }
  51771. } else {
  51772. getter = indexedGetter;
  51773. }
  51774. return this._then(getter, undefined, undefined, propertyName, undefined);
  51775. };
  51776. };
  51777. /***/ }),
  51778. /* 507 */
  51779. /***/ (function(module, exports, __webpack_require__) {
  51780. "use strict";
  51781. module.exports = function (Promise, apiRejection, tryConvertToPromise,
  51782. createContext, INTERNAL, debug) {
  51783. var util = __webpack_require__(4);
  51784. var TypeError = __webpack_require__(37).TypeError;
  51785. var inherits = __webpack_require__(4).inherits;
  51786. var errorObj = util.errorObj;
  51787. var tryCatch = util.tryCatch;
  51788. var NULL = {};
  51789. function thrower(e) {
  51790. setTimeout(function(){throw e;}, 0);
  51791. }
  51792. function castPreservingDisposable(thenable) {
  51793. var maybePromise = tryConvertToPromise(thenable);
  51794. if (maybePromise !== thenable &&
  51795. typeof thenable._isDisposable === "function" &&
  51796. typeof thenable._getDisposer === "function" &&
  51797. thenable._isDisposable()) {
  51798. maybePromise._setDisposable(thenable._getDisposer());
  51799. }
  51800. return maybePromise;
  51801. }
  51802. function dispose(resources, inspection) {
  51803. var i = 0;
  51804. var len = resources.length;
  51805. var ret = new Promise(INTERNAL);
  51806. function iterator() {
  51807. if (i >= len) return ret._fulfill();
  51808. var maybePromise = castPreservingDisposable(resources[i++]);
  51809. if (maybePromise instanceof Promise &&
  51810. maybePromise._isDisposable()) {
  51811. try {
  51812. maybePromise = tryConvertToPromise(
  51813. maybePromise._getDisposer().tryDispose(inspection),
  51814. resources.promise);
  51815. } catch (e) {
  51816. return thrower(e);
  51817. }
  51818. if (maybePromise instanceof Promise) {
  51819. return maybePromise._then(iterator, thrower,
  51820. null, null, null);
  51821. }
  51822. }
  51823. iterator();
  51824. }
  51825. iterator();
  51826. return ret;
  51827. }
  51828. function Disposer(data, promise, context) {
  51829. this._data = data;
  51830. this._promise = promise;
  51831. this._context = context;
  51832. }
  51833. Disposer.prototype.data = function () {
  51834. return this._data;
  51835. };
  51836. Disposer.prototype.promise = function () {
  51837. return this._promise;
  51838. };
  51839. Disposer.prototype.resource = function () {
  51840. if (this.promise().isFulfilled()) {
  51841. return this.promise().value();
  51842. }
  51843. return NULL;
  51844. };
  51845. Disposer.prototype.tryDispose = function(inspection) {
  51846. var resource = this.resource();
  51847. var context = this._context;
  51848. if (context !== undefined) context._pushContext();
  51849. var ret = resource !== NULL
  51850. ? this.doDispose(resource, inspection) : null;
  51851. if (context !== undefined) context._popContext();
  51852. this._promise._unsetDisposable();
  51853. this._data = null;
  51854. return ret;
  51855. };
  51856. Disposer.isDisposer = function (d) {
  51857. return (d != null &&
  51858. typeof d.resource === "function" &&
  51859. typeof d.tryDispose === "function");
  51860. };
  51861. function FunctionDisposer(fn, promise, context) {
  51862. this.constructor$(fn, promise, context);
  51863. }
  51864. inherits(FunctionDisposer, Disposer);
  51865. FunctionDisposer.prototype.doDispose = function (resource, inspection) {
  51866. var fn = this.data();
  51867. return fn.call(resource, resource, inspection);
  51868. };
  51869. function maybeUnwrapDisposer(value) {
  51870. if (Disposer.isDisposer(value)) {
  51871. this.resources[this.index]._setDisposable(value);
  51872. return value.promise();
  51873. }
  51874. return value;
  51875. }
  51876. function ResourceList(length) {
  51877. this.length = length;
  51878. this.promise = null;
  51879. this[length-1] = null;
  51880. }
  51881. ResourceList.prototype._resultCancelled = function() {
  51882. var len = this.length;
  51883. for (var i = 0; i < len; ++i) {
  51884. var item = this[i];
  51885. if (item instanceof Promise) {
  51886. item.cancel();
  51887. }
  51888. }
  51889. };
  51890. Promise.using = function () {
  51891. var len = arguments.length;
  51892. if (len < 2) return apiRejection(
  51893. "you must pass at least 2 arguments to Promise.using");
  51894. var fn = arguments[len - 1];
  51895. if (typeof fn !== "function") {
  51896. return apiRejection("expecting a function but got " + util.classString(fn));
  51897. }
  51898. var input;
  51899. var spreadArgs = true;
  51900. if (len === 2 && Array.isArray(arguments[0])) {
  51901. input = arguments[0];
  51902. len = input.length;
  51903. spreadArgs = false;
  51904. } else {
  51905. input = arguments;
  51906. len--;
  51907. }
  51908. var resources = new ResourceList(len);
  51909. for (var i = 0; i < len; ++i) {
  51910. var resource = input[i];
  51911. if (Disposer.isDisposer(resource)) {
  51912. var disposer = resource;
  51913. resource = resource.promise();
  51914. resource._setDisposable(disposer);
  51915. } else {
  51916. var maybePromise = tryConvertToPromise(resource);
  51917. if (maybePromise instanceof Promise) {
  51918. resource =
  51919. maybePromise._then(maybeUnwrapDisposer, null, null, {
  51920. resources: resources,
  51921. index: i
  51922. }, undefined);
  51923. }
  51924. }
  51925. resources[i] = resource;
  51926. }
  51927. var reflectedResources = new Array(resources.length);
  51928. for (var i = 0; i < reflectedResources.length; ++i) {
  51929. reflectedResources[i] = Promise.resolve(resources[i]).reflect();
  51930. }
  51931. var resultPromise = Promise.all(reflectedResources)
  51932. .then(function(inspections) {
  51933. for (var i = 0; i < inspections.length; ++i) {
  51934. var inspection = inspections[i];
  51935. if (inspection.isRejected()) {
  51936. errorObj.e = inspection.error();
  51937. return errorObj;
  51938. } else if (!inspection.isFulfilled()) {
  51939. resultPromise.cancel();
  51940. return;
  51941. }
  51942. inspections[i] = inspection.value();
  51943. }
  51944. promise._pushContext();
  51945. fn = tryCatch(fn);
  51946. var ret = spreadArgs
  51947. ? fn.apply(undefined, inspections) : fn(inspections);
  51948. var promiseCreated = promise._popContext();
  51949. debug.checkForgottenReturns(
  51950. ret, promiseCreated, "Promise.using", promise);
  51951. return ret;
  51952. });
  51953. var promise = resultPromise.lastly(function() {
  51954. var inspection = new Promise.PromiseInspection(resultPromise);
  51955. return dispose(resources, inspection);
  51956. });
  51957. resources.promise = promise;
  51958. promise._setOnCancel(resources);
  51959. return promise;
  51960. };
  51961. Promise.prototype._setDisposable = function (disposer) {
  51962. this._bitField = this._bitField | 131072;
  51963. this._disposer = disposer;
  51964. };
  51965. Promise.prototype._isDisposable = function () {
  51966. return (this._bitField & 131072) > 0;
  51967. };
  51968. Promise.prototype._getDisposer = function () {
  51969. return this._disposer;
  51970. };
  51971. Promise.prototype._unsetDisposable = function () {
  51972. this._bitField = this._bitField & (~131072);
  51973. this._disposer = undefined;
  51974. };
  51975. Promise.prototype.disposer = function (fn) {
  51976. if (typeof fn === "function") {
  51977. return new FunctionDisposer(fn, this, createContext());
  51978. }
  51979. throw new TypeError();
  51980. };
  51981. };
  51982. /***/ }),
  51983. /* 508 */
  51984. /***/ (function(module, exports, __webpack_require__) {
  51985. "use strict";
  51986. module.exports = function(Promise, INTERNAL, debug) {
  51987. var util = __webpack_require__(4);
  51988. var TimeoutError = Promise.TimeoutError;
  51989. function HandleWrapper(handle) {
  51990. this.handle = handle;
  51991. }
  51992. HandleWrapper.prototype._resultCancelled = function() {
  51993. clearTimeout(this.handle);
  51994. };
  51995. var afterValue = function(value) { return delay(+this).thenReturn(value); };
  51996. var delay = Promise.delay = function (ms, value) {
  51997. var ret;
  51998. var handle;
  51999. if (value !== undefined) {
  52000. ret = Promise.resolve(value)
  52001. ._then(afterValue, null, null, ms, undefined);
  52002. if (debug.cancellation() && value instanceof Promise) {
  52003. ret._setOnCancel(value);
  52004. }
  52005. } else {
  52006. ret = new Promise(INTERNAL);
  52007. handle = setTimeout(function() { ret._fulfill(); }, +ms);
  52008. if (debug.cancellation()) {
  52009. ret._setOnCancel(new HandleWrapper(handle));
  52010. }
  52011. ret._captureStackTrace();
  52012. }
  52013. ret._setAsyncGuaranteed();
  52014. return ret;
  52015. };
  52016. Promise.prototype.delay = function (ms) {
  52017. return delay(ms, this);
  52018. };
  52019. var afterTimeout = function (promise, message, parent) {
  52020. var err;
  52021. if (typeof message !== "string") {
  52022. if (message instanceof Error) {
  52023. err = message;
  52024. } else {
  52025. err = new TimeoutError("operation timed out");
  52026. }
  52027. } else {
  52028. err = new TimeoutError(message);
  52029. }
  52030. util.markAsOriginatingFromRejection(err);
  52031. promise._attachExtraTrace(err);
  52032. promise._reject(err);
  52033. if (parent != null) {
  52034. parent.cancel();
  52035. }
  52036. };
  52037. function successClear(value) {
  52038. clearTimeout(this.handle);
  52039. return value;
  52040. }
  52041. function failureClear(reason) {
  52042. clearTimeout(this.handle);
  52043. throw reason;
  52044. }
  52045. Promise.prototype.timeout = function (ms, message) {
  52046. ms = +ms;
  52047. var ret, parent;
  52048. var handleWrapper = new HandleWrapper(setTimeout(function timeoutTimeout() {
  52049. if (ret.isPending()) {
  52050. afterTimeout(ret, message, parent);
  52051. }
  52052. }, ms));
  52053. if (debug.cancellation()) {
  52054. parent = this.then();
  52055. ret = parent._then(successClear, failureClear,
  52056. undefined, handleWrapper, undefined);
  52057. ret._setOnCancel(handleWrapper);
  52058. } else {
  52059. ret = this._then(successClear, failureClear,
  52060. undefined, handleWrapper, undefined);
  52061. }
  52062. return ret;
  52063. };
  52064. };
  52065. /***/ }),
  52066. /* 509 */
  52067. /***/ (function(module, exports, __webpack_require__) {
  52068. "use strict";
  52069. module.exports = function(Promise,
  52070. apiRejection,
  52071. INTERNAL,
  52072. tryConvertToPromise,
  52073. Proxyable,
  52074. debug) {
  52075. var errors = __webpack_require__(37);
  52076. var TypeError = errors.TypeError;
  52077. var util = __webpack_require__(4);
  52078. var errorObj = util.errorObj;
  52079. var tryCatch = util.tryCatch;
  52080. var yieldHandlers = [];
  52081. function promiseFromYieldHandler(value, yieldHandlers, traceParent) {
  52082. for (var i = 0; i < yieldHandlers.length; ++i) {
  52083. traceParent._pushContext();
  52084. var result = tryCatch(yieldHandlers[i])(value);
  52085. traceParent._popContext();
  52086. if (result === errorObj) {
  52087. traceParent._pushContext();
  52088. var ret = Promise.reject(errorObj.e);
  52089. traceParent._popContext();
  52090. return ret;
  52091. }
  52092. var maybePromise = tryConvertToPromise(result, traceParent);
  52093. if (maybePromise instanceof Promise) return maybePromise;
  52094. }
  52095. return null;
  52096. }
  52097. function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {
  52098. if (debug.cancellation()) {
  52099. var internal = new Promise(INTERNAL);
  52100. var _finallyPromise = this._finallyPromise = new Promise(INTERNAL);
  52101. this._promise = internal.lastly(function() {
  52102. return _finallyPromise;
  52103. });
  52104. internal._captureStackTrace();
  52105. internal._setOnCancel(this);
  52106. } else {
  52107. var promise = this._promise = new Promise(INTERNAL);
  52108. promise._captureStackTrace();
  52109. }
  52110. this._stack = stack;
  52111. this._generatorFunction = generatorFunction;
  52112. this._receiver = receiver;
  52113. this._generator = undefined;
  52114. this._yieldHandlers = typeof yieldHandler === "function"
  52115. ? [yieldHandler].concat(yieldHandlers)
  52116. : yieldHandlers;
  52117. this._yieldedPromise = null;
  52118. this._cancellationPhase = false;
  52119. }
  52120. util.inherits(PromiseSpawn, Proxyable);
  52121. PromiseSpawn.prototype._isResolved = function() {
  52122. return this._promise === null;
  52123. };
  52124. PromiseSpawn.prototype._cleanup = function() {
  52125. this._promise = this._generator = null;
  52126. if (debug.cancellation() && this._finallyPromise !== null) {
  52127. this._finallyPromise._fulfill();
  52128. this._finallyPromise = null;
  52129. }
  52130. };
  52131. PromiseSpawn.prototype._promiseCancelled = function() {
  52132. if (this._isResolved()) return;
  52133. var implementsReturn = typeof this._generator["return"] !== "undefined";
  52134. var result;
  52135. if (!implementsReturn) {
  52136. var reason = new Promise.CancellationError(
  52137. "generator .return() sentinel");
  52138. Promise.coroutine.returnSentinel = reason;
  52139. this._promise._attachExtraTrace(reason);
  52140. this._promise._pushContext();
  52141. result = tryCatch(this._generator["throw"]).call(this._generator,
  52142. reason);
  52143. this._promise._popContext();
  52144. } else {
  52145. this._promise._pushContext();
  52146. result = tryCatch(this._generator["return"]).call(this._generator,
  52147. undefined);
  52148. this._promise._popContext();
  52149. }
  52150. this._cancellationPhase = true;
  52151. this._yieldedPromise = null;
  52152. this._continue(result);
  52153. };
  52154. PromiseSpawn.prototype._promiseFulfilled = function(value) {
  52155. this._yieldedPromise = null;
  52156. this._promise._pushContext();
  52157. var result = tryCatch(this._generator.next).call(this._generator, value);
  52158. this._promise._popContext();
  52159. this._continue(result);
  52160. };
  52161. PromiseSpawn.prototype._promiseRejected = function(reason) {
  52162. this._yieldedPromise = null;
  52163. this._promise._attachExtraTrace(reason);
  52164. this._promise._pushContext();
  52165. var result = tryCatch(this._generator["throw"])
  52166. .call(this._generator, reason);
  52167. this._promise._popContext();
  52168. this._continue(result);
  52169. };
  52170. PromiseSpawn.prototype._resultCancelled = function() {
  52171. if (this._yieldedPromise instanceof Promise) {
  52172. var promise = this._yieldedPromise;
  52173. this._yieldedPromise = null;
  52174. promise.cancel();
  52175. }
  52176. };
  52177. PromiseSpawn.prototype.promise = function () {
  52178. return this._promise;
  52179. };
  52180. PromiseSpawn.prototype._run = function () {
  52181. this._generator = this._generatorFunction.call(this._receiver);
  52182. this._receiver =
  52183. this._generatorFunction = undefined;
  52184. this._promiseFulfilled(undefined);
  52185. };
  52186. PromiseSpawn.prototype._continue = function (result) {
  52187. var promise = this._promise;
  52188. if (result === errorObj) {
  52189. this._cleanup();
  52190. if (this._cancellationPhase) {
  52191. return promise.cancel();
  52192. } else {
  52193. return promise._rejectCallback(result.e, false);
  52194. }
  52195. }
  52196. var value = result.value;
  52197. if (result.done === true) {
  52198. this._cleanup();
  52199. if (this._cancellationPhase) {
  52200. return promise.cancel();
  52201. } else {
  52202. return promise._resolveCallback(value);
  52203. }
  52204. } else {
  52205. var maybePromise = tryConvertToPromise(value, this._promise);
  52206. if (!(maybePromise instanceof Promise)) {
  52207. maybePromise =
  52208. promiseFromYieldHandler(maybePromise,
  52209. this._yieldHandlers,
  52210. this._promise);
  52211. if (maybePromise === null) {
  52212. this._promiseRejected(
  52213. new TypeError(
  52214. "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/MqrFmX\u000a\u000a".replace("%s", String(value)) +
  52215. "From coroutine:\u000a" +
  52216. this._stack.split("\n").slice(1, -7).join("\n")
  52217. )
  52218. );
  52219. return;
  52220. }
  52221. }
  52222. maybePromise = maybePromise._target();
  52223. var bitField = maybePromise._bitField;
  52224. ;
  52225. if (((bitField & 50397184) === 0)) {
  52226. this._yieldedPromise = maybePromise;
  52227. maybePromise._proxy(this, null);
  52228. } else if (((bitField & 33554432) !== 0)) {
  52229. Promise._async.invoke(
  52230. this._promiseFulfilled, this, maybePromise._value()
  52231. );
  52232. } else if (((bitField & 16777216) !== 0)) {
  52233. Promise._async.invoke(
  52234. this._promiseRejected, this, maybePromise._reason()
  52235. );
  52236. } else {
  52237. this._promiseCancelled();
  52238. }
  52239. }
  52240. };
  52241. Promise.coroutine = function (generatorFunction, options) {
  52242. if (typeof generatorFunction !== "function") {
  52243. throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
  52244. }
  52245. var yieldHandler = Object(options).yieldHandler;
  52246. var PromiseSpawn$ = PromiseSpawn;
  52247. var stack = new Error().stack;
  52248. return function () {
  52249. var generator = generatorFunction.apply(this, arguments);
  52250. var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler,
  52251. stack);
  52252. var ret = spawn.promise();
  52253. spawn._generator = generator;
  52254. spawn._promiseFulfilled(undefined);
  52255. return ret;
  52256. };
  52257. };
  52258. Promise.coroutine.addYieldHandler = function(fn) {
  52259. if (typeof fn !== "function") {
  52260. throw new TypeError("expecting a function but got " + util.classString(fn));
  52261. }
  52262. yieldHandlers.push(fn);
  52263. };
  52264. Promise.spawn = function (generatorFunction) {
  52265. debug.deprecated("Promise.spawn()", "Promise.coroutine()");
  52266. if (typeof generatorFunction !== "function") {
  52267. return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
  52268. }
  52269. var spawn = new PromiseSpawn(generatorFunction, this);
  52270. var ret = spawn.promise();
  52271. spawn._run(Promise.spawn);
  52272. return ret;
  52273. };
  52274. };
  52275. /***/ }),
  52276. /* 510 */
  52277. /***/ (function(module, exports, __webpack_require__) {
  52278. "use strict";
  52279. module.exports = function(Promise) {
  52280. var util = __webpack_require__(4);
  52281. var async = Promise._async;
  52282. var tryCatch = util.tryCatch;
  52283. var errorObj = util.errorObj;
  52284. function spreadAdapter(val, nodeback) {
  52285. var promise = this;
  52286. if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);
  52287. var ret =
  52288. tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val));
  52289. if (ret === errorObj) {
  52290. async.throwLater(ret.e);
  52291. }
  52292. }
  52293. function successAdapter(val, nodeback) {
  52294. var promise = this;
  52295. var receiver = promise._boundValue();
  52296. var ret = val === undefined
  52297. ? tryCatch(nodeback).call(receiver, null)
  52298. : tryCatch(nodeback).call(receiver, null, val);
  52299. if (ret === errorObj) {
  52300. async.throwLater(ret.e);
  52301. }
  52302. }
  52303. function errorAdapter(reason, nodeback) {
  52304. var promise = this;
  52305. if (!reason) {
  52306. var newReason = new Error(reason + "");
  52307. newReason.cause = reason;
  52308. reason = newReason;
  52309. }
  52310. var ret = tryCatch(nodeback).call(promise._boundValue(), reason);
  52311. if (ret === errorObj) {
  52312. async.throwLater(ret.e);
  52313. }
  52314. }
  52315. Promise.prototype.asCallback = Promise.prototype.nodeify = function (nodeback,
  52316. options) {
  52317. if (typeof nodeback == "function") {
  52318. var adapter = successAdapter;
  52319. if (options !== undefined && Object(options).spread) {
  52320. adapter = spreadAdapter;
  52321. }
  52322. this._then(
  52323. adapter,
  52324. errorAdapter,
  52325. undefined,
  52326. this,
  52327. nodeback
  52328. );
  52329. }
  52330. return this;
  52331. };
  52332. };
  52333. /***/ }),
  52334. /* 511 */
  52335. /***/ (function(module, exports, __webpack_require__) {
  52336. "use strict";
  52337. module.exports = function(Promise, INTERNAL) {
  52338. var THIS = {};
  52339. var util = __webpack_require__(4);
  52340. var nodebackForPromise = __webpack_require__(333);
  52341. var withAppended = util.withAppended;
  52342. var maybeWrapAsError = util.maybeWrapAsError;
  52343. var canEvaluate = util.canEvaluate;
  52344. var TypeError = __webpack_require__(37).TypeError;
  52345. var defaultSuffix = "Async";
  52346. var defaultPromisified = {__isPromisified__: true};
  52347. var noCopyProps = [
  52348. "arity", "length",
  52349. "name",
  52350. "arguments",
  52351. "caller",
  52352. "callee",
  52353. "prototype",
  52354. "__isPromisified__"
  52355. ];
  52356. var noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$");
  52357. var defaultFilter = function(name) {
  52358. return util.isIdentifier(name) &&
  52359. name.charAt(0) !== "_" &&
  52360. name !== "constructor";
  52361. };
  52362. function propsFilter(key) {
  52363. return !noCopyPropsPattern.test(key);
  52364. }
  52365. function isPromisified(fn) {
  52366. try {
  52367. return fn.__isPromisified__ === true;
  52368. }
  52369. catch (e) {
  52370. return false;
  52371. }
  52372. }
  52373. function hasPromisified(obj, key, suffix) {
  52374. var val = util.getDataPropertyOrDefault(obj, key + suffix,
  52375. defaultPromisified);
  52376. return val ? isPromisified(val) : false;
  52377. }
  52378. function checkValid(ret, suffix, suffixRegexp) {
  52379. for (var i = 0; i < ret.length; i += 2) {
  52380. var key = ret[i];
  52381. if (suffixRegexp.test(key)) {
  52382. var keyWithoutAsyncSuffix = key.replace(suffixRegexp, "");
  52383. for (var j = 0; j < ret.length; j += 2) {
  52384. if (ret[j] === keyWithoutAsyncSuffix) {
  52385. throw new TypeError("Cannot promisify an API that has normal methods with '%s'-suffix\u000a\u000a See http://goo.gl/MqrFmX\u000a"
  52386. .replace("%s", suffix));
  52387. }
  52388. }
  52389. }
  52390. }
  52391. }
  52392. function promisifiableMethods(obj, suffix, suffixRegexp, filter) {
  52393. var keys = util.inheritedDataKeys(obj);
  52394. var ret = [];
  52395. for (var i = 0; i < keys.length; ++i) {
  52396. var key = keys[i];
  52397. var value = obj[key];
  52398. var passesDefaultFilter = filter === defaultFilter
  52399. ? true : defaultFilter(key, value, obj);
  52400. if (typeof value === "function" &&
  52401. !isPromisified(value) &&
  52402. !hasPromisified(obj, key, suffix) &&
  52403. filter(key, value, obj, passesDefaultFilter)) {
  52404. ret.push(key, value);
  52405. }
  52406. }
  52407. checkValid(ret, suffix, suffixRegexp);
  52408. return ret;
  52409. }
  52410. var escapeIdentRegex = function(str) {
  52411. return str.replace(/([$])/, "\\$");
  52412. };
  52413. var makeNodePromisifiedEval;
  52414. if (true) {
  52415. var switchCaseArgumentOrder = function(likelyArgumentCount) {
  52416. var ret = [likelyArgumentCount];
  52417. var min = Math.max(0, likelyArgumentCount - 1 - 3);
  52418. for(var i = likelyArgumentCount - 1; i >= min; --i) {
  52419. ret.push(i);
  52420. }
  52421. for(var i = likelyArgumentCount + 1; i <= 3; ++i) {
  52422. ret.push(i);
  52423. }
  52424. return ret;
  52425. };
  52426. var argumentSequence = function(argumentCount) {
  52427. return util.filledRange(argumentCount, "_arg", "");
  52428. };
  52429. var parameterDeclaration = function(parameterCount) {
  52430. return util.filledRange(
  52431. Math.max(parameterCount, 3), "_arg", "");
  52432. };
  52433. var parameterCount = function(fn) {
  52434. if (typeof fn.length === "number") {
  52435. return Math.max(Math.min(fn.length, 1023 + 1), 0);
  52436. }
  52437. return 0;
  52438. };
  52439. makeNodePromisifiedEval =
  52440. function(callback, receiver, originalName, fn, _, multiArgs) {
  52441. var newParameterCount = Math.max(0, parameterCount(fn) - 1);
  52442. var argumentOrder = switchCaseArgumentOrder(newParameterCount);
  52443. var shouldProxyThis = typeof callback === "string" || receiver === THIS;
  52444. function generateCallForArgumentCount(count) {
  52445. var args = argumentSequence(count).join(", ");
  52446. var comma = count > 0 ? ", " : "";
  52447. var ret;
  52448. if (shouldProxyThis) {
  52449. ret = "ret = callback.call(this, {{args}}, nodeback); break;\n";
  52450. } else {
  52451. ret = receiver === undefined
  52452. ? "ret = callback({{args}}, nodeback); break;\n"
  52453. : "ret = callback.call(receiver, {{args}}, nodeback); break;\n";
  52454. }
  52455. return ret.replace("{{args}}", args).replace(", ", comma);
  52456. }
  52457. function generateArgumentSwitchCase() {
  52458. var ret = "";
  52459. for (var i = 0; i < argumentOrder.length; ++i) {
  52460. ret += "case " + argumentOrder[i] +":" +
  52461. generateCallForArgumentCount(argumentOrder[i]);
  52462. }
  52463. ret += " \n\
  52464. default: \n\
  52465. var args = new Array(len + 1); \n\
  52466. var i = 0; \n\
  52467. for (var i = 0; i < len; ++i) { \n\
  52468. args[i] = arguments[i]; \n\
  52469. } \n\
  52470. args[i] = nodeback; \n\
  52471. [CodeForCall] \n\
  52472. break; \n\
  52473. ".replace("[CodeForCall]", (shouldProxyThis
  52474. ? "ret = callback.apply(this, args);\n"
  52475. : "ret = callback.apply(receiver, args);\n"));
  52476. return ret;
  52477. }
  52478. var getFunctionCode = typeof callback === "string"
  52479. ? ("this != null ? this['"+callback+"'] : fn")
  52480. : "fn";
  52481. var body = "'use strict'; \n\
  52482. var ret = function (Parameters) { \n\
  52483. 'use strict'; \n\
  52484. var len = arguments.length; \n\
  52485. var promise = new Promise(INTERNAL); \n\
  52486. promise._captureStackTrace(); \n\
  52487. var nodeback = nodebackForPromise(promise, " + multiArgs + "); \n\
  52488. var ret; \n\
  52489. var callback = tryCatch([GetFunctionCode]); \n\
  52490. switch(len) { \n\
  52491. [CodeForSwitchCase] \n\
  52492. } \n\
  52493. if (ret === errorObj) { \n\
  52494. promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\
  52495. } \n\
  52496. if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n\
  52497. return promise; \n\
  52498. }; \n\
  52499. notEnumerableProp(ret, '__isPromisified__', true); \n\
  52500. return ret; \n\
  52501. ".replace("[CodeForSwitchCase]", generateArgumentSwitchCase())
  52502. .replace("[GetFunctionCode]", getFunctionCode);
  52503. body = body.replace("Parameters", parameterDeclaration(newParameterCount));
  52504. return new Function("Promise",
  52505. "fn",
  52506. "receiver",
  52507. "withAppended",
  52508. "maybeWrapAsError",
  52509. "nodebackForPromise",
  52510. "tryCatch",
  52511. "errorObj",
  52512. "notEnumerableProp",
  52513. "INTERNAL",
  52514. body)(
  52515. Promise,
  52516. fn,
  52517. receiver,
  52518. withAppended,
  52519. maybeWrapAsError,
  52520. nodebackForPromise,
  52521. util.tryCatch,
  52522. util.errorObj,
  52523. util.notEnumerableProp,
  52524. INTERNAL);
  52525. };
  52526. }
  52527. function makeNodePromisifiedClosure(callback, receiver, _, fn, __, multiArgs) {
  52528. var defaultThis = (function() {return this;})();
  52529. var method = callback;
  52530. if (typeof method === "string") {
  52531. callback = fn;
  52532. }
  52533. function promisified() {
  52534. var _receiver = receiver;
  52535. if (receiver === THIS) _receiver = this;
  52536. var promise = new Promise(INTERNAL);
  52537. promise._captureStackTrace();
  52538. var cb = typeof method === "string" && this !== defaultThis
  52539. ? this[method] : callback;
  52540. var fn = nodebackForPromise(promise, multiArgs);
  52541. try {
  52542. cb.apply(_receiver, withAppended(arguments, fn));
  52543. } catch(e) {
  52544. promise._rejectCallback(maybeWrapAsError(e), true, true);
  52545. }
  52546. if (!promise._isFateSealed()) promise._setAsyncGuaranteed();
  52547. return promise;
  52548. }
  52549. util.notEnumerableProp(promisified, "__isPromisified__", true);
  52550. return promisified;
  52551. }
  52552. var makeNodePromisified = canEvaluate
  52553. ? makeNodePromisifiedEval
  52554. : makeNodePromisifiedClosure;
  52555. function promisifyAll(obj, suffix, filter, promisifier, multiArgs) {
  52556. var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$");
  52557. var methods =
  52558. promisifiableMethods(obj, suffix, suffixRegexp, filter);
  52559. for (var i = 0, len = methods.length; i < len; i+= 2) {
  52560. var key = methods[i];
  52561. var fn = methods[i+1];
  52562. var promisifiedKey = key + suffix;
  52563. if (promisifier === makeNodePromisified) {
  52564. obj[promisifiedKey] =
  52565. makeNodePromisified(key, THIS, key, fn, suffix, multiArgs);
  52566. } else {
  52567. var promisified = promisifier(fn, function() {
  52568. return makeNodePromisified(key, THIS, key,
  52569. fn, suffix, multiArgs);
  52570. });
  52571. util.notEnumerableProp(promisified, "__isPromisified__", true);
  52572. obj[promisifiedKey] = promisified;
  52573. }
  52574. }
  52575. util.toFastProperties(obj);
  52576. return obj;
  52577. }
  52578. function promisify(callback, receiver, multiArgs) {
  52579. return makeNodePromisified(callback, receiver, undefined,
  52580. callback, null, multiArgs);
  52581. }
  52582. Promise.promisify = function (fn, options) {
  52583. if (typeof fn !== "function") {
  52584. throw new TypeError("expecting a function but got " + util.classString(fn));
  52585. }
  52586. if (isPromisified(fn)) {
  52587. return fn;
  52588. }
  52589. options = Object(options);
  52590. var receiver = options.context === undefined ? THIS : options.context;
  52591. var multiArgs = !!options.multiArgs;
  52592. var ret = promisify(fn, receiver, multiArgs);
  52593. util.copyDescriptors(fn, ret, propsFilter);
  52594. return ret;
  52595. };
  52596. Promise.promisifyAll = function (target, options) {
  52597. if (typeof target !== "function" && typeof target !== "object") {
  52598. throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
  52599. }
  52600. options = Object(options);
  52601. var multiArgs = !!options.multiArgs;
  52602. var suffix = options.suffix;
  52603. if (typeof suffix !== "string") suffix = defaultSuffix;
  52604. var filter = options.filter;
  52605. if (typeof filter !== "function") filter = defaultFilter;
  52606. var promisifier = options.promisifier;
  52607. if (typeof promisifier !== "function") promisifier = makeNodePromisified;
  52608. if (!util.isIdentifier(suffix)) {
  52609. throw new RangeError("suffix must be a valid identifier\u000a\u000a See http://goo.gl/MqrFmX\u000a");
  52610. }
  52611. var keys = util.inheritedDataKeys(target);
  52612. for (var i = 0; i < keys.length; ++i) {
  52613. var value = target[keys[i]];
  52614. if (keys[i] !== "constructor" &&
  52615. util.isClass(value)) {
  52616. promisifyAll(value.prototype, suffix, filter, promisifier,
  52617. multiArgs);
  52618. promisifyAll(value, suffix, filter, promisifier, multiArgs);
  52619. }
  52620. }
  52621. return promisifyAll(target, suffix, filter, promisifier, multiArgs);
  52622. };
  52623. };
  52624. /***/ }),
  52625. /* 512 */
  52626. /***/ (function(module, exports, __webpack_require__) {
  52627. "use strict";
  52628. module.exports = function(
  52629. Promise, PromiseArray, tryConvertToPromise, apiRejection) {
  52630. var util = __webpack_require__(4);
  52631. var isObject = util.isObject;
  52632. var es5 = __webpack_require__(59);
  52633. var Es6Map;
  52634. if (typeof Map === "function") Es6Map = Map;
  52635. var mapToEntries = (function() {
  52636. var index = 0;
  52637. var size = 0;
  52638. function extractEntry(value, key) {
  52639. this[index] = value;
  52640. this[index + size] = key;
  52641. index++;
  52642. }
  52643. return function mapToEntries(map) {
  52644. size = map.size;
  52645. index = 0;
  52646. var ret = new Array(map.size * 2);
  52647. map.forEach(extractEntry, ret);
  52648. return ret;
  52649. };
  52650. })();
  52651. var entriesToMap = function(entries) {
  52652. var ret = new Es6Map();
  52653. var length = entries.length / 2 | 0;
  52654. for (var i = 0; i < length; ++i) {
  52655. var key = entries[length + i];
  52656. var value = entries[i];
  52657. ret.set(key, value);
  52658. }
  52659. return ret;
  52660. };
  52661. function PropertiesPromiseArray(obj) {
  52662. var isMap = false;
  52663. var entries;
  52664. if (Es6Map !== undefined && obj instanceof Es6Map) {
  52665. entries = mapToEntries(obj);
  52666. isMap = true;
  52667. } else {
  52668. var keys = es5.keys(obj);
  52669. var len = keys.length;
  52670. entries = new Array(len * 2);
  52671. for (var i = 0; i < len; ++i) {
  52672. var key = keys[i];
  52673. entries[i] = obj[key];
  52674. entries[i + len] = key;
  52675. }
  52676. }
  52677. this.constructor$(entries);
  52678. this._isMap = isMap;
  52679. this._init$(undefined, isMap ? -6 : -3);
  52680. }
  52681. util.inherits(PropertiesPromiseArray, PromiseArray);
  52682. PropertiesPromiseArray.prototype._init = function () {};
  52683. PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) {
  52684. this._values[index] = value;
  52685. var totalResolved = ++this._totalResolved;
  52686. if (totalResolved >= this._length) {
  52687. var val;
  52688. if (this._isMap) {
  52689. val = entriesToMap(this._values);
  52690. } else {
  52691. val = {};
  52692. var keyOffset = this.length();
  52693. for (var i = 0, len = this.length(); i < len; ++i) {
  52694. val[this._values[i + keyOffset]] = this._values[i];
  52695. }
  52696. }
  52697. this._resolve(val);
  52698. return true;
  52699. }
  52700. return false;
  52701. };
  52702. PropertiesPromiseArray.prototype.shouldCopyValues = function () {
  52703. return false;
  52704. };
  52705. PropertiesPromiseArray.prototype.getActualLength = function (len) {
  52706. return len >> 1;
  52707. };
  52708. function props(promises) {
  52709. var ret;
  52710. var castValue = tryConvertToPromise(promises);
  52711. if (!isObject(castValue)) {
  52712. return apiRejection("cannot await properties of a non-object\u000a\u000a See http://goo.gl/MqrFmX\u000a");
  52713. } else if (castValue instanceof Promise) {
  52714. ret = castValue._then(
  52715. Promise.props, undefined, undefined, undefined, undefined);
  52716. } else {
  52717. ret = new PropertiesPromiseArray(castValue).promise();
  52718. }
  52719. if (castValue instanceof Promise) {
  52720. ret._propagateFrom(castValue, 2);
  52721. }
  52722. return ret;
  52723. }
  52724. Promise.prototype.props = function () {
  52725. return props(this);
  52726. };
  52727. Promise.props = function (promises) {
  52728. return props(promises);
  52729. };
  52730. };
  52731. /***/ }),
  52732. /* 513 */
  52733. /***/ (function(module, exports, __webpack_require__) {
  52734. "use strict";
  52735. module.exports = function(
  52736. Promise, INTERNAL, tryConvertToPromise, apiRejection) {
  52737. var util = __webpack_require__(4);
  52738. var raceLater = function (promise) {
  52739. return promise.then(function(array) {
  52740. return race(array, promise);
  52741. });
  52742. };
  52743. function race(promises, parent) {
  52744. var maybePromise = tryConvertToPromise(promises);
  52745. if (maybePromise instanceof Promise) {
  52746. return raceLater(maybePromise);
  52747. } else {
  52748. promises = util.asArray(promises);
  52749. if (promises === null)
  52750. return apiRejection("expecting an array or an iterable object but got " + util.classString(promises));
  52751. }
  52752. var ret = new Promise(INTERNAL);
  52753. if (parent !== undefined) {
  52754. ret._propagateFrom(parent, 3);
  52755. }
  52756. var fulfill = ret._fulfill;
  52757. var reject = ret._reject;
  52758. for (var i = 0, len = promises.length; i < len; ++i) {
  52759. var val = promises[i];
  52760. if (val === undefined && !(i in promises)) {
  52761. continue;
  52762. }
  52763. Promise.cast(val)._then(fulfill, reject, undefined, ret, null);
  52764. }
  52765. return ret;
  52766. }
  52767. Promise.race = function (promises) {
  52768. return race(promises, undefined);
  52769. };
  52770. Promise.prototype.race = function () {
  52771. return race(this, undefined);
  52772. };
  52773. };
  52774. /***/ }),
  52775. /* 514 */
  52776. /***/ (function(module, exports, __webpack_require__) {
  52777. "use strict";
  52778. module.exports = function(Promise,
  52779. PromiseArray,
  52780. apiRejection,
  52781. tryConvertToPromise,
  52782. INTERNAL,
  52783. debug) {
  52784. var getDomain = Promise._getDomain;
  52785. var util = __webpack_require__(4);
  52786. var tryCatch = util.tryCatch;
  52787. function ReductionPromiseArray(promises, fn, initialValue, _each) {
  52788. this.constructor$(promises);
  52789. var domain = getDomain();
  52790. this._fn = domain === null ? fn : util.domainBind(domain, fn);
  52791. if (initialValue !== undefined) {
  52792. initialValue = Promise.resolve(initialValue);
  52793. initialValue._attachCancellationCallback(this);
  52794. }
  52795. this._initialValue = initialValue;
  52796. this._currentCancellable = null;
  52797. if(_each === INTERNAL) {
  52798. this._eachValues = Array(this._length);
  52799. } else if (_each === 0) {
  52800. this._eachValues = null;
  52801. } else {
  52802. this._eachValues = undefined;
  52803. }
  52804. this._promise._captureStackTrace();
  52805. this._init$(undefined, -5);
  52806. }
  52807. util.inherits(ReductionPromiseArray, PromiseArray);
  52808. ReductionPromiseArray.prototype._gotAccum = function(accum) {
  52809. if (this._eachValues !== undefined &&
  52810. this._eachValues !== null &&
  52811. accum !== INTERNAL) {
  52812. this._eachValues.push(accum);
  52813. }
  52814. };
  52815. ReductionPromiseArray.prototype._eachComplete = function(value) {
  52816. if (this._eachValues !== null) {
  52817. this._eachValues.push(value);
  52818. }
  52819. return this._eachValues;
  52820. };
  52821. ReductionPromiseArray.prototype._init = function() {};
  52822. ReductionPromiseArray.prototype._resolveEmptyArray = function() {
  52823. this._resolve(this._eachValues !== undefined ? this._eachValues
  52824. : this._initialValue);
  52825. };
  52826. ReductionPromiseArray.prototype.shouldCopyValues = function () {
  52827. return false;
  52828. };
  52829. ReductionPromiseArray.prototype._resolve = function(value) {
  52830. this._promise._resolveCallback(value);
  52831. this._values = null;
  52832. };
  52833. ReductionPromiseArray.prototype._resultCancelled = function(sender) {
  52834. if (sender === this._initialValue) return this._cancel();
  52835. if (this._isResolved()) return;
  52836. this._resultCancelled$();
  52837. if (this._currentCancellable instanceof Promise) {
  52838. this._currentCancellable.cancel();
  52839. }
  52840. if (this._initialValue instanceof Promise) {
  52841. this._initialValue.cancel();
  52842. }
  52843. };
  52844. ReductionPromiseArray.prototype._iterate = function (values) {
  52845. this._values = values;
  52846. var value;
  52847. var i;
  52848. var length = values.length;
  52849. if (this._initialValue !== undefined) {
  52850. value = this._initialValue;
  52851. i = 0;
  52852. } else {
  52853. value = Promise.resolve(values[0]);
  52854. i = 1;
  52855. }
  52856. this._currentCancellable = value;
  52857. if (!value.isRejected()) {
  52858. for (; i < length; ++i) {
  52859. var ctx = {
  52860. accum: null,
  52861. value: values[i],
  52862. index: i,
  52863. length: length,
  52864. array: this
  52865. };
  52866. value = value._then(gotAccum, undefined, undefined, ctx, undefined);
  52867. }
  52868. }
  52869. if (this._eachValues !== undefined) {
  52870. value = value
  52871. ._then(this._eachComplete, undefined, undefined, this, undefined);
  52872. }
  52873. value._then(completed, completed, undefined, value, this);
  52874. };
  52875. Promise.prototype.reduce = function (fn, initialValue) {
  52876. return reduce(this, fn, initialValue, null);
  52877. };
  52878. Promise.reduce = function (promises, fn, initialValue, _each) {
  52879. return reduce(promises, fn, initialValue, _each);
  52880. };
  52881. function completed(valueOrReason, array) {
  52882. if (this.isFulfilled()) {
  52883. array._resolve(valueOrReason);
  52884. } else {
  52885. array._reject(valueOrReason);
  52886. }
  52887. }
  52888. function reduce(promises, fn, initialValue, _each) {
  52889. if (typeof fn !== "function") {
  52890. return apiRejection("expecting a function but got " + util.classString(fn));
  52891. }
  52892. var array = new ReductionPromiseArray(promises, fn, initialValue, _each);
  52893. return array.promise();
  52894. }
  52895. function gotAccum(accum) {
  52896. this.accum = accum;
  52897. this.array._gotAccum(accum);
  52898. var value = tryConvertToPromise(this.value, this.array._promise);
  52899. if (value instanceof Promise) {
  52900. this.array._currentCancellable = value;
  52901. return value._then(gotValue, undefined, undefined, this, undefined);
  52902. } else {
  52903. return gotValue.call(this, value);
  52904. }
  52905. }
  52906. function gotValue(value) {
  52907. var array = this.array;
  52908. var promise = array._promise;
  52909. var fn = tryCatch(array._fn);
  52910. promise._pushContext();
  52911. var ret;
  52912. if (array._eachValues !== undefined) {
  52913. ret = fn.call(promise._boundValue(), value, this.index, this.length);
  52914. } else {
  52915. ret = fn.call(promise._boundValue(),
  52916. this.accum, value, this.index, this.length);
  52917. }
  52918. if (ret instanceof Promise) {
  52919. array._currentCancellable = ret;
  52920. }
  52921. var promiseCreated = promise._popContext();
  52922. debug.checkForgottenReturns(
  52923. ret,
  52924. promiseCreated,
  52925. array._eachValues !== undefined ? "Promise.each" : "Promise.reduce",
  52926. promise
  52927. );
  52928. return ret;
  52929. }
  52930. };
  52931. /***/ }),
  52932. /* 515 */
  52933. /***/ (function(module, exports, __webpack_require__) {
  52934. "use strict";
  52935. module.exports =
  52936. function(Promise, PromiseArray, debug) {
  52937. var PromiseInspection = Promise.PromiseInspection;
  52938. var util = __webpack_require__(4);
  52939. function SettledPromiseArray(values) {
  52940. this.constructor$(values);
  52941. }
  52942. util.inherits(SettledPromiseArray, PromiseArray);
  52943. SettledPromiseArray.prototype._promiseResolved = function (index, inspection) {
  52944. this._values[index] = inspection;
  52945. var totalResolved = ++this._totalResolved;
  52946. if (totalResolved >= this._length) {
  52947. this._resolve(this._values);
  52948. return true;
  52949. }
  52950. return false;
  52951. };
  52952. SettledPromiseArray.prototype._promiseFulfilled = function (value, index) {
  52953. var ret = new PromiseInspection();
  52954. ret._bitField = 33554432;
  52955. ret._settledValueField = value;
  52956. return this._promiseResolved(index, ret);
  52957. };
  52958. SettledPromiseArray.prototype._promiseRejected = function (reason, index) {
  52959. var ret = new PromiseInspection();
  52960. ret._bitField = 16777216;
  52961. ret._settledValueField = reason;
  52962. return this._promiseResolved(index, ret);
  52963. };
  52964. Promise.settle = function (promises) {
  52965. debug.deprecated(".settle()", ".reflect()");
  52966. return new SettledPromiseArray(promises).promise();
  52967. };
  52968. Promise.prototype.settle = function () {
  52969. return Promise.settle(this);
  52970. };
  52971. };
  52972. /***/ }),
  52973. /* 516 */
  52974. /***/ (function(module, exports, __webpack_require__) {
  52975. "use strict";
  52976. module.exports =
  52977. function(Promise, PromiseArray, apiRejection) {
  52978. var util = __webpack_require__(4);
  52979. var RangeError = __webpack_require__(37).RangeError;
  52980. var AggregateError = __webpack_require__(37).AggregateError;
  52981. var isArray = util.isArray;
  52982. var CANCELLATION = {};
  52983. function SomePromiseArray(values) {
  52984. this.constructor$(values);
  52985. this._howMany = 0;
  52986. this._unwrap = false;
  52987. this._initialized = false;
  52988. }
  52989. util.inherits(SomePromiseArray, PromiseArray);
  52990. SomePromiseArray.prototype._init = function () {
  52991. if (!this._initialized) {
  52992. return;
  52993. }
  52994. if (this._howMany === 0) {
  52995. this._resolve([]);
  52996. return;
  52997. }
  52998. this._init$(undefined, -5);
  52999. var isArrayResolved = isArray(this._values);
  53000. if (!this._isResolved() &&
  53001. isArrayResolved &&
  53002. this._howMany > this._canPossiblyFulfill()) {
  53003. this._reject(this._getRangeError(this.length()));
  53004. }
  53005. };
  53006. SomePromiseArray.prototype.init = function () {
  53007. this._initialized = true;
  53008. this._init();
  53009. };
  53010. SomePromiseArray.prototype.setUnwrap = function () {
  53011. this._unwrap = true;
  53012. };
  53013. SomePromiseArray.prototype.howMany = function () {
  53014. return this._howMany;
  53015. };
  53016. SomePromiseArray.prototype.setHowMany = function (count) {
  53017. this._howMany = count;
  53018. };
  53019. SomePromiseArray.prototype._promiseFulfilled = function (value) {
  53020. this._addFulfilled(value);
  53021. if (this._fulfilled() === this.howMany()) {
  53022. this._values.length = this.howMany();
  53023. if (this.howMany() === 1 && this._unwrap) {
  53024. this._resolve(this._values[0]);
  53025. } else {
  53026. this._resolve(this._values);
  53027. }
  53028. return true;
  53029. }
  53030. return false;
  53031. };
  53032. SomePromiseArray.prototype._promiseRejected = function (reason) {
  53033. this._addRejected(reason);
  53034. return this._checkOutcome();
  53035. };
  53036. SomePromiseArray.prototype._promiseCancelled = function () {
  53037. if (this._values instanceof Promise || this._values == null) {
  53038. return this._cancel();
  53039. }
  53040. this._addRejected(CANCELLATION);
  53041. return this._checkOutcome();
  53042. };
  53043. SomePromiseArray.prototype._checkOutcome = function() {
  53044. if (this.howMany() > this._canPossiblyFulfill()) {
  53045. var e = new AggregateError();
  53046. for (var i = this.length(); i < this._values.length; ++i) {
  53047. if (this._values[i] !== CANCELLATION) {
  53048. e.push(this._values[i]);
  53049. }
  53050. }
  53051. if (e.length > 0) {
  53052. this._reject(e);
  53053. } else {
  53054. this._cancel();
  53055. }
  53056. return true;
  53057. }
  53058. return false;
  53059. };
  53060. SomePromiseArray.prototype._fulfilled = function () {
  53061. return this._totalResolved;
  53062. };
  53063. SomePromiseArray.prototype._rejected = function () {
  53064. return this._values.length - this.length();
  53065. };
  53066. SomePromiseArray.prototype._addRejected = function (reason) {
  53067. this._values.push(reason);
  53068. };
  53069. SomePromiseArray.prototype._addFulfilled = function (value) {
  53070. this._values[this._totalResolved++] = value;
  53071. };
  53072. SomePromiseArray.prototype._canPossiblyFulfill = function () {
  53073. return this.length() - this._rejected();
  53074. };
  53075. SomePromiseArray.prototype._getRangeError = function (count) {
  53076. var message = "Input array must contain at least " +
  53077. this._howMany + " items but contains only " + count + " items";
  53078. return new RangeError(message);
  53079. };
  53080. SomePromiseArray.prototype._resolveEmptyArray = function () {
  53081. this._reject(this._getRangeError(0));
  53082. };
  53083. function some(promises, howMany) {
  53084. if ((howMany | 0) !== howMany || howMany < 0) {
  53085. return apiRejection("expecting a positive integer\u000a\u000a See http://goo.gl/MqrFmX\u000a");
  53086. }
  53087. var ret = new SomePromiseArray(promises);
  53088. var promise = ret.promise();
  53089. ret.setHowMany(howMany);
  53090. ret.init();
  53091. return promise;
  53092. }
  53093. Promise.some = function (promises, howMany) {
  53094. return some(promises, howMany);
  53095. };
  53096. Promise.prototype.some = function (howMany) {
  53097. return some(this, howMany);
  53098. };
  53099. Promise._SomePromiseArray = SomePromiseArray;
  53100. };
  53101. /***/ }),
  53102. /* 517 */
  53103. /***/ (function(module, exports, __webpack_require__) {
  53104. "use strict";
  53105. module.exports = function(Promise, INTERNAL) {
  53106. var PromiseMap = Promise.map;
  53107. Promise.prototype.filter = function (fn, options) {
  53108. return PromiseMap(this, fn, options, INTERNAL);
  53109. };
  53110. Promise.filter = function (promises, fn, options) {
  53111. return PromiseMap(promises, fn, options, INTERNAL);
  53112. };
  53113. };
  53114. /***/ }),
  53115. /* 518 */
  53116. /***/ (function(module, exports, __webpack_require__) {
  53117. "use strict";
  53118. module.exports = function(Promise, INTERNAL) {
  53119. var PromiseReduce = Promise.reduce;
  53120. var PromiseAll = Promise.all;
  53121. function promiseAllThis() {
  53122. return PromiseAll(this);
  53123. }
  53124. function PromiseMapSeries(promises, fn) {
  53125. return PromiseReduce(promises, fn, INTERNAL, INTERNAL);
  53126. }
  53127. Promise.prototype.each = function (fn) {
  53128. return PromiseReduce(this, fn, INTERNAL, 0)
  53129. ._then(promiseAllThis, undefined, undefined, this, undefined);
  53130. };
  53131. Promise.prototype.mapSeries = function (fn) {
  53132. return PromiseReduce(this, fn, INTERNAL, INTERNAL);
  53133. };
  53134. Promise.each = function (promises, fn) {
  53135. return PromiseReduce(promises, fn, INTERNAL, 0)
  53136. ._then(promiseAllThis, undefined, undefined, promises, undefined);
  53137. };
  53138. Promise.mapSeries = PromiseMapSeries;
  53139. };
  53140. /***/ }),
  53141. /* 519 */
  53142. /***/ (function(module, exports, __webpack_require__) {
  53143. "use strict";
  53144. module.exports = function(Promise) {
  53145. var SomePromiseArray = Promise._SomePromiseArray;
  53146. function any(promises) {
  53147. var ret = new SomePromiseArray(promises);
  53148. var promise = ret.promise();
  53149. ret.setHowMany(1);
  53150. ret.setUnwrap();
  53151. ret.init();
  53152. return promise;
  53153. }
  53154. Promise.any = function (promises) {
  53155. return any(promises);
  53156. };
  53157. Promise.prototype.any = function () {
  53158. return any(this);
  53159. };
  53160. };
  53161. /***/ }),
  53162. /* 520 */
  53163. /***/ (function(module, exports, __webpack_require__) {
  53164. "use strict";
  53165. var core = __webpack_require__(521),
  53166. isArray = __webpack_require__(9),
  53167. isFunction = __webpack_require__(79),
  53168. isObjectLike = __webpack_require__(26);
  53169. module.exports = function (options) {
  53170. var errorText = 'Please verify options'; // For better minification because this string is repeating
  53171. if (!isObjectLike(options)) {
  53172. throw new TypeError(errorText);
  53173. }
  53174. if (!isFunction(options.request)) {
  53175. throw new TypeError(errorText + '.request');
  53176. }
  53177. if (!isArray(options.expose) || options.expose.length === 0) {
  53178. throw new TypeError(errorText + '.expose');
  53179. }
  53180. var plumbing = core({
  53181. PromiseImpl: options.PromiseImpl,
  53182. constructorMixin: options.constructorMixin
  53183. });
  53184. // Intercepting Request's init method
  53185. var originalInit = options.request.Request.prototype.init;
  53186. options.request.Request.prototype.init = function RP$initInterceptor(requestOptions) {
  53187. // Init may be called again - currently in case of redirects
  53188. if (isObjectLike(requestOptions) && !this._callback && !this._rp_promise) {
  53189. plumbing.init.call(this, requestOptions);
  53190. }
  53191. return originalInit.apply(this, arguments);
  53192. };
  53193. // Exposing the Promise capabilities
  53194. var thenExposed = false;
  53195. for ( var i = 0; i < options.expose.length; i+=1 ) {
  53196. var method = options.expose[i];
  53197. plumbing[ method === 'promise' ? 'exposePromise' : 'exposePromiseMethod' ](
  53198. options.request.Request.prototype,
  53199. null,
  53200. '_rp_promise',
  53201. method
  53202. );
  53203. if (method === 'then') {
  53204. thenExposed = true;
  53205. }
  53206. }
  53207. if (!thenExposed) {
  53208. throw new Error('Please expose "then"');
  53209. }
  53210. };
  53211. /***/ }),
  53212. /* 521 */
  53213. /***/ (function(module, exports, __webpack_require__) {
  53214. "use strict";
  53215. var errors = __webpack_require__(522),
  53216. isFunction = __webpack_require__(79),
  53217. isObjectLike = __webpack_require__(26),
  53218. isString = __webpack_require__(335),
  53219. isUndefined = __webpack_require__(525);
  53220. module.exports = function (options) {
  53221. var errorText = 'Please verify options'; // For better minification because this string is repeating
  53222. if (!isObjectLike(options)) {
  53223. throw new TypeError(errorText);
  53224. }
  53225. if (!isFunction(options.PromiseImpl)) {
  53226. throw new TypeError(errorText + '.PromiseImpl');
  53227. }
  53228. if (!isUndefined(options.constructorMixin) && !isFunction(options.constructorMixin)) {
  53229. throw new TypeError(errorText + '.PromiseImpl');
  53230. }
  53231. var PromiseImpl = options.PromiseImpl;
  53232. var constructorMixin = options.constructorMixin;
  53233. var plumbing = {};
  53234. plumbing.init = function (requestOptions) {
  53235. var self = this;
  53236. self._rp_promise = new PromiseImpl(function (resolve, reject) {
  53237. self._rp_resolve = resolve;
  53238. self._rp_reject = reject;
  53239. if (constructorMixin) {
  53240. constructorMixin.apply(self, arguments); // Using arguments since specific Promise libraries may pass additional parameters
  53241. }
  53242. });
  53243. self._rp_callbackOrig = requestOptions.callback;
  53244. requestOptions.callback = self.callback = function RP$callback(err, response, body) {
  53245. plumbing.callback.call(self, err, response, body);
  53246. };
  53247. if (isString(requestOptions.method)) {
  53248. requestOptions.method = requestOptions.method.toUpperCase();
  53249. }
  53250. requestOptions.transform = requestOptions.transform || plumbing.defaultTransformations[requestOptions.method];
  53251. self._rp_options = requestOptions;
  53252. self._rp_options.simple = requestOptions.simple !== false;
  53253. self._rp_options.resolveWithFullResponse = requestOptions.resolveWithFullResponse === true;
  53254. self._rp_options.transform2xxOnly = requestOptions.transform2xxOnly === true;
  53255. };
  53256. plumbing.defaultTransformations = {
  53257. HEAD: function (body, response, resolveWithFullResponse) {
  53258. return resolveWithFullResponse ? response : response.headers;
  53259. }
  53260. };
  53261. plumbing.callback = function (err, response, body) {
  53262. var self = this;
  53263. var origCallbackThrewException = false, thrownException = null;
  53264. if (isFunction(self._rp_callbackOrig)) {
  53265. try {
  53266. self._rp_callbackOrig.apply(self, arguments); // TODO: Apply to self mimics behavior of request@2. Is that also right for request@next?
  53267. } catch (e) {
  53268. origCallbackThrewException = true;
  53269. thrownException = e;
  53270. }
  53271. }
  53272. var is2xx = !err && /^2/.test('' + response.statusCode);
  53273. if (err) {
  53274. self._rp_reject(new errors.RequestError(err, self._rp_options, response));
  53275. } else if (self._rp_options.simple && !is2xx) {
  53276. if (isFunction(self._rp_options.transform) && self._rp_options.transform2xxOnly === false) {
  53277. (new PromiseImpl(function (resolve) {
  53278. resolve(self._rp_options.transform(body, response, self._rp_options.resolveWithFullResponse)); // transform may return a Promise
  53279. }))
  53280. .then(function (transformedResponse) {
  53281. self._rp_reject(new errors.StatusCodeError(response.statusCode, body, self._rp_options, transformedResponse));
  53282. })
  53283. .catch(function (transformErr) {
  53284. self._rp_reject(new errors.TransformError(transformErr, self._rp_options, response));
  53285. });
  53286. } else {
  53287. self._rp_reject(new errors.StatusCodeError(response.statusCode, body, self._rp_options, response));
  53288. }
  53289. } else {
  53290. if (isFunction(self._rp_options.transform) && (is2xx || self._rp_options.transform2xxOnly === false)) {
  53291. (new PromiseImpl(function (resolve) {
  53292. resolve(self._rp_options.transform(body, response, self._rp_options.resolveWithFullResponse)); // transform may return a Promise
  53293. }))
  53294. .then(function (transformedResponse) {
  53295. self._rp_resolve(transformedResponse);
  53296. })
  53297. .catch(function (transformErr) {
  53298. self._rp_reject(new errors.TransformError(transformErr, self._rp_options, response));
  53299. });
  53300. } else if (self._rp_options.resolveWithFullResponse) {
  53301. self._rp_resolve(response);
  53302. } else {
  53303. self._rp_resolve(body);
  53304. }
  53305. }
  53306. if (origCallbackThrewException) {
  53307. throw thrownException;
  53308. }
  53309. };
  53310. plumbing.exposePromiseMethod = function (exposeTo, bindTo, promisePropertyKey, methodToExpose, exposeAs) {
  53311. exposeAs = exposeAs || methodToExpose;
  53312. if (exposeAs in exposeTo) {
  53313. throw new Error('Unable to expose method "' + exposeAs + '"');
  53314. }
  53315. exposeTo[exposeAs] = function RP$exposed() {
  53316. var self = bindTo || this;
  53317. return self[promisePropertyKey][methodToExpose].apply(self[promisePropertyKey], arguments);
  53318. };
  53319. };
  53320. plumbing.exposePromise = function (exposeTo, bindTo, promisePropertyKey, exposeAs) {
  53321. exposeAs = exposeAs || 'promise';
  53322. if (exposeAs in exposeTo) {
  53323. throw new Error('Unable to expose method "' + exposeAs + '"');
  53324. }
  53325. exposeTo[exposeAs] = function RP$promise() {
  53326. var self = bindTo || this;
  53327. return self[promisePropertyKey];
  53328. };
  53329. };
  53330. return plumbing;
  53331. };
  53332. /***/ }),
  53333. /* 522 */
  53334. /***/ (function(module, exports, __webpack_require__) {
  53335. "use strict";
  53336. function RequestError(cause, options, response) {
  53337. this.name = 'RequestError';
  53338. this.message = String(cause);
  53339. this.cause = cause;
  53340. this.error = cause; // legacy attribute
  53341. this.options = options;
  53342. this.response = response;
  53343. if (Error.captureStackTrace) { // required for non-V8 environments
  53344. Error.captureStackTrace(this);
  53345. }
  53346. }
  53347. RequestError.prototype = Object.create(Error.prototype);
  53348. RequestError.prototype.constructor = RequestError;
  53349. function StatusCodeError(statusCode, body, options, response) {
  53350. this.name = 'StatusCodeError';
  53351. this.statusCode = statusCode;
  53352. this.message = statusCode + ' - ' + (JSON && JSON.stringify ? JSON.stringify(body) : body);
  53353. this.error = body; // legacy attribute
  53354. this.options = options;
  53355. this.response = response;
  53356. if (Error.captureStackTrace) { // required for non-V8 environments
  53357. Error.captureStackTrace(this);
  53358. }
  53359. }
  53360. StatusCodeError.prototype = Object.create(Error.prototype);
  53361. StatusCodeError.prototype.constructor = StatusCodeError;
  53362. function TransformError(cause, options, response) {
  53363. this.name = 'TransformError';
  53364. this.message = String(cause);
  53365. this.cause = cause;
  53366. this.error = cause; // legacy attribute
  53367. this.options = options;
  53368. this.response = response;
  53369. if (Error.captureStackTrace) { // required for non-V8 environments
  53370. Error.captureStackTrace(this);
  53371. }
  53372. }
  53373. TransformError.prototype = Object.create(Error.prototype);
  53374. TransformError.prototype.constructor = TransformError;
  53375. module.exports = {
  53376. RequestError: RequestError,
  53377. StatusCodeError: StatusCodeError,
  53378. TransformError: TransformError
  53379. };
  53380. /***/ }),
  53381. /* 523 */
  53382. /***/ (function(module, exports, __webpack_require__) {
  53383. var Symbol = __webpack_require__(80);
  53384. /** Used for built-in method references. */
  53385. var objectProto = Object.prototype;
  53386. /** Used to check objects for own properties. */
  53387. var hasOwnProperty = objectProto.hasOwnProperty;
  53388. /**
  53389. * Used to resolve the
  53390. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  53391. * of values.
  53392. */
  53393. var nativeObjectToString = objectProto.toString;
  53394. /** Built-in value references. */
  53395. var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  53396. /**
  53397. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  53398. *
  53399. * @private
  53400. * @param {*} value The value to query.
  53401. * @returns {string} Returns the raw `toStringTag`.
  53402. */
  53403. function getRawTag(value) {
  53404. var isOwn = hasOwnProperty.call(value, symToStringTag),
  53405. tag = value[symToStringTag];
  53406. try {
  53407. value[symToStringTag] = undefined;
  53408. var unmasked = true;
  53409. } catch (e) {}
  53410. var result = nativeObjectToString.call(value);
  53411. if (unmasked) {
  53412. if (isOwn) {
  53413. value[symToStringTag] = tag;
  53414. } else {
  53415. delete value[symToStringTag];
  53416. }
  53417. }
  53418. return result;
  53419. }
  53420. module.exports = getRawTag;
  53421. /***/ }),
  53422. /* 524 */
  53423. /***/ (function(module, exports) {
  53424. /** Used for built-in method references. */
  53425. var objectProto = Object.prototype;
  53426. /**
  53427. * Used to resolve the
  53428. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  53429. * of values.
  53430. */
  53431. var nativeObjectToString = objectProto.toString;
  53432. /**
  53433. * Converts `value` to a string using `Object.prototype.toString`.
  53434. *
  53435. * @private
  53436. * @param {*} value The value to convert.
  53437. * @returns {string} Returns the converted string.
  53438. */
  53439. function objectToString(value) {
  53440. return nativeObjectToString.call(value);
  53441. }
  53442. module.exports = objectToString;
  53443. /***/ }),
  53444. /* 525 */
  53445. /***/ (function(module, exports) {
  53446. /**
  53447. * Checks if `value` is `undefined`.
  53448. *
  53449. * @static
  53450. * @since 0.1.0
  53451. * @memberOf _
  53452. * @category Lang
  53453. * @param {*} value The value to check.
  53454. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
  53455. * @example
  53456. *
  53457. * _.isUndefined(void 0);
  53458. * // => true
  53459. *
  53460. * _.isUndefined(null);
  53461. * // => false
  53462. */
  53463. function isUndefined(value) {
  53464. return value === undefined;
  53465. }
  53466. module.exports = isUndefined;
  53467. /***/ }),
  53468. /* 526 */
  53469. /***/ (function(module, exports, __webpack_require__) {
  53470. "use strict";
  53471. var isNative = /\.node$/;
  53472. function forEach(obj, callback) {
  53473. for ( var key in obj ) {
  53474. if (!Object.prototype.hasOwnProperty.call(obj, key)) {
  53475. continue;
  53476. }
  53477. callback(key);
  53478. }
  53479. }
  53480. function assign(target, source) {
  53481. forEach(source, function (key) {
  53482. target[key] = source[key];
  53483. });
  53484. return target;
  53485. }
  53486. function clearCache(requireCache) {
  53487. forEach(requireCache, function (resolvedPath) {
  53488. if (!isNative.test(resolvedPath)) {
  53489. delete requireCache[resolvedPath];
  53490. }
  53491. });
  53492. }
  53493. module.exports = function (requireCache, callback, callbackForModulesToKeep, module) {
  53494. var originalCache = assign({}, requireCache);
  53495. clearCache(requireCache);
  53496. if (callbackForModulesToKeep) {
  53497. var originalModuleChildren = module.children ? module.children.slice() : false; // Creates a shallow copy of module.children
  53498. callbackForModulesToKeep();
  53499. // Lists the cache entries made by callbackForModulesToKeep()
  53500. var modulesToKeep = [];
  53501. forEach(requireCache, function (key) {
  53502. modulesToKeep.push(key);
  53503. });
  53504. // Discards the modules required in callbackForModulesToKeep()
  53505. clearCache(requireCache);
  53506. if (module.children) { // Only true for node.js
  53507. module.children = originalModuleChildren; // Removes last references to modules required in callbackForModulesToKeep() -> No memory leak
  53508. }
  53509. // Takes the cache entries of the original cache in case the modules where required before
  53510. for ( var i = 0; i < modulesToKeep.length; i+=1 ) {
  53511. if (originalCache[modulesToKeep[i]]) {
  53512. requireCache[modulesToKeep[i]] = originalCache[modulesToKeep[i]];
  53513. }
  53514. }
  53515. }
  53516. var freshModule = callback();
  53517. var stealthCache = callbackForModulesToKeep ? assign({}, requireCache) : false;
  53518. clearCache(requireCache);
  53519. if (callbackForModulesToKeep) {
  53520. // In case modules to keep were required inside the stealthy require for the first time, copy them to the restored cache
  53521. for ( var k = 0; k < modulesToKeep.length; k+=1 ) {
  53522. if (stealthCache[modulesToKeep[k]]) {
  53523. requireCache[modulesToKeep[k]] = stealthCache[modulesToKeep[k]];
  53524. }
  53525. }
  53526. }
  53527. assign(requireCache, originalCache);
  53528. return freshModule;
  53529. };
  53530. /***/ }),
  53531. /* 527 */
  53532. /***/ (function(module, exports, __webpack_require__) {
  53533. "use strict";
  53534. // Copyright 2010-2012 Mikeal Rogers
  53535. //
  53536. // Licensed under the Apache License, Version 2.0 (the "License");
  53537. // you may not use this file except in compliance with the License.
  53538. // You may obtain a copy of the License at
  53539. //
  53540. // http://www.apache.org/licenses/LICENSE-2.0
  53541. //
  53542. // Unless required by applicable law or agreed to in writing, software
  53543. // distributed under the License is distributed on an "AS IS" BASIS,
  53544. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  53545. // See the License for the specific language governing permissions and
  53546. // limitations under the License.
  53547. var extend = __webpack_require__(141)
  53548. var cookies = __webpack_require__(336)
  53549. var helpers = __webpack_require__(143)
  53550. var paramsHaveRequestBody = helpers.paramsHaveRequestBody
  53551. // organize params for patch, post, put, head, del
  53552. function initParams (uri, options, callback) {
  53553. if (typeof options === 'function') {
  53554. callback = options
  53555. }
  53556. var params = {}
  53557. if (typeof options === 'object') {
  53558. extend(params, options, {uri: uri})
  53559. } else if (typeof uri === 'string') {
  53560. extend(params, {uri: uri})
  53561. } else {
  53562. extend(params, uri)
  53563. }
  53564. params.callback = callback || params.callback
  53565. return params
  53566. }
  53567. function request (uri, options, callback) {
  53568. if (typeof uri === 'undefined') {
  53569. throw new Error('undefined is not a valid uri or options object.')
  53570. }
  53571. var params = initParams(uri, options, callback)
  53572. if (params.method === 'HEAD' && paramsHaveRequestBody(params)) {
  53573. throw new Error('HTTP HEAD requests MUST NOT include a request body.')
  53574. }
  53575. return new request.Request(params)
  53576. }
  53577. function verbFunc (verb) {
  53578. var method = verb.toUpperCase()
  53579. return function (uri, options, callback) {
  53580. var params = initParams(uri, options, callback)
  53581. params.method = method
  53582. return request(params, params.callback)
  53583. }
  53584. }
  53585. // define like this to please codeintel/intellisense IDEs
  53586. request.get = verbFunc('get')
  53587. request.head = verbFunc('head')
  53588. request.options = verbFunc('options')
  53589. request.post = verbFunc('post')
  53590. request.put = verbFunc('put')
  53591. request.patch = verbFunc('patch')
  53592. request.del = verbFunc('delete')
  53593. request['delete'] = verbFunc('delete')
  53594. request.jar = function (store) {
  53595. return cookies.jar(store)
  53596. }
  53597. request.cookie = function (str) {
  53598. return cookies.parse(str)
  53599. }
  53600. function wrapRequestMethod (method, options, requester, verb) {
  53601. return function (uri, opts, callback) {
  53602. var params = initParams(uri, opts, callback)
  53603. var target = {}
  53604. extend(true, target, options, params)
  53605. target.pool = params.pool || options.pool
  53606. if (verb) {
  53607. target.method = verb.toUpperCase()
  53608. }
  53609. if (typeof requester === 'function') {
  53610. method = requester
  53611. }
  53612. return method(target, target.callback)
  53613. }
  53614. }
  53615. request.defaults = function (options, requester) {
  53616. var self = this
  53617. options = options || {}
  53618. if (typeof options === 'function') {
  53619. requester = options
  53620. options = {}
  53621. }
  53622. var defaults = wrapRequestMethod(self, options, requester)
  53623. var verbs = ['get', 'head', 'post', 'put', 'patch', 'del', 'delete']
  53624. verbs.forEach(function (verb) {
  53625. defaults[verb] = wrapRequestMethod(self[verb], options, requester, verb)
  53626. })
  53627. defaults.cookie = wrapRequestMethod(self.cookie, options, requester)
  53628. defaults.jar = self.jar
  53629. defaults.defaults = self.defaults
  53630. return defaults
  53631. }
  53632. request.forever = function (agentOptions, optionsArg) {
  53633. var options = {}
  53634. if (optionsArg) {
  53635. extend(options, optionsArg)
  53636. }
  53637. if (agentOptions) {
  53638. options.agentOptions = agentOptions
  53639. }
  53640. options.forever = true
  53641. return request.defaults(options)
  53642. }
  53643. // Exports
  53644. module.exports = request
  53645. request.Request = __webpack_require__(531)
  53646. request.initParams = initParams
  53647. // Backwards compatibility for request.debug
  53648. Object.defineProperty(request, 'debug', {
  53649. enumerable: true,
  53650. get: function () {
  53651. return request.Request.debug
  53652. },
  53653. set: function (debug) {
  53654. request.Request.debug = debug
  53655. }
  53656. })
  53657. /***/ }),
  53658. /* 528 */
  53659. /***/ (function(module, exports, __webpack_require__) {
  53660. "use strict";
  53661. /*!
  53662. * Copyright (c) 2015, Salesforce.com, Inc.
  53663. * All rights reserved.
  53664. *
  53665. * Redistribution and use in source and binary forms, with or without
  53666. * modification, are permitted provided that the following conditions are met:
  53667. *
  53668. * 1. Redistributions of source code must retain the above copyright notice,
  53669. * this list of conditions and the following disclaimer.
  53670. *
  53671. * 2. Redistributions in binary form must reproduce the above copyright notice,
  53672. * this list of conditions and the following disclaimer in the documentation
  53673. * and/or other materials provided with the distribution.
  53674. *
  53675. * 3. Neither the name of Salesforce.com nor the names of its contributors may
  53676. * be used to endorse or promote products derived from this software without
  53677. * specific prior written permission.
  53678. *
  53679. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  53680. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  53681. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  53682. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
  53683. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  53684. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  53685. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  53686. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  53687. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  53688. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  53689. * POSSIBILITY OF SUCH DAMAGE.
  53690. */
  53691. var Store = __webpack_require__(340).Store;
  53692. var permuteDomain = __webpack_require__(341).permuteDomain;
  53693. var pathMatch = __webpack_require__(342).pathMatch;
  53694. var util = __webpack_require__(2);
  53695. function MemoryCookieStore() {
  53696. Store.call(this);
  53697. this.idx = {};
  53698. }
  53699. util.inherits(MemoryCookieStore, Store);
  53700. exports.MemoryCookieStore = MemoryCookieStore;
  53701. MemoryCookieStore.prototype.idx = null;
  53702. // Since it's just a struct in RAM, this Store is synchronous
  53703. MemoryCookieStore.prototype.synchronous = true;
  53704. // force a default depth:
  53705. MemoryCookieStore.prototype.inspect = function() {
  53706. return "{ idx: "+util.inspect(this.idx, false, 2)+' }';
  53707. };
  53708. MemoryCookieStore.prototype.findCookie = function(domain, path, key, cb) {
  53709. if (!this.idx[domain]) {
  53710. return cb(null,undefined);
  53711. }
  53712. if (!this.idx[domain][path]) {
  53713. return cb(null,undefined);
  53714. }
  53715. return cb(null,this.idx[domain][path][key]||null);
  53716. };
  53717. MemoryCookieStore.prototype.findCookies = function(domain, path, cb) {
  53718. var results = [];
  53719. if (!domain) {
  53720. return cb(null,[]);
  53721. }
  53722. var pathMatcher;
  53723. if (!path) {
  53724. // null means "all paths"
  53725. pathMatcher = function matchAll(domainIndex) {
  53726. for (var curPath in domainIndex) {
  53727. var pathIndex = domainIndex[curPath];
  53728. for (var key in pathIndex) {
  53729. results.push(pathIndex[key]);
  53730. }
  53731. }
  53732. };
  53733. } else {
  53734. pathMatcher = function matchRFC(domainIndex) {
  53735. //NOTE: we should use path-match algorithm from S5.1.4 here
  53736. //(see : https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/canonical_cookie.cc#L299)
  53737. Object.keys(domainIndex).forEach(function (cookiePath) {
  53738. if (pathMatch(path, cookiePath)) {
  53739. var pathIndex = domainIndex[cookiePath];
  53740. for (var key in pathIndex) {
  53741. results.push(pathIndex[key]);
  53742. }
  53743. }
  53744. });
  53745. };
  53746. }
  53747. var domains = permuteDomain(domain) || [domain];
  53748. var idx = this.idx;
  53749. domains.forEach(function(curDomain) {
  53750. var domainIndex = idx[curDomain];
  53751. if (!domainIndex) {
  53752. return;
  53753. }
  53754. pathMatcher(domainIndex);
  53755. });
  53756. cb(null,results);
  53757. };
  53758. MemoryCookieStore.prototype.putCookie = function(cookie, cb) {
  53759. if (!this.idx[cookie.domain]) {
  53760. this.idx[cookie.domain] = {};
  53761. }
  53762. if (!this.idx[cookie.domain][cookie.path]) {
  53763. this.idx[cookie.domain][cookie.path] = {};
  53764. }
  53765. this.idx[cookie.domain][cookie.path][cookie.key] = cookie;
  53766. cb(null);
  53767. };
  53768. MemoryCookieStore.prototype.updateCookie = function(oldCookie, newCookie, cb) {
  53769. // updateCookie() may avoid updating cookies that are identical. For example,
  53770. // lastAccessed may not be important to some stores and an equality
  53771. // comparison could exclude that field.
  53772. this.putCookie(newCookie,cb);
  53773. };
  53774. MemoryCookieStore.prototype.removeCookie = function(domain, path, key, cb) {
  53775. if (this.idx[domain] && this.idx[domain][path] && this.idx[domain][path][key]) {
  53776. delete this.idx[domain][path][key];
  53777. }
  53778. cb(null);
  53779. };
  53780. MemoryCookieStore.prototype.removeCookies = function(domain, path, cb) {
  53781. if (this.idx[domain]) {
  53782. if (path) {
  53783. delete this.idx[domain][path];
  53784. } else {
  53785. delete this.idx[domain];
  53786. }
  53787. }
  53788. return cb(null);
  53789. };
  53790. MemoryCookieStore.prototype.getAllCookies = function(cb) {
  53791. var cookies = [];
  53792. var idx = this.idx;
  53793. var domains = Object.keys(idx);
  53794. domains.forEach(function(domain) {
  53795. var paths = Object.keys(idx[domain]);
  53796. paths.forEach(function(path) {
  53797. var keys = Object.keys(idx[domain][path]);
  53798. keys.forEach(function(key) {
  53799. if (key !== null) {
  53800. cookies.push(idx[domain][path][key]);
  53801. }
  53802. });
  53803. });
  53804. });
  53805. // Sort by creationIndex so deserializing retains the creation order.
  53806. // When implementing your own store, this SHOULD retain the order too
  53807. cookies.sort(function(a,b) {
  53808. return (a.creationIndex||0) - (b.creationIndex||0);
  53809. });
  53810. cb(null, cookies);
  53811. };
  53812. /***/ }),
  53813. /* 529 */
  53814. /***/ (function(module, exports) {
  53815. module.exports = {"_from":"tough-cookie@^2.3.2","_id":"tough-cookie@2.3.3","_inBundle":false,"_integrity":"sha1-C2GKVWW23qkL80JdBNVe3EdadWE=","_location":"/tough-cookie","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"tough-cookie@^2.3.2","name":"tough-cookie","escapedName":"tough-cookie","rawSpec":"^2.3.2","saveSpec":null,"fetchSpec":"^2.3.2"},"_requiredBy":["/jsdom","/request","/request-promise"],"_resolved":"https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz","_shasum":"0b618a5565b6dea90bf3425d04d55edc475a7561","_spec":"tough-cookie@^2.3.2","_where":"/Users/dje/Documents/devs_perso/cozy/cozy-konnector-template/node_modules/jsdom","author":{"name":"Jeremy Stashewsky","email":"jstashewsky@salesforce.com"},"bugs":{"url":"https://github.com/salesforce/tough-cookie/issues"},"bundleDependencies":false,"contributors":[{"name":"Alexander Savin"},{"name":"Ian Livingstone"},{"name":"Ivan Nikulin"},{"name":"Lalit Kapoor"},{"name":"Sam Thompson"},{"name":"Sebastian Mayr"}],"dependencies":{"punycode":"^1.4.1"},"deprecated":false,"description":"RFC6265 Cookies and Cookie Jar for node.js","devDependencies":{"async":"^1.4.2","string.prototype.repeat":"^0.2.0","vows":"^0.8.1"},"engines":{"node":">=0.8"},"files":["lib"],"homepage":"https://github.com/salesforce/tough-cookie","keywords":["HTTP","cookie","cookies","set-cookie","cookiejar","jar","RFC6265","RFC2965"],"license":"BSD-3-Clause","main":"./lib/cookie","name":"tough-cookie","repository":{"type":"git","url":"git://github.com/salesforce/tough-cookie.git"},"scripts":{"suffixup":"curl -o public_suffix_list.dat https://publicsuffix.org/list/public_suffix_list.dat && ./generate-pubsuffix.js","test":"vows test/*_test.js"},"version":"2.3.3"}
  53816. /***/ }),
  53817. /* 530 */
  53818. /***/ (function(module, exports) {
  53819. exports = module.exports = stringify
  53820. exports.getSerialize = serializer
  53821. function stringify(obj, replacer, spaces, cycleReplacer) {
  53822. return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces)
  53823. }
  53824. function serializer(replacer, cycleReplacer) {
  53825. var stack = [], keys = []
  53826. if (cycleReplacer == null) cycleReplacer = function(key, value) {
  53827. if (stack[0] === value) return "[Circular ~]"
  53828. return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]"
  53829. }
  53830. return function(key, value) {
  53831. if (stack.length > 0) {
  53832. var thisPos = stack.indexOf(this)
  53833. ~thisPos ? stack.splice(thisPos + 1) : stack.push(this)
  53834. ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key)
  53835. if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value)
  53836. }
  53837. else stack.push(value)
  53838. return replacer == null ? value : replacer.call(this, key, value)
  53839. }
  53840. }
  53841. /***/ }),
  53842. /* 531 */
  53843. /***/ (function(module, exports, __webpack_require__) {
  53844. "use strict";
  53845. var http = __webpack_require__(45)
  53846. var https = __webpack_require__(81)
  53847. var url = __webpack_require__(14)
  53848. var util = __webpack_require__(2)
  53849. var stream = __webpack_require__(10)
  53850. var zlib = __webpack_require__(343)
  53851. var hawk = __webpack_require__(532)
  53852. var aws2 = __webpack_require__(540)
  53853. var aws4 = __webpack_require__(541)
  53854. var httpSignature = __webpack_require__(543)
  53855. var mime = __webpack_require__(111)
  53856. var stringstream = __webpack_require__(558)
  53857. var caseless = __webpack_require__(151)
  53858. var ForeverAgent = __webpack_require__(559)
  53859. var FormData = __webpack_require__(560)
  53860. var extend = __webpack_require__(141)
  53861. var isstream = __webpack_require__(362)
  53862. var isTypedArray = __webpack_require__(567).strict
  53863. var helpers = __webpack_require__(143)
  53864. var cookies = __webpack_require__(336)
  53865. var getProxyFromURI = __webpack_require__(568)
  53866. var Querystring = __webpack_require__(569).Querystring
  53867. var Har = __webpack_require__(572).Har
  53868. var Auth = __webpack_require__(626).Auth
  53869. var OAuth = __webpack_require__(629).OAuth
  53870. var Multipart = __webpack_require__(631).Multipart
  53871. var Redirect = __webpack_require__(632).Redirect
  53872. var Tunnel = __webpack_require__(633).Tunnel
  53873. var now = __webpack_require__(635)
  53874. var Buffer = __webpack_require__(30).Buffer
  53875. var safeStringify = helpers.safeStringify
  53876. var isReadStream = helpers.isReadStream
  53877. var toBase64 = helpers.toBase64
  53878. var defer = helpers.defer
  53879. var copy = helpers.copy
  53880. var version = helpers.version
  53881. var globalCookieJar = cookies.jar()
  53882. var globalPool = {}
  53883. function filterForNonReserved (reserved, options) {
  53884. // Filter out properties that are not reserved.
  53885. // Reserved values are passed in at call site.
  53886. var object = {}
  53887. for (var i in options) {
  53888. var notReserved = (reserved.indexOf(i) === -1)
  53889. if (notReserved) {
  53890. object[i] = options[i]
  53891. }
  53892. }
  53893. return object
  53894. }
  53895. function filterOutReservedFunctions (reserved, options) {
  53896. // Filter out properties that are functions and are reserved.
  53897. // Reserved values are passed in at call site.
  53898. var object = {}
  53899. for (var i in options) {
  53900. var isReserved = !(reserved.indexOf(i) === -1)
  53901. var isFunction = (typeof options[i] === 'function')
  53902. if (!(isReserved && isFunction)) {
  53903. object[i] = options[i]
  53904. }
  53905. }
  53906. return object
  53907. }
  53908. // Return a simpler request object to allow serialization
  53909. function requestToJSON () {
  53910. var self = this
  53911. return {
  53912. uri: self.uri,
  53913. method: self.method,
  53914. headers: self.headers
  53915. }
  53916. }
  53917. // Return a simpler response object to allow serialization
  53918. function responseToJSON () {
  53919. var self = this
  53920. return {
  53921. statusCode: self.statusCode,
  53922. body: self.body,
  53923. headers: self.headers,
  53924. request: requestToJSON.call(self.request)
  53925. }
  53926. }
  53927. function Request (options) {
  53928. // if given the method property in options, set property explicitMethod to true
  53929. // extend the Request instance with any non-reserved properties
  53930. // remove any reserved functions from the options object
  53931. // set Request instance to be readable and writable
  53932. // call init
  53933. var self = this
  53934. // start with HAR, then override with additional options
  53935. if (options.har) {
  53936. self._har = new Har(self)
  53937. options = self._har.options(options)
  53938. }
  53939. stream.Stream.call(self)
  53940. var reserved = Object.keys(Request.prototype)
  53941. var nonReserved = filterForNonReserved(reserved, options)
  53942. extend(self, nonReserved)
  53943. options = filterOutReservedFunctions(reserved, options)
  53944. self.readable = true
  53945. self.writable = true
  53946. if (options.method) {
  53947. self.explicitMethod = true
  53948. }
  53949. self._qs = new Querystring(self)
  53950. self._auth = new Auth(self)
  53951. self._oauth = new OAuth(self)
  53952. self._multipart = new Multipart(self)
  53953. self._redirect = new Redirect(self)
  53954. self._tunnel = new Tunnel(self)
  53955. self.init(options)
  53956. }
  53957. util.inherits(Request, stream.Stream)
  53958. // Debugging
  53959. Request.debug = process.env.NODE_DEBUG && /\brequest\b/.test(process.env.NODE_DEBUG)
  53960. function debug () {
  53961. if (Request.debug) {
  53962. console.error('REQUEST %s', util.format.apply(util, arguments))
  53963. }
  53964. }
  53965. Request.prototype.debug = debug
  53966. Request.prototype.init = function (options) {
  53967. // init() contains all the code to setup the request object.
  53968. // the actual outgoing request is not started until start() is called
  53969. // this function is called from both the constructor and on redirect.
  53970. var self = this
  53971. if (!options) {
  53972. options = {}
  53973. }
  53974. self.headers = self.headers ? copy(self.headers) : {}
  53975. // Delete headers with value undefined since they break
  53976. // ClientRequest.OutgoingMessage.setHeader in node 0.12
  53977. for (var headerName in self.headers) {
  53978. if (typeof self.headers[headerName] === 'undefined') {
  53979. delete self.headers[headerName]
  53980. }
  53981. }
  53982. caseless.httpify(self, self.headers)
  53983. if (!self.method) {
  53984. self.method = options.method || 'GET'
  53985. }
  53986. if (!self.localAddress) {
  53987. self.localAddress = options.localAddress
  53988. }
  53989. self._qs.init(options)
  53990. debug(options)
  53991. if (!self.pool && self.pool !== false) {
  53992. self.pool = globalPool
  53993. }
  53994. self.dests = self.dests || []
  53995. self.__isRequestRequest = true
  53996. // Protect against double callback
  53997. if (!self._callback && self.callback) {
  53998. self._callback = self.callback
  53999. self.callback = function () {
  54000. if (self._callbackCalled) {
  54001. return // Print a warning maybe?
  54002. }
  54003. self._callbackCalled = true
  54004. self._callback.apply(self, arguments)
  54005. }
  54006. self.on('error', self.callback.bind())
  54007. self.on('complete', self.callback.bind(self, null))
  54008. }
  54009. // People use this property instead all the time, so support it
  54010. if (!self.uri && self.url) {
  54011. self.uri = self.url
  54012. delete self.url
  54013. }
  54014. // If there's a baseUrl, then use it as the base URL (i.e. uri must be
  54015. // specified as a relative path and is appended to baseUrl).
  54016. if (self.baseUrl) {
  54017. if (typeof self.baseUrl !== 'string') {
  54018. return self.emit('error', new Error('options.baseUrl must be a string'))
  54019. }
  54020. if (typeof self.uri !== 'string') {
  54021. return self.emit('error', new Error('options.uri must be a string when using options.baseUrl'))
  54022. }
  54023. if (self.uri.indexOf('//') === 0 || self.uri.indexOf('://') !== -1) {
  54024. return self.emit('error', new Error('options.uri must be a path when using options.baseUrl'))
  54025. }
  54026. // Handle all cases to make sure that there's only one slash between
  54027. // baseUrl and uri.
  54028. var baseUrlEndsWithSlash = self.baseUrl.lastIndexOf('/') === self.baseUrl.length - 1
  54029. var uriStartsWithSlash = self.uri.indexOf('/') === 0
  54030. if (baseUrlEndsWithSlash && uriStartsWithSlash) {
  54031. self.uri = self.baseUrl + self.uri.slice(1)
  54032. } else if (baseUrlEndsWithSlash || uriStartsWithSlash) {
  54033. self.uri = self.baseUrl + self.uri
  54034. } else if (self.uri === '') {
  54035. self.uri = self.baseUrl
  54036. } else {
  54037. self.uri = self.baseUrl + '/' + self.uri
  54038. }
  54039. delete self.baseUrl
  54040. }
  54041. // A URI is needed by this point, emit error if we haven't been able to get one
  54042. if (!self.uri) {
  54043. return self.emit('error', new Error('options.uri is a required argument'))
  54044. }
  54045. // If a string URI/URL was given, parse it into a URL object
  54046. if (typeof self.uri === 'string') {
  54047. self.uri = url.parse(self.uri)
  54048. }
  54049. // Some URL objects are not from a URL parsed string and need href added
  54050. if (!self.uri.href) {
  54051. self.uri.href = url.format(self.uri)
  54052. }
  54053. // DEPRECATED: Warning for users of the old Unix Sockets URL Scheme
  54054. if (self.uri.protocol === 'unix:') {
  54055. return self.emit('error', new Error('`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`'))
  54056. }
  54057. // Support Unix Sockets
  54058. if (self.uri.host === 'unix') {
  54059. self.enableUnixSocket()
  54060. }
  54061. if (self.strictSSL === false) {
  54062. self.rejectUnauthorized = false
  54063. }
  54064. if (!self.uri.pathname) { self.uri.pathname = '/' }
  54065. if (!(self.uri.host || (self.uri.hostname && self.uri.port)) && !self.uri.isUnix) {
  54066. // Invalid URI: it may generate lot of bad errors, like 'TypeError: Cannot call method `indexOf` of undefined' in CookieJar
  54067. // Detect and reject it as soon as possible
  54068. var faultyUri = url.format(self.uri)
  54069. var message = 'Invalid URI "' + faultyUri + '"'
  54070. if (Object.keys(options).length === 0) {
  54071. // No option ? This can be the sign of a redirect
  54072. // As this is a case where the user cannot do anything (they didn't call request directly with this URL)
  54073. // they should be warned that it can be caused by a redirection (can save some hair)
  54074. message += '. This can be caused by a crappy redirection.'
  54075. }
  54076. // This error was fatal
  54077. self.abort()
  54078. return self.emit('error', new Error(message))
  54079. }
  54080. if (!self.hasOwnProperty('proxy')) {
  54081. self.proxy = getProxyFromURI(self.uri)
  54082. }
  54083. self.tunnel = self._tunnel.isEnabled()
  54084. if (self.proxy) {
  54085. self._tunnel.setup(options)
  54086. }
  54087. self._redirect.onRequest(options)
  54088. self.setHost = false
  54089. if (!self.hasHeader('host')) {
  54090. var hostHeaderName = self.originalHostHeaderName || 'host'
  54091. // When used with an IPv6 address, `host` will provide
  54092. // the correct bracketed format, unlike using `hostname` and
  54093. // optionally adding the `port` when necessary.
  54094. self.setHeader(hostHeaderName, self.uri.host)
  54095. self.setHost = true
  54096. }
  54097. self.jar(self._jar || options.jar)
  54098. if (!self.uri.port) {
  54099. if (self.uri.protocol === 'http:') { self.uri.port = 80 } else if (self.uri.protocol === 'https:') { self.uri.port = 443 }
  54100. }
  54101. if (self.proxy && !self.tunnel) {
  54102. self.port = self.proxy.port
  54103. self.host = self.proxy.hostname
  54104. } else {
  54105. self.port = self.uri.port
  54106. self.host = self.uri.hostname
  54107. }
  54108. if (options.form) {
  54109. self.form(options.form)
  54110. }
  54111. if (options.formData) {
  54112. var formData = options.formData
  54113. var requestForm = self.form()
  54114. var appendFormValue = function (key, value) {
  54115. if (value && value.hasOwnProperty('value') && value.hasOwnProperty('options')) {
  54116. requestForm.append(key, value.value, value.options)
  54117. } else {
  54118. requestForm.append(key, value)
  54119. }
  54120. }
  54121. for (var formKey in formData) {
  54122. if (formData.hasOwnProperty(formKey)) {
  54123. var formValue = formData[formKey]
  54124. if (formValue instanceof Array) {
  54125. for (var j = 0; j < formValue.length; j++) {
  54126. appendFormValue(formKey, formValue[j])
  54127. }
  54128. } else {
  54129. appendFormValue(formKey, formValue)
  54130. }
  54131. }
  54132. }
  54133. }
  54134. if (options.qs) {
  54135. self.qs(options.qs)
  54136. }
  54137. if (self.uri.path) {
  54138. self.path = self.uri.path
  54139. } else {
  54140. self.path = self.uri.pathname + (self.uri.search || '')
  54141. }
  54142. if (self.path.length === 0) {
  54143. self.path = '/'
  54144. }
  54145. // Auth must happen last in case signing is dependent on other headers
  54146. if (options.aws) {
  54147. self.aws(options.aws)
  54148. }
  54149. if (options.hawk) {
  54150. self.hawk(options.hawk)
  54151. }
  54152. if (options.httpSignature) {
  54153. self.httpSignature(options.httpSignature)
  54154. }
  54155. if (options.auth) {
  54156. if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) {
  54157. options.auth.user = options.auth.username
  54158. }
  54159. if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) {
  54160. options.auth.pass = options.auth.password
  54161. }
  54162. self.auth(
  54163. options.auth.user,
  54164. options.auth.pass,
  54165. options.auth.sendImmediately,
  54166. options.auth.bearer
  54167. )
  54168. }
  54169. if (self.gzip && !self.hasHeader('accept-encoding')) {
  54170. self.setHeader('accept-encoding', 'gzip, deflate')
  54171. }
  54172. if (self.uri.auth && !self.hasHeader('authorization')) {
  54173. var uriAuthPieces = self.uri.auth.split(':').map(function (item) { return self._qs.unescape(item) })
  54174. self.auth(uriAuthPieces[0], uriAuthPieces.slice(1).join(':'), true)
  54175. }
  54176. if (!self.tunnel && self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization')) {
  54177. var proxyAuthPieces = self.proxy.auth.split(':').map(function (item) { return self._qs.unescape(item) })
  54178. var authHeader = 'Basic ' + toBase64(proxyAuthPieces.join(':'))
  54179. self.setHeader('proxy-authorization', authHeader)
  54180. }
  54181. if (self.proxy && !self.tunnel) {
  54182. self.path = (self.uri.protocol + '//' + self.uri.host + self.path)
  54183. }
  54184. if (options.json) {
  54185. self.json(options.json)
  54186. }
  54187. if (options.multipart) {
  54188. self.multipart(options.multipart)
  54189. }
  54190. if (options.time) {
  54191. self.timing = true
  54192. // NOTE: elapsedTime is deprecated in favor of .timings
  54193. self.elapsedTime = self.elapsedTime || 0
  54194. }
  54195. function setContentLength () {
  54196. if (isTypedArray(self.body)) {
  54197. self.body = Buffer.from(self.body)
  54198. }
  54199. if (!self.hasHeader('content-length')) {
  54200. var length
  54201. if (typeof self.body === 'string') {
  54202. length = Buffer.byteLength(self.body)
  54203. } else if (Array.isArray(self.body)) {
  54204. length = self.body.reduce(function (a, b) { return a + b.length }, 0)
  54205. } else {
  54206. length = self.body.length
  54207. }
  54208. if (length) {
  54209. self.setHeader('content-length', length)
  54210. } else {
  54211. self.emit('error', new Error('Argument error, options.body.'))
  54212. }
  54213. }
  54214. }
  54215. if (self.body && !isstream(self.body)) {
  54216. setContentLength()
  54217. }
  54218. if (options.oauth) {
  54219. self.oauth(options.oauth)
  54220. } else if (self._oauth.params && self.hasHeader('authorization')) {
  54221. self.oauth(self._oauth.params)
  54222. }
  54223. var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol
  54224. var defaultModules = {'http:': http, 'https:': https}
  54225. var httpModules = self.httpModules || {}
  54226. self.httpModule = httpModules[protocol] || defaultModules[protocol]
  54227. if (!self.httpModule) {
  54228. return self.emit('error', new Error('Invalid protocol: ' + protocol))
  54229. }
  54230. if (options.ca) {
  54231. self.ca = options.ca
  54232. }
  54233. if (!self.agent) {
  54234. if (options.agentOptions) {
  54235. self.agentOptions = options.agentOptions
  54236. }
  54237. if (options.agentClass) {
  54238. self.agentClass = options.agentClass
  54239. } else if (options.forever) {
  54240. var v = version()
  54241. // use ForeverAgent in node 0.10- only
  54242. if (v.major === 0 && v.minor <= 10) {
  54243. self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL
  54244. } else {
  54245. self.agentClass = self.httpModule.Agent
  54246. self.agentOptions = self.agentOptions || {}
  54247. self.agentOptions.keepAlive = true
  54248. }
  54249. } else {
  54250. self.agentClass = self.httpModule.Agent
  54251. }
  54252. }
  54253. if (self.pool === false) {
  54254. self.agent = false
  54255. } else {
  54256. self.agent = self.agent || self.getNewAgent()
  54257. }
  54258. self.on('pipe', function (src) {
  54259. if (self.ntick && self._started) {
  54260. self.emit('error', new Error('You cannot pipe to this stream after the outbound request has started.'))
  54261. }
  54262. self.src = src
  54263. if (isReadStream(src)) {
  54264. if (!self.hasHeader('content-type')) {
  54265. self.setHeader('content-type', mime.lookup(src.path))
  54266. }
  54267. } else {
  54268. if (src.headers) {
  54269. for (var i in src.headers) {
  54270. if (!self.hasHeader(i)) {
  54271. self.setHeader(i, src.headers[i])
  54272. }
  54273. }
  54274. }
  54275. if (self._json && !self.hasHeader('content-type')) {
  54276. self.setHeader('content-type', 'application/json')
  54277. }
  54278. if (src.method && !self.explicitMethod) {
  54279. self.method = src.method
  54280. }
  54281. }
  54282. // self.on('pipe', function () {
  54283. // console.error('You have already piped to this stream. Pipeing twice is likely to break the request.')
  54284. // })
  54285. })
  54286. defer(function () {
  54287. if (self._aborted) {
  54288. return
  54289. }
  54290. var end = function () {
  54291. if (self._form) {
  54292. if (!self._auth.hasAuth) {
  54293. self._form.pipe(self)
  54294. } else if (self._auth.hasAuth && self._auth.sentAuth) {
  54295. self._form.pipe(self)
  54296. }
  54297. }
  54298. if (self._multipart && self._multipart.chunked) {
  54299. self._multipart.body.pipe(self)
  54300. }
  54301. if (self.body) {
  54302. if (isstream(self.body)) {
  54303. self.body.pipe(self)
  54304. } else {
  54305. setContentLength()
  54306. if (Array.isArray(self.body)) {
  54307. self.body.forEach(function (part) {
  54308. self.write(part)
  54309. })
  54310. } else {
  54311. self.write(self.body)
  54312. }
  54313. self.end()
  54314. }
  54315. } else if (self.requestBodyStream) {
  54316. console.warn('options.requestBodyStream is deprecated, please pass the request object to stream.pipe.')
  54317. self.requestBodyStream.pipe(self)
  54318. } else if (!self.src) {
  54319. if (self._auth.hasAuth && !self._auth.sentAuth) {
  54320. self.end()
  54321. return
  54322. }
  54323. if (self.method !== 'GET' && typeof self.method !== 'undefined') {
  54324. self.setHeader('content-length', 0)
  54325. }
  54326. self.end()
  54327. }
  54328. }
  54329. if (self._form && !self.hasHeader('content-length')) {
  54330. // Before ending the request, we had to compute the length of the whole form, asyncly
  54331. self.setHeader(self._form.getHeaders(), true)
  54332. self._form.getLength(function (err, length) {
  54333. if (!err && !isNaN(length)) {
  54334. self.setHeader('content-length', length)
  54335. }
  54336. end()
  54337. })
  54338. } else {
  54339. end()
  54340. }
  54341. self.ntick = true
  54342. })
  54343. }
  54344. Request.prototype.getNewAgent = function () {
  54345. var self = this
  54346. var Agent = self.agentClass
  54347. var options = {}
  54348. if (self.agentOptions) {
  54349. for (var i in self.agentOptions) {
  54350. options[i] = self.agentOptions[i]
  54351. }
  54352. }
  54353. if (self.ca) {
  54354. options.ca = self.ca
  54355. }
  54356. if (self.ciphers) {
  54357. options.ciphers = self.ciphers
  54358. }
  54359. if (self.secureProtocol) {
  54360. options.secureProtocol = self.secureProtocol
  54361. }
  54362. if (self.secureOptions) {
  54363. options.secureOptions = self.secureOptions
  54364. }
  54365. if (typeof self.rejectUnauthorized !== 'undefined') {
  54366. options.rejectUnauthorized = self.rejectUnauthorized
  54367. }
  54368. if (self.cert && self.key) {
  54369. options.key = self.key
  54370. options.cert = self.cert
  54371. }
  54372. if (self.pfx) {
  54373. options.pfx = self.pfx
  54374. }
  54375. if (self.passphrase) {
  54376. options.passphrase = self.passphrase
  54377. }
  54378. var poolKey = ''
  54379. // different types of agents are in different pools
  54380. if (Agent !== self.httpModule.Agent) {
  54381. poolKey += Agent.name
  54382. }
  54383. // ca option is only relevant if proxy or destination are https
  54384. var proxy = self.proxy
  54385. if (typeof proxy === 'string') {
  54386. proxy = url.parse(proxy)
  54387. }
  54388. var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:'
  54389. if (isHttps) {
  54390. if (options.ca) {
  54391. if (poolKey) {
  54392. poolKey += ':'
  54393. }
  54394. poolKey += options.ca
  54395. }
  54396. if (typeof options.rejectUnauthorized !== 'undefined') {
  54397. if (poolKey) {
  54398. poolKey += ':'
  54399. }
  54400. poolKey += options.rejectUnauthorized
  54401. }
  54402. if (options.cert) {
  54403. if (poolKey) {
  54404. poolKey += ':'
  54405. }
  54406. poolKey += options.cert.toString('ascii') + options.key.toString('ascii')
  54407. }
  54408. if (options.pfx) {
  54409. if (poolKey) {
  54410. poolKey += ':'
  54411. }
  54412. poolKey += options.pfx.toString('ascii')
  54413. }
  54414. if (options.ciphers) {
  54415. if (poolKey) {
  54416. poolKey += ':'
  54417. }
  54418. poolKey += options.ciphers
  54419. }
  54420. if (options.secureProtocol) {
  54421. if (poolKey) {
  54422. poolKey += ':'
  54423. }
  54424. poolKey += options.secureProtocol
  54425. }
  54426. if (options.secureOptions) {
  54427. if (poolKey) {
  54428. poolKey += ':'
  54429. }
  54430. poolKey += options.secureOptions
  54431. }
  54432. }
  54433. if (self.pool === globalPool && !poolKey && Object.keys(options).length === 0 && self.httpModule.globalAgent) {
  54434. // not doing anything special. Use the globalAgent
  54435. return self.httpModule.globalAgent
  54436. }
  54437. // we're using a stored agent. Make sure it's protocol-specific
  54438. poolKey = self.uri.protocol + poolKey
  54439. // generate a new agent for this setting if none yet exists
  54440. if (!self.pool[poolKey]) {
  54441. self.pool[poolKey] = new Agent(options)
  54442. // properly set maxSockets on new agents
  54443. if (self.pool.maxSockets) {
  54444. self.pool[poolKey].maxSockets = self.pool.maxSockets
  54445. }
  54446. }
  54447. return self.pool[poolKey]
  54448. }
  54449. Request.prototype.start = function () {
  54450. // start() is called once we are ready to send the outgoing HTTP request.
  54451. // this is usually called on the first write(), end() or on nextTick()
  54452. var self = this
  54453. if (self.timing) {
  54454. // All timings will be relative to this request's startTime. In order to do this,
  54455. // we need to capture the wall-clock start time (via Date), immediately followed
  54456. // by the high-resolution timer (via now()). While these two won't be set
  54457. // at the _exact_ same time, they should be close enough to be able to calculate
  54458. // high-resolution, monotonically non-decreasing timestamps relative to startTime.
  54459. var startTime = new Date().getTime()
  54460. var startTimeNow = now()
  54461. }
  54462. if (self._aborted) {
  54463. return
  54464. }
  54465. self._started = true
  54466. self.method = self.method || 'GET'
  54467. self.href = self.uri.href
  54468. if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) {
  54469. self.setHeader('content-length', self.src.stat.size)
  54470. }
  54471. if (self._aws) {
  54472. self.aws(self._aws, true)
  54473. }
  54474. // We have a method named auth, which is completely different from the http.request
  54475. // auth option. If we don't remove it, we're gonna have a bad time.
  54476. var reqOptions = copy(self)
  54477. delete reqOptions.auth
  54478. debug('make request', self.uri.href)
  54479. // node v6.8.0 now supports a `timeout` value in `http.request()`, but we
  54480. // should delete it for now since we handle timeouts manually for better
  54481. // consistency with node versions before v6.8.0
  54482. delete reqOptions.timeout
  54483. try {
  54484. self.req = self.httpModule.request(reqOptions)
  54485. } catch (err) {
  54486. self.emit('error', err)
  54487. return
  54488. }
  54489. if (self.timing) {
  54490. self.startTime = startTime
  54491. self.startTimeNow = startTimeNow
  54492. // Timing values will all be relative to startTime (by comparing to startTimeNow
  54493. // so we have an accurate clock)
  54494. self.timings = {}
  54495. }
  54496. var timeout
  54497. if (self.timeout && !self.timeoutTimer) {
  54498. if (self.timeout < 0) {
  54499. timeout = 0
  54500. } else if (typeof self.timeout === 'number' && isFinite(self.timeout)) {
  54501. timeout = self.timeout
  54502. }
  54503. }
  54504. self.req.on('response', self.onRequestResponse.bind(self))
  54505. self.req.on('error', self.onRequestError.bind(self))
  54506. self.req.on('drain', function () {
  54507. self.emit('drain')
  54508. })
  54509. self.req.on('socket', function (socket) {
  54510. // `._connecting` was the old property which was made public in node v6.1.0
  54511. var isConnecting = socket._connecting || socket.connecting
  54512. if (self.timing) {
  54513. self.timings.socket = now() - self.startTimeNow
  54514. if (isConnecting) {
  54515. var onLookupTiming = function () {
  54516. self.timings.lookup = now() - self.startTimeNow
  54517. }
  54518. var onConnectTiming = function () {
  54519. self.timings.connect = now() - self.startTimeNow
  54520. }
  54521. socket.once('lookup', onLookupTiming)
  54522. socket.once('connect', onConnectTiming)
  54523. // clean up timing event listeners if needed on error
  54524. self.req.once('error', function () {
  54525. socket.removeListener('lookup', onLookupTiming)
  54526. socket.removeListener('connect', onConnectTiming)
  54527. })
  54528. }
  54529. }
  54530. var setReqTimeout = function () {
  54531. // This timeout sets the amount of time to wait *between* bytes sent
  54532. // from the server once connected.
  54533. //
  54534. // In particular, it's useful for erroring if the server fails to send
  54535. // data halfway through streaming a response.
  54536. self.req.setTimeout(timeout, function () {
  54537. if (self.req) {
  54538. self.abort()
  54539. var e = new Error('ESOCKETTIMEDOUT')
  54540. e.code = 'ESOCKETTIMEDOUT'
  54541. e.connect = false
  54542. self.emit('error', e)
  54543. }
  54544. })
  54545. }
  54546. if (timeout !== undefined) {
  54547. // Only start the connection timer if we're actually connecting a new
  54548. // socket, otherwise if we're already connected (because this is a
  54549. // keep-alive connection) do not bother. This is important since we won't
  54550. // get a 'connect' event for an already connected socket.
  54551. if (isConnecting) {
  54552. var onReqSockConnect = function () {
  54553. socket.removeListener('connect', onReqSockConnect)
  54554. clearTimeout(self.timeoutTimer)
  54555. self.timeoutTimer = null
  54556. setReqTimeout()
  54557. }
  54558. socket.on('connect', onReqSockConnect)
  54559. self.req.on('error', function (err) { // eslint-disable-line handle-callback-err
  54560. socket.removeListener('connect', onReqSockConnect)
  54561. })
  54562. // Set a timeout in memory - this block will throw if the server takes more
  54563. // than `timeout` to write the HTTP status and headers (corresponding to
  54564. // the on('response') event on the client). NB: this measures wall-clock
  54565. // time, not the time between bytes sent by the server.
  54566. self.timeoutTimer = setTimeout(function () {
  54567. socket.removeListener('connect', onReqSockConnect)
  54568. self.abort()
  54569. var e = new Error('ETIMEDOUT')
  54570. e.code = 'ETIMEDOUT'
  54571. e.connect = true
  54572. self.emit('error', e)
  54573. }, timeout)
  54574. } else {
  54575. // We're already connected
  54576. setReqTimeout()
  54577. }
  54578. }
  54579. self.emit('socket', socket)
  54580. })
  54581. self.emit('request', self.req)
  54582. }
  54583. Request.prototype.onRequestError = function (error) {
  54584. var self = this
  54585. if (self._aborted) {
  54586. return
  54587. }
  54588. if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET' &&
  54589. self.agent.addRequestNoreuse) {
  54590. self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) }
  54591. self.start()
  54592. self.req.end()
  54593. return
  54594. }
  54595. if (self.timeout && self.timeoutTimer) {
  54596. clearTimeout(self.timeoutTimer)
  54597. self.timeoutTimer = null
  54598. }
  54599. self.emit('error', error)
  54600. }
  54601. Request.prototype.onRequestResponse = function (response) {
  54602. var self = this
  54603. if (self.timing) {
  54604. self.timings.response = now() - self.startTimeNow
  54605. }
  54606. debug('onRequestResponse', self.uri.href, response.statusCode, response.headers)
  54607. response.on('end', function () {
  54608. if (self.timing) {
  54609. self.timings.end = now() - self.startTimeNow
  54610. response.timingStart = self.startTime
  54611. // fill in the blanks for any periods that didn't trigger, such as
  54612. // no lookup or connect due to keep alive
  54613. if (!self.timings.socket) {
  54614. self.timings.socket = 0
  54615. }
  54616. if (!self.timings.lookup) {
  54617. self.timings.lookup = self.timings.socket
  54618. }
  54619. if (!self.timings.connect) {
  54620. self.timings.connect = self.timings.lookup
  54621. }
  54622. if (!self.timings.response) {
  54623. self.timings.response = self.timings.connect
  54624. }
  54625. debug('elapsed time', self.timings.end)
  54626. // elapsedTime includes all redirects
  54627. self.elapsedTime += Math.round(self.timings.end)
  54628. // NOTE: elapsedTime is deprecated in favor of .timings
  54629. response.elapsedTime = self.elapsedTime
  54630. // timings is just for the final fetch
  54631. response.timings = self.timings
  54632. // pre-calculate phase timings as well
  54633. response.timingPhases = {
  54634. wait: self.timings.socket,
  54635. dns: self.timings.lookup - self.timings.socket,
  54636. tcp: self.timings.connect - self.timings.lookup,
  54637. firstByte: self.timings.response - self.timings.connect,
  54638. download: self.timings.end - self.timings.response,
  54639. total: self.timings.end
  54640. }
  54641. }
  54642. debug('response end', self.uri.href, response.statusCode, response.headers)
  54643. })
  54644. if (self._aborted) {
  54645. debug('aborted', self.uri.href)
  54646. response.resume()
  54647. return
  54648. }
  54649. self.response = response
  54650. response.request = self
  54651. response.toJSON = responseToJSON
  54652. // XXX This is different on 0.10, because SSL is strict by default
  54653. if (self.httpModule === https &&
  54654. self.strictSSL && (!response.hasOwnProperty('socket') ||
  54655. !response.socket.authorized)) {
  54656. debug('strict ssl error', self.uri.href)
  54657. var sslErr = response.hasOwnProperty('socket') ? response.socket.authorizationError : self.uri.href + ' does not support SSL'
  54658. self.emit('error', new Error('SSL Error: ' + sslErr))
  54659. return
  54660. }
  54661. // Save the original host before any redirect (if it changes, we need to
  54662. // remove any authorization headers). Also remember the case of the header
  54663. // name because lots of broken servers expect Host instead of host and we
  54664. // want the caller to be able to specify this.
  54665. self.originalHost = self.getHeader('host')
  54666. if (!self.originalHostHeaderName) {
  54667. self.originalHostHeaderName = self.hasHeader('host')
  54668. }
  54669. if (self.setHost) {
  54670. self.removeHeader('host')
  54671. }
  54672. if (self.timeout && self.timeoutTimer) {
  54673. clearTimeout(self.timeoutTimer)
  54674. self.timeoutTimer = null
  54675. }
  54676. var targetCookieJar = (self._jar && self._jar.setCookie) ? self._jar : globalCookieJar
  54677. var addCookie = function (cookie) {
  54678. // set the cookie if it's domain in the href's domain.
  54679. try {
  54680. targetCookieJar.setCookie(cookie, self.uri.href, {ignoreError: true})
  54681. } catch (e) {
  54682. self.emit('error', e)
  54683. }
  54684. }
  54685. response.caseless = caseless(response.headers)
  54686. if (response.caseless.has('set-cookie') && (!self._disableCookies)) {
  54687. var headerName = response.caseless.has('set-cookie')
  54688. if (Array.isArray(response.headers[headerName])) {
  54689. response.headers[headerName].forEach(addCookie)
  54690. } else {
  54691. addCookie(response.headers[headerName])
  54692. }
  54693. }
  54694. if (self._redirect.onResponse(response)) {
  54695. return // Ignore the rest of the response
  54696. } else {
  54697. // Be a good stream and emit end when the response is finished.
  54698. // Hack to emit end on close because of a core bug that never fires end
  54699. response.on('close', function () {
  54700. if (!self._ended) {
  54701. self.response.emit('end')
  54702. }
  54703. })
  54704. response.once('end', function () {
  54705. self._ended = true
  54706. })
  54707. var noBody = function (code) {
  54708. return (
  54709. self.method === 'HEAD' ||
  54710. // Informational
  54711. (code >= 100 && code < 200) ||
  54712. // No Content
  54713. code === 204 ||
  54714. // Not Modified
  54715. code === 304
  54716. )
  54717. }
  54718. var responseContent
  54719. if (self.gzip && !noBody(response.statusCode)) {
  54720. var contentEncoding = response.headers['content-encoding'] || 'identity'
  54721. contentEncoding = contentEncoding.trim().toLowerCase()
  54722. // Be more lenient with decoding compressed responses, since (very rarely)
  54723. // servers send slightly invalid gzip responses that are still accepted
  54724. // by common browsers.
  54725. // Always using Z_SYNC_FLUSH is what cURL does.
  54726. var zlibOptions = {
  54727. flush: zlib.Z_SYNC_FLUSH,
  54728. finishFlush: zlib.Z_SYNC_FLUSH
  54729. }
  54730. if (contentEncoding === 'gzip') {
  54731. responseContent = zlib.createGunzip(zlibOptions)
  54732. response.pipe(responseContent)
  54733. } else if (contentEncoding === 'deflate') {
  54734. responseContent = zlib.createInflate(zlibOptions)
  54735. response.pipe(responseContent)
  54736. } else {
  54737. // Since previous versions didn't check for Content-Encoding header,
  54738. // ignore any invalid values to preserve backwards-compatibility
  54739. if (contentEncoding !== 'identity') {
  54740. debug('ignoring unrecognized Content-Encoding ' + contentEncoding)
  54741. }
  54742. responseContent = response
  54743. }
  54744. } else {
  54745. responseContent = response
  54746. }
  54747. if (self.encoding) {
  54748. if (self.dests.length !== 0) {
  54749. console.error('Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.')
  54750. } else if (responseContent.setEncoding) {
  54751. responseContent.setEncoding(self.encoding)
  54752. } else {
  54753. // Should only occur on node pre-v0.9.4 (joyent/node@9b5abe5) with
  54754. // zlib streams.
  54755. // If/When support for 0.9.4 is dropped, this should be unnecessary.
  54756. responseContent = responseContent.pipe(stringstream(self.encoding))
  54757. }
  54758. }
  54759. if (self._paused) {
  54760. responseContent.pause()
  54761. }
  54762. self.responseContent = responseContent
  54763. self.emit('response', response)
  54764. self.dests.forEach(function (dest) {
  54765. self.pipeDest(dest)
  54766. })
  54767. responseContent.on('data', function (chunk) {
  54768. if (self.timing && !self.responseStarted) {
  54769. self.responseStartTime = (new Date()).getTime()
  54770. // NOTE: responseStartTime is deprecated in favor of .timings
  54771. response.responseStartTime = self.responseStartTime
  54772. }
  54773. self._destdata = true
  54774. self.emit('data', chunk)
  54775. })
  54776. responseContent.once('end', function (chunk) {
  54777. self.emit('end', chunk)
  54778. })
  54779. responseContent.on('error', function (error) {
  54780. self.emit('error', error)
  54781. })
  54782. responseContent.on('close', function () { self.emit('close') })
  54783. if (self.callback) {
  54784. self.readResponseBody(response)
  54785. } else { // if no callback
  54786. self.on('end', function () {
  54787. if (self._aborted) {
  54788. debug('aborted', self.uri.href)
  54789. return
  54790. }
  54791. self.emit('complete', response)
  54792. })
  54793. }
  54794. }
  54795. debug('finish init function', self.uri.href)
  54796. }
  54797. Request.prototype.readResponseBody = function (response) {
  54798. var self = this
  54799. debug("reading response's body")
  54800. var buffers = []
  54801. var bufferLength = 0
  54802. var strings = []
  54803. self.on('data', function (chunk) {
  54804. if (!Buffer.isBuffer(chunk)) {
  54805. strings.push(chunk)
  54806. } else if (chunk.length) {
  54807. bufferLength += chunk.length
  54808. buffers.push(chunk)
  54809. }
  54810. })
  54811. self.on('end', function () {
  54812. debug('end event', self.uri.href)
  54813. if (self._aborted) {
  54814. debug('aborted', self.uri.href)
  54815. // `buffer` is defined in the parent scope and used in a closure it exists for the life of the request.
  54816. // This can lead to leaky behavior if the user retains a reference to the request object.
  54817. buffers = []
  54818. bufferLength = 0
  54819. return
  54820. }
  54821. if (bufferLength) {
  54822. debug('has body', self.uri.href, bufferLength)
  54823. response.body = Buffer.concat(buffers, bufferLength)
  54824. if (self.encoding !== null) {
  54825. response.body = response.body.toString(self.encoding)
  54826. }
  54827. // `buffer` is defined in the parent scope and used in a closure it exists for the life of the Request.
  54828. // This can lead to leaky behavior if the user retains a reference to the request object.
  54829. buffers = []
  54830. bufferLength = 0
  54831. } else if (strings.length) {
  54832. // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation.
  54833. // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse().
  54834. if (self.encoding === 'utf8' && strings[0].length > 0 && strings[0][0] === '\uFEFF') {
  54835. strings[0] = strings[0].substring(1)
  54836. }
  54837. response.body = strings.join('')
  54838. }
  54839. if (self._json) {
  54840. try {
  54841. response.body = JSON.parse(response.body, self._jsonReviver)
  54842. } catch (e) {
  54843. debug('invalid JSON received', self.uri.href)
  54844. }
  54845. }
  54846. debug('emitting complete', self.uri.href)
  54847. if (typeof response.body === 'undefined' && !self._json) {
  54848. response.body = self.encoding === null ? Buffer.alloc(0) : ''
  54849. }
  54850. self.emit('complete', response, response.body)
  54851. })
  54852. }
  54853. Request.prototype.abort = function () {
  54854. var self = this
  54855. self._aborted = true
  54856. if (self.req) {
  54857. self.req.abort()
  54858. } else if (self.response) {
  54859. self.response.destroy()
  54860. }
  54861. self.emit('abort')
  54862. }
  54863. Request.prototype.pipeDest = function (dest) {
  54864. var self = this
  54865. var response = self.response
  54866. // Called after the response is received
  54867. if (dest.headers && !dest.headersSent) {
  54868. if (response.caseless.has('content-type')) {
  54869. var ctname = response.caseless.has('content-type')
  54870. if (dest.setHeader) {
  54871. dest.setHeader(ctname, response.headers[ctname])
  54872. } else {
  54873. dest.headers[ctname] = response.headers[ctname]
  54874. }
  54875. }
  54876. if (response.caseless.has('content-length')) {
  54877. var clname = response.caseless.has('content-length')
  54878. if (dest.setHeader) {
  54879. dest.setHeader(clname, response.headers[clname])
  54880. } else {
  54881. dest.headers[clname] = response.headers[clname]
  54882. }
  54883. }
  54884. }
  54885. if (dest.setHeader && !dest.headersSent) {
  54886. for (var i in response.headers) {
  54887. // If the response content is being decoded, the Content-Encoding header
  54888. // of the response doesn't represent the piped content, so don't pass it.
  54889. if (!self.gzip || i !== 'content-encoding') {
  54890. dest.setHeader(i, response.headers[i])
  54891. }
  54892. }
  54893. dest.statusCode = response.statusCode
  54894. }
  54895. if (self.pipefilter) {
  54896. self.pipefilter(response, dest)
  54897. }
  54898. }
  54899. Request.prototype.qs = function (q, clobber) {
  54900. var self = this
  54901. var base
  54902. if (!clobber && self.uri.query) {
  54903. base = self._qs.parse(self.uri.query)
  54904. } else {
  54905. base = {}
  54906. }
  54907. for (var i in q) {
  54908. base[i] = q[i]
  54909. }
  54910. var qs = self._qs.stringify(base)
  54911. if (qs === '') {
  54912. return self
  54913. }
  54914. self.uri = url.parse(self.uri.href.split('?')[0] + '?' + qs)
  54915. self.url = self.uri
  54916. self.path = self.uri.path
  54917. if (self.uri.host === 'unix') {
  54918. self.enableUnixSocket()
  54919. }
  54920. return self
  54921. }
  54922. Request.prototype.form = function (form) {
  54923. var self = this
  54924. if (form) {
  54925. if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) {
  54926. self.setHeader('content-type', 'application/x-www-form-urlencoded')
  54927. }
  54928. self.body = (typeof form === 'string')
  54929. ? self._qs.rfc3986(form.toString('utf8'))
  54930. : self._qs.stringify(form).toString('utf8')
  54931. return self
  54932. }
  54933. // create form-data object
  54934. self._form = new FormData()
  54935. self._form.on('error', function (err) {
  54936. err.message = 'form-data: ' + err.message
  54937. self.emit('error', err)
  54938. self.abort()
  54939. })
  54940. return self._form
  54941. }
  54942. Request.prototype.multipart = function (multipart) {
  54943. var self = this
  54944. self._multipart.onRequest(multipart)
  54945. if (!self._multipart.chunked) {
  54946. self.body = self._multipart.body
  54947. }
  54948. return self
  54949. }
  54950. Request.prototype.json = function (val) {
  54951. var self = this
  54952. if (!self.hasHeader('accept')) {
  54953. self.setHeader('accept', 'application/json')
  54954. }
  54955. if (typeof self.jsonReplacer === 'function') {
  54956. self._jsonReplacer = self.jsonReplacer
  54957. }
  54958. self._json = true
  54959. if (typeof val === 'boolean') {
  54960. if (self.body !== undefined) {
  54961. if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) {
  54962. self.body = safeStringify(self.body, self._jsonReplacer)
  54963. } else {
  54964. self.body = self._qs.rfc3986(self.body)
  54965. }
  54966. if (!self.hasHeader('content-type')) {
  54967. self.setHeader('content-type', 'application/json')
  54968. }
  54969. }
  54970. } else {
  54971. self.body = safeStringify(val, self._jsonReplacer)
  54972. if (!self.hasHeader('content-type')) {
  54973. self.setHeader('content-type', 'application/json')
  54974. }
  54975. }
  54976. if (typeof self.jsonReviver === 'function') {
  54977. self._jsonReviver = self.jsonReviver
  54978. }
  54979. return self
  54980. }
  54981. Request.prototype.getHeader = function (name, headers) {
  54982. var self = this
  54983. var result, re, match
  54984. if (!headers) {
  54985. headers = self.headers
  54986. }
  54987. Object.keys(headers).forEach(function (key) {
  54988. if (key.length !== name.length) {
  54989. return
  54990. }
  54991. re = new RegExp(name, 'i')
  54992. match = key.match(re)
  54993. if (match) {
  54994. result = headers[key]
  54995. }
  54996. })
  54997. return result
  54998. }
  54999. Request.prototype.enableUnixSocket = function () {
  55000. // Get the socket & request paths from the URL
  55001. var unixParts = this.uri.path.split(':')
  55002. var host = unixParts[0]
  55003. var path = unixParts[1]
  55004. // Apply unix properties to request
  55005. this.socketPath = host
  55006. this.uri.pathname = path
  55007. this.uri.path = path
  55008. this.uri.host = host
  55009. this.uri.hostname = host
  55010. this.uri.isUnix = true
  55011. }
  55012. Request.prototype.auth = function (user, pass, sendImmediately, bearer) {
  55013. var self = this
  55014. self._auth.onRequest(user, pass, sendImmediately, bearer)
  55015. return self
  55016. }
  55017. Request.prototype.aws = function (opts, now) {
  55018. var self = this
  55019. if (!now) {
  55020. self._aws = opts
  55021. return self
  55022. }
  55023. if (opts.sign_version === 4 || opts.sign_version === '4') {
  55024. // use aws4
  55025. var options = {
  55026. host: self.uri.host,
  55027. path: self.uri.path,
  55028. method: self.method,
  55029. headers: {
  55030. 'content-type': self.getHeader('content-type') || ''
  55031. },
  55032. body: self.body
  55033. }
  55034. var signRes = aws4.sign(options, {
  55035. accessKeyId: opts.key,
  55036. secretAccessKey: opts.secret,
  55037. sessionToken: opts.session
  55038. })
  55039. self.setHeader('authorization', signRes.headers.Authorization)
  55040. self.setHeader('x-amz-date', signRes.headers['X-Amz-Date'])
  55041. if (signRes.headers['X-Amz-Security-Token']) {
  55042. self.setHeader('x-amz-security-token', signRes.headers['X-Amz-Security-Token'])
  55043. }
  55044. } else {
  55045. // default: use aws-sign2
  55046. var date = new Date()
  55047. self.setHeader('date', date.toUTCString())
  55048. var auth = {
  55049. key: opts.key,
  55050. secret: opts.secret,
  55051. verb: self.method.toUpperCase(),
  55052. date: date,
  55053. contentType: self.getHeader('content-type') || '',
  55054. md5: self.getHeader('content-md5') || '',
  55055. amazonHeaders: aws2.canonicalizeHeaders(self.headers)
  55056. }
  55057. var path = self.uri.path
  55058. if (opts.bucket && path) {
  55059. auth.resource = '/' + opts.bucket + path
  55060. } else if (opts.bucket && !path) {
  55061. auth.resource = '/' + opts.bucket
  55062. } else if (!opts.bucket && path) {
  55063. auth.resource = path
  55064. } else if (!opts.bucket && !path) {
  55065. auth.resource = '/'
  55066. }
  55067. auth.resource = aws2.canonicalizeResource(auth.resource)
  55068. self.setHeader('authorization', aws2.authorization(auth))
  55069. }
  55070. return self
  55071. }
  55072. Request.prototype.httpSignature = function (opts) {
  55073. var self = this
  55074. httpSignature.signRequest({
  55075. getHeader: function (header) {
  55076. return self.getHeader(header, self.headers)
  55077. },
  55078. setHeader: function (header, value) {
  55079. self.setHeader(header, value)
  55080. },
  55081. method: self.method,
  55082. path: self.path
  55083. }, opts)
  55084. debug('httpSignature authorization', self.getHeader('authorization'))
  55085. return self
  55086. }
  55087. Request.prototype.hawk = function (opts) {
  55088. var self = this
  55089. self.setHeader('Authorization', hawk.client.header(self.uri, self.method, opts).field)
  55090. }
  55091. Request.prototype.oauth = function (_oauth) {
  55092. var self = this
  55093. self._oauth.onRequest(_oauth)
  55094. return self
  55095. }
  55096. Request.prototype.jar = function (jar) {
  55097. var self = this
  55098. var cookies
  55099. if (self._redirect.redirectsFollowed === 0) {
  55100. self.originalCookieHeader = self.getHeader('cookie')
  55101. }
  55102. if (!jar) {
  55103. // disable cookies
  55104. cookies = false
  55105. self._disableCookies = true
  55106. } else {
  55107. var targetCookieJar = (jar && jar.getCookieString) ? jar : globalCookieJar
  55108. var urihref = self.uri.href
  55109. // fetch cookie in the Specified host
  55110. if (targetCookieJar) {
  55111. cookies = targetCookieJar.getCookieString(urihref)
  55112. }
  55113. }
  55114. // if need cookie and cookie is not empty
  55115. if (cookies && cookies.length) {
  55116. if (self.originalCookieHeader) {
  55117. // Don't overwrite existing Cookie header
  55118. self.setHeader('cookie', self.originalCookieHeader + '; ' + cookies)
  55119. } else {
  55120. self.setHeader('cookie', cookies)
  55121. }
  55122. }
  55123. self._jar = jar
  55124. return self
  55125. }
  55126. // Stream API
  55127. Request.prototype.pipe = function (dest, opts) {
  55128. var self = this
  55129. if (self.response) {
  55130. if (self._destdata) {
  55131. self.emit('error', new Error('You cannot pipe after data has been emitted from the response.'))
  55132. } else if (self._ended) {
  55133. self.emit('error', new Error('You cannot pipe after the response has been ended.'))
  55134. } else {
  55135. stream.Stream.prototype.pipe.call(self, dest, opts)
  55136. self.pipeDest(dest)
  55137. return dest
  55138. }
  55139. } else {
  55140. self.dests.push(dest)
  55141. stream.Stream.prototype.pipe.call(self, dest, opts)
  55142. return dest
  55143. }
  55144. }
  55145. Request.prototype.write = function () {
  55146. var self = this
  55147. if (self._aborted) { return }
  55148. if (!self._started) {
  55149. self.start()
  55150. }
  55151. if (self.req) {
  55152. return self.req.write.apply(self.req, arguments)
  55153. }
  55154. }
  55155. Request.prototype.end = function (chunk) {
  55156. var self = this
  55157. if (self._aborted) { return }
  55158. if (chunk) {
  55159. self.write(chunk)
  55160. }
  55161. if (!self._started) {
  55162. self.start()
  55163. }
  55164. if (self.req) {
  55165. self.req.end()
  55166. }
  55167. }
  55168. Request.prototype.pause = function () {
  55169. var self = this
  55170. if (!self.responseContent) {
  55171. self._paused = true
  55172. } else {
  55173. self.responseContent.pause.apply(self.responseContent, arguments)
  55174. }
  55175. }
  55176. Request.prototype.resume = function () {
  55177. var self = this
  55178. if (!self.responseContent) {
  55179. self._paused = false
  55180. } else {
  55181. self.responseContent.resume.apply(self.responseContent, arguments)
  55182. }
  55183. }
  55184. Request.prototype.destroy = function () {
  55185. var self = this
  55186. if (!self._ended) {
  55187. self.end()
  55188. } else if (self.response) {
  55189. self.response.destroy()
  55190. }
  55191. }
  55192. Request.defaultProxyHeaderWhiteList =
  55193. Tunnel.defaultProxyHeaderWhiteList.slice()
  55194. Request.defaultProxyHeaderExclusiveList =
  55195. Tunnel.defaultProxyHeaderExclusiveList.slice()
  55196. // Exports
  55197. Request.prototype.toJSON = requestToJSON
  55198. module.exports = Request
  55199. /***/ }),
  55200. /* 532 */
  55201. /***/ (function(module, exports, __webpack_require__) {
  55202. "use strict";
  55203. // Export sub-modules
  55204. exports.error = exports.Error = __webpack_require__(144);
  55205. exports.sntp = __webpack_require__(344);
  55206. exports.server = __webpack_require__(536);
  55207. exports.client = __webpack_require__(539);
  55208. exports.crypto = __webpack_require__(145);
  55209. exports.utils = __webpack_require__(105);
  55210. exports.uri = {
  55211. authenticate: exports.server.authenticateBewit,
  55212. getBewit: exports.client.getBewit
  55213. };
  55214. /***/ }),
  55215. /* 533 */
  55216. /***/ (function(module, exports, __webpack_require__) {
  55217. "use strict";
  55218. // Declare internals
  55219. const internals = {};
  55220. exports.escapeJavaScript = function (input) {
  55221. if (!input) {
  55222. return '';
  55223. }
  55224. let escaped = '';
  55225. for (let i = 0; i < input.length; ++i) {
  55226. const charCode = input.charCodeAt(i);
  55227. if (internals.isSafe(charCode)) {
  55228. escaped += input[i];
  55229. }
  55230. else {
  55231. escaped += internals.escapeJavaScriptChar(charCode);
  55232. }
  55233. }
  55234. return escaped;
  55235. };
  55236. exports.escapeHtml = function (input) {
  55237. if (!input) {
  55238. return '';
  55239. }
  55240. let escaped = '';
  55241. for (let i = 0; i < input.length; ++i) {
  55242. const charCode = input.charCodeAt(i);
  55243. if (internals.isSafe(charCode)) {
  55244. escaped += input[i];
  55245. }
  55246. else {
  55247. escaped += internals.escapeHtmlChar(charCode);
  55248. }
  55249. }
  55250. return escaped;
  55251. };
  55252. exports.escapeJson = function (input) {
  55253. if (!input) {
  55254. return '';
  55255. }
  55256. const lessThan = 0x3C;
  55257. const greaterThan = 0x3E;
  55258. const andSymbol = 0x26;
  55259. const lineSeperator = 0x2028;
  55260. // replace method
  55261. let charCode;
  55262. return input.replace(/[<>&\u2028\u2029]/g, (match) => {
  55263. charCode = match.charCodeAt(0);
  55264. if (charCode === lessThan) {
  55265. return '\\u003c';
  55266. }
  55267. else if (charCode === greaterThan) {
  55268. return '\\u003e';
  55269. }
  55270. else if (charCode === andSymbol) {
  55271. return '\\u0026';
  55272. }
  55273. else if (charCode === lineSeperator) {
  55274. return '\\u2028';
  55275. }
  55276. return '\\u2029';
  55277. });
  55278. };
  55279. internals.escapeJavaScriptChar = function (charCode) {
  55280. if (charCode >= 256) {
  55281. return '\\u' + internals.padLeft('' + charCode, 4);
  55282. }
  55283. const hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex');
  55284. return '\\x' + internals.padLeft(hexValue, 2);
  55285. };
  55286. internals.escapeHtmlChar = function (charCode) {
  55287. const namedEscape = internals.namedHtml[charCode];
  55288. if (typeof namedEscape !== 'undefined') {
  55289. return namedEscape;
  55290. }
  55291. if (charCode >= 256) {
  55292. return '&#' + charCode + ';';
  55293. }
  55294. const hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex');
  55295. return '&#x' + internals.padLeft(hexValue, 2) + ';';
  55296. };
  55297. internals.padLeft = function (str, len) {
  55298. while (str.length < len) {
  55299. str = '0' + str;
  55300. }
  55301. return str;
  55302. };
  55303. internals.isSafe = function (charCode) {
  55304. return (typeof internals.safeCharCodes[charCode] !== 'undefined');
  55305. };
  55306. internals.namedHtml = {
  55307. '38': '&amp;',
  55308. '60': '&lt;',
  55309. '62': '&gt;',
  55310. '34': '&quot;',
  55311. '160': '&nbsp;',
  55312. '162': '&cent;',
  55313. '163': '&pound;',
  55314. '164': '&curren;',
  55315. '169': '&copy;',
  55316. '174': '&reg;'
  55317. };
  55318. internals.safeCharCodes = (function () {
  55319. const safe = {};
  55320. for (let i = 32; i < 123; ++i) {
  55321. if ((i >= 97) || // a-z
  55322. (i >= 65 && i <= 90) || // A-Z
  55323. (i >= 48 && i <= 57) || // 0-9
  55324. i === 32 || // space
  55325. i === 46 || // .
  55326. i === 44 || // ,
  55327. i === 45 || // -
  55328. i === 58 || // :
  55329. i === 95) { // _
  55330. safe[i] = null;
  55331. }
  55332. }
  55333. return safe;
  55334. }());
  55335. /***/ }),
  55336. /* 534 */
  55337. /***/ (function(module, exports) {
  55338. module.exports = require("dgram");
  55339. /***/ }),
  55340. /* 535 */
  55341. /***/ (function(module, exports) {
  55342. module.exports = require("dns");
  55343. /***/ }),
  55344. /* 536 */
  55345. /***/ (function(module, exports, __webpack_require__) {
  55346. "use strict";
  55347. // Load modules
  55348. const Boom = __webpack_require__(144);
  55349. const Hoek = __webpack_require__(82);
  55350. const Cryptiles = __webpack_require__(345);
  55351. const Crypto = __webpack_require__(145);
  55352. const Utils = __webpack_require__(105);
  55353. // Declare internals
  55354. const internals = {};
  55355. // Hawk authentication
  55356. /*
  55357. req: node's HTTP request object or an object as follows:
  55358. const request = {
  55359. method: 'GET',
  55360. url: '/resource/4?a=1&b=2',
  55361. host: 'example.com',
  55362. port: 8080,
  55363. authorization: 'Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", ext="some-app-ext-data", mac="6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE="'
  55364. };
  55365. credentialsFunc: required function to lookup the set of Hawk credentials based on the provided credentials id.
  55366. The credentials include the MAC key, MAC algorithm, and other attributes (such as username)
  55367. needed by the application. This function is the equivalent of verifying the username and
  55368. password in Basic authentication.
  55369. const credentialsFunc = function (id, callback) {
  55370. // Lookup credentials in database
  55371. db.lookup(id, function (err, item) {
  55372. if (err || !item) {
  55373. return callback(err);
  55374. }
  55375. const credentials = {
  55376. // Required
  55377. key: item.key,
  55378. algorithm: item.algorithm,
  55379. // Application specific
  55380. user: item.user
  55381. };
  55382. return callback(null, credentials);
  55383. });
  55384. };
  55385. options: {
  55386. hostHeaderName: optional header field name, used to override the default 'Host' header when used
  55387. behind a cache of a proxy. Apache2 changes the value of the 'Host' header while preserving
  55388. the original (which is what the module must verify) in the 'x-forwarded-host' header field.
  55389. Only used when passed a node Http.ServerRequest object.
  55390. nonceFunc: optional nonce validation function. The function signature is function(key, nonce, ts, callback)
  55391. where 'callback' must be called using the signature function(err).
  55392. timestampSkewSec: optional number of seconds of permitted clock skew for incoming timestamps. Defaults to 60 seconds.
  55393. Provides a +/- skew which means actual allowed window is double the number of seconds.
  55394. localtimeOffsetMsec: optional local clock time offset express in a number of milliseconds (positive or negative).
  55395. Defaults to 0.
  55396. payload: optional payload for validation. The client calculates the hash value and includes it via the 'hash'
  55397. header attribute. The server always ensures the value provided has been included in the request
  55398. MAC. When this option is provided, it validates the hash value itself. Validation is done by calculating
  55399. a hash value over the entire payload (assuming it has already be normalized to the same format and
  55400. encoding used by the client to calculate the hash on request). If the payload is not available at the time
  55401. of authentication, the authenticatePayload() method can be used by passing it the credentials and
  55402. attributes.hash returned in the authenticate callback.
  55403. host: optional host name override. Only used when passed a node request object.
  55404. port: optional port override. Only used when passed a node request object.
  55405. }
  55406. callback: function (err, credentials, artifacts) { }
  55407. */
  55408. exports.authenticate = function (req, credentialsFunc, options, callback) {
  55409. callback = Hoek.nextTick(callback);
  55410. // Default options
  55411. options.nonceFunc = options.nonceFunc || internals.nonceFunc;
  55412. options.timestampSkewSec = options.timestampSkewSec || 60; // 60 seconds
  55413. // Application time
  55414. const now = Utils.now(options.localtimeOffsetMsec); // Measure now before any other processing
  55415. // Convert node Http request object to a request configuration object
  55416. const request = Utils.parseRequest(req, options);
  55417. if (request instanceof Error) {
  55418. return callback(Boom.badRequest(request.message));
  55419. }
  55420. // Parse HTTP Authorization header
  55421. const attributes = Utils.parseAuthorizationHeader(request.authorization);
  55422. if (attributes instanceof Error) {
  55423. return callback(attributes);
  55424. }
  55425. // Construct artifacts container
  55426. const artifacts = {
  55427. method: request.method,
  55428. host: request.host,
  55429. port: request.port,
  55430. resource: request.url,
  55431. ts: attributes.ts,
  55432. nonce: attributes.nonce,
  55433. hash: attributes.hash,
  55434. ext: attributes.ext,
  55435. app: attributes.app,
  55436. dlg: attributes.dlg,
  55437. mac: attributes.mac,
  55438. id: attributes.id
  55439. };
  55440. // Verify required header attributes
  55441. if (!attributes.id ||
  55442. !attributes.ts ||
  55443. !attributes.nonce ||
  55444. !attributes.mac) {
  55445. return callback(Boom.badRequest('Missing attributes'), null, artifacts);
  55446. }
  55447. // Fetch Hawk credentials
  55448. credentialsFunc(attributes.id, (err, credentials) => {
  55449. if (err) {
  55450. return callback(err, credentials || null, artifacts);
  55451. }
  55452. if (!credentials) {
  55453. return callback(Utils.unauthorized('Unknown credentials'), null, artifacts);
  55454. }
  55455. if (!credentials.key ||
  55456. !credentials.algorithm) {
  55457. return callback(Boom.internal('Invalid credentials'), credentials, artifacts);
  55458. }
  55459. if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
  55460. return callback(Boom.internal('Unknown algorithm'), credentials, artifacts);
  55461. }
  55462. // Calculate MAC
  55463. const mac = Crypto.calculateMac('header', credentials, artifacts);
  55464. if (!Cryptiles.fixedTimeComparison(mac, attributes.mac)) {
  55465. return callback(Utils.unauthorized('Bad mac'), credentials, artifacts);
  55466. }
  55467. // Check payload hash
  55468. if (options.payload ||
  55469. options.payload === '') {
  55470. if (!attributes.hash) {
  55471. return callback(Utils.unauthorized('Missing required payload hash'), credentials, artifacts);
  55472. }
  55473. const hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, request.contentType);
  55474. if (!Cryptiles.fixedTimeComparison(hash, attributes.hash)) {
  55475. return callback(Utils.unauthorized('Bad payload hash'), credentials, artifacts);
  55476. }
  55477. }
  55478. // Check nonce
  55479. options.nonceFunc(credentials.key, attributes.nonce, attributes.ts, (err) => {
  55480. if (err) {
  55481. return callback(Utils.unauthorized('Invalid nonce'), credentials, artifacts);
  55482. }
  55483. // Check timestamp staleness
  55484. if (Math.abs((attributes.ts * 1000) - now) > (options.timestampSkewSec * 1000)) {
  55485. const tsm = Crypto.timestampMessage(credentials, options.localtimeOffsetMsec);
  55486. return callback(Utils.unauthorized('Stale timestamp', tsm), credentials, artifacts);
  55487. }
  55488. // Successful authentication
  55489. return callback(null, credentials, artifacts);
  55490. });
  55491. });
  55492. };
  55493. // Authenticate payload hash - used when payload cannot be provided during authenticate()
  55494. /*
  55495. payload: raw request payload
  55496. credentials: from authenticate callback
  55497. artifacts: from authenticate callback
  55498. contentType: req.headers['content-type']
  55499. */
  55500. exports.authenticatePayload = function (payload, credentials, artifacts, contentType) {
  55501. const calculatedHash = Crypto.calculatePayloadHash(payload, credentials.algorithm, contentType);
  55502. return Cryptiles.fixedTimeComparison(calculatedHash, artifacts.hash);
  55503. };
  55504. // Authenticate payload hash - used when payload cannot be provided during authenticate()
  55505. /*
  55506. calculatedHash: the payload hash calculated using Crypto.calculatePayloadHash()
  55507. artifacts: from authenticate callback
  55508. */
  55509. exports.authenticatePayloadHash = function (calculatedHash, artifacts) {
  55510. return Cryptiles.fixedTimeComparison(calculatedHash, artifacts.hash);
  55511. };
  55512. // Generate a Server-Authorization header for a given response
  55513. /*
  55514. credentials: {}, // Object received from authenticate()
  55515. artifacts: {} // Object received from authenticate(); 'mac', 'hash', and 'ext' - ignored
  55516. options: {
  55517. ext: 'application-specific', // Application specific data sent via the ext attribute
  55518. payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided)
  55519. contentType: 'application/json', // Payload content-type (ignored if hash provided)
  55520. hash: 'U4MKKSmiVxk37JCCrAVIjV=' // Pre-calculated payload hash
  55521. }
  55522. */
  55523. exports.header = function (credentials, artifacts, options) {
  55524. // Prepare inputs
  55525. options = options || {};
  55526. if (!artifacts ||
  55527. typeof artifacts !== 'object' ||
  55528. typeof options !== 'object') {
  55529. return '';
  55530. }
  55531. artifacts = Hoek.clone(artifacts);
  55532. delete artifacts.mac;
  55533. artifacts.hash = options.hash;
  55534. artifacts.ext = options.ext;
  55535. // Validate credentials
  55536. if (!credentials ||
  55537. !credentials.key ||
  55538. !credentials.algorithm) {
  55539. // Invalid credential object
  55540. return '';
  55541. }
  55542. if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
  55543. return '';
  55544. }
  55545. // Calculate payload hash
  55546. if (!artifacts.hash &&
  55547. (options.payload || options.payload === '')) {
  55548. artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
  55549. }
  55550. const mac = Crypto.calculateMac('response', credentials, artifacts);
  55551. // Construct header
  55552. let header = 'Hawk mac="' + mac + '"' +
  55553. (artifacts.hash ? ', hash="' + artifacts.hash + '"' : '');
  55554. if (artifacts.ext !== null &&
  55555. artifacts.ext !== undefined &&
  55556. artifacts.ext !== '') { // Other falsey values allowed
  55557. header = header + ', ext="' + Hoek.escapeHeaderAttribute(artifacts.ext) + '"';
  55558. }
  55559. return header;
  55560. };
  55561. /*
  55562. * Arguments and options are the same as authenticate() with the exception that the only supported options are:
  55563. * 'hostHeaderName', 'localtimeOffsetMsec', 'host', 'port'
  55564. */
  55565. // 1 2 3 4
  55566. internals.bewitRegex = /^(\/.*)([\?&])bewit\=([^&$]*)(?:&(.+))?$/;
  55567. exports.authenticateBewit = function (req, credentialsFunc, options, callback) {
  55568. callback = Hoek.nextTick(callback);
  55569. // Application time
  55570. const now = Utils.now(options.localtimeOffsetMsec);
  55571. // Convert node Http request object to a request configuration object
  55572. const request = Utils.parseRequest(req, options);
  55573. if (request instanceof Error) {
  55574. return callback(Boom.badRequest(request.message));
  55575. }
  55576. // Extract bewit
  55577. if (request.url.length > Utils.limits.maxMatchLength) {
  55578. return callback(Boom.badRequest('Resource path exceeds max length'));
  55579. }
  55580. const resource = request.url.match(internals.bewitRegex);
  55581. if (!resource) {
  55582. return callback(Utils.unauthorized());
  55583. }
  55584. // Bewit not empty
  55585. if (!resource[3]) {
  55586. return callback(Utils.unauthorized('Empty bewit'));
  55587. }
  55588. // Verify method is GET
  55589. if (request.method !== 'GET' &&
  55590. request.method !== 'HEAD') {
  55591. return callback(Utils.unauthorized('Invalid method'));
  55592. }
  55593. // No other authentication
  55594. if (request.authorization) {
  55595. return callback(Boom.badRequest('Multiple authentications'));
  55596. }
  55597. // Parse bewit
  55598. const bewitString = Hoek.base64urlDecode(resource[3]);
  55599. if (bewitString instanceof Error) {
  55600. return callback(Boom.badRequest('Invalid bewit encoding'));
  55601. }
  55602. // Bewit format: id\exp\mac\ext ('\' is used because it is a reserved header attribute character)
  55603. const bewitParts = bewitString.split('\\');
  55604. if (bewitParts.length !== 4) {
  55605. return callback(Boom.badRequest('Invalid bewit structure'));
  55606. }
  55607. const bewit = {
  55608. id: bewitParts[0],
  55609. exp: parseInt(bewitParts[1], 10),
  55610. mac: bewitParts[2],
  55611. ext: bewitParts[3] || ''
  55612. };
  55613. if (!bewit.id ||
  55614. !bewit.exp ||
  55615. !bewit.mac) {
  55616. return callback(Boom.badRequest('Missing bewit attributes'));
  55617. }
  55618. // Construct URL without bewit
  55619. let url = resource[1];
  55620. if (resource[4]) {
  55621. url = url + resource[2] + resource[4];
  55622. }
  55623. // Check expiration
  55624. if (bewit.exp * 1000 <= now) {
  55625. return callback(Utils.unauthorized('Access expired'), null, bewit);
  55626. }
  55627. // Fetch Hawk credentials
  55628. credentialsFunc(bewit.id, (err, credentials) => {
  55629. if (err) {
  55630. return callback(err, credentials || null, bewit.ext);
  55631. }
  55632. if (!credentials) {
  55633. return callback(Utils.unauthorized('Unknown credentials'), null, bewit);
  55634. }
  55635. if (!credentials.key ||
  55636. !credentials.algorithm) {
  55637. return callback(Boom.internal('Invalid credentials'), credentials, bewit);
  55638. }
  55639. if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
  55640. return callback(Boom.internal('Unknown algorithm'), credentials, bewit);
  55641. }
  55642. // Calculate MAC
  55643. const mac = Crypto.calculateMac('bewit', credentials, {
  55644. ts: bewit.exp,
  55645. nonce: '',
  55646. method: 'GET',
  55647. resource: url,
  55648. host: request.host,
  55649. port: request.port,
  55650. ext: bewit.ext
  55651. });
  55652. if (!Cryptiles.fixedTimeComparison(mac, bewit.mac)) {
  55653. return callback(Utils.unauthorized('Bad mac'), credentials, bewit);
  55654. }
  55655. // Successful authentication
  55656. return callback(null, credentials, bewit);
  55657. });
  55658. };
  55659. /*
  55660. * options are the same as authenticate() with the exception that the only supported options are:
  55661. * 'nonceFunc', 'timestampSkewSec', 'localtimeOffsetMsec'
  55662. */
  55663. exports.authenticateMessage = function (host, port, message, authorization, credentialsFunc, options, callback) {
  55664. callback = Hoek.nextTick(callback);
  55665. // Default options
  55666. options.nonceFunc = options.nonceFunc || internals.nonceFunc;
  55667. options.timestampSkewSec = options.timestampSkewSec || 60; // 60 seconds
  55668. // Application time
  55669. const now = Utils.now(options.localtimeOffsetMsec); // Measure now before any other processing
  55670. // Validate authorization
  55671. if (!authorization.id ||
  55672. !authorization.ts ||
  55673. !authorization.nonce ||
  55674. !authorization.hash ||
  55675. !authorization.mac) {
  55676. return callback(Boom.badRequest('Invalid authorization'));
  55677. }
  55678. // Fetch Hawk credentials
  55679. credentialsFunc(authorization.id, (err, credentials) => {
  55680. if (err) {
  55681. return callback(err, credentials || null);
  55682. }
  55683. if (!credentials) {
  55684. return callback(Utils.unauthorized('Unknown credentials'));
  55685. }
  55686. if (!credentials.key ||
  55687. !credentials.algorithm) {
  55688. return callback(Boom.internal('Invalid credentials'), credentials);
  55689. }
  55690. if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
  55691. return callback(Boom.internal('Unknown algorithm'), credentials);
  55692. }
  55693. // Construct artifacts container
  55694. const artifacts = {
  55695. ts: authorization.ts,
  55696. nonce: authorization.nonce,
  55697. host,
  55698. port,
  55699. hash: authorization.hash
  55700. };
  55701. // Calculate MAC
  55702. const mac = Crypto.calculateMac('message', credentials, artifacts);
  55703. if (!Cryptiles.fixedTimeComparison(mac, authorization.mac)) {
  55704. return callback(Utils.unauthorized('Bad mac'), credentials);
  55705. }
  55706. // Check payload hash
  55707. const hash = Crypto.calculatePayloadHash(message, credentials.algorithm);
  55708. if (!Cryptiles.fixedTimeComparison(hash, authorization.hash)) {
  55709. return callback(Utils.unauthorized('Bad message hash'), credentials);
  55710. }
  55711. // Check nonce
  55712. options.nonceFunc(credentials.key, authorization.nonce, authorization.ts, (err) => {
  55713. if (err) {
  55714. return callback(Utils.unauthorized('Invalid nonce'), credentials);
  55715. }
  55716. // Check timestamp staleness
  55717. if (Math.abs((authorization.ts * 1000) - now) > (options.timestampSkewSec * 1000)) {
  55718. return callback(Utils.unauthorized('Stale timestamp'), credentials);
  55719. }
  55720. // Successful authentication
  55721. return callback(null, credentials);
  55722. });
  55723. });
  55724. };
  55725. internals.nonceFunc = function (key, nonce, ts, nonceCallback) {
  55726. return nonceCallback(); // No validation
  55727. };
  55728. /***/ }),
  55729. /* 537 */
  55730. /***/ (function(module, exports, __webpack_require__) {
  55731. "use strict";
  55732. // Load modules
  55733. const Hoek = __webpack_require__(82);
  55734. // Declare internals
  55735. const internals = {
  55736. STATUS_CODES: Object.setPrototypeOf({
  55737. '100': 'Continue',
  55738. '101': 'Switching Protocols',
  55739. '102': 'Processing',
  55740. '200': 'OK',
  55741. '201': 'Created',
  55742. '202': 'Accepted',
  55743. '203': 'Non-Authoritative Information',
  55744. '204': 'No Content',
  55745. '205': 'Reset Content',
  55746. '206': 'Partial Content',
  55747. '207': 'Multi-Status',
  55748. '300': 'Multiple Choices',
  55749. '301': 'Moved Permanently',
  55750. '302': 'Moved Temporarily',
  55751. '303': 'See Other',
  55752. '304': 'Not Modified',
  55753. '305': 'Use Proxy',
  55754. '307': 'Temporary Redirect',
  55755. '400': 'Bad Request',
  55756. '401': 'Unauthorized',
  55757. '402': 'Payment Required',
  55758. '403': 'Forbidden',
  55759. '404': 'Not Found',
  55760. '405': 'Method Not Allowed',
  55761. '406': 'Not Acceptable',
  55762. '407': 'Proxy Authentication Required',
  55763. '408': 'Request Time-out',
  55764. '409': 'Conflict',
  55765. '410': 'Gone',
  55766. '411': 'Length Required',
  55767. '412': 'Precondition Failed',
  55768. '413': 'Request Entity Too Large',
  55769. '414': 'Request-URI Too Large',
  55770. '415': 'Unsupported Media Type',
  55771. '416': 'Requested Range Not Satisfiable',
  55772. '417': 'Expectation Failed',
  55773. '418': 'I\'m a teapot',
  55774. '422': 'Unprocessable Entity',
  55775. '423': 'Locked',
  55776. '424': 'Failed Dependency',
  55777. '425': 'Unordered Collection',
  55778. '426': 'Upgrade Required',
  55779. '428': 'Precondition Required',
  55780. '429': 'Too Many Requests',
  55781. '431': 'Request Header Fields Too Large',
  55782. '451': 'Unavailable For Legal Reasons',
  55783. '500': 'Internal Server Error',
  55784. '501': 'Not Implemented',
  55785. '502': 'Bad Gateway',
  55786. '503': 'Service Unavailable',
  55787. '504': 'Gateway Time-out',
  55788. '505': 'HTTP Version Not Supported',
  55789. '506': 'Variant Also Negotiates',
  55790. '507': 'Insufficient Storage',
  55791. '509': 'Bandwidth Limit Exceeded',
  55792. '510': 'Not Extended',
  55793. '511': 'Network Authentication Required'
  55794. }, null)
  55795. };
  55796. exports.boomify = function (error, options) {
  55797. Hoek.assert(error instanceof Error, 'Cannot wrap non-Error object');
  55798. options = options || {};
  55799. if (!error.isBoom) {
  55800. return internals.initialize(error, options.statusCode || 500, options.message);
  55801. }
  55802. if (options.override === false || // Defaults to true
  55803. (!options.statusCode && !options.message)) {
  55804. return error;
  55805. }
  55806. return internals.initialize(error, options.statusCode || error.output.statusCode, options.message);
  55807. };
  55808. exports.wrap = function (error, statusCode, message) {
  55809. Hoek.assert(error instanceof Error, 'Cannot wrap non-Error object');
  55810. Hoek.assert(!error.isBoom || (!statusCode && !message), 'Cannot provide statusCode or message with boom error');
  55811. return (error.isBoom ? error : internals.initialize(error, statusCode || 500, message));
  55812. };
  55813. exports.create = function (statusCode, message, data) {
  55814. return internals.create(statusCode, message, data, exports.create);
  55815. };
  55816. internals.create = function (statusCode, message, data, ctor) {
  55817. if (message instanceof Error) {
  55818. if (data) {
  55819. message.data = data;
  55820. }
  55821. return exports.wrap(message, statusCode);
  55822. }
  55823. const error = new Error(message ? message : undefined); // Avoids settings null message
  55824. Error.captureStackTrace(error, ctor); // Filter the stack to our external API
  55825. error.data = data || null;
  55826. internals.initialize(error, statusCode);
  55827. error.typeof = ctor;
  55828. return error;
  55829. };
  55830. internals.initialize = function (error, statusCode, message) {
  55831. const numberCode = parseInt(statusCode, 10);
  55832. Hoek.assert(!isNaN(numberCode) && numberCode >= 400, 'First argument must be a number (400+):', statusCode);
  55833. error.isBoom = true;
  55834. error.isServer = numberCode >= 500;
  55835. if (!error.hasOwnProperty('data')) {
  55836. error.data = null;
  55837. }
  55838. error.output = {
  55839. statusCode: numberCode,
  55840. payload: {},
  55841. headers: {}
  55842. };
  55843. error.reformat = internals.reformat;
  55844. if (!message &&
  55845. !error.message) {
  55846. error.reformat();
  55847. message = error.output.payload.error;
  55848. }
  55849. if (message) {
  55850. error.message = (message + (error.message ? ': ' + error.message : ''));
  55851. error.output.payload.message = error.message;
  55852. }
  55853. error.reformat();
  55854. return error;
  55855. };
  55856. internals.reformat = function () {
  55857. this.output.payload.statusCode = this.output.statusCode;
  55858. this.output.payload.error = internals.STATUS_CODES[this.output.statusCode] || 'Unknown';
  55859. if (this.output.statusCode === 500) {
  55860. this.output.payload.message = 'An internal server error occurred'; // Hide actual error from user
  55861. }
  55862. else if (this.message) {
  55863. this.output.payload.message = this.message;
  55864. }
  55865. };
  55866. // 4xx Client Errors
  55867. exports.badRequest = function (message, data) {
  55868. return internals.create(400, message, data, exports.badRequest);
  55869. };
  55870. exports.unauthorized = function (message, scheme, attributes) { // Or function (message, wwwAuthenticate[])
  55871. const err = internals.create(401, message, undefined, exports.unauthorized);
  55872. if (!scheme) {
  55873. return err;
  55874. }
  55875. let wwwAuthenticate = '';
  55876. if (typeof scheme === 'string') {
  55877. // function (message, scheme, attributes)
  55878. wwwAuthenticate = scheme;
  55879. if (attributes || message) {
  55880. err.output.payload.attributes = {};
  55881. }
  55882. if (attributes) {
  55883. if (typeof attributes === 'string') {
  55884. wwwAuthenticate = wwwAuthenticate + ' ' + Hoek.escapeHeaderAttribute(attributes);
  55885. err.output.payload.attributes = attributes;
  55886. }
  55887. else {
  55888. const names = Object.keys(attributes);
  55889. for (let i = 0; i < names.length; ++i) {
  55890. const name = names[i];
  55891. if (i) {
  55892. wwwAuthenticate = wwwAuthenticate + ',';
  55893. }
  55894. let value = attributes[name];
  55895. if (value === null ||
  55896. value === undefined) { // Value can be zero
  55897. value = '';
  55898. }
  55899. wwwAuthenticate = wwwAuthenticate + ' ' + name + '="' + Hoek.escapeHeaderAttribute(value.toString()) + '"';
  55900. err.output.payload.attributes[name] = value;
  55901. }
  55902. }
  55903. }
  55904. if (message) {
  55905. if (attributes) {
  55906. wwwAuthenticate = wwwAuthenticate + ',';
  55907. }
  55908. wwwAuthenticate = wwwAuthenticate + ' error="' + Hoek.escapeHeaderAttribute(message) + '"';
  55909. err.output.payload.attributes.error = message;
  55910. }
  55911. else {
  55912. err.isMissing = true;
  55913. }
  55914. }
  55915. else {
  55916. // function (message, wwwAuthenticate[])
  55917. const wwwArray = scheme;
  55918. for (let i = 0; i < wwwArray.length; ++i) {
  55919. if (i) {
  55920. wwwAuthenticate = wwwAuthenticate + ', ';
  55921. }
  55922. wwwAuthenticate = wwwAuthenticate + wwwArray[i];
  55923. }
  55924. }
  55925. err.output.headers['WWW-Authenticate'] = wwwAuthenticate;
  55926. return err;
  55927. };
  55928. exports.paymentRequired = function (message, data) {
  55929. return internals.create(402, message, data, exports.paymentRequired);
  55930. };
  55931. exports.forbidden = function (message, data) {
  55932. return internals.create(403, message, data, exports.forbidden);
  55933. };
  55934. exports.notFound = function (message, data) {
  55935. return internals.create(404, message, data, exports.notFound);
  55936. };
  55937. exports.methodNotAllowed = function (message, data, allow) {
  55938. const err = internals.create(405, message, data, exports.methodNotAllowed);
  55939. if (typeof allow === 'string') {
  55940. allow = [allow];
  55941. }
  55942. if (Array.isArray(allow)) {
  55943. err.output.headers.Allow = allow.join(', ');
  55944. }
  55945. return err;
  55946. };
  55947. exports.notAcceptable = function (message, data) {
  55948. return internals.create(406, message, data, exports.notAcceptable);
  55949. };
  55950. exports.proxyAuthRequired = function (message, data) {
  55951. return internals.create(407, message, data, exports.proxyAuthRequired);
  55952. };
  55953. exports.clientTimeout = function (message, data) {
  55954. return internals.create(408, message, data, exports.clientTimeout);
  55955. };
  55956. exports.conflict = function (message, data) {
  55957. return internals.create(409, message, data, exports.conflict);
  55958. };
  55959. exports.resourceGone = function (message, data) {
  55960. return internals.create(410, message, data, exports.resourceGone);
  55961. };
  55962. exports.lengthRequired = function (message, data) {
  55963. return internals.create(411, message, data, exports.lengthRequired);
  55964. };
  55965. exports.preconditionFailed = function (message, data) {
  55966. return internals.create(412, message, data, exports.preconditionFailed);
  55967. };
  55968. exports.entityTooLarge = function (message, data) {
  55969. return internals.create(413, message, data, exports.entityTooLarge);
  55970. };
  55971. exports.uriTooLong = function (message, data) {
  55972. return internals.create(414, message, data, exports.uriTooLong);
  55973. };
  55974. exports.unsupportedMediaType = function (message, data) {
  55975. return internals.create(415, message, data, exports.unsupportedMediaType);
  55976. };
  55977. exports.rangeNotSatisfiable = function (message, data) {
  55978. return internals.create(416, message, data, exports.rangeNotSatisfiable);
  55979. };
  55980. exports.expectationFailed = function (message, data) {
  55981. return internals.create(417, message, data, exports.expectationFailed);
  55982. };
  55983. exports.teapot = function (message, data) {
  55984. return internals.create(418, message, data, exports.teapot);
  55985. };
  55986. exports.badData = function (message, data) {
  55987. return internals.create(422, message, data, exports.badData);
  55988. };
  55989. exports.locked = function (message, data) {
  55990. return internals.create(423, message, data, exports.locked);
  55991. };
  55992. exports.preconditionRequired = function (message, data) {
  55993. return internals.create(428, message, data, exports.preconditionRequired);
  55994. };
  55995. exports.tooManyRequests = function (message, data) {
  55996. return internals.create(429, message, data, exports.tooManyRequests);
  55997. };
  55998. exports.illegal = function (message, data) {
  55999. return internals.create(451, message, data, exports.illegal);
  56000. };
  56001. // 5xx Server Errors
  56002. exports.internal = function (message, data, statusCode) {
  56003. return internals.serverError(message, data, statusCode, exports.internal);
  56004. };
  56005. internals.serverError = function (message, data, statusCode, ctor) {
  56006. if (data instanceof Error &&
  56007. !data.isBoom) {
  56008. return exports.wrap(data, statusCode, message);
  56009. }
  56010. const error = internals.create(statusCode || 500, message, undefined, ctor);
  56011. error.data = data;
  56012. return error;
  56013. };
  56014. exports.notImplemented = function (message, data) {
  56015. return internals.serverError(message, data, 501, exports.notImplemented);
  56016. };
  56017. exports.badGateway = function (message, data) {
  56018. return internals.serverError(message, data, 502, exports.badGateway);
  56019. };
  56020. exports.serverUnavailable = function (message, data) {
  56021. return internals.serverError(message, data, 503, exports.serverUnavailable);
  56022. };
  56023. exports.gatewayTimeout = function (message, data) {
  56024. return internals.serverError(message, data, 504, exports.gatewayTimeout);
  56025. };
  56026. exports.badImplementation = function (message, data) {
  56027. const err = internals.serverError(message, data, 500, exports.badImplementation);
  56028. err.isDeveloperError = true;
  56029. return err;
  56030. };
  56031. /***/ }),
  56032. /* 538 */
  56033. /***/ (function(module, exports) {
  56034. module.exports = {"_from":"hawk@~6.0.2","_id":"hawk@6.0.2","_inBundle":false,"_integrity":"sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==","_location":"/hawk","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"hawk@~6.0.2","name":"hawk","escapedName":"hawk","rawSpec":"~6.0.2","saveSpec":null,"fetchSpec":"~6.0.2"},"_requiredBy":["/request"],"_resolved":"https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz","_shasum":"af4d914eb065f9b5ce4d9d11c1cb2126eecc3038","_spec":"hawk@~6.0.2","_where":"/Users/dje/Documents/devs_perso/cozy/cozy-konnector-template/node_modules/request","author":{"name":"Eran Hammer","email":"eran@hammer.io","url":"http://hueniverse.com"},"babel":{"presets":["es2015"]},"browser":"dist/browser.js","bugs":{"url":"https://github.com/hueniverse/hawk/issues"},"bundleDependencies":false,"dependencies":{"boom":"4.x.x","cryptiles":"3.x.x","hoek":"4.x.x","sntp":"2.x.x"},"deprecated":false,"description":"HTTP Hawk Authentication Scheme","devDependencies":{"babel-cli":"^6.1.2","babel-preset-es2015":"^6.1.2","code":"4.x.x","lab":"14.x.x"},"engines":{"node":">=4.5.0"},"homepage":"https://github.com/hueniverse/hawk#readme","keywords":["http","authentication","scheme","hawk"],"license":"BSD-3-Clause","main":"lib/index.js","name":"hawk","repository":{"type":"git","url":"git://github.com/hueniverse/hawk.git"},"scripts":{"build-client":"mkdir -p dist; babel lib/browser.js --out-file dist/browser.js","prepublish":"npm run-script build-client","test":"lab -a code -t 100 -L","test-cov-html":"lab -a code -r html -o coverage.html"},"version":"6.0.2"}
  56035. /***/ }),
  56036. /* 539 */
  56037. /***/ (function(module, exports, __webpack_require__) {
  56038. "use strict";
  56039. // Load modules
  56040. const Url = __webpack_require__(14);
  56041. const Hoek = __webpack_require__(82);
  56042. const Cryptiles = __webpack_require__(345);
  56043. const Crypto = __webpack_require__(145);
  56044. const Utils = __webpack_require__(105);
  56045. // Declare internals
  56046. const internals = {};
  56047. // Generate an Authorization header for a given request
  56048. /*
  56049. uri: 'http://example.com/resource?a=b' or object from Url.parse()
  56050. method: HTTP verb (e.g. 'GET', 'POST')
  56051. options: {
  56052. // Required
  56053. credentials: {
  56054. id: 'dh37fgj492je',
  56055. key: 'aoijedoaijsdlaksjdl',
  56056. algorithm: 'sha256' // 'sha1', 'sha256'
  56057. },
  56058. // Optional
  56059. ext: 'application-specific', // Application specific data sent via the ext attribute
  56060. timestamp: Date.now() / 1000, // A pre-calculated timestamp in seconds
  56061. nonce: '2334f34f', // A pre-generated nonce
  56062. localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided)
  56063. payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided)
  56064. contentType: 'application/json', // Payload content-type (ignored if hash provided)
  56065. hash: 'U4MKKSmiVxk37JCCrAVIjV=', // Pre-calculated payload hash
  56066. app: '24s23423f34dx', // Oz application id
  56067. dlg: '234sz34tww3sd' // Oz delegated-by application id
  56068. }
  56069. */
  56070. exports.header = function (uri, method, options) {
  56071. const result = {
  56072. field: '',
  56073. artifacts: {}
  56074. };
  56075. // Validate inputs
  56076. if (!uri || (typeof uri !== 'string' && typeof uri !== 'object') ||
  56077. !method || typeof method !== 'string' ||
  56078. !options || typeof options !== 'object') {
  56079. result.err = 'Invalid argument type';
  56080. return result;
  56081. }
  56082. // Application time
  56083. const timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
  56084. // Validate credentials
  56085. const credentials = options.credentials;
  56086. if (!credentials ||
  56087. !credentials.id ||
  56088. !credentials.key ||
  56089. !credentials.algorithm) {
  56090. result.err = 'Invalid credential object';
  56091. return result;
  56092. }
  56093. if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
  56094. result.err = 'Unknown algorithm';
  56095. return result;
  56096. }
  56097. // Parse URI
  56098. if (typeof uri === 'string') {
  56099. uri = Url.parse(uri);
  56100. }
  56101. // Calculate signature
  56102. const artifacts = {
  56103. ts: timestamp,
  56104. nonce: options.nonce || Cryptiles.randomString(6),
  56105. method,
  56106. resource: uri.pathname + (uri.search || ''), // Maintain trailing '?'
  56107. host: uri.hostname,
  56108. port: uri.port || (uri.protocol === 'http:' ? 80 : 443),
  56109. hash: options.hash,
  56110. ext: options.ext,
  56111. app: options.app,
  56112. dlg: options.dlg
  56113. };
  56114. result.artifacts = artifacts;
  56115. // Calculate payload hash
  56116. if (!artifacts.hash &&
  56117. (options.payload || options.payload === '')) {
  56118. artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
  56119. }
  56120. const mac = Crypto.calculateMac('header', credentials, artifacts);
  56121. // Construct header
  56122. const hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed
  56123. let header = 'Hawk id="' + credentials.id +
  56124. '", ts="' + artifacts.ts +
  56125. '", nonce="' + artifacts.nonce +
  56126. (artifacts.hash ? '", hash="' + artifacts.hash : '') +
  56127. (hasExt ? '", ext="' + Hoek.escapeHeaderAttribute(artifacts.ext) : '') +
  56128. '", mac="' + mac + '"';
  56129. if (artifacts.app) {
  56130. header = header + ', app="' + artifacts.app +
  56131. (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"';
  56132. }
  56133. result.field = header;
  56134. return result;
  56135. };
  56136. // Validate server response
  56137. /*
  56138. res: node's response object
  56139. artifacts: object received from header().artifacts
  56140. options: {
  56141. payload: optional payload received
  56142. required: specifies if a Server-Authorization header is required. Defaults to 'false'
  56143. }
  56144. */
  56145. exports.authenticate = function (res, credentials, artifacts, options, callback) {
  56146. artifacts = Hoek.clone(artifacts);
  56147. options = options || {};
  56148. let wwwAttributes = null;
  56149. let serverAuthAttributes = null;
  56150. const finalize = function (err) {
  56151. if (callback) {
  56152. const headers = {
  56153. 'www-authenticate': wwwAttributes,
  56154. 'server-authorization': serverAuthAttributes
  56155. };
  56156. return callback(err, headers);
  56157. }
  56158. return !err;
  56159. };
  56160. if (res.headers['www-authenticate']) {
  56161. // Parse HTTP WWW-Authenticate header
  56162. wwwAttributes = Utils.parseAuthorizationHeader(res.headers['www-authenticate'], ['ts', 'tsm', 'error']);
  56163. if (wwwAttributes instanceof Error) {
  56164. wwwAttributes = null;
  56165. return finalize(new Error('Invalid WWW-Authenticate header'));
  56166. }
  56167. // Validate server timestamp (not used to update clock since it is done via the SNPT client)
  56168. if (wwwAttributes.ts) {
  56169. const tsm = Crypto.calculateTsMac(wwwAttributes.ts, credentials);
  56170. if (tsm !== wwwAttributes.tsm) {
  56171. return finalize(new Error('Invalid server timestamp hash'));
  56172. }
  56173. }
  56174. }
  56175. // Parse HTTP Server-Authorization header
  56176. if (!res.headers['server-authorization'] &&
  56177. !options.required) {
  56178. return finalize();
  56179. }
  56180. serverAuthAttributes = Utils.parseAuthorizationHeader(res.headers['server-authorization'], ['mac', 'ext', 'hash']);
  56181. if (serverAuthAttributes instanceof Error) {
  56182. serverAuthAttributes = null;
  56183. return finalize(new Error('Invalid Server-Authorization header'));
  56184. }
  56185. artifacts.ext = serverAuthAttributes.ext;
  56186. artifacts.hash = serverAuthAttributes.hash;
  56187. const mac = Crypto.calculateMac('response', credentials, artifacts);
  56188. if (mac !== serverAuthAttributes.mac) {
  56189. return finalize(new Error('Bad response mac'));
  56190. }
  56191. if (!options.payload &&
  56192. options.payload !== '') {
  56193. return finalize();
  56194. }
  56195. if (!serverAuthAttributes.hash) {
  56196. return finalize(new Error('Missing response hash attribute'));
  56197. }
  56198. const calculatedHash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, res.headers['content-type']);
  56199. if (calculatedHash !== serverAuthAttributes.hash) {
  56200. return finalize(new Error('Bad response payload mac'));
  56201. }
  56202. return finalize();
  56203. };
  56204. // Generate a bewit value for a given URI
  56205. /*
  56206. uri: 'http://example.com/resource?a=b' or object from Url.parse()
  56207. options: {
  56208. // Required
  56209. credentials: {
  56210. id: 'dh37fgj492je',
  56211. key: 'aoijedoaijsdlaksjdl',
  56212. algorithm: 'sha256' // 'sha1', 'sha256'
  56213. },
  56214. ttlSec: 60 * 60, // TTL in seconds
  56215. // Optional
  56216. ext: 'application-specific', // Application specific data sent via the ext attribute
  56217. localtimeOffsetMsec: 400 // Time offset to sync with server time
  56218. };
  56219. */
  56220. exports.getBewit = function (uri, options) {
  56221. // Validate inputs
  56222. if (!uri ||
  56223. (typeof uri !== 'string' && typeof uri !== 'object') ||
  56224. !options ||
  56225. typeof options !== 'object' ||
  56226. !options.ttlSec) {
  56227. return '';
  56228. }
  56229. options.ext = (options.ext === null || options.ext === undefined ? '' : options.ext); // Zero is valid value
  56230. // Application time
  56231. const now = Utils.now(options.localtimeOffsetMsec);
  56232. // Validate credentials
  56233. const credentials = options.credentials;
  56234. if (!credentials ||
  56235. !credentials.id ||
  56236. !credentials.key ||
  56237. !credentials.algorithm) {
  56238. return '';
  56239. }
  56240. if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
  56241. return '';
  56242. }
  56243. // Parse URI
  56244. if (typeof uri === 'string') {
  56245. uri = Url.parse(uri);
  56246. }
  56247. // Calculate signature
  56248. const exp = Math.floor(now / 1000) + options.ttlSec;
  56249. const mac = Crypto.calculateMac('bewit', credentials, {
  56250. ts: exp,
  56251. nonce: '',
  56252. method: 'GET',
  56253. resource: uri.pathname + (uri.search || ''), // Maintain trailing '?'
  56254. host: uri.hostname,
  56255. port: uri.port || (uri.protocol === 'http:' ? 80 : 443),
  56256. ext: options.ext
  56257. });
  56258. // Construct bewit: id\exp\mac\ext
  56259. const bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext;
  56260. return Hoek.base64urlEncode(bewit);
  56261. };
  56262. // Generate an authorization string for a message
  56263. /*
  56264. host: 'example.com',
  56265. port: 8000,
  56266. message: '{"some":"payload"}', // UTF-8 encoded string for body hash generation
  56267. options: {
  56268. // Required
  56269. credentials: {
  56270. id: 'dh37fgj492je',
  56271. key: 'aoijedoaijsdlaksjdl',
  56272. algorithm: 'sha256' // 'sha1', 'sha256'
  56273. },
  56274. // Optional
  56275. timestamp: Date.now() / 1000, // A pre-calculated timestamp in seconds
  56276. nonce: '2334f34f', // A pre-generated nonce
  56277. localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided)
  56278. }
  56279. */
  56280. exports.message = function (host, port, message, options) {
  56281. // Validate inputs
  56282. if (!host || typeof host !== 'string' ||
  56283. !port || typeof port !== 'number' ||
  56284. message === null || message === undefined || typeof message !== 'string' ||
  56285. !options || typeof options !== 'object') {
  56286. return null;
  56287. }
  56288. // Application time
  56289. const timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
  56290. // Validate credentials
  56291. const credentials = options.credentials;
  56292. if (!credentials ||
  56293. !credentials.id ||
  56294. !credentials.key ||
  56295. !credentials.algorithm) {
  56296. // Invalid credential object
  56297. return null;
  56298. }
  56299. if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
  56300. return null;
  56301. }
  56302. // Calculate signature
  56303. const artifacts = {
  56304. ts: timestamp,
  56305. nonce: options.nonce || Cryptiles.randomString(6),
  56306. host,
  56307. port,
  56308. hash: Crypto.calculatePayloadHash(message, credentials.algorithm)
  56309. };
  56310. // Construct authorization
  56311. const result = {
  56312. id: credentials.id,
  56313. ts: artifacts.ts,
  56314. nonce: artifacts.nonce,
  56315. hash: artifacts.hash,
  56316. mac: Crypto.calculateMac('message', credentials, artifacts)
  56317. };
  56318. return result;
  56319. };
  56320. /***/ }),
  56321. /* 540 */
  56322. /***/ (function(module, exports, __webpack_require__) {
  56323. /*!
  56324. * Copyright 2010 LearnBoost <dev@learnboost.com>
  56325. *
  56326. * Licensed under the Apache License, Version 2.0 (the "License");
  56327. * you may not use this file except in compliance with the License.
  56328. * You may obtain a copy of the License at
  56329. *
  56330. * http://www.apache.org/licenses/LICENSE-2.0
  56331. *
  56332. * Unless required by applicable law or agreed to in writing, software
  56333. * distributed under the License is distributed on an "AS IS" BASIS,
  56334. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  56335. * See the License for the specific language governing permissions and
  56336. * limitations under the License.
  56337. */
  56338. /**
  56339. * Module dependencies.
  56340. */
  56341. var crypto = __webpack_require__(5)
  56342. , parse = __webpack_require__(14).parse
  56343. ;
  56344. /**
  56345. * Valid keys.
  56346. */
  56347. var keys =
  56348. [ 'acl'
  56349. , 'location'
  56350. , 'logging'
  56351. , 'notification'
  56352. , 'partNumber'
  56353. , 'policy'
  56354. , 'requestPayment'
  56355. , 'torrent'
  56356. , 'uploadId'
  56357. , 'uploads'
  56358. , 'versionId'
  56359. , 'versioning'
  56360. , 'versions'
  56361. , 'website'
  56362. ]
  56363. /**
  56364. * Return an "Authorization" header value with the given `options`
  56365. * in the form of "AWS <key>:<signature>"
  56366. *
  56367. * @param {Object} options
  56368. * @return {String}
  56369. * @api private
  56370. */
  56371. function authorization (options) {
  56372. return 'AWS ' + options.key + ':' + sign(options)
  56373. }
  56374. module.exports = authorization
  56375. module.exports.authorization = authorization
  56376. /**
  56377. * Simple HMAC-SHA1 Wrapper
  56378. *
  56379. * @param {Object} options
  56380. * @return {String}
  56381. * @api private
  56382. */
  56383. function hmacSha1 (options) {
  56384. return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64')
  56385. }
  56386. module.exports.hmacSha1 = hmacSha1
  56387. /**
  56388. * Create a base64 sha1 HMAC for `options`.
  56389. *
  56390. * @param {Object} options
  56391. * @return {String}
  56392. * @api private
  56393. */
  56394. function sign (options) {
  56395. options.message = stringToSign(options)
  56396. return hmacSha1(options)
  56397. }
  56398. module.exports.sign = sign
  56399. /**
  56400. * Create a base64 sha1 HMAC for `options`.
  56401. *
  56402. * Specifically to be used with S3 presigned URLs
  56403. *
  56404. * @param {Object} options
  56405. * @return {String}
  56406. * @api private
  56407. */
  56408. function signQuery (options) {
  56409. options.message = queryStringToSign(options)
  56410. return hmacSha1(options)
  56411. }
  56412. module.exports.signQuery= signQuery
  56413. /**
  56414. * Return a string for sign() with the given `options`.
  56415. *
  56416. * Spec:
  56417. *
  56418. * <verb>\n
  56419. * <md5>\n
  56420. * <content-type>\n
  56421. * <date>\n
  56422. * [headers\n]
  56423. * <resource>
  56424. *
  56425. * @param {Object} options
  56426. * @return {String}
  56427. * @api private
  56428. */
  56429. function stringToSign (options) {
  56430. var headers = options.amazonHeaders || ''
  56431. if (headers) headers += '\n'
  56432. var r =
  56433. [ options.verb
  56434. , options.md5
  56435. , options.contentType
  56436. , options.date ? options.date.toUTCString() : ''
  56437. , headers + options.resource
  56438. ]
  56439. return r.join('\n')
  56440. }
  56441. module.exports.stringToSign = stringToSign
  56442. /**
  56443. * Return a string for sign() with the given `options`, but is meant exclusively
  56444. * for S3 presigned URLs
  56445. *
  56446. * Spec:
  56447. *
  56448. * <date>\n
  56449. * <resource>
  56450. *
  56451. * @param {Object} options
  56452. * @return {String}
  56453. * @api private
  56454. */
  56455. function queryStringToSign (options){
  56456. return 'GET\n\n\n' + options.date + '\n' + options.resource
  56457. }
  56458. module.exports.queryStringToSign = queryStringToSign
  56459. /**
  56460. * Perform the following:
  56461. *
  56462. * - ignore non-amazon headers
  56463. * - lowercase fields
  56464. * - sort lexicographically
  56465. * - trim whitespace between ":"
  56466. * - join with newline
  56467. *
  56468. * @param {Object} headers
  56469. * @return {String}
  56470. * @api private
  56471. */
  56472. function canonicalizeHeaders (headers) {
  56473. var buf = []
  56474. , fields = Object.keys(headers)
  56475. ;
  56476. for (var i = 0, len = fields.length; i < len; ++i) {
  56477. var field = fields[i]
  56478. , val = headers[field]
  56479. , field = field.toLowerCase()
  56480. ;
  56481. if (0 !== field.indexOf('x-amz')) continue
  56482. buf.push(field + ':' + val)
  56483. }
  56484. return buf.sort().join('\n')
  56485. }
  56486. module.exports.canonicalizeHeaders = canonicalizeHeaders
  56487. /**
  56488. * Perform the following:
  56489. *
  56490. * - ignore non sub-resources
  56491. * - sort lexicographically
  56492. *
  56493. * @param {String} resource
  56494. * @return {String}
  56495. * @api private
  56496. */
  56497. function canonicalizeResource (resource) {
  56498. var url = parse(resource, true)
  56499. , path = url.pathname
  56500. , buf = []
  56501. ;
  56502. Object.keys(url.query).forEach(function(key){
  56503. if (!~keys.indexOf(key)) return
  56504. var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key])
  56505. buf.push(key + val)
  56506. })
  56507. return path + (buf.length ? '?' + buf.sort().join('&') : '')
  56508. }
  56509. module.exports.canonicalizeResource = canonicalizeResource
  56510. /***/ }),
  56511. /* 541 */
  56512. /***/ (function(module, exports, __webpack_require__) {
  56513. var aws4 = exports,
  56514. url = __webpack_require__(14),
  56515. querystring = __webpack_require__(106),
  56516. crypto = __webpack_require__(5),
  56517. lru = __webpack_require__(542),
  56518. credentialsCache = lru(1000)
  56519. // http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html
  56520. function hmac(key, string, encoding) {
  56521. return crypto.createHmac('sha256', key).update(string, 'utf8').digest(encoding)
  56522. }
  56523. function hash(string, encoding) {
  56524. return crypto.createHash('sha256').update(string, 'utf8').digest(encoding)
  56525. }
  56526. // This function assumes the string has already been percent encoded
  56527. function encodeRfc3986(urlEncodedString) {
  56528. return urlEncodedString.replace(/[!'()*]/g, function(c) {
  56529. return '%' + c.charCodeAt(0).toString(16).toUpperCase()
  56530. })
  56531. }
  56532. // request: { path | body, [host], [method], [headers], [service], [region] }
  56533. // credentials: { accessKeyId, secretAccessKey, [sessionToken] }
  56534. function RequestSigner(request, credentials) {
  56535. if (typeof request === 'string') request = url.parse(request)
  56536. var headers = request.headers = (request.headers || {}),
  56537. hostParts = this.matchHost(request.hostname || request.host || headers.Host || headers.host)
  56538. this.request = request
  56539. this.credentials = credentials || this.defaultCredentials()
  56540. this.service = request.service || hostParts[0] || ''
  56541. this.region = request.region || hostParts[1] || 'us-east-1'
  56542. // SES uses a different domain from the service name
  56543. if (this.service === 'email') this.service = 'ses'
  56544. if (!request.method && request.body)
  56545. request.method = 'POST'
  56546. if (!headers.Host && !headers.host) {
  56547. headers.Host = request.hostname || request.host || this.createHost()
  56548. // If a port is specified explicitly, use it as is
  56549. if (request.port)
  56550. headers.Host += ':' + request.port
  56551. }
  56552. if (!request.hostname && !request.host)
  56553. request.hostname = headers.Host || headers.host
  56554. this.isCodeCommitGit = this.service === 'codecommit' && request.method === 'GIT'
  56555. }
  56556. RequestSigner.prototype.matchHost = function(host) {
  56557. var match = (host || '').match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com$/)
  56558. var hostParts = (match || []).slice(1, 3)
  56559. // ES's hostParts are sometimes the other way round, if the value that is expected
  56560. // to be region equals ‘es’ switch them back
  56561. // e.g. search-cluster-name-aaaa00aaaa0aaa0aaaaaaa0aaa.us-east-1.es.amazonaws.com
  56562. if (hostParts[1] === 'es')
  56563. hostParts = hostParts.reverse()
  56564. return hostParts
  56565. }
  56566. // http://docs.aws.amazon.com/general/latest/gr/rande.html
  56567. RequestSigner.prototype.isSingleRegion = function() {
  56568. // Special case for S3 and SimpleDB in us-east-1
  56569. if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true
  56570. return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts']
  56571. .indexOf(this.service) >= 0
  56572. }
  56573. RequestSigner.prototype.createHost = function() {
  56574. var region = this.isSingleRegion() ? '' :
  56575. (this.service === 's3' && this.region !== 'us-east-1' ? '-' : '.') + this.region,
  56576. service = this.service === 'ses' ? 'email' : this.service
  56577. return service + region + '.amazonaws.com'
  56578. }
  56579. RequestSigner.prototype.prepareRequest = function() {
  56580. this.parsePath()
  56581. var request = this.request, headers = request.headers, query
  56582. if (request.signQuery) {
  56583. this.parsedPath.query = query = this.parsedPath.query || {}
  56584. if (this.credentials.sessionToken)
  56585. query['X-Amz-Security-Token'] = this.credentials.sessionToken
  56586. if (this.service === 's3' && !query['X-Amz-Expires'])
  56587. query['X-Amz-Expires'] = 86400
  56588. if (query['X-Amz-Date'])
  56589. this.datetime = query['X-Amz-Date']
  56590. else
  56591. query['X-Amz-Date'] = this.getDateTime()
  56592. query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256'
  56593. query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString()
  56594. query['X-Amz-SignedHeaders'] = this.signedHeaders()
  56595. } else {
  56596. if (!request.doNotModifyHeaders && !this.isCodeCommitGit) {
  56597. if (request.body && !headers['Content-Type'] && !headers['content-type'])
  56598. headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8'
  56599. if (request.body && !headers['Content-Length'] && !headers['content-length'])
  56600. headers['Content-Length'] = Buffer.byteLength(request.body)
  56601. if (this.credentials.sessionToken && !headers['X-Amz-Security-Token'] && !headers['x-amz-security-token'])
  56602. headers['X-Amz-Security-Token'] = this.credentials.sessionToken
  56603. if (this.service === 's3' && !headers['X-Amz-Content-Sha256'] && !headers['x-amz-content-sha256'])
  56604. headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex')
  56605. if (headers['X-Amz-Date'] || headers['x-amz-date'])
  56606. this.datetime = headers['X-Amz-Date'] || headers['x-amz-date']
  56607. else
  56608. headers['X-Amz-Date'] = this.getDateTime()
  56609. }
  56610. delete headers.Authorization
  56611. delete headers.authorization
  56612. }
  56613. }
  56614. RequestSigner.prototype.sign = function() {
  56615. if (!this.parsedPath) this.prepareRequest()
  56616. if (this.request.signQuery) {
  56617. this.parsedPath.query['X-Amz-Signature'] = this.signature()
  56618. } else {
  56619. this.request.headers.Authorization = this.authHeader()
  56620. }
  56621. this.request.path = this.formatPath()
  56622. return this.request
  56623. }
  56624. RequestSigner.prototype.getDateTime = function() {
  56625. if (!this.datetime) {
  56626. var headers = this.request.headers,
  56627. date = new Date(headers.Date || headers.date || new Date)
  56628. this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '')
  56629. // Remove the trailing 'Z' on the timestamp string for CodeCommit git access
  56630. if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1)
  56631. }
  56632. return this.datetime
  56633. }
  56634. RequestSigner.prototype.getDate = function() {
  56635. return this.getDateTime().substr(0, 8)
  56636. }
  56637. RequestSigner.prototype.authHeader = function() {
  56638. return [
  56639. 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(),
  56640. 'SignedHeaders=' + this.signedHeaders(),
  56641. 'Signature=' + this.signature(),
  56642. ].join(', ')
  56643. }
  56644. RequestSigner.prototype.signature = function() {
  56645. var date = this.getDate(),
  56646. cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(),
  56647. kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey)
  56648. if (!kCredentials) {
  56649. kDate = hmac('AWS4' + this.credentials.secretAccessKey, date)
  56650. kRegion = hmac(kDate, this.region)
  56651. kService = hmac(kRegion, this.service)
  56652. kCredentials = hmac(kService, 'aws4_request')
  56653. credentialsCache.set(cacheKey, kCredentials)
  56654. }
  56655. return hmac(kCredentials, this.stringToSign(), 'hex')
  56656. }
  56657. RequestSigner.prototype.stringToSign = function() {
  56658. return [
  56659. 'AWS4-HMAC-SHA256',
  56660. this.getDateTime(),
  56661. this.credentialString(),
  56662. hash(this.canonicalString(), 'hex'),
  56663. ].join('\n')
  56664. }
  56665. RequestSigner.prototype.canonicalString = function() {
  56666. if (!this.parsedPath) this.prepareRequest()
  56667. var pathStr = this.parsedPath.path,
  56668. query = this.parsedPath.query,
  56669. headers = this.request.headers,
  56670. queryStr = '',
  56671. normalizePath = this.service !== 's3',
  56672. decodePath = this.service === 's3' || this.request.doNotEncodePath,
  56673. decodeSlashesInPath = this.service === 's3',
  56674. firstValOnly = this.service === 's3',
  56675. bodyHash
  56676. if (this.service === 's3' && this.request.signQuery) {
  56677. bodyHash = 'UNSIGNED-PAYLOAD'
  56678. } else if (this.isCodeCommitGit) {
  56679. bodyHash = ''
  56680. } else {
  56681. bodyHash = headers['X-Amz-Content-Sha256'] || headers['x-amz-content-sha256'] ||
  56682. hash(this.request.body || '', 'hex')
  56683. }
  56684. if (query) {
  56685. queryStr = encodeRfc3986(querystring.stringify(Object.keys(query).sort().reduce(function(obj, key) {
  56686. if (!key) return obj
  56687. obj[key] = !Array.isArray(query[key]) ? query[key] :
  56688. (firstValOnly ? query[key][0] : query[key].slice().sort())
  56689. return obj
  56690. }, {})))
  56691. }
  56692. if (pathStr !== '/') {
  56693. if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/')
  56694. pathStr = pathStr.split('/').reduce(function(path, piece) {
  56695. if (normalizePath && piece === '..') {
  56696. path.pop()
  56697. } else if (!normalizePath || piece !== '.') {
  56698. if (decodePath) piece = querystring.unescape(piece)
  56699. path.push(encodeRfc3986(querystring.escape(piece)))
  56700. }
  56701. return path
  56702. }, []).join('/')
  56703. if (pathStr[0] !== '/') pathStr = '/' + pathStr
  56704. if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/')
  56705. }
  56706. return [
  56707. this.request.method || 'GET',
  56708. pathStr,
  56709. queryStr,
  56710. this.canonicalHeaders() + '\n',
  56711. this.signedHeaders(),
  56712. bodyHash,
  56713. ].join('\n')
  56714. }
  56715. RequestSigner.prototype.canonicalHeaders = function() {
  56716. var headers = this.request.headers
  56717. function trimAll(header) {
  56718. return header.toString().trim().replace(/\s+/g, ' ')
  56719. }
  56720. return Object.keys(headers)
  56721. .sort(function(a, b) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1 })
  56722. .map(function(key) { return key.toLowerCase() + ':' + trimAll(headers[key]) })
  56723. .join('\n')
  56724. }
  56725. RequestSigner.prototype.signedHeaders = function() {
  56726. return Object.keys(this.request.headers)
  56727. .map(function(key) { return key.toLowerCase() })
  56728. .sort()
  56729. .join(';')
  56730. }
  56731. RequestSigner.prototype.credentialString = function() {
  56732. return [
  56733. this.getDate(),
  56734. this.region,
  56735. this.service,
  56736. 'aws4_request',
  56737. ].join('/')
  56738. }
  56739. RequestSigner.prototype.defaultCredentials = function() {
  56740. var env = process.env
  56741. return {
  56742. accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY,
  56743. secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY,
  56744. sessionToken: env.AWS_SESSION_TOKEN,
  56745. }
  56746. }
  56747. RequestSigner.prototype.parsePath = function() {
  56748. var path = this.request.path || '/',
  56749. queryIx = path.indexOf('?'),
  56750. query = null
  56751. if (queryIx >= 0) {
  56752. query = querystring.parse(path.slice(queryIx + 1))
  56753. path = path.slice(0, queryIx)
  56754. }
  56755. // S3 doesn't always encode characters > 127 correctly and
  56756. // all services don't encode characters > 255 correctly
  56757. // So if there are non-reserved chars (and it's not already all % encoded), just encode them all
  56758. if (/[^0-9A-Za-z!'()*\-._~%/]/.test(path)) {
  56759. path = path.split('/').map(function(piece) {
  56760. return querystring.escape(querystring.unescape(piece))
  56761. }).join('/')
  56762. }
  56763. this.parsedPath = {
  56764. path: path,
  56765. query: query,
  56766. }
  56767. }
  56768. RequestSigner.prototype.formatPath = function() {
  56769. var path = this.parsedPath.path,
  56770. query = this.parsedPath.query
  56771. if (!query) return path
  56772. // Services don't support empty query string keys
  56773. if (query[''] != null) delete query['']
  56774. return path + '?' + encodeRfc3986(querystring.stringify(query))
  56775. }
  56776. aws4.RequestSigner = RequestSigner
  56777. aws4.sign = function(request, credentials) {
  56778. return new RequestSigner(request, credentials).sign()
  56779. }
  56780. /***/ }),
  56781. /* 542 */
  56782. /***/ (function(module, exports) {
  56783. module.exports = function(size) {
  56784. return new LruCache(size)
  56785. }
  56786. function LruCache(size) {
  56787. this.capacity = size | 0
  56788. this.map = Object.create(null)
  56789. this.list = new DoublyLinkedList()
  56790. }
  56791. LruCache.prototype.get = function(key) {
  56792. var node = this.map[key]
  56793. if (node == null) return undefined
  56794. this.used(node)
  56795. return node.val
  56796. }
  56797. LruCache.prototype.set = function(key, val) {
  56798. var node = this.map[key]
  56799. if (node != null) {
  56800. node.val = val
  56801. } else {
  56802. if (!this.capacity) this.prune()
  56803. if (!this.capacity) return false
  56804. node = new DoublyLinkedNode(key, val)
  56805. this.map[key] = node
  56806. this.capacity--
  56807. }
  56808. this.used(node)
  56809. return true
  56810. }
  56811. LruCache.prototype.used = function(node) {
  56812. this.list.moveToFront(node)
  56813. }
  56814. LruCache.prototype.prune = function() {
  56815. var node = this.list.pop()
  56816. if (node != null) {
  56817. delete this.map[node.key]
  56818. this.capacity++
  56819. }
  56820. }
  56821. function DoublyLinkedList() {
  56822. this.firstNode = null
  56823. this.lastNode = null
  56824. }
  56825. DoublyLinkedList.prototype.moveToFront = function(node) {
  56826. if (this.firstNode == node) return
  56827. this.remove(node)
  56828. if (this.firstNode == null) {
  56829. this.firstNode = node
  56830. this.lastNode = node
  56831. node.prev = null
  56832. node.next = null
  56833. } else {
  56834. node.prev = null
  56835. node.next = this.firstNode
  56836. node.next.prev = node
  56837. this.firstNode = node
  56838. }
  56839. }
  56840. DoublyLinkedList.prototype.pop = function() {
  56841. var lastNode = this.lastNode
  56842. if (lastNode != null) {
  56843. this.remove(lastNode)
  56844. }
  56845. return lastNode
  56846. }
  56847. DoublyLinkedList.prototype.remove = function(node) {
  56848. if (this.firstNode == node) {
  56849. this.firstNode = node.next
  56850. } else if (node.prev != null) {
  56851. node.prev.next = node.next
  56852. }
  56853. if (this.lastNode == node) {
  56854. this.lastNode = node.prev
  56855. } else if (node.next != null) {
  56856. node.next.prev = node.prev
  56857. }
  56858. }
  56859. function DoublyLinkedNode(key, val) {
  56860. this.key = key
  56861. this.val = val
  56862. this.prev = null
  56863. this.next = null
  56864. }
  56865. /***/ }),
  56866. /* 543 */
  56867. /***/ (function(module, exports, __webpack_require__) {
  56868. // Copyright 2015 Joyent, Inc.
  56869. var parser = __webpack_require__(544);
  56870. var signer = __webpack_require__(551);
  56871. var verify = __webpack_require__(555);
  56872. var utils = __webpack_require__(107);
  56873. ///--- API
  56874. module.exports = {
  56875. parse: parser.parseRequest,
  56876. parseRequest: parser.parseRequest,
  56877. sign: signer.signRequest,
  56878. signRequest: signer.signRequest,
  56879. createSigner: signer.createSigner,
  56880. isSigner: signer.isSigner,
  56881. sshKeyToPEM: utils.sshKeyToPEM,
  56882. sshKeyFingerprint: utils.fingerprint,
  56883. pemToRsaSSHKey: utils.pemToRsaSSHKey,
  56884. verify: verify.verifySignature,
  56885. verifySignature: verify.verifySignature,
  56886. verifyHMAC: verify.verifyHMAC
  56887. };
  56888. /***/ }),
  56889. /* 544 */
  56890. /***/ (function(module, exports, __webpack_require__) {
  56891. // Copyright 2012 Joyent, Inc. All rights reserved.
  56892. var assert = __webpack_require__(3);
  56893. var util = __webpack_require__(2);
  56894. var utils = __webpack_require__(107);
  56895. ///--- Globals
  56896. var HASH_ALGOS = utils.HASH_ALGOS;
  56897. var PK_ALGOS = utils.PK_ALGOS;
  56898. var HttpSignatureError = utils.HttpSignatureError;
  56899. var InvalidAlgorithmError = utils.InvalidAlgorithmError;
  56900. var validateAlgorithm = utils.validateAlgorithm;
  56901. var State = {
  56902. New: 0,
  56903. Params: 1
  56904. };
  56905. var ParamsState = {
  56906. Name: 0,
  56907. Quote: 1,
  56908. Value: 2,
  56909. Comma: 3
  56910. };
  56911. ///--- Specific Errors
  56912. function ExpiredRequestError(message) {
  56913. HttpSignatureError.call(this, message, ExpiredRequestError);
  56914. }
  56915. util.inherits(ExpiredRequestError, HttpSignatureError);
  56916. function InvalidHeaderError(message) {
  56917. HttpSignatureError.call(this, message, InvalidHeaderError);
  56918. }
  56919. util.inherits(InvalidHeaderError, HttpSignatureError);
  56920. function InvalidParamsError(message) {
  56921. HttpSignatureError.call(this, message, InvalidParamsError);
  56922. }
  56923. util.inherits(InvalidParamsError, HttpSignatureError);
  56924. function MissingHeaderError(message) {
  56925. HttpSignatureError.call(this, message, MissingHeaderError);
  56926. }
  56927. util.inherits(MissingHeaderError, HttpSignatureError);
  56928. function StrictParsingError(message) {
  56929. HttpSignatureError.call(this, message, StrictParsingError);
  56930. }
  56931. util.inherits(StrictParsingError, HttpSignatureError);
  56932. ///--- Exported API
  56933. module.exports = {
  56934. /**
  56935. * Parses the 'Authorization' header out of an http.ServerRequest object.
  56936. *
  56937. * Note that this API will fully validate the Authorization header, and throw
  56938. * on any error. It will not however check the signature, or the keyId format
  56939. * as those are specific to your environment. You can use the options object
  56940. * to pass in extra constraints.
  56941. *
  56942. * As a response object you can expect this:
  56943. *
  56944. * {
  56945. * "scheme": "Signature",
  56946. * "params": {
  56947. * "keyId": "foo",
  56948. * "algorithm": "rsa-sha256",
  56949. * "headers": [
  56950. * "date" or "x-date",
  56951. * "digest"
  56952. * ],
  56953. * "signature": "base64"
  56954. * },
  56955. * "signingString": "ready to be passed to crypto.verify()"
  56956. * }
  56957. *
  56958. * @param {Object} request an http.ServerRequest.
  56959. * @param {Object} options an optional options object with:
  56960. * - clockSkew: allowed clock skew in seconds (default 300).
  56961. * - headers: required header names (def: date or x-date)
  56962. * - algorithms: algorithms to support (default: all).
  56963. * - strict: should enforce latest spec parsing
  56964. * (default: false).
  56965. * @return {Object} parsed out object (see above).
  56966. * @throws {TypeError} on invalid input.
  56967. * @throws {InvalidHeaderError} on an invalid Authorization header error.
  56968. * @throws {InvalidParamsError} if the params in the scheme are invalid.
  56969. * @throws {MissingHeaderError} if the params indicate a header not present,
  56970. * either in the request headers from the params,
  56971. * or not in the params from a required header
  56972. * in options.
  56973. * @throws {StrictParsingError} if old attributes are used in strict parsing
  56974. * mode.
  56975. * @throws {ExpiredRequestError} if the value of date or x-date exceeds skew.
  56976. */
  56977. parseRequest: function parseRequest(request, options) {
  56978. assert.object(request, 'request');
  56979. assert.object(request.headers, 'request.headers');
  56980. if (options === undefined) {
  56981. options = {};
  56982. }
  56983. if (options.headers === undefined) {
  56984. options.headers = [request.headers['x-date'] ? 'x-date' : 'date'];
  56985. }
  56986. assert.object(options, 'options');
  56987. assert.arrayOfString(options.headers, 'options.headers');
  56988. assert.optionalFinite(options.clockSkew, 'options.clockSkew');
  56989. var authzHeaderName = options.authorizationHeaderName || 'authorization';
  56990. if (!request.headers[authzHeaderName]) {
  56991. throw new MissingHeaderError('no ' + authzHeaderName + ' header ' +
  56992. 'present in the request');
  56993. }
  56994. options.clockSkew = options.clockSkew || 300;
  56995. var i = 0;
  56996. var state = State.New;
  56997. var substate = ParamsState.Name;
  56998. var tmpName = '';
  56999. var tmpValue = '';
  57000. var parsed = {
  57001. scheme: '',
  57002. params: {},
  57003. signingString: ''
  57004. };
  57005. var authz = request.headers[authzHeaderName];
  57006. for (i = 0; i < authz.length; i++) {
  57007. var c = authz.charAt(i);
  57008. switch (Number(state)) {
  57009. case State.New:
  57010. if (c !== ' ') parsed.scheme += c;
  57011. else state = State.Params;
  57012. break;
  57013. case State.Params:
  57014. switch (Number(substate)) {
  57015. case ParamsState.Name:
  57016. var code = c.charCodeAt(0);
  57017. // restricted name of A-Z / a-z
  57018. if ((code >= 0x41 && code <= 0x5a) || // A-Z
  57019. (code >= 0x61 && code <= 0x7a)) { // a-z
  57020. tmpName += c;
  57021. } else if (c === '=') {
  57022. if (tmpName.length === 0)
  57023. throw new InvalidHeaderError('bad param format');
  57024. substate = ParamsState.Quote;
  57025. } else {
  57026. throw new InvalidHeaderError('bad param format');
  57027. }
  57028. break;
  57029. case ParamsState.Quote:
  57030. if (c === '"') {
  57031. tmpValue = '';
  57032. substate = ParamsState.Value;
  57033. } else {
  57034. throw new InvalidHeaderError('bad param format');
  57035. }
  57036. break;
  57037. case ParamsState.Value:
  57038. if (c === '"') {
  57039. parsed.params[tmpName] = tmpValue;
  57040. substate = ParamsState.Comma;
  57041. } else {
  57042. tmpValue += c;
  57043. }
  57044. break;
  57045. case ParamsState.Comma:
  57046. if (c === ',') {
  57047. tmpName = '';
  57048. substate = ParamsState.Name;
  57049. } else {
  57050. throw new InvalidHeaderError('bad param format');
  57051. }
  57052. break;
  57053. default:
  57054. throw new Error('Invalid substate');
  57055. }
  57056. break;
  57057. default:
  57058. throw new Error('Invalid substate');
  57059. }
  57060. }
  57061. if (!parsed.params.headers || parsed.params.headers === '') {
  57062. if (request.headers['x-date']) {
  57063. parsed.params.headers = ['x-date'];
  57064. } else {
  57065. parsed.params.headers = ['date'];
  57066. }
  57067. } else {
  57068. parsed.params.headers = parsed.params.headers.split(' ');
  57069. }
  57070. // Minimally validate the parsed object
  57071. if (!parsed.scheme || parsed.scheme !== 'Signature')
  57072. throw new InvalidHeaderError('scheme was not "Signature"');
  57073. if (!parsed.params.keyId)
  57074. throw new InvalidHeaderError('keyId was not specified');
  57075. if (!parsed.params.algorithm)
  57076. throw new InvalidHeaderError('algorithm was not specified');
  57077. if (!parsed.params.signature)
  57078. throw new InvalidHeaderError('signature was not specified');
  57079. // Check the algorithm against the official list
  57080. parsed.params.algorithm = parsed.params.algorithm.toLowerCase();
  57081. try {
  57082. validateAlgorithm(parsed.params.algorithm);
  57083. } catch (e) {
  57084. if (e instanceof InvalidAlgorithmError)
  57085. throw (new InvalidParamsError(parsed.params.algorithm + ' is not ' +
  57086. 'supported'));
  57087. else
  57088. throw (e);
  57089. }
  57090. // Build the signingString
  57091. for (i = 0; i < parsed.params.headers.length; i++) {
  57092. var h = parsed.params.headers[i].toLowerCase();
  57093. parsed.params.headers[i] = h;
  57094. if (h === 'request-line') {
  57095. if (!options.strict) {
  57096. /*
  57097. * We allow headers from the older spec drafts if strict parsing isn't
  57098. * specified in options.
  57099. */
  57100. parsed.signingString +=
  57101. request.method + ' ' + request.url + ' HTTP/' + request.httpVersion;
  57102. } else {
  57103. /* Strict parsing doesn't allow older draft headers. */
  57104. throw (new StrictParsingError('request-line is not a valid header ' +
  57105. 'with strict parsing enabled.'));
  57106. }
  57107. } else if (h === '(request-target)') {
  57108. parsed.signingString +=
  57109. '(request-target): ' + request.method.toLowerCase() + ' ' +
  57110. request.url;
  57111. } else {
  57112. var value = request.headers[h];
  57113. if (value === undefined)
  57114. throw new MissingHeaderError(h + ' was not in the request');
  57115. parsed.signingString += h + ': ' + value;
  57116. }
  57117. if ((i + 1) < parsed.params.headers.length)
  57118. parsed.signingString += '\n';
  57119. }
  57120. // Check against the constraints
  57121. var date;
  57122. if (request.headers.date || request.headers['x-date']) {
  57123. if (request.headers['x-date']) {
  57124. date = new Date(request.headers['x-date']);
  57125. } else {
  57126. date = new Date(request.headers.date);
  57127. }
  57128. var now = new Date();
  57129. var skew = Math.abs(now.getTime() - date.getTime());
  57130. if (skew > options.clockSkew * 1000) {
  57131. throw new ExpiredRequestError('clock skew of ' +
  57132. (skew / 1000) +
  57133. 's was greater than ' +
  57134. options.clockSkew + 's');
  57135. }
  57136. }
  57137. options.headers.forEach(function (hdr) {
  57138. // Remember that we already checked any headers in the params
  57139. // were in the request, so if this passes we're good.
  57140. if (parsed.params.headers.indexOf(hdr.toLowerCase()) < 0)
  57141. throw new MissingHeaderError(hdr + ' was not a signed header');
  57142. });
  57143. if (options.algorithms) {
  57144. if (options.algorithms.indexOf(parsed.params.algorithm) === -1)
  57145. throw new InvalidParamsError(parsed.params.algorithm +
  57146. ' is not a supported algorithm');
  57147. }
  57148. parsed.algorithm = parsed.params.algorithm.toUpperCase();
  57149. parsed.keyId = parsed.params.keyId;
  57150. return parsed;
  57151. }
  57152. };
  57153. /***/ }),
  57154. /* 545 */
  57155. /***/ (function(module, exports, __webpack_require__) {
  57156. // Named EC curves
  57157. // Requires ec.js, jsbn.js, and jsbn2.js
  57158. var BigInteger = __webpack_require__(46).BigInteger
  57159. var ECCurveFp = __webpack_require__(108).ECCurveFp
  57160. // ----------------
  57161. // X9ECParameters
  57162. // constructor
  57163. function X9ECParameters(curve,g,n,h) {
  57164. this.curve = curve;
  57165. this.g = g;
  57166. this.n = n;
  57167. this.h = h;
  57168. }
  57169. function x9getCurve() {
  57170. return this.curve;
  57171. }
  57172. function x9getG() {
  57173. return this.g;
  57174. }
  57175. function x9getN() {
  57176. return this.n;
  57177. }
  57178. function x9getH() {
  57179. return this.h;
  57180. }
  57181. X9ECParameters.prototype.getCurve = x9getCurve;
  57182. X9ECParameters.prototype.getG = x9getG;
  57183. X9ECParameters.prototype.getN = x9getN;
  57184. X9ECParameters.prototype.getH = x9getH;
  57185. // ----------------
  57186. // SECNamedCurves
  57187. function fromHex(s) { return new BigInteger(s, 16); }
  57188. function secp128r1() {
  57189. // p = 2^128 - 2^97 - 1
  57190. var p = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF");
  57191. var a = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC");
  57192. var b = fromHex("E87579C11079F43DD824993C2CEE5ED3");
  57193. //byte[] S = Hex.decode("000E0D4D696E6768756151750CC03A4473D03679");
  57194. var n = fromHex("FFFFFFFE0000000075A30D1B9038A115");
  57195. var h = BigInteger.ONE;
  57196. var curve = new ECCurveFp(p, a, b);
  57197. var G = curve.decodePointHex("04"
  57198. + "161FF7528B899B2D0C28607CA52C5B86"
  57199. + "CF5AC8395BAFEB13C02DA292DDED7A83");
  57200. return new X9ECParameters(curve, G, n, h);
  57201. }
  57202. function secp160k1() {
  57203. // p = 2^160 - 2^32 - 2^14 - 2^12 - 2^9 - 2^8 - 2^7 - 2^3 - 2^2 - 1
  57204. var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73");
  57205. var a = BigInteger.ZERO;
  57206. var b = fromHex("7");
  57207. //byte[] S = null;
  57208. var n = fromHex("0100000000000000000001B8FA16DFAB9ACA16B6B3");
  57209. var h = BigInteger.ONE;
  57210. var curve = new ECCurveFp(p, a, b);
  57211. var G = curve.decodePointHex("04"
  57212. + "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB"
  57213. + "938CF935318FDCED6BC28286531733C3F03C4FEE");
  57214. return new X9ECParameters(curve, G, n, h);
  57215. }
  57216. function secp160r1() {
  57217. // p = 2^160 - 2^31 - 1
  57218. var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF");
  57219. var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC");
  57220. var b = fromHex("1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45");
  57221. //byte[] S = Hex.decode("1053CDE42C14D696E67687561517533BF3F83345");
  57222. var n = fromHex("0100000000000000000001F4C8F927AED3CA752257");
  57223. var h = BigInteger.ONE;
  57224. var curve = new ECCurveFp(p, a, b);
  57225. var G = curve.decodePointHex("04"
  57226. + "4A96B5688EF573284664698968C38BB913CBFC82"
  57227. + "23A628553168947D59DCC912042351377AC5FB32");
  57228. return new X9ECParameters(curve, G, n, h);
  57229. }
  57230. function secp192k1() {
  57231. // p = 2^192 - 2^32 - 2^12 - 2^8 - 2^7 - 2^6 - 2^3 - 1
  57232. var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37");
  57233. var a = BigInteger.ZERO;
  57234. var b = fromHex("3");
  57235. //byte[] S = null;
  57236. var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D");
  57237. var h = BigInteger.ONE;
  57238. var curve = new ECCurveFp(p, a, b);
  57239. var G = curve.decodePointHex("04"
  57240. + "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D"
  57241. + "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D");
  57242. return new X9ECParameters(curve, G, n, h);
  57243. }
  57244. function secp192r1() {
  57245. // p = 2^192 - 2^64 - 1
  57246. var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF");
  57247. var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC");
  57248. var b = fromHex("64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1");
  57249. //byte[] S = Hex.decode("3045AE6FC8422F64ED579528D38120EAE12196D5");
  57250. var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831");
  57251. var h = BigInteger.ONE;
  57252. var curve = new ECCurveFp(p, a, b);
  57253. var G = curve.decodePointHex("04"
  57254. + "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012"
  57255. + "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811");
  57256. return new X9ECParameters(curve, G, n, h);
  57257. }
  57258. function secp224r1() {
  57259. // p = 2^224 - 2^96 + 1
  57260. var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001");
  57261. var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE");
  57262. var b = fromHex("B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4");
  57263. //byte[] S = Hex.decode("BD71344799D5C7FCDC45B59FA3B9AB8F6A948BC5");
  57264. var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D");
  57265. var h = BigInteger.ONE;
  57266. var curve = new ECCurveFp(p, a, b);
  57267. var G = curve.decodePointHex("04"
  57268. + "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21"
  57269. + "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34");
  57270. return new X9ECParameters(curve, G, n, h);
  57271. }
  57272. function secp256r1() {
  57273. // p = 2^224 (2^32 - 1) + 2^192 + 2^96 - 1
  57274. var p = fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF");
  57275. var a = fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC");
  57276. var b = fromHex("5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B");
  57277. //byte[] S = Hex.decode("C49D360886E704936A6678E1139D26B7819F7E90");
  57278. var n = fromHex("FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551");
  57279. var h = BigInteger.ONE;
  57280. var curve = new ECCurveFp(p, a, b);
  57281. var G = curve.decodePointHex("04"
  57282. + "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296"
  57283. + "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5");
  57284. return new X9ECParameters(curve, G, n, h);
  57285. }
  57286. // TODO: make this into a proper hashtable
  57287. function getSECCurveByName(name) {
  57288. if(name == "secp128r1") return secp128r1();
  57289. if(name == "secp160k1") return secp160k1();
  57290. if(name == "secp160r1") return secp160r1();
  57291. if(name == "secp192k1") return secp192k1();
  57292. if(name == "secp192r1") return secp192r1();
  57293. if(name == "secp224r1") return secp224r1();
  57294. if(name == "secp256r1") return secp256r1();
  57295. return null;
  57296. }
  57297. module.exports = {
  57298. "secp128r1":secp128r1,
  57299. "secp160k1":secp160k1,
  57300. "secp160r1":secp160r1,
  57301. "secp192k1":secp192k1,
  57302. "secp192r1":secp192r1,
  57303. "secp224r1":secp224r1,
  57304. "secp256r1":secp256r1
  57305. }
  57306. /***/ }),
  57307. /* 546 */
  57308. /***/ (function(module, exports, __webpack_require__) {
  57309. // Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
  57310. var errors = __webpack_require__(147);
  57311. var types = __webpack_require__(148);
  57312. var Reader = __webpack_require__(547);
  57313. var Writer = __webpack_require__(548);
  57314. ///--- Exports
  57315. module.exports = {
  57316. Reader: Reader,
  57317. Writer: Writer
  57318. };
  57319. for (var t in types) {
  57320. if (types.hasOwnProperty(t))
  57321. module.exports[t] = types[t];
  57322. }
  57323. for (var e in errors) {
  57324. if (errors.hasOwnProperty(e))
  57325. module.exports[e] = errors[e];
  57326. }
  57327. /***/ }),
  57328. /* 547 */
  57329. /***/ (function(module, exports, __webpack_require__) {
  57330. // Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
  57331. var assert = __webpack_require__(83);
  57332. var ASN1 = __webpack_require__(148);
  57333. var errors = __webpack_require__(147);
  57334. ///--- Globals
  57335. var newInvalidAsn1Error = errors.newInvalidAsn1Error;
  57336. ///--- API
  57337. function Reader(data) {
  57338. if (!data || !Buffer.isBuffer(data))
  57339. throw new TypeError('data must be a node Buffer');
  57340. this._buf = data;
  57341. this._size = data.length;
  57342. // These hold the "current" state
  57343. this._len = 0;
  57344. this._offset = 0;
  57345. }
  57346. Object.defineProperty(Reader.prototype, 'length', {
  57347. enumerable: true,
  57348. get: function () { return (this._len); }
  57349. });
  57350. Object.defineProperty(Reader.prototype, 'offset', {
  57351. enumerable: true,
  57352. get: function () { return (this._offset); }
  57353. });
  57354. Object.defineProperty(Reader.prototype, 'remain', {
  57355. get: function () { return (this._size - this._offset); }
  57356. });
  57357. Object.defineProperty(Reader.prototype, 'buffer', {
  57358. get: function () { return (this._buf.slice(this._offset)); }
  57359. });
  57360. /**
  57361. * Reads a single byte and advances offset; you can pass in `true` to make this
  57362. * a "peek" operation (i.e., get the byte, but don't advance the offset).
  57363. *
  57364. * @param {Boolean} peek true means don't move offset.
  57365. * @return {Number} the next byte, null if not enough data.
  57366. */
  57367. Reader.prototype.readByte = function(peek) {
  57368. if (this._size - this._offset < 1)
  57369. return null;
  57370. var b = this._buf[this._offset] & 0xff;
  57371. if (!peek)
  57372. this._offset += 1;
  57373. return b;
  57374. };
  57375. Reader.prototype.peek = function() {
  57376. return this.readByte(true);
  57377. };
  57378. /**
  57379. * Reads a (potentially) variable length off the BER buffer. This call is
  57380. * not really meant to be called directly, as callers have to manipulate
  57381. * the internal buffer afterwards.
  57382. *
  57383. * As a result of this call, you can call `Reader.length`, until the
  57384. * next thing called that does a readLength.
  57385. *
  57386. * @return {Number} the amount of offset to advance the buffer.
  57387. * @throws {InvalidAsn1Error} on bad ASN.1
  57388. */
  57389. Reader.prototype.readLength = function(offset) {
  57390. if (offset === undefined)
  57391. offset = this._offset;
  57392. if (offset >= this._size)
  57393. return null;
  57394. var lenB = this._buf[offset++] & 0xff;
  57395. if (lenB === null)
  57396. return null;
  57397. if ((lenB & 0x80) == 0x80) {
  57398. lenB &= 0x7f;
  57399. if (lenB == 0)
  57400. throw newInvalidAsn1Error('Indefinite length not supported');
  57401. if (lenB > 4)
  57402. throw newInvalidAsn1Error('encoding too long');
  57403. if (this._size - offset < lenB)
  57404. return null;
  57405. this._len = 0;
  57406. for (var i = 0; i < lenB; i++)
  57407. this._len = (this._len << 8) + (this._buf[offset++] & 0xff);
  57408. } else {
  57409. // Wasn't a variable length
  57410. this._len = lenB;
  57411. }
  57412. return offset;
  57413. };
  57414. /**
  57415. * Parses the next sequence in this BER buffer.
  57416. *
  57417. * To get the length of the sequence, call `Reader.length`.
  57418. *
  57419. * @return {Number} the sequence's tag.
  57420. */
  57421. Reader.prototype.readSequence = function(tag) {
  57422. var seq = this.peek();
  57423. if (seq === null)
  57424. return null;
  57425. if (tag !== undefined && tag !== seq)
  57426. throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +
  57427. ': got 0x' + seq.toString(16));
  57428. var o = this.readLength(this._offset + 1); // stored in `length`
  57429. if (o === null)
  57430. return null;
  57431. this._offset = o;
  57432. return seq;
  57433. };
  57434. Reader.prototype.readInt = function() {
  57435. return this._readTag(ASN1.Integer);
  57436. };
  57437. Reader.prototype.readBoolean = function() {
  57438. return (this._readTag(ASN1.Boolean) === 0 ? false : true);
  57439. };
  57440. Reader.prototype.readEnumeration = function() {
  57441. return this._readTag(ASN1.Enumeration);
  57442. };
  57443. Reader.prototype.readString = function(tag, retbuf) {
  57444. if (!tag)
  57445. tag = ASN1.OctetString;
  57446. var b = this.peek();
  57447. if (b === null)
  57448. return null;
  57449. if (b !== tag)
  57450. throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +
  57451. ': got 0x' + b.toString(16));
  57452. var o = this.readLength(this._offset + 1); // stored in `length`
  57453. if (o === null)
  57454. return null;
  57455. if (this.length > this._size - o)
  57456. return null;
  57457. this._offset = o;
  57458. if (this.length === 0)
  57459. return retbuf ? new Buffer(0) : '';
  57460. var str = this._buf.slice(this._offset, this._offset + this.length);
  57461. this._offset += this.length;
  57462. return retbuf ? str : str.toString('utf8');
  57463. };
  57464. Reader.prototype.readOID = function(tag) {
  57465. if (!tag)
  57466. tag = ASN1.OID;
  57467. var b = this.readString(tag, true);
  57468. if (b === null)
  57469. return null;
  57470. var values = [];
  57471. var value = 0;
  57472. for (var i = 0; i < b.length; i++) {
  57473. var byte = b[i] & 0xff;
  57474. value <<= 7;
  57475. value += byte & 0x7f;
  57476. if ((byte & 0x80) == 0) {
  57477. values.push(value);
  57478. value = 0;
  57479. }
  57480. }
  57481. value = values.shift();
  57482. values.unshift(value % 40);
  57483. values.unshift((value / 40) >> 0);
  57484. return values.join('.');
  57485. };
  57486. Reader.prototype._readTag = function(tag) {
  57487. assert.ok(tag !== undefined);
  57488. var b = this.peek();
  57489. if (b === null)
  57490. return null;
  57491. if (b !== tag)
  57492. throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +
  57493. ': got 0x' + b.toString(16));
  57494. var o = this.readLength(this._offset + 1); // stored in `length`
  57495. if (o === null)
  57496. return null;
  57497. if (this.length > 4)
  57498. throw newInvalidAsn1Error('Integer too long: ' + this.length);
  57499. if (this.length > this._size - o)
  57500. return null;
  57501. this._offset = o;
  57502. var fb = this._buf[this._offset];
  57503. var value = 0;
  57504. for (var i = 0; i < this.length; i++) {
  57505. value <<= 8;
  57506. value |= (this._buf[this._offset++] & 0xff);
  57507. }
  57508. if ((fb & 0x80) == 0x80 && i !== 4)
  57509. value -= (1 << (i * 8));
  57510. return value >> 0;
  57511. };
  57512. ///--- Exported API
  57513. module.exports = Reader;
  57514. /***/ }),
  57515. /* 548 */
  57516. /***/ (function(module, exports, __webpack_require__) {
  57517. // Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
  57518. var assert = __webpack_require__(83);
  57519. var ASN1 = __webpack_require__(148);
  57520. var errors = __webpack_require__(147);
  57521. ///--- Globals
  57522. var newInvalidAsn1Error = errors.newInvalidAsn1Error;
  57523. var DEFAULT_OPTS = {
  57524. size: 1024,
  57525. growthFactor: 8
  57526. };
  57527. ///--- Helpers
  57528. function merge(from, to) {
  57529. assert.ok(from);
  57530. assert.equal(typeof(from), 'object');
  57531. assert.ok(to);
  57532. assert.equal(typeof(to), 'object');
  57533. var keys = Object.getOwnPropertyNames(from);
  57534. keys.forEach(function(key) {
  57535. if (to[key])
  57536. return;
  57537. var value = Object.getOwnPropertyDescriptor(from, key);
  57538. Object.defineProperty(to, key, value);
  57539. });
  57540. return to;
  57541. }
  57542. ///--- API
  57543. function Writer(options) {
  57544. options = merge(DEFAULT_OPTS, options || {});
  57545. this._buf = new Buffer(options.size || 1024);
  57546. this._size = this._buf.length;
  57547. this._offset = 0;
  57548. this._options = options;
  57549. // A list of offsets in the buffer where we need to insert
  57550. // sequence tag/len pairs.
  57551. this._seq = [];
  57552. }
  57553. Object.defineProperty(Writer.prototype, 'buffer', {
  57554. get: function () {
  57555. if (this._seq.length)
  57556. throw new InvalidAsn1Error(this._seq.length + ' unended sequence(s)');
  57557. return (this._buf.slice(0, this._offset));
  57558. }
  57559. });
  57560. Writer.prototype.writeByte = function(b) {
  57561. if (typeof(b) !== 'number')
  57562. throw new TypeError('argument must be a Number');
  57563. this._ensure(1);
  57564. this._buf[this._offset++] = b;
  57565. };
  57566. Writer.prototype.writeInt = function(i, tag) {
  57567. if (typeof(i) !== 'number')
  57568. throw new TypeError('argument must be a Number');
  57569. if (typeof(tag) !== 'number')
  57570. tag = ASN1.Integer;
  57571. var sz = 4;
  57572. while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000 >> 0)) &&
  57573. (sz > 1)) {
  57574. sz--;
  57575. i <<= 8;
  57576. }
  57577. if (sz > 4)
  57578. throw new InvalidAsn1Error('BER ints cannot be > 0xffffffff');
  57579. this._ensure(2 + sz);
  57580. this._buf[this._offset++] = tag;
  57581. this._buf[this._offset++] = sz;
  57582. while (sz-- > 0) {
  57583. this._buf[this._offset++] = ((i & 0xff000000) >>> 24);
  57584. i <<= 8;
  57585. }
  57586. };
  57587. Writer.prototype.writeNull = function() {
  57588. this.writeByte(ASN1.Null);
  57589. this.writeByte(0x00);
  57590. };
  57591. Writer.prototype.writeEnumeration = function(i, tag) {
  57592. if (typeof(i) !== 'number')
  57593. throw new TypeError('argument must be a Number');
  57594. if (typeof(tag) !== 'number')
  57595. tag = ASN1.Enumeration;
  57596. return this.writeInt(i, tag);
  57597. };
  57598. Writer.prototype.writeBoolean = function(b, tag) {
  57599. if (typeof(b) !== 'boolean')
  57600. throw new TypeError('argument must be a Boolean');
  57601. if (typeof(tag) !== 'number')
  57602. tag = ASN1.Boolean;
  57603. this._ensure(3);
  57604. this._buf[this._offset++] = tag;
  57605. this._buf[this._offset++] = 0x01;
  57606. this._buf[this._offset++] = b ? 0xff : 0x00;
  57607. };
  57608. Writer.prototype.writeString = function(s, tag) {
  57609. if (typeof(s) !== 'string')
  57610. throw new TypeError('argument must be a string (was: ' + typeof(s) + ')');
  57611. if (typeof(tag) !== 'number')
  57612. tag = ASN1.OctetString;
  57613. var len = Buffer.byteLength(s);
  57614. this.writeByte(tag);
  57615. this.writeLength(len);
  57616. if (len) {
  57617. this._ensure(len);
  57618. this._buf.write(s, this._offset);
  57619. this._offset += len;
  57620. }
  57621. };
  57622. Writer.prototype.writeBuffer = function(buf, tag) {
  57623. if (typeof(tag) !== 'number')
  57624. throw new TypeError('tag must be a number');
  57625. if (!Buffer.isBuffer(buf))
  57626. throw new TypeError('argument must be a buffer');
  57627. this.writeByte(tag);
  57628. this.writeLength(buf.length);
  57629. this._ensure(buf.length);
  57630. buf.copy(this._buf, this._offset, 0, buf.length);
  57631. this._offset += buf.length;
  57632. };
  57633. Writer.prototype.writeStringArray = function(strings) {
  57634. if ((!strings instanceof Array))
  57635. throw new TypeError('argument must be an Array[String]');
  57636. var self = this;
  57637. strings.forEach(function(s) {
  57638. self.writeString(s);
  57639. });
  57640. };
  57641. // This is really to solve DER cases, but whatever for now
  57642. Writer.prototype.writeOID = function(s, tag) {
  57643. if (typeof(s) !== 'string')
  57644. throw new TypeError('argument must be a string');
  57645. if (typeof(tag) !== 'number')
  57646. tag = ASN1.OID;
  57647. if (!/^([0-9]+\.){3,}[0-9]+$/.test(s))
  57648. throw new Error('argument is not a valid OID string');
  57649. function encodeOctet(bytes, octet) {
  57650. if (octet < 128) {
  57651. bytes.push(octet);
  57652. } else if (octet < 16384) {
  57653. bytes.push((octet >>> 7) | 0x80);
  57654. bytes.push(octet & 0x7F);
  57655. } else if (octet < 2097152) {
  57656. bytes.push((octet >>> 14) | 0x80);
  57657. bytes.push(((octet >>> 7) | 0x80) & 0xFF);
  57658. bytes.push(octet & 0x7F);
  57659. } else if (octet < 268435456) {
  57660. bytes.push((octet >>> 21) | 0x80);
  57661. bytes.push(((octet >>> 14) | 0x80) & 0xFF);
  57662. bytes.push(((octet >>> 7) | 0x80) & 0xFF);
  57663. bytes.push(octet & 0x7F);
  57664. } else {
  57665. bytes.push(((octet >>> 28) | 0x80) & 0xFF);
  57666. bytes.push(((octet >>> 21) | 0x80) & 0xFF);
  57667. bytes.push(((octet >>> 14) | 0x80) & 0xFF);
  57668. bytes.push(((octet >>> 7) | 0x80) & 0xFF);
  57669. bytes.push(octet & 0x7F);
  57670. }
  57671. }
  57672. var tmp = s.split('.');
  57673. var bytes = [];
  57674. bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10));
  57675. tmp.slice(2).forEach(function(b) {
  57676. encodeOctet(bytes, parseInt(b, 10));
  57677. });
  57678. var self = this;
  57679. this._ensure(2 + bytes.length);
  57680. this.writeByte(tag);
  57681. this.writeLength(bytes.length);
  57682. bytes.forEach(function(b) {
  57683. self.writeByte(b);
  57684. });
  57685. };
  57686. Writer.prototype.writeLength = function(len) {
  57687. if (typeof(len) !== 'number')
  57688. throw new TypeError('argument must be a Number');
  57689. this._ensure(4);
  57690. if (len <= 0x7f) {
  57691. this._buf[this._offset++] = len;
  57692. } else if (len <= 0xff) {
  57693. this._buf[this._offset++] = 0x81;
  57694. this._buf[this._offset++] = len;
  57695. } else if (len <= 0xffff) {
  57696. this._buf[this._offset++] = 0x82;
  57697. this._buf[this._offset++] = len >> 8;
  57698. this._buf[this._offset++] = len;
  57699. } else if (len <= 0xffffff) {
  57700. this._buf[this._offset++] = 0x83;
  57701. this._buf[this._offset++] = len >> 16;
  57702. this._buf[this._offset++] = len >> 8;
  57703. this._buf[this._offset++] = len;
  57704. } else {
  57705. throw new InvalidAsn1ERror('Length too long (> 4 bytes)');
  57706. }
  57707. };
  57708. Writer.prototype.startSequence = function(tag) {
  57709. if (typeof(tag) !== 'number')
  57710. tag = ASN1.Sequence | ASN1.Constructor;
  57711. this.writeByte(tag);
  57712. this._seq.push(this._offset);
  57713. this._ensure(3);
  57714. this._offset += 3;
  57715. };
  57716. Writer.prototype.endSequence = function() {
  57717. var seq = this._seq.pop();
  57718. var start = seq + 3;
  57719. var len = this._offset - start;
  57720. if (len <= 0x7f) {
  57721. this._shift(start, len, -2);
  57722. this._buf[seq] = len;
  57723. } else if (len <= 0xff) {
  57724. this._shift(start, len, -1);
  57725. this._buf[seq] = 0x81;
  57726. this._buf[seq + 1] = len;
  57727. } else if (len <= 0xffff) {
  57728. this._buf[seq] = 0x82;
  57729. this._buf[seq + 1] = len >> 8;
  57730. this._buf[seq + 2] = len;
  57731. } else if (len <= 0xffffff) {
  57732. this._shift(start, len, 1);
  57733. this._buf[seq] = 0x83;
  57734. this._buf[seq + 1] = len >> 16;
  57735. this._buf[seq + 2] = len >> 8;
  57736. this._buf[seq + 3] = len;
  57737. } else {
  57738. throw new InvalidAsn1Error('Sequence too long');
  57739. }
  57740. };
  57741. Writer.prototype._shift = function(start, len, shift) {
  57742. assert.ok(start !== undefined);
  57743. assert.ok(len !== undefined);
  57744. assert.ok(shift);
  57745. this._buf.copy(this._buf, start + shift, start, start + len);
  57746. this._offset += shift;
  57747. };
  57748. Writer.prototype._ensure = function(len) {
  57749. assert.ok(len);
  57750. if (this._size - this._offset < len) {
  57751. var sz = this._size * this._options.growthFactor;
  57752. if (sz - this._offset < len)
  57753. sz += len;
  57754. var buf = new Buffer(sz);
  57755. this._buf.copy(buf, 0, 0, this._offset);
  57756. this._buf = buf;
  57757. this._size = sz;
  57758. }
  57759. };
  57760. ///--- Exported API
  57761. module.exports = Writer;
  57762. /***/ }),
  57763. /* 549 */
  57764. /***/ (function(module, exports, __webpack_require__) {
  57765. // Copyright 2017 Joyent, Inc.
  57766. module.exports = {
  57767. read: read,
  57768. verify: verify,
  57769. sign: sign,
  57770. signAsync: signAsync,
  57771. write: write,
  57772. /* Internal private API */
  57773. fromBuffer: fromBuffer,
  57774. toBuffer: toBuffer
  57775. };
  57776. var assert = __webpack_require__(3);
  57777. var SSHBuffer = __webpack_require__(110);
  57778. var crypto = __webpack_require__(5);
  57779. var algs = __webpack_require__(16);
  57780. var Key = __webpack_require__(15);
  57781. var PrivateKey = __webpack_require__(17);
  57782. var Identity = __webpack_require__(87);
  57783. var rfc4253 = __webpack_require__(48);
  57784. var Signature = __webpack_require__(32);
  57785. var utils = __webpack_require__(12);
  57786. var Certificate = __webpack_require__(85);
  57787. function verify(cert, key) {
  57788. /*
  57789. * We always give an issuerKey, so if our verify() is being called then
  57790. * there was no signature. Return false.
  57791. */
  57792. return (false);
  57793. }
  57794. var TYPES = {
  57795. 'user': 1,
  57796. 'host': 2
  57797. };
  57798. Object.keys(TYPES).forEach(function (k) { TYPES[TYPES[k]] = k; });
  57799. var ECDSA_ALGO = /^ecdsa-sha2-([^@-]+)-cert-v01@openssh.com$/;
  57800. function read(buf, options) {
  57801. if (Buffer.isBuffer(buf))
  57802. buf = buf.toString('ascii');
  57803. var parts = buf.trim().split(/[ \t\n]+/g);
  57804. if (parts.length < 2 || parts.length > 3)
  57805. throw (new Error('Not a valid SSH certificate line'));
  57806. var algo = parts[0];
  57807. var data = parts[1];
  57808. data = new Buffer(data, 'base64');
  57809. return (fromBuffer(data, algo));
  57810. }
  57811. function fromBuffer(data, algo, partial) {
  57812. var sshbuf = new SSHBuffer({ buffer: data });
  57813. var innerAlgo = sshbuf.readString();
  57814. if (algo !== undefined && innerAlgo !== algo)
  57815. throw (new Error('SSH certificate algorithm mismatch'));
  57816. if (algo === undefined)
  57817. algo = innerAlgo;
  57818. var cert = {};
  57819. cert.signatures = {};
  57820. cert.signatures.openssh = {};
  57821. cert.signatures.openssh.nonce = sshbuf.readBuffer();
  57822. var key = {};
  57823. var parts = (key.parts = []);
  57824. key.type = getAlg(algo);
  57825. var partCount = algs.info[key.type].parts.length;
  57826. while (parts.length < partCount)
  57827. parts.push(sshbuf.readPart());
  57828. assert.ok(parts.length >= 1, 'key must have at least one part');
  57829. var algInfo = algs.info[key.type];
  57830. if (key.type === 'ecdsa') {
  57831. var res = ECDSA_ALGO.exec(algo);
  57832. assert.ok(res !== null);
  57833. assert.strictEqual(res[1], parts[0].data.toString());
  57834. }
  57835. for (var i = 0; i < algInfo.parts.length; ++i) {
  57836. parts[i].name = algInfo.parts[i];
  57837. if (parts[i].name !== 'curve' &&
  57838. algInfo.normalize !== false) {
  57839. var p = parts[i];
  57840. p.data = utils.mpNormalize(p.data);
  57841. }
  57842. }
  57843. cert.subjectKey = new Key(key);
  57844. cert.serial = sshbuf.readInt64();
  57845. var type = TYPES[sshbuf.readInt()];
  57846. assert.string(type, 'valid cert type');
  57847. cert.signatures.openssh.keyId = sshbuf.readString();
  57848. var principals = [];
  57849. var pbuf = sshbuf.readBuffer();
  57850. var psshbuf = new SSHBuffer({ buffer: pbuf });
  57851. while (!psshbuf.atEnd())
  57852. principals.push(psshbuf.readString());
  57853. if (principals.length === 0)
  57854. principals = ['*'];
  57855. cert.subjects = principals.map(function (pr) {
  57856. if (type === 'user')
  57857. return (Identity.forUser(pr));
  57858. else if (type === 'host')
  57859. return (Identity.forHost(pr));
  57860. throw (new Error('Unknown identity type ' + type));
  57861. });
  57862. cert.validFrom = int64ToDate(sshbuf.readInt64());
  57863. cert.validUntil = int64ToDate(sshbuf.readInt64());
  57864. cert.signatures.openssh.critical = sshbuf.readBuffer();
  57865. cert.signatures.openssh.exts = sshbuf.readBuffer();
  57866. /* reserved */
  57867. sshbuf.readBuffer();
  57868. var signingKeyBuf = sshbuf.readBuffer();
  57869. cert.issuerKey = rfc4253.read(signingKeyBuf);
  57870. /*
  57871. * OpenSSH certs don't give the identity of the issuer, just their
  57872. * public key. So, we use an Identity that matches anything. The
  57873. * isSignedBy() function will later tell you if the key matches.
  57874. */
  57875. cert.issuer = Identity.forHost('**');
  57876. var sigBuf = sshbuf.readBuffer();
  57877. cert.signatures.openssh.signature =
  57878. Signature.parse(sigBuf, cert.issuerKey.type, 'ssh');
  57879. if (partial !== undefined) {
  57880. partial.remainder = sshbuf.remainder();
  57881. partial.consumed = sshbuf._offset;
  57882. }
  57883. return (new Certificate(cert));
  57884. }
  57885. function int64ToDate(buf) {
  57886. var i = buf.readUInt32BE(0) * 4294967296;
  57887. i += buf.readUInt32BE(4);
  57888. var d = new Date();
  57889. d.setTime(i * 1000);
  57890. d.sourceInt64 = buf;
  57891. return (d);
  57892. }
  57893. function dateToInt64(date) {
  57894. if (date.sourceInt64 !== undefined)
  57895. return (date.sourceInt64);
  57896. var i = Math.round(date.getTime() / 1000);
  57897. var upper = Math.floor(i / 4294967296);
  57898. var lower = Math.floor(i % 4294967296);
  57899. var buf = new Buffer(8);
  57900. buf.writeUInt32BE(upper, 0);
  57901. buf.writeUInt32BE(lower, 4);
  57902. return (buf);
  57903. }
  57904. function sign(cert, key) {
  57905. if (cert.signatures.openssh === undefined)
  57906. cert.signatures.openssh = {};
  57907. try {
  57908. var blob = toBuffer(cert, true);
  57909. } catch (e) {
  57910. delete (cert.signatures.openssh);
  57911. return (false);
  57912. }
  57913. var sig = cert.signatures.openssh;
  57914. var hashAlgo = undefined;
  57915. if (key.type === 'rsa' || key.type === 'dsa')
  57916. hashAlgo = 'sha1';
  57917. var signer = key.createSign(hashAlgo);
  57918. signer.write(blob);
  57919. sig.signature = signer.sign();
  57920. return (true);
  57921. }
  57922. function signAsync(cert, signer, done) {
  57923. if (cert.signatures.openssh === undefined)
  57924. cert.signatures.openssh = {};
  57925. try {
  57926. var blob = toBuffer(cert, true);
  57927. } catch (e) {
  57928. delete (cert.signatures.openssh);
  57929. done(e);
  57930. return;
  57931. }
  57932. var sig = cert.signatures.openssh;
  57933. signer(blob, function (err, signature) {
  57934. if (err) {
  57935. done(err);
  57936. return;
  57937. }
  57938. try {
  57939. /*
  57940. * This will throw if the signature isn't of a
  57941. * type/algo that can be used for SSH.
  57942. */
  57943. signature.toBuffer('ssh');
  57944. } catch (e) {
  57945. done(e);
  57946. return;
  57947. }
  57948. sig.signature = signature;
  57949. done();
  57950. });
  57951. }
  57952. function write(cert, options) {
  57953. if (options === undefined)
  57954. options = {};
  57955. var blob = toBuffer(cert);
  57956. var out = getCertType(cert.subjectKey) + ' ' + blob.toString('base64');
  57957. if (options.comment)
  57958. out = out + ' ' + options.comment;
  57959. return (out);
  57960. }
  57961. function toBuffer(cert, noSig) {
  57962. assert.object(cert.signatures.openssh, 'signature for openssh format');
  57963. var sig = cert.signatures.openssh;
  57964. if (sig.nonce === undefined)
  57965. sig.nonce = crypto.randomBytes(16);
  57966. var buf = new SSHBuffer({});
  57967. buf.writeString(getCertType(cert.subjectKey));
  57968. buf.writeBuffer(sig.nonce);
  57969. var key = cert.subjectKey;
  57970. var algInfo = algs.info[key.type];
  57971. algInfo.parts.forEach(function (part) {
  57972. buf.writePart(key.part[part]);
  57973. });
  57974. buf.writeInt64(cert.serial);
  57975. var type = cert.subjects[0].type;
  57976. assert.notStrictEqual(type, 'unknown');
  57977. cert.subjects.forEach(function (id) {
  57978. assert.strictEqual(id.type, type);
  57979. });
  57980. type = TYPES[type];
  57981. buf.writeInt(type);
  57982. if (sig.keyId === undefined) {
  57983. sig.keyId = cert.subjects[0].type + '_' +
  57984. (cert.subjects[0].uid || cert.subjects[0].hostname);
  57985. }
  57986. buf.writeString(sig.keyId);
  57987. var sub = new SSHBuffer({});
  57988. cert.subjects.forEach(function (id) {
  57989. if (type === TYPES.host)
  57990. sub.writeString(id.hostname);
  57991. else if (type === TYPES.user)
  57992. sub.writeString(id.uid);
  57993. });
  57994. buf.writeBuffer(sub.toBuffer());
  57995. buf.writeInt64(dateToInt64(cert.validFrom));
  57996. buf.writeInt64(dateToInt64(cert.validUntil));
  57997. if (sig.critical === undefined)
  57998. sig.critical = new Buffer(0);
  57999. buf.writeBuffer(sig.critical);
  58000. if (sig.exts === undefined)
  58001. sig.exts = new Buffer(0);
  58002. buf.writeBuffer(sig.exts);
  58003. /* reserved */
  58004. buf.writeBuffer(new Buffer(0));
  58005. sub = rfc4253.write(cert.issuerKey);
  58006. buf.writeBuffer(sub);
  58007. if (!noSig)
  58008. buf.writeBuffer(sig.signature.toBuffer('ssh'));
  58009. return (buf.toBuffer());
  58010. }
  58011. function getAlg(certType) {
  58012. if (certType === 'ssh-rsa-cert-v01@openssh.com')
  58013. return ('rsa');
  58014. if (certType === 'ssh-dss-cert-v01@openssh.com')
  58015. return ('dsa');
  58016. if (certType.match(ECDSA_ALGO))
  58017. return ('ecdsa');
  58018. if (certType === 'ssh-ed25519-cert-v01@openssh.com')
  58019. return ('ed25519');
  58020. throw (new Error('Unsupported cert type ' + certType));
  58021. }
  58022. function getCertType(key) {
  58023. if (key.type === 'rsa')
  58024. return ('ssh-rsa-cert-v01@openssh.com');
  58025. if (key.type === 'dsa')
  58026. return ('ssh-dss-cert-v01@openssh.com');
  58027. if (key.type === 'ecdsa')
  58028. return ('ecdsa-sha2-' + key.curve + '-cert-v01@openssh.com');
  58029. if (key.type === 'ed25519')
  58030. return ('ssh-ed25519-cert-v01@openssh.com');
  58031. throw (new Error('Unsupported key type ' + key.type));
  58032. }
  58033. /***/ }),
  58034. /* 550 */
  58035. /***/ (function(module, exports, __webpack_require__) {
  58036. // Copyright 2016 Joyent, Inc.
  58037. var x509 = __webpack_require__(352);
  58038. module.exports = {
  58039. read: read,
  58040. verify: x509.verify,
  58041. sign: x509.sign,
  58042. write: write
  58043. };
  58044. var assert = __webpack_require__(3);
  58045. var asn1 = __webpack_require__(39);
  58046. var algs = __webpack_require__(16);
  58047. var utils = __webpack_require__(12);
  58048. var Key = __webpack_require__(15);
  58049. var PrivateKey = __webpack_require__(17);
  58050. var pem = __webpack_require__(38);
  58051. var Identity = __webpack_require__(87);
  58052. var Signature = __webpack_require__(32);
  58053. var Certificate = __webpack_require__(85);
  58054. function read(buf, options) {
  58055. if (typeof (buf) !== 'string') {
  58056. assert.buffer(buf, 'buf');
  58057. buf = buf.toString('ascii');
  58058. }
  58059. var lines = buf.trim().split(/[\r\n]+/g);
  58060. var m = lines[0].match(/*JSSTYLED*/
  58061. /[-]+[ ]*BEGIN CERTIFICATE[ ]*[-]+/);
  58062. assert.ok(m, 'invalid PEM header');
  58063. var m2 = lines[lines.length - 1].match(/*JSSTYLED*/
  58064. /[-]+[ ]*END CERTIFICATE[ ]*[-]+/);
  58065. assert.ok(m2, 'invalid PEM footer');
  58066. var headers = {};
  58067. while (true) {
  58068. lines = lines.slice(1);
  58069. m = lines[0].match(/*JSSTYLED*/
  58070. /^([A-Za-z0-9-]+): (.+)$/);
  58071. if (!m)
  58072. break;
  58073. headers[m[1].toLowerCase()] = m[2];
  58074. }
  58075. /* Chop off the first and last lines */
  58076. lines = lines.slice(0, -1).join('');
  58077. buf = new Buffer(lines, 'base64');
  58078. return (x509.read(buf, options));
  58079. }
  58080. function write(cert, options) {
  58081. var dbuf = x509.write(cert, options);
  58082. var header = 'CERTIFICATE';
  58083. var tmp = dbuf.toString('base64');
  58084. var len = tmp.length + (tmp.length / 64) +
  58085. 18 + 16 + header.length*2 + 10;
  58086. var buf = new Buffer(len);
  58087. var o = 0;
  58088. o += buf.write('-----BEGIN ' + header + '-----\n', o);
  58089. for (var i = 0; i < tmp.length; ) {
  58090. var limit = i + 64;
  58091. if (limit > tmp.length)
  58092. limit = tmp.length;
  58093. o += buf.write(tmp.slice(i, limit), o);
  58094. buf[o++] = 10;
  58095. i = limit;
  58096. }
  58097. o += buf.write('-----END ' + header + '-----\n', o);
  58098. return (buf.slice(0, o));
  58099. }
  58100. /***/ }),
  58101. /* 551 */
  58102. /***/ (function(module, exports, __webpack_require__) {
  58103. // Copyright 2012 Joyent, Inc. All rights reserved.
  58104. var assert = __webpack_require__(3);
  58105. var crypto = __webpack_require__(5);
  58106. var http = __webpack_require__(45);
  58107. var util = __webpack_require__(2);
  58108. var sshpk = __webpack_require__(146);
  58109. var jsprim = __webpack_require__(552);
  58110. var utils = __webpack_require__(107);
  58111. var sprintf = __webpack_require__(2).format;
  58112. var HASH_ALGOS = utils.HASH_ALGOS;
  58113. var PK_ALGOS = utils.PK_ALGOS;
  58114. var InvalidAlgorithmError = utils.InvalidAlgorithmError;
  58115. var HttpSignatureError = utils.HttpSignatureError;
  58116. var validateAlgorithm = utils.validateAlgorithm;
  58117. ///--- Globals
  58118. var AUTHZ_FMT =
  58119. 'Signature keyId="%s",algorithm="%s",headers="%s",signature="%s"';
  58120. ///--- Specific Errors
  58121. function MissingHeaderError(message) {
  58122. HttpSignatureError.call(this, message, MissingHeaderError);
  58123. }
  58124. util.inherits(MissingHeaderError, HttpSignatureError);
  58125. function StrictParsingError(message) {
  58126. HttpSignatureError.call(this, message, StrictParsingError);
  58127. }
  58128. util.inherits(StrictParsingError, HttpSignatureError);
  58129. /* See createSigner() */
  58130. function RequestSigner(options) {
  58131. assert.object(options, 'options');
  58132. var alg = [];
  58133. if (options.algorithm !== undefined) {
  58134. assert.string(options.algorithm, 'options.algorithm');
  58135. alg = validateAlgorithm(options.algorithm);
  58136. }
  58137. this.rs_alg = alg;
  58138. /*
  58139. * RequestSigners come in two varieties: ones with an rs_signFunc, and ones
  58140. * with an rs_signer.
  58141. *
  58142. * rs_signFunc-based RequestSigners have to build up their entire signing
  58143. * string within the rs_lines array and give it to rs_signFunc as a single
  58144. * concat'd blob. rs_signer-based RequestSigners can add a line at a time to
  58145. * their signing state by using rs_signer.update(), thus only needing to
  58146. * buffer the hash function state and one line at a time.
  58147. */
  58148. if (options.sign !== undefined) {
  58149. assert.func(options.sign, 'options.sign');
  58150. this.rs_signFunc = options.sign;
  58151. } else if (alg[0] === 'hmac' && options.key !== undefined) {
  58152. assert.string(options.keyId, 'options.keyId');
  58153. this.rs_keyId = options.keyId;
  58154. if (typeof (options.key) !== 'string' && !Buffer.isBuffer(options.key))
  58155. throw (new TypeError('options.key for HMAC must be a string or Buffer'));
  58156. /*
  58157. * Make an rs_signer for HMACs, not a rs_signFunc -- HMACs digest their
  58158. * data in chunks rather than requiring it all to be given in one go
  58159. * at the end, so they are more similar to signers than signFuncs.
  58160. */
  58161. this.rs_signer = crypto.createHmac(alg[1].toUpperCase(), options.key);
  58162. this.rs_signer.sign = function () {
  58163. var digest = this.digest('base64');
  58164. return ({
  58165. hashAlgorithm: alg[1],
  58166. toString: function () { return (digest); }
  58167. });
  58168. };
  58169. } else if (options.key !== undefined) {
  58170. var key = options.key;
  58171. if (typeof (key) === 'string' || Buffer.isBuffer(key))
  58172. key = sshpk.parsePrivateKey(key);
  58173. assert.ok(sshpk.PrivateKey.isPrivateKey(key, [1, 2]),
  58174. 'options.key must be a sshpk.PrivateKey');
  58175. this.rs_key = key;
  58176. assert.string(options.keyId, 'options.keyId');
  58177. this.rs_keyId = options.keyId;
  58178. if (!PK_ALGOS[key.type]) {
  58179. throw (new InvalidAlgorithmError(key.type.toUpperCase() + ' type ' +
  58180. 'keys are not supported'));
  58181. }
  58182. if (alg[0] !== undefined && key.type !== alg[0]) {
  58183. throw (new InvalidAlgorithmError('options.key must be a ' +
  58184. alg[0].toUpperCase() + ' key, was given a ' +
  58185. key.type.toUpperCase() + ' key instead'));
  58186. }
  58187. this.rs_signer = key.createSign(alg[1]);
  58188. } else {
  58189. throw (new TypeError('options.sign (func) or options.key is required'));
  58190. }
  58191. this.rs_headers = [];
  58192. this.rs_lines = [];
  58193. }
  58194. /**
  58195. * Adds a header to be signed, with its value, into this signer.
  58196. *
  58197. * @param {String} header
  58198. * @param {String} value
  58199. * @return {String} value written
  58200. */
  58201. RequestSigner.prototype.writeHeader = function (header, value) {
  58202. assert.string(header, 'header');
  58203. header = header.toLowerCase();
  58204. assert.string(value, 'value');
  58205. this.rs_headers.push(header);
  58206. if (this.rs_signFunc) {
  58207. this.rs_lines.push(header + ': ' + value);
  58208. } else {
  58209. var line = header + ': ' + value;
  58210. if (this.rs_headers.length > 0)
  58211. line = '\n' + line;
  58212. this.rs_signer.update(line);
  58213. }
  58214. return (value);
  58215. };
  58216. /**
  58217. * Adds a default Date header, returning its value.
  58218. *
  58219. * @return {String}
  58220. */
  58221. RequestSigner.prototype.writeDateHeader = function () {
  58222. return (this.writeHeader('date', jsprim.rfc1123(new Date())));
  58223. };
  58224. /**
  58225. * Adds the request target line to be signed.
  58226. *
  58227. * @param {String} method, HTTP method (e.g. 'get', 'post', 'put')
  58228. * @param {String} path
  58229. */
  58230. RequestSigner.prototype.writeTarget = function (method, path) {
  58231. assert.string(method, 'method');
  58232. assert.string(path, 'path');
  58233. method = method.toLowerCase();
  58234. this.writeHeader('(request-target)', method + ' ' + path);
  58235. };
  58236. /**
  58237. * Calculate the value for the Authorization header on this request
  58238. * asynchronously.
  58239. *
  58240. * @param {Func} callback (err, authz)
  58241. */
  58242. RequestSigner.prototype.sign = function (cb) {
  58243. assert.func(cb, 'callback');
  58244. if (this.rs_headers.length < 1)
  58245. throw (new Error('At least one header must be signed'));
  58246. var alg, authz;
  58247. if (this.rs_signFunc) {
  58248. var data = this.rs_lines.join('\n');
  58249. var self = this;
  58250. this.rs_signFunc(data, function (err, sig) {
  58251. if (err) {
  58252. cb(err);
  58253. return;
  58254. }
  58255. try {
  58256. assert.object(sig, 'signature');
  58257. assert.string(sig.keyId, 'signature.keyId');
  58258. assert.string(sig.algorithm, 'signature.algorithm');
  58259. assert.string(sig.signature, 'signature.signature');
  58260. alg = validateAlgorithm(sig.algorithm);
  58261. authz = sprintf(AUTHZ_FMT,
  58262. sig.keyId,
  58263. sig.algorithm,
  58264. self.rs_headers.join(' '),
  58265. sig.signature);
  58266. } catch (e) {
  58267. cb(e);
  58268. return;
  58269. }
  58270. cb(null, authz);
  58271. });
  58272. } else {
  58273. try {
  58274. var sigObj = this.rs_signer.sign();
  58275. } catch (e) {
  58276. cb(e);
  58277. return;
  58278. }
  58279. alg = (this.rs_alg[0] || this.rs_key.type) + '-' + sigObj.hashAlgorithm;
  58280. var signature = sigObj.toString();
  58281. authz = sprintf(AUTHZ_FMT,
  58282. this.rs_keyId,
  58283. alg,
  58284. this.rs_headers.join(' '),
  58285. signature);
  58286. cb(null, authz);
  58287. }
  58288. };
  58289. ///--- Exported API
  58290. module.exports = {
  58291. /**
  58292. * Identifies whether a given object is a request signer or not.
  58293. *
  58294. * @param {Object} object, the object to identify
  58295. * @returns {Boolean}
  58296. */
  58297. isSigner: function (obj) {
  58298. if (typeof (obj) === 'object' && obj instanceof RequestSigner)
  58299. return (true);
  58300. return (false);
  58301. },
  58302. /**
  58303. * Creates a request signer, used to asynchronously build a signature
  58304. * for a request (does not have to be an http.ClientRequest).
  58305. *
  58306. * @param {Object} options, either:
  58307. * - {String} keyId
  58308. * - {String|Buffer} key
  58309. * - {String} algorithm (optional, required for HMAC)
  58310. * or:
  58311. * - {Func} sign (data, cb)
  58312. * @return {RequestSigner}
  58313. */
  58314. createSigner: function createSigner(options) {
  58315. return (new RequestSigner(options));
  58316. },
  58317. /**
  58318. * Adds an 'Authorization' header to an http.ClientRequest object.
  58319. *
  58320. * Note that this API will add a Date header if it's not already set. Any
  58321. * other headers in the options.headers array MUST be present, or this
  58322. * will throw.
  58323. *
  58324. * You shouldn't need to check the return type; it's just there if you want
  58325. * to be pedantic.
  58326. *
  58327. * The optional flag indicates whether parsing should use strict enforcement
  58328. * of the version draft-cavage-http-signatures-04 of the spec or beyond.
  58329. * The default is to be loose and support
  58330. * older versions for compatibility.
  58331. *
  58332. * @param {Object} request an instance of http.ClientRequest.
  58333. * @param {Object} options signing parameters object:
  58334. * - {String} keyId required.
  58335. * - {String} key required (either a PEM or HMAC key).
  58336. * - {Array} headers optional; defaults to ['date'].
  58337. * - {String} algorithm optional (unless key is HMAC);
  58338. * default is the same as the sshpk default
  58339. * signing algorithm for the type of key given
  58340. * - {String} httpVersion optional; defaults to '1.1'.
  58341. * - {Boolean} strict optional; defaults to 'false'.
  58342. * @return {Boolean} true if Authorization (and optionally Date) were added.
  58343. * @throws {TypeError} on bad parameter types (input).
  58344. * @throws {InvalidAlgorithmError} if algorithm was bad or incompatible with
  58345. * the given key.
  58346. * @throws {sshpk.KeyParseError} if key was bad.
  58347. * @throws {MissingHeaderError} if a header to be signed was specified but
  58348. * was not present.
  58349. */
  58350. signRequest: function signRequest(request, options) {
  58351. assert.object(request, 'request');
  58352. assert.object(options, 'options');
  58353. assert.optionalString(options.algorithm, 'options.algorithm');
  58354. assert.string(options.keyId, 'options.keyId');
  58355. assert.optionalArrayOfString(options.headers, 'options.headers');
  58356. assert.optionalString(options.httpVersion, 'options.httpVersion');
  58357. if (!request.getHeader('Date'))
  58358. request.setHeader('Date', jsprim.rfc1123(new Date()));
  58359. if (!options.headers)
  58360. options.headers = ['date'];
  58361. if (!options.httpVersion)
  58362. options.httpVersion = '1.1';
  58363. var alg = [];
  58364. if (options.algorithm) {
  58365. options.algorithm = options.algorithm.toLowerCase();
  58366. alg = validateAlgorithm(options.algorithm);
  58367. }
  58368. var i;
  58369. var stringToSign = '';
  58370. for (i = 0; i < options.headers.length; i++) {
  58371. if (typeof (options.headers[i]) !== 'string')
  58372. throw new TypeError('options.headers must be an array of Strings');
  58373. var h = options.headers[i].toLowerCase();
  58374. if (h === 'request-line') {
  58375. if (!options.strict) {
  58376. /**
  58377. * We allow headers from the older spec drafts if strict parsing isn't
  58378. * specified in options.
  58379. */
  58380. stringToSign +=
  58381. request.method + ' ' + request.path + ' HTTP/' +
  58382. options.httpVersion;
  58383. } else {
  58384. /* Strict parsing doesn't allow older draft headers. */
  58385. throw (new StrictParsingError('request-line is not a valid header ' +
  58386. 'with strict parsing enabled.'));
  58387. }
  58388. } else if (h === '(request-target)') {
  58389. stringToSign +=
  58390. '(request-target): ' + request.method.toLowerCase() + ' ' +
  58391. request.path;
  58392. } else {
  58393. var value = request.getHeader(h);
  58394. if (value === undefined || value === '') {
  58395. throw new MissingHeaderError(h + ' was not in the request');
  58396. }
  58397. stringToSign += h + ': ' + value;
  58398. }
  58399. if ((i + 1) < options.headers.length)
  58400. stringToSign += '\n';
  58401. }
  58402. /* This is just for unit tests. */
  58403. if (request.hasOwnProperty('_stringToSign')) {
  58404. request._stringToSign = stringToSign;
  58405. }
  58406. var signature;
  58407. if (alg[0] === 'hmac') {
  58408. if (typeof (options.key) !== 'string' && !Buffer.isBuffer(options.key))
  58409. throw (new TypeError('options.key must be a string or Buffer'));
  58410. var hmac = crypto.createHmac(alg[1].toUpperCase(), options.key);
  58411. hmac.update(stringToSign);
  58412. signature = hmac.digest('base64');
  58413. } else {
  58414. var key = options.key;
  58415. if (typeof (key) === 'string' || Buffer.isBuffer(key))
  58416. key = sshpk.parsePrivateKey(options.key);
  58417. assert.ok(sshpk.PrivateKey.isPrivateKey(key, [1, 2]),
  58418. 'options.key must be a sshpk.PrivateKey');
  58419. if (!PK_ALGOS[key.type]) {
  58420. throw (new InvalidAlgorithmError(key.type.toUpperCase() + ' type ' +
  58421. 'keys are not supported'));
  58422. }
  58423. if (alg[0] !== undefined && key.type !== alg[0]) {
  58424. throw (new InvalidAlgorithmError('options.key must be a ' +
  58425. alg[0].toUpperCase() + ' key, was given a ' +
  58426. key.type.toUpperCase() + ' key instead'));
  58427. }
  58428. var signer = key.createSign(alg[1]);
  58429. signer.update(stringToSign);
  58430. var sigObj = signer.sign();
  58431. if (!HASH_ALGOS[sigObj.hashAlgorithm]) {
  58432. throw (new InvalidAlgorithmError(sigObj.hashAlgorithm.toUpperCase() +
  58433. ' is not a supported hash algorithm'));
  58434. }
  58435. options.algorithm = key.type + '-' + sigObj.hashAlgorithm;
  58436. signature = sigObj.toString();
  58437. assert.notStrictEqual(signature, '', 'empty signature produced');
  58438. }
  58439. var authzHeaderName = options.authorizationHeaderName || 'Authorization';
  58440. request.setHeader(authzHeaderName, sprintf(AUTHZ_FMT,
  58441. options.keyId,
  58442. options.algorithm,
  58443. options.headers.join(' '),
  58444. signature));
  58445. return true;
  58446. }
  58447. };
  58448. /***/ }),
  58449. /* 552 */
  58450. /***/ (function(module, exports, __webpack_require__) {
  58451. /*
  58452. * lib/jsprim.js: utilities for primitive JavaScript types
  58453. */
  58454. var mod_assert = __webpack_require__(3);
  58455. var mod_util = __webpack_require__(2);
  58456. var mod_extsprintf = __webpack_require__(353);
  58457. var mod_verror = __webpack_require__(553);
  58458. var mod_jsonschema = __webpack_require__(554);
  58459. /*
  58460. * Public interface
  58461. */
  58462. exports.deepCopy = deepCopy;
  58463. exports.deepEqual = deepEqual;
  58464. exports.isEmpty = isEmpty;
  58465. exports.hasKey = hasKey;
  58466. exports.forEachKey = forEachKey;
  58467. exports.pluck = pluck;
  58468. exports.flattenObject = flattenObject;
  58469. exports.flattenIter = flattenIter;
  58470. exports.validateJsonObject = validateJsonObjectJS;
  58471. exports.validateJsonObjectJS = validateJsonObjectJS;
  58472. exports.randElt = randElt;
  58473. exports.extraProperties = extraProperties;
  58474. exports.mergeObjects = mergeObjects;
  58475. exports.startsWith = startsWith;
  58476. exports.endsWith = endsWith;
  58477. exports.parseInteger = parseInteger;
  58478. exports.iso8601 = iso8601;
  58479. exports.rfc1123 = rfc1123;
  58480. exports.parseDateTime = parseDateTime;
  58481. exports.hrtimediff = hrtimeDiff;
  58482. exports.hrtimeDiff = hrtimeDiff;
  58483. exports.hrtimeAccum = hrtimeAccum;
  58484. exports.hrtimeAdd = hrtimeAdd;
  58485. exports.hrtimeNanosec = hrtimeNanosec;
  58486. exports.hrtimeMicrosec = hrtimeMicrosec;
  58487. exports.hrtimeMillisec = hrtimeMillisec;
  58488. /*
  58489. * Deep copy an acyclic *basic* Javascript object. This only handles basic
  58490. * scalars (strings, numbers, booleans) and arbitrarily deep arrays and objects
  58491. * containing these. This does *not* handle instances of other classes.
  58492. */
  58493. function deepCopy(obj)
  58494. {
  58495. var ret, key;
  58496. var marker = '__deepCopy';
  58497. if (obj && obj[marker])
  58498. throw (new Error('attempted deep copy of cyclic object'));
  58499. if (obj && obj.constructor == Object) {
  58500. ret = {};
  58501. obj[marker] = true;
  58502. for (key in obj) {
  58503. if (key == marker)
  58504. continue;
  58505. ret[key] = deepCopy(obj[key]);
  58506. }
  58507. delete (obj[marker]);
  58508. return (ret);
  58509. }
  58510. if (obj && obj.constructor == Array) {
  58511. ret = [];
  58512. obj[marker] = true;
  58513. for (key = 0; key < obj.length; key++)
  58514. ret.push(deepCopy(obj[key]));
  58515. delete (obj[marker]);
  58516. return (ret);
  58517. }
  58518. /*
  58519. * It must be a primitive type -- just return it.
  58520. */
  58521. return (obj);
  58522. }
  58523. function deepEqual(obj1, obj2)
  58524. {
  58525. if (typeof (obj1) != typeof (obj2))
  58526. return (false);
  58527. if (obj1 === null || obj2 === null || typeof (obj1) != 'object')
  58528. return (obj1 === obj2);
  58529. if (obj1.constructor != obj2.constructor)
  58530. return (false);
  58531. var k;
  58532. for (k in obj1) {
  58533. if (!obj2.hasOwnProperty(k))
  58534. return (false);
  58535. if (!deepEqual(obj1[k], obj2[k]))
  58536. return (false);
  58537. }
  58538. for (k in obj2) {
  58539. if (!obj1.hasOwnProperty(k))
  58540. return (false);
  58541. }
  58542. return (true);
  58543. }
  58544. function isEmpty(obj)
  58545. {
  58546. var key;
  58547. for (key in obj)
  58548. return (false);
  58549. return (true);
  58550. }
  58551. function hasKey(obj, key)
  58552. {
  58553. mod_assert.equal(typeof (key), 'string');
  58554. return (Object.prototype.hasOwnProperty.call(obj, key));
  58555. }
  58556. function forEachKey(obj, callback)
  58557. {
  58558. for (var key in obj) {
  58559. if (hasKey(obj, key)) {
  58560. callback(key, obj[key]);
  58561. }
  58562. }
  58563. }
  58564. function pluck(obj, key)
  58565. {
  58566. mod_assert.equal(typeof (key), 'string');
  58567. return (pluckv(obj, key));
  58568. }
  58569. function pluckv(obj, key)
  58570. {
  58571. if (obj === null || typeof (obj) !== 'object')
  58572. return (undefined);
  58573. if (obj.hasOwnProperty(key))
  58574. return (obj[key]);
  58575. var i = key.indexOf('.');
  58576. if (i == -1)
  58577. return (undefined);
  58578. var key1 = key.substr(0, i);
  58579. if (!obj.hasOwnProperty(key1))
  58580. return (undefined);
  58581. return (pluckv(obj[key1], key.substr(i + 1)));
  58582. }
  58583. /*
  58584. * Invoke callback(row) for each entry in the array that would be returned by
  58585. * flattenObject(data, depth). This is just like flattenObject(data,
  58586. * depth).forEach(callback), except that the intermediate array is never
  58587. * created.
  58588. */
  58589. function flattenIter(data, depth, callback)
  58590. {
  58591. doFlattenIter(data, depth, [], callback);
  58592. }
  58593. function doFlattenIter(data, depth, accum, callback)
  58594. {
  58595. var each;
  58596. var key;
  58597. if (depth === 0) {
  58598. each = accum.slice(0);
  58599. each.push(data);
  58600. callback(each);
  58601. return;
  58602. }
  58603. mod_assert.ok(data !== null);
  58604. mod_assert.equal(typeof (data), 'object');
  58605. mod_assert.equal(typeof (depth), 'number');
  58606. mod_assert.ok(depth >= 0);
  58607. for (key in data) {
  58608. each = accum.slice(0);
  58609. each.push(key);
  58610. doFlattenIter(data[key], depth - 1, each, callback);
  58611. }
  58612. }
  58613. function flattenObject(data, depth)
  58614. {
  58615. if (depth === 0)
  58616. return ([ data ]);
  58617. mod_assert.ok(data !== null);
  58618. mod_assert.equal(typeof (data), 'object');
  58619. mod_assert.equal(typeof (depth), 'number');
  58620. mod_assert.ok(depth >= 0);
  58621. var rv = [];
  58622. var key;
  58623. for (key in data) {
  58624. flattenObject(data[key], depth - 1).forEach(function (p) {
  58625. rv.push([ key ].concat(p));
  58626. });
  58627. }
  58628. return (rv);
  58629. }
  58630. function startsWith(str, prefix)
  58631. {
  58632. return (str.substr(0, prefix.length) == prefix);
  58633. }
  58634. function endsWith(str, suffix)
  58635. {
  58636. return (str.substr(
  58637. str.length - suffix.length, suffix.length) == suffix);
  58638. }
  58639. function iso8601(d)
  58640. {
  58641. if (typeof (d) == 'number')
  58642. d = new Date(d);
  58643. mod_assert.ok(d.constructor === Date);
  58644. return (mod_extsprintf.sprintf('%4d-%02d-%02dT%02d:%02d:%02d.%03dZ',
  58645. d.getUTCFullYear(), d.getUTCMonth() + 1, d.getUTCDate(),
  58646. d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(),
  58647. d.getUTCMilliseconds()));
  58648. }
  58649. var RFC1123_MONTHS = [
  58650. 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
  58651. 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
  58652. var RFC1123_DAYS = [
  58653. 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
  58654. function rfc1123(date) {
  58655. return (mod_extsprintf.sprintf('%s, %02d %s %04d %02d:%02d:%02d GMT',
  58656. RFC1123_DAYS[date.getUTCDay()], date.getUTCDate(),
  58657. RFC1123_MONTHS[date.getUTCMonth()], date.getUTCFullYear(),
  58658. date.getUTCHours(), date.getUTCMinutes(),
  58659. date.getUTCSeconds()));
  58660. }
  58661. /*
  58662. * Parses a date expressed as a string, as either a number of milliseconds since
  58663. * the epoch or any string format that Date accepts, giving preference to the
  58664. * former where these two sets overlap (e.g., small numbers).
  58665. */
  58666. function parseDateTime(str)
  58667. {
  58668. /*
  58669. * This is irritatingly implicit, but significantly more concise than
  58670. * alternatives. The "+str" will convert a string containing only a
  58671. * number directly to a Number, or NaN for other strings. Thus, if the
  58672. * conversion succeeds, we use it (this is the milliseconds-since-epoch
  58673. * case). Otherwise, we pass the string directly to the Date
  58674. * constructor to parse.
  58675. */
  58676. var numeric = +str;
  58677. if (!isNaN(numeric)) {
  58678. return (new Date(numeric));
  58679. } else {
  58680. return (new Date(str));
  58681. }
  58682. }
  58683. /*
  58684. * Number.*_SAFE_INTEGER isn't present before node v0.12, so we hardcode
  58685. * the ES6 definitions here, while allowing for them to someday be higher.
  58686. */
  58687. var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
  58688. var MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER || -9007199254740991;
  58689. /*
  58690. * Default options for parseInteger().
  58691. */
  58692. var PI_DEFAULTS = {
  58693. base: 10,
  58694. allowSign: true,
  58695. allowPrefix: false,
  58696. allowTrailing: false,
  58697. allowImprecise: false,
  58698. trimWhitespace: false,
  58699. leadingZeroIsOctal: false
  58700. };
  58701. var CP_0 = 0x30;
  58702. var CP_9 = 0x39;
  58703. var CP_A = 0x41;
  58704. var CP_B = 0x42;
  58705. var CP_O = 0x4f;
  58706. var CP_T = 0x54;
  58707. var CP_X = 0x58;
  58708. var CP_Z = 0x5a;
  58709. var CP_a = 0x61;
  58710. var CP_b = 0x62;
  58711. var CP_o = 0x6f;
  58712. var CP_t = 0x74;
  58713. var CP_x = 0x78;
  58714. var CP_z = 0x7a;
  58715. var PI_CONV_DEC = 0x30;
  58716. var PI_CONV_UC = 0x37;
  58717. var PI_CONV_LC = 0x57;
  58718. /*
  58719. * A stricter version of parseInt() that provides options for changing what
  58720. * is an acceptable string (for example, disallowing trailing characters).
  58721. */
  58722. function parseInteger(str, uopts)
  58723. {
  58724. mod_assert.string(str, 'str');
  58725. mod_assert.optionalObject(uopts, 'options');
  58726. var baseOverride = false;
  58727. var options = PI_DEFAULTS;
  58728. if (uopts) {
  58729. baseOverride = hasKey(uopts, 'base');
  58730. options = mergeObjects(options, uopts);
  58731. mod_assert.number(options.base, 'options.base');
  58732. mod_assert.ok(options.base >= 2, 'options.base >= 2');
  58733. mod_assert.ok(options.base <= 36, 'options.base <= 36');
  58734. mod_assert.bool(options.allowSign, 'options.allowSign');
  58735. mod_assert.bool(options.allowPrefix, 'options.allowPrefix');
  58736. mod_assert.bool(options.allowTrailing,
  58737. 'options.allowTrailing');
  58738. mod_assert.bool(options.allowImprecise,
  58739. 'options.allowImprecise');
  58740. mod_assert.bool(options.trimWhitespace,
  58741. 'options.trimWhitespace');
  58742. mod_assert.bool(options.leadingZeroIsOctal,
  58743. 'options.leadingZeroIsOctal');
  58744. if (options.leadingZeroIsOctal) {
  58745. mod_assert.ok(!baseOverride,
  58746. '"base" and "leadingZeroIsOctal" are ' +
  58747. 'mutually exclusive');
  58748. }
  58749. }
  58750. var c;
  58751. var pbase = -1;
  58752. var base = options.base;
  58753. var start;
  58754. var mult = 1;
  58755. var value = 0;
  58756. var idx = 0;
  58757. var len = str.length;
  58758. /* Trim any whitespace on the left side. */
  58759. if (options.trimWhitespace) {
  58760. while (idx < len && isSpace(str.charCodeAt(idx))) {
  58761. ++idx;
  58762. }
  58763. }
  58764. /* Check the number for a leading sign. */
  58765. if (options.allowSign) {
  58766. if (str[idx] === '-') {
  58767. idx += 1;
  58768. mult = -1;
  58769. } else if (str[idx] === '+') {
  58770. idx += 1;
  58771. }
  58772. }
  58773. /* Parse the base-indicating prefix if there is one. */
  58774. if (str[idx] === '0') {
  58775. if (options.allowPrefix) {
  58776. pbase = prefixToBase(str.charCodeAt(idx + 1));
  58777. if (pbase !== -1 && (!baseOverride || pbase === base)) {
  58778. base = pbase;
  58779. idx += 2;
  58780. }
  58781. }
  58782. if (pbase === -1 && options.leadingZeroIsOctal) {
  58783. base = 8;
  58784. }
  58785. }
  58786. /* Parse the actual digits. */
  58787. for (start = idx; idx < len; ++idx) {
  58788. c = translateDigit(str.charCodeAt(idx));
  58789. if (c !== -1 && c < base) {
  58790. value *= base;
  58791. value += c;
  58792. } else {
  58793. break;
  58794. }
  58795. }
  58796. /* If we didn't parse any digits, we have an invalid number. */
  58797. if (start === idx) {
  58798. return (new Error('invalid number: ' + JSON.stringify(str)));
  58799. }
  58800. /* Trim any whitespace on the right side. */
  58801. if (options.trimWhitespace) {
  58802. while (idx < len && isSpace(str.charCodeAt(idx))) {
  58803. ++idx;
  58804. }
  58805. }
  58806. /* Check for trailing characters. */
  58807. if (idx < len && !options.allowTrailing) {
  58808. return (new Error('trailing characters after number: ' +
  58809. JSON.stringify(str.slice(idx))));
  58810. }
  58811. /* If our value is 0, we return now, to avoid returning -0. */
  58812. if (value === 0) {
  58813. return (0);
  58814. }
  58815. /* Calculate our final value. */
  58816. var result = value * mult;
  58817. /*
  58818. * If the string represents a value that cannot be precisely represented
  58819. * by JavaScript, then we want to check that:
  58820. *
  58821. * - We never increased the value past MAX_SAFE_INTEGER
  58822. * - We don't make the result negative and below MIN_SAFE_INTEGER
  58823. *
  58824. * Because we only ever increment the value during parsing, there's no
  58825. * chance of moving past MAX_SAFE_INTEGER and then dropping below it
  58826. * again, losing precision in the process. This means that we only need
  58827. * to do our checks here, at the end.
  58828. */
  58829. if (!options.allowImprecise &&
  58830. (value > MAX_SAFE_INTEGER || result < MIN_SAFE_INTEGER)) {
  58831. return (new Error('number is outside of the supported range: ' +
  58832. JSON.stringify(str.slice(start, idx))));
  58833. }
  58834. return (result);
  58835. }
  58836. /*
  58837. * Interpret a character code as a base-36 digit.
  58838. */
  58839. function translateDigit(d)
  58840. {
  58841. if (d >= CP_0 && d <= CP_9) {
  58842. /* '0' to '9' -> 0 to 9 */
  58843. return (d - PI_CONV_DEC);
  58844. } else if (d >= CP_A && d <= CP_Z) {
  58845. /* 'A' - 'Z' -> 10 to 35 */
  58846. return (d - PI_CONV_UC);
  58847. } else if (d >= CP_a && d <= CP_z) {
  58848. /* 'a' - 'z' -> 10 to 35 */
  58849. return (d - PI_CONV_LC);
  58850. } else {
  58851. /* Invalid character code */
  58852. return (-1);
  58853. }
  58854. }
  58855. /*
  58856. * Test if a value matches the ECMAScript definition of trimmable whitespace.
  58857. */
  58858. function isSpace(c)
  58859. {
  58860. return (c === 0x20) ||
  58861. (c >= 0x0009 && c <= 0x000d) ||
  58862. (c === 0x00a0) ||
  58863. (c === 0x1680) ||
  58864. (c === 0x180e) ||
  58865. (c >= 0x2000 && c <= 0x200a) ||
  58866. (c === 0x2028) ||
  58867. (c === 0x2029) ||
  58868. (c === 0x202f) ||
  58869. (c === 0x205f) ||
  58870. (c === 0x3000) ||
  58871. (c === 0xfeff);
  58872. }
  58873. /*
  58874. * Determine which base a character indicates (e.g., 'x' indicates hex).
  58875. */
  58876. function prefixToBase(c)
  58877. {
  58878. if (c === CP_b || c === CP_B) {
  58879. /* 0b/0B (binary) */
  58880. return (2);
  58881. } else if (c === CP_o || c === CP_O) {
  58882. /* 0o/0O (octal) */
  58883. return (8);
  58884. } else if (c === CP_t || c === CP_T) {
  58885. /* 0t/0T (decimal) */
  58886. return (10);
  58887. } else if (c === CP_x || c === CP_X) {
  58888. /* 0x/0X (hexadecimal) */
  58889. return (16);
  58890. } else {
  58891. /* Not a meaningful character */
  58892. return (-1);
  58893. }
  58894. }
  58895. function validateJsonObjectJS(schema, input)
  58896. {
  58897. var report = mod_jsonschema.validate(input, schema);
  58898. if (report.errors.length === 0)
  58899. return (null);
  58900. /* Currently, we only do anything useful with the first error. */
  58901. var error = report.errors[0];
  58902. /* The failed property is given by a URI with an irrelevant prefix. */
  58903. var propname = error['property'];
  58904. var reason = error['message'].toLowerCase();
  58905. var i, j;
  58906. /*
  58907. * There's at least one case where the property error message is
  58908. * confusing at best. We work around this here.
  58909. */
  58910. if ((i = reason.indexOf('the property ')) != -1 &&
  58911. (j = reason.indexOf(' is not defined in the schema and the ' +
  58912. 'schema does not allow additional properties')) != -1) {
  58913. i += 'the property '.length;
  58914. if (propname === '')
  58915. propname = reason.substr(i, j - i);
  58916. else
  58917. propname = propname + '.' + reason.substr(i, j - i);
  58918. reason = 'unsupported property';
  58919. }
  58920. var rv = new mod_verror.VError('property "%s": %s', propname, reason);
  58921. rv.jsv_details = error;
  58922. return (rv);
  58923. }
  58924. function randElt(arr)
  58925. {
  58926. mod_assert.ok(Array.isArray(arr) && arr.length > 0,
  58927. 'randElt argument must be a non-empty array');
  58928. return (arr[Math.floor(Math.random() * arr.length)]);
  58929. }
  58930. function assertHrtime(a)
  58931. {
  58932. mod_assert.ok(a[0] >= 0 && a[1] >= 0,
  58933. 'negative numbers not allowed in hrtimes');
  58934. mod_assert.ok(a[1] < 1e9, 'nanoseconds column overflow');
  58935. }
  58936. /*
  58937. * Compute the time elapsed between hrtime readings A and B, where A is later
  58938. * than B. hrtime readings come from Node's process.hrtime(). There is no
  58939. * defined way to represent negative deltas, so it's illegal to diff B from A
  58940. * where the time denoted by B is later than the time denoted by A. If this
  58941. * becomes valuable, we can define a representation and extend the
  58942. * implementation to support it.
  58943. */
  58944. function hrtimeDiff(a, b)
  58945. {
  58946. assertHrtime(a);
  58947. assertHrtime(b);
  58948. mod_assert.ok(a[0] > b[0] || (a[0] == b[0] && a[1] >= b[1]),
  58949. 'negative differences not allowed');
  58950. var rv = [ a[0] - b[0], 0 ];
  58951. if (a[1] >= b[1]) {
  58952. rv[1] = a[1] - b[1];
  58953. } else {
  58954. rv[0]--;
  58955. rv[1] = 1e9 - (b[1] - a[1]);
  58956. }
  58957. return (rv);
  58958. }
  58959. /*
  58960. * Convert a hrtime reading from the array format returned by Node's
  58961. * process.hrtime() into a scalar number of nanoseconds.
  58962. */
  58963. function hrtimeNanosec(a)
  58964. {
  58965. assertHrtime(a);
  58966. return (Math.floor(a[0] * 1e9 + a[1]));
  58967. }
  58968. /*
  58969. * Convert a hrtime reading from the array format returned by Node's
  58970. * process.hrtime() into a scalar number of microseconds.
  58971. */
  58972. function hrtimeMicrosec(a)
  58973. {
  58974. assertHrtime(a);
  58975. return (Math.floor(a[0] * 1e6 + a[1] / 1e3));
  58976. }
  58977. /*
  58978. * Convert a hrtime reading from the array format returned by Node's
  58979. * process.hrtime() into a scalar number of milliseconds.
  58980. */
  58981. function hrtimeMillisec(a)
  58982. {
  58983. assertHrtime(a);
  58984. return (Math.floor(a[0] * 1e3 + a[1] / 1e6));
  58985. }
  58986. /*
  58987. * Add two hrtime readings A and B, overwriting A with the result of the
  58988. * addition. This function is useful for accumulating several hrtime intervals
  58989. * into a counter. Returns A.
  58990. */
  58991. function hrtimeAccum(a, b)
  58992. {
  58993. assertHrtime(a);
  58994. assertHrtime(b);
  58995. /*
  58996. * Accumulate the nanosecond component.
  58997. */
  58998. a[1] += b[1];
  58999. if (a[1] >= 1e9) {
  59000. /*
  59001. * The nanosecond component overflowed, so carry to the seconds
  59002. * field.
  59003. */
  59004. a[0]++;
  59005. a[1] -= 1e9;
  59006. }
  59007. /*
  59008. * Accumulate the seconds component.
  59009. */
  59010. a[0] += b[0];
  59011. return (a);
  59012. }
  59013. /*
  59014. * Add two hrtime readings A and B, returning the result as a new hrtime array.
  59015. * Does not modify either input argument.
  59016. */
  59017. function hrtimeAdd(a, b)
  59018. {
  59019. assertHrtime(a);
  59020. var rv = [ a[0], a[1] ];
  59021. return (hrtimeAccum(rv, b));
  59022. }
  59023. /*
  59024. * Check an object for unexpected properties. Accepts the object to check, and
  59025. * an array of allowed property names (strings). Returns an array of key names
  59026. * that were found on the object, but did not appear in the list of allowed
  59027. * properties. If no properties were found, the returned array will be of
  59028. * zero length.
  59029. */
  59030. function extraProperties(obj, allowed)
  59031. {
  59032. mod_assert.ok(typeof (obj) === 'object' && obj !== null,
  59033. 'obj argument must be a non-null object');
  59034. mod_assert.ok(Array.isArray(allowed),
  59035. 'allowed argument must be an array of strings');
  59036. for (var i = 0; i < allowed.length; i++) {
  59037. mod_assert.ok(typeof (allowed[i]) === 'string',
  59038. 'allowed argument must be an array of strings');
  59039. }
  59040. return (Object.keys(obj).filter(function (key) {
  59041. return (allowed.indexOf(key) === -1);
  59042. }));
  59043. }
  59044. /*
  59045. * Given three sets of properties "provided" (may be undefined), "overrides"
  59046. * (required), and "defaults" (may be undefined), construct an object containing
  59047. * the union of these sets with "overrides" overriding "provided", and
  59048. * "provided" overriding "defaults". None of the input objects are modified.
  59049. */
  59050. function mergeObjects(provided, overrides, defaults)
  59051. {
  59052. var rv, k;
  59053. rv = {};
  59054. if (defaults) {
  59055. for (k in defaults)
  59056. rv[k] = defaults[k];
  59057. }
  59058. if (provided) {
  59059. for (k in provided)
  59060. rv[k] = provided[k];
  59061. }
  59062. if (overrides) {
  59063. for (k in overrides)
  59064. rv[k] = overrides[k];
  59065. }
  59066. return (rv);
  59067. }
  59068. /***/ }),
  59069. /* 553 */
  59070. /***/ (function(module, exports, __webpack_require__) {
  59071. /*
  59072. * verror.js: richer JavaScript errors
  59073. */
  59074. var mod_assertplus = __webpack_require__(3);
  59075. var mod_util = __webpack_require__(2);
  59076. var mod_extsprintf = __webpack_require__(353);
  59077. var mod_isError = __webpack_require__(61).isError;
  59078. var sprintf = mod_extsprintf.sprintf;
  59079. /*
  59080. * Public interface
  59081. */
  59082. /* So you can 'var VError = require('verror')' */
  59083. module.exports = VError;
  59084. /* For compatibility */
  59085. VError.VError = VError;
  59086. /* Other exported classes */
  59087. VError.SError = SError;
  59088. VError.WError = WError;
  59089. VError.MultiError = MultiError;
  59090. /*
  59091. * Common function used to parse constructor arguments for VError, WError, and
  59092. * SError. Named arguments to this function:
  59093. *
  59094. * strict force strict interpretation of sprintf arguments, even
  59095. * if the options in "argv" don't say so
  59096. *
  59097. * argv error's constructor arguments, which are to be
  59098. * interpreted as described in README.md. For quick
  59099. * reference, "argv" has one of the following forms:
  59100. *
  59101. * [ sprintf_args... ] (argv[0] is a string)
  59102. * [ cause, sprintf_args... ] (argv[0] is an Error)
  59103. * [ options, sprintf_args... ] (argv[0] is an object)
  59104. *
  59105. * This function normalizes these forms, producing an object with the following
  59106. * properties:
  59107. *
  59108. * options equivalent to "options" in third form. This will never
  59109. * be a direct reference to what the caller passed in
  59110. * (i.e., it may be a shallow copy), so it can be freely
  59111. * modified.
  59112. *
  59113. * shortmessage result of sprintf(sprintf_args), taking options.strict
  59114. * into account as described in README.md.
  59115. */
  59116. function parseConstructorArguments(args)
  59117. {
  59118. var argv, options, sprintf_args, shortmessage, k;
  59119. mod_assertplus.object(args, 'args');
  59120. mod_assertplus.bool(args.strict, 'args.strict');
  59121. mod_assertplus.array(args.argv, 'args.argv');
  59122. argv = args.argv;
  59123. /*
  59124. * First, figure out which form of invocation we've been given.
  59125. */
  59126. if (argv.length === 0) {
  59127. options = {};
  59128. sprintf_args = [];
  59129. } else if (mod_isError(argv[0])) {
  59130. options = { 'cause': argv[0] };
  59131. sprintf_args = argv.slice(1);
  59132. } else if (typeof (argv[0]) === 'object') {
  59133. options = {};
  59134. for (k in argv[0]) {
  59135. options[k] = argv[0][k];
  59136. }
  59137. sprintf_args = argv.slice(1);
  59138. } else {
  59139. mod_assertplus.string(argv[0],
  59140. 'first argument to VError, SError, or WError ' +
  59141. 'constructor must be a string, object, or Error');
  59142. options = {};
  59143. sprintf_args = argv;
  59144. }
  59145. /*
  59146. * Now construct the error's message.
  59147. *
  59148. * extsprintf (which we invoke here with our caller's arguments in order
  59149. * to construct this Error's message) is strict in its interpretation of
  59150. * values to be processed by the "%s" specifier. The value passed to
  59151. * extsprintf must actually be a string or something convertible to a
  59152. * String using .toString(). Passing other values (notably "null" and
  59153. * "undefined") is considered a programmer error. The assumption is
  59154. * that if you actually want to print the string "null" or "undefined",
  59155. * then that's easy to do that when you're calling extsprintf; on the
  59156. * other hand, if you did NOT want that (i.e., there's actually a bug
  59157. * where the program assumes some variable is non-null and tries to
  59158. * print it, which might happen when constructing a packet or file in
  59159. * some specific format), then it's better to stop immediately than
  59160. * produce bogus output.
  59161. *
  59162. * However, sometimes the bug is only in the code calling VError, and a
  59163. * programmer might prefer to have the error message contain "null" or
  59164. * "undefined" rather than have the bug in the error path crash the
  59165. * program (making the first bug harder to identify). For that reason,
  59166. * by default VError converts "null" or "undefined" arguments to their
  59167. * string representations and passes those to extsprintf. Programmers
  59168. * desiring the strict behavior can use the SError class or pass the
  59169. * "strict" option to the VError constructor.
  59170. */
  59171. mod_assertplus.object(options);
  59172. if (!options.strict && !args.strict) {
  59173. sprintf_args = sprintf_args.map(function (a) {
  59174. return (a === null ? 'null' :
  59175. a === undefined ? 'undefined' : a);
  59176. });
  59177. }
  59178. if (sprintf_args.length === 0) {
  59179. shortmessage = '';
  59180. } else {
  59181. shortmessage = sprintf.apply(null, sprintf_args);
  59182. }
  59183. return ({
  59184. 'options': options,
  59185. 'shortmessage': shortmessage
  59186. });
  59187. }
  59188. /*
  59189. * See README.md for reference documentation.
  59190. */
  59191. function VError()
  59192. {
  59193. var args, obj, parsed, cause, ctor, message, k;
  59194. args = Array.prototype.slice.call(arguments, 0);
  59195. /*
  59196. * This is a regrettable pattern, but JavaScript's built-in Error class
  59197. * is defined to work this way, so we allow the constructor to be called
  59198. * without "new".
  59199. */
  59200. if (!(this instanceof VError)) {
  59201. obj = Object.create(VError.prototype);
  59202. VError.apply(obj, arguments);
  59203. return (obj);
  59204. }
  59205. /*
  59206. * For convenience and backwards compatibility, we support several
  59207. * different calling forms. Normalize them here.
  59208. */
  59209. parsed = parseConstructorArguments({
  59210. 'argv': args,
  59211. 'strict': false
  59212. });
  59213. /*
  59214. * If we've been given a name, apply it now.
  59215. */
  59216. if (parsed.options.name) {
  59217. mod_assertplus.string(parsed.options.name,
  59218. 'error\'s "name" must be a string');
  59219. this.name = parsed.options.name;
  59220. }
  59221. /*
  59222. * For debugging, we keep track of the original short message (attached
  59223. * this Error particularly) separately from the complete message (which
  59224. * includes the messages of our cause chain).
  59225. */
  59226. this.jse_shortmsg = parsed.shortmessage;
  59227. message = parsed.shortmessage;
  59228. /*
  59229. * If we've been given a cause, record a reference to it and update our
  59230. * message appropriately.
  59231. */
  59232. cause = parsed.options.cause;
  59233. if (cause) {
  59234. mod_assertplus.ok(mod_isError(cause), 'cause is not an Error');
  59235. this.jse_cause = cause;
  59236. if (!parsed.options.skipCauseMessage) {
  59237. message += ': ' + cause.message;
  59238. }
  59239. }
  59240. /*
  59241. * If we've been given an object with properties, shallow-copy that
  59242. * here. We don't want to use a deep copy in case there are non-plain
  59243. * objects here, but we don't want to use the original object in case
  59244. * the caller modifies it later.
  59245. */
  59246. this.jse_info = {};
  59247. if (parsed.options.info) {
  59248. for (k in parsed.options.info) {
  59249. this.jse_info[k] = parsed.options.info[k];
  59250. }
  59251. }
  59252. this.message = message;
  59253. Error.call(this, message);
  59254. if (Error.captureStackTrace) {
  59255. ctor = parsed.options.constructorOpt || this.constructor;
  59256. Error.captureStackTrace(this, ctor);
  59257. }
  59258. return (this);
  59259. }
  59260. mod_util.inherits(VError, Error);
  59261. VError.prototype.name = 'VError';
  59262. VError.prototype.toString = function ve_toString()
  59263. {
  59264. var str = (this.hasOwnProperty('name') && this.name ||
  59265. this.constructor.name || this.constructor.prototype.name);
  59266. if (this.message)
  59267. str += ': ' + this.message;
  59268. return (str);
  59269. };
  59270. /*
  59271. * This method is provided for compatibility. New callers should use
  59272. * VError.cause() instead. That method also uses the saner `null` return value
  59273. * when there is no cause.
  59274. */
  59275. VError.prototype.cause = function ve_cause()
  59276. {
  59277. var cause = VError.cause(this);
  59278. return (cause === null ? undefined : cause);
  59279. };
  59280. /*
  59281. * Static methods
  59282. *
  59283. * These class-level methods are provided so that callers can use them on
  59284. * instances of Errors that are not VErrors. New interfaces should be provided
  59285. * only using static methods to eliminate the class of programming mistake where
  59286. * people fail to check whether the Error object has the corresponding methods.
  59287. */
  59288. VError.cause = function (err)
  59289. {
  59290. mod_assertplus.ok(mod_isError(err), 'err must be an Error');
  59291. return (mod_isError(err.jse_cause) ? err.jse_cause : null);
  59292. };
  59293. VError.info = function (err)
  59294. {
  59295. var rv, cause, k;
  59296. mod_assertplus.ok(mod_isError(err), 'err must be an Error');
  59297. cause = VError.cause(err);
  59298. if (cause !== null) {
  59299. rv = VError.info(cause);
  59300. } else {
  59301. rv = {};
  59302. }
  59303. if (typeof (err.jse_info) == 'object' && err.jse_info !== null) {
  59304. for (k in err.jse_info) {
  59305. rv[k] = err.jse_info[k];
  59306. }
  59307. }
  59308. return (rv);
  59309. };
  59310. VError.findCauseByName = function (err, name)
  59311. {
  59312. var cause;
  59313. mod_assertplus.ok(mod_isError(err), 'err must be an Error');
  59314. mod_assertplus.string(name, 'name');
  59315. mod_assertplus.ok(name.length > 0, 'name cannot be empty');
  59316. for (cause = err; cause !== null; cause = VError.cause(cause)) {
  59317. mod_assertplus.ok(mod_isError(cause));
  59318. if (cause.name == name) {
  59319. return (cause);
  59320. }
  59321. }
  59322. return (null);
  59323. };
  59324. VError.hasCauseWithName = function (err, name)
  59325. {
  59326. return (VError.findCauseByName(err, name) !== null);
  59327. };
  59328. VError.fullStack = function (err)
  59329. {
  59330. mod_assertplus.ok(mod_isError(err), 'err must be an Error');
  59331. var cause = VError.cause(err);
  59332. if (cause) {
  59333. return (err.stack + '\ncaused by: ' + VError.fullStack(cause));
  59334. }
  59335. return (err.stack);
  59336. };
  59337. VError.errorFromList = function (errors)
  59338. {
  59339. mod_assertplus.arrayOfObject(errors, 'errors');
  59340. if (errors.length === 0) {
  59341. return (null);
  59342. }
  59343. errors.forEach(function (e) {
  59344. mod_assertplus.ok(mod_isError(e));
  59345. });
  59346. if (errors.length == 1) {
  59347. return (errors[0]);
  59348. }
  59349. return (new MultiError(errors));
  59350. };
  59351. VError.errorForEach = function (err, func)
  59352. {
  59353. mod_assertplus.ok(mod_isError(err), 'err must be an Error');
  59354. mod_assertplus.func(func, 'func');
  59355. if (err instanceof MultiError) {
  59356. err.errors().forEach(function iterError(e) { func(e); });
  59357. } else {
  59358. func(err);
  59359. }
  59360. };
  59361. /*
  59362. * SError is like VError, but stricter about types. You cannot pass "null" or
  59363. * "undefined" as string arguments to the formatter.
  59364. */
  59365. function SError()
  59366. {
  59367. var args, obj, parsed, options;
  59368. args = Array.prototype.slice.call(arguments, 0);
  59369. if (!(this instanceof SError)) {
  59370. obj = Object.create(SError.prototype);
  59371. SError.apply(obj, arguments);
  59372. return (obj);
  59373. }
  59374. parsed = parseConstructorArguments({
  59375. 'argv': args,
  59376. 'strict': true
  59377. });
  59378. options = parsed.options;
  59379. VError.call(this, options, '%s', parsed.shortmessage);
  59380. return (this);
  59381. }
  59382. /*
  59383. * We don't bother setting SError.prototype.name because once constructed,
  59384. * SErrors are just like VErrors.
  59385. */
  59386. mod_util.inherits(SError, VError);
  59387. /*
  59388. * Represents a collection of errors for the purpose of consumers that generally
  59389. * only deal with one error. Callers can extract the individual errors
  59390. * contained in this object, but may also just treat it as a normal single
  59391. * error, in which case a summary message will be printed.
  59392. */
  59393. function MultiError(errors)
  59394. {
  59395. mod_assertplus.array(errors, 'list of errors');
  59396. mod_assertplus.ok(errors.length > 0, 'must be at least one error');
  59397. this.ase_errors = errors;
  59398. VError.call(this, {
  59399. 'cause': errors[0]
  59400. }, 'first of %d error%s', errors.length, errors.length == 1 ? '' : 's');
  59401. }
  59402. mod_util.inherits(MultiError, VError);
  59403. MultiError.prototype.name = 'MultiError';
  59404. MultiError.prototype.errors = function me_errors()
  59405. {
  59406. return (this.ase_errors.slice(0));
  59407. };
  59408. /*
  59409. * See README.md for reference details.
  59410. */
  59411. function WError()
  59412. {
  59413. var args, obj, parsed, options;
  59414. args = Array.prototype.slice.call(arguments, 0);
  59415. if (!(this instanceof WError)) {
  59416. obj = Object.create(WError.prototype);
  59417. WError.apply(obj, args);
  59418. return (obj);
  59419. }
  59420. parsed = parseConstructorArguments({
  59421. 'argv': args,
  59422. 'strict': false
  59423. });
  59424. options = parsed.options;
  59425. options['skipCauseMessage'] = true;
  59426. VError.call(this, options, '%s', parsed.shortmessage);
  59427. return (this);
  59428. }
  59429. mod_util.inherits(WError, VError);
  59430. WError.prototype.name = 'WError';
  59431. WError.prototype.toString = function we_toString()
  59432. {
  59433. var str = (this.hasOwnProperty('name') && this.name ||
  59434. this.constructor.name || this.constructor.prototype.name);
  59435. if (this.message)
  59436. str += ': ' + this.message;
  59437. if (this.jse_cause && this.jse_cause.message)
  59438. str += '; caused by ' + this.jse_cause.toString();
  59439. return (str);
  59440. };
  59441. /*
  59442. * For purely historical reasons, WError's cause() function allows you to set
  59443. * the cause.
  59444. */
  59445. WError.prototype.cause = function we_cause(c)
  59446. {
  59447. if (mod_isError(c))
  59448. this.jse_cause = c;
  59449. return (this.jse_cause);
  59450. };
  59451. /***/ }),
  59452. /* 554 */
  59453. /***/ (function(module, exports, __webpack_require__) {
  59454. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
  59455. * JSONSchema Validator - Validates JavaScript objects using JSON Schemas
  59456. * (http://www.json.com/json-schema-proposal/)
  59457. *
  59458. * Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com)
  59459. * Licensed under the MIT (MIT-LICENSE.txt) license.
  59460. To use the validator call the validate function with an instance object and an optional schema object.
  59461. If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating),
  59462. that schema will be used to validate and the schema parameter is not necessary (if both exist,
  59463. both validations will occur).
  59464. The validate method will return an array of validation errors. If there are no errors, then an
  59465. empty list will be returned. A validation error will have two properties:
  59466. "property" which indicates which property had the error
  59467. "message" which indicates what the error was
  59468. */
  59469. (function (root, factory) {
  59470. if (true) {
  59471. // AMD. Register as an anonymous module.
  59472. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  59473. return factory();
  59474. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  59475. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  59476. } else if (typeof module === 'object' && module.exports) {
  59477. // Node. Does not work with strict CommonJS, but
  59478. // only CommonJS-like environments that support module.exports,
  59479. // like Node.
  59480. module.exports = factory();
  59481. } else {
  59482. // Browser globals
  59483. root.jsonSchema = factory();
  59484. }
  59485. }(this, function () {// setup primitive classes to be JSON Schema types
  59486. var exports = validate
  59487. exports.Integer = {type:"integer"};
  59488. var primitiveConstructors = {
  59489. String: String,
  59490. Boolean: Boolean,
  59491. Number: Number,
  59492. Object: Object,
  59493. Array: Array,
  59494. Date: Date
  59495. }
  59496. exports.validate = validate;
  59497. function validate(/*Any*/instance,/*Object*/schema) {
  59498. // Summary:
  59499. // To use the validator call JSONSchema.validate with an instance object and an optional schema object.
  59500. // If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating),
  59501. // that schema will be used to validate and the schema parameter is not necessary (if both exist,
  59502. // both validations will occur).
  59503. // The validate method will return an object with two properties:
  59504. // valid: A boolean indicating if the instance is valid by the schema
  59505. // errors: An array of validation errors. If there are no errors, then an
  59506. // empty list will be returned. A validation error will have two properties:
  59507. // property: which indicates which property had the error
  59508. // message: which indicates what the error was
  59509. //
  59510. return validate(instance, schema, {changing: false});//, coerce: false, existingOnly: false});
  59511. };
  59512. exports.checkPropertyChange = function(/*Any*/value,/*Object*/schema, /*String*/property) {
  59513. // Summary:
  59514. // The checkPropertyChange method will check to see if an value can legally be in property with the given schema
  59515. // This is slightly different than the validate method in that it will fail if the schema is readonly and it will
  59516. // not check for self-validation, it is assumed that the passed in value is already internally valid.
  59517. // The checkPropertyChange method will return the same object type as validate, see JSONSchema.validate for
  59518. // information.
  59519. //
  59520. return validate(value, schema, {changing: property || "property"});
  59521. };
  59522. var validate = exports._validate = function(/*Any*/instance,/*Object*/schema,/*Object*/options) {
  59523. if (!options) options = {};
  59524. var _changing = options.changing;
  59525. function getType(schema){
  59526. return schema.type || (primitiveConstructors[schema.name] == schema && schema.name.toLowerCase());
  59527. }
  59528. var errors = [];
  59529. // validate a value against a property definition
  59530. function checkProp(value, schema, path,i){
  59531. var l;
  59532. path += path ? typeof i == 'number' ? '[' + i + ']' : typeof i == 'undefined' ? '' : '.' + i : i;
  59533. function addError(message){
  59534. errors.push({property:path,message:message});
  59535. }
  59536. if((typeof schema != 'object' || schema instanceof Array) && (path || typeof schema != 'function') && !(schema && getType(schema))){
  59537. if(typeof schema == 'function'){
  59538. if(!(value instanceof schema)){
  59539. addError("is not an instance of the class/constructor " + schema.name);
  59540. }
  59541. }else if(schema){
  59542. addError("Invalid schema/property definition " + schema);
  59543. }
  59544. return null;
  59545. }
  59546. if(_changing && schema.readonly){
  59547. addError("is a readonly field, it can not be changed");
  59548. }
  59549. if(schema['extends']){ // if it extends another schema, it must pass that schema as well
  59550. checkProp(value,schema['extends'],path,i);
  59551. }
  59552. // validate a value against a type definition
  59553. function checkType(type,value){
  59554. if(type){
  59555. if(typeof type == 'string' && type != 'any' &&
  59556. (type == 'null' ? value !== null : typeof value != type) &&
  59557. !(value instanceof Array && type == 'array') &&
  59558. !(value instanceof Date && type == 'date') &&
  59559. !(type == 'integer' && value%1===0)){
  59560. return [{property:path,message:(typeof value) + " value found, but a " + type + " is required"}];
  59561. }
  59562. if(type instanceof Array){
  59563. var unionErrors=[];
  59564. for(var j = 0; j < type.length; j++){ // a union type
  59565. if(!(unionErrors=checkType(type[j],value)).length){
  59566. break;
  59567. }
  59568. }
  59569. if(unionErrors.length){
  59570. return unionErrors;
  59571. }
  59572. }else if(typeof type == 'object'){
  59573. var priorErrors = errors;
  59574. errors = [];
  59575. checkProp(value,type,path);
  59576. var theseErrors = errors;
  59577. errors = priorErrors;
  59578. return theseErrors;
  59579. }
  59580. }
  59581. return [];
  59582. }
  59583. if(value === undefined){
  59584. if(schema.required){
  59585. addError("is missing and it is required");
  59586. }
  59587. }else{
  59588. errors = errors.concat(checkType(getType(schema),value));
  59589. if(schema.disallow && !checkType(schema.disallow,value).length){
  59590. addError(" disallowed value was matched");
  59591. }
  59592. if(value !== null){
  59593. if(value instanceof Array){
  59594. if(schema.items){
  59595. var itemsIsArray = schema.items instanceof Array;
  59596. var propDef = schema.items;
  59597. for (i = 0, l = value.length; i < l; i += 1) {
  59598. if (itemsIsArray)
  59599. propDef = schema.items[i];
  59600. if (options.coerce)
  59601. value[i] = options.coerce(value[i], propDef);
  59602. errors.concat(checkProp(value[i],propDef,path,i));
  59603. }
  59604. }
  59605. if(schema.minItems && value.length < schema.minItems){
  59606. addError("There must be a minimum of " + schema.minItems + " in the array");
  59607. }
  59608. if(schema.maxItems && value.length > schema.maxItems){
  59609. addError("There must be a maximum of " + schema.maxItems + " in the array");
  59610. }
  59611. }else if(schema.properties || schema.additionalProperties){
  59612. errors.concat(checkObj(value, schema.properties, path, schema.additionalProperties));
  59613. }
  59614. if(schema.pattern && typeof value == 'string' && !value.match(schema.pattern)){
  59615. addError("does not match the regex pattern " + schema.pattern);
  59616. }
  59617. if(schema.maxLength && typeof value == 'string' && value.length > schema.maxLength){
  59618. addError("may only be " + schema.maxLength + " characters long");
  59619. }
  59620. if(schema.minLength && typeof value == 'string' && value.length < schema.minLength){
  59621. addError("must be at least " + schema.minLength + " characters long");
  59622. }
  59623. if(typeof schema.minimum !== undefined && typeof value == typeof schema.minimum &&
  59624. schema.minimum > value){
  59625. addError("must have a minimum value of " + schema.minimum);
  59626. }
  59627. if(typeof schema.maximum !== undefined && typeof value == typeof schema.maximum &&
  59628. schema.maximum < value){
  59629. addError("must have a maximum value of " + schema.maximum);
  59630. }
  59631. if(schema['enum']){
  59632. var enumer = schema['enum'];
  59633. l = enumer.length;
  59634. var found;
  59635. for(var j = 0; j < l; j++){
  59636. if(enumer[j]===value){
  59637. found=1;
  59638. break;
  59639. }
  59640. }
  59641. if(!found){
  59642. addError("does not have a value in the enumeration " + enumer.join(", "));
  59643. }
  59644. }
  59645. if(typeof schema.maxDecimal == 'number' &&
  59646. (value.toString().match(new RegExp("\\.[0-9]{" + (schema.maxDecimal + 1) + ",}")))){
  59647. addError("may only have " + schema.maxDecimal + " digits of decimal places");
  59648. }
  59649. }
  59650. }
  59651. return null;
  59652. }
  59653. // validate an object against a schema
  59654. function checkObj(instance,objTypeDef,path,additionalProp){
  59655. if(typeof objTypeDef =='object'){
  59656. if(typeof instance != 'object' || instance instanceof Array){
  59657. errors.push({property:path,message:"an object is required"});
  59658. }
  59659. for(var i in objTypeDef){
  59660. if(objTypeDef.hasOwnProperty(i)){
  59661. var value = instance[i];
  59662. // skip _not_ specified properties
  59663. if (value === undefined && options.existingOnly) continue;
  59664. var propDef = objTypeDef[i];
  59665. // set default
  59666. if(value === undefined && propDef["default"]){
  59667. value = instance[i] = propDef["default"];
  59668. }
  59669. if(options.coerce && i in instance){
  59670. value = instance[i] = options.coerce(value, propDef);
  59671. }
  59672. checkProp(value,propDef,path,i);
  59673. }
  59674. }
  59675. }
  59676. for(i in instance){
  59677. if(instance.hasOwnProperty(i) && !(i.charAt(0) == '_' && i.charAt(1) == '_') && objTypeDef && !objTypeDef[i] && additionalProp===false){
  59678. if (options.filter) {
  59679. delete instance[i];
  59680. continue;
  59681. } else {
  59682. errors.push({property:path,message:(typeof value) + "The property " + i +
  59683. " is not defined in the schema and the schema does not allow additional properties"});
  59684. }
  59685. }
  59686. var requires = objTypeDef && objTypeDef[i] && objTypeDef[i].requires;
  59687. if(requires && !(requires in instance)){
  59688. errors.push({property:path,message:"the presence of the property " + i + " requires that " + requires + " also be present"});
  59689. }
  59690. value = instance[i];
  59691. if(additionalProp && (!(objTypeDef && typeof objTypeDef == 'object') || !(i in objTypeDef))){
  59692. if(options.coerce){
  59693. value = instance[i] = options.coerce(value, additionalProp);
  59694. }
  59695. checkProp(value,additionalProp,path,i);
  59696. }
  59697. if(!_changing && value && value.$schema){
  59698. errors = errors.concat(checkProp(value,value.$schema,path,i));
  59699. }
  59700. }
  59701. return errors;
  59702. }
  59703. if(schema){
  59704. checkProp(instance,schema,'',_changing || '');
  59705. }
  59706. if(!_changing && instance && instance.$schema){
  59707. checkProp(instance,instance.$schema,'','');
  59708. }
  59709. return {valid:!errors.length,errors:errors};
  59710. };
  59711. exports.mustBeValid = function(result){
  59712. // summary:
  59713. // This checks to ensure that the result is valid and will throw an appropriate error message if it is not
  59714. // result: the result returned from checkPropertyChange or validate
  59715. if(!result.valid){
  59716. throw new TypeError(result.errors.map(function(error){return "for property " + error.property + ': ' + error.message;}).join(", \n"));
  59717. }
  59718. }
  59719. return exports;
  59720. }));
  59721. /***/ }),
  59722. /* 555 */
  59723. /***/ (function(module, exports, __webpack_require__) {
  59724. // Copyright 2015 Joyent, Inc.
  59725. var assert = __webpack_require__(3);
  59726. var crypto = __webpack_require__(5);
  59727. var sshpk = __webpack_require__(146);
  59728. var utils = __webpack_require__(107);
  59729. var HASH_ALGOS = utils.HASH_ALGOS;
  59730. var PK_ALGOS = utils.PK_ALGOS;
  59731. var InvalidAlgorithmError = utils.InvalidAlgorithmError;
  59732. var HttpSignatureError = utils.HttpSignatureError;
  59733. var validateAlgorithm = utils.validateAlgorithm;
  59734. ///--- Exported API
  59735. module.exports = {
  59736. /**
  59737. * Verify RSA/DSA signature against public key. You are expected to pass in
  59738. * an object that was returned from `parse()`.
  59739. *
  59740. * @param {Object} parsedSignature the object you got from `parse`.
  59741. * @param {String} pubkey RSA/DSA private key PEM.
  59742. * @return {Boolean} true if valid, false otherwise.
  59743. * @throws {TypeError} if you pass in bad arguments.
  59744. * @throws {InvalidAlgorithmError}
  59745. */
  59746. verifySignature: function verifySignature(parsedSignature, pubkey) {
  59747. assert.object(parsedSignature, 'parsedSignature');
  59748. if (typeof (pubkey) === 'string' || Buffer.isBuffer(pubkey))
  59749. pubkey = sshpk.parseKey(pubkey);
  59750. assert.ok(sshpk.Key.isKey(pubkey, [1, 1]), 'pubkey must be a sshpk.Key');
  59751. var alg = validateAlgorithm(parsedSignature.algorithm);
  59752. if (alg[0] === 'hmac' || alg[0] !== pubkey.type)
  59753. return (false);
  59754. var v = pubkey.createVerify(alg[1]);
  59755. v.update(parsedSignature.signingString);
  59756. return (v.verify(parsedSignature.params.signature, 'base64'));
  59757. },
  59758. /**
  59759. * Verify HMAC against shared secret. You are expected to pass in an object
  59760. * that was returned from `parse()`.
  59761. *
  59762. * @param {Object} parsedSignature the object you got from `parse`.
  59763. * @param {String} secret HMAC shared secret.
  59764. * @return {Boolean} true if valid, false otherwise.
  59765. * @throws {TypeError} if you pass in bad arguments.
  59766. * @throws {InvalidAlgorithmError}
  59767. */
  59768. verifyHMAC: function verifyHMAC(parsedSignature, secret) {
  59769. assert.object(parsedSignature, 'parsedHMAC');
  59770. assert.string(secret, 'secret');
  59771. var alg = validateAlgorithm(parsedSignature.algorithm);
  59772. if (alg[0] !== 'hmac')
  59773. return (false);
  59774. var hashAlg = alg[1].toUpperCase();
  59775. var hmac = crypto.createHmac(hashAlg, secret);
  59776. hmac.update(parsedSignature.signingString);
  59777. /*
  59778. * Now double-hash to avoid leaking timing information - there's
  59779. * no easy constant-time compare in JS, so we use this approach
  59780. * instead. See for more info:
  59781. * https://www.isecpartners.com/blog/2011/february/double-hmac-
  59782. * verification.aspx
  59783. */
  59784. var h1 = crypto.createHmac(hashAlg, secret);
  59785. h1.update(hmac.digest());
  59786. h1 = h1.digest();
  59787. var h2 = crypto.createHmac(hashAlg, secret);
  59788. h2.update(new Buffer(parsedSignature.params.signature, 'base64'));
  59789. h2 = h2.digest();
  59790. /* Node 0.8 returns strings from .digest(). */
  59791. if (typeof (h1) === 'string')
  59792. return (h1 === h2);
  59793. /* And node 0.10 lacks the .equals() method on Buffers. */
  59794. if (Buffer.isBuffer(h1) && !h1.equals)
  59795. return (h1.toString('binary') === h2.toString('binary'));
  59796. return (h1.equals(h2));
  59797. }
  59798. };
  59799. /***/ }),
  59800. /* 556 */
  59801. /***/ (function(module, exports, __webpack_require__) {
  59802. /*!
  59803. * mime-db
  59804. * Copyright(c) 2014 Jonathan Ong
  59805. * MIT Licensed
  59806. */
  59807. /**
  59808. * Module exports.
  59809. */
  59810. module.exports = __webpack_require__(557)
  59811. /***/ }),
  59812. /* 557 */
  59813. /***/ (function(module, exports) {
  59814. module.exports = {"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana"},"application/3gpp-ims+xml":{"source":"iana"},"application/a2l":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana"},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","extensions":["atomsvc"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana"},"application/bacnet-xdd+zip":{"source":"iana"},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana"},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana"},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/cbor":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana"},"application/ccxml+xml":{"source":"iana","extensions":["ccxml"]},"application/cdfx+xml":{"source":"iana"},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana"},"application/cellml+xml":{"source":"iana"},"application/cfw":{"source":"iana"},"application/clue_info+xml":{"source":"iana"},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana"},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/conference-info+xml":{"source":"iana"},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cpl+xml":{"source":"iana"},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana"},"application/cstadata+xml":{"source":"iana"},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","extensions":["mpd"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana"},"application/dicom":{"source":"iana"},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana"},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/docbook+xml":{"source":"apache","extensions":["dbk"]},"application/dskpp+xml":{"source":"iana"},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/ecmascript":{"source":"iana","compressible":true,"extensions":["ecma"]},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/emergencycalldata.comment+xml":{"source":"iana"},"application/emergencycalldata.control+xml":{"source":"iana"},"application/emergencycalldata.deviceinfo+xml":{"source":"iana"},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.providerinfo+xml":{"source":"iana"},"application/emergencycalldata.serviceinfo+xml":{"source":"iana"},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana"},"application/emergencycalldata.veds+xml":{"source":"iana"},"application/emma+xml":{"source":"iana","extensions":["emma"]},"application/emotionml+xml":{"source":"iana"},"application/encaprtp":{"source":"iana"},"application/epp+xml":{"source":"iana"},"application/epub+zip":{"source":"iana","extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdt+xml":{"source":"iana"},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false,"extensions":["woff"]},"application/font-woff2":{"compressible":false,"extensions":["woff2"]},"application/framework-attributes+xml":{"source":"iana"},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geoxacml+xml":{"source":"iana"},"application/gml+xml":{"source":"iana","extensions":["gml"]},"application/gpx+xml":{"source":"apache","extensions":["gpx"]},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana"},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana"},"application/ibe-pkg-reply+xml":{"source":"iana"},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana"},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana"},"application/java-archive":{"source":"apache","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana"},"application/kpml-response+xml":{"source":"iana"},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana"},"application/link-format":{"source":"iana"},"application/load-control+xml":{"source":"iana"},"application/lost+xml":{"source":"iana","extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana"},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","extensions":["mads"]},"application/manifest+json":{"charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana"},"application/mathml-presentation+xml":{"source":"iana"},"application/mbms-associated-procedure-description+xml":{"source":"iana"},"application/mbms-deregister+xml":{"source":"iana"},"application/mbms-envelope+xml":{"source":"iana"},"application/mbms-msk+xml":{"source":"iana"},"application/mbms-msk-response+xml":{"source":"iana"},"application/mbms-protection-description+xml":{"source":"iana"},"application/mbms-reception-report+xml":{"source":"iana"},"application/mbms-register+xml":{"source":"iana"},"application/mbms-register-response+xml":{"source":"iana"},"application/mbms-schedule+xml":{"source":"iana"},"application/mbms-user-service-description+xml":{"source":"iana"},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana"},"application/media_control+xml":{"source":"iana"},"application/mediaservercontrol+xml":{"source":"iana","extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","extensions":["meta4"]},"application/mets+xml":{"source":"iana","extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mmt-usd+xml":{"source":"iana"},"application/mods+xml":{"source":"iana","extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana"},"application/mrb-publish+xml":{"source":"iana"},"application/msc-ivr+xml":{"source":"iana"},"application/msc-mixer+xml":{"source":"iana"},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana"},"application/n-triples":{"source":"iana"},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana"},"application/news-groupinfo":{"source":"iana"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana"},"application/nss":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":false,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/omdoc+xml":{"source":"apache","extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg"]},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p2p-overlay+xml":{"source":"iana"},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana"},"application/pgp-signature":{"source":"iana","extensions":["asc","sig"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana"},"application/pidf-diff+xml":{"source":"iana"},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","extensions":["pls"]},"application/poc-settings+xml":{"source":"iana"},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana"},"application/provenance+xml":{"source":"iana"},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.hpub+zip":{"source":"iana"},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana"},"application/pskc+xml":{"source":"iana","extensions":["pskcxml"]},"application/qsig":{"source":"iana"},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf"]},"application/reginfo+xml":{"source":"iana","extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"iana"},"application/reputon+json":{"source":"iana","compressible":true},"application/resource-lists+xml":{"source":"iana","extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","extensions":["rld"]},"application/rfc+xml":{"source":"iana"},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana"},"application/rls-services+xml":{"source":"iana","extensions":["rs"]},"application/route-apd+xml":{"source":"iana"},"application/route-s-tsid+xml":{"source":"iana"},"application/route-usd+xml":{"source":"iana"},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana"},"application/samlmetadata+xml":{"source":"iana"},"application/sbml+xml":{"source":"iana","extensions":["sbml"]},"application/scaip+xml":{"source":"iana"},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/sep+xml":{"source":"iana"},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","extensions":["shf"]},"application/sieve":{"source":"iana"},"application/simple-filter+xml":{"source":"iana"},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"iana"},"application/smil+xml":{"source":"iana","extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","extensions":["srx"]},"application/spirits-event+xml":{"source":"iana"},"application/sql":{"source":"iana"},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","extensions":["grxml"]},"application/sru+xml":{"source":"iana","extensions":["sru"]},"application/ssdl+xml":{"source":"apache","extensions":["ssdl"]},"application/ssml+xml":{"source":"iana","extensions":["ssml"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/tei+xml":{"source":"iana","extensions":["tei","teicorpus"]},"application/thraud+xml":{"source":"iana","extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/trig":{"source":"iana"},"application/ttml+xml":{"source":"iana"},"application/tve-trigger":{"source":"iana"},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana"},"application/urc-ressheet+xml":{"source":"iana"},"application/urc-targetdesc+xml":{"source":"iana"},"application/urc-uisocketdesc+xml":{"source":"iana"},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana"},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana"},"application/vnd.3gpp-prose+xml":{"source":"iana"},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana"},"application/vnd.3gpp.bsf+xml":{"source":"iana"},"application/vnd.3gpp.gmop+xml":{"source":"iana"},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana"},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana"},"application/vnd.3gpp.mid-call+xml":{"source":"iana"},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana"},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana"},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana"},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana"},"application/vnd.3gpp.ussd+xml":{"source":"iana"},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana"},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"iana","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.ah-barcode":{"source":"iana"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","extensions":["mpkg"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"iana"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avistar+xml":{"source":"iana"},"application/vnd.balsamiq.bmml+xml":{"source":"iana"},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana"},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana"},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","extensions":["wbs"]},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana"},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana"},"application/vnd.cybank":{"source":"iana"},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana"},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume-movie":{"source":"iana"},"application/vnd.desmume.movie":{"source":"apache"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana"},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana"},"application/vnd.dvb.notif-container+xml":{"source":"iana"},"application/vnd.dvb.notif-generic+xml":{"source":"iana"},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana"},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana"},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana"},"application/vnd.dvb.notif-init+xml":{"source":"iana"},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.emclient.accessrequest+xml":{"source":"iana"},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana"},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana"},"application/vnd.eszigno3+xml":{"source":"iana","extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana"},"application/vnd.etsi.asic-e+zip":{"source":"iana"},"application/vnd.etsi.asic-s+zip":{"source":"iana"},"application/vnd.etsi.cug+xml":{"source":"iana"},"application/vnd.etsi.iptvcommand+xml":{"source":"iana"},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana"},"application/vnd.etsi.iptvprofile+xml":{"source":"iana"},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana"},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana"},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana"},"application/vnd.etsi.iptvservice+xml":{"source":"iana"},"application/vnd.etsi.iptvsync+xml":{"source":"iana"},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana"},"application/vnd.etsi.mcid+xml":{"source":"iana"},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana"},"application/vnd.etsi.pstn+xml":{"source":"iana"},"application/vnd.etsi.sci+xml":{"source":"iana"},"application/vnd.etsi.simservs+xml":{"source":"iana"},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana"},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"iana","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.ffsns":{"source":"iana"},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{"source":"iana","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"iana","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.geo+json":{"source":"iana","compressible":true},"application/vnd.geocube+xml":{"source":"iana"},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"iana"},"application/vnd.gov.sk.e-form+zip":{"source":"iana"},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana"},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"iana"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"iana","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana"},"application/vnd.imagemeter.image+zip":{"source":"iana"},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana"},"application/vnd.informix-visionary":{"source":"iana"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana"},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana"},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana"},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana"},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana"},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana"},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana"},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana"},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","extensions":["lasxml"]},"application/vnd.liberty-request+xml":{"source":"iana"},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","extensions":["lbe"]},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana"},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana"},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana"},"application/vnd.marlin.drm.license+xml":{"source":"iana"},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana"},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana"},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana"},"application/vnd.ms-printing.printticket+xml":{"source":"apache"},"application/vnd.ms-printschematicket+xml":{"source":"iana"},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana"},"application/vnd.nokia.iptv.config+xml":{"source":"iana"},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana"},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana"},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana"},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"iana","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana"},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"iana","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana"},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana"},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana"},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana"},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana"},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana"},"application/vnd.oipf.spdlist+xml":{"source":"iana"},"application/vnd.oipf.ueprofile+xml":{"source":"iana"},"application/vnd.oipf.userprofile+xml":{"source":"iana"},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana"},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"iana"},"application/vnd.oma.bcast.imd+xml":{"source":"iana"},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana"},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana"},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"iana"},"application/vnd.oma.bcast.sprov+xml":{"source":"iana"},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana"},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana"},"application/vnd.oma.cab-pcc+xml":{"source":"iana"},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana"},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana"},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana"},"application/vnd.oma.group-usage-list+xml":{"source":"iana"},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana"},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana"},"application/vnd.oma.poc.final-report+xml":{"source":"iana"},"application/vnd.oma.poc.groups+xml":{"source":"iana"},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana"},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana"},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana"},"application/vnd.oma.xcap-directory+xml":{"source":"iana"},"application/vnd.omads-email+xml":{"source":"iana"},"application/vnd.omads-file+xml":{"source":"iana"},"application/vnd.omads-folder+xml":{"source":"iana"},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana"},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml-template":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"apache","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml-template":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"apache","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml-template":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"apache","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana"},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana"},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana"},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana"},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana"},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos+xml":{"source":"iana"},"application/vnd.paos.xml":{"source":"apache"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana"},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana"},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana"},"application/vnd.radisys.msml+xml":{"source":"iana"},"application/vnd.radisys.msml-audit+xml":{"source":"iana"},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana"},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana"},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana"},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana"},"application/vnd.radisys.msml-conf+xml":{"source":"iana"},"application/vnd.radisys.msml-dialog+xml":{"source":"iana"},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana"},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana"},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana"},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana"},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana"},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana"},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana"},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","extensions":["musicxml"]},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.software602.filler.form+xml":{"source":"iana"},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana"},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana"},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana"},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","extensions":["uoml"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana"},"application/vnd.wv.ssp+xml":{"source":"iana"},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana"},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","extensions":["vxml"]},"application/vq-rtcpxr":{"source":"iana"},"application/watcherinfo+xml":{"source":"iana"},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-otf":{"source":"apache","compressible":true,"extensions":["otf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-ttf":{"source":"apache","compressible":true,"extensions":["ttf","ttc"]},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"apache","extensions":["der","crt","pem"]},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana"},"application/xaml+xml":{"source":"apache","extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana"},"application/xcap-caps+xml":{"source":"iana"},"application/xcap-diff+xml":{"source":"iana","extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana"},"application/xcap-error+xml":{"source":"iana"},"application/xcap-ns+xml":{"source":"iana"},"application/xcon-conference-info+xml":{"source":"iana"},"application/xcon-conference-info-diff+xml":{"source":"iana"},"application/xenc+xml":{"source":"iana","extensions":["xenc"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache"},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana"},"application/xmpp+xml":{"source":"iana"},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","extensions":["xpl"]},"application/xslt+xml":{"source":"iana","extensions":["xslt"]},"application/xspf+xml":{"source":"apache","extensions":["xspf"]},"application/xv+xml":{"source":"iana","extensions":["mxml","xhvml","xvml","xvm"]},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana"},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana"},"application/yin+xml":{"source":"iana","extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zlib":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana"},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/mobile-xmf":{"source":"iana"},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"iana"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/otf":{"compressible":true,"extensions":["otf"]},"image/apng":{"compressible":false,"extensions":["apng"]},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana"},"image/emf":{"source":"iana"},"image/fits":{"source":"iana"},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/jls":{"source":"iana"},"image/jp2":{"source":"iana"},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpeg","jpg","jpe"]},"image/jpm":{"source":"iana"},"image/jpx":{"source":"iana"},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif"]},"image/prs.pti":{"source":"iana"},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana"},"image/tiff":{"source":"iana","compressible":false,"extensions":["tiff","tif"]},"image/tiff-fx":{"source":"iana"},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana"},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana"},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana"},"image/vnd.valve.source.texture":{"source":"iana"},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana"},"image/webp":{"source":"apache","extensions":["webp"]},"image/wmf":{"source":"iana"},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana"},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana"},"message/global-delivery-status":{"source":"iana"},"message/global-disposition-notification":{"source":"iana"},"message/global-headers":{"source":"iana"},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/news":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime"]},"message/s-http":{"source":"iana"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"iana"},"message/vnd.wfa.wsc":{"source":"iana"},"model/3mf":{"source":"iana"},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/vnd.collada+xml":{"source":"iana","extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana"},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana"},"model/vnd.parasolid.transmit.binary":{"source":"iana"},"model/vnd.parasolid.transmit.text":{"source":"iana"},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.valve.source.compiled-map":{"source":"iana"},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana"},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana"},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana","compressible":false},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"iana"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/hjson":{"extensions":["hjson"]},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","compressible":true},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["markdown","md"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/slim":{"extensions":["slim","slm"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vtt":{"charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/iso.segment":{"source":"iana"},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"iana"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vp8":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}
  59815. /***/ }),
  59816. /* 558 */
  59817. /***/ (function(module, exports, __webpack_require__) {
  59818. var util = __webpack_require__(2)
  59819. var Stream = __webpack_require__(10)
  59820. var StringDecoder = __webpack_require__(150).StringDecoder
  59821. module.exports = StringStream
  59822. module.exports.AlignedStringDecoder = AlignedStringDecoder
  59823. function StringStream(from, to) {
  59824. if (!(this instanceof StringStream)) return new StringStream(from, to)
  59825. Stream.call(this)
  59826. if (from == null) from = 'utf8'
  59827. this.readable = this.writable = true
  59828. this.paused = false
  59829. this.toEncoding = (to == null ? from : to)
  59830. this.fromEncoding = (to == null ? '' : from)
  59831. this.decoder = new AlignedStringDecoder(this.toEncoding)
  59832. }
  59833. util.inherits(StringStream, Stream)
  59834. StringStream.prototype.write = function(data) {
  59835. if (!this.writable) {
  59836. var err = new Error('stream not writable')
  59837. err.code = 'EPIPE'
  59838. this.emit('error', err)
  59839. return false
  59840. }
  59841. if (this.fromEncoding) {
  59842. if (Buffer.isBuffer(data)) data = data.toString()
  59843. data = new Buffer(data, this.fromEncoding)
  59844. }
  59845. var string = this.decoder.write(data)
  59846. if (string.length) this.emit('data', string)
  59847. return !this.paused
  59848. }
  59849. StringStream.prototype.flush = function() {
  59850. if (this.decoder.flush) {
  59851. var string = this.decoder.flush()
  59852. if (string.length) this.emit('data', string)
  59853. }
  59854. }
  59855. StringStream.prototype.end = function() {
  59856. if (!this.writable && !this.readable) return
  59857. this.flush()
  59858. this.emit('end')
  59859. this.writable = this.readable = false
  59860. this.destroy()
  59861. }
  59862. StringStream.prototype.destroy = function() {
  59863. this.decoder = null
  59864. this.writable = this.readable = false
  59865. this.emit('close')
  59866. }
  59867. StringStream.prototype.pause = function() {
  59868. this.paused = true
  59869. }
  59870. StringStream.prototype.resume = function () {
  59871. if (this.paused) this.emit('drain')
  59872. this.paused = false
  59873. }
  59874. function AlignedStringDecoder(encoding) {
  59875. StringDecoder.call(this, encoding)
  59876. switch (this.encoding) {
  59877. case 'base64':
  59878. this.write = alignedWrite
  59879. this.alignedBuffer = new Buffer(3)
  59880. this.alignedBytes = 0
  59881. break
  59882. }
  59883. }
  59884. util.inherits(AlignedStringDecoder, StringDecoder)
  59885. AlignedStringDecoder.prototype.flush = function() {
  59886. if (!this.alignedBuffer || !this.alignedBytes) return ''
  59887. var leftover = this.alignedBuffer.toString(this.encoding, 0, this.alignedBytes)
  59888. this.alignedBytes = 0
  59889. return leftover
  59890. }
  59891. function alignedWrite(buffer) {
  59892. var rem = (this.alignedBytes + buffer.length) % this.alignedBuffer.length
  59893. if (!rem && !this.alignedBytes) return buffer.toString(this.encoding)
  59894. var returnBuffer = new Buffer(this.alignedBytes + buffer.length - rem)
  59895. this.alignedBuffer.copy(returnBuffer, 0, 0, this.alignedBytes)
  59896. buffer.copy(returnBuffer, this.alignedBytes, 0, buffer.length - rem)
  59897. buffer.copy(this.alignedBuffer, 0, buffer.length - rem, buffer.length)
  59898. this.alignedBytes = rem
  59899. return returnBuffer.toString(this.encoding)
  59900. }
  59901. /***/ }),
  59902. /* 559 */
  59903. /***/ (function(module, exports, __webpack_require__) {
  59904. module.exports = ForeverAgent
  59905. ForeverAgent.SSL = ForeverAgentSSL
  59906. var util = __webpack_require__(2)
  59907. , Agent = __webpack_require__(45).Agent
  59908. , net = __webpack_require__(142)
  59909. , tls = __webpack_require__(354)
  59910. , AgentSSL = __webpack_require__(81).Agent
  59911. function getConnectionName(host, port) {
  59912. var name = ''
  59913. if (typeof host === 'string') {
  59914. name = host + ':' + port
  59915. } else {
  59916. // For node.js v012.0 and iojs-v1.5.1, host is an object. And any existing localAddress is part of the connection name.
  59917. name = host.host + ':' + host.port + ':' + (host.localAddress ? (host.localAddress + ':') : ':')
  59918. }
  59919. return name
  59920. }
  59921. function ForeverAgent(options) {
  59922. var self = this
  59923. self.options = options || {}
  59924. self.requests = {}
  59925. self.sockets = {}
  59926. self.freeSockets = {}
  59927. self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets
  59928. self.minSockets = self.options.minSockets || ForeverAgent.defaultMinSockets
  59929. self.on('free', function(socket, host, port) {
  59930. var name = getConnectionName(host, port)
  59931. if (self.requests[name] && self.requests[name].length) {
  59932. self.requests[name].shift().onSocket(socket)
  59933. } else if (self.sockets[name].length < self.minSockets) {
  59934. if (!self.freeSockets[name]) self.freeSockets[name] = []
  59935. self.freeSockets[name].push(socket)
  59936. // if an error happens while we don't use the socket anyway, meh, throw the socket away
  59937. var onIdleError = function() {
  59938. socket.destroy()
  59939. }
  59940. socket._onIdleError = onIdleError
  59941. socket.on('error', onIdleError)
  59942. } else {
  59943. // If there are no pending requests just destroy the
  59944. // socket and it will get removed from the pool. This
  59945. // gets us out of timeout issues and allows us to
  59946. // default to Connection:keep-alive.
  59947. socket.destroy()
  59948. }
  59949. })
  59950. }
  59951. util.inherits(ForeverAgent, Agent)
  59952. ForeverAgent.defaultMinSockets = 5
  59953. ForeverAgent.prototype.createConnection = net.createConnection
  59954. ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest
  59955. ForeverAgent.prototype.addRequest = function(req, host, port) {
  59956. var name = getConnectionName(host, port)
  59957. if (typeof host !== 'string') {
  59958. var options = host
  59959. port = options.port
  59960. host = options.host
  59961. }
  59962. if (this.freeSockets[name] && this.freeSockets[name].length > 0 && !req.useChunkedEncodingByDefault) {
  59963. var idleSocket = this.freeSockets[name].pop()
  59964. idleSocket.removeListener('error', idleSocket._onIdleError)
  59965. delete idleSocket._onIdleError
  59966. req._reusedSocket = true
  59967. req.onSocket(idleSocket)
  59968. } else {
  59969. this.addRequestNoreuse(req, host, port)
  59970. }
  59971. }
  59972. ForeverAgent.prototype.removeSocket = function(s, name, host, port) {
  59973. if (this.sockets[name]) {
  59974. var index = this.sockets[name].indexOf(s)
  59975. if (index !== -1) {
  59976. this.sockets[name].splice(index, 1)
  59977. }
  59978. } else if (this.sockets[name] && this.sockets[name].length === 0) {
  59979. // don't leak
  59980. delete this.sockets[name]
  59981. delete this.requests[name]
  59982. }
  59983. if (this.freeSockets[name]) {
  59984. var index = this.freeSockets[name].indexOf(s)
  59985. if (index !== -1) {
  59986. this.freeSockets[name].splice(index, 1)
  59987. if (this.freeSockets[name].length === 0) {
  59988. delete this.freeSockets[name]
  59989. }
  59990. }
  59991. }
  59992. if (this.requests[name] && this.requests[name].length) {
  59993. // If we have pending requests and a socket gets closed a new one
  59994. // needs to be created to take over in the pool for the one that closed.
  59995. this.createSocket(name, host, port).emit('free')
  59996. }
  59997. }
  59998. function ForeverAgentSSL (options) {
  59999. ForeverAgent.call(this, options)
  60000. }
  60001. util.inherits(ForeverAgentSSL, ForeverAgent)
  60002. ForeverAgentSSL.prototype.createConnection = createConnectionSSL
  60003. ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest
  60004. function createConnectionSSL (port, host, options) {
  60005. if (typeof port === 'object') {
  60006. options = port;
  60007. } else if (typeof host === 'object') {
  60008. options = host;
  60009. } else if (typeof options === 'object') {
  60010. options = options;
  60011. } else {
  60012. options = {};
  60013. }
  60014. if (typeof port === 'number') {
  60015. options.port = port;
  60016. }
  60017. if (typeof host === 'string') {
  60018. options.host = host;
  60019. }
  60020. return tls.connect(options);
  60021. }
  60022. /***/ }),
  60023. /* 560 */
  60024. /***/ (function(module, exports, __webpack_require__) {
  60025. var CombinedStream = __webpack_require__(355);
  60026. var util = __webpack_require__(2);
  60027. var path = __webpack_require__(60);
  60028. var http = __webpack_require__(45);
  60029. var https = __webpack_require__(81);
  60030. var parseUrl = __webpack_require__(14).parse;
  60031. var fs = __webpack_require__(112);
  60032. var mime = __webpack_require__(111);
  60033. var asynckit = __webpack_require__(562);
  60034. var populate = __webpack_require__(566);
  60035. // Public API
  60036. module.exports = FormData;
  60037. // make it a Stream
  60038. util.inherits(FormData, CombinedStream);
  60039. /**
  60040. * Create readable "multipart/form-data" streams.
  60041. * Can be used to submit forms
  60042. * and file uploads to other web applications.
  60043. *
  60044. * @constructor
  60045. * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream
  60046. */
  60047. function FormData(options) {
  60048. if (!(this instanceof FormData)) {
  60049. return new FormData();
  60050. }
  60051. this._overheadLength = 0;
  60052. this._valueLength = 0;
  60053. this._valuesToMeasure = [];
  60054. CombinedStream.call(this);
  60055. options = options || {};
  60056. for (var option in options) {
  60057. this[option] = options[option];
  60058. }
  60059. }
  60060. FormData.LINE_BREAK = '\r\n';
  60061. FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream';
  60062. FormData.prototype.append = function(field, value, options) {
  60063. options = options || {};
  60064. // allow filename as single option
  60065. if (typeof options == 'string') {
  60066. options = {filename: options};
  60067. }
  60068. var append = CombinedStream.prototype.append.bind(this);
  60069. // all that streamy business can't handle numbers
  60070. if (typeof value == 'number') {
  60071. value = '' + value;
  60072. }
  60073. // https://github.com/felixge/node-form-data/issues/38
  60074. if (util.isArray(value)) {
  60075. // Please convert your array into string
  60076. // the way web server expects it
  60077. this._error(new Error('Arrays are not supported.'));
  60078. return;
  60079. }
  60080. var header = this._multiPartHeader(field, value, options);
  60081. var footer = this._multiPartFooter();
  60082. append(header);
  60083. append(value);
  60084. append(footer);
  60085. // pass along options.knownLength
  60086. this._trackLength(header, value, options);
  60087. };
  60088. FormData.prototype._trackLength = function(header, value, options) {
  60089. var valueLength = 0;
  60090. // used w/ getLengthSync(), when length is known.
  60091. // e.g. for streaming directly from a remote server,
  60092. // w/ a known file a size, and not wanting to wait for
  60093. // incoming file to finish to get its size.
  60094. if (options.knownLength != null) {
  60095. valueLength += +options.knownLength;
  60096. } else if (Buffer.isBuffer(value)) {
  60097. valueLength = value.length;
  60098. } else if (typeof value === 'string') {
  60099. valueLength = Buffer.byteLength(value);
  60100. }
  60101. this._valueLength += valueLength;
  60102. // @check why add CRLF? does this account for custom/multiple CRLFs?
  60103. this._overheadLength +=
  60104. Buffer.byteLength(header) +
  60105. FormData.LINE_BREAK.length;
  60106. // empty or either doesn't have path or not an http response
  60107. if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) )) {
  60108. return;
  60109. }
  60110. // no need to bother with the length
  60111. if (!options.knownLength) {
  60112. this._valuesToMeasure.push(value);
  60113. }
  60114. };
  60115. FormData.prototype._lengthRetriever = function(value, callback) {
  60116. if (value.hasOwnProperty('fd')) {
  60117. // take read range into a account
  60118. // `end` = Infinity –> read file till the end
  60119. //
  60120. // TODO: Looks like there is bug in Node fs.createReadStream
  60121. // it doesn't respect `end` options without `start` options
  60122. // Fix it when node fixes it.
  60123. // https://github.com/joyent/node/issues/7819
  60124. if (value.end != undefined && value.end != Infinity && value.start != undefined) {
  60125. // when end specified
  60126. // no need to calculate range
  60127. // inclusive, starts with 0
  60128. callback(null, value.end + 1 - (value.start ? value.start : 0));
  60129. // not that fast snoopy
  60130. } else {
  60131. // still need to fetch file size from fs
  60132. fs.stat(value.path, function(err, stat) {
  60133. var fileSize;
  60134. if (err) {
  60135. callback(err);
  60136. return;
  60137. }
  60138. // update final size based on the range options
  60139. fileSize = stat.size - (value.start ? value.start : 0);
  60140. callback(null, fileSize);
  60141. });
  60142. }
  60143. // or http response
  60144. } else if (value.hasOwnProperty('httpVersion')) {
  60145. callback(null, +value.headers['content-length']);
  60146. // or request stream http://github.com/mikeal/request
  60147. } else if (value.hasOwnProperty('httpModule')) {
  60148. // wait till response come back
  60149. value.on('response', function(response) {
  60150. value.pause();
  60151. callback(null, +response.headers['content-length']);
  60152. });
  60153. value.resume();
  60154. // something else
  60155. } else {
  60156. callback('Unknown stream');
  60157. }
  60158. };
  60159. FormData.prototype._multiPartHeader = function(field, value, options) {
  60160. // custom header specified (as string)?
  60161. // it becomes responsible for boundary
  60162. // (e.g. to handle extra CRLFs on .NET servers)
  60163. if (typeof options.header == 'string') {
  60164. return options.header;
  60165. }
  60166. var contentDisposition = this._getContentDisposition(value, options);
  60167. var contentType = this._getContentType(value, options);
  60168. var contents = '';
  60169. var headers = {
  60170. // add custom disposition as third element or keep it two elements if not
  60171. 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []),
  60172. // if no content type. allow it to be empty array
  60173. 'Content-Type': [].concat(contentType || [])
  60174. };
  60175. // allow custom headers.
  60176. if (typeof options.header == 'object') {
  60177. populate(headers, options.header);
  60178. }
  60179. var header;
  60180. for (var prop in headers) {
  60181. if (!headers.hasOwnProperty(prop)) continue;
  60182. header = headers[prop];
  60183. // skip nullish headers.
  60184. if (header == null) {
  60185. continue;
  60186. }
  60187. // convert all headers to arrays.
  60188. if (!Array.isArray(header)) {
  60189. header = [header];
  60190. }
  60191. // add non-empty headers.
  60192. if (header.length) {
  60193. contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;
  60194. }
  60195. }
  60196. return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK;
  60197. };
  60198. FormData.prototype._getContentDisposition = function(value, options) {
  60199. var filename
  60200. , contentDisposition
  60201. ;
  60202. if (typeof options.filepath === 'string') {
  60203. // custom filepath for relative paths
  60204. filename = path.normalize(options.filepath).replace(/\\/g, '/');
  60205. } else if (options.filename || value.name || value.path) {
  60206. // custom filename take precedence
  60207. // formidable and the browser add a name property
  60208. // fs- and request- streams have path property
  60209. filename = path.basename(options.filename || value.name || value.path);
  60210. } else if (value.readable && value.hasOwnProperty('httpVersion')) {
  60211. // or try http response
  60212. filename = path.basename(value.client._httpMessage.path);
  60213. }
  60214. if (filename) {
  60215. contentDisposition = 'filename="' + filename + '"';
  60216. }
  60217. return contentDisposition;
  60218. };
  60219. FormData.prototype._getContentType = function(value, options) {
  60220. // use custom content-type above all
  60221. var contentType = options.contentType;
  60222. // or try `name` from formidable, browser
  60223. if (!contentType && value.name) {
  60224. contentType = mime.lookup(value.name);
  60225. }
  60226. // or try `path` from fs-, request- streams
  60227. if (!contentType && value.path) {
  60228. contentType = mime.lookup(value.path);
  60229. }
  60230. // or if it's http-reponse
  60231. if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) {
  60232. contentType = value.headers['content-type'];
  60233. }
  60234. // or guess it from the filepath or filename
  60235. if (!contentType && (options.filepath || options.filename)) {
  60236. contentType = mime.lookup(options.filepath || options.filename);
  60237. }
  60238. // fallback to the default content type if `value` is not simple value
  60239. if (!contentType && typeof value == 'object') {
  60240. contentType = FormData.DEFAULT_CONTENT_TYPE;
  60241. }
  60242. return contentType;
  60243. };
  60244. FormData.prototype._multiPartFooter = function() {
  60245. return function(next) {
  60246. var footer = FormData.LINE_BREAK;
  60247. var lastPart = (this._streams.length === 0);
  60248. if (lastPart) {
  60249. footer += this._lastBoundary();
  60250. }
  60251. next(footer);
  60252. }.bind(this);
  60253. };
  60254. FormData.prototype._lastBoundary = function() {
  60255. return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK;
  60256. };
  60257. FormData.prototype.getHeaders = function(userHeaders) {
  60258. var header;
  60259. var formHeaders = {
  60260. 'content-type': 'multipart/form-data; boundary=' + this.getBoundary()
  60261. };
  60262. for (header in userHeaders) {
  60263. if (userHeaders.hasOwnProperty(header)) {
  60264. formHeaders[header.toLowerCase()] = userHeaders[header];
  60265. }
  60266. }
  60267. return formHeaders;
  60268. };
  60269. FormData.prototype.getBoundary = function() {
  60270. if (!this._boundary) {
  60271. this._generateBoundary();
  60272. }
  60273. return this._boundary;
  60274. };
  60275. FormData.prototype._generateBoundary = function() {
  60276. // This generates a 50 character boundary similar to those used by Firefox.
  60277. // They are optimized for boyer-moore parsing.
  60278. var boundary = '--------------------------';
  60279. for (var i = 0; i < 24; i++) {
  60280. boundary += Math.floor(Math.random() * 10).toString(16);
  60281. }
  60282. this._boundary = boundary;
  60283. };
  60284. // Note: getLengthSync DOESN'T calculate streams length
  60285. // As workaround one can calculate file size manually
  60286. // and add it as knownLength option
  60287. FormData.prototype.getLengthSync = function() {
  60288. var knownLength = this._overheadLength + this._valueLength;
  60289. // Don't get confused, there are 3 "internal" streams for each keyval pair
  60290. // so it basically checks if there is any value added to the form
  60291. if (this._streams.length) {
  60292. knownLength += this._lastBoundary().length;
  60293. }
  60294. // https://github.com/form-data/form-data/issues/40
  60295. if (!this.hasKnownLength()) {
  60296. // Some async length retrievers are present
  60297. // therefore synchronous length calculation is false.
  60298. // Please use getLength(callback) to get proper length
  60299. this._error(new Error('Cannot calculate proper length in synchronous way.'));
  60300. }
  60301. return knownLength;
  60302. };
  60303. // Public API to check if length of added values is known
  60304. // https://github.com/form-data/form-data/issues/196
  60305. // https://github.com/form-data/form-data/issues/262
  60306. FormData.prototype.hasKnownLength = function() {
  60307. var hasKnownLength = true;
  60308. if (this._valuesToMeasure.length) {
  60309. hasKnownLength = false;
  60310. }
  60311. return hasKnownLength;
  60312. };
  60313. FormData.prototype.getLength = function(cb) {
  60314. var knownLength = this._overheadLength + this._valueLength;
  60315. if (this._streams.length) {
  60316. knownLength += this._lastBoundary().length;
  60317. }
  60318. if (!this._valuesToMeasure.length) {
  60319. process.nextTick(cb.bind(this, null, knownLength));
  60320. return;
  60321. }
  60322. asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) {
  60323. if (err) {
  60324. cb(err);
  60325. return;
  60326. }
  60327. values.forEach(function(length) {
  60328. knownLength += length;
  60329. });
  60330. cb(null, knownLength);
  60331. });
  60332. };
  60333. FormData.prototype.submit = function(params, cb) {
  60334. var request
  60335. , options
  60336. , defaults = {method: 'post'}
  60337. ;
  60338. // parse provided url if it's string
  60339. // or treat it as options object
  60340. if (typeof params == 'string') {
  60341. params = parseUrl(params);
  60342. options = populate({
  60343. port: params.port,
  60344. path: params.pathname,
  60345. host: params.hostname,
  60346. protocol: params.protocol
  60347. }, defaults);
  60348. // use custom params
  60349. } else {
  60350. options = populate(params, defaults);
  60351. // if no port provided use default one
  60352. if (!options.port) {
  60353. options.port = options.protocol == 'https:' ? 443 : 80;
  60354. }
  60355. }
  60356. // put that good code in getHeaders to some use
  60357. options.headers = this.getHeaders(params.headers);
  60358. // https if specified, fallback to http in any other case
  60359. if (options.protocol == 'https:') {
  60360. request = https.request(options);
  60361. } else {
  60362. request = http.request(options);
  60363. }
  60364. // get content length and fire away
  60365. this.getLength(function(err, length) {
  60366. if (err) {
  60367. this._error(err);
  60368. return;
  60369. }
  60370. // add content length
  60371. request.setHeader('Content-Length', length);
  60372. this.pipe(request);
  60373. if (cb) {
  60374. request.on('error', cb);
  60375. request.on('response', cb.bind(this, null));
  60376. }
  60377. }.bind(this));
  60378. return request;
  60379. };
  60380. FormData.prototype._error = function(err) {
  60381. if (!this.error) {
  60382. this.error = err;
  60383. this.pause();
  60384. this.emit('error', err);
  60385. }
  60386. };
  60387. FormData.prototype.toString = function () {
  60388. return '[object FormData]';
  60389. };
  60390. /***/ }),
  60391. /* 561 */
  60392. /***/ (function(module, exports, __webpack_require__) {
  60393. var Stream = __webpack_require__(10).Stream;
  60394. var util = __webpack_require__(2);
  60395. module.exports = DelayedStream;
  60396. function DelayedStream() {
  60397. this.source = null;
  60398. this.dataSize = 0;
  60399. this.maxDataSize = 1024 * 1024;
  60400. this.pauseStream = true;
  60401. this._maxDataSizeExceeded = false;
  60402. this._released = false;
  60403. this._bufferedEvents = [];
  60404. }
  60405. util.inherits(DelayedStream, Stream);
  60406. DelayedStream.create = function(source, options) {
  60407. var delayedStream = new this();
  60408. options = options || {};
  60409. for (var option in options) {
  60410. delayedStream[option] = options[option];
  60411. }
  60412. delayedStream.source = source;
  60413. var realEmit = source.emit;
  60414. source.emit = function() {
  60415. delayedStream._handleEmit(arguments);
  60416. return realEmit.apply(source, arguments);
  60417. };
  60418. source.on('error', function() {});
  60419. if (delayedStream.pauseStream) {
  60420. source.pause();
  60421. }
  60422. return delayedStream;
  60423. };
  60424. Object.defineProperty(DelayedStream.prototype, 'readable', {
  60425. configurable: true,
  60426. enumerable: true,
  60427. get: function() {
  60428. return this.source.readable;
  60429. }
  60430. });
  60431. DelayedStream.prototype.setEncoding = function() {
  60432. return this.source.setEncoding.apply(this.source, arguments);
  60433. };
  60434. DelayedStream.prototype.resume = function() {
  60435. if (!this._released) {
  60436. this.release();
  60437. }
  60438. this.source.resume();
  60439. };
  60440. DelayedStream.prototype.pause = function() {
  60441. this.source.pause();
  60442. };
  60443. DelayedStream.prototype.release = function() {
  60444. this._released = true;
  60445. this._bufferedEvents.forEach(function(args) {
  60446. this.emit.apply(this, args);
  60447. }.bind(this));
  60448. this._bufferedEvents = [];
  60449. };
  60450. DelayedStream.prototype.pipe = function() {
  60451. var r = Stream.prototype.pipe.apply(this, arguments);
  60452. this.resume();
  60453. return r;
  60454. };
  60455. DelayedStream.prototype._handleEmit = function(args) {
  60456. if (this._released) {
  60457. this.emit.apply(this, args);
  60458. return;
  60459. }
  60460. if (args[0] === 'data') {
  60461. this.dataSize += args[1].length;
  60462. this._checkIfMaxDataSizeExceeded();
  60463. }
  60464. this._bufferedEvents.push(args);
  60465. };
  60466. DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {
  60467. if (this._maxDataSizeExceeded) {
  60468. return;
  60469. }
  60470. if (this.dataSize <= this.maxDataSize) {
  60471. return;
  60472. }
  60473. this._maxDataSizeExceeded = true;
  60474. var message =
  60475. 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'
  60476. this.emit('error', new Error(message));
  60477. };
  60478. /***/ }),
  60479. /* 562 */
  60480. /***/ (function(module, exports, __webpack_require__) {
  60481. module.exports =
  60482. {
  60483. parallel : __webpack_require__(563),
  60484. serial : __webpack_require__(565),
  60485. serialOrdered : __webpack_require__(361)
  60486. };
  60487. /***/ }),
  60488. /* 563 */
  60489. /***/ (function(module, exports, __webpack_require__) {
  60490. var iterate = __webpack_require__(356)
  60491. , initState = __webpack_require__(359)
  60492. , terminator = __webpack_require__(360)
  60493. ;
  60494. // Public API
  60495. module.exports = parallel;
  60496. /**
  60497. * Runs iterator over provided array elements in parallel
  60498. *
  60499. * @param {array|object} list - array or object (named list) to iterate over
  60500. * @param {function} iterator - iterator to run
  60501. * @param {function} callback - invoked when all elements processed
  60502. * @returns {function} - jobs terminator
  60503. */
  60504. function parallel(list, iterator, callback)
  60505. {
  60506. var state = initState(list);
  60507. while (state.index < (state['keyedList'] || list).length)
  60508. {
  60509. iterate(list, iterator, state, function(error, result)
  60510. {
  60511. if (error)
  60512. {
  60513. callback(error, result);
  60514. return;
  60515. }
  60516. // looks like it's the last one
  60517. if (Object.keys(state.jobs).length === 0)
  60518. {
  60519. callback(null, state.results);
  60520. return;
  60521. }
  60522. });
  60523. state.index++;
  60524. }
  60525. return terminator.bind(state, callback);
  60526. }
  60527. /***/ }),
  60528. /* 564 */
  60529. /***/ (function(module, exports) {
  60530. module.exports = defer;
  60531. /**
  60532. * Runs provided function on next iteration of the event loop
  60533. *
  60534. * @param {function} fn - function to run
  60535. */
  60536. function defer(fn)
  60537. {
  60538. var nextTick = typeof setImmediate == 'function'
  60539. ? setImmediate
  60540. : (
  60541. typeof process == 'object' && typeof process.nextTick == 'function'
  60542. ? process.nextTick
  60543. : null
  60544. );
  60545. if (nextTick)
  60546. {
  60547. nextTick(fn);
  60548. }
  60549. else
  60550. {
  60551. setTimeout(fn, 0);
  60552. }
  60553. }
  60554. /***/ }),
  60555. /* 565 */
  60556. /***/ (function(module, exports, __webpack_require__) {
  60557. var serialOrdered = __webpack_require__(361);
  60558. // Public API
  60559. module.exports = serial;
  60560. /**
  60561. * Runs iterator over provided array elements in series
  60562. *
  60563. * @param {array|object} list - array or object (named list) to iterate over
  60564. * @param {function} iterator - iterator to run
  60565. * @param {function} callback - invoked when all elements processed
  60566. * @returns {function} - jobs terminator
  60567. */
  60568. function serial(list, iterator, callback)
  60569. {
  60570. return serialOrdered(list, iterator, null, callback);
  60571. }
  60572. /***/ }),
  60573. /* 566 */
  60574. /***/ (function(module, exports) {
  60575. // populates missing values
  60576. module.exports = function(dst, src) {
  60577. Object.keys(src).forEach(function(prop)
  60578. {
  60579. dst[prop] = dst[prop] || src[prop];
  60580. });
  60581. return dst;
  60582. };
  60583. /***/ }),
  60584. /* 567 */
  60585. /***/ (function(module, exports) {
  60586. module.exports = isTypedArray
  60587. isTypedArray.strict = isStrictTypedArray
  60588. isTypedArray.loose = isLooseTypedArray
  60589. var toString = Object.prototype.toString
  60590. var names = {
  60591. '[object Int8Array]': true
  60592. , '[object Int16Array]': true
  60593. , '[object Int32Array]': true
  60594. , '[object Uint8Array]': true
  60595. , '[object Uint8ClampedArray]': true
  60596. , '[object Uint16Array]': true
  60597. , '[object Uint32Array]': true
  60598. , '[object Float32Array]': true
  60599. , '[object Float64Array]': true
  60600. }
  60601. function isTypedArray(arr) {
  60602. return (
  60603. isStrictTypedArray(arr)
  60604. || isLooseTypedArray(arr)
  60605. )
  60606. }
  60607. function isStrictTypedArray(arr) {
  60608. return (
  60609. arr instanceof Int8Array
  60610. || arr instanceof Int16Array
  60611. || arr instanceof Int32Array
  60612. || arr instanceof Uint8Array
  60613. || arr instanceof Uint8ClampedArray
  60614. || arr instanceof Uint16Array
  60615. || arr instanceof Uint32Array
  60616. || arr instanceof Float32Array
  60617. || arr instanceof Float64Array
  60618. )
  60619. }
  60620. function isLooseTypedArray(arr) {
  60621. return names[toString.call(arr)]
  60622. }
  60623. /***/ }),
  60624. /* 568 */
  60625. /***/ (function(module, exports, __webpack_require__) {
  60626. "use strict";
  60627. function formatHostname (hostname) {
  60628. // canonicalize the hostname, so that 'oogle.com' won't match 'google.com'
  60629. return hostname.replace(/^\.*/, '.').toLowerCase()
  60630. }
  60631. function parseNoProxyZone (zone) {
  60632. zone = zone.trim().toLowerCase()
  60633. var zoneParts = zone.split(':', 2)
  60634. var zoneHost = formatHostname(zoneParts[0])
  60635. var zonePort = zoneParts[1]
  60636. var hasPort = zone.indexOf(':') > -1
  60637. return {hostname: zoneHost, port: zonePort, hasPort: hasPort}
  60638. }
  60639. function uriInNoProxy (uri, noProxy) {
  60640. var port = uri.port || (uri.protocol === 'https:' ? '443' : '80')
  60641. var hostname = formatHostname(uri.hostname)
  60642. var noProxyList = noProxy.split(',')
  60643. // iterate through the noProxyList until it finds a match.
  60644. return noProxyList.map(parseNoProxyZone).some(function (noProxyZone) {
  60645. var isMatchedAt = hostname.indexOf(noProxyZone.hostname)
  60646. var hostnameMatched = (
  60647. isMatchedAt > -1 &&
  60648. (isMatchedAt === hostname.length - noProxyZone.hostname.length)
  60649. )
  60650. if (noProxyZone.hasPort) {
  60651. return (port === noProxyZone.port) && hostnameMatched
  60652. }
  60653. return hostnameMatched
  60654. })
  60655. }
  60656. function getProxyFromURI (uri) {
  60657. // Decide the proper request proxy to use based on the request URI object and the
  60658. // environmental variables (NO_PROXY, HTTP_PROXY, etc.)
  60659. // respect NO_PROXY environment variables (see: http://lynx.isc.org/current/breakout/lynx_help/keystrokes/environments.html)
  60660. var noProxy = process.env.NO_PROXY || process.env.no_proxy || ''
  60661. // if the noProxy is a wildcard then return null
  60662. if (noProxy === '*') {
  60663. return null
  60664. }
  60665. // if the noProxy is not empty and the uri is found return null
  60666. if (noProxy !== '' && uriInNoProxy(uri, noProxy)) {
  60667. return null
  60668. }
  60669. // Check for HTTP or HTTPS Proxy in environment Else default to null
  60670. if (uri.protocol === 'http:') {
  60671. return process.env.HTTP_PROXY ||
  60672. process.env.http_proxy || null
  60673. }
  60674. if (uri.protocol === 'https:') {
  60675. return process.env.HTTPS_PROXY ||
  60676. process.env.https_proxy ||
  60677. process.env.HTTP_PROXY ||
  60678. process.env.http_proxy || null
  60679. }
  60680. // if none of that works, return null
  60681. // (What uri protocol are you using then?)
  60682. return null
  60683. }
  60684. module.exports = getProxyFromURI
  60685. /***/ }),
  60686. /* 569 */
  60687. /***/ (function(module, exports, __webpack_require__) {
  60688. "use strict";
  60689. var qs = __webpack_require__(363)
  60690. var querystring = __webpack_require__(106)
  60691. function Querystring (request) {
  60692. this.request = request
  60693. this.lib = null
  60694. this.useQuerystring = null
  60695. this.parseOptions = null
  60696. this.stringifyOptions = null
  60697. }
  60698. Querystring.prototype.init = function (options) {
  60699. if (this.lib) { return }
  60700. this.useQuerystring = options.useQuerystring
  60701. this.lib = (this.useQuerystring ? querystring : qs)
  60702. this.parseOptions = options.qsParseOptions || {}
  60703. this.stringifyOptions = options.qsStringifyOptions || {}
  60704. }
  60705. Querystring.prototype.stringify = function (obj) {
  60706. return (this.useQuerystring)
  60707. ? this.rfc3986(this.lib.stringify(obj,
  60708. this.stringifyOptions.sep || null,
  60709. this.stringifyOptions.eq || null,
  60710. this.stringifyOptions))
  60711. : this.lib.stringify(obj, this.stringifyOptions)
  60712. }
  60713. Querystring.prototype.parse = function (str) {
  60714. return (this.useQuerystring)
  60715. ? this.lib.parse(str,
  60716. this.parseOptions.sep || null,
  60717. this.parseOptions.eq || null,
  60718. this.parseOptions)
  60719. : this.lib.parse(str, this.parseOptions)
  60720. }
  60721. Querystring.prototype.rfc3986 = function (str) {
  60722. return str.replace(/[!'()*]/g, function (c) {
  60723. return '%' + c.charCodeAt(0).toString(16).toUpperCase()
  60724. })
  60725. }
  60726. Querystring.prototype.unescape = querystring.unescape
  60727. exports.Querystring = Querystring
  60728. /***/ }),
  60729. /* 570 */
  60730. /***/ (function(module, exports, __webpack_require__) {
  60731. "use strict";
  60732. var utils = __webpack_require__(364);
  60733. var formats = __webpack_require__(365);
  60734. var arrayPrefixGenerators = {
  60735. brackets: function brackets(prefix) { // eslint-disable-line func-name-matching
  60736. return prefix + '[]';
  60737. },
  60738. indices: function indices(prefix, key) { // eslint-disable-line func-name-matching
  60739. return prefix + '[' + key + ']';
  60740. },
  60741. repeat: function repeat(prefix) { // eslint-disable-line func-name-matching
  60742. return prefix;
  60743. }
  60744. };
  60745. var toISO = Date.prototype.toISOString;
  60746. var defaults = {
  60747. delimiter: '&',
  60748. encode: true,
  60749. encoder: utils.encode,
  60750. encodeValuesOnly: false,
  60751. serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching
  60752. return toISO.call(date);
  60753. },
  60754. skipNulls: false,
  60755. strictNullHandling: false
  60756. };
  60757. var stringify = function stringify( // eslint-disable-line func-name-matching
  60758. object,
  60759. prefix,
  60760. generateArrayPrefix,
  60761. strictNullHandling,
  60762. skipNulls,
  60763. encoder,
  60764. filter,
  60765. sort,
  60766. allowDots,
  60767. serializeDate,
  60768. formatter,
  60769. encodeValuesOnly
  60770. ) {
  60771. var obj = object;
  60772. if (typeof filter === 'function') {
  60773. obj = filter(prefix, obj);
  60774. } else if (obj instanceof Date) {
  60775. obj = serializeDate(obj);
  60776. } else if (obj === null) {
  60777. if (strictNullHandling) {
  60778. return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix;
  60779. }
  60780. obj = '';
  60781. }
  60782. if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {
  60783. if (encoder) {
  60784. var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder);
  60785. return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))];
  60786. }
  60787. return [formatter(prefix) + '=' + formatter(String(obj))];
  60788. }
  60789. var values = [];
  60790. if (typeof obj === 'undefined') {
  60791. return values;
  60792. }
  60793. var objKeys;
  60794. if (Array.isArray(filter)) {
  60795. objKeys = filter;
  60796. } else {
  60797. var keys = Object.keys(obj);
  60798. objKeys = sort ? keys.sort(sort) : keys;
  60799. }
  60800. for (var i = 0; i < objKeys.length; ++i) {
  60801. var key = objKeys[i];
  60802. if (skipNulls && obj[key] === null) {
  60803. continue;
  60804. }
  60805. if (Array.isArray(obj)) {
  60806. values = values.concat(stringify(
  60807. obj[key],
  60808. generateArrayPrefix(prefix, key),
  60809. generateArrayPrefix,
  60810. strictNullHandling,
  60811. skipNulls,
  60812. encoder,
  60813. filter,
  60814. sort,
  60815. allowDots,
  60816. serializeDate,
  60817. formatter,
  60818. encodeValuesOnly
  60819. ));
  60820. } else {
  60821. values = values.concat(stringify(
  60822. obj[key],
  60823. prefix + (allowDots ? '.' + key : '[' + key + ']'),
  60824. generateArrayPrefix,
  60825. strictNullHandling,
  60826. skipNulls,
  60827. encoder,
  60828. filter,
  60829. sort,
  60830. allowDots,
  60831. serializeDate,
  60832. formatter,
  60833. encodeValuesOnly
  60834. ));
  60835. }
  60836. }
  60837. return values;
  60838. };
  60839. module.exports = function (object, opts) {
  60840. var obj = object;
  60841. var options = opts ? utils.assign({}, opts) : {};
  60842. if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
  60843. throw new TypeError('Encoder has to be a function.');
  60844. }
  60845. var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;
  60846. var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
  60847. var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;
  60848. var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;
  60849. var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder;
  60850. var sort = typeof options.sort === 'function' ? options.sort : null;
  60851. var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
  60852. var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate;
  60853. var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly;
  60854. if (typeof options.format === 'undefined') {
  60855. options.format = formats['default'];
  60856. } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {
  60857. throw new TypeError('Unknown format option provided.');
  60858. }
  60859. var formatter = formats.formatters[options.format];
  60860. var objKeys;
  60861. var filter;
  60862. if (typeof options.filter === 'function') {
  60863. filter = options.filter;
  60864. obj = filter('', obj);
  60865. } else if (Array.isArray(options.filter)) {
  60866. filter = options.filter;
  60867. objKeys = filter;
  60868. }
  60869. var keys = [];
  60870. if (typeof obj !== 'object' || obj === null) {
  60871. return '';
  60872. }
  60873. var arrayFormat;
  60874. if (options.arrayFormat in arrayPrefixGenerators) {
  60875. arrayFormat = options.arrayFormat;
  60876. } else if ('indices' in options) {
  60877. arrayFormat = options.indices ? 'indices' : 'repeat';
  60878. } else {
  60879. arrayFormat = 'indices';
  60880. }
  60881. var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
  60882. if (!objKeys) {
  60883. objKeys = Object.keys(obj);
  60884. }
  60885. if (sort) {
  60886. objKeys.sort(sort);
  60887. }
  60888. for (var i = 0; i < objKeys.length; ++i) {
  60889. var key = objKeys[i];
  60890. if (skipNulls && obj[key] === null) {
  60891. continue;
  60892. }
  60893. keys = keys.concat(stringify(
  60894. obj[key],
  60895. key,
  60896. generateArrayPrefix,
  60897. strictNullHandling,
  60898. skipNulls,
  60899. encode ? encoder : null,
  60900. filter,
  60901. sort,
  60902. allowDots,
  60903. serializeDate,
  60904. formatter,
  60905. encodeValuesOnly
  60906. ));
  60907. }
  60908. var joined = keys.join(delimiter);
  60909. var prefix = options.addQueryPrefix === true ? '?' : '';
  60910. return joined.length > 0 ? prefix + joined : '';
  60911. };
  60912. /***/ }),
  60913. /* 571 */
  60914. /***/ (function(module, exports, __webpack_require__) {
  60915. "use strict";
  60916. var utils = __webpack_require__(364);
  60917. var has = Object.prototype.hasOwnProperty;
  60918. var defaults = {
  60919. allowDots: false,
  60920. allowPrototypes: false,
  60921. arrayLimit: 20,
  60922. decoder: utils.decode,
  60923. delimiter: '&',
  60924. depth: 5,
  60925. parameterLimit: 1000,
  60926. plainObjects: false,
  60927. strictNullHandling: false
  60928. };
  60929. var parseValues = function parseQueryStringValues(str, options) {
  60930. var obj = {};
  60931. var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
  60932. var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
  60933. var parts = cleanStr.split(options.delimiter, limit);
  60934. for (var i = 0; i < parts.length; ++i) {
  60935. var part = parts[i];
  60936. var bracketEqualsPos = part.indexOf(']=');
  60937. var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
  60938. var key, val;
  60939. if (pos === -1) {
  60940. key = options.decoder(part, defaults.decoder);
  60941. val = options.strictNullHandling ? null : '';
  60942. } else {
  60943. key = options.decoder(part.slice(0, pos), defaults.decoder);
  60944. val = options.decoder(part.slice(pos + 1), defaults.decoder);
  60945. }
  60946. if (has.call(obj, key)) {
  60947. obj[key] = [].concat(obj[key]).concat(val);
  60948. } else {
  60949. obj[key] = val;
  60950. }
  60951. }
  60952. return obj;
  60953. };
  60954. var parseObject = function (chain, val, options) {
  60955. var leaf = val;
  60956. for (var i = chain.length - 1; i >= 0; --i) {
  60957. var obj;
  60958. var root = chain[i];
  60959. if (root === '[]') {
  60960. obj = [];
  60961. obj = obj.concat(leaf);
  60962. } else {
  60963. obj = options.plainObjects ? Object.create(null) : {};
  60964. var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
  60965. var index = parseInt(cleanRoot, 10);
  60966. if (
  60967. !isNaN(index)
  60968. && root !== cleanRoot
  60969. && String(index) === cleanRoot
  60970. && index >= 0
  60971. && (options.parseArrays && index <= options.arrayLimit)
  60972. ) {
  60973. obj = [];
  60974. obj[index] = leaf;
  60975. } else {
  60976. obj[cleanRoot] = leaf;
  60977. }
  60978. }
  60979. leaf = obj;
  60980. }
  60981. return leaf;
  60982. };
  60983. var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
  60984. if (!givenKey) {
  60985. return;
  60986. }
  60987. // Transform dot notation to bracket notation
  60988. var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
  60989. // The regex chunks
  60990. var brackets = /(\[[^[\]]*])/;
  60991. var child = /(\[[^[\]]*])/g;
  60992. // Get the parent
  60993. var segment = brackets.exec(key);
  60994. var parent = segment ? key.slice(0, segment.index) : key;
  60995. // Stash the parent if it exists
  60996. var keys = [];
  60997. if (parent) {
  60998. // If we aren't using plain objects, optionally prefix keys
  60999. // that would overwrite object prototype properties
  61000. if (!options.plainObjects && has.call(Object.prototype, parent)) {
  61001. if (!options.allowPrototypes) {
  61002. return;
  61003. }
  61004. }
  61005. keys.push(parent);
  61006. }
  61007. // Loop through children appending to the array until we hit depth
  61008. var i = 0;
  61009. while ((segment = child.exec(key)) !== null && i < options.depth) {
  61010. i += 1;
  61011. if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
  61012. if (!options.allowPrototypes) {
  61013. return;
  61014. }
  61015. }
  61016. keys.push(segment[1]);
  61017. }
  61018. // If there's a remainder, just add whatever is left
  61019. if (segment) {
  61020. keys.push('[' + key.slice(segment.index) + ']');
  61021. }
  61022. return parseObject(keys, val, options);
  61023. };
  61024. module.exports = function (str, opts) {
  61025. var options = opts ? utils.assign({}, opts) : {};
  61026. if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
  61027. throw new TypeError('Decoder has to be a function.');
  61028. }
  61029. options.ignoreQueryPrefix = options.ignoreQueryPrefix === true;
  61030. options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
  61031. options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
  61032. options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
  61033. options.parseArrays = options.parseArrays !== false;
  61034. options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;
  61035. options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;
  61036. options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;
  61037. options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;
  61038. options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;
  61039. options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
  61040. if (str === '' || str === null || typeof str === 'undefined') {
  61041. return options.plainObjects ? Object.create(null) : {};
  61042. }
  61043. var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
  61044. var obj = options.plainObjects ? Object.create(null) : {};
  61045. // Iterate over the keys and setup the new object
  61046. var keys = Object.keys(tempObj);
  61047. for (var i = 0; i < keys.length; ++i) {
  61048. var key = keys[i];
  61049. var newObj = parseKeys(key, tempObj[key], options);
  61050. obj = utils.merge(obj, newObj, options);
  61051. }
  61052. return utils.compact(obj);
  61053. };
  61054. /***/ }),
  61055. /* 572 */
  61056. /***/ (function(module, exports, __webpack_require__) {
  61057. "use strict";
  61058. var fs = __webpack_require__(112)
  61059. var qs = __webpack_require__(106)
  61060. var validate = __webpack_require__(573)
  61061. var extend = __webpack_require__(141)
  61062. function Har (request) {
  61063. this.request = request
  61064. }
  61065. Har.prototype.reducer = function (obj, pair) {
  61066. // new property ?
  61067. if (obj[pair.name] === undefined) {
  61068. obj[pair.name] = pair.value
  61069. return obj
  61070. }
  61071. // existing? convert to array
  61072. var arr = [
  61073. obj[pair.name],
  61074. pair.value
  61075. ]
  61076. obj[pair.name] = arr
  61077. return obj
  61078. }
  61079. Har.prototype.prep = function (data) {
  61080. // construct utility properties
  61081. data.queryObj = {}
  61082. data.headersObj = {}
  61083. data.postData.jsonObj = false
  61084. data.postData.paramsObj = false
  61085. // construct query objects
  61086. if (data.queryString && data.queryString.length) {
  61087. data.queryObj = data.queryString.reduce(this.reducer, {})
  61088. }
  61089. // construct headers objects
  61090. if (data.headers && data.headers.length) {
  61091. // loweCase header keys
  61092. data.headersObj = data.headers.reduceRight(function (headers, header) {
  61093. headers[header.name] = header.value
  61094. return headers
  61095. }, {})
  61096. }
  61097. // construct Cookie header
  61098. if (data.cookies && data.cookies.length) {
  61099. var cookies = data.cookies.map(function (cookie) {
  61100. return cookie.name + '=' + cookie.value
  61101. })
  61102. if (cookies.length) {
  61103. data.headersObj.cookie = cookies.join('; ')
  61104. }
  61105. }
  61106. // prep body
  61107. function some (arr) {
  61108. return arr.some(function (type) {
  61109. return data.postData.mimeType.indexOf(type) === 0
  61110. })
  61111. }
  61112. if (some([
  61113. 'multipart/mixed',
  61114. 'multipart/related',
  61115. 'multipart/form-data',
  61116. 'multipart/alternative'])) {
  61117. // reset values
  61118. data.postData.mimeType = 'multipart/form-data'
  61119. } else if (some([
  61120. 'application/x-www-form-urlencoded'])) {
  61121. if (!data.postData.params) {
  61122. data.postData.text = ''
  61123. } else {
  61124. data.postData.paramsObj = data.postData.params.reduce(this.reducer, {})
  61125. // always overwrite
  61126. data.postData.text = qs.stringify(data.postData.paramsObj)
  61127. }
  61128. } else if (some([
  61129. 'text/json',
  61130. 'text/x-json',
  61131. 'application/json',
  61132. 'application/x-json'])) {
  61133. data.postData.mimeType = 'application/json'
  61134. if (data.postData.text) {
  61135. try {
  61136. data.postData.jsonObj = JSON.parse(data.postData.text)
  61137. } catch (e) {
  61138. this.request.debug(e)
  61139. // force back to text/plain
  61140. data.postData.mimeType = 'text/plain'
  61141. }
  61142. }
  61143. }
  61144. return data
  61145. }
  61146. Har.prototype.options = function (options) {
  61147. // skip if no har property defined
  61148. if (!options.har) {
  61149. return options
  61150. }
  61151. var har = {}
  61152. extend(har, options.har)
  61153. // only process the first entry
  61154. if (har.log && har.log.entries) {
  61155. har = har.log.entries[0]
  61156. }
  61157. // add optional properties to make validation successful
  61158. har.url = har.url || options.url || options.uri || options.baseUrl || '/'
  61159. har.httpVersion = har.httpVersion || 'HTTP/1.1'
  61160. har.queryString = har.queryString || []
  61161. har.headers = har.headers || []
  61162. har.cookies = har.cookies || []
  61163. har.postData = har.postData || {}
  61164. har.postData.mimeType = har.postData.mimeType || 'application/octet-stream'
  61165. har.bodySize = 0
  61166. har.headersSize = 0
  61167. har.postData.size = 0
  61168. if (!validate.request(har)) {
  61169. return options
  61170. }
  61171. // clean up and get some utility properties
  61172. var req = this.prep(har)
  61173. // construct new options
  61174. if (req.url) {
  61175. options.url = req.url
  61176. }
  61177. if (req.method) {
  61178. options.method = req.method
  61179. }
  61180. if (Object.keys(req.queryObj).length) {
  61181. options.qs = req.queryObj
  61182. }
  61183. if (Object.keys(req.headersObj).length) {
  61184. options.headers = req.headersObj
  61185. }
  61186. function test (type) {
  61187. return req.postData.mimeType.indexOf(type) === 0
  61188. }
  61189. if (test('application/x-www-form-urlencoded')) {
  61190. options.form = req.postData.paramsObj
  61191. } else if (test('application/json')) {
  61192. if (req.postData.jsonObj) {
  61193. options.body = req.postData.jsonObj
  61194. options.json = true
  61195. }
  61196. } else if (test('multipart/form-data')) {
  61197. options.formData = {}
  61198. req.postData.params.forEach(function (param) {
  61199. var attachment = {}
  61200. if (!param.fileName && !param.fileName && !param.contentType) {
  61201. options.formData[param.name] = param.value
  61202. return
  61203. }
  61204. // attempt to read from disk!
  61205. if (param.fileName && !param.value) {
  61206. attachment.value = fs.createReadStream(param.fileName)
  61207. } else if (param.value) {
  61208. attachment.value = param.value
  61209. }
  61210. if (param.fileName) {
  61211. attachment.options = {
  61212. filename: param.fileName,
  61213. contentType: param.contentType ? param.contentType : null
  61214. }
  61215. }
  61216. options.formData[param.name] = attachment
  61217. })
  61218. } else {
  61219. if (req.postData.text) {
  61220. options.body = req.postData.text
  61221. }
  61222. }
  61223. return options
  61224. }
  61225. exports.Har = Har
  61226. /***/ }),
  61227. /* 573 */
  61228. /***/ (function(module, exports, __webpack_require__) {
  61229. var Ajv = __webpack_require__(574)
  61230. var HARError = __webpack_require__(606)
  61231. var schemas = __webpack_require__(607)
  61232. var ajv
  61233. function validate (name, data) {
  61234. data = data || {}
  61235. // validator config
  61236. ajv = ajv || new Ajv({
  61237. allErrors: true,
  61238. schemas: schemas
  61239. })
  61240. var validate = ajv.getSchema(name + '.json')
  61241. return new Promise(function (resolve, reject) {
  61242. var valid = validate(data)
  61243. !valid ? reject(new HARError(validate.errors)) : resolve(data)
  61244. })
  61245. }
  61246. exports.afterRequest = function (data) {
  61247. return validate('afterRequest', data)
  61248. }
  61249. exports.beforeRequest = function (data) {
  61250. return validate('beforeRequest', data)
  61251. }
  61252. exports.browser = function (data) {
  61253. return validate('browser', data)
  61254. }
  61255. exports.cache = function (data) {
  61256. return validate('cache', data)
  61257. }
  61258. exports.content = function (data) {
  61259. return validate('content', data)
  61260. }
  61261. exports.cookie = function (data) {
  61262. return validate('cookie', data)
  61263. }
  61264. exports.creator = function (data) {
  61265. return validate('creator', data)
  61266. }
  61267. exports.entry = function (data) {
  61268. return validate('entry', data)
  61269. }
  61270. exports.har = function (data) {
  61271. return validate('har', data)
  61272. }
  61273. exports.header = function (data) {
  61274. return validate('header', data)
  61275. }
  61276. exports.log = function (data) {
  61277. return validate('log', data)
  61278. }
  61279. exports.page = function (data) {
  61280. return validate('page', data)
  61281. }
  61282. exports.pageTimings = function (data) {
  61283. return validate('pageTimings', data)
  61284. }
  61285. exports.postData = function (data) {
  61286. return validate('postData', data)
  61287. }
  61288. exports.query = function (data) {
  61289. return validate('query', data)
  61290. }
  61291. exports.request = function (data) {
  61292. return validate('request', data)
  61293. }
  61294. exports.response = function (data) {
  61295. return validate('response', data)
  61296. }
  61297. exports.timings = function (data) {
  61298. return validate('timings', data)
  61299. }
  61300. /***/ }),
  61301. /* 574 */
  61302. /***/ (function(module, exports, __webpack_require__) {
  61303. "use strict";
  61304. var compileSchema = __webpack_require__(575)
  61305. , resolve = __webpack_require__(152)
  61306. , Cache = __webpack_require__(578)
  61307. , SchemaObject = __webpack_require__(366)
  61308. , stableStringify = __webpack_require__(367)
  61309. , formats = __webpack_require__(579)
  61310. , rules = __webpack_require__(580)
  61311. , $dataMetaSchema = __webpack_require__(599)
  61312. , patternGroups = __webpack_require__(600)
  61313. , util = __webpack_require__(62)
  61314. , co = __webpack_require__(369);
  61315. module.exports = Ajv;
  61316. Ajv.prototype.validate = validate;
  61317. Ajv.prototype.compile = compile;
  61318. Ajv.prototype.addSchema = addSchema;
  61319. Ajv.prototype.addMetaSchema = addMetaSchema;
  61320. Ajv.prototype.validateSchema = validateSchema;
  61321. Ajv.prototype.getSchema = getSchema;
  61322. Ajv.prototype.removeSchema = removeSchema;
  61323. Ajv.prototype.addFormat = addFormat;
  61324. Ajv.prototype.errorsText = errorsText;
  61325. Ajv.prototype._addSchema = _addSchema;
  61326. Ajv.prototype._compile = _compile;
  61327. Ajv.prototype.compileAsync = __webpack_require__(601);
  61328. var customKeyword = __webpack_require__(602);
  61329. Ajv.prototype.addKeyword = customKeyword.add;
  61330. Ajv.prototype.getKeyword = customKeyword.get;
  61331. Ajv.prototype.removeKeyword = customKeyword.remove;
  61332. var errorClasses = __webpack_require__(154);
  61333. Ajv.ValidationError = errorClasses.Validation;
  61334. Ajv.MissingRefError = errorClasses.MissingRef;
  61335. Ajv.$dataMetaSchema = $dataMetaSchema;
  61336. var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema';
  61337. var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ];
  61338. var META_SUPPORT_DATA = ['/properties'];
  61339. /**
  61340. * Creates validator instance.
  61341. * Usage: `Ajv(opts)`
  61342. * @param {Object} opts optional options
  61343. * @return {Object} ajv instance
  61344. */
  61345. function Ajv(opts) {
  61346. if (!(this instanceof Ajv)) return new Ajv(opts);
  61347. opts = this._opts = util.copy(opts) || {};
  61348. setLogger(this);
  61349. this._schemas = {};
  61350. this._refs = {};
  61351. this._fragments = {};
  61352. this._formats = formats(opts.format);
  61353. var schemaUriFormat = this._schemaUriFormat = this._formats['uri-reference'];
  61354. this._schemaUriFormatFunc = function (str) { return schemaUriFormat.test(str); };
  61355. this._cache = opts.cache || new Cache;
  61356. this._loadingSchemas = {};
  61357. this._compilations = [];
  61358. this.RULES = rules();
  61359. this._getId = chooseGetId(opts);
  61360. opts.loopRequired = opts.loopRequired || Infinity;
  61361. if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
  61362. if (opts.serialize === undefined) opts.serialize = stableStringify;
  61363. this._metaOpts = getMetaSchemaOptions(this);
  61364. if (opts.formats) addInitialFormats(this);
  61365. addDraft6MetaSchema(this);
  61366. if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta);
  61367. addInitialSchemas(this);
  61368. if (opts.patternGroups) patternGroups(this);
  61369. }
  61370. /**
  61371. * Validate data using schema
  61372. * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize.
  61373. * @this Ajv
  61374. * @param {String|Object} schemaKeyRef key, ref or schema object
  61375. * @param {Any} data to be validated
  61376. * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
  61377. */
  61378. function validate(schemaKeyRef, data) {
  61379. var v;
  61380. if (typeof schemaKeyRef == 'string') {
  61381. v = this.getSchema(schemaKeyRef);
  61382. if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
  61383. } else {
  61384. var schemaObj = this._addSchema(schemaKeyRef);
  61385. v = schemaObj.validate || this._compile(schemaObj);
  61386. }
  61387. var valid = v(data);
  61388. if (v.$async === true)
  61389. return this._opts.async == '*' ? co(valid) : valid;
  61390. this.errors = v.errors;
  61391. return valid;
  61392. }
  61393. /**
  61394. * Create validating function for passed schema.
  61395. * @this Ajv
  61396. * @param {Object} schema schema object
  61397. * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.
  61398. * @return {Function} validating function
  61399. */
  61400. function compile(schema, _meta) {
  61401. var schemaObj = this._addSchema(schema, undefined, _meta);
  61402. return schemaObj.validate || this._compile(schemaObj);
  61403. }
  61404. /**
  61405. * Adds schema to the instance.
  61406. * @this Ajv
  61407. * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
  61408. * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
  61409. * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.
  61410. * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.
  61411. * @return {Ajv} this for method chaining
  61412. */
  61413. function addSchema(schema, key, _skipValidation, _meta) {
  61414. if (Array.isArray(schema)){
  61415. for (var i=0; i<schema.length; i++) this.addSchema(schema[i], undefined, _skipValidation, _meta);
  61416. return this;
  61417. }
  61418. var id = this._getId(schema);
  61419. if (id !== undefined && typeof id != 'string')
  61420. throw new Error('schema id must be string');
  61421. key = resolve.normalizeId(key || id);
  61422. checkUnique(this, key);
  61423. this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
  61424. return this;
  61425. }
  61426. /**
  61427. * Add schema that will be used to validate other schemas
  61428. * options in META_IGNORE_OPTIONS are alway set to false
  61429. * @this Ajv
  61430. * @param {Object} schema schema object
  61431. * @param {String} key optional schema key
  61432. * @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema
  61433. * @return {Ajv} this for method chaining
  61434. */
  61435. function addMetaSchema(schema, key, skipValidation) {
  61436. this.addSchema(schema, key, skipValidation, true);
  61437. return this;
  61438. }
  61439. /**
  61440. * Validate schema
  61441. * @this Ajv
  61442. * @param {Object} schema schema to validate
  61443. * @param {Boolean} throwOrLogError pass true to throw (or log) an error if invalid
  61444. * @return {Boolean} true if schema is valid
  61445. */
  61446. function validateSchema(schema, throwOrLogError) {
  61447. var $schema = schema.$schema;
  61448. if ($schema !== undefined && typeof $schema != 'string')
  61449. throw new Error('$schema must be a string');
  61450. $schema = $schema || this._opts.defaultMeta || defaultMeta(this);
  61451. if (!$schema) {
  61452. this.logger.warn('meta-schema not available');
  61453. this.errors = null;
  61454. return true;
  61455. }
  61456. var currentUriFormat = this._formats.uri;
  61457. this._formats.uri = typeof currentUriFormat == 'function'
  61458. ? this._schemaUriFormatFunc
  61459. : this._schemaUriFormat;
  61460. var valid;
  61461. try { valid = this.validate($schema, schema); }
  61462. finally { this._formats.uri = currentUriFormat; }
  61463. if (!valid && throwOrLogError) {
  61464. var message = 'schema is invalid: ' + this.errorsText();
  61465. if (this._opts.validateSchema == 'log') this.logger.error(message);
  61466. else throw new Error(message);
  61467. }
  61468. return valid;
  61469. }
  61470. function defaultMeta(self) {
  61471. var meta = self._opts.meta;
  61472. self._opts.defaultMeta = typeof meta == 'object'
  61473. ? self._getId(meta) || meta
  61474. : self.getSchema(META_SCHEMA_ID)
  61475. ? META_SCHEMA_ID
  61476. : undefined;
  61477. return self._opts.defaultMeta;
  61478. }
  61479. /**
  61480. * Get compiled schema from the instance by `key` or `ref`.
  61481. * @this Ajv
  61482. * @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
  61483. * @return {Function} schema validating function (with property `schema`).
  61484. */
  61485. function getSchema(keyRef) {
  61486. var schemaObj = _getSchemaObj(this, keyRef);
  61487. switch (typeof schemaObj) {
  61488. case 'object': return schemaObj.validate || this._compile(schemaObj);
  61489. case 'string': return this.getSchema(schemaObj);
  61490. case 'undefined': return _getSchemaFragment(this, keyRef);
  61491. }
  61492. }
  61493. function _getSchemaFragment(self, ref) {
  61494. var res = resolve.schema.call(self, { schema: {} }, ref);
  61495. if (res) {
  61496. var schema = res.schema
  61497. , root = res.root
  61498. , baseId = res.baseId;
  61499. var v = compileSchema.call(self, schema, root, undefined, baseId);
  61500. self._fragments[ref] = new SchemaObject({
  61501. ref: ref,
  61502. fragment: true,
  61503. schema: schema,
  61504. root: root,
  61505. baseId: baseId,
  61506. validate: v
  61507. });
  61508. return v;
  61509. }
  61510. }
  61511. function _getSchemaObj(self, keyRef) {
  61512. keyRef = resolve.normalizeId(keyRef);
  61513. return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
  61514. }
  61515. /**
  61516. * Remove cached schema(s).
  61517. * If no parameter is passed all schemas but meta-schemas are removed.
  61518. * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
  61519. * Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
  61520. * @this Ajv
  61521. * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
  61522. * @return {Ajv} this for method chaining
  61523. */
  61524. function removeSchema(schemaKeyRef) {
  61525. if (schemaKeyRef instanceof RegExp) {
  61526. _removeAllSchemas(this, this._schemas, schemaKeyRef);
  61527. _removeAllSchemas(this, this._refs, schemaKeyRef);
  61528. return this;
  61529. }
  61530. switch (typeof schemaKeyRef) {
  61531. case 'undefined':
  61532. _removeAllSchemas(this, this._schemas);
  61533. _removeAllSchemas(this, this._refs);
  61534. this._cache.clear();
  61535. return this;
  61536. case 'string':
  61537. var schemaObj = _getSchemaObj(this, schemaKeyRef);
  61538. if (schemaObj) this._cache.del(schemaObj.cacheKey);
  61539. delete this._schemas[schemaKeyRef];
  61540. delete this._refs[schemaKeyRef];
  61541. return this;
  61542. case 'object':
  61543. var serialize = this._opts.serialize;
  61544. var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef;
  61545. this._cache.del(cacheKey);
  61546. var id = this._getId(schemaKeyRef);
  61547. if (id) {
  61548. id = resolve.normalizeId(id);
  61549. delete this._schemas[id];
  61550. delete this._refs[id];
  61551. }
  61552. }
  61553. return this;
  61554. }
  61555. function _removeAllSchemas(self, schemas, regex) {
  61556. for (var keyRef in schemas) {
  61557. var schemaObj = schemas[keyRef];
  61558. if (!schemaObj.meta && (!regex || regex.test(keyRef))) {
  61559. self._cache.del(schemaObj.cacheKey);
  61560. delete schemas[keyRef];
  61561. }
  61562. }
  61563. }
  61564. /* @this Ajv */
  61565. function _addSchema(schema, skipValidation, meta, shouldAddSchema) {
  61566. if (typeof schema != 'object' && typeof schema != 'boolean')
  61567. throw new Error('schema should be object or boolean');
  61568. var serialize = this._opts.serialize;
  61569. var cacheKey = serialize ? serialize(schema) : schema;
  61570. var cached = this._cache.get(cacheKey);
  61571. if (cached) return cached;
  61572. shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;
  61573. var id = resolve.normalizeId(this._getId(schema));
  61574. if (id && shouldAddSchema) checkUnique(this, id);
  61575. var willValidate = this._opts.validateSchema !== false && !skipValidation;
  61576. var recursiveMeta;
  61577. if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema.$schema)))
  61578. this.validateSchema(schema, true);
  61579. var localRefs = resolve.ids.call(this, schema);
  61580. var schemaObj = new SchemaObject({
  61581. id: id,
  61582. schema: schema,
  61583. localRefs: localRefs,
  61584. cacheKey: cacheKey,
  61585. meta: meta
  61586. });
  61587. if (id[0] != '#' && shouldAddSchema) this._refs[id] = schemaObj;
  61588. this._cache.put(cacheKey, schemaObj);
  61589. if (willValidate && recursiveMeta) this.validateSchema(schema, true);
  61590. return schemaObj;
  61591. }
  61592. /* @this Ajv */
  61593. function _compile(schemaObj, root) {
  61594. if (schemaObj.compiling) {
  61595. schemaObj.validate = callValidate;
  61596. callValidate.schema = schemaObj.schema;
  61597. callValidate.errors = null;
  61598. callValidate.root = root ? root : callValidate;
  61599. if (schemaObj.schema.$async === true)
  61600. callValidate.$async = true;
  61601. return callValidate;
  61602. }
  61603. schemaObj.compiling = true;
  61604. var currentOpts;
  61605. if (schemaObj.meta) {
  61606. currentOpts = this._opts;
  61607. this._opts = this._metaOpts;
  61608. }
  61609. var v;
  61610. try { v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); }
  61611. finally {
  61612. schemaObj.compiling = false;
  61613. if (schemaObj.meta) this._opts = currentOpts;
  61614. }
  61615. schemaObj.validate = v;
  61616. schemaObj.refs = v.refs;
  61617. schemaObj.refVal = v.refVal;
  61618. schemaObj.root = v.root;
  61619. return v;
  61620. function callValidate() {
  61621. var _validate = schemaObj.validate;
  61622. var result = _validate.apply(null, arguments);
  61623. callValidate.errors = _validate.errors;
  61624. return result;
  61625. }
  61626. }
  61627. function chooseGetId(opts) {
  61628. switch (opts.schemaId) {
  61629. case '$id': return _get$Id;
  61630. case 'id': return _getId;
  61631. default: return _get$IdOrId;
  61632. }
  61633. }
  61634. /* @this Ajv */
  61635. function _getId(schema) {
  61636. if (schema.$id) this.logger.warn('schema $id ignored', schema.$id);
  61637. return schema.id;
  61638. }
  61639. /* @this Ajv */
  61640. function _get$Id(schema) {
  61641. if (schema.id) this.logger.warn('schema id ignored', schema.id);
  61642. return schema.$id;
  61643. }
  61644. function _get$IdOrId(schema) {
  61645. if (schema.$id && schema.id && schema.$id != schema.id)
  61646. throw new Error('schema $id is different from id');
  61647. return schema.$id || schema.id;
  61648. }
  61649. /**
  61650. * Convert array of error message objects to string
  61651. * @this Ajv
  61652. * @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.
  61653. * @param {Object} options optional options with properties `separator` and `dataVar`.
  61654. * @return {String} human readable string with all errors descriptions
  61655. */
  61656. function errorsText(errors, options) {
  61657. errors = errors || this.errors;
  61658. if (!errors) return 'No errors';
  61659. options = options || {};
  61660. var separator = options.separator === undefined ? ', ' : options.separator;
  61661. var dataVar = options.dataVar === undefined ? 'data' : options.dataVar;
  61662. var text = '';
  61663. for (var i=0; i<errors.length; i++) {
  61664. var e = errors[i];
  61665. if (e) text += dataVar + e.dataPath + ' ' + e.message + separator;
  61666. }
  61667. return text.slice(0, -separator.length);
  61668. }
  61669. /**
  61670. * Add custom format
  61671. * @this Ajv
  61672. * @param {String} name format name
  61673. * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
  61674. * @return {Ajv} this for method chaining
  61675. */
  61676. function addFormat(name, format) {
  61677. if (typeof format == 'string') format = new RegExp(format);
  61678. this._formats[name] = format;
  61679. return this;
  61680. }
  61681. function addDraft6MetaSchema(self) {
  61682. var $dataSchema;
  61683. if (self._opts.$data) {
  61684. $dataSchema = __webpack_require__(604);
  61685. self.addMetaSchema($dataSchema, $dataSchema.$id, true);
  61686. }
  61687. if (self._opts.meta === false) return;
  61688. var metaSchema = __webpack_require__(605);
  61689. if (self._opts.$data) metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA);
  61690. self.addMetaSchema(metaSchema, META_SCHEMA_ID, true);
  61691. self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
  61692. }
  61693. function addInitialSchemas(self) {
  61694. var optsSchemas = self._opts.schemas;
  61695. if (!optsSchemas) return;
  61696. if (Array.isArray(optsSchemas)) self.addSchema(optsSchemas);
  61697. else for (var key in optsSchemas) self.addSchema(optsSchemas[key], key);
  61698. }
  61699. function addInitialFormats(self) {
  61700. for (var name in self._opts.formats) {
  61701. var format = self._opts.formats[name];
  61702. self.addFormat(name, format);
  61703. }
  61704. }
  61705. function checkUnique(self, id) {
  61706. if (self._schemas[id] || self._refs[id])
  61707. throw new Error('schema with key or id "' + id + '" already exists');
  61708. }
  61709. function getMetaSchemaOptions(self) {
  61710. var metaOpts = util.copy(self._opts);
  61711. for (var i=0; i<META_IGNORE_OPTIONS.length; i++)
  61712. delete metaOpts[META_IGNORE_OPTIONS[i]];
  61713. return metaOpts;
  61714. }
  61715. function setLogger(self) {
  61716. var logger = self._opts.logger;
  61717. if (logger === false) {
  61718. self.logger = {log: noop, warn: noop, error: noop};
  61719. } else {
  61720. if (logger === undefined) logger = console;
  61721. if (!(typeof logger == 'object' && logger.log && logger.warn && logger.error))
  61722. throw new Error('logger must implement log, warn and error methods');
  61723. self.logger = logger;
  61724. }
  61725. }
  61726. function noop() {}
  61727. /***/ }),
  61728. /* 575 */
  61729. /***/ (function(module, exports, __webpack_require__) {
  61730. "use strict";
  61731. var resolve = __webpack_require__(152)
  61732. , util = __webpack_require__(62)
  61733. , errorClasses = __webpack_require__(154)
  61734. , stableStringify = __webpack_require__(367);
  61735. var validateGenerator = __webpack_require__(368);
  61736. /**
  61737. * Functions below are used inside compiled validations function
  61738. */
  61739. var co = __webpack_require__(369);
  61740. var ucs2length = util.ucs2length;
  61741. var equal = __webpack_require__(153);
  61742. // this error is thrown by async schemas to return validation errors via exception
  61743. var ValidationError = errorClasses.Validation;
  61744. module.exports = compile;
  61745. /**
  61746. * Compiles schema to validation function
  61747. * @this Ajv
  61748. * @param {Object} schema schema object
  61749. * @param {Object} root object with information about the root schema for this schema
  61750. * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution
  61751. * @param {String} baseId base ID for IDs in the schema
  61752. * @return {Function} validation function
  61753. */
  61754. function compile(schema, root, localRefs, baseId) {
  61755. /* jshint validthis: true, evil: true */
  61756. /* eslint no-shadow: 0 */
  61757. var self = this
  61758. , opts = this._opts
  61759. , refVal = [ undefined ]
  61760. , refs = {}
  61761. , patterns = []
  61762. , patternsHash = {}
  61763. , defaults = []
  61764. , defaultsHash = {}
  61765. , customRules = [];
  61766. root = root || { schema: schema, refVal: refVal, refs: refs };
  61767. var c = checkCompiling.call(this, schema, root, baseId);
  61768. var compilation = this._compilations[c.index];
  61769. if (c.compiling) return (compilation.callValidate = callValidate);
  61770. var formats = this._formats;
  61771. var RULES = this.RULES;
  61772. try {
  61773. var v = localCompile(schema, root, localRefs, baseId);
  61774. compilation.validate = v;
  61775. var cv = compilation.callValidate;
  61776. if (cv) {
  61777. cv.schema = v.schema;
  61778. cv.errors = null;
  61779. cv.refs = v.refs;
  61780. cv.refVal = v.refVal;
  61781. cv.root = v.root;
  61782. cv.$async = v.$async;
  61783. if (opts.sourceCode) cv.source = v.source;
  61784. }
  61785. return v;
  61786. } finally {
  61787. endCompiling.call(this, schema, root, baseId);
  61788. }
  61789. function callValidate() {
  61790. var validate = compilation.validate;
  61791. var result = validate.apply(null, arguments);
  61792. callValidate.errors = validate.errors;
  61793. return result;
  61794. }
  61795. function localCompile(_schema, _root, localRefs, baseId) {
  61796. var isRoot = !_root || (_root && _root.schema == _schema);
  61797. if (_root.schema != root.schema)
  61798. return compile.call(self, _schema, _root, localRefs, baseId);
  61799. var $async = _schema.$async === true;
  61800. var sourceCode = validateGenerator({
  61801. isTop: true,
  61802. schema: _schema,
  61803. isRoot: isRoot,
  61804. baseId: baseId,
  61805. root: _root,
  61806. schemaPath: '',
  61807. errSchemaPath: '#',
  61808. errorPath: '""',
  61809. MissingRefError: errorClasses.MissingRef,
  61810. RULES: RULES,
  61811. validate: validateGenerator,
  61812. util: util,
  61813. resolve: resolve,
  61814. resolveRef: resolveRef,
  61815. usePattern: usePattern,
  61816. useDefault: useDefault,
  61817. useCustomRule: useCustomRule,
  61818. opts: opts,
  61819. formats: formats,
  61820. logger: self.logger,
  61821. self: self
  61822. });
  61823. sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)
  61824. + vars(defaults, defaultCode) + vars(customRules, customRuleCode)
  61825. + sourceCode;
  61826. if (opts.processCode) sourceCode = opts.processCode(sourceCode);
  61827. // console.log('\n\n\n *** \n', JSON.stringify(sourceCode));
  61828. var validate;
  61829. try {
  61830. var makeValidate = new Function(
  61831. 'self',
  61832. 'RULES',
  61833. 'formats',
  61834. 'root',
  61835. 'refVal',
  61836. 'defaults',
  61837. 'customRules',
  61838. 'co',
  61839. 'equal',
  61840. 'ucs2length',
  61841. 'ValidationError',
  61842. sourceCode
  61843. );
  61844. validate = makeValidate(
  61845. self,
  61846. RULES,
  61847. formats,
  61848. root,
  61849. refVal,
  61850. defaults,
  61851. customRules,
  61852. co,
  61853. equal,
  61854. ucs2length,
  61855. ValidationError
  61856. );
  61857. refVal[0] = validate;
  61858. } catch(e) {
  61859. self.logger.error('Error compiling schema, function code:', sourceCode);
  61860. throw e;
  61861. }
  61862. validate.schema = _schema;
  61863. validate.errors = null;
  61864. validate.refs = refs;
  61865. validate.refVal = refVal;
  61866. validate.root = isRoot ? validate : _root;
  61867. if ($async) validate.$async = true;
  61868. if (opts.sourceCode === true) {
  61869. validate.source = {
  61870. code: sourceCode,
  61871. patterns: patterns,
  61872. defaults: defaults
  61873. };
  61874. }
  61875. return validate;
  61876. }
  61877. function resolveRef(baseId, ref, isRoot) {
  61878. ref = resolve.url(baseId, ref);
  61879. var refIndex = refs[ref];
  61880. var _refVal, refCode;
  61881. if (refIndex !== undefined) {
  61882. _refVal = refVal[refIndex];
  61883. refCode = 'refVal[' + refIndex + ']';
  61884. return resolvedRef(_refVal, refCode);
  61885. }
  61886. if (!isRoot && root.refs) {
  61887. var rootRefId = root.refs[ref];
  61888. if (rootRefId !== undefined) {
  61889. _refVal = root.refVal[rootRefId];
  61890. refCode = addLocalRef(ref, _refVal);
  61891. return resolvedRef(_refVal, refCode);
  61892. }
  61893. }
  61894. refCode = addLocalRef(ref);
  61895. var v = resolve.call(self, localCompile, root, ref);
  61896. if (v === undefined) {
  61897. var localSchema = localRefs && localRefs[ref];
  61898. if (localSchema) {
  61899. v = resolve.inlineRef(localSchema, opts.inlineRefs)
  61900. ? localSchema
  61901. : compile.call(self, localSchema, root, localRefs, baseId);
  61902. }
  61903. }
  61904. if (v === undefined) {
  61905. removeLocalRef(ref);
  61906. } else {
  61907. replaceLocalRef(ref, v);
  61908. return resolvedRef(v, refCode);
  61909. }
  61910. }
  61911. function addLocalRef(ref, v) {
  61912. var refId = refVal.length;
  61913. refVal[refId] = v;
  61914. refs[ref] = refId;
  61915. return 'refVal' + refId;
  61916. }
  61917. function removeLocalRef(ref) {
  61918. delete refs[ref];
  61919. }
  61920. function replaceLocalRef(ref, v) {
  61921. var refId = refs[ref];
  61922. refVal[refId] = v;
  61923. }
  61924. function resolvedRef(refVal, code) {
  61925. return typeof refVal == 'object' || typeof refVal == 'boolean'
  61926. ? { code: code, schema: refVal, inline: true }
  61927. : { code: code, $async: refVal && refVal.$async };
  61928. }
  61929. function usePattern(regexStr) {
  61930. var index = patternsHash[regexStr];
  61931. if (index === undefined) {
  61932. index = patternsHash[regexStr] = patterns.length;
  61933. patterns[index] = regexStr;
  61934. }
  61935. return 'pattern' + index;
  61936. }
  61937. function useDefault(value) {
  61938. switch (typeof value) {
  61939. case 'boolean':
  61940. case 'number':
  61941. return '' + value;
  61942. case 'string':
  61943. return util.toQuotedString(value);
  61944. case 'object':
  61945. if (value === null) return 'null';
  61946. var valueStr = stableStringify(value);
  61947. var index = defaultsHash[valueStr];
  61948. if (index === undefined) {
  61949. index = defaultsHash[valueStr] = defaults.length;
  61950. defaults[index] = value;
  61951. }
  61952. return 'default' + index;
  61953. }
  61954. }
  61955. function useCustomRule(rule, schema, parentSchema, it) {
  61956. var validateSchema = rule.definition.validateSchema;
  61957. if (validateSchema && self._opts.validateSchema !== false) {
  61958. var valid = validateSchema(schema);
  61959. if (!valid) {
  61960. var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);
  61961. if (self._opts.validateSchema == 'log') self.logger.error(message);
  61962. else throw new Error(message);
  61963. }
  61964. }
  61965. var compile = rule.definition.compile
  61966. , inline = rule.definition.inline
  61967. , macro = rule.definition.macro;
  61968. var validate;
  61969. if (compile) {
  61970. validate = compile.call(self, schema, parentSchema, it);
  61971. } else if (macro) {
  61972. validate = macro.call(self, schema, parentSchema, it);
  61973. if (opts.validateSchema !== false) self.validateSchema(validate, true);
  61974. } else if (inline) {
  61975. validate = inline.call(self, it, rule.keyword, schema, parentSchema);
  61976. } else {
  61977. validate = rule.definition.validate;
  61978. if (!validate) return;
  61979. }
  61980. if (validate === undefined)
  61981. throw new Error('custom keyword "' + rule.keyword + '"failed to compile');
  61982. var index = customRules.length;
  61983. customRules[index] = validate;
  61984. return {
  61985. code: 'customRule' + index,
  61986. validate: validate
  61987. };
  61988. }
  61989. }
  61990. /**
  61991. * Checks if the schema is currently compiled
  61992. * @this Ajv
  61993. * @param {Object} schema schema to compile
  61994. * @param {Object} root root object
  61995. * @param {String} baseId base schema ID
  61996. * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean)
  61997. */
  61998. function checkCompiling(schema, root, baseId) {
  61999. /* jshint validthis: true */
  62000. var index = compIndex.call(this, schema, root, baseId);
  62001. if (index >= 0) return { index: index, compiling: true };
  62002. index = this._compilations.length;
  62003. this._compilations[index] = {
  62004. schema: schema,
  62005. root: root,
  62006. baseId: baseId
  62007. };
  62008. return { index: index, compiling: false };
  62009. }
  62010. /**
  62011. * Removes the schema from the currently compiled list
  62012. * @this Ajv
  62013. * @param {Object} schema schema to compile
  62014. * @param {Object} root root object
  62015. * @param {String} baseId base schema ID
  62016. */
  62017. function endCompiling(schema, root, baseId) {
  62018. /* jshint validthis: true */
  62019. var i = compIndex.call(this, schema, root, baseId);
  62020. if (i >= 0) this._compilations.splice(i, 1);
  62021. }
  62022. /**
  62023. * Index of schema compilation in the currently compiled list
  62024. * @this Ajv
  62025. * @param {Object} schema schema to compile
  62026. * @param {Object} root root object
  62027. * @param {String} baseId base schema ID
  62028. * @return {Integer} compilation index
  62029. */
  62030. function compIndex(schema, root, baseId) {
  62031. /* jshint validthis: true */
  62032. for (var i=0; i<this._compilations.length; i++) {
  62033. var c = this._compilations[i];
  62034. if (c.schema == schema && c.root == root && c.baseId == baseId) return i;
  62035. }
  62036. return -1;
  62037. }
  62038. function patternCode(i, patterns) {
  62039. return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';
  62040. }
  62041. function defaultCode(i) {
  62042. return 'var default' + i + ' = defaults[' + i + '];';
  62043. }
  62044. function refValCode(i, refVal) {
  62045. return refVal[i] === undefined ? '' : 'var refVal' + i + ' = refVal[' + i + '];';
  62046. }
  62047. function customRuleCode(i) {
  62048. return 'var customRule' + i + ' = customRules[' + i + '];';
  62049. }
  62050. function vars(arr, statement) {
  62051. if (!arr.length) return '';
  62052. var code = '';
  62053. for (var i=0; i<arr.length; i++)
  62054. code += statement(i, arr);
  62055. return code;
  62056. }
  62057. /***/ }),
  62058. /* 576 */
  62059. /***/ (function(module, exports, __webpack_require__) {
  62060. "use strict";
  62061. // https://mathiasbynens.be/notes/javascript-encoding
  62062. // https://github.com/bestiejs/punycode.js - punycode.ucs2.decode
  62063. module.exports = function ucs2length(str) {
  62064. var length = 0
  62065. , len = str.length
  62066. , pos = 0
  62067. , value;
  62068. while (pos < len) {
  62069. length++;
  62070. value = str.charCodeAt(pos++);
  62071. if (value >= 0xD800 && value <= 0xDBFF && pos < len) {
  62072. // high surrogate, and there is a next character
  62073. value = str.charCodeAt(pos);
  62074. if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate
  62075. }
  62076. }
  62077. return length;
  62078. };
  62079. /***/ }),
  62080. /* 577 */
  62081. /***/ (function(module, exports, __webpack_require__) {
  62082. "use strict";
  62083. var traverse = module.exports = function (schema, opts, cb) {
  62084. if (typeof opts == 'function') {
  62085. cb = opts;
  62086. opts = {};
  62087. }
  62088. _traverse(opts, cb, schema, '', schema);
  62089. };
  62090. traverse.keywords = {
  62091. additionalItems: true,
  62092. items: true,
  62093. contains: true,
  62094. additionalProperties: true,
  62095. propertyNames: true,
  62096. not: true
  62097. };
  62098. traverse.arrayKeywords = {
  62099. items: true,
  62100. allOf: true,
  62101. anyOf: true,
  62102. oneOf: true
  62103. };
  62104. traverse.propsKeywords = {
  62105. definitions: true,
  62106. properties: true,
  62107. patternProperties: true,
  62108. dependencies: true
  62109. };
  62110. traverse.skipKeywords = {
  62111. enum: true,
  62112. const: true,
  62113. required: true,
  62114. maximum: true,
  62115. minimum: true,
  62116. exclusiveMaximum: true,
  62117. exclusiveMinimum: true,
  62118. multipleOf: true,
  62119. maxLength: true,
  62120. minLength: true,
  62121. pattern: true,
  62122. format: true,
  62123. maxItems: true,
  62124. minItems: true,
  62125. uniqueItems: true,
  62126. maxProperties: true,
  62127. minProperties: true
  62128. };
  62129. function _traverse(opts, cb, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
  62130. if (schema && typeof schema == 'object' && !Array.isArray(schema)) {
  62131. cb(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
  62132. for (var key in schema) {
  62133. var sch = schema[key];
  62134. if (Array.isArray(sch)) {
  62135. if (key in traverse.arrayKeywords) {
  62136. for (var i=0; i<sch.length; i++)
  62137. _traverse(opts, cb, sch[i], jsonPtr + '/' + key + '/' + i, rootSchema, jsonPtr, key, schema, i);
  62138. }
  62139. } else if (key in traverse.propsKeywords) {
  62140. if (sch && typeof sch == 'object') {
  62141. for (var prop in sch)
  62142. _traverse(opts, cb, sch[prop], jsonPtr + '/' + key + '/' + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
  62143. }
  62144. } else if (key in traverse.keywords || (opts.allKeys && !(key in traverse.skipKeywords))) {
  62145. _traverse(opts, cb, sch, jsonPtr + '/' + key, rootSchema, jsonPtr, key, schema);
  62146. }
  62147. }
  62148. }
  62149. }
  62150. function escapeJsonPtr(str) {
  62151. return str.replace(/~/g, '~0').replace(/\//g, '~1');
  62152. }
  62153. /***/ }),
  62154. /* 578 */
  62155. /***/ (function(module, exports, __webpack_require__) {
  62156. "use strict";
  62157. var Cache = module.exports = function Cache() {
  62158. this._cache = {};
  62159. };
  62160. Cache.prototype.put = function Cache_put(key, value) {
  62161. this._cache[key] = value;
  62162. };
  62163. Cache.prototype.get = function Cache_get(key) {
  62164. return this._cache[key];
  62165. };
  62166. Cache.prototype.del = function Cache_del(key) {
  62167. delete this._cache[key];
  62168. };
  62169. Cache.prototype.clear = function Cache_clear() {
  62170. this._cache = {};
  62171. };
  62172. /***/ }),
  62173. /* 579 */
  62174. /***/ (function(module, exports, __webpack_require__) {
  62175. "use strict";
  62176. var util = __webpack_require__(62);
  62177. var DATE = /^\d\d\d\d-(\d\d)-(\d\d)$/;
  62178. var DAYS = [0,31,29,31,30,31,30,31,31,30,31,30,31];
  62179. var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i;
  62180. var HOSTNAME = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i;
  62181. var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
  62182. var URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
  62183. // uri-template: https://tools.ietf.org/html/rfc6570
  62184. var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;
  62185. // For the source: https://gist.github.com/dperini/729294
  62186. // For test cases: https://mathiasbynens.be/demo/url-regex
  62187. // @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983.
  62188. // var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;
  62189. var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;
  62190. var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
  62191. var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$|^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;
  62192. var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
  62193. module.exports = formats;
  62194. function formats(mode) {
  62195. mode = mode == 'full' ? 'full' : 'fast';
  62196. return util.copy(formats[mode]);
  62197. }
  62198. formats.fast = {
  62199. // date: http://tools.ietf.org/html/rfc3339#section-5.6
  62200. date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
  62201. // date-time: http://tools.ietf.org/html/rfc3339#section-5.6
  62202. time: /^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,
  62203. 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,
  62204. // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
  62205. uri: /^(?:[a-z][a-z0-9+-.]*)(?::|\/)\/?[^\s]*$/i,
  62206. 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,
  62207. 'uri-template': URITEMPLATE,
  62208. url: URL,
  62209. // email (sources from jsen validator):
  62210. // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
  62211. // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation')
  62212. email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,
  62213. hostname: HOSTNAME,
  62214. // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
  62215. ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
  62216. // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses
  62217. ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
  62218. regex: regex,
  62219. // uuid: http://tools.ietf.org/html/rfc4122
  62220. uuid: UUID,
  62221. // JSON-pointer: https://tools.ietf.org/html/rfc6901
  62222. // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
  62223. 'json-pointer': JSON_POINTER,
  62224. // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
  62225. 'relative-json-pointer': RELATIVE_JSON_POINTER
  62226. };
  62227. formats.full = {
  62228. date: date,
  62229. time: time,
  62230. 'date-time': date_time,
  62231. uri: uri,
  62232. 'uri-reference': URIREF,
  62233. 'uri-template': URITEMPLATE,
  62234. url: URL,
  62235. email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
  62236. hostname: hostname,
  62237. ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
  62238. ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
  62239. regex: regex,
  62240. uuid: UUID,
  62241. 'json-pointer': JSON_POINTER,
  62242. 'relative-json-pointer': RELATIVE_JSON_POINTER
  62243. };
  62244. function date(str) {
  62245. // full-date from http://tools.ietf.org/html/rfc3339#section-5.6
  62246. var matches = str.match(DATE);
  62247. if (!matches) return false;
  62248. var month = +matches[1];
  62249. var day = +matches[2];
  62250. return month >= 1 && month <= 12 && day >= 1 && day <= DAYS[month];
  62251. }
  62252. function time(str, full) {
  62253. var matches = str.match(TIME);
  62254. if (!matches) return false;
  62255. var hour = matches[1];
  62256. var minute = matches[2];
  62257. var second = matches[3];
  62258. var timeZone = matches[5];
  62259. return hour <= 23 && minute <= 59 && second <= 59 && (!full || timeZone);
  62260. }
  62261. var DATE_TIME_SEPARATOR = /t|\s/i;
  62262. function date_time(str) {
  62263. // http://tools.ietf.org/html/rfc3339#section-5.6
  62264. var dateTime = str.split(DATE_TIME_SEPARATOR);
  62265. return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true);
  62266. }
  62267. function hostname(str) {
  62268. // https://tools.ietf.org/html/rfc1034#section-3.5
  62269. // https://tools.ietf.org/html/rfc1123#section-2
  62270. return str.length <= 255 && HOSTNAME.test(str);
  62271. }
  62272. var NOT_URI_FRAGMENT = /\/|:/;
  62273. function uri(str) {
  62274. // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "."
  62275. return NOT_URI_FRAGMENT.test(str) && URI.test(str);
  62276. }
  62277. var Z_ANCHOR = /[^\\]\\Z/;
  62278. function regex(str) {
  62279. if (Z_ANCHOR.test(str)) return false;
  62280. try {
  62281. new RegExp(str);
  62282. return true;
  62283. } catch(e) {
  62284. return false;
  62285. }
  62286. }
  62287. /***/ }),
  62288. /* 580 */
  62289. /***/ (function(module, exports, __webpack_require__) {
  62290. "use strict";
  62291. var ruleModules = __webpack_require__(581)
  62292. , toHash = __webpack_require__(62).toHash;
  62293. module.exports = function rules() {
  62294. var RULES = [
  62295. { type: 'number',
  62296. rules: [ { 'maximum': ['exclusiveMaximum'] },
  62297. { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] },
  62298. { type: 'string',
  62299. rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] },
  62300. { type: 'array',
  62301. rules: [ 'maxItems', 'minItems', 'uniqueItems', 'contains', 'items' ] },
  62302. { type: 'object',
  62303. rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames',
  62304. { 'properties': ['additionalProperties', 'patternProperties'] } ] },
  62305. { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf' ] }
  62306. ];
  62307. var ALL = [ 'type' ];
  62308. var KEYWORDS = [
  62309. 'additionalItems', '$schema', '$id', 'id', 'title',
  62310. 'description', 'default', 'definitions'
  62311. ];
  62312. var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
  62313. RULES.all = toHash(ALL);
  62314. RULES.types = toHash(TYPES);
  62315. RULES.forEach(function (group) {
  62316. group.rules = group.rules.map(function (keyword) {
  62317. var implKeywords;
  62318. if (typeof keyword == 'object') {
  62319. var key = Object.keys(keyword)[0];
  62320. implKeywords = keyword[key];
  62321. keyword = key;
  62322. implKeywords.forEach(function (k) {
  62323. ALL.push(k);
  62324. RULES.all[k] = true;
  62325. });
  62326. }
  62327. ALL.push(keyword);
  62328. var rule = RULES.all[keyword] = {
  62329. keyword: keyword,
  62330. code: ruleModules[keyword],
  62331. implements: implKeywords
  62332. };
  62333. return rule;
  62334. });
  62335. if (group.type) RULES.types[group.type] = group;
  62336. });
  62337. RULES.keywords = toHash(ALL.concat(KEYWORDS));
  62338. RULES.custom = {};
  62339. return RULES;
  62340. };
  62341. /***/ }),
  62342. /* 581 */
  62343. /***/ (function(module, exports, __webpack_require__) {
  62344. "use strict";
  62345. //all requires must be explicit because browserify won't work with dynamic requires
  62346. module.exports = {
  62347. '$ref': __webpack_require__(582),
  62348. allOf: __webpack_require__(583),
  62349. anyOf: __webpack_require__(584),
  62350. const: __webpack_require__(585),
  62351. contains: __webpack_require__(586),
  62352. dependencies: __webpack_require__(587),
  62353. 'enum': __webpack_require__(588),
  62354. format: __webpack_require__(589),
  62355. items: __webpack_require__(590),
  62356. maximum: __webpack_require__(370),
  62357. minimum: __webpack_require__(370),
  62358. maxItems: __webpack_require__(371),
  62359. minItems: __webpack_require__(371),
  62360. maxLength: __webpack_require__(372),
  62361. minLength: __webpack_require__(372),
  62362. maxProperties: __webpack_require__(373),
  62363. minProperties: __webpack_require__(373),
  62364. multipleOf: __webpack_require__(591),
  62365. not: __webpack_require__(592),
  62366. oneOf: __webpack_require__(593),
  62367. pattern: __webpack_require__(594),
  62368. properties: __webpack_require__(595),
  62369. propertyNames: __webpack_require__(596),
  62370. required: __webpack_require__(597),
  62371. uniqueItems: __webpack_require__(598),
  62372. validate: __webpack_require__(368)
  62373. };
  62374. /***/ }),
  62375. /* 582 */
  62376. /***/ (function(module, exports, __webpack_require__) {
  62377. "use strict";
  62378. module.exports = function generate_ref(it, $keyword, $ruleType) {
  62379. var out = ' ';
  62380. var $lvl = it.level;
  62381. var $dataLvl = it.dataLevel;
  62382. var $schema = it.schema[$keyword];
  62383. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  62384. var $breakOnError = !it.opts.allErrors;
  62385. var $data = 'data' + ($dataLvl || '');
  62386. var $valid = 'valid' + $lvl;
  62387. var $async, $refCode;
  62388. if ($schema == '#' || $schema == '#/') {
  62389. if (it.isRoot) {
  62390. $async = it.async;
  62391. $refCode = 'validate';
  62392. } else {
  62393. $async = it.root.schema.$async === true;
  62394. $refCode = 'root.refVal[0]';
  62395. }
  62396. } else {
  62397. var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot);
  62398. if ($refVal === undefined) {
  62399. var $message = it.MissingRefError.message(it.baseId, $schema);
  62400. if (it.opts.missingRefs == 'fail') {
  62401. it.logger.error($message);
  62402. var $$outStack = $$outStack || [];
  62403. $$outStack.push(out);
  62404. out = ''; /* istanbul ignore else */
  62405. if (it.createErrors !== false) {
  62406. out += ' { keyword: \'' + ('$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } ';
  62407. if (it.opts.messages !== false) {
  62408. out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' ';
  62409. }
  62410. if (it.opts.verbose) {
  62411. out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  62412. }
  62413. out += ' } ';
  62414. } else {
  62415. out += ' {} ';
  62416. }
  62417. var __err = out;
  62418. out = $$outStack.pop();
  62419. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  62420. if (it.async) {
  62421. out += ' throw new ValidationError([' + (__err) + ']); ';
  62422. } else {
  62423. out += ' validate.errors = [' + (__err) + ']; return false; ';
  62424. }
  62425. } else {
  62426. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  62427. }
  62428. if ($breakOnError) {
  62429. out += ' if (false) { ';
  62430. }
  62431. } else if (it.opts.missingRefs == 'ignore') {
  62432. it.logger.warn($message);
  62433. if ($breakOnError) {
  62434. out += ' if (true) { ';
  62435. }
  62436. } else {
  62437. throw new it.MissingRefError(it.baseId, $schema, $message);
  62438. }
  62439. } else if ($refVal.inline) {
  62440. var $it = it.util.copy(it);
  62441. $it.level++;
  62442. var $nextValid = 'valid' + $it.level;
  62443. $it.schema = $refVal.schema;
  62444. $it.schemaPath = '';
  62445. $it.errSchemaPath = $schema;
  62446. var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code);
  62447. out += ' ' + ($code) + ' ';
  62448. if ($breakOnError) {
  62449. out += ' if (' + ($nextValid) + ') { ';
  62450. }
  62451. } else {
  62452. $async = $refVal.$async === true;
  62453. $refCode = $refVal.code;
  62454. }
  62455. }
  62456. if ($refCode) {
  62457. var $$outStack = $$outStack || [];
  62458. $$outStack.push(out);
  62459. out = '';
  62460. if (it.opts.passContext) {
  62461. out += ' ' + ($refCode) + '.call(this, ';
  62462. } else {
  62463. out += ' ' + ($refCode) + '( ';
  62464. }
  62465. out += ' ' + ($data) + ', (dataPath || \'\')';
  62466. if (it.errorPath != '""') {
  62467. out += ' + ' + (it.errorPath);
  62468. }
  62469. var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
  62470. $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
  62471. out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ', rootData) ';
  62472. var __callValidate = out;
  62473. out = $$outStack.pop();
  62474. if ($async) {
  62475. if (!it.async) throw new Error('async schema referenced by sync schema');
  62476. if ($breakOnError) {
  62477. out += ' var ' + ($valid) + '; ';
  62478. }
  62479. out += ' try { ' + (it.yieldAwait) + ' ' + (__callValidate) + '; ';
  62480. if ($breakOnError) {
  62481. out += ' ' + ($valid) + ' = true; ';
  62482. }
  62483. out += ' } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ';
  62484. if ($breakOnError) {
  62485. out += ' ' + ($valid) + ' = false; ';
  62486. }
  62487. out += ' } ';
  62488. if ($breakOnError) {
  62489. out += ' if (' + ($valid) + ') { ';
  62490. }
  62491. } else {
  62492. out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } ';
  62493. if ($breakOnError) {
  62494. out += ' else { ';
  62495. }
  62496. }
  62497. }
  62498. return out;
  62499. }
  62500. /***/ }),
  62501. /* 583 */
  62502. /***/ (function(module, exports, __webpack_require__) {
  62503. "use strict";
  62504. module.exports = function generate_allOf(it, $keyword, $ruleType) {
  62505. var out = ' ';
  62506. var $schema = it.schema[$keyword];
  62507. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  62508. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  62509. var $breakOnError = !it.opts.allErrors;
  62510. var $it = it.util.copy(it);
  62511. var $closingBraces = '';
  62512. $it.level++;
  62513. var $nextValid = 'valid' + $it.level;
  62514. var $currentBaseId = $it.baseId,
  62515. $allSchemasEmpty = true;
  62516. var arr1 = $schema;
  62517. if (arr1) {
  62518. var $sch, $i = -1,
  62519. l1 = arr1.length - 1;
  62520. while ($i < l1) {
  62521. $sch = arr1[$i += 1];
  62522. if (it.util.schemaHasRules($sch, it.RULES.all)) {
  62523. $allSchemasEmpty = false;
  62524. $it.schema = $sch;
  62525. $it.schemaPath = $schemaPath + '[' + $i + ']';
  62526. $it.errSchemaPath = $errSchemaPath + '/' + $i;
  62527. out += ' ' + (it.validate($it)) + ' ';
  62528. $it.baseId = $currentBaseId;
  62529. if ($breakOnError) {
  62530. out += ' if (' + ($nextValid) + ') { ';
  62531. $closingBraces += '}';
  62532. }
  62533. }
  62534. }
  62535. }
  62536. if ($breakOnError) {
  62537. if ($allSchemasEmpty) {
  62538. out += ' if (true) { ';
  62539. } else {
  62540. out += ' ' + ($closingBraces.slice(0, -1)) + ' ';
  62541. }
  62542. }
  62543. out = it.util.cleanUpCode(out);
  62544. return out;
  62545. }
  62546. /***/ }),
  62547. /* 584 */
  62548. /***/ (function(module, exports, __webpack_require__) {
  62549. "use strict";
  62550. module.exports = function generate_anyOf(it, $keyword, $ruleType) {
  62551. var out = ' ';
  62552. var $lvl = it.level;
  62553. var $dataLvl = it.dataLevel;
  62554. var $schema = it.schema[$keyword];
  62555. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  62556. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  62557. var $breakOnError = !it.opts.allErrors;
  62558. var $data = 'data' + ($dataLvl || '');
  62559. var $valid = 'valid' + $lvl;
  62560. var $errs = 'errs__' + $lvl;
  62561. var $it = it.util.copy(it);
  62562. var $closingBraces = '';
  62563. $it.level++;
  62564. var $nextValid = 'valid' + $it.level;
  62565. var $noEmptySchema = $schema.every(function($sch) {
  62566. return it.util.schemaHasRules($sch, it.RULES.all);
  62567. });
  62568. if ($noEmptySchema) {
  62569. var $currentBaseId = $it.baseId;
  62570. out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; ';
  62571. var $wasComposite = it.compositeRule;
  62572. it.compositeRule = $it.compositeRule = true;
  62573. var arr1 = $schema;
  62574. if (arr1) {
  62575. var $sch, $i = -1,
  62576. l1 = arr1.length - 1;
  62577. while ($i < l1) {
  62578. $sch = arr1[$i += 1];
  62579. $it.schema = $sch;
  62580. $it.schemaPath = $schemaPath + '[' + $i + ']';
  62581. $it.errSchemaPath = $errSchemaPath + '/' + $i;
  62582. out += ' ' + (it.validate($it)) + ' ';
  62583. $it.baseId = $currentBaseId;
  62584. out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { ';
  62585. $closingBraces += '}';
  62586. }
  62587. }
  62588. it.compositeRule = $it.compositeRule = $wasComposite;
  62589. out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
  62590. if (it.createErrors !== false) {
  62591. out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
  62592. if (it.opts.messages !== false) {
  62593. out += ' , message: \'should match some schema in anyOf\' ';
  62594. }
  62595. if (it.opts.verbose) {
  62596. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  62597. }
  62598. out += ' } ';
  62599. } else {
  62600. out += ' {} ';
  62601. }
  62602. out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  62603. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  62604. if (it.async) {
  62605. out += ' throw new ValidationError(vErrors); ';
  62606. } else {
  62607. out += ' validate.errors = vErrors; return false; ';
  62608. }
  62609. }
  62610. out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
  62611. if (it.opts.allErrors) {
  62612. out += ' } ';
  62613. }
  62614. out = it.util.cleanUpCode(out);
  62615. } else {
  62616. if ($breakOnError) {
  62617. out += ' if (true) { ';
  62618. }
  62619. }
  62620. return out;
  62621. }
  62622. /***/ }),
  62623. /* 585 */
  62624. /***/ (function(module, exports, __webpack_require__) {
  62625. "use strict";
  62626. module.exports = function generate_const(it, $keyword, $ruleType) {
  62627. var out = ' ';
  62628. var $lvl = it.level;
  62629. var $dataLvl = it.dataLevel;
  62630. var $schema = it.schema[$keyword];
  62631. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  62632. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  62633. var $breakOnError = !it.opts.allErrors;
  62634. var $data = 'data' + ($dataLvl || '');
  62635. var $valid = 'valid' + $lvl;
  62636. var $isData = it.opts.$data && $schema && $schema.$data,
  62637. $schemaValue;
  62638. if ($isData) {
  62639. out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
  62640. $schemaValue = 'schema' + $lvl;
  62641. } else {
  62642. $schemaValue = $schema;
  62643. }
  62644. if (!$isData) {
  62645. out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';
  62646. }
  62647. out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { ';
  62648. var $$outStack = $$outStack || [];
  62649. $$outStack.push(out);
  62650. out = ''; /* istanbul ignore else */
  62651. if (it.createErrors !== false) {
  62652. out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
  62653. if (it.opts.messages !== false) {
  62654. out += ' , message: \'should be equal to constant\' ';
  62655. }
  62656. if (it.opts.verbose) {
  62657. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  62658. }
  62659. out += ' } ';
  62660. } else {
  62661. out += ' {} ';
  62662. }
  62663. var __err = out;
  62664. out = $$outStack.pop();
  62665. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  62666. if (it.async) {
  62667. out += ' throw new ValidationError([' + (__err) + ']); ';
  62668. } else {
  62669. out += ' validate.errors = [' + (__err) + ']; return false; ';
  62670. }
  62671. } else {
  62672. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  62673. }
  62674. out += ' }';
  62675. if ($breakOnError) {
  62676. out += ' else { ';
  62677. }
  62678. return out;
  62679. }
  62680. /***/ }),
  62681. /* 586 */
  62682. /***/ (function(module, exports, __webpack_require__) {
  62683. "use strict";
  62684. module.exports = function generate_contains(it, $keyword, $ruleType) {
  62685. var out = ' ';
  62686. var $lvl = it.level;
  62687. var $dataLvl = it.dataLevel;
  62688. var $schema = it.schema[$keyword];
  62689. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  62690. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  62691. var $breakOnError = !it.opts.allErrors;
  62692. var $data = 'data' + ($dataLvl || '');
  62693. var $valid = 'valid' + $lvl;
  62694. var $errs = 'errs__' + $lvl;
  62695. var $it = it.util.copy(it);
  62696. var $closingBraces = '';
  62697. $it.level++;
  62698. var $nextValid = 'valid' + $it.level;
  62699. var $idx = 'i' + $lvl,
  62700. $dataNxt = $it.dataLevel = it.dataLevel + 1,
  62701. $nextData = 'data' + $dataNxt,
  62702. $currentBaseId = it.baseId,
  62703. $nonEmptySchema = it.util.schemaHasRules($schema, it.RULES.all);
  62704. out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
  62705. if ($nonEmptySchema) {
  62706. var $wasComposite = it.compositeRule;
  62707. it.compositeRule = $it.compositeRule = true;
  62708. $it.schema = $schema;
  62709. $it.schemaPath = $schemaPath;
  62710. $it.errSchemaPath = $errSchemaPath;
  62711. out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
  62712. $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
  62713. var $passData = $data + '[' + $idx + ']';
  62714. $it.dataPathArr[$dataNxt] = $idx;
  62715. var $code = it.validate($it);
  62716. $it.baseId = $currentBaseId;
  62717. if (it.util.varOccurences($code, $nextData) < 2) {
  62718. out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
  62719. } else {
  62720. out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
  62721. }
  62722. out += ' if (' + ($nextValid) + ') break; } ';
  62723. it.compositeRule = $it.compositeRule = $wasComposite;
  62724. out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {';
  62725. } else {
  62726. out += ' if (' + ($data) + '.length == 0) {';
  62727. }
  62728. var $$outStack = $$outStack || [];
  62729. $$outStack.push(out);
  62730. out = ''; /* istanbul ignore else */
  62731. if (it.createErrors !== false) {
  62732. out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
  62733. if (it.opts.messages !== false) {
  62734. out += ' , message: \'should contain a valid item\' ';
  62735. }
  62736. if (it.opts.verbose) {
  62737. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  62738. }
  62739. out += ' } ';
  62740. } else {
  62741. out += ' {} ';
  62742. }
  62743. var __err = out;
  62744. out = $$outStack.pop();
  62745. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  62746. if (it.async) {
  62747. out += ' throw new ValidationError([' + (__err) + ']); ';
  62748. } else {
  62749. out += ' validate.errors = [' + (__err) + ']; return false; ';
  62750. }
  62751. } else {
  62752. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  62753. }
  62754. out += ' } else { ';
  62755. if ($nonEmptySchema) {
  62756. out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
  62757. }
  62758. if (it.opts.allErrors) {
  62759. out += ' } ';
  62760. }
  62761. out = it.util.cleanUpCode(out);
  62762. return out;
  62763. }
  62764. /***/ }),
  62765. /* 587 */
  62766. /***/ (function(module, exports, __webpack_require__) {
  62767. "use strict";
  62768. module.exports = function generate_dependencies(it, $keyword, $ruleType) {
  62769. var out = ' ';
  62770. var $lvl = it.level;
  62771. var $dataLvl = it.dataLevel;
  62772. var $schema = it.schema[$keyword];
  62773. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  62774. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  62775. var $breakOnError = !it.opts.allErrors;
  62776. var $data = 'data' + ($dataLvl || '');
  62777. var $errs = 'errs__' + $lvl;
  62778. var $it = it.util.copy(it);
  62779. var $closingBraces = '';
  62780. $it.level++;
  62781. var $nextValid = 'valid' + $it.level;
  62782. var $schemaDeps = {},
  62783. $propertyDeps = {},
  62784. $ownProperties = it.opts.ownProperties;
  62785. for ($property in $schema) {
  62786. var $sch = $schema[$property];
  62787. var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;
  62788. $deps[$property] = $sch;
  62789. }
  62790. out += 'var ' + ($errs) + ' = errors;';
  62791. var $currentErrorPath = it.errorPath;
  62792. out += 'var missing' + ($lvl) + ';';
  62793. for (var $property in $propertyDeps) {
  62794. $deps = $propertyDeps[$property];
  62795. if ($deps.length) {
  62796. out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
  62797. if ($ownProperties) {
  62798. out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
  62799. }
  62800. if ($breakOnError) {
  62801. out += ' && ( ';
  62802. var arr1 = $deps;
  62803. if (arr1) {
  62804. var $propertyKey, $i = -1,
  62805. l1 = arr1.length - 1;
  62806. while ($i < l1) {
  62807. $propertyKey = arr1[$i += 1];
  62808. if ($i) {
  62809. out += ' || ';
  62810. }
  62811. var $prop = it.util.getProperty($propertyKey),
  62812. $useData = $data + $prop;
  62813. out += ' ( ( ' + ($useData) + ' === undefined ';
  62814. if ($ownProperties) {
  62815. out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
  62816. }
  62817. out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) ';
  62818. }
  62819. }
  62820. out += ')) { ';
  62821. var $propertyPath = 'missing' + $lvl,
  62822. $missingProperty = '\' + ' + $propertyPath + ' + \'';
  62823. if (it.opts._errorDataPathProperty) {
  62824. it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
  62825. }
  62826. var $$outStack = $$outStack || [];
  62827. $$outStack.push(out);
  62828. out = ''; /* istanbul ignore else */
  62829. if (it.createErrors !== false) {
  62830. out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
  62831. if (it.opts.messages !== false) {
  62832. out += ' , message: \'should have ';
  62833. if ($deps.length == 1) {
  62834. out += 'property ' + (it.util.escapeQuotes($deps[0]));
  62835. } else {
  62836. out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
  62837. }
  62838. out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
  62839. }
  62840. if (it.opts.verbose) {
  62841. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  62842. }
  62843. out += ' } ';
  62844. } else {
  62845. out += ' {} ';
  62846. }
  62847. var __err = out;
  62848. out = $$outStack.pop();
  62849. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  62850. if (it.async) {
  62851. out += ' throw new ValidationError([' + (__err) + ']); ';
  62852. } else {
  62853. out += ' validate.errors = [' + (__err) + ']; return false; ';
  62854. }
  62855. } else {
  62856. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  62857. }
  62858. } else {
  62859. out += ' ) { ';
  62860. var arr2 = $deps;
  62861. if (arr2) {
  62862. var $propertyKey, i2 = -1,
  62863. l2 = arr2.length - 1;
  62864. while (i2 < l2) {
  62865. $propertyKey = arr2[i2 += 1];
  62866. var $prop = it.util.getProperty($propertyKey),
  62867. $missingProperty = it.util.escapeQuotes($propertyKey),
  62868. $useData = $data + $prop;
  62869. if (it.opts._errorDataPathProperty) {
  62870. it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
  62871. }
  62872. out += ' if ( ' + ($useData) + ' === undefined ';
  62873. if ($ownProperties) {
  62874. out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
  62875. }
  62876. out += ') { var err = '; /* istanbul ignore else */
  62877. if (it.createErrors !== false) {
  62878. out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } ';
  62879. if (it.opts.messages !== false) {
  62880. out += ' , message: \'should have ';
  62881. if ($deps.length == 1) {
  62882. out += 'property ' + (it.util.escapeQuotes($deps[0]));
  62883. } else {
  62884. out += 'properties ' + (it.util.escapeQuotes($deps.join(", ")));
  62885. }
  62886. out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' ';
  62887. }
  62888. if (it.opts.verbose) {
  62889. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  62890. }
  62891. out += ' } ';
  62892. } else {
  62893. out += ' {} ';
  62894. }
  62895. out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
  62896. }
  62897. }
  62898. }
  62899. out += ' } ';
  62900. if ($breakOnError) {
  62901. $closingBraces += '}';
  62902. out += ' else { ';
  62903. }
  62904. }
  62905. }
  62906. it.errorPath = $currentErrorPath;
  62907. var $currentBaseId = $it.baseId;
  62908. for (var $property in $schemaDeps) {
  62909. var $sch = $schemaDeps[$property];
  62910. if (it.util.schemaHasRules($sch, it.RULES.all)) {
  62911. out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';
  62912. if ($ownProperties) {
  62913. out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') ';
  62914. }
  62915. out += ') { ';
  62916. $it.schema = $sch;
  62917. $it.schemaPath = $schemaPath + it.util.getProperty($property);
  62918. $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);
  62919. out += ' ' + (it.validate($it)) + ' ';
  62920. $it.baseId = $currentBaseId;
  62921. out += ' } ';
  62922. if ($breakOnError) {
  62923. out += ' if (' + ($nextValid) + ') { ';
  62924. $closingBraces += '}';
  62925. }
  62926. }
  62927. }
  62928. if ($breakOnError) {
  62929. out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
  62930. }
  62931. out = it.util.cleanUpCode(out);
  62932. return out;
  62933. }
  62934. /***/ }),
  62935. /* 588 */
  62936. /***/ (function(module, exports, __webpack_require__) {
  62937. "use strict";
  62938. module.exports = function generate_enum(it, $keyword, $ruleType) {
  62939. var out = ' ';
  62940. var $lvl = it.level;
  62941. var $dataLvl = it.dataLevel;
  62942. var $schema = it.schema[$keyword];
  62943. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  62944. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  62945. var $breakOnError = !it.opts.allErrors;
  62946. var $data = 'data' + ($dataLvl || '');
  62947. var $valid = 'valid' + $lvl;
  62948. var $isData = it.opts.$data && $schema && $schema.$data,
  62949. $schemaValue;
  62950. if ($isData) {
  62951. out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
  62952. $schemaValue = 'schema' + $lvl;
  62953. } else {
  62954. $schemaValue = $schema;
  62955. }
  62956. var $i = 'i' + $lvl,
  62957. $vSchema = 'schema' + $lvl;
  62958. if (!$isData) {
  62959. out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';';
  62960. }
  62961. out += 'var ' + ($valid) + ';';
  62962. if ($isData) {
  62963. out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
  62964. }
  62965. out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }';
  62966. if ($isData) {
  62967. out += ' } ';
  62968. }
  62969. out += ' if (!' + ($valid) + ') { ';
  62970. var $$outStack = $$outStack || [];
  62971. $$outStack.push(out);
  62972. out = ''; /* istanbul ignore else */
  62973. if (it.createErrors !== false) {
  62974. out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } ';
  62975. if (it.opts.messages !== false) {
  62976. out += ' , message: \'should be equal to one of the allowed values\' ';
  62977. }
  62978. if (it.opts.verbose) {
  62979. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  62980. }
  62981. out += ' } ';
  62982. } else {
  62983. out += ' {} ';
  62984. }
  62985. var __err = out;
  62986. out = $$outStack.pop();
  62987. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  62988. if (it.async) {
  62989. out += ' throw new ValidationError([' + (__err) + ']); ';
  62990. } else {
  62991. out += ' validate.errors = [' + (__err) + ']; return false; ';
  62992. }
  62993. } else {
  62994. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  62995. }
  62996. out += ' }';
  62997. if ($breakOnError) {
  62998. out += ' else { ';
  62999. }
  63000. return out;
  63001. }
  63002. /***/ }),
  63003. /* 589 */
  63004. /***/ (function(module, exports, __webpack_require__) {
  63005. "use strict";
  63006. module.exports = function generate_format(it, $keyword, $ruleType) {
  63007. var out = ' ';
  63008. var $lvl = it.level;
  63009. var $dataLvl = it.dataLevel;
  63010. var $schema = it.schema[$keyword];
  63011. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  63012. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  63013. var $breakOnError = !it.opts.allErrors;
  63014. var $data = 'data' + ($dataLvl || '');
  63015. if (it.opts.format === false) {
  63016. if ($breakOnError) {
  63017. out += ' if (true) { ';
  63018. }
  63019. return out;
  63020. }
  63021. var $isData = it.opts.$data && $schema && $schema.$data,
  63022. $schemaValue;
  63023. if ($isData) {
  63024. out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
  63025. $schemaValue = 'schema' + $lvl;
  63026. } else {
  63027. $schemaValue = $schema;
  63028. }
  63029. var $unknownFormats = it.opts.unknownFormats,
  63030. $allowUnknown = Array.isArray($unknownFormats);
  63031. if ($isData) {
  63032. var $format = 'format' + $lvl,
  63033. $isObject = 'isObject' + $lvl,
  63034. $formatType = 'formatType' + $lvl;
  63035. out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { ';
  63036. if (it.async) {
  63037. out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; ';
  63038. }
  63039. out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( ';
  63040. if ($isData) {
  63041. out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
  63042. }
  63043. out += ' (';
  63044. if ($unknownFormats != 'ignore') {
  63045. out += ' (' + ($schemaValue) + ' && !' + ($format) + ' ';
  63046. if ($allowUnknown) {
  63047. out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 ';
  63048. }
  63049. out += ') || ';
  63050. }
  63051. out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? ';
  63052. if (it.async) {
  63053. out += ' (async' + ($lvl) + ' ? ' + (it.yieldAwait) + ' ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) ';
  63054. } else {
  63055. out += ' ' + ($format) + '(' + ($data) + ') ';
  63056. }
  63057. out += ' : ' + ($format) + '.test(' + ($data) + '))))) {';
  63058. } else {
  63059. var $format = it.formats[$schema];
  63060. if (!$format) {
  63061. if ($unknownFormats == 'ignore') {
  63062. it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
  63063. if ($breakOnError) {
  63064. out += ' if (true) { ';
  63065. }
  63066. return out;
  63067. } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) {
  63068. if ($breakOnError) {
  63069. out += ' if (true) { ';
  63070. }
  63071. return out;
  63072. } else {
  63073. throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"');
  63074. }
  63075. }
  63076. var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate;
  63077. var $formatType = $isObject && $format.type || 'string';
  63078. if ($isObject) {
  63079. var $async = $format.async === true;
  63080. $format = $format.validate;
  63081. }
  63082. if ($formatType != $ruleType) {
  63083. if ($breakOnError) {
  63084. out += ' if (true) { ';
  63085. }
  63086. return out;
  63087. }
  63088. if ($async) {
  63089. if (!it.async) throw new Error('async format in sync schema');
  63090. var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
  63091. out += ' if (!(' + (it.yieldAwait) + ' ' + ($formatRef) + '(' + ($data) + '))) { ';
  63092. } else {
  63093. out += ' if (! ';
  63094. var $formatRef = 'formats' + it.util.getProperty($schema);
  63095. if ($isObject) $formatRef += '.validate';
  63096. if (typeof $format == 'function') {
  63097. out += ' ' + ($formatRef) + '(' + ($data) + ') ';
  63098. } else {
  63099. out += ' ' + ($formatRef) + '.test(' + ($data) + ') ';
  63100. }
  63101. out += ') { ';
  63102. }
  63103. }
  63104. var $$outStack = $$outStack || [];
  63105. $$outStack.push(out);
  63106. out = ''; /* istanbul ignore else */
  63107. if (it.createErrors !== false) {
  63108. out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: ';
  63109. if ($isData) {
  63110. out += '' + ($schemaValue);
  63111. } else {
  63112. out += '' + (it.util.toQuotedString($schema));
  63113. }
  63114. out += ' } ';
  63115. if (it.opts.messages !== false) {
  63116. out += ' , message: \'should match format "';
  63117. if ($isData) {
  63118. out += '\' + ' + ($schemaValue) + ' + \'';
  63119. } else {
  63120. out += '' + (it.util.escapeQuotes($schema));
  63121. }
  63122. out += '"\' ';
  63123. }
  63124. if (it.opts.verbose) {
  63125. out += ' , schema: ';
  63126. if ($isData) {
  63127. out += 'validate.schema' + ($schemaPath);
  63128. } else {
  63129. out += '' + (it.util.toQuotedString($schema));
  63130. }
  63131. out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  63132. }
  63133. out += ' } ';
  63134. } else {
  63135. out += ' {} ';
  63136. }
  63137. var __err = out;
  63138. out = $$outStack.pop();
  63139. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  63140. if (it.async) {
  63141. out += ' throw new ValidationError([' + (__err) + ']); ';
  63142. } else {
  63143. out += ' validate.errors = [' + (__err) + ']; return false; ';
  63144. }
  63145. } else {
  63146. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  63147. }
  63148. out += ' } ';
  63149. if ($breakOnError) {
  63150. out += ' else { ';
  63151. }
  63152. return out;
  63153. }
  63154. /***/ }),
  63155. /* 590 */
  63156. /***/ (function(module, exports, __webpack_require__) {
  63157. "use strict";
  63158. module.exports = function generate_items(it, $keyword, $ruleType) {
  63159. var out = ' ';
  63160. var $lvl = it.level;
  63161. var $dataLvl = it.dataLevel;
  63162. var $schema = it.schema[$keyword];
  63163. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  63164. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  63165. var $breakOnError = !it.opts.allErrors;
  63166. var $data = 'data' + ($dataLvl || '');
  63167. var $valid = 'valid' + $lvl;
  63168. var $errs = 'errs__' + $lvl;
  63169. var $it = it.util.copy(it);
  63170. var $closingBraces = '';
  63171. $it.level++;
  63172. var $nextValid = 'valid' + $it.level;
  63173. var $idx = 'i' + $lvl,
  63174. $dataNxt = $it.dataLevel = it.dataLevel + 1,
  63175. $nextData = 'data' + $dataNxt,
  63176. $currentBaseId = it.baseId;
  63177. out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
  63178. if (Array.isArray($schema)) {
  63179. var $additionalItems = it.schema.additionalItems;
  63180. if ($additionalItems === false) {
  63181. out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; ';
  63182. var $currErrSchemaPath = $errSchemaPath;
  63183. $errSchemaPath = it.errSchemaPath + '/additionalItems';
  63184. out += ' if (!' + ($valid) + ') { ';
  63185. var $$outStack = $$outStack || [];
  63186. $$outStack.push(out);
  63187. out = ''; /* istanbul ignore else */
  63188. if (it.createErrors !== false) {
  63189. out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } ';
  63190. if (it.opts.messages !== false) {
  63191. out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' ';
  63192. }
  63193. if (it.opts.verbose) {
  63194. out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  63195. }
  63196. out += ' } ';
  63197. } else {
  63198. out += ' {} ';
  63199. }
  63200. var __err = out;
  63201. out = $$outStack.pop();
  63202. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  63203. if (it.async) {
  63204. out += ' throw new ValidationError([' + (__err) + ']); ';
  63205. } else {
  63206. out += ' validate.errors = [' + (__err) + ']; return false; ';
  63207. }
  63208. } else {
  63209. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  63210. }
  63211. out += ' } ';
  63212. $errSchemaPath = $currErrSchemaPath;
  63213. if ($breakOnError) {
  63214. $closingBraces += '}';
  63215. out += ' else { ';
  63216. }
  63217. }
  63218. var arr1 = $schema;
  63219. if (arr1) {
  63220. var $sch, $i = -1,
  63221. l1 = arr1.length - 1;
  63222. while ($i < l1) {
  63223. $sch = arr1[$i += 1];
  63224. if (it.util.schemaHasRules($sch, it.RULES.all)) {
  63225. out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { ';
  63226. var $passData = $data + '[' + $i + ']';
  63227. $it.schema = $sch;
  63228. $it.schemaPath = $schemaPath + '[' + $i + ']';
  63229. $it.errSchemaPath = $errSchemaPath + '/' + $i;
  63230. $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);
  63231. $it.dataPathArr[$dataNxt] = $i;
  63232. var $code = it.validate($it);
  63233. $it.baseId = $currentBaseId;
  63234. if (it.util.varOccurences($code, $nextData) < 2) {
  63235. out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
  63236. } else {
  63237. out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
  63238. }
  63239. out += ' } ';
  63240. if ($breakOnError) {
  63241. out += ' if (' + ($nextValid) + ') { ';
  63242. $closingBraces += '}';
  63243. }
  63244. }
  63245. }
  63246. }
  63247. if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) {
  63248. $it.schema = $additionalItems;
  63249. $it.schemaPath = it.schemaPath + '.additionalItems';
  63250. $it.errSchemaPath = it.errSchemaPath + '/additionalItems';
  63251. out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
  63252. $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
  63253. var $passData = $data + '[' + $idx + ']';
  63254. $it.dataPathArr[$dataNxt] = $idx;
  63255. var $code = it.validate($it);
  63256. $it.baseId = $currentBaseId;
  63257. if (it.util.varOccurences($code, $nextData) < 2) {
  63258. out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
  63259. } else {
  63260. out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
  63261. }
  63262. if ($breakOnError) {
  63263. out += ' if (!' + ($nextValid) + ') break; ';
  63264. }
  63265. out += ' } } ';
  63266. if ($breakOnError) {
  63267. out += ' if (' + ($nextValid) + ') { ';
  63268. $closingBraces += '}';
  63269. }
  63270. }
  63271. } else if (it.util.schemaHasRules($schema, it.RULES.all)) {
  63272. $it.schema = $schema;
  63273. $it.schemaPath = $schemaPath;
  63274. $it.errSchemaPath = $errSchemaPath;
  63275. out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
  63276. $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
  63277. var $passData = $data + '[' + $idx + ']';
  63278. $it.dataPathArr[$dataNxt] = $idx;
  63279. var $code = it.validate($it);
  63280. $it.baseId = $currentBaseId;
  63281. if (it.util.varOccurences($code, $nextData) < 2) {
  63282. out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
  63283. } else {
  63284. out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
  63285. }
  63286. if ($breakOnError) {
  63287. out += ' if (!' + ($nextValid) + ') break; ';
  63288. }
  63289. out += ' }';
  63290. }
  63291. if ($breakOnError) {
  63292. out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
  63293. }
  63294. out = it.util.cleanUpCode(out);
  63295. return out;
  63296. }
  63297. /***/ }),
  63298. /* 591 */
  63299. /***/ (function(module, exports, __webpack_require__) {
  63300. "use strict";
  63301. module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
  63302. var out = ' ';
  63303. var $lvl = it.level;
  63304. var $dataLvl = it.dataLevel;
  63305. var $schema = it.schema[$keyword];
  63306. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  63307. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  63308. var $breakOnError = !it.opts.allErrors;
  63309. var $data = 'data' + ($dataLvl || '');
  63310. var $isData = it.opts.$data && $schema && $schema.$data,
  63311. $schemaValue;
  63312. if ($isData) {
  63313. out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
  63314. $schemaValue = 'schema' + $lvl;
  63315. } else {
  63316. $schemaValue = $schema;
  63317. }
  63318. out += 'var division' + ($lvl) + ';if (';
  63319. if ($isData) {
  63320. out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || ';
  63321. }
  63322. out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', ';
  63323. if (it.opts.multipleOfPrecision) {
  63324. out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' ';
  63325. } else {
  63326. out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') ';
  63327. }
  63328. out += ' ) ';
  63329. if ($isData) {
  63330. out += ' ) ';
  63331. }
  63332. out += ' ) { ';
  63333. var $$outStack = $$outStack || [];
  63334. $$outStack.push(out);
  63335. out = ''; /* istanbul ignore else */
  63336. if (it.createErrors !== false) {
  63337. out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } ';
  63338. if (it.opts.messages !== false) {
  63339. out += ' , message: \'should be multiple of ';
  63340. if ($isData) {
  63341. out += '\' + ' + ($schemaValue);
  63342. } else {
  63343. out += '' + ($schemaValue) + '\'';
  63344. }
  63345. }
  63346. if (it.opts.verbose) {
  63347. out += ' , schema: ';
  63348. if ($isData) {
  63349. out += 'validate.schema' + ($schemaPath);
  63350. } else {
  63351. out += '' + ($schema);
  63352. }
  63353. out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  63354. }
  63355. out += ' } ';
  63356. } else {
  63357. out += ' {} ';
  63358. }
  63359. var __err = out;
  63360. out = $$outStack.pop();
  63361. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  63362. if (it.async) {
  63363. out += ' throw new ValidationError([' + (__err) + ']); ';
  63364. } else {
  63365. out += ' validate.errors = [' + (__err) + ']; return false; ';
  63366. }
  63367. } else {
  63368. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  63369. }
  63370. out += '} ';
  63371. if ($breakOnError) {
  63372. out += ' else { ';
  63373. }
  63374. return out;
  63375. }
  63376. /***/ }),
  63377. /* 592 */
  63378. /***/ (function(module, exports, __webpack_require__) {
  63379. "use strict";
  63380. module.exports = function generate_not(it, $keyword, $ruleType) {
  63381. var out = ' ';
  63382. var $lvl = it.level;
  63383. var $dataLvl = it.dataLevel;
  63384. var $schema = it.schema[$keyword];
  63385. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  63386. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  63387. var $breakOnError = !it.opts.allErrors;
  63388. var $data = 'data' + ($dataLvl || '');
  63389. var $errs = 'errs__' + $lvl;
  63390. var $it = it.util.copy(it);
  63391. $it.level++;
  63392. var $nextValid = 'valid' + $it.level;
  63393. if (it.util.schemaHasRules($schema, it.RULES.all)) {
  63394. $it.schema = $schema;
  63395. $it.schemaPath = $schemaPath;
  63396. $it.errSchemaPath = $errSchemaPath;
  63397. out += ' var ' + ($errs) + ' = errors; ';
  63398. var $wasComposite = it.compositeRule;
  63399. it.compositeRule = $it.compositeRule = true;
  63400. $it.createErrors = false;
  63401. var $allErrorsOption;
  63402. if ($it.opts.allErrors) {
  63403. $allErrorsOption = $it.opts.allErrors;
  63404. $it.opts.allErrors = false;
  63405. }
  63406. out += ' ' + (it.validate($it)) + ' ';
  63407. $it.createErrors = true;
  63408. if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;
  63409. it.compositeRule = $it.compositeRule = $wasComposite;
  63410. out += ' if (' + ($nextValid) + ') { ';
  63411. var $$outStack = $$outStack || [];
  63412. $$outStack.push(out);
  63413. out = ''; /* istanbul ignore else */
  63414. if (it.createErrors !== false) {
  63415. out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
  63416. if (it.opts.messages !== false) {
  63417. out += ' , message: \'should NOT be valid\' ';
  63418. }
  63419. if (it.opts.verbose) {
  63420. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  63421. }
  63422. out += ' } ';
  63423. } else {
  63424. out += ' {} ';
  63425. }
  63426. var __err = out;
  63427. out = $$outStack.pop();
  63428. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  63429. if (it.async) {
  63430. out += ' throw new ValidationError([' + (__err) + ']); ';
  63431. } else {
  63432. out += ' validate.errors = [' + (__err) + ']; return false; ';
  63433. }
  63434. } else {
  63435. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  63436. }
  63437. out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
  63438. if (it.opts.allErrors) {
  63439. out += ' } ';
  63440. }
  63441. } else {
  63442. out += ' var err = '; /* istanbul ignore else */
  63443. if (it.createErrors !== false) {
  63444. out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
  63445. if (it.opts.messages !== false) {
  63446. out += ' , message: \'should NOT be valid\' ';
  63447. }
  63448. if (it.opts.verbose) {
  63449. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  63450. }
  63451. out += ' } ';
  63452. } else {
  63453. out += ' {} ';
  63454. }
  63455. out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  63456. if ($breakOnError) {
  63457. out += ' if (false) { ';
  63458. }
  63459. }
  63460. return out;
  63461. }
  63462. /***/ }),
  63463. /* 593 */
  63464. /***/ (function(module, exports, __webpack_require__) {
  63465. "use strict";
  63466. module.exports = function generate_oneOf(it, $keyword, $ruleType) {
  63467. var out = ' ';
  63468. var $lvl = it.level;
  63469. var $dataLvl = it.dataLevel;
  63470. var $schema = it.schema[$keyword];
  63471. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  63472. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  63473. var $breakOnError = !it.opts.allErrors;
  63474. var $data = 'data' + ($dataLvl || '');
  63475. var $valid = 'valid' + $lvl;
  63476. var $errs = 'errs__' + $lvl;
  63477. var $it = it.util.copy(it);
  63478. var $closingBraces = '';
  63479. $it.level++;
  63480. var $nextValid = 'valid' + $it.level;
  63481. out += 'var ' + ($errs) + ' = errors;var prevValid' + ($lvl) + ' = false;var ' + ($valid) + ' = false;';
  63482. var $currentBaseId = $it.baseId;
  63483. var $wasComposite = it.compositeRule;
  63484. it.compositeRule = $it.compositeRule = true;
  63485. var arr1 = $schema;
  63486. if (arr1) {
  63487. var $sch, $i = -1,
  63488. l1 = arr1.length - 1;
  63489. while ($i < l1) {
  63490. $sch = arr1[$i += 1];
  63491. if (it.util.schemaHasRules($sch, it.RULES.all)) {
  63492. $it.schema = $sch;
  63493. $it.schemaPath = $schemaPath + '[' + $i + ']';
  63494. $it.errSchemaPath = $errSchemaPath + '/' + $i;
  63495. out += ' ' + (it.validate($it)) + ' ';
  63496. $it.baseId = $currentBaseId;
  63497. } else {
  63498. out += ' var ' + ($nextValid) + ' = true; ';
  63499. }
  63500. if ($i) {
  63501. out += ' if (' + ($nextValid) + ' && prevValid' + ($lvl) + ') ' + ($valid) + ' = false; else { ';
  63502. $closingBraces += '}';
  63503. }
  63504. out += ' if (' + ($nextValid) + ') ' + ($valid) + ' = prevValid' + ($lvl) + ' = true;';
  63505. }
  63506. }
  63507. it.compositeRule = $it.compositeRule = $wasComposite;
  63508. out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */
  63509. if (it.createErrors !== false) {
  63510. out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
  63511. if (it.opts.messages !== false) {
  63512. out += ' , message: \'should match exactly one schema in oneOf\' ';
  63513. }
  63514. if (it.opts.verbose) {
  63515. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  63516. }
  63517. out += ' } ';
  63518. } else {
  63519. out += ' {} ';
  63520. }
  63521. out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  63522. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  63523. if (it.async) {
  63524. out += ' throw new ValidationError(vErrors); ';
  63525. } else {
  63526. out += ' validate.errors = vErrors; return false; ';
  63527. }
  63528. }
  63529. out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }';
  63530. if (it.opts.allErrors) {
  63531. out += ' } ';
  63532. }
  63533. return out;
  63534. }
  63535. /***/ }),
  63536. /* 594 */
  63537. /***/ (function(module, exports, __webpack_require__) {
  63538. "use strict";
  63539. module.exports = function generate_pattern(it, $keyword, $ruleType) {
  63540. var out = ' ';
  63541. var $lvl = it.level;
  63542. var $dataLvl = it.dataLevel;
  63543. var $schema = it.schema[$keyword];
  63544. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  63545. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  63546. var $breakOnError = !it.opts.allErrors;
  63547. var $data = 'data' + ($dataLvl || '');
  63548. var $isData = it.opts.$data && $schema && $schema.$data,
  63549. $schemaValue;
  63550. if ($isData) {
  63551. out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
  63552. $schemaValue = 'schema' + $lvl;
  63553. } else {
  63554. $schemaValue = $schema;
  63555. }
  63556. var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema);
  63557. out += 'if ( ';
  63558. if ($isData) {
  63559. out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
  63560. }
  63561. out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { ';
  63562. var $$outStack = $$outStack || [];
  63563. $$outStack.push(out);
  63564. out = ''; /* istanbul ignore else */
  63565. if (it.createErrors !== false) {
  63566. out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: ';
  63567. if ($isData) {
  63568. out += '' + ($schemaValue);
  63569. } else {
  63570. out += '' + (it.util.toQuotedString($schema));
  63571. }
  63572. out += ' } ';
  63573. if (it.opts.messages !== false) {
  63574. out += ' , message: \'should match pattern "';
  63575. if ($isData) {
  63576. out += '\' + ' + ($schemaValue) + ' + \'';
  63577. } else {
  63578. out += '' + (it.util.escapeQuotes($schema));
  63579. }
  63580. out += '"\' ';
  63581. }
  63582. if (it.opts.verbose) {
  63583. out += ' , schema: ';
  63584. if ($isData) {
  63585. out += 'validate.schema' + ($schemaPath);
  63586. } else {
  63587. out += '' + (it.util.toQuotedString($schema));
  63588. }
  63589. out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  63590. }
  63591. out += ' } ';
  63592. } else {
  63593. out += ' {} ';
  63594. }
  63595. var __err = out;
  63596. out = $$outStack.pop();
  63597. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  63598. if (it.async) {
  63599. out += ' throw new ValidationError([' + (__err) + ']); ';
  63600. } else {
  63601. out += ' validate.errors = [' + (__err) + ']; return false; ';
  63602. }
  63603. } else {
  63604. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  63605. }
  63606. out += '} ';
  63607. if ($breakOnError) {
  63608. out += ' else { ';
  63609. }
  63610. return out;
  63611. }
  63612. /***/ }),
  63613. /* 595 */
  63614. /***/ (function(module, exports, __webpack_require__) {
  63615. "use strict";
  63616. module.exports = function generate_properties(it, $keyword, $ruleType) {
  63617. var out = ' ';
  63618. var $lvl = it.level;
  63619. var $dataLvl = it.dataLevel;
  63620. var $schema = it.schema[$keyword];
  63621. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  63622. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  63623. var $breakOnError = !it.opts.allErrors;
  63624. var $data = 'data' + ($dataLvl || '');
  63625. var $valid = 'valid' + $lvl;
  63626. var $errs = 'errs__' + $lvl;
  63627. var $it = it.util.copy(it);
  63628. var $closingBraces = '';
  63629. $it.level++;
  63630. var $nextValid = 'valid' + $it.level;
  63631. var $key = 'key' + $lvl,
  63632. $idx = 'idx' + $lvl,
  63633. $dataNxt = $it.dataLevel = it.dataLevel + 1,
  63634. $nextData = 'data' + $dataNxt,
  63635. $dataProperties = 'dataProperties' + $lvl;
  63636. var $schemaKeys = Object.keys($schema || {}),
  63637. $pProperties = it.schema.patternProperties || {},
  63638. $pPropertyKeys = Object.keys($pProperties),
  63639. $aProperties = it.schema.additionalProperties,
  63640. $someProperties = $schemaKeys.length || $pPropertyKeys.length,
  63641. $noAdditional = $aProperties === false,
  63642. $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length,
  63643. $removeAdditional = it.opts.removeAdditional,
  63644. $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional,
  63645. $ownProperties = it.opts.ownProperties,
  63646. $currentBaseId = it.baseId;
  63647. var $required = it.schema.required;
  63648. if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required);
  63649. if (it.opts.patternGroups) {
  63650. var $pgProperties = it.schema.patternGroups || {},
  63651. $pgPropertyKeys = Object.keys($pgProperties);
  63652. }
  63653. out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;';
  63654. if ($ownProperties) {
  63655. out += ' var ' + ($dataProperties) + ' = undefined;';
  63656. }
  63657. if ($checkAdditional) {
  63658. if ($ownProperties) {
  63659. out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
  63660. } else {
  63661. out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
  63662. }
  63663. if ($someProperties) {
  63664. out += ' var isAdditional' + ($lvl) + ' = !(false ';
  63665. if ($schemaKeys.length) {
  63666. if ($schemaKeys.length > 5) {
  63667. out += ' || validate.schema' + ($schemaPath) + '[' + ($key) + '] ';
  63668. } else {
  63669. var arr1 = $schemaKeys;
  63670. if (arr1) {
  63671. var $propertyKey, i1 = -1,
  63672. l1 = arr1.length - 1;
  63673. while (i1 < l1) {
  63674. $propertyKey = arr1[i1 += 1];
  63675. out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' ';
  63676. }
  63677. }
  63678. }
  63679. }
  63680. if ($pPropertyKeys.length) {
  63681. var arr2 = $pPropertyKeys;
  63682. if (arr2) {
  63683. var $pProperty, $i = -1,
  63684. l2 = arr2.length - 1;
  63685. while ($i < l2) {
  63686. $pProperty = arr2[$i += 1];
  63687. out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') ';
  63688. }
  63689. }
  63690. }
  63691. if (it.opts.patternGroups && $pgPropertyKeys.length) {
  63692. var arr3 = $pgPropertyKeys;
  63693. if (arr3) {
  63694. var $pgProperty, $i = -1,
  63695. l3 = arr3.length - 1;
  63696. while ($i < l3) {
  63697. $pgProperty = arr3[$i += 1];
  63698. out += ' || ' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ') ';
  63699. }
  63700. }
  63701. }
  63702. out += ' ); if (isAdditional' + ($lvl) + ') { ';
  63703. }
  63704. if ($removeAdditional == 'all') {
  63705. out += ' delete ' + ($data) + '[' + ($key) + ']; ';
  63706. } else {
  63707. var $currentErrorPath = it.errorPath;
  63708. var $additionalProperty = '\' + ' + $key + ' + \'';
  63709. if (it.opts._errorDataPathProperty) {
  63710. it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
  63711. }
  63712. if ($noAdditional) {
  63713. if ($removeAdditional) {
  63714. out += ' delete ' + ($data) + '[' + ($key) + ']; ';
  63715. } else {
  63716. out += ' ' + ($nextValid) + ' = false; ';
  63717. var $currErrSchemaPath = $errSchemaPath;
  63718. $errSchemaPath = it.errSchemaPath + '/additionalProperties';
  63719. var $$outStack = $$outStack || [];
  63720. $$outStack.push(out);
  63721. out = ''; /* istanbul ignore else */
  63722. if (it.createErrors !== false) {
  63723. out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } ';
  63724. if (it.opts.messages !== false) {
  63725. out += ' , message: \'should NOT have additional properties\' ';
  63726. }
  63727. if (it.opts.verbose) {
  63728. out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  63729. }
  63730. out += ' } ';
  63731. } else {
  63732. out += ' {} ';
  63733. }
  63734. var __err = out;
  63735. out = $$outStack.pop();
  63736. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  63737. if (it.async) {
  63738. out += ' throw new ValidationError([' + (__err) + ']); ';
  63739. } else {
  63740. out += ' validate.errors = [' + (__err) + ']; return false; ';
  63741. }
  63742. } else {
  63743. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  63744. }
  63745. $errSchemaPath = $currErrSchemaPath;
  63746. if ($breakOnError) {
  63747. out += ' break; ';
  63748. }
  63749. }
  63750. } else if ($additionalIsSchema) {
  63751. if ($removeAdditional == 'failing') {
  63752. out += ' var ' + ($errs) + ' = errors; ';
  63753. var $wasComposite = it.compositeRule;
  63754. it.compositeRule = $it.compositeRule = true;
  63755. $it.schema = $aProperties;
  63756. $it.schemaPath = it.schemaPath + '.additionalProperties';
  63757. $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
  63758. $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
  63759. var $passData = $data + '[' + $key + ']';
  63760. $it.dataPathArr[$dataNxt] = $key;
  63761. var $code = it.validate($it);
  63762. $it.baseId = $currentBaseId;
  63763. if (it.util.varOccurences($code, $nextData) < 2) {
  63764. out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
  63765. } else {
  63766. out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
  63767. }
  63768. out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } ';
  63769. it.compositeRule = $it.compositeRule = $wasComposite;
  63770. } else {
  63771. $it.schema = $aProperties;
  63772. $it.schemaPath = it.schemaPath + '.additionalProperties';
  63773. $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';
  63774. $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
  63775. var $passData = $data + '[' + $key + ']';
  63776. $it.dataPathArr[$dataNxt] = $key;
  63777. var $code = it.validate($it);
  63778. $it.baseId = $currentBaseId;
  63779. if (it.util.varOccurences($code, $nextData) < 2) {
  63780. out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
  63781. } else {
  63782. out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
  63783. }
  63784. if ($breakOnError) {
  63785. out += ' if (!' + ($nextValid) + ') break; ';
  63786. }
  63787. }
  63788. }
  63789. it.errorPath = $currentErrorPath;
  63790. }
  63791. if ($someProperties) {
  63792. out += ' } ';
  63793. }
  63794. out += ' } ';
  63795. if ($breakOnError) {
  63796. out += ' if (' + ($nextValid) + ') { ';
  63797. $closingBraces += '}';
  63798. }
  63799. }
  63800. var $useDefaults = it.opts.useDefaults && !it.compositeRule;
  63801. if ($schemaKeys.length) {
  63802. var arr4 = $schemaKeys;
  63803. if (arr4) {
  63804. var $propertyKey, i4 = -1,
  63805. l4 = arr4.length - 1;
  63806. while (i4 < l4) {
  63807. $propertyKey = arr4[i4 += 1];
  63808. var $sch = $schema[$propertyKey];
  63809. if (it.util.schemaHasRules($sch, it.RULES.all)) {
  63810. var $prop = it.util.getProperty($propertyKey),
  63811. $passData = $data + $prop,
  63812. $hasDefault = $useDefaults && $sch.default !== undefined;
  63813. $it.schema = $sch;
  63814. $it.schemaPath = $schemaPath + $prop;
  63815. $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);
  63816. $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);
  63817. $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);
  63818. var $code = it.validate($it);
  63819. $it.baseId = $currentBaseId;
  63820. if (it.util.varOccurences($code, $nextData) < 2) {
  63821. $code = it.util.varReplace($code, $nextData, $passData);
  63822. var $useData = $passData;
  63823. } else {
  63824. var $useData = $nextData;
  63825. out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ';
  63826. }
  63827. if ($hasDefault) {
  63828. out += ' ' + ($code) + ' ';
  63829. } else {
  63830. if ($requiredHash && $requiredHash[$propertyKey]) {
  63831. out += ' if ( ' + ($useData) + ' === undefined ';
  63832. if ($ownProperties) {
  63833. out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
  63834. }
  63835. out += ') { ' + ($nextValid) + ' = false; ';
  63836. var $currentErrorPath = it.errorPath,
  63837. $currErrSchemaPath = $errSchemaPath,
  63838. $missingProperty = it.util.escapeQuotes($propertyKey);
  63839. if (it.opts._errorDataPathProperty) {
  63840. it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
  63841. }
  63842. $errSchemaPath = it.errSchemaPath + '/required';
  63843. var $$outStack = $$outStack || [];
  63844. $$outStack.push(out);
  63845. out = ''; /* istanbul ignore else */
  63846. if (it.createErrors !== false) {
  63847. out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
  63848. if (it.opts.messages !== false) {
  63849. out += ' , message: \'';
  63850. if (it.opts._errorDataPathProperty) {
  63851. out += 'is a required property';
  63852. } else {
  63853. out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
  63854. }
  63855. out += '\' ';
  63856. }
  63857. if (it.opts.verbose) {
  63858. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  63859. }
  63860. out += ' } ';
  63861. } else {
  63862. out += ' {} ';
  63863. }
  63864. var __err = out;
  63865. out = $$outStack.pop();
  63866. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  63867. if (it.async) {
  63868. out += ' throw new ValidationError([' + (__err) + ']); ';
  63869. } else {
  63870. out += ' validate.errors = [' + (__err) + ']; return false; ';
  63871. }
  63872. } else {
  63873. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  63874. }
  63875. $errSchemaPath = $currErrSchemaPath;
  63876. it.errorPath = $currentErrorPath;
  63877. out += ' } else { ';
  63878. } else {
  63879. if ($breakOnError) {
  63880. out += ' if ( ' + ($useData) + ' === undefined ';
  63881. if ($ownProperties) {
  63882. out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
  63883. }
  63884. out += ') { ' + ($nextValid) + ' = true; } else { ';
  63885. } else {
  63886. out += ' if (' + ($useData) + ' !== undefined ';
  63887. if ($ownProperties) {
  63888. out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
  63889. }
  63890. out += ' ) { ';
  63891. }
  63892. }
  63893. out += ' ' + ($code) + ' } ';
  63894. }
  63895. }
  63896. if ($breakOnError) {
  63897. out += ' if (' + ($nextValid) + ') { ';
  63898. $closingBraces += '}';
  63899. }
  63900. }
  63901. }
  63902. }
  63903. if ($pPropertyKeys.length) {
  63904. var arr5 = $pPropertyKeys;
  63905. if (arr5) {
  63906. var $pProperty, i5 = -1,
  63907. l5 = arr5.length - 1;
  63908. while (i5 < l5) {
  63909. $pProperty = arr5[i5 += 1];
  63910. var $sch = $pProperties[$pProperty];
  63911. if (it.util.schemaHasRules($sch, it.RULES.all)) {
  63912. $it.schema = $sch;
  63913. $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);
  63914. $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);
  63915. if ($ownProperties) {
  63916. out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
  63917. } else {
  63918. out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
  63919. }
  63920. out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { ';
  63921. $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
  63922. var $passData = $data + '[' + $key + ']';
  63923. $it.dataPathArr[$dataNxt] = $key;
  63924. var $code = it.validate($it);
  63925. $it.baseId = $currentBaseId;
  63926. if (it.util.varOccurences($code, $nextData) < 2) {
  63927. out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
  63928. } else {
  63929. out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
  63930. }
  63931. if ($breakOnError) {
  63932. out += ' if (!' + ($nextValid) + ') break; ';
  63933. }
  63934. out += ' } ';
  63935. if ($breakOnError) {
  63936. out += ' else ' + ($nextValid) + ' = true; ';
  63937. }
  63938. out += ' } ';
  63939. if ($breakOnError) {
  63940. out += ' if (' + ($nextValid) + ') { ';
  63941. $closingBraces += '}';
  63942. }
  63943. }
  63944. }
  63945. }
  63946. }
  63947. if (it.opts.patternGroups && $pgPropertyKeys.length) {
  63948. var arr6 = $pgPropertyKeys;
  63949. if (arr6) {
  63950. var $pgProperty, i6 = -1,
  63951. l6 = arr6.length - 1;
  63952. while (i6 < l6) {
  63953. $pgProperty = arr6[i6 += 1];
  63954. var $pgSchema = $pgProperties[$pgProperty],
  63955. $sch = $pgSchema.schema;
  63956. if (it.util.schemaHasRules($sch, it.RULES.all)) {
  63957. $it.schema = $sch;
  63958. $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema';
  63959. $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + it.util.escapeFragment($pgProperty) + '/schema';
  63960. out += ' var pgPropCount' + ($lvl) + ' = 0; ';
  63961. if ($ownProperties) {
  63962. out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
  63963. } else {
  63964. out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
  63965. }
  63966. out += ' if (' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ')) { pgPropCount' + ($lvl) + '++; ';
  63967. $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);
  63968. var $passData = $data + '[' + $key + ']';
  63969. $it.dataPathArr[$dataNxt] = $key;
  63970. var $code = it.validate($it);
  63971. $it.baseId = $currentBaseId;
  63972. if (it.util.varOccurences($code, $nextData) < 2) {
  63973. out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
  63974. } else {
  63975. out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
  63976. }
  63977. if ($breakOnError) {
  63978. out += ' if (!' + ($nextValid) + ') break; ';
  63979. }
  63980. out += ' } ';
  63981. if ($breakOnError) {
  63982. out += ' else ' + ($nextValid) + ' = true; ';
  63983. }
  63984. out += ' } ';
  63985. if ($breakOnError) {
  63986. out += ' if (' + ($nextValid) + ') { ';
  63987. $closingBraces += '}';
  63988. }
  63989. var $pgMin = $pgSchema.minimum,
  63990. $pgMax = $pgSchema.maximum;
  63991. if ($pgMin !== undefined || $pgMax !== undefined) {
  63992. out += ' var ' + ($valid) + ' = true; ';
  63993. var $currErrSchemaPath = $errSchemaPath;
  63994. if ($pgMin !== undefined) {
  63995. var $limit = $pgMin,
  63996. $reason = 'minimum',
  63997. $moreOrLess = 'less';
  63998. out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' >= ' + ($pgMin) + '; ';
  63999. $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum';
  64000. out += ' if (!' + ($valid) + ') { ';
  64001. var $$outStack = $$outStack || [];
  64002. $$outStack.push(out);
  64003. out = ''; /* istanbul ignore else */
  64004. if (it.createErrors !== false) {
  64005. out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } ';
  64006. if (it.opts.messages !== false) {
  64007. out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' ';
  64008. }
  64009. if (it.opts.verbose) {
  64010. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  64011. }
  64012. out += ' } ';
  64013. } else {
  64014. out += ' {} ';
  64015. }
  64016. var __err = out;
  64017. out = $$outStack.pop();
  64018. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  64019. if (it.async) {
  64020. out += ' throw new ValidationError([' + (__err) + ']); ';
  64021. } else {
  64022. out += ' validate.errors = [' + (__err) + ']; return false; ';
  64023. }
  64024. } else {
  64025. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  64026. }
  64027. out += ' } ';
  64028. if ($pgMax !== undefined) {
  64029. out += ' else ';
  64030. }
  64031. }
  64032. if ($pgMax !== undefined) {
  64033. var $limit = $pgMax,
  64034. $reason = 'maximum',
  64035. $moreOrLess = 'more';
  64036. out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' <= ' + ($pgMax) + '; ';
  64037. $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum';
  64038. out += ' if (!' + ($valid) + ') { ';
  64039. var $$outStack = $$outStack || [];
  64040. $$outStack.push(out);
  64041. out = ''; /* istanbul ignore else */
  64042. if (it.createErrors !== false) {
  64043. out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } ';
  64044. if (it.opts.messages !== false) {
  64045. out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' ';
  64046. }
  64047. if (it.opts.verbose) {
  64048. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  64049. }
  64050. out += ' } ';
  64051. } else {
  64052. out += ' {} ';
  64053. }
  64054. var __err = out;
  64055. out = $$outStack.pop();
  64056. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  64057. if (it.async) {
  64058. out += ' throw new ValidationError([' + (__err) + ']); ';
  64059. } else {
  64060. out += ' validate.errors = [' + (__err) + ']; return false; ';
  64061. }
  64062. } else {
  64063. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  64064. }
  64065. out += ' } ';
  64066. }
  64067. $errSchemaPath = $currErrSchemaPath;
  64068. if ($breakOnError) {
  64069. out += ' if (' + ($valid) + ') { ';
  64070. $closingBraces += '}';
  64071. }
  64072. }
  64073. }
  64074. }
  64075. }
  64076. }
  64077. if ($breakOnError) {
  64078. out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
  64079. }
  64080. out = it.util.cleanUpCode(out);
  64081. return out;
  64082. }
  64083. /***/ }),
  64084. /* 596 */
  64085. /***/ (function(module, exports, __webpack_require__) {
  64086. "use strict";
  64087. module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
  64088. var out = ' ';
  64089. var $lvl = it.level;
  64090. var $dataLvl = it.dataLevel;
  64091. var $schema = it.schema[$keyword];
  64092. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  64093. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  64094. var $breakOnError = !it.opts.allErrors;
  64095. var $data = 'data' + ($dataLvl || '');
  64096. var $errs = 'errs__' + $lvl;
  64097. var $it = it.util.copy(it);
  64098. var $closingBraces = '';
  64099. $it.level++;
  64100. var $nextValid = 'valid' + $it.level;
  64101. if (it.util.schemaHasRules($schema, it.RULES.all)) {
  64102. $it.schema = $schema;
  64103. $it.schemaPath = $schemaPath;
  64104. $it.errSchemaPath = $errSchemaPath;
  64105. var $key = 'key' + $lvl,
  64106. $idx = 'idx' + $lvl,
  64107. $i = 'i' + $lvl,
  64108. $invalidName = '\' + ' + $key + ' + \'',
  64109. $dataNxt = $it.dataLevel = it.dataLevel + 1,
  64110. $nextData = 'data' + $dataNxt,
  64111. $dataProperties = 'dataProperties' + $lvl,
  64112. $ownProperties = it.opts.ownProperties,
  64113. $currentBaseId = it.baseId;
  64114. out += ' var ' + ($errs) + ' = errors; ';
  64115. if ($ownProperties) {
  64116. out += ' var ' + ($dataProperties) + ' = undefined; ';
  64117. }
  64118. if ($ownProperties) {
  64119. out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';
  64120. } else {
  64121. out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';
  64122. }
  64123. out += ' var startErrs' + ($lvl) + ' = errors; ';
  64124. var $passData = $key;
  64125. var $wasComposite = it.compositeRule;
  64126. it.compositeRule = $it.compositeRule = true;
  64127. var $code = it.validate($it);
  64128. $it.baseId = $currentBaseId;
  64129. if (it.util.varOccurences($code, $nextData) < 2) {
  64130. out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
  64131. } else {
  64132. out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
  64133. }
  64134. it.compositeRule = $it.compositeRule = $wasComposite;
  64135. out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + '<errors; ' + ($i) + '++) { vErrors[' + ($i) + '].propertyName = ' + ($key) + '; } var err = '; /* istanbul ignore else */
  64136. if (it.createErrors !== false) {
  64137. out += ' { keyword: \'' + ('propertyNames') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { propertyName: \'' + ($invalidName) + '\' } ';
  64138. if (it.opts.messages !== false) {
  64139. out += ' , message: \'property name \\\'' + ($invalidName) + '\\\' is invalid\' ';
  64140. }
  64141. if (it.opts.verbose) {
  64142. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  64143. }
  64144. out += ' } ';
  64145. } else {
  64146. out += ' {} ';
  64147. }
  64148. out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  64149. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  64150. if (it.async) {
  64151. out += ' throw new ValidationError(vErrors); ';
  64152. } else {
  64153. out += ' validate.errors = vErrors; return false; ';
  64154. }
  64155. }
  64156. if ($breakOnError) {
  64157. out += ' break; ';
  64158. }
  64159. out += ' } }';
  64160. }
  64161. if ($breakOnError) {
  64162. out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';
  64163. }
  64164. out = it.util.cleanUpCode(out);
  64165. return out;
  64166. }
  64167. /***/ }),
  64168. /* 597 */
  64169. /***/ (function(module, exports, __webpack_require__) {
  64170. "use strict";
  64171. module.exports = function generate_required(it, $keyword, $ruleType) {
  64172. var out = ' ';
  64173. var $lvl = it.level;
  64174. var $dataLvl = it.dataLevel;
  64175. var $schema = it.schema[$keyword];
  64176. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  64177. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  64178. var $breakOnError = !it.opts.allErrors;
  64179. var $data = 'data' + ($dataLvl || '');
  64180. var $valid = 'valid' + $lvl;
  64181. var $isData = it.opts.$data && $schema && $schema.$data,
  64182. $schemaValue;
  64183. if ($isData) {
  64184. out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
  64185. $schemaValue = 'schema' + $lvl;
  64186. } else {
  64187. $schemaValue = $schema;
  64188. }
  64189. var $vSchema = 'schema' + $lvl;
  64190. if (!$isData) {
  64191. if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) {
  64192. var $required = [];
  64193. var arr1 = $schema;
  64194. if (arr1) {
  64195. var $property, i1 = -1,
  64196. l1 = arr1.length - 1;
  64197. while (i1 < l1) {
  64198. $property = arr1[i1 += 1];
  64199. var $propertySch = it.schema.properties[$property];
  64200. if (!($propertySch && it.util.schemaHasRules($propertySch, it.RULES.all))) {
  64201. $required[$required.length] = $property;
  64202. }
  64203. }
  64204. }
  64205. } else {
  64206. var $required = $schema;
  64207. }
  64208. }
  64209. if ($isData || $required.length) {
  64210. var $currentErrorPath = it.errorPath,
  64211. $loopRequired = $isData || $required.length >= it.opts.loopRequired,
  64212. $ownProperties = it.opts.ownProperties;
  64213. if ($breakOnError) {
  64214. out += ' var missing' + ($lvl) + '; ';
  64215. if ($loopRequired) {
  64216. if (!$isData) {
  64217. out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';
  64218. }
  64219. var $i = 'i' + $lvl,
  64220. $propertyPath = 'schema' + $lvl + '[' + $i + ']',
  64221. $missingProperty = '\' + ' + $propertyPath + ' + \'';
  64222. if (it.opts._errorDataPathProperty) {
  64223. it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
  64224. }
  64225. out += ' var ' + ($valid) + ' = true; ';
  64226. if ($isData) {
  64227. out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
  64228. }
  64229. out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined ';
  64230. if ($ownProperties) {
  64231. out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';
  64232. }
  64233. out += '; if (!' + ($valid) + ') break; } ';
  64234. if ($isData) {
  64235. out += ' } ';
  64236. }
  64237. out += ' if (!' + ($valid) + ') { ';
  64238. var $$outStack = $$outStack || [];
  64239. $$outStack.push(out);
  64240. out = ''; /* istanbul ignore else */
  64241. if (it.createErrors !== false) {
  64242. out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
  64243. if (it.opts.messages !== false) {
  64244. out += ' , message: \'';
  64245. if (it.opts._errorDataPathProperty) {
  64246. out += 'is a required property';
  64247. } else {
  64248. out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
  64249. }
  64250. out += '\' ';
  64251. }
  64252. if (it.opts.verbose) {
  64253. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  64254. }
  64255. out += ' } ';
  64256. } else {
  64257. out += ' {} ';
  64258. }
  64259. var __err = out;
  64260. out = $$outStack.pop();
  64261. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  64262. if (it.async) {
  64263. out += ' throw new ValidationError([' + (__err) + ']); ';
  64264. } else {
  64265. out += ' validate.errors = [' + (__err) + ']; return false; ';
  64266. }
  64267. } else {
  64268. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  64269. }
  64270. out += ' } else { ';
  64271. } else {
  64272. out += ' if ( ';
  64273. var arr2 = $required;
  64274. if (arr2) {
  64275. var $propertyKey, $i = -1,
  64276. l2 = arr2.length - 1;
  64277. while ($i < l2) {
  64278. $propertyKey = arr2[$i += 1];
  64279. if ($i) {
  64280. out += ' || ';
  64281. }
  64282. var $prop = it.util.getProperty($propertyKey),
  64283. $useData = $data + $prop;
  64284. out += ' ( ( ' + ($useData) + ' === undefined ';
  64285. if ($ownProperties) {
  64286. out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
  64287. }
  64288. out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) ';
  64289. }
  64290. }
  64291. out += ') { ';
  64292. var $propertyPath = 'missing' + $lvl,
  64293. $missingProperty = '\' + ' + $propertyPath + ' + \'';
  64294. if (it.opts._errorDataPathProperty) {
  64295. it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;
  64296. }
  64297. var $$outStack = $$outStack || [];
  64298. $$outStack.push(out);
  64299. out = ''; /* istanbul ignore else */
  64300. if (it.createErrors !== false) {
  64301. out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
  64302. if (it.opts.messages !== false) {
  64303. out += ' , message: \'';
  64304. if (it.opts._errorDataPathProperty) {
  64305. out += 'is a required property';
  64306. } else {
  64307. out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
  64308. }
  64309. out += '\' ';
  64310. }
  64311. if (it.opts.verbose) {
  64312. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  64313. }
  64314. out += ' } ';
  64315. } else {
  64316. out += ' {} ';
  64317. }
  64318. var __err = out;
  64319. out = $$outStack.pop();
  64320. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  64321. if (it.async) {
  64322. out += ' throw new ValidationError([' + (__err) + ']); ';
  64323. } else {
  64324. out += ' validate.errors = [' + (__err) + ']; return false; ';
  64325. }
  64326. } else {
  64327. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  64328. }
  64329. out += ' } else { ';
  64330. }
  64331. } else {
  64332. if ($loopRequired) {
  64333. if (!$isData) {
  64334. out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';
  64335. }
  64336. var $i = 'i' + $lvl,
  64337. $propertyPath = 'schema' + $lvl + '[' + $i + ']',
  64338. $missingProperty = '\' + ' + $propertyPath + ' + \'';
  64339. if (it.opts._errorDataPathProperty) {
  64340. it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);
  64341. }
  64342. if ($isData) {
  64343. out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */
  64344. if (it.createErrors !== false) {
  64345. out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
  64346. if (it.opts.messages !== false) {
  64347. out += ' , message: \'';
  64348. if (it.opts._errorDataPathProperty) {
  64349. out += 'is a required property';
  64350. } else {
  64351. out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
  64352. }
  64353. out += '\' ';
  64354. }
  64355. if (it.opts.verbose) {
  64356. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  64357. }
  64358. out += ' } ';
  64359. } else {
  64360. out += ' {} ';
  64361. }
  64362. out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { ';
  64363. }
  64364. out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined ';
  64365. if ($ownProperties) {
  64366. out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';
  64367. }
  64368. out += ') { var err = '; /* istanbul ignore else */
  64369. if (it.createErrors !== false) {
  64370. out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
  64371. if (it.opts.messages !== false) {
  64372. out += ' , message: \'';
  64373. if (it.opts._errorDataPathProperty) {
  64374. out += 'is a required property';
  64375. } else {
  64376. out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
  64377. }
  64378. out += '\' ';
  64379. }
  64380. if (it.opts.verbose) {
  64381. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  64382. }
  64383. out += ' } ';
  64384. } else {
  64385. out += ' {} ';
  64386. }
  64387. out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ';
  64388. if ($isData) {
  64389. out += ' } ';
  64390. }
  64391. } else {
  64392. var arr3 = $required;
  64393. if (arr3) {
  64394. var $propertyKey, i3 = -1,
  64395. l3 = arr3.length - 1;
  64396. while (i3 < l3) {
  64397. $propertyKey = arr3[i3 += 1];
  64398. var $prop = it.util.getProperty($propertyKey),
  64399. $missingProperty = it.util.escapeQuotes($propertyKey),
  64400. $useData = $data + $prop;
  64401. if (it.opts._errorDataPathProperty) {
  64402. it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
  64403. }
  64404. out += ' if ( ' + ($useData) + ' === undefined ';
  64405. if ($ownProperties) {
  64406. out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') ';
  64407. }
  64408. out += ') { var err = '; /* istanbul ignore else */
  64409. if (it.createErrors !== false) {
  64410. out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } ';
  64411. if (it.opts.messages !== false) {
  64412. out += ' , message: \'';
  64413. if (it.opts._errorDataPathProperty) {
  64414. out += 'is a required property';
  64415. } else {
  64416. out += 'should have required property \\\'' + ($missingProperty) + '\\\'';
  64417. }
  64418. out += '\' ';
  64419. }
  64420. if (it.opts.verbose) {
  64421. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  64422. }
  64423. out += ' } ';
  64424. } else {
  64425. out += ' {} ';
  64426. }
  64427. out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';
  64428. }
  64429. }
  64430. }
  64431. }
  64432. it.errorPath = $currentErrorPath;
  64433. } else if ($breakOnError) {
  64434. out += ' if (true) {';
  64435. }
  64436. return out;
  64437. }
  64438. /***/ }),
  64439. /* 598 */
  64440. /***/ (function(module, exports, __webpack_require__) {
  64441. "use strict";
  64442. module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
  64443. var out = ' ';
  64444. var $lvl = it.level;
  64445. var $dataLvl = it.dataLevel;
  64446. var $schema = it.schema[$keyword];
  64447. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  64448. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  64449. var $breakOnError = !it.opts.allErrors;
  64450. var $data = 'data' + ($dataLvl || '');
  64451. var $valid = 'valid' + $lvl;
  64452. var $isData = it.opts.$data && $schema && $schema.$data,
  64453. $schemaValue;
  64454. if ($isData) {
  64455. out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
  64456. $schemaValue = 'schema' + $lvl;
  64457. } else {
  64458. $schemaValue = $schema;
  64459. }
  64460. if (($schema || $isData) && it.opts.uniqueItems !== false) {
  64461. if ($isData) {
  64462. out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { ';
  64463. }
  64464. out += ' var ' + ($valid) + ' = true; if (' + ($data) + '.length > 1) { var i = ' + ($data) + '.length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } } ';
  64465. if ($isData) {
  64466. out += ' } ';
  64467. }
  64468. out += ' if (!' + ($valid) + ') { ';
  64469. var $$outStack = $$outStack || [];
  64470. $$outStack.push(out);
  64471. out = ''; /* istanbul ignore else */
  64472. if (it.createErrors !== false) {
  64473. out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } ';
  64474. if (it.opts.messages !== false) {
  64475. out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' ';
  64476. }
  64477. if (it.opts.verbose) {
  64478. out += ' , schema: ';
  64479. if ($isData) {
  64480. out += 'validate.schema' + ($schemaPath);
  64481. } else {
  64482. out += '' + ($schema);
  64483. }
  64484. out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  64485. }
  64486. out += ' } ';
  64487. } else {
  64488. out += ' {} ';
  64489. }
  64490. var __err = out;
  64491. out = $$outStack.pop();
  64492. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  64493. if (it.async) {
  64494. out += ' throw new ValidationError([' + (__err) + ']); ';
  64495. } else {
  64496. out += ' validate.errors = [' + (__err) + ']; return false; ';
  64497. }
  64498. } else {
  64499. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  64500. }
  64501. out += ' } ';
  64502. if ($breakOnError) {
  64503. out += ' else { ';
  64504. }
  64505. } else {
  64506. if ($breakOnError) {
  64507. out += ' if (true) { ';
  64508. }
  64509. }
  64510. return out;
  64511. }
  64512. /***/ }),
  64513. /* 599 */
  64514. /***/ (function(module, exports, __webpack_require__) {
  64515. "use strict";
  64516. var KEYWORDS = [
  64517. 'multipleOf',
  64518. 'maximum',
  64519. 'exclusiveMaximum',
  64520. 'minimum',
  64521. 'exclusiveMinimum',
  64522. 'maxLength',
  64523. 'minLength',
  64524. 'pattern',
  64525. 'additionalItems',
  64526. 'maxItems',
  64527. 'minItems',
  64528. 'uniqueItems',
  64529. 'maxProperties',
  64530. 'minProperties',
  64531. 'required',
  64532. 'additionalProperties',
  64533. 'enum',
  64534. 'format',
  64535. 'const'
  64536. ];
  64537. module.exports = function (metaSchema, keywordsJsonPointers) {
  64538. for (var i=0; i<keywordsJsonPointers.length; i++) {
  64539. metaSchema = JSON.parse(JSON.stringify(metaSchema));
  64540. var segments = keywordsJsonPointers[i].split('/');
  64541. var keywords = metaSchema;
  64542. var j;
  64543. for (j=1; j<segments.length; j++)
  64544. keywords = keywords[segments[j]];
  64545. for (j=0; j<KEYWORDS.length; j++) {
  64546. var key = KEYWORDS[j];
  64547. var schema = keywords[key];
  64548. if (schema) {
  64549. keywords[key] = {
  64550. anyOf: [
  64551. schema,
  64552. { $ref: 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#' }
  64553. ]
  64554. };
  64555. }
  64556. }
  64557. }
  64558. return metaSchema;
  64559. };
  64560. /***/ }),
  64561. /* 600 */
  64562. /***/ (function(module, exports, __webpack_require__) {
  64563. "use strict";
  64564. var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema';
  64565. module.exports = function (ajv) {
  64566. var defaultMeta = ajv._opts.defaultMeta;
  64567. var metaSchemaRef = typeof defaultMeta == 'string'
  64568. ? { $ref: defaultMeta }
  64569. : ajv.getSchema(META_SCHEMA_ID)
  64570. ? { $ref: META_SCHEMA_ID }
  64571. : {};
  64572. ajv.addKeyword('patternGroups', {
  64573. // implemented in properties.jst
  64574. metaSchema: {
  64575. type: 'object',
  64576. additionalProperties: {
  64577. type: 'object',
  64578. required: [ 'schema' ],
  64579. properties: {
  64580. maximum: {
  64581. type: 'integer',
  64582. minimum: 0
  64583. },
  64584. minimum: {
  64585. type: 'integer',
  64586. minimum: 0
  64587. },
  64588. schema: metaSchemaRef
  64589. },
  64590. additionalProperties: false
  64591. }
  64592. }
  64593. });
  64594. ajv.RULES.all.properties.implements.push('patternGroups');
  64595. };
  64596. /***/ }),
  64597. /* 601 */
  64598. /***/ (function(module, exports, __webpack_require__) {
  64599. "use strict";
  64600. var MissingRefError = __webpack_require__(154).MissingRef;
  64601. module.exports = compileAsync;
  64602. /**
  64603. * Creates validating function for passed schema with asynchronous loading of missing schemas.
  64604. * `loadSchema` option should be a function that accepts schema uri and returns promise that resolves with the schema.
  64605. * @this Ajv
  64606. * @param {Object} schema schema object
  64607. * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped
  64608. * @param {Function} callback an optional node-style callback, it is called with 2 parameters: error (or null) and validating function.
  64609. * @return {Promise} promise that resolves with a validating function.
  64610. */
  64611. function compileAsync(schema, meta, callback) {
  64612. /* eslint no-shadow: 0 */
  64613. /* global Promise */
  64614. /* jshint validthis: true */
  64615. var self = this;
  64616. if (typeof this._opts.loadSchema != 'function')
  64617. throw new Error('options.loadSchema should be a function');
  64618. if (typeof meta == 'function') {
  64619. callback = meta;
  64620. meta = undefined;
  64621. }
  64622. var p = loadMetaSchemaOf(schema).then(function () {
  64623. var schemaObj = self._addSchema(schema, undefined, meta);
  64624. return schemaObj.validate || _compileAsync(schemaObj);
  64625. });
  64626. if (callback) {
  64627. p.then(
  64628. function(v) { callback(null, v); },
  64629. callback
  64630. );
  64631. }
  64632. return p;
  64633. function loadMetaSchemaOf(sch) {
  64634. var $schema = sch.$schema;
  64635. return $schema && !self.getSchema($schema)
  64636. ? compileAsync.call(self, { $ref: $schema }, true)
  64637. : Promise.resolve();
  64638. }
  64639. function _compileAsync(schemaObj) {
  64640. try { return self._compile(schemaObj); }
  64641. catch(e) {
  64642. if (e instanceof MissingRefError) return loadMissingSchema(e);
  64643. throw e;
  64644. }
  64645. function loadMissingSchema(e) {
  64646. var ref = e.missingSchema;
  64647. if (added(ref)) throw new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved');
  64648. var schemaPromise = self._loadingSchemas[ref];
  64649. if (!schemaPromise) {
  64650. schemaPromise = self._loadingSchemas[ref] = self._opts.loadSchema(ref);
  64651. schemaPromise.then(removePromise, removePromise);
  64652. }
  64653. return schemaPromise.then(function (sch) {
  64654. if (!added(ref)) {
  64655. return loadMetaSchemaOf(sch).then(function () {
  64656. if (!added(ref)) self.addSchema(sch, ref, undefined, meta);
  64657. });
  64658. }
  64659. }).then(function() {
  64660. return _compileAsync(schemaObj);
  64661. });
  64662. function removePromise() {
  64663. delete self._loadingSchemas[ref];
  64664. }
  64665. function added(ref) {
  64666. return self._refs[ref] || self._schemas[ref];
  64667. }
  64668. }
  64669. }
  64670. }
  64671. /***/ }),
  64672. /* 602 */
  64673. /***/ (function(module, exports, __webpack_require__) {
  64674. "use strict";
  64675. var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
  64676. var customRuleCode = __webpack_require__(603);
  64677. module.exports = {
  64678. add: addKeyword,
  64679. get: getKeyword,
  64680. remove: removeKeyword
  64681. };
  64682. /**
  64683. * Define custom keyword
  64684. * @this Ajv
  64685. * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords).
  64686. * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
  64687. * @return {Ajv} this for method chaining
  64688. */
  64689. function addKeyword(keyword, definition) {
  64690. /* jshint validthis: true */
  64691. /* eslint no-shadow: 0 */
  64692. var RULES = this.RULES;
  64693. if (RULES.keywords[keyword])
  64694. throw new Error('Keyword ' + keyword + ' is already defined');
  64695. if (!IDENTIFIER.test(keyword))
  64696. throw new Error('Keyword ' + keyword + ' is not a valid identifier');
  64697. if (definition) {
  64698. if (definition.macro && definition.valid !== undefined)
  64699. throw new Error('"valid" option cannot be used with macro keywords');
  64700. var dataType = definition.type;
  64701. if (Array.isArray(dataType)) {
  64702. var i, len = dataType.length;
  64703. for (i=0; i<len; i++) checkDataType(dataType[i]);
  64704. for (i=0; i<len; i++) _addRule(keyword, dataType[i], definition);
  64705. } else {
  64706. if (dataType) checkDataType(dataType);
  64707. _addRule(keyword, dataType, definition);
  64708. }
  64709. var $data = definition.$data === true && this._opts.$data;
  64710. if ($data && !definition.validate)
  64711. throw new Error('$data support: "validate" function is not defined');
  64712. var metaSchema = definition.metaSchema;
  64713. if (metaSchema) {
  64714. if ($data) {
  64715. metaSchema = {
  64716. anyOf: [
  64717. metaSchema,
  64718. { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#' }
  64719. ]
  64720. };
  64721. }
  64722. definition.validateSchema = this.compile(metaSchema, true);
  64723. }
  64724. }
  64725. RULES.keywords[keyword] = RULES.all[keyword] = true;
  64726. function _addRule(keyword, dataType, definition) {
  64727. var ruleGroup;
  64728. for (var i=0; i<RULES.length; i++) {
  64729. var rg = RULES[i];
  64730. if (rg.type == dataType) {
  64731. ruleGroup = rg;
  64732. break;
  64733. }
  64734. }
  64735. if (!ruleGroup) {
  64736. ruleGroup = { type: dataType, rules: [] };
  64737. RULES.push(ruleGroup);
  64738. }
  64739. var rule = {
  64740. keyword: keyword,
  64741. definition: definition,
  64742. custom: true,
  64743. code: customRuleCode,
  64744. implements: definition.implements
  64745. };
  64746. ruleGroup.rules.push(rule);
  64747. RULES.custom[keyword] = rule;
  64748. }
  64749. function checkDataType(dataType) {
  64750. if (!RULES.types[dataType]) throw new Error('Unknown type ' + dataType);
  64751. }
  64752. return this;
  64753. }
  64754. /**
  64755. * Get keyword
  64756. * @this Ajv
  64757. * @param {String} keyword pre-defined or custom keyword.
  64758. * @return {Object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise.
  64759. */
  64760. function getKeyword(keyword) {
  64761. /* jshint validthis: true */
  64762. var rule = this.RULES.custom[keyword];
  64763. return rule ? rule.definition : this.RULES.keywords[keyword] || false;
  64764. }
  64765. /**
  64766. * Remove keyword
  64767. * @this Ajv
  64768. * @param {String} keyword pre-defined or custom keyword.
  64769. * @return {Ajv} this for method chaining
  64770. */
  64771. function removeKeyword(keyword) {
  64772. /* jshint validthis: true */
  64773. var RULES = this.RULES;
  64774. delete RULES.keywords[keyword];
  64775. delete RULES.all[keyword];
  64776. delete RULES.custom[keyword];
  64777. for (var i=0; i<RULES.length; i++) {
  64778. var rules = RULES[i].rules;
  64779. for (var j=0; j<rules.length; j++) {
  64780. if (rules[j].keyword == keyword) {
  64781. rules.splice(j, 1);
  64782. break;
  64783. }
  64784. }
  64785. }
  64786. return this;
  64787. }
  64788. /***/ }),
  64789. /* 603 */
  64790. /***/ (function(module, exports, __webpack_require__) {
  64791. "use strict";
  64792. module.exports = function generate_custom(it, $keyword, $ruleType) {
  64793. var out = ' ';
  64794. var $lvl = it.level;
  64795. var $dataLvl = it.dataLevel;
  64796. var $schema = it.schema[$keyword];
  64797. var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
  64798. var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
  64799. var $breakOnError = !it.opts.allErrors;
  64800. var $errorKeyword;
  64801. var $data = 'data' + ($dataLvl || '');
  64802. var $valid = 'valid' + $lvl;
  64803. var $errs = 'errs__' + $lvl;
  64804. var $isData = it.opts.$data && $schema && $schema.$data,
  64805. $schemaValue;
  64806. if ($isData) {
  64807. out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
  64808. $schemaValue = 'schema' + $lvl;
  64809. } else {
  64810. $schemaValue = $schema;
  64811. }
  64812. var $rule = this,
  64813. $definition = 'definition' + $lvl,
  64814. $rDef = $rule.definition,
  64815. $closingBraces = '';
  64816. var $compile, $inline, $macro, $ruleValidate, $validateCode;
  64817. if ($isData && $rDef.$data) {
  64818. $validateCode = 'keywordValidate' + $lvl;
  64819. var $validateSchema = $rDef.validateSchema;
  64820. out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;';
  64821. } else {
  64822. $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);
  64823. if (!$ruleValidate) return;
  64824. $schemaValue = 'validate.schema' + $schemaPath;
  64825. $validateCode = $ruleValidate.code;
  64826. $compile = $rDef.compile;
  64827. $inline = $rDef.inline;
  64828. $macro = $rDef.macro;
  64829. }
  64830. var $ruleErrs = $validateCode + '.errors',
  64831. $i = 'i' + $lvl,
  64832. $ruleErr = 'ruleErr' + $lvl,
  64833. $asyncKeyword = $rDef.async;
  64834. if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema');
  64835. if (!($inline || $macro)) {
  64836. out += '' + ($ruleErrs) + ' = null;';
  64837. }
  64838. out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
  64839. if ($isData && $rDef.$data) {
  64840. $closingBraces += '}';
  64841. out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { ';
  64842. if ($validateSchema) {
  64843. $closingBraces += '}';
  64844. out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { ';
  64845. }
  64846. }
  64847. if ($inline) {
  64848. if ($rDef.statements) {
  64849. out += ' ' + ($ruleValidate.validate) + ' ';
  64850. } else {
  64851. out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; ';
  64852. }
  64853. } else if ($macro) {
  64854. var $it = it.util.copy(it);
  64855. var $closingBraces = '';
  64856. $it.level++;
  64857. var $nextValid = 'valid' + $it.level;
  64858. $it.schema = $ruleValidate.validate;
  64859. $it.schemaPath = '';
  64860. var $wasComposite = it.compositeRule;
  64861. it.compositeRule = $it.compositeRule = true;
  64862. var $code = it.validate($it).replace(/validate\.schema/g, $validateCode);
  64863. it.compositeRule = $it.compositeRule = $wasComposite;
  64864. out += ' ' + ($code);
  64865. } else {
  64866. var $$outStack = $$outStack || [];
  64867. $$outStack.push(out);
  64868. out = '';
  64869. out += ' ' + ($validateCode) + '.call( ';
  64870. if (it.opts.passContext) {
  64871. out += 'this';
  64872. } else {
  64873. out += 'self';
  64874. }
  64875. if ($compile || $rDef.schema === false) {
  64876. out += ' , ' + ($data) + ' ';
  64877. } else {
  64878. out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' ';
  64879. }
  64880. out += ' , (dataPath || \'\')';
  64881. if (it.errorPath != '""') {
  64882. out += ' + ' + (it.errorPath);
  64883. }
  64884. var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
  64885. $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
  64886. out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) ';
  64887. var def_callRuleValidate = out;
  64888. out = $$outStack.pop();
  64889. if ($rDef.errors === false) {
  64890. out += ' ' + ($valid) + ' = ';
  64891. if ($asyncKeyword) {
  64892. out += '' + (it.yieldAwait);
  64893. }
  64894. out += '' + (def_callRuleValidate) + '; ';
  64895. } else {
  64896. if ($asyncKeyword) {
  64897. $ruleErrs = 'customErrors' + $lvl;
  64898. out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = ' + (it.yieldAwait) + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } ';
  64899. } else {
  64900. out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; ';
  64901. }
  64902. }
  64903. }
  64904. if ($rDef.modifying) {
  64905. out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];';
  64906. }
  64907. out += '' + ($closingBraces);
  64908. if ($rDef.valid) {
  64909. if ($breakOnError) {
  64910. out += ' if (true) { ';
  64911. }
  64912. } else {
  64913. out += ' if ( ';
  64914. if ($rDef.valid === undefined) {
  64915. out += ' !';
  64916. if ($macro) {
  64917. out += '' + ($nextValid);
  64918. } else {
  64919. out += '' + ($valid);
  64920. }
  64921. } else {
  64922. out += ' ' + (!$rDef.valid) + ' ';
  64923. }
  64924. out += ') { ';
  64925. $errorKeyword = $rule.keyword;
  64926. var $$outStack = $$outStack || [];
  64927. $$outStack.push(out);
  64928. out = '';
  64929. var $$outStack = $$outStack || [];
  64930. $$outStack.push(out);
  64931. out = ''; /* istanbul ignore else */
  64932. if (it.createErrors !== false) {
  64933. out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
  64934. if (it.opts.messages !== false) {
  64935. out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
  64936. }
  64937. if (it.opts.verbose) {
  64938. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  64939. }
  64940. out += ' } ';
  64941. } else {
  64942. out += ' {} ';
  64943. }
  64944. var __err = out;
  64945. out = $$outStack.pop();
  64946. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  64947. if (it.async) {
  64948. out += ' throw new ValidationError([' + (__err) + ']); ';
  64949. } else {
  64950. out += ' validate.errors = [' + (__err) + ']; return false; ';
  64951. }
  64952. } else {
  64953. out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  64954. }
  64955. var def_customError = out;
  64956. out = $$outStack.pop();
  64957. if ($inline) {
  64958. if ($rDef.errors) {
  64959. if ($rDef.errors != 'full') {
  64960. out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } ';
  64961. if (it.opts.verbose) {
  64962. out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
  64963. }
  64964. out += ' } ';
  64965. }
  64966. } else {
  64967. if ($rDef.errors === false) {
  64968. out += ' ' + (def_customError) + ' ';
  64969. } else {
  64970. out += ' if (' + ($errs) + ' == errors) { ' + (def_customError) + ' } else { for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } ';
  64971. if (it.opts.verbose) {
  64972. out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
  64973. }
  64974. out += ' } } ';
  64975. }
  64976. }
  64977. } else if ($macro) {
  64978. out += ' var err = '; /* istanbul ignore else */
  64979. if (it.createErrors !== false) {
  64980. out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } ';
  64981. if (it.opts.messages !== false) {
  64982. out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' ';
  64983. }
  64984. if (it.opts.verbose) {
  64985. out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
  64986. }
  64987. out += ' } ';
  64988. } else {
  64989. out += ' {} ';
  64990. }
  64991. out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
  64992. if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
  64993. if (it.async) {
  64994. out += ' throw new ValidationError(vErrors); ';
  64995. } else {
  64996. out += ' validate.errors = vErrors; return false; ';
  64997. }
  64998. }
  64999. } else {
  65000. if ($rDef.errors === false) {
  65001. out += ' ' + (def_customError) + ' ';
  65002. } else {
  65003. out += ' if (Array.isArray(' + ($ruleErrs) + ')) { if (vErrors === null) vErrors = ' + ($ruleErrs) + '; else vErrors = vErrors.concat(' + ($ruleErrs) + '); errors = vErrors.length; for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; ';
  65004. if (it.opts.verbose) {
  65005. out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';
  65006. }
  65007. out += ' } } else { ' + (def_customError) + ' } ';
  65008. }
  65009. }
  65010. out += ' } ';
  65011. if ($breakOnError) {
  65012. out += ' else { ';
  65013. }
  65014. }
  65015. return out;
  65016. }
  65017. /***/ }),
  65018. /* 604 */
  65019. /***/ (function(module, exports) {
  65020. module.exports = {"$schema":"http://json-schema.org/draft-06/schema#","$id":"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#","description":"Meta-schema for $data reference (JSON-schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}
  65021. /***/ }),
  65022. /* 605 */
  65023. /***/ (function(module, exports) {
  65024. module.exports = {"$schema":"http://json-schema.org/draft-06/schema#","$id":"http://json-schema.org/draft-06/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"examples":{"type":"array","items":{}},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":{},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}}
  65025. /***/ }),
  65026. /* 606 */
  65027. /***/ (function(module, exports) {
  65028. function HARError (errors) {
  65029. var message = 'validation failed'
  65030. this.name = 'HARError'
  65031. this.message = message
  65032. this.errors = errors
  65033. if (typeof Error.captureStackTrace === 'function') {
  65034. Error.captureStackTrace(this, this.constructor)
  65035. } else {
  65036. this.stack = (new Error(message)).stack
  65037. }
  65038. }
  65039. HARError.prototype = Error.prototype
  65040. module.exports = HARError
  65041. /***/ }),
  65042. /* 607 */
  65043. /***/ (function(module, exports, __webpack_require__) {
  65044. "use strict";
  65045. module.exports = {
  65046. afterRequest: __webpack_require__(608),
  65047. beforeRequest: __webpack_require__(609),
  65048. browser: __webpack_require__(610),
  65049. cache: __webpack_require__(611),
  65050. content: __webpack_require__(612),
  65051. cookie: __webpack_require__(613),
  65052. creator: __webpack_require__(614),
  65053. entry: __webpack_require__(615),
  65054. har: __webpack_require__(616),
  65055. header: __webpack_require__(617),
  65056. log: __webpack_require__(618),
  65057. page: __webpack_require__(619),
  65058. pageTimings: __webpack_require__(620),
  65059. postData: __webpack_require__(621),
  65060. query: __webpack_require__(622),
  65061. request: __webpack_require__(623),
  65062. response: __webpack_require__(624),
  65063. timings: __webpack_require__(625)
  65064. }
  65065. /***/ }),
  65066. /* 608 */
  65067. /***/ (function(module, exports) {
  65068. module.exports = {"$id":"afterRequest.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","optional":true,"required":["lastAccess","eTag","hitCount"],"properties":{"expires":{"type":"string","pattern":"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"},"lastAccess":{"type":"string","pattern":"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"},"eTag":{"type":"string"},"hitCount":{"type":"integer"},"comment":{"type":"string"}}}
  65069. /***/ }),
  65070. /* 609 */
  65071. /***/ (function(module, exports) {
  65072. module.exports = {"$id":"beforeRequest.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","optional":true,"required":["lastAccess","eTag","hitCount"],"properties":{"expires":{"type":"string","pattern":"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"},"lastAccess":{"type":"string","pattern":"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"},"eTag":{"type":"string"},"hitCount":{"type":"integer"},"comment":{"type":"string"}}}
  65073. /***/ }),
  65074. /* 610 */
  65075. /***/ (function(module, exports) {
  65076. module.exports = {"$id":"browser.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["name","version"],"properties":{"name":{"type":"string"},"version":{"type":"string"},"comment":{"type":"string"}}}
  65077. /***/ }),
  65078. /* 611 */
  65079. /***/ (function(module, exports) {
  65080. module.exports = {"$id":"cache.json#","$schema":"http://json-schema.org/draft-06/schema#","properties":{"beforeRequest":{"oneOf":[{"type":"null"},{"$ref":"beforeRequest.json#"}]},"afterRequest":{"oneOf":[{"type":"null"},{"$ref":"afterRequest.json#"}]},"comment":{"type":"string"}}}
  65081. /***/ }),
  65082. /* 612 */
  65083. /***/ (function(module, exports) {
  65084. module.exports = {"$id":"content.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["size","mimeType"],"properties":{"size":{"type":"integer"},"compression":{"type":"integer"},"mimeType":{"type":"string"},"text":{"type":"string"},"encoding":{"type":"string"},"comment":{"type":"string"}}}
  65085. /***/ }),
  65086. /* 613 */
  65087. /***/ (function(module, exports) {
  65088. module.exports = {"$id":"cookie.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"},"path":{"type":"string"},"domain":{"type":"string"},"expires":{"type":["string","null"],"format":"date-time"},"httpOnly":{"type":"boolean"},"secure":{"type":"boolean"},"comment":{"type":"string"}}}
  65089. /***/ }),
  65090. /* 614 */
  65091. /***/ (function(module, exports) {
  65092. module.exports = {"$id":"creator.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["name","version"],"properties":{"name":{"type":"string"},"version":{"type":"string"},"comment":{"type":"string"}}}
  65093. /***/ }),
  65094. /* 615 */
  65095. /***/ (function(module, exports) {
  65096. module.exports = {"$id":"entry.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","optional":true,"required":["startedDateTime","time","request","response","cache","timings"],"properties":{"pageref":{"type":"string"},"startedDateTime":{"type":"string","format":"date-time","pattern":"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"},"time":{"type":"number","min":0},"request":{"$ref":"request.json#"},"response":{"$ref":"response.json#"},"cache":{"$ref":"cache.json#"},"timings":{"$ref":"timings.json#"},"serverIPAddress":{"type":"string","oneOf":[{"format":"ipv4"},{"format":"ipv6"}]},"connection":{"type":"string"},"comment":{"type":"string"}}}
  65097. /***/ }),
  65098. /* 616 */
  65099. /***/ (function(module, exports) {
  65100. module.exports = {"$id":"har.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["log"],"properties":{"log":{"$ref":"log.json#"}}}
  65101. /***/ }),
  65102. /* 617 */
  65103. /***/ (function(module, exports) {
  65104. module.exports = {"$id":"header.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"},"comment":{"type":"string"}}}
  65105. /***/ }),
  65106. /* 618 */
  65107. /***/ (function(module, exports) {
  65108. module.exports = {"$id":"log.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["version","creator","entries"],"properties":{"version":{"type":"string"},"creator":{"$ref":"creator.json#"},"browser":{"$ref":"browser.json#"},"pages":{"type":"array","items":{"$ref":"page.json#"}},"entries":{"type":"array","items":{"$ref":"entry.json#"}},"comment":{"type":"string"}}}
  65109. /***/ }),
  65110. /* 619 */
  65111. /***/ (function(module, exports) {
  65112. module.exports = {"$id":"page.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","optional":true,"required":["startedDateTime","id","title","pageTimings"],"properties":{"startedDateTime":{"type":"string","format":"date-time","pattern":"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"},"id":{"type":"string","unique":true},"title":{"type":"string"},"pageTimings":{"$ref":"pageTimings.json#"},"comment":{"type":"string"}}}
  65113. /***/ }),
  65114. /* 620 */
  65115. /***/ (function(module, exports) {
  65116. module.exports = {"$id":"pageTimings.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","properties":{"onContentLoad":{"type":"number","min":-1},"onLoad":{"type":"number","min":-1},"comment":{"type":"string"}}}
  65117. /***/ }),
  65118. /* 621 */
  65119. /***/ (function(module, exports) {
  65120. module.exports = {"$id":"postData.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","optional":true,"required":["mimeType"],"properties":{"mimeType":{"type":"string"},"text":{"type":"string"},"params":{"type":"array","required":["name"],"properties":{"name":{"type":"string"},"value":{"type":"string"},"fileName":{"type":"string"},"contentType":{"type":"string"},"comment":{"type":"string"}}},"comment":{"type":"string"}}}
  65121. /***/ }),
  65122. /* 622 */
  65123. /***/ (function(module, exports) {
  65124. module.exports = {"$id":"query.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"},"comment":{"type":"string"}}}
  65125. /***/ }),
  65126. /* 623 */
  65127. /***/ (function(module, exports) {
  65128. module.exports = {"$id":"request.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["method","url","httpVersion","cookies","headers","queryString","headersSize","bodySize"],"properties":{"method":{"type":"string"},"url":{"type":"string","format":"uri"},"httpVersion":{"type":"string"},"cookies":{"type":"array","items":{"$ref":"cookie.json#"}},"headers":{"type":"array","items":{"$ref":"header.json#"}},"queryString":{"type":"array","items":{"$ref":"query.json#"}},"postData":{"$ref":"postData.json#"},"headersSize":{"type":"integer"},"bodySize":{"type":"integer"},"comment":{"type":"string"}}}
  65129. /***/ }),
  65130. /* 624 */
  65131. /***/ (function(module, exports) {
  65132. module.exports = {"$id":"response.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["status","statusText","httpVersion","cookies","headers","content","redirectURL","headersSize","bodySize"],"properties":{"status":{"type":"integer"},"statusText":{"type":"string"},"httpVersion":{"type":"string"},"cookies":{"type":"array","items":{"$ref":"cookie.json#"}},"headers":{"type":"array","items":{"$ref":"header.json#"}},"content":{"$ref":"content.json#"},"redirectURL":{"type":"string"},"headersSize":{"type":"integer"},"bodySize":{"type":"integer"},"comment":{"type":"string"}}}
  65133. /***/ }),
  65134. /* 625 */
  65135. /***/ (function(module, exports) {
  65136. module.exports = {"$id":"timings.json#","$schema":"http://json-schema.org/draft-06/schema#","required":["send","wait","receive"],"properties":{"dns":{"type":"number","min":-1},"connect":{"type":"number","min":-1},"blocked":{"type":"number","min":-1},"send":{"type":"number","min":-1},"wait":{"type":"number","min":-1},"receive":{"type":"number","min":-1},"ssl":{"type":"number","min":-1},"comment":{"type":"string"}}}
  65137. /***/ }),
  65138. /* 626 */
  65139. /***/ (function(module, exports, __webpack_require__) {
  65140. "use strict";
  65141. var caseless = __webpack_require__(151)
  65142. var uuid = __webpack_require__(155)
  65143. var helpers = __webpack_require__(143)
  65144. var md5 = helpers.md5
  65145. var toBase64 = helpers.toBase64
  65146. function Auth (request) {
  65147. // define all public properties here
  65148. this.request = request
  65149. this.hasAuth = false
  65150. this.sentAuth = false
  65151. this.bearerToken = null
  65152. this.user = null
  65153. this.pass = null
  65154. }
  65155. Auth.prototype.basic = function (user, pass, sendImmediately) {
  65156. var self = this
  65157. if (typeof user !== 'string' || (pass !== undefined && typeof pass !== 'string')) {
  65158. self.request.emit('error', new Error('auth() received invalid user or password'))
  65159. }
  65160. self.user = user
  65161. self.pass = pass
  65162. self.hasAuth = true
  65163. var header = user + ':' + (pass || '')
  65164. if (sendImmediately || typeof sendImmediately === 'undefined') {
  65165. var authHeader = 'Basic ' + toBase64(header)
  65166. self.sentAuth = true
  65167. return authHeader
  65168. }
  65169. }
  65170. Auth.prototype.bearer = function (bearer, sendImmediately) {
  65171. var self = this
  65172. self.bearerToken = bearer
  65173. self.hasAuth = true
  65174. if (sendImmediately || typeof sendImmediately === 'undefined') {
  65175. if (typeof bearer === 'function') {
  65176. bearer = bearer()
  65177. }
  65178. var authHeader = 'Bearer ' + (bearer || '')
  65179. self.sentAuth = true
  65180. return authHeader
  65181. }
  65182. }
  65183. Auth.prototype.digest = function (method, path, authHeader) {
  65184. // TODO: More complete implementation of RFC 2617.
  65185. // - handle challenge.domain
  65186. // - support qop="auth-int" only
  65187. // - handle Authentication-Info (not necessarily?)
  65188. // - check challenge.stale (not necessarily?)
  65189. // - increase nc (not necessarily?)
  65190. // For reference:
  65191. // http://tools.ietf.org/html/rfc2617#section-3
  65192. // https://github.com/bagder/curl/blob/master/lib/http_digest.c
  65193. var self = this
  65194. var challenge = {}
  65195. var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi
  65196. for (;;) {
  65197. var match = re.exec(authHeader)
  65198. if (!match) {
  65199. break
  65200. }
  65201. challenge[match[1]] = match[2] || match[3]
  65202. }
  65203. /**
  65204. * RFC 2617: handle both MD5 and MD5-sess algorithms.
  65205. *
  65206. * If the algorithm directive's value is "MD5" or unspecified, then HA1 is
  65207. * HA1=MD5(username:realm:password)
  65208. * If the algorithm directive's value is "MD5-sess", then HA1 is
  65209. * HA1=MD5(MD5(username:realm:password):nonce:cnonce)
  65210. */
  65211. var ha1Compute = function (algorithm, user, realm, pass, nonce, cnonce) {
  65212. var ha1 = md5(user + ':' + realm + ':' + pass)
  65213. if (algorithm && algorithm.toLowerCase() === 'md5-sess') {
  65214. return md5(ha1 + ':' + nonce + ':' + cnonce)
  65215. } else {
  65216. return ha1
  65217. }
  65218. }
  65219. var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth'
  65220. var nc = qop && '00000001'
  65221. var cnonce = qop && uuid().replace(/-/g, '')
  65222. var ha1 = ha1Compute(challenge.algorithm, self.user, challenge.realm, self.pass, challenge.nonce, cnonce)
  65223. var ha2 = md5(method + ':' + path)
  65224. var digestResponse = qop
  65225. ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2)
  65226. : md5(ha1 + ':' + challenge.nonce + ':' + ha2)
  65227. var authValues = {
  65228. username: self.user,
  65229. realm: challenge.realm,
  65230. nonce: challenge.nonce,
  65231. uri: path,
  65232. qop: qop,
  65233. response: digestResponse,
  65234. nc: nc,
  65235. cnonce: cnonce,
  65236. algorithm: challenge.algorithm,
  65237. opaque: challenge.opaque
  65238. }
  65239. authHeader = []
  65240. for (var k in authValues) {
  65241. if (authValues[k]) {
  65242. if (k === 'qop' || k === 'nc' || k === 'algorithm') {
  65243. authHeader.push(k + '=' + authValues[k])
  65244. } else {
  65245. authHeader.push(k + '="' + authValues[k] + '"')
  65246. }
  65247. }
  65248. }
  65249. authHeader = 'Digest ' + authHeader.join(', ')
  65250. self.sentAuth = true
  65251. return authHeader
  65252. }
  65253. Auth.prototype.onRequest = function (user, pass, sendImmediately, bearer) {
  65254. var self = this
  65255. var request = self.request
  65256. var authHeader
  65257. if (bearer === undefined && user === undefined) {
  65258. self.request.emit('error', new Error('no auth mechanism defined'))
  65259. } else if (bearer !== undefined) {
  65260. authHeader = self.bearer(bearer, sendImmediately)
  65261. } else {
  65262. authHeader = self.basic(user, pass, sendImmediately)
  65263. }
  65264. if (authHeader) {
  65265. request.setHeader('authorization', authHeader)
  65266. }
  65267. }
  65268. Auth.prototype.onResponse = function (response) {
  65269. var self = this
  65270. var request = self.request
  65271. if (!self.hasAuth || self.sentAuth) { return null }
  65272. var c = caseless(response.headers)
  65273. var authHeader = c.get('www-authenticate')
  65274. var authVerb = authHeader && authHeader.split(' ')[0].toLowerCase()
  65275. request.debug('reauth', authVerb)
  65276. switch (authVerb) {
  65277. case 'basic':
  65278. return self.basic(self.user, self.pass, true)
  65279. case 'bearer':
  65280. return self.bearer(self.bearerToken, true)
  65281. case 'digest':
  65282. return self.digest(request.method, request.path, authHeader)
  65283. }
  65284. }
  65285. exports.Auth = Auth
  65286. /***/ }),
  65287. /* 627 */
  65288. /***/ (function(module, exports, __webpack_require__) {
  65289. var rng = __webpack_require__(374);
  65290. var bytesToUuid = __webpack_require__(113);
  65291. // **`v1()` - Generate time-based UUID**
  65292. //
  65293. // Inspired by https://github.com/LiosK/UUID.js
  65294. // and http://docs.python.org/library/uuid.html
  65295. var _nodeId;
  65296. var _clockseq;
  65297. // Previous uuid creation time
  65298. var _lastMSecs = 0;
  65299. var _lastNSecs = 0;
  65300. // See https://github.com/broofa/node-uuid for API details
  65301. function v1(options, buf, offset) {
  65302. var i = buf && offset || 0;
  65303. var b = buf || [];
  65304. options = options || {};
  65305. var node = options.node || _nodeId;
  65306. var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
  65307. // node and clockseq need to be initialized to random values if they're not
  65308. // specified. We do this lazily to minimize issues related to insufficient
  65309. // system entropy. See #189
  65310. if (node == null || clockseq == null) {
  65311. var seedBytes = rng();
  65312. if (node == null) {
  65313. // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
  65314. node = _nodeId = [
  65315. seedBytes[0] | 0x01,
  65316. seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
  65317. ];
  65318. }
  65319. if (clockseq == null) {
  65320. // Per 4.2.2, randomize (14 bit) clockseq
  65321. clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
  65322. }
  65323. }
  65324. // UUID timestamps are 100 nano-second units since the Gregorian epoch,
  65325. // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
  65326. // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
  65327. // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
  65328. var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
  65329. // Per 4.2.1.2, use count of uuid's generated during the current clock
  65330. // cycle to simulate higher resolution clock
  65331. var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
  65332. // Time since last uuid creation (in msecs)
  65333. var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
  65334. // Per 4.2.1.2, Bump clockseq on clock regression
  65335. if (dt < 0 && options.clockseq === undefined) {
  65336. clockseq = clockseq + 1 & 0x3fff;
  65337. }
  65338. // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
  65339. // time interval
  65340. if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
  65341. nsecs = 0;
  65342. }
  65343. // Per 4.2.1.2 Throw error if too many uuids are requested
  65344. if (nsecs >= 10000) {
  65345. throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
  65346. }
  65347. _lastMSecs = msecs;
  65348. _lastNSecs = nsecs;
  65349. _clockseq = clockseq;
  65350. // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
  65351. msecs += 12219292800000;
  65352. // `time_low`
  65353. var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
  65354. b[i++] = tl >>> 24 & 0xff;
  65355. b[i++] = tl >>> 16 & 0xff;
  65356. b[i++] = tl >>> 8 & 0xff;
  65357. b[i++] = tl & 0xff;
  65358. // `time_mid`
  65359. var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
  65360. b[i++] = tmh >>> 8 & 0xff;
  65361. b[i++] = tmh & 0xff;
  65362. // `time_high_and_version`
  65363. b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
  65364. b[i++] = tmh >>> 16 & 0xff;
  65365. // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
  65366. b[i++] = clockseq >>> 8 | 0x80;
  65367. // `clock_seq_low`
  65368. b[i++] = clockseq & 0xff;
  65369. // `node`
  65370. for (var n = 0; n < 6; ++n) {
  65371. b[i + n] = node[n];
  65372. }
  65373. return buf ? buf : bytesToUuid(b);
  65374. }
  65375. module.exports = v1;
  65376. /***/ }),
  65377. /* 628 */
  65378. /***/ (function(module, exports, __webpack_require__) {
  65379. var rng = __webpack_require__(374);
  65380. var bytesToUuid = __webpack_require__(113);
  65381. function v4(options, buf, offset) {
  65382. var i = buf && offset || 0;
  65383. if (typeof(options) == 'string') {
  65384. buf = options === 'binary' ? new Array(16) : null;
  65385. options = null;
  65386. }
  65387. options = options || {};
  65388. var rnds = options.random || (options.rng || rng)();
  65389. // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
  65390. rnds[6] = (rnds[6] & 0x0f) | 0x40;
  65391. rnds[8] = (rnds[8] & 0x3f) | 0x80;
  65392. // Copy bytes to buffer, if provided
  65393. if (buf) {
  65394. for (var ii = 0; ii < 16; ++ii) {
  65395. buf[i + ii] = rnds[ii];
  65396. }
  65397. }
  65398. return buf || bytesToUuid(rnds);
  65399. }
  65400. module.exports = v4;
  65401. /***/ }),
  65402. /* 629 */
  65403. /***/ (function(module, exports, __webpack_require__) {
  65404. "use strict";
  65405. var url = __webpack_require__(14)
  65406. var qs = __webpack_require__(363)
  65407. var caseless = __webpack_require__(151)
  65408. var uuid = __webpack_require__(155)
  65409. var oauth = __webpack_require__(630)
  65410. var crypto = __webpack_require__(5)
  65411. var Buffer = __webpack_require__(30).Buffer
  65412. function OAuth (request) {
  65413. this.request = request
  65414. this.params = null
  65415. }
  65416. OAuth.prototype.buildParams = function (_oauth, uri, method, query, form, qsLib) {
  65417. var oa = {}
  65418. for (var i in _oauth) {
  65419. oa['oauth_' + i] = _oauth[i]
  65420. }
  65421. if (!oa.oauth_version) {
  65422. oa.oauth_version = '1.0'
  65423. }
  65424. if (!oa.oauth_timestamp) {
  65425. oa.oauth_timestamp = Math.floor(Date.now() / 1000).toString()
  65426. }
  65427. if (!oa.oauth_nonce) {
  65428. oa.oauth_nonce = uuid().replace(/-/g, '')
  65429. }
  65430. if (!oa.oauth_signature_method) {
  65431. oa.oauth_signature_method = 'HMAC-SHA1'
  65432. }
  65433. var consumer_secret_or_private_key = oa.oauth_consumer_secret || oa.oauth_private_key // eslint-disable-line camelcase
  65434. delete oa.oauth_consumer_secret
  65435. delete oa.oauth_private_key
  65436. var token_secret = oa.oauth_token_secret // eslint-disable-line camelcase
  65437. delete oa.oauth_token_secret
  65438. var realm = oa.oauth_realm
  65439. delete oa.oauth_realm
  65440. delete oa.oauth_transport_method
  65441. var baseurl = uri.protocol + '//' + uri.host + uri.pathname
  65442. var params = qsLib.parse([].concat(query, form, qsLib.stringify(oa)).join('&'))
  65443. oa.oauth_signature = oauth.sign(
  65444. oa.oauth_signature_method,
  65445. method,
  65446. baseurl,
  65447. params,
  65448. consumer_secret_or_private_key, // eslint-disable-line camelcase
  65449. token_secret // eslint-disable-line camelcase
  65450. )
  65451. if (realm) {
  65452. oa.realm = realm
  65453. }
  65454. return oa
  65455. }
  65456. OAuth.prototype.buildBodyHash = function (_oauth, body) {
  65457. if (['HMAC-SHA1', 'RSA-SHA1'].indexOf(_oauth.signature_method || 'HMAC-SHA1') < 0) {
  65458. this.request.emit('error', new Error('oauth: ' + _oauth.signature_method +
  65459. ' signature_method not supported with body_hash signing.'))
  65460. }
  65461. var shasum = crypto.createHash('sha1')
  65462. shasum.update(body || '')
  65463. var sha1 = shasum.digest('hex')
  65464. return Buffer.from(sha1).toString('base64')
  65465. }
  65466. OAuth.prototype.concatParams = function (oa, sep, wrap) {
  65467. wrap = wrap || ''
  65468. var params = Object.keys(oa).filter(function (i) {
  65469. return i !== 'realm' && i !== 'oauth_signature'
  65470. }).sort()
  65471. if (oa.realm) {
  65472. params.splice(0, 0, 'realm')
  65473. }
  65474. params.push('oauth_signature')
  65475. return params.map(function (i) {
  65476. return i + '=' + wrap + oauth.rfc3986(oa[i]) + wrap
  65477. }).join(sep)
  65478. }
  65479. OAuth.prototype.onRequest = function (_oauth) {
  65480. var self = this
  65481. self.params = _oauth
  65482. var uri = self.request.uri || {}
  65483. var method = self.request.method || ''
  65484. var headers = caseless(self.request.headers)
  65485. var body = self.request.body || ''
  65486. var qsLib = self.request.qsLib || qs
  65487. var form
  65488. var query
  65489. var contentType = headers.get('content-type') || ''
  65490. var formContentType = 'application/x-www-form-urlencoded'
  65491. var transport = _oauth.transport_method || 'header'
  65492. if (contentType.slice(0, formContentType.length) === formContentType) {
  65493. contentType = formContentType
  65494. form = body
  65495. }
  65496. if (uri.query) {
  65497. query = uri.query
  65498. }
  65499. if (transport === 'body' && (method !== 'POST' || contentType !== formContentType)) {
  65500. self.request.emit('error', new Error('oauth: transport_method of body requires POST ' +
  65501. 'and content-type ' + formContentType))
  65502. }
  65503. if (!form && typeof _oauth.body_hash === 'boolean') {
  65504. _oauth.body_hash = self.buildBodyHash(_oauth, self.request.body.toString())
  65505. }
  65506. var oa = self.buildParams(_oauth, uri, method, query, form, qsLib)
  65507. switch (transport) {
  65508. case 'header':
  65509. self.request.setHeader('Authorization', 'OAuth ' + self.concatParams(oa, ',', '"'))
  65510. break
  65511. case 'query':
  65512. var href = self.request.uri.href += (query ? '&' : '?') + self.concatParams(oa, '&')
  65513. self.request.uri = url.parse(href)
  65514. self.request.path = self.request.uri.path
  65515. break
  65516. case 'body':
  65517. self.request.body = (form ? form + '&' : '') + self.concatParams(oa, '&')
  65518. break
  65519. default:
  65520. self.request.emit('error', new Error('oauth: transport_method invalid'))
  65521. }
  65522. }
  65523. exports.OAuth = OAuth
  65524. /***/ }),
  65525. /* 630 */
  65526. /***/ (function(module, exports, __webpack_require__) {
  65527. var crypto = __webpack_require__(5)
  65528. , qs = __webpack_require__(106)
  65529. ;
  65530. function sha1 (key, body) {
  65531. return crypto.createHmac('sha1', key).update(body).digest('base64')
  65532. }
  65533. function rsa (key, body) {
  65534. return crypto.createSign("RSA-SHA1").update(body).sign(key, 'base64');
  65535. }
  65536. function rfc3986 (str) {
  65537. return encodeURIComponent(str)
  65538. .replace(/!/g,'%21')
  65539. .replace(/\*/g,'%2A')
  65540. .replace(/\(/g,'%28')
  65541. .replace(/\)/g,'%29')
  65542. .replace(/'/g,'%27')
  65543. ;
  65544. }
  65545. // Maps object to bi-dimensional array
  65546. // Converts { foo: 'A', bar: [ 'b', 'B' ]} to
  65547. // [ ['foo', 'A'], ['bar', 'b'], ['bar', 'B'] ]
  65548. function map (obj) {
  65549. var key, val, arr = []
  65550. for (key in obj) {
  65551. val = obj[key]
  65552. if (Array.isArray(val))
  65553. for (var i = 0; i < val.length; i++)
  65554. arr.push([key, val[i]])
  65555. else if (typeof val === "object")
  65556. for (var prop in val)
  65557. arr.push([key + '[' + prop + ']', val[prop]]);
  65558. else
  65559. arr.push([key, val])
  65560. }
  65561. return arr
  65562. }
  65563. // Compare function for sort
  65564. function compare (a, b) {
  65565. return a > b ? 1 : a < b ? -1 : 0
  65566. }
  65567. function generateBase (httpMethod, base_uri, params) {
  65568. // adapted from https://dev.twitter.com/docs/auth/oauth and
  65569. // https://dev.twitter.com/docs/auth/creating-signature
  65570. // Parameter normalization
  65571. // http://tools.ietf.org/html/rfc5849#section-3.4.1.3.2
  65572. var normalized = map(params)
  65573. // 1. First, the name and value of each parameter are encoded
  65574. .map(function (p) {
  65575. return [ rfc3986(p[0]), rfc3986(p[1] || '') ]
  65576. })
  65577. // 2. The parameters are sorted by name, using ascending byte value
  65578. // ordering. If two or more parameters share the same name, they
  65579. // are sorted by their value.
  65580. .sort(function (a, b) {
  65581. return compare(a[0], b[0]) || compare(a[1], b[1])
  65582. })
  65583. // 3. The name of each parameter is concatenated to its corresponding
  65584. // value using an "=" character (ASCII code 61) as a separator, even
  65585. // if the value is empty.
  65586. .map(function (p) { return p.join('=') })
  65587. // 4. The sorted name/value pairs are concatenated together into a
  65588. // single string by using an "&" character (ASCII code 38) as
  65589. // separator.
  65590. .join('&')
  65591. var base = [
  65592. rfc3986(httpMethod ? httpMethod.toUpperCase() : 'GET'),
  65593. rfc3986(base_uri),
  65594. rfc3986(normalized)
  65595. ].join('&')
  65596. return base
  65597. }
  65598. function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) {
  65599. var base = generateBase(httpMethod, base_uri, params)
  65600. var key = [
  65601. consumer_secret || '',
  65602. token_secret || ''
  65603. ].map(rfc3986).join('&')
  65604. return sha1(key, base)
  65605. }
  65606. function rsasign (httpMethod, base_uri, params, private_key, token_secret) {
  65607. var base = generateBase(httpMethod, base_uri, params)
  65608. var key = private_key || ''
  65609. return rsa(key, base)
  65610. }
  65611. function plaintext (consumer_secret, token_secret) {
  65612. var key = [
  65613. consumer_secret || '',
  65614. token_secret || ''
  65615. ].map(rfc3986).join('&')
  65616. return key
  65617. }
  65618. function sign (signMethod, httpMethod, base_uri, params, consumer_secret, token_secret) {
  65619. var method
  65620. var skipArgs = 1
  65621. switch (signMethod) {
  65622. case 'RSA-SHA1':
  65623. method = rsasign
  65624. break
  65625. case 'HMAC-SHA1':
  65626. method = hmacsign
  65627. break
  65628. case 'PLAINTEXT':
  65629. method = plaintext
  65630. skipArgs = 4
  65631. break
  65632. default:
  65633. throw new Error("Signature method not supported: " + signMethod)
  65634. }
  65635. return method.apply(null, [].slice.call(arguments, skipArgs))
  65636. }
  65637. exports.hmacsign = hmacsign
  65638. exports.rsasign = rsasign
  65639. exports.plaintext = plaintext
  65640. exports.sign = sign
  65641. exports.rfc3986 = rfc3986
  65642. exports.generateBase = generateBase
  65643. /***/ }),
  65644. /* 631 */
  65645. /***/ (function(module, exports, __webpack_require__) {
  65646. "use strict";
  65647. var uuid = __webpack_require__(155)
  65648. var CombinedStream = __webpack_require__(355)
  65649. var isstream = __webpack_require__(362)
  65650. var Buffer = __webpack_require__(30).Buffer
  65651. function Multipart (request) {
  65652. this.request = request
  65653. this.boundary = uuid()
  65654. this.chunked = false
  65655. this.body = null
  65656. }
  65657. Multipart.prototype.isChunked = function (options) {
  65658. var self = this
  65659. var chunked = false
  65660. var parts = options.data || options
  65661. if (!parts.forEach) {
  65662. self.request.emit('error', new Error('Argument error, options.multipart.'))
  65663. }
  65664. if (options.chunked !== undefined) {
  65665. chunked = options.chunked
  65666. }
  65667. if (self.request.getHeader('transfer-encoding') === 'chunked') {
  65668. chunked = true
  65669. }
  65670. if (!chunked) {
  65671. parts.forEach(function (part) {
  65672. if (typeof part.body === 'undefined') {
  65673. self.request.emit('error', new Error('Body attribute missing in multipart.'))
  65674. }
  65675. if (isstream(part.body)) {
  65676. chunked = true
  65677. }
  65678. })
  65679. }
  65680. return chunked
  65681. }
  65682. Multipart.prototype.setHeaders = function (chunked) {
  65683. var self = this
  65684. if (chunked && !self.request.hasHeader('transfer-encoding')) {
  65685. self.request.setHeader('transfer-encoding', 'chunked')
  65686. }
  65687. var header = self.request.getHeader('content-type')
  65688. if (!header || header.indexOf('multipart') === -1) {
  65689. self.request.setHeader('content-type', 'multipart/related; boundary=' + self.boundary)
  65690. } else {
  65691. if (header.indexOf('boundary') !== -1) {
  65692. self.boundary = header.replace(/.*boundary=([^\s;]+).*/, '$1')
  65693. } else {
  65694. self.request.setHeader('content-type', header + '; boundary=' + self.boundary)
  65695. }
  65696. }
  65697. }
  65698. Multipart.prototype.build = function (parts, chunked) {
  65699. var self = this
  65700. var body = chunked ? new CombinedStream() : []
  65701. function add (part) {
  65702. if (typeof part === 'number') {
  65703. part = part.toString()
  65704. }
  65705. return chunked ? body.append(part) : body.push(Buffer.from(part))
  65706. }
  65707. if (self.request.preambleCRLF) {
  65708. add('\r\n')
  65709. }
  65710. parts.forEach(function (part) {
  65711. var preamble = '--' + self.boundary + '\r\n'
  65712. Object.keys(part).forEach(function (key) {
  65713. if (key === 'body') { return }
  65714. preamble += key + ': ' + part[key] + '\r\n'
  65715. })
  65716. preamble += '\r\n'
  65717. add(preamble)
  65718. add(part.body)
  65719. add('\r\n')
  65720. })
  65721. add('--' + self.boundary + '--')
  65722. if (self.request.postambleCRLF) {
  65723. add('\r\n')
  65724. }
  65725. return body
  65726. }
  65727. Multipart.prototype.onRequest = function (options) {
  65728. var self = this
  65729. var chunked = self.isChunked(options)
  65730. var parts = options.data || options
  65731. self.setHeaders(chunked)
  65732. self.chunked = chunked
  65733. self.body = self.build(parts, chunked)
  65734. }
  65735. exports.Multipart = Multipart
  65736. /***/ }),
  65737. /* 632 */
  65738. /***/ (function(module, exports, __webpack_require__) {
  65739. "use strict";
  65740. var url = __webpack_require__(14)
  65741. var isUrl = /^https?:/
  65742. function Redirect (request) {
  65743. this.request = request
  65744. this.followRedirect = true
  65745. this.followRedirects = true
  65746. this.followAllRedirects = false
  65747. this.followOriginalHttpMethod = false
  65748. this.allowRedirect = function () { return true }
  65749. this.maxRedirects = 10
  65750. this.redirects = []
  65751. this.redirectsFollowed = 0
  65752. this.removeRefererHeader = false
  65753. }
  65754. Redirect.prototype.onRequest = function (options) {
  65755. var self = this
  65756. if (options.maxRedirects !== undefined) {
  65757. self.maxRedirects = options.maxRedirects
  65758. }
  65759. if (typeof options.followRedirect === 'function') {
  65760. self.allowRedirect = options.followRedirect
  65761. }
  65762. if (options.followRedirect !== undefined) {
  65763. self.followRedirects = !!options.followRedirect
  65764. }
  65765. if (options.followAllRedirects !== undefined) {
  65766. self.followAllRedirects = options.followAllRedirects
  65767. }
  65768. if (self.followRedirects || self.followAllRedirects) {
  65769. self.redirects = self.redirects || []
  65770. }
  65771. if (options.removeRefererHeader !== undefined) {
  65772. self.removeRefererHeader = options.removeRefererHeader
  65773. }
  65774. if (options.followOriginalHttpMethod !== undefined) {
  65775. self.followOriginalHttpMethod = options.followOriginalHttpMethod
  65776. }
  65777. }
  65778. Redirect.prototype.redirectTo = function (response) {
  65779. var self = this
  65780. var request = self.request
  65781. var redirectTo = null
  65782. if (response.statusCode >= 300 && response.statusCode < 400 && response.caseless.has('location')) {
  65783. var location = response.caseless.get('location')
  65784. request.debug('redirect', location)
  65785. if (self.followAllRedirects) {
  65786. redirectTo = location
  65787. } else if (self.followRedirects) {
  65788. switch (request.method) {
  65789. case 'PATCH':
  65790. case 'PUT':
  65791. case 'POST':
  65792. case 'DELETE':
  65793. // Do not follow redirects
  65794. break
  65795. default:
  65796. redirectTo = location
  65797. break
  65798. }
  65799. }
  65800. } else if (response.statusCode === 401) {
  65801. var authHeader = request._auth.onResponse(response)
  65802. if (authHeader) {
  65803. request.setHeader('authorization', authHeader)
  65804. redirectTo = request.uri
  65805. }
  65806. }
  65807. return redirectTo
  65808. }
  65809. Redirect.prototype.onResponse = function (response) {
  65810. var self = this
  65811. var request = self.request
  65812. var redirectTo = self.redirectTo(response)
  65813. if (!redirectTo || !self.allowRedirect.call(request, response)) {
  65814. return false
  65815. }
  65816. request.debug('redirect to', redirectTo)
  65817. // ignore any potential response body. it cannot possibly be useful
  65818. // to us at this point.
  65819. // response.resume should be defined, but check anyway before calling. Workaround for browserify.
  65820. if (response.resume) {
  65821. response.resume()
  65822. }
  65823. if (self.redirectsFollowed >= self.maxRedirects) {
  65824. request.emit('error', new Error('Exceeded maxRedirects. Probably stuck in a redirect loop ' + request.uri.href))
  65825. return false
  65826. }
  65827. self.redirectsFollowed += 1
  65828. if (!isUrl.test(redirectTo)) {
  65829. redirectTo = url.resolve(request.uri.href, redirectTo)
  65830. }
  65831. var uriPrev = request.uri
  65832. request.uri = url.parse(redirectTo)
  65833. // handle the case where we change protocol from https to http or vice versa
  65834. if (request.uri.protocol !== uriPrev.protocol) {
  65835. delete request.agent
  65836. }
  65837. self.redirects.push({ statusCode: response.statusCode, redirectUri: redirectTo })
  65838. if (self.followAllRedirects && request.method !== 'HEAD' &&
  65839. response.statusCode !== 401 && response.statusCode !== 307) {
  65840. request.method = self.followOriginalHttpMethod ? request.method : 'GET'
  65841. }
  65842. // request.method = 'GET' // Force all redirects to use GET || commented out fixes #215
  65843. delete request.src
  65844. delete request.req
  65845. delete request._started
  65846. if (response.statusCode !== 401 && response.statusCode !== 307) {
  65847. // Remove parameters from the previous response, unless this is the second request
  65848. // for a server that requires digest authentication.
  65849. delete request.body
  65850. delete request._form
  65851. if (request.headers) {
  65852. request.removeHeader('host')
  65853. request.removeHeader('content-type')
  65854. request.removeHeader('content-length')
  65855. if (request.uri.hostname !== request.originalHost.split(':')[0]) {
  65856. // Remove authorization if changing hostnames (but not if just
  65857. // changing ports or protocols). This matches the behavior of curl:
  65858. // https://github.com/bagder/curl/blob/6beb0eee/lib/http.c#L710
  65859. request.removeHeader('authorization')
  65860. }
  65861. }
  65862. }
  65863. if (!self.removeRefererHeader) {
  65864. request.setHeader('referer', uriPrev.href)
  65865. }
  65866. request.emit('redirect')
  65867. request.init()
  65868. return true
  65869. }
  65870. exports.Redirect = Redirect
  65871. /***/ }),
  65872. /* 633 */
  65873. /***/ (function(module, exports, __webpack_require__) {
  65874. "use strict";
  65875. var url = __webpack_require__(14)
  65876. var tunnel = __webpack_require__(634)
  65877. var defaultProxyHeaderWhiteList = [
  65878. 'accept',
  65879. 'accept-charset',
  65880. 'accept-encoding',
  65881. 'accept-language',
  65882. 'accept-ranges',
  65883. 'cache-control',
  65884. 'content-encoding',
  65885. 'content-language',
  65886. 'content-location',
  65887. 'content-md5',
  65888. 'content-range',
  65889. 'content-type',
  65890. 'connection',
  65891. 'date',
  65892. 'expect',
  65893. 'max-forwards',
  65894. 'pragma',
  65895. 'referer',
  65896. 'te',
  65897. 'user-agent',
  65898. 'via'
  65899. ]
  65900. var defaultProxyHeaderExclusiveList = [
  65901. 'proxy-authorization'
  65902. ]
  65903. function constructProxyHost (uriObject) {
  65904. var port = uriObject.port
  65905. var protocol = uriObject.protocol
  65906. var proxyHost = uriObject.hostname + ':'
  65907. if (port) {
  65908. proxyHost += port
  65909. } else if (protocol === 'https:') {
  65910. proxyHost += '443'
  65911. } else {
  65912. proxyHost += '80'
  65913. }
  65914. return proxyHost
  65915. }
  65916. function constructProxyHeaderWhiteList (headers, proxyHeaderWhiteList) {
  65917. var whiteList = proxyHeaderWhiteList
  65918. .reduce(function (set, header) {
  65919. set[header.toLowerCase()] = true
  65920. return set
  65921. }, {})
  65922. return Object.keys(headers)
  65923. .filter(function (header) {
  65924. return whiteList[header.toLowerCase()]
  65925. })
  65926. .reduce(function (set, header) {
  65927. set[header] = headers[header]
  65928. return set
  65929. }, {})
  65930. }
  65931. function constructTunnelOptions (request, proxyHeaders) {
  65932. var proxy = request.proxy
  65933. var tunnelOptions = {
  65934. proxy: {
  65935. host: proxy.hostname,
  65936. port: +proxy.port,
  65937. proxyAuth: proxy.auth,
  65938. headers: proxyHeaders
  65939. },
  65940. headers: request.headers,
  65941. ca: request.ca,
  65942. cert: request.cert,
  65943. key: request.key,
  65944. passphrase: request.passphrase,
  65945. pfx: request.pfx,
  65946. ciphers: request.ciphers,
  65947. rejectUnauthorized: request.rejectUnauthorized,
  65948. secureOptions: request.secureOptions,
  65949. secureProtocol: request.secureProtocol
  65950. }
  65951. return tunnelOptions
  65952. }
  65953. function constructTunnelFnName (uri, proxy) {
  65954. var uriProtocol = (uri.protocol === 'https:' ? 'https' : 'http')
  65955. var proxyProtocol = (proxy.protocol === 'https:' ? 'Https' : 'Http')
  65956. return [uriProtocol, proxyProtocol].join('Over')
  65957. }
  65958. function getTunnelFn (request) {
  65959. var uri = request.uri
  65960. var proxy = request.proxy
  65961. var tunnelFnName = constructTunnelFnName(uri, proxy)
  65962. return tunnel[tunnelFnName]
  65963. }
  65964. function Tunnel (request) {
  65965. this.request = request
  65966. this.proxyHeaderWhiteList = defaultProxyHeaderWhiteList
  65967. this.proxyHeaderExclusiveList = []
  65968. if (typeof request.tunnel !== 'undefined') {
  65969. this.tunnelOverride = request.tunnel
  65970. }
  65971. }
  65972. Tunnel.prototype.isEnabled = function () {
  65973. var self = this
  65974. var request = self.request
  65975. // Tunnel HTTPS by default. Allow the user to override this setting.
  65976. // If self.tunnelOverride is set (the user specified a value), use it.
  65977. if (typeof self.tunnelOverride !== 'undefined') {
  65978. return self.tunnelOverride
  65979. }
  65980. // If the destination is HTTPS, tunnel.
  65981. if (request.uri.protocol === 'https:') {
  65982. return true
  65983. }
  65984. // Otherwise, do not use tunnel.
  65985. return false
  65986. }
  65987. Tunnel.prototype.setup = function (options) {
  65988. var self = this
  65989. var request = self.request
  65990. options = options || {}
  65991. if (typeof request.proxy === 'string') {
  65992. request.proxy = url.parse(request.proxy)
  65993. }
  65994. if (!request.proxy || !request.tunnel) {
  65995. return false
  65996. }
  65997. // Setup Proxy Header Exclusive List and White List
  65998. if (options.proxyHeaderWhiteList) {
  65999. self.proxyHeaderWhiteList = options.proxyHeaderWhiteList
  66000. }
  66001. if (options.proxyHeaderExclusiveList) {
  66002. self.proxyHeaderExclusiveList = options.proxyHeaderExclusiveList
  66003. }
  66004. var proxyHeaderExclusiveList = self.proxyHeaderExclusiveList.concat(defaultProxyHeaderExclusiveList)
  66005. var proxyHeaderWhiteList = self.proxyHeaderWhiteList.concat(proxyHeaderExclusiveList)
  66006. // Setup Proxy Headers and Proxy Headers Host
  66007. // Only send the Proxy White Listed Header names
  66008. var proxyHeaders = constructProxyHeaderWhiteList(request.headers, proxyHeaderWhiteList)
  66009. proxyHeaders.host = constructProxyHost(request.uri)
  66010. proxyHeaderExclusiveList.forEach(request.removeHeader, request)
  66011. // Set Agent from Tunnel Data
  66012. var tunnelFn = getTunnelFn(request)
  66013. var tunnelOptions = constructTunnelOptions(request, proxyHeaders)
  66014. request.agent = tunnelFn(tunnelOptions)
  66015. return true
  66016. }
  66017. Tunnel.defaultProxyHeaderWhiteList = defaultProxyHeaderWhiteList
  66018. Tunnel.defaultProxyHeaderExclusiveList = defaultProxyHeaderExclusiveList
  66019. exports.Tunnel = Tunnel
  66020. /***/ }),
  66021. /* 634 */
  66022. /***/ (function(module, exports, __webpack_require__) {
  66023. "use strict";
  66024. var net = __webpack_require__(142)
  66025. , tls = __webpack_require__(354)
  66026. , http = __webpack_require__(45)
  66027. , https = __webpack_require__(81)
  66028. , events = __webpack_require__(156)
  66029. , assert = __webpack_require__(83)
  66030. , util = __webpack_require__(2)
  66031. , Buffer = __webpack_require__(30).Buffer
  66032. ;
  66033. exports.httpOverHttp = httpOverHttp
  66034. exports.httpsOverHttp = httpsOverHttp
  66035. exports.httpOverHttps = httpOverHttps
  66036. exports.httpsOverHttps = httpsOverHttps
  66037. function httpOverHttp(options) {
  66038. var agent = new TunnelingAgent(options)
  66039. agent.request = http.request
  66040. return agent
  66041. }
  66042. function httpsOverHttp(options) {
  66043. var agent = new TunnelingAgent(options)
  66044. agent.request = http.request
  66045. agent.createSocket = createSecureSocket
  66046. agent.defaultPort = 443
  66047. return agent
  66048. }
  66049. function httpOverHttps(options) {
  66050. var agent = new TunnelingAgent(options)
  66051. agent.request = https.request
  66052. return agent
  66053. }
  66054. function httpsOverHttps(options) {
  66055. var agent = new TunnelingAgent(options)
  66056. agent.request = https.request
  66057. agent.createSocket = createSecureSocket
  66058. agent.defaultPort = 443
  66059. return agent
  66060. }
  66061. function TunnelingAgent(options) {
  66062. var self = this
  66063. self.options = options || {}
  66064. self.proxyOptions = self.options.proxy || {}
  66065. self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets
  66066. self.requests = []
  66067. self.sockets = []
  66068. self.on('free', function onFree(socket, host, port) {
  66069. for (var i = 0, len = self.requests.length; i < len; ++i) {
  66070. var pending = self.requests[i]
  66071. if (pending.host === host && pending.port === port) {
  66072. // Detect the request to connect same origin server,
  66073. // reuse the connection.
  66074. self.requests.splice(i, 1)
  66075. pending.request.onSocket(socket)
  66076. return
  66077. }
  66078. }
  66079. socket.destroy()
  66080. self.removeSocket(socket)
  66081. })
  66082. }
  66083. util.inherits(TunnelingAgent, events.EventEmitter)
  66084. TunnelingAgent.prototype.addRequest = function addRequest(req, options) {
  66085. var self = this
  66086. // Legacy API: addRequest(req, host, port, path)
  66087. if (typeof options === 'string') {
  66088. options = {
  66089. host: options,
  66090. port: arguments[2],
  66091. path: arguments[3]
  66092. };
  66093. }
  66094. if (self.sockets.length >= this.maxSockets) {
  66095. // We are over limit so we'll add it to the queue.
  66096. self.requests.push({host: options.host, port: options.port, request: req})
  66097. return
  66098. }
  66099. // If we are under maxSockets create a new one.
  66100. self.createConnection({host: options.host, port: options.port, request: req})
  66101. }
  66102. TunnelingAgent.prototype.createConnection = function createConnection(pending) {
  66103. var self = this
  66104. self.createSocket(pending, function(socket) {
  66105. socket.on('free', onFree)
  66106. socket.on('close', onCloseOrRemove)
  66107. socket.on('agentRemove', onCloseOrRemove)
  66108. pending.request.onSocket(socket)
  66109. function onFree() {
  66110. self.emit('free', socket, pending.host, pending.port)
  66111. }
  66112. function onCloseOrRemove(err) {
  66113. self.removeSocket(socket)
  66114. socket.removeListener('free', onFree)
  66115. socket.removeListener('close', onCloseOrRemove)
  66116. socket.removeListener('agentRemove', onCloseOrRemove)
  66117. }
  66118. })
  66119. }
  66120. TunnelingAgent.prototype.createSocket = function createSocket(options, cb) {
  66121. var self = this
  66122. var placeholder = {}
  66123. self.sockets.push(placeholder)
  66124. var connectOptions = mergeOptions({}, self.proxyOptions,
  66125. { method: 'CONNECT'
  66126. , path: options.host + ':' + options.port
  66127. , agent: false
  66128. }
  66129. )
  66130. if (connectOptions.proxyAuth) {
  66131. connectOptions.headers = connectOptions.headers || {}
  66132. connectOptions.headers['Proxy-Authorization'] = 'Basic ' +
  66133. Buffer.from(connectOptions.proxyAuth).toString('base64')
  66134. }
  66135. debug('making CONNECT request')
  66136. var connectReq = self.request(connectOptions)
  66137. connectReq.useChunkedEncodingByDefault = false // for v0.6
  66138. connectReq.once('response', onResponse) // for v0.6
  66139. connectReq.once('upgrade', onUpgrade) // for v0.6
  66140. connectReq.once('connect', onConnect) // for v0.7 or later
  66141. connectReq.once('error', onError)
  66142. connectReq.end()
  66143. function onResponse(res) {
  66144. // Very hacky. This is necessary to avoid http-parser leaks.
  66145. res.upgrade = true
  66146. }
  66147. function onUpgrade(res, socket, head) {
  66148. // Hacky.
  66149. process.nextTick(function() {
  66150. onConnect(res, socket, head)
  66151. })
  66152. }
  66153. function onConnect(res, socket, head) {
  66154. connectReq.removeAllListeners()
  66155. socket.removeAllListeners()
  66156. if (res.statusCode === 200) {
  66157. assert.equal(head.length, 0)
  66158. debug('tunneling connection has established')
  66159. self.sockets[self.sockets.indexOf(placeholder)] = socket
  66160. cb(socket)
  66161. } else {
  66162. debug('tunneling socket could not be established, statusCode=%d', res.statusCode)
  66163. var error = new Error('tunneling socket could not be established, ' + 'statusCode=' + res.statusCode)
  66164. error.code = 'ECONNRESET'
  66165. options.request.emit('error', error)
  66166. self.removeSocket(placeholder)
  66167. }
  66168. }
  66169. function onError(cause) {
  66170. connectReq.removeAllListeners()
  66171. debug('tunneling socket could not be established, cause=%s\n', cause.message, cause.stack)
  66172. var error = new Error('tunneling socket could not be established, ' + 'cause=' + cause.message)
  66173. error.code = 'ECONNRESET'
  66174. options.request.emit('error', error)
  66175. self.removeSocket(placeholder)
  66176. }
  66177. }
  66178. TunnelingAgent.prototype.removeSocket = function removeSocket(socket) {
  66179. var pos = this.sockets.indexOf(socket)
  66180. if (pos === -1) return
  66181. this.sockets.splice(pos, 1)
  66182. var pending = this.requests.shift()
  66183. if (pending) {
  66184. // If we have pending requests and a socket gets closed a new one
  66185. // needs to be created to take over in the pool for the one that closed.
  66186. this.createConnection(pending)
  66187. }
  66188. }
  66189. function createSecureSocket(options, cb) {
  66190. var self = this
  66191. TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {
  66192. // 0 is dummy port for v0.6
  66193. var secureSocket = tls.connect(0, mergeOptions({}, self.options,
  66194. { servername: options.host
  66195. , socket: socket
  66196. }
  66197. ))
  66198. self.sockets[self.sockets.indexOf(socket)] = secureSocket
  66199. cb(secureSocket)
  66200. })
  66201. }
  66202. function mergeOptions(target) {
  66203. for (var i = 1, len = arguments.length; i < len; ++i) {
  66204. var overrides = arguments[i]
  66205. if (typeof overrides === 'object') {
  66206. var keys = Object.keys(overrides)
  66207. for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {
  66208. var k = keys[j]
  66209. if (overrides[k] !== undefined) {
  66210. target[k] = overrides[k]
  66211. }
  66212. }
  66213. }
  66214. }
  66215. return target
  66216. }
  66217. var debug
  66218. if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) {
  66219. debug = function() {
  66220. var args = Array.prototype.slice.call(arguments)
  66221. if (typeof args[0] === 'string') {
  66222. args[0] = 'TUNNEL: ' + args[0]
  66223. } else {
  66224. args.unshift('TUNNEL:')
  66225. }
  66226. console.error.apply(console, args)
  66227. }
  66228. } else {
  66229. debug = function() {}
  66230. }
  66231. exports.debug = debug // for test
  66232. /***/ }),
  66233. /* 635 */
  66234. /***/ (function(module, exports) {
  66235. // Generated by CoffeeScript 1.12.2
  66236. (function() {
  66237. var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;
  66238. if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
  66239. module.exports = function() {
  66240. return performance.now();
  66241. };
  66242. } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
  66243. module.exports = function() {
  66244. return (getNanoSeconds() - nodeLoadTime) / 1e6;
  66245. };
  66246. hrtime = process.hrtime;
  66247. getNanoSeconds = function() {
  66248. var hr;
  66249. hr = hrtime();
  66250. return hr[0] * 1e9 + hr[1];
  66251. };
  66252. moduleLoadTime = getNanoSeconds();
  66253. upTime = process.uptime() * 1e9;
  66254. nodeLoadTime = moduleLoadTime - upTime;
  66255. } else if (Date.now) {
  66256. module.exports = function() {
  66257. return Date.now() - loadTime;
  66258. };
  66259. loadTime = Date.now();
  66260. } else {
  66261. module.exports = function() {
  66262. return new Date().getTime() - loadTime;
  66263. };
  66264. loadTime = new Date().getTime();
  66265. }
  66266. }).call(this);
  66267. //# sourceMappingURL=performance-now.js.map
  66268. /***/ }),
  66269. /* 636 */
  66270. /***/ (function(module, exports, __webpack_require__) {
  66271. var clone = __webpack_require__(637);
  66272. var debugId = 0
  66273. module.exports = exports = function(request, log) {
  66274. log = log || exports.log
  66275. var proto
  66276. if (request.Request) {
  66277. proto = request.Request.prototype
  66278. } else if (request.get && request.post) {
  66279. // The object returned by request.defaults() doesn't include the
  66280. // Request property, so do this horrible thing to get at it. Per
  66281. // Wikipedia, port 4 is unassigned.
  66282. var req = request('http://localhost:4').on('error', function() { })
  66283. proto = req.constructor.prototype
  66284. } else {
  66285. throw new Error(
  66286. "Pass the object returned by require('request') to this function.")
  66287. }
  66288. if (!proto._initBeforeDebug) {
  66289. proto._initBeforeDebug = proto.init
  66290. proto.init = function() {
  66291. if (!this._debugId) {
  66292. this.on('request', function(req) {
  66293. var data = {
  66294. debugId : this._debugId,
  66295. uri : this.uri.href,
  66296. method : this.method,
  66297. headers : clone(this.headers)
  66298. }
  66299. if (this.body) {
  66300. data.body = this.body.toString('utf8')
  66301. }
  66302. log('request', data, this)
  66303. }).on('response', function(res) {
  66304. if (this.callback) {
  66305. // callback specified, request will buffer the body for
  66306. // us, so wait until the complete event to do anything
  66307. } else {
  66308. // cannot get body since no callback specified
  66309. log('response', {
  66310. debugId : this._debugId,
  66311. headers : clone(res.headers),
  66312. statusCode : res.statusCode
  66313. }, this)
  66314. }
  66315. }).on('complete', function(res, body) {
  66316. if (this.callback) {
  66317. log('response', {
  66318. debugId : this._debugId,
  66319. headers : clone(res.headers),
  66320. statusCode : res.statusCode,
  66321. body : res.body
  66322. }, this)
  66323. }
  66324. }).on('redirect', function() {
  66325. var type = (this.response.statusCode == 401 ? 'auth' : 'redirect')
  66326. log(type, {
  66327. debugId : this._debugId,
  66328. statusCode : this.response.statusCode,
  66329. headers : clone(this.response.headers),
  66330. uri : this.uri.href
  66331. }, this)
  66332. })
  66333. this._debugId = ++debugId
  66334. }
  66335. return proto._initBeforeDebug.apply(this, arguments)
  66336. }
  66337. }
  66338. if (!request.stopDebugging) {
  66339. request.stopDebugging = function() {
  66340. proto.init = proto._initBeforeDebug
  66341. delete proto._initBeforeDebug
  66342. }
  66343. }
  66344. }
  66345. exports.log = function(type, data, r) {
  66346. var toLog = {}
  66347. toLog[type] = data
  66348. console.error(toLog)
  66349. }
  66350. /***/ }),
  66351. /* 637 */
  66352. /***/ (function(module, exports, __webpack_require__) {
  66353. "use strict";
  66354. module.exports = function (obj) {
  66355. return JSON.parse(JSON.stringify(obj))
  66356. }
  66357. /***/ }),
  66358. /* 638 */
  66359. /***/ (function(module, exports, __webpack_require__) {
  66360. /**
  66361. * Export cheerio (with )
  66362. */
  66363. exports = module.exports = __webpack_require__(375);
  66364. /*
  66365. Export the version
  66366. */
  66367. exports.version = __webpack_require__(808).version;
  66368. /***/ }),
  66369. /* 639 */
  66370. /***/ (function(module, exports) {
  66371. module.exports = {"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}
  66372. /***/ }),
  66373. /* 640 */
  66374. /***/ (function(module, exports) {
  66375. if (typeof Object.create === 'function') {
  66376. // implementation from standard node.js 'util' module
  66377. module.exports = function inherits(ctor, superCtor) {
  66378. ctor.super_ = superCtor
  66379. ctor.prototype = Object.create(superCtor.prototype, {
  66380. constructor: {
  66381. value: ctor,
  66382. enumerable: false,
  66383. writable: true,
  66384. configurable: true
  66385. }
  66386. });
  66387. };
  66388. } else {
  66389. // old school shim for old browsers
  66390. module.exports = function inherits(ctor, superCtor) {
  66391. ctor.super_ = superCtor
  66392. var TempCtor = function () {}
  66393. TempCtor.prototype = superCtor.prototype
  66394. ctor.prototype = new TempCtor()
  66395. ctor.prototype.constructor = ctor
  66396. }
  66397. }
  66398. /***/ }),
  66399. /* 641 */
  66400. /***/ (function(module, exports, __webpack_require__) {
  66401. var ElementType = __webpack_require__(88);
  66402. var re_whitespace = /\s+/g;
  66403. var NodePrototype = __webpack_require__(380);
  66404. var ElementPrototype = __webpack_require__(642);
  66405. function DomHandler(callback, options, elementCB){
  66406. if(typeof callback === "object"){
  66407. elementCB = options;
  66408. options = callback;
  66409. callback = null;
  66410. } else if(typeof options === "function"){
  66411. elementCB = options;
  66412. options = defaultOpts;
  66413. }
  66414. this._callback = callback;
  66415. this._options = options || defaultOpts;
  66416. this._elementCB = elementCB;
  66417. this.dom = [];
  66418. this._done = false;
  66419. this._tagStack = [];
  66420. this._parser = this._parser || null;
  66421. }
  66422. //default options
  66423. var defaultOpts = {
  66424. normalizeWhitespace: false, //Replace all whitespace with single spaces
  66425. withStartIndices: false, //Add startIndex properties to nodes
  66426. withEndIndices: false, //Add endIndex properties to nodes
  66427. };
  66428. DomHandler.prototype.onparserinit = function(parser){
  66429. this._parser = parser;
  66430. };
  66431. //Resets the handler back to starting state
  66432. DomHandler.prototype.onreset = function(){
  66433. DomHandler.call(this, this._callback, this._options, this._elementCB);
  66434. };
  66435. //Signals the handler that parsing is done
  66436. DomHandler.prototype.onend = function(){
  66437. if(this._done) return;
  66438. this._done = true;
  66439. this._parser = null;
  66440. this._handleCallback(null);
  66441. };
  66442. DomHandler.prototype._handleCallback =
  66443. DomHandler.prototype.onerror = function(error){
  66444. if(typeof this._callback === "function"){
  66445. this._callback(error, this.dom);
  66446. } else {
  66447. if(error) throw error;
  66448. }
  66449. };
  66450. DomHandler.prototype.onclosetag = function(){
  66451. //if(this._tagStack.pop().name !== name) this._handleCallback(Error("Tagname didn't match!"));
  66452. var elem = this._tagStack.pop();
  66453. if(this._options.withEndIndices){
  66454. elem.endIndex = this._parser.endIndex;
  66455. }
  66456. if(this._elementCB) this._elementCB(elem);
  66457. };
  66458. DomHandler.prototype._createDomElement = function(properties){
  66459. if (!this._options.withDomLvl1) return properties;
  66460. var element;
  66461. if (properties.type === "tag") {
  66462. element = Object.create(ElementPrototype);
  66463. } else {
  66464. element = Object.create(NodePrototype);
  66465. }
  66466. for (var key in properties) {
  66467. if (properties.hasOwnProperty(key)) {
  66468. element[key] = properties[key];
  66469. }
  66470. }
  66471. return element;
  66472. };
  66473. DomHandler.prototype._addDomElement = function(element){
  66474. var parent = this._tagStack[this._tagStack.length - 1];
  66475. var siblings = parent ? parent.children : this.dom;
  66476. var previousSibling = siblings[siblings.length - 1];
  66477. element.next = null;
  66478. if(this._options.withStartIndices){
  66479. element.startIndex = this._parser.startIndex;
  66480. }
  66481. if(this._options.withEndIndices){
  66482. element.endIndex = this._parser.endIndex;
  66483. }
  66484. if(previousSibling){
  66485. element.prev = previousSibling;
  66486. previousSibling.next = element;
  66487. } else {
  66488. element.prev = null;
  66489. }
  66490. siblings.push(element);
  66491. element.parent = parent || null;
  66492. };
  66493. DomHandler.prototype.onopentag = function(name, attribs){
  66494. var properties = {
  66495. type: name === "script" ? ElementType.Script : name === "style" ? ElementType.Style : ElementType.Tag,
  66496. name: name,
  66497. attribs: attribs,
  66498. children: []
  66499. };
  66500. var element = this._createDomElement(properties);
  66501. this._addDomElement(element);
  66502. this._tagStack.push(element);
  66503. };
  66504. DomHandler.prototype.ontext = function(data){
  66505. //the ignoreWhitespace is officially dropped, but for now,
  66506. //it's an alias for normalizeWhitespace
  66507. var normalize = this._options.normalizeWhitespace || this._options.ignoreWhitespace;
  66508. var lastTag;
  66509. if(!this._tagStack.length && this.dom.length && (lastTag = this.dom[this.dom.length-1]).type === ElementType.Text){
  66510. if(normalize){
  66511. lastTag.data = (lastTag.data + data).replace(re_whitespace, " ");
  66512. } else {
  66513. lastTag.data += data;
  66514. }
  66515. } else {
  66516. if(
  66517. this._tagStack.length &&
  66518. (lastTag = this._tagStack[this._tagStack.length - 1]) &&
  66519. (lastTag = lastTag.children[lastTag.children.length - 1]) &&
  66520. lastTag.type === ElementType.Text
  66521. ){
  66522. if(normalize){
  66523. lastTag.data = (lastTag.data + data).replace(re_whitespace, " ");
  66524. } else {
  66525. lastTag.data += data;
  66526. }
  66527. } else {
  66528. if(normalize){
  66529. data = data.replace(re_whitespace, " ");
  66530. }
  66531. var element = this._createDomElement({
  66532. data: data,
  66533. type: ElementType.Text
  66534. });
  66535. this._addDomElement(element);
  66536. }
  66537. }
  66538. };
  66539. DomHandler.prototype.oncomment = function(data){
  66540. var lastTag = this._tagStack[this._tagStack.length - 1];
  66541. if(lastTag && lastTag.type === ElementType.Comment){
  66542. lastTag.data += data;
  66543. return;
  66544. }
  66545. var properties = {
  66546. data: data,
  66547. type: ElementType.Comment
  66548. };
  66549. var element = this._createDomElement(properties);
  66550. this._addDomElement(element);
  66551. this._tagStack.push(element);
  66552. };
  66553. DomHandler.prototype.oncdatastart = function(){
  66554. var properties = {
  66555. children: [{
  66556. data: "",
  66557. type: ElementType.Text
  66558. }],
  66559. type: ElementType.CDATA
  66560. };
  66561. var element = this._createDomElement(properties);
  66562. this._addDomElement(element);
  66563. this._tagStack.push(element);
  66564. };
  66565. DomHandler.prototype.oncommentend = DomHandler.prototype.oncdataend = function(){
  66566. this._tagStack.pop();
  66567. };
  66568. DomHandler.prototype.onprocessinginstruction = function(name, data){
  66569. var element = this._createDomElement({
  66570. name: name,
  66571. data: data,
  66572. type: ElementType.Directive
  66573. });
  66574. this._addDomElement(element);
  66575. };
  66576. module.exports = DomHandler;
  66577. /***/ }),
  66578. /* 642 */
  66579. /***/ (function(module, exports, __webpack_require__) {
  66580. // DOM-Level-1-compliant structure
  66581. var NodePrototype = __webpack_require__(380);
  66582. var ElementPrototype = module.exports = Object.create(NodePrototype);
  66583. var domLvl1 = {
  66584. tagName: "name"
  66585. };
  66586. Object.keys(domLvl1).forEach(function(key) {
  66587. var shorthand = domLvl1[key];
  66588. Object.defineProperty(ElementPrototype, key, {
  66589. get: function() {
  66590. return this[shorthand] || null;
  66591. },
  66592. set: function(val) {
  66593. this[shorthand] = val;
  66594. return val;
  66595. }
  66596. });
  66597. });
  66598. /***/ }),
  66599. /* 643 */
  66600. /***/ (function(module, exports, __webpack_require__) {
  66601. var index = __webpack_require__(63),
  66602. DomHandler = index.DomHandler,
  66603. DomUtils = index.DomUtils;
  66604. //TODO: make this a streamable handler
  66605. function FeedHandler(callback, options){
  66606. this.init(callback, options);
  66607. }
  66608. __webpack_require__(33)(FeedHandler, DomHandler);
  66609. FeedHandler.prototype.init = DomHandler;
  66610. function getElements(what, where){
  66611. return DomUtils.getElementsByTagName(what, where, true);
  66612. }
  66613. function getOneElement(what, where){
  66614. return DomUtils.getElementsByTagName(what, where, true, 1)[0];
  66615. }
  66616. function fetch(what, where, recurse){
  66617. return DomUtils.getText(
  66618. DomUtils.getElementsByTagName(what, where, recurse, 1)
  66619. ).trim();
  66620. }
  66621. function addConditionally(obj, prop, what, where, recurse){
  66622. var tmp = fetch(what, where, recurse);
  66623. if(tmp) obj[prop] = tmp;
  66624. }
  66625. var isValidFeed = function(value){
  66626. return value === "rss" || value === "feed" || value === "rdf:RDF";
  66627. };
  66628. FeedHandler.prototype.onend = function(){
  66629. var feed = {},
  66630. feedRoot = getOneElement(isValidFeed, this.dom),
  66631. tmp, childs;
  66632. if(feedRoot){
  66633. if(feedRoot.name === "feed"){
  66634. childs = feedRoot.children;
  66635. feed.type = "atom";
  66636. addConditionally(feed, "id", "id", childs);
  66637. addConditionally(feed, "title", "title", childs);
  66638. if((tmp = getOneElement("link", childs)) && (tmp = tmp.attribs) && (tmp = tmp.href)) feed.link = tmp;
  66639. addConditionally(feed, "description", "subtitle", childs);
  66640. if((tmp = fetch("updated", childs))) feed.updated = new Date(tmp);
  66641. addConditionally(feed, "author", "email", childs, true);
  66642. feed.items = getElements("entry", childs).map(function(item){
  66643. var entry = {}, tmp;
  66644. item = item.children;
  66645. addConditionally(entry, "id", "id", item);
  66646. addConditionally(entry, "title", "title", item);
  66647. if((tmp = getOneElement("link", item)) && (tmp = tmp.attribs) && (tmp = tmp.href)) entry.link = tmp;
  66648. if((tmp = fetch("summary", item) || fetch("content", item))) entry.description = tmp;
  66649. if((tmp = fetch("updated", item))) entry.pubDate = new Date(tmp);
  66650. return entry;
  66651. });
  66652. } else {
  66653. childs = getOneElement("channel", feedRoot.children).children;
  66654. feed.type = feedRoot.name.substr(0, 3);
  66655. feed.id = "";
  66656. addConditionally(feed, "title", "title", childs);
  66657. addConditionally(feed, "link", "link", childs);
  66658. addConditionally(feed, "description", "description", childs);
  66659. if((tmp = fetch("lastBuildDate", childs))) feed.updated = new Date(tmp);
  66660. addConditionally(feed, "author", "managingEditor", childs, true);
  66661. feed.items = getElements("item", feedRoot.children).map(function(item){
  66662. var entry = {}, tmp;
  66663. item = item.children;
  66664. addConditionally(entry, "id", "guid", item);
  66665. addConditionally(entry, "title", "title", item);
  66666. addConditionally(entry, "link", "link", item);
  66667. addConditionally(entry, "description", "description", item);
  66668. if((tmp = fetch("pubDate", item))) entry.pubDate = new Date(tmp);
  66669. return entry;
  66670. });
  66671. }
  66672. }
  66673. this.dom = feed;
  66674. DomHandler.prototype._handleCallback.call(
  66675. this, feedRoot ? null : Error("couldn't find root of feed")
  66676. );
  66677. };
  66678. module.exports = FeedHandler;
  66679. /***/ }),
  66680. /* 644 */
  66681. /***/ (function(module, exports, __webpack_require__) {
  66682. module.exports = Stream;
  66683. var Parser = __webpack_require__(381);
  66684. function Stream(options){
  66685. Parser.call(this, new Cbs(this), options);
  66686. }
  66687. __webpack_require__(33)(Stream, Parser);
  66688. Stream.prototype.readable = true;
  66689. function Cbs(scope){
  66690. this.scope = scope;
  66691. }
  66692. var EVENTS = __webpack_require__(63).EVENTS;
  66693. Object.keys(EVENTS).forEach(function(name){
  66694. if(EVENTS[name] === 0){
  66695. Cbs.prototype["on" + name] = function(){
  66696. this.scope.emit(name);
  66697. };
  66698. } else if(EVENTS[name] === 1){
  66699. Cbs.prototype["on" + name] = function(a){
  66700. this.scope.emit(name, a);
  66701. };
  66702. } else if(EVENTS[name] === 2){
  66703. Cbs.prototype["on" + name] = function(a, b){
  66704. this.scope.emit(name, a, b);
  66705. };
  66706. } else {
  66707. throw Error("wrong number of arguments!");
  66708. }
  66709. });
  66710. /***/ }),
  66711. /* 645 */
  66712. /***/ (function(module, exports, __webpack_require__) {
  66713. var Stream = __webpack_require__(10);
  66714. if (process.env.READABLE_STREAM === 'disable' && Stream) {
  66715. module.exports = Stream;
  66716. exports = module.exports = Stream.Readable;
  66717. exports.Readable = Stream.Readable;
  66718. exports.Writable = Stream.Writable;
  66719. exports.Duplex = Stream.Duplex;
  66720. exports.Transform = Stream.Transform;
  66721. exports.PassThrough = Stream.PassThrough;
  66722. exports.Stream = Stream;
  66723. } else {
  66724. exports = module.exports = __webpack_require__(382);
  66725. exports.Stream = Stream || exports;
  66726. exports.Readable = exports;
  66727. exports.Writable = __webpack_require__(385);
  66728. exports.Duplex = __webpack_require__(64);
  66729. exports.Transform = __webpack_require__(387);
  66730. exports.PassThrough = __webpack_require__(649);
  66731. }
  66732. /***/ }),
  66733. /* 646 */
  66734. /***/ (function(module, exports) {
  66735. var toString = {}.toString;
  66736. module.exports = Array.isArray || function (arr) {
  66737. return toString.call(arr) == '[object Array]';
  66738. };
  66739. /***/ }),
  66740. /* 647 */
  66741. /***/ (function(module, exports, __webpack_require__) {
  66742. "use strict";
  66743. /*<replacement>*/
  66744. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  66745. var Buffer = __webpack_require__(30).Buffer;
  66746. /*</replacement>*/
  66747. function copyBuffer(src, target, offset) {
  66748. src.copy(target, offset);
  66749. }
  66750. module.exports = function () {
  66751. function BufferList() {
  66752. _classCallCheck(this, BufferList);
  66753. this.head = null;
  66754. this.tail = null;
  66755. this.length = 0;
  66756. }
  66757. BufferList.prototype.push = function push(v) {
  66758. var entry = { data: v, next: null };
  66759. if (this.length > 0) this.tail.next = entry;else this.head = entry;
  66760. this.tail = entry;
  66761. ++this.length;
  66762. };
  66763. BufferList.prototype.unshift = function unshift(v) {
  66764. var entry = { data: v, next: this.head };
  66765. if (this.length === 0) this.tail = entry;
  66766. this.head = entry;
  66767. ++this.length;
  66768. };
  66769. BufferList.prototype.shift = function shift() {
  66770. if (this.length === 0) return;
  66771. var ret = this.head.data;
  66772. if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
  66773. --this.length;
  66774. return ret;
  66775. };
  66776. BufferList.prototype.clear = function clear() {
  66777. this.head = this.tail = null;
  66778. this.length = 0;
  66779. };
  66780. BufferList.prototype.join = function join(s) {
  66781. if (this.length === 0) return '';
  66782. var p = this.head;
  66783. var ret = '' + p.data;
  66784. while (p = p.next) {
  66785. ret += s + p.data;
  66786. }return ret;
  66787. };
  66788. BufferList.prototype.concat = function concat(n) {
  66789. if (this.length === 0) return Buffer.alloc(0);
  66790. if (this.length === 1) return this.head.data;
  66791. var ret = Buffer.allocUnsafe(n >>> 0);
  66792. var p = this.head;
  66793. var i = 0;
  66794. while (p) {
  66795. copyBuffer(p.data, ret, i);
  66796. i += p.data.length;
  66797. p = p.next;
  66798. }
  66799. return ret;
  66800. };
  66801. return BufferList;
  66802. }();
  66803. /***/ }),
  66804. /* 648 */
  66805. /***/ (function(module, exports, __webpack_require__) {
  66806. /**
  66807. * For Node.js, simply re-export the core `util.deprecate` function.
  66808. */
  66809. module.exports = __webpack_require__(2).deprecate;
  66810. /***/ }),
  66811. /* 649 */
  66812. /***/ (function(module, exports, __webpack_require__) {
  66813. "use strict";
  66814. // Copyright Joyent, Inc. and other Node contributors.
  66815. //
  66816. // Permission is hereby granted, free of charge, to any person obtaining a
  66817. // copy of this software and associated documentation files (the
  66818. // "Software"), to deal in the Software without restriction, including
  66819. // without limitation the rights to use, copy, modify, merge, publish,
  66820. // distribute, sublicense, and/or sell copies of the Software, and to permit
  66821. // persons to whom the Software is furnished to do so, subject to the
  66822. // following conditions:
  66823. //
  66824. // The above copyright notice and this permission notice shall be included
  66825. // in all copies or substantial portions of the Software.
  66826. //
  66827. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  66828. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  66829. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  66830. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  66831. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  66832. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  66833. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  66834. // a passthrough stream.
  66835. // basically just the most minimal sort of Transform stream.
  66836. // Every written chunk gets output as-is.
  66837. module.exports = PassThrough;
  66838. var Transform = __webpack_require__(387);
  66839. /*<replacement>*/
  66840. var util = __webpack_require__(61);
  66841. util.inherits = __webpack_require__(33);
  66842. /*</replacement>*/
  66843. util.inherits(PassThrough, Transform);
  66844. function PassThrough(options) {
  66845. if (!(this instanceof PassThrough)) return new PassThrough(options);
  66846. Transform.call(this, options);
  66847. }
  66848. PassThrough.prototype._transform = function (chunk, encoding, cb) {
  66849. cb(null, chunk);
  66850. };
  66851. /***/ }),
  66852. /* 650 */
  66853. /***/ (function(module, exports, __webpack_require__) {
  66854. module.exports = ProxyHandler;
  66855. function ProxyHandler(cbs){
  66856. this._cbs = cbs || {};
  66857. }
  66858. var EVENTS = __webpack_require__(63).EVENTS;
  66859. Object.keys(EVENTS).forEach(function(name){
  66860. if(EVENTS[name] === 0){
  66861. name = "on" + name;
  66862. ProxyHandler.prototype[name] = function(){
  66863. if(this._cbs[name]) this._cbs[name]();
  66864. };
  66865. } else if(EVENTS[name] === 1){
  66866. name = "on" + name;
  66867. ProxyHandler.prototype[name] = function(a){
  66868. if(this._cbs[name]) this._cbs[name](a);
  66869. };
  66870. } else if(EVENTS[name] === 2){
  66871. name = "on" + name;
  66872. ProxyHandler.prototype[name] = function(a, b){
  66873. if(this._cbs[name]) this._cbs[name](a, b);
  66874. };
  66875. } else {
  66876. throw Error("wrong number of arguments");
  66877. }
  66878. });
  66879. /***/ }),
  66880. /* 651 */
  66881. /***/ (function(module, exports, __webpack_require__) {
  66882. var ElementType = __webpack_require__(88),
  66883. getOuterHTML = __webpack_require__(159),
  66884. isTag = ElementType.isTag;
  66885. module.exports = {
  66886. getInnerHTML: getInnerHTML,
  66887. getOuterHTML: getOuterHTML,
  66888. getText: getText
  66889. };
  66890. function getInnerHTML(elem, opts){
  66891. return elem.children ? elem.children.map(function(elem){
  66892. return getOuterHTML(elem, opts);
  66893. }).join("") : "";
  66894. }
  66895. function getText(elem){
  66896. if(Array.isArray(elem)) return elem.map(getText).join("");
  66897. if(isTag(elem) || elem.type === ElementType.CDATA) return getText(elem.children);
  66898. if(elem.type === ElementType.Text) return elem.data;
  66899. return "";
  66900. }
  66901. /***/ }),
  66902. /* 652 */
  66903. /***/ (function(module, exports) {
  66904. //Types of elements found in the DOM
  66905. module.exports = {
  66906. Text: "text", //Text
  66907. Directive: "directive", //<? ... ?>
  66908. Comment: "comment", //<!-- ... -->
  66909. Script: "script", //<script> tags
  66910. Style: "style", //<style> tags
  66911. Tag: "tag", //Any tag
  66912. CDATA: "cdata", //<![CDATA[ ... ]]>
  66913. isTag: function(elem){
  66914. return elem.type === "tag" || elem.type === "script" || elem.type === "style";
  66915. }
  66916. };
  66917. /***/ }),
  66918. /* 653 */
  66919. /***/ (function(module, exports, __webpack_require__) {
  66920. var encode = __webpack_require__(654),
  66921. decode = __webpack_require__(655);
  66922. exports.decode = function(data, level){
  66923. return (!level || level <= 0 ? decode.XML : decode.HTML)(data);
  66924. };
  66925. exports.decodeStrict = function(data, level){
  66926. return (!level || level <= 0 ? decode.XML : decode.HTMLStrict)(data);
  66927. };
  66928. exports.encode = function(data, level){
  66929. return (!level || level <= 0 ? encode.XML : encode.HTML)(data);
  66930. };
  66931. exports.encodeXML = encode.XML;
  66932. exports.encodeHTML4 =
  66933. exports.encodeHTML5 =
  66934. exports.encodeHTML = encode.HTML;
  66935. exports.decodeXML =
  66936. exports.decodeXMLStrict = decode.XML;
  66937. exports.decodeHTML4 =
  66938. exports.decodeHTML5 =
  66939. exports.decodeHTML = decode.HTML;
  66940. exports.decodeHTML4Strict =
  66941. exports.decodeHTML5Strict =
  66942. exports.decodeHTMLStrict = decode.HTMLStrict;
  66943. exports.escape = encode.escape;
  66944. /***/ }),
  66945. /* 654 */
  66946. /***/ (function(module, exports, __webpack_require__) {
  66947. var inverseXML = getInverseObj(__webpack_require__(158)),
  66948. xmlReplacer = getInverseReplacer(inverseXML);
  66949. exports.XML = getInverse(inverseXML, xmlReplacer);
  66950. var inverseHTML = getInverseObj(__webpack_require__(157)),
  66951. htmlReplacer = getInverseReplacer(inverseHTML);
  66952. exports.HTML = getInverse(inverseHTML, htmlReplacer);
  66953. function getInverseObj(obj){
  66954. return Object.keys(obj).sort().reduce(function(inverse, name){
  66955. inverse[obj[name]] = "&" + name + ";";
  66956. return inverse;
  66957. }, {});
  66958. }
  66959. function getInverseReplacer(inverse){
  66960. var single = [],
  66961. multiple = [];
  66962. Object.keys(inverse).forEach(function(k){
  66963. if(k.length === 1){
  66964. single.push("\\" + k);
  66965. } else {
  66966. multiple.push(k);
  66967. }
  66968. });
  66969. //TODO add ranges
  66970. multiple.unshift("[" + single.join("") + "]");
  66971. return new RegExp(multiple.join("|"), "g");
  66972. }
  66973. var re_nonASCII = /[^\0-\x7F]/g,
  66974. re_astralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  66975. function singleCharReplacer(c){
  66976. return "&#x" + c.charCodeAt(0).toString(16).toUpperCase() + ";";
  66977. }
  66978. function astralReplacer(c){
  66979. // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
  66980. var high = c.charCodeAt(0);
  66981. var low = c.charCodeAt(1);
  66982. var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000;
  66983. return "&#x" + codePoint.toString(16).toUpperCase() + ";";
  66984. }
  66985. function getInverse(inverse, re){
  66986. function func(name){
  66987. return inverse[name];
  66988. }
  66989. return function(data){
  66990. return data
  66991. .replace(re, func)
  66992. .replace(re_astralSymbols, astralReplacer)
  66993. .replace(re_nonASCII, singleCharReplacer);
  66994. };
  66995. }
  66996. var re_xmlChars = getInverseReplacer(inverseXML);
  66997. function escapeXML(data){
  66998. return data
  66999. .replace(re_xmlChars, singleCharReplacer)
  67000. .replace(re_astralSymbols, astralReplacer)
  67001. .replace(re_nonASCII, singleCharReplacer);
  67002. }
  67003. exports.escape = escapeXML;
  67004. /***/ }),
  67005. /* 655 */
  67006. /***/ (function(module, exports, __webpack_require__) {
  67007. var entityMap = __webpack_require__(157),
  67008. legacyMap = __webpack_require__(379),
  67009. xmlMap = __webpack_require__(158),
  67010. decodeCodePoint = __webpack_require__(378);
  67011. var decodeXMLStrict = getStrictDecoder(xmlMap),
  67012. decodeHTMLStrict = getStrictDecoder(entityMap);
  67013. function getStrictDecoder(map){
  67014. var keys = Object.keys(map).join("|"),
  67015. replace = getReplacer(map);
  67016. keys += "|#[xX][\\da-fA-F]+|#\\d+";
  67017. var re = new RegExp("&(?:" + keys + ");", "g");
  67018. return function(str){
  67019. return String(str).replace(re, replace);
  67020. };
  67021. }
  67022. var decodeHTML = (function(){
  67023. var legacy = Object.keys(legacyMap)
  67024. .sort(sorter);
  67025. var keys = Object.keys(entityMap)
  67026. .sort(sorter);
  67027. for(var i = 0, j = 0; i < keys.length; i++){
  67028. if(legacy[j] === keys[i]){
  67029. keys[i] += ";?";
  67030. j++;
  67031. } else {
  67032. keys[i] += ";";
  67033. }
  67034. }
  67035. var re = new RegExp("&(?:" + keys.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"),
  67036. replace = getReplacer(entityMap);
  67037. function replacer(str){
  67038. if(str.substr(-1) !== ";") str += ";";
  67039. return replace(str);
  67040. }
  67041. //TODO consider creating a merged map
  67042. return function(str){
  67043. return String(str).replace(re, replacer);
  67044. };
  67045. }());
  67046. function sorter(a, b){
  67047. return a < b ? 1 : -1;
  67048. }
  67049. function getReplacer(map){
  67050. return function replace(str){
  67051. if(str.charAt(1) === "#"){
  67052. if(str.charAt(2) === "X" || str.charAt(2) === "x"){
  67053. return decodeCodePoint(parseInt(str.substr(3), 16));
  67054. }
  67055. return decodeCodePoint(parseInt(str.substr(2), 10));
  67056. }
  67057. return map[str.slice(1, -1)];
  67058. };
  67059. }
  67060. module.exports = {
  67061. XML: decodeXMLStrict,
  67062. HTML: decodeHTML,
  67063. HTMLStrict: decodeHTMLStrict
  67064. };
  67065. /***/ }),
  67066. /* 656 */
  67067. /***/ (function(module, exports) {
  67068. var getChildren = exports.getChildren = function(elem){
  67069. return elem.children;
  67070. };
  67071. var getParent = exports.getParent = function(elem){
  67072. return elem.parent;
  67073. };
  67074. exports.getSiblings = function(elem){
  67075. var parent = getParent(elem);
  67076. return parent ? getChildren(parent) : [elem];
  67077. };
  67078. exports.getAttributeValue = function(elem, name){
  67079. return elem.attribs && elem.attribs[name];
  67080. };
  67081. exports.hasAttrib = function(elem, name){
  67082. return !!elem.attribs && hasOwnProperty.call(elem.attribs, name);
  67083. };
  67084. exports.getName = function(elem){
  67085. return elem.name;
  67086. };
  67087. /***/ }),
  67088. /* 657 */
  67089. /***/ (function(module, exports) {
  67090. exports.removeElement = function(elem){
  67091. if(elem.prev) elem.prev.next = elem.next;
  67092. if(elem.next) elem.next.prev = elem.prev;
  67093. if(elem.parent){
  67094. var childs = elem.parent.children;
  67095. childs.splice(childs.lastIndexOf(elem), 1);
  67096. }
  67097. };
  67098. exports.replaceElement = function(elem, replacement){
  67099. var prev = replacement.prev = elem.prev;
  67100. if(prev){
  67101. prev.next = replacement;
  67102. }
  67103. var next = replacement.next = elem.next;
  67104. if(next){
  67105. next.prev = replacement;
  67106. }
  67107. var parent = replacement.parent = elem.parent;
  67108. if(parent){
  67109. var childs = parent.children;
  67110. childs[childs.lastIndexOf(elem)] = replacement;
  67111. }
  67112. };
  67113. exports.appendChild = function(elem, child){
  67114. child.parent = elem;
  67115. if(elem.children.push(child) !== 1){
  67116. var sibling = elem.children[elem.children.length - 2];
  67117. sibling.next = child;
  67118. child.prev = sibling;
  67119. child.next = null;
  67120. }
  67121. };
  67122. exports.append = function(elem, next){
  67123. var parent = elem.parent,
  67124. currNext = elem.next;
  67125. next.next = currNext;
  67126. next.prev = elem;
  67127. elem.next = next;
  67128. next.parent = parent;
  67129. if(currNext){
  67130. currNext.prev = next;
  67131. if(parent){
  67132. var childs = parent.children;
  67133. childs.splice(childs.lastIndexOf(currNext), 0, next);
  67134. }
  67135. } else if(parent){
  67136. parent.children.push(next);
  67137. }
  67138. };
  67139. exports.prepend = function(elem, prev){
  67140. var parent = elem.parent;
  67141. if(parent){
  67142. var childs = parent.children;
  67143. childs.splice(childs.lastIndexOf(elem), 0, prev);
  67144. }
  67145. if(elem.prev){
  67146. elem.prev.next = prev;
  67147. }
  67148. prev.parent = parent;
  67149. prev.prev = elem.prev;
  67150. prev.next = elem;
  67151. elem.prev = prev;
  67152. };
  67153. /***/ }),
  67154. /* 658 */
  67155. /***/ (function(module, exports, __webpack_require__) {
  67156. var isTag = __webpack_require__(88).isTag;
  67157. module.exports = {
  67158. filter: filter,
  67159. find: find,
  67160. findOneChild: findOneChild,
  67161. findOne: findOne,
  67162. existsOne: existsOne,
  67163. findAll: findAll
  67164. };
  67165. function filter(test, element, recurse, limit){
  67166. if(!Array.isArray(element)) element = [element];
  67167. if(typeof limit !== "number" || !isFinite(limit)){
  67168. limit = Infinity;
  67169. }
  67170. return find(test, element, recurse !== false, limit);
  67171. }
  67172. function find(test, elems, recurse, limit){
  67173. var result = [], childs;
  67174. for(var i = 0, j = elems.length; i < j; i++){
  67175. if(test(elems[i])){
  67176. result.push(elems[i]);
  67177. if(--limit <= 0) break;
  67178. }
  67179. childs = elems[i].children;
  67180. if(recurse && childs && childs.length > 0){
  67181. childs = find(test, childs, recurse, limit);
  67182. result = result.concat(childs);
  67183. limit -= childs.length;
  67184. if(limit <= 0) break;
  67185. }
  67186. }
  67187. return result;
  67188. }
  67189. function findOneChild(test, elems){
  67190. for(var i = 0, l = elems.length; i < l; i++){
  67191. if(test(elems[i])) return elems[i];
  67192. }
  67193. return null;
  67194. }
  67195. function findOne(test, elems){
  67196. var elem = null;
  67197. for(var i = 0, l = elems.length; i < l && !elem; i++){
  67198. if(!isTag(elems[i])){
  67199. continue;
  67200. } else if(test(elems[i])){
  67201. elem = elems[i];
  67202. } else if(elems[i].children.length > 0){
  67203. elem = findOne(test, elems[i].children);
  67204. }
  67205. }
  67206. return elem;
  67207. }
  67208. function existsOne(test, elems){
  67209. for(var i = 0, l = elems.length; i < l; i++){
  67210. if(
  67211. isTag(elems[i]) && (
  67212. test(elems[i]) || (
  67213. elems[i].children.length > 0 &&
  67214. existsOne(test, elems[i].children)
  67215. )
  67216. )
  67217. ){
  67218. return true;
  67219. }
  67220. }
  67221. return false;
  67222. }
  67223. function findAll(test, elems){
  67224. var result = [];
  67225. for(var i = 0, j = elems.length; i < j; i++){
  67226. if(!isTag(elems[i])) continue;
  67227. if(test(elems[i])) result.push(elems[i]);
  67228. if(elems[i].children.length > 0){
  67229. result = result.concat(findAll(test, elems[i].children));
  67230. }
  67231. }
  67232. return result;
  67233. }
  67234. /***/ }),
  67235. /* 659 */
  67236. /***/ (function(module, exports, __webpack_require__) {
  67237. var ElementType = __webpack_require__(88);
  67238. var isTag = exports.isTag = ElementType.isTag;
  67239. exports.testElement = function(options, element){
  67240. for(var key in options){
  67241. if(!options.hasOwnProperty(key));
  67242. else if(key === "tag_name"){
  67243. if(!isTag(element) || !options.tag_name(element.name)){
  67244. return false;
  67245. }
  67246. } else if(key === "tag_type"){
  67247. if(!options.tag_type(element.type)) return false;
  67248. } else if(key === "tag_contains"){
  67249. if(isTag(element) || !options.tag_contains(element.data)){
  67250. return false;
  67251. }
  67252. } else if(!element.attribs || !options[key](element.attribs[key])){
  67253. return false;
  67254. }
  67255. }
  67256. return true;
  67257. };
  67258. var Checks = {
  67259. tag_name: function(name){
  67260. if(typeof name === "function"){
  67261. return function(elem){ return isTag(elem) && name(elem.name); };
  67262. } else if(name === "*"){
  67263. return isTag;
  67264. } else {
  67265. return function(elem){ return isTag(elem) && elem.name === name; };
  67266. }
  67267. },
  67268. tag_type: function(type){
  67269. if(typeof type === "function"){
  67270. return function(elem){ return type(elem.type); };
  67271. } else {
  67272. return function(elem){ return elem.type === type; };
  67273. }
  67274. },
  67275. tag_contains: function(data){
  67276. if(typeof data === "function"){
  67277. return function(elem){ return !isTag(elem) && data(elem.data); };
  67278. } else {
  67279. return function(elem){ return !isTag(elem) && elem.data === data; };
  67280. }
  67281. }
  67282. };
  67283. function getAttribCheck(attrib, value){
  67284. if(typeof value === "function"){
  67285. return function(elem){ return elem.attribs && value(elem.attribs[attrib]); };
  67286. } else {
  67287. return function(elem){ return elem.attribs && elem.attribs[attrib] === value; };
  67288. }
  67289. }
  67290. function combineFuncs(a, b){
  67291. return function(elem){
  67292. return a(elem) || b(elem);
  67293. };
  67294. }
  67295. exports.getElements = function(options, element, recurse, limit){
  67296. var funcs = Object.keys(options).map(function(key){
  67297. var value = options[key];
  67298. return key in Checks ? Checks[key](value) : getAttribCheck(key, value);
  67299. });
  67300. return funcs.length === 0 ? [] : this.filter(
  67301. funcs.reduce(combineFuncs),
  67302. element, recurse, limit
  67303. );
  67304. };
  67305. exports.getElementById = function(id, element, recurse){
  67306. if(!Array.isArray(element)) element = [element];
  67307. return this.findOne(getAttribCheck("id", id), element, recurse !== false);
  67308. };
  67309. exports.getElementsByTagName = function(name, element, recurse, limit){
  67310. return this.filter(Checks.tag_name(name), element, recurse, limit);
  67311. };
  67312. exports.getElementsByTagType = function(type, element, recurse, limit){
  67313. return this.filter(Checks.tag_type(type), element, recurse, limit);
  67314. };
  67315. /***/ }),
  67316. /* 660 */
  67317. /***/ (function(module, exports) {
  67318. // removeSubsets
  67319. // Given an array of nodes, remove any member that is contained by another.
  67320. exports.removeSubsets = function(nodes) {
  67321. var idx = nodes.length, node, ancestor, replace;
  67322. // Check if each node (or one of its ancestors) is already contained in the
  67323. // array.
  67324. while (--idx > -1) {
  67325. node = ancestor = nodes[idx];
  67326. // Temporarily remove the node under consideration
  67327. nodes[idx] = null;
  67328. replace = true;
  67329. while (ancestor) {
  67330. if (nodes.indexOf(ancestor) > -1) {
  67331. replace = false;
  67332. nodes.splice(idx, 1);
  67333. break;
  67334. }
  67335. ancestor = ancestor.parent;
  67336. }
  67337. // If the node has been found to be unique, re-insert it.
  67338. if (replace) {
  67339. nodes[idx] = node;
  67340. }
  67341. }
  67342. return nodes;
  67343. };
  67344. // Source: http://dom.spec.whatwg.org/#dom-node-comparedocumentposition
  67345. var POSITION = {
  67346. DISCONNECTED: 1,
  67347. PRECEDING: 2,
  67348. FOLLOWING: 4,
  67349. CONTAINS: 8,
  67350. CONTAINED_BY: 16
  67351. };
  67352. // Compare the position of one node against another node in any other document.
  67353. // The return value is a bitmask with the following values:
  67354. //
  67355. // document order:
  67356. // > There is an ordering, document order, defined on all the nodes in the
  67357. // > document corresponding to the order in which the first character of the
  67358. // > XML representation of each node occurs in the XML representation of the
  67359. // > document after expansion of general entities. Thus, the document element
  67360. // > node will be the first node. Element nodes occur before their children.
  67361. // > Thus, document order orders element nodes in order of the occurrence of
  67362. // > their start-tag in the XML (after expansion of entities). The attribute
  67363. // > nodes of an element occur after the element and before its children. The
  67364. // > relative order of attribute nodes is implementation-dependent./
  67365. // Source:
  67366. // http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order
  67367. //
  67368. // @argument {Node} nodaA The first node to use in the comparison
  67369. // @argument {Node} nodeB The second node to use in the comparison
  67370. //
  67371. // @return {Number} A bitmask describing the input nodes' relative position.
  67372. // See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for
  67373. // a description of these values.
  67374. var comparePos = exports.compareDocumentPosition = function(nodeA, nodeB) {
  67375. var aParents = [];
  67376. var bParents = [];
  67377. var current, sharedParent, siblings, aSibling, bSibling, idx;
  67378. if (nodeA === nodeB) {
  67379. return 0;
  67380. }
  67381. current = nodeA;
  67382. while (current) {
  67383. aParents.unshift(current);
  67384. current = current.parent;
  67385. }
  67386. current = nodeB;
  67387. while (current) {
  67388. bParents.unshift(current);
  67389. current = current.parent;
  67390. }
  67391. idx = 0;
  67392. while (aParents[idx] === bParents[idx]) {
  67393. idx++;
  67394. }
  67395. if (idx === 0) {
  67396. return POSITION.DISCONNECTED;
  67397. }
  67398. sharedParent = aParents[idx - 1];
  67399. siblings = sharedParent.children;
  67400. aSibling = aParents[idx];
  67401. bSibling = bParents[idx];
  67402. if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) {
  67403. if (sharedParent === nodeB) {
  67404. return POSITION.FOLLOWING | POSITION.CONTAINED_BY;
  67405. }
  67406. return POSITION.FOLLOWING;
  67407. } else {
  67408. if (sharedParent === nodeA) {
  67409. return POSITION.PRECEDING | POSITION.CONTAINS;
  67410. }
  67411. return POSITION.PRECEDING;
  67412. }
  67413. };
  67414. // Sort an array of nodes based on their relative position in the document and
  67415. // remove any duplicate nodes. If the array contains nodes that do not belong
  67416. // to the same document, sort order is unspecified.
  67417. //
  67418. // @argument {Array} nodes Array of DOM nodes
  67419. //
  67420. // @returns {Array} collection of unique nodes, sorted in document order
  67421. exports.uniqueSort = function(nodes) {
  67422. var idx = nodes.length, node, position;
  67423. nodes = nodes.slice();
  67424. while (--idx > -1) {
  67425. node = nodes[idx];
  67426. position = nodes.indexOf(node);
  67427. if (position > -1 && position < idx) {
  67428. nodes.splice(idx, 1);
  67429. }
  67430. }
  67431. nodes.sort(function(a, b) {
  67432. var relative = comparePos(a, b);
  67433. if (relative & POSITION.PRECEDING) {
  67434. return -1;
  67435. } else if (relative & POSITION.FOLLOWING) {
  67436. return 1;
  67437. }
  67438. return 0;
  67439. });
  67440. return nodes;
  67441. };
  67442. /***/ }),
  67443. /* 661 */
  67444. /***/ (function(module, exports, __webpack_require__) {
  67445. module.exports = CollectingHandler;
  67446. function CollectingHandler(cbs){
  67447. this._cbs = cbs || {};
  67448. this.events = [];
  67449. }
  67450. var EVENTS = __webpack_require__(63).EVENTS;
  67451. Object.keys(EVENTS).forEach(function(name){
  67452. if(EVENTS[name] === 0){
  67453. name = "on" + name;
  67454. CollectingHandler.prototype[name] = function(){
  67455. this.events.push([name]);
  67456. if(this._cbs[name]) this._cbs[name]();
  67457. };
  67458. } else if(EVENTS[name] === 1){
  67459. name = "on" + name;
  67460. CollectingHandler.prototype[name] = function(a){
  67461. this.events.push([name, a]);
  67462. if(this._cbs[name]) this._cbs[name](a);
  67463. };
  67464. } else if(EVENTS[name] === 2){
  67465. name = "on" + name;
  67466. CollectingHandler.prototype[name] = function(a, b){
  67467. this.events.push([name, a, b]);
  67468. if(this._cbs[name]) this._cbs[name](a, b);
  67469. };
  67470. } else {
  67471. throw Error("wrong number of arguments");
  67472. }
  67473. });
  67474. CollectingHandler.prototype.onreset = function(){
  67475. this.events = [];
  67476. if(this._cbs.onreset) this._cbs.onreset();
  67477. };
  67478. CollectingHandler.prototype.restart = function(){
  67479. if(this._cbs.onreset) this._cbs.onreset();
  67480. for(var i = 0, len = this.events.length; i < len; i++){
  67481. if(this._cbs[this.events[i][0]]){
  67482. var num = this.events[i].length;
  67483. if(num === 1){
  67484. this._cbs[this.events[i][0]]();
  67485. } else if(num === 2){
  67486. this._cbs[this.events[i][0]](this.events[i][1]);
  67487. } else {
  67488. this._cbs[this.events[i][0]](this.events[i][1], this.events[i][2]);
  67489. }
  67490. }
  67491. }
  67492. };
  67493. /***/ }),
  67494. /* 662 */
  67495. /***/ (function(module, exports, __webpack_require__) {
  67496. "use strict";
  67497. var Parser = __webpack_require__(388),
  67498. Serializer = __webpack_require__(392);
  67499. // Shorthands
  67500. exports.parse = function parse(html, options) {
  67501. var parser = new Parser(options);
  67502. return parser.parse(html);
  67503. };
  67504. exports.parseFragment = function parseFragment(fragmentContext, html, options) {
  67505. if (typeof fragmentContext === 'string') {
  67506. options = html;
  67507. html = fragmentContext;
  67508. fragmentContext = null;
  67509. }
  67510. var parser = new Parser(options);
  67511. return parser.parseFragment(html, fragmentContext);
  67512. };
  67513. exports.serialize = function (node, options) {
  67514. var serializer = new Serializer(node, options);
  67515. return serializer.serialize();
  67516. };
  67517. // Tree adapters
  67518. exports.treeAdapters = {
  67519. default: __webpack_require__(160),
  67520. htmlparser2: __webpack_require__(669)
  67521. };
  67522. // Streaming
  67523. exports.ParserStream = __webpack_require__(393);
  67524. exports.PlainTextConversionStream = __webpack_require__(670);
  67525. exports.SerializerStream = __webpack_require__(671);
  67526. exports.SAXParser = __webpack_require__(672);
  67527. /***/ }),
  67528. /* 663 */
  67529. /***/ (function(module, exports, __webpack_require__) {
  67530. "use strict";
  67531. var UNICODE = __webpack_require__(89);
  67532. //Aliases
  67533. var $ = UNICODE.CODE_POINTS;
  67534. //Utils
  67535. //OPTIMIZATION: these utility functions should not be moved out of this module. V8 Crankshaft will not inline
  67536. //this functions if they will be situated in another module due to context switch.
  67537. //Always perform inlining check before modifying this functions ('node --trace-inlining').
  67538. function isSurrogatePair(cp1, cp2) {
  67539. return cp1 >= 0xD800 && cp1 <= 0xDBFF && cp2 >= 0xDC00 && cp2 <= 0xDFFF;
  67540. }
  67541. function getSurrogatePairCodePoint(cp1, cp2) {
  67542. return (cp1 - 0xD800) * 0x400 + 0x2400 + cp2;
  67543. }
  67544. //Const
  67545. var DEFAULT_BUFFER_WATERLINE = 1 << 16;
  67546. //Preprocessor
  67547. //NOTE: HTML input preprocessing
  67548. //(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#preprocessing-the-input-stream)
  67549. var Preprocessor = module.exports = function () {
  67550. this.html = null;
  67551. this.pos = -1;
  67552. this.lastGapPos = -1;
  67553. this.lastCharPos = -1;
  67554. this.gapStack = [];
  67555. this.skipNextNewLine = false;
  67556. this.lastChunkWritten = false;
  67557. this.endOfChunkHit = false;
  67558. this.bufferWaterline = DEFAULT_BUFFER_WATERLINE;
  67559. };
  67560. Preprocessor.prototype.dropParsedChunk = function () {
  67561. if (this.pos > this.bufferWaterline) {
  67562. this.lastCharPos -= this.pos;
  67563. this.html = this.html.substring(this.pos);
  67564. this.pos = 0;
  67565. this.lastGapPos = -1;
  67566. this.gapStack = [];
  67567. }
  67568. };
  67569. Preprocessor.prototype._addGap = function () {
  67570. this.gapStack.push(this.lastGapPos);
  67571. this.lastGapPos = this.pos;
  67572. };
  67573. Preprocessor.prototype._processHighRangeCodePoint = function (cp) {
  67574. //NOTE: try to peek a surrogate pair
  67575. if (this.pos !== this.lastCharPos) {
  67576. var nextCp = this.html.charCodeAt(this.pos + 1);
  67577. if (isSurrogatePair(cp, nextCp)) {
  67578. //NOTE: we have a surrogate pair. Peek pair character and recalculate code point.
  67579. this.pos++;
  67580. cp = getSurrogatePairCodePoint(cp, nextCp);
  67581. //NOTE: add gap that should be avoided during retreat
  67582. this._addGap();
  67583. }
  67584. }
  67585. // NOTE: we've hit the end of chunk, stop processing at this point
  67586. else if (!this.lastChunkWritten) {
  67587. this.endOfChunkHit = true;
  67588. return $.EOF;
  67589. }
  67590. return cp;
  67591. };
  67592. Preprocessor.prototype.write = function (chunk, isLastChunk) {
  67593. if (this.html)
  67594. this.html += chunk;
  67595. else
  67596. this.html = chunk;
  67597. this.lastCharPos = this.html.length - 1;
  67598. this.endOfChunkHit = false;
  67599. this.lastChunkWritten = isLastChunk;
  67600. };
  67601. Preprocessor.prototype.insertHtmlAtCurrentPos = function (chunk) {
  67602. this.html = this.html.substring(0, this.pos + 1) +
  67603. chunk +
  67604. this.html.substring(this.pos + 1, this.html.length);
  67605. this.lastCharPos = this.html.length - 1;
  67606. this.endOfChunkHit = false;
  67607. };
  67608. Preprocessor.prototype.advance = function () {
  67609. this.pos++;
  67610. if (this.pos > this.lastCharPos) {
  67611. if (!this.lastChunkWritten)
  67612. this.endOfChunkHit = true;
  67613. return $.EOF;
  67614. }
  67615. var cp = this.html.charCodeAt(this.pos);
  67616. //NOTE: any U+000A LINE FEED (LF) characters that immediately follow a U+000D CARRIAGE RETURN (CR) character
  67617. //must be ignored.
  67618. if (this.skipNextNewLine && cp === $.LINE_FEED) {
  67619. this.skipNextNewLine = false;
  67620. this._addGap();
  67621. return this.advance();
  67622. }
  67623. //NOTE: all U+000D CARRIAGE RETURN (CR) characters must be converted to U+000A LINE FEED (LF) characters
  67624. if (cp === $.CARRIAGE_RETURN) {
  67625. this.skipNextNewLine = true;
  67626. return $.LINE_FEED;
  67627. }
  67628. this.skipNextNewLine = false;
  67629. //OPTIMIZATION: first perform check if the code point in the allowed range that covers most common
  67630. //HTML input (e.g. ASCII codes) to avoid performance-cost operations for high-range code points.
  67631. return cp >= 0xD800 ? this._processHighRangeCodePoint(cp) : cp;
  67632. };
  67633. Preprocessor.prototype.retreat = function () {
  67634. if (this.pos === this.lastGapPos) {
  67635. this.lastGapPos = this.gapStack.pop();
  67636. this.pos--;
  67637. }
  67638. this.pos--;
  67639. };
  67640. /***/ }),
  67641. /* 664 */
  67642. /***/ (function(module, exports, __webpack_require__) {
  67643. "use strict";
  67644. //NOTE: this file contains auto-generated array mapped radix tree that is used for the named entity references consumption
  67645. //(details: https://github.com/inikulin/parse5/tree/master/scripts/generate_named_entity_data/README.md)
  67646. module.exports = new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4000,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,10000,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13000,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204]);
  67647. /***/ }),
  67648. /* 665 */
  67649. /***/ (function(module, exports, __webpack_require__) {
  67650. "use strict";
  67651. var HTML = __webpack_require__(29);
  67652. //Aliases
  67653. var $ = HTML.TAG_NAMES,
  67654. NS = HTML.NAMESPACES;
  67655. //Element utils
  67656. //OPTIMIZATION: Integer comparisons are low-cost, so we can use very fast tag name length filters here.
  67657. //It's faster than using dictionary.
  67658. function isImpliedEndTagRequired(tn) {
  67659. switch (tn.length) {
  67660. case 1:
  67661. return tn === $.P;
  67662. case 2:
  67663. return tn === $.RB || tn === $.RP || tn === $.RT || tn === $.DD || tn === $.DT || tn === $.LI;
  67664. case 3:
  67665. return tn === $.RTC;
  67666. case 6:
  67667. return tn === $.OPTION;
  67668. case 8:
  67669. return tn === $.OPTGROUP || tn === $.MENUITEM;
  67670. }
  67671. return false;
  67672. }
  67673. function isScopingElement(tn, ns) {
  67674. switch (tn.length) {
  67675. case 2:
  67676. if (tn === $.TD || tn === $.TH)
  67677. return ns === NS.HTML;
  67678. else if (tn === $.MI || tn === $.MO || tn === $.MN || tn === $.MS)
  67679. return ns === NS.MATHML;
  67680. break;
  67681. case 4:
  67682. if (tn === $.HTML)
  67683. return ns === NS.HTML;
  67684. else if (tn === $.DESC)
  67685. return ns === NS.SVG;
  67686. break;
  67687. case 5:
  67688. if (tn === $.TABLE)
  67689. return ns === NS.HTML;
  67690. else if (tn === $.MTEXT)
  67691. return ns === NS.MATHML;
  67692. else if (tn === $.TITLE)
  67693. return ns === NS.SVG;
  67694. break;
  67695. case 6:
  67696. return (tn === $.APPLET || tn === $.OBJECT) && ns === NS.HTML;
  67697. case 7:
  67698. return (tn === $.CAPTION || tn === $.MARQUEE) && ns === NS.HTML;
  67699. case 8:
  67700. return tn === $.TEMPLATE && ns === NS.HTML;
  67701. case 13:
  67702. return tn === $.FOREIGN_OBJECT && ns === NS.SVG;
  67703. case 14:
  67704. return tn === $.ANNOTATION_XML && ns === NS.MATHML;
  67705. }
  67706. return false;
  67707. }
  67708. //Stack of open elements
  67709. var OpenElementStack = module.exports = function (document, treeAdapter) {
  67710. this.stackTop = -1;
  67711. this.items = [];
  67712. this.current = document;
  67713. this.currentTagName = null;
  67714. this.currentTmplContent = null;
  67715. this.tmplCount = 0;
  67716. this.treeAdapter = treeAdapter;
  67717. };
  67718. //Index of element
  67719. OpenElementStack.prototype._indexOf = function (element) {
  67720. var idx = -1;
  67721. for (var i = this.stackTop; i >= 0; i--) {
  67722. if (this.items[i] === element) {
  67723. idx = i;
  67724. break;
  67725. }
  67726. }
  67727. return idx;
  67728. };
  67729. //Update current element
  67730. OpenElementStack.prototype._isInTemplate = function () {
  67731. return this.currentTagName === $.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML;
  67732. };
  67733. OpenElementStack.prototype._updateCurrentElement = function () {
  67734. this.current = this.items[this.stackTop];
  67735. this.currentTagName = this.current && this.treeAdapter.getTagName(this.current);
  67736. this.currentTmplContent = this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : null;
  67737. };
  67738. //Mutations
  67739. OpenElementStack.prototype.push = function (element) {
  67740. this.items[++this.stackTop] = element;
  67741. this._updateCurrentElement();
  67742. if (this._isInTemplate())
  67743. this.tmplCount++;
  67744. };
  67745. OpenElementStack.prototype.pop = function () {
  67746. this.stackTop--;
  67747. if (this.tmplCount > 0 && this._isInTemplate())
  67748. this.tmplCount--;
  67749. this._updateCurrentElement();
  67750. };
  67751. OpenElementStack.prototype.replace = function (oldElement, newElement) {
  67752. var idx = this._indexOf(oldElement);
  67753. this.items[idx] = newElement;
  67754. if (idx === this.stackTop)
  67755. this._updateCurrentElement();
  67756. };
  67757. OpenElementStack.prototype.insertAfter = function (referenceElement, newElement) {
  67758. var insertionIdx = this._indexOf(referenceElement) + 1;
  67759. this.items.splice(insertionIdx, 0, newElement);
  67760. if (insertionIdx === ++this.stackTop)
  67761. this._updateCurrentElement();
  67762. };
  67763. OpenElementStack.prototype.popUntilTagNamePopped = function (tagName) {
  67764. while (this.stackTop > -1) {
  67765. var tn = this.currentTagName,
  67766. ns = this.treeAdapter.getNamespaceURI(this.current);
  67767. this.pop();
  67768. if (tn === tagName && ns === NS.HTML)
  67769. break;
  67770. }
  67771. };
  67772. OpenElementStack.prototype.popUntilElementPopped = function (element) {
  67773. while (this.stackTop > -1) {
  67774. var poppedElement = this.current;
  67775. this.pop();
  67776. if (poppedElement === element)
  67777. break;
  67778. }
  67779. };
  67780. OpenElementStack.prototype.popUntilNumberedHeaderPopped = function () {
  67781. while (this.stackTop > -1) {
  67782. var tn = this.currentTagName,
  67783. ns = this.treeAdapter.getNamespaceURI(this.current);
  67784. this.pop();
  67785. if (tn === $.H1 || tn === $.H2 || tn === $.H3 || tn === $.H4 || tn === $.H5 || tn === $.H6 && ns === NS.HTML)
  67786. break;
  67787. }
  67788. };
  67789. OpenElementStack.prototype.popUntilTableCellPopped = function () {
  67790. while (this.stackTop > -1) {
  67791. var tn = this.currentTagName,
  67792. ns = this.treeAdapter.getNamespaceURI(this.current);
  67793. this.pop();
  67794. if (tn === $.TD || tn === $.TH && ns === NS.HTML)
  67795. break;
  67796. }
  67797. };
  67798. OpenElementStack.prototype.popAllUpToHtmlElement = function () {
  67799. //NOTE: here we assume that root <html> element is always first in the open element stack, so
  67800. //we perform this fast stack clean up.
  67801. this.stackTop = 0;
  67802. this._updateCurrentElement();
  67803. };
  67804. OpenElementStack.prototype.clearBackToTableContext = function () {
  67805. while (this.currentTagName !== $.TABLE &&
  67806. this.currentTagName !== $.TEMPLATE &&
  67807. this.currentTagName !== $.HTML ||
  67808. this.treeAdapter.getNamespaceURI(this.current) !== NS.HTML)
  67809. this.pop();
  67810. };
  67811. OpenElementStack.prototype.clearBackToTableBodyContext = function () {
  67812. while (this.currentTagName !== $.TBODY &&
  67813. this.currentTagName !== $.TFOOT &&
  67814. this.currentTagName !== $.THEAD &&
  67815. this.currentTagName !== $.TEMPLATE &&
  67816. this.currentTagName !== $.HTML ||
  67817. this.treeAdapter.getNamespaceURI(this.current) !== NS.HTML)
  67818. this.pop();
  67819. };
  67820. OpenElementStack.prototype.clearBackToTableRowContext = function () {
  67821. while (this.currentTagName !== $.TR &&
  67822. this.currentTagName !== $.TEMPLATE &&
  67823. this.currentTagName !== $.HTML ||
  67824. this.treeAdapter.getNamespaceURI(this.current) !== NS.HTML)
  67825. this.pop();
  67826. };
  67827. OpenElementStack.prototype.remove = function (element) {
  67828. for (var i = this.stackTop; i >= 0; i--) {
  67829. if (this.items[i] === element) {
  67830. this.items.splice(i, 1);
  67831. this.stackTop--;
  67832. this._updateCurrentElement();
  67833. break;
  67834. }
  67835. }
  67836. };
  67837. //Search
  67838. OpenElementStack.prototype.tryPeekProperlyNestedBodyElement = function () {
  67839. //Properly nested <body> element (should be second element in stack).
  67840. var element = this.items[1];
  67841. return element && this.treeAdapter.getTagName(element) === $.BODY ? element : null;
  67842. };
  67843. OpenElementStack.prototype.contains = function (element) {
  67844. return this._indexOf(element) > -1;
  67845. };
  67846. OpenElementStack.prototype.getCommonAncestor = function (element) {
  67847. var elementIdx = this._indexOf(element);
  67848. return --elementIdx >= 0 ? this.items[elementIdx] : null;
  67849. };
  67850. OpenElementStack.prototype.isRootHtmlElementCurrent = function () {
  67851. return this.stackTop === 0 && this.currentTagName === $.HTML;
  67852. };
  67853. //Element in scope
  67854. OpenElementStack.prototype.hasInScope = function (tagName) {
  67855. for (var i = this.stackTop; i >= 0; i--) {
  67856. var tn = this.treeAdapter.getTagName(this.items[i]),
  67857. ns = this.treeAdapter.getNamespaceURI(this.items[i]);
  67858. if (tn === tagName && ns === NS.HTML)
  67859. return true;
  67860. if (isScopingElement(tn, ns))
  67861. return false;
  67862. }
  67863. return true;
  67864. };
  67865. OpenElementStack.prototype.hasNumberedHeaderInScope = function () {
  67866. for (var i = this.stackTop; i >= 0; i--) {
  67867. var tn = this.treeAdapter.getTagName(this.items[i]),
  67868. ns = this.treeAdapter.getNamespaceURI(this.items[i]);
  67869. if ((tn === $.H1 || tn === $.H2 || tn === $.H3 || tn === $.H4 || tn === $.H5 || tn === $.H6) && ns === NS.HTML)
  67870. return true;
  67871. if (isScopingElement(tn, ns))
  67872. return false;
  67873. }
  67874. return true;
  67875. };
  67876. OpenElementStack.prototype.hasInListItemScope = function (tagName) {
  67877. for (var i = this.stackTop; i >= 0; i--) {
  67878. var tn = this.treeAdapter.getTagName(this.items[i]),
  67879. ns = this.treeAdapter.getNamespaceURI(this.items[i]);
  67880. if (tn === tagName && ns === NS.HTML)
  67881. return true;
  67882. if ((tn === $.UL || tn === $.OL) && ns === NS.HTML || isScopingElement(tn, ns))
  67883. return false;
  67884. }
  67885. return true;
  67886. };
  67887. OpenElementStack.prototype.hasInButtonScope = function (tagName) {
  67888. for (var i = this.stackTop; i >= 0; i--) {
  67889. var tn = this.treeAdapter.getTagName(this.items[i]),
  67890. ns = this.treeAdapter.getNamespaceURI(this.items[i]);
  67891. if (tn === tagName && ns === NS.HTML)
  67892. return true;
  67893. if (tn === $.BUTTON && ns === NS.HTML || isScopingElement(tn, ns))
  67894. return false;
  67895. }
  67896. return true;
  67897. };
  67898. OpenElementStack.prototype.hasInTableScope = function (tagName) {
  67899. for (var i = this.stackTop; i >= 0; i--) {
  67900. var tn = this.treeAdapter.getTagName(this.items[i]),
  67901. ns = this.treeAdapter.getNamespaceURI(this.items[i]);
  67902. if (ns !== NS.HTML)
  67903. continue;
  67904. if (tn === tagName)
  67905. return true;
  67906. if (tn === $.TABLE || tn === $.TEMPLATE || tn === $.HTML)
  67907. return false;
  67908. }
  67909. return true;
  67910. };
  67911. OpenElementStack.prototype.hasTableBodyContextInTableScope = function () {
  67912. for (var i = this.stackTop; i >= 0; i--) {
  67913. var tn = this.treeAdapter.getTagName(this.items[i]),
  67914. ns = this.treeAdapter.getNamespaceURI(this.items[i]);
  67915. if (ns !== NS.HTML)
  67916. continue;
  67917. if (tn === $.TBODY || tn === $.THEAD || tn === $.TFOOT)
  67918. return true;
  67919. if (tn === $.TABLE || tn === $.HTML)
  67920. return false;
  67921. }
  67922. return true;
  67923. };
  67924. OpenElementStack.prototype.hasInSelectScope = function (tagName) {
  67925. for (var i = this.stackTop; i >= 0; i--) {
  67926. var tn = this.treeAdapter.getTagName(this.items[i]),
  67927. ns = this.treeAdapter.getNamespaceURI(this.items[i]);
  67928. if (ns !== NS.HTML)
  67929. continue;
  67930. if (tn === tagName)
  67931. return true;
  67932. if (tn !== $.OPTION && tn !== $.OPTGROUP)
  67933. return false;
  67934. }
  67935. return true;
  67936. };
  67937. //Implied end tags
  67938. OpenElementStack.prototype.generateImpliedEndTags = function () {
  67939. while (isImpliedEndTagRequired(this.currentTagName))
  67940. this.pop();
  67941. };
  67942. OpenElementStack.prototype.generateImpliedEndTagsWithExclusion = function (exclusionTagName) {
  67943. while (isImpliedEndTagRequired(this.currentTagName) && this.currentTagName !== exclusionTagName)
  67944. this.pop();
  67945. };
  67946. /***/ }),
  67947. /* 666 */
  67948. /***/ (function(module, exports, __webpack_require__) {
  67949. "use strict";
  67950. //Const
  67951. var NOAH_ARK_CAPACITY = 3;
  67952. //List of formatting elements
  67953. var FormattingElementList = module.exports = function (treeAdapter) {
  67954. this.length = 0;
  67955. this.entries = [];
  67956. this.treeAdapter = treeAdapter;
  67957. this.bookmark = null;
  67958. };
  67959. //Entry types
  67960. FormattingElementList.MARKER_ENTRY = 'MARKER_ENTRY';
  67961. FormattingElementList.ELEMENT_ENTRY = 'ELEMENT_ENTRY';
  67962. //Noah Ark's condition
  67963. //OPTIMIZATION: at first we try to find possible candidates for exclusion using
  67964. //lightweight heuristics without thorough attributes check.
  67965. FormattingElementList.prototype._getNoahArkConditionCandidates = function (newElement) {
  67966. var candidates = [];
  67967. if (this.length >= NOAH_ARK_CAPACITY) {
  67968. var neAttrsLength = this.treeAdapter.getAttrList(newElement).length,
  67969. neTagName = this.treeAdapter.getTagName(newElement),
  67970. neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement);
  67971. for (var i = this.length - 1; i >= 0; i--) {
  67972. var entry = this.entries[i];
  67973. if (entry.type === FormattingElementList.MARKER_ENTRY)
  67974. break;
  67975. var element = entry.element,
  67976. elementAttrs = this.treeAdapter.getAttrList(element),
  67977. isCandidate = this.treeAdapter.getTagName(element) === neTagName &&
  67978. this.treeAdapter.getNamespaceURI(element) === neNamespaceURI &&
  67979. elementAttrs.length === neAttrsLength;
  67980. if (isCandidate)
  67981. candidates.push({idx: i, attrs: elementAttrs});
  67982. }
  67983. }
  67984. return candidates.length < NOAH_ARK_CAPACITY ? [] : candidates;
  67985. };
  67986. FormattingElementList.prototype._ensureNoahArkCondition = function (newElement) {
  67987. var candidates = this._getNoahArkConditionCandidates(newElement),
  67988. cLength = candidates.length;
  67989. if (cLength) {
  67990. var neAttrs = this.treeAdapter.getAttrList(newElement),
  67991. neAttrsLength = neAttrs.length,
  67992. neAttrsMap = Object.create(null);
  67993. //NOTE: build attrs map for the new element so we can perform fast lookups
  67994. for (var i = 0; i < neAttrsLength; i++) {
  67995. var neAttr = neAttrs[i];
  67996. neAttrsMap[neAttr.name] = neAttr.value;
  67997. }
  67998. for (i = 0; i < neAttrsLength; i++) {
  67999. for (var j = 0; j < cLength; j++) {
  68000. var cAttr = candidates[j].attrs[i];
  68001. if (neAttrsMap[cAttr.name] !== cAttr.value) {
  68002. candidates.splice(j, 1);
  68003. cLength--;
  68004. }
  68005. if (candidates.length < NOAH_ARK_CAPACITY)
  68006. return;
  68007. }
  68008. }
  68009. //NOTE: remove bottommost candidates until Noah's Ark condition will not be met
  68010. for (i = cLength - 1; i >= NOAH_ARK_CAPACITY - 1; i--) {
  68011. this.entries.splice(candidates[i].idx, 1);
  68012. this.length--;
  68013. }
  68014. }
  68015. };
  68016. //Mutations
  68017. FormattingElementList.prototype.insertMarker = function () {
  68018. this.entries.push({type: FormattingElementList.MARKER_ENTRY});
  68019. this.length++;
  68020. };
  68021. FormattingElementList.prototype.pushElement = function (element, token) {
  68022. this._ensureNoahArkCondition(element);
  68023. this.entries.push({
  68024. type: FormattingElementList.ELEMENT_ENTRY,
  68025. element: element,
  68026. token: token
  68027. });
  68028. this.length++;
  68029. };
  68030. FormattingElementList.prototype.insertElementAfterBookmark = function (element, token) {
  68031. var bookmarkIdx = this.length - 1;
  68032. for (; bookmarkIdx >= 0; bookmarkIdx--) {
  68033. if (this.entries[bookmarkIdx] === this.bookmark)
  68034. break;
  68035. }
  68036. this.entries.splice(bookmarkIdx + 1, 0, {
  68037. type: FormattingElementList.ELEMENT_ENTRY,
  68038. element: element,
  68039. token: token
  68040. });
  68041. this.length++;
  68042. };
  68043. FormattingElementList.prototype.removeEntry = function (entry) {
  68044. for (var i = this.length - 1; i >= 0; i--) {
  68045. if (this.entries[i] === entry) {
  68046. this.entries.splice(i, 1);
  68047. this.length--;
  68048. break;
  68049. }
  68050. }
  68051. };
  68052. FormattingElementList.prototype.clearToLastMarker = function () {
  68053. while (this.length) {
  68054. var entry = this.entries.pop();
  68055. this.length--;
  68056. if (entry.type === FormattingElementList.MARKER_ENTRY)
  68057. break;
  68058. }
  68059. };
  68060. //Search
  68061. FormattingElementList.prototype.getElementEntryInScopeWithTagName = function (tagName) {
  68062. for (var i = this.length - 1; i >= 0; i--) {
  68063. var entry = this.entries[i];
  68064. if (entry.type === FormattingElementList.MARKER_ENTRY)
  68065. return null;
  68066. if (this.treeAdapter.getTagName(entry.element) === tagName)
  68067. return entry;
  68068. }
  68069. return null;
  68070. };
  68071. FormattingElementList.prototype.getElementEntry = function (element) {
  68072. for (var i = this.length - 1; i >= 0; i--) {
  68073. var entry = this.entries[i];
  68074. if (entry.type === FormattingElementList.ELEMENT_ENTRY && entry.element === element)
  68075. return entry;
  68076. }
  68077. return null;
  68078. };
  68079. /***/ }),
  68080. /* 667 */
  68081. /***/ (function(module, exports, __webpack_require__) {
  68082. "use strict";
  68083. var Mixin = __webpack_require__(116),
  68084. Tokenizer = __webpack_require__(66),
  68085. LocationInfoTokenizerMixin = __webpack_require__(389),
  68086. PositionTrackingPreprocessorMixin = __webpack_require__(390),
  68087. LocationInfoOpenElementStackMixin = __webpack_require__(668),
  68088. HTML = __webpack_require__(29),
  68089. inherits = __webpack_require__(2).inherits;
  68090. //Aliases
  68091. var $ = HTML.TAG_NAMES;
  68092. var LocationInfoParserMixin = module.exports = function (parser) {
  68093. Mixin.call(this, parser);
  68094. this.parser = parser;
  68095. this.posTracker = null;
  68096. this.lastStartTagToken = null;
  68097. this.lastFosterParentingLocation = null;
  68098. this.currentToken = null;
  68099. };
  68100. inherits(LocationInfoParserMixin, Mixin);
  68101. LocationInfoParserMixin.prototype._setStartLocation = function (element) {
  68102. if (this.lastStartTagToken) {
  68103. element.__location = Object.create(this.lastStartTagToken.location);
  68104. element.__location.startTag = this.lastStartTagToken.location;
  68105. }
  68106. else
  68107. element.__location = null;
  68108. };
  68109. LocationInfoParserMixin.prototype._setEndLocation = function (element, closingToken) {
  68110. var loc = element.__location;
  68111. if (loc) {
  68112. if (closingToken.location) {
  68113. var ctLoc = closingToken.location,
  68114. tn = this.parser.treeAdapter.getTagName(element);
  68115. // NOTE: For cases like <p> <p> </p> - First 'p' closes without a closing
  68116. // tag and for cases like <td> <p> </td> - 'p' closes without a closing tag.
  68117. var isClosingEndTag = closingToken.type === Tokenizer.END_TAG_TOKEN && tn === closingToken.tagName;
  68118. if (isClosingEndTag) {
  68119. loc.endTag = Object.create(ctLoc);
  68120. loc.endOffset = ctLoc.endOffset;
  68121. }
  68122. else
  68123. loc.endOffset = ctLoc.startOffset;
  68124. }
  68125. else if (closingToken.type === Tokenizer.EOF_TOKEN)
  68126. loc.endOffset = this.posTracker.offset;
  68127. }
  68128. };
  68129. LocationInfoParserMixin.prototype._getOverriddenMethods = function (mxn, orig) {
  68130. return {
  68131. _bootstrap: function (document, fragmentContext) {
  68132. orig._bootstrap.call(this, document, fragmentContext);
  68133. mxn.lastStartTagToken = null;
  68134. mxn.lastFosterParentingLocation = null;
  68135. mxn.currentToken = null;
  68136. mxn.posTracker = new PositionTrackingPreprocessorMixin(this.tokenizer.preprocessor);
  68137. new LocationInfoTokenizerMixin(this.tokenizer);
  68138. new LocationInfoOpenElementStackMixin(this.openElements, {
  68139. onItemPop: function (element) {
  68140. mxn._setEndLocation(element, mxn.currentToken);
  68141. }
  68142. });
  68143. },
  68144. _runParsingLoop: function (scriptHandler) {
  68145. orig._runParsingLoop.call(this, scriptHandler);
  68146. // NOTE: generate location info for elements
  68147. // that remains on open element stack
  68148. for (var i = this.openElements.stackTop; i >= 0; i--)
  68149. mxn._setEndLocation(this.openElements.items[i], mxn.currentToken);
  68150. },
  68151. //Token processing
  68152. _processTokenInForeignContent: function (token) {
  68153. mxn.currentToken = token;
  68154. orig._processTokenInForeignContent.call(this, token);
  68155. },
  68156. _processToken: function (token) {
  68157. mxn.currentToken = token;
  68158. orig._processToken.call(this, token);
  68159. //NOTE: <body> and <html> are never popped from the stack, so we need to updated
  68160. //their end location explicitly.
  68161. var requireExplicitUpdate = token.type === Tokenizer.END_TAG_TOKEN &&
  68162. (token.tagName === $.HTML ||
  68163. token.tagName === $.BODY && this.openElements.hasInScope($.BODY));
  68164. if (requireExplicitUpdate) {
  68165. for (var i = this.openElements.stackTop; i >= 0; i--) {
  68166. var element = this.openElements.items[i];
  68167. if (this.treeAdapter.getTagName(element) === token.tagName) {
  68168. mxn._setEndLocation(element, token);
  68169. break;
  68170. }
  68171. }
  68172. }
  68173. },
  68174. //Doctype
  68175. _setDocumentType: function (token) {
  68176. orig._setDocumentType.call(this, token);
  68177. var documentChildren = this.treeAdapter.getChildNodes(this.document),
  68178. cnLength = documentChildren.length;
  68179. for (var i = 0; i < cnLength; i++) {
  68180. var node = documentChildren[i];
  68181. if (this.treeAdapter.isDocumentTypeNode(node)) {
  68182. node.__location = token.location;
  68183. break;
  68184. }
  68185. }
  68186. },
  68187. //Elements
  68188. _attachElementToTree: function (element) {
  68189. //NOTE: _attachElementToTree is called from _appendElement, _insertElement and _insertTemplate methods.
  68190. //So we will use token location stored in this methods for the element.
  68191. mxn._setStartLocation(element);
  68192. mxn.lastStartTagToken = null;
  68193. orig._attachElementToTree.call(this, element);
  68194. },
  68195. _appendElement: function (token, namespaceURI) {
  68196. mxn.lastStartTagToken = token;
  68197. orig._appendElement.call(this, token, namespaceURI);
  68198. },
  68199. _insertElement: function (token, namespaceURI) {
  68200. mxn.lastStartTagToken = token;
  68201. orig._insertElement.call(this, token, namespaceURI);
  68202. },
  68203. _insertTemplate: function (token) {
  68204. mxn.lastStartTagToken = token;
  68205. orig._insertTemplate.call(this, token);
  68206. var tmplContent = this.treeAdapter.getTemplateContent(this.openElements.current);
  68207. tmplContent.__location = null;
  68208. },
  68209. _insertFakeRootElement: function () {
  68210. orig._insertFakeRootElement.call(this);
  68211. this.openElements.current.__location = null;
  68212. },
  68213. //Comments
  68214. _appendCommentNode: function (token, parent) {
  68215. orig._appendCommentNode.call(this, token, parent);
  68216. var children = this.treeAdapter.getChildNodes(parent),
  68217. commentNode = children[children.length - 1];
  68218. commentNode.__location = token.location;
  68219. },
  68220. //Text
  68221. _findFosterParentingLocation: function () {
  68222. //NOTE: store last foster parenting location, so we will be able to find inserted text
  68223. //in case of foster parenting
  68224. mxn.lastFosterParentingLocation = orig._findFosterParentingLocation.call(this);
  68225. return mxn.lastFosterParentingLocation;
  68226. },
  68227. _insertCharacters: function (token) {
  68228. orig._insertCharacters.call(this, token);
  68229. var hasFosterParent = this._shouldFosterParentOnInsertion(),
  68230. parent = hasFosterParent && mxn.lastFosterParentingLocation.parent ||
  68231. this.openElements.currentTmplContent ||
  68232. this.openElements.current,
  68233. siblings = this.treeAdapter.getChildNodes(parent),
  68234. textNodeIdx = hasFosterParent && mxn.lastFosterParentingLocation.beforeElement ?
  68235. siblings.indexOf(mxn.lastFosterParentingLocation.beforeElement) - 1 :
  68236. siblings.length - 1,
  68237. textNode = siblings[textNodeIdx];
  68238. //NOTE: if we have location assigned by another token, then just update end position
  68239. if (textNode.__location)
  68240. textNode.__location.endOffset = token.location.endOffset;
  68241. else
  68242. textNode.__location = token.location;
  68243. }
  68244. };
  68245. };
  68246. /***/ }),
  68247. /* 668 */
  68248. /***/ (function(module, exports, __webpack_require__) {
  68249. "use strict";
  68250. var Mixin = __webpack_require__(116),
  68251. inherits = __webpack_require__(2).inherits;
  68252. var LocationInfoOpenElementStackMixin = module.exports = function (stack, options) {
  68253. Mixin.call(this, stack);
  68254. this.onItemPop = options.onItemPop;
  68255. };
  68256. inherits(LocationInfoOpenElementStackMixin, Mixin);
  68257. LocationInfoOpenElementStackMixin.prototype._getOverriddenMethods = function (mxn, orig) {
  68258. return {
  68259. pop: function () {
  68260. mxn.onItemPop(this.current);
  68261. orig.pop.call(this);
  68262. },
  68263. popAllUpToHtmlElement: function () {
  68264. for (var i = this.stackTop; i > 0; i--)
  68265. mxn.onItemPop(this.items[i]);
  68266. orig.popAllUpToHtmlElement.call(this);
  68267. },
  68268. remove: function (element) {
  68269. mxn.onItemPop(this.current);
  68270. orig.remove.call(this, element);
  68271. }
  68272. };
  68273. };
  68274. /***/ }),
  68275. /* 669 */
  68276. /***/ (function(module, exports, __webpack_require__) {
  68277. "use strict";
  68278. var doctype = __webpack_require__(162),
  68279. DOCUMENT_MODE = __webpack_require__(29).DOCUMENT_MODE;
  68280. //Conversion tables for DOM Level1 structure emulation
  68281. var nodeTypes = {
  68282. element: 1,
  68283. text: 3,
  68284. cdata: 4,
  68285. comment: 8
  68286. };
  68287. var nodePropertyShorthands = {
  68288. tagName: 'name',
  68289. childNodes: 'children',
  68290. parentNode: 'parent',
  68291. previousSibling: 'prev',
  68292. nextSibling: 'next',
  68293. nodeValue: 'data'
  68294. };
  68295. //Node
  68296. var Node = function (props) {
  68297. for (var key in props) {
  68298. if (props.hasOwnProperty(key))
  68299. this[key] = props[key];
  68300. }
  68301. };
  68302. Node.prototype = {
  68303. get firstChild() {
  68304. var children = this.children;
  68305. return children && children[0] || null;
  68306. },
  68307. get lastChild() {
  68308. var children = this.children;
  68309. return children && children[children.length - 1] || null;
  68310. },
  68311. get nodeType() {
  68312. return nodeTypes[this.type] || nodeTypes.element;
  68313. }
  68314. };
  68315. Object.keys(nodePropertyShorthands).forEach(function (key) {
  68316. var shorthand = nodePropertyShorthands[key];
  68317. Object.defineProperty(Node.prototype, key, {
  68318. get: function () {
  68319. return this[shorthand] || null;
  68320. },
  68321. set: function (val) {
  68322. this[shorthand] = val;
  68323. return val;
  68324. }
  68325. });
  68326. });
  68327. //Node construction
  68328. exports.createDocument = function () {
  68329. return new Node({
  68330. type: 'root',
  68331. name: 'root',
  68332. parent: null,
  68333. prev: null,
  68334. next: null,
  68335. children: [],
  68336. 'x-mode': DOCUMENT_MODE.NO_QUIRKS
  68337. });
  68338. };
  68339. exports.createDocumentFragment = function () {
  68340. return new Node({
  68341. type: 'root',
  68342. name: 'root',
  68343. parent: null,
  68344. prev: null,
  68345. next: null,
  68346. children: []
  68347. });
  68348. };
  68349. exports.createElement = function (tagName, namespaceURI, attrs) {
  68350. var attribs = Object.create(null),
  68351. attribsNamespace = Object.create(null),
  68352. attribsPrefix = Object.create(null);
  68353. for (var i = 0; i < attrs.length; i++) {
  68354. var attrName = attrs[i].name;
  68355. attribs[attrName] = attrs[i].value;
  68356. attribsNamespace[attrName] = attrs[i].namespace;
  68357. attribsPrefix[attrName] = attrs[i].prefix;
  68358. }
  68359. return new Node({
  68360. type: tagName === 'script' || tagName === 'style' ? tagName : 'tag',
  68361. name: tagName,
  68362. namespace: namespaceURI,
  68363. attribs: attribs,
  68364. 'x-attribsNamespace': attribsNamespace,
  68365. 'x-attribsPrefix': attribsPrefix,
  68366. children: [],
  68367. parent: null,
  68368. prev: null,
  68369. next: null
  68370. });
  68371. };
  68372. exports.createCommentNode = function (data) {
  68373. return new Node({
  68374. type: 'comment',
  68375. data: data,
  68376. parent: null,
  68377. prev: null,
  68378. next: null
  68379. });
  68380. };
  68381. var createTextNode = function (value) {
  68382. return new Node({
  68383. type: 'text',
  68384. data: value,
  68385. parent: null,
  68386. prev: null,
  68387. next: null
  68388. });
  68389. };
  68390. //Tree mutation
  68391. var appendChild = exports.appendChild = function (parentNode, newNode) {
  68392. var prev = parentNode.children[parentNode.children.length - 1];
  68393. if (prev) {
  68394. prev.next = newNode;
  68395. newNode.prev = prev;
  68396. }
  68397. parentNode.children.push(newNode);
  68398. newNode.parent = parentNode;
  68399. };
  68400. var insertBefore = exports.insertBefore = function (parentNode, newNode, referenceNode) {
  68401. var insertionIdx = parentNode.children.indexOf(referenceNode),
  68402. prev = referenceNode.prev;
  68403. if (prev) {
  68404. prev.next = newNode;
  68405. newNode.prev = prev;
  68406. }
  68407. referenceNode.prev = newNode;
  68408. newNode.next = referenceNode;
  68409. parentNode.children.splice(insertionIdx, 0, newNode);
  68410. newNode.parent = parentNode;
  68411. };
  68412. exports.setTemplateContent = function (templateElement, contentElement) {
  68413. appendChild(templateElement, contentElement);
  68414. };
  68415. exports.getTemplateContent = function (templateElement) {
  68416. return templateElement.children[0];
  68417. };
  68418. exports.setDocumentType = function (document, name, publicId, systemId) {
  68419. var data = doctype.serializeContent(name, publicId, systemId),
  68420. doctypeNode = null;
  68421. for (var i = 0; i < document.children.length; i++) {
  68422. if (document.children[i].type === 'directive' && document.children[i].name === '!doctype') {
  68423. doctypeNode = document.children[i];
  68424. break;
  68425. }
  68426. }
  68427. if (doctypeNode) {
  68428. doctypeNode.data = data;
  68429. doctypeNode['x-name'] = name;
  68430. doctypeNode['x-publicId'] = publicId;
  68431. doctypeNode['x-systemId'] = systemId;
  68432. }
  68433. else {
  68434. appendChild(document, new Node({
  68435. type: 'directive',
  68436. name: '!doctype',
  68437. data: data,
  68438. 'x-name': name,
  68439. 'x-publicId': publicId,
  68440. 'x-systemId': systemId
  68441. }));
  68442. }
  68443. };
  68444. exports.setDocumentMode = function (document, mode) {
  68445. document['x-mode'] = mode;
  68446. };
  68447. exports.getDocumentMode = function (document) {
  68448. return document['x-mode'];
  68449. };
  68450. exports.detachNode = function (node) {
  68451. if (node.parent) {
  68452. var idx = node.parent.children.indexOf(node),
  68453. prev = node.prev,
  68454. next = node.next;
  68455. node.prev = null;
  68456. node.next = null;
  68457. if (prev)
  68458. prev.next = next;
  68459. if (next)
  68460. next.prev = prev;
  68461. node.parent.children.splice(idx, 1);
  68462. node.parent = null;
  68463. }
  68464. };
  68465. exports.insertText = function (parentNode, text) {
  68466. var lastChild = parentNode.children[parentNode.children.length - 1];
  68467. if (lastChild && lastChild.type === 'text')
  68468. lastChild.data += text;
  68469. else
  68470. appendChild(parentNode, createTextNode(text));
  68471. };
  68472. exports.insertTextBefore = function (parentNode, text, referenceNode) {
  68473. var prevNode = parentNode.children[parentNode.children.indexOf(referenceNode) - 1];
  68474. if (prevNode && prevNode.type === 'text')
  68475. prevNode.data += text;
  68476. else
  68477. insertBefore(parentNode, createTextNode(text), referenceNode);
  68478. };
  68479. exports.adoptAttributes = function (recipient, attrs) {
  68480. for (var i = 0; i < attrs.length; i++) {
  68481. var attrName = attrs[i].name;
  68482. if (typeof recipient.attribs[attrName] === 'undefined') {
  68483. recipient.attribs[attrName] = attrs[i].value;
  68484. recipient['x-attribsNamespace'][attrName] = attrs[i].namespace;
  68485. recipient['x-attribsPrefix'][attrName] = attrs[i].prefix;
  68486. }
  68487. }
  68488. };
  68489. //Tree traversing
  68490. exports.getFirstChild = function (node) {
  68491. return node.children[0];
  68492. };
  68493. exports.getChildNodes = function (node) {
  68494. return node.children;
  68495. };
  68496. exports.getParentNode = function (node) {
  68497. return node.parent;
  68498. };
  68499. exports.getAttrList = function (element) {
  68500. var attrList = [];
  68501. for (var name in element.attribs) {
  68502. attrList.push({
  68503. name: name,
  68504. value: element.attribs[name],
  68505. namespace: element['x-attribsNamespace'][name],
  68506. prefix: element['x-attribsPrefix'][name]
  68507. });
  68508. }
  68509. return attrList;
  68510. };
  68511. //Node data
  68512. exports.getTagName = function (element) {
  68513. return element.name;
  68514. };
  68515. exports.getNamespaceURI = function (element) {
  68516. return element.namespace;
  68517. };
  68518. exports.getTextNodeContent = function (textNode) {
  68519. return textNode.data;
  68520. };
  68521. exports.getCommentNodeContent = function (commentNode) {
  68522. return commentNode.data;
  68523. };
  68524. exports.getDocumentTypeNodeName = function (doctypeNode) {
  68525. return doctypeNode['x-name'];
  68526. };
  68527. exports.getDocumentTypeNodePublicId = function (doctypeNode) {
  68528. return doctypeNode['x-publicId'];
  68529. };
  68530. exports.getDocumentTypeNodeSystemId = function (doctypeNode) {
  68531. return doctypeNode['x-systemId'];
  68532. };
  68533. //Node types
  68534. exports.isTextNode = function (node) {
  68535. return node.type === 'text';
  68536. };
  68537. exports.isCommentNode = function (node) {
  68538. return node.type === 'comment';
  68539. };
  68540. exports.isDocumentTypeNode = function (node) {
  68541. return node.type === 'directive' && node.name === '!doctype';
  68542. };
  68543. exports.isElementNode = function (node) {
  68544. return !!node.attribs;
  68545. };
  68546. /***/ }),
  68547. /* 670 */
  68548. /***/ (function(module, exports, __webpack_require__) {
  68549. "use strict";
  68550. var ParserStream = __webpack_require__(393),
  68551. inherits = __webpack_require__(2).inherits,
  68552. $ = __webpack_require__(29).TAG_NAMES;
  68553. var PlainTextConversionStream = module.exports = function (options) {
  68554. ParserStream.call(this, options);
  68555. // NOTE: see https://html.spec.whatwg.org/#read-text
  68556. this.parser._insertFakeElement($.HTML);
  68557. this.parser._insertFakeElement($.HEAD);
  68558. this.parser.openElements.pop();
  68559. this.parser._insertFakeElement($.BODY);
  68560. this.parser._insertFakeElement($.PRE);
  68561. this.parser.treeAdapter.insertText(this.parser.openElements.current, '\n');
  68562. this.parser.switchToPlaintextParsing();
  68563. };
  68564. inherits(PlainTextConversionStream, ParserStream);
  68565. /***/ }),
  68566. /* 671 */
  68567. /***/ (function(module, exports, __webpack_require__) {
  68568. "use strict";
  68569. var ReadableStream = __webpack_require__(10).Readable,
  68570. inherits = __webpack_require__(2).inherits,
  68571. Serializer = __webpack_require__(392);
  68572. var SerializerStream = module.exports = function (node, options) {
  68573. ReadableStream.call(this);
  68574. this.serializer = new Serializer(node, options);
  68575. Object.defineProperty(this.serializer, 'html', {
  68576. //NOTE: To make `+=` concat operator work properly we define
  68577. //getter which always returns empty string
  68578. get: function () {
  68579. return '';
  68580. },
  68581. set: this.push.bind(this)
  68582. });
  68583. };
  68584. inherits(SerializerStream, ReadableStream);
  68585. //Readable stream implementation
  68586. SerializerStream.prototype._read = function () {
  68587. this.serializer.serialize();
  68588. this.push(null);
  68589. };
  68590. /***/ }),
  68591. /* 672 */
  68592. /***/ (function(module, exports, __webpack_require__) {
  68593. "use strict";
  68594. var TransformStream = __webpack_require__(10).Transform,
  68595. DevNullStream = __webpack_require__(673),
  68596. inherits = __webpack_require__(2).inherits,
  68597. Tokenizer = __webpack_require__(66),
  68598. LocationInfoTokenizerMixin = __webpack_require__(389),
  68599. ParserFeedbackSimulator = __webpack_require__(674),
  68600. mergeOptions = __webpack_require__(161);
  68601. var DEFAULT_OPTIONS = {
  68602. locationInfo: false
  68603. };
  68604. var SAXParser = module.exports = function (options) {
  68605. TransformStream.call(this);
  68606. this.options = mergeOptions(DEFAULT_OPTIONS, options);
  68607. this.tokenizer = new Tokenizer(options);
  68608. if (this.options.locationInfo)
  68609. new LocationInfoTokenizerMixin(this.tokenizer);
  68610. this.parserFeedbackSimulator = new ParserFeedbackSimulator(this.tokenizer);
  68611. this.pendingText = null;
  68612. this.currentTokenLocation = void 0;
  68613. this.lastChunkWritten = false;
  68614. this.stopped = false;
  68615. // NOTE: always pipe stream to the /dev/null stream to avoid
  68616. // `highWaterMark` hit even if we don't have consumers.
  68617. // (see: https://github.com/inikulin/parse5/issues/97#issuecomment-171940774)
  68618. this.pipe(new DevNullStream());
  68619. };
  68620. inherits(SAXParser, TransformStream);
  68621. //TransformStream implementation
  68622. SAXParser.prototype._transform = function (chunk, encoding, callback) {
  68623. if (!this.stopped) {
  68624. this.tokenizer.write(chunk.toString('utf8'), this.lastChunkWritten);
  68625. this._runParsingLoop();
  68626. }
  68627. this.push(chunk);
  68628. callback();
  68629. };
  68630. SAXParser.prototype._flush = function (callback) {
  68631. callback();
  68632. };
  68633. SAXParser.prototype.end = function (chunk, encoding, callback) {
  68634. this.lastChunkWritten = true;
  68635. TransformStream.prototype.end.call(this, chunk, encoding, callback);
  68636. };
  68637. SAXParser.prototype.stop = function () {
  68638. this.stopped = true;
  68639. };
  68640. //Internals
  68641. SAXParser.prototype._runParsingLoop = function () {
  68642. do {
  68643. var token = this.parserFeedbackSimulator.getNextToken();
  68644. if (token.type === Tokenizer.HIBERNATION_TOKEN)
  68645. break;
  68646. if (token.type === Tokenizer.CHARACTER_TOKEN ||
  68647. token.type === Tokenizer.WHITESPACE_CHARACTER_TOKEN ||
  68648. token.type === Tokenizer.NULL_CHARACTER_TOKEN) {
  68649. if (this.options.locationInfo) {
  68650. if (this.pendingText === null)
  68651. this.currentTokenLocation = token.location;
  68652. else
  68653. this.currentTokenLocation.endOffset = token.location.endOffset;
  68654. }
  68655. this.pendingText = (this.pendingText || '') + token.chars;
  68656. }
  68657. else {
  68658. this._emitPendingText();
  68659. this._handleToken(token);
  68660. }
  68661. } while (!this.stopped && token.type !== Tokenizer.EOF_TOKEN);
  68662. };
  68663. SAXParser.prototype._handleToken = function (token) {
  68664. if (this.options.locationInfo)
  68665. this.currentTokenLocation = token.location;
  68666. if (token.type === Tokenizer.START_TAG_TOKEN)
  68667. this.emit('startTag', token.tagName, token.attrs, token.selfClosing, this.currentTokenLocation);
  68668. else if (token.type === Tokenizer.END_TAG_TOKEN)
  68669. this.emit('endTag', token.tagName, this.currentTokenLocation);
  68670. else if (token.type === Tokenizer.COMMENT_TOKEN)
  68671. this.emit('comment', token.data, this.currentTokenLocation);
  68672. else if (token.type === Tokenizer.DOCTYPE_TOKEN)
  68673. this.emit('doctype', token.name, token.publicId, token.systemId, this.currentTokenLocation);
  68674. };
  68675. SAXParser.prototype._emitPendingText = function () {
  68676. if (this.pendingText !== null) {
  68677. this.emit('text', this.pendingText, this.currentTokenLocation);
  68678. this.pendingText = null;
  68679. }
  68680. };
  68681. /***/ }),
  68682. /* 673 */
  68683. /***/ (function(module, exports, __webpack_require__) {
  68684. "use strict";
  68685. var WritableStream = __webpack_require__(10).Writable,
  68686. util = __webpack_require__(2);
  68687. var DevNullStream = module.exports = function () {
  68688. WritableStream.call(this);
  68689. };
  68690. util.inherits(DevNullStream, WritableStream);
  68691. DevNullStream.prototype._write = function (chunk, encoding, cb) {
  68692. cb();
  68693. };
  68694. /***/ }),
  68695. /* 674 */
  68696. /***/ (function(module, exports, __webpack_require__) {
  68697. "use strict";
  68698. var Tokenizer = __webpack_require__(66),
  68699. foreignContent = __webpack_require__(391),
  68700. UNICODE = __webpack_require__(89),
  68701. HTML = __webpack_require__(29);
  68702. //Aliases
  68703. var $ = HTML.TAG_NAMES,
  68704. NS = HTML.NAMESPACES;
  68705. //ParserFeedbackSimulator
  68706. //Simulates adjustment of the Tokenizer which performed by standard parser during tree construction.
  68707. var ParserFeedbackSimulator = module.exports = function (tokenizer) {
  68708. this.tokenizer = tokenizer;
  68709. this.namespaceStack = [];
  68710. this.namespaceStackTop = -1;
  68711. this._enterNamespace(NS.HTML);
  68712. };
  68713. ParserFeedbackSimulator.prototype.getNextToken = function () {
  68714. var token = this.tokenizer.getNextToken();
  68715. if (token.type === Tokenizer.START_TAG_TOKEN)
  68716. this._handleStartTagToken(token);
  68717. else if (token.type === Tokenizer.END_TAG_TOKEN)
  68718. this._handleEndTagToken(token);
  68719. else if (token.type === Tokenizer.NULL_CHARACTER_TOKEN && this.inForeignContent) {
  68720. token.type = Tokenizer.CHARACTER_TOKEN;
  68721. token.chars = UNICODE.REPLACEMENT_CHARACTER;
  68722. }
  68723. else if (this.skipNextNewLine) {
  68724. if (token.type !== Tokenizer.HIBERNATION_TOKEN)
  68725. this.skipNextNewLine = false;
  68726. if (token.type === Tokenizer.WHITESPACE_CHARACTER_TOKEN && token.chars[0] === '\n') {
  68727. if (token.chars.length === 1)
  68728. return this.getNextToken();
  68729. token.chars = token.chars.substr(1);
  68730. }
  68731. }
  68732. return token;
  68733. };
  68734. //Namespace stack mutations
  68735. ParserFeedbackSimulator.prototype._enterNamespace = function (namespace) {
  68736. this.namespaceStackTop++;
  68737. this.namespaceStack.push(namespace);
  68738. this.inForeignContent = namespace !== NS.HTML;
  68739. this.currentNamespace = namespace;
  68740. this.tokenizer.allowCDATA = this.inForeignContent;
  68741. };
  68742. ParserFeedbackSimulator.prototype._leaveCurrentNamespace = function () {
  68743. this.namespaceStackTop--;
  68744. this.namespaceStack.pop();
  68745. this.currentNamespace = this.namespaceStack[this.namespaceStackTop];
  68746. this.inForeignContent = this.currentNamespace !== NS.HTML;
  68747. this.tokenizer.allowCDATA = this.inForeignContent;
  68748. };
  68749. //Token handlers
  68750. ParserFeedbackSimulator.prototype._ensureTokenizerMode = function (tn) {
  68751. if (tn === $.TEXTAREA || tn === $.TITLE)
  68752. this.tokenizer.state = Tokenizer.MODE.RCDATA;
  68753. else if (tn === $.PLAINTEXT)
  68754. this.tokenizer.state = Tokenizer.MODE.PLAINTEXT;
  68755. else if (tn === $.SCRIPT)
  68756. this.tokenizer.state = Tokenizer.MODE.SCRIPT_DATA;
  68757. else if (tn === $.STYLE || tn === $.IFRAME || tn === $.XMP ||
  68758. tn === $.NOEMBED || tn === $.NOFRAMES || tn === $.NOSCRIPT)
  68759. this.tokenizer.state = Tokenizer.MODE.RAWTEXT;
  68760. };
  68761. ParserFeedbackSimulator.prototype._handleStartTagToken = function (token) {
  68762. var tn = token.tagName;
  68763. if (tn === $.SVG)
  68764. this._enterNamespace(NS.SVG);
  68765. else if (tn === $.MATH)
  68766. this._enterNamespace(NS.MATHML);
  68767. if (this.inForeignContent) {
  68768. if (foreignContent.causesExit(token)) {
  68769. this._leaveCurrentNamespace();
  68770. return;
  68771. }
  68772. var currentNs = this.currentNamespace;
  68773. if (currentNs === NS.MATHML)
  68774. foreignContent.adjustTokenMathMLAttrs(token);
  68775. else if (currentNs === NS.SVG) {
  68776. foreignContent.adjustTokenSVGTagName(token);
  68777. foreignContent.adjustTokenSVGAttrs(token);
  68778. }
  68779. foreignContent.adjustTokenXMLAttrs(token);
  68780. tn = token.tagName;
  68781. if (!token.selfClosing && foreignContent.isIntegrationPoint(tn, currentNs, token.attrs))
  68782. this._enterNamespace(NS.HTML);
  68783. }
  68784. else {
  68785. if (tn === $.PRE || tn === $.TEXTAREA || tn === $.LISTING)
  68786. this.skipNextNewLine = true;
  68787. else if (tn === $.IMAGE)
  68788. token.tagName = $.IMG;
  68789. this._ensureTokenizerMode(tn);
  68790. }
  68791. };
  68792. ParserFeedbackSimulator.prototype._handleEndTagToken = function (token) {
  68793. var tn = token.tagName;
  68794. if (!this.inForeignContent) {
  68795. var previousNs = this.namespaceStack[this.namespaceStackTop - 1];
  68796. if (previousNs === NS.SVG && foreignContent.SVG_TAG_NAMES_ADJUSTMENT_MAP[tn])
  68797. tn = foreignContent.SVG_TAG_NAMES_ADJUSTMENT_MAP[tn];
  68798. //NOTE: check for exit from integration point
  68799. if (foreignContent.isIntegrationPoint(tn, previousNs, token.attrs))
  68800. this._leaveCurrentNamespace();
  68801. }
  68802. else if (tn === $.SVG && this.currentNamespace === NS.SVG ||
  68803. tn === $.MATH && this.currentNamespace === NS.MATHML)
  68804. this._leaveCurrentNamespace();
  68805. // NOTE: adjust end tag name as well for consistency
  68806. if (this.currentNamespace === NS.SVG)
  68807. foreignContent.adjustTokenSVGTagName(token);
  68808. };
  68809. /***/ }),
  68810. /* 675 */
  68811. /***/ (function(module, exports, __webpack_require__) {
  68812. var isFunction = __webpack_require__(79),
  68813. isMasked = __webpack_require__(676),
  68814. isObject = __webpack_require__(25),
  68815. toSource = __webpack_require__(396);
  68816. /**
  68817. * Used to match `RegExp`
  68818. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  68819. */
  68820. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  68821. /** Used to detect host constructors (Safari). */
  68822. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  68823. /** Used for built-in method references. */
  68824. var funcProto = Function.prototype,
  68825. objectProto = Object.prototype;
  68826. /** Used to resolve the decompiled source of functions. */
  68827. var funcToString = funcProto.toString;
  68828. /** Used to check objects for own properties. */
  68829. var hasOwnProperty = objectProto.hasOwnProperty;
  68830. /** Used to detect if a method is native. */
  68831. var reIsNative = RegExp('^' +
  68832. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  68833. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  68834. );
  68835. /**
  68836. * The base implementation of `_.isNative` without bad shim checks.
  68837. *
  68838. * @private
  68839. * @param {*} value The value to check.
  68840. * @returns {boolean} Returns `true` if `value` is a native function,
  68841. * else `false`.
  68842. */
  68843. function baseIsNative(value) {
  68844. if (!isObject(value) || isMasked(value)) {
  68845. return false;
  68846. }
  68847. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  68848. return pattern.test(toSource(value));
  68849. }
  68850. module.exports = baseIsNative;
  68851. /***/ }),
  68852. /* 676 */
  68853. /***/ (function(module, exports, __webpack_require__) {
  68854. var coreJsData = __webpack_require__(677);
  68855. /** Used to detect methods masquerading as native. */
  68856. var maskSrcKey = (function() {
  68857. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  68858. return uid ? ('Symbol(src)_1.' + uid) : '';
  68859. }());
  68860. /**
  68861. * Checks if `func` has its source masked.
  68862. *
  68863. * @private
  68864. * @param {Function} func The function to check.
  68865. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  68866. */
  68867. function isMasked(func) {
  68868. return !!maskSrcKey && (maskSrcKey in func);
  68869. }
  68870. module.exports = isMasked;
  68871. /***/ }),
  68872. /* 677 */
  68873. /***/ (function(module, exports, __webpack_require__) {
  68874. var root = __webpack_require__(19);
  68875. /** Used to detect overreaching core-js shims. */
  68876. var coreJsData = root['__core-js_shared__'];
  68877. module.exports = coreJsData;
  68878. /***/ }),
  68879. /* 678 */
  68880. /***/ (function(module, exports) {
  68881. /**
  68882. * Gets the value at `key` of `object`.
  68883. *
  68884. * @private
  68885. * @param {Object} [object] The object to query.
  68886. * @param {string} key The key of the property to get.
  68887. * @returns {*} Returns the property value.
  68888. */
  68889. function getValue(object, key) {
  68890. return object == null ? undefined : object[key];
  68891. }
  68892. module.exports = getValue;
  68893. /***/ }),
  68894. /* 679 */
  68895. /***/ (function(module, exports, __webpack_require__) {
  68896. var constant = __webpack_require__(680),
  68897. defineProperty = __webpack_require__(395),
  68898. identity = __webpack_require__(68);
  68899. /**
  68900. * The base implementation of `setToString` without support for hot loop shorting.
  68901. *
  68902. * @private
  68903. * @param {Function} func The function to modify.
  68904. * @param {Function} string The `toString` result.
  68905. * @returns {Function} Returns `func`.
  68906. */
  68907. var baseSetToString = !defineProperty ? identity : function(func, string) {
  68908. return defineProperty(func, 'toString', {
  68909. 'configurable': true,
  68910. 'enumerable': false,
  68911. 'value': constant(string),
  68912. 'writable': true
  68913. });
  68914. };
  68915. module.exports = baseSetToString;
  68916. /***/ }),
  68917. /* 680 */
  68918. /***/ (function(module, exports) {
  68919. /**
  68920. * Creates a function that returns `value`.
  68921. *
  68922. * @static
  68923. * @memberOf _
  68924. * @since 2.4.0
  68925. * @category Util
  68926. * @param {*} value The value to return from the new function.
  68927. * @returns {Function} Returns the new constant function.
  68928. * @example
  68929. *
  68930. * var objects = _.times(2, _.constant({ 'a': 1 }));
  68931. *
  68932. * console.log(objects);
  68933. * // => [{ 'a': 1 }, { 'a': 1 }]
  68934. *
  68935. * console.log(objects[0] === objects[1]);
  68936. * // => true
  68937. */
  68938. function constant(value) {
  68939. return function() {
  68940. return value;
  68941. };
  68942. }
  68943. module.exports = constant;
  68944. /***/ }),
  68945. /* 681 */
  68946. /***/ (function(module, exports) {
  68947. /**
  68948. * The base implementation of `_.times` without support for iteratee shorthands
  68949. * or max array length checks.
  68950. *
  68951. * @private
  68952. * @param {number} n The number of times to invoke `iteratee`.
  68953. * @param {Function} iteratee The function invoked per iteration.
  68954. * @returns {Array} Returns the array of results.
  68955. */
  68956. function baseTimes(n, iteratee) {
  68957. var index = -1,
  68958. result = Array(n);
  68959. while (++index < n) {
  68960. result[index] = iteratee(index);
  68961. }
  68962. return result;
  68963. }
  68964. module.exports = baseTimes;
  68965. /***/ }),
  68966. /* 682 */
  68967. /***/ (function(module, exports, __webpack_require__) {
  68968. var baseGetTag = __webpack_require__(44),
  68969. isObjectLike = __webpack_require__(26);
  68970. /** `Object#toString` result references. */
  68971. var argsTag = '[object Arguments]';
  68972. /**
  68973. * The base implementation of `_.isArguments`.
  68974. *
  68975. * @private
  68976. * @param {*} value The value to check.
  68977. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  68978. */
  68979. function baseIsArguments(value) {
  68980. return isObjectLike(value) && baseGetTag(value) == argsTag;
  68981. }
  68982. module.exports = baseIsArguments;
  68983. /***/ }),
  68984. /* 683 */
  68985. /***/ (function(module, exports) {
  68986. /**
  68987. * This method returns `false`.
  68988. *
  68989. * @static
  68990. * @memberOf _
  68991. * @since 4.13.0
  68992. * @category Util
  68993. * @returns {boolean} Returns `false`.
  68994. * @example
  68995. *
  68996. * _.times(2, _.stubFalse);
  68997. * // => [false, false]
  68998. */
  68999. function stubFalse() {
  69000. return false;
  69001. }
  69002. module.exports = stubFalse;
  69003. /***/ }),
  69004. /* 684 */
  69005. /***/ (function(module, exports, __webpack_require__) {
  69006. var baseGetTag = __webpack_require__(44),
  69007. isLength = __webpack_require__(166),
  69008. isObjectLike = __webpack_require__(26);
  69009. /** `Object#toString` result references. */
  69010. var argsTag = '[object Arguments]',
  69011. arrayTag = '[object Array]',
  69012. boolTag = '[object Boolean]',
  69013. dateTag = '[object Date]',
  69014. errorTag = '[object Error]',
  69015. funcTag = '[object Function]',
  69016. mapTag = '[object Map]',
  69017. numberTag = '[object Number]',
  69018. objectTag = '[object Object]',
  69019. regexpTag = '[object RegExp]',
  69020. setTag = '[object Set]',
  69021. stringTag = '[object String]',
  69022. weakMapTag = '[object WeakMap]';
  69023. var arrayBufferTag = '[object ArrayBuffer]',
  69024. dataViewTag = '[object DataView]',
  69025. float32Tag = '[object Float32Array]',
  69026. float64Tag = '[object Float64Array]',
  69027. int8Tag = '[object Int8Array]',
  69028. int16Tag = '[object Int16Array]',
  69029. int32Tag = '[object Int32Array]',
  69030. uint8Tag = '[object Uint8Array]',
  69031. uint8ClampedTag = '[object Uint8ClampedArray]',
  69032. uint16Tag = '[object Uint16Array]',
  69033. uint32Tag = '[object Uint32Array]';
  69034. /** Used to identify `toStringTag` values of typed arrays. */
  69035. var typedArrayTags = {};
  69036. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  69037. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  69038. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  69039. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  69040. typedArrayTags[uint32Tag] = true;
  69041. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  69042. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  69043. typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  69044. typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  69045. typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  69046. typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  69047. typedArrayTags[setTag] = typedArrayTags[stringTag] =
  69048. typedArrayTags[weakMapTag] = false;
  69049. /**
  69050. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  69051. *
  69052. * @private
  69053. * @param {*} value The value to check.
  69054. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  69055. */
  69056. function baseIsTypedArray(value) {
  69057. return isObjectLike(value) &&
  69058. isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  69059. }
  69060. module.exports = baseIsTypedArray;
  69061. /***/ }),
  69062. /* 685 */
  69063. /***/ (function(module, exports, __webpack_require__) {
  69064. /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(334);
  69065. /** Detect free variable `exports`. */
  69066. var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
  69067. /** Detect free variable `module`. */
  69068. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  69069. /** Detect the popular CommonJS extension `module.exports`. */
  69070. var moduleExports = freeModule && freeModule.exports === freeExports;
  69071. /** Detect free variable `process` from Node.js. */
  69072. var freeProcess = moduleExports && freeGlobal.process;
  69073. /** Used to access faster Node.js helpers. */
  69074. var nodeUtil = (function() {
  69075. try {
  69076. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  69077. } catch (e) {}
  69078. }());
  69079. module.exports = nodeUtil;
  69080. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(58)(module)))
  69081. /***/ }),
  69082. /* 686 */
  69083. /***/ (function(module, exports, __webpack_require__) {
  69084. var isPrototype = __webpack_require__(123),
  69085. nativeKeys = __webpack_require__(687);
  69086. /** Used for built-in method references. */
  69087. var objectProto = Object.prototype;
  69088. /** Used to check objects for own properties. */
  69089. var hasOwnProperty = objectProto.hasOwnProperty;
  69090. /**
  69091. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  69092. *
  69093. * @private
  69094. * @param {Object} object The object to query.
  69095. * @returns {Array} Returns the array of property names.
  69096. */
  69097. function baseKeys(object) {
  69098. if (!isPrototype(object)) {
  69099. return nativeKeys(object);
  69100. }
  69101. var result = [];
  69102. for (var key in Object(object)) {
  69103. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  69104. result.push(key);
  69105. }
  69106. }
  69107. return result;
  69108. }
  69109. module.exports = baseKeys;
  69110. /***/ }),
  69111. /* 687 */
  69112. /***/ (function(module, exports, __webpack_require__) {
  69113. var overArg = __webpack_require__(401);
  69114. /* Built-in method references for those with the same name as other `lodash` methods. */
  69115. var nativeKeys = overArg(Object.keys, Object);
  69116. module.exports = nativeKeys;
  69117. /***/ }),
  69118. /* 688 */
  69119. /***/ (function(module, exports, __webpack_require__) {
  69120. var isObject = __webpack_require__(25),
  69121. isPrototype = __webpack_require__(123),
  69122. nativeKeysIn = __webpack_require__(689);
  69123. /** Used for built-in method references. */
  69124. var objectProto = Object.prototype;
  69125. /** Used to check objects for own properties. */
  69126. var hasOwnProperty = objectProto.hasOwnProperty;
  69127. /**
  69128. * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
  69129. *
  69130. * @private
  69131. * @param {Object} object The object to query.
  69132. * @returns {Array} Returns the array of property names.
  69133. */
  69134. function baseKeysIn(object) {
  69135. if (!isObject(object)) {
  69136. return nativeKeysIn(object);
  69137. }
  69138. var isProto = isPrototype(object),
  69139. result = [];
  69140. for (var key in object) {
  69141. if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
  69142. result.push(key);
  69143. }
  69144. }
  69145. return result;
  69146. }
  69147. module.exports = baseKeysIn;
  69148. /***/ }),
  69149. /* 689 */
  69150. /***/ (function(module, exports) {
  69151. /**
  69152. * This function is like
  69153. * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  69154. * except that it includes inherited enumerable properties.
  69155. *
  69156. * @private
  69157. * @param {Object} object The object to query.
  69158. * @returns {Array} Returns the array of property names.
  69159. */
  69160. function nativeKeysIn(object) {
  69161. var result = [];
  69162. if (object != null) {
  69163. for (var key in Object(object)) {
  69164. result.push(key);
  69165. }
  69166. }
  69167. return result;
  69168. }
  69169. module.exports = nativeKeysIn;
  69170. /***/ }),
  69171. /* 690 */
  69172. /***/ (function(module, exports, __webpack_require__) {
  69173. var baseSetData = __webpack_require__(403),
  69174. createBind = __webpack_require__(691),
  69175. createCurry = __webpack_require__(692),
  69176. createHybrid = __webpack_require__(406),
  69177. createPartial = __webpack_require__(708),
  69178. getData = __webpack_require__(410),
  69179. mergeData = __webpack_require__(709),
  69180. setData = __webpack_require__(412),
  69181. setWrapToString = __webpack_require__(413),
  69182. toInteger = __webpack_require__(416);
  69183. /** Error message constants. */
  69184. var FUNC_ERROR_TEXT = 'Expected a function';
  69185. /** Used to compose bitmasks for function metadata. */
  69186. var WRAP_BIND_FLAG = 1,
  69187. WRAP_BIND_KEY_FLAG = 2,
  69188. WRAP_CURRY_FLAG = 8,
  69189. WRAP_CURRY_RIGHT_FLAG = 16,
  69190. WRAP_PARTIAL_FLAG = 32,
  69191. WRAP_PARTIAL_RIGHT_FLAG = 64;
  69192. /* Built-in method references for those with the same name as other `lodash` methods. */
  69193. var nativeMax = Math.max;
  69194. /**
  69195. * Creates a function that either curries or invokes `func` with optional
  69196. * `this` binding and partially applied arguments.
  69197. *
  69198. * @private
  69199. * @param {Function|string} func The function or method name to wrap.
  69200. * @param {number} bitmask The bitmask flags.
  69201. * 1 - `_.bind`
  69202. * 2 - `_.bindKey`
  69203. * 4 - `_.curry` or `_.curryRight` of a bound function
  69204. * 8 - `_.curry`
  69205. * 16 - `_.curryRight`
  69206. * 32 - `_.partial`
  69207. * 64 - `_.partialRight`
  69208. * 128 - `_.rearg`
  69209. * 256 - `_.ary`
  69210. * 512 - `_.flip`
  69211. * @param {*} [thisArg] The `this` binding of `func`.
  69212. * @param {Array} [partials] The arguments to be partially applied.
  69213. * @param {Array} [holders] The `partials` placeholder indexes.
  69214. * @param {Array} [argPos] The argument positions of the new function.
  69215. * @param {number} [ary] The arity cap of `func`.
  69216. * @param {number} [arity] The arity of `func`.
  69217. * @returns {Function} Returns the new wrapped function.
  69218. */
  69219. function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
  69220. var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
  69221. if (!isBindKey && typeof func != 'function') {
  69222. throw new TypeError(FUNC_ERROR_TEXT);
  69223. }
  69224. var length = partials ? partials.length : 0;
  69225. if (!length) {
  69226. bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
  69227. partials = holders = undefined;
  69228. }
  69229. ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
  69230. arity = arity === undefined ? arity : toInteger(arity);
  69231. length -= holders ? holders.length : 0;
  69232. if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
  69233. var partialsRight = partials,
  69234. holdersRight = holders;
  69235. partials = holders = undefined;
  69236. }
  69237. var data = isBindKey ? undefined : getData(func);
  69238. var newData = [
  69239. func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
  69240. argPos, ary, arity
  69241. ];
  69242. if (data) {
  69243. mergeData(newData, data);
  69244. }
  69245. func = newData[0];
  69246. bitmask = newData[1];
  69247. thisArg = newData[2];
  69248. partials = newData[3];
  69249. holders = newData[4];
  69250. arity = newData[9] = newData[9] === undefined
  69251. ? (isBindKey ? 0 : func.length)
  69252. : nativeMax(newData[9] - length, 0);
  69253. if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
  69254. bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
  69255. }
  69256. if (!bitmask || bitmask == WRAP_BIND_FLAG) {
  69257. var result = createBind(func, bitmask, thisArg);
  69258. } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
  69259. result = createCurry(func, bitmask, arity);
  69260. } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
  69261. result = createPartial(func, bitmask, thisArg, partials);
  69262. } else {
  69263. result = createHybrid.apply(undefined, newData);
  69264. }
  69265. var setter = data ? baseSetData : setData;
  69266. return setWrapToString(setter(result, newData), func, bitmask);
  69267. }
  69268. module.exports = createWrap;
  69269. /***/ }),
  69270. /* 691 */
  69271. /***/ (function(module, exports, __webpack_require__) {
  69272. var createCtor = __webpack_require__(126),
  69273. root = __webpack_require__(19);
  69274. /** Used to compose bitmasks for function metadata. */
  69275. var WRAP_BIND_FLAG = 1;
  69276. /**
  69277. * Creates a function that wraps `func` to invoke it with the optional `this`
  69278. * binding of `thisArg`.
  69279. *
  69280. * @private
  69281. * @param {Function} func The function to wrap.
  69282. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  69283. * @param {*} [thisArg] The `this` binding of `func`.
  69284. * @returns {Function} Returns the new wrapped function.
  69285. */
  69286. function createBind(func, bitmask, thisArg) {
  69287. var isBind = bitmask & WRAP_BIND_FLAG,
  69288. Ctor = createCtor(func);
  69289. function wrapper() {
  69290. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  69291. return fn.apply(isBind ? thisArg : this, arguments);
  69292. }
  69293. return wrapper;
  69294. }
  69295. module.exports = createBind;
  69296. /***/ }),
  69297. /* 692 */
  69298. /***/ (function(module, exports, __webpack_require__) {
  69299. var apply = __webpack_require__(121),
  69300. createCtor = __webpack_require__(126),
  69301. createHybrid = __webpack_require__(406),
  69302. createRecurry = __webpack_require__(409),
  69303. getHolder = __webpack_require__(173),
  69304. replaceHolders = __webpack_require__(128),
  69305. root = __webpack_require__(19);
  69306. /**
  69307. * Creates a function that wraps `func` to enable currying.
  69308. *
  69309. * @private
  69310. * @param {Function} func The function to wrap.
  69311. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  69312. * @param {number} arity The arity of `func`.
  69313. * @returns {Function} Returns the new wrapped function.
  69314. */
  69315. function createCurry(func, bitmask, arity) {
  69316. var Ctor = createCtor(func);
  69317. function wrapper() {
  69318. var length = arguments.length,
  69319. args = Array(length),
  69320. index = length,
  69321. placeholder = getHolder(wrapper);
  69322. while (index--) {
  69323. args[index] = arguments[index];
  69324. }
  69325. var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
  69326. ? []
  69327. : replaceHolders(args, placeholder);
  69328. length -= holders.length;
  69329. if (length < arity) {
  69330. return createRecurry(
  69331. func, bitmask, createHybrid, wrapper.placeholder, undefined,
  69332. args, holders, undefined, undefined, arity - length);
  69333. }
  69334. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  69335. return apply(fn, this, args);
  69336. }
  69337. return wrapper;
  69338. }
  69339. module.exports = createCurry;
  69340. /***/ }),
  69341. /* 693 */
  69342. /***/ (function(module, exports) {
  69343. /**
  69344. * Gets the number of `placeholder` occurrences in `array`.
  69345. *
  69346. * @private
  69347. * @param {Array} array The array to inspect.
  69348. * @param {*} placeholder The placeholder to search for.
  69349. * @returns {number} Returns the placeholder count.
  69350. */
  69351. function countHolders(array, placeholder) {
  69352. var length = array.length,
  69353. result = 0;
  69354. while (length--) {
  69355. if (array[length] === placeholder) {
  69356. ++result;
  69357. }
  69358. }
  69359. return result;
  69360. }
  69361. module.exports = countHolders;
  69362. /***/ }),
  69363. /* 694 */
  69364. /***/ (function(module, exports, __webpack_require__) {
  69365. var LazyWrapper = __webpack_require__(170),
  69366. getData = __webpack_require__(410),
  69367. getFuncName = __webpack_require__(696),
  69368. lodash = __webpack_require__(698);
  69369. /**
  69370. * Checks if `func` has a lazy counterpart.
  69371. *
  69372. * @private
  69373. * @param {Function} func The function to check.
  69374. * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
  69375. * else `false`.
  69376. */
  69377. function isLaziable(func) {
  69378. var funcName = getFuncName(func),
  69379. other = lodash[funcName];
  69380. if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
  69381. return false;
  69382. }
  69383. if (func === other) {
  69384. return true;
  69385. }
  69386. var data = getData(other);
  69387. return !!data && func === data[0];
  69388. }
  69389. module.exports = isLaziable;
  69390. /***/ }),
  69391. /* 695 */
  69392. /***/ (function(module, exports) {
  69393. /**
  69394. * This method returns `undefined`.
  69395. *
  69396. * @static
  69397. * @memberOf _
  69398. * @since 2.3.0
  69399. * @category Util
  69400. * @example
  69401. *
  69402. * _.times(2, _.noop);
  69403. * // => [undefined, undefined]
  69404. */
  69405. function noop() {
  69406. // No operation performed.
  69407. }
  69408. module.exports = noop;
  69409. /***/ }),
  69410. /* 696 */
  69411. /***/ (function(module, exports, __webpack_require__) {
  69412. var realNames = __webpack_require__(697);
  69413. /** Used for built-in method references. */
  69414. var objectProto = Object.prototype;
  69415. /** Used to check objects for own properties. */
  69416. var hasOwnProperty = objectProto.hasOwnProperty;
  69417. /**
  69418. * Gets the name of `func`.
  69419. *
  69420. * @private
  69421. * @param {Function} func The function to query.
  69422. * @returns {string} Returns the function name.
  69423. */
  69424. function getFuncName(func) {
  69425. var result = (func.name + ''),
  69426. array = realNames[result],
  69427. length = hasOwnProperty.call(realNames, result) ? array.length : 0;
  69428. while (length--) {
  69429. var data = array[length],
  69430. otherFunc = data.func;
  69431. if (otherFunc == null || otherFunc == func) {
  69432. return data.name;
  69433. }
  69434. }
  69435. return result;
  69436. }
  69437. module.exports = getFuncName;
  69438. /***/ }),
  69439. /* 697 */
  69440. /***/ (function(module, exports) {
  69441. /** Used to lookup unminified function names. */
  69442. var realNames = {};
  69443. module.exports = realNames;
  69444. /***/ }),
  69445. /* 698 */
  69446. /***/ (function(module, exports, __webpack_require__) {
  69447. var LazyWrapper = __webpack_require__(170),
  69448. LodashWrapper = __webpack_require__(411),
  69449. baseLodash = __webpack_require__(171),
  69450. isArray = __webpack_require__(9),
  69451. isObjectLike = __webpack_require__(26),
  69452. wrapperClone = __webpack_require__(699);
  69453. /** Used for built-in method references. */
  69454. var objectProto = Object.prototype;
  69455. /** Used to check objects for own properties. */
  69456. var hasOwnProperty = objectProto.hasOwnProperty;
  69457. /**
  69458. * Creates a `lodash` object which wraps `value` to enable implicit method
  69459. * chain sequences. Methods that operate on and return arrays, collections,
  69460. * and functions can be chained together. Methods that retrieve a single value
  69461. * or may return a primitive value will automatically end the chain sequence
  69462. * and return the unwrapped value. Otherwise, the value must be unwrapped
  69463. * with `_#value`.
  69464. *
  69465. * Explicit chain sequences, which must be unwrapped with `_#value`, may be
  69466. * enabled using `_.chain`.
  69467. *
  69468. * The execution of chained methods is lazy, that is, it's deferred until
  69469. * `_#value` is implicitly or explicitly called.
  69470. *
  69471. * Lazy evaluation allows several methods to support shortcut fusion.
  69472. * Shortcut fusion is an optimization to merge iteratee calls; this avoids
  69473. * the creation of intermediate arrays and can greatly reduce the number of
  69474. * iteratee executions. Sections of a chain sequence qualify for shortcut
  69475. * fusion if the section is applied to an array and iteratees accept only
  69476. * one argument. The heuristic for whether a section qualifies for shortcut
  69477. * fusion is subject to change.
  69478. *
  69479. * Chaining is supported in custom builds as long as the `_#value` method is
  69480. * directly or indirectly included in the build.
  69481. *
  69482. * In addition to lodash methods, wrappers have `Array` and `String` methods.
  69483. *
  69484. * The wrapper `Array` methods are:
  69485. * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
  69486. *
  69487. * The wrapper `String` methods are:
  69488. * `replace` and `split`
  69489. *
  69490. * The wrapper methods that support shortcut fusion are:
  69491. * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
  69492. * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
  69493. * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
  69494. *
  69495. * The chainable wrapper methods are:
  69496. * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
  69497. * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
  69498. * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
  69499. * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
  69500. * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
  69501. * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
  69502. * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
  69503. * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
  69504. * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
  69505. * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
  69506. * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
  69507. * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
  69508. * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
  69509. * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
  69510. * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
  69511. * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
  69512. * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
  69513. * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
  69514. * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
  69515. * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
  69516. * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
  69517. * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
  69518. * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
  69519. * `zipObject`, `zipObjectDeep`, and `zipWith`
  69520. *
  69521. * The wrapper methods that are **not** chainable by default are:
  69522. * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
  69523. * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
  69524. * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
  69525. * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
  69526. * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
  69527. * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
  69528. * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
  69529. * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
  69530. * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
  69531. * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
  69532. * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
  69533. * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
  69534. * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
  69535. * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
  69536. * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
  69537. * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
  69538. * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
  69539. * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
  69540. * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
  69541. * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
  69542. * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
  69543. * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
  69544. * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
  69545. * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
  69546. * `upperFirst`, `value`, and `words`
  69547. *
  69548. * @name _
  69549. * @constructor
  69550. * @category Seq
  69551. * @param {*} value The value to wrap in a `lodash` instance.
  69552. * @returns {Object} Returns the new `lodash` wrapper instance.
  69553. * @example
  69554. *
  69555. * function square(n) {
  69556. * return n * n;
  69557. * }
  69558. *
  69559. * var wrapped = _([1, 2, 3]);
  69560. *
  69561. * // Returns an unwrapped value.
  69562. * wrapped.reduce(_.add);
  69563. * // => 6
  69564. *
  69565. * // Returns a wrapped value.
  69566. * var squares = wrapped.map(square);
  69567. *
  69568. * _.isArray(squares);
  69569. * // => false
  69570. *
  69571. * _.isArray(squares.value());
  69572. * // => true
  69573. */
  69574. function lodash(value) {
  69575. if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
  69576. if (value instanceof LodashWrapper) {
  69577. return value;
  69578. }
  69579. if (hasOwnProperty.call(value, '__wrapped__')) {
  69580. return wrapperClone(value);
  69581. }
  69582. }
  69583. return new LodashWrapper(value);
  69584. }
  69585. // Ensure wrappers are instances of `baseLodash`.
  69586. lodash.prototype = baseLodash.prototype;
  69587. lodash.prototype.constructor = lodash;
  69588. module.exports = lodash;
  69589. /***/ }),
  69590. /* 699 */
  69591. /***/ (function(module, exports, __webpack_require__) {
  69592. var LazyWrapper = __webpack_require__(170),
  69593. LodashWrapper = __webpack_require__(411),
  69594. copyArray = __webpack_require__(172);
  69595. /**
  69596. * Creates a clone of `wrapper`.
  69597. *
  69598. * @private
  69599. * @param {Object} wrapper The wrapper to clone.
  69600. * @returns {Object} Returns the cloned wrapper.
  69601. */
  69602. function wrapperClone(wrapper) {
  69603. if (wrapper instanceof LazyWrapper) {
  69604. return wrapper.clone();
  69605. }
  69606. var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
  69607. result.__actions__ = copyArray(wrapper.__actions__);
  69608. result.__index__ = wrapper.__index__;
  69609. result.__values__ = wrapper.__values__;
  69610. return result;
  69611. }
  69612. module.exports = wrapperClone;
  69613. /***/ }),
  69614. /* 700 */
  69615. /***/ (function(module, exports) {
  69616. /** Used to match wrap detail comments. */
  69617. var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
  69618. reSplitDetails = /,? & /;
  69619. /**
  69620. * Extracts wrapper details from the `source` body comment.
  69621. *
  69622. * @private
  69623. * @param {string} source The source to inspect.
  69624. * @returns {Array} Returns the wrapper details.
  69625. */
  69626. function getWrapDetails(source) {
  69627. var match = source.match(reWrapDetails);
  69628. return match ? match[1].split(reSplitDetails) : [];
  69629. }
  69630. module.exports = getWrapDetails;
  69631. /***/ }),
  69632. /* 701 */
  69633. /***/ (function(module, exports) {
  69634. /** Used to match wrap detail comments. */
  69635. var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;
  69636. /**
  69637. * Inserts wrapper `details` in a comment at the top of the `source` body.
  69638. *
  69639. * @private
  69640. * @param {string} source The source to modify.
  69641. * @returns {Array} details The details to insert.
  69642. * @returns {string} Returns the modified source.
  69643. */
  69644. function insertWrapDetails(source, details) {
  69645. var length = details.length;
  69646. if (!length) {
  69647. return source;
  69648. }
  69649. var lastIndex = length - 1;
  69650. details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
  69651. details = details.join(length > 2 ? ', ' : ' ');
  69652. return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
  69653. }
  69654. module.exports = insertWrapDetails;
  69655. /***/ }),
  69656. /* 702 */
  69657. /***/ (function(module, exports, __webpack_require__) {
  69658. var arrayEach = __webpack_require__(414),
  69659. arrayIncludes = __webpack_require__(703);
  69660. /** Used to compose bitmasks for function metadata. */
  69661. var WRAP_BIND_FLAG = 1,
  69662. WRAP_BIND_KEY_FLAG = 2,
  69663. WRAP_CURRY_FLAG = 8,
  69664. WRAP_CURRY_RIGHT_FLAG = 16,
  69665. WRAP_PARTIAL_FLAG = 32,
  69666. WRAP_PARTIAL_RIGHT_FLAG = 64,
  69667. WRAP_ARY_FLAG = 128,
  69668. WRAP_REARG_FLAG = 256,
  69669. WRAP_FLIP_FLAG = 512;
  69670. /** Used to associate wrap methods with their bit flags. */
  69671. var wrapFlags = [
  69672. ['ary', WRAP_ARY_FLAG],
  69673. ['bind', WRAP_BIND_FLAG],
  69674. ['bindKey', WRAP_BIND_KEY_FLAG],
  69675. ['curry', WRAP_CURRY_FLAG],
  69676. ['curryRight', WRAP_CURRY_RIGHT_FLAG],
  69677. ['flip', WRAP_FLIP_FLAG],
  69678. ['partial', WRAP_PARTIAL_FLAG],
  69679. ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
  69680. ['rearg', WRAP_REARG_FLAG]
  69681. ];
  69682. /**
  69683. * Updates wrapper `details` based on `bitmask` flags.
  69684. *
  69685. * @private
  69686. * @returns {Array} details The details to modify.
  69687. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  69688. * @returns {Array} Returns `details`.
  69689. */
  69690. function updateWrapDetails(details, bitmask) {
  69691. arrayEach(wrapFlags, function(pair) {
  69692. var value = '_.' + pair[0];
  69693. if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
  69694. details.push(value);
  69695. }
  69696. });
  69697. return details.sort();
  69698. }
  69699. module.exports = updateWrapDetails;
  69700. /***/ }),
  69701. /* 703 */
  69702. /***/ (function(module, exports, __webpack_require__) {
  69703. var baseIndexOf = __webpack_require__(415);
  69704. /**
  69705. * A specialized version of `_.includes` for arrays without support for
  69706. * specifying an index to search from.
  69707. *
  69708. * @private
  69709. * @param {Array} [array] The array to inspect.
  69710. * @param {*} target The value to search for.
  69711. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  69712. */
  69713. function arrayIncludes(array, value) {
  69714. var length = array == null ? 0 : array.length;
  69715. return !!length && baseIndexOf(array, value, 0) > -1;
  69716. }
  69717. module.exports = arrayIncludes;
  69718. /***/ }),
  69719. /* 704 */
  69720. /***/ (function(module, exports) {
  69721. /**
  69722. * The base implementation of `_.findIndex` and `_.findLastIndex` without
  69723. * support for iteratee shorthands.
  69724. *
  69725. * @private
  69726. * @param {Array} array The array to inspect.
  69727. * @param {Function} predicate The function invoked per iteration.
  69728. * @param {number} fromIndex The index to search from.
  69729. * @param {boolean} [fromRight] Specify iterating from right to left.
  69730. * @returns {number} Returns the index of the matched value, else `-1`.
  69731. */
  69732. function baseFindIndex(array, predicate, fromIndex, fromRight) {
  69733. var length = array.length,
  69734. index = fromIndex + (fromRight ? 1 : -1);
  69735. while ((fromRight ? index-- : ++index < length)) {
  69736. if (predicate(array[index], index, array)) {
  69737. return index;
  69738. }
  69739. }
  69740. return -1;
  69741. }
  69742. module.exports = baseFindIndex;
  69743. /***/ }),
  69744. /* 705 */
  69745. /***/ (function(module, exports) {
  69746. /**
  69747. * The base implementation of `_.isNaN` without support for number objects.
  69748. *
  69749. * @private
  69750. * @param {*} value The value to check.
  69751. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  69752. */
  69753. function baseIsNaN(value) {
  69754. return value !== value;
  69755. }
  69756. module.exports = baseIsNaN;
  69757. /***/ }),
  69758. /* 706 */
  69759. /***/ (function(module, exports) {
  69760. /**
  69761. * A specialized version of `_.indexOf` which performs strict equality
  69762. * comparisons of values, i.e. `===`.
  69763. *
  69764. * @private
  69765. * @param {Array} array The array to inspect.
  69766. * @param {*} value The value to search for.
  69767. * @param {number} fromIndex The index to search from.
  69768. * @returns {number} Returns the index of the matched value, else `-1`.
  69769. */
  69770. function strictIndexOf(array, value, fromIndex) {
  69771. var index = fromIndex - 1,
  69772. length = array.length;
  69773. while (++index < length) {
  69774. if (array[index] === value) {
  69775. return index;
  69776. }
  69777. }
  69778. return -1;
  69779. }
  69780. module.exports = strictIndexOf;
  69781. /***/ }),
  69782. /* 707 */
  69783. /***/ (function(module, exports, __webpack_require__) {
  69784. var copyArray = __webpack_require__(172),
  69785. isIndex = __webpack_require__(90);
  69786. /* Built-in method references for those with the same name as other `lodash` methods. */
  69787. var nativeMin = Math.min;
  69788. /**
  69789. * Reorder `array` according to the specified indexes where the element at
  69790. * the first index is assigned as the first element, the element at
  69791. * the second index is assigned as the second element, and so on.
  69792. *
  69793. * @private
  69794. * @param {Array} array The array to reorder.
  69795. * @param {Array} indexes The arranged array indexes.
  69796. * @returns {Array} Returns `array`.
  69797. */
  69798. function reorder(array, indexes) {
  69799. var arrLength = array.length,
  69800. length = nativeMin(indexes.length, arrLength),
  69801. oldArray = copyArray(array);
  69802. while (length--) {
  69803. var index = indexes[length];
  69804. array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
  69805. }
  69806. return array;
  69807. }
  69808. module.exports = reorder;
  69809. /***/ }),
  69810. /* 708 */
  69811. /***/ (function(module, exports, __webpack_require__) {
  69812. var apply = __webpack_require__(121),
  69813. createCtor = __webpack_require__(126),
  69814. root = __webpack_require__(19);
  69815. /** Used to compose bitmasks for function metadata. */
  69816. var WRAP_BIND_FLAG = 1;
  69817. /**
  69818. * Creates a function that wraps `func` to invoke it with the `this` binding
  69819. * of `thisArg` and `partials` prepended to the arguments it receives.
  69820. *
  69821. * @private
  69822. * @param {Function} func The function to wrap.
  69823. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  69824. * @param {*} thisArg The `this` binding of `func`.
  69825. * @param {Array} partials The arguments to prepend to those provided to
  69826. * the new function.
  69827. * @returns {Function} Returns the new wrapped function.
  69828. */
  69829. function createPartial(func, bitmask, thisArg, partials) {
  69830. var isBind = bitmask & WRAP_BIND_FLAG,
  69831. Ctor = createCtor(func);
  69832. function wrapper() {
  69833. var argsIndex = -1,
  69834. argsLength = arguments.length,
  69835. leftIndex = -1,
  69836. leftLength = partials.length,
  69837. args = Array(leftLength + argsLength),
  69838. fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  69839. while (++leftIndex < leftLength) {
  69840. args[leftIndex] = partials[leftIndex];
  69841. }
  69842. while (argsLength--) {
  69843. args[leftIndex++] = arguments[++argsIndex];
  69844. }
  69845. return apply(fn, isBind ? thisArg : this, args);
  69846. }
  69847. return wrapper;
  69848. }
  69849. module.exports = createPartial;
  69850. /***/ }),
  69851. /* 709 */
  69852. /***/ (function(module, exports, __webpack_require__) {
  69853. var composeArgs = __webpack_require__(407),
  69854. composeArgsRight = __webpack_require__(408),
  69855. replaceHolders = __webpack_require__(128);
  69856. /** Used as the internal argument placeholder. */
  69857. var PLACEHOLDER = '__lodash_placeholder__';
  69858. /** Used to compose bitmasks for function metadata. */
  69859. var WRAP_BIND_FLAG = 1,
  69860. WRAP_BIND_KEY_FLAG = 2,
  69861. WRAP_CURRY_BOUND_FLAG = 4,
  69862. WRAP_CURRY_FLAG = 8,
  69863. WRAP_ARY_FLAG = 128,
  69864. WRAP_REARG_FLAG = 256;
  69865. /* Built-in method references for those with the same name as other `lodash` methods. */
  69866. var nativeMin = Math.min;
  69867. /**
  69868. * Merges the function metadata of `source` into `data`.
  69869. *
  69870. * Merging metadata reduces the number of wrappers used to invoke a function.
  69871. * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
  69872. * may be applied regardless of execution order. Methods like `_.ary` and
  69873. * `_.rearg` modify function arguments, making the order in which they are
  69874. * executed important, preventing the merging of metadata. However, we make
  69875. * an exception for a safe combined case where curried functions have `_.ary`
  69876. * and or `_.rearg` applied.
  69877. *
  69878. * @private
  69879. * @param {Array} data The destination metadata.
  69880. * @param {Array} source The source metadata.
  69881. * @returns {Array} Returns `data`.
  69882. */
  69883. function mergeData(data, source) {
  69884. var bitmask = data[1],
  69885. srcBitmask = source[1],
  69886. newBitmask = bitmask | srcBitmask,
  69887. isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
  69888. var isCombo =
  69889. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
  69890. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
  69891. ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
  69892. // Exit early if metadata can't be merged.
  69893. if (!(isCommon || isCombo)) {
  69894. return data;
  69895. }
  69896. // Use source `thisArg` if available.
  69897. if (srcBitmask & WRAP_BIND_FLAG) {
  69898. data[2] = source[2];
  69899. // Set when currying a bound function.
  69900. newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
  69901. }
  69902. // Compose partial arguments.
  69903. var value = source[3];
  69904. if (value) {
  69905. var partials = data[3];
  69906. data[3] = partials ? composeArgs(partials, value, source[4]) : value;
  69907. data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
  69908. }
  69909. // Compose partial right arguments.
  69910. value = source[5];
  69911. if (value) {
  69912. partials = data[5];
  69913. data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
  69914. data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
  69915. }
  69916. // Use source `argPos` if available.
  69917. value = source[7];
  69918. if (value) {
  69919. data[7] = value;
  69920. }
  69921. // Use source `ary` if it's smaller.
  69922. if (srcBitmask & WRAP_ARY_FLAG) {
  69923. data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
  69924. }
  69925. // Use source `arity` if one is not provided.
  69926. if (data[9] == null) {
  69927. data[9] = source[9];
  69928. }
  69929. // Use source `func` and merge bitmasks.
  69930. data[0] = source[0];
  69931. data[1] = newBitmask;
  69932. return data;
  69933. }
  69934. module.exports = mergeData;
  69935. /***/ }),
  69936. /* 710 */
  69937. /***/ (function(module, exports, __webpack_require__) {
  69938. var toNumber = __webpack_require__(711);
  69939. /** Used as references for various `Number` constants. */
  69940. var INFINITY = 1 / 0,
  69941. MAX_INTEGER = 1.7976931348623157e+308;
  69942. /**
  69943. * Converts `value` to a finite number.
  69944. *
  69945. * @static
  69946. * @memberOf _
  69947. * @since 4.12.0
  69948. * @category Lang
  69949. * @param {*} value The value to convert.
  69950. * @returns {number} Returns the converted number.
  69951. * @example
  69952. *
  69953. * _.toFinite(3.2);
  69954. * // => 3.2
  69955. *
  69956. * _.toFinite(Number.MIN_VALUE);
  69957. * // => 5e-324
  69958. *
  69959. * _.toFinite(Infinity);
  69960. * // => 1.7976931348623157e+308
  69961. *
  69962. * _.toFinite('3.2');
  69963. * // => 3.2
  69964. */
  69965. function toFinite(value) {
  69966. if (!value) {
  69967. return value === 0 ? value : 0;
  69968. }
  69969. value = toNumber(value);
  69970. if (value === INFINITY || value === -INFINITY) {
  69971. var sign = (value < 0 ? -1 : 1);
  69972. return sign * MAX_INTEGER;
  69973. }
  69974. return value === value ? value : 0;
  69975. }
  69976. module.exports = toFinite;
  69977. /***/ }),
  69978. /* 711 */
  69979. /***/ (function(module, exports, __webpack_require__) {
  69980. var isObject = __webpack_require__(25),
  69981. isSymbol = __webpack_require__(93);
  69982. /** Used as references for various `Number` constants. */
  69983. var NAN = 0 / 0;
  69984. /** Used to match leading and trailing whitespace. */
  69985. var reTrim = /^\s+|\s+$/g;
  69986. /** Used to detect bad signed hexadecimal string values. */
  69987. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  69988. /** Used to detect binary string values. */
  69989. var reIsBinary = /^0b[01]+$/i;
  69990. /** Used to detect octal string values. */
  69991. var reIsOctal = /^0o[0-7]+$/i;
  69992. /** Built-in method references without a dependency on `root`. */
  69993. var freeParseInt = parseInt;
  69994. /**
  69995. * Converts `value` to a number.
  69996. *
  69997. * @static
  69998. * @memberOf _
  69999. * @since 4.0.0
  70000. * @category Lang
  70001. * @param {*} value The value to process.
  70002. * @returns {number} Returns the number.
  70003. * @example
  70004. *
  70005. * _.toNumber(3.2);
  70006. * // => 3.2
  70007. *
  70008. * _.toNumber(Number.MIN_VALUE);
  70009. * // => 5e-324
  70010. *
  70011. * _.toNumber(Infinity);
  70012. * // => Infinity
  70013. *
  70014. * _.toNumber('3.2');
  70015. * // => 3.2
  70016. */
  70017. function toNumber(value) {
  70018. if (typeof value == 'number') {
  70019. return value;
  70020. }
  70021. if (isSymbol(value)) {
  70022. return NAN;
  70023. }
  70024. if (isObject(value)) {
  70025. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  70026. value = isObject(other) ? (other + '') : other;
  70027. }
  70028. if (typeof value != 'string') {
  70029. return value === 0 ? value : +value;
  70030. }
  70031. value = value.replace(reTrim, '');
  70032. var isBinary = reIsBinary.test(value);
  70033. return (isBinary || reIsOctal.test(value))
  70034. ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
  70035. : (reIsBadHex.test(value) ? NAN : +value);
  70036. }
  70037. module.exports = toNumber;
  70038. /***/ }),
  70039. /* 712 */
  70040. /***/ (function(module, exports, __webpack_require__) {
  70041. var baseFor = __webpack_require__(417),
  70042. keys = __webpack_require__(91);
  70043. /**
  70044. * The base implementation of `_.forOwn` without support for iteratee shorthands.
  70045. *
  70046. * @private
  70047. * @param {Object} object The object to iterate over.
  70048. * @param {Function} iteratee The function invoked per iteration.
  70049. * @returns {Object} Returns `object`.
  70050. */
  70051. function baseForOwn(object, iteratee) {
  70052. return object && baseFor(object, iteratee, keys);
  70053. }
  70054. module.exports = baseForOwn;
  70055. /***/ }),
  70056. /* 713 */
  70057. /***/ (function(module, exports) {
  70058. /**
  70059. * Creates a base function for methods like `_.forIn` and `_.forOwn`.
  70060. *
  70061. * @private
  70062. * @param {boolean} [fromRight] Specify iterating from right to left.
  70063. * @returns {Function} Returns the new base function.
  70064. */
  70065. function createBaseFor(fromRight) {
  70066. return function(object, iteratee, keysFunc) {
  70067. var index = -1,
  70068. iterable = Object(object),
  70069. props = keysFunc(object),
  70070. length = props.length;
  70071. while (length--) {
  70072. var key = props[fromRight ? length : ++index];
  70073. if (iteratee(iterable[key], key, iterable) === false) {
  70074. break;
  70075. }
  70076. }
  70077. return object;
  70078. };
  70079. }
  70080. module.exports = createBaseFor;
  70081. /***/ }),
  70082. /* 714 */
  70083. /***/ (function(module, exports, __webpack_require__) {
  70084. var isArrayLike = __webpack_require__(40);
  70085. /**
  70086. * Creates a `baseEach` or `baseEachRight` function.
  70087. *
  70088. * @private
  70089. * @param {Function} eachFunc The function to iterate over a collection.
  70090. * @param {boolean} [fromRight] Specify iterating from right to left.
  70091. * @returns {Function} Returns the new base function.
  70092. */
  70093. function createBaseEach(eachFunc, fromRight) {
  70094. return function(collection, iteratee) {
  70095. if (collection == null) {
  70096. return collection;
  70097. }
  70098. if (!isArrayLike(collection)) {
  70099. return eachFunc(collection, iteratee);
  70100. }
  70101. var length = collection.length,
  70102. index = fromRight ? length : -1,
  70103. iterable = Object(collection);
  70104. while ((fromRight ? index-- : ++index < length)) {
  70105. if (iteratee(iterable[index], index, iterable) === false) {
  70106. break;
  70107. }
  70108. }
  70109. return collection;
  70110. };
  70111. }
  70112. module.exports = createBaseEach;
  70113. /***/ }),
  70114. /* 715 */
  70115. /***/ (function(module, exports, __webpack_require__) {
  70116. var identity = __webpack_require__(68);
  70117. /**
  70118. * Casts `value` to `identity` if it's not a function.
  70119. *
  70120. * @private
  70121. * @param {*} value The value to inspect.
  70122. * @returns {Function} Returns cast function.
  70123. */
  70124. function castFunction(value) {
  70125. return typeof value == 'function' ? value : identity;
  70126. }
  70127. module.exports = castFunction;
  70128. /***/ }),
  70129. /* 716 */
  70130. /***/ (function(module, exports, __webpack_require__) {
  70131. var copyObject = __webpack_require__(118),
  70132. createAssigner = __webpack_require__(119),
  70133. keysIn = __webpack_require__(125);
  70134. /**
  70135. * This method is like `_.assignIn` except that it accepts `customizer`
  70136. * which is invoked to produce the assigned values. If `customizer` returns
  70137. * `undefined`, assignment is handled by the method instead. The `customizer`
  70138. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  70139. *
  70140. * **Note:** This method mutates `object`.
  70141. *
  70142. * @static
  70143. * @memberOf _
  70144. * @since 4.0.0
  70145. * @alias extendWith
  70146. * @category Object
  70147. * @param {Object} object The destination object.
  70148. * @param {...Object} sources The source objects.
  70149. * @param {Function} [customizer] The function to customize assigned values.
  70150. * @returns {Object} Returns `object`.
  70151. * @see _.assignWith
  70152. * @example
  70153. *
  70154. * function customizer(objValue, srcValue) {
  70155. * return _.isUndefined(objValue) ? srcValue : objValue;
  70156. * }
  70157. *
  70158. * var defaults = _.partialRight(_.assignInWith, customizer);
  70159. *
  70160. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  70161. * // => { 'a': 1, 'b': 2 }
  70162. */
  70163. var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
  70164. copyObject(source, keysIn(source), object, customizer);
  70165. });
  70166. module.exports = assignInWith;
  70167. /***/ }),
  70168. /* 717 */
  70169. /***/ (function(module, exports, __webpack_require__) {
  70170. var eq = __webpack_require__(67);
  70171. /** Used for built-in method references. */
  70172. var objectProto = Object.prototype;
  70173. /** Used to check objects for own properties. */
  70174. var hasOwnProperty = objectProto.hasOwnProperty;
  70175. /**
  70176. * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
  70177. * of source objects to the destination object for all destination properties
  70178. * that resolve to `undefined`.
  70179. *
  70180. * @private
  70181. * @param {*} objValue The destination value.
  70182. * @param {*} srcValue The source value.
  70183. * @param {string} key The key of the property to assign.
  70184. * @param {Object} object The parent object of `objValue`.
  70185. * @returns {*} Returns the value to assign.
  70186. */
  70187. function customDefaultsAssignIn(objValue, srcValue, key, object) {
  70188. if (objValue === undefined ||
  70189. (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
  70190. return srcValue;
  70191. }
  70192. return objValue;
  70193. }
  70194. module.exports = customDefaultsAssignIn;
  70195. /***/ }),
  70196. /* 718 */
  70197. /***/ (function(module, exports, __webpack_require__) {
  70198. var $ = __webpack_require__(174),
  70199. utils = __webpack_require__(92),
  70200. isTag = utils.isTag,
  70201. domEach = utils.domEach,
  70202. hasOwn = Object.prototype.hasOwnProperty,
  70203. camelCase = utils.camelCase,
  70204. cssCase = utils.cssCase,
  70205. rspace = /\s+/,
  70206. dataAttrPrefix = 'data-',
  70207. _ = {
  70208. forEach: __webpack_require__(129),
  70209. extend: __webpack_require__(402),
  70210. some: __webpack_require__(425)
  70211. },
  70212. // Lookup table for coercing string data-* attributes to their corresponding
  70213. // JavaScript primitives
  70214. primitives = {
  70215. null: null,
  70216. true: true,
  70217. false: false
  70218. },
  70219. // Attributes that are booleans
  70220. rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
  70221. // Matches strings that look like JSON objects or arrays
  70222. rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/;
  70223. var getAttr = function(elem, name) {
  70224. if (!elem || !isTag(elem)) return;
  70225. if (!elem.attribs) {
  70226. elem.attribs = {};
  70227. }
  70228. // Return the entire attribs object if no attribute specified
  70229. if (!name) {
  70230. return elem.attribs;
  70231. }
  70232. if (hasOwn.call(elem.attribs, name)) {
  70233. // Get the (decoded) attribute
  70234. return rboolean.test(name) ? name : elem.attribs[name];
  70235. }
  70236. // Mimic the DOM and return text content as value for `option's`
  70237. if (elem.name === 'option' && name === 'value') {
  70238. return $.text(elem.children);
  70239. }
  70240. // Mimic DOM with default value for radios/checkboxes
  70241. if (elem.name === 'input' &&
  70242. (elem.attribs.type === 'radio' || elem.attribs.type === 'checkbox') &&
  70243. name === 'value') {
  70244. return 'on';
  70245. }
  70246. };
  70247. var setAttr = function(el, name, value) {
  70248. if (value === null) {
  70249. removeAttribute(el, name);
  70250. } else {
  70251. el.attribs[name] = value+'';
  70252. }
  70253. };
  70254. exports.attr = function(name, value) {
  70255. // Set the value (with attr map support)
  70256. if (typeof name === 'object' || value !== undefined) {
  70257. if (typeof value === 'function') {
  70258. return domEach(this, function(i, el) {
  70259. setAttr(el, name, value.call(el, i, el.attribs[name]));
  70260. });
  70261. }
  70262. return domEach(this, function(i, el) {
  70263. if (!isTag(el)) return;
  70264. if (typeof name === 'object') {
  70265. _.forEach(name, function(objValue, objName) {
  70266. setAttr(el, objName, objValue);
  70267. });
  70268. } else {
  70269. setAttr(el, name, value);
  70270. }
  70271. });
  70272. }
  70273. return getAttr(this[0], name);
  70274. };
  70275. var getProp = function (el, name) {
  70276. if (!el || !isTag(el)) return;
  70277. return hasOwn.call(el, name)
  70278. ? el[name]
  70279. : rboolean.test(name)
  70280. ? getAttr(el, name) !== undefined
  70281. : getAttr(el, name);
  70282. };
  70283. var setProp = function (el, name, value) {
  70284. el[name] = rboolean.test(name) ? !!value : value;
  70285. };
  70286. exports.prop = function (name, value) {
  70287. var i = 0,
  70288. property;
  70289. if (typeof name === 'string' && value === undefined) {
  70290. switch (name) {
  70291. case 'style':
  70292. property = this.css();
  70293. _.forEach(property, function (v, p) {
  70294. property[i++] = p;
  70295. });
  70296. property.length = i;
  70297. break;
  70298. case 'tagName':
  70299. case 'nodeName':
  70300. property = this[0].name.toUpperCase();
  70301. break;
  70302. default:
  70303. property = getProp(this[0], name);
  70304. }
  70305. return property;
  70306. }
  70307. if (typeof name === 'object' || value !== undefined) {
  70308. if (typeof value === 'function') {
  70309. return domEach(this, function(j, el) {
  70310. setProp(el, name, value.call(el, j, getProp(el, name)));
  70311. });
  70312. }
  70313. return domEach(this, function(__, el) {
  70314. if (!isTag(el)) return;
  70315. if (typeof name === 'object') {
  70316. _.forEach(name, function(val, key) {
  70317. setProp(el, key, val);
  70318. });
  70319. } else {
  70320. setProp(el, name, value);
  70321. }
  70322. });
  70323. }
  70324. };
  70325. var setData = function(el, name, value) {
  70326. if (!el.data) {
  70327. el.data = {};
  70328. }
  70329. if (typeof name === 'object') return _.extend(el.data, name);
  70330. if (typeof name === 'string' && value !== undefined) {
  70331. el.data[name] = value;
  70332. }
  70333. };
  70334. // Read the specified attribute from the equivalent HTML5 `data-*` attribute,
  70335. // and (if present) cache the value in the node's internal data store. If no
  70336. // attribute name is specified, read *all* HTML5 `data-*` attributes in this
  70337. // manner.
  70338. var readData = function(el, name) {
  70339. var readAll = arguments.length === 1;
  70340. var domNames, domName, jsNames, jsName, value, idx, length;
  70341. if (readAll) {
  70342. domNames = Object.keys(el.attribs).filter(function(attrName) {
  70343. return attrName.slice(0, dataAttrPrefix.length) === dataAttrPrefix;
  70344. });
  70345. jsNames = domNames.map(function(_domName) {
  70346. return camelCase(_domName.slice(dataAttrPrefix.length));
  70347. });
  70348. } else {
  70349. domNames = [dataAttrPrefix + cssCase(name)];
  70350. jsNames = [name];
  70351. }
  70352. for (idx = 0, length = domNames.length; idx < length; ++idx) {
  70353. domName = domNames[idx];
  70354. jsName = jsNames[idx];
  70355. if (hasOwn.call(el.attribs, domName)) {
  70356. value = el.attribs[domName];
  70357. if (hasOwn.call(primitives, value)) {
  70358. value = primitives[value];
  70359. } else if (value === String(Number(value))) {
  70360. value = Number(value);
  70361. } else if (rbrace.test(value)) {
  70362. try {
  70363. value = JSON.parse(value);
  70364. } catch(e){ }
  70365. }
  70366. el.data[jsName] = value;
  70367. }
  70368. }
  70369. return readAll ? el.data : value;
  70370. };
  70371. exports.data = function(name, value) {
  70372. var elem = this[0];
  70373. if (!elem || !isTag(elem)) return;
  70374. if (!elem.data) {
  70375. elem.data = {};
  70376. }
  70377. // Return the entire data object if no data specified
  70378. if (!name) {
  70379. return readData(elem);
  70380. }
  70381. // Set the value (with attr map support)
  70382. if (typeof name === 'object' || value !== undefined) {
  70383. domEach(this, function(i, el) {
  70384. setData(el, name, value);
  70385. });
  70386. return this;
  70387. } else if (hasOwn.call(elem.data, name)) {
  70388. return elem.data[name];
  70389. }
  70390. return readData(elem, name);
  70391. };
  70392. /**
  70393. * Get the value of an element
  70394. */
  70395. exports.val = function(value) {
  70396. var querying = arguments.length === 0,
  70397. element = this[0];
  70398. if(!element) return;
  70399. switch (element.name) {
  70400. case 'textarea':
  70401. return this.text(value);
  70402. case 'input':
  70403. switch (this.attr('type')) {
  70404. case 'radio':
  70405. if (querying) {
  70406. return this.attr('value');
  70407. } else {
  70408. this.attr('value', value);
  70409. return this;
  70410. }
  70411. break;
  70412. default:
  70413. return this.attr('value', value);
  70414. }
  70415. return;
  70416. case 'select':
  70417. var option = this.find('option:selected'),
  70418. returnValue;
  70419. if (option === undefined) return undefined;
  70420. if (!querying) {
  70421. if (!hasOwn.call(this.attr(), 'multiple') && typeof value == 'object') {
  70422. return this;
  70423. }
  70424. if (typeof value != 'object') {
  70425. value = [value];
  70426. }
  70427. this.find('option').removeAttr('selected');
  70428. for (var i = 0; i < value.length; i++) {
  70429. this.find('option[value="' + value[i] + '"]').attr('selected', '');
  70430. }
  70431. return this;
  70432. }
  70433. returnValue = option.attr('value');
  70434. if (hasOwn.call(this.attr(), 'multiple')) {
  70435. returnValue = [];
  70436. domEach(option, function(__, el) {
  70437. returnValue.push(getAttr(el, 'value'));
  70438. });
  70439. }
  70440. return returnValue;
  70441. case 'option':
  70442. if (!querying) {
  70443. this.attr('value', value);
  70444. return this;
  70445. }
  70446. return this.attr('value');
  70447. }
  70448. };
  70449. /**
  70450. * Remove an attribute
  70451. */
  70452. var removeAttribute = function(elem, name) {
  70453. if (!elem.attribs || !hasOwn.call(elem.attribs, name))
  70454. return;
  70455. delete elem.attribs[name];
  70456. };
  70457. exports.removeAttr = function(name) {
  70458. domEach(this, function(i, elem) {
  70459. removeAttribute(elem, name);
  70460. });
  70461. return this;
  70462. };
  70463. exports.hasClass = function(className) {
  70464. return _.some(this, function(elem) {
  70465. var attrs = elem.attribs,
  70466. clazz = attrs && attrs['class'],
  70467. idx = -1,
  70468. end;
  70469. if (clazz && className.length) {
  70470. while ((idx = clazz.indexOf(className, idx+1)) > -1) {
  70471. end = idx + className.length;
  70472. if ((idx === 0 || rspace.test(clazz[idx-1]))
  70473. && (end === clazz.length || rspace.test(clazz[end]))) {
  70474. return true;
  70475. }
  70476. }
  70477. }
  70478. });
  70479. };
  70480. exports.addClass = function(value) {
  70481. // Support functions
  70482. if (typeof value === 'function') {
  70483. return domEach(this, function(i, el) {
  70484. var className = el.attribs['class'] || '';
  70485. exports.addClass.call([el], value.call(el, i, className));
  70486. });
  70487. }
  70488. // Return if no value or not a string or function
  70489. if (!value || typeof value !== 'string') return this;
  70490. var classNames = value.split(rspace),
  70491. numElements = this.length;
  70492. for (var i = 0; i < numElements; i++) {
  70493. // If selected element isn't a tag, move on
  70494. if (!isTag(this[i])) continue;
  70495. // If we don't already have classes
  70496. var className = getAttr(this[i], 'class'),
  70497. numClasses,
  70498. setClass;
  70499. if (!className) {
  70500. setAttr(this[i], 'class', classNames.join(' ').trim());
  70501. } else {
  70502. setClass = ' ' + className + ' ';
  70503. numClasses = classNames.length;
  70504. // Check if class already exists
  70505. for (var j = 0; j < numClasses; j++) {
  70506. var appendClass = classNames[j] + ' ';
  70507. if (setClass.indexOf(' ' + appendClass) < 0)
  70508. setClass += appendClass;
  70509. }
  70510. setAttr(this[i], 'class', setClass.trim());
  70511. }
  70512. }
  70513. return this;
  70514. };
  70515. var splitClass = function(className) {
  70516. return className ? className.trim().split(rspace) : [];
  70517. };
  70518. exports.removeClass = function(value) {
  70519. var classes,
  70520. numClasses,
  70521. removeAll;
  70522. // Handle if value is a function
  70523. if (typeof value === 'function') {
  70524. return domEach(this, function(i, el) {
  70525. exports.removeClass.call(
  70526. [el], value.call(el, i, el.attribs['class'] || '')
  70527. );
  70528. });
  70529. }
  70530. classes = splitClass(value);
  70531. numClasses = classes.length;
  70532. removeAll = arguments.length === 0;
  70533. return domEach(this, function(i, el) {
  70534. if (!isTag(el)) return;
  70535. if (removeAll) {
  70536. // Short circuit the remove all case as this is the nice one
  70537. el.attribs.class = '';
  70538. } else {
  70539. var elClasses = splitClass(el.attribs.class),
  70540. index,
  70541. changed;
  70542. for (var j = 0; j < numClasses; j++) {
  70543. index = elClasses.indexOf(classes[j]);
  70544. if (index >= 0) {
  70545. elClasses.splice(index, 1);
  70546. changed = true;
  70547. // We have to do another pass to ensure that there are not duplicate
  70548. // classes listed
  70549. j--;
  70550. }
  70551. }
  70552. if (changed) {
  70553. el.attribs.class = elClasses.join(' ');
  70554. }
  70555. }
  70556. });
  70557. };
  70558. exports.toggleClass = function(value, stateVal) {
  70559. // Support functions
  70560. if (typeof value === 'function') {
  70561. return domEach(this, function(i, el) {
  70562. exports.toggleClass.call(
  70563. [el],
  70564. value.call(el, i, el.attribs['class'] || '', stateVal),
  70565. stateVal
  70566. );
  70567. });
  70568. }
  70569. // Return if no value or not a string or function
  70570. if (!value || typeof value !== 'string') return this;
  70571. var classNames = value.split(rspace),
  70572. numClasses = classNames.length,
  70573. state = typeof stateVal === 'boolean' ? stateVal ? 1 : -1 : 0,
  70574. numElements = this.length,
  70575. elementClasses,
  70576. index;
  70577. for (var i = 0; i < numElements; i++) {
  70578. // If selected element isn't a tag, move on
  70579. if (!isTag(this[i])) continue;
  70580. elementClasses = splitClass(this[i].attribs.class);
  70581. // Check if class already exists
  70582. for (var j = 0; j < numClasses; j++) {
  70583. // Check if the class name is currently defined
  70584. index = elementClasses.indexOf(classNames[j]);
  70585. // Add if stateValue === true or we are toggling and there is no value
  70586. if (state >= 0 && index < 0) {
  70587. elementClasses.push(classNames[j]);
  70588. } else if (state <= 0 && index >= 0) {
  70589. // Otherwise remove but only if the item exists
  70590. elementClasses.splice(index, 1);
  70591. }
  70592. }
  70593. this[i].attribs.class = elementClasses.join(' ');
  70594. }
  70595. return this;
  70596. };
  70597. exports.is = function (selector) {
  70598. if (selector) {
  70599. return this.filter(selector).length > 0;
  70600. }
  70601. return false;
  70602. };
  70603. /***/ }),
  70604. /* 719 */
  70605. /***/ (function(module, exports, __webpack_require__) {
  70606. var parse = __webpack_require__(720),
  70607. compile = __webpack_require__(721);
  70608. module.exports = function nthCheck(formula){
  70609. return compile(parse(formula));
  70610. };
  70611. module.exports.parse = parse;
  70612. module.exports.compile = compile;
  70613. /***/ }),
  70614. /* 720 */
  70615. /***/ (function(module, exports) {
  70616. module.exports = parse;
  70617. //following http://www.w3.org/TR/css3-selectors/#nth-child-pseudo
  70618. //[ ['-'|'+']? INTEGER? {N} [ S* ['-'|'+'] S* INTEGER ]?
  70619. var re_nthElement = /^([+\-]?\d*n)?\s*(?:([+\-]?)\s*(\d+))?$/;
  70620. /*
  70621. parses a nth-check formula, returns an array of two numbers
  70622. */
  70623. function parse(formula){
  70624. formula = formula.trim().toLowerCase();
  70625. if(formula === "even"){
  70626. return [2, 0];
  70627. } else if(formula === "odd"){
  70628. return [2, 1];
  70629. } else {
  70630. var parsed = formula.match(re_nthElement);
  70631. if(!parsed){
  70632. throw new SyntaxError("n-th rule couldn't be parsed ('" + formula + "')");
  70633. }
  70634. var a;
  70635. if(parsed[1]){
  70636. a = parseInt(parsed[1], 10);
  70637. if(isNaN(a)){
  70638. if(parsed[1].charAt(0) === "-") a = -1;
  70639. else a = 1;
  70640. }
  70641. } else a = 0;
  70642. return [
  70643. a,
  70644. parsed[3] ? parseInt((parsed[2] || "") + parsed[3], 10) : 0
  70645. ];
  70646. }
  70647. }
  70648. /***/ }),
  70649. /* 721 */
  70650. /***/ (function(module, exports, __webpack_require__) {
  70651. module.exports = compile;
  70652. var BaseFuncs = __webpack_require__(94),
  70653. trueFunc = BaseFuncs.trueFunc,
  70654. falseFunc = BaseFuncs.falseFunc;
  70655. /*
  70656. returns a function that checks if an elements index matches the given rule
  70657. highly optimized to return the fastest solution
  70658. */
  70659. function compile(parsed){
  70660. var a = parsed[0],
  70661. b = parsed[1] - 1;
  70662. //when b <= 0, a*n won't be possible for any matches when a < 0
  70663. //besides, the specification says that no element is matched when a and b are 0
  70664. if(b < 0 && a <= 0) return falseFunc;
  70665. //when a is in the range -1..1, it matches any element (so only b is checked)
  70666. if(a ===-1) return function(pos){ return pos <= b; };
  70667. if(a === 0) return function(pos){ return pos === b; };
  70668. //when b <= 0 and a === 1, they match any element
  70669. if(a === 1) return b < 0 ? trueFunc : function(pos){ return pos >= b; };
  70670. //when a > 0, modulo can be used to check if there is a match
  70671. var bMod = b % a;
  70672. if(bMod < 0) bMod += a;
  70673. if(a > 1){
  70674. return function(pos){
  70675. return pos >= b && pos % a === bMod;
  70676. };
  70677. }
  70678. a *= -1; //make `a` positive
  70679. return function(pos){
  70680. return pos <= b && pos % a === bMod;
  70681. };
  70682. }
  70683. /***/ }),
  70684. /* 722 */
  70685. /***/ (function(module, exports, __webpack_require__) {
  70686. /*
  70687. compiles a selector to an executable function
  70688. */
  70689. module.exports = compile;
  70690. module.exports.compileUnsafe = compileUnsafe;
  70691. module.exports.compileToken = compileToken;
  70692. var parse = __webpack_require__(723),
  70693. DomUtils = __webpack_require__(65),
  70694. isTag = DomUtils.isTag,
  70695. Rules = __webpack_require__(724),
  70696. sortRules = __webpack_require__(725),
  70697. BaseFuncs = __webpack_require__(94),
  70698. trueFunc = BaseFuncs.trueFunc,
  70699. falseFunc = BaseFuncs.falseFunc,
  70700. procedure = __webpack_require__(421);
  70701. function compile(selector, options, context){
  70702. var next = compileUnsafe(selector, options, context);
  70703. return wrap(next);
  70704. }
  70705. function wrap(next){
  70706. return function base(elem){
  70707. return isTag(elem) && next(elem);
  70708. };
  70709. }
  70710. function compileUnsafe(selector, options, context){
  70711. var token = parse(selector, options);
  70712. return compileToken(token, options, context);
  70713. }
  70714. function includesScopePseudo(t){
  70715. return t.type === "pseudo" && (
  70716. t.name === "scope" || (
  70717. Array.isArray(t.data) &&
  70718. t.data.some(function(data){
  70719. return data.some(includesScopePseudo);
  70720. })
  70721. )
  70722. );
  70723. }
  70724. var DESCENDANT_TOKEN = {type: "descendant"},
  70725. SCOPE_TOKEN = {type: "pseudo", name: "scope"},
  70726. PLACEHOLDER_ELEMENT = {},
  70727. getParent = DomUtils.getParent;
  70728. //CSS 4 Spec (Draft): 3.3.1. Absolutizing a Scope-relative Selector
  70729. //http://www.w3.org/TR/selectors4/#absolutizing
  70730. function absolutize(token, context){
  70731. //TODO better check if context is document
  70732. var hasContext = !!context && !!context.length && context.every(function(e){
  70733. return e === PLACEHOLDER_ELEMENT || !!getParent(e);
  70734. });
  70735. token.forEach(function(t){
  70736. if(t.length > 0 && isTraversal(t[0]) && t[0].type !== "descendant"){
  70737. //don't return in else branch
  70738. } else if(hasContext && !includesScopePseudo(t)){
  70739. t.unshift(DESCENDANT_TOKEN);
  70740. } else {
  70741. return;
  70742. }
  70743. t.unshift(SCOPE_TOKEN);
  70744. });
  70745. }
  70746. function compileToken(token, options, context){
  70747. token = token.filter(function(t){ return t.length > 0; });
  70748. token.forEach(sortRules);
  70749. var isArrayContext = Array.isArray(context);
  70750. context = (options && options.context) || context;
  70751. if(context && !isArrayContext) context = [context];
  70752. absolutize(token, context);
  70753. return token
  70754. .map(function(rules){ return compileRules(rules, options, context, isArrayContext); })
  70755. .reduce(reduceRules, falseFunc);
  70756. }
  70757. function isTraversal(t){
  70758. return procedure[t.type] < 0;
  70759. }
  70760. function compileRules(rules, options, context, isArrayContext){
  70761. var acceptSelf = (isArrayContext && rules[0].name === "scope" && rules[1].type === "descendant");
  70762. return rules.reduce(function(func, rule, index){
  70763. if(func === falseFunc) return func;
  70764. return Rules[rule.type](func, rule, options, context, acceptSelf && index === 1);
  70765. }, options && options.rootFunc || trueFunc);
  70766. }
  70767. function reduceRules(a, b){
  70768. if(b === falseFunc || a === trueFunc){
  70769. return a;
  70770. }
  70771. if(a === falseFunc || b === trueFunc){
  70772. return b;
  70773. }
  70774. return function combine(elem){
  70775. return a(elem) || b(elem);
  70776. };
  70777. }
  70778. //:not, :has and :matches have to compile selectors
  70779. //doing this in lib/pseudos.js would lead to circular dependencies,
  70780. //so we add them here
  70781. var Pseudos = __webpack_require__(175),
  70782. filters = Pseudos.filters,
  70783. existsOne = DomUtils.existsOne,
  70784. isTag = DomUtils.isTag,
  70785. getChildren = DomUtils.getChildren;
  70786. function containsTraversal(t){
  70787. return t.some(isTraversal);
  70788. }
  70789. filters.not = function(next, token, options, context){
  70790. var opts = {
  70791. xmlMode: !!(options && options.xmlMode),
  70792. strict: !!(options && options.strict)
  70793. };
  70794. if(opts.strict){
  70795. if(token.length > 1 || token.some(containsTraversal)){
  70796. throw new SyntaxError("complex selectors in :not aren't allowed in strict mode");
  70797. }
  70798. }
  70799. var func = compileToken(token, opts, context);
  70800. if(func === falseFunc) return next;
  70801. if(func === trueFunc) return falseFunc;
  70802. return function(elem){
  70803. return !func(elem) && next(elem);
  70804. };
  70805. };
  70806. filters.has = function(next, token, options){
  70807. var opts = {
  70808. xmlMode: !!(options && options.xmlMode),
  70809. strict: !!(options && options.strict)
  70810. };
  70811. //FIXME: Uses an array as a pointer to the current element (side effects)
  70812. var context = token.some(containsTraversal) ? [PLACEHOLDER_ELEMENT] : null;
  70813. var func = compileToken(token, opts, context);
  70814. if(func === falseFunc) return falseFunc;
  70815. if(func === trueFunc) return function(elem){
  70816. return getChildren(elem).some(isTag) && next(elem);
  70817. };
  70818. func = wrap(func);
  70819. if(context){
  70820. return function has(elem){
  70821. return next(elem) && (
  70822. (context[0] = elem), existsOne(func, getChildren(elem))
  70823. );
  70824. };
  70825. }
  70826. return function has(elem){
  70827. return next(elem) && existsOne(func, getChildren(elem));
  70828. };
  70829. };
  70830. filters.matches = function(next, token, options, context){
  70831. var opts = {
  70832. xmlMode: !!(options && options.xmlMode),
  70833. strict: !!(options && options.strict),
  70834. rootFunc: next
  70835. };
  70836. return compileToken(token, opts, context);
  70837. };
  70838. /***/ }),
  70839. /* 723 */
  70840. /***/ (function(module, exports, __webpack_require__) {
  70841. "use strict";
  70842. module.exports = parse;
  70843. var re_name = /^(?:\\.|[\w\-\u00c0-\uFFFF])+/,
  70844. re_escape = /\\([\da-f]{1,6}\s?|(\s)|.)/ig,
  70845. //modified version of https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L87
  70846. re_attr = /^\s*((?:\\.|[\w\u00c0-\uFFFF\-])+)\s*(?:(\S?)=\s*(?:(['"])(.*?)\3|(#?(?:\\.|[\w\u00c0-\uFFFF\-])*)|)|)\s*(i)?\]/;
  70847. var actionTypes = {
  70848. __proto__: null,
  70849. "undefined": "exists",
  70850. "": "equals",
  70851. "~": "element",
  70852. "^": "start",
  70853. "$": "end",
  70854. "*": "any",
  70855. "!": "not",
  70856. "|": "hyphen"
  70857. };
  70858. var simpleSelectors = {
  70859. __proto__: null,
  70860. ">": "child",
  70861. "<": "parent",
  70862. "~": "sibling",
  70863. "+": "adjacent"
  70864. };
  70865. var attribSelectors = {
  70866. __proto__: null,
  70867. "#": ["id", "equals"],
  70868. ".": ["class", "element"]
  70869. };
  70870. //pseudos, whose data-property is parsed as well
  70871. var unpackPseudos = {
  70872. __proto__: null,
  70873. "has": true,
  70874. "not": true,
  70875. "matches": true
  70876. };
  70877. var stripQuotesFromPseudos = {
  70878. __proto__: null,
  70879. "contains": true,
  70880. "icontains": true
  70881. };
  70882. var quotes = {
  70883. __proto__: null,
  70884. "\"": true,
  70885. "'": true
  70886. };
  70887. //unescape function taken from https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L139
  70888. function funescape( _, escaped, escapedWhitespace ) {
  70889. var high = "0x" + escaped - 0x10000;
  70890. // NaN means non-codepoint
  70891. // Support: Firefox
  70892. // Workaround erroneous numeric interpretation of +"0x"
  70893. return high !== high || escapedWhitespace ?
  70894. escaped :
  70895. // BMP codepoint
  70896. high < 0 ?
  70897. String.fromCharCode( high + 0x10000 ) :
  70898. // Supplemental Plane codepoint (surrogate pair)
  70899. String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
  70900. }
  70901. function unescapeCSS(str){
  70902. return str.replace(re_escape, funescape);
  70903. }
  70904. function isWhitespace(c){
  70905. return c === " " || c === "\n" || c === "\t" || c === "\f" || c === "\r";
  70906. }
  70907. function parse(selector, options){
  70908. var subselects = [];
  70909. selector = parseSelector(subselects, selector + "", options);
  70910. if(selector !== ""){
  70911. throw new SyntaxError("Unmatched selector: " + selector);
  70912. }
  70913. return subselects;
  70914. }
  70915. function parseSelector(subselects, selector, options){
  70916. var tokens = [],
  70917. sawWS = false,
  70918. data, firstChar, name, quot;
  70919. function getName(){
  70920. var sub = selector.match(re_name)[0];
  70921. selector = selector.substr(sub.length);
  70922. return unescapeCSS(sub);
  70923. }
  70924. function stripWhitespace(start){
  70925. while(isWhitespace(selector.charAt(start))) start++;
  70926. selector = selector.substr(start);
  70927. }
  70928. stripWhitespace(0);
  70929. while(selector !== ""){
  70930. firstChar = selector.charAt(0);
  70931. if(isWhitespace(firstChar)){
  70932. sawWS = true;
  70933. stripWhitespace(1);
  70934. } else if(firstChar in simpleSelectors){
  70935. tokens.push({type: simpleSelectors[firstChar]});
  70936. sawWS = false;
  70937. stripWhitespace(1);
  70938. } else if(firstChar === ","){
  70939. if(tokens.length === 0){
  70940. throw new SyntaxError("empty sub-selector");
  70941. }
  70942. subselects.push(tokens);
  70943. tokens = [];
  70944. sawWS = false;
  70945. stripWhitespace(1);
  70946. } else {
  70947. if(sawWS){
  70948. if(tokens.length > 0){
  70949. tokens.push({type: "descendant"});
  70950. }
  70951. sawWS = false;
  70952. }
  70953. if(firstChar === "*"){
  70954. selector = selector.substr(1);
  70955. tokens.push({type: "universal"});
  70956. } else if(firstChar in attribSelectors){
  70957. selector = selector.substr(1);
  70958. tokens.push({
  70959. type: "attribute",
  70960. name: attribSelectors[firstChar][0],
  70961. action: attribSelectors[firstChar][1],
  70962. value: getName(),
  70963. ignoreCase: false
  70964. });
  70965. } else if(firstChar === "["){
  70966. selector = selector.substr(1);
  70967. data = selector.match(re_attr);
  70968. if(!data){
  70969. throw new SyntaxError("Malformed attribute selector: " + selector);
  70970. }
  70971. selector = selector.substr(data[0].length);
  70972. name = unescapeCSS(data[1]);
  70973. if(
  70974. !options || (
  70975. "lowerCaseAttributeNames" in options ?
  70976. options.lowerCaseAttributeNames :
  70977. !options.xmlMode
  70978. )
  70979. ){
  70980. name = name.toLowerCase();
  70981. }
  70982. tokens.push({
  70983. type: "attribute",
  70984. name: name,
  70985. action: actionTypes[data[2]],
  70986. value: unescapeCSS(data[4] || data[5] || ""),
  70987. ignoreCase: !!data[6]
  70988. });
  70989. } else if(firstChar === ":"){
  70990. if(selector.charAt(1) === ":"){
  70991. selector = selector.substr(2);
  70992. tokens.push({type: "pseudo-element", name: getName().toLowerCase()});
  70993. continue;
  70994. }
  70995. selector = selector.substr(1);
  70996. name = getName().toLowerCase();
  70997. data = null;
  70998. if(selector.charAt(0) === "("){
  70999. if(name in unpackPseudos){
  71000. quot = selector.charAt(1);
  71001. var quoted = quot in quotes;
  71002. selector = selector.substr(quoted + 1);
  71003. data = [];
  71004. selector = parseSelector(data, selector, options);
  71005. if(quoted){
  71006. if(selector.charAt(0) !== quot){
  71007. throw new SyntaxError("unmatched quotes in :" + name);
  71008. } else {
  71009. selector = selector.substr(1);
  71010. }
  71011. }
  71012. if(selector.charAt(0) !== ")"){
  71013. throw new SyntaxError("missing closing parenthesis in :" + name + " " + selector);
  71014. }
  71015. selector = selector.substr(1);
  71016. } else {
  71017. var pos = 1, counter = 1;
  71018. for(; counter > 0 && pos < selector.length; pos++){
  71019. if(selector.charAt(pos) === "(") counter++;
  71020. else if(selector.charAt(pos) === ")") counter--;
  71021. }
  71022. if(counter){
  71023. throw new SyntaxError("parenthesis not matched");
  71024. }
  71025. data = selector.substr(1, pos - 2);
  71026. selector = selector.substr(pos);
  71027. if(name in stripQuotesFromPseudos){
  71028. quot = data.charAt(0);
  71029. if(quot === data.slice(-1) && quot in quotes){
  71030. data = data.slice(1, -1);
  71031. }
  71032. data = unescapeCSS(data);
  71033. }
  71034. }
  71035. }
  71036. tokens.push({type: "pseudo", name: name, data: data});
  71037. } else if(re_name.test(selector)){
  71038. name = getName();
  71039. if(!options || ("lowerCaseTags" in options ? options.lowerCaseTags : !options.xmlMode)){
  71040. name = name.toLowerCase();
  71041. }
  71042. tokens.push({type: "tag", name: name});
  71043. } else {
  71044. if(tokens.length && tokens[tokens.length - 1].type === "descendant"){
  71045. tokens.pop();
  71046. }
  71047. addToken(subselects, tokens);
  71048. return selector;
  71049. }
  71050. }
  71051. }
  71052. addToken(subselects, tokens);
  71053. return selector;
  71054. }
  71055. function addToken(subselects, tokens){
  71056. if(subselects.length > 0 && tokens.length === 0){
  71057. throw new SyntaxError("empty sub-selector");
  71058. }
  71059. subselects.push(tokens);
  71060. }
  71061. /***/ }),
  71062. /* 724 */
  71063. /***/ (function(module, exports, __webpack_require__) {
  71064. var DomUtils = __webpack_require__(65),
  71065. isTag = DomUtils.isTag,
  71066. getParent = DomUtils.getParent,
  71067. getChildren = DomUtils.getChildren,
  71068. getSiblings = DomUtils.getSiblings,
  71069. getName = DomUtils.getName;
  71070. /*
  71071. all available rules
  71072. */
  71073. module.exports = {
  71074. __proto__: null,
  71075. attribute: __webpack_require__(420).compile,
  71076. pseudo: __webpack_require__(175).compile,
  71077. //tags
  71078. tag: function(next, data){
  71079. var name = data.name;
  71080. return function tag(elem){
  71081. return getName(elem) === name && next(elem);
  71082. };
  71083. },
  71084. //traversal
  71085. descendant: function(next, rule, options, context, acceptSelf){
  71086. return function descendant(elem){
  71087. if (acceptSelf && next(elem)) return true;
  71088. var found = false;
  71089. while(!found && (elem = getParent(elem))){
  71090. found = next(elem);
  71091. }
  71092. return found;
  71093. };
  71094. },
  71095. parent: function(next, data, options){
  71096. if(options && options.strict) throw SyntaxError("Parent selector isn't part of CSS3");
  71097. return function parent(elem){
  71098. return getChildren(elem).some(test);
  71099. };
  71100. function test(elem){
  71101. return isTag(elem) && next(elem);
  71102. }
  71103. },
  71104. child: function(next){
  71105. return function child(elem){
  71106. var parent = getParent(elem);
  71107. return !!parent && next(parent);
  71108. };
  71109. },
  71110. sibling: function(next){
  71111. return function sibling(elem){
  71112. var siblings = getSiblings(elem);
  71113. for(var i = 0; i < siblings.length; i++){
  71114. if(isTag(siblings[i])){
  71115. if(siblings[i] === elem) break;
  71116. if(next(siblings[i])) return true;
  71117. }
  71118. }
  71119. return false;
  71120. };
  71121. },
  71122. adjacent: function(next){
  71123. return function adjacent(elem){
  71124. var siblings = getSiblings(elem),
  71125. lastElement;
  71126. for(var i = 0; i < siblings.length; i++){
  71127. if(isTag(siblings[i])){
  71128. if(siblings[i] === elem) break;
  71129. lastElement = siblings[i];
  71130. }
  71131. }
  71132. return !!lastElement && next(lastElement);
  71133. };
  71134. },
  71135. universal: function(next){
  71136. return next;
  71137. }
  71138. };
  71139. /***/ }),
  71140. /* 725 */
  71141. /***/ (function(module, exports, __webpack_require__) {
  71142. module.exports = sortByProcedure;
  71143. /*
  71144. sort the parts of the passed selector,
  71145. as there is potential for optimization
  71146. (some types of selectors are faster than others)
  71147. */
  71148. var procedure = __webpack_require__(421);
  71149. var attributes = {
  71150. __proto__: null,
  71151. exists: 10,
  71152. equals: 8,
  71153. not: 7,
  71154. start: 6,
  71155. end: 6,
  71156. any: 5,
  71157. hyphen: 4,
  71158. element: 4
  71159. };
  71160. function sortByProcedure(arr){
  71161. var procs = arr.map(getProcedure);
  71162. for(var i = 1; i < arr.length; i++){
  71163. var procNew = procs[i];
  71164. if(procNew < 0) continue;
  71165. for(var j = i - 1; j >= 0 && procNew < procs[j]; j--){
  71166. var token = arr[j + 1];
  71167. arr[j + 1] = arr[j];
  71168. arr[j] = token;
  71169. procs[j + 1] = procs[j];
  71170. procs[j] = procNew;
  71171. }
  71172. }
  71173. }
  71174. function getProcedure(token){
  71175. var proc = procedure[token.type];
  71176. if(proc === procedure.attribute){
  71177. proc = attributes[token.action];
  71178. if(proc === attributes.equals && token.name === "id"){
  71179. //prefer ID selectors (eg. #ID)
  71180. proc = 9;
  71181. }
  71182. if(token.ignoreCase){
  71183. //ignoreCase adds some overhead, prefer "normal" token
  71184. //this is a binary operation, to ensure it's still an int
  71185. proc >>= 1;
  71186. }
  71187. } else if(proc === procedure.pseudo){
  71188. if(!token.data){
  71189. proc = 3;
  71190. } else if(token.name === "has" || token.name === "contains"){
  71191. proc = 0; //expensive in any case
  71192. } else if(token.name === "matches" || token.name === "not"){
  71193. proc = 0;
  71194. for(var i = 0; i < token.data.length; i++){
  71195. //TODO better handling of complex selectors
  71196. if(token.data[i].length !== 1) continue;
  71197. var cur = getProcedure(token.data[i][0]);
  71198. //avoid executing :has or :contains
  71199. if(cur === 0){
  71200. proc = 0;
  71201. break;
  71202. }
  71203. if(cur > proc) proc = cur;
  71204. }
  71205. if(token.data.length > 1 && proc > 0) proc -= 1;
  71206. } else {
  71207. proc = 1;
  71208. }
  71209. }
  71210. return proc;
  71211. }
  71212. /***/ }),
  71213. /* 726 */
  71214. /***/ (function(module, exports, __webpack_require__) {
  71215. var baseMerge = __webpack_require__(727),
  71216. createAssigner = __webpack_require__(119);
  71217. /**
  71218. * This method is like `_.assign` except that it recursively merges own and
  71219. * inherited enumerable string keyed properties of source objects into the
  71220. * destination object. Source properties that resolve to `undefined` are
  71221. * skipped if a destination value exists. Array and plain object properties
  71222. * are merged recursively. Other objects and value types are overridden by
  71223. * assignment. Source objects are applied from left to right. Subsequent
  71224. * sources overwrite property assignments of previous sources.
  71225. *
  71226. * **Note:** This method mutates `object`.
  71227. *
  71228. * @static
  71229. * @memberOf _
  71230. * @since 0.5.0
  71231. * @category Object
  71232. * @param {Object} object The destination object.
  71233. * @param {...Object} [sources] The source objects.
  71234. * @returns {Object} Returns `object`.
  71235. * @example
  71236. *
  71237. * var object = {
  71238. * 'a': [{ 'b': 2 }, { 'd': 4 }]
  71239. * };
  71240. *
  71241. * var other = {
  71242. * 'a': [{ 'c': 3 }, { 'e': 5 }]
  71243. * };
  71244. *
  71245. * _.merge(object, other);
  71246. * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
  71247. */
  71248. var merge = createAssigner(function(object, source, srcIndex) {
  71249. baseMerge(object, source, srcIndex);
  71250. });
  71251. module.exports = merge;
  71252. /***/ }),
  71253. /* 727 */
  71254. /***/ (function(module, exports, __webpack_require__) {
  71255. var Stack = __webpack_require__(176),
  71256. assignMergeValue = __webpack_require__(422),
  71257. baseFor = __webpack_require__(417),
  71258. baseMergeDeep = __webpack_require__(750),
  71259. isObject = __webpack_require__(25),
  71260. keysIn = __webpack_require__(125);
  71261. /**
  71262. * The base implementation of `_.merge` without support for multiple sources.
  71263. *
  71264. * @private
  71265. * @param {Object} object The destination object.
  71266. * @param {Object} source The source object.
  71267. * @param {number} srcIndex The index of `source`.
  71268. * @param {Function} [customizer] The function to customize merged values.
  71269. * @param {Object} [stack] Tracks traversed source values and their merged
  71270. * counterparts.
  71271. */
  71272. function baseMerge(object, source, srcIndex, customizer, stack) {
  71273. if (object === source) {
  71274. return;
  71275. }
  71276. baseFor(source, function(srcValue, key) {
  71277. if (isObject(srcValue)) {
  71278. stack || (stack = new Stack);
  71279. baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
  71280. }
  71281. else {
  71282. var newValue = customizer
  71283. ? customizer(object[key], srcValue, (key + ''), object, source, stack)
  71284. : undefined;
  71285. if (newValue === undefined) {
  71286. newValue = srcValue;
  71287. }
  71288. assignMergeValue(object, key, newValue);
  71289. }
  71290. }, keysIn);
  71291. }
  71292. module.exports = baseMerge;
  71293. /***/ }),
  71294. /* 728 */
  71295. /***/ (function(module, exports) {
  71296. /**
  71297. * Removes all key-value entries from the list cache.
  71298. *
  71299. * @private
  71300. * @name clear
  71301. * @memberOf ListCache
  71302. */
  71303. function listCacheClear() {
  71304. this.__data__ = [];
  71305. this.size = 0;
  71306. }
  71307. module.exports = listCacheClear;
  71308. /***/ }),
  71309. /* 729 */
  71310. /***/ (function(module, exports, __webpack_require__) {
  71311. var assocIndexOf = __webpack_require__(131);
  71312. /** Used for built-in method references. */
  71313. var arrayProto = Array.prototype;
  71314. /** Built-in value references. */
  71315. var splice = arrayProto.splice;
  71316. /**
  71317. * Removes `key` and its value from the list cache.
  71318. *
  71319. * @private
  71320. * @name delete
  71321. * @memberOf ListCache
  71322. * @param {string} key The key of the value to remove.
  71323. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  71324. */
  71325. function listCacheDelete(key) {
  71326. var data = this.__data__,
  71327. index = assocIndexOf(data, key);
  71328. if (index < 0) {
  71329. return false;
  71330. }
  71331. var lastIndex = data.length - 1;
  71332. if (index == lastIndex) {
  71333. data.pop();
  71334. } else {
  71335. splice.call(data, index, 1);
  71336. }
  71337. --this.size;
  71338. return true;
  71339. }
  71340. module.exports = listCacheDelete;
  71341. /***/ }),
  71342. /* 730 */
  71343. /***/ (function(module, exports, __webpack_require__) {
  71344. var assocIndexOf = __webpack_require__(131);
  71345. /**
  71346. * Gets the list cache value for `key`.
  71347. *
  71348. * @private
  71349. * @name get
  71350. * @memberOf ListCache
  71351. * @param {string} key The key of the value to get.
  71352. * @returns {*} Returns the entry value.
  71353. */
  71354. function listCacheGet(key) {
  71355. var data = this.__data__,
  71356. index = assocIndexOf(data, key);
  71357. return index < 0 ? undefined : data[index][1];
  71358. }
  71359. module.exports = listCacheGet;
  71360. /***/ }),
  71361. /* 731 */
  71362. /***/ (function(module, exports, __webpack_require__) {
  71363. var assocIndexOf = __webpack_require__(131);
  71364. /**
  71365. * Checks if a list cache value for `key` exists.
  71366. *
  71367. * @private
  71368. * @name has
  71369. * @memberOf ListCache
  71370. * @param {string} key The key of the entry to check.
  71371. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  71372. */
  71373. function listCacheHas(key) {
  71374. return assocIndexOf(this.__data__, key) > -1;
  71375. }
  71376. module.exports = listCacheHas;
  71377. /***/ }),
  71378. /* 732 */
  71379. /***/ (function(module, exports, __webpack_require__) {
  71380. var assocIndexOf = __webpack_require__(131);
  71381. /**
  71382. * Sets the list cache `key` to `value`.
  71383. *
  71384. * @private
  71385. * @name set
  71386. * @memberOf ListCache
  71387. * @param {string} key The key of the value to set.
  71388. * @param {*} value The value to set.
  71389. * @returns {Object} Returns the list cache instance.
  71390. */
  71391. function listCacheSet(key, value) {
  71392. var data = this.__data__,
  71393. index = assocIndexOf(data, key);
  71394. if (index < 0) {
  71395. ++this.size;
  71396. data.push([key, value]);
  71397. } else {
  71398. data[index][1] = value;
  71399. }
  71400. return this;
  71401. }
  71402. module.exports = listCacheSet;
  71403. /***/ }),
  71404. /* 733 */
  71405. /***/ (function(module, exports, __webpack_require__) {
  71406. var ListCache = __webpack_require__(130);
  71407. /**
  71408. * Removes all key-value entries from the stack.
  71409. *
  71410. * @private
  71411. * @name clear
  71412. * @memberOf Stack
  71413. */
  71414. function stackClear() {
  71415. this.__data__ = new ListCache;
  71416. this.size = 0;
  71417. }
  71418. module.exports = stackClear;
  71419. /***/ }),
  71420. /* 734 */
  71421. /***/ (function(module, exports) {
  71422. /**
  71423. * Removes `key` and its value from the stack.
  71424. *
  71425. * @private
  71426. * @name delete
  71427. * @memberOf Stack
  71428. * @param {string} key The key of the value to remove.
  71429. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  71430. */
  71431. function stackDelete(key) {
  71432. var data = this.__data__,
  71433. result = data['delete'](key);
  71434. this.size = data.size;
  71435. return result;
  71436. }
  71437. module.exports = stackDelete;
  71438. /***/ }),
  71439. /* 735 */
  71440. /***/ (function(module, exports) {
  71441. /**
  71442. * Gets the stack value for `key`.
  71443. *
  71444. * @private
  71445. * @name get
  71446. * @memberOf Stack
  71447. * @param {string} key The key of the value to get.
  71448. * @returns {*} Returns the entry value.
  71449. */
  71450. function stackGet(key) {
  71451. return this.__data__.get(key);
  71452. }
  71453. module.exports = stackGet;
  71454. /***/ }),
  71455. /* 736 */
  71456. /***/ (function(module, exports) {
  71457. /**
  71458. * Checks if a stack value for `key` exists.
  71459. *
  71460. * @private
  71461. * @name has
  71462. * @memberOf Stack
  71463. * @param {string} key The key of the entry to check.
  71464. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  71465. */
  71466. function stackHas(key) {
  71467. return this.__data__.has(key);
  71468. }
  71469. module.exports = stackHas;
  71470. /***/ }),
  71471. /* 737 */
  71472. /***/ (function(module, exports, __webpack_require__) {
  71473. var ListCache = __webpack_require__(130),
  71474. Map = __webpack_require__(177),
  71475. MapCache = __webpack_require__(178);
  71476. /** Used as the size to enable large array optimizations. */
  71477. var LARGE_ARRAY_SIZE = 200;
  71478. /**
  71479. * Sets the stack `key` to `value`.
  71480. *
  71481. * @private
  71482. * @name set
  71483. * @memberOf Stack
  71484. * @param {string} key The key of the value to set.
  71485. * @param {*} value The value to set.
  71486. * @returns {Object} Returns the stack cache instance.
  71487. */
  71488. function stackSet(key, value) {
  71489. var data = this.__data__;
  71490. if (data instanceof ListCache) {
  71491. var pairs = data.__data__;
  71492. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  71493. pairs.push([key, value]);
  71494. this.size = ++data.size;
  71495. return this;
  71496. }
  71497. data = this.__data__ = new MapCache(pairs);
  71498. }
  71499. data.set(key, value);
  71500. this.size = data.size;
  71501. return this;
  71502. }
  71503. module.exports = stackSet;
  71504. /***/ }),
  71505. /* 738 */
  71506. /***/ (function(module, exports, __webpack_require__) {
  71507. var Hash = __webpack_require__(739),
  71508. ListCache = __webpack_require__(130),
  71509. Map = __webpack_require__(177);
  71510. /**
  71511. * Removes all key-value entries from the map.
  71512. *
  71513. * @private
  71514. * @name clear
  71515. * @memberOf MapCache
  71516. */
  71517. function mapCacheClear() {
  71518. this.size = 0;
  71519. this.__data__ = {
  71520. 'hash': new Hash,
  71521. 'map': new (Map || ListCache),
  71522. 'string': new Hash
  71523. };
  71524. }
  71525. module.exports = mapCacheClear;
  71526. /***/ }),
  71527. /* 739 */
  71528. /***/ (function(module, exports, __webpack_require__) {
  71529. var hashClear = __webpack_require__(740),
  71530. hashDelete = __webpack_require__(741),
  71531. hashGet = __webpack_require__(742),
  71532. hashHas = __webpack_require__(743),
  71533. hashSet = __webpack_require__(744);
  71534. /**
  71535. * Creates a hash object.
  71536. *
  71537. * @private
  71538. * @constructor
  71539. * @param {Array} [entries] The key-value pairs to cache.
  71540. */
  71541. function Hash(entries) {
  71542. var index = -1,
  71543. length = entries == null ? 0 : entries.length;
  71544. this.clear();
  71545. while (++index < length) {
  71546. var entry = entries[index];
  71547. this.set(entry[0], entry[1]);
  71548. }
  71549. }
  71550. // Add methods to `Hash`.
  71551. Hash.prototype.clear = hashClear;
  71552. Hash.prototype['delete'] = hashDelete;
  71553. Hash.prototype.get = hashGet;
  71554. Hash.prototype.has = hashHas;
  71555. Hash.prototype.set = hashSet;
  71556. module.exports = Hash;
  71557. /***/ }),
  71558. /* 740 */
  71559. /***/ (function(module, exports, __webpack_require__) {
  71560. var nativeCreate = __webpack_require__(132);
  71561. /**
  71562. * Removes all key-value entries from the hash.
  71563. *
  71564. * @private
  71565. * @name clear
  71566. * @memberOf Hash
  71567. */
  71568. function hashClear() {
  71569. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  71570. this.size = 0;
  71571. }
  71572. module.exports = hashClear;
  71573. /***/ }),
  71574. /* 741 */
  71575. /***/ (function(module, exports) {
  71576. /**
  71577. * Removes `key` and its value from the hash.
  71578. *
  71579. * @private
  71580. * @name delete
  71581. * @memberOf Hash
  71582. * @param {Object} hash The hash to modify.
  71583. * @param {string} key The key of the value to remove.
  71584. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  71585. */
  71586. function hashDelete(key) {
  71587. var result = this.has(key) && delete this.__data__[key];
  71588. this.size -= result ? 1 : 0;
  71589. return result;
  71590. }
  71591. module.exports = hashDelete;
  71592. /***/ }),
  71593. /* 742 */
  71594. /***/ (function(module, exports, __webpack_require__) {
  71595. var nativeCreate = __webpack_require__(132);
  71596. /** Used to stand-in for `undefined` hash values. */
  71597. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  71598. /** Used for built-in method references. */
  71599. var objectProto = Object.prototype;
  71600. /** Used to check objects for own properties. */
  71601. var hasOwnProperty = objectProto.hasOwnProperty;
  71602. /**
  71603. * Gets the hash value for `key`.
  71604. *
  71605. * @private
  71606. * @name get
  71607. * @memberOf Hash
  71608. * @param {string} key The key of the value to get.
  71609. * @returns {*} Returns the entry value.
  71610. */
  71611. function hashGet(key) {
  71612. var data = this.__data__;
  71613. if (nativeCreate) {
  71614. var result = data[key];
  71615. return result === HASH_UNDEFINED ? undefined : result;
  71616. }
  71617. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  71618. }
  71619. module.exports = hashGet;
  71620. /***/ }),
  71621. /* 743 */
  71622. /***/ (function(module, exports, __webpack_require__) {
  71623. var nativeCreate = __webpack_require__(132);
  71624. /** Used for built-in method references. */
  71625. var objectProto = Object.prototype;
  71626. /** Used to check objects for own properties. */
  71627. var hasOwnProperty = objectProto.hasOwnProperty;
  71628. /**
  71629. * Checks if a hash value for `key` exists.
  71630. *
  71631. * @private
  71632. * @name has
  71633. * @memberOf Hash
  71634. * @param {string} key The key of the entry to check.
  71635. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  71636. */
  71637. function hashHas(key) {
  71638. var data = this.__data__;
  71639. return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
  71640. }
  71641. module.exports = hashHas;
  71642. /***/ }),
  71643. /* 744 */
  71644. /***/ (function(module, exports, __webpack_require__) {
  71645. var nativeCreate = __webpack_require__(132);
  71646. /** Used to stand-in for `undefined` hash values. */
  71647. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  71648. /**
  71649. * Sets the hash `key` to `value`.
  71650. *
  71651. * @private
  71652. * @name set
  71653. * @memberOf Hash
  71654. * @param {string} key The key of the value to set.
  71655. * @param {*} value The value to set.
  71656. * @returns {Object} Returns the hash instance.
  71657. */
  71658. function hashSet(key, value) {
  71659. var data = this.__data__;
  71660. this.size += this.has(key) ? 0 : 1;
  71661. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  71662. return this;
  71663. }
  71664. module.exports = hashSet;
  71665. /***/ }),
  71666. /* 745 */
  71667. /***/ (function(module, exports, __webpack_require__) {
  71668. var getMapData = __webpack_require__(133);
  71669. /**
  71670. * Removes `key` and its value from the map.
  71671. *
  71672. * @private
  71673. * @name delete
  71674. * @memberOf MapCache
  71675. * @param {string} key The key of the value to remove.
  71676. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  71677. */
  71678. function mapCacheDelete(key) {
  71679. var result = getMapData(this, key)['delete'](key);
  71680. this.size -= result ? 1 : 0;
  71681. return result;
  71682. }
  71683. module.exports = mapCacheDelete;
  71684. /***/ }),
  71685. /* 746 */
  71686. /***/ (function(module, exports) {
  71687. /**
  71688. * Checks if `value` is suitable for use as unique object key.
  71689. *
  71690. * @private
  71691. * @param {*} value The value to check.
  71692. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  71693. */
  71694. function isKeyable(value) {
  71695. var type = typeof value;
  71696. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  71697. ? (value !== '__proto__')
  71698. : (value === null);
  71699. }
  71700. module.exports = isKeyable;
  71701. /***/ }),
  71702. /* 747 */
  71703. /***/ (function(module, exports, __webpack_require__) {
  71704. var getMapData = __webpack_require__(133);
  71705. /**
  71706. * Gets the map value for `key`.
  71707. *
  71708. * @private
  71709. * @name get
  71710. * @memberOf MapCache
  71711. * @param {string} key The key of the value to get.
  71712. * @returns {*} Returns the entry value.
  71713. */
  71714. function mapCacheGet(key) {
  71715. return getMapData(this, key).get(key);
  71716. }
  71717. module.exports = mapCacheGet;
  71718. /***/ }),
  71719. /* 748 */
  71720. /***/ (function(module, exports, __webpack_require__) {
  71721. var getMapData = __webpack_require__(133);
  71722. /**
  71723. * Checks if a map value for `key` exists.
  71724. *
  71725. * @private
  71726. * @name has
  71727. * @memberOf MapCache
  71728. * @param {string} key The key of the entry to check.
  71729. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  71730. */
  71731. function mapCacheHas(key) {
  71732. return getMapData(this, key).has(key);
  71733. }
  71734. module.exports = mapCacheHas;
  71735. /***/ }),
  71736. /* 749 */
  71737. /***/ (function(module, exports, __webpack_require__) {
  71738. var getMapData = __webpack_require__(133);
  71739. /**
  71740. * Sets the map `key` to `value`.
  71741. *
  71742. * @private
  71743. * @name set
  71744. * @memberOf MapCache
  71745. * @param {string} key The key of the value to set.
  71746. * @param {*} value The value to set.
  71747. * @returns {Object} Returns the map cache instance.
  71748. */
  71749. function mapCacheSet(key, value) {
  71750. var data = getMapData(this, key),
  71751. size = data.size;
  71752. data.set(key, value);
  71753. this.size += data.size == size ? 0 : 1;
  71754. return this;
  71755. }
  71756. module.exports = mapCacheSet;
  71757. /***/ }),
  71758. /* 750 */
  71759. /***/ (function(module, exports, __webpack_require__) {
  71760. var assignMergeValue = __webpack_require__(422),
  71761. cloneBuffer = __webpack_require__(751),
  71762. cloneTypedArray = __webpack_require__(752),
  71763. copyArray = __webpack_require__(172),
  71764. initCloneObject = __webpack_require__(754),
  71765. isArguments = __webpack_require__(124),
  71766. isArray = __webpack_require__(9),
  71767. isArrayLikeObject = __webpack_require__(755),
  71768. isBuffer = __webpack_require__(167),
  71769. isFunction = __webpack_require__(79),
  71770. isObject = __webpack_require__(25),
  71771. isPlainObject = __webpack_require__(756),
  71772. isTypedArray = __webpack_require__(168),
  71773. toPlainObject = __webpack_require__(757);
  71774. /**
  71775. * A specialized version of `baseMerge` for arrays and objects which performs
  71776. * deep merges and tracks traversed objects enabling objects with circular
  71777. * references to be merged.
  71778. *
  71779. * @private
  71780. * @param {Object} object The destination object.
  71781. * @param {Object} source The source object.
  71782. * @param {string} key The key of the value to merge.
  71783. * @param {number} srcIndex The index of `source`.
  71784. * @param {Function} mergeFunc The function to merge values.
  71785. * @param {Function} [customizer] The function to customize assigned values.
  71786. * @param {Object} [stack] Tracks traversed source values and their merged
  71787. * counterparts.
  71788. */
  71789. function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
  71790. var objValue = object[key],
  71791. srcValue = source[key],
  71792. stacked = stack.get(srcValue);
  71793. if (stacked) {
  71794. assignMergeValue(object, key, stacked);
  71795. return;
  71796. }
  71797. var newValue = customizer
  71798. ? customizer(objValue, srcValue, (key + ''), object, source, stack)
  71799. : undefined;
  71800. var isCommon = newValue === undefined;
  71801. if (isCommon) {
  71802. var isArr = isArray(srcValue),
  71803. isBuff = !isArr && isBuffer(srcValue),
  71804. isTyped = !isArr && !isBuff && isTypedArray(srcValue);
  71805. newValue = srcValue;
  71806. if (isArr || isBuff || isTyped) {
  71807. if (isArray(objValue)) {
  71808. newValue = objValue;
  71809. }
  71810. else if (isArrayLikeObject(objValue)) {
  71811. newValue = copyArray(objValue);
  71812. }
  71813. else if (isBuff) {
  71814. isCommon = false;
  71815. newValue = cloneBuffer(srcValue, true);
  71816. }
  71817. else if (isTyped) {
  71818. isCommon = false;
  71819. newValue = cloneTypedArray(srcValue, true);
  71820. }
  71821. else {
  71822. newValue = [];
  71823. }
  71824. }
  71825. else if (isPlainObject(srcValue) || isArguments(srcValue)) {
  71826. newValue = objValue;
  71827. if (isArguments(objValue)) {
  71828. newValue = toPlainObject(objValue);
  71829. }
  71830. else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
  71831. newValue = initCloneObject(srcValue);
  71832. }
  71833. }
  71834. else {
  71835. isCommon = false;
  71836. }
  71837. }
  71838. if (isCommon) {
  71839. // Recursively merge objects and arrays (susceptible to call stack limits).
  71840. stack.set(srcValue, newValue);
  71841. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  71842. stack['delete'](srcValue);
  71843. }
  71844. assignMergeValue(object, key, newValue);
  71845. }
  71846. module.exports = baseMergeDeep;
  71847. /***/ }),
  71848. /* 751 */
  71849. /***/ (function(module, exports, __webpack_require__) {
  71850. /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(19);
  71851. /** Detect free variable `exports`. */
  71852. var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
  71853. /** Detect free variable `module`. */
  71854. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  71855. /** Detect the popular CommonJS extension `module.exports`. */
  71856. var moduleExports = freeModule && freeModule.exports === freeExports;
  71857. /** Built-in value references. */
  71858. var Buffer = moduleExports ? root.Buffer : undefined,
  71859. allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
  71860. /**
  71861. * Creates a clone of `buffer`.
  71862. *
  71863. * @private
  71864. * @param {Buffer} buffer The buffer to clone.
  71865. * @param {boolean} [isDeep] Specify a deep clone.
  71866. * @returns {Buffer} Returns the cloned buffer.
  71867. */
  71868. function cloneBuffer(buffer, isDeep) {
  71869. if (isDeep) {
  71870. return buffer.slice();
  71871. }
  71872. var length = buffer.length,
  71873. result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  71874. buffer.copy(result);
  71875. return result;
  71876. }
  71877. module.exports = cloneBuffer;
  71878. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(58)(module)))
  71879. /***/ }),
  71880. /* 752 */
  71881. /***/ (function(module, exports, __webpack_require__) {
  71882. var cloneArrayBuffer = __webpack_require__(753);
  71883. /**
  71884. * Creates a clone of `typedArray`.
  71885. *
  71886. * @private
  71887. * @param {Object} typedArray The typed array to clone.
  71888. * @param {boolean} [isDeep] Specify a deep clone.
  71889. * @returns {Object} Returns the cloned typed array.
  71890. */
  71891. function cloneTypedArray(typedArray, isDeep) {
  71892. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  71893. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  71894. }
  71895. module.exports = cloneTypedArray;
  71896. /***/ }),
  71897. /* 753 */
  71898. /***/ (function(module, exports, __webpack_require__) {
  71899. var Uint8Array = __webpack_require__(423);
  71900. /**
  71901. * Creates a clone of `arrayBuffer`.
  71902. *
  71903. * @private
  71904. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  71905. * @returns {ArrayBuffer} Returns the cloned array buffer.
  71906. */
  71907. function cloneArrayBuffer(arrayBuffer) {
  71908. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  71909. new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  71910. return result;
  71911. }
  71912. module.exports = cloneArrayBuffer;
  71913. /***/ }),
  71914. /* 754 */
  71915. /***/ (function(module, exports, __webpack_require__) {
  71916. var baseCreate = __webpack_require__(127),
  71917. getPrototype = __webpack_require__(424),
  71918. isPrototype = __webpack_require__(123);
  71919. /**
  71920. * Initializes an object clone.
  71921. *
  71922. * @private
  71923. * @param {Object} object The object to clone.
  71924. * @returns {Object} Returns the initialized clone.
  71925. */
  71926. function initCloneObject(object) {
  71927. return (typeof object.constructor == 'function' && !isPrototype(object))
  71928. ? baseCreate(getPrototype(object))
  71929. : {};
  71930. }
  71931. module.exports = initCloneObject;
  71932. /***/ }),
  71933. /* 755 */
  71934. /***/ (function(module, exports, __webpack_require__) {
  71935. var isArrayLike = __webpack_require__(40),
  71936. isObjectLike = __webpack_require__(26);
  71937. /**
  71938. * This method is like `_.isArrayLike` except that it also checks if `value`
  71939. * is an object.
  71940. *
  71941. * @static
  71942. * @memberOf _
  71943. * @since 4.0.0
  71944. * @category Lang
  71945. * @param {*} value The value to check.
  71946. * @returns {boolean} Returns `true` if `value` is an array-like object,
  71947. * else `false`.
  71948. * @example
  71949. *
  71950. * _.isArrayLikeObject([1, 2, 3]);
  71951. * // => true
  71952. *
  71953. * _.isArrayLikeObject(document.body.children);
  71954. * // => true
  71955. *
  71956. * _.isArrayLikeObject('abc');
  71957. * // => false
  71958. *
  71959. * _.isArrayLikeObject(_.noop);
  71960. * // => false
  71961. */
  71962. function isArrayLikeObject(value) {
  71963. return isObjectLike(value) && isArrayLike(value);
  71964. }
  71965. module.exports = isArrayLikeObject;
  71966. /***/ }),
  71967. /* 756 */
  71968. /***/ (function(module, exports, __webpack_require__) {
  71969. var baseGetTag = __webpack_require__(44),
  71970. getPrototype = __webpack_require__(424),
  71971. isObjectLike = __webpack_require__(26);
  71972. /** `Object#toString` result references. */
  71973. var objectTag = '[object Object]';
  71974. /** Used for built-in method references. */
  71975. var funcProto = Function.prototype,
  71976. objectProto = Object.prototype;
  71977. /** Used to resolve the decompiled source of functions. */
  71978. var funcToString = funcProto.toString;
  71979. /** Used to check objects for own properties. */
  71980. var hasOwnProperty = objectProto.hasOwnProperty;
  71981. /** Used to infer the `Object` constructor. */
  71982. var objectCtorString = funcToString.call(Object);
  71983. /**
  71984. * Checks if `value` is a plain object, that is, an object created by the
  71985. * `Object` constructor or one with a `[[Prototype]]` of `null`.
  71986. *
  71987. * @static
  71988. * @memberOf _
  71989. * @since 0.8.0
  71990. * @category Lang
  71991. * @param {*} value The value to check.
  71992. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
  71993. * @example
  71994. *
  71995. * function Foo() {
  71996. * this.a = 1;
  71997. * }
  71998. *
  71999. * _.isPlainObject(new Foo);
  72000. * // => false
  72001. *
  72002. * _.isPlainObject([1, 2, 3]);
  72003. * // => false
  72004. *
  72005. * _.isPlainObject({ 'x': 0, 'y': 0 });
  72006. * // => true
  72007. *
  72008. * _.isPlainObject(Object.create(null));
  72009. * // => true
  72010. */
  72011. function isPlainObject(value) {
  72012. if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
  72013. return false;
  72014. }
  72015. var proto = getPrototype(value);
  72016. if (proto === null) {
  72017. return true;
  72018. }
  72019. var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
  72020. return typeof Ctor == 'function' && Ctor instanceof Ctor &&
  72021. funcToString.call(Ctor) == objectCtorString;
  72022. }
  72023. module.exports = isPlainObject;
  72024. /***/ }),
  72025. /* 757 */
  72026. /***/ (function(module, exports, __webpack_require__) {
  72027. var copyObject = __webpack_require__(118),
  72028. keysIn = __webpack_require__(125);
  72029. /**
  72030. * Converts `value` to a plain object flattening inherited enumerable string
  72031. * keyed properties of `value` to own properties of the plain object.
  72032. *
  72033. * @static
  72034. * @memberOf _
  72035. * @since 3.0.0
  72036. * @category Lang
  72037. * @param {*} value The value to convert.
  72038. * @returns {Object} Returns the converted plain object.
  72039. * @example
  72040. *
  72041. * function Foo() {
  72042. * this.b = 2;
  72043. * }
  72044. *
  72045. * Foo.prototype.c = 3;
  72046. *
  72047. * _.assign({ 'a': 1 }, new Foo);
  72048. * // => { 'a': 1, 'b': 2 }
  72049. *
  72050. * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
  72051. * // => { 'a': 1, 'b': 2, 'c': 3 }
  72052. */
  72053. function toPlainObject(value) {
  72054. return copyObject(value, keysIn(value));
  72055. }
  72056. module.exports = toPlainObject;
  72057. /***/ }),
  72058. /* 758 */
  72059. /***/ (function(module, exports, __webpack_require__) {
  72060. var baseIsMatch = __webpack_require__(759),
  72061. getMatchData = __webpack_require__(777),
  72062. matchesStrictComparable = __webpack_require__(431);
  72063. /**
  72064. * The base implementation of `_.matches` which doesn't clone `source`.
  72065. *
  72066. * @private
  72067. * @param {Object} source The object of property values to match.
  72068. * @returns {Function} Returns the new spec function.
  72069. */
  72070. function baseMatches(source) {
  72071. var matchData = getMatchData(source);
  72072. if (matchData.length == 1 && matchData[0][2]) {
  72073. return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  72074. }
  72075. return function(object) {
  72076. return object === source || baseIsMatch(object, source, matchData);
  72077. };
  72078. }
  72079. module.exports = baseMatches;
  72080. /***/ }),
  72081. /* 759 */
  72082. /***/ (function(module, exports, __webpack_require__) {
  72083. var Stack = __webpack_require__(176),
  72084. baseIsEqual = __webpack_require__(427);
  72085. /** Used to compose bitmasks for value comparisons. */
  72086. var COMPARE_PARTIAL_FLAG = 1,
  72087. COMPARE_UNORDERED_FLAG = 2;
  72088. /**
  72089. * The base implementation of `_.isMatch` without support for iteratee shorthands.
  72090. *
  72091. * @private
  72092. * @param {Object} object The object to inspect.
  72093. * @param {Object} source The object of property values to match.
  72094. * @param {Array} matchData The property names, values, and compare flags to match.
  72095. * @param {Function} [customizer] The function to customize comparisons.
  72096. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  72097. */
  72098. function baseIsMatch(object, source, matchData, customizer) {
  72099. var index = matchData.length,
  72100. length = index,
  72101. noCustomizer = !customizer;
  72102. if (object == null) {
  72103. return !length;
  72104. }
  72105. object = Object(object);
  72106. while (index--) {
  72107. var data = matchData[index];
  72108. if ((noCustomizer && data[2])
  72109. ? data[1] !== object[data[0]]
  72110. : !(data[0] in object)
  72111. ) {
  72112. return false;
  72113. }
  72114. }
  72115. while (++index < length) {
  72116. data = matchData[index];
  72117. var key = data[0],
  72118. objValue = object[key],
  72119. srcValue = data[1];
  72120. if (noCustomizer && data[2]) {
  72121. if (objValue === undefined && !(key in object)) {
  72122. return false;
  72123. }
  72124. } else {
  72125. var stack = new Stack;
  72126. if (customizer) {
  72127. var result = customizer(objValue, srcValue, key, object, source, stack);
  72128. }
  72129. if (!(result === undefined
  72130. ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
  72131. : result
  72132. )) {
  72133. return false;
  72134. }
  72135. }
  72136. }
  72137. return true;
  72138. }
  72139. module.exports = baseIsMatch;
  72140. /***/ }),
  72141. /* 760 */
  72142. /***/ (function(module, exports, __webpack_require__) {
  72143. var Stack = __webpack_require__(176),
  72144. equalArrays = __webpack_require__(428),
  72145. equalByTag = __webpack_require__(765),
  72146. equalObjects = __webpack_require__(768),
  72147. getTag = __webpack_require__(773),
  72148. isArray = __webpack_require__(9),
  72149. isBuffer = __webpack_require__(167),
  72150. isTypedArray = __webpack_require__(168);
  72151. /** Used to compose bitmasks for value comparisons. */
  72152. var COMPARE_PARTIAL_FLAG = 1;
  72153. /** `Object#toString` result references. */
  72154. var argsTag = '[object Arguments]',
  72155. arrayTag = '[object Array]',
  72156. objectTag = '[object Object]';
  72157. /** Used for built-in method references. */
  72158. var objectProto = Object.prototype;
  72159. /** Used to check objects for own properties. */
  72160. var hasOwnProperty = objectProto.hasOwnProperty;
  72161. /**
  72162. * A specialized version of `baseIsEqual` for arrays and objects which performs
  72163. * deep comparisons and tracks traversed objects enabling objects with circular
  72164. * references to be compared.
  72165. *
  72166. * @private
  72167. * @param {Object} object The object to compare.
  72168. * @param {Object} other The other object to compare.
  72169. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  72170. * @param {Function} customizer The function to customize comparisons.
  72171. * @param {Function} equalFunc The function to determine equivalents of values.
  72172. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  72173. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  72174. */
  72175. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  72176. var objIsArr = isArray(object),
  72177. othIsArr = isArray(other),
  72178. objTag = objIsArr ? arrayTag : getTag(object),
  72179. othTag = othIsArr ? arrayTag : getTag(other);
  72180. objTag = objTag == argsTag ? objectTag : objTag;
  72181. othTag = othTag == argsTag ? objectTag : othTag;
  72182. var objIsObj = objTag == objectTag,
  72183. othIsObj = othTag == objectTag,
  72184. isSameTag = objTag == othTag;
  72185. if (isSameTag && isBuffer(object)) {
  72186. if (!isBuffer(other)) {
  72187. return false;
  72188. }
  72189. objIsArr = true;
  72190. objIsObj = false;
  72191. }
  72192. if (isSameTag && !objIsObj) {
  72193. stack || (stack = new Stack);
  72194. return (objIsArr || isTypedArray(object))
  72195. ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
  72196. : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  72197. }
  72198. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  72199. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  72200. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  72201. if (objIsWrapped || othIsWrapped) {
  72202. var objUnwrapped = objIsWrapped ? object.value() : object,
  72203. othUnwrapped = othIsWrapped ? other.value() : other;
  72204. stack || (stack = new Stack);
  72205. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  72206. }
  72207. }
  72208. if (!isSameTag) {
  72209. return false;
  72210. }
  72211. stack || (stack = new Stack);
  72212. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  72213. }
  72214. module.exports = baseIsEqualDeep;
  72215. /***/ }),
  72216. /* 761 */
  72217. /***/ (function(module, exports, __webpack_require__) {
  72218. var MapCache = __webpack_require__(178),
  72219. setCacheAdd = __webpack_require__(762),
  72220. setCacheHas = __webpack_require__(763);
  72221. /**
  72222. *
  72223. * Creates an array cache object to store unique values.
  72224. *
  72225. * @private
  72226. * @constructor
  72227. * @param {Array} [values] The values to cache.
  72228. */
  72229. function SetCache(values) {
  72230. var index = -1,
  72231. length = values == null ? 0 : values.length;
  72232. this.__data__ = new MapCache;
  72233. while (++index < length) {
  72234. this.add(values[index]);
  72235. }
  72236. }
  72237. // Add methods to `SetCache`.
  72238. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  72239. SetCache.prototype.has = setCacheHas;
  72240. module.exports = SetCache;
  72241. /***/ }),
  72242. /* 762 */
  72243. /***/ (function(module, exports) {
  72244. /** Used to stand-in for `undefined` hash values. */
  72245. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  72246. /**
  72247. * Adds `value` to the array cache.
  72248. *
  72249. * @private
  72250. * @name add
  72251. * @memberOf SetCache
  72252. * @alias push
  72253. * @param {*} value The value to cache.
  72254. * @returns {Object} Returns the cache instance.
  72255. */
  72256. function setCacheAdd(value) {
  72257. this.__data__.set(value, HASH_UNDEFINED);
  72258. return this;
  72259. }
  72260. module.exports = setCacheAdd;
  72261. /***/ }),
  72262. /* 763 */
  72263. /***/ (function(module, exports) {
  72264. /**
  72265. * Checks if `value` is in the array cache.
  72266. *
  72267. * @private
  72268. * @name has
  72269. * @memberOf SetCache
  72270. * @param {*} value The value to search for.
  72271. * @returns {number} Returns `true` if `value` is found, else `false`.
  72272. */
  72273. function setCacheHas(value) {
  72274. return this.__data__.has(value);
  72275. }
  72276. module.exports = setCacheHas;
  72277. /***/ }),
  72278. /* 764 */
  72279. /***/ (function(module, exports) {
  72280. /**
  72281. * Checks if a `cache` value for `key` exists.
  72282. *
  72283. * @private
  72284. * @param {Object} cache The cache to query.
  72285. * @param {string} key The key of the entry to check.
  72286. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  72287. */
  72288. function cacheHas(cache, key) {
  72289. return cache.has(key);
  72290. }
  72291. module.exports = cacheHas;
  72292. /***/ }),
  72293. /* 765 */
  72294. /***/ (function(module, exports, __webpack_require__) {
  72295. var Symbol = __webpack_require__(80),
  72296. Uint8Array = __webpack_require__(423),
  72297. eq = __webpack_require__(67),
  72298. equalArrays = __webpack_require__(428),
  72299. mapToArray = __webpack_require__(766),
  72300. setToArray = __webpack_require__(767);
  72301. /** Used to compose bitmasks for value comparisons. */
  72302. var COMPARE_PARTIAL_FLAG = 1,
  72303. COMPARE_UNORDERED_FLAG = 2;
  72304. /** `Object#toString` result references. */
  72305. var boolTag = '[object Boolean]',
  72306. dateTag = '[object Date]',
  72307. errorTag = '[object Error]',
  72308. mapTag = '[object Map]',
  72309. numberTag = '[object Number]',
  72310. regexpTag = '[object RegExp]',
  72311. setTag = '[object Set]',
  72312. stringTag = '[object String]',
  72313. symbolTag = '[object Symbol]';
  72314. var arrayBufferTag = '[object ArrayBuffer]',
  72315. dataViewTag = '[object DataView]';
  72316. /** Used to convert symbols to primitives and strings. */
  72317. var symbolProto = Symbol ? Symbol.prototype : undefined,
  72318. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
  72319. /**
  72320. * A specialized version of `baseIsEqualDeep` for comparing objects of
  72321. * the same `toStringTag`.
  72322. *
  72323. * **Note:** This function only supports comparing values with tags of
  72324. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  72325. *
  72326. * @private
  72327. * @param {Object} object The object to compare.
  72328. * @param {Object} other The other object to compare.
  72329. * @param {string} tag The `toStringTag` of the objects to compare.
  72330. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  72331. * @param {Function} customizer The function to customize comparisons.
  72332. * @param {Function} equalFunc The function to determine equivalents of values.
  72333. * @param {Object} stack Tracks traversed `object` and `other` objects.
  72334. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  72335. */
  72336. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  72337. switch (tag) {
  72338. case dataViewTag:
  72339. if ((object.byteLength != other.byteLength) ||
  72340. (object.byteOffset != other.byteOffset)) {
  72341. return false;
  72342. }
  72343. object = object.buffer;
  72344. other = other.buffer;
  72345. case arrayBufferTag:
  72346. if ((object.byteLength != other.byteLength) ||
  72347. !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  72348. return false;
  72349. }
  72350. return true;
  72351. case boolTag:
  72352. case dateTag:
  72353. case numberTag:
  72354. // Coerce booleans to `1` or `0` and dates to milliseconds.
  72355. // Invalid dates are coerced to `NaN`.
  72356. return eq(+object, +other);
  72357. case errorTag:
  72358. return object.name == other.name && object.message == other.message;
  72359. case regexpTag:
  72360. case stringTag:
  72361. // Coerce regexes to strings and treat strings, primitives and objects,
  72362. // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  72363. // for more details.
  72364. return object == (other + '');
  72365. case mapTag:
  72366. var convert = mapToArray;
  72367. case setTag:
  72368. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  72369. convert || (convert = setToArray);
  72370. if (object.size != other.size && !isPartial) {
  72371. return false;
  72372. }
  72373. // Assume cyclic values are equal.
  72374. var stacked = stack.get(object);
  72375. if (stacked) {
  72376. return stacked == other;
  72377. }
  72378. bitmask |= COMPARE_UNORDERED_FLAG;
  72379. // Recursively compare objects (susceptible to call stack limits).
  72380. stack.set(object, other);
  72381. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  72382. stack['delete'](object);
  72383. return result;
  72384. case symbolTag:
  72385. if (symbolValueOf) {
  72386. return symbolValueOf.call(object) == symbolValueOf.call(other);
  72387. }
  72388. }
  72389. return false;
  72390. }
  72391. module.exports = equalByTag;
  72392. /***/ }),
  72393. /* 766 */
  72394. /***/ (function(module, exports) {
  72395. /**
  72396. * Converts `map` to its key-value pairs.
  72397. *
  72398. * @private
  72399. * @param {Object} map The map to convert.
  72400. * @returns {Array} Returns the key-value pairs.
  72401. */
  72402. function mapToArray(map) {
  72403. var index = -1,
  72404. result = Array(map.size);
  72405. map.forEach(function(value, key) {
  72406. result[++index] = [key, value];
  72407. });
  72408. return result;
  72409. }
  72410. module.exports = mapToArray;
  72411. /***/ }),
  72412. /* 767 */
  72413. /***/ (function(module, exports) {
  72414. /**
  72415. * Converts `set` to an array of its values.
  72416. *
  72417. * @private
  72418. * @param {Object} set The set to convert.
  72419. * @returns {Array} Returns the values.
  72420. */
  72421. function setToArray(set) {
  72422. var index = -1,
  72423. result = Array(set.size);
  72424. set.forEach(function(value) {
  72425. result[++index] = value;
  72426. });
  72427. return result;
  72428. }
  72429. module.exports = setToArray;
  72430. /***/ }),
  72431. /* 768 */
  72432. /***/ (function(module, exports, __webpack_require__) {
  72433. var getAllKeys = __webpack_require__(769);
  72434. /** Used to compose bitmasks for value comparisons. */
  72435. var COMPARE_PARTIAL_FLAG = 1;
  72436. /** Used for built-in method references. */
  72437. var objectProto = Object.prototype;
  72438. /** Used to check objects for own properties. */
  72439. var hasOwnProperty = objectProto.hasOwnProperty;
  72440. /**
  72441. * A specialized version of `baseIsEqualDeep` for objects with support for
  72442. * partial deep comparisons.
  72443. *
  72444. * @private
  72445. * @param {Object} object The object to compare.
  72446. * @param {Object} other The other object to compare.
  72447. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  72448. * @param {Function} customizer The function to customize comparisons.
  72449. * @param {Function} equalFunc The function to determine equivalents of values.
  72450. * @param {Object} stack Tracks traversed `object` and `other` objects.
  72451. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  72452. */
  72453. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  72454. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  72455. objProps = getAllKeys(object),
  72456. objLength = objProps.length,
  72457. othProps = getAllKeys(other),
  72458. othLength = othProps.length;
  72459. if (objLength != othLength && !isPartial) {
  72460. return false;
  72461. }
  72462. var index = objLength;
  72463. while (index--) {
  72464. var key = objProps[index];
  72465. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  72466. return false;
  72467. }
  72468. }
  72469. // Assume cyclic values are equal.
  72470. var stacked = stack.get(object);
  72471. if (stacked && stack.get(other)) {
  72472. return stacked == other;
  72473. }
  72474. var result = true;
  72475. stack.set(object, other);
  72476. stack.set(other, object);
  72477. var skipCtor = isPartial;
  72478. while (++index < objLength) {
  72479. key = objProps[index];
  72480. var objValue = object[key],
  72481. othValue = other[key];
  72482. if (customizer) {
  72483. var compared = isPartial
  72484. ? customizer(othValue, objValue, key, other, object, stack)
  72485. : customizer(objValue, othValue, key, object, other, stack);
  72486. }
  72487. // Recursively compare objects (susceptible to call stack limits).
  72488. if (!(compared === undefined
  72489. ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
  72490. : compared
  72491. )) {
  72492. result = false;
  72493. break;
  72494. }
  72495. skipCtor || (skipCtor = key == 'constructor');
  72496. }
  72497. if (result && !skipCtor) {
  72498. var objCtor = object.constructor,
  72499. othCtor = other.constructor;
  72500. // Non `Object` object instances with different constructors are not equal.
  72501. if (objCtor != othCtor &&
  72502. ('constructor' in object && 'constructor' in other) &&
  72503. !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
  72504. typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  72505. result = false;
  72506. }
  72507. }
  72508. stack['delete'](object);
  72509. stack['delete'](other);
  72510. return result;
  72511. }
  72512. module.exports = equalObjects;
  72513. /***/ }),
  72514. /* 769 */
  72515. /***/ (function(module, exports, __webpack_require__) {
  72516. var baseGetAllKeys = __webpack_require__(770),
  72517. getSymbols = __webpack_require__(771),
  72518. keys = __webpack_require__(91);
  72519. /**
  72520. * Creates an array of own enumerable property names and symbols of `object`.
  72521. *
  72522. * @private
  72523. * @param {Object} object The object to query.
  72524. * @returns {Array} Returns the array of property names and symbols.
  72525. */
  72526. function getAllKeys(object) {
  72527. return baseGetAllKeys(object, keys, getSymbols);
  72528. }
  72529. module.exports = getAllKeys;
  72530. /***/ }),
  72531. /* 770 */
  72532. /***/ (function(module, exports, __webpack_require__) {
  72533. var arrayPush = __webpack_require__(429),
  72534. isArray = __webpack_require__(9);
  72535. /**
  72536. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  72537. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  72538. * symbols of `object`.
  72539. *
  72540. * @private
  72541. * @param {Object} object The object to query.
  72542. * @param {Function} keysFunc The function to get the keys of `object`.
  72543. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  72544. * @returns {Array} Returns the array of property names and symbols.
  72545. */
  72546. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  72547. var result = keysFunc(object);
  72548. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  72549. }
  72550. module.exports = baseGetAllKeys;
  72551. /***/ }),
  72552. /* 771 */
  72553. /***/ (function(module, exports, __webpack_require__) {
  72554. var arrayFilter = __webpack_require__(179),
  72555. stubArray = __webpack_require__(772);
  72556. /** Used for built-in method references. */
  72557. var objectProto = Object.prototype;
  72558. /** Built-in value references. */
  72559. var propertyIsEnumerable = objectProto.propertyIsEnumerable;
  72560. /* Built-in method references for those with the same name as other `lodash` methods. */
  72561. var nativeGetSymbols = Object.getOwnPropertySymbols;
  72562. /**
  72563. * Creates an array of the own enumerable symbols of `object`.
  72564. *
  72565. * @private
  72566. * @param {Object} object The object to query.
  72567. * @returns {Array} Returns the array of symbols.
  72568. */
  72569. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  72570. if (object == null) {
  72571. return [];
  72572. }
  72573. object = Object(object);
  72574. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  72575. return propertyIsEnumerable.call(object, symbol);
  72576. });
  72577. };
  72578. module.exports = getSymbols;
  72579. /***/ }),
  72580. /* 772 */
  72581. /***/ (function(module, exports) {
  72582. /**
  72583. * This method returns a new empty array.
  72584. *
  72585. * @static
  72586. * @memberOf _
  72587. * @since 4.13.0
  72588. * @category Util
  72589. * @returns {Array} Returns the new empty array.
  72590. * @example
  72591. *
  72592. * var arrays = _.times(2, _.stubArray);
  72593. *
  72594. * console.log(arrays);
  72595. * // => [[], []]
  72596. *
  72597. * console.log(arrays[0] === arrays[1]);
  72598. * // => false
  72599. */
  72600. function stubArray() {
  72601. return [];
  72602. }
  72603. module.exports = stubArray;
  72604. /***/ }),
  72605. /* 773 */
  72606. /***/ (function(module, exports, __webpack_require__) {
  72607. var DataView = __webpack_require__(774),
  72608. Map = __webpack_require__(177),
  72609. Promise = __webpack_require__(775),
  72610. Set = __webpack_require__(776),
  72611. WeakMap = __webpack_require__(405),
  72612. baseGetTag = __webpack_require__(44),
  72613. toSource = __webpack_require__(396);
  72614. /** `Object#toString` result references. */
  72615. var mapTag = '[object Map]',
  72616. objectTag = '[object Object]',
  72617. promiseTag = '[object Promise]',
  72618. setTag = '[object Set]',
  72619. weakMapTag = '[object WeakMap]';
  72620. var dataViewTag = '[object DataView]';
  72621. /** Used to detect maps, sets, and weakmaps. */
  72622. var dataViewCtorString = toSource(DataView),
  72623. mapCtorString = toSource(Map),
  72624. promiseCtorString = toSource(Promise),
  72625. setCtorString = toSource(Set),
  72626. weakMapCtorString = toSource(WeakMap);
  72627. /**
  72628. * Gets the `toStringTag` of `value`.
  72629. *
  72630. * @private
  72631. * @param {*} value The value to query.
  72632. * @returns {string} Returns the `toStringTag`.
  72633. */
  72634. var getTag = baseGetTag;
  72635. // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  72636. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  72637. (Map && getTag(new Map) != mapTag) ||
  72638. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  72639. (Set && getTag(new Set) != setTag) ||
  72640. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  72641. getTag = function(value) {
  72642. var result = baseGetTag(value),
  72643. Ctor = result == objectTag ? value.constructor : undefined,
  72644. ctorString = Ctor ? toSource(Ctor) : '';
  72645. if (ctorString) {
  72646. switch (ctorString) {
  72647. case dataViewCtorString: return dataViewTag;
  72648. case mapCtorString: return mapTag;
  72649. case promiseCtorString: return promiseTag;
  72650. case setCtorString: return setTag;
  72651. case weakMapCtorString: return weakMapTag;
  72652. }
  72653. }
  72654. return result;
  72655. };
  72656. }
  72657. module.exports = getTag;
  72658. /***/ }),
  72659. /* 774 */
  72660. /***/ (function(module, exports, __webpack_require__) {
  72661. var getNative = __webpack_require__(49),
  72662. root = __webpack_require__(19);
  72663. /* Built-in method references that are verified to be native. */
  72664. var DataView = getNative(root, 'DataView');
  72665. module.exports = DataView;
  72666. /***/ }),
  72667. /* 775 */
  72668. /***/ (function(module, exports, __webpack_require__) {
  72669. var getNative = __webpack_require__(49),
  72670. root = __webpack_require__(19);
  72671. /* Built-in method references that are verified to be native. */
  72672. var Promise = getNative(root, 'Promise');
  72673. module.exports = Promise;
  72674. /***/ }),
  72675. /* 776 */
  72676. /***/ (function(module, exports, __webpack_require__) {
  72677. var getNative = __webpack_require__(49),
  72678. root = __webpack_require__(19);
  72679. /* Built-in method references that are verified to be native. */
  72680. var Set = getNative(root, 'Set');
  72681. module.exports = Set;
  72682. /***/ }),
  72683. /* 777 */
  72684. /***/ (function(module, exports, __webpack_require__) {
  72685. var isStrictComparable = __webpack_require__(430),
  72686. keys = __webpack_require__(91);
  72687. /**
  72688. * Gets the property names, values, and compare flags of `object`.
  72689. *
  72690. * @private
  72691. * @param {Object} object The object to query.
  72692. * @returns {Array} Returns the match data of `object`.
  72693. */
  72694. function getMatchData(object) {
  72695. var result = keys(object),
  72696. length = result.length;
  72697. while (length--) {
  72698. var key = result[length],
  72699. value = object[key];
  72700. result[length] = [key, value, isStrictComparable(value)];
  72701. }
  72702. return result;
  72703. }
  72704. module.exports = getMatchData;
  72705. /***/ }),
  72706. /* 778 */
  72707. /***/ (function(module, exports, __webpack_require__) {
  72708. var baseIsEqual = __webpack_require__(427),
  72709. get = __webpack_require__(779),
  72710. hasIn = __webpack_require__(432),
  72711. isKey = __webpack_require__(181),
  72712. isStrictComparable = __webpack_require__(430),
  72713. matchesStrictComparable = __webpack_require__(431),
  72714. toKey = __webpack_require__(95);
  72715. /** Used to compose bitmasks for value comparisons. */
  72716. var COMPARE_PARTIAL_FLAG = 1,
  72717. COMPARE_UNORDERED_FLAG = 2;
  72718. /**
  72719. * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
  72720. *
  72721. * @private
  72722. * @param {string} path The path of the property to get.
  72723. * @param {*} srcValue The value to match.
  72724. * @returns {Function} Returns the new spec function.
  72725. */
  72726. function baseMatchesProperty(path, srcValue) {
  72727. if (isKey(path) && isStrictComparable(srcValue)) {
  72728. return matchesStrictComparable(toKey(path), srcValue);
  72729. }
  72730. return function(object) {
  72731. var objValue = get(object, path);
  72732. return (objValue === undefined && objValue === srcValue)
  72733. ? hasIn(object, path)
  72734. : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  72735. };
  72736. }
  72737. module.exports = baseMatchesProperty;
  72738. /***/ }),
  72739. /* 779 */
  72740. /***/ (function(module, exports, __webpack_require__) {
  72741. var baseGet = __webpack_require__(180);
  72742. /**
  72743. * Gets the value at `path` of `object`. If the resolved value is
  72744. * `undefined`, the `defaultValue` is returned in its place.
  72745. *
  72746. * @static
  72747. * @memberOf _
  72748. * @since 3.7.0
  72749. * @category Object
  72750. * @param {Object} object The object to query.
  72751. * @param {Array|string} path The path of the property to get.
  72752. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  72753. * @returns {*} Returns the resolved value.
  72754. * @example
  72755. *
  72756. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  72757. *
  72758. * _.get(object, 'a[0].b.c');
  72759. * // => 3
  72760. *
  72761. * _.get(object, ['a', '0', 'b', 'c']);
  72762. * // => 3
  72763. *
  72764. * _.get(object, 'a.b.c', 'default');
  72765. * // => 'default'
  72766. */
  72767. function get(object, path, defaultValue) {
  72768. var result = object == null ? undefined : baseGet(object, path);
  72769. return result === undefined ? defaultValue : result;
  72770. }
  72771. module.exports = get;
  72772. /***/ }),
  72773. /* 780 */
  72774. /***/ (function(module, exports, __webpack_require__) {
  72775. var memoizeCapped = __webpack_require__(781);
  72776. /** Used to match property names within property paths. */
  72777. var reLeadingDot = /^\./,
  72778. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  72779. /** Used to match backslashes in property paths. */
  72780. var reEscapeChar = /\\(\\)?/g;
  72781. /**
  72782. * Converts `string` to a property path array.
  72783. *
  72784. * @private
  72785. * @param {string} string The string to convert.
  72786. * @returns {Array} Returns the property path array.
  72787. */
  72788. var stringToPath = memoizeCapped(function(string) {
  72789. var result = [];
  72790. if (reLeadingDot.test(string)) {
  72791. result.push('');
  72792. }
  72793. string.replace(rePropName, function(match, number, quote, string) {
  72794. result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
  72795. });
  72796. return result;
  72797. });
  72798. module.exports = stringToPath;
  72799. /***/ }),
  72800. /* 781 */
  72801. /***/ (function(module, exports, __webpack_require__) {
  72802. var memoize = __webpack_require__(782);
  72803. /** Used as the maximum memoize cache size. */
  72804. var MAX_MEMOIZE_SIZE = 500;
  72805. /**
  72806. * A specialized version of `_.memoize` which clears the memoized function's
  72807. * cache when it exceeds `MAX_MEMOIZE_SIZE`.
  72808. *
  72809. * @private
  72810. * @param {Function} func The function to have its output memoized.
  72811. * @returns {Function} Returns the new memoized function.
  72812. */
  72813. function memoizeCapped(func) {
  72814. var result = memoize(func, function(key) {
  72815. if (cache.size === MAX_MEMOIZE_SIZE) {
  72816. cache.clear();
  72817. }
  72818. return key;
  72819. });
  72820. var cache = result.cache;
  72821. return result;
  72822. }
  72823. module.exports = memoizeCapped;
  72824. /***/ }),
  72825. /* 782 */
  72826. /***/ (function(module, exports, __webpack_require__) {
  72827. var MapCache = __webpack_require__(178);
  72828. /** Error message constants. */
  72829. var FUNC_ERROR_TEXT = 'Expected a function';
  72830. /**
  72831. * Creates a function that memoizes the result of `func`. If `resolver` is
  72832. * provided, it determines the cache key for storing the result based on the
  72833. * arguments provided to the memoized function. By default, the first argument
  72834. * provided to the memoized function is used as the map cache key. The `func`
  72835. * is invoked with the `this` binding of the memoized function.
  72836. *
  72837. * **Note:** The cache is exposed as the `cache` property on the memoized
  72838. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  72839. * constructor with one whose instances implement the
  72840. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  72841. * method interface of `clear`, `delete`, `get`, `has`, and `set`.
  72842. *
  72843. * @static
  72844. * @memberOf _
  72845. * @since 0.1.0
  72846. * @category Function
  72847. * @param {Function} func The function to have its output memoized.
  72848. * @param {Function} [resolver] The function to resolve the cache key.
  72849. * @returns {Function} Returns the new memoized function.
  72850. * @example
  72851. *
  72852. * var object = { 'a': 1, 'b': 2 };
  72853. * var other = { 'c': 3, 'd': 4 };
  72854. *
  72855. * var values = _.memoize(_.values);
  72856. * values(object);
  72857. * // => [1, 2]
  72858. *
  72859. * values(other);
  72860. * // => [3, 4]
  72861. *
  72862. * object.a = 2;
  72863. * values(object);
  72864. * // => [1, 2]
  72865. *
  72866. * // Modify the result cache.
  72867. * values.cache.set(object, ['a', 'b']);
  72868. * values(object);
  72869. * // => ['a', 'b']
  72870. *
  72871. * // Replace `_.memoize.Cache`.
  72872. * _.memoize.Cache = WeakMap;
  72873. */
  72874. function memoize(func, resolver) {
  72875. if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
  72876. throw new TypeError(FUNC_ERROR_TEXT);
  72877. }
  72878. var memoized = function() {
  72879. var args = arguments,
  72880. key = resolver ? resolver.apply(this, args) : args[0],
  72881. cache = memoized.cache;
  72882. if (cache.has(key)) {
  72883. return cache.get(key);
  72884. }
  72885. var result = func.apply(this, args);
  72886. memoized.cache = cache.set(key, result) || cache;
  72887. return result;
  72888. };
  72889. memoized.cache = new (memoize.Cache || MapCache);
  72890. return memoized;
  72891. }
  72892. // Expose `MapCache`.
  72893. memoize.Cache = MapCache;
  72894. module.exports = memoize;
  72895. /***/ }),
  72896. /* 783 */
  72897. /***/ (function(module, exports, __webpack_require__) {
  72898. var baseToString = __webpack_require__(784);
  72899. /**
  72900. * Converts `value` to a string. An empty string is returned for `null`
  72901. * and `undefined` values. The sign of `-0` is preserved.
  72902. *
  72903. * @static
  72904. * @memberOf _
  72905. * @since 4.0.0
  72906. * @category Lang
  72907. * @param {*} value The value to convert.
  72908. * @returns {string} Returns the converted string.
  72909. * @example
  72910. *
  72911. * _.toString(null);
  72912. * // => ''
  72913. *
  72914. * _.toString(-0);
  72915. * // => '-0'
  72916. *
  72917. * _.toString([1, 2, 3]);
  72918. * // => '1,2,3'
  72919. */
  72920. function toString(value) {
  72921. return value == null ? '' : baseToString(value);
  72922. }
  72923. module.exports = toString;
  72924. /***/ }),
  72925. /* 784 */
  72926. /***/ (function(module, exports, __webpack_require__) {
  72927. var Symbol = __webpack_require__(80),
  72928. arrayMap = __webpack_require__(135),
  72929. isArray = __webpack_require__(9),
  72930. isSymbol = __webpack_require__(93);
  72931. /** Used as references for various `Number` constants. */
  72932. var INFINITY = 1 / 0;
  72933. /** Used to convert symbols to primitives and strings. */
  72934. var symbolProto = Symbol ? Symbol.prototype : undefined,
  72935. symbolToString = symbolProto ? symbolProto.toString : undefined;
  72936. /**
  72937. * The base implementation of `_.toString` which doesn't convert nullish
  72938. * values to empty strings.
  72939. *
  72940. * @private
  72941. * @param {*} value The value to process.
  72942. * @returns {string} Returns the string.
  72943. */
  72944. function baseToString(value) {
  72945. // Exit early for strings to avoid a performance hit in some environments.
  72946. if (typeof value == 'string') {
  72947. return value;
  72948. }
  72949. if (isArray(value)) {
  72950. // Recursively convert values (susceptible to call stack limits).
  72951. return arrayMap(value, baseToString) + '';
  72952. }
  72953. if (isSymbol(value)) {
  72954. return symbolToString ? symbolToString.call(value) : '';
  72955. }
  72956. var result = (value + '');
  72957. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  72958. }
  72959. module.exports = baseToString;
  72960. /***/ }),
  72961. /* 785 */
  72962. /***/ (function(module, exports) {
  72963. /**
  72964. * The base implementation of `_.hasIn` without support for deep paths.
  72965. *
  72966. * @private
  72967. * @param {Object} [object] The object to query.
  72968. * @param {Array|string} key The key to check.
  72969. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  72970. */
  72971. function baseHasIn(object, key) {
  72972. return object != null && key in Object(object);
  72973. }
  72974. module.exports = baseHasIn;
  72975. /***/ }),
  72976. /* 786 */
  72977. /***/ (function(module, exports, __webpack_require__) {
  72978. var castPath = __webpack_require__(134),
  72979. isArguments = __webpack_require__(124),
  72980. isArray = __webpack_require__(9),
  72981. isIndex = __webpack_require__(90),
  72982. isLength = __webpack_require__(166),
  72983. toKey = __webpack_require__(95);
  72984. /**
  72985. * Checks if `path` exists on `object`.
  72986. *
  72987. * @private
  72988. * @param {Object} object The object to query.
  72989. * @param {Array|string} path The path to check.
  72990. * @param {Function} hasFunc The function to check properties.
  72991. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  72992. */
  72993. function hasPath(object, path, hasFunc) {
  72994. path = castPath(path, object);
  72995. var index = -1,
  72996. length = path.length,
  72997. result = false;
  72998. while (++index < length) {
  72999. var key = toKey(path[index]);
  73000. if (!(result = object != null && hasFunc(object, key))) {
  73001. break;
  73002. }
  73003. object = object[key];
  73004. }
  73005. if (result || ++index != length) {
  73006. return result;
  73007. }
  73008. length = object == null ? 0 : object.length;
  73009. return !!length && isLength(length) && isIndex(key, length) &&
  73010. (isArray(object) || isArguments(object));
  73011. }
  73012. module.exports = hasPath;
  73013. /***/ }),
  73014. /* 787 */
  73015. /***/ (function(module, exports, __webpack_require__) {
  73016. var baseProperty = __webpack_require__(788),
  73017. basePropertyDeep = __webpack_require__(789),
  73018. isKey = __webpack_require__(181),
  73019. toKey = __webpack_require__(95);
  73020. /**
  73021. * Creates a function that returns the value at `path` of a given object.
  73022. *
  73023. * @static
  73024. * @memberOf _
  73025. * @since 2.4.0
  73026. * @category Util
  73027. * @param {Array|string} path The path of the property to get.
  73028. * @returns {Function} Returns the new accessor function.
  73029. * @example
  73030. *
  73031. * var objects = [
  73032. * { 'a': { 'b': 2 } },
  73033. * { 'a': { 'b': 1 } }
  73034. * ];
  73035. *
  73036. * _.map(objects, _.property('a.b'));
  73037. * // => [2, 1]
  73038. *
  73039. * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
  73040. * // => [1, 2]
  73041. */
  73042. function property(path) {
  73043. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  73044. }
  73045. module.exports = property;
  73046. /***/ }),
  73047. /* 788 */
  73048. /***/ (function(module, exports) {
  73049. /**
  73050. * The base implementation of `_.property` without support for deep paths.
  73051. *
  73052. * @private
  73053. * @param {string} key The key of the property to get.
  73054. * @returns {Function} Returns the new accessor function.
  73055. */
  73056. function baseProperty(key) {
  73057. return function(object) {
  73058. return object == null ? undefined : object[key];
  73059. };
  73060. }
  73061. module.exports = baseProperty;
  73062. /***/ }),
  73063. /* 789 */
  73064. /***/ (function(module, exports, __webpack_require__) {
  73065. var baseGet = __webpack_require__(180);
  73066. /**
  73067. * A specialized version of `baseProperty` which supports deep paths.
  73068. *
  73069. * @private
  73070. * @param {Array|string} path The path of the property to get.
  73071. * @returns {Function} Returns the new accessor function.
  73072. */
  73073. function basePropertyDeep(path) {
  73074. return function(object) {
  73075. return baseGet(object, path);
  73076. };
  73077. }
  73078. module.exports = basePropertyDeep;
  73079. /***/ }),
  73080. /* 790 */
  73081. /***/ (function(module, exports, __webpack_require__) {
  73082. var baseEach = __webpack_require__(69);
  73083. /**
  73084. * The base implementation of `_.some` without support for iteratee shorthands.
  73085. *
  73086. * @private
  73087. * @param {Array|Object} collection The collection to iterate over.
  73088. * @param {Function} predicate The function invoked per iteration.
  73089. * @returns {boolean} Returns `true` if any element passes the predicate check,
  73090. * else `false`.
  73091. */
  73092. function baseSome(collection, predicate) {
  73093. var result;
  73094. baseEach(collection, function(value, index, collection) {
  73095. result = predicate(value, index, collection);
  73096. return !result;
  73097. });
  73098. return !!result;
  73099. }
  73100. module.exports = baseSome;
  73101. /***/ }),
  73102. /* 791 */
  73103. /***/ (function(module, exports, __webpack_require__) {
  73104. var select = __webpack_require__(419),
  73105. utils = __webpack_require__(92),
  73106. domEach = utils.domEach,
  73107. uniqueSort = __webpack_require__(63).DomUtils.uniqueSort,
  73108. isTag = utils.isTag,
  73109. _ = {
  73110. bind: __webpack_require__(169),
  73111. forEach: __webpack_require__(129),
  73112. reject: __webpack_require__(792),
  73113. filter: __webpack_require__(794),
  73114. reduce: __webpack_require__(795)
  73115. };
  73116. exports.find = function(selectorOrHaystack) {
  73117. var elems = _.reduce(this, function(memo, elem) {
  73118. return memo.concat(_.filter(elem.children, isTag));
  73119. }, []);
  73120. var contains = this.constructor.contains;
  73121. var haystack;
  73122. if (selectorOrHaystack && typeof selectorOrHaystack !== 'string') {
  73123. if (selectorOrHaystack.cheerio) {
  73124. haystack = selectorOrHaystack.get();
  73125. } else {
  73126. haystack = [selectorOrHaystack];
  73127. }
  73128. return this._make(haystack.filter(function(elem) {
  73129. var idx, len;
  73130. for (idx = 0, len = this.length; idx < len; ++idx) {
  73131. if (contains(this[idx], elem)) {
  73132. return true;
  73133. }
  73134. }
  73135. }, this));
  73136. }
  73137. var options = {__proto__: this.options, context: this.toArray()};
  73138. return this._make(select(selectorOrHaystack, elems, options));
  73139. };
  73140. // Get the parent of each element in the current set of matched elements,
  73141. // optionally filtered by a selector.
  73142. exports.parent = function(selector) {
  73143. var set = [];
  73144. domEach(this, function(idx, elem) {
  73145. var parentElem = elem.parent;
  73146. if (parentElem && set.indexOf(parentElem) < 0) {
  73147. set.push(parentElem);
  73148. }
  73149. });
  73150. if (arguments.length) {
  73151. set = exports.filter.call(set, selector, this);
  73152. }
  73153. return this._make(set);
  73154. };
  73155. exports.parents = function(selector) {
  73156. var parentNodes = [];
  73157. // When multiple DOM elements are in the original set, the resulting set will
  73158. // be in *reverse* order of the original elements as well, with duplicates
  73159. // removed.
  73160. this.get().reverse().forEach(function(elem) {
  73161. traverseParents(this, elem.parent, selector, Infinity)
  73162. .forEach(function(node) {
  73163. if (parentNodes.indexOf(node) === -1) {
  73164. parentNodes.push(node);
  73165. }
  73166. }
  73167. );
  73168. }, this);
  73169. return this._make(parentNodes);
  73170. };
  73171. exports.parentsUntil = function(selector, filter) {
  73172. var parentNodes = [], untilNode, untilNodes;
  73173. if (typeof selector === 'string') {
  73174. untilNode = select(selector, this.parents().toArray(), this.options)[0];
  73175. } else if (selector && selector.cheerio) {
  73176. untilNodes = selector.toArray();
  73177. } else if (selector) {
  73178. untilNode = selector;
  73179. }
  73180. // When multiple DOM elements are in the original set, the resulting set will
  73181. // be in *reverse* order of the original elements as well, with duplicates
  73182. // removed.
  73183. this.toArray().reverse().forEach(function(elem) {
  73184. while ((elem = elem.parent)) {
  73185. if ((untilNode && elem !== untilNode) ||
  73186. (untilNodes && untilNodes.indexOf(elem) === -1) ||
  73187. (!untilNode && !untilNodes)) {
  73188. if (isTag(elem) && parentNodes.indexOf(elem) === -1) { parentNodes.push(elem); }
  73189. } else {
  73190. break;
  73191. }
  73192. }
  73193. }, this);
  73194. return this._make(filter ? select(filter, parentNodes, this.options) : parentNodes);
  73195. };
  73196. // For each element in the set, get the first element that matches the selector
  73197. // by testing the element itself and traversing up through its ancestors in the
  73198. // DOM tree.
  73199. exports.closest = function(selector) {
  73200. var set = [];
  73201. if (!selector) {
  73202. return this._make(set);
  73203. }
  73204. domEach(this, function(idx, elem) {
  73205. var closestElem = traverseParents(this, elem, selector, 1)[0];
  73206. // Do not add duplicate elements to the set
  73207. if (closestElem && set.indexOf(closestElem) < 0) {
  73208. set.push(closestElem);
  73209. }
  73210. }.bind(this));
  73211. return this._make(set);
  73212. };
  73213. exports.next = function(selector) {
  73214. if (!this[0]) { return this; }
  73215. var elems = [];
  73216. _.forEach(this, function(elem) {
  73217. while ((elem = elem.next)) {
  73218. if (isTag(elem)) {
  73219. elems.push(elem);
  73220. return;
  73221. }
  73222. }
  73223. });
  73224. return selector ?
  73225. exports.filter.call(elems, selector, this) :
  73226. this._make(elems);
  73227. };
  73228. exports.nextAll = function(selector) {
  73229. if (!this[0]) { return this; }
  73230. var elems = [];
  73231. _.forEach(this, function(elem) {
  73232. while ((elem = elem.next)) {
  73233. if (isTag(elem) && elems.indexOf(elem) === -1) {
  73234. elems.push(elem);
  73235. }
  73236. }
  73237. });
  73238. return selector ?
  73239. exports.filter.call(elems, selector, this) :
  73240. this._make(elems);
  73241. };
  73242. exports.nextUntil = function(selector, filterSelector) {
  73243. if (!this[0]) { return this; }
  73244. var elems = [], untilNode, untilNodes;
  73245. if (typeof selector === 'string') {
  73246. untilNode = select(selector, this.nextAll().get(), this.options)[0];
  73247. } else if (selector && selector.cheerio) {
  73248. untilNodes = selector.get();
  73249. } else if (selector) {
  73250. untilNode = selector;
  73251. }
  73252. _.forEach(this, function(elem) {
  73253. while ((elem = elem.next)) {
  73254. if ((untilNode && elem !== untilNode) ||
  73255. (untilNodes && untilNodes.indexOf(elem) === -1) ||
  73256. (!untilNode && !untilNodes)) {
  73257. if (isTag(elem) && elems.indexOf(elem) === -1) {
  73258. elems.push(elem);
  73259. }
  73260. } else {
  73261. break;
  73262. }
  73263. }
  73264. });
  73265. return filterSelector ?
  73266. exports.filter.call(elems, filterSelector, this) :
  73267. this._make(elems);
  73268. };
  73269. exports.prev = function(selector) {
  73270. if (!this[0]) { return this; }
  73271. var elems = [];
  73272. _.forEach(this, function(elem) {
  73273. while ((elem = elem.prev)) {
  73274. if (isTag(elem)) {
  73275. elems.push(elem);
  73276. return;
  73277. }
  73278. }
  73279. });
  73280. return selector ?
  73281. exports.filter.call(elems, selector, this) :
  73282. this._make(elems);
  73283. };
  73284. exports.prevAll = function(selector) {
  73285. if (!this[0]) { return this; }
  73286. var elems = [];
  73287. _.forEach(this, function(elem) {
  73288. while ((elem = elem.prev)) {
  73289. if (isTag(elem) && elems.indexOf(elem) === -1) {
  73290. elems.push(elem);
  73291. }
  73292. }
  73293. });
  73294. return selector ?
  73295. exports.filter.call(elems, selector, this) :
  73296. this._make(elems);
  73297. };
  73298. exports.prevUntil = function(selector, filterSelector) {
  73299. if (!this[0]) { return this; }
  73300. var elems = [], untilNode, untilNodes;
  73301. if (typeof selector === 'string') {
  73302. untilNode = select(selector, this.prevAll().get(), this.options)[0];
  73303. } else if (selector && selector.cheerio) {
  73304. untilNodes = selector.get();
  73305. } else if (selector) {
  73306. untilNode = selector;
  73307. }
  73308. _.forEach(this, function(elem) {
  73309. while ((elem = elem.prev)) {
  73310. if ((untilNode && elem !== untilNode) ||
  73311. (untilNodes && untilNodes.indexOf(elem) === -1) ||
  73312. (!untilNode && !untilNodes)) {
  73313. if (isTag(elem) && elems.indexOf(elem) === -1) {
  73314. elems.push(elem);
  73315. }
  73316. } else {
  73317. break;
  73318. }
  73319. }
  73320. });
  73321. return filterSelector ?
  73322. exports.filter.call(elems, filterSelector, this) :
  73323. this._make(elems);
  73324. };
  73325. exports.siblings = function(selector) {
  73326. var parent = this.parent();
  73327. var elems = _.filter(
  73328. parent ? parent.children() : this.siblingsAndMe(),
  73329. _.bind(function(elem) { return isTag(elem) && !this.is(elem); }, this)
  73330. );
  73331. if (selector !== undefined) {
  73332. return exports.filter.call(elems, selector, this);
  73333. } else {
  73334. return this._make(elems);
  73335. }
  73336. };
  73337. exports.children = function(selector) {
  73338. var elems = _.reduce(this, function(memo, elem) {
  73339. return memo.concat(_.filter(elem.children, isTag));
  73340. }, []);
  73341. if (selector === undefined) return this._make(elems);
  73342. return exports.filter.call(elems, selector, this);
  73343. };
  73344. exports.contents = function() {
  73345. return this._make(_.reduce(this, function(all, elem) {
  73346. all.push.apply(all, elem.children);
  73347. return all;
  73348. }, []));
  73349. };
  73350. exports.each = function(fn) {
  73351. var i = 0, len = this.length;
  73352. while (i < len && fn.call(this[i], i, this[i]) !== false) ++i;
  73353. return this;
  73354. };
  73355. exports.map = function(fn) {
  73356. return this._make(_.reduce(this, function(memo, el, i) {
  73357. var val = fn.call(el, i, el);
  73358. return val == null ? memo : memo.concat(val);
  73359. }, []));
  73360. };
  73361. var makeFilterMethod = function(filterFn) {
  73362. return function(match, container) {
  73363. var testFn;
  73364. container = container || this;
  73365. if (typeof match === 'string') {
  73366. testFn = select.compile(match, container.options);
  73367. } else if (typeof match === 'function') {
  73368. testFn = function(el, i) {
  73369. return match.call(el, i, el);
  73370. };
  73371. } else if (match.cheerio) {
  73372. testFn = match.is.bind(match);
  73373. } else {
  73374. testFn = function(el) {
  73375. return match === el;
  73376. };
  73377. }
  73378. return container._make(filterFn(this, testFn));
  73379. };
  73380. };
  73381. exports.filter = makeFilterMethod(_.filter);
  73382. exports.not = makeFilterMethod(_.reject);
  73383. exports.has = function(selectorOrHaystack) {
  73384. var that = this;
  73385. return exports.filter.call(this, function() {
  73386. return that._make(this).find(selectorOrHaystack).length > 0;
  73387. });
  73388. };
  73389. exports.first = function() {
  73390. return this.length > 1 ? this._make(this[0]) : this;
  73391. };
  73392. exports.last = function() {
  73393. return this.length > 1 ? this._make(this[this.length - 1]) : this;
  73394. };
  73395. // Reduce the set of matched elements to the one at the specified index.
  73396. exports.eq = function(i) {
  73397. i = +i;
  73398. // Use the first identity optimization if possible
  73399. if (i === 0 && this.length <= 1) return this;
  73400. if (i < 0) i = this.length + i;
  73401. return this[i] ? this._make(this[i]) : this._make([]);
  73402. };
  73403. // Retrieve the DOM elements matched by the jQuery object.
  73404. exports.get = function(i) {
  73405. if (i == null) {
  73406. return Array.prototype.slice.call(this);
  73407. } else {
  73408. return this[i < 0 ? (this.length + i) : i];
  73409. }
  73410. };
  73411. // Search for a given element from among the matched elements.
  73412. exports.index = function(selectorOrNeedle) {
  73413. var $haystack, needle;
  73414. if (arguments.length === 0) {
  73415. $haystack = this.parent().children();
  73416. needle = this[0];
  73417. } else if (typeof selectorOrNeedle === 'string') {
  73418. $haystack = this._make(selectorOrNeedle);
  73419. needle = this[0];
  73420. } else {
  73421. $haystack = this;
  73422. needle = selectorOrNeedle.cheerio ? selectorOrNeedle[0] : selectorOrNeedle;
  73423. }
  73424. return $haystack.get().indexOf(needle);
  73425. };
  73426. exports.slice = function() {
  73427. return this._make([].slice.apply(this, arguments));
  73428. };
  73429. function traverseParents(self, elem, selector, limit) {
  73430. var elems = [];
  73431. while (elem && elems.length < limit) {
  73432. if (!selector || exports.filter.call([elem], selector, self).length) {
  73433. elems.push(elem);
  73434. }
  73435. elem = elem.parent;
  73436. }
  73437. return elems;
  73438. }
  73439. // End the most recent filtering operation in the current chain and return the
  73440. // set of matched elements to its previous state.
  73441. exports.end = function() {
  73442. return this.prevObject || this._make([]);
  73443. };
  73444. exports.add = function(other, context) {
  73445. var selection = this._make(other, context);
  73446. var contents = uniqueSort(selection.get().concat(this.get()));
  73447. for (var i = 0; i < contents.length; ++i) {
  73448. selection[i] = contents[i];
  73449. }
  73450. selection.length = contents.length;
  73451. return selection;
  73452. };
  73453. // Add the previous set of elements on the stack to the current set, optionally
  73454. // filtered by a selector.
  73455. exports.addBack = function(selector) {
  73456. return this.add(
  73457. arguments.length ? this.prevObject.filter(selector) : this.prevObject
  73458. );
  73459. };
  73460. /***/ }),
  73461. /* 792 */
  73462. /***/ (function(module, exports, __webpack_require__) {
  73463. var arrayFilter = __webpack_require__(179),
  73464. baseFilter = __webpack_require__(433),
  73465. baseIteratee = __webpack_require__(50),
  73466. isArray = __webpack_require__(9),
  73467. negate = __webpack_require__(793);
  73468. /**
  73469. * The opposite of `_.filter`; this method returns the elements of `collection`
  73470. * that `predicate` does **not** return truthy for.
  73471. *
  73472. * @static
  73473. * @memberOf _
  73474. * @since 0.1.0
  73475. * @category Collection
  73476. * @param {Array|Object} collection The collection to iterate over.
  73477. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  73478. * @returns {Array} Returns the new filtered array.
  73479. * @see _.filter
  73480. * @example
  73481. *
  73482. * var users = [
  73483. * { 'user': 'barney', 'age': 36, 'active': false },
  73484. * { 'user': 'fred', 'age': 40, 'active': true }
  73485. * ];
  73486. *
  73487. * _.reject(users, function(o) { return !o.active; });
  73488. * // => objects for ['fred']
  73489. *
  73490. * // The `_.matches` iteratee shorthand.
  73491. * _.reject(users, { 'age': 40, 'active': true });
  73492. * // => objects for ['barney']
  73493. *
  73494. * // The `_.matchesProperty` iteratee shorthand.
  73495. * _.reject(users, ['active', false]);
  73496. * // => objects for ['fred']
  73497. *
  73498. * // The `_.property` iteratee shorthand.
  73499. * _.reject(users, 'active');
  73500. * // => objects for ['barney']
  73501. */
  73502. function reject(collection, predicate) {
  73503. var func = isArray(collection) ? arrayFilter : baseFilter;
  73504. return func(collection, negate(baseIteratee(predicate, 3)));
  73505. }
  73506. module.exports = reject;
  73507. /***/ }),
  73508. /* 793 */
  73509. /***/ (function(module, exports) {
  73510. /** Error message constants. */
  73511. var FUNC_ERROR_TEXT = 'Expected a function';
  73512. /**
  73513. * Creates a function that negates the result of the predicate `func`. The
  73514. * `func` predicate is invoked with the `this` binding and arguments of the
  73515. * created function.
  73516. *
  73517. * @static
  73518. * @memberOf _
  73519. * @since 3.0.0
  73520. * @category Function
  73521. * @param {Function} predicate The predicate to negate.
  73522. * @returns {Function} Returns the new negated function.
  73523. * @example
  73524. *
  73525. * function isEven(n) {
  73526. * return n % 2 == 0;
  73527. * }
  73528. *
  73529. * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
  73530. * // => [1, 3, 5]
  73531. */
  73532. function negate(predicate) {
  73533. if (typeof predicate != 'function') {
  73534. throw new TypeError(FUNC_ERROR_TEXT);
  73535. }
  73536. return function() {
  73537. var args = arguments;
  73538. switch (args.length) {
  73539. case 0: return !predicate.call(this);
  73540. case 1: return !predicate.call(this, args[0]);
  73541. case 2: return !predicate.call(this, args[0], args[1]);
  73542. case 3: return !predicate.call(this, args[0], args[1], args[2]);
  73543. }
  73544. return !predicate.apply(this, args);
  73545. };
  73546. }
  73547. module.exports = negate;
  73548. /***/ }),
  73549. /* 794 */
  73550. /***/ (function(module, exports, __webpack_require__) {
  73551. var arrayFilter = __webpack_require__(179),
  73552. baseFilter = __webpack_require__(433),
  73553. baseIteratee = __webpack_require__(50),
  73554. isArray = __webpack_require__(9);
  73555. /**
  73556. * Iterates over elements of `collection`, returning an array of all elements
  73557. * `predicate` returns truthy for. The predicate is invoked with three
  73558. * arguments: (value, index|key, collection).
  73559. *
  73560. * **Note:** Unlike `_.remove`, this method returns a new array.
  73561. *
  73562. * @static
  73563. * @memberOf _
  73564. * @since 0.1.0
  73565. * @category Collection
  73566. * @param {Array|Object} collection The collection to iterate over.
  73567. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  73568. * @returns {Array} Returns the new filtered array.
  73569. * @see _.reject
  73570. * @example
  73571. *
  73572. * var users = [
  73573. * { 'user': 'barney', 'age': 36, 'active': true },
  73574. * { 'user': 'fred', 'age': 40, 'active': false }
  73575. * ];
  73576. *
  73577. * _.filter(users, function(o) { return !o.active; });
  73578. * // => objects for ['fred']
  73579. *
  73580. * // The `_.matches` iteratee shorthand.
  73581. * _.filter(users, { 'age': 36, 'active': true });
  73582. * // => objects for ['barney']
  73583. *
  73584. * // The `_.matchesProperty` iteratee shorthand.
  73585. * _.filter(users, ['active', false]);
  73586. * // => objects for ['fred']
  73587. *
  73588. * // The `_.property` iteratee shorthand.
  73589. * _.filter(users, 'active');
  73590. * // => objects for ['barney']
  73591. */
  73592. function filter(collection, predicate) {
  73593. var func = isArray(collection) ? arrayFilter : baseFilter;
  73594. return func(collection, baseIteratee(predicate, 3));
  73595. }
  73596. module.exports = filter;
  73597. /***/ }),
  73598. /* 795 */
  73599. /***/ (function(module, exports, __webpack_require__) {
  73600. var arrayReduce = __webpack_require__(796),
  73601. baseEach = __webpack_require__(69),
  73602. baseIteratee = __webpack_require__(50),
  73603. baseReduce = __webpack_require__(797),
  73604. isArray = __webpack_require__(9);
  73605. /**
  73606. * Reduces `collection` to a value which is the accumulated result of running
  73607. * each element in `collection` thru `iteratee`, where each successive
  73608. * invocation is supplied the return value of the previous. If `accumulator`
  73609. * is not given, the first element of `collection` is used as the initial
  73610. * value. The iteratee is invoked with four arguments:
  73611. * (accumulator, value, index|key, collection).
  73612. *
  73613. * Many lodash methods are guarded to work as iteratees for methods like
  73614. * `_.reduce`, `_.reduceRight`, and `_.transform`.
  73615. *
  73616. * The guarded methods are:
  73617. * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
  73618. * and `sortBy`
  73619. *
  73620. * @static
  73621. * @memberOf _
  73622. * @since 0.1.0
  73623. * @category Collection
  73624. * @param {Array|Object} collection The collection to iterate over.
  73625. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  73626. * @param {*} [accumulator] The initial value.
  73627. * @returns {*} Returns the accumulated value.
  73628. * @see _.reduceRight
  73629. * @example
  73630. *
  73631. * _.reduce([1, 2], function(sum, n) {
  73632. * return sum + n;
  73633. * }, 0);
  73634. * // => 3
  73635. *
  73636. * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  73637. * (result[value] || (result[value] = [])).push(key);
  73638. * return result;
  73639. * }, {});
  73640. * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
  73641. */
  73642. function reduce(collection, iteratee, accumulator) {
  73643. var func = isArray(collection) ? arrayReduce : baseReduce,
  73644. initAccum = arguments.length < 3;
  73645. return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);
  73646. }
  73647. module.exports = reduce;
  73648. /***/ }),
  73649. /* 796 */
  73650. /***/ (function(module, exports) {
  73651. /**
  73652. * A specialized version of `_.reduce` for arrays without support for
  73653. * iteratee shorthands.
  73654. *
  73655. * @private
  73656. * @param {Array} [array] The array to iterate over.
  73657. * @param {Function} iteratee The function invoked per iteration.
  73658. * @param {*} [accumulator] The initial value.
  73659. * @param {boolean} [initAccum] Specify using the first element of `array` as
  73660. * the initial value.
  73661. * @returns {*} Returns the accumulated value.
  73662. */
  73663. function arrayReduce(array, iteratee, accumulator, initAccum) {
  73664. var index = -1,
  73665. length = array == null ? 0 : array.length;
  73666. if (initAccum && length) {
  73667. accumulator = array[++index];
  73668. }
  73669. while (++index < length) {
  73670. accumulator = iteratee(accumulator, array[index], index, array);
  73671. }
  73672. return accumulator;
  73673. }
  73674. module.exports = arrayReduce;
  73675. /***/ }),
  73676. /* 797 */
  73677. /***/ (function(module, exports) {
  73678. /**
  73679. * The base implementation of `_.reduce` and `_.reduceRight`, without support
  73680. * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
  73681. *
  73682. * @private
  73683. * @param {Array|Object} collection The collection to iterate over.
  73684. * @param {Function} iteratee The function invoked per iteration.
  73685. * @param {*} accumulator The initial value.
  73686. * @param {boolean} initAccum Specify using the first or last element of
  73687. * `collection` as the initial value.
  73688. * @param {Function} eachFunc The function to iterate over `collection`.
  73689. * @returns {*} Returns the accumulated value.
  73690. */
  73691. function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
  73692. eachFunc(collection, function(value, index, collection) {
  73693. accumulator = initAccum
  73694. ? (initAccum = false, value)
  73695. : iteratee(accumulator, value, index, collection);
  73696. });
  73697. return accumulator;
  73698. }
  73699. module.exports = baseReduce;
  73700. /***/ }),
  73701. /* 798 */
  73702. /***/ (function(module, exports, __webpack_require__) {
  73703. var parse = __webpack_require__(114),
  73704. $ = __webpack_require__(174),
  73705. updateDOM = parse.update,
  73706. evaluate = parse.evaluate,
  73707. utils = __webpack_require__(92),
  73708. domEach = utils.domEach,
  73709. cloneDom = utils.cloneDom,
  73710. isHtml = utils.isHtml,
  73711. slice = Array.prototype.slice,
  73712. _ = {
  73713. flatten: __webpack_require__(434),
  73714. bind: __webpack_require__(169),
  73715. forEach: __webpack_require__(129)
  73716. };
  73717. // Create an array of nodes, recursing into arrays and parsing strings if
  73718. // necessary
  73719. exports._makeDomArray = function makeDomArray(elem, clone) {
  73720. if (elem == null) {
  73721. return [];
  73722. } else if (elem.cheerio) {
  73723. return clone ? cloneDom(elem.get(), elem.options) : elem.get();
  73724. } else if (Array.isArray(elem)) {
  73725. return _.flatten(elem.map(function(el) {
  73726. return this._makeDomArray(el, clone);
  73727. }, this));
  73728. } else if (typeof elem === 'string') {
  73729. return evaluate(elem, this.options, false);
  73730. } else {
  73731. return clone ? cloneDom([elem]) : [elem];
  73732. }
  73733. };
  73734. var _insert = function(concatenator) {
  73735. return function() {
  73736. var elems = slice.call(arguments),
  73737. lastIdx = this.length - 1;
  73738. return domEach(this, function(i, el) {
  73739. var dom, domSrc;
  73740. if (typeof elems[0] === 'function') {
  73741. domSrc = elems[0].call(el, i, $.html(el.children));
  73742. } else {
  73743. domSrc = elems;
  73744. }
  73745. dom = this._makeDomArray(domSrc, i < lastIdx);
  73746. concatenator(dom, el.children, el);
  73747. });
  73748. };
  73749. };
  73750. /*
  73751. * Modify an array in-place, removing some number of elements and adding new
  73752. * elements directly following them.
  73753. *
  73754. * @param {Array} array Target array to splice.
  73755. * @param {Number} spliceIdx Index at which to begin changing the array.
  73756. * @param {Number} spliceCount Number of elements to remove from the array.
  73757. * @param {Array} newElems Elements to insert into the array.
  73758. *
  73759. * @api private
  73760. */
  73761. var uniqueSplice = function(array, spliceIdx, spliceCount, newElems, parent) {
  73762. var spliceArgs = [spliceIdx, spliceCount].concat(newElems),
  73763. prev = array[spliceIdx - 1] || null,
  73764. next = array[spliceIdx] || null;
  73765. var idx, len, prevIdx, node, oldParent;
  73766. // Before splicing in new elements, ensure they do not already appear in the
  73767. // current array.
  73768. for (idx = 0, len = newElems.length; idx < len; ++idx) {
  73769. node = newElems[idx];
  73770. oldParent = node.parent || node.root;
  73771. prevIdx = oldParent && oldParent.children.indexOf(newElems[idx]);
  73772. if (oldParent && prevIdx > -1) {
  73773. oldParent.children.splice(prevIdx, 1);
  73774. if (parent === oldParent && spliceIdx > prevIdx) {
  73775. spliceArgs[0]--;
  73776. }
  73777. }
  73778. node.root = null;
  73779. node.parent = parent;
  73780. if (node.prev) {
  73781. node.prev.next = node.next || null;
  73782. }
  73783. if (node.next) {
  73784. node.next.prev = node.prev || null;
  73785. }
  73786. node.prev = newElems[idx - 1] || prev;
  73787. node.next = newElems[idx + 1] || next;
  73788. }
  73789. if (prev) {
  73790. prev.next = newElems[0];
  73791. }
  73792. if (next) {
  73793. next.prev = newElems[newElems.length - 1];
  73794. }
  73795. return array.splice.apply(array, spliceArgs);
  73796. };
  73797. exports.appendTo = function(target) {
  73798. if (!target.cheerio) {
  73799. target = this.constructor.call(this.constructor, target, null, this._originalRoot);
  73800. }
  73801. target.append(this);
  73802. return this;
  73803. };
  73804. exports.prependTo = function(target) {
  73805. if (!target.cheerio) {
  73806. target = this.constructor.call(this.constructor, target, null, this._originalRoot);
  73807. }
  73808. target.prepend(this);
  73809. return this;
  73810. };
  73811. exports.append = _insert(function(dom, children, parent) {
  73812. uniqueSplice(children, children.length, 0, dom, parent);
  73813. });
  73814. exports.prepend = _insert(function(dom, children, parent) {
  73815. uniqueSplice(children, 0, 0, dom, parent);
  73816. });
  73817. exports.wrap = function(wrapper) {
  73818. var wrapperFn = typeof wrapper === 'function' && wrapper,
  73819. lastIdx = this.length - 1;
  73820. _.forEach(this, _.bind(function(el, i) {
  73821. var parent = el.parent || el.root,
  73822. siblings = parent.children,
  73823. wrapperDom, elInsertLocation, j, index;
  73824. if (!parent) {
  73825. return;
  73826. }
  73827. if (wrapperFn) {
  73828. wrapper = wrapperFn.call(el, i);
  73829. }
  73830. if (typeof wrapper === 'string' && !isHtml(wrapper)) {
  73831. wrapper = this.parents().last().find(wrapper).clone();
  73832. }
  73833. wrapperDom = this._makeDomArray(wrapper, i < lastIdx).slice(0, 1);
  73834. elInsertLocation = wrapperDom[0];
  73835. // Find the deepest child. Only consider the first tag child of each node
  73836. // (ignore text); stop if no children are found.
  73837. j = 0;
  73838. while (elInsertLocation && elInsertLocation.children) {
  73839. if (j >= elInsertLocation.children.length) {
  73840. break;
  73841. }
  73842. if (elInsertLocation.children[j].type === 'tag') {
  73843. elInsertLocation = elInsertLocation.children[j];
  73844. j=0;
  73845. } else {
  73846. j++;
  73847. }
  73848. }
  73849. index = siblings.indexOf(el);
  73850. updateDOM([el], elInsertLocation);
  73851. // The previous operation removed the current element from the `siblings`
  73852. // array, so the `dom` array can be inserted without removing any
  73853. // additional elements.
  73854. uniqueSplice(siblings, index, 0, wrapperDom, parent);
  73855. }, this));
  73856. return this;
  73857. };
  73858. exports.after = function() {
  73859. var elems = slice.call(arguments),
  73860. lastIdx = this.length - 1;
  73861. domEach(this, function(i, el) {
  73862. var parent = el.parent || el.root;
  73863. if (!parent) {
  73864. return;
  73865. }
  73866. var siblings = parent.children,
  73867. index = siblings.indexOf(el),
  73868. domSrc, dom;
  73869. // If not found, move on
  73870. if (index < 0) return;
  73871. if (typeof elems[0] === 'function') {
  73872. domSrc = elems[0].call(el, i, $.html(el.children));
  73873. } else {
  73874. domSrc = elems;
  73875. }
  73876. dom = this._makeDomArray(domSrc, i < lastIdx);
  73877. // Add element after `this` element
  73878. uniqueSplice(siblings, index + 1, 0, dom, parent);
  73879. });
  73880. return this;
  73881. };
  73882. exports.insertAfter = function(target) {
  73883. var clones = [],
  73884. self = this;
  73885. if (typeof target === 'string') {
  73886. target = this.constructor.call(this.constructor, target, null, this._originalRoot);
  73887. }
  73888. target = this._makeDomArray(target);
  73889. self.remove();
  73890. domEach(target, function(i, el) {
  73891. var clonedSelf = self._makeDomArray(self.clone());
  73892. var parent = el.parent || el.root;
  73893. if (!parent) {
  73894. return;
  73895. }
  73896. var siblings = parent.children,
  73897. index = siblings.indexOf(el);
  73898. // If not found, move on
  73899. if (index < 0) return;
  73900. // Add cloned `this` element(s) after target element
  73901. uniqueSplice(siblings, index + 1, 0, clonedSelf, parent);
  73902. clones.push(clonedSelf);
  73903. });
  73904. return this.constructor.call(this.constructor, this._makeDomArray(clones));
  73905. };
  73906. exports.before = function() {
  73907. var elems = slice.call(arguments),
  73908. lastIdx = this.length - 1;
  73909. domEach(this, function(i, el) {
  73910. var parent = el.parent || el.root;
  73911. if (!parent) {
  73912. return;
  73913. }
  73914. var siblings = parent.children,
  73915. index = siblings.indexOf(el),
  73916. domSrc, dom;
  73917. // If not found, move on
  73918. if (index < 0) return;
  73919. if (typeof elems[0] === 'function') {
  73920. domSrc = elems[0].call(el, i, $.html(el.children));
  73921. } else {
  73922. domSrc = elems;
  73923. }
  73924. dom = this._makeDomArray(domSrc, i < lastIdx);
  73925. // Add element before `el` element
  73926. uniqueSplice(siblings, index, 0, dom, parent);
  73927. });
  73928. return this;
  73929. };
  73930. exports.insertBefore = function(target) {
  73931. var clones = [],
  73932. self = this;
  73933. if (typeof target === 'string') {
  73934. target = this.constructor.call(this.constructor, target, null, this._originalRoot);
  73935. }
  73936. target = this._makeDomArray(target);
  73937. self.remove();
  73938. domEach(target, function(i, el) {
  73939. var clonedSelf = self._makeDomArray(self.clone());
  73940. var parent = el.parent || el.root;
  73941. if (!parent) {
  73942. return;
  73943. }
  73944. var siblings = parent.children,
  73945. index = siblings.indexOf(el);
  73946. // If not found, move on
  73947. if (index < 0) return;
  73948. // Add cloned `this` element(s) after target element
  73949. uniqueSplice(siblings, index, 0, clonedSelf, parent);
  73950. clones.push(clonedSelf);
  73951. });
  73952. return this.constructor.call(this.constructor, this._makeDomArray(clones));
  73953. };
  73954. /*
  73955. remove([selector])
  73956. */
  73957. exports.remove = function(selector) {
  73958. var elems = this;
  73959. // Filter if we have selector
  73960. if (selector)
  73961. elems = elems.filter(selector);
  73962. domEach(elems, function(i, el) {
  73963. var parent = el.parent || el.root;
  73964. if (!parent) {
  73965. return;
  73966. }
  73967. var siblings = parent.children,
  73968. index = siblings.indexOf(el);
  73969. if (index < 0) return;
  73970. siblings.splice(index, 1);
  73971. if (el.prev) {
  73972. el.prev.next = el.next;
  73973. }
  73974. if (el.next) {
  73975. el.next.prev = el.prev;
  73976. }
  73977. el.prev = el.next = el.parent = el.root = null;
  73978. });
  73979. return this;
  73980. };
  73981. exports.replaceWith = function(content) {
  73982. var self = this;
  73983. domEach(this, function(i, el) {
  73984. var parent = el.parent || el.root;
  73985. if (!parent) {
  73986. return;
  73987. }
  73988. var siblings = parent.children,
  73989. dom = self._makeDomArray(typeof content === 'function' ? content.call(el, i, el) : content),
  73990. index;
  73991. // In the case that `dom` contains nodes that already exist in other
  73992. // structures, ensure those nodes are properly removed.
  73993. updateDOM(dom, null);
  73994. index = siblings.indexOf(el);
  73995. // Completely remove old element
  73996. uniqueSplice(siblings, index, 1, dom, parent);
  73997. el.parent = el.prev = el.next = el.root = null;
  73998. });
  73999. return this;
  74000. };
  74001. exports.empty = function() {
  74002. domEach(this, function(i, el) {
  74003. _.forEach(el.children, function(child) {
  74004. child.next = child.prev = child.parent = null;
  74005. });
  74006. el.children.length = 0;
  74007. });
  74008. return this;
  74009. };
  74010. /**
  74011. * Set/Get the HTML
  74012. */
  74013. exports.html = function(str) {
  74014. if (str === undefined) {
  74015. if (!this[0] || !this[0].children) return null;
  74016. return $.html(this[0].children, this.options);
  74017. }
  74018. var opts = this.options;
  74019. domEach(this, function(i, el) {
  74020. _.forEach(el.children, function(child) {
  74021. child.next = child.prev = child.parent = null;
  74022. });
  74023. var content = str.cheerio ? str.clone().get() : evaluate('' + str, opts, false);
  74024. updateDOM(content, el);
  74025. });
  74026. return this;
  74027. };
  74028. exports.toString = function() {
  74029. return $.html(this, this.options);
  74030. };
  74031. exports.text = function(str) {
  74032. // If `str` is undefined, act as a "getter"
  74033. if (str === undefined) {
  74034. return $.text(this);
  74035. } else if (typeof str === 'function') {
  74036. // Function support
  74037. return domEach(this, function(i, el) {
  74038. var $el = [el];
  74039. return exports.text.call($el, str.call(el, i, $.text($el)));
  74040. });
  74041. }
  74042. // Append text node to each selected elements
  74043. domEach(this, function(i, el) {
  74044. _.forEach(el.children, function(child) {
  74045. child.next = child.prev = child.parent = null;
  74046. });
  74047. var elem = {
  74048. data: '' + str,
  74049. type: 'text',
  74050. parent: el,
  74051. prev: null,
  74052. next: null,
  74053. children: []
  74054. };
  74055. updateDOM(elem, el);
  74056. });
  74057. return this;
  74058. };
  74059. exports.clone = function() {
  74060. return this._make(cloneDom(this.get(), this.options));
  74061. };
  74062. /***/ }),
  74063. /* 799 */
  74064. /***/ (function(module, exports, __webpack_require__) {
  74065. var Symbol = __webpack_require__(80),
  74066. isArguments = __webpack_require__(124),
  74067. isArray = __webpack_require__(9);
  74068. /** Built-in value references. */
  74069. var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
  74070. /**
  74071. * Checks if `value` is a flattenable `arguments` object or array.
  74072. *
  74073. * @private
  74074. * @param {*} value The value to check.
  74075. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
  74076. */
  74077. function isFlattenable(value) {
  74078. return isArray(value) || isArguments(value) ||
  74079. !!(spreadableSymbol && value && value[spreadableSymbol]);
  74080. }
  74081. module.exports = isFlattenable;
  74082. /***/ }),
  74083. /* 800 */
  74084. /***/ (function(module, exports, __webpack_require__) {
  74085. var domEach = __webpack_require__(92).domEach,
  74086. _ = {
  74087. pick: __webpack_require__(801),
  74088. };
  74089. var toString = Object.prototype.toString;
  74090. /**
  74091. * Set / Get css.
  74092. *
  74093. * @param {String|Object} prop
  74094. * @param {String} val
  74095. * @return {self}
  74096. * @api public
  74097. */
  74098. exports.css = function(prop, val) {
  74099. if (arguments.length === 2 ||
  74100. // When `prop` is a "plain" object
  74101. (toString.call(prop) === '[object Object]')) {
  74102. return domEach(this, function(idx, el) {
  74103. setCss(el, prop, val, idx);
  74104. });
  74105. } else {
  74106. return getCss(this[0], prop);
  74107. }
  74108. };
  74109. /**
  74110. * Set styles of all elements.
  74111. *
  74112. * @param {String|Object} prop
  74113. * @param {String} val
  74114. * @param {Number} idx - optional index within the selection
  74115. * @return {self}
  74116. * @api private
  74117. */
  74118. function setCss(el, prop, val, idx) {
  74119. if ('string' == typeof prop) {
  74120. var styles = getCss(el);
  74121. if (typeof val === 'function') {
  74122. val = val.call(el, idx, styles[prop]);
  74123. }
  74124. if (val === '') {
  74125. delete styles[prop];
  74126. } else if (val != null) {
  74127. styles[prop] = val;
  74128. }
  74129. el.attribs.style = stringify(styles);
  74130. } else if ('object' == typeof prop) {
  74131. Object.keys(prop).forEach(function(k){
  74132. setCss(el, k, prop[k]);
  74133. });
  74134. }
  74135. }
  74136. /**
  74137. * Get parsed styles of the first element.
  74138. *
  74139. * @param {String} prop
  74140. * @return {Object}
  74141. * @api private
  74142. */
  74143. function getCss(el, prop) {
  74144. var styles = parse(el.attribs.style);
  74145. if (typeof prop === 'string') {
  74146. return styles[prop];
  74147. } else if (Array.isArray(prop)) {
  74148. return _.pick(styles, prop);
  74149. } else {
  74150. return styles;
  74151. }
  74152. }
  74153. /**
  74154. * Stringify `obj` to styles.
  74155. *
  74156. * @param {Object} obj
  74157. * @return {Object}
  74158. * @api private
  74159. */
  74160. function stringify(obj) {
  74161. return Object.keys(obj || {})
  74162. .reduce(function(str, prop){
  74163. return str += ''
  74164. + (str ? ' ' : '')
  74165. + prop
  74166. + ': '
  74167. + obj[prop]
  74168. + ';';
  74169. }, '');
  74170. }
  74171. /**
  74172. * Parse `styles`.
  74173. *
  74174. * @param {String} styles
  74175. * @return {Object}
  74176. * @api private
  74177. */
  74178. function parse(styles) {
  74179. styles = (styles || '').trim();
  74180. if (!styles) return {};
  74181. return styles
  74182. .split(';')
  74183. .reduce(function(obj, str){
  74184. var n = str.indexOf(':');
  74185. // skip if there is no :, or if it is the first/last character
  74186. if (n < 1 || n === str.length-1) return obj;
  74187. obj[str.slice(0,n).trim()] = str.slice(n+1).trim();
  74188. return obj;
  74189. }, {});
  74190. }
  74191. /***/ }),
  74192. /* 801 */
  74193. /***/ (function(module, exports, __webpack_require__) {
  74194. var basePick = __webpack_require__(802),
  74195. flatRest = __webpack_require__(805);
  74196. /**
  74197. * Creates an object composed of the picked `object` properties.
  74198. *
  74199. * @static
  74200. * @since 0.1.0
  74201. * @memberOf _
  74202. * @category Object
  74203. * @param {Object} object The source object.
  74204. * @param {...(string|string[])} [paths] The property paths to pick.
  74205. * @returns {Object} Returns the new object.
  74206. * @example
  74207. *
  74208. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  74209. *
  74210. * _.pick(object, ['a', 'c']);
  74211. * // => { 'a': 1, 'c': 3 }
  74212. */
  74213. var pick = flatRest(function(object, paths) {
  74214. return object == null ? {} : basePick(object, paths);
  74215. });
  74216. module.exports = pick;
  74217. /***/ }),
  74218. /* 802 */
  74219. /***/ (function(module, exports, __webpack_require__) {
  74220. var basePickBy = __webpack_require__(803),
  74221. hasIn = __webpack_require__(432);
  74222. /**
  74223. * The base implementation of `_.pick` without support for individual
  74224. * property identifiers.
  74225. *
  74226. * @private
  74227. * @param {Object} object The source object.
  74228. * @param {string[]} paths The property paths to pick.
  74229. * @returns {Object} Returns the new object.
  74230. */
  74231. function basePick(object, paths) {
  74232. return basePickBy(object, paths, function(value, path) {
  74233. return hasIn(object, path);
  74234. });
  74235. }
  74236. module.exports = basePick;
  74237. /***/ }),
  74238. /* 803 */
  74239. /***/ (function(module, exports, __webpack_require__) {
  74240. var baseGet = __webpack_require__(180),
  74241. baseSet = __webpack_require__(804),
  74242. castPath = __webpack_require__(134);
  74243. /**
  74244. * The base implementation of `_.pickBy` without support for iteratee shorthands.
  74245. *
  74246. * @private
  74247. * @param {Object} object The source object.
  74248. * @param {string[]} paths The property paths to pick.
  74249. * @param {Function} predicate The function invoked per property.
  74250. * @returns {Object} Returns the new object.
  74251. */
  74252. function basePickBy(object, paths, predicate) {
  74253. var index = -1,
  74254. length = paths.length,
  74255. result = {};
  74256. while (++index < length) {
  74257. var path = paths[index],
  74258. value = baseGet(object, path);
  74259. if (predicate(value, path)) {
  74260. baseSet(result, castPath(path, object), value);
  74261. }
  74262. }
  74263. return result;
  74264. }
  74265. module.exports = basePickBy;
  74266. /***/ }),
  74267. /* 804 */
  74268. /***/ (function(module, exports, __webpack_require__) {
  74269. var assignValue = __webpack_require__(163),
  74270. castPath = __webpack_require__(134),
  74271. isIndex = __webpack_require__(90),
  74272. isObject = __webpack_require__(25),
  74273. toKey = __webpack_require__(95);
  74274. /**
  74275. * The base implementation of `_.set`.
  74276. *
  74277. * @private
  74278. * @param {Object} object The object to modify.
  74279. * @param {Array|string} path The path of the property to set.
  74280. * @param {*} value The value to set.
  74281. * @param {Function} [customizer] The function to customize path creation.
  74282. * @returns {Object} Returns `object`.
  74283. */
  74284. function baseSet(object, path, value, customizer) {
  74285. if (!isObject(object)) {
  74286. return object;
  74287. }
  74288. path = castPath(path, object);
  74289. var index = -1,
  74290. length = path.length,
  74291. lastIndex = length - 1,
  74292. nested = object;
  74293. while (nested != null && ++index < length) {
  74294. var key = toKey(path[index]),
  74295. newValue = value;
  74296. if (index != lastIndex) {
  74297. var objValue = nested[key];
  74298. newValue = customizer ? customizer(objValue, key, nested) : undefined;
  74299. if (newValue === undefined) {
  74300. newValue = isObject(objValue)
  74301. ? objValue
  74302. : (isIndex(path[index + 1]) ? [] : {});
  74303. }
  74304. }
  74305. assignValue(nested, key, newValue);
  74306. nested = nested[key];
  74307. }
  74308. return object;
  74309. }
  74310. module.exports = baseSet;
  74311. /***/ }),
  74312. /* 805 */
  74313. /***/ (function(module, exports, __webpack_require__) {
  74314. var flatten = __webpack_require__(434),
  74315. overRest = __webpack_require__(397),
  74316. setToString = __webpack_require__(165);
  74317. /**
  74318. * A specialized version of `baseRest` which flattens the rest array.
  74319. *
  74320. * @private
  74321. * @param {Function} func The function to apply a rest parameter to.
  74322. * @returns {Function} Returns the new function.
  74323. */
  74324. function flatRest(func) {
  74325. return setToString(overRest(func, undefined, flatten), func + '');
  74326. }
  74327. module.exports = flatRest;
  74328. /***/ }),
  74329. /* 806 */
  74330. /***/ (function(module, exports, __webpack_require__) {
  74331. // https://github.com/jquery/jquery/blob/2.1.3/src/manipulation/var/rcheckableType.js
  74332. // https://github.com/jquery/jquery/blob/2.1.3/src/serialize.js
  74333. var submittableSelector = 'input,select,textarea,keygen',
  74334. r20 = /%20/g,
  74335. rCRLF = /\r?\n/g,
  74336. _ = {
  74337. map: __webpack_require__(807)
  74338. };
  74339. exports.serialize = function() {
  74340. // Convert form elements into name/value objects
  74341. var arr = this.serializeArray();
  74342. // Serialize each element into a key/value string
  74343. var retArr = _.map(arr, function(data) {
  74344. return encodeURIComponent(data.name) + '=' + encodeURIComponent(data.value);
  74345. });
  74346. // Return the resulting serialization
  74347. return retArr.join('&').replace(r20, '+');
  74348. };
  74349. exports.serializeArray = function() {
  74350. // Resolve all form elements from either forms or collections of form elements
  74351. var Cheerio = this.constructor;
  74352. return this.map(function() {
  74353. var elem = this;
  74354. var $elem = Cheerio(elem);
  74355. if (elem.name === 'form') {
  74356. return $elem.find(submittableSelector).toArray();
  74357. } else {
  74358. return $elem.filter(submittableSelector).toArray();
  74359. }
  74360. }).filter(
  74361. // Verify elements have a name (`attr.name`) and are not disabled (`:disabled`)
  74362. '[name!=""]:not(:disabled)'
  74363. // and cannot be clicked (`[type=submit]`) or are used in `x-www-form-urlencoded` (`[type=file]`)
  74364. + ':not(:submit, :button, :image, :reset, :file)'
  74365. // and are either checked/don't have a checkable state
  74366. + ':matches([checked], :not(:checkbox, :radio))'
  74367. // Convert each of the elements to its value(s)
  74368. ).map(function(i, elem) {
  74369. var $elem = Cheerio(elem);
  74370. var name = $elem.attr('name');
  74371. var value = $elem.val();
  74372. // If there is no value set (e.g. `undefined`, `null`), then default value to empty
  74373. if (value == null) {
  74374. value = '';
  74375. }
  74376. // If we have an array of values (e.g. `<select multiple>`), return an array of key/value pairs
  74377. if (Array.isArray(value)) {
  74378. return _.map(value, function(val) {
  74379. // We trim replace any line endings (e.g. `\r` or `\r\n` with `\r\n`) to guarantee consistency across platforms
  74380. // These can occur inside of `<textarea>'s`
  74381. return {name: name, value: val.replace( rCRLF, '\r\n' )};
  74382. });
  74383. // Otherwise (e.g. `<input type="text">`, return only one key/value pair
  74384. } else {
  74385. return {name: name, value: value.replace( rCRLF, '\r\n' )};
  74386. }
  74387. // Convert our result to an array
  74388. }).get();
  74389. };
  74390. /***/ }),
  74391. /* 807 */
  74392. /***/ (function(module, exports, __webpack_require__) {
  74393. var arrayMap = __webpack_require__(135),
  74394. baseIteratee = __webpack_require__(50),
  74395. baseMap = __webpack_require__(436),
  74396. isArray = __webpack_require__(9);
  74397. /**
  74398. * Creates an array of values by running each element in `collection` thru
  74399. * `iteratee`. The iteratee is invoked with three arguments:
  74400. * (value, index|key, collection).
  74401. *
  74402. * Many lodash methods are guarded to work as iteratees for methods like
  74403. * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
  74404. *
  74405. * The guarded methods are:
  74406. * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
  74407. * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
  74408. * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
  74409. * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
  74410. *
  74411. * @static
  74412. * @memberOf _
  74413. * @since 0.1.0
  74414. * @category Collection
  74415. * @param {Array|Object} collection The collection to iterate over.
  74416. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  74417. * @returns {Array} Returns the new mapped array.
  74418. * @example
  74419. *
  74420. * function square(n) {
  74421. * return n * n;
  74422. * }
  74423. *
  74424. * _.map([4, 8], square);
  74425. * // => [16, 64]
  74426. *
  74427. * _.map({ 'a': 4, 'b': 8 }, square);
  74428. * // => [16, 64] (iteration order is not guaranteed)
  74429. *
  74430. * var users = [
  74431. * { 'user': 'barney' },
  74432. * { 'user': 'fred' }
  74433. * ];
  74434. *
  74435. * // The `_.property` iteratee shorthand.
  74436. * _.map(users, 'user');
  74437. * // => ['barney', 'fred']
  74438. */
  74439. function map(collection, iteratee) {
  74440. var func = isArray(collection) ? arrayMap : baseMap;
  74441. return func(collection, baseIteratee(iteratee, 3));
  74442. }
  74443. module.exports = map;
  74444. /***/ }),
  74445. /* 808 */
  74446. /***/ (function(module, exports) {
  74447. module.exports = {"_from":"cheerio@^1.0.0-rc.2","_id":"cheerio@1.0.0-rc.2","_inBundle":false,"_integrity":"sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs=","_location":"/cheerio","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"cheerio@^1.0.0-rc.2","name":"cheerio","escapedName":"cheerio","rawSpec":"^1.0.0-rc.2","saveSpec":null,"fetchSpec":"^1.0.0-rc.2"},"_requiredBy":["/cozy-konnector-libs"],"_resolved":"https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz","_shasum":"4b9f53a81b27e4d5dac31c0ffd0cfa03cc6830db","_spec":"cheerio@^1.0.0-rc.2","_where":"/Users/dje/Documents/devs_perso/cozy/cozy-konnector-template/node_modules/cozy-konnector-libs","author":{"name":"Matt Mueller","email":"mattmuelle@gmail.com","url":"mat.io"},"bugs":{"url":"https://github.com/cheeriojs/cheerio/issues"},"bundleDependencies":false,"dependencies":{"css-select":"~1.2.0","dom-serializer":"~0.1.0","entities":"~1.1.1","htmlparser2":"^3.9.1","lodash":"^4.15.0","parse5":"^3.0.1"},"deprecated":false,"description":"Tiny, fast, and elegant implementation of core jQuery designed specifically for the server","devDependencies":{"benchmark":"^2.1.0","coveralls":"^2.11.9","expect.js":"~0.3.1","istanbul":"^0.4.3","jquery":"^3.0.0","jsdom":"^9.2.1","jshint":"^2.9.2","mocha":"^3.1.2","xyz":"~1.1.0"},"engines":{"node":">= 0.6"},"files":["index.js","lib"],"homepage":"https://github.com/cheeriojs/cheerio#readme","keywords":["htmlparser","jquery","selector","scraper","parser","html"],"license":"MIT","main":"./index.js","name":"cheerio","repository":{"type":"git","url":"git://github.com/cheeriojs/cheerio.git"},"scripts":{"test":"make test"},"version":"1.0.0-rc.2"}
  74448. /***/ }),
  74449. /* 809 */
  74450. /***/ (function(module, exports, __webpack_require__) {
  74451. (function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap
  74452. /******/ // The module cache
  74453. /******/ var installedModules = {};
  74454. /******/
  74455. /******/ // The require function
  74456. /******/ function __webpack_require__(moduleId) {
  74457. /******/
  74458. /******/ // Check if module is in cache
  74459. /******/ if(installedModules[moduleId])
  74460. /******/ return installedModules[moduleId].exports;
  74461. /******/
  74462. /******/ // Create a new module (and put it into the cache)
  74463. /******/ var module = installedModules[moduleId] = {
  74464. /******/ exports: {},
  74465. /******/ id: moduleId,
  74466. /******/ loaded: false
  74467. /******/ };
  74468. /******/
  74469. /******/ // Execute the module function
  74470. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  74471. /******/
  74472. /******/ // Flag the module as loaded
  74473. /******/ module.loaded = true;
  74474. /******/
  74475. /******/ // Return the exports of the module
  74476. /******/ return module.exports;
  74477. /******/ }
  74478. /******/
  74479. /******/
  74480. /******/ // expose the modules object (__webpack_modules__)
  74481. /******/ __webpack_require__.m = modules;
  74482. /******/
  74483. /******/ // expose the module cache
  74484. /******/ __webpack_require__.c = installedModules;
  74485. /******/
  74486. /******/ // __webpack_public_path__
  74487. /******/ __webpack_require__.p = "";
  74488. /******/
  74489. /******/ // Load entry module and return exports
  74490. /******/ return __webpack_require__(0);
  74491. /******/ })
  74492. /************************************************************************/
  74493. /******/ ([
  74494. /* 0 */
  74495. /***/ function(module, exports, __webpack_require__) {
  74496. __webpack_require__(1);
  74497. module.exports = __webpack_require__(2);
  74498. /***/ },
  74499. /* 1 */
  74500. /***/ function(module, exports) {
  74501. module.exports = __webpack_require__(810);
  74502. /***/ },
  74503. /* 2 */
  74504. /***/ function(module, exports, __webpack_require__) {
  74505. 'use strict';
  74506. var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /* global fetch URL */
  74507. __webpack_require__(3);
  74508. __webpack_require__(4);
  74509. __webpack_require__(5);
  74510. __webpack_require__(6);
  74511. __webpack_require__(7);
  74512. __webpack_require__(8);
  74513. __webpack_require__(9);
  74514. __webpack_require__(10);
  74515. __webpack_require__(11);
  74516. __webpack_require__(12);
  74517. __webpack_require__(13);
  74518. __webpack_require__(14);
  74519. __webpack_require__(15);
  74520. __webpack_require__(16);
  74521. __webpack_require__(17);
  74522. __webpack_require__(18);
  74523. __webpack_require__(19);
  74524. __webpack_require__(20);
  74525. __webpack_require__(21);
  74526. __webpack_require__(22);
  74527. __webpack_require__(23);
  74528. __webpack_require__(24);
  74529. __webpack_require__(25);
  74530. __webpack_require__(26);
  74531. __webpack_require__(27);
  74532. __webpack_require__(28);
  74533. __webpack_require__(29);
  74534. __webpack_require__(30);
  74535. __webpack_require__(31);
  74536. __webpack_require__(32);
  74537. __webpack_require__(33);
  74538. __webpack_require__(34);
  74539. __webpack_require__(35);
  74540. __webpack_require__(36);
  74541. __webpack_require__(37);
  74542. __webpack_require__(38);
  74543. __webpack_require__(39);
  74544. __webpack_require__(40);
  74545. __webpack_require__(41);
  74546. __webpack_require__(42);
  74547. __webpack_require__(43);
  74548. __webpack_require__(44);
  74549. __webpack_require__(45);
  74550. __webpack_require__(46);
  74551. __webpack_require__(47);
  74552. __webpack_require__(48);
  74553. __webpack_require__(49);
  74554. __webpack_require__(50);
  74555. __webpack_require__(51);
  74556. __webpack_require__(52);
  74557. __webpack_require__(53);
  74558. __webpack_require__(54);
  74559. __webpack_require__(55);
  74560. __webpack_require__(56);
  74561. __webpack_require__(57);
  74562. __webpack_require__(58);
  74563. __webpack_require__(59);
  74564. __webpack_require__(60);
  74565. __webpack_require__(61);
  74566. __webpack_require__(62);
  74567. __webpack_require__(63);
  74568. __webpack_require__(64);
  74569. __webpack_require__(65);
  74570. __webpack_require__(66);
  74571. __webpack_require__(67);
  74572. __webpack_require__(68);
  74573. __webpack_require__(69);
  74574. __webpack_require__(70);
  74575. __webpack_require__(71);
  74576. __webpack_require__(72);
  74577. __webpack_require__(73);
  74578. __webpack_require__(74);
  74579. __webpack_require__(75);
  74580. __webpack_require__(76);
  74581. __webpack_require__(77);
  74582. __webpack_require__(78);
  74583. __webpack_require__(79);
  74584. __webpack_require__(80);
  74585. __webpack_require__(81);
  74586. __webpack_require__(82);
  74587. __webpack_require__(83);
  74588. __webpack_require__(84);
  74589. __webpack_require__(85);
  74590. __webpack_require__(86);
  74591. __webpack_require__(87);
  74592. __webpack_require__(88);
  74593. var _utils = __webpack_require__(89);
  74594. var _auth_storage = __webpack_require__(90);
  74595. var _auth_v = __webpack_require__(91);
  74596. var _auth_v2 = __webpack_require__(93);
  74597. var auth = _interopRequireWildcard(_auth_v2);
  74598. var _data = __webpack_require__(97);
  74599. var data = _interopRequireWildcard(_data);
  74600. var _fetch = __webpack_require__(94);
  74601. var cozyFetch = _interopRequireWildcard(_fetch);
  74602. var _mango = __webpack_require__(99);
  74603. var mango = _interopRequireWildcard(_mango);
  74604. var _files = __webpack_require__(100);
  74605. var files = _interopRequireWildcard(_files);
  74606. var _intents = __webpack_require__(101);
  74607. var intents = _interopRequireWildcard(_intents);
  74608. var _jobs = __webpack_require__(102);
  74609. var jobs = _interopRequireWildcard(_jobs);
  74610. var _offline = __webpack_require__(103);
  74611. var offline = _interopRequireWildcard(_offline);
  74612. var _settings = __webpack_require__(104);
  74613. var settings = _interopRequireWildcard(_settings);
  74614. var _relations = __webpack_require__(105);
  74615. var relations = _interopRequireWildcard(_relations);
  74616. function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
  74617. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  74618. var AppTokenV3 = auth.AppToken,
  74619. AccessTokenV3 = auth.AccessToken,
  74620. ClientV3 = auth.Client;
  74621. var AuthNone = 0;
  74622. var AuthRunning = 1;
  74623. var AuthError = 2;
  74624. var AuthOK = 3;
  74625. var defaultClientParams = {
  74626. softwareID: 'github.com/cozy/cozy-client-js'
  74627. };
  74628. var dataProto = {
  74629. create: data.create,
  74630. find: data.find,
  74631. findMany: data.findMany,
  74632. findAll: data.findAll,
  74633. update: data.update,
  74634. delete: data._delete,
  74635. updateAttributes: data.updateAttributes,
  74636. changesFeed: data.changesFeed,
  74637. defineIndex: mango.defineIndex,
  74638. query: mango.query,
  74639. addReferencedFiles: relations.addReferencedFiles,
  74640. removeReferencedFiles: relations.removeReferencedFiles,
  74641. listReferencedFiles: relations.listReferencedFiles,
  74642. fetchReferencedFiles: relations.fetchReferencedFiles,
  74643. destroy: function destroy() {
  74644. (0, _utils.warn)('destroy is deprecated, use cozy.data.delete instead.');
  74645. return data._delete.apply(data, arguments);
  74646. }
  74647. };
  74648. var authProto = {
  74649. client: auth.client,
  74650. registerClient: auth.registerClient,
  74651. updateClient: auth.updateClient,
  74652. unregisterClient: auth.unregisterClient,
  74653. getClient: auth.getClient,
  74654. getAuthCodeURL: auth.getAuthCodeURL,
  74655. getAccessToken: auth.getAccessToken,
  74656. refreshToken: auth.refreshToken
  74657. };
  74658. var filesProto = {
  74659. create: files.create,
  74660. createDirectory: files.createDirectory,
  74661. createDirectoryByPath: files.createDirectoryByPath,
  74662. updateById: files.updateById,
  74663. updateAttributesById: files.updateAttributesById,
  74664. updateAttributesByPath: files.updateAttributesByPath,
  74665. trashById: files.trashById,
  74666. statById: files.statById,
  74667. statByPath: files.statByPath,
  74668. downloadById: files.downloadById,
  74669. downloadByPath: files.downloadByPath,
  74670. getDownloadLinkById: files.getDownloadLinkById,
  74671. getDownloadLink: files.getDownloadLinkByPath, // DEPRECATED, should be removed very soon
  74672. getDownloadLinkByPath: files.getDownloadLinkByPath,
  74673. getArchiveLink: function getArchiveLink() {
  74674. (0, _utils.warn)('getArchiveLink is deprecated, use cozy.files.getArchiveLinkByPaths instead.');
  74675. return files.getArchiveLinkByPaths.apply(files, arguments);
  74676. },
  74677. getArchiveLinkByPaths: files.getArchiveLinkByPaths,
  74678. getArchiveLinkByIds: files.getArchiveLinkByIds,
  74679. getFilePath: files.getFilePath,
  74680. getCollectionShareLink: files.getCollectionShareLink,
  74681. query: mango.queryFiles,
  74682. listTrash: files.listTrash,
  74683. clearTrash: files.clearTrash,
  74684. restoreById: files.restoreById,
  74685. destroyById: files.destroyById
  74686. };
  74687. var intentsProto = {
  74688. create: intents.create,
  74689. createService: intents.createService
  74690. };
  74691. var jobsProto = {
  74692. create: jobs.create,
  74693. count: jobs.count,
  74694. queued: jobs.queued
  74695. };
  74696. var offlineProto = {
  74697. init: offline.init,
  74698. getDoctypes: offline.getDoctypes,
  74699. // database
  74700. hasDatabase: offline.hasDatabase,
  74701. getDatabase: offline.getDatabase,
  74702. createDatabase: offline.createDatabase,
  74703. destroyDatabase: offline.destroyDatabase,
  74704. destroyAllDatabase: offline.destroyAllDatabase,
  74705. // replication
  74706. hasReplication: offline.hasReplication,
  74707. replicateFromCozy: offline.replicateFromCozy,
  74708. stopReplication: offline.stopReplication,
  74709. stopAllReplication: offline.stopAllReplication,
  74710. // repeated replication
  74711. hasRepeatedReplication: offline.hasRepeatedReplication,
  74712. startRepeatedReplication: offline.startRepeatedReplication,
  74713. stopRepeatedReplication: offline.stopRepeatedReplication,
  74714. stopAllRepeatedReplication: offline.stopAllRepeatedReplication
  74715. };
  74716. var settingsProto = {
  74717. diskUsage: settings.diskUsage,
  74718. changePassphrase: settings.changePassphrase,
  74719. getInstance: settings.getInstance,
  74720. updateInstance: settings.updateInstance,
  74721. getClients: settings.getClients,
  74722. deleteClientById: settings.deleteClientById,
  74723. updateLastSync: settings.updateLastSync
  74724. };
  74725. var Client = function () {
  74726. function Client(options) {
  74727. _classCallCheck(this, Client);
  74728. this.data = {};
  74729. this.files = {};
  74730. this.intents = {};
  74731. this.jobs = {};
  74732. this.offline = {};
  74733. this.settings = {};
  74734. this.auth = {
  74735. Client: ClientV3,
  74736. AccessToken: AccessTokenV3,
  74737. AppToken: AppTokenV3,
  74738. AppTokenV2: _auth_v.AppToken,
  74739. LocalStorage: _auth_storage.LocalStorage,
  74740. MemoryStorage: _auth_storage.MemoryStorage
  74741. };
  74742. this._inited = false;
  74743. if (options) {
  74744. this.init(options);
  74745. }
  74746. }
  74747. _createClass(Client, [{
  74748. key: 'init',
  74749. value: function init() {
  74750. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  74751. this._inited = true;
  74752. this._oauth = false; // is oauth activated or not
  74753. this._token = null; // application token
  74754. this._authstate = AuthNone;
  74755. this._authcreds = null;
  74756. this._storage = null;
  74757. this._version = options.version || null;
  74758. this._offline = null;
  74759. var token = options.token;
  74760. var oauth = options.oauth;
  74761. if (token && oauth) {
  74762. throw new Error('Cannot specify an application token with a oauth activated');
  74763. }
  74764. if (token) {
  74765. this._token = new AppTokenV3({ token: token });
  74766. } else if (oauth) {
  74767. this._oauth = true;
  74768. this._storage = oauth.storage;
  74769. this._clientParams = Object.assign({}, defaultClientParams, oauth.clientParams);
  74770. this._onRegistered = oauth.onRegistered || nopOnRegistered;
  74771. }
  74772. var url = options.cozyURL || '';
  74773. while (url[url.length - 1] === '/') {
  74774. url = url.slice(0, -1);
  74775. }
  74776. this._url = url;
  74777. var disablePromises = !!options.disablePromises;
  74778. addToProto(this, this.data, dataProto, disablePromises);
  74779. addToProto(this, this.auth, authProto, disablePromises);
  74780. addToProto(this, this.files, filesProto, disablePromises);
  74781. addToProto(this, this.intents, intentsProto, disablePromises);
  74782. addToProto(this, this.jobs, jobsProto, disablePromises);
  74783. addToProto(this, this.offline, offlineProto, disablePromises);
  74784. addToProto(this, this.settings, settingsProto, disablePromises);
  74785. if (options.offline) {
  74786. this.offline.init(options.offline);
  74787. }
  74788. // Exposing cozyFetchJSON to make some development easier. Should be temporary.
  74789. this.fetchJSON = function _fetchJSON() {
  74790. var args = [this].concat(Array.prototype.slice.call(arguments));
  74791. return cozyFetch.cozyFetchJSON.apply(this, args);
  74792. };
  74793. }
  74794. }, {
  74795. key: 'authorize',
  74796. value: function authorize() {
  74797. var _this = this;
  74798. var forceTokenRefresh = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  74799. var state = this._authstate;
  74800. if (state === AuthOK || state === AuthRunning) {
  74801. return this._authcreds;
  74802. }
  74803. this._authstate = AuthRunning;
  74804. this._authcreds = this.isV2().then(function (isV2) {
  74805. if (isV2 && _this._oauth) {
  74806. throw new Error('OAuth is not supported on the V2 stack');
  74807. }
  74808. if (_this._oauth) {
  74809. if (forceTokenRefresh && _this._clientParams.redirectURI) {
  74810. var url = new URL(_this._clientParams.redirectURI);
  74811. if (!url.searchParams.has('reconnect')) url.searchParams.append('reconnect', 1);
  74812. _this._clientParams.redirectURI = url.toString();
  74813. }
  74814. return auth.oauthFlow(_this, _this._storage, _this._clientParams, _this._onRegistered, forceTokenRefresh);
  74815. }
  74816. // we expect to be on a client side application running in a browser
  74817. // with cookie-based authentication.
  74818. if (isV2) {
  74819. return (0, _auth_v.getAppToken)();
  74820. } else if (_this._token) {
  74821. return Promise.resolve({ client: null, token: _this._token });
  74822. } else {
  74823. throw new Error('Missing application token');
  74824. }
  74825. });
  74826. this._authcreds.then(function () {
  74827. _this._authstate = AuthOK;
  74828. }, function () {
  74829. _this._authstate = AuthError;
  74830. });
  74831. return this._authcreds;
  74832. }
  74833. }, {
  74834. key: 'saveCredentials',
  74835. value: function saveCredentials(client, token) {
  74836. var creds = { client: client, token: token };
  74837. if (!this._storage || this._authstate === AuthRunning) {
  74838. return Promise.resolve(creds);
  74839. }
  74840. this._storage.save(auth.CredsKey, creds);
  74841. this._authcreds = Promise.resolve(creds);
  74842. return this._authcreds;
  74843. }
  74844. }, {
  74845. key: 'fullpath',
  74846. value: function fullpath(path) {
  74847. var _this2 = this;
  74848. return this.isV2().then(function (isV2) {
  74849. var pathprefix = isV2 ? '/ds-api' : '';
  74850. return _this2._url + pathprefix + path;
  74851. });
  74852. }
  74853. }, {
  74854. key: 'isV2',
  74855. value: function isV2() {
  74856. var _this3 = this;
  74857. if (!this._version) {
  74858. return (0, _utils.retry)(function () {
  74859. return fetch(_this3._url + '/status/');
  74860. }, 3)().then(function (res) {
  74861. if (!res.ok) {
  74862. throw new Error('Could not fetch cozy status');
  74863. } else {
  74864. return res.json();
  74865. }
  74866. }).then(function (status) {
  74867. _this3._version = status.datasystem !== undefined ? 2 : 3;
  74868. return _this3.isV2();
  74869. });
  74870. }
  74871. return Promise.resolve(this._version === 2);
  74872. }
  74873. }]);
  74874. return Client;
  74875. }();
  74876. function nopOnRegistered() {
  74877. throw new Error('Missing onRegistered callback');
  74878. }
  74879. function protoify(context, fn) {
  74880. return function prototyped() {
  74881. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  74882. args[_key] = arguments[_key];
  74883. }
  74884. return fn.apply(undefined, [context].concat(args));
  74885. };
  74886. }
  74887. function addToProto(ctx, obj, proto, disablePromises) {
  74888. for (var attr in proto) {
  74889. var fn = protoify(ctx, proto[attr]);
  74890. if (disablePromises) {
  74891. fn = (0, _utils.unpromiser)(fn);
  74892. }
  74893. obj[attr] = fn;
  74894. }
  74895. }
  74896. module.exports = new Client();
  74897. Object.assign(module.exports, { Client: Client, LocalStorage: _auth_storage.LocalStorage, MemoryStorage: _auth_storage.MemoryStorage });
  74898. /***/ },
  74899. /* 3 */
  74900. /***/ function(module, exports) {
  74901. module.exports = __webpack_require__(836);
  74902. /***/ },
  74903. /* 4 */
  74904. /***/ function(module, exports) {
  74905. module.exports = __webpack_require__(837);
  74906. /***/ },
  74907. /* 5 */
  74908. /***/ function(module, exports) {
  74909. module.exports = __webpack_require__(842);
  74910. /***/ },
  74911. /* 6 */
  74912. /***/ function(module, exports) {
  74913. module.exports = __webpack_require__(843);
  74914. /***/ },
  74915. /* 7 */
  74916. /***/ function(module, exports) {
  74917. module.exports = __webpack_require__(844);
  74918. /***/ },
  74919. /* 8 */
  74920. /***/ function(module, exports) {
  74921. module.exports = __webpack_require__(845);
  74922. /***/ },
  74923. /* 9 */
  74924. /***/ function(module, exports) {
  74925. module.exports = __webpack_require__(846);
  74926. /***/ },
  74927. /* 10 */
  74928. /***/ function(module, exports) {
  74929. module.exports = __webpack_require__(847);
  74930. /***/ },
  74931. /* 11 */
  74932. /***/ function(module, exports) {
  74933. module.exports = __webpack_require__(848);
  74934. /***/ },
  74935. /* 12 */
  74936. /***/ function(module, exports) {
  74937. module.exports = __webpack_require__(849);
  74938. /***/ },
  74939. /* 13 */
  74940. /***/ function(module, exports) {
  74941. module.exports = __webpack_require__(850);
  74942. /***/ },
  74943. /* 14 */
  74944. /***/ function(module, exports) {
  74945. module.exports = __webpack_require__(852);
  74946. /***/ },
  74947. /* 15 */
  74948. /***/ function(module, exports) {
  74949. module.exports = __webpack_require__(853);
  74950. /***/ },
  74951. /* 16 */
  74952. /***/ function(module, exports) {
  74953. module.exports = __webpack_require__(854);
  74954. /***/ },
  74955. /* 17 */
  74956. /***/ function(module, exports) {
  74957. module.exports = __webpack_require__(855);
  74958. /***/ },
  74959. /* 18 */
  74960. /***/ function(module, exports) {
  74961. module.exports = __webpack_require__(856);
  74962. /***/ },
  74963. /* 19 */
  74964. /***/ function(module, exports) {
  74965. module.exports = __webpack_require__(858);
  74966. /***/ },
  74967. /* 20 */
  74968. /***/ function(module, exports) {
  74969. module.exports = __webpack_require__(859);
  74970. /***/ },
  74971. /* 21 */
  74972. /***/ function(module, exports) {
  74973. module.exports = __webpack_require__(860);
  74974. /***/ },
  74975. /* 22 */
  74976. /***/ function(module, exports) {
  74977. module.exports = __webpack_require__(861);
  74978. /***/ },
  74979. /* 23 */
  74980. /***/ function(module, exports) {
  74981. module.exports = __webpack_require__(862);
  74982. /***/ },
  74983. /* 24 */
  74984. /***/ function(module, exports) {
  74985. module.exports = __webpack_require__(863);
  74986. /***/ },
  74987. /* 25 */
  74988. /***/ function(module, exports) {
  74989. module.exports = __webpack_require__(864);
  74990. /***/ },
  74991. /* 26 */
  74992. /***/ function(module, exports) {
  74993. module.exports = __webpack_require__(865);
  74994. /***/ },
  74995. /* 27 */
  74996. /***/ function(module, exports) {
  74997. module.exports = __webpack_require__(866);
  74998. /***/ },
  74999. /* 28 */
  75000. /***/ function(module, exports) {
  75001. module.exports = __webpack_require__(867);
  75002. /***/ },
  75003. /* 29 */
  75004. /***/ function(module, exports) {
  75005. module.exports = __webpack_require__(868);
  75006. /***/ },
  75007. /* 30 */
  75008. /***/ function(module, exports) {
  75009. module.exports = __webpack_require__(869);
  75010. /***/ },
  75011. /* 31 */
  75012. /***/ function(module, exports) {
  75013. module.exports = __webpack_require__(873);
  75014. /***/ },
  75015. /* 32 */
  75016. /***/ function(module, exports) {
  75017. module.exports = __webpack_require__(877);
  75018. /***/ },
  75019. /* 33 */
  75020. /***/ function(module, exports) {
  75021. module.exports = __webpack_require__(878);
  75022. /***/ },
  75023. /* 34 */
  75024. /***/ function(module, exports) {
  75025. module.exports = __webpack_require__(880);
  75026. /***/ },
  75027. /* 35 */
  75028. /***/ function(module, exports) {
  75029. module.exports = __webpack_require__(881);
  75030. /***/ },
  75031. /* 36 */
  75032. /***/ function(module, exports) {
  75033. module.exports = __webpack_require__(882);
  75034. /***/ },
  75035. /* 37 */
  75036. /***/ function(module, exports) {
  75037. module.exports = __webpack_require__(883);
  75038. /***/ },
  75039. /* 38 */
  75040. /***/ function(module, exports) {
  75041. module.exports = __webpack_require__(884);
  75042. /***/ },
  75043. /* 39 */
  75044. /***/ function(module, exports) {
  75045. module.exports = __webpack_require__(886);
  75046. /***/ },
  75047. /* 40 */
  75048. /***/ function(module, exports) {
  75049. module.exports = __webpack_require__(887);
  75050. /***/ },
  75051. /* 41 */
  75052. /***/ function(module, exports) {
  75053. module.exports = __webpack_require__(888);
  75054. /***/ },
  75055. /* 42 */
  75056. /***/ function(module, exports) {
  75057. module.exports = __webpack_require__(889);
  75058. /***/ },
  75059. /* 43 */
  75060. /***/ function(module, exports) {
  75061. module.exports = __webpack_require__(890);
  75062. /***/ },
  75063. /* 44 */
  75064. /***/ function(module, exports) {
  75065. module.exports = __webpack_require__(892);
  75066. /***/ },
  75067. /* 45 */
  75068. /***/ function(module, exports) {
  75069. module.exports = __webpack_require__(893);
  75070. /***/ },
  75071. /* 46 */
  75072. /***/ function(module, exports) {
  75073. module.exports = __webpack_require__(894);
  75074. /***/ },
  75075. /* 47 */
  75076. /***/ function(module, exports) {
  75077. module.exports = __webpack_require__(895);
  75078. /***/ },
  75079. /* 48 */
  75080. /***/ function(module, exports) {
  75081. module.exports = __webpack_require__(896);
  75082. /***/ },
  75083. /* 49 */
  75084. /***/ function(module, exports) {
  75085. module.exports = __webpack_require__(897);
  75086. /***/ },
  75087. /* 50 */
  75088. /***/ function(module, exports) {
  75089. module.exports = __webpack_require__(898);
  75090. /***/ },
  75091. /* 51 */
  75092. /***/ function(module, exports) {
  75093. module.exports = __webpack_require__(899);
  75094. /***/ },
  75095. /* 52 */
  75096. /***/ function(module, exports) {
  75097. module.exports = __webpack_require__(900);
  75098. /***/ },
  75099. /* 53 */
  75100. /***/ function(module, exports) {
  75101. module.exports = __webpack_require__(901);
  75102. /***/ },
  75103. /* 54 */
  75104. /***/ function(module, exports) {
  75105. module.exports = __webpack_require__(196);
  75106. /***/ },
  75107. /* 55 */
  75108. /***/ function(module, exports) {
  75109. module.exports = __webpack_require__(902);
  75110. /***/ },
  75111. /* 56 */
  75112. /***/ function(module, exports) {
  75113. module.exports = __webpack_require__(903);
  75114. /***/ },
  75115. /* 57 */
  75116. /***/ function(module, exports) {
  75117. module.exports = __webpack_require__(904);
  75118. /***/ },
  75119. /* 58 */
  75120. /***/ function(module, exports) {
  75121. module.exports = __webpack_require__(905);
  75122. /***/ },
  75123. /* 59 */
  75124. /***/ function(module, exports) {
  75125. module.exports = __webpack_require__(906);
  75126. /***/ },
  75127. /* 60 */
  75128. /***/ function(module, exports) {
  75129. module.exports = __webpack_require__(907);
  75130. /***/ },
  75131. /* 61 */
  75132. /***/ function(module, exports) {
  75133. module.exports = __webpack_require__(908);
  75134. /***/ },
  75135. /* 62 */
  75136. /***/ function(module, exports) {
  75137. module.exports = __webpack_require__(909);
  75138. /***/ },
  75139. /* 63 */
  75140. /***/ function(module, exports) {
  75141. module.exports = __webpack_require__(910);
  75142. /***/ },
  75143. /* 64 */
  75144. /***/ function(module, exports) {
  75145. module.exports = __webpack_require__(911);
  75146. /***/ },
  75147. /* 65 */
  75148. /***/ function(module, exports) {
  75149. module.exports = __webpack_require__(912);
  75150. /***/ },
  75151. /* 66 */
  75152. /***/ function(module, exports) {
  75153. module.exports = __webpack_require__(913);
  75154. /***/ },
  75155. /* 67 */
  75156. /***/ function(module, exports) {
  75157. module.exports = __webpack_require__(914);
  75158. /***/ },
  75159. /* 68 */
  75160. /***/ function(module, exports) {
  75161. module.exports = __webpack_require__(915);
  75162. /***/ },
  75163. /* 69 */
  75164. /***/ function(module, exports) {
  75165. module.exports = __webpack_require__(916);
  75166. /***/ },
  75167. /* 70 */
  75168. /***/ function(module, exports) {
  75169. module.exports = __webpack_require__(918);
  75170. /***/ },
  75171. /* 71 */
  75172. /***/ function(module, exports) {
  75173. module.exports = __webpack_require__(919);
  75174. /***/ },
  75175. /* 72 */
  75176. /***/ function(module, exports) {
  75177. module.exports = __webpack_require__(920);
  75178. /***/ },
  75179. /* 73 */
  75180. /***/ function(module, exports) {
  75181. module.exports = __webpack_require__(921);
  75182. /***/ },
  75183. /* 74 */
  75184. /***/ function(module, exports) {
  75185. module.exports = __webpack_require__(922);
  75186. /***/ },
  75187. /* 75 */
  75188. /***/ function(module, exports) {
  75189. module.exports = __webpack_require__(923);
  75190. /***/ },
  75191. /* 76 */
  75192. /***/ function(module, exports) {
  75193. module.exports = __webpack_require__(924);
  75194. /***/ },
  75195. /* 77 */
  75196. /***/ function(module, exports) {
  75197. module.exports = __webpack_require__(925);
  75198. /***/ },
  75199. /* 78 */
  75200. /***/ function(module, exports) {
  75201. module.exports = __webpack_require__(926);
  75202. /***/ },
  75203. /* 79 */
  75204. /***/ function(module, exports) {
  75205. module.exports = __webpack_require__(927);
  75206. /***/ },
  75207. /* 80 */
  75208. /***/ function(module, exports) {
  75209. module.exports = __webpack_require__(928);
  75210. /***/ },
  75211. /* 81 */
  75212. /***/ function(module, exports) {
  75213. module.exports = __webpack_require__(929);
  75214. /***/ },
  75215. /* 82 */
  75216. /***/ function(module, exports) {
  75217. module.exports = __webpack_require__(930);
  75218. /***/ },
  75219. /* 83 */
  75220. /***/ function(module, exports) {
  75221. module.exports = __webpack_require__(931);
  75222. /***/ },
  75223. /* 84 */
  75224. /***/ function(module, exports) {
  75225. module.exports = __webpack_require__(932);
  75226. /***/ },
  75227. /* 85 */
  75228. /***/ function(module, exports) {
  75229. module.exports = __webpack_require__(933);
  75230. /***/ },
  75231. /* 86 */
  75232. /***/ function(module, exports) {
  75233. module.exports = __webpack_require__(934);
  75234. /***/ },
  75235. /* 87 */
  75236. /***/ function(module, exports) {
  75237. module.exports = __webpack_require__(935);
  75238. /***/ },
  75239. /* 88 */
  75240. /***/ function(module, exports) {
  75241. module.exports = __webpack_require__(936);
  75242. /***/ },
  75243. /* 89 */
  75244. /***/ function(module, exports) {
  75245. 'use strict';
  75246. Object.defineProperty(exports, "__esModule", {
  75247. value: true
  75248. });
  75249. exports.unpromiser = unpromiser;
  75250. exports.isPromise = isPromise;
  75251. exports.isOnline = isOnline;
  75252. exports.isOffline = isOffline;
  75253. exports.sleep = sleep;
  75254. exports.retry = retry;
  75255. exports.getFuzzedDelay = getFuzzedDelay;
  75256. exports.getBackedoffDelay = getBackedoffDelay;
  75257. exports.createPath = createPath;
  75258. exports.encodeQuery = encodeQuery;
  75259. exports.decodeQuery = decodeQuery;
  75260. exports.warn = warn;
  75261. /* global navigator */
  75262. var FuzzFactor = 0.3;
  75263. function unpromiser(fn) {
  75264. return function () {
  75265. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  75266. args[_key] = arguments[_key];
  75267. }
  75268. var value = fn.apply(this, args);
  75269. if (!isPromise(value)) {
  75270. return value;
  75271. }
  75272. var l = args.length;
  75273. if (l === 0 || typeof args[l - 1] !== 'function') {
  75274. return;
  75275. }
  75276. var cb = args[l - 1];
  75277. value.then(function (res) {
  75278. return cb(null, res);
  75279. }, function (err) {
  75280. return cb(err, null);
  75281. });
  75282. };
  75283. }
  75284. function isPromise(value) {
  75285. return !!value && typeof value.then === 'function';
  75286. }
  75287. function isOnline() {
  75288. return typeof navigator !== 'undefined' ? navigator.onLine : true;
  75289. }
  75290. function isOffline() {
  75291. return !isOnline();
  75292. }
  75293. function sleep(time, args) {
  75294. return new Promise(function (resolve) {
  75295. setTimeout(resolve, time, args);
  75296. });
  75297. }
  75298. function retry(fn, count) {
  75299. var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;
  75300. return function doTry() {
  75301. for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  75302. args[_key2] = arguments[_key2];
  75303. }
  75304. return fn.apply(undefined, args).catch(function (err) {
  75305. if (--count < 0) {
  75306. throw err;
  75307. }
  75308. return sleep(getBackedoffDelay(delay, count)).then(function () {
  75309. return doTry.apply(undefined, args);
  75310. });
  75311. });
  75312. };
  75313. }
  75314. function getFuzzedDelay(retryDelay) {
  75315. var fuzzingFactor = (Math.random() * 2 - 1) * FuzzFactor;
  75316. return retryDelay * (1.0 + fuzzingFactor);
  75317. }
  75318. function getBackedoffDelay(retryDelay) {
  75319. var retryCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  75320. return getFuzzedDelay(retryDelay * Math.pow(2, retryCount - 1));
  75321. }
  75322. function createPath(cozy, isV2, doctype) {
  75323. var id = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
  75324. var query = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
  75325. var route = '/data/';
  75326. if (!isV2) {
  75327. route += encodeURIComponent(doctype) + '/';
  75328. }
  75329. if (id !== '') {
  75330. route += encodeURIComponent(id);
  75331. }
  75332. var q = encodeQuery(query);
  75333. if (q !== '') {
  75334. route += '?' + q;
  75335. }
  75336. return route;
  75337. }
  75338. function encodeQuery(query) {
  75339. if (!query) {
  75340. return '';
  75341. }
  75342. var q = '';
  75343. for (var qname in query) {
  75344. if (q !== '') {
  75345. q += '&';
  75346. }
  75347. q += encodeURIComponent(qname) + '=' + encodeURIComponent(query[qname]);
  75348. }
  75349. return q;
  75350. }
  75351. function decodeQuery(url) {
  75352. var queryIndex = url.indexOf('?');
  75353. if (queryIndex < 0) {
  75354. queryIndex = url.length;
  75355. }
  75356. var queries = {};
  75357. var fragIndex = url.indexOf('#');
  75358. if (fragIndex < 0) {
  75359. fragIndex = url.length;
  75360. }
  75361. if (fragIndex < queryIndex) {
  75362. return queries;
  75363. }
  75364. var queryStr = url.slice(queryIndex + 1, fragIndex);
  75365. if (queryStr === '') {
  75366. return queries;
  75367. }
  75368. var parts = queryStr.split('&');
  75369. for (var i = 0; i < parts.length; i++) {
  75370. var pair = parts[i].split('=');
  75371. if (pair.length === 0 || pair[0] === '') {
  75372. continue;
  75373. }
  75374. var qname = decodeURIComponent(pair[0]);
  75375. if (queries.hasOwnProperty(qname)) {
  75376. continue;
  75377. }
  75378. if (pair.length === 1) {
  75379. queries[qname] = true;
  75380. } else if (pair.length === 2) {
  75381. queries[qname] = decodeURIComponent(pair[1]);
  75382. } else {
  75383. throw new Error('Malformed URL');
  75384. }
  75385. }
  75386. return queries;
  75387. }
  75388. var warned = [];
  75389. function warn(text) {
  75390. if (warned.indexOf(text) === -1) {
  75391. warned.push(text);
  75392. console.warn('cozy-client-js', text);
  75393. }
  75394. }
  75395. /***/ },
  75396. /* 90 */
  75397. /***/ function(module, exports) {
  75398. 'use strict';
  75399. Object.defineProperty(exports, "__esModule", {
  75400. value: true
  75401. });
  75402. var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  75403. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  75404. var LocalStorage = exports.LocalStorage = function () {
  75405. function LocalStorage(storage, prefix) {
  75406. _classCallCheck(this, LocalStorage);
  75407. if (!storage && typeof window !== 'undefined') {
  75408. storage = window.localStorage;
  75409. }
  75410. this.storage = storage;
  75411. this.prefix = prefix || 'cozy:oauth:';
  75412. }
  75413. _createClass(LocalStorage, [{
  75414. key: 'save',
  75415. value: function save(key, value) {
  75416. var _this = this;
  75417. return new Promise(function (resolve) {
  75418. _this.storage.setItem(_this.prefix + key, JSON.stringify(value));
  75419. resolve(value);
  75420. });
  75421. }
  75422. }, {
  75423. key: 'load',
  75424. value: function load(key) {
  75425. var _this2 = this;
  75426. return new Promise(function (resolve) {
  75427. var item = _this2.storage.getItem(_this2.prefix + key);
  75428. if (!item) {
  75429. resolve();
  75430. } else {
  75431. resolve(JSON.parse(item));
  75432. }
  75433. });
  75434. }
  75435. }, {
  75436. key: 'delete',
  75437. value: function _delete(key) {
  75438. var _this3 = this;
  75439. return new Promise(function (resolve) {
  75440. return resolve(_this3.storage.removeItem(_this3.prefix + key));
  75441. });
  75442. }
  75443. }, {
  75444. key: 'clear',
  75445. value: function clear() {
  75446. var _this4 = this;
  75447. return new Promise(function (resolve) {
  75448. var storage = _this4.storage;
  75449. for (var i = 0; i < storage.length; i++) {
  75450. var key = storage.key(i);
  75451. if (key.indexOf(_this4.prefix) === 0) {
  75452. storage.removeItem(key);
  75453. }
  75454. }
  75455. resolve();
  75456. });
  75457. }
  75458. }]);
  75459. return LocalStorage;
  75460. }();
  75461. var MemoryStorage = exports.MemoryStorage = function () {
  75462. function MemoryStorage() {
  75463. _classCallCheck(this, MemoryStorage);
  75464. this.hash = Object.create(null);
  75465. }
  75466. _createClass(MemoryStorage, [{
  75467. key: 'save',
  75468. value: function save(key, value) {
  75469. this.hash[key] = value;
  75470. return Promise.resolve(value);
  75471. }
  75472. }, {
  75473. key: 'load',
  75474. value: function load(key) {
  75475. return Promise.resolve(this.hash[key]);
  75476. }
  75477. }, {
  75478. key: 'delete',
  75479. value: function _delete(key) {
  75480. var deleted = delete this.hash[key];
  75481. return Promise.resolve(deleted);
  75482. }
  75483. }, {
  75484. key: 'clear',
  75485. value: function clear() {
  75486. this.hash = Object.create(null);
  75487. return Promise.resolve();
  75488. }
  75489. }]);
  75490. return MemoryStorage;
  75491. }();
  75492. /***/ },
  75493. /* 91 */
  75494. /***/ function(module, exports, __webpack_require__) {
  75495. /* WEBPACK VAR INJECTION */(function(btoa) {'use strict';
  75496. Object.defineProperty(exports, "__esModule", {
  75497. value: true
  75498. });
  75499. var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  75500. exports.getAppToken = getAppToken;
  75501. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  75502. /* global btoa */
  75503. var V2TOKEN_ABORT_TIMEOUT = 3000;
  75504. function getAppToken() {
  75505. return new Promise(function (resolve, reject) {
  75506. if (typeof window === 'undefined') {
  75507. return reject(new Error('getV2Token should be used in browser'));
  75508. } else if (!window.parent) {
  75509. return reject(new Error('getV2Token should be used in iframe'));
  75510. } else if (!window.parent.postMessage) {
  75511. return reject(new Error('getV2Token should be used in modern browser'));
  75512. }
  75513. var origin = window.location.origin;
  75514. var intent = { action: 'getToken' };
  75515. var timeout = null;
  75516. var receiver = function receiver(event) {
  75517. var token = void 0;
  75518. try {
  75519. token = new AppToken({
  75520. appName: event.data.appName,
  75521. token: event.data.token
  75522. });
  75523. } catch (e) {
  75524. reject(e);
  75525. return;
  75526. }
  75527. window.removeEventListener('message', receiver);
  75528. clearTimeout(timeout);
  75529. resolve({ client: null, token: token });
  75530. };
  75531. window.addEventListener('message', receiver, false);
  75532. window.parent.postMessage(intent, origin);
  75533. timeout = setTimeout(function () {
  75534. reject(new Error('No response from parent iframe after 3s'));
  75535. }, V2TOKEN_ABORT_TIMEOUT);
  75536. });
  75537. }
  75538. var AppToken = exports.AppToken = function () {
  75539. function AppToken(opts) {
  75540. _classCallCheck(this, AppToken);
  75541. this.appName = opts.appName || '';
  75542. this.token = opts.token || '';
  75543. }
  75544. _createClass(AppToken, [{
  75545. key: 'toAuthHeader',
  75546. value: function toAuthHeader() {
  75547. return 'Basic ' + btoa(this.appName + ':' + this.token);
  75548. }
  75549. }]);
  75550. return AppToken;
  75551. }();
  75552. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(92)))
  75553. /***/ },
  75554. /* 92 */
  75555. /***/ function(module, exports) {
  75556. module.exports = __webpack_require__(937);
  75557. /***/ },
  75558. /* 93 */
  75559. /***/ function(module, exports, __webpack_require__) {
  75560. /* WEBPACK VAR INJECTION */(function(btoa) {'use strict';
  75561. Object.defineProperty(exports, "__esModule", {
  75562. value: true
  75563. });
  75564. exports.AppToken = exports.AccessToken = exports.Client = exports.StateKey = exports.CredsKey = undefined;
  75565. var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
  75566. var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /* global btoa */
  75567. exports.client = client;
  75568. exports.registerClient = registerClient;
  75569. exports.updateClient = updateClient;
  75570. exports.unregisterClient = unregisterClient;
  75571. exports.getClient = getClient;
  75572. exports.getAuthCodeURL = getAuthCodeURL;
  75573. exports.getAccessToken = getAccessToken;
  75574. exports.refreshToken = refreshToken;
  75575. exports.oauthFlow = oauthFlow;
  75576. var _utils = __webpack_require__(89);
  75577. var _fetch = __webpack_require__(94);
  75578. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  75579. var StateSize = 16;
  75580. var CredsKey = exports.CredsKey = 'creds';
  75581. var StateKey = exports.StateKey = 'state';
  75582. var Client = exports.Client = function () {
  75583. function Client(opts) {
  75584. _classCallCheck(this, Client);
  75585. this.clientID = opts.clientID || opts.client_id || '';
  75586. this.clientSecret = opts.clientSecret || opts.client_secret || '';
  75587. this.registrationAccessToken = opts.registrationAccessToken || opts.registration_access_token || '';
  75588. if (opts.redirect_uris) {
  75589. this.redirectURI = opts.redirect_uris[0] || '';
  75590. } else {
  75591. this.redirectURI = opts.redirectURI || '';
  75592. }
  75593. this.softwareID = opts.softwareID || opts.software_id || '';
  75594. this.softwareVersion = opts.softwareVersion || opts.software_version || '';
  75595. this.clientName = opts.clientName || opts.client_name || '';
  75596. this.clientKind = opts.clientKind || opts.client_kind || '';
  75597. this.clientURI = opts.clientURI || opts.client_uri || '';
  75598. this.logoURI = opts.logoURI || opts.logo_uri || '';
  75599. this.policyURI = opts.policyURI || opts.policy_uri || '';
  75600. if (!this.registrationAccessToken) {
  75601. if (this.redirectURI === '') {
  75602. throw new Error('Missing redirectURI field');
  75603. }
  75604. if (this.softwareID === '') {
  75605. throw new Error('Missing softwareID field');
  75606. }
  75607. if (this.clientName === '') {
  75608. throw new Error('Missing clientName field');
  75609. }
  75610. }
  75611. }
  75612. _createClass(Client, [{
  75613. key: 'isRegistered',
  75614. value: function isRegistered() {
  75615. return this.clientID !== '';
  75616. }
  75617. }, {
  75618. key: 'toRegisterJSON',
  75619. value: function toRegisterJSON() {
  75620. return {
  75621. redirect_uris: [this.redirectURI],
  75622. software_id: this.softwareID,
  75623. software_version: this.softwareVersion,
  75624. client_name: this.clientName,
  75625. client_kind: this.clientKind,
  75626. client_uri: this.clientURI,
  75627. logo_uri: this.logoURI,
  75628. policy_uri: this.policyURI
  75629. };
  75630. }
  75631. }, {
  75632. key: 'toAuthHeader',
  75633. value: function toAuthHeader() {
  75634. return 'Bearer ' + this.registrationAccessToken;
  75635. }
  75636. }]);
  75637. return Client;
  75638. }();
  75639. var AccessToken = exports.AccessToken = function () {
  75640. function AccessToken(opts) {
  75641. _classCallCheck(this, AccessToken);
  75642. this.tokenType = opts.tokenType || opts.token_type;
  75643. this.accessToken = opts.accessToken || opts.access_token;
  75644. this.refreshToken = opts.refreshToken || opts.refresh_token;
  75645. this.scope = opts.scope;
  75646. }
  75647. _createClass(AccessToken, [{
  75648. key: 'toAuthHeader',
  75649. value: function toAuthHeader() {
  75650. return 'Bearer ' + this.accessToken;
  75651. }
  75652. }, {
  75653. key: 'toBasicAuth',
  75654. value: function toBasicAuth() {
  75655. return 'user:' + this.accessToken + '@';
  75656. }
  75657. }]);
  75658. return AccessToken;
  75659. }();
  75660. var AppToken = exports.AppToken = function () {
  75661. function AppToken(opts) {
  75662. _classCallCheck(this, AppToken);
  75663. this.token = opts.token || '';
  75664. }
  75665. _createClass(AppToken, [{
  75666. key: 'toAuthHeader',
  75667. value: function toAuthHeader() {
  75668. return 'Bearer ' + this.token;
  75669. }
  75670. }, {
  75671. key: 'toBasicAuth',
  75672. value: function toBasicAuth() {
  75673. return 'user:' + this.token + '@';
  75674. }
  75675. }]);
  75676. return AppToken;
  75677. }();
  75678. function client(cozy, clientParams) {
  75679. if (!clientParams) {
  75680. clientParams = cozy._clientParams;
  75681. }
  75682. if (clientParams instanceof Client) {
  75683. return clientParams;
  75684. }
  75685. return new Client(clientParams);
  75686. }
  75687. function registerClient(cozy, clientParams) {
  75688. var cli = client(cozy, clientParams);
  75689. if (cli.isRegistered()) {
  75690. return Promise.reject(new Error('Client already registered'));
  75691. }
  75692. return (0, _fetch.cozyFetchJSON)(cozy, 'POST', '/auth/register', cli.toRegisterJSON(), {
  75693. disableAuth: true
  75694. }).then(function (data) {
  75695. return new Client(data);
  75696. });
  75697. }
  75698. function updateClient(cozy, clientParams) {
  75699. var resetSecret = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  75700. var cli = client(cozy, clientParams);
  75701. if (!cli.isRegistered()) {
  75702. return Promise.reject(new Error('Client not registered'));
  75703. }
  75704. var data = cli.toRegisterJSON();
  75705. data.client_id = cli.clientID;
  75706. if (resetSecret) data.client_secret = cli.clientSecret;
  75707. return (0, _fetch.cozyFetchJSON)(cozy, 'PUT', '/auth/register/' + cli.clientID, data, {
  75708. manualAuthCredentials: {
  75709. token: cli
  75710. }
  75711. }).then(function (data) {
  75712. return createClient(data, cli);
  75713. });
  75714. }
  75715. function unregisterClient(cozy, clientParams) {
  75716. var cli = client(cozy, clientParams);
  75717. if (!cli.isRegistered()) {
  75718. return Promise.reject(new Error('Client not registered'));
  75719. }
  75720. return (0, _fetch.cozyFetchJSON)(cozy, 'DELETE', '/auth/register/' + cli.clientID, null, {
  75721. manualAuthCredentials: {
  75722. token: cli
  75723. }
  75724. });
  75725. }
  75726. // getClient will retrive the registered client informations from the server.
  75727. function getClient(cozy, clientParams) {
  75728. var cli = client(cozy, clientParams);
  75729. if (!cli.isRegistered()) {
  75730. return Promise.reject(new Error('Client not registered'));
  75731. }
  75732. if ((0, _utils.isOffline)()) {
  75733. return Promise.resolve(cli);
  75734. }
  75735. return (0, _fetch.cozyFetchJSON)(cozy, 'GET', '/auth/register/' + cli.clientID, null, {
  75736. manualAuthCredentials: {
  75737. token: cli
  75738. }
  75739. }).then(function (data) {
  75740. return createClient(data, cli);
  75741. }).catch(function (err) {
  75742. // If we fall into an error while fetching the client (because of a
  75743. // bad connectivity for instance), we do not bail the whole process
  75744. // since the client should be able to continue with the persisted
  75745. // client and token.
  75746. //
  75747. // If it is an explicit Unauthorized error though, we bail, clear th
  75748. // cache and retry.
  75749. if (_fetch.FetchError.isUnauthorized(err) || _fetch.FetchError.isNotFound(err)) {
  75750. throw new Error('Client has been revoked');
  75751. }
  75752. throw err;
  75753. });
  75754. }
  75755. // createClient returns a new Client instance given on object containing the
  75756. // data of the client, from the API, and an old instance of the client.
  75757. function createClient(data, oldClient) {
  75758. var newClient = new Client(data);
  75759. // we need to keep track of the registrationAccessToken since it is send
  75760. // only on registration. The GET /auth/register/:client-id endpoint does
  75761. // not return this token.
  75762. var shouldPassRegistration = !!oldClient && oldClient.registrationAccessToken !== '' && newClient.registrationAccessToken === '';
  75763. if (shouldPassRegistration) {
  75764. newClient.registrationAccessToken = oldClient.registrationAccessToken;
  75765. }
  75766. return newClient;
  75767. }
  75768. // getAuthCodeURL returns a pair {authURL,state} given a registered client. The
  75769. // state should be stored in order to be checked against on the user validation
  75770. // phase.
  75771. function getAuthCodeURL(cozy, client) {
  75772. var scopes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  75773. if (!(client instanceof Client)) {
  75774. client = new Client(client);
  75775. }
  75776. if (!client.isRegistered()) {
  75777. throw new Error('Client not registered');
  75778. }
  75779. var state = generateRandomState();
  75780. var query = {
  75781. 'client_id': client.clientID,
  75782. 'redirect_uri': client.redirectURI,
  75783. 'state': state,
  75784. 'response_type': 'code',
  75785. 'scope': scopes.join(' ')
  75786. };
  75787. return {
  75788. url: cozy._url + ('/auth/authorize?' + (0, _utils.encodeQuery)(query)),
  75789. state: state
  75790. };
  75791. }
  75792. // getAccessToken perform a request on the access_token entrypoint with the
  75793. // authorization_code grant type in order to generate a new access token for a
  75794. // newly registered client.
  75795. //
  75796. // This method extracts the access code and state from the given URL. By
  75797. // default it uses window.location.href. Also, it checks the given state with
  75798. // the one specified in the URL query parameter to prevent CSRF attacks.
  75799. function getAccessToken(cozy, client, state) {
  75800. var pageURL = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
  75801. if (!state) {
  75802. return Promise.reject(new Error('Missing state value'));
  75803. }
  75804. var grantQueries = getGrantCodeFromPageURL(pageURL);
  75805. if (grantQueries === null) {
  75806. return Promise.reject(new Error('Missing states from current URL'));
  75807. }
  75808. if (state !== grantQueries.state) {
  75809. return Promise.reject(new Error('Given state does not match url query state'));
  75810. }
  75811. return retrieveToken(cozy, client, null, {
  75812. 'grant_type': 'authorization_code',
  75813. 'code': grantQueries.code
  75814. });
  75815. }
  75816. // refreshToken perform a request on the access_token entrypoint with the
  75817. // refresh_token grant type in order to refresh the given token.
  75818. function refreshToken(cozy, client, token) {
  75819. return retrieveToken(cozy, client, token, {
  75820. 'grant_type': 'refresh_token',
  75821. 'refresh_token': token.refreshToken
  75822. });
  75823. }
  75824. // oauthFlow performs the stateful registration and access granting of an OAuth
  75825. // client.
  75826. function oauthFlow(cozy, storage, clientParams, onRegistered) {
  75827. var ignoreCachedCredentials = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  75828. if (ignoreCachedCredentials) {
  75829. return storage.clear().then(function () {
  75830. return oauthFlow(cozy, storage, clientParams, onRegistered, false);
  75831. });
  75832. }
  75833. var tryCount = 0;
  75834. function clearAndRetry(err) {
  75835. if (tryCount++ > 0) {
  75836. throw err;
  75837. }
  75838. return storage.clear().then(function () {
  75839. return oauthFlow(cozy, storage, clientParams, onRegistered);
  75840. });
  75841. }
  75842. function registerNewClient() {
  75843. return storage.clear().then(function () {
  75844. return registerClient(cozy, clientParams);
  75845. }).then(function (client) {
  75846. var _getAuthCodeURL = getAuthCodeURL(cozy, client, clientParams.scopes),
  75847. url = _getAuthCodeURL.url,
  75848. state = _getAuthCodeURL.state;
  75849. return storage.save(StateKey, { client: client, url: url, state: state });
  75850. });
  75851. }
  75852. return Promise.all([storage.load(CredsKey), storage.load(StateKey)]).then(function (_ref) {
  75853. var _ref2 = _slicedToArray(_ref, 2),
  75854. credentials = _ref2[0],
  75855. storedState = _ref2[1];
  75856. // If credentials are cached we re-fetch the registered client with the
  75857. // said token. Fetching the client, if the token is outdated we should try
  75858. // the token is refreshed.
  75859. if (credentials) {
  75860. var oldClient = void 0,
  75861. _token = void 0;
  75862. try {
  75863. oldClient = new Client(credentials.client);
  75864. _token = new AccessToken(credentials.token);
  75865. } catch (err) {
  75866. // bad cache, we should clear and retry the process
  75867. return clearAndRetry(err);
  75868. }
  75869. return getClient(cozy, oldClient).then(function (client) {
  75870. return { client: client, token: _token };
  75871. }).catch(function (err) {
  75872. // If we fall into an error while fetching the client (because of a
  75873. // bad connectivity for instance), we do not bail the whole process
  75874. // since the client should be able to continue with the persisted
  75875. // client and token.
  75876. //
  75877. // If it is an explicit Unauthorized error though, we bail, clear th
  75878. // cache and retry.
  75879. if (_fetch.FetchError.isUnauthorized(err) || _fetch.FetchError.isNotFound(err)) {
  75880. throw new Error('Client has been revoked');
  75881. }
  75882. return { client: oldClient, token: _token };
  75883. });
  75884. }
  75885. // Otherwise register a new client if necessary (ie. no client is stored)
  75886. // and call the onRegistered callback to wait for the user to grant the
  75887. // access. Finally fetches to access token on success.
  75888. var statePromise = void 0;
  75889. if (!storedState) {
  75890. statePromise = registerNewClient();
  75891. } else {
  75892. statePromise = Promise.resolve(storedState);
  75893. }
  75894. var client = void 0,
  75895. state = void 0,
  75896. token = void 0;
  75897. return statePromise.then(function (data) {
  75898. client = data.client;
  75899. state = data.state;
  75900. return Promise.resolve(onRegistered(client, data.url));
  75901. }).then(function (pageURL) {
  75902. return getAccessToken(cozy, client, state, pageURL);
  75903. }).then(function (t) {
  75904. token = t;
  75905. }).then(function () {
  75906. return storage.delete(StateKey);
  75907. }).then(function () {
  75908. return { client: client, token: token };
  75909. });
  75910. }).then(function (creds) {
  75911. return storage.save(CredsKey, creds);
  75912. }, function (err) {
  75913. if (_fetch.FetchError.isUnauthorized(err)) {
  75914. return clearAndRetry(err);
  75915. } else {
  75916. throw err;
  75917. }
  75918. });
  75919. }
  75920. // retrieveToken perform a request on the access_token entrypoint in order to
  75921. // fetch a token.
  75922. function retrieveToken(cozy, client, token, query) {
  75923. if (!(client instanceof Client)) {
  75924. client = new Client(client);
  75925. }
  75926. if (!client.isRegistered()) {
  75927. return Promise.reject(new Error('Client not registered'));
  75928. }
  75929. var body = (0, _utils.encodeQuery)(Object.assign({}, query, {
  75930. 'client_id': client.clientID,
  75931. 'client_secret': client.clientSecret
  75932. }));
  75933. return (0, _fetch.cozyFetchJSON)(cozy, 'POST', '/auth/access_token', body, {
  75934. disableAuth: token === null,
  75935. dontRetry: true,
  75936. manualAuthCredentials: { client: client, token: token },
  75937. headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
  75938. }).then(function (data) {
  75939. data.refreshToken = data.refreshToken || query.refresh_token;
  75940. return new AccessToken(data);
  75941. });
  75942. }
  75943. // getGrantCodeFromPageURL extract the state and access_code query parameters
  75944. // from the given url
  75945. function getGrantCodeFromPageURL() {
  75946. var pageURL = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  75947. if (pageURL === '' && typeof window !== 'undefined') {
  75948. pageURL = window.location.href;
  75949. }
  75950. var queries = (0, _utils.decodeQuery)(pageURL);
  75951. if (!queries.hasOwnProperty('state')) {
  75952. return null;
  75953. }
  75954. return {
  75955. state: queries['state'],
  75956. code: queries['access_code']
  75957. };
  75958. }
  75959. // generateRandomState will try to generate a 128bits random value from a secure
  75960. // pseudo random generator. It will fallback on Math.random if it cannot find
  75961. // such generator.
  75962. function generateRandomState() {
  75963. var buffer = void 0;
  75964. if (typeof window !== 'undefined' && typeof window.crypto !== 'undefined' && typeof window.crypto.getRandomValues === 'function') {
  75965. buffer = new Uint8Array(StateSize);
  75966. window.crypto.getRandomValues(buffer);
  75967. } else {
  75968. try {
  75969. buffer = __webpack_require__(96).randomBytes(StateSize);
  75970. } catch (e) {}
  75971. }
  75972. if (!buffer) {
  75973. buffer = new Array(StateSize);
  75974. for (var i = 0; i < buffer.length; i++) {
  75975. buffer[i] = Math.floor(Math.random() * 255);
  75976. }
  75977. }
  75978. return btoa(String.fromCharCode.apply(null, buffer)).replace(/=+$/, '').replace(/\//g, '_').replace(/\+/g, '-');
  75979. }
  75980. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(92)))
  75981. /***/ },
  75982. /* 94 */
  75983. /***/ function(module, exports, __webpack_require__) {
  75984. 'use strict';
  75985. Object.defineProperty(exports, "__esModule", {
  75986. value: true
  75987. });
  75988. exports.FetchError = undefined;
  75989. var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); /* global fetch */
  75990. exports.cozyFetch = cozyFetch;
  75991. exports.cozyFetchJSON = cozyFetchJSON;
  75992. exports.cozyFetchRawJSON = cozyFetchRawJSON;
  75993. var _auth_v = __webpack_require__(93);
  75994. var _utils = __webpack_require__(89);
  75995. var _jsonapi = __webpack_require__(95);
  75996. var _jsonapi2 = _interopRequireDefault(_jsonapi);
  75997. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  75998. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  75999. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  76000. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
  76001. function cozyFetch(cozy, path) {
  76002. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  76003. return cozy.fullpath(path).then(function (fullpath) {
  76004. var resp = void 0;
  76005. if (options.disableAuth) {
  76006. resp = fetch(fullpath, options);
  76007. } else if (options.manualAuthCredentials) {
  76008. resp = cozyFetchWithAuth(cozy, fullpath, options, options.manualAuthCredentials);
  76009. } else {
  76010. resp = cozy.authorize().then(function (credentials) {
  76011. return cozyFetchWithAuth(cozy, fullpath, options, credentials);
  76012. });
  76013. }
  76014. return resp.then(handleResponse);
  76015. });
  76016. }
  76017. function cozyFetchWithAuth(cozy, fullpath, options, credentials) {
  76018. if (credentials) {
  76019. options.headers = options.headers || {};
  76020. options.headers['Authorization'] = credentials.token.toAuthHeader();
  76021. }
  76022. // the option credentials:include tells fetch to include the cookies in the
  76023. // request even for cross-origin requests
  76024. options.credentials = 'include';
  76025. return Promise.all([cozy.isV2(), fetch(fullpath, options)]).then(function (_ref) {
  76026. var _ref2 = _slicedToArray(_ref, 2),
  76027. isV2 = _ref2[0],
  76028. res = _ref2[1];
  76029. if (res.status !== 400 && res.status !== 401 || isV2 || !credentials || options.dontRetry) {
  76030. return res;
  76031. }
  76032. // we try to refresh the token only for OAuth, ie, the client defined
  76033. // and the token is an instance of AccessToken.
  76034. var client = credentials.client,
  76035. token = credentials.token;
  76036. if (!client || !(token instanceof _auth_v.AccessToken)) {
  76037. return res;
  76038. }
  76039. options.dontRetry = true;
  76040. return (0, _utils.retry)(function () {
  76041. return (0, _auth_v.refreshToken)(cozy, client, token);
  76042. }, 3)().then(function (newToken) {
  76043. return cozy.saveCredentials(client, newToken);
  76044. }).then(function (credentials) {
  76045. return cozyFetchWithAuth(cozy, fullpath, options, credentials);
  76046. });
  76047. });
  76048. }
  76049. function cozyFetchJSON(cozy, method, path, body) {
  76050. var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  76051. return fetchJSON(cozy, method, path, body, options).then(handleJSONResponse);
  76052. }
  76053. function cozyFetchRawJSON(cozy, method, path, body) {
  76054. var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  76055. return fetchJSON(cozy, method, path, body, options).then(function (response) {
  76056. return handleJSONResponse(response, false);
  76057. });
  76058. }
  76059. function fetchJSON(cozy, method, path, body) {
  76060. var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  76061. options.method = method;
  76062. var headers = options.headers = options.headers || {};
  76063. headers['Accept'] = 'application/json';
  76064. if (method !== 'GET' && method !== 'HEAD' && body !== undefined) {
  76065. if (headers['Content-Type']) {
  76066. options.body = body;
  76067. } else {
  76068. headers['Content-Type'] = 'application/json';
  76069. options.body = JSON.stringify(body);
  76070. }
  76071. }
  76072. return cozyFetch(cozy, path, options);
  76073. }
  76074. function handleResponse(res) {
  76075. if (res.ok) {
  76076. return res;
  76077. }
  76078. var data = void 0;
  76079. var contentType = res.headers.get('content-type');
  76080. if (contentType && contentType.indexOf('json') >= 0) {
  76081. data = res.json();
  76082. } else {
  76083. data = res.text();
  76084. }
  76085. return data.then(function (err) {
  76086. throw new FetchError(res, err);
  76087. });
  76088. }
  76089. function handleJSONResponse(res) {
  76090. var processJSONAPI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  76091. var contentType = res.headers.get('content-type');
  76092. if (!contentType || contentType.indexOf('json') < 0) {
  76093. return res.text(function (data) {
  76094. throw new FetchError(res, new Error('Response is not JSON: ' + data));
  76095. });
  76096. }
  76097. var json = res.json();
  76098. if (contentType.indexOf('application/vnd.api+json') === 0 && processJSONAPI) {
  76099. return json.then(_jsonapi2.default);
  76100. } else {
  76101. return json;
  76102. }
  76103. }
  76104. var FetchError = exports.FetchError = function (_Error) {
  76105. _inherits(FetchError, _Error);
  76106. function FetchError(res, reason) {
  76107. _classCallCheck(this, FetchError);
  76108. var _this = _possibleConstructorReturn(this, (FetchError.__proto__ || Object.getPrototypeOf(FetchError)).call(this));
  76109. if (Error.captureStackTrace) {
  76110. Error.captureStackTrace(_this, _this.constructor);
  76111. }
  76112. // XXX We have to hardcode this because babel doesn't play nice when extending Error
  76113. _this.name = 'FetchError';
  76114. _this.response = res;
  76115. _this.url = res.url;
  76116. _this.status = res.status;
  76117. _this.reason = reason;
  76118. Object.defineProperty(_this, 'message', {
  76119. value: reason.message || (typeof reason === 'string' ? reason : JSON.stringify(reason))
  76120. });
  76121. return _this;
  76122. }
  76123. return FetchError;
  76124. }(Error);
  76125. FetchError.isUnauthorized = function (err) {
  76126. // XXX We can't use err instanceof FetchError because of the caveats of babel
  76127. return err.name === 'FetchError' && err.status === 401;
  76128. };
  76129. FetchError.isNotFound = function (err) {
  76130. // XXX We can't use err instanceof FetchError because of the caveats of babel
  76131. return err.name === 'FetchError' && err.status === 404;
  76132. };
  76133. /***/ },
  76134. /* 95 */
  76135. /***/ function(module, exports) {
  76136. 'use strict';
  76137. Object.defineProperty(exports, "__esModule", {
  76138. value: true
  76139. });
  76140. function indexKey(doc) {
  76141. return doc.type + '/' + doc.id;
  76142. }
  76143. function findByRef(resources, ref) {
  76144. return resources[indexKey(ref)];
  76145. }
  76146. function handleResource(rawResource, resources, links) {
  76147. var resource = {
  76148. _id: rawResource.id,
  76149. _type: rawResource.type,
  76150. _rev: rawResource.meta && rawResource.meta.rev,
  76151. links: Object.assign({}, rawResource.links, links),
  76152. attributes: rawResource.attributes,
  76153. relations: function relations(name) {
  76154. var rels = rawResource.relationships[name];
  76155. if (rels === undefined || rels.data === undefined) return undefined;
  76156. if (rels.data === null) return null;
  76157. if (!Array.isArray(rels.data)) return findByRef(resources, rels.data);
  76158. return rels.data.map(function (ref) {
  76159. return findByRef(resources, ref);
  76160. });
  76161. }
  76162. };
  76163. if (rawResource.relationships) {
  76164. resource.relationships = rawResource.relationships;
  76165. }
  76166. resources[indexKey(rawResource)] = resource;
  76167. return resource;
  76168. }
  76169. function handleTopLevel(doc) {
  76170. var resources = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  76171. // build an index of included resource by Type & ID
  76172. var included = doc.included;
  76173. if (Array.isArray(included)) {
  76174. included.forEach(function (r) {
  76175. return handleResource(r, resources, doc.links);
  76176. });
  76177. }
  76178. if (Array.isArray(doc.data)) {
  76179. return doc.data.map(function (r) {
  76180. return handleResource(r, resources, doc.links);
  76181. });
  76182. } else {
  76183. return handleResource(doc.data, resources, doc.links);
  76184. }
  76185. }
  76186. exports.default = handleTopLevel;
  76187. /***/ },
  76188. /* 96 */
  76189. /***/ function(module, exports) {
  76190. module.exports = __webpack_require__(5);
  76191. /***/ },
  76192. /* 97 */
  76193. /***/ function(module, exports, __webpack_require__) {
  76194. 'use strict';
  76195. Object.defineProperty(exports, "__esModule", {
  76196. value: true
  76197. });
  76198. exports.create = create;
  76199. exports.find = find;
  76200. exports.findMany = findMany;
  76201. exports.findAll = findAll;
  76202. exports.changesFeed = changesFeed;
  76203. exports.update = update;
  76204. exports.updateAttributes = updateAttributes;
  76205. exports._delete = _delete;
  76206. var _utils = __webpack_require__(89);
  76207. var _doctypes = __webpack_require__(98);
  76208. var _fetch = __webpack_require__(94);
  76209. var NOREV = 'stack-v2-no-rev';
  76210. function create(cozy, doctype, attributes) {
  76211. return cozy.isV2().then(function (isV2) {
  76212. doctype = (0, _doctypes.normalizeDoctype)(cozy, isV2, doctype);
  76213. if (isV2) {
  76214. attributes.docType = doctype;
  76215. }
  76216. var path = (0, _utils.createPath)(cozy, isV2, doctype, attributes._id);
  76217. var httpVerb = attributes._id ? 'PUT' : 'POST';
  76218. delete attributes._id;
  76219. return (0, _fetch.cozyFetchJSON)(cozy, httpVerb, path, attributes).then(function (resp) {
  76220. if (isV2) {
  76221. return find(cozy, doctype, resp._id);
  76222. } else {
  76223. return resp.data;
  76224. }
  76225. });
  76226. });
  76227. }
  76228. function find(cozy, doctype, id) {
  76229. return cozy.isV2().then(function (isV2) {
  76230. doctype = (0, _doctypes.normalizeDoctype)(cozy, isV2, doctype);
  76231. if (!id) {
  76232. return Promise.reject(new Error('Missing id parameter'));
  76233. }
  76234. var path = (0, _utils.createPath)(cozy, isV2, doctype, id);
  76235. return (0, _fetch.cozyFetchJSON)(cozy, 'GET', path).then(function (resp) {
  76236. if (isV2) {
  76237. return Object.assign(resp, { _rev: NOREV });
  76238. } else {
  76239. return resp;
  76240. }
  76241. });
  76242. });
  76243. }
  76244. function findMany(cozy, doctype, ids) {
  76245. if (!(ids instanceof Array)) {
  76246. return Promise.reject(new Error('Parameter ids must be a non-empty array'));
  76247. }
  76248. if (ids.length === 0) {
  76249. // So users don't need to be defensive regarding the array content.
  76250. // This should not hide issues in user code since the result will be an
  76251. // empty object anyway.
  76252. return Promise.resolve({});
  76253. }
  76254. return cozy.isV2().then(function (isV2) {
  76255. if (isV2) {
  76256. return Promise.reject(new Error('findMany is not available on v2'));
  76257. }
  76258. var path = (0, _utils.createPath)(cozy, isV2, doctype, '_all_docs', { include_docs: true });
  76259. return (0, _fetch.cozyFetchJSON)(cozy, 'POST', path, { keys: ids }).then(function (resp) {
  76260. var docs = {};
  76261. var _iteratorNormalCompletion = true;
  76262. var _didIteratorError = false;
  76263. var _iteratorError = undefined;
  76264. try {
  76265. for (var _iterator = resp.rows[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
  76266. var row = _step.value;
  76267. var key = row.key,
  76268. doc = row.doc,
  76269. error = row.error;
  76270. docs[key] = error ? { error: error } : { doc: doc };
  76271. }
  76272. } catch (err) {
  76273. _didIteratorError = true;
  76274. _iteratorError = err;
  76275. } finally {
  76276. try {
  76277. if (!_iteratorNormalCompletion && _iterator.return) {
  76278. _iterator.return();
  76279. }
  76280. } finally {
  76281. if (_didIteratorError) {
  76282. throw _iteratorError;
  76283. }
  76284. }
  76285. }
  76286. return docs;
  76287. }).catch(function (error) {
  76288. if (error.status !== 404) return Promise.reject(error);
  76289. // When no doc was ever created and the database does not exist yet,
  76290. // the response will be a 404 error.
  76291. var docs = {};
  76292. var _iteratorNormalCompletion2 = true;
  76293. var _didIteratorError2 = false;
  76294. var _iteratorError2 = undefined;
  76295. try {
  76296. for (var _iterator2 = ids[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
  76297. var id = _step2.value;
  76298. docs[id] = { error: error };
  76299. }
  76300. } catch (err) {
  76301. _didIteratorError2 = true;
  76302. _iteratorError2 = err;
  76303. } finally {
  76304. try {
  76305. if (!_iteratorNormalCompletion2 && _iterator2.return) {
  76306. _iterator2.return();
  76307. }
  76308. } finally {
  76309. if (_didIteratorError2) {
  76310. throw _iteratorError2;
  76311. }
  76312. }
  76313. }
  76314. return docs;
  76315. });
  76316. });
  76317. }
  76318. function findAll(cozy, doctype) {
  76319. return cozy.isV2().then(function (isV2) {
  76320. if (isV2) {
  76321. return Promise.reject(new Error('findAll is not available on v2'));
  76322. }
  76323. var path = (0, _utils.createPath)(cozy, isV2, doctype, '_all_docs', { include_docs: true });
  76324. return (0, _fetch.cozyFetchJSON)(cozy, 'POST', path, {}).then(function (resp) {
  76325. var docs = [];
  76326. var _iteratorNormalCompletion3 = true;
  76327. var _didIteratorError3 = false;
  76328. var _iteratorError3 = undefined;
  76329. try {
  76330. for (var _iterator3 = resp.rows[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
  76331. var row = _step3.value;
  76332. var doc = row.doc;
  76333. // if not couchDB indexes
  76334. if (!doc._id.match(/_design\//)) docs.push(doc);
  76335. }
  76336. } catch (err) {
  76337. _didIteratorError3 = true;
  76338. _iteratorError3 = err;
  76339. } finally {
  76340. try {
  76341. if (!_iteratorNormalCompletion3 && _iterator3.return) {
  76342. _iterator3.return();
  76343. }
  76344. } finally {
  76345. if (_didIteratorError3) {
  76346. throw _iteratorError3;
  76347. }
  76348. }
  76349. }
  76350. return docs;
  76351. }).catch(function (error) {
  76352. // the _all_docs endpoint returns a 404 error if no document with the given
  76353. // doctype exists.
  76354. if (error.status === 404) return [];
  76355. throw error;
  76356. });
  76357. });
  76358. }
  76359. function changesFeed(cozy, doctype, options) {
  76360. return cozy.isV2().then(function (isV2) {
  76361. doctype = (0, _doctypes.normalizeDoctype)(cozy, isV2, doctype);
  76362. var path = (0, _utils.createPath)(cozy, isV2, doctype, '_changes', options);
  76363. return (0, _fetch.cozyFetchJSON)(cozy, 'GET', path);
  76364. });
  76365. }
  76366. function update(cozy, doctype, doc, changes) {
  76367. return cozy.isV2().then(function (isV2) {
  76368. doctype = (0, _doctypes.normalizeDoctype)(cozy, isV2, doctype);
  76369. var _id = doc._id,
  76370. _rev = doc._rev;
  76371. if (!_id) {
  76372. return Promise.reject(new Error('Missing _id field in passed document'));
  76373. }
  76374. if (!isV2 && !_rev) {
  76375. return Promise.reject(new Error('Missing _rev field in passed document'));
  76376. }
  76377. if (isV2) {
  76378. changes = Object.assign({ _id: _id }, changes);
  76379. } else {
  76380. changes = Object.assign({ _id: _id, _rev: _rev }, changes);
  76381. }
  76382. var path = (0, _utils.createPath)(cozy, isV2, doctype, _id);
  76383. return (0, _fetch.cozyFetchJSON)(cozy, 'PUT', path, changes).then(function (resp) {
  76384. if (isV2) {
  76385. return find(cozy, doctype, _id);
  76386. } else {
  76387. return resp.data;
  76388. }
  76389. });
  76390. });
  76391. }
  76392. function updateAttributes(cozy, doctype, _id, changes) {
  76393. var tries = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 3;
  76394. return cozy.isV2().then(function (isV2) {
  76395. doctype = (0, _doctypes.normalizeDoctype)(cozy, isV2, doctype);
  76396. return find(cozy, doctype, _id).then(function (doc) {
  76397. return update(cozy, doctype, doc, Object.assign({ _id: _id }, doc, changes));
  76398. }).catch(function (err) {
  76399. if (tries > 0) {
  76400. return updateAttributes(cozy, doctype, _id, changes, tries - 1);
  76401. } else {
  76402. throw err;
  76403. }
  76404. });
  76405. });
  76406. }
  76407. function _delete(cozy, doctype, doc) {
  76408. return cozy.isV2().then(function (isV2) {
  76409. doctype = (0, _doctypes.normalizeDoctype)(cozy, isV2, doctype);
  76410. var _id = doc._id,
  76411. _rev = doc._rev;
  76412. if (!_id) {
  76413. return Promise.reject(new Error('Missing _id field in passed document'));
  76414. }
  76415. if (!isV2 && !_rev) {
  76416. return Promise.reject(new Error('Missing _rev field in passed document'));
  76417. }
  76418. var query = isV2 ? null : { rev: _rev };
  76419. var path = (0, _utils.createPath)(cozy, isV2, doctype, _id, query);
  76420. return (0, _fetch.cozyFetchJSON)(cozy, 'DELETE', path).then(function (resp) {
  76421. if (isV2) {
  76422. return { id: _id, rev: NOREV };
  76423. } else {
  76424. return resp;
  76425. }
  76426. });
  76427. });
  76428. }
  76429. /***/ },
  76430. /* 98 */
  76431. /***/ function(module, exports, __webpack_require__) {
  76432. 'use strict';
  76433. Object.defineProperty(exports, "__esModule", {
  76434. value: true
  76435. });
  76436. exports.DOCTYPE_FILES = undefined;
  76437. exports.normalizeDoctype = normalizeDoctype;
  76438. var _utils = __webpack_require__(89);
  76439. var DOCTYPE_FILES = exports.DOCTYPE_FILES = 'io.cozy.files';
  76440. var KNOWN_DOCTYPES = {
  76441. 'files': DOCTYPE_FILES,
  76442. 'folder': DOCTYPE_FILES,
  76443. 'contact': 'io.cozy.contacts',
  76444. 'event': 'io.cozy.events',
  76445. 'track': 'io.cozy.labs.music.track',
  76446. 'playlist': 'io.cozy.labs.music.playlist'
  76447. };
  76448. var REVERSE_KNOWN = {};
  76449. Object.keys(KNOWN_DOCTYPES).forEach(function (k) {
  76450. REVERSE_KNOWN[KNOWN_DOCTYPES[k]] = k;
  76451. });
  76452. function normalizeDoctype(cozy, isV2, doctype) {
  76453. var isQualified = doctype.indexOf('.') !== -1;
  76454. if (isV2 && isQualified) {
  76455. var known = REVERSE_KNOWN[doctype];
  76456. if (known) return known;
  76457. return doctype.replace(/\./g, '-');
  76458. }
  76459. if (!isV2 && !isQualified) {
  76460. var _known = KNOWN_DOCTYPES[doctype];
  76461. if (_known) {
  76462. (0, _utils.warn)('you are using a non-qualified doctype ' + doctype + ' assumed to be ' + _known);
  76463. return _known;
  76464. }
  76465. throw new Error('Doctype ' + doctype + ' should be qualified.');
  76466. }
  76467. return doctype;
  76468. }
  76469. /***/ },
  76470. /* 99 */
  76471. /***/ function(module, exports, __webpack_require__) {
  76472. 'use strict';
  76473. Object.defineProperty(exports, "__esModule", {
  76474. value: true
  76475. });
  76476. var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
  76477. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  76478. exports.defineIndex = defineIndex;
  76479. exports.query = query;
  76480. exports.queryFiles = queryFiles;
  76481. exports.parseSelector = parseSelector;
  76482. exports.normalizeSelector = normalizeSelector;
  76483. exports.makeMapReduceQuery = makeMapReduceQuery;
  76484. var _utils = __webpack_require__(89);
  76485. var _doctypes = __webpack_require__(98);
  76486. var _fetch = __webpack_require__(94);
  76487. 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; }
  76488. function defineIndex(cozy, doctype, fields) {
  76489. return cozy.isV2().then(function (isV2) {
  76490. doctype = (0, _doctypes.normalizeDoctype)(cozy, isV2, doctype);
  76491. if (!Array.isArray(fields) || fields.length === 0) {
  76492. throw new Error('defineIndex fields should be a non-empty array');
  76493. }
  76494. if (isV2) {
  76495. return defineIndexV2(cozy, doctype, fields);
  76496. } else {
  76497. return defineIndexV3(cozy, doctype, fields);
  76498. }
  76499. });
  76500. }
  76501. function query(cozy, indexRef, options) {
  76502. return cozy.isV2().then(function (isV2) {
  76503. if (!indexRef) {
  76504. throw new Error('query should be passed the indexRef');
  76505. }
  76506. if (isV2) {
  76507. return queryV2(cozy, indexRef, options);
  76508. } else {
  76509. return queryV3(cozy, indexRef, options);
  76510. }
  76511. });
  76512. }
  76513. function queryFiles(cozy, indexRef, options) {
  76514. var opts = getV3Options(indexRef, options);
  76515. return (0, _fetch.cozyFetchRawJSON)(cozy, 'POST', '/files/_find', opts).then(function (response) {
  76516. return options.wholeResponse ? response : response.docs;
  76517. });
  76518. }
  76519. // Internals
  76520. var VALUEOPERATORS = ['$eq', '$gt', '$gte', '$lt', '$lte'];
  76521. var LOGICOPERATORS = ['$or', '$and', '$not'];
  76522. /* eslint-disable */
  76523. var MAP_TEMPLATE = function (doc) {
  76524. if (doc.docType.toLowerCase() === 'DOCTYPEPLACEHOLDER') {
  76525. emit(FIELDSPLACEHOLDER, doc);
  76526. }
  76527. }.toString().replace(/ /g, '').replace(/\n/g, '');
  76528. var COUCHDB_INFINITY = { '\uFFFF': '\uFFFF' };
  76529. var COUCHDB_LOWEST = null;
  76530. /* eslint-enable */
  76531. // defineIndexV2 is equivalent to defineIndex but only works for V2.
  76532. // It transforms the index fields into a map reduce view.
  76533. function defineIndexV2(cozy, doctype, fields) {
  76534. var indexName = 'by' + fields.map(capitalize).join('');
  76535. var indexDefinition = { map: makeMapFunction(doctype, fields), reduce: '_count' };
  76536. var path = '/request/' + doctype + '/' + indexName + '/';
  76537. return (0, _fetch.cozyFetchJSON)(cozy, 'PUT', path, indexDefinition).then(function () {
  76538. return { doctype: doctype, type: 'mapreduce', name: indexName, fields: fields };
  76539. });
  76540. }
  76541. function defineIndexV3(cozy, doctype, fields) {
  76542. var path = (0, _utils.createPath)(cozy, false, doctype, '_index');
  76543. var indexDefinition = { 'index': { fields: fields } };
  76544. return (0, _fetch.cozyFetchJSON)(cozy, 'POST', path, indexDefinition).then(function (response) {
  76545. var indexResult = { doctype: doctype, type: 'mango', name: response.id, fields: fields };
  76546. if (response.result === 'exists') return indexResult;
  76547. // indexes might not be usable right after being created; so we delay the resolving until they are
  76548. var selector = {};
  76549. selector[fields[0]] = { '$gt': null };
  76550. var opts = getV3Options(indexResult, { 'selector': selector });
  76551. var path = (0, _utils.createPath)(cozy, false, indexResult.doctype, '_find');
  76552. return (0, _fetch.cozyFetchJSON)(cozy, 'POST', path, opts).then(function () {
  76553. return indexResult;
  76554. }).catch(function () {
  76555. // one retry
  76556. return (0, _utils.sleep)(1000).then(function () {
  76557. return (0, _fetch.cozyFetchJSON)(cozy, 'POST', path, opts);
  76558. }).then(function () {
  76559. return indexResult;
  76560. }).catch(function () {
  76561. return (0, _utils.sleep)(500).then(function () {
  76562. return indexResult;
  76563. });
  76564. });
  76565. });
  76566. });
  76567. }
  76568. // queryV2 is equivalent to query but only works for V2.
  76569. // It transforms the query into a _views call using makeMapReduceQuery
  76570. function queryV2(cozy, indexRef, options) {
  76571. if (indexRef.type !== 'mapreduce') {
  76572. throw new Error('query indexRef should be the return value of defineIndexV2');
  76573. }
  76574. if (options.fields) {
  76575. (0, _utils.warn)('query fields will be ignored on v2');
  76576. }
  76577. var path = '/request/' + indexRef.doctype + '/' + indexRef.name + '/';
  76578. var opts = makeMapReduceQuery(indexRef, options);
  76579. return (0, _fetch.cozyFetchJSON)(cozy, 'POST', path, opts).then(function (response) {
  76580. return response.map(function (r) {
  76581. return r.value;
  76582. });
  76583. });
  76584. }
  76585. // queryV3 is equivalent to query but only works for V3
  76586. function queryV3(cozy, indexRef, options) {
  76587. var opts = getV3Options(indexRef, options);
  76588. var path = (0, _utils.createPath)(cozy, false, indexRef.doctype, '_find');
  76589. return (0, _fetch.cozyFetchJSON)(cozy, 'POST', path, opts).then(function (response) {
  76590. return options.wholeResponse ? response : response.docs;
  76591. });
  76592. }
  76593. function getV3Options(indexRef, options) {
  76594. if (indexRef.type !== 'mango') {
  76595. throw new Error('indexRef should be the return value of defineIndexV3');
  76596. }
  76597. var opts = {
  76598. use_index: indexRef.name,
  76599. fields: options.fields,
  76600. selector: options.selector,
  76601. limit: options.limit,
  76602. skip: options.skip,
  76603. since: options.since,
  76604. sort: options.sort
  76605. };
  76606. if (options.descending) {
  76607. opts.sort = indexRef.fields.map(function (f) {
  76608. return _defineProperty({}, f, 'desc');
  76609. });
  76610. }
  76611. return opts;
  76612. }
  76613. // misc
  76614. function capitalize(name) {
  76615. return name.charAt(0).toUpperCase() + name.slice(1);
  76616. }
  76617. function makeMapFunction(doctype, fields) {
  76618. fields = '[' + fields.map(function (name) {
  76619. return 'doc.' + name;
  76620. }).join(',') + ']';
  76621. return MAP_TEMPLATE.replace('DOCTYPEPLACEHOLDER', doctype.toLowerCase()).replace('FIELDSPLACEHOLDER', fields);
  76622. }
  76623. // parseSelector takes a mango selector and returns it as an array of filter
  76624. // a filter is [path, operator, value] array
  76625. // a path is an array of field names
  76626. // This function is only exported so it can be unit tested.
  76627. // Example :
  76628. // parseSelector({"test":{"deep": {"$gt": 3}}})
  76629. // [[['test', 'deep'], '$gt', 3 ]]
  76630. function parseSelector(selector) {
  76631. var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  76632. var operator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '$eq';
  76633. if ((typeof selector === 'undefined' ? 'undefined' : _typeof(selector)) !== 'object') {
  76634. return [[path, operator, selector]];
  76635. }
  76636. var keys = Object.keys(selector);
  76637. if (keys.length === 0) {
  76638. throw new Error('empty selector');
  76639. } else {
  76640. return keys.reduce(function (acc, k) {
  76641. if (LOGICOPERATORS.indexOf(k) !== -1) {
  76642. throw new Error('cozy-client-js does not support mango logic ops');
  76643. } else if (VALUEOPERATORS.indexOf(k) !== -1) {
  76644. return acc.concat(parseSelector(selector[k], path, k));
  76645. } else {
  76646. return acc.concat(parseSelector(selector[k], path.concat(k), '$eq'));
  76647. }
  76648. }, []);
  76649. }
  76650. }
  76651. // normalizeSelector takes a mango selector and returns it as an object
  76652. // normalized.
  76653. // This function is only exported so it can be unit tested.
  76654. // Example :
  76655. // parseSelector({"test":{"deep": {"$gt": 3}}})
  76656. // {"test.deep": {"$gt": 3}}
  76657. function normalizeSelector(selector) {
  76658. var filters = parseSelector(selector);
  76659. return filters.reduce(function (acc, filter) {
  76660. var _filter = _slicedToArray(filter, 3),
  76661. path = _filter[0],
  76662. op = _filter[1],
  76663. value = _filter[2];
  76664. var field = path.join('.');
  76665. acc[field] = acc[field] || {};
  76666. acc[field][op] = value;
  76667. return acc;
  76668. }, {});
  76669. }
  76670. // applySelector takes the normalized selector for the current field
  76671. // and append the proper values to opts.startkey, opts.endkey
  76672. function applySelector(selector, opts) {
  76673. var value = selector['$eq'];
  76674. var lower = COUCHDB_LOWEST;
  76675. var upper = COUCHDB_INFINITY;
  76676. var inclusiveEnd = void 0;
  76677. if (value) {
  76678. opts.startkey.push(value);
  76679. opts.endkey.push(value);
  76680. return false;
  76681. }
  76682. value = selector['$gt'];
  76683. if (value) {
  76684. throw new Error('operator $gt (strict greater than) not supported');
  76685. }
  76686. value = selector['$gte'];
  76687. if (value) {
  76688. lower = value;
  76689. }
  76690. value = selector['$lte'];
  76691. if (value) {
  76692. upper = value;
  76693. inclusiveEnd = true;
  76694. }
  76695. value = selector['$lt'];
  76696. if (value) {
  76697. upper = value;
  76698. inclusiveEnd = false;
  76699. }
  76700. opts.startkey.push(lower);
  76701. opts.endkey.push(upper);
  76702. if (inclusiveEnd !== undefined) opts.inclusive_end = inclusiveEnd;
  76703. return true;
  76704. }
  76705. // makeMapReduceQuery takes a mango query and generate _views call parameters
  76706. // to obtain same results depending on fields in the passed indexRef.
  76707. function makeMapReduceQuery(indexRef, query) {
  76708. var mrquery = {
  76709. startkey: [],
  76710. endkey: [],
  76711. reduce: false
  76712. };
  76713. var firstFreeValueField = null;
  76714. var normalizedSelector = normalizeSelector(query.selector);
  76715. indexRef.fields.forEach(function (field) {
  76716. var selector = normalizedSelector[field];
  76717. if (selector && firstFreeValueField != null) {
  76718. throw new Error('Selector on field ' + field + ', but not on ' + firstFreeValueField + ' which is higher in index fields.');
  76719. } else if (selector) {
  76720. selector.used = true;
  76721. var isFreeValue = applySelector(selector, mrquery);
  76722. if (isFreeValue) firstFreeValueField = field;
  76723. } else if (firstFreeValueField == null) {
  76724. firstFreeValueField = field;
  76725. mrquery.endkey.push(COUCHDB_INFINITY);
  76726. }
  76727. });
  76728. Object.keys(normalizedSelector).forEach(function (field) {
  76729. if (!normalizedSelector[field].used) {
  76730. throw new Error('Cant apply selector on ' + field + ', it is not in index');
  76731. }
  76732. });
  76733. if (query.descending) {
  76734. mrquery = {
  76735. descending: true,
  76736. reduce: false,
  76737. startkey: mrquery.endkey,
  76738. endkey: mrquery.startkey,
  76739. inclusive_end: mrquery.inclusive_end
  76740. };
  76741. }
  76742. return mrquery;
  76743. }
  76744. /***/ },
  76745. /* 100 */
  76746. /***/ function(module, exports, __webpack_require__) {
  76747. 'use strict';
  76748. Object.defineProperty(exports, "__esModule", {
  76749. value: true
  76750. });
  76751. exports.TRASH_DIR_ID = exports.ROOT_DIR_ID = undefined;
  76752. var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
  76753. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /* global Blob, File */
  76754. exports.create = create;
  76755. exports.createDirectory = createDirectory;
  76756. exports.createDirectoryByPath = createDirectoryByPath;
  76757. exports.updateById = updateById;
  76758. exports.updateAttributesById = updateAttributesById;
  76759. exports.updateAttributesByPath = updateAttributesByPath;
  76760. exports.trashById = trashById;
  76761. exports.statById = statById;
  76762. exports.statByPath = statByPath;
  76763. exports.downloadById = downloadById;
  76764. exports.downloadByPath = downloadByPath;
  76765. exports.getDownloadLinkByPath = getDownloadLinkByPath;
  76766. exports.getDownloadLinkById = getDownloadLinkById;
  76767. exports.getFilePath = getFilePath;
  76768. exports.getCollectionShareLink = getCollectionShareLink;
  76769. exports.getArchiveLinkByPaths = getArchiveLinkByPaths;
  76770. exports.getArchiveLinkByIds = getArchiveLinkByIds;
  76771. exports.listTrash = listTrash;
  76772. exports.clearTrash = clearTrash;
  76773. exports.restoreById = restoreById;
  76774. exports.destroyById = destroyById;
  76775. var _fetch = __webpack_require__(94);
  76776. var _jsonapi = __webpack_require__(95);
  76777. var _jsonapi2 = _interopRequireDefault(_jsonapi);
  76778. var _doctypes = __webpack_require__(98);
  76779. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  76780. // global variables
  76781. var ROOT_DIR_ID = exports.ROOT_DIR_ID = 'io.cozy.files.root-dir';
  76782. var TRASH_DIR_ID = exports.TRASH_DIR_ID = 'io.cozy.files.trash-dir';
  76783. var contentTypeOctetStream = 'application/octet-stream';
  76784. function doUpload(cozy, data, method, path, options) {
  76785. if (!data) {
  76786. throw new Error('missing data argument');
  76787. }
  76788. // transform any ArrayBufferView to ArrayBuffer
  76789. if (data.buffer && data.buffer instanceof ArrayBuffer) {
  76790. data = data.buffer;
  76791. }
  76792. var isBuffer = typeof ArrayBuffer !== 'undefined' && data instanceof ArrayBuffer;
  76793. var isFile = typeof File !== 'undefined' && data instanceof File;
  76794. var isBlob = typeof Blob !== 'undefined' && data instanceof Blob;
  76795. var isStream = data.readable === true && typeof data.pipe === 'function';
  76796. var isString = typeof data === 'string';
  76797. if (!isBuffer && !isFile && !isBlob && !isStream && !isString) {
  76798. throw new Error('invalid data type');
  76799. }
  76800. var _ref = options || {},
  76801. contentType = _ref.contentType,
  76802. checksum = _ref.checksum,
  76803. lastModifiedDate = _ref.lastModifiedDate,
  76804. ifMatch = _ref.ifMatch;
  76805. if (!contentType) {
  76806. if (isBuffer) {
  76807. contentType = contentTypeOctetStream;
  76808. } else if (isFile) {
  76809. contentType = data.type || contentTypeOctetStream;
  76810. if (!lastModifiedDate) {
  76811. lastModifiedDate = data.lastModifiedDate;
  76812. }
  76813. } else if (isBlob) {
  76814. contentType = data.type || contentTypeOctetStream;
  76815. } else if (isStream) {
  76816. contentType = contentTypeOctetStream;
  76817. } else if (typeof data === 'string') {
  76818. contentType = 'text/plain';
  76819. }
  76820. }
  76821. if (lastModifiedDate && typeof lastModifiedDate === 'string') {
  76822. lastModifiedDate = new Date(lastModifiedDate);
  76823. }
  76824. return (0, _fetch.cozyFetch)(cozy, path, {
  76825. method: method,
  76826. headers: {
  76827. 'Content-Type': contentType,
  76828. 'Content-MD5': checksum || '',
  76829. 'Date': lastModifiedDate ? lastModifiedDate.toGMTString() : '',
  76830. 'If-Match': ifMatch || ''
  76831. },
  76832. body: data
  76833. }).then(function (res) {
  76834. var json = res.json();
  76835. if (!res.ok) {
  76836. return json.then(function (err) {
  76837. throw err;
  76838. });
  76839. } else {
  76840. return json.then(_jsonapi2.default);
  76841. }
  76842. });
  76843. }
  76844. function create(cozy, data, options) {
  76845. var _ref2 = options || {},
  76846. name = _ref2.name,
  76847. dirID = _ref2.dirID,
  76848. executable = _ref2.executable;
  76849. // handle case where data is a file and contains the name
  76850. if (!name && typeof data.name === 'string') {
  76851. name = data.name;
  76852. }
  76853. if (typeof name !== 'string' || name === '') {
  76854. throw new Error('missing name argument');
  76855. }
  76856. if (executable === undefined) {
  76857. executable = false;
  76858. }
  76859. var path = '/files/' + encodeURIComponent(dirID || '');
  76860. var query = '?Name=' + encodeURIComponent(name) + '&Type=file&Executable=' + executable;
  76861. return doUpload(cozy, data, 'POST', '' + path + query, options);
  76862. }
  76863. function createDirectory(cozy, options) {
  76864. var _ref3 = options || {},
  76865. name = _ref3.name,
  76866. dirID = _ref3.dirID,
  76867. lastModifiedDate = _ref3.lastModifiedDate;
  76868. if (typeof name !== 'string' || name === '') {
  76869. throw new Error('missing name argument');
  76870. }
  76871. if (lastModifiedDate && typeof lastModifiedDate === 'string') {
  76872. lastModifiedDate = new Date(lastModifiedDate);
  76873. }
  76874. var path = '/files/' + encodeURIComponent(dirID || '');
  76875. var query = '?Name=' + encodeURIComponent(name) + '&Type=directory';
  76876. return (0, _fetch.cozyFetchJSON)(cozy, 'POST', '' + path + query, undefined, {
  76877. headers: {
  76878. 'Date': lastModifiedDate ? lastModifiedDate.toGMTString() : ''
  76879. }
  76880. });
  76881. }
  76882. function getDirectoryOrCreate(cozy, name, parentDirectory) {
  76883. if (parentDirectory && !parentDirectory.attributes) throw new Error('Malformed parent directory');
  76884. var path = (parentDirectory._id === ROOT_DIR_ID ? '' : parentDirectory.attributes.path) + '/' + name;
  76885. return cozy.files.statByPath(path || '/').catch(function (error) {
  76886. var parsedError = JSON.parse(error.message);
  76887. var errors = parsedError.errors;
  76888. if (errors && errors.length && errors[0].status === '404') {
  76889. return cozy.files.createDirectory({
  76890. name: name,
  76891. dirID: parentDirectory && parentDirectory._id
  76892. });
  76893. }
  76894. throw errors;
  76895. });
  76896. }
  76897. function createDirectoryByPath(cozy, path) {
  76898. var parts = path.split('/').filter(function (part) {
  76899. return part !== '';
  76900. });
  76901. var rootDirectoryPromise = cozy.files.statById(ROOT_DIR_ID);
  76902. return parts.length ? parts.reduce(function (parentDirectoryPromise, part) {
  76903. return parentDirectoryPromise.then(function (parentDirectory) {
  76904. return getDirectoryOrCreate(cozy, part, parentDirectory);
  76905. });
  76906. }, rootDirectoryPromise) : rootDirectoryPromise;
  76907. }
  76908. function updateById(cozy, id, data, options) {
  76909. return doUpload(cozy, data, 'PUT', '/files/' + encodeURIComponent(id), options);
  76910. }
  76911. function doUpdateAttributes(cozy, attrs, path, options) {
  76912. if (!attrs || (typeof attrs === 'undefined' ? 'undefined' : _typeof(attrs)) !== 'object') {
  76913. throw new Error('missing attrs argument');
  76914. }
  76915. var _ref4 = options || {},
  76916. ifMatch = _ref4.ifMatch;
  76917. var body = { data: { attributes: attrs } };
  76918. return (0, _fetch.cozyFetchJSON)(cozy, 'PATCH', path, body, {
  76919. headers: {
  76920. 'If-Match': ifMatch || ''
  76921. }
  76922. });
  76923. }
  76924. function updateAttributesById(cozy, id, attrs, options) {
  76925. return doUpdateAttributes(cozy, attrs, '/files/' + encodeURIComponent(id), options);
  76926. }
  76927. function updateAttributesByPath(cozy, path, attrs, options) {
  76928. return doUpdateAttributes(cozy, attrs, '/files/metadata?Path=' + encodeURIComponent(path), options);
  76929. }
  76930. function trashById(cozy, id, options) {
  76931. if (typeof id !== 'string' || id === '') {
  76932. throw new Error('missing id argument');
  76933. }
  76934. var _ref5 = options || {},
  76935. ifMatch = _ref5.ifMatch;
  76936. return (0, _fetch.cozyFetchJSON)(cozy, 'DELETE', '/files/' + encodeURIComponent(id), undefined, {
  76937. headers: {
  76938. 'If-Match': ifMatch || ''
  76939. }
  76940. });
  76941. }
  76942. function statById(cozy, id) {
  76943. var offline = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  76944. var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  76945. if (offline && cozy.offline.hasDatabase(_doctypes.DOCTYPE_FILES)) {
  76946. var db = cozy.offline.getDatabase(_doctypes.DOCTYPE_FILES);
  76947. return Promise.all([db.get(id), db.find(Object.assign({ selector: { 'dir_id': id } }, options))]).then(function (_ref6) {
  76948. var _ref7 = _slicedToArray(_ref6, 2),
  76949. doc = _ref7[0],
  76950. children = _ref7[1];
  76951. if (id === ROOT_DIR_ID) {
  76952. children.docs = children.docs.filter(function (doc) {
  76953. return doc._id !== TRASH_DIR_ID;
  76954. });
  76955. }
  76956. children = sortFiles(children.docs.map(function (doc) {
  76957. return addIsDir(toJsonApi(cozy, doc));
  76958. }));
  76959. return addIsDir(toJsonApi(cozy, doc, children));
  76960. });
  76961. }
  76962. var query = Object.keys(options).length === 0 ? '' : '?' + encodePageOptions(options);
  76963. return (0, _fetch.cozyFetchJSON)(cozy, 'GET', '/files/' + encodeURIComponent(id) + query).then(addIsDir);
  76964. }
  76965. function statByPath(cozy, path) {
  76966. return (0, _fetch.cozyFetchJSON)(cozy, 'GET', '/files/metadata?Path=' + encodeURIComponent(path)).then(addIsDir);
  76967. }
  76968. function downloadById(cozy, id) {
  76969. return (0, _fetch.cozyFetch)(cozy, '/files/download/' + encodeURIComponent(id));
  76970. }
  76971. function downloadByPath(cozy, path) {
  76972. return (0, _fetch.cozyFetch)(cozy, '/files/download?Path=' + encodeURIComponent(path));
  76973. }
  76974. function extractResponseLinkRelated(res) {
  76975. var href = res.links && res.links.related;
  76976. if (!href) throw new Error('No related link in server response');
  76977. return href;
  76978. }
  76979. function getDownloadLinkByPath(cozy, path) {
  76980. return (0, _fetch.cozyFetchJSON)(cozy, 'POST', '/files/downloads?Path=' + encodeURIComponent(path)).then(extractResponseLinkRelated);
  76981. }
  76982. function getDownloadLinkById(cozy, id) {
  76983. return (0, _fetch.cozyFetchJSON)(cozy, 'POST', '/files/downloads?Id=' + encodeURIComponent(id)).then(extractResponseLinkRelated);
  76984. }
  76985. function getFilePath(cozy) {
  76986. var file = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  76987. var folder = arguments[2];
  76988. if (!folder || !folder.attributes) {
  76989. throw Error('Folder should be valid with an attributes.path property');
  76990. }
  76991. var folderPath = folder.attributes.path.endsWith('/') ? folder.attributes.path : folder.attributes.path + '/';
  76992. return '' + folderPath + file.name;
  76993. }
  76994. function getCollectionShareLink(cozy, id, collectionType) {
  76995. if (!id) {
  76996. return Promise.reject(Error('An id should be provided to create a share link'));
  76997. }
  76998. return (0, _fetch.cozyFetchJSON)(cozy, 'POST', '/permissions?codes=email', {
  76999. data: {
  77000. type: 'io.cozy.permissions',
  77001. attributes: {
  77002. permissions: {
  77003. files: {
  77004. type: 'io.cozy.files',
  77005. verbs: ['GET'],
  77006. values: [id],
  77007. selector: 'referenced_by'
  77008. },
  77009. collection: {
  77010. type: collectionType,
  77011. verbs: ['GET'],
  77012. values: [id]
  77013. }
  77014. }
  77015. }
  77016. }
  77017. }).then(function (data) {
  77018. return { sharecode: 'sharecode=' + data.attributes.codes.email, id: 'id=' + id };
  77019. });
  77020. }
  77021. function getArchiveLinkByPaths(cozy, paths) {
  77022. var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'files';
  77023. var archive = {
  77024. type: 'io.cozy.archives',
  77025. attributes: {
  77026. name: name,
  77027. files: paths
  77028. }
  77029. };
  77030. return (0, _fetch.cozyFetchJSON)(cozy, 'POST', '/files/archive', { data: archive }).then(extractResponseLinkRelated);
  77031. }
  77032. function getArchiveLinkByIds(cozy, ids) {
  77033. var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'files';
  77034. var archive = {
  77035. type: 'io.cozy.archives',
  77036. attributes: {
  77037. name: name,
  77038. ids: ids
  77039. }
  77040. };
  77041. return (0, _fetch.cozyFetchJSON)(cozy, 'POST', '/files/archive', { data: archive }).then(extractResponseLinkRelated);
  77042. }
  77043. function listTrash(cozy) {
  77044. return (0, _fetch.cozyFetchJSON)(cozy, 'GET', '/files/trash');
  77045. }
  77046. function clearTrash(cozy) {
  77047. return (0, _fetch.cozyFetchJSON)(cozy, 'DELETE', '/files/trash');
  77048. }
  77049. function restoreById(cozy, id) {
  77050. return (0, _fetch.cozyFetchJSON)(cozy, 'POST', '/files/trash/' + encodeURIComponent(id));
  77051. }
  77052. function destroyById(cozy, id, options) {
  77053. var _ref8 = options || {},
  77054. ifMatch = _ref8.ifMatch;
  77055. return (0, _fetch.cozyFetchJSON)(cozy, 'DELETE', '/files/trash/' + encodeURIComponent(id), undefined, {
  77056. headers: {
  77057. 'If-Match': ifMatch || ''
  77058. }
  77059. });
  77060. }
  77061. function addIsDir(obj) {
  77062. obj.isDir = obj.attributes.type === 'directory';
  77063. return obj;
  77064. }
  77065. function encodePageOptions(options) {
  77066. var opts = [];
  77067. for (var name in options) {
  77068. opts.push('page[' + encodeURIComponent(name) + ']=' + encodeURIComponent(options[name]));
  77069. }
  77070. return opts.join('&');
  77071. }
  77072. function toJsonApi(cozy, doc) {
  77073. var contents = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  77074. var clone = JSON.parse(JSON.stringify(doc));
  77075. delete clone._id;
  77076. delete clone._rev;
  77077. return {
  77078. _id: doc._id,
  77079. _rev: doc._rev,
  77080. _type: _doctypes.DOCTYPE_FILES,
  77081. attributes: clone,
  77082. relationships: {
  77083. contents: {
  77084. data: contents,
  77085. meta: {
  77086. count: contents.length
  77087. }
  77088. }
  77089. },
  77090. relations: function relations(name) {
  77091. if (name === 'contents') {
  77092. return contents;
  77093. }
  77094. }
  77095. };
  77096. }
  77097. function sortFiles(allFiles) {
  77098. var folders = allFiles.filter(function (f) {
  77099. return f.attributes.type === 'directory';
  77100. });
  77101. var files = allFiles.filter(function (f) {
  77102. return f.attributes.type !== 'directory';
  77103. });
  77104. var sort = function sort(files) {
  77105. return files.sort(function (a, b) {
  77106. return a.attributes.name.localeCompare(b.attributes.name);
  77107. });
  77108. };
  77109. return sort(folders).concat(sort(files));
  77110. }
  77111. /***/ },
  77112. /* 101 */
  77113. /***/ function(module, exports, __webpack_require__) {
  77114. 'use strict';
  77115. Object.defineProperty(exports, "__esModule", {
  77116. value: true
  77117. });
  77118. exports.create = create;
  77119. exports.createService = createService;
  77120. var _fetch = __webpack_require__(94);
  77121. var intentClass = 'coz-intent';
  77122. // helper to serialize/deserialize an error for/from postMessage
  77123. var errorSerializer = function () {
  77124. function mapErrorProperties(from, to) {
  77125. var result = Object.assign(to, from);
  77126. var nativeProperties = ['name', 'message'];
  77127. return nativeProperties.reduce(function (result, property) {
  77128. if (from[property]) {
  77129. to[property] = from[property];
  77130. }
  77131. return result;
  77132. }, result);
  77133. }
  77134. return {
  77135. serialize: function serialize(error) {
  77136. return mapErrorProperties(error, {});
  77137. },
  77138. deserialize: function deserialize(data) {
  77139. return mapErrorProperties(data, new Error(data.message));
  77140. }
  77141. };
  77142. }();
  77143. // inject iframe for service in given element
  77144. function injectService(url, element, intent, data, onReadyCallback) {
  77145. var document = element.ownerDocument;
  77146. if (!document) throw new Error('Cannot retrieve document object from given element');
  77147. var window = document.defaultView;
  77148. if (!window) throw new Error('Cannot retrieve window object from document');
  77149. var iframe = document.createElement('iframe');
  77150. // if callback provided for when iframe is loaded
  77151. if (typeof onReadyCallback === 'function') iframe.onload = onReadyCallback;
  77152. iframe.setAttribute('src', url);
  77153. iframe.classList.add(intentClass);
  77154. element.appendChild(iframe);
  77155. // Keeps only http://domain:port/
  77156. var serviceOrigin = url.split('/', 3).join('/');
  77157. return new Promise(function (resolve, reject) {
  77158. var handshaken = false;
  77159. var messageHandler = function messageHandler(event) {
  77160. if (event.origin !== serviceOrigin) return;
  77161. if (event.data.type === 'load') {
  77162. // Safari 9.1 (At least) send a MessageEvent when the iframe loads,
  77163. // making the handshake fails.
  77164. console.warn && console.warn('Cozy Client ignored MessageEvent having data.type `load`.');
  77165. return;
  77166. }
  77167. if (event.data.type === 'intent-' + intent._id + ':ready') {
  77168. handshaken = true;
  77169. return event.source.postMessage(data, event.origin);
  77170. }
  77171. if (handshaken && event.data.type === 'intent-' + intent._id + ':resize') {
  77172. ['width', 'height', 'maxWidth', 'maxHeight'].forEach(function (prop) {
  77173. if (event.data.transition) element.style.transition = event.data.transition;
  77174. if (event.data.dimensions[prop]) element.style[prop] = event.data.dimensions[prop] + 'px';
  77175. });
  77176. return true;
  77177. }
  77178. window.removeEventListener('message', messageHandler);
  77179. var removeIntentFrame = function removeIntentFrame() {
  77180. // check if the parent node has not been already removed from the DOM
  77181. iframe.parentNode && iframe.parentNode.removeChild(iframe);
  77182. };
  77183. if (handshaken && event.data.type === 'intent-' + intent._id + ':exposeFrameRemoval') {
  77184. return resolve({ removeIntentFrame: removeIntentFrame, doc: event.data.document });
  77185. }
  77186. removeIntentFrame();
  77187. if (event.data.type === 'intent-' + intent._id + ':error') {
  77188. return reject(errorSerializer.deserialize(event.data.error));
  77189. }
  77190. if (handshaken && event.data.type === 'intent-' + intent._id + ':cancel') {
  77191. return resolve(null);
  77192. }
  77193. if (handshaken && event.data.type === 'intent-' + intent._id + ':done') {
  77194. return resolve(event.data.document);
  77195. }
  77196. if (!handshaken) {
  77197. return reject(new Error('Unexpected handshake message from intent service'));
  77198. }
  77199. // We may be in a state where the messageHandler is still attached to then
  77200. // window, but will not be needed anymore. For example, the service failed
  77201. // before adding the `unload` listener, so no `intent:cancel` message has
  77202. // never been sent.
  77203. // So we simply ignore other messages, and this listener will stay here,
  77204. // waiting for a message which will never come, forever (almost).
  77205. };
  77206. window.addEventListener('message', messageHandler);
  77207. });
  77208. }
  77209. function create(cozy, action, type) {
  77210. var data = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  77211. var permissions = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
  77212. if (!action) throw new Error('Misformed intent, "action" property must be provided');
  77213. if (!type) throw new Error('Misformed intent, "type" property must be provided');
  77214. var createPromise = (0, _fetch.cozyFetchJSON)(cozy, 'POST', '/intents', {
  77215. data: {
  77216. type: 'io.cozy.intents',
  77217. attributes: {
  77218. action: action,
  77219. type: type,
  77220. data: data,
  77221. permissions: permissions
  77222. }
  77223. }
  77224. });
  77225. createPromise.start = function (element, onReadyCallback) {
  77226. return createPromise.then(function (intent) {
  77227. var service = intent.attributes.services && intent.attributes.services[0];
  77228. if (!service) {
  77229. return Promise.reject(new Error('Unable to find a service'));
  77230. }
  77231. return injectService(service.href, element, intent, data, onReadyCallback);
  77232. });
  77233. };
  77234. return createPromise;
  77235. }
  77236. function listenClientData(intent, window) {
  77237. return new Promise(function (resolve, reject) {
  77238. var messageEventListener = function messageEventListener(event) {
  77239. if (event.origin !== intent.attributes.client) return;
  77240. window.removeEventListener('message', messageEventListener);
  77241. resolve(event.data);
  77242. };
  77243. window.addEventListener('message', messageEventListener);
  77244. window.parent.postMessage({
  77245. type: 'intent-' + intent._id + ':ready'
  77246. }, intent.attributes.client);
  77247. });
  77248. }
  77249. // returns a service to communicate with intent client
  77250. function createService(cozy, intentId, serviceWindow) {
  77251. serviceWindow = serviceWindow || typeof window !== 'undefined' && window;
  77252. if (!serviceWindow) throw new Error('Intent service should be used in browser');
  77253. intentId = intentId || serviceWindow.location.search.split('=')[1];
  77254. if (!intentId) throw new Error('Cannot retrieve intent from URL');
  77255. return (0, _fetch.cozyFetchJSON)(cozy, 'GET', '/intents/' + intentId).then(function (intent) {
  77256. var terminated = false;
  77257. var _terminate = function _terminate(message) {
  77258. if (terminated) throw new Error('Intent service has already been terminated');
  77259. terminated = true;
  77260. serviceWindow.parent.postMessage(message, intent.attributes.client);
  77261. };
  77262. var resizeClient = function resizeClient(dimensions, transitionProperty) {
  77263. if (terminated) throw new Error('Intent service has been terminated');
  77264. var message = {
  77265. type: 'intent-' + intent._id + ':resize',
  77266. // if a dom element is passed, calculate its size
  77267. dimensions: dimensions.element ? Object.assign({}, dimensions, {
  77268. maxHeight: dimensions.element.clientHeight,
  77269. maxWidth: dimensions.element.clientWidth
  77270. }) : dimensions,
  77271. transition: transitionProperty
  77272. };
  77273. serviceWindow.parent.postMessage(message, intent.attributes.client);
  77274. };
  77275. var cancel = function cancel() {
  77276. _terminate({ type: 'intent-' + intent._id + ':cancel' });
  77277. };
  77278. // Prevent unfulfilled client promises when this window unloads for a
  77279. // reason or another.
  77280. serviceWindow.addEventListener('unload', function () {
  77281. if (!terminated) cancel();
  77282. });
  77283. return listenClientData(intent, serviceWindow).then(function (data) {
  77284. return {
  77285. getData: function getData() {
  77286. return data;
  77287. },
  77288. getIntent: function getIntent() {
  77289. return intent;
  77290. },
  77291. terminate: function terminate(doc) {
  77292. if (data && data.exposeIntentFrameRemoval) {
  77293. return _terminate({
  77294. type: 'intent-' + intent._id + ':exposeFrameRemoval',
  77295. document: doc
  77296. });
  77297. } else {
  77298. return _terminate({
  77299. type: 'intent-' + intent._id + ':done',
  77300. document: doc
  77301. });
  77302. }
  77303. },
  77304. throw: function _throw(error) {
  77305. return _terminate({
  77306. type: 'intent-' + intent._id + ':error',
  77307. error: errorSerializer.serialize(error)
  77308. });
  77309. },
  77310. resizeClient: resizeClient,
  77311. cancel: cancel
  77312. };
  77313. });
  77314. });
  77315. }
  77316. /***/ },
  77317. /* 102 */
  77318. /***/ function(module, exports, __webpack_require__) {
  77319. 'use strict';
  77320. Object.defineProperty(exports, "__esModule", {
  77321. value: true
  77322. });
  77323. exports.count = count;
  77324. exports.queued = queued;
  77325. exports.create = create;
  77326. var _fetch = __webpack_require__(94);
  77327. function count(cozy, workerType) {
  77328. return (0, _fetch.cozyFetchJSON)(cozy, 'GET', '/jobs/queue/' + workerType).then(function (data) {
  77329. return data.length;
  77330. });
  77331. }
  77332. function queued(cozy, workerType) {
  77333. return (0, _fetch.cozyFetchJSON)(cozy, 'GET', '/jobs/queue/' + workerType);
  77334. }
  77335. function create(cozy, workerType, args, options) {
  77336. return (0, _fetch.cozyFetchJSON)(cozy, 'POST', '/jobs/queue/' + workerType, {
  77337. data: {
  77338. type: 'io.cozy.jobs',
  77339. attributes: {
  77340. arguments: args || {},
  77341. options: options || {}
  77342. }
  77343. }
  77344. });
  77345. }
  77346. /***/ },
  77347. /* 103 */
  77348. /***/ function(module, exports, __webpack_require__) {
  77349. 'use strict';
  77350. Object.defineProperty(exports, "__esModule", {
  77351. value: true
  77352. });
  77353. exports.replicationOfflineError = undefined;
  77354. exports.init = init;
  77355. exports.getDoctypes = getDoctypes;
  77356. exports.hasDatabase = hasDatabase;
  77357. exports.getDatabase = getDatabase;
  77358. exports.setDatabase = setDatabase;
  77359. exports.createDatabase = createDatabase;
  77360. exports.destroyDatabase = destroyDatabase;
  77361. exports.destroyAllDatabase = destroyAllDatabase;
  77362. exports.hasReplication = hasReplication;
  77363. exports.replicateFromCozy = replicateFromCozy;
  77364. exports.stopReplication = stopReplication;
  77365. exports.stopAllReplication = stopAllReplication;
  77366. exports.hasRepeatedReplication = hasRepeatedReplication;
  77367. exports.startRepeatedReplication = startRepeatedReplication;
  77368. exports.stopRepeatedReplication = stopRepeatedReplication;
  77369. exports.stopAllRepeatedReplication = stopAllRepeatedReplication;
  77370. var _doctypes = __webpack_require__(98);
  77371. var _auth_v = __webpack_require__(93);
  77372. var _utils = __webpack_require__(89);
  77373. var replicationOfflineError = exports.replicationOfflineError = 'Replication abort, your device is actually offline.'; /* global PouchDB, pouchdbFind */
  77374. var pluginLoaded = false;
  77375. /*
  77376. For each doctype we have some parameters:
  77377. cozy._offline[doctype] = {
  77378. database: pouchdb database
  77379. replication: the pouchdb replication
  77380. replicationPromise: promise of replication
  77381. interval: repeated replication interval
  77382. }
  77383. */
  77384. function init(cozy, _ref) {
  77385. var _ref$options = _ref.options,
  77386. options = _ref$options === undefined ? {} : _ref$options,
  77387. _ref$doctypes = _ref.doctypes,
  77388. doctypes = _ref$doctypes === undefined ? [] : _ref$doctypes;
  77389. if (typeof PouchDB === 'undefined') throw new Error('Missing pouchdb dependency for offline mode. Please run "yarn add pouchdb" and provide PouchDB as a webpack plugin.');
  77390. if (typeof pouchdbFind === 'undefined') throw new Error('Missing pouchdb-find dependency for offline mode. Please run "yarn add pouchdb-find" and provide pouchdbFind as webpack plugin.');
  77391. var _iteratorNormalCompletion = true;
  77392. var _didIteratorError = false;
  77393. var _iteratorError = undefined;
  77394. try {
  77395. for (var _iterator = doctypes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
  77396. var doctype = _step.value;
  77397. createDatabase(cozy, doctype, options);
  77398. }
  77399. } catch (err) {
  77400. _didIteratorError = true;
  77401. _iteratorError = err;
  77402. } finally {
  77403. try {
  77404. if (!_iteratorNormalCompletion && _iterator.return) {
  77405. _iterator.return();
  77406. }
  77407. } finally {
  77408. if (_didIteratorError) {
  77409. throw _iteratorError;
  77410. }
  77411. }
  77412. }
  77413. }
  77414. // helper
  77415. function getInfo(cozy, doctype) {
  77416. cozy._offline = cozy._offline || [];
  77417. cozy._offline[doctype] = cozy._offline[doctype] || {};
  77418. return cozy._offline[doctype];
  77419. }
  77420. function getDoctypes(cozy) {
  77421. cozy._offline = cozy._offline || [];
  77422. return Object.keys(cozy._offline);
  77423. }
  77424. //
  77425. // DATABASE
  77426. //
  77427. function hasDatabase(cozy, doctype) {
  77428. return getDatabase(cozy, doctype) !== undefined;
  77429. }
  77430. function getDatabase(cozy, doctype) {
  77431. return getInfo(cozy, doctype).database;
  77432. }
  77433. function setDatabase(cozy, doctype, database) {
  77434. cozy._offline[doctype].database = database;
  77435. return getDatabase(cozy, doctype);
  77436. }
  77437. function createDatabase(cozy, doctype) {
  77438. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  77439. if (!pluginLoaded) {
  77440. PouchDB.plugin(pouchdbFind);
  77441. pluginLoaded = true;
  77442. }
  77443. if (hasDatabase(cozy, doctype)) {
  77444. return Promise.resolve(getDatabase(cozy, doctype));
  77445. }
  77446. setDatabase(cozy, doctype, new PouchDB(doctype, options));
  77447. return createIndexes(cozy, doctype).then(function () {
  77448. return getDatabase(cozy, doctype);
  77449. });
  77450. }
  77451. function destroyDatabase(cozy, doctype) {
  77452. if (!hasDatabase(cozy, doctype)) {
  77453. return Promise.resolve(false);
  77454. }
  77455. return stopRepeatedReplication(cozy, doctype).then(function () {
  77456. return stopReplication(cozy, doctype);
  77457. }).then(function () {
  77458. return getDatabase(cozy, doctype).destroy();
  77459. }).then(function (response) {
  77460. setDatabase(cozy, doctype, undefined);
  77461. return response;
  77462. });
  77463. }
  77464. function destroyAllDatabase(cozy) {
  77465. var doctypes = getDoctypes(cozy);
  77466. var destroy = function destroy(doctype) {
  77467. return destroyDatabase(cozy, doctype);
  77468. };
  77469. return Promise.all(doctypes.map(destroy));
  77470. }
  77471. function createIndexes(cozy, doctype) {
  77472. if (doctype === _doctypes.DOCTYPE_FILES) {
  77473. return getDatabase(cozy, doctype).createIndex({ index: { fields: ['dir_id'] } });
  77474. }
  77475. return Promise.resolve();
  77476. }
  77477. //
  77478. // REPLICATION
  77479. //
  77480. function hasReplication(cozy, doctype) {
  77481. return getReplication(cozy, doctype) !== undefined;
  77482. }
  77483. function getReplication(cozy, doctype) {
  77484. return getInfo(cozy, doctype).replication;
  77485. }
  77486. function setReplication(cozy, doctype, replication) {
  77487. cozy._offline[doctype].replication = replication;
  77488. return getReplication(cozy, doctype);
  77489. }
  77490. function getReplicationUrl(cozy, doctype) {
  77491. return cozy.authorize().then(function (credentials) {
  77492. var basic = credentials.token.toBasicAuth();
  77493. return (cozy._url + '/data/' + doctype).replace('//', '//' + basic);
  77494. });
  77495. }
  77496. function getReplicationPromise(cozy, doctype) {
  77497. return getInfo(cozy, doctype).replicationPromise;
  77498. }
  77499. function setReplicationPromise(cozy, doctype, promise) {
  77500. cozy._offline[doctype].replicationPromise = promise;
  77501. return getReplicationPromise(cozy, doctype);
  77502. }
  77503. function replicateFromCozy(cozy, doctype) {
  77504. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  77505. return setReplicationPromise(cozy, doctype, new Promise(function (resolve, reject) {
  77506. if (!hasDatabase(cozy, doctype)) {
  77507. createDatabase(cozy, doctype);
  77508. }
  77509. if (options.live === true) {
  77510. return reject(new Error('You can\'t use `live` option with Cozy couchdb.'));
  77511. }
  77512. if ((0, _utils.isOffline)()) {
  77513. reject(replicationOfflineError);
  77514. options.onError && options.onError(replicationOfflineError);
  77515. return;
  77516. }
  77517. getReplicationUrl(cozy, doctype).then(function (url) {
  77518. return setReplication(cozy, doctype, getDatabase(cozy, doctype).replicate.from(url, options).on('complete', function (info) {
  77519. setReplication(cozy, doctype, undefined);
  77520. resolve(info);
  77521. options.onComplete && options.onComplete(info);
  77522. }).on('error', function (err) {
  77523. if (err.error === 'code=400, message=Expired token') {
  77524. cozy.authorize().then(function (_ref2) {
  77525. var client = _ref2.client,
  77526. token = _ref2.token;
  77527. (0, _auth_v.refreshToken)(cozy, client, token).then(function (newToken) {
  77528. return cozy.saveCredentials(client, newToken);
  77529. }).then(function (credentials) {
  77530. return replicateFromCozy(cozy, doctype, options);
  77531. });
  77532. });
  77533. } else {
  77534. console.warn('ReplicateFromCozy \'' + doctype + '\' Error:');
  77535. console.warn(err);
  77536. setReplication(cozy, doctype, undefined);
  77537. reject(err);
  77538. options.onError && options.onError(err);
  77539. }
  77540. }));
  77541. });
  77542. }));
  77543. }
  77544. function stopReplication(cozy, doctype) {
  77545. if (!getDatabase(cozy, doctype) || !hasReplication(cozy, doctype)) {
  77546. return Promise.resolve();
  77547. }
  77548. return new Promise(function (resolve) {
  77549. try {
  77550. getReplicationPromise(cozy, doctype).then(function () {
  77551. resolve();
  77552. });
  77553. getReplication(cozy, doctype).cancel();
  77554. // replication is set to undefined by complete replication
  77555. } catch (e) {
  77556. resolve();
  77557. }
  77558. });
  77559. }
  77560. function stopAllReplication(cozy) {
  77561. var doctypes = getDoctypes(cozy);
  77562. var stop = function stop(doctype) {
  77563. return stopReplication(cozy, doctype);
  77564. };
  77565. return Promise.all(doctypes.map(stop));
  77566. }
  77567. //
  77568. // REPEATED REPLICATION
  77569. //
  77570. function getRepeatedReplication(cozy, doctype) {
  77571. return getInfo(cozy, doctype).interval;
  77572. }
  77573. function setRepeatedReplication(cozy, doctype, interval) {
  77574. cozy._offline[doctype].interval = interval;
  77575. }
  77576. function hasRepeatedReplication(cozy, doctype) {
  77577. return getRepeatedReplication(cozy, doctype) !== undefined;
  77578. }
  77579. function startRepeatedReplication(cozy, doctype, timer) {
  77580. var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  77581. // TODO: add timer limitation for not flooding Gozy
  77582. if (hasRepeatedReplication(cozy, doctype)) {
  77583. return getRepeatedReplication(cozy, doctype);
  77584. }
  77585. return setRepeatedReplication(cozy, doctype, setInterval(function () {
  77586. if ((0, _utils.isOffline)()) {
  77587. // network is offline, replication cannot be launched
  77588. console.info(replicationOfflineError);
  77589. return;
  77590. }
  77591. if (!hasReplication(cozy, doctype)) {
  77592. replicateFromCozy(cozy, doctype, options);
  77593. // TODO: add replicationToCozy
  77594. }
  77595. }, timer * 1000));
  77596. }
  77597. function stopRepeatedReplication(cozy, doctype) {
  77598. if (hasRepeatedReplication(cozy, doctype)) {
  77599. clearInterval(getRepeatedReplication(cozy, doctype));
  77600. setRepeatedReplication(cozy, doctype, undefined);
  77601. }
  77602. if (hasReplication(cozy, doctype)) {
  77603. return stopReplication(cozy, doctype);
  77604. }
  77605. return Promise.resolve();
  77606. }
  77607. function stopAllRepeatedReplication(cozy) {
  77608. var doctypes = getDoctypes(cozy);
  77609. var stop = function stop(doctype) {
  77610. return stopRepeatedReplication(cozy, doctype);
  77611. };
  77612. return Promise.all(doctypes.map(stop));
  77613. }
  77614. /***/ },
  77615. /* 104 */
  77616. /***/ function(module, exports, __webpack_require__) {
  77617. 'use strict';
  77618. Object.defineProperty(exports, "__esModule", {
  77619. value: true
  77620. });
  77621. exports.diskUsage = diskUsage;
  77622. exports.changePassphrase = changePassphrase;
  77623. exports.getInstance = getInstance;
  77624. exports.updateInstance = updateInstance;
  77625. exports.getClients = getClients;
  77626. exports.deleteClientById = deleteClientById;
  77627. exports.updateLastSync = updateLastSync;
  77628. var _fetch = __webpack_require__(94);
  77629. function diskUsage(cozy) {
  77630. return (0, _fetch.cozyFetchJSON)(cozy, 'GET', '/settings/disk-usage');
  77631. }
  77632. function changePassphrase(cozy, currentPassPhrase, newPassPhrase) {
  77633. return (0, _fetch.cozyFetchJSON)(cozy, 'PUT', '/settings/passphrase', {
  77634. current_passphrase: currentPassPhrase,
  77635. new_passphrase: newPassPhrase
  77636. });
  77637. }
  77638. function getInstance(cozy) {
  77639. return (0, _fetch.cozyFetchJSON)(cozy, 'GET', '/settings/instance');
  77640. }
  77641. function updateInstance(cozy, instance) {
  77642. return (0, _fetch.cozyFetchJSON)(cozy, 'PUT', '/settings/instance', instance);
  77643. }
  77644. function getClients(cozy) {
  77645. return (0, _fetch.cozyFetchJSON)(cozy, 'GET', '/settings/clients');
  77646. }
  77647. function deleteClientById(cozy, id) {
  77648. return (0, _fetch.cozyFetchJSON)(cozy, 'DELETE', '/settings/clients/' + id);
  77649. }
  77650. function updateLastSync(cozy) {
  77651. return (0, _fetch.cozyFetchJSON)(cozy, 'POST', '/settings/synchronized');
  77652. }
  77653. /***/ },
  77654. /* 105 */
  77655. /***/ function(module, exports, __webpack_require__) {
  77656. 'use strict';
  77657. Object.defineProperty(exports, "__esModule", {
  77658. value: true
  77659. });
  77660. exports.removeReferencedFiles = exports.addReferencedFiles = undefined;
  77661. exports.listReferencedFiles = listReferencedFiles;
  77662. exports.fetchReferencedFiles = fetchReferencedFiles;
  77663. var _fetch = __webpack_require__(94);
  77664. var _doctypes = __webpack_require__(98);
  77665. function updateRelations(verb) {
  77666. return function (cozy, doc, ids) {
  77667. if (!doc) throw new Error('missing doc argument');
  77668. if (!Array.isArray(ids)) ids = [ids];
  77669. var refs = ids.map(function (id) {
  77670. return { type: _doctypes.DOCTYPE_FILES, id: id };
  77671. });
  77672. return (0, _fetch.cozyFetchJSON)(cozy, verb, makeReferencesPath(doc), { data: refs });
  77673. };
  77674. }
  77675. var addReferencedFiles = exports.addReferencedFiles = updateRelations('POST');
  77676. var removeReferencedFiles = exports.removeReferencedFiles = updateRelations('DELETE');
  77677. function listReferencedFiles(cozy, doc) {
  77678. if (!doc) throw new Error('missing doc argument');
  77679. return (0, _fetch.cozyFetchJSON)(cozy, 'GET', makeReferencesPath(doc)).then(function (files) {
  77680. return files.map(function (file) {
  77681. return file._id;
  77682. });
  77683. });
  77684. }
  77685. function fetchReferencedFiles(cozy, doc, options) {
  77686. if (!doc) throw new Error('missing doc argument');
  77687. var params = Object.keys(options).map(function (key) {
  77688. return '&page[' + key + ']=' + options[key];
  77689. }).join('');
  77690. // As datetime is the only sort option available, I see no reason to not have it by default
  77691. return (0, _fetch.cozyFetchRawJSON)(cozy, 'GET', makeReferencesPath(doc) + '?include=files&sort=datetime' + params);
  77692. }
  77693. function makeReferencesPath(doc) {
  77694. var type = encodeURIComponent(doc._type);
  77695. var id = encodeURIComponent(doc._id);
  77696. return '/data/' + type + '/' + id + '/relationships/references';
  77697. }
  77698. /***/ }
  77699. /******/ ])));
  77700. //# sourceMappingURL=cozy-client.node.js.map
  77701. /***/ }),
  77702. /* 810 */
  77703. /***/ (function(module, exports, __webpack_require__) {
  77704. "use strict";
  77705. var realFetch = __webpack_require__(811);
  77706. module.exports = function(url, options) {
  77707. if (/^\/\//.test(url)) {
  77708. url = 'https:' + url;
  77709. }
  77710. return realFetch.call(this, url, options);
  77711. };
  77712. if (!global.fetch) {
  77713. global.fetch = module.exports;
  77714. global.Response = realFetch.Response;
  77715. global.Headers = realFetch.Headers;
  77716. global.Request = realFetch.Request;
  77717. }
  77718. /***/ }),
  77719. /* 811 */
  77720. /***/ (function(module, exports, __webpack_require__) {
  77721. /**
  77722. * index.js
  77723. *
  77724. * a request API compatible with window.fetch
  77725. */
  77726. var parse_url = __webpack_require__(14).parse;
  77727. var resolve_url = __webpack_require__(14).resolve;
  77728. var http = __webpack_require__(45);
  77729. var https = __webpack_require__(81);
  77730. var zlib = __webpack_require__(343);
  77731. var stream = __webpack_require__(10);
  77732. var Body = __webpack_require__(182);
  77733. var Response = __webpack_require__(834);
  77734. var Headers = __webpack_require__(184);
  77735. var Request = __webpack_require__(835);
  77736. var FetchError = __webpack_require__(440);
  77737. // commonjs
  77738. module.exports = Fetch;
  77739. // es6 default export compatibility
  77740. module.exports.default = module.exports;
  77741. /**
  77742. * Fetch class
  77743. *
  77744. * @param Mixed url Absolute url or Request instance
  77745. * @param Object opts Fetch options
  77746. * @return Promise
  77747. */
  77748. function Fetch(url, opts) {
  77749. // allow call as function
  77750. if (!(this instanceof Fetch))
  77751. return new Fetch(url, opts);
  77752. // allow custom promise
  77753. if (!Fetch.Promise) {
  77754. throw new Error('native promise missing, set Fetch.Promise to your favorite alternative');
  77755. }
  77756. Body.Promise = Fetch.Promise;
  77757. var self = this;
  77758. // wrap http.request into fetch
  77759. return new Fetch.Promise(function(resolve, reject) {
  77760. // build request object
  77761. var options = new Request(url, opts);
  77762. if (!options.protocol || !options.hostname) {
  77763. throw new Error('only absolute urls are supported');
  77764. }
  77765. if (options.protocol !== 'http:' && options.protocol !== 'https:') {
  77766. throw new Error('only http(s) protocols are supported');
  77767. }
  77768. var send;
  77769. if (options.protocol === 'https:') {
  77770. send = https.request;
  77771. } else {
  77772. send = http.request;
  77773. }
  77774. // normalize headers
  77775. var headers = new Headers(options.headers);
  77776. if (options.compress) {
  77777. headers.set('accept-encoding', 'gzip,deflate');
  77778. }
  77779. if (!headers.has('user-agent')) {
  77780. headers.set('user-agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');
  77781. }
  77782. if (!headers.has('connection') && !options.agent) {
  77783. headers.set('connection', 'close');
  77784. }
  77785. if (!headers.has('accept')) {
  77786. headers.set('accept', '*/*');
  77787. }
  77788. // detect form data input from form-data module, this hack avoid the need to pass multipart header manually
  77789. if (!headers.has('content-type') && options.body && typeof options.body.getBoundary === 'function') {
  77790. headers.set('content-type', 'multipart/form-data; boundary=' + options.body.getBoundary());
  77791. }
  77792. // bring node-fetch closer to browser behavior by setting content-length automatically
  77793. if (!headers.has('content-length') && /post|put|patch|delete/i.test(options.method)) {
  77794. if (typeof options.body === 'string') {
  77795. headers.set('content-length', Buffer.byteLength(options.body));
  77796. // detect form data input from form-data module, this hack avoid the need to add content-length header manually
  77797. } else if (options.body && typeof options.body.getLengthSync === 'function') {
  77798. // for form-data 1.x
  77799. if (options.body._lengthRetrievers && options.body._lengthRetrievers.length == 0) {
  77800. headers.set('content-length', options.body.getLengthSync().toString());
  77801. // for form-data 2.x
  77802. } else if (options.body.hasKnownLength && options.body.hasKnownLength()) {
  77803. headers.set('content-length', options.body.getLengthSync().toString());
  77804. }
  77805. // this is only necessary for older nodejs releases (before iojs merge)
  77806. } else if (options.body === undefined || options.body === null) {
  77807. headers.set('content-length', '0');
  77808. }
  77809. }
  77810. options.headers = headers.raw();
  77811. // http.request only support string as host header, this hack make custom host header possible
  77812. if (options.headers.host) {
  77813. options.headers.host = options.headers.host[0];
  77814. }
  77815. // send request
  77816. var req = send(options);
  77817. var reqTimeout;
  77818. if (options.timeout) {
  77819. req.once('socket', function(socket) {
  77820. reqTimeout = setTimeout(function() {
  77821. req.abort();
  77822. reject(new FetchError('network timeout at: ' + options.url, 'request-timeout'));
  77823. }, options.timeout);
  77824. });
  77825. }
  77826. req.on('error', function(err) {
  77827. clearTimeout(reqTimeout);
  77828. reject(new FetchError('request to ' + options.url + ' failed, reason: ' + err.message, 'system', err));
  77829. });
  77830. req.on('response', function(res) {
  77831. clearTimeout(reqTimeout);
  77832. // handle redirect
  77833. if (self.isRedirect(res.statusCode) && options.redirect !== 'manual') {
  77834. if (options.redirect === 'error') {
  77835. reject(new FetchError('redirect mode is set to error: ' + options.url, 'no-redirect'));
  77836. return;
  77837. }
  77838. if (options.counter >= options.follow) {
  77839. reject(new FetchError('maximum redirect reached at: ' + options.url, 'max-redirect'));
  77840. return;
  77841. }
  77842. if (!res.headers.location) {
  77843. reject(new FetchError('redirect location header missing at: ' + options.url, 'invalid-redirect'));
  77844. return;
  77845. }
  77846. // per fetch spec, for POST request with 301/302 response, or any request with 303 response, use GET when following redirect
  77847. if (res.statusCode === 303
  77848. || ((res.statusCode === 301 || res.statusCode === 302) && options.method === 'POST'))
  77849. {
  77850. options.method = 'GET';
  77851. delete options.body;
  77852. delete options.headers['content-length'];
  77853. }
  77854. options.counter++;
  77855. resolve(Fetch(resolve_url(options.url, res.headers.location), options));
  77856. return;
  77857. }
  77858. // normalize location header for manual redirect mode
  77859. var headers = new Headers(res.headers);
  77860. if (options.redirect === 'manual' && headers.has('location')) {
  77861. headers.set('location', resolve_url(options.url, headers.get('location')));
  77862. }
  77863. // prepare response
  77864. var body = res.pipe(new stream.PassThrough());
  77865. var response_options = {
  77866. url: options.url
  77867. , status: res.statusCode
  77868. , statusText: res.statusMessage
  77869. , headers: headers
  77870. , size: options.size
  77871. , timeout: options.timeout
  77872. };
  77873. // response object
  77874. var output;
  77875. // in following scenarios we ignore compression support
  77876. // 1. compression support is disabled
  77877. // 2. HEAD request
  77878. // 3. no content-encoding header
  77879. // 4. no content response (204)
  77880. // 5. content not modified response (304)
  77881. if (!options.compress || options.method === 'HEAD' || !headers.has('content-encoding') || res.statusCode === 204 || res.statusCode === 304) {
  77882. output = new Response(body, response_options);
  77883. resolve(output);
  77884. return;
  77885. }
  77886. // otherwise, check for gzip or deflate
  77887. var name = headers.get('content-encoding');
  77888. // for gzip
  77889. if (name == 'gzip' || name == 'x-gzip') {
  77890. body = body.pipe(zlib.createGunzip());
  77891. output = new Response(body, response_options);
  77892. resolve(output);
  77893. return;
  77894. // for deflate
  77895. } else if (name == 'deflate' || name == 'x-deflate') {
  77896. // handle the infamous raw deflate response from old servers
  77897. // a hack for old IIS and Apache servers
  77898. var raw = res.pipe(new stream.PassThrough());
  77899. raw.once('data', function(chunk) {
  77900. // see http://stackoverflow.com/questions/37519828
  77901. if ((chunk[0] & 0x0F) === 0x08) {
  77902. body = body.pipe(zlib.createInflate());
  77903. } else {
  77904. body = body.pipe(zlib.createInflateRaw());
  77905. }
  77906. output = new Response(body, response_options);
  77907. resolve(output);
  77908. });
  77909. return;
  77910. }
  77911. // otherwise, use response as-is
  77912. output = new Response(body, response_options);
  77913. resolve(output);
  77914. return;
  77915. });
  77916. // accept string, buffer or readable stream as body
  77917. // per spec we will call tostring on non-stream objects
  77918. if (typeof options.body === 'string') {
  77919. req.write(options.body);
  77920. req.end();
  77921. } else if (options.body instanceof Buffer) {
  77922. req.write(options.body);
  77923. req.end();
  77924. } else if (typeof options.body === 'object' && options.body.pipe) {
  77925. options.body.pipe(req);
  77926. } else if (typeof options.body === 'object') {
  77927. req.write(options.body.toString());
  77928. req.end();
  77929. } else {
  77930. req.end();
  77931. }
  77932. });
  77933. };
  77934. /**
  77935. * Redirect code matching
  77936. *
  77937. * @param Number code Status code
  77938. * @return Boolean
  77939. */
  77940. Fetch.prototype.isRedirect = function(code) {
  77941. return code === 301 || code === 302 || code === 303 || code === 307 || code === 308;
  77942. }
  77943. // expose Promise
  77944. Fetch.Promise = global.Promise;
  77945. Fetch.Response = Response;
  77946. Fetch.Headers = Headers;
  77947. Fetch.Request = Request;
  77948. /***/ }),
  77949. /* 812 */
  77950. /***/ (function(module, exports, __webpack_require__) {
  77951. "use strict";
  77952. var iconvLite = __webpack_require__(813);
  77953. // Load Iconv from an external file to be able to disable Iconv for webpack
  77954. // Add /\/iconv-loader$/ to webpack.IgnorePlugin to ignore it
  77955. var Iconv = __webpack_require__(831);
  77956. // Expose to the world
  77957. module.exports.convert = convert;
  77958. /**
  77959. * Convert encoding of an UTF-8 string or a buffer
  77960. *
  77961. * @param {String|Buffer} str String to be converted
  77962. * @param {String} to Encoding to be converted to
  77963. * @param {String} [from='UTF-8'] Encoding to be converted from
  77964. * @param {Boolean} useLite If set to ture, force to use iconvLite
  77965. * @return {Buffer} Encoded string
  77966. */
  77967. function convert(str, to, from, useLite) {
  77968. from = checkEncoding(from || 'UTF-8');
  77969. to = checkEncoding(to || 'UTF-8');
  77970. str = str || '';
  77971. var result;
  77972. if (from !== 'UTF-8' && typeof str === 'string') {
  77973. str = new Buffer(str, 'binary');
  77974. }
  77975. if (from === to) {
  77976. if (typeof str === 'string') {
  77977. result = new Buffer(str);
  77978. } else {
  77979. result = str;
  77980. }
  77981. } else if (Iconv && !useLite) {
  77982. try {
  77983. result = convertIconv(str, to, from);
  77984. } catch (E) {
  77985. console.error(E);
  77986. try {
  77987. result = convertIconvLite(str, to, from);
  77988. } catch (E) {
  77989. console.error(E);
  77990. result = str;
  77991. }
  77992. }
  77993. } else {
  77994. try {
  77995. result = convertIconvLite(str, to, from);
  77996. } catch (E) {
  77997. console.error(E);
  77998. result = str;
  77999. }
  78000. }
  78001. if (typeof result === 'string') {
  78002. result = new Buffer(result, 'utf-8');
  78003. }
  78004. return result;
  78005. }
  78006. /**
  78007. * Convert encoding of a string with node-iconv (if available)
  78008. *
  78009. * @param {String|Buffer} str String to be converted
  78010. * @param {String} to Encoding to be converted to
  78011. * @param {String} [from='UTF-8'] Encoding to be converted from
  78012. * @return {Buffer} Encoded string
  78013. */
  78014. function convertIconv(str, to, from) {
  78015. var response, iconv;
  78016. iconv = new Iconv(from, to + '//TRANSLIT//IGNORE');
  78017. response = iconv.convert(str);
  78018. return response.slice(0, response.length);
  78019. }
  78020. /**
  78021. * Convert encoding of astring with iconv-lite
  78022. *
  78023. * @param {String|Buffer} str String to be converted
  78024. * @param {String} to Encoding to be converted to
  78025. * @param {String} [from='UTF-8'] Encoding to be converted from
  78026. * @return {Buffer} Encoded string
  78027. */
  78028. function convertIconvLite(str, to, from) {
  78029. if (to === 'UTF-8') {
  78030. return iconvLite.decode(str, from);
  78031. } else if (from === 'UTF-8') {
  78032. return iconvLite.encode(str, to);
  78033. } else {
  78034. return iconvLite.encode(iconvLite.decode(str, from), to);
  78035. }
  78036. }
  78037. /**
  78038. * Converts charset name if needed
  78039. *
  78040. * @param {String} name Character set
  78041. * @return {String} Character set name
  78042. */
  78043. function checkEncoding(name) {
  78044. return (name || '').toString().trim().
  78045. replace(/^latin[\-_]?(\d+)$/i, 'ISO-8859-$1').
  78046. replace(/^win(?:dows)?[\-_]?(\d+)$/i, 'WINDOWS-$1').
  78047. replace(/^utf[\-_]?(\d+)$/i, 'UTF-$1').
  78048. replace(/^ks_c_5601\-1987$/i, 'CP949').
  78049. replace(/^us[\-_]?ascii$/i, 'ASCII').
  78050. toUpperCase();
  78051. }
  78052. /***/ }),
  78053. /* 813 */
  78054. /***/ (function(module, exports, __webpack_require__) {
  78055. "use strict";
  78056. // Some environments don't have global Buffer (e.g. React Native).
  78057. // Solution would be installing npm modules "buffer" and "stream" explicitly.
  78058. var Buffer = __webpack_require__(21).Buffer;
  78059. var bomHandling = __webpack_require__(814),
  78060. iconv = module.exports;
  78061. // All codecs and aliases are kept here, keyed by encoding name/alias.
  78062. // They are lazy loaded in `iconv.getCodec` from `encodings/index.js`.
  78063. iconv.encodings = null;
  78064. // Characters emitted in case of error.
  78065. iconv.defaultCharUnicode = '�';
  78066. iconv.defaultCharSingleByte = '?';
  78067. // Public API.
  78068. iconv.encode = function encode(str, encoding, options) {
  78069. str = "" + (str || ""); // Ensure string.
  78070. var encoder = iconv.getEncoder(encoding, options);
  78071. var res = encoder.write(str);
  78072. var trail = encoder.end();
  78073. return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res;
  78074. }
  78075. iconv.decode = function decode(buf, encoding, options) {
  78076. if (typeof buf === 'string') {
  78077. if (!iconv.skipDecodeWarning) {
  78078. console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding');
  78079. iconv.skipDecodeWarning = true;
  78080. }
  78081. buf = new Buffer("" + (buf || ""), "binary"); // Ensure buffer.
  78082. }
  78083. var decoder = iconv.getDecoder(encoding, options);
  78084. var res = decoder.write(buf);
  78085. var trail = decoder.end();
  78086. return trail ? (res + trail) : res;
  78087. }
  78088. iconv.encodingExists = function encodingExists(enc) {
  78089. try {
  78090. iconv.getCodec(enc);
  78091. return true;
  78092. } catch (e) {
  78093. return false;
  78094. }
  78095. }
  78096. // Legacy aliases to convert functions
  78097. iconv.toEncoding = iconv.encode;
  78098. iconv.fromEncoding = iconv.decode;
  78099. // Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache.
  78100. iconv._codecDataCache = {};
  78101. iconv.getCodec = function getCodec(encoding) {
  78102. if (!iconv.encodings)
  78103. iconv.encodings = __webpack_require__(815); // Lazy load all encoding definitions.
  78104. // Canonicalize encoding name: strip all non-alphanumeric chars and appended year.
  78105. var enc = (''+encoding).toLowerCase().replace(/[^0-9a-z]|:\d{4}$/g, "");
  78106. // Traverse iconv.encodings to find actual codec.
  78107. var codecOptions = {};
  78108. while (true) {
  78109. var codec = iconv._codecDataCache[enc];
  78110. if (codec)
  78111. return codec;
  78112. var codecDef = iconv.encodings[enc];
  78113. switch (typeof codecDef) {
  78114. case "string": // Direct alias to other encoding.
  78115. enc = codecDef;
  78116. break;
  78117. case "object": // Alias with options. Can be layered.
  78118. for (var key in codecDef)
  78119. codecOptions[key] = codecDef[key];
  78120. if (!codecOptions.encodingName)
  78121. codecOptions.encodingName = enc;
  78122. enc = codecDef.type;
  78123. break;
  78124. case "function": // Codec itself.
  78125. if (!codecOptions.encodingName)
  78126. codecOptions.encodingName = enc;
  78127. // The codec function must load all tables and return object with .encoder and .decoder methods.
  78128. // It'll be called only once (for each different options object).
  78129. codec = new codecDef(codecOptions, iconv);
  78130. iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later.
  78131. return codec;
  78132. default:
  78133. throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')");
  78134. }
  78135. }
  78136. }
  78137. iconv.getEncoder = function getEncoder(encoding, options) {
  78138. var codec = iconv.getCodec(encoding),
  78139. encoder = new codec.encoder(options, codec);
  78140. if (codec.bomAware && options && options.addBOM)
  78141. encoder = new bomHandling.PrependBOM(encoder, options);
  78142. return encoder;
  78143. }
  78144. iconv.getDecoder = function getDecoder(encoding, options) {
  78145. var codec = iconv.getCodec(encoding),
  78146. decoder = new codec.decoder(options, codec);
  78147. if (codec.bomAware && !(options && options.stripBOM === false))
  78148. decoder = new bomHandling.StripBOM(decoder, options);
  78149. return decoder;
  78150. }
  78151. // Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json.
  78152. var nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node;
  78153. if (nodeVer) {
  78154. // Load streaming support in Node v0.10+
  78155. var nodeVerArr = nodeVer.split(".").map(Number);
  78156. if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) {
  78157. __webpack_require__(829)(iconv);
  78158. }
  78159. // Load Node primitive extensions.
  78160. __webpack_require__(830)(iconv);
  78161. }
  78162. if (false) {
  78163. console.error("iconv-lite warning: javascript files use encoding different from utf-8. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info.");
  78164. }
  78165. /***/ }),
  78166. /* 814 */
  78167. /***/ (function(module, exports, __webpack_require__) {
  78168. "use strict";
  78169. var BOMChar = '\uFEFF';
  78170. exports.PrependBOM = PrependBOMWrapper
  78171. function PrependBOMWrapper(encoder, options) {
  78172. this.encoder = encoder;
  78173. this.addBOM = true;
  78174. }
  78175. PrependBOMWrapper.prototype.write = function(str) {
  78176. if (this.addBOM) {
  78177. str = BOMChar + str;
  78178. this.addBOM = false;
  78179. }
  78180. return this.encoder.write(str);
  78181. }
  78182. PrependBOMWrapper.prototype.end = function() {
  78183. return this.encoder.end();
  78184. }
  78185. //------------------------------------------------------------------------------
  78186. exports.StripBOM = StripBOMWrapper;
  78187. function StripBOMWrapper(decoder, options) {
  78188. this.decoder = decoder;
  78189. this.pass = false;
  78190. this.options = options || {};
  78191. }
  78192. StripBOMWrapper.prototype.write = function(buf) {
  78193. var res = this.decoder.write(buf);
  78194. if (this.pass || !res)
  78195. return res;
  78196. if (res[0] === BOMChar) {
  78197. res = res.slice(1);
  78198. if (typeof this.options.stripBOM === 'function')
  78199. this.options.stripBOM();
  78200. }
  78201. this.pass = true;
  78202. return res;
  78203. }
  78204. StripBOMWrapper.prototype.end = function() {
  78205. return this.decoder.end();
  78206. }
  78207. /***/ }),
  78208. /* 815 */
  78209. /***/ (function(module, exports, __webpack_require__) {
  78210. "use strict";
  78211. // Update this array if you add/rename/remove files in this directory.
  78212. // We support Browserify by skipping automatic module discovery and requiring modules directly.
  78213. var modules = [
  78214. __webpack_require__(816),
  78215. __webpack_require__(817),
  78216. __webpack_require__(818),
  78217. __webpack_require__(819),
  78218. __webpack_require__(820),
  78219. __webpack_require__(821),
  78220. __webpack_require__(822),
  78221. __webpack_require__(823),
  78222. ];
  78223. // Put all encoding/alias/codec definitions to single object and export it.
  78224. for (var i = 0; i < modules.length; i++) {
  78225. var module = modules[i];
  78226. for (var enc in module)
  78227. if (Object.prototype.hasOwnProperty.call(module, enc))
  78228. exports[enc] = module[enc];
  78229. }
  78230. /***/ }),
  78231. /* 816 */
  78232. /***/ (function(module, exports, __webpack_require__) {
  78233. "use strict";
  78234. var Buffer = __webpack_require__(21).Buffer;
  78235. // Export Node.js internal encodings.
  78236. module.exports = {
  78237. // Encodings
  78238. utf8: { type: "_internal", bomAware: true},
  78239. cesu8: { type: "_internal", bomAware: true},
  78240. unicode11utf8: "utf8",
  78241. ucs2: { type: "_internal", bomAware: true},
  78242. utf16le: "ucs2",
  78243. binary: { type: "_internal" },
  78244. base64: { type: "_internal" },
  78245. hex: { type: "_internal" },
  78246. // Codec.
  78247. _internal: InternalCodec,
  78248. };
  78249. //------------------------------------------------------------------------------
  78250. function InternalCodec(codecOptions, iconv) {
  78251. this.enc = codecOptions.encodingName;
  78252. this.bomAware = codecOptions.bomAware;
  78253. if (this.enc === "base64")
  78254. this.encoder = InternalEncoderBase64;
  78255. else if (this.enc === "cesu8") {
  78256. this.enc = "utf8"; // Use utf8 for decoding.
  78257. this.encoder = InternalEncoderCesu8;
  78258. // Add decoder for versions of Node not supporting CESU-8
  78259. if (new Buffer('eda0bdedb2a9', 'hex').toString() !== '💩') {
  78260. this.decoder = InternalDecoderCesu8;
  78261. this.defaultCharUnicode = iconv.defaultCharUnicode;
  78262. }
  78263. }
  78264. }
  78265. InternalCodec.prototype.encoder = InternalEncoder;
  78266. InternalCodec.prototype.decoder = InternalDecoder;
  78267. //------------------------------------------------------------------------------
  78268. // We use node.js internal decoder. Its signature is the same as ours.
  78269. var StringDecoder = __webpack_require__(150).StringDecoder;
  78270. if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method.
  78271. StringDecoder.prototype.end = function() {};
  78272. function InternalDecoder(options, codec) {
  78273. StringDecoder.call(this, codec.enc);
  78274. }
  78275. InternalDecoder.prototype = StringDecoder.prototype;
  78276. //------------------------------------------------------------------------------
  78277. // Encoder is mostly trivial
  78278. function InternalEncoder(options, codec) {
  78279. this.enc = codec.enc;
  78280. }
  78281. InternalEncoder.prototype.write = function(str) {
  78282. return new Buffer(str, this.enc);
  78283. }
  78284. InternalEncoder.prototype.end = function() {
  78285. }
  78286. //------------------------------------------------------------------------------
  78287. // Except base64 encoder, which must keep its state.
  78288. function InternalEncoderBase64(options, codec) {
  78289. this.prevStr = '';
  78290. }
  78291. InternalEncoderBase64.prototype.write = function(str) {
  78292. str = this.prevStr + str;
  78293. var completeQuads = str.length - (str.length % 4);
  78294. this.prevStr = str.slice(completeQuads);
  78295. str = str.slice(0, completeQuads);
  78296. return new Buffer(str, "base64");
  78297. }
  78298. InternalEncoderBase64.prototype.end = function() {
  78299. return new Buffer(this.prevStr, "base64");
  78300. }
  78301. //------------------------------------------------------------------------------
  78302. // CESU-8 encoder is also special.
  78303. function InternalEncoderCesu8(options, codec) {
  78304. }
  78305. InternalEncoderCesu8.prototype.write = function(str) {
  78306. var buf = new Buffer(str.length * 3), bufIdx = 0;
  78307. for (var i = 0; i < str.length; i++) {
  78308. var charCode = str.charCodeAt(i);
  78309. // Naive implementation, but it works because CESU-8 is especially easy
  78310. // to convert from UTF-16 (which all JS strings are encoded in).
  78311. if (charCode < 0x80)
  78312. buf[bufIdx++] = charCode;
  78313. else if (charCode < 0x800) {
  78314. buf[bufIdx++] = 0xC0 + (charCode >>> 6);
  78315. buf[bufIdx++] = 0x80 + (charCode & 0x3f);
  78316. }
  78317. else { // charCode will always be < 0x10000 in javascript.
  78318. buf[bufIdx++] = 0xE0 + (charCode >>> 12);
  78319. buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f);
  78320. buf[bufIdx++] = 0x80 + (charCode & 0x3f);
  78321. }
  78322. }
  78323. return buf.slice(0, bufIdx);
  78324. }
  78325. InternalEncoderCesu8.prototype.end = function() {
  78326. }
  78327. //------------------------------------------------------------------------------
  78328. // CESU-8 decoder is not implemented in Node v4.0+
  78329. function InternalDecoderCesu8(options, codec) {
  78330. this.acc = 0;
  78331. this.contBytes = 0;
  78332. this.accBytes = 0;
  78333. this.defaultCharUnicode = codec.defaultCharUnicode;
  78334. }
  78335. InternalDecoderCesu8.prototype.write = function(buf) {
  78336. var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes,
  78337. res = '';
  78338. for (var i = 0; i < buf.length; i++) {
  78339. var curByte = buf[i];
  78340. if ((curByte & 0xC0) !== 0x80) { // Leading byte
  78341. if (contBytes > 0) { // Previous code is invalid
  78342. res += this.defaultCharUnicode;
  78343. contBytes = 0;
  78344. }
  78345. if (curByte < 0x80) { // Single-byte code
  78346. res += String.fromCharCode(curByte);
  78347. } else if (curByte < 0xE0) { // Two-byte code
  78348. acc = curByte & 0x1F;
  78349. contBytes = 1; accBytes = 1;
  78350. } else if (curByte < 0xF0) { // Three-byte code
  78351. acc = curByte & 0x0F;
  78352. contBytes = 2; accBytes = 1;
  78353. } else { // Four or more are not supported for CESU-8.
  78354. res += this.defaultCharUnicode;
  78355. }
  78356. } else { // Continuation byte
  78357. if (contBytes > 0) { // We're waiting for it.
  78358. acc = (acc << 6) | (curByte & 0x3f);
  78359. contBytes--; accBytes++;
  78360. if (contBytes === 0) {
  78361. // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80)
  78362. if (accBytes === 2 && acc < 0x80 && acc > 0)
  78363. res += this.defaultCharUnicode;
  78364. else if (accBytes === 3 && acc < 0x800)
  78365. res += this.defaultCharUnicode;
  78366. else
  78367. // Actually add character.
  78368. res += String.fromCharCode(acc);
  78369. }
  78370. } else { // Unexpected continuation byte
  78371. res += this.defaultCharUnicode;
  78372. }
  78373. }
  78374. }
  78375. this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes;
  78376. return res;
  78377. }
  78378. InternalDecoderCesu8.prototype.end = function() {
  78379. var res = 0;
  78380. if (this.contBytes > 0)
  78381. res += this.defaultCharUnicode;
  78382. return res;
  78383. }
  78384. /***/ }),
  78385. /* 817 */
  78386. /***/ (function(module, exports, __webpack_require__) {
  78387. "use strict";
  78388. var Buffer = __webpack_require__(21).Buffer;
  78389. // Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js
  78390. // == UTF16-BE codec. ==========================================================
  78391. exports.utf16be = Utf16BECodec;
  78392. function Utf16BECodec() {
  78393. }
  78394. Utf16BECodec.prototype.encoder = Utf16BEEncoder;
  78395. Utf16BECodec.prototype.decoder = Utf16BEDecoder;
  78396. Utf16BECodec.prototype.bomAware = true;
  78397. // -- Encoding
  78398. function Utf16BEEncoder() {
  78399. }
  78400. Utf16BEEncoder.prototype.write = function(str) {
  78401. var buf = new Buffer(str, 'ucs2');
  78402. for (var i = 0; i < buf.length; i += 2) {
  78403. var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp;
  78404. }
  78405. return buf;
  78406. }
  78407. Utf16BEEncoder.prototype.end = function() {
  78408. }
  78409. // -- Decoding
  78410. function Utf16BEDecoder() {
  78411. this.overflowByte = -1;
  78412. }
  78413. Utf16BEDecoder.prototype.write = function(buf) {
  78414. if (buf.length == 0)
  78415. return '';
  78416. var buf2 = new Buffer(buf.length + 1),
  78417. i = 0, j = 0;
  78418. if (this.overflowByte !== -1) {
  78419. buf2[0] = buf[0];
  78420. buf2[1] = this.overflowByte;
  78421. i = 1; j = 2;
  78422. }
  78423. for (; i < buf.length-1; i += 2, j+= 2) {
  78424. buf2[j] = buf[i+1];
  78425. buf2[j+1] = buf[i];
  78426. }
  78427. this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1;
  78428. return buf2.slice(0, j).toString('ucs2');
  78429. }
  78430. Utf16BEDecoder.prototype.end = function() {
  78431. }
  78432. // == UTF-16 codec =============================================================
  78433. // Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic.
  78434. // Defaults to UTF-16LE, as it's prevalent and default in Node.
  78435. // http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le
  78436. // Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'});
  78437. // Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false).
  78438. exports.utf16 = Utf16Codec;
  78439. function Utf16Codec(codecOptions, iconv) {
  78440. this.iconv = iconv;
  78441. }
  78442. Utf16Codec.prototype.encoder = Utf16Encoder;
  78443. Utf16Codec.prototype.decoder = Utf16Decoder;
  78444. // -- Encoding (pass-through)
  78445. function Utf16Encoder(options, codec) {
  78446. options = options || {};
  78447. if (options.addBOM === undefined)
  78448. options.addBOM = true;
  78449. this.encoder = codec.iconv.getEncoder('utf-16le', options);
  78450. }
  78451. Utf16Encoder.prototype.write = function(str) {
  78452. return this.encoder.write(str);
  78453. }
  78454. Utf16Encoder.prototype.end = function() {
  78455. return this.encoder.end();
  78456. }
  78457. // -- Decoding
  78458. function Utf16Decoder(options, codec) {
  78459. this.decoder = null;
  78460. this.initialBytes = [];
  78461. this.initialBytesLen = 0;
  78462. this.options = options || {};
  78463. this.iconv = codec.iconv;
  78464. }
  78465. Utf16Decoder.prototype.write = function(buf) {
  78466. if (!this.decoder) {
  78467. // Codec is not chosen yet. Accumulate initial bytes.
  78468. this.initialBytes.push(buf);
  78469. this.initialBytesLen += buf.length;
  78470. if (this.initialBytesLen < 16) // We need more bytes to use space heuristic (see below)
  78471. return '';
  78472. // We have enough bytes -> detect endianness.
  78473. var buf = Buffer.concat(this.initialBytes),
  78474. encoding = detectEncoding(buf, this.options.defaultEncoding);
  78475. this.decoder = this.iconv.getDecoder(encoding, this.options);
  78476. this.initialBytes.length = this.initialBytesLen = 0;
  78477. }
  78478. return this.decoder.write(buf);
  78479. }
  78480. Utf16Decoder.prototype.end = function() {
  78481. if (!this.decoder) {
  78482. var buf = Buffer.concat(this.initialBytes),
  78483. encoding = detectEncoding(buf, this.options.defaultEncoding);
  78484. this.decoder = this.iconv.getDecoder(encoding, this.options);
  78485. var res = this.decoder.write(buf),
  78486. trail = this.decoder.end();
  78487. return trail ? (res + trail) : res;
  78488. }
  78489. return this.decoder.end();
  78490. }
  78491. function detectEncoding(buf, defaultEncoding) {
  78492. var enc = defaultEncoding || 'utf-16le';
  78493. if (buf.length >= 2) {
  78494. // Check BOM.
  78495. if (buf[0] == 0xFE && buf[1] == 0xFF) // UTF-16BE BOM
  78496. enc = 'utf-16be';
  78497. else if (buf[0] == 0xFF && buf[1] == 0xFE) // UTF-16LE BOM
  78498. enc = 'utf-16le';
  78499. else {
  78500. // No BOM found. Try to deduce encoding from initial content.
  78501. // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon.
  78502. // So, we count ASCII as if it was LE or BE, and decide from that.
  78503. var asciiCharsLE = 0, asciiCharsBE = 0, // Counts of chars in both positions
  78504. _len = Math.min(buf.length - (buf.length % 2), 64); // Len is always even.
  78505. for (var i = 0; i < _len; i += 2) {
  78506. if (buf[i] === 0 && buf[i+1] !== 0) asciiCharsBE++;
  78507. if (buf[i] !== 0 && buf[i+1] === 0) asciiCharsLE++;
  78508. }
  78509. if (asciiCharsBE > asciiCharsLE)
  78510. enc = 'utf-16be';
  78511. else if (asciiCharsBE < asciiCharsLE)
  78512. enc = 'utf-16le';
  78513. }
  78514. }
  78515. return enc;
  78516. }
  78517. /***/ }),
  78518. /* 818 */
  78519. /***/ (function(module, exports, __webpack_require__) {
  78520. "use strict";
  78521. var Buffer = __webpack_require__(21).Buffer;
  78522. // UTF-7 codec, according to https://tools.ietf.org/html/rfc2152
  78523. // See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3
  78524. exports.utf7 = Utf7Codec;
  78525. exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7
  78526. function Utf7Codec(codecOptions, iconv) {
  78527. this.iconv = iconv;
  78528. };
  78529. Utf7Codec.prototype.encoder = Utf7Encoder;
  78530. Utf7Codec.prototype.decoder = Utf7Decoder;
  78531. Utf7Codec.prototype.bomAware = true;
  78532. // -- Encoding
  78533. var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g;
  78534. function Utf7Encoder(options, codec) {
  78535. this.iconv = codec.iconv;
  78536. }
  78537. Utf7Encoder.prototype.write = function(str) {
  78538. // Naive implementation.
  78539. // Non-direct chars are encoded as "+<base64>-"; single "+" char is encoded as "+-".
  78540. return new Buffer(str.replace(nonDirectChars, function(chunk) {
  78541. return "+" + (chunk === '+' ? '' :
  78542. this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, ''))
  78543. + "-";
  78544. }.bind(this)));
  78545. }
  78546. Utf7Encoder.prototype.end = function() {
  78547. }
  78548. // -- Decoding
  78549. function Utf7Decoder(options, codec) {
  78550. this.iconv = codec.iconv;
  78551. this.inBase64 = false;
  78552. this.base64Accum = '';
  78553. }
  78554. var base64Regex = /[A-Za-z0-9\/+]/;
  78555. var base64Chars = [];
  78556. for (var i = 0; i < 256; i++)
  78557. base64Chars[i] = base64Regex.test(String.fromCharCode(i));
  78558. var plusChar = '+'.charCodeAt(0),
  78559. minusChar = '-'.charCodeAt(0),
  78560. andChar = '&'.charCodeAt(0);
  78561. Utf7Decoder.prototype.write = function(buf) {
  78562. var res = "", lastI = 0,
  78563. inBase64 = this.inBase64,
  78564. base64Accum = this.base64Accum;
  78565. // The decoder is more involved as we must handle chunks in stream.
  78566. for (var i = 0; i < buf.length; i++) {
  78567. if (!inBase64) { // We're in direct mode.
  78568. // Write direct chars until '+'
  78569. if (buf[i] == plusChar) {
  78570. res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars.
  78571. lastI = i+1;
  78572. inBase64 = true;
  78573. }
  78574. } else { // We decode base64.
  78575. if (!base64Chars[buf[i]]) { // Base64 ended.
  78576. if (i == lastI && buf[i] == minusChar) {// "+-" -> "+"
  78577. res += "+";
  78578. } else {
  78579. var b64str = base64Accum + buf.slice(lastI, i).toString();
  78580. res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be");
  78581. }
  78582. if (buf[i] != minusChar) // Minus is absorbed after base64.
  78583. i--;
  78584. lastI = i+1;
  78585. inBase64 = false;
  78586. base64Accum = '';
  78587. }
  78588. }
  78589. }
  78590. if (!inBase64) {
  78591. res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars.
  78592. } else {
  78593. var b64str = base64Accum + buf.slice(lastI).toString();
  78594. var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.
  78595. base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.
  78596. b64str = b64str.slice(0, canBeDecoded);
  78597. res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be");
  78598. }
  78599. this.inBase64 = inBase64;
  78600. this.base64Accum = base64Accum;
  78601. return res;
  78602. }
  78603. Utf7Decoder.prototype.end = function() {
  78604. var res = "";
  78605. if (this.inBase64 && this.base64Accum.length > 0)
  78606. res = this.iconv.decode(new Buffer(this.base64Accum, 'base64'), "utf16-be");
  78607. this.inBase64 = false;
  78608. this.base64Accum = '';
  78609. return res;
  78610. }
  78611. // UTF-7-IMAP codec.
  78612. // RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3)
  78613. // Differences:
  78614. // * Base64 part is started by "&" instead of "+"
  78615. // * Direct characters are 0x20-0x7E, except "&" (0x26)
  78616. // * In Base64, "," is used instead of "/"
  78617. // * Base64 must not be used to represent direct characters.
  78618. // * No implicit shift back from Base64 (should always end with '-')
  78619. // * String must end in non-shifted position.
  78620. // * "-&" while in base64 is not allowed.
  78621. exports.utf7imap = Utf7IMAPCodec;
  78622. function Utf7IMAPCodec(codecOptions, iconv) {
  78623. this.iconv = iconv;
  78624. };
  78625. Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder;
  78626. Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder;
  78627. Utf7IMAPCodec.prototype.bomAware = true;
  78628. // -- Encoding
  78629. function Utf7IMAPEncoder(options, codec) {
  78630. this.iconv = codec.iconv;
  78631. this.inBase64 = false;
  78632. this.base64Accum = new Buffer(6);
  78633. this.base64AccumIdx = 0;
  78634. }
  78635. Utf7IMAPEncoder.prototype.write = function(str) {
  78636. var inBase64 = this.inBase64,
  78637. base64Accum = this.base64Accum,
  78638. base64AccumIdx = this.base64AccumIdx,
  78639. buf = new Buffer(str.length*5 + 10), bufIdx = 0;
  78640. for (var i = 0; i < str.length; i++) {
  78641. var uChar = str.charCodeAt(i);
  78642. if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'.
  78643. if (inBase64) {
  78644. if (base64AccumIdx > 0) {
  78645. bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx);
  78646. base64AccumIdx = 0;
  78647. }
  78648. buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.
  78649. inBase64 = false;
  78650. }
  78651. if (!inBase64) {
  78652. buf[bufIdx++] = uChar; // Write direct character
  78653. if (uChar === andChar) // Ampersand -> '&-'
  78654. buf[bufIdx++] = minusChar;
  78655. }
  78656. } else { // Non-direct character
  78657. if (!inBase64) {
  78658. buf[bufIdx++] = andChar; // Write '&', then go to base64 mode.
  78659. inBase64 = true;
  78660. }
  78661. if (inBase64) {
  78662. base64Accum[base64AccumIdx++] = uChar >> 8;
  78663. base64Accum[base64AccumIdx++] = uChar & 0xFF;
  78664. if (base64AccumIdx == base64Accum.length) {
  78665. bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx);
  78666. base64AccumIdx = 0;
  78667. }
  78668. }
  78669. }
  78670. }
  78671. this.inBase64 = inBase64;
  78672. this.base64AccumIdx = base64AccumIdx;
  78673. return buf.slice(0, bufIdx);
  78674. }
  78675. Utf7IMAPEncoder.prototype.end = function() {
  78676. var buf = new Buffer(10), bufIdx = 0;
  78677. if (this.inBase64) {
  78678. if (this.base64AccumIdx > 0) {
  78679. bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx);
  78680. this.base64AccumIdx = 0;
  78681. }
  78682. buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.
  78683. this.inBase64 = false;
  78684. }
  78685. return buf.slice(0, bufIdx);
  78686. }
  78687. // -- Decoding
  78688. function Utf7IMAPDecoder(options, codec) {
  78689. this.iconv = codec.iconv;
  78690. this.inBase64 = false;
  78691. this.base64Accum = '';
  78692. }
  78693. var base64IMAPChars = base64Chars.slice();
  78694. base64IMAPChars[','.charCodeAt(0)] = true;
  78695. Utf7IMAPDecoder.prototype.write = function(buf) {
  78696. var res = "", lastI = 0,
  78697. inBase64 = this.inBase64,
  78698. base64Accum = this.base64Accum;
  78699. // The decoder is more involved as we must handle chunks in stream.
  78700. // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end).
  78701. for (var i = 0; i < buf.length; i++) {
  78702. if (!inBase64) { // We're in direct mode.
  78703. // Write direct chars until '&'
  78704. if (buf[i] == andChar) {
  78705. res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars.
  78706. lastI = i+1;
  78707. inBase64 = true;
  78708. }
  78709. } else { // We decode base64.
  78710. if (!base64IMAPChars[buf[i]]) { // Base64 ended.
  78711. if (i == lastI && buf[i] == minusChar) { // "&-" -> "&"
  78712. res += "&";
  78713. } else {
  78714. var b64str = base64Accum + buf.slice(lastI, i).toString().replace(/,/g, '/');
  78715. res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be");
  78716. }
  78717. if (buf[i] != minusChar) // Minus may be absorbed after base64.
  78718. i--;
  78719. lastI = i+1;
  78720. inBase64 = false;
  78721. base64Accum = '';
  78722. }
  78723. }
  78724. }
  78725. if (!inBase64) {
  78726. res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars.
  78727. } else {
  78728. var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, '/');
  78729. var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.
  78730. base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.
  78731. b64str = b64str.slice(0, canBeDecoded);
  78732. res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be");
  78733. }
  78734. this.inBase64 = inBase64;
  78735. this.base64Accum = base64Accum;
  78736. return res;
  78737. }
  78738. Utf7IMAPDecoder.prototype.end = function() {
  78739. var res = "";
  78740. if (this.inBase64 && this.base64Accum.length > 0)
  78741. res = this.iconv.decode(new Buffer(this.base64Accum, 'base64'), "utf16-be");
  78742. this.inBase64 = false;
  78743. this.base64Accum = '';
  78744. return res;
  78745. }
  78746. /***/ }),
  78747. /* 819 */
  78748. /***/ (function(module, exports, __webpack_require__) {
  78749. "use strict";
  78750. var Buffer = __webpack_require__(21).Buffer;
  78751. // Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that
  78752. // correspond to encoded bytes (if 128 - then lower half is ASCII).
  78753. exports._sbcs = SBCSCodec;
  78754. function SBCSCodec(codecOptions, iconv) {
  78755. if (!codecOptions)
  78756. throw new Error("SBCS codec is called without the data.")
  78757. // Prepare char buffer for decoding.
  78758. if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256))
  78759. throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)");
  78760. if (codecOptions.chars.length === 128) {
  78761. var asciiString = "";
  78762. for (var i = 0; i < 128; i++)
  78763. asciiString += String.fromCharCode(i);
  78764. codecOptions.chars = asciiString + codecOptions.chars;
  78765. }
  78766. this.decodeBuf = new Buffer(codecOptions.chars, 'ucs2');
  78767. // Encoding buffer.
  78768. var encodeBuf = new Buffer(65536);
  78769. encodeBuf.fill(iconv.defaultCharSingleByte.charCodeAt(0));
  78770. for (var i = 0; i < codecOptions.chars.length; i++)
  78771. encodeBuf[codecOptions.chars.charCodeAt(i)] = i;
  78772. this.encodeBuf = encodeBuf;
  78773. }
  78774. SBCSCodec.prototype.encoder = SBCSEncoder;
  78775. SBCSCodec.prototype.decoder = SBCSDecoder;
  78776. function SBCSEncoder(options, codec) {
  78777. this.encodeBuf = codec.encodeBuf;
  78778. }
  78779. SBCSEncoder.prototype.write = function(str) {
  78780. var buf = new Buffer(str.length);
  78781. for (var i = 0; i < str.length; i++)
  78782. buf[i] = this.encodeBuf[str.charCodeAt(i)];
  78783. return buf;
  78784. }
  78785. SBCSEncoder.prototype.end = function() {
  78786. }
  78787. function SBCSDecoder(options, codec) {
  78788. this.decodeBuf = codec.decodeBuf;
  78789. }
  78790. SBCSDecoder.prototype.write = function(buf) {
  78791. // Strings are immutable in JS -> we use ucs2 buffer to speed up computations.
  78792. var decodeBuf = this.decodeBuf;
  78793. var newBuf = new Buffer(buf.length*2);
  78794. var idx1 = 0, idx2 = 0;
  78795. for (var i = 0; i < buf.length; i++) {
  78796. idx1 = buf[i]*2; idx2 = i*2;
  78797. newBuf[idx2] = decodeBuf[idx1];
  78798. newBuf[idx2+1] = decodeBuf[idx1+1];
  78799. }
  78800. return newBuf.toString('ucs2');
  78801. }
  78802. SBCSDecoder.prototype.end = function() {
  78803. }
  78804. /***/ }),
  78805. /* 820 */
  78806. /***/ (function(module, exports, __webpack_require__) {
  78807. "use strict";
  78808. // Manually added data to be used by sbcs codec in addition to generated one.
  78809. module.exports = {
  78810. // Not supported by iconv, not sure why.
  78811. "10029": "maccenteuro",
  78812. "maccenteuro": {
  78813. "type": "_sbcs",
  78814. "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ"
  78815. },
  78816. "808": "cp808",
  78817. "ibm808": "cp808",
  78818. "cp808": {
  78819. "type": "_sbcs",
  78820. "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ "
  78821. },
  78822. // Aliases of generated encodings.
  78823. "ascii8bit": "ascii",
  78824. "usascii": "ascii",
  78825. "ansix34": "ascii",
  78826. "ansix341968": "ascii",
  78827. "ansix341986": "ascii",
  78828. "csascii": "ascii",
  78829. "cp367": "ascii",
  78830. "ibm367": "ascii",
  78831. "isoir6": "ascii",
  78832. "iso646us": "ascii",
  78833. "iso646irv": "ascii",
  78834. "us": "ascii",
  78835. "latin1": "iso88591",
  78836. "latin2": "iso88592",
  78837. "latin3": "iso88593",
  78838. "latin4": "iso88594",
  78839. "latin5": "iso88599",
  78840. "latin6": "iso885910",
  78841. "latin7": "iso885913",
  78842. "latin8": "iso885914",
  78843. "latin9": "iso885915",
  78844. "latin10": "iso885916",
  78845. "csisolatin1": "iso88591",
  78846. "csisolatin2": "iso88592",
  78847. "csisolatin3": "iso88593",
  78848. "csisolatin4": "iso88594",
  78849. "csisolatincyrillic": "iso88595",
  78850. "csisolatinarabic": "iso88596",
  78851. "csisolatingreek" : "iso88597",
  78852. "csisolatinhebrew": "iso88598",
  78853. "csisolatin5": "iso88599",
  78854. "csisolatin6": "iso885910",
  78855. "l1": "iso88591",
  78856. "l2": "iso88592",
  78857. "l3": "iso88593",
  78858. "l4": "iso88594",
  78859. "l5": "iso88599",
  78860. "l6": "iso885910",
  78861. "l7": "iso885913",
  78862. "l8": "iso885914",
  78863. "l9": "iso885915",
  78864. "l10": "iso885916",
  78865. "isoir14": "iso646jp",
  78866. "isoir57": "iso646cn",
  78867. "isoir100": "iso88591",
  78868. "isoir101": "iso88592",
  78869. "isoir109": "iso88593",
  78870. "isoir110": "iso88594",
  78871. "isoir144": "iso88595",
  78872. "isoir127": "iso88596",
  78873. "isoir126": "iso88597",
  78874. "isoir138": "iso88598",
  78875. "isoir148": "iso88599",
  78876. "isoir157": "iso885910",
  78877. "isoir166": "tis620",
  78878. "isoir179": "iso885913",
  78879. "isoir199": "iso885914",
  78880. "isoir203": "iso885915",
  78881. "isoir226": "iso885916",
  78882. "cp819": "iso88591",
  78883. "ibm819": "iso88591",
  78884. "cyrillic": "iso88595",
  78885. "arabic": "iso88596",
  78886. "arabic8": "iso88596",
  78887. "ecma114": "iso88596",
  78888. "asmo708": "iso88596",
  78889. "greek" : "iso88597",
  78890. "greek8" : "iso88597",
  78891. "ecma118" : "iso88597",
  78892. "elot928" : "iso88597",
  78893. "hebrew": "iso88598",
  78894. "hebrew8": "iso88598",
  78895. "turkish": "iso88599",
  78896. "turkish8": "iso88599",
  78897. "thai": "iso885911",
  78898. "thai8": "iso885911",
  78899. "celtic": "iso885914",
  78900. "celtic8": "iso885914",
  78901. "isoceltic": "iso885914",
  78902. "tis6200": "tis620",
  78903. "tis62025291": "tis620",
  78904. "tis62025330": "tis620",
  78905. "10000": "macroman",
  78906. "10006": "macgreek",
  78907. "10007": "maccyrillic",
  78908. "10079": "maciceland",
  78909. "10081": "macturkish",
  78910. "cspc8codepage437": "cp437",
  78911. "cspc775baltic": "cp775",
  78912. "cspc850multilingual": "cp850",
  78913. "cspcp852": "cp852",
  78914. "cspc862latinhebrew": "cp862",
  78915. "cpgr": "cp869",
  78916. "msee": "cp1250",
  78917. "mscyrl": "cp1251",
  78918. "msansi": "cp1252",
  78919. "msgreek": "cp1253",
  78920. "msturk": "cp1254",
  78921. "mshebr": "cp1255",
  78922. "msarab": "cp1256",
  78923. "winbaltrim": "cp1257",
  78924. "cp20866": "koi8r",
  78925. "20866": "koi8r",
  78926. "ibm878": "koi8r",
  78927. "cskoi8r": "koi8r",
  78928. "cp21866": "koi8u",
  78929. "21866": "koi8u",
  78930. "ibm1168": "koi8u",
  78931. "strk10482002": "rk1048",
  78932. "tcvn5712": "tcvn",
  78933. "tcvn57121": "tcvn",
  78934. "gb198880": "iso646cn",
  78935. "cn": "iso646cn",
  78936. "csiso14jisc6220ro": "iso646jp",
  78937. "jisc62201969ro": "iso646jp",
  78938. "jp": "iso646jp",
  78939. "cshproman8": "hproman8",
  78940. "r8": "hproman8",
  78941. "roman8": "hproman8",
  78942. "xroman8": "hproman8",
  78943. "ibm1051": "hproman8",
  78944. "mac": "macintosh",
  78945. "csmacintosh": "macintosh",
  78946. };
  78947. /***/ }),
  78948. /* 821 */
  78949. /***/ (function(module, exports, __webpack_require__) {
  78950. "use strict";
  78951. // Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script.
  78952. module.exports = {
  78953. "437": "cp437",
  78954. "737": "cp737",
  78955. "775": "cp775",
  78956. "850": "cp850",
  78957. "852": "cp852",
  78958. "855": "cp855",
  78959. "856": "cp856",
  78960. "857": "cp857",
  78961. "858": "cp858",
  78962. "860": "cp860",
  78963. "861": "cp861",
  78964. "862": "cp862",
  78965. "863": "cp863",
  78966. "864": "cp864",
  78967. "865": "cp865",
  78968. "866": "cp866",
  78969. "869": "cp869",
  78970. "874": "windows874",
  78971. "922": "cp922",
  78972. "1046": "cp1046",
  78973. "1124": "cp1124",
  78974. "1125": "cp1125",
  78975. "1129": "cp1129",
  78976. "1133": "cp1133",
  78977. "1161": "cp1161",
  78978. "1162": "cp1162",
  78979. "1163": "cp1163",
  78980. "1250": "windows1250",
  78981. "1251": "windows1251",
  78982. "1252": "windows1252",
  78983. "1253": "windows1253",
  78984. "1254": "windows1254",
  78985. "1255": "windows1255",
  78986. "1256": "windows1256",
  78987. "1257": "windows1257",
  78988. "1258": "windows1258",
  78989. "28591": "iso88591",
  78990. "28592": "iso88592",
  78991. "28593": "iso88593",
  78992. "28594": "iso88594",
  78993. "28595": "iso88595",
  78994. "28596": "iso88596",
  78995. "28597": "iso88597",
  78996. "28598": "iso88598",
  78997. "28599": "iso88599",
  78998. "28600": "iso885910",
  78999. "28601": "iso885911",
  79000. "28603": "iso885913",
  79001. "28604": "iso885914",
  79002. "28605": "iso885915",
  79003. "28606": "iso885916",
  79004. "windows874": {
  79005. "type": "_sbcs",
  79006. "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
  79007. },
  79008. "win874": "windows874",
  79009. "cp874": "windows874",
  79010. "windows1250": {
  79011. "type": "_sbcs",
  79012. "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙"
  79013. },
  79014. "win1250": "windows1250",
  79015. "cp1250": "windows1250",
  79016. "windows1251": {
  79017. "type": "_sbcs",
  79018. "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
  79019. },
  79020. "win1251": "windows1251",
  79021. "cp1251": "windows1251",
  79022. "windows1252": {
  79023. "type": "_sbcs",
  79024. "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
  79025. },
  79026. "win1252": "windows1252",
  79027. "cp1252": "windows1252",
  79028. "windows1253": {
  79029. "type": "_sbcs",
  79030. "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�"
  79031. },
  79032. "win1253": "windows1253",
  79033. "cp1253": "windows1253",
  79034. "windows1254": {
  79035. "type": "_sbcs",
  79036. "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ"
  79037. },
  79038. "win1254": "windows1254",
  79039. "cp1254": "windows1254",
  79040. "windows1255": {
  79041. "type": "_sbcs",
  79042. "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�"
  79043. },
  79044. "win1255": "windows1255",
  79045. "cp1255": "windows1255",
  79046. "windows1256": {
  79047. "type": "_sbcs",
  79048. "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے"
  79049. },
  79050. "win1256": "windows1256",
  79051. "cp1256": "windows1256",
  79052. "windows1257": {
  79053. "type": "_sbcs",
  79054. "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙"
  79055. },
  79056. "win1257": "windows1257",
  79057. "cp1257": "windows1257",
  79058. "windows1258": {
  79059. "type": "_sbcs",
  79060. "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"
  79061. },
  79062. "win1258": "windows1258",
  79063. "cp1258": "windows1258",
  79064. "iso88591": {
  79065. "type": "_sbcs",
  79066. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
  79067. },
  79068. "cp28591": "iso88591",
  79069. "iso88592": {
  79070. "type": "_sbcs",
  79071. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙"
  79072. },
  79073. "cp28592": "iso88592",
  79074. "iso88593": {
  79075. "type": "_sbcs",
  79076. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙"
  79077. },
  79078. "cp28593": "iso88593",
  79079. "iso88594": {
  79080. "type": "_sbcs",
  79081. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖ×ØŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙"
  79082. },
  79083. "cp28594": "iso88594",
  79084. "iso88595": {
  79085. "type": "_sbcs",
  79086. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ"
  79087. },
  79088. "cp28595": "iso88595",
  79089. "iso88596": {
  79090. "type": "_sbcs",
  79091. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������"
  79092. },
  79093. "cp28596": "iso88596",
  79094. "iso88597": {
  79095. "type": "_sbcs",
  79096. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�"
  79097. },
  79098. "cp28597": "iso88597",
  79099. "iso88598": {
  79100. "type": "_sbcs",
  79101. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�"
  79102. },
  79103. "cp28598": "iso88598",
  79104. "iso88599": {
  79105. "type": "_sbcs",
  79106. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ"
  79107. },
  79108. "cp28599": "iso88599",
  79109. "iso885910": {
  79110. "type": "_sbcs",
  79111. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨĶ§ĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ"
  79112. },
  79113. "cp28600": "iso885910",
  79114. "iso885911": {
  79115. "type": "_sbcs",
  79116. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
  79117. },
  79118. "cp28601": "iso885911",
  79119. "iso885913": {
  79120. "type": "_sbcs",
  79121. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’"
  79122. },
  79123. "cp28603": "iso885913",
  79124. "iso885914": {
  79125. "type": "_sbcs",
  79126. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ"
  79127. },
  79128. "cp28604": "iso885914",
  79129. "iso885915": {
  79130. "type": "_sbcs",
  79131. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
  79132. },
  79133. "cp28605": "iso885915",
  79134. "iso885916": {
  79135. "type": "_sbcs",
  79136. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Š§š©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ"
  79137. },
  79138. "cp28606": "iso885916",
  79139. "cp437": {
  79140. "type": "_sbcs",
  79141. "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
  79142. },
  79143. "ibm437": "cp437",
  79144. "csibm437": "cp437",
  79145. "cp737": {
  79146. "type": "_sbcs",
  79147. "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ "
  79148. },
  79149. "ibm737": "cp737",
  79150. "csibm737": "cp737",
  79151. "cp775": {
  79152. "type": "_sbcs",
  79153. "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£ØפĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ "
  79154. },
  79155. "ibm775": "cp775",
  79156. "csibm775": "cp775",
  79157. "cp850": {
  79158. "type": "_sbcs",
  79159. "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ "
  79160. },
  79161. "ibm850": "cp850",
  79162. "csibm850": "cp850",
  79163. "cp852": {
  79164. "type": "_sbcs",
  79165. "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ "
  79166. },
  79167. "ibm852": "cp852",
  79168. "csibm852": "cp852",
  79169. "cp855": {
  79170. "type": "_sbcs",
  79171. "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ "
  79172. },
  79173. "ibm855": "cp855",
  79174. "csibm855": "cp855",
  79175. "cp856": {
  79176. "type": "_sbcs",
  79177. "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ "
  79178. },
  79179. "ibm856": "cp856",
  79180. "csibm856": "cp856",
  79181. "cp857": {
  79182. "type": "_sbcs",
  79183. "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ "
  79184. },
  79185. "ibm857": "cp857",
  79186. "csibm857": "cp857",
  79187. "cp858": {
  79188. "type": "_sbcs",
  79189. "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ "
  79190. },
  79191. "ibm858": "cp858",
  79192. "csibm858": "cp858",
  79193. "cp860": {
  79194. "type": "_sbcs",
  79195. "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
  79196. },
  79197. "ibm860": "cp860",
  79198. "csibm860": "cp860",
  79199. "cp861": {
  79200. "type": "_sbcs",
  79201. "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
  79202. },
  79203. "ibm861": "cp861",
  79204. "csibm861": "cp861",
  79205. "cp862": {
  79206. "type": "_sbcs",
  79207. "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
  79208. },
  79209. "ibm862": "cp862",
  79210. "csibm862": "cp862",
  79211. "cp863": {
  79212. "type": "_sbcs",
  79213. "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
  79214. },
  79215. "ibm863": "cp863",
  79216. "csibm863": "cp863",
  79217. "cp864": {
  79218. "type": "_sbcs",
  79219. "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�"
  79220. },
  79221. "ibm864": "cp864",
  79222. "csibm864": "cp864",
  79223. "cp865": {
  79224. "type": "_sbcs",
  79225. "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
  79226. },
  79227. "ibm865": "cp865",
  79228. "csibm865": "cp865",
  79229. "cp866": {
  79230. "type": "_sbcs",
  79231. "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ "
  79232. },
  79233. "ibm866": "cp866",
  79234. "csibm866": "cp866",
  79235. "cp869": {
  79236. "type": "_sbcs",
  79237. "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ "
  79238. },
  79239. "ibm869": "cp869",
  79240. "csibm869": "cp869",
  79241. "cp922": {
  79242. "type": "_sbcs",
  79243. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ×ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ"
  79244. },
  79245. "ibm922": "cp922",
  79246. "csibm922": "cp922",
  79247. "cp1046": {
  79248. "type": "_sbcs",
  79249. "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�"
  79250. },
  79251. "ibm1046": "cp1046",
  79252. "csibm1046": "cp1046",
  79253. "cp1124": {
  79254. "type": "_sbcs",
  79255. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ"
  79256. },
  79257. "ibm1124": "cp1124",
  79258. "csibm1124": "cp1124",
  79259. "cp1125": {
  79260. "type": "_sbcs",
  79261. "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ "
  79262. },
  79263. "ibm1125": "cp1125",
  79264. "csibm1125": "cp1125",
  79265. "cp1129": {
  79266. "type": "_sbcs",
  79267. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"
  79268. },
  79269. "ibm1129": "cp1129",
  79270. "csibm1129": "cp1129",
  79271. "cp1133": {
  79272. "type": "_sbcs",
  79273. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�"
  79274. },
  79275. "ibm1133": "cp1133",
  79276. "csibm1133": "cp1133",
  79277. "cp1161": {
  79278. "type": "_sbcs",
  79279. "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ "
  79280. },
  79281. "ibm1161": "cp1161",
  79282. "csibm1161": "cp1161",
  79283. "cp1162": {
  79284. "type": "_sbcs",
  79285. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
  79286. },
  79287. "ibm1162": "cp1162",
  79288. "csibm1162": "cp1162",
  79289. "cp1163": {
  79290. "type": "_sbcs",
  79291. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"
  79292. },
  79293. "ibm1163": "cp1163",
  79294. "csibm1163": "cp1163",
  79295. "maccroatian": {
  79296. "type": "_sbcs",
  79297. "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ"
  79298. },
  79299. "maccyrillic": {
  79300. "type": "_sbcs",
  79301. "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤"
  79302. },
  79303. "macgreek": {
  79304. "type": "_sbcs",
  79305. "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�"
  79306. },
  79307. "maciceland": {
  79308. "type": "_sbcs",
  79309. "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
  79310. },
  79311. "macroman": {
  79312. "type": "_sbcs",
  79313. "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
  79314. },
  79315. "macromania": {
  79316. "type": "_sbcs",
  79317. "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
  79318. },
  79319. "macthai": {
  79320. "type": "_sbcs",
  79321. "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����"
  79322. },
  79323. "macturkish": {
  79324. "type": "_sbcs",
  79325. "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ"
  79326. },
  79327. "macukraine": {
  79328. "type": "_sbcs",
  79329. "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤"
  79330. },
  79331. "koi8r": {
  79332. "type": "_sbcs",
  79333. "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
  79334. },
  79335. "koi8u": {
  79336. "type": "_sbcs",
  79337. "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
  79338. },
  79339. "koi8ru": {
  79340. "type": "_sbcs",
  79341. "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
  79342. },
  79343. "koi8t": {
  79344. "type": "_sbcs",
  79345. "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
  79346. },
  79347. "armscii8": {
  79348. "type": "_sbcs",
  79349. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�"
  79350. },
  79351. "rk1048": {
  79352. "type": "_sbcs",
  79353. "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
  79354. },
  79355. "tcvn": {
  79356. "type": "_sbcs",
  79357. "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ"
  79358. },
  79359. "georgianacademy": {
  79360. "type": "_sbcs",
  79361. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
  79362. },
  79363. "georgianps": {
  79364. "type": "_sbcs",
  79365. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
  79366. },
  79367. "pt154": {
  79368. "type": "_sbcs",
  79369. "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
  79370. },
  79371. "viscii": {
  79372. "type": "_sbcs",
  79373. "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ"
  79374. },
  79375. "iso646cn": {
  79376. "type": "_sbcs",
  79377. "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������"
  79378. },
  79379. "iso646jp": {
  79380. "type": "_sbcs",
  79381. "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������"
  79382. },
  79383. "hproman8": {
  79384. "type": "_sbcs",
  79385. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�"
  79386. },
  79387. "macintosh": {
  79388. "type": "_sbcs",
  79389. "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
  79390. },
  79391. "ascii": {
  79392. "type": "_sbcs",
  79393. "chars": "��������������������������������������������������������������������������������������������������������������������������������"
  79394. },
  79395. "tis620": {
  79396. "type": "_sbcs",
  79397. "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
  79398. }
  79399. }
  79400. /***/ }),
  79401. /* 822 */
  79402. /***/ (function(module, exports, __webpack_require__) {
  79403. "use strict";
  79404. var Buffer = __webpack_require__(21).Buffer;
  79405. // Multibyte codec. In this scheme, a character is represented by 1 or more bytes.
  79406. // Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences.
  79407. // To save memory and loading time, we read table files only when requested.
  79408. exports._dbcs = DBCSCodec;
  79409. var UNASSIGNED = -1,
  79410. GB18030_CODE = -2,
  79411. SEQ_START = -10,
  79412. NODE_START = -1000,
  79413. UNASSIGNED_NODE = new Array(0x100),
  79414. DEF_CHAR = -1;
  79415. for (var i = 0; i < 0x100; i++)
  79416. UNASSIGNED_NODE[i] = UNASSIGNED;
  79417. // Class DBCSCodec reads and initializes mapping tables.
  79418. function DBCSCodec(codecOptions, iconv) {
  79419. this.encodingName = codecOptions.encodingName;
  79420. if (!codecOptions)
  79421. throw new Error("DBCS codec is called without the data.")
  79422. if (!codecOptions.table)
  79423. throw new Error("Encoding '" + this.encodingName + "' has no data.");
  79424. // Load tables.
  79425. var mappingTable = codecOptions.table();
  79426. // Decode tables: MBCS -> Unicode.
  79427. // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256.
  79428. // Trie root is decodeTables[0].
  79429. // Values: >= 0 -> unicode character code. can be > 0xFFFF
  79430. // == UNASSIGNED -> unknown/unassigned sequence.
  79431. // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence.
  79432. // <= NODE_START -> index of the next node in our trie to process next byte.
  79433. // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq.
  79434. this.decodeTables = [];
  79435. this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node.
  79436. // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here.
  79437. this.decodeTableSeq = [];
  79438. // Actual mapping tables consist of chunks. Use them to fill up decode tables.
  79439. for (var i = 0; i < mappingTable.length; i++)
  79440. this._addDecodeChunk(mappingTable[i]);
  79441. this.defaultCharUnicode = iconv.defaultCharUnicode;
  79442. // Encode tables: Unicode -> DBCS.
  79443. // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance.
  79444. // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null.
  79445. // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.).
  79446. // == UNASSIGNED -> no conversion found. Output a default char.
  79447. // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence.
  79448. this.encodeTable = [];
  79449. // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of
  79450. // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key
  79451. // means end of sequence (needed when one sequence is a strict subsequence of another).
  79452. // Objects are kept separately from encodeTable to increase performance.
  79453. this.encodeTableSeq = [];
  79454. // Some chars can be decoded, but need not be encoded.
  79455. var skipEncodeChars = {};
  79456. if (codecOptions.encodeSkipVals)
  79457. for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) {
  79458. var val = codecOptions.encodeSkipVals[i];
  79459. if (typeof val === 'number')
  79460. skipEncodeChars[val] = true;
  79461. else
  79462. for (var j = val.from; j <= val.to; j++)
  79463. skipEncodeChars[j] = true;
  79464. }
  79465. // Use decode trie to recursively fill out encode tables.
  79466. this._fillEncodeTable(0, 0, skipEncodeChars);
  79467. // Add more encoding pairs when needed.
  79468. if (codecOptions.encodeAdd) {
  79469. for (var uChar in codecOptions.encodeAdd)
  79470. if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar))
  79471. this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]);
  79472. }
  79473. this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)];
  79474. if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?'];
  79475. if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0);
  79476. // Load & create GB18030 tables when needed.
  79477. if (typeof codecOptions.gb18030 === 'function') {
  79478. this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges.
  79479. // Add GB18030 decode tables.
  79480. var thirdByteNodeIdx = this.decodeTables.length;
  79481. var thirdByteNode = this.decodeTables[thirdByteNodeIdx] = UNASSIGNED_NODE.slice(0);
  79482. var fourthByteNodeIdx = this.decodeTables.length;
  79483. var fourthByteNode = this.decodeTables[fourthByteNodeIdx] = UNASSIGNED_NODE.slice(0);
  79484. for (var i = 0x81; i <= 0xFE; i++) {
  79485. var secondByteNodeIdx = NODE_START - this.decodeTables[0][i];
  79486. var secondByteNode = this.decodeTables[secondByteNodeIdx];
  79487. for (var j = 0x30; j <= 0x39; j++)
  79488. secondByteNode[j] = NODE_START - thirdByteNodeIdx;
  79489. }
  79490. for (var i = 0x81; i <= 0xFE; i++)
  79491. thirdByteNode[i] = NODE_START - fourthByteNodeIdx;
  79492. for (var i = 0x30; i <= 0x39; i++)
  79493. fourthByteNode[i] = GB18030_CODE
  79494. }
  79495. }
  79496. DBCSCodec.prototype.encoder = DBCSEncoder;
  79497. DBCSCodec.prototype.decoder = DBCSDecoder;
  79498. // Decoder helpers
  79499. DBCSCodec.prototype._getDecodeTrieNode = function(addr) {
  79500. var bytes = [];
  79501. for (; addr > 0; addr >>= 8)
  79502. bytes.push(addr & 0xFF);
  79503. if (bytes.length == 0)
  79504. bytes.push(0);
  79505. var node = this.decodeTables[0];
  79506. for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie.
  79507. var val = node[bytes[i]];
  79508. if (val == UNASSIGNED) { // Create new node.
  79509. node[bytes[i]] = NODE_START - this.decodeTables.length;
  79510. this.decodeTables.push(node = UNASSIGNED_NODE.slice(0));
  79511. }
  79512. else if (val <= NODE_START) { // Existing node.
  79513. node = this.decodeTables[NODE_START - val];
  79514. }
  79515. else
  79516. throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16));
  79517. }
  79518. return node;
  79519. }
  79520. DBCSCodec.prototype._addDecodeChunk = function(chunk) {
  79521. // First element of chunk is the hex mbcs code where we start.
  79522. var curAddr = parseInt(chunk[0], 16);
  79523. // Choose the decoding node where we'll write our chars.
  79524. var writeTable = this._getDecodeTrieNode(curAddr);
  79525. curAddr = curAddr & 0xFF;
  79526. // Write all other elements of the chunk to the table.
  79527. for (var k = 1; k < chunk.length; k++) {
  79528. var part = chunk[k];
  79529. if (typeof part === "string") { // String, write as-is.
  79530. for (var l = 0; l < part.length;) {
  79531. var code = part.charCodeAt(l++);
  79532. if (0xD800 <= code && code < 0xDC00) { // Decode surrogate
  79533. var codeTrail = part.charCodeAt(l++);
  79534. if (0xDC00 <= codeTrail && codeTrail < 0xE000)
  79535. writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00);
  79536. else
  79537. throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]);
  79538. }
  79539. else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used)
  79540. var len = 0xFFF - code + 2;
  79541. var seq = [];
  79542. for (var m = 0; m < len; m++)
  79543. seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq.
  79544. writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length;
  79545. this.decodeTableSeq.push(seq);
  79546. }
  79547. else
  79548. writeTable[curAddr++] = code; // Basic char
  79549. }
  79550. }
  79551. else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character.
  79552. var charCode = writeTable[curAddr - 1] + 1;
  79553. for (var l = 0; l < part; l++)
  79554. writeTable[curAddr++] = charCode++;
  79555. }
  79556. else
  79557. throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]);
  79558. }
  79559. if (curAddr > 0xFF)
  79560. throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr);
  79561. }
  79562. // Encoder helpers
  79563. DBCSCodec.prototype._getEncodeBucket = function(uCode) {
  79564. var high = uCode >> 8; // This could be > 0xFF because of astral characters.
  79565. if (this.encodeTable[high] === undefined)
  79566. this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand.
  79567. return this.encodeTable[high];
  79568. }
  79569. DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) {
  79570. var bucket = this._getEncodeBucket(uCode);
  79571. var low = uCode & 0xFF;
  79572. if (bucket[low] <= SEQ_START)
  79573. this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it.
  79574. else if (bucket[low] == UNASSIGNED)
  79575. bucket[low] = dbcsCode;
  79576. }
  79577. DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) {
  79578. // Get the root of character tree according to first character of the sequence.
  79579. var uCode = seq[0];
  79580. var bucket = this._getEncodeBucket(uCode);
  79581. var low = uCode & 0xFF;
  79582. var node;
  79583. if (bucket[low] <= SEQ_START) {
  79584. // There's already a sequence with - use it.
  79585. node = this.encodeTableSeq[SEQ_START-bucket[low]];
  79586. }
  79587. else {
  79588. // There was no sequence object - allocate a new one.
  79589. node = {};
  79590. if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence.
  79591. bucket[low] = SEQ_START - this.encodeTableSeq.length;
  79592. this.encodeTableSeq.push(node);
  79593. }
  79594. // Traverse the character tree, allocating new nodes as needed.
  79595. for (var j = 1; j < seq.length-1; j++) {
  79596. var oldVal = node[uCode];
  79597. if (typeof oldVal === 'object')
  79598. node = oldVal;
  79599. else {
  79600. node = node[uCode] = {}
  79601. if (oldVal !== undefined)
  79602. node[DEF_CHAR] = oldVal
  79603. }
  79604. }
  79605. // Set the leaf to given dbcsCode.
  79606. uCode = seq[seq.length-1];
  79607. node[uCode] = dbcsCode;
  79608. }
  79609. DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) {
  79610. var node = this.decodeTables[nodeIdx];
  79611. for (var i = 0; i < 0x100; i++) {
  79612. var uCode = node[i];
  79613. var mbCode = prefix + i;
  79614. if (skipEncodeChars[mbCode])
  79615. continue;
  79616. if (uCode >= 0)
  79617. this._setEncodeChar(uCode, mbCode);
  79618. else if (uCode <= NODE_START)
  79619. this._fillEncodeTable(NODE_START - uCode, mbCode << 8, skipEncodeChars);
  79620. else if (uCode <= SEQ_START)
  79621. this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode);
  79622. }
  79623. }
  79624. // == Encoder ==================================================================
  79625. function DBCSEncoder(options, codec) {
  79626. // Encoder state
  79627. this.leadSurrogate = -1;
  79628. this.seqObj = undefined;
  79629. // Static data
  79630. this.encodeTable = codec.encodeTable;
  79631. this.encodeTableSeq = codec.encodeTableSeq;
  79632. this.defaultCharSingleByte = codec.defCharSB;
  79633. this.gb18030 = codec.gb18030;
  79634. }
  79635. DBCSEncoder.prototype.write = function(str) {
  79636. var newBuf = new Buffer(str.length * (this.gb18030 ? 4 : 3)),
  79637. leadSurrogate = this.leadSurrogate,
  79638. seqObj = this.seqObj, nextChar = -1,
  79639. i = 0, j = 0;
  79640. while (true) {
  79641. // 0. Get next character.
  79642. if (nextChar === -1) {
  79643. if (i == str.length) break;
  79644. var uCode = str.charCodeAt(i++);
  79645. }
  79646. else {
  79647. var uCode = nextChar;
  79648. nextChar = -1;
  79649. }
  79650. // 1. Handle surrogates.
  79651. if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates.
  79652. if (uCode < 0xDC00) { // We've got lead surrogate.
  79653. if (leadSurrogate === -1) {
  79654. leadSurrogate = uCode;
  79655. continue;
  79656. } else {
  79657. leadSurrogate = uCode;
  79658. // Double lead surrogate found.
  79659. uCode = UNASSIGNED;
  79660. }
  79661. } else { // We've got trail surrogate.
  79662. if (leadSurrogate !== -1) {
  79663. uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00);
  79664. leadSurrogate = -1;
  79665. } else {
  79666. // Incomplete surrogate pair - only trail surrogate found.
  79667. uCode = UNASSIGNED;
  79668. }
  79669. }
  79670. }
  79671. else if (leadSurrogate !== -1) {
  79672. // Incomplete surrogate pair - only lead surrogate found.
  79673. nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char.
  79674. leadSurrogate = -1;
  79675. }
  79676. // 2. Convert uCode character.
  79677. var dbcsCode = UNASSIGNED;
  79678. if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence
  79679. var resCode = seqObj[uCode];
  79680. if (typeof resCode === 'object') { // Sequence continues.
  79681. seqObj = resCode;
  79682. continue;
  79683. } else if (typeof resCode == 'number') { // Sequence finished. Write it.
  79684. dbcsCode = resCode;
  79685. } else if (resCode == undefined) { // Current character is not part of the sequence.
  79686. // Try default character for this sequence
  79687. resCode = seqObj[DEF_CHAR];
  79688. if (resCode !== undefined) {
  79689. dbcsCode = resCode; // Found. Write it.
  79690. nextChar = uCode; // Current character will be written too in the next iteration.
  79691. } else {
  79692. // TODO: What if we have no default? (resCode == undefined)
  79693. // Then, we should write first char of the sequence as-is and try the rest recursively.
  79694. // Didn't do it for now because no encoding has this situation yet.
  79695. // Currently, just skip the sequence and write current char.
  79696. }
  79697. }
  79698. seqObj = undefined;
  79699. }
  79700. else if (uCode >= 0) { // Regular character
  79701. var subtable = this.encodeTable[uCode >> 8];
  79702. if (subtable !== undefined)
  79703. dbcsCode = subtable[uCode & 0xFF];
  79704. if (dbcsCode <= SEQ_START) { // Sequence start
  79705. seqObj = this.encodeTableSeq[SEQ_START-dbcsCode];
  79706. continue;
  79707. }
  79708. if (dbcsCode == UNASSIGNED && this.gb18030) {
  79709. // Use GB18030 algorithm to find character(s) to write.
  79710. var idx = findIdx(this.gb18030.uChars, uCode);
  79711. if (idx != -1) {
  79712. var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]);
  79713. newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600;
  79714. newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260;
  79715. newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10;
  79716. newBuf[j++] = 0x30 + dbcsCode;
  79717. continue;
  79718. }
  79719. }
  79720. }
  79721. // 3. Write dbcsCode character.
  79722. if (dbcsCode === UNASSIGNED)
  79723. dbcsCode = this.defaultCharSingleByte;
  79724. if (dbcsCode < 0x100) {
  79725. newBuf[j++] = dbcsCode;
  79726. }
  79727. else if (dbcsCode < 0x10000) {
  79728. newBuf[j++] = dbcsCode >> 8; // high byte
  79729. newBuf[j++] = dbcsCode & 0xFF; // low byte
  79730. }
  79731. else {
  79732. newBuf[j++] = dbcsCode >> 16;
  79733. newBuf[j++] = (dbcsCode >> 8) & 0xFF;
  79734. newBuf[j++] = dbcsCode & 0xFF;
  79735. }
  79736. }
  79737. this.seqObj = seqObj;
  79738. this.leadSurrogate = leadSurrogate;
  79739. return newBuf.slice(0, j);
  79740. }
  79741. DBCSEncoder.prototype.end = function() {
  79742. if (this.leadSurrogate === -1 && this.seqObj === undefined)
  79743. return; // All clean. Most often case.
  79744. var newBuf = new Buffer(10), j = 0;
  79745. if (this.seqObj) { // We're in the sequence.
  79746. var dbcsCode = this.seqObj[DEF_CHAR];
  79747. if (dbcsCode !== undefined) { // Write beginning of the sequence.
  79748. if (dbcsCode < 0x100) {
  79749. newBuf[j++] = dbcsCode;
  79750. }
  79751. else {
  79752. newBuf[j++] = dbcsCode >> 8; // high byte
  79753. newBuf[j++] = dbcsCode & 0xFF; // low byte
  79754. }
  79755. } else {
  79756. // See todo above.
  79757. }
  79758. this.seqObj = undefined;
  79759. }
  79760. if (this.leadSurrogate !== -1) {
  79761. // Incomplete surrogate pair - only lead surrogate found.
  79762. newBuf[j++] = this.defaultCharSingleByte;
  79763. this.leadSurrogate = -1;
  79764. }
  79765. return newBuf.slice(0, j);
  79766. }
  79767. // Export for testing
  79768. DBCSEncoder.prototype.findIdx = findIdx;
  79769. // == Decoder ==================================================================
  79770. function DBCSDecoder(options, codec) {
  79771. // Decoder state
  79772. this.nodeIdx = 0;
  79773. this.prevBuf = new Buffer(0);
  79774. // Static data
  79775. this.decodeTables = codec.decodeTables;
  79776. this.decodeTableSeq = codec.decodeTableSeq;
  79777. this.defaultCharUnicode = codec.defaultCharUnicode;
  79778. this.gb18030 = codec.gb18030;
  79779. }
  79780. DBCSDecoder.prototype.write = function(buf) {
  79781. var newBuf = new Buffer(buf.length*2),
  79782. nodeIdx = this.nodeIdx,
  79783. prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length,
  79784. seqStart = -this.prevBuf.length, // idx of the start of current parsed sequence.
  79785. uCode;
  79786. if (prevBufOffset > 0) // Make prev buf overlap a little to make it easier to slice later.
  79787. prevBuf = Buffer.concat([prevBuf, buf.slice(0, 10)]);
  79788. for (var i = 0, j = 0; i < buf.length; i++) {
  79789. var curByte = (i >= 0) ? buf[i] : prevBuf[i + prevBufOffset];
  79790. // Lookup in current trie node.
  79791. var uCode = this.decodeTables[nodeIdx][curByte];
  79792. if (uCode >= 0) {
  79793. // Normal character, just use it.
  79794. }
  79795. else if (uCode === UNASSIGNED) { // Unknown char.
  79796. // TODO: Callback with seq.
  79797. //var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset);
  79798. i = seqStart; // Try to parse again, after skipping first byte of the sequence ('i' will be incremented by 'for' cycle).
  79799. uCode = this.defaultCharUnicode.charCodeAt(0);
  79800. }
  79801. else if (uCode === GB18030_CODE) {
  79802. var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset);
  79803. var ptr = (curSeq[0]-0x81)*12600 + (curSeq[1]-0x30)*1260 + (curSeq[2]-0x81)*10 + (curSeq[3]-0x30);
  79804. var idx = findIdx(this.gb18030.gbChars, ptr);
  79805. uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx];
  79806. }
  79807. else if (uCode <= NODE_START) { // Go to next trie node.
  79808. nodeIdx = NODE_START - uCode;
  79809. continue;
  79810. }
  79811. else if (uCode <= SEQ_START) { // Output a sequence of chars.
  79812. var seq = this.decodeTableSeq[SEQ_START - uCode];
  79813. for (var k = 0; k < seq.length - 1; k++) {
  79814. uCode = seq[k];
  79815. newBuf[j++] = uCode & 0xFF;
  79816. newBuf[j++] = uCode >> 8;
  79817. }
  79818. uCode = seq[seq.length-1];
  79819. }
  79820. else
  79821. throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte);
  79822. // Write the character to buffer, handling higher planes using surrogate pair.
  79823. if (uCode > 0xFFFF) {
  79824. uCode -= 0x10000;
  79825. var uCodeLead = 0xD800 + Math.floor(uCode / 0x400);
  79826. newBuf[j++] = uCodeLead & 0xFF;
  79827. newBuf[j++] = uCodeLead >> 8;
  79828. uCode = 0xDC00 + uCode % 0x400;
  79829. }
  79830. newBuf[j++] = uCode & 0xFF;
  79831. newBuf[j++] = uCode >> 8;
  79832. // Reset trie node.
  79833. nodeIdx = 0; seqStart = i+1;
  79834. }
  79835. this.nodeIdx = nodeIdx;
  79836. this.prevBuf = (seqStart >= 0) ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset);
  79837. return newBuf.slice(0, j).toString('ucs2');
  79838. }
  79839. DBCSDecoder.prototype.end = function() {
  79840. var ret = '';
  79841. // Try to parse all remaining chars.
  79842. while (this.prevBuf.length > 0) {
  79843. // Skip 1 character in the buffer.
  79844. ret += this.defaultCharUnicode;
  79845. var buf = this.prevBuf.slice(1);
  79846. // Parse remaining as usual.
  79847. this.prevBuf = new Buffer(0);
  79848. this.nodeIdx = 0;
  79849. if (buf.length > 0)
  79850. ret += this.write(buf);
  79851. }
  79852. this.nodeIdx = 0;
  79853. return ret;
  79854. }
  79855. // Binary search for GB18030. Returns largest i such that table[i] <= val.
  79856. function findIdx(table, val) {
  79857. if (table[0] > val)
  79858. return -1;
  79859. var l = 0, r = table.length;
  79860. while (l < r-1) { // always table[l] <= val < table[r]
  79861. var mid = l + Math.floor((r-l+1)/2);
  79862. if (table[mid] <= val)
  79863. l = mid;
  79864. else
  79865. r = mid;
  79866. }
  79867. return l;
  79868. }
  79869. /***/ }),
  79870. /* 823 */
  79871. /***/ (function(module, exports, __webpack_require__) {
  79872. "use strict";
  79873. // Description of supported double byte encodings and aliases.
  79874. // Tables are not require()-d until they are needed to speed up library load.
  79875. // require()-s are direct to support Browserify.
  79876. module.exports = {
  79877. // == Japanese/ShiftJIS ====================================================
  79878. // All japanese encodings are based on JIS X set of standards:
  79879. // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF.
  79880. // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes.
  79881. // Has several variations in 1978, 1983, 1990 and 1997.
  79882. // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead.
  79883. // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233.
  79884. // 2 planes, first is superset of 0208, second - revised 0212.
  79885. // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx)
  79886. // Byte encodings are:
  79887. // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte
  79888. // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC.
  79889. // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI.
  79890. // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes.
  79891. // 0x00-0x7F - lower part of 0201
  79892. // 0x8E, 0xA1-0xDF - upper part of 0201
  79893. // (0xA1-0xFE)x2 - 0208 plane (94x94).
  79894. // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94).
  79895. // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon.
  79896. // Used as-is in ISO2022 family.
  79897. // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII,
  79898. // 0201-1976 Roman, 0208-1978, 0208-1983.
  79899. // * ISO2022-JP-1: Adds esc seq for 0212-1990.
  79900. // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7.
  79901. // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2.
  79902. // * ISO2022-JP-2004: Adds 0213-2004 Plane 1.
  79903. //
  79904. // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes.
  79905. //
  79906. // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html
  79907. 'shiftjis': {
  79908. type: '_dbcs',
  79909. table: function() { return __webpack_require__(824) },
  79910. encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E},
  79911. encodeSkipVals: [{from: 0xED40, to: 0xF940}],
  79912. },
  79913. 'csshiftjis': 'shiftjis',
  79914. 'mskanji': 'shiftjis',
  79915. 'sjis': 'shiftjis',
  79916. 'windows31j': 'shiftjis',
  79917. 'ms31j': 'shiftjis',
  79918. 'xsjis': 'shiftjis',
  79919. 'windows932': 'shiftjis',
  79920. 'ms932': 'shiftjis',
  79921. '932': 'shiftjis',
  79922. 'cp932': 'shiftjis',
  79923. 'eucjp': {
  79924. type: '_dbcs',
  79925. table: function() { return __webpack_require__(825) },
  79926. encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E},
  79927. },
  79928. // TODO: KDDI extension to Shift_JIS
  79929. // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes.
  79930. // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars.
  79931. // == Chinese/GBK ==========================================================
  79932. // http://en.wikipedia.org/wiki/GBK
  79933. // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder
  79934. // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936
  79935. 'gb2312': 'cp936',
  79936. 'gb231280': 'cp936',
  79937. 'gb23121980': 'cp936',
  79938. 'csgb2312': 'cp936',
  79939. 'csiso58gb231280': 'cp936',
  79940. 'euccn': 'cp936',
  79941. // Microsoft's CP936 is a subset and approximation of GBK.
  79942. 'windows936': 'cp936',
  79943. 'ms936': 'cp936',
  79944. '936': 'cp936',
  79945. 'cp936': {
  79946. type: '_dbcs',
  79947. table: function() { return __webpack_require__(183) },
  79948. },
  79949. // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other.
  79950. 'gbk': {
  79951. type: '_dbcs',
  79952. table: function() { return __webpack_require__(183).concat(__webpack_require__(438)) },
  79953. },
  79954. 'xgbk': 'gbk',
  79955. 'isoir58': 'gbk',
  79956. // GB18030 is an algorithmic extension of GBK.
  79957. // Main source: https://www.w3.org/TR/encoding/#gbk-encoder
  79958. // http://icu-project.org/docs/papers/gb18030.html
  79959. // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml
  79960. // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0
  79961. 'gb18030': {
  79962. type: '_dbcs',
  79963. table: function() { return __webpack_require__(183).concat(__webpack_require__(438)) },
  79964. gb18030: function() { return __webpack_require__(826) },
  79965. encodeSkipVals: [0x80],
  79966. encodeAdd: {'€': 0xA2E3},
  79967. },
  79968. 'chinese': 'gb18030',
  79969. // == Korean ===============================================================
  79970. // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same.
  79971. 'windows949': 'cp949',
  79972. 'ms949': 'cp949',
  79973. '949': 'cp949',
  79974. 'cp949': {
  79975. type: '_dbcs',
  79976. table: function() { return __webpack_require__(827) },
  79977. },
  79978. 'cseuckr': 'cp949',
  79979. 'csksc56011987': 'cp949',
  79980. 'euckr': 'cp949',
  79981. 'isoir149': 'cp949',
  79982. 'korean': 'cp949',
  79983. 'ksc56011987': 'cp949',
  79984. 'ksc56011989': 'cp949',
  79985. 'ksc5601': 'cp949',
  79986. // == Big5/Taiwan/Hong Kong ================================================
  79987. // There are lots of tables for Big5 and cp950. Please see the following links for history:
  79988. // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html
  79989. // Variations, in roughly number of defined chars:
  79990. // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT
  79991. // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/
  79992. // * Big5-2003 (Taiwan standard) almost superset of cp950.
  79993. // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers.
  79994. // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard.
  79995. // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years.
  79996. // Plus, it has 4 combining sequences.
  79997. // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299
  79998. // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way.
  79999. // Implementations are not consistent within browsers; sometimes labeled as just big5.
  80000. // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied.
  80001. // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31
  80002. // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s.
  80003. // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt
  80004. // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt
  80005. //
  80006. // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder
  80007. // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong.
  80008. 'windows950': 'cp950',
  80009. 'ms950': 'cp950',
  80010. '950': 'cp950',
  80011. 'cp950': {
  80012. type: '_dbcs',
  80013. table: function() { return __webpack_require__(439) },
  80014. },
  80015. // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus.
  80016. 'big5': 'big5hkscs',
  80017. 'big5hkscs': {
  80018. type: '_dbcs',
  80019. table: function() { return __webpack_require__(439).concat(__webpack_require__(828)) },
  80020. encodeSkipVals: [0xa2cc],
  80021. },
  80022. 'cnbig5': 'big5hkscs',
  80023. 'csbig5': 'big5hkscs',
  80024. 'xxbig5': 'big5hkscs',
  80025. };
  80026. /***/ }),
  80027. /* 824 */
  80028. /***/ (function(module, exports) {
  80029. module.exports = [["0","\u0000",128],["a1","。",62],["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"],["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"],["81b8","∈∋⊆⊇⊂⊃∪∩"],["81c8","∧∨¬⇒⇔∀∃"],["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],["81f0","ʼn♯♭♪†‡¶"],["81fc","◯"],["824f","0",9],["8260","A",25],["8281","a",25],["829f","ぁ",82],["8340","ァ",62],["8380","ム",22],["839f","Α",16,"Σ",6],["83bf","α",16,"σ",6],["8440","А",5,"ЁЖ",25],["8470","а",5,"ёж",7],["8480","о",17],["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],["8740","①",19,"Ⅰ",9],["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],["877e","㍻"],["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"],["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"],["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"],["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"],["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"],["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"],["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"],["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"],["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"],["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"],["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"],["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"],["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"],["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"],["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"],["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"],["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"],["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"],["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"],["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"],["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"],["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"],["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"],["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"],["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"],["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"],["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"],["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"],["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"],["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"],["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"],["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"],["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"],["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"],["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"],["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"],["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],["eeef","ⅰ",9,"¬¦'""],["f040","",62],["f080","",124],["f140","",62],["f180","",124],["f240","",62],["f280","",124],["f340","",62],["f380","",124],["f440","",62],["f480","",124],["f540","",62],["f580","",124],["f640","",62],["f680","",124],["f740","",62],["f780","",124],["f840","",62],["f880","",124],["f940",""],["fa40","ⅰ",9,"Ⅰ",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"],["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"],["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"],["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"],["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"]]
  80030. /***/ }),
  80031. /* 825 */
  80032. /***/ (function(module, exports) {
  80033. module.exports = [["0","\u0000",127],["8ea1","。",62],["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"],["a2a1","◆□■△▲▽▼※〒→←↑↓〓"],["a2ba","∈∋⊆⊇⊂⊃∪∩"],["a2ca","∧∨¬⇒⇔∀∃"],["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],["a2f2","ʼn♯♭♪†‡¶"],["a2fe","◯"],["a3b0","0",9],["a3c1","A",25],["a3e1","a",25],["a4a1","ぁ",82],["a5a1","ァ",85],["a6a1","Α",16,"Σ",6],["a6c1","α",16,"σ",6],["a7a1","А",5,"ЁЖ",25],["a7d1","а",5,"ёж",25],["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],["ada1","①",19,"Ⅰ",9],["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"],["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"],["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"],["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"],["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"],["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"],["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"],["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"],["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"],["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"],["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"],["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"],["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"],["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"],["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"],["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"],["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"],["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"],["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"],["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"],["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"],["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"],["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"],["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"],["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"],["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"],["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"],["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"],["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"],["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"],["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"],["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"],["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"],["f4a1","堯槇遙瑤凜熙"],["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"],["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"],["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],["fcf1","ⅰ",9,"¬¦'""],["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"],["8fa2c2","¡¦¿"],["8fa2eb","ºª©®™¤№"],["8fa6e1","ΆΈΉΊΪ"],["8fa6e7","Ό"],["8fa6e9","ΎΫ"],["8fa6ec","Ώ"],["8fa6f1","άέήίϊΐόςύϋΰώ"],["8fa7c2","Ђ",10,"ЎЏ"],["8fa7f2","ђ",10,"ўџ"],["8fa9a1","ÆĐ"],["8fa9a4","Ħ"],["8fa9a6","IJ"],["8fa9a8","ŁĿ"],["8fa9ab","ŊØŒ"],["8fa9af","ŦÞ"],["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"],["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"],["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"],["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"],["8fabbd","ġĥíìïîǐ"],["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"],["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"],["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"],["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"],["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"],["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"],["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"],["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"],["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"],["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"],["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"],["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"],["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"],["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"],["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"],["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"],["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"],["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"],["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"],["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"],["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"],["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"],["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"],["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"],["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"],["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"],["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"],["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"],["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"],["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"],["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"],["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"],["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"],["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"],["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"],["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5],["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"],["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"],["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"],["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"],["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"],["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"],["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"],["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"],["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"],["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"],["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"],["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"],["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"],["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"],["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"],["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"],["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"],["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"],["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"],["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"],["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"],["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"],["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4],["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"],["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"],["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"],["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"]]
  80034. /***/ }),
  80035. /* 826 */
  80036. /***/ (function(module, exports) {
  80037. module.exports = {"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]}
  80038. /***/ }),
  80039. /* 827 */
  80040. /***/ (function(module, exports) {
  80041. module.exports = [["0","\u0000",127],["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"],["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"],["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"],["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5],["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"],["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18],["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7],["8361","긝",18,"긲긳긵긶긹긻긼"],["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8],["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8],["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18],["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"],["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4],["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"],["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"],["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"],["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10],["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"],["8741","놞",9,"놩",15],["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"],["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4],["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4],["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"],["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"],["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"],["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"],["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15],["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"],["8a61","둧",4,"둭",18,"뒁뒂"],["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"],["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"],["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8],["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18],["8c41","똀",15,"똒똓똕똖똗똙",4],["8c61","똞",6,"똦",5,"똭",6,"똵",5],["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16],["8d41","뛃",16,"뛕",8],["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"],["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"],["8e41","랟랡",6,"랪랮",5,"랶랷랹",8],["8e61","럂",4,"럈럊",19],["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7],["8f41","뢅",7,"뢎",17],["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4],["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5],["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"],["9061","륾",5,"릆릈릋릌릏",15],["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"],["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5],["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5],["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6],["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"],["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4],["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"],["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"],["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8],["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"],["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8],["9461","봞",5,"봥",6,"봭",12],["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24],["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"],["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"],["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14],["9641","뺸",23,"뻒뻓"],["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8],["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44],["9741","뾃",16,"뾕",8],["9761","뾞",17,"뾱",7],["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"],["9841","쁀",16,"쁒",5,"쁙쁚쁛"],["9861","쁝쁞쁟쁡",6,"쁪",15],["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"],["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"],["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"],["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"],["9a41","숤숥숦숧숪숬숮숰숳숵",16],["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"],["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"],["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8],["9b61","쌳",17,"썆",7],["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"],["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5],["9c61","쏿",8,"쐉",6,"쐑",9],["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12],["9d41","쒪",13,"쒹쒺쒻쒽",8],["9d61","쓆",25],["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"],["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"],["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"],["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"],["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"],["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"],["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"],["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"],["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13],["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"],["a141","좥좦좧좩",18,"좾좿죀죁"],["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"],["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃­―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"],["a241","줐줒",5,"줙",18],["a261","줭",6,"줵",18],["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"],["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"],["a361","즑",6,"즚즜즞",16],["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"],["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"],["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12],["a481","쨦쨧쨨쨪",28,"ㄱ",93],["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"],["a561","쩫",17,"쩾",5,"쪅쪆"],["a581","쪇",16,"쪙",14,"ⅰ",9],["a5b0","Ⅰ",9],["a5c1","Α",16,"Σ",6],["a5e1","α",16,"σ",6],["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"],["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6],["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7],["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7],["a761","쬪",22,"쭂쭃쭄"],["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"],["a841","쭭",10,"쭺",14],["a861","쮉",18,"쮝",6],["a881","쮤",19,"쮹",11,"ÆЪĦ"],["a8a6","IJ"],["a8a8","ĿŁØŒºÞŦŊ"],["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"],["a941","쯅",14,"쯕",10],["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18],["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"],["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"],["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"],["aa81","챳챴챶",29,"ぁ",82],["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"],["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5],["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85],["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"],["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4],["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25],["acd1","а",5,"ёж",25],["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7],["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"],["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"],["ae41","췆",5,"췍췎췏췑",16],["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4],["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"],["af41","츬츭츮츯츲츴츶",19],["af61","칊",13,"칚칛칝칞칢",5,"칪칬"],["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"],["b041","캚",5,"캢캦",5,"캮",12],["b061","캻",5,"컂",19],["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"],["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"],["b161","켥",6,"켮켲",5,"켹",11],["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"],["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"],["b261","쾎",18,"쾢",5,"쾩"],["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"],["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"],["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5],["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"],["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5],["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"],["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"],["b541","킕",14,"킦킧킩킪킫킭",5],["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4],["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"],["b641","턅",7,"턎",17],["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"],["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"],["b741","텮",13,"텽",6,"톅톆톇톉톊"],["b761","톋",20,"톢톣톥톦톧"],["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"],["b841","퇐",7,"퇙",17],["b861","퇫",8,"퇵퇶퇷퇹",13],["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"],["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"],["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"],["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"],["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"],["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5],["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"],["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"],["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"],["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"],["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"],["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"],["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"],["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"],["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13],["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"],["be41","퐸",7,"푁푂푃푅",14],["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"],["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"],["bf41","풞",10,"풪",14],["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"],["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"],["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5],["c061","픞",25],["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"],["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"],["c161","햌햍햎햏햑",19,"햦햧"],["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"],["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"],["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"],["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"],["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4],["c361","홢",4,"홨홪",5,"홲홳홵",11],["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"],["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"],["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4],["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"],["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"],["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4],["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"],["c641","힍힎힏힑",6,"힚힜힞",5],["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"],["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"],["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"],["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"],["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"],["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"],["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"],["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"],["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"],["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"],["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"],["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"],["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"],["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"],["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"],["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"],["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"],["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"],["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"],["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"],["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"],["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"],["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"],["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"],["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"],["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"],["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"],["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"],["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"],["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"],["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"],["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"],["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"],["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"],["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"],["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"],["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"],["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"],["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"],["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"],["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"],["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"],["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"],["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"],["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"],["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"],["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"],["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"],["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"],["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"],["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"],["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"],["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"],["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"],["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"]]
  80042. /***/ }),
  80043. /* 828 */
  80044. /***/ (function(module, exports) {
  80045. module.exports = [["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"],["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"],["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"],["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"],["88a1","ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛"],["8940","𪎩𡅅"],["8943","攊"],["8946","丽滝鵎釟"],["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"],["89a1","琑糼緍楆竉刧"],["89ab","醌碸酞肼"],["89b0","贋胶𠧧"],["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"],["89c1","溚舾甙"],["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"],["8a40","𧶄唥"],["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"],["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"],["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"],["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"],["8aac","䠋𠆩㿺塳𢶍"],["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"],["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"],["8ac9","𪘁𠸉𢫏𢳉"],["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"],["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"],["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"],["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"],["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"],["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"],["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"],["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"],["8ca1","𣏹椙橃𣱣泿"],["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"],["8cc9","顨杫䉶圽"],["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"],["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"],["8d40","𠮟"],["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"],["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"],["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"],["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"],["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"],["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"],["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"],["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"],["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"],["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"],["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"],["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"],["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"],["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"],["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"],["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"],["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"],["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"],["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"],["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"],["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"],["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"],["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"],["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"],["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"],["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"],["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"],["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"],["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"],["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"],["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"],["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"],["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"],["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"],["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"],["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"],["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"],["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"],["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"],["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"],["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"],["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"],["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"],["9fae","酙隁酜"],["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"],["9fc1","𤤙盖鮝个𠳔莾衂"],["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"],["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"],["9fe7","毺蠘罸"],["9feb","嘠𪙊蹷齓"],["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"],["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"],["a055","𡠻𦸅"],["a058","詾𢔛"],["a05b","惽癧髗鵄鍮鮏蟵"],["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"],["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"],["a0a1","嵗𨯂迚𨸹"],["a0a6","僙𡵆礆匲阸𠼻䁥"],["a0ae","矾"],["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"],["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"],["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"],["a3c0","␀",31,"␡"],["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23],["c740","す",58,"ァアィイ"],["c7a1","ゥ",81,"А",5,"ЁЖ",4],["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"],["c8a1","龰冈龱𧘇"],["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"],["c8f5","ʃɐɛɔɵœøŋʊɪ"],["f9fe","■"],["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"],["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"],["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"],["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"],["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"],["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"],["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"],["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"],["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"],["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"]]
  80046. /***/ }),
  80047. /* 829 */
  80048. /***/ (function(module, exports, __webpack_require__) {
  80049. "use strict";
  80050. var Buffer = __webpack_require__(21).Buffer,
  80051. Transform = __webpack_require__(10).Transform;
  80052. // == Exports ==================================================================
  80053. module.exports = function(iconv) {
  80054. // Additional Public API.
  80055. iconv.encodeStream = function encodeStream(encoding, options) {
  80056. return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options);
  80057. }
  80058. iconv.decodeStream = function decodeStream(encoding, options) {
  80059. return new IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options);
  80060. }
  80061. iconv.supportsStreams = true;
  80062. // Not published yet.
  80063. iconv.IconvLiteEncoderStream = IconvLiteEncoderStream;
  80064. iconv.IconvLiteDecoderStream = IconvLiteDecoderStream;
  80065. iconv._collect = IconvLiteDecoderStream.prototype.collect;
  80066. };
  80067. // == Encoder stream =======================================================
  80068. function IconvLiteEncoderStream(conv, options) {
  80069. this.conv = conv;
  80070. options = options || {};
  80071. options.decodeStrings = false; // We accept only strings, so we don't need to decode them.
  80072. Transform.call(this, options);
  80073. }
  80074. IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, {
  80075. constructor: { value: IconvLiteEncoderStream }
  80076. });
  80077. IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) {
  80078. if (typeof chunk != 'string')
  80079. return done(new Error("Iconv encoding stream needs strings as its input."));
  80080. try {
  80081. var res = this.conv.write(chunk);
  80082. if (res && res.length) this.push(res);
  80083. done();
  80084. }
  80085. catch (e) {
  80086. done(e);
  80087. }
  80088. }
  80089. IconvLiteEncoderStream.prototype._flush = function(done) {
  80090. try {
  80091. var res = this.conv.end();
  80092. if (res && res.length) this.push(res);
  80093. done();
  80094. }
  80095. catch (e) {
  80096. done(e);
  80097. }
  80098. }
  80099. IconvLiteEncoderStream.prototype.collect = function(cb) {
  80100. var chunks = [];
  80101. this.on('error', cb);
  80102. this.on('data', function(chunk) { chunks.push(chunk); });
  80103. this.on('end', function() {
  80104. cb(null, Buffer.concat(chunks));
  80105. });
  80106. return this;
  80107. }
  80108. // == Decoder stream =======================================================
  80109. function IconvLiteDecoderStream(conv, options) {
  80110. this.conv = conv;
  80111. options = options || {};
  80112. options.encoding = this.encoding = 'utf8'; // We output strings.
  80113. Transform.call(this, options);
  80114. }
  80115. IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, {
  80116. constructor: { value: IconvLiteDecoderStream }
  80117. });
  80118. IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) {
  80119. if (!Buffer.isBuffer(chunk))
  80120. return done(new Error("Iconv decoding stream needs buffers as its input."));
  80121. try {
  80122. var res = this.conv.write(chunk);
  80123. if (res && res.length) this.push(res, this.encoding);
  80124. done();
  80125. }
  80126. catch (e) {
  80127. done(e);
  80128. }
  80129. }
  80130. IconvLiteDecoderStream.prototype._flush = function(done) {
  80131. try {
  80132. var res = this.conv.end();
  80133. if (res && res.length) this.push(res, this.encoding);
  80134. done();
  80135. }
  80136. catch (e) {
  80137. done(e);
  80138. }
  80139. }
  80140. IconvLiteDecoderStream.prototype.collect = function(cb) {
  80141. var res = '';
  80142. this.on('error', cb);
  80143. this.on('data', function(chunk) { res += chunk; });
  80144. this.on('end', function() {
  80145. cb(null, res);
  80146. });
  80147. return this;
  80148. }
  80149. /***/ }),
  80150. /* 830 */
  80151. /***/ (function(module, exports, __webpack_require__) {
  80152. "use strict";
  80153. var Buffer = __webpack_require__(21).Buffer;
  80154. // == Extend Node primitives to use iconv-lite =================================
  80155. module.exports = function (iconv) {
  80156. var original = undefined; // Place to keep original methods.
  80157. // Node authors rewrote Buffer internals to make it compatible with
  80158. // Uint8Array and we cannot patch key functions since then.
  80159. iconv.supportsNodeEncodingsExtension = !(new Buffer(0) instanceof Uint8Array);
  80160. iconv.extendNodeEncodings = function extendNodeEncodings() {
  80161. if (original) return;
  80162. original = {};
  80163. if (!iconv.supportsNodeEncodingsExtension) {
  80164. console.error("ACTION NEEDED: require('iconv-lite').extendNodeEncodings() is not supported in your version of Node");
  80165. console.error("See more info at https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility");
  80166. return;
  80167. }
  80168. var nodeNativeEncodings = {
  80169. 'hex': true, 'utf8': true, 'utf-8': true, 'ascii': true, 'binary': true,
  80170. 'base64': true, 'ucs2': true, 'ucs-2': true, 'utf16le': true, 'utf-16le': true,
  80171. };
  80172. Buffer.isNativeEncoding = function(enc) {
  80173. return enc && nodeNativeEncodings[enc.toLowerCase()];
  80174. }
  80175. // -- SlowBuffer -----------------------------------------------------------
  80176. var SlowBuffer = __webpack_require__(21).SlowBuffer;
  80177. original.SlowBufferToString = SlowBuffer.prototype.toString;
  80178. SlowBuffer.prototype.toString = function(encoding, start, end) {
  80179. encoding = String(encoding || 'utf8').toLowerCase();
  80180. // Use native conversion when possible
  80181. if (Buffer.isNativeEncoding(encoding))
  80182. return original.SlowBufferToString.call(this, encoding, start, end);
  80183. // Otherwise, use our decoding method.
  80184. if (typeof start == 'undefined') start = 0;
  80185. if (typeof end == 'undefined') end = this.length;
  80186. return iconv.decode(this.slice(start, end), encoding);
  80187. }
  80188. original.SlowBufferWrite = SlowBuffer.prototype.write;
  80189. SlowBuffer.prototype.write = function(string, offset, length, encoding) {
  80190. // Support both (string, offset, length, encoding)
  80191. // and the legacy (string, encoding, offset, length)
  80192. if (isFinite(offset)) {
  80193. if (!isFinite(length)) {
  80194. encoding = length;
  80195. length = undefined;
  80196. }
  80197. } else { // legacy
  80198. var swap = encoding;
  80199. encoding = offset;
  80200. offset = length;
  80201. length = swap;
  80202. }
  80203. offset = +offset || 0;
  80204. var remaining = this.length - offset;
  80205. if (!length) {
  80206. length = remaining;
  80207. } else {
  80208. length = +length;
  80209. if (length > remaining) {
  80210. length = remaining;
  80211. }
  80212. }
  80213. encoding = String(encoding || 'utf8').toLowerCase();
  80214. // Use native conversion when possible
  80215. if (Buffer.isNativeEncoding(encoding))
  80216. return original.SlowBufferWrite.call(this, string, offset, length, encoding);
  80217. if (string.length > 0 && (length < 0 || offset < 0))
  80218. throw new RangeError('attempt to write beyond buffer bounds');
  80219. // Otherwise, use our encoding method.
  80220. var buf = iconv.encode(string, encoding);
  80221. if (buf.length < length) length = buf.length;
  80222. buf.copy(this, offset, 0, length);
  80223. return length;
  80224. }
  80225. // -- Buffer ---------------------------------------------------------------
  80226. original.BufferIsEncoding = Buffer.isEncoding;
  80227. Buffer.isEncoding = function(encoding) {
  80228. return Buffer.isNativeEncoding(encoding) || iconv.encodingExists(encoding);
  80229. }
  80230. original.BufferByteLength = Buffer.byteLength;
  80231. Buffer.byteLength = SlowBuffer.byteLength = function(str, encoding) {
  80232. encoding = String(encoding || 'utf8').toLowerCase();
  80233. // Use native conversion when possible
  80234. if (Buffer.isNativeEncoding(encoding))
  80235. return original.BufferByteLength.call(this, str, encoding);
  80236. // Slow, I know, but we don't have a better way yet.
  80237. return iconv.encode(str, encoding).length;
  80238. }
  80239. original.BufferToString = Buffer.prototype.toString;
  80240. Buffer.prototype.toString = function(encoding, start, end) {
  80241. encoding = String(encoding || 'utf8').toLowerCase();
  80242. // Use native conversion when possible
  80243. if (Buffer.isNativeEncoding(encoding))
  80244. return original.BufferToString.call(this, encoding, start, end);
  80245. // Otherwise, use our decoding method.
  80246. if (typeof start == 'undefined') start = 0;
  80247. if (typeof end == 'undefined') end = this.length;
  80248. return iconv.decode(this.slice(start, end), encoding);
  80249. }
  80250. original.BufferWrite = Buffer.prototype.write;
  80251. Buffer.prototype.write = function(string, offset, length, encoding) {
  80252. var _offset = offset, _length = length, _encoding = encoding;
  80253. // Support both (string, offset, length, encoding)
  80254. // and the legacy (string, encoding, offset, length)
  80255. if (isFinite(offset)) {
  80256. if (!isFinite(length)) {
  80257. encoding = length;
  80258. length = undefined;
  80259. }
  80260. } else { // legacy
  80261. var swap = encoding;
  80262. encoding = offset;
  80263. offset = length;
  80264. length = swap;
  80265. }
  80266. encoding = String(encoding || 'utf8').toLowerCase();
  80267. // Use native conversion when possible
  80268. if (Buffer.isNativeEncoding(encoding))
  80269. return original.BufferWrite.call(this, string, _offset, _length, _encoding);
  80270. offset = +offset || 0;
  80271. var remaining = this.length - offset;
  80272. if (!length) {
  80273. length = remaining;
  80274. } else {
  80275. length = +length;
  80276. if (length > remaining) {
  80277. length = remaining;
  80278. }
  80279. }
  80280. if (string.length > 0 && (length < 0 || offset < 0))
  80281. throw new RangeError('attempt to write beyond buffer bounds');
  80282. // Otherwise, use our encoding method.
  80283. var buf = iconv.encode(string, encoding);
  80284. if (buf.length < length) length = buf.length;
  80285. buf.copy(this, offset, 0, length);
  80286. return length;
  80287. // TODO: Set _charsWritten.
  80288. }
  80289. // -- Readable -------------------------------------------------------------
  80290. if (iconv.supportsStreams) {
  80291. var Readable = __webpack_require__(10).Readable;
  80292. original.ReadableSetEncoding = Readable.prototype.setEncoding;
  80293. Readable.prototype.setEncoding = function setEncoding(enc, options) {
  80294. // Use our own decoder, it has the same interface.
  80295. // We cannot use original function as it doesn't handle BOM-s.
  80296. this._readableState.decoder = iconv.getDecoder(enc, options);
  80297. this._readableState.encoding = enc;
  80298. }
  80299. Readable.prototype.collect = iconv._collect;
  80300. }
  80301. }
  80302. // Remove iconv-lite Node primitive extensions.
  80303. iconv.undoExtendNodeEncodings = function undoExtendNodeEncodings() {
  80304. if (!iconv.supportsNodeEncodingsExtension)
  80305. return;
  80306. if (!original)
  80307. throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.")
  80308. delete Buffer.isNativeEncoding;
  80309. var SlowBuffer = __webpack_require__(21).SlowBuffer;
  80310. SlowBuffer.prototype.toString = original.SlowBufferToString;
  80311. SlowBuffer.prototype.write = original.SlowBufferWrite;
  80312. Buffer.isEncoding = original.BufferIsEncoding;
  80313. Buffer.byteLength = original.BufferByteLength;
  80314. Buffer.prototype.toString = original.BufferToString;
  80315. Buffer.prototype.write = original.BufferWrite;
  80316. if (iconv.supportsStreams) {
  80317. var Readable = __webpack_require__(10).Readable;
  80318. Readable.prototype.setEncoding = original.ReadableSetEncoding;
  80319. delete Readable.prototype.collect;
  80320. }
  80321. original = undefined;
  80322. }
  80323. }
  80324. /***/ }),
  80325. /* 831 */
  80326. /***/ (function(module, exports, __webpack_require__) {
  80327. "use strict";
  80328. var iconv_package;
  80329. var Iconv;
  80330. try {
  80331. // this is to fool browserify so it doesn't try (in vain) to install iconv.
  80332. iconv_package = 'iconv';
  80333. Iconv = !(function webpackMissingModule() { var e = new Error("Cannot find module \".\""); e.code = 'MODULE_NOT_FOUND'; throw e; }()).Iconv;
  80334. } catch (E) {
  80335. // node-iconv not present
  80336. }
  80337. module.exports = Iconv;
  80338. /***/ }),
  80339. /* 832 */
  80340. /***/ (function(module, exports) {
  80341. function webpackEmptyContext(req) {
  80342. throw new Error("Cannot find module '" + req + "'.");
  80343. }
  80344. webpackEmptyContext.keys = function() { return []; };
  80345. webpackEmptyContext.resolve = webpackEmptyContext;
  80346. module.exports = webpackEmptyContext;
  80347. webpackEmptyContext.id = 832;
  80348. /***/ }),
  80349. /* 833 */
  80350. /***/ (function(module, exports, __webpack_require__) {
  80351. "use strict";
  80352. var isStream = module.exports = function (stream) {
  80353. return stream !== null && typeof stream === 'object' && typeof stream.pipe === 'function';
  80354. };
  80355. isStream.writable = function (stream) {
  80356. return isStream(stream) && stream.writable !== false && typeof stream._write === 'function' && typeof stream._writableState === 'object';
  80357. };
  80358. isStream.readable = function (stream) {
  80359. return isStream(stream) && stream.readable !== false && typeof stream._read === 'function' && typeof stream._readableState === 'object';
  80360. };
  80361. isStream.duplex = function (stream) {
  80362. return isStream.writable(stream) && isStream.readable(stream);
  80363. };
  80364. isStream.transform = function (stream) {
  80365. return isStream.duplex(stream) && typeof stream._transform === 'function' && typeof stream._transformState === 'object';
  80366. };
  80367. /***/ }),
  80368. /* 834 */
  80369. /***/ (function(module, exports, __webpack_require__) {
  80370. /**
  80371. * response.js
  80372. *
  80373. * Response class provides content decoding
  80374. */
  80375. var http = __webpack_require__(45);
  80376. var Headers = __webpack_require__(184);
  80377. var Body = __webpack_require__(182);
  80378. module.exports = Response;
  80379. /**
  80380. * Response class
  80381. *
  80382. * @param Stream body Readable stream
  80383. * @param Object opts Response options
  80384. * @return Void
  80385. */
  80386. function Response(body, opts) {
  80387. opts = opts || {};
  80388. this.url = opts.url;
  80389. this.status = opts.status || 200;
  80390. this.statusText = opts.statusText || http.STATUS_CODES[this.status];
  80391. this.headers = new Headers(opts.headers);
  80392. this.ok = this.status >= 200 && this.status < 300;
  80393. Body.call(this, body, opts);
  80394. }
  80395. Response.prototype = Object.create(Body.prototype);
  80396. /**
  80397. * Clone this response
  80398. *
  80399. * @return Response
  80400. */
  80401. Response.prototype.clone = function() {
  80402. return new Response(this._clone(this), {
  80403. url: this.url
  80404. , status: this.status
  80405. , statusText: this.statusText
  80406. , headers: this.headers
  80407. , ok: this.ok
  80408. });
  80409. };
  80410. /***/ }),
  80411. /* 835 */
  80412. /***/ (function(module, exports, __webpack_require__) {
  80413. /**
  80414. * request.js
  80415. *
  80416. * Request class contains server only options
  80417. */
  80418. var parse_url = __webpack_require__(14).parse;
  80419. var Headers = __webpack_require__(184);
  80420. var Body = __webpack_require__(182);
  80421. module.exports = Request;
  80422. /**
  80423. * Request class
  80424. *
  80425. * @param Mixed input Url or Request instance
  80426. * @param Object init Custom options
  80427. * @return Void
  80428. */
  80429. function Request(input, init) {
  80430. var url, url_parsed;
  80431. // normalize input
  80432. if (!(input instanceof Request)) {
  80433. url = input;
  80434. url_parsed = parse_url(url);
  80435. input = {};
  80436. } else {
  80437. url = input.url;
  80438. url_parsed = parse_url(url);
  80439. }
  80440. // normalize init
  80441. init = init || {};
  80442. // fetch spec options
  80443. this.method = init.method || input.method || 'GET';
  80444. this.redirect = init.redirect || input.redirect || 'follow';
  80445. this.headers = new Headers(init.headers || input.headers || {});
  80446. this.url = url;
  80447. // server only options
  80448. this.follow = init.follow !== undefined ?
  80449. init.follow : input.follow !== undefined ?
  80450. input.follow : 20;
  80451. this.compress = init.compress !== undefined ?
  80452. init.compress : input.compress !== undefined ?
  80453. input.compress : true;
  80454. this.counter = init.counter || input.counter || 0;
  80455. this.agent = init.agent || input.agent;
  80456. Body.call(this, init.body || this._clone(input), {
  80457. timeout: init.timeout || input.timeout || 0,
  80458. size: init.size || input.size || 0
  80459. });
  80460. // server request options
  80461. this.protocol = url_parsed.protocol;
  80462. this.hostname = url_parsed.hostname;
  80463. this.port = url_parsed.port;
  80464. this.path = url_parsed.path;
  80465. this.auth = url_parsed.auth;
  80466. }
  80467. Request.prototype = Object.create(Body.prototype);
  80468. /**
  80469. * Clone this request
  80470. *
  80471. * @return Request
  80472. */
  80473. Request.prototype.clone = function() {
  80474. return new Request(this);
  80475. };
  80476. /***/ }),
  80477. /* 836 */
  80478. /***/ (function(module, exports, __webpack_require__) {
  80479. var $export = __webpack_require__(1);
  80480. $export($export.G + $export.W + $export.F * !__webpack_require__(186).ABV, {
  80481. DataView: __webpack_require__(442).DataView
  80482. });
  80483. /***/ }),
  80484. /* 837 */
  80485. /***/ (function(module, exports, __webpack_require__) {
  80486. __webpack_require__(36)('Int8', 1, function (init) {
  80487. return function Int8Array(data, byteOffset, length) {
  80488. return init(this, data, byteOffset, length);
  80489. };
  80490. });
  80491. /***/ }),
  80492. /* 838 */
  80493. /***/ (function(module, exports, __webpack_require__) {
  80494. var dP = __webpack_require__(18);
  80495. var anObject = __webpack_require__(7);
  80496. var getKeys = __webpack_require__(76);
  80497. module.exports = __webpack_require__(22) ? Object.defineProperties : function defineProperties(O, Properties) {
  80498. anObject(O);
  80499. var keys = getKeys(Properties);
  80500. var length = keys.length;
  80501. var i = 0;
  80502. var P;
  80503. while (length > i) dP.f(O, P = keys[i++], Properties[P]);
  80504. return O;
  80505. };
  80506. /***/ }),
  80507. /* 839 */
  80508. /***/ (function(module, exports, __webpack_require__) {
  80509. // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
  80510. var speciesConstructor = __webpack_require__(840);
  80511. module.exports = function (original, length) {
  80512. return new (speciesConstructor(original))(length);
  80513. };
  80514. /***/ }),
  80515. /* 840 */
  80516. /***/ (function(module, exports, __webpack_require__) {
  80517. var isObject = __webpack_require__(8);
  80518. var isArray = __webpack_require__(446);
  80519. var SPECIES = __webpack_require__(11)('species');
  80520. module.exports = function (original) {
  80521. var C;
  80522. if (isArray(original)) {
  80523. C = original.constructor;
  80524. // cross-realm fallback
  80525. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  80526. if (isObject(C)) {
  80527. C = C[SPECIES];
  80528. if (C === null) C = undefined;
  80529. }
  80530. } return C === undefined ? Array : C;
  80531. };
  80532. /***/ }),
  80533. /* 841 */
  80534. /***/ (function(module, exports, __webpack_require__) {
  80535. "use strict";
  80536. var create = __webpack_require__(100);
  80537. var descriptor = __webpack_require__(52);
  80538. var setToStringTag = __webpack_require__(74);
  80539. var IteratorPrototype = {};
  80540. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  80541. __webpack_require__(27)(IteratorPrototype, __webpack_require__(11)('iterator'), function () { return this; });
  80542. module.exports = function (Constructor, NAME, next) {
  80543. Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
  80544. setToStringTag(Constructor, NAME + ' Iterator');
  80545. };
  80546. /***/ }),
  80547. /* 842 */
  80548. /***/ (function(module, exports, __webpack_require__) {
  80549. __webpack_require__(36)('Uint8', 1, function (init) {
  80550. return function Uint8Array(data, byteOffset, length) {
  80551. return init(this, data, byteOffset, length);
  80552. };
  80553. });
  80554. /***/ }),
  80555. /* 843 */
  80556. /***/ (function(module, exports, __webpack_require__) {
  80557. __webpack_require__(36)('Uint8', 1, function (init) {
  80558. return function Uint8ClampedArray(data, byteOffset, length) {
  80559. return init(this, data, byteOffset, length);
  80560. };
  80561. }, true);
  80562. /***/ }),
  80563. /* 844 */
  80564. /***/ (function(module, exports, __webpack_require__) {
  80565. __webpack_require__(36)('Int16', 2, function (init) {
  80566. return function Int16Array(data, byteOffset, length) {
  80567. return init(this, data, byteOffset, length);
  80568. };
  80569. });
  80570. /***/ }),
  80571. /* 845 */
  80572. /***/ (function(module, exports, __webpack_require__) {
  80573. __webpack_require__(36)('Uint16', 2, function (init) {
  80574. return function Uint16Array(data, byteOffset, length) {
  80575. return init(this, data, byteOffset, length);
  80576. };
  80577. });
  80578. /***/ }),
  80579. /* 846 */
  80580. /***/ (function(module, exports, __webpack_require__) {
  80581. __webpack_require__(36)('Int32', 4, function (init) {
  80582. return function Int32Array(data, byteOffset, length) {
  80583. return init(this, data, byteOffset, length);
  80584. };
  80585. });
  80586. /***/ }),
  80587. /* 847 */
  80588. /***/ (function(module, exports, __webpack_require__) {
  80589. __webpack_require__(36)('Uint32', 4, function (init) {
  80590. return function Uint32Array(data, byteOffset, length) {
  80591. return init(this, data, byteOffset, length);
  80592. };
  80593. });
  80594. /***/ }),
  80595. /* 848 */
  80596. /***/ (function(module, exports, __webpack_require__) {
  80597. __webpack_require__(36)('Float32', 4, function (init) {
  80598. return function Float32Array(data, byteOffset, length) {
  80599. return init(this, data, byteOffset, length);
  80600. };
  80601. });
  80602. /***/ }),
  80603. /* 849 */
  80604. /***/ (function(module, exports, __webpack_require__) {
  80605. __webpack_require__(36)('Float64', 8, function (init) {
  80606. return function Float64Array(data, byteOffset, length) {
  80607. return init(this, data, byteOffset, length);
  80608. };
  80609. });
  80610. /***/ }),
  80611. /* 850 */
  80612. /***/ (function(module, exports, __webpack_require__) {
  80613. "use strict";
  80614. var strong = __webpack_require__(451);
  80615. var validate = __webpack_require__(78);
  80616. var MAP = 'Map';
  80617. // 23.1 Map Objects
  80618. module.exports = __webpack_require__(138)(MAP, function (get) {
  80619. return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
  80620. }, {
  80621. // 23.1.3.6 Map.prototype.get(key)
  80622. get: function get(key) {
  80623. var entry = strong.getEntry(validate(this, MAP), key);
  80624. return entry && entry.v;
  80625. },
  80626. // 23.1.3.9 Map.prototype.set(key, value)
  80627. set: function set(key, value) {
  80628. return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);
  80629. }
  80630. }, strong, true);
  80631. /***/ }),
  80632. /* 851 */
  80633. /***/ (function(module, exports, __webpack_require__) {
  80634. var isObject = __webpack_require__(8);
  80635. var setPrototypeOf = __webpack_require__(198).set;
  80636. module.exports = function (that, target, C) {
  80637. var S = target.constructor;
  80638. var P;
  80639. if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
  80640. setPrototypeOf(that, P);
  80641. } return that;
  80642. };
  80643. /***/ }),
  80644. /* 852 */
  80645. /***/ (function(module, exports, __webpack_require__) {
  80646. "use strict";
  80647. var strong = __webpack_require__(451);
  80648. var validate = __webpack_require__(78);
  80649. var SET = 'Set';
  80650. // 23.2 Set Objects
  80651. module.exports = __webpack_require__(138)(SET, function (get) {
  80652. return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
  80653. }, {
  80654. // 23.2.3.1 Set.prototype.add(value)
  80655. add: function add(value) {
  80656. return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);
  80657. }
  80658. }, strong);
  80659. /***/ }),
  80660. /* 853 */
  80661. /***/ (function(module, exports, __webpack_require__) {
  80662. "use strict";
  80663. var each = __webpack_require__(102)(0);
  80664. var redefine = __webpack_require__(41);
  80665. var meta = __webpack_require__(104);
  80666. var assign = __webpack_require__(453);
  80667. var weak = __webpack_require__(454);
  80668. var isObject = __webpack_require__(8);
  80669. var fails = __webpack_require__(13);
  80670. var validate = __webpack_require__(78);
  80671. var WEAK_MAP = 'WeakMap';
  80672. var getWeak = meta.getWeak;
  80673. var isExtensible = Object.isExtensible;
  80674. var uncaughtFrozenStore = weak.ufstore;
  80675. var tmp = {};
  80676. var InternalMap;
  80677. var wrapper = function (get) {
  80678. return function WeakMap() {
  80679. return get(this, arguments.length > 0 ? arguments[0] : undefined);
  80680. };
  80681. };
  80682. var methods = {
  80683. // 23.3.3.3 WeakMap.prototype.get(key)
  80684. get: function get(key) {
  80685. if (isObject(key)) {
  80686. var data = getWeak(key);
  80687. if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);
  80688. return data ? data[this._i] : undefined;
  80689. }
  80690. },
  80691. // 23.3.3.5 WeakMap.prototype.set(key, value)
  80692. set: function set(key, value) {
  80693. return weak.def(validate(this, WEAK_MAP), key, value);
  80694. }
  80695. };
  80696. // 23.3 WeakMap Objects
  80697. var $WeakMap = module.exports = __webpack_require__(138)(WEAK_MAP, wrapper, methods, weak, true, true);
  80698. // IE11 WeakMap frozen keys fix
  80699. if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) {
  80700. InternalMap = weak.getConstructor(wrapper, WEAK_MAP);
  80701. assign(InternalMap.prototype, methods);
  80702. meta.NEED = true;
  80703. each(['delete', 'has', 'get', 'set'], function (key) {
  80704. var proto = $WeakMap.prototype;
  80705. var method = proto[key];
  80706. redefine(proto, key, function (a, b) {
  80707. // store frozen objects on internal weakmap shim
  80708. if (isObject(a) && !isExtensible(a)) {
  80709. if (!this._f) this._f = new InternalMap();
  80710. var result = this._f[key](a, b);
  80711. return key == 'set' ? this : result;
  80712. // store all the rest on native weakmap
  80713. } return method.call(this, a, b);
  80714. });
  80715. });
  80716. }
  80717. /***/ }),
  80718. /* 854 */
  80719. /***/ (function(module, exports, __webpack_require__) {
  80720. "use strict";
  80721. var weak = __webpack_require__(454);
  80722. var validate = __webpack_require__(78);
  80723. var WEAK_SET = 'WeakSet';
  80724. // 23.4 WeakSet Objects
  80725. __webpack_require__(138)(WEAK_SET, function (get) {
  80726. return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
  80727. }, {
  80728. // 23.4.3.1 WeakSet.prototype.add(value)
  80729. add: function add(value) {
  80730. return weak.def(validate(this, WEAK_SET), value, true);
  80731. }
  80732. }, weak, false, true);
  80733. /***/ }),
  80734. /* 855 */
  80735. /***/ (function(module, exports, __webpack_require__) {
  80736. // 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
  80737. var $export = __webpack_require__(1);
  80738. var aFunction = __webpack_require__(54);
  80739. var anObject = __webpack_require__(7);
  80740. var rApply = (__webpack_require__(6).Reflect || {}).apply;
  80741. var fApply = Function.apply;
  80742. // MS Edge argumentsList argument is optional
  80743. $export($export.S + $export.F * !__webpack_require__(13)(function () {
  80744. rApply(function () { /* empty */ });
  80745. }), 'Reflect', {
  80746. apply: function apply(target, thisArgument, argumentsList) {
  80747. var T = aFunction(target);
  80748. var L = anObject(argumentsList);
  80749. return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
  80750. }
  80751. });
  80752. /***/ }),
  80753. /* 856 */
  80754. /***/ (function(module, exports, __webpack_require__) {
  80755. // 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
  80756. var $export = __webpack_require__(1);
  80757. var create = __webpack_require__(100);
  80758. var aFunction = __webpack_require__(54);
  80759. var anObject = __webpack_require__(7);
  80760. var isObject = __webpack_require__(8);
  80761. var fails = __webpack_require__(13);
  80762. var bind = __webpack_require__(857);
  80763. var rConstruct = (__webpack_require__(6).Reflect || {}).construct;
  80764. // MS Edge supports only 2 arguments and argumentsList argument is optional
  80765. // FF Nightly sets third argument as `new.target`, but does not create `this` from it
  80766. var NEW_TARGET_BUG = fails(function () {
  80767. function F() { /* empty */ }
  80768. return !(rConstruct(function () { /* empty */ }, [], F) instanceof F);
  80769. });
  80770. var ARGS_BUG = !fails(function () {
  80771. rConstruct(function () { /* empty */ });
  80772. });
  80773. $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
  80774. construct: function construct(Target, args /* , newTarget */) {
  80775. aFunction(Target);
  80776. anObject(args);
  80777. var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
  80778. if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget);
  80779. if (Target == newTarget) {
  80780. // w/o altered newTarget, optimization for 0-4 arguments
  80781. switch (args.length) {
  80782. case 0: return new Target();
  80783. case 1: return new Target(args[0]);
  80784. case 2: return new Target(args[0], args[1]);
  80785. case 3: return new Target(args[0], args[1], args[2]);
  80786. case 4: return new Target(args[0], args[1], args[2], args[3]);
  80787. }
  80788. // w/o altered newTarget, lot of arguments case
  80789. var $args = [null];
  80790. $args.push.apply($args, args);
  80791. return new (bind.apply(Target, $args))();
  80792. }
  80793. // with altered newTarget, not support built-in constructors
  80794. var proto = newTarget.prototype;
  80795. var instance = create(isObject(proto) ? proto : Object.prototype);
  80796. var result = Function.apply.call(Target, instance, args);
  80797. return isObject(result) ? result : instance;
  80798. }
  80799. });
  80800. /***/ }),
  80801. /* 857 */
  80802. /***/ (function(module, exports, __webpack_require__) {
  80803. "use strict";
  80804. var aFunction = __webpack_require__(54);
  80805. var isObject = __webpack_require__(8);
  80806. var invoke = __webpack_require__(455);
  80807. var arraySlice = [].slice;
  80808. var factories = {};
  80809. var construct = function (F, len, args) {
  80810. if (!(len in factories)) {
  80811. for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']';
  80812. // eslint-disable-next-line no-new-func
  80813. factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
  80814. } return factories[len](F, args);
  80815. };
  80816. module.exports = Function.bind || function bind(that /* , ...args */) {
  80817. var fn = aFunction(this);
  80818. var partArgs = arraySlice.call(arguments, 1);
  80819. var bound = function (/* args... */) {
  80820. var args = partArgs.concat(arraySlice.call(arguments));
  80821. return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
  80822. };
  80823. if (isObject(fn.prototype)) bound.prototype = fn.prototype;
  80824. return bound;
  80825. };
  80826. /***/ }),
  80827. /* 858 */
  80828. /***/ (function(module, exports, __webpack_require__) {
  80829. // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
  80830. var dP = __webpack_require__(18);
  80831. var $export = __webpack_require__(1);
  80832. var anObject = __webpack_require__(7);
  80833. var toPrimitive = __webpack_require__(97);
  80834. // MS Edge has broken Reflect.defineProperty - throwing instead of returning false
  80835. $export($export.S + $export.F * __webpack_require__(13)(function () {
  80836. // eslint-disable-next-line no-undef
  80837. Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 });
  80838. }), 'Reflect', {
  80839. defineProperty: function defineProperty(target, propertyKey, attributes) {
  80840. anObject(target);
  80841. propertyKey = toPrimitive(propertyKey, true);
  80842. anObject(attributes);
  80843. try {
  80844. dP.f(target, propertyKey, attributes);
  80845. return true;
  80846. } catch (e) {
  80847. return false;
  80848. }
  80849. }
  80850. });
  80851. /***/ }),
  80852. /* 859 */
  80853. /***/ (function(module, exports, __webpack_require__) {
  80854. // 26.1.4 Reflect.deleteProperty(target, propertyKey)
  80855. var $export = __webpack_require__(1);
  80856. var gOPD = __webpack_require__(42).f;
  80857. var anObject = __webpack_require__(7);
  80858. $export($export.S, 'Reflect', {
  80859. deleteProperty: function deleteProperty(target, propertyKey) {
  80860. var desc = gOPD(anObject(target), propertyKey);
  80861. return desc && !desc.configurable ? false : delete target[propertyKey];
  80862. }
  80863. });
  80864. /***/ }),
  80865. /* 860 */
  80866. /***/ (function(module, exports, __webpack_require__) {
  80867. // 26.1.6 Reflect.get(target, propertyKey [, receiver])
  80868. var gOPD = __webpack_require__(42);
  80869. var getPrototypeOf = __webpack_require__(101);
  80870. var has = __webpack_require__(23);
  80871. var $export = __webpack_require__(1);
  80872. var isObject = __webpack_require__(8);
  80873. var anObject = __webpack_require__(7);
  80874. function get(target, propertyKey /* , receiver */) {
  80875. var receiver = arguments.length < 3 ? target : arguments[2];
  80876. var desc, proto;
  80877. if (anObject(target) === receiver) return target[propertyKey];
  80878. if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value')
  80879. ? desc.value
  80880. : desc.get !== undefined
  80881. ? desc.get.call(receiver)
  80882. : undefined;
  80883. if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver);
  80884. }
  80885. $export($export.S, 'Reflect', { get: get });
  80886. /***/ }),
  80887. /* 861 */
  80888. /***/ (function(module, exports, __webpack_require__) {
  80889. // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
  80890. var gOPD = __webpack_require__(42);
  80891. var $export = __webpack_require__(1);
  80892. var anObject = __webpack_require__(7);
  80893. $export($export.S, 'Reflect', {
  80894. getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
  80895. return gOPD.f(anObject(target), propertyKey);
  80896. }
  80897. });
  80898. /***/ }),
  80899. /* 862 */
  80900. /***/ (function(module, exports, __webpack_require__) {
  80901. // 26.1.8 Reflect.getPrototypeOf(target)
  80902. var $export = __webpack_require__(1);
  80903. var getProto = __webpack_require__(101);
  80904. var anObject = __webpack_require__(7);
  80905. $export($export.S, 'Reflect', {
  80906. getPrototypeOf: function getPrototypeOf(target) {
  80907. return getProto(anObject(target));
  80908. }
  80909. });
  80910. /***/ }),
  80911. /* 863 */
  80912. /***/ (function(module, exports, __webpack_require__) {
  80913. // 26.1.9 Reflect.has(target, propertyKey)
  80914. var $export = __webpack_require__(1);
  80915. $export($export.S, 'Reflect', {
  80916. has: function has(target, propertyKey) {
  80917. return propertyKey in target;
  80918. }
  80919. });
  80920. /***/ }),
  80921. /* 864 */
  80922. /***/ (function(module, exports, __webpack_require__) {
  80923. // 26.1.10 Reflect.isExtensible(target)
  80924. var $export = __webpack_require__(1);
  80925. var anObject = __webpack_require__(7);
  80926. var $isExtensible = Object.isExtensible;
  80927. $export($export.S, 'Reflect', {
  80928. isExtensible: function isExtensible(target) {
  80929. anObject(target);
  80930. return $isExtensible ? $isExtensible(target) : true;
  80931. }
  80932. });
  80933. /***/ }),
  80934. /* 865 */
  80935. /***/ (function(module, exports, __webpack_require__) {
  80936. // 26.1.11 Reflect.ownKeys(target)
  80937. var $export = __webpack_require__(1);
  80938. $export($export.S, 'Reflect', { ownKeys: __webpack_require__(456) });
  80939. /***/ }),
  80940. /* 866 */
  80941. /***/ (function(module, exports, __webpack_require__) {
  80942. // 26.1.12 Reflect.preventExtensions(target)
  80943. var $export = __webpack_require__(1);
  80944. var anObject = __webpack_require__(7);
  80945. var $preventExtensions = Object.preventExtensions;
  80946. $export($export.S, 'Reflect', {
  80947. preventExtensions: function preventExtensions(target) {
  80948. anObject(target);
  80949. try {
  80950. if ($preventExtensions) $preventExtensions(target);
  80951. return true;
  80952. } catch (e) {
  80953. return false;
  80954. }
  80955. }
  80956. });
  80957. /***/ }),
  80958. /* 867 */
  80959. /***/ (function(module, exports, __webpack_require__) {
  80960. // 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
  80961. var dP = __webpack_require__(18);
  80962. var gOPD = __webpack_require__(42);
  80963. var getPrototypeOf = __webpack_require__(101);
  80964. var has = __webpack_require__(23);
  80965. var $export = __webpack_require__(1);
  80966. var createDesc = __webpack_require__(52);
  80967. var anObject = __webpack_require__(7);
  80968. var isObject = __webpack_require__(8);
  80969. function set(target, propertyKey, V /* , receiver */) {
  80970. var receiver = arguments.length < 4 ? target : arguments[3];
  80971. var ownDesc = gOPD.f(anObject(target), propertyKey);
  80972. var existingDescriptor, proto;
  80973. if (!ownDesc) {
  80974. if (isObject(proto = getPrototypeOf(target))) {
  80975. return set(proto, propertyKey, V, receiver);
  80976. }
  80977. ownDesc = createDesc(0);
  80978. }
  80979. if (has(ownDesc, 'value')) {
  80980. if (ownDesc.writable === false || !isObject(receiver)) return false;
  80981. existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0);
  80982. existingDescriptor.value = V;
  80983. dP.f(receiver, propertyKey, existingDescriptor);
  80984. return true;
  80985. }
  80986. return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
  80987. }
  80988. $export($export.S, 'Reflect', { set: set });
  80989. /***/ }),
  80990. /* 868 */
  80991. /***/ (function(module, exports, __webpack_require__) {
  80992. // 26.1.14 Reflect.setPrototypeOf(target, proto)
  80993. var $export = __webpack_require__(1);
  80994. var setProto = __webpack_require__(198);
  80995. if (setProto) $export($export.S, 'Reflect', {
  80996. setPrototypeOf: function setPrototypeOf(target, proto) {
  80997. setProto.check(target, proto);
  80998. try {
  80999. setProto.set(target, proto);
  81000. return true;
  81001. } catch (e) {
  81002. return false;
  81003. }
  81004. }
  81005. });
  81006. /***/ }),
  81007. /* 869 */
  81008. /***/ (function(module, exports, __webpack_require__) {
  81009. "use strict";
  81010. var LIBRARY = __webpack_require__(70);
  81011. var global = __webpack_require__(6);
  81012. var ctx = __webpack_require__(34);
  81013. var classof = __webpack_require__(193);
  81014. var $export = __webpack_require__(1);
  81015. var isObject = __webpack_require__(8);
  81016. var aFunction = __webpack_require__(54);
  81017. var anInstance = __webpack_require__(72);
  81018. var forOf = __webpack_require__(137);
  81019. var speciesConstructor = __webpack_require__(447);
  81020. var task = __webpack_require__(199).set;
  81021. var microtask = __webpack_require__(870)();
  81022. var newPromiseCapabilityModule = __webpack_require__(457);
  81023. var perform = __webpack_require__(871);
  81024. var promiseResolve = __webpack_require__(872);
  81025. var PROMISE = 'Promise';
  81026. var TypeError = global.TypeError;
  81027. var process = global.process;
  81028. var $Promise = global[PROMISE];
  81029. var isNode = classof(process) == 'process';
  81030. var empty = function () { /* empty */ };
  81031. var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
  81032. var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
  81033. var USE_NATIVE = !!function () {
  81034. try {
  81035. // correct subclassing with @@species support
  81036. var promise = $Promise.resolve(1);
  81037. var FakePromise = (promise.constructor = {})[__webpack_require__(11)('species')] = function (exec) {
  81038. exec(empty, empty);
  81039. };
  81040. // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
  81041. return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;
  81042. } catch (e) { /* empty */ }
  81043. }();
  81044. // helpers
  81045. var isThenable = function (it) {
  81046. var then;
  81047. return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
  81048. };
  81049. var notify = function (promise, isReject) {
  81050. if (promise._n) return;
  81051. promise._n = true;
  81052. var chain = promise._c;
  81053. microtask(function () {
  81054. var value = promise._v;
  81055. var ok = promise._s == 1;
  81056. var i = 0;
  81057. var run = function (reaction) {
  81058. var handler = ok ? reaction.ok : reaction.fail;
  81059. var resolve = reaction.resolve;
  81060. var reject = reaction.reject;
  81061. var domain = reaction.domain;
  81062. var result, then;
  81063. try {
  81064. if (handler) {
  81065. if (!ok) {
  81066. if (promise._h == 2) onHandleUnhandled(promise);
  81067. promise._h = 1;
  81068. }
  81069. if (handler === true) result = value;
  81070. else {
  81071. if (domain) domain.enter();
  81072. result = handler(value);
  81073. if (domain) domain.exit();
  81074. }
  81075. if (result === reaction.promise) {
  81076. reject(TypeError('Promise-chain cycle'));
  81077. } else if (then = isThenable(result)) {
  81078. then.call(result, resolve, reject);
  81079. } else resolve(result);
  81080. } else reject(value);
  81081. } catch (e) {
  81082. reject(e);
  81083. }
  81084. };
  81085. while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
  81086. promise._c = [];
  81087. promise._n = false;
  81088. if (isReject && !promise._h) onUnhandled(promise);
  81089. });
  81090. };
  81091. var onUnhandled = function (promise) {
  81092. task.call(global, function () {
  81093. var value = promise._v;
  81094. var unhandled = isUnhandled(promise);
  81095. var result, handler, console;
  81096. if (unhandled) {
  81097. result = perform(function () {
  81098. if (isNode) {
  81099. process.emit('unhandledRejection', value, promise);
  81100. } else if (handler = global.onunhandledrejection) {
  81101. handler({ promise: promise, reason: value });
  81102. } else if ((console = global.console) && console.error) {
  81103. console.error('Unhandled promise rejection', value);
  81104. }
  81105. });
  81106. // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
  81107. promise._h = isNode || isUnhandled(promise) ? 2 : 1;
  81108. } promise._a = undefined;
  81109. if (unhandled && result.e) throw result.v;
  81110. });
  81111. };
  81112. var isUnhandled = function (promise) {
  81113. return promise._h !== 1 && (promise._a || promise._c).length === 0;
  81114. };
  81115. var onHandleUnhandled = function (promise) {
  81116. task.call(global, function () {
  81117. var handler;
  81118. if (isNode) {
  81119. process.emit('rejectionHandled', promise);
  81120. } else if (handler = global.onrejectionhandled) {
  81121. handler({ promise: promise, reason: promise._v });
  81122. }
  81123. });
  81124. };
  81125. var $reject = function (value) {
  81126. var promise = this;
  81127. if (promise._d) return;
  81128. promise._d = true;
  81129. promise = promise._w || promise; // unwrap
  81130. promise._v = value;
  81131. promise._s = 2;
  81132. if (!promise._a) promise._a = promise._c.slice();
  81133. notify(promise, true);
  81134. };
  81135. var $resolve = function (value) {
  81136. var promise = this;
  81137. var then;
  81138. if (promise._d) return;
  81139. promise._d = true;
  81140. promise = promise._w || promise; // unwrap
  81141. try {
  81142. if (promise === value) throw TypeError("Promise can't be resolved itself");
  81143. if (then = isThenable(value)) {
  81144. microtask(function () {
  81145. var wrapper = { _w: promise, _d: false }; // wrap
  81146. try {
  81147. then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
  81148. } catch (e) {
  81149. $reject.call(wrapper, e);
  81150. }
  81151. });
  81152. } else {
  81153. promise._v = value;
  81154. promise._s = 1;
  81155. notify(promise, false);
  81156. }
  81157. } catch (e) {
  81158. $reject.call({ _w: promise, _d: false }, e); // wrap
  81159. }
  81160. };
  81161. // constructor polyfill
  81162. if (!USE_NATIVE) {
  81163. // 25.4.3.1 Promise(executor)
  81164. $Promise = function Promise(executor) {
  81165. anInstance(this, $Promise, PROMISE, '_h');
  81166. aFunction(executor);
  81167. Internal.call(this);
  81168. try {
  81169. executor(ctx($resolve, this, 1), ctx($reject, this, 1));
  81170. } catch (err) {
  81171. $reject.call(this, err);
  81172. }
  81173. };
  81174. // eslint-disable-next-line no-unused-vars
  81175. Internal = function Promise(executor) {
  81176. this._c = []; // <- awaiting reactions
  81177. this._a = undefined; // <- checked in isUnhandled reactions
  81178. this._s = 0; // <- state
  81179. this._d = false; // <- done
  81180. this._v = undefined; // <- value
  81181. this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
  81182. this._n = false; // <- notify
  81183. };
  81184. Internal.prototype = __webpack_require__(71)($Promise.prototype, {
  81185. // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
  81186. then: function then(onFulfilled, onRejected) {
  81187. var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
  81188. reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
  81189. reaction.fail = typeof onRejected == 'function' && onRejected;
  81190. reaction.domain = isNode ? process.domain : undefined;
  81191. this._c.push(reaction);
  81192. if (this._a) this._a.push(reaction);
  81193. if (this._s) notify(this, false);
  81194. return reaction.promise;
  81195. },
  81196. // 25.4.5.1 Promise.prototype.catch(onRejected)
  81197. 'catch': function (onRejected) {
  81198. return this.then(undefined, onRejected);
  81199. }
  81200. });
  81201. OwnPromiseCapability = function () {
  81202. var promise = new Internal();
  81203. this.promise = promise;
  81204. this.resolve = ctx($resolve, promise, 1);
  81205. this.reject = ctx($reject, promise, 1);
  81206. };
  81207. newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
  81208. return C === $Promise || C === Wrapper
  81209. ? new OwnPromiseCapability(C)
  81210. : newGenericPromiseCapability(C);
  81211. };
  81212. }
  81213. $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });
  81214. __webpack_require__(74)($Promise, PROMISE);
  81215. __webpack_require__(197)(PROMISE);
  81216. Wrapper = __webpack_require__(96)[PROMISE];
  81217. // statics
  81218. $export($export.S + $export.F * !USE_NATIVE, PROMISE, {
  81219. // 25.4.4.5 Promise.reject(r)
  81220. reject: function reject(r) {
  81221. var capability = newPromiseCapability(this);
  81222. var $$reject = capability.reject;
  81223. $$reject(r);
  81224. return capability.promise;
  81225. }
  81226. });
  81227. $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
  81228. // 25.4.4.6 Promise.resolve(x)
  81229. resolve: function resolve(x) {
  81230. return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);
  81231. }
  81232. });
  81233. $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(136)(function (iter) {
  81234. $Promise.all(iter)['catch'](empty);
  81235. })), PROMISE, {
  81236. // 25.4.4.1 Promise.all(iterable)
  81237. all: function all(iterable) {
  81238. var C = this;
  81239. var capability = newPromiseCapability(C);
  81240. var resolve = capability.resolve;
  81241. var reject = capability.reject;
  81242. var result = perform(function () {
  81243. var values = [];
  81244. var index = 0;
  81245. var remaining = 1;
  81246. forOf(iterable, false, function (promise) {
  81247. var $index = index++;
  81248. var alreadyCalled = false;
  81249. values.push(undefined);
  81250. remaining++;
  81251. C.resolve(promise).then(function (value) {
  81252. if (alreadyCalled) return;
  81253. alreadyCalled = true;
  81254. values[$index] = value;
  81255. --remaining || resolve(values);
  81256. }, reject);
  81257. });
  81258. --remaining || resolve(values);
  81259. });
  81260. if (result.e) reject(result.v);
  81261. return capability.promise;
  81262. },
  81263. // 25.4.4.4 Promise.race(iterable)
  81264. race: function race(iterable) {
  81265. var C = this;
  81266. var capability = newPromiseCapability(C);
  81267. var reject = capability.reject;
  81268. var result = perform(function () {
  81269. forOf(iterable, false, function (promise) {
  81270. C.resolve(promise).then(capability.resolve, reject);
  81271. });
  81272. });
  81273. if (result.e) reject(result.v);
  81274. return capability.promise;
  81275. }
  81276. });
  81277. /***/ }),
  81278. /* 870 */
  81279. /***/ (function(module, exports, __webpack_require__) {
  81280. var global = __webpack_require__(6);
  81281. var macrotask = __webpack_require__(199).set;
  81282. var Observer = global.MutationObserver || global.WebKitMutationObserver;
  81283. var process = global.process;
  81284. var Promise = global.Promise;
  81285. var isNode = __webpack_require__(73)(process) == 'process';
  81286. module.exports = function () {
  81287. var head, last, notify;
  81288. var flush = function () {
  81289. var parent, fn;
  81290. if (isNode && (parent = process.domain)) parent.exit();
  81291. while (head) {
  81292. fn = head.fn;
  81293. head = head.next;
  81294. try {
  81295. fn();
  81296. } catch (e) {
  81297. if (head) notify();
  81298. else last = undefined;
  81299. throw e;
  81300. }
  81301. } last = undefined;
  81302. if (parent) parent.enter();
  81303. };
  81304. // Node.js
  81305. if (isNode) {
  81306. notify = function () {
  81307. process.nextTick(flush);
  81308. };
  81309. // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339
  81310. } else if (Observer && !(global.navigator && global.navigator.standalone)) {
  81311. var toggle = true;
  81312. var node = document.createTextNode('');
  81313. new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
  81314. notify = function () {
  81315. node.data = toggle = !toggle;
  81316. };
  81317. // environments with maybe non-completely correct, but existent Promise
  81318. } else if (Promise && Promise.resolve) {
  81319. var promise = Promise.resolve();
  81320. notify = function () {
  81321. promise.then(flush);
  81322. };
  81323. // for other environments - macrotask based on:
  81324. // - setImmediate
  81325. // - MessageChannel
  81326. // - window.postMessag
  81327. // - onreadystatechange
  81328. // - setTimeout
  81329. } else {
  81330. notify = function () {
  81331. // strange IE + webpack dev server bug - use .call(global)
  81332. macrotask.call(global, flush);
  81333. };
  81334. }
  81335. return function (fn) {
  81336. var task = { fn: fn, next: undefined };
  81337. if (last) last.next = task;
  81338. if (!head) {
  81339. head = task;
  81340. notify();
  81341. } last = task;
  81342. };
  81343. };
  81344. /***/ }),
  81345. /* 871 */
  81346. /***/ (function(module, exports) {
  81347. module.exports = function (exec) {
  81348. try {
  81349. return { e: false, v: exec() };
  81350. } catch (e) {
  81351. return { e: true, v: e };
  81352. }
  81353. };
  81354. /***/ }),
  81355. /* 872 */
  81356. /***/ (function(module, exports, __webpack_require__) {
  81357. var anObject = __webpack_require__(7);
  81358. var isObject = __webpack_require__(8);
  81359. var newPromiseCapability = __webpack_require__(457);
  81360. module.exports = function (C, x) {
  81361. anObject(C);
  81362. if (isObject(x) && x.constructor === C) return x;
  81363. var promiseCapability = newPromiseCapability.f(C);
  81364. var resolve = promiseCapability.resolve;
  81365. resolve(x);
  81366. return promiseCapability.promise;
  81367. };
  81368. /***/ }),
  81369. /* 873 */
  81370. /***/ (function(module, exports, __webpack_require__) {
  81371. "use strict";
  81372. // ECMAScript 6 symbols shim
  81373. var global = __webpack_require__(6);
  81374. var has = __webpack_require__(23);
  81375. var DESCRIPTORS = __webpack_require__(22);
  81376. var $export = __webpack_require__(1);
  81377. var redefine = __webpack_require__(41);
  81378. var META = __webpack_require__(104).KEY;
  81379. var $fails = __webpack_require__(13);
  81380. var shared = __webpack_require__(190);
  81381. var setToStringTag = __webpack_require__(74);
  81382. var uid = __webpack_require__(53);
  81383. var wks = __webpack_require__(11);
  81384. var wksExt = __webpack_require__(458);
  81385. var wksDefine = __webpack_require__(874);
  81386. var enumKeys = __webpack_require__(875);
  81387. var isArray = __webpack_require__(446);
  81388. var anObject = __webpack_require__(7);
  81389. var isObject = __webpack_require__(8);
  81390. var toIObject = __webpack_require__(35);
  81391. var toPrimitive = __webpack_require__(97);
  81392. var createDesc = __webpack_require__(52);
  81393. var _create = __webpack_require__(100);
  81394. var gOPNExt = __webpack_require__(876);
  81395. var $GOPD = __webpack_require__(42);
  81396. var $DP = __webpack_require__(18);
  81397. var $keys = __webpack_require__(76);
  81398. var gOPD = $GOPD.f;
  81399. var dP = $DP.f;
  81400. var gOPN = gOPNExt.f;
  81401. var $Symbol = global.Symbol;
  81402. var $JSON = global.JSON;
  81403. var _stringify = $JSON && $JSON.stringify;
  81404. var PROTOTYPE = 'prototype';
  81405. var HIDDEN = wks('_hidden');
  81406. var TO_PRIMITIVE = wks('toPrimitive');
  81407. var isEnum = {}.propertyIsEnumerable;
  81408. var SymbolRegistry = shared('symbol-registry');
  81409. var AllSymbols = shared('symbols');
  81410. var OPSymbols = shared('op-symbols');
  81411. var ObjectProto = Object[PROTOTYPE];
  81412. var USE_NATIVE = typeof $Symbol == 'function';
  81413. var QObject = global.QObject;
  81414. // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
  81415. var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
  81416. // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
  81417. var setSymbolDesc = DESCRIPTORS && $fails(function () {
  81418. return _create(dP({}, 'a', {
  81419. get: function () { return dP(this, 'a', { value: 7 }).a; }
  81420. })).a != 7;
  81421. }) ? function (it, key, D) {
  81422. var protoDesc = gOPD(ObjectProto, key);
  81423. if (protoDesc) delete ObjectProto[key];
  81424. dP(it, key, D);
  81425. if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
  81426. } : dP;
  81427. var wrap = function (tag) {
  81428. var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
  81429. sym._k = tag;
  81430. return sym;
  81431. };
  81432. var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
  81433. return typeof it == 'symbol';
  81434. } : function (it) {
  81435. return it instanceof $Symbol;
  81436. };
  81437. var $defineProperty = function defineProperty(it, key, D) {
  81438. if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
  81439. anObject(it);
  81440. key = toPrimitive(key, true);
  81441. anObject(D);
  81442. if (has(AllSymbols, key)) {
  81443. if (!D.enumerable) {
  81444. if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
  81445. it[HIDDEN][key] = true;
  81446. } else {
  81447. if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
  81448. D = _create(D, { enumerable: createDesc(0, false) });
  81449. } return setSymbolDesc(it, key, D);
  81450. } return dP(it, key, D);
  81451. };
  81452. var $defineProperties = function defineProperties(it, P) {
  81453. anObject(it);
  81454. var keys = enumKeys(P = toIObject(P));
  81455. var i = 0;
  81456. var l = keys.length;
  81457. var key;
  81458. while (l > i) $defineProperty(it, key = keys[i++], P[key]);
  81459. return it;
  81460. };
  81461. var $create = function create(it, P) {
  81462. return P === undefined ? _create(it) : $defineProperties(_create(it), P);
  81463. };
  81464. var $propertyIsEnumerable = function propertyIsEnumerable(key) {
  81465. var E = isEnum.call(this, key = toPrimitive(key, true));
  81466. if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
  81467. return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
  81468. };
  81469. var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
  81470. it = toIObject(it);
  81471. key = toPrimitive(key, true);
  81472. if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
  81473. var D = gOPD(it, key);
  81474. if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
  81475. return D;
  81476. };
  81477. var $getOwnPropertyNames = function getOwnPropertyNames(it) {
  81478. var names = gOPN(toIObject(it));
  81479. var result = [];
  81480. var i = 0;
  81481. var key;
  81482. while (names.length > i) {
  81483. if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
  81484. } return result;
  81485. };
  81486. var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
  81487. var IS_OP = it === ObjectProto;
  81488. var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
  81489. var result = [];
  81490. var i = 0;
  81491. var key;
  81492. while (names.length > i) {
  81493. if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
  81494. } return result;
  81495. };
  81496. // 19.4.1.1 Symbol([description])
  81497. if (!USE_NATIVE) {
  81498. $Symbol = function Symbol() {
  81499. if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
  81500. var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
  81501. var $set = function (value) {
  81502. if (this === ObjectProto) $set.call(OPSymbols, value);
  81503. if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
  81504. setSymbolDesc(this, tag, createDesc(1, value));
  81505. };
  81506. if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
  81507. return wrap(tag);
  81508. };
  81509. redefine($Symbol[PROTOTYPE], 'toString', function toString() {
  81510. return this._k;
  81511. });
  81512. $GOPD.f = $getOwnPropertyDescriptor;
  81513. $DP.f = $defineProperty;
  81514. __webpack_require__(98).f = gOPNExt.f = $getOwnPropertyNames;
  81515. __webpack_require__(103).f = $propertyIsEnumerable;
  81516. __webpack_require__(139).f = $getOwnPropertySymbols;
  81517. if (DESCRIPTORS && !__webpack_require__(70)) {
  81518. redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
  81519. }
  81520. wksExt.f = function (name) {
  81521. return wrap(wks(name));
  81522. };
  81523. }
  81524. $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
  81525. for (var es6Symbols = (
  81526. // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
  81527. 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
  81528. ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
  81529. for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
  81530. $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
  81531. // 19.4.2.1 Symbol.for(key)
  81532. 'for': function (key) {
  81533. return has(SymbolRegistry, key += '')
  81534. ? SymbolRegistry[key]
  81535. : SymbolRegistry[key] = $Symbol(key);
  81536. },
  81537. // 19.4.2.5 Symbol.keyFor(sym)
  81538. keyFor: function keyFor(sym) {
  81539. if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
  81540. for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
  81541. },
  81542. useSetter: function () { setter = true; },
  81543. useSimple: function () { setter = false; }
  81544. });
  81545. $export($export.S + $export.F * !USE_NATIVE, 'Object', {
  81546. // 19.1.2.2 Object.create(O [, Properties])
  81547. create: $create,
  81548. // 19.1.2.4 Object.defineProperty(O, P, Attributes)
  81549. defineProperty: $defineProperty,
  81550. // 19.1.2.3 Object.defineProperties(O, Properties)
  81551. defineProperties: $defineProperties,
  81552. // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
  81553. getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
  81554. // 19.1.2.7 Object.getOwnPropertyNames(O)
  81555. getOwnPropertyNames: $getOwnPropertyNames,
  81556. // 19.1.2.8 Object.getOwnPropertySymbols(O)
  81557. getOwnPropertySymbols: $getOwnPropertySymbols
  81558. });
  81559. // 24.3.2 JSON.stringify(value [, replacer [, space]])
  81560. $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
  81561. var S = $Symbol();
  81562. // MS Edge converts symbol values to JSON as {}
  81563. // WebKit converts symbol values to JSON as null
  81564. // V8 throws on boxed symbols
  81565. return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
  81566. })), 'JSON', {
  81567. stringify: function stringify(it) {
  81568. var args = [it];
  81569. var i = 1;
  81570. var replacer, $replacer;
  81571. while (arguments.length > i) args.push(arguments[i++]);
  81572. $replacer = replacer = args[1];
  81573. if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
  81574. if (!isArray(replacer)) replacer = function (key, value) {
  81575. if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
  81576. if (!isSymbol(value)) return value;
  81577. };
  81578. args[1] = replacer;
  81579. return _stringify.apply($JSON, args);
  81580. }
  81581. });
  81582. // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
  81583. $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(27)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
  81584. // 19.4.3.5 Symbol.prototype[@@toStringTag]
  81585. setToStringTag($Symbol, 'Symbol');
  81586. // 20.2.1.9 Math[@@toStringTag]
  81587. setToStringTag(Math, 'Math', true);
  81588. // 24.3.3 JSON[@@toStringTag]
  81589. setToStringTag(global.JSON, 'JSON', true);
  81590. /***/ }),
  81591. /* 874 */
  81592. /***/ (function(module, exports, __webpack_require__) {
  81593. var global = __webpack_require__(6);
  81594. var core = __webpack_require__(96);
  81595. var LIBRARY = __webpack_require__(70);
  81596. var wksExt = __webpack_require__(458);
  81597. var defineProperty = __webpack_require__(18).f;
  81598. module.exports = function (name) {
  81599. var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
  81600. if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
  81601. };
  81602. /***/ }),
  81603. /* 875 */
  81604. /***/ (function(module, exports, __webpack_require__) {
  81605. // all enumerable object keys, includes symbols
  81606. var getKeys = __webpack_require__(76);
  81607. var gOPS = __webpack_require__(139);
  81608. var pIE = __webpack_require__(103);
  81609. module.exports = function (it) {
  81610. var result = getKeys(it);
  81611. var getSymbols = gOPS.f;
  81612. if (getSymbols) {
  81613. var symbols = getSymbols(it);
  81614. var isEnum = pIE.f;
  81615. var i = 0;
  81616. var key;
  81617. while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
  81618. } return result;
  81619. };
  81620. /***/ }),
  81621. /* 876 */
  81622. /***/ (function(module, exports, __webpack_require__) {
  81623. // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
  81624. var toIObject = __webpack_require__(35);
  81625. var gOPN = __webpack_require__(98).f;
  81626. var toString = {}.toString;
  81627. var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  81628. ? Object.getOwnPropertyNames(window) : [];
  81629. var getWindowNames = function (it) {
  81630. try {
  81631. return gOPN(it);
  81632. } catch (e) {
  81633. return windowNames.slice();
  81634. }
  81635. };
  81636. module.exports.f = function getOwnPropertyNames(it) {
  81637. return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
  81638. };
  81639. /***/ }),
  81640. /* 877 */
  81641. /***/ (function(module, exports, __webpack_require__) {
  81642. // 19.1.3.1 Object.assign(target, source)
  81643. var $export = __webpack_require__(1);
  81644. $export($export.S + $export.F, 'Object', { assign: __webpack_require__(453) });
  81645. /***/ }),
  81646. /* 878 */
  81647. /***/ (function(module, exports, __webpack_require__) {
  81648. // 19.1.3.10 Object.is(value1, value2)
  81649. var $export = __webpack_require__(1);
  81650. $export($export.S, 'Object', { is: __webpack_require__(879) });
  81651. /***/ }),
  81652. /* 879 */
  81653. /***/ (function(module, exports) {
  81654. // 7.2.9 SameValue(x, y)
  81655. module.exports = Object.is || function is(x, y) {
  81656. // eslint-disable-next-line no-self-compare
  81657. return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
  81658. };
  81659. /***/ }),
  81660. /* 880 */
  81661. /***/ (function(module, exports, __webpack_require__) {
  81662. // 19.1.3.19 Object.setPrototypeOf(O, proto)
  81663. var $export = __webpack_require__(1);
  81664. $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(198).set });
  81665. /***/ }),
  81666. /* 881 */
  81667. /***/ (function(module, exports, __webpack_require__) {
  81668. var dP = __webpack_require__(18).f;
  81669. var FProto = Function.prototype;
  81670. var nameRE = /^\s*function ([^ (]*)/;
  81671. var NAME = 'name';
  81672. // 19.2.4.2 name
  81673. NAME in FProto || __webpack_require__(22) && dP(FProto, NAME, {
  81674. configurable: true,
  81675. get: function () {
  81676. try {
  81677. return ('' + this).match(nameRE)[1];
  81678. } catch (e) {
  81679. return '';
  81680. }
  81681. }
  81682. });
  81683. /***/ }),
  81684. /* 882 */
  81685. /***/ (function(module, exports, __webpack_require__) {
  81686. var $export = __webpack_require__(1);
  81687. var toIObject = __webpack_require__(35);
  81688. var toLength = __webpack_require__(20);
  81689. $export($export.S, 'String', {
  81690. // 21.1.2.4 String.raw(callSite, ...substitutions)
  81691. raw: function raw(callSite) {
  81692. var tpl = toIObject(callSite.raw);
  81693. var len = toLength(tpl.length);
  81694. var aLen = arguments.length;
  81695. var res = [];
  81696. var i = 0;
  81697. while (len > i) {
  81698. res.push(String(tpl[i++]));
  81699. if (i < aLen) res.push(String(arguments[i]));
  81700. } return res.join('');
  81701. }
  81702. });
  81703. /***/ }),
  81704. /* 883 */
  81705. /***/ (function(module, exports, __webpack_require__) {
  81706. var $export = __webpack_require__(1);
  81707. var toAbsoluteIndex = __webpack_require__(99);
  81708. var fromCharCode = String.fromCharCode;
  81709. var $fromCodePoint = String.fromCodePoint;
  81710. // length should be 1, old FF problem
  81711. $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
  81712. // 21.1.2.2 String.fromCodePoint(...codePoints)
  81713. fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars
  81714. var res = [];
  81715. var aLen = arguments.length;
  81716. var i = 0;
  81717. var code;
  81718. while (aLen > i) {
  81719. code = +arguments[i++];
  81720. if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point');
  81721. res.push(code < 0x10000
  81722. ? fromCharCode(code)
  81723. : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
  81724. );
  81725. } return res.join('');
  81726. }
  81727. });
  81728. /***/ }),
  81729. /* 884 */
  81730. /***/ (function(module, exports, __webpack_require__) {
  81731. "use strict";
  81732. var $export = __webpack_require__(1);
  81733. var $at = __webpack_require__(885)(false);
  81734. $export($export.P, 'String', {
  81735. // 21.1.3.3 String.prototype.codePointAt(pos)
  81736. codePointAt: function codePointAt(pos) {
  81737. return $at(this, pos);
  81738. }
  81739. });
  81740. /***/ }),
  81741. /* 885 */
  81742. /***/ (function(module, exports, __webpack_require__) {
  81743. var toInteger = __webpack_require__(55);
  81744. var defined = __webpack_require__(56);
  81745. // true -> String#at
  81746. // false -> String#codePointAt
  81747. module.exports = function (TO_STRING) {
  81748. return function (that, pos) {
  81749. var s = String(defined(that));
  81750. var i = toInteger(pos);
  81751. var l = s.length;
  81752. var a, b;
  81753. if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
  81754. a = s.charCodeAt(i);
  81755. return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
  81756. ? TO_STRING ? s.charAt(i) : a
  81757. : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  81758. };
  81759. };
  81760. /***/ }),
  81761. /* 886 */
  81762. /***/ (function(module, exports, __webpack_require__) {
  81763. var $export = __webpack_require__(1);
  81764. $export($export.P, 'String', {
  81765. // 21.1.3.13 String.prototype.repeat(count)
  81766. repeat: __webpack_require__(459)
  81767. });
  81768. /***/ }),
  81769. /* 887 */
  81770. /***/ (function(module, exports, __webpack_require__) {
  81771. "use strict";
  81772. // 21.1.3.18 String.prototype.startsWith(searchString [, position ])
  81773. var $export = __webpack_require__(1);
  81774. var toLength = __webpack_require__(20);
  81775. var context = __webpack_require__(200);
  81776. var STARTS_WITH = 'startsWith';
  81777. var $startsWith = ''[STARTS_WITH];
  81778. $export($export.P + $export.F * __webpack_require__(201)(STARTS_WITH), 'String', {
  81779. startsWith: function startsWith(searchString /* , position = 0 */) {
  81780. var that = context(this, searchString, STARTS_WITH);
  81781. var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));
  81782. var search = String(searchString);
  81783. return $startsWith
  81784. ? $startsWith.call(that, search, index)
  81785. : that.slice(index, index + search.length) === search;
  81786. }
  81787. });
  81788. /***/ }),
  81789. /* 888 */
  81790. /***/ (function(module, exports, __webpack_require__) {
  81791. "use strict";
  81792. // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
  81793. var $export = __webpack_require__(1);
  81794. var toLength = __webpack_require__(20);
  81795. var context = __webpack_require__(200);
  81796. var ENDS_WITH = 'endsWith';
  81797. var $endsWith = ''[ENDS_WITH];
  81798. $export($export.P + $export.F * __webpack_require__(201)(ENDS_WITH), 'String', {
  81799. endsWith: function endsWith(searchString /* , endPosition = @length */) {
  81800. var that = context(this, searchString, ENDS_WITH);
  81801. var endPosition = arguments.length > 1 ? arguments[1] : undefined;
  81802. var len = toLength(that.length);
  81803. var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len);
  81804. var search = String(searchString);
  81805. return $endsWith
  81806. ? $endsWith.call(that, search, end)
  81807. : that.slice(end - search.length, end) === search;
  81808. }
  81809. });
  81810. /***/ }),
  81811. /* 889 */
  81812. /***/ (function(module, exports, __webpack_require__) {
  81813. "use strict";
  81814. // 21.1.3.7 String.prototype.includes(searchString, position = 0)
  81815. var $export = __webpack_require__(1);
  81816. var context = __webpack_require__(200);
  81817. var INCLUDES = 'includes';
  81818. $export($export.P + $export.F * __webpack_require__(201)(INCLUDES), 'String', {
  81819. includes: function includes(searchString /* , position = 0 */) {
  81820. return !!~context(this, searchString, INCLUDES)
  81821. .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
  81822. }
  81823. });
  81824. /***/ }),
  81825. /* 890 */
  81826. /***/ (function(module, exports, __webpack_require__) {
  81827. // 21.2.5.3 get RegExp.prototype.flags()
  81828. if (__webpack_require__(22) && /./g.flags != 'g') __webpack_require__(18).f(RegExp.prototype, 'flags', {
  81829. configurable: true,
  81830. get: __webpack_require__(891)
  81831. });
  81832. /***/ }),
  81833. /* 891 */
  81834. /***/ (function(module, exports, __webpack_require__) {
  81835. "use strict";
  81836. // 21.2.5.3 get RegExp.prototype.flags
  81837. var anObject = __webpack_require__(7);
  81838. module.exports = function () {
  81839. var that = anObject(this);
  81840. var result = '';
  81841. if (that.global) result += 'g';
  81842. if (that.ignoreCase) result += 'i';
  81843. if (that.multiline) result += 'm';
  81844. if (that.unicode) result += 'u';
  81845. if (that.sticky) result += 'y';
  81846. return result;
  81847. };
  81848. /***/ }),
  81849. /* 892 */
  81850. /***/ (function(module, exports, __webpack_require__) {
  81851. // @@match logic
  81852. __webpack_require__(140)('match', 1, function (defined, MATCH, $match) {
  81853. // 21.1.3.11 String.prototype.match(regexp)
  81854. return [function match(regexp) {
  81855. 'use strict';
  81856. var O = defined(this);
  81857. var fn = regexp == undefined ? undefined : regexp[MATCH];
  81858. return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
  81859. }, $match];
  81860. });
  81861. /***/ }),
  81862. /* 893 */
  81863. /***/ (function(module, exports, __webpack_require__) {
  81864. // @@replace logic
  81865. __webpack_require__(140)('replace', 2, function (defined, REPLACE, $replace) {
  81866. // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)
  81867. return [function replace(searchValue, replaceValue) {
  81868. 'use strict';
  81869. var O = defined(this);
  81870. var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
  81871. return fn !== undefined
  81872. ? fn.call(searchValue, O, replaceValue)
  81873. : $replace.call(String(O), searchValue, replaceValue);
  81874. }, $replace];
  81875. });
  81876. /***/ }),
  81877. /* 894 */
  81878. /***/ (function(module, exports, __webpack_require__) {
  81879. // @@split logic
  81880. __webpack_require__(140)('split', 2, function (defined, SPLIT, $split) {
  81881. 'use strict';
  81882. var isRegExp = __webpack_require__(460);
  81883. var _split = $split;
  81884. var $push = [].push;
  81885. var $SPLIT = 'split';
  81886. var LENGTH = 'length';
  81887. var LAST_INDEX = 'lastIndex';
  81888. if (
  81889. 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
  81890. 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
  81891. 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
  81892. '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
  81893. '.'[$SPLIT](/()()/)[LENGTH] > 1 ||
  81894. ''[$SPLIT](/.?/)[LENGTH]
  81895. ) {
  81896. var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group
  81897. // based on es5-shim implementation, need to rework it
  81898. $split = function (separator, limit) {
  81899. var string = String(this);
  81900. if (separator === undefined && limit === 0) return [];
  81901. // If `separator` is not a regex, use native split
  81902. if (!isRegExp(separator)) return _split.call(string, separator, limit);
  81903. var output = [];
  81904. var flags = (separator.ignoreCase ? 'i' : '') +
  81905. (separator.multiline ? 'm' : '') +
  81906. (separator.unicode ? 'u' : '') +
  81907. (separator.sticky ? 'y' : '');
  81908. var lastLastIndex = 0;
  81909. var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;
  81910. // Make `global` and avoid `lastIndex` issues by working with a copy
  81911. var separatorCopy = new RegExp(separator.source, flags + 'g');
  81912. var separator2, match, lastIndex, lastLength, i;
  81913. // Doesn't need flags gy, but they don't hurt
  81914. if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags);
  81915. while (match = separatorCopy.exec(string)) {
  81916. // `separatorCopy.lastIndex` is not reliable cross-browser
  81917. lastIndex = match.index + match[0][LENGTH];
  81918. if (lastIndex > lastLastIndex) {
  81919. output.push(string.slice(lastLastIndex, match.index));
  81920. // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG
  81921. // eslint-disable-next-line no-loop-func
  81922. if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () {
  81923. for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined;
  81924. });
  81925. if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));
  81926. lastLength = match[0][LENGTH];
  81927. lastLastIndex = lastIndex;
  81928. if (output[LENGTH] >= splitLimit) break;
  81929. }
  81930. if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
  81931. }
  81932. if (lastLastIndex === string[LENGTH]) {
  81933. if (lastLength || !separatorCopy.test('')) output.push('');
  81934. } else output.push(string.slice(lastLastIndex));
  81935. return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
  81936. };
  81937. // Chakra, V8
  81938. } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {
  81939. $split = function (separator, limit) {
  81940. return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);
  81941. };
  81942. }
  81943. // 21.1.3.17 String.prototype.split(separator, limit)
  81944. return [function split(separator, limit) {
  81945. var O = defined(this);
  81946. var fn = separator == undefined ? undefined : separator[SPLIT];
  81947. return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);
  81948. }, $split];
  81949. });
  81950. /***/ }),
  81951. /* 895 */
  81952. /***/ (function(module, exports, __webpack_require__) {
  81953. // @@search logic
  81954. __webpack_require__(140)('search', 1, function (defined, SEARCH, $search) {
  81955. // 21.1.3.15 String.prototype.search(regexp)
  81956. return [function search(regexp) {
  81957. 'use strict';
  81958. var O = defined(this);
  81959. var fn = regexp == undefined ? undefined : regexp[SEARCH];
  81960. return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
  81961. }, $search];
  81962. });
  81963. /***/ }),
  81964. /* 896 */
  81965. /***/ (function(module, exports, __webpack_require__) {
  81966. "use strict";
  81967. var ctx = __webpack_require__(34);
  81968. var $export = __webpack_require__(1);
  81969. var toObject = __webpack_require__(57);
  81970. var call = __webpack_require__(452);
  81971. var isArrayIter = __webpack_require__(194);
  81972. var toLength = __webpack_require__(20);
  81973. var createProperty = __webpack_require__(202);
  81974. var getIterFn = __webpack_require__(195);
  81975. $export($export.S + $export.F * !__webpack_require__(136)(function (iter) { Array.from(iter); }), 'Array', {
  81976. // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
  81977. from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  81978. var O = toObject(arrayLike);
  81979. var C = typeof this == 'function' ? this : Array;
  81980. var aLen = arguments.length;
  81981. var mapfn = aLen > 1 ? arguments[1] : undefined;
  81982. var mapping = mapfn !== undefined;
  81983. var index = 0;
  81984. var iterFn = getIterFn(O);
  81985. var length, result, step, iterator;
  81986. if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
  81987. // if object isn't iterable or it's array with default iterator - use simple case
  81988. if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
  81989. for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
  81990. createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
  81991. }
  81992. } else {
  81993. length = toLength(O.length);
  81994. for (result = new C(length); length > index; index++) {
  81995. createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
  81996. }
  81997. }
  81998. result.length = index;
  81999. return result;
  82000. }
  82001. });
  82002. /***/ }),
  82003. /* 897 */
  82004. /***/ (function(module, exports, __webpack_require__) {
  82005. "use strict";
  82006. var $export = __webpack_require__(1);
  82007. var createProperty = __webpack_require__(202);
  82008. // WebKit Array.of isn't generic
  82009. $export($export.S + $export.F * __webpack_require__(13)(function () {
  82010. function F() { /* empty */ }
  82011. return !(Array.of.call(F) instanceof F);
  82012. }), 'Array', {
  82013. // 22.1.2.3 Array.of( ...items)
  82014. of: function of(/* ...args */) {
  82015. var index = 0;
  82016. var aLen = arguments.length;
  82017. var result = new (typeof this == 'function' ? this : Array)(aLen);
  82018. while (aLen > index) createProperty(result, index, arguments[index++]);
  82019. result.length = aLen;
  82020. return result;
  82021. }
  82022. });
  82023. /***/ }),
  82024. /* 898 */
  82025. /***/ (function(module, exports, __webpack_require__) {
  82026. // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
  82027. var $export = __webpack_require__(1);
  82028. $export($export.P, 'Array', { copyWithin: __webpack_require__(450) });
  82029. __webpack_require__(77)('copyWithin');
  82030. /***/ }),
  82031. /* 899 */
  82032. /***/ (function(module, exports, __webpack_require__) {
  82033. "use strict";
  82034. // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
  82035. var $export = __webpack_require__(1);
  82036. var $find = __webpack_require__(102)(5);
  82037. var KEY = 'find';
  82038. var forced = true;
  82039. // Shouldn't skip holes
  82040. if (KEY in []) Array(1)[KEY](function () { forced = false; });
  82041. $export($export.P + $export.F * forced, 'Array', {
  82042. find: function find(callbackfn /* , that = undefined */) {
  82043. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  82044. }
  82045. });
  82046. __webpack_require__(77)(KEY);
  82047. /***/ }),
  82048. /* 900 */
  82049. /***/ (function(module, exports, __webpack_require__) {
  82050. "use strict";
  82051. // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
  82052. var $export = __webpack_require__(1);
  82053. var $find = __webpack_require__(102)(6);
  82054. var KEY = 'findIndex';
  82055. var forced = true;
  82056. // Shouldn't skip holes
  82057. if (KEY in []) Array(1)[KEY](function () { forced = false; });
  82058. $export($export.P + $export.F * forced, 'Array', {
  82059. findIndex: function findIndex(callbackfn /* , that = undefined */) {
  82060. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  82061. }
  82062. });
  82063. __webpack_require__(77)(KEY);
  82064. /***/ }),
  82065. /* 901 */
  82066. /***/ (function(module, exports, __webpack_require__) {
  82067. // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
  82068. var $export = __webpack_require__(1);
  82069. $export($export.P, 'Array', { fill: __webpack_require__(192) });
  82070. __webpack_require__(77)('fill');
  82071. /***/ }),
  82072. /* 902 */
  82073. /***/ (function(module, exports, __webpack_require__) {
  82074. // 20.1.2.2 Number.isFinite(number)
  82075. var $export = __webpack_require__(1);
  82076. var _isFinite = __webpack_require__(6).isFinite;
  82077. $export($export.S, 'Number', {
  82078. isFinite: function isFinite(it) {
  82079. return typeof it == 'number' && _isFinite(it);
  82080. }
  82081. });
  82082. /***/ }),
  82083. /* 903 */
  82084. /***/ (function(module, exports, __webpack_require__) {
  82085. // 20.1.2.3 Number.isInteger(number)
  82086. var $export = __webpack_require__(1);
  82087. $export($export.S, 'Number', { isInteger: __webpack_require__(461) });
  82088. /***/ }),
  82089. /* 904 */
  82090. /***/ (function(module, exports, __webpack_require__) {
  82091. // 20.1.2.5 Number.isSafeInteger(number)
  82092. var $export = __webpack_require__(1);
  82093. var isInteger = __webpack_require__(461);
  82094. var abs = Math.abs;
  82095. $export($export.S, 'Number', {
  82096. isSafeInteger: function isSafeInteger(number) {
  82097. return isInteger(number) && abs(number) <= 0x1fffffffffffff;
  82098. }
  82099. });
  82100. /***/ }),
  82101. /* 905 */
  82102. /***/ (function(module, exports, __webpack_require__) {
  82103. // 20.1.2.4 Number.isNaN(number)
  82104. var $export = __webpack_require__(1);
  82105. $export($export.S, 'Number', {
  82106. isNaN: function isNaN(number) {
  82107. // eslint-disable-next-line no-self-compare
  82108. return number != number;
  82109. }
  82110. });
  82111. /***/ }),
  82112. /* 906 */
  82113. /***/ (function(module, exports, __webpack_require__) {
  82114. // 20.1.2.1 Number.EPSILON
  82115. var $export = __webpack_require__(1);
  82116. $export($export.S, 'Number', { EPSILON: Math.pow(2, -52) });
  82117. /***/ }),
  82118. /* 907 */
  82119. /***/ (function(module, exports, __webpack_require__) {
  82120. // 20.1.2.10 Number.MIN_SAFE_INTEGER
  82121. var $export = __webpack_require__(1);
  82122. $export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });
  82123. /***/ }),
  82124. /* 908 */
  82125. /***/ (function(module, exports, __webpack_require__) {
  82126. // 20.1.2.6 Number.MAX_SAFE_INTEGER
  82127. var $export = __webpack_require__(1);
  82128. $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });
  82129. /***/ }),
  82130. /* 909 */
  82131. /***/ (function(module, exports, __webpack_require__) {
  82132. // 20.2.2.3 Math.acosh(x)
  82133. var $export = __webpack_require__(1);
  82134. var log1p = __webpack_require__(462);
  82135. var sqrt = Math.sqrt;
  82136. var $acosh = Math.acosh;
  82137. $export($export.S + $export.F * !($acosh
  82138. // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
  82139. && Math.floor($acosh(Number.MAX_VALUE)) == 710
  82140. // Tor Browser bug: Math.acosh(Infinity) -> NaN
  82141. && $acosh(Infinity) == Infinity
  82142. ), 'Math', {
  82143. acosh: function acosh(x) {
  82144. return (x = +x) < 1 ? NaN : x > 94906265.62425156
  82145. ? Math.log(x) + Math.LN2
  82146. : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
  82147. }
  82148. });
  82149. /***/ }),
  82150. /* 910 */
  82151. /***/ (function(module, exports, __webpack_require__) {
  82152. // 20.2.2.5 Math.asinh(x)
  82153. var $export = __webpack_require__(1);
  82154. var $asinh = Math.asinh;
  82155. function asinh(x) {
  82156. return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
  82157. }
  82158. // Tor Browser bug: Math.asinh(0) -> -0
  82159. $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });
  82160. /***/ }),
  82161. /* 911 */
  82162. /***/ (function(module, exports, __webpack_require__) {
  82163. // 20.2.2.7 Math.atanh(x)
  82164. var $export = __webpack_require__(1);
  82165. var $atanh = Math.atanh;
  82166. // Tor Browser bug: Math.atanh(-0) -> 0
  82167. $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
  82168. atanh: function atanh(x) {
  82169. return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
  82170. }
  82171. });
  82172. /***/ }),
  82173. /* 912 */
  82174. /***/ (function(module, exports, __webpack_require__) {
  82175. // 20.2.2.9 Math.cbrt(x)
  82176. var $export = __webpack_require__(1);
  82177. var sign = __webpack_require__(203);
  82178. $export($export.S, 'Math', {
  82179. cbrt: function cbrt(x) {
  82180. return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
  82181. }
  82182. });
  82183. /***/ }),
  82184. /* 913 */
  82185. /***/ (function(module, exports, __webpack_require__) {
  82186. // 20.2.2.11 Math.clz32(x)
  82187. var $export = __webpack_require__(1);
  82188. $export($export.S, 'Math', {
  82189. clz32: function clz32(x) {
  82190. return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
  82191. }
  82192. });
  82193. /***/ }),
  82194. /* 914 */
  82195. /***/ (function(module, exports, __webpack_require__) {
  82196. // 20.2.2.12 Math.cosh(x)
  82197. var $export = __webpack_require__(1);
  82198. var exp = Math.exp;
  82199. $export($export.S, 'Math', {
  82200. cosh: function cosh(x) {
  82201. return (exp(x = +x) + exp(-x)) / 2;
  82202. }
  82203. });
  82204. /***/ }),
  82205. /* 915 */
  82206. /***/ (function(module, exports, __webpack_require__) {
  82207. // 20.2.2.14 Math.expm1(x)
  82208. var $export = __webpack_require__(1);
  82209. var $expm1 = __webpack_require__(204);
  82210. $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 });
  82211. /***/ }),
  82212. /* 916 */
  82213. /***/ (function(module, exports, __webpack_require__) {
  82214. // 20.2.2.16 Math.fround(x)
  82215. var $export = __webpack_require__(1);
  82216. $export($export.S, 'Math', { fround: __webpack_require__(917) });
  82217. /***/ }),
  82218. /* 917 */
  82219. /***/ (function(module, exports, __webpack_require__) {
  82220. // 20.2.2.16 Math.fround(x)
  82221. var sign = __webpack_require__(203);
  82222. var pow = Math.pow;
  82223. var EPSILON = pow(2, -52);
  82224. var EPSILON32 = pow(2, -23);
  82225. var MAX32 = pow(2, 127) * (2 - EPSILON32);
  82226. var MIN32 = pow(2, -126);
  82227. var roundTiesToEven = function (n) {
  82228. return n + 1 / EPSILON - 1 / EPSILON;
  82229. };
  82230. module.exports = Math.fround || function fround(x) {
  82231. var $abs = Math.abs(x);
  82232. var $sign = sign(x);
  82233. var a, result;
  82234. if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
  82235. a = (1 + EPSILON32 / EPSILON) * $abs;
  82236. result = a - (a - $abs);
  82237. // eslint-disable-next-line no-self-compare
  82238. if (result > MAX32 || result != result) return $sign * Infinity;
  82239. return $sign * result;
  82240. };
  82241. /***/ }),
  82242. /* 918 */
  82243. /***/ (function(module, exports, __webpack_require__) {
  82244. // 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
  82245. var $export = __webpack_require__(1);
  82246. var abs = Math.abs;
  82247. $export($export.S, 'Math', {
  82248. hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars
  82249. var sum = 0;
  82250. var i = 0;
  82251. var aLen = arguments.length;
  82252. var larg = 0;
  82253. var arg, div;
  82254. while (i < aLen) {
  82255. arg = abs(arguments[i++]);
  82256. if (larg < arg) {
  82257. div = larg / arg;
  82258. sum = sum * div * div + 1;
  82259. larg = arg;
  82260. } else if (arg > 0) {
  82261. div = arg / larg;
  82262. sum += div * div;
  82263. } else sum += arg;
  82264. }
  82265. return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
  82266. }
  82267. });
  82268. /***/ }),
  82269. /* 919 */
  82270. /***/ (function(module, exports, __webpack_require__) {
  82271. // 20.2.2.18 Math.imul(x, y)
  82272. var $export = __webpack_require__(1);
  82273. var $imul = Math.imul;
  82274. // some WebKit versions fails with big numbers, some has wrong arity
  82275. $export($export.S + $export.F * __webpack_require__(13)(function () {
  82276. return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
  82277. }), 'Math', {
  82278. imul: function imul(x, y) {
  82279. var UINT16 = 0xffff;
  82280. var xn = +x;
  82281. var yn = +y;
  82282. var xl = UINT16 & xn;
  82283. var yl = UINT16 & yn;
  82284. return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
  82285. }
  82286. });
  82287. /***/ }),
  82288. /* 920 */
  82289. /***/ (function(module, exports, __webpack_require__) {
  82290. // 20.2.2.20 Math.log1p(x)
  82291. var $export = __webpack_require__(1);
  82292. $export($export.S, 'Math', { log1p: __webpack_require__(462) });
  82293. /***/ }),
  82294. /* 921 */
  82295. /***/ (function(module, exports, __webpack_require__) {
  82296. // 20.2.2.21 Math.log10(x)
  82297. var $export = __webpack_require__(1);
  82298. $export($export.S, 'Math', {
  82299. log10: function log10(x) {
  82300. return Math.log(x) * Math.LOG10E;
  82301. }
  82302. });
  82303. /***/ }),
  82304. /* 922 */
  82305. /***/ (function(module, exports, __webpack_require__) {
  82306. // 20.2.2.22 Math.log2(x)
  82307. var $export = __webpack_require__(1);
  82308. $export($export.S, 'Math', {
  82309. log2: function log2(x) {
  82310. return Math.log(x) / Math.LN2;
  82311. }
  82312. });
  82313. /***/ }),
  82314. /* 923 */
  82315. /***/ (function(module, exports, __webpack_require__) {
  82316. // 20.2.2.28 Math.sign(x)
  82317. var $export = __webpack_require__(1);
  82318. $export($export.S, 'Math', { sign: __webpack_require__(203) });
  82319. /***/ }),
  82320. /* 924 */
  82321. /***/ (function(module, exports, __webpack_require__) {
  82322. // 20.2.2.30 Math.sinh(x)
  82323. var $export = __webpack_require__(1);
  82324. var expm1 = __webpack_require__(204);
  82325. var exp = Math.exp;
  82326. // V8 near Chromium 38 has a problem with very small numbers
  82327. $export($export.S + $export.F * __webpack_require__(13)(function () {
  82328. return !Math.sinh(-2e-17) != -2e-17;
  82329. }), 'Math', {
  82330. sinh: function sinh(x) {
  82331. return Math.abs(x = +x) < 1
  82332. ? (expm1(x) - expm1(-x)) / 2
  82333. : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
  82334. }
  82335. });
  82336. /***/ }),
  82337. /* 925 */
  82338. /***/ (function(module, exports, __webpack_require__) {
  82339. // 20.2.2.33 Math.tanh(x)
  82340. var $export = __webpack_require__(1);
  82341. var expm1 = __webpack_require__(204);
  82342. var exp = Math.exp;
  82343. $export($export.S, 'Math', {
  82344. tanh: function tanh(x) {
  82345. var a = expm1(x = +x);
  82346. var b = expm1(-x);
  82347. return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
  82348. }
  82349. });
  82350. /***/ }),
  82351. /* 926 */
  82352. /***/ (function(module, exports, __webpack_require__) {
  82353. // 20.2.2.34 Math.trunc(x)
  82354. var $export = __webpack_require__(1);
  82355. $export($export.S, 'Math', {
  82356. trunc: function trunc(it) {
  82357. return (it > 0 ? Math.floor : Math.ceil)(it);
  82358. }
  82359. });
  82360. /***/ }),
  82361. /* 927 */
  82362. /***/ (function(module, exports, __webpack_require__) {
  82363. "use strict";
  82364. // https://github.com/tc39/Array.prototype.includes
  82365. var $export = __webpack_require__(1);
  82366. var $includes = __webpack_require__(188)(true);
  82367. $export($export.P, 'Array', {
  82368. includes: function includes(el /* , fromIndex = 0 */) {
  82369. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  82370. }
  82371. });
  82372. __webpack_require__(77)('includes');
  82373. /***/ }),
  82374. /* 928 */
  82375. /***/ (function(module, exports, __webpack_require__) {
  82376. // https://github.com/tc39/proposal-object-values-entries
  82377. var $export = __webpack_require__(1);
  82378. var $values = __webpack_require__(463)(false);
  82379. $export($export.S, 'Object', {
  82380. values: function values(it) {
  82381. return $values(it);
  82382. }
  82383. });
  82384. /***/ }),
  82385. /* 929 */
  82386. /***/ (function(module, exports, __webpack_require__) {
  82387. // https://github.com/tc39/proposal-object-values-entries
  82388. var $export = __webpack_require__(1);
  82389. var $entries = __webpack_require__(463)(true);
  82390. $export($export.S, 'Object', {
  82391. entries: function entries(it) {
  82392. return $entries(it);
  82393. }
  82394. });
  82395. /***/ }),
  82396. /* 930 */
  82397. /***/ (function(module, exports, __webpack_require__) {
  82398. // https://github.com/tc39/proposal-object-getownpropertydescriptors
  82399. var $export = __webpack_require__(1);
  82400. var ownKeys = __webpack_require__(456);
  82401. var toIObject = __webpack_require__(35);
  82402. var gOPD = __webpack_require__(42);
  82403. var createProperty = __webpack_require__(202);
  82404. $export($export.S, 'Object', {
  82405. getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
  82406. var O = toIObject(object);
  82407. var getDesc = gOPD.f;
  82408. var keys = ownKeys(O);
  82409. var result = {};
  82410. var i = 0;
  82411. var key, desc;
  82412. while (keys.length > i) {
  82413. desc = getDesc(O, key = keys[i++]);
  82414. if (desc !== undefined) createProperty(result, key, desc);
  82415. }
  82416. return result;
  82417. }
  82418. });
  82419. /***/ }),
  82420. /* 931 */
  82421. /***/ (function(module, exports, __webpack_require__) {
  82422. "use strict";
  82423. // https://github.com/tc39/proposal-string-pad-start-end
  82424. var $export = __webpack_require__(1);
  82425. var $pad = __webpack_require__(464);
  82426. var userAgent = __webpack_require__(205);
  82427. // https://github.com/zloirock/core-js/issues/280
  82428. $export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', {
  82429. padStart: function padStart(maxLength /* , fillString = ' ' */) {
  82430. return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
  82431. }
  82432. });
  82433. /***/ }),
  82434. /* 932 */
  82435. /***/ (function(module, exports, __webpack_require__) {
  82436. "use strict";
  82437. // https://github.com/tc39/proposal-string-pad-start-end
  82438. var $export = __webpack_require__(1);
  82439. var $pad = __webpack_require__(464);
  82440. var userAgent = __webpack_require__(205);
  82441. // https://github.com/zloirock/core-js/issues/280
  82442. $export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', {
  82443. padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
  82444. return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
  82445. }
  82446. });
  82447. /***/ }),
  82448. /* 933 */
  82449. /***/ (function(module, exports, __webpack_require__) {
  82450. // ie9- setTimeout & setInterval additional parameters fix
  82451. var global = __webpack_require__(6);
  82452. var $export = __webpack_require__(1);
  82453. var userAgent = __webpack_require__(205);
  82454. var slice = [].slice;
  82455. var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check
  82456. var wrap = function (set) {
  82457. return function (fn, time /* , ...args */) {
  82458. var boundArgs = arguments.length > 2;
  82459. var args = boundArgs ? slice.call(arguments, 2) : false;
  82460. return set(boundArgs ? function () {
  82461. // eslint-disable-next-line no-new-func
  82462. (typeof fn == 'function' ? fn : Function(fn)).apply(this, args);
  82463. } : fn, time);
  82464. };
  82465. };
  82466. $export($export.G + $export.B + $export.F * MSIE, {
  82467. setTimeout: wrap(global.setTimeout),
  82468. setInterval: wrap(global.setInterval)
  82469. });
  82470. /***/ }),
  82471. /* 934 */
  82472. /***/ (function(module, exports, __webpack_require__) {
  82473. var $export = __webpack_require__(1);
  82474. var $task = __webpack_require__(199);
  82475. $export($export.G + $export.B, {
  82476. setImmediate: $task.set,
  82477. clearImmediate: $task.clear
  82478. });
  82479. /***/ }),
  82480. /* 935 */
  82481. /***/ (function(module, exports, __webpack_require__) {
  82482. var $iterators = __webpack_require__(196);
  82483. var getKeys = __webpack_require__(76);
  82484. var redefine = __webpack_require__(41);
  82485. var global = __webpack_require__(6);
  82486. var hide = __webpack_require__(27);
  82487. var Iterators = __webpack_require__(75);
  82488. var wks = __webpack_require__(11);
  82489. var ITERATOR = wks('iterator');
  82490. var TO_STRING_TAG = wks('toStringTag');
  82491. var ArrayValues = Iterators.Array;
  82492. var DOMIterables = {
  82493. CSSRuleList: true, // TODO: Not spec compliant, should be false.
  82494. CSSStyleDeclaration: false,
  82495. CSSValueList: false,
  82496. ClientRectList: false,
  82497. DOMRectList: false,
  82498. DOMStringList: false,
  82499. DOMTokenList: true,
  82500. DataTransferItemList: false,
  82501. FileList: false,
  82502. HTMLAllCollection: false,
  82503. HTMLCollection: false,
  82504. HTMLFormElement: false,
  82505. HTMLSelectElement: false,
  82506. MediaList: true, // TODO: Not spec compliant, should be false.
  82507. MimeTypeArray: false,
  82508. NamedNodeMap: false,
  82509. NodeList: true,
  82510. PaintRequestList: false,
  82511. Plugin: false,
  82512. PluginArray: false,
  82513. SVGLengthList: false,
  82514. SVGNumberList: false,
  82515. SVGPathSegList: false,
  82516. SVGPointList: false,
  82517. SVGStringList: false,
  82518. SVGTransformList: false,
  82519. SourceBufferList: false,
  82520. StyleSheetList: true, // TODO: Not spec compliant, should be false.
  82521. TextTrackCueList: false,
  82522. TextTrackList: false,
  82523. TouchList: false
  82524. };
  82525. for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
  82526. var NAME = collections[i];
  82527. var explicit = DOMIterables[NAME];
  82528. var Collection = global[NAME];
  82529. var proto = Collection && Collection.prototype;
  82530. var key;
  82531. if (proto) {
  82532. if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
  82533. if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
  82534. Iterators[NAME] = ArrayValues;
  82535. if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
  82536. }
  82537. }
  82538. /***/ }),
  82539. /* 936 */
  82540. /***/ (function(module, exports) {
  82541. /**
  82542. * Copyright (c) 2014-present, Facebook, Inc.
  82543. *
  82544. * This source code is licensed under the MIT license found in the
  82545. * LICENSE file in the root directory of this source tree.
  82546. */
  82547. !(function(global) {
  82548. "use strict";
  82549. var Op = Object.prototype;
  82550. var hasOwn = Op.hasOwnProperty;
  82551. var undefined; // More compressible than void 0.
  82552. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  82553. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  82554. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  82555. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  82556. var inModule = typeof module === "object";
  82557. var runtime = global.regeneratorRuntime;
  82558. if (runtime) {
  82559. if (inModule) {
  82560. // If regeneratorRuntime is defined globally and we're in a module,
  82561. // make the exports object identical to regeneratorRuntime.
  82562. module.exports = runtime;
  82563. }
  82564. // Don't bother evaluating the rest of this file if the runtime was
  82565. // already defined globally.
  82566. return;
  82567. }
  82568. // Define the runtime globally (as expected by generated code) as either
  82569. // module.exports (if we're in a module) or a new, empty object.
  82570. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  82571. function wrap(innerFn, outerFn, self, tryLocsList) {
  82572. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  82573. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  82574. var generator = Object.create(protoGenerator.prototype);
  82575. var context = new Context(tryLocsList || []);
  82576. // The ._invoke method unifies the implementations of the .next,
  82577. // .throw, and .return methods.
  82578. generator._invoke = makeInvokeMethod(innerFn, self, context);
  82579. return generator;
  82580. }
  82581. runtime.wrap = wrap;
  82582. // Try/catch helper to minimize deoptimizations. Returns a completion
  82583. // record like context.tryEntries[i].completion. This interface could
  82584. // have been (and was previously) designed to take a closure to be
  82585. // invoked without arguments, but in all the cases we care about we
  82586. // already have an existing method we want to call, so there's no need
  82587. // to create a new function object. We can even get away with assuming
  82588. // the method takes exactly one argument, since that happens to be true
  82589. // in every case, so we don't have to touch the arguments object. The
  82590. // only additional allocation required is the completion record, which
  82591. // has a stable shape and so hopefully should be cheap to allocate.
  82592. function tryCatch(fn, obj, arg) {
  82593. try {
  82594. return { type: "normal", arg: fn.call(obj, arg) };
  82595. } catch (err) {
  82596. return { type: "throw", arg: err };
  82597. }
  82598. }
  82599. var GenStateSuspendedStart = "suspendedStart";
  82600. var GenStateSuspendedYield = "suspendedYield";
  82601. var GenStateExecuting = "executing";
  82602. var GenStateCompleted = "completed";
  82603. // Returning this object from the innerFn has the same effect as
  82604. // breaking out of the dispatch switch statement.
  82605. var ContinueSentinel = {};
  82606. // Dummy constructor functions that we use as the .constructor and
  82607. // .constructor.prototype properties for functions that return Generator
  82608. // objects. For full spec compliance, you may wish to configure your
  82609. // minifier not to mangle the names of these two functions.
  82610. function Generator() {}
  82611. function GeneratorFunction() {}
  82612. function GeneratorFunctionPrototype() {}
  82613. // This is a polyfill for %IteratorPrototype% for environments that
  82614. // don't natively support it.
  82615. var IteratorPrototype = {};
  82616. IteratorPrototype[iteratorSymbol] = function () {
  82617. return this;
  82618. };
  82619. var getProto = Object.getPrototypeOf;
  82620. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  82621. if (NativeIteratorPrototype &&
  82622. NativeIteratorPrototype !== Op &&
  82623. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  82624. // This environment has a native %IteratorPrototype%; use it instead
  82625. // of the polyfill.
  82626. IteratorPrototype = NativeIteratorPrototype;
  82627. }
  82628. var Gp = GeneratorFunctionPrototype.prototype =
  82629. Generator.prototype = Object.create(IteratorPrototype);
  82630. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  82631. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  82632. GeneratorFunctionPrototype[toStringTagSymbol] =
  82633. GeneratorFunction.displayName = "GeneratorFunction";
  82634. // Helper for defining the .next, .throw, and .return methods of the
  82635. // Iterator interface in terms of a single ._invoke method.
  82636. function defineIteratorMethods(prototype) {
  82637. ["next", "throw", "return"].forEach(function(method) {
  82638. prototype[method] = function(arg) {
  82639. return this._invoke(method, arg);
  82640. };
  82641. });
  82642. }
  82643. runtime.isGeneratorFunction = function(genFun) {
  82644. var ctor = typeof genFun === "function" && genFun.constructor;
  82645. return ctor
  82646. ? ctor === GeneratorFunction ||
  82647. // For the native GeneratorFunction constructor, the best we can
  82648. // do is to check its .name property.
  82649. (ctor.displayName || ctor.name) === "GeneratorFunction"
  82650. : false;
  82651. };
  82652. runtime.mark = function(genFun) {
  82653. if (Object.setPrototypeOf) {
  82654. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  82655. } else {
  82656. genFun.__proto__ = GeneratorFunctionPrototype;
  82657. if (!(toStringTagSymbol in genFun)) {
  82658. genFun[toStringTagSymbol] = "GeneratorFunction";
  82659. }
  82660. }
  82661. genFun.prototype = Object.create(Gp);
  82662. return genFun;
  82663. };
  82664. // Within the body of any async function, `await x` is transformed to
  82665. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  82666. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  82667. // meant to be awaited.
  82668. runtime.awrap = function(arg) {
  82669. return { __await: arg };
  82670. };
  82671. function AsyncIterator(generator) {
  82672. function invoke(method, arg, resolve, reject) {
  82673. var record = tryCatch(generator[method], generator, arg);
  82674. if (record.type === "throw") {
  82675. reject(record.arg);
  82676. } else {
  82677. var result = record.arg;
  82678. var value = result.value;
  82679. if (value &&
  82680. typeof value === "object" &&
  82681. hasOwn.call(value, "__await")) {
  82682. return Promise.resolve(value.__await).then(function(value) {
  82683. invoke("next", value, resolve, reject);
  82684. }, function(err) {
  82685. invoke("throw", err, resolve, reject);
  82686. });
  82687. }
  82688. return Promise.resolve(value).then(function(unwrapped) {
  82689. // When a yielded Promise is resolved, its final value becomes
  82690. // the .value of the Promise<{value,done}> result for the
  82691. // current iteration. If the Promise is rejected, however, the
  82692. // result for this iteration will be rejected with the same
  82693. // reason. Note that rejections of yielded Promises are not
  82694. // thrown back into the generator function, as is the case
  82695. // when an awaited Promise is rejected. This difference in
  82696. // behavior between yield and await is important, because it
  82697. // allows the consumer to decide what to do with the yielded
  82698. // rejection (swallow it and continue, manually .throw it back
  82699. // into the generator, abandon iteration, whatever). With
  82700. // await, by contrast, there is no opportunity to examine the
  82701. // rejection reason outside the generator function, so the
  82702. // only option is to throw it from the await expression, and
  82703. // let the generator function handle the exception.
  82704. result.value = unwrapped;
  82705. resolve(result);
  82706. }, reject);
  82707. }
  82708. }
  82709. var previousPromise;
  82710. function enqueue(method, arg) {
  82711. function callInvokeWithMethodAndArg() {
  82712. return new Promise(function(resolve, reject) {
  82713. invoke(method, arg, resolve, reject);
  82714. });
  82715. }
  82716. return previousPromise =
  82717. // If enqueue has been called before, then we want to wait until
  82718. // all previous Promises have been resolved before calling invoke,
  82719. // so that results are always delivered in the correct order. If
  82720. // enqueue has not been called before, then it is important to
  82721. // call invoke immediately, without waiting on a callback to fire,
  82722. // so that the async generator function has the opportunity to do
  82723. // any necessary setup in a predictable way. This predictability
  82724. // is why the Promise constructor synchronously invokes its
  82725. // executor callback, and why async functions synchronously
  82726. // execute code before the first await. Since we implement simple
  82727. // async functions in terms of async generators, it is especially
  82728. // important to get this right, even though it requires care.
  82729. previousPromise ? previousPromise.then(
  82730. callInvokeWithMethodAndArg,
  82731. // Avoid propagating failures to Promises returned by later
  82732. // invocations of the iterator.
  82733. callInvokeWithMethodAndArg
  82734. ) : callInvokeWithMethodAndArg();
  82735. }
  82736. // Define the unified helper method that is used to implement .next,
  82737. // .throw, and .return (see defineIteratorMethods).
  82738. this._invoke = enqueue;
  82739. }
  82740. defineIteratorMethods(AsyncIterator.prototype);
  82741. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  82742. return this;
  82743. };
  82744. runtime.AsyncIterator = AsyncIterator;
  82745. // Note that simple async functions are implemented on top of
  82746. // AsyncIterator objects; they just return a Promise for the value of
  82747. // the final result produced by the iterator.
  82748. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  82749. var iter = new AsyncIterator(
  82750. wrap(innerFn, outerFn, self, tryLocsList)
  82751. );
  82752. return runtime.isGeneratorFunction(outerFn)
  82753. ? iter // If outerFn is a generator, return the full iterator.
  82754. : iter.next().then(function(result) {
  82755. return result.done ? result.value : iter.next();
  82756. });
  82757. };
  82758. function makeInvokeMethod(innerFn, self, context) {
  82759. var state = GenStateSuspendedStart;
  82760. return function invoke(method, arg) {
  82761. if (state === GenStateExecuting) {
  82762. throw new Error("Generator is already running");
  82763. }
  82764. if (state === GenStateCompleted) {
  82765. if (method === "throw") {
  82766. throw arg;
  82767. }
  82768. // Be forgiving, per 25.3.3.3.3 of the spec:
  82769. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  82770. return doneResult();
  82771. }
  82772. context.method = method;
  82773. context.arg = arg;
  82774. while (true) {
  82775. var delegate = context.delegate;
  82776. if (delegate) {
  82777. var delegateResult = maybeInvokeDelegate(delegate, context);
  82778. if (delegateResult) {
  82779. if (delegateResult === ContinueSentinel) continue;
  82780. return delegateResult;
  82781. }
  82782. }
  82783. if (context.method === "next") {
  82784. // Setting context._sent for legacy support of Babel's
  82785. // function.sent implementation.
  82786. context.sent = context._sent = context.arg;
  82787. } else if (context.method === "throw") {
  82788. if (state === GenStateSuspendedStart) {
  82789. state = GenStateCompleted;
  82790. throw context.arg;
  82791. }
  82792. context.dispatchException(context.arg);
  82793. } else if (context.method === "return") {
  82794. context.abrupt("return", context.arg);
  82795. }
  82796. state = GenStateExecuting;
  82797. var record = tryCatch(innerFn, self, context);
  82798. if (record.type === "normal") {
  82799. // If an exception is thrown from innerFn, we leave state ===
  82800. // GenStateExecuting and loop back for another invocation.
  82801. state = context.done
  82802. ? GenStateCompleted
  82803. : GenStateSuspendedYield;
  82804. if (record.arg === ContinueSentinel) {
  82805. continue;
  82806. }
  82807. return {
  82808. value: record.arg,
  82809. done: context.done
  82810. };
  82811. } else if (record.type === "throw") {
  82812. state = GenStateCompleted;
  82813. // Dispatch the exception by looping back around to the
  82814. // context.dispatchException(context.arg) call above.
  82815. context.method = "throw";
  82816. context.arg = record.arg;
  82817. }
  82818. }
  82819. };
  82820. }
  82821. // Call delegate.iterator[context.method](context.arg) and handle the
  82822. // result, either by returning a { value, done } result from the
  82823. // delegate iterator, or by modifying context.method and context.arg,
  82824. // setting context.delegate to null, and returning the ContinueSentinel.
  82825. function maybeInvokeDelegate(delegate, context) {
  82826. var method = delegate.iterator[context.method];
  82827. if (method === undefined) {
  82828. // A .throw or .return when the delegate iterator has no .throw
  82829. // method always terminates the yield* loop.
  82830. context.delegate = null;
  82831. if (context.method === "throw") {
  82832. if (delegate.iterator.return) {
  82833. // If the delegate iterator has a return method, give it a
  82834. // chance to clean up.
  82835. context.method = "return";
  82836. context.arg = undefined;
  82837. maybeInvokeDelegate(delegate, context);
  82838. if (context.method === "throw") {
  82839. // If maybeInvokeDelegate(context) changed context.method from
  82840. // "return" to "throw", let that override the TypeError below.
  82841. return ContinueSentinel;
  82842. }
  82843. }
  82844. context.method = "throw";
  82845. context.arg = new TypeError(
  82846. "The iterator does not provide a 'throw' method");
  82847. }
  82848. return ContinueSentinel;
  82849. }
  82850. var record = tryCatch(method, delegate.iterator, context.arg);
  82851. if (record.type === "throw") {
  82852. context.method = "throw";
  82853. context.arg = record.arg;
  82854. context.delegate = null;
  82855. return ContinueSentinel;
  82856. }
  82857. var info = record.arg;
  82858. if (! info) {
  82859. context.method = "throw";
  82860. context.arg = new TypeError("iterator result is not an object");
  82861. context.delegate = null;
  82862. return ContinueSentinel;
  82863. }
  82864. if (info.done) {
  82865. // Assign the result of the finished delegate to the temporary
  82866. // variable specified by delegate.resultName (see delegateYield).
  82867. context[delegate.resultName] = info.value;
  82868. // Resume execution at the desired location (see delegateYield).
  82869. context.next = delegate.nextLoc;
  82870. // If context.method was "throw" but the delegate handled the
  82871. // exception, let the outer generator proceed normally. If
  82872. // context.method was "next", forget context.arg since it has been
  82873. // "consumed" by the delegate iterator. If context.method was
  82874. // "return", allow the original .return call to continue in the
  82875. // outer generator.
  82876. if (context.method !== "return") {
  82877. context.method = "next";
  82878. context.arg = undefined;
  82879. }
  82880. } else {
  82881. // Re-yield the result returned by the delegate method.
  82882. return info;
  82883. }
  82884. // The delegate iterator is finished, so forget it and continue with
  82885. // the outer generator.
  82886. context.delegate = null;
  82887. return ContinueSentinel;
  82888. }
  82889. // Define Generator.prototype.{next,throw,return} in terms of the
  82890. // unified ._invoke helper method.
  82891. defineIteratorMethods(Gp);
  82892. Gp[toStringTagSymbol] = "Generator";
  82893. // A Generator should always return itself as the iterator object when the
  82894. // @@iterator function is called on it. Some browsers' implementations of the
  82895. // iterator prototype chain incorrectly implement this, causing the Generator
  82896. // object to not be returned from this call. This ensures that doesn't happen.
  82897. // See https://github.com/facebook/regenerator/issues/274 for more details.
  82898. Gp[iteratorSymbol] = function() {
  82899. return this;
  82900. };
  82901. Gp.toString = function() {
  82902. return "[object Generator]";
  82903. };
  82904. function pushTryEntry(locs) {
  82905. var entry = { tryLoc: locs[0] };
  82906. if (1 in locs) {
  82907. entry.catchLoc = locs[1];
  82908. }
  82909. if (2 in locs) {
  82910. entry.finallyLoc = locs[2];
  82911. entry.afterLoc = locs[3];
  82912. }
  82913. this.tryEntries.push(entry);
  82914. }
  82915. function resetTryEntry(entry) {
  82916. var record = entry.completion || {};
  82917. record.type = "normal";
  82918. delete record.arg;
  82919. entry.completion = record;
  82920. }
  82921. function Context(tryLocsList) {
  82922. // The root entry object (effectively a try statement without a catch
  82923. // or a finally block) gives us a place to store values thrown from
  82924. // locations where there is no enclosing try statement.
  82925. this.tryEntries = [{ tryLoc: "root" }];
  82926. tryLocsList.forEach(pushTryEntry, this);
  82927. this.reset(true);
  82928. }
  82929. runtime.keys = function(object) {
  82930. var keys = [];
  82931. for (var key in object) {
  82932. keys.push(key);
  82933. }
  82934. keys.reverse();
  82935. // Rather than returning an object with a next method, we keep
  82936. // things simple and return the next function itself.
  82937. return function next() {
  82938. while (keys.length) {
  82939. var key = keys.pop();
  82940. if (key in object) {
  82941. next.value = key;
  82942. next.done = false;
  82943. return next;
  82944. }
  82945. }
  82946. // To avoid creating an additional object, we just hang the .value
  82947. // and .done properties off the next function object itself. This
  82948. // also ensures that the minifier will not anonymize the function.
  82949. next.done = true;
  82950. return next;
  82951. };
  82952. };
  82953. function values(iterable) {
  82954. if (iterable) {
  82955. var iteratorMethod = iterable[iteratorSymbol];
  82956. if (iteratorMethod) {
  82957. return iteratorMethod.call(iterable);
  82958. }
  82959. if (typeof iterable.next === "function") {
  82960. return iterable;
  82961. }
  82962. if (!isNaN(iterable.length)) {
  82963. var i = -1, next = function next() {
  82964. while (++i < iterable.length) {
  82965. if (hasOwn.call(iterable, i)) {
  82966. next.value = iterable[i];
  82967. next.done = false;
  82968. return next;
  82969. }
  82970. }
  82971. next.value = undefined;
  82972. next.done = true;
  82973. return next;
  82974. };
  82975. return next.next = next;
  82976. }
  82977. }
  82978. // Return an iterator with no values.
  82979. return { next: doneResult };
  82980. }
  82981. runtime.values = values;
  82982. function doneResult() {
  82983. return { value: undefined, done: true };
  82984. }
  82985. Context.prototype = {
  82986. constructor: Context,
  82987. reset: function(skipTempReset) {
  82988. this.prev = 0;
  82989. this.next = 0;
  82990. // Resetting context._sent for legacy support of Babel's
  82991. // function.sent implementation.
  82992. this.sent = this._sent = undefined;
  82993. this.done = false;
  82994. this.delegate = null;
  82995. this.method = "next";
  82996. this.arg = undefined;
  82997. this.tryEntries.forEach(resetTryEntry);
  82998. if (!skipTempReset) {
  82999. for (var name in this) {
  83000. // Not sure about the optimal order of these conditions:
  83001. if (name.charAt(0) === "t" &&
  83002. hasOwn.call(this, name) &&
  83003. !isNaN(+name.slice(1))) {
  83004. this[name] = undefined;
  83005. }
  83006. }
  83007. }
  83008. },
  83009. stop: function() {
  83010. this.done = true;
  83011. var rootEntry = this.tryEntries[0];
  83012. var rootRecord = rootEntry.completion;
  83013. if (rootRecord.type === "throw") {
  83014. throw rootRecord.arg;
  83015. }
  83016. return this.rval;
  83017. },
  83018. dispatchException: function(exception) {
  83019. if (this.done) {
  83020. throw exception;
  83021. }
  83022. var context = this;
  83023. function handle(loc, caught) {
  83024. record.type = "throw";
  83025. record.arg = exception;
  83026. context.next = loc;
  83027. if (caught) {
  83028. // If the dispatched exception was caught by a catch block,
  83029. // then let that catch block handle the exception normally.
  83030. context.method = "next";
  83031. context.arg = undefined;
  83032. }
  83033. return !! caught;
  83034. }
  83035. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  83036. var entry = this.tryEntries[i];
  83037. var record = entry.completion;
  83038. if (entry.tryLoc === "root") {
  83039. // Exception thrown outside of any try block that could handle
  83040. // it, so set the completion value of the entire function to
  83041. // throw the exception.
  83042. return handle("end");
  83043. }
  83044. if (entry.tryLoc <= this.prev) {
  83045. var hasCatch = hasOwn.call(entry, "catchLoc");
  83046. var hasFinally = hasOwn.call(entry, "finallyLoc");
  83047. if (hasCatch && hasFinally) {
  83048. if (this.prev < entry.catchLoc) {
  83049. return handle(entry.catchLoc, true);
  83050. } else if (this.prev < entry.finallyLoc) {
  83051. return handle(entry.finallyLoc);
  83052. }
  83053. } else if (hasCatch) {
  83054. if (this.prev < entry.catchLoc) {
  83055. return handle(entry.catchLoc, true);
  83056. }
  83057. } else if (hasFinally) {
  83058. if (this.prev < entry.finallyLoc) {
  83059. return handle(entry.finallyLoc);
  83060. }
  83061. } else {
  83062. throw new Error("try statement without catch or finally");
  83063. }
  83064. }
  83065. }
  83066. },
  83067. abrupt: function(type, arg) {
  83068. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  83069. var entry = this.tryEntries[i];
  83070. if (entry.tryLoc <= this.prev &&
  83071. hasOwn.call(entry, "finallyLoc") &&
  83072. this.prev < entry.finallyLoc) {
  83073. var finallyEntry = entry;
  83074. break;
  83075. }
  83076. }
  83077. if (finallyEntry &&
  83078. (type === "break" ||
  83079. type === "continue") &&
  83080. finallyEntry.tryLoc <= arg &&
  83081. arg <= finallyEntry.finallyLoc) {
  83082. // Ignore the finally entry if control is not jumping to a
  83083. // location outside the try/catch block.
  83084. finallyEntry = null;
  83085. }
  83086. var record = finallyEntry ? finallyEntry.completion : {};
  83087. record.type = type;
  83088. record.arg = arg;
  83089. if (finallyEntry) {
  83090. this.method = "next";
  83091. this.next = finallyEntry.finallyLoc;
  83092. return ContinueSentinel;
  83093. }
  83094. return this.complete(record);
  83095. },
  83096. complete: function(record, afterLoc) {
  83097. if (record.type === "throw") {
  83098. throw record.arg;
  83099. }
  83100. if (record.type === "break" ||
  83101. record.type === "continue") {
  83102. this.next = record.arg;
  83103. } else if (record.type === "return") {
  83104. this.rval = this.arg = record.arg;
  83105. this.method = "return";
  83106. this.next = "end";
  83107. } else if (record.type === "normal" && afterLoc) {
  83108. this.next = afterLoc;
  83109. }
  83110. return ContinueSentinel;
  83111. },
  83112. finish: function(finallyLoc) {
  83113. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  83114. var entry = this.tryEntries[i];
  83115. if (entry.finallyLoc === finallyLoc) {
  83116. this.complete(entry.completion, entry.afterLoc);
  83117. resetTryEntry(entry);
  83118. return ContinueSentinel;
  83119. }
  83120. }
  83121. },
  83122. "catch": function(tryLoc) {
  83123. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  83124. var entry = this.tryEntries[i];
  83125. if (entry.tryLoc === tryLoc) {
  83126. var record = entry.completion;
  83127. if (record.type === "throw") {
  83128. var thrown = record.arg;
  83129. resetTryEntry(entry);
  83130. }
  83131. return thrown;
  83132. }
  83133. }
  83134. // The context.catch method must only be called with a location
  83135. // argument that corresponds to a known catch block.
  83136. throw new Error("illegal catch attempt");
  83137. },
  83138. delegateYield: function(iterable, resultName, nextLoc) {
  83139. this.delegate = {
  83140. iterator: values(iterable),
  83141. resultName: resultName,
  83142. nextLoc: nextLoc
  83143. };
  83144. if (this.method === "next") {
  83145. // Deliberately forget the last sent value so that we don't
  83146. // accidentally pass it on to the delegate.
  83147. this.arg = undefined;
  83148. }
  83149. return ContinueSentinel;
  83150. }
  83151. };
  83152. })(
  83153. // In sloppy mode, unbound `this` refers to the global object, fallback to
  83154. // Function constructor if we're in global strict mode. That is sadly a form
  83155. // of indirect eval which violates Content Security Policy.
  83156. (function() { return this })() || Function("return this")()
  83157. );
  83158. /***/ }),
  83159. /* 937 */
  83160. /***/ (function(module, exports) {
  83161. (function () {
  83162. "use strict";
  83163. function btoa(str) {
  83164. var buffer
  83165. ;
  83166. if (str instanceof Buffer) {
  83167. buffer = str;
  83168. } else {
  83169. buffer = new Buffer(str.toString(), 'binary');
  83170. }
  83171. return buffer.toString('base64');
  83172. }
  83173. module.exports = btoa;
  83174. }());
  83175. /***/ }),
  83176. /* 938 */
  83177. /***/ (function(module, exports, __webpack_require__) {
  83178. const fs = __webpack_require__(112)
  83179. const path = __webpack_require__(60)
  83180. const log = __webpack_require__(24).namespace('cozy-client-js-stub')
  83181. const uuid = __webpack_require__(939)
  83182. const sha1 = __webpack_require__(465)
  83183. const bytesToUuid = __webpack_require__(113)
  83184. const mimetypes = __webpack_require__(111)
  83185. let fixture = {}
  83186. const FIXTURE_PATH = path.resolve('fixture.json')
  83187. if (fs.existsSync(FIXTURE_PATH)) {
  83188. log('debug', `Found ${FIXTURE_PATH} fixture file`)
  83189. fixture = !(function webpackMissingModule() { var e = new Error("Cannot find module \".\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())
  83190. }
  83191. module.exports = {
  83192. data: {
  83193. create (doctype, item) {
  83194. log('info', item, `creating ${doctype}`)
  83195. const ns = bytesToUuid(sha1(doctype))
  83196. const _id = uuid(JSON.stringify(item), ns).replace(/-/gi, '')
  83197. return Promise.resolve(Object.assign({}, item, {_id}))
  83198. },
  83199. updateAttributes (doctype, id, attrs) {
  83200. log('info', attrs, `updating ${id} in ${doctype}`)
  83201. return Promise.resolve(Object.assign({}, attrs, {_id: id}))
  83202. },
  83203. defineIndex (doctype) {
  83204. return Promise.resolve({doctype})
  83205. },
  83206. query (index) {
  83207. let result = null
  83208. if (fixture[index.doctype]) {
  83209. result = fixture[index.doctype]
  83210. } else {
  83211. result = []
  83212. }
  83213. return Promise.resolve(result)
  83214. },
  83215. findAll (doctype) {
  83216. let result = null
  83217. if (fixture[doctype]) {
  83218. result = fixture[doctype]
  83219. } else {
  83220. result = []
  83221. }
  83222. return Promise.resolve(result)
  83223. },
  83224. delete () {
  83225. return Promise.resolve({})
  83226. },
  83227. find (doctype, id) {
  83228. // Find the doc in the fixture
  83229. // exeption for "io.cozy.accounts" doctype where we return konnector-dev-config.json content
  83230. let result = null
  83231. if (doctype === 'io.cozy.accounts') {
  83232. const config = __webpack_require__(941)()
  83233. result = {auth: config.fields}
  83234. } else {
  83235. return Promise.reject(new Error('find is not implemented yet in cozy-client-js stub'))
  83236. }
  83237. return Promise.resolve(result)
  83238. }
  83239. },
  83240. files: {
  83241. statByPath (pathToCheck) {
  83242. // check this path in .
  83243. return new Promise((resolve, reject) => {
  83244. log('debug', `Checking if ${pathToCheck} exists`)
  83245. const realpath = path.join('.', pathToCheck)
  83246. log('debug', `Real path : ${realpath}`)
  83247. if (fs.existsSync(realpath)) {
  83248. resolve({_id: pathToCheck})
  83249. } else {
  83250. throw new Error(`${pathToCheck} does not exist`)
  83251. }
  83252. })
  83253. },
  83254. statById (idToCheck) {
  83255. // just return the / path for dev purpose
  83256. return Promise.resolve({attributes: {path: '/'}})
  83257. },
  83258. create (file, options) {
  83259. return new Promise((resolve, reject) => {
  83260. log('debug', `Creating new file ${options.name}`)
  83261. const finalPath = path.join('.', options.dirID, options.name)
  83262. log('debug', `Real path : ${finalPath}`)
  83263. let writeStream = fs.createWriteStream(finalPath)
  83264. file.pipe(writeStream)
  83265. file.on('end', () => {
  83266. log('info', `File ${finalPath} created`)
  83267. const extension = path.extname(options.name).substr(1)
  83268. resolve({
  83269. _id: options.name,
  83270. attributes: {
  83271. mime: mimetypes.lookup(extension),
  83272. name: options.name
  83273. }
  83274. })
  83275. })
  83276. writeStream.on('error', err => {
  83277. log('warn', `Error : ${err} while trying to write file`)
  83278. reject(new Error(err))
  83279. })
  83280. })
  83281. },
  83282. createDirectory (options) {
  83283. return new Promise(resolve => {
  83284. log('info', `Creating new directory ${options.name}`)
  83285. const finalPath = path.join('.', options.dirID, options.name)
  83286. log('info', `Real path : ${finalPath}`)
  83287. fs.mkdirSync(finalPath)
  83288. resolve()
  83289. })
  83290. }
  83291. }
  83292. }
  83293. /***/ }),
  83294. /* 939 */
  83295. /***/ (function(module, exports, __webpack_require__) {
  83296. var v35 = __webpack_require__(940);
  83297. var sha1 = __webpack_require__(465);
  83298. module.exports = v35('v5', 0x50, sha1);
  83299. /***/ }),
  83300. /* 940 */
  83301. /***/ (function(module, exports, __webpack_require__) {
  83302. var bytesToUuid = __webpack_require__(113);
  83303. function uuidToBytes(uuid) {
  83304. // Note: We assume we're being passed a valid uuid string
  83305. var bytes = [];
  83306. uuid.replace(/[a-fA-F0-9]{2}/g, function(hex) {
  83307. bytes.push(parseInt(hex, 16));
  83308. });
  83309. return bytes;
  83310. }
  83311. function stringToBytes(str) {
  83312. str = unescape(encodeURIComponent(str)); // UTF8 escape
  83313. var bytes = new Array(str.length);
  83314. for (var i = 0; i < str.length; i++) {
  83315. bytes[i] = str.charCodeAt(i);
  83316. }
  83317. return bytes;
  83318. }
  83319. module.exports = function(name, version, hashfunc) {
  83320. var generateUUID = function(value, namespace, buf, offset) {
  83321. var off = buf && offset || 0;
  83322. if (typeof(value) == 'string') value = stringToBytes(value);
  83323. if (typeof(namespace) == 'string') namespace = uuidToBytes(namespace);
  83324. if (!Array.isArray(value)) throw TypeError('value must be an array of bytes');
  83325. if (!Array.isArray(namespace) || namespace.length !== 16) throw TypeError('namespace must be uuid string or an Array of 16 byte values');
  83326. // Per 4.3
  83327. var bytes = hashfunc(namespace.concat(value));
  83328. bytes[6] = (bytes[6] & 0x0f) | version;
  83329. bytes[8] = (bytes[8] & 0x3f) | 0x80;
  83330. if (buf) {
  83331. for (var idx = 0; idx < 16; ++idx) {
  83332. buf[off+idx] = bytes[idx];
  83333. }
  83334. }
  83335. return buf || bytesToUuid(bytes);
  83336. };
  83337. generateUUID.name = name;
  83338. // Pre-defined namespaces, per Appendix C
  83339. generateUUID.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
  83340. generateUUID.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
  83341. return generateUUID;
  83342. };
  83343. /***/ }),
  83344. /* 941 */
  83345. /***/ (function(module, exports, __webpack_require__) {
  83346. "use strict";
  83347. const fs = __webpack_require__(112)
  83348. const path = __webpack_require__(60)
  83349. const log = __webpack_require__(24)
  83350. module.exports = getKonnectorConfig
  83351. const configPath = path.resolve('konnector-dev-config.json')
  83352. function getKonnectorConfig () {
  83353. if (!fs.existsSync(configPath)) createKonnectorConfig()
  83354. return !(function webpackMissingModule() { var e = new Error("Cannot find module \".\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())
  83355. }
  83356. const template = {
  83357. COZY_URL: 'http://cozy.tools:8080', // this URL resolves to localhost, it works well when you have running local cozy-stack
  83358. fields: {} // TODO read the fields in the manifest and add these fields in the template
  83359. }
  83360. function createKonnectorConfig () {
  83361. fs.writeFileSync(configPath, JSON.stringify(template, null, ' '))
  83362. log('warn', `No ${configPath} file found, creating an empty one. To let you add fields for your connector.`)
  83363. setImmediate(() => process.exit())
  83364. }
  83365. /***/ }),
  83366. /* 942 */
  83367. /***/ (function(module, exports, __webpack_require__) {
  83368. "use strict";
  83369. const cozy = __webpack_require__(51)
  83370. const log = __webpack_require__(24).namespace('BaseKonnector')
  83371. const Secret = __webpack_require__(330)
  83372. const errors = __webpack_require__(206)
  83373. /**
  83374. * @class
  83375. * The class from which all the connectors must inherit.
  83376. * It takes a fetch function in parameter that must return a `Promise`.
  83377. *
  83378. * @example
  83379. * ```
  83380. * const { BaseKonnector } = require('cozy-konnector-libs')
  83381. *
  83382. * module.exports = new BaseKonnector(function fetch () {
  83383. * // use this to access the instance of the konnector to
  83384. * // store any information that needs to be passed to
  83385. * // different stages of the konnector
  83386. * })
  83387. * ```
  83388. *
  83389. * @description
  83390. * Its role is twofold :
  83391. *
  83392. * - Make the link between account data and konnector
  83393. * - Handle errors
  83394. *
  83395. * ```
  83396. * this.terminate('LOGIN_FAILED')
  83397. * ```
  83398. */
  83399. class baseKonnector {
  83400. /**
  83401. * Constructor
  83402. *
  83403. * @param {function} fetch - Function to be run automatically after account data is fetched.
  83404. * This function will be binded to the current connector.
  83405. *
  83406. * If not fetch function is given. The connector will have to handle itself it's own exection and
  83407. * error handling
  83408. */
  83409. constructor (fetch) {
  83410. if (typeof fetch === 'function') {
  83411. this.fetch = fetch.bind(this)
  83412. return this.run()
  83413. }
  83414. }
  83415. run () {
  83416. return this.init()
  83417. .then(requiredFields => this.fetch(requiredFields))
  83418. .then(this.end)
  83419. .catch(this.fail.bind(this))
  83420. }
  83421. /**
  83422. * Hook called when the connector is ended
  83423. */
  83424. end () {
  83425. log('info', 'The connector has been run')
  83426. }
  83427. /**
  83428. * Hook called when the connector fails
  83429. */
  83430. fail (err) {
  83431. log('warn', 'Error caught by BaseKonnector')
  83432. const error = err.message || err
  83433. // if we have an unexpected error, display the stack trace
  83434. if (!errors[error]) console.log(err, 'unexpected error detail')
  83435. this.terminate(error)
  83436. }
  83437. /**
  83438. * Initializes the current connector with data comming from the associated account
  83439. *
  83440. * @return {Promise} with the fields as an object
  83441. */
  83442. init () {
  83443. const cozyFields = JSON.parse(process.env.COZY_FIELDS)
  83444. log('debug', cozyFields, 'cozyFields in fetch')
  83445. // First get the account related to the specified account id
  83446. return cozy.data.find('io.cozy.accounts', cozyFields.account)
  83447. .catch(err => {
  83448. log('error', err)
  83449. log('error', `Account ${cozyFields.account} does not exist`)
  83450. this.terminate('CANNOT_FIND_ACCOUNT')
  83451. })
  83452. .then(account => {
  83453. this.accountId = cozyFields.account
  83454. this._account = account
  83455. // folder ID will be stored in cozyFields.folder_to_save when first connection
  83456. const folderId = account.folderId || cozyFields.folder_to_save
  83457. if (!folderId) { // if no folder needed
  83458. log('debug', 'No folder needed')
  83459. return Promise.resolve(account)
  83460. }
  83461. return cozy.files.statById(folderId, false)
  83462. .then(folder => {
  83463. cozyFields.folder_to_save = folder.attributes.path
  83464. log('debug', folder, 'folder details')
  83465. return account
  83466. })
  83467. .catch(err => {
  83468. log('error', err)
  83469. log('error', `error while getting the folder path of ${folderId}`)
  83470. this.terminate('NOT_EXISTING_DIRECTORY')
  83471. return {} // to avoid having an undefined account for next part
  83472. })
  83473. })
  83474. .then(account => {
  83475. this.fields = Object.assign(cozyFields.folder_to_save ? {
  83476. folderPath: cozyFields.folder_to_save
  83477. } : {}, account.auth, account.oauth)
  83478. return this.fields
  83479. })
  83480. }
  83481. /**
  83482. * Saves data to the account that is passed to the konnector.
  83483. * Use it to persist data that needs to be passed to each
  83484. * konnector run.
  83485. *
  83486. * By default, the data is merged to the remote data, use
  83487. * `options.merge = false` to overwrite the data.
  83488. *
  83489. * The data is saved under the `.data` attribute of the cozy
  83490. * account.
  83491. *
  83492. * @param {object} data - Attributes to be merged
  83493. * @param {object} options - { merge: true|false }
  83494. * @return {Promise}
  83495. */
  83496. saveAccountData (data, options) {
  83497. options = options || {}
  83498. options.merge = options.merge === undefined ? true : options.merge
  83499. const start = options.merge ? Object.assign({}, this.getAccountData()) : {}
  83500. const newData = Object.assign({}, start, data)
  83501. return cozy.data.updateAttributes('io.cozy.accounts', this.accountId, {data: newData})
  83502. .then(account => {
  83503. this._account = account
  83504. return account.data
  83505. })
  83506. }
  83507. getAccountData () {
  83508. return new Secret(this._account.data || {})
  83509. }
  83510. /**
  83511. * Send a special error code which is interpreted by the cozy stack to terminate the execution of the
  83512. * connector now
  83513. *
  83514. * @param {string} message - The error code to be saved as connector result see [docs/ERROR_CODES.md]
  83515. */
  83516. terminate (message) {
  83517. // Encapsulating in a Promise allows to prevent then() calls before
  83518. // process.exit is actually called.
  83519. return new Promise(() => {
  83520. // The error log is also sent to be compatible with older versions of the cozy stack
  83521. // For version of the stack older than 18bcbd5865a46026de6f794f661d83d5d87a3dbf
  83522. log('error', message)
  83523. log('critical', message)
  83524. // Allow asynchronous calls to end, for example, previous log calls.
  83525. // To breack promise chaining and avoid then() calls to be made,
  83526. // The call is encapsulated in a promise, see above.
  83527. setImmediate(() => process.exit(1))
  83528. })
  83529. }
  83530. }
  83531. module.exports = baseKonnector
  83532. /***/ }),
  83533. /* 943 */
  83534. /***/ (function(module, exports, __webpack_require__) {
  83535. /**
  83536. * Combines the features of `saveFiles`, `hydrateAndFilter`, `addData` and `linkBankOperations`.
  83537. * Will create `io.cozy.bills` objects. The default deduplication keys are
  83538. * `['date', 'amount', 'vendor']`.
  83539. *
  83540. * `options` is passed directly to `saveFiles`, `hydrateAndFilter`, `addData` and `linkBankOperations`.
  83541. *
  83542. * @module saveBills
  83543. */
  83544. const saveFiles = __webpack_require__(467)
  83545. const hydrateAndFilter = __webpack_require__(437)
  83546. const addData = __webpack_require__(468)
  83547. const linkBankOperations = __webpack_require__(469)
  83548. const DOCTYPE = 'io.cozy.bills'
  83549. // Encapsulate the saving of Bills : saves the files, saves the new data, and associate the files
  83550. // to an existing bank operation
  83551. module.exports = (entries, fields, options = {}) => {
  83552. if (entries.length === 0) return Promise.resolve()
  83553. if (typeof fields === 'string') {
  83554. fields = { folderPath: fields }
  83555. }
  83556. // Deduplicate on this keys
  83557. options.keys = ['date', 'amount', 'vendor']
  83558. options.postProcess = function (entry) {
  83559. if (entry.fileDocument) {
  83560. entry.invoice = `io.cozy.files:${entry.fileDocument._id}`
  83561. }
  83562. delete entry.fileDocument
  83563. return entry
  83564. }
  83565. const originalEntries = entries
  83566. return saveFiles(entries, fields, options)
  83567. .then(entries => hydrateAndFilter(entries, DOCTYPE, options))
  83568. .then(entries => addData(entries, DOCTYPE, options))
  83569. .then(entries => linkBankOperations(originalEntries, DOCTYPE, fields, options))
  83570. }
  83571. /***/ }),
  83572. /* 944 */
  83573. /***/ (function(module, exports, __webpack_require__) {
  83574. const { operationsFilters } = __webpack_require__(945)
  83575. const { fetchNeighboringOperations } = __webpack_require__(962)
  83576. const { sortedOperations } = __webpack_require__(207)
  83577. const findOperation = (cozyClient, bill, options) => {
  83578. // By default, a bill is an expense. If it is not, it should be
  83579. // declared as a refund: isRefund=true.
  83580. if (options.credit && !bill.isRefund) return
  83581. return fetchNeighboringOperations(cozyClient, bill, options)
  83582. .then(operations => {
  83583. operations = operationsFilters(bill, operations, options)
  83584. operations = sortedOperations(bill, operations)
  83585. return operations[0]
  83586. })
  83587. }
  83588. const findDebitOperation = findOperation
  83589. const findCreditOperation = (cozyClient, bill, options) => {
  83590. const creditOptions = Object.assign({}, options, {credit: true})
  83591. return findOperation(cozyClient, bill, creditOptions)
  83592. }
  83593. module.exports = {
  83594. findDebitOperation,
  83595. findCreditOperation
  83596. }
  83597. /***/ }),
  83598. /* 945 */
  83599. /***/ (function(module, exports, __webpack_require__) {
  83600. const every = __webpack_require__(946)
  83601. const includes = __webpack_require__(949)
  83602. const some = __webpack_require__(425)
  83603. const isWithinRange = __webpack_require__(952)
  83604. const { getIdentifiers, getDateRangeFromBill, getAmountRangeFromBill } = __webpack_require__(207)
  83605. // constants
  83606. const HEALTH_VENDORS = ['Ameli', 'Harmonie', 'Malakoff Mederic', 'MGEN'] // TODO: to import from each konnector
  83607. const HEALTH_CAT_ID_OPERATION = '400610' // TODO: import it from cozy-bank
  83608. const UNCATEGORIZED_CAT_ID_OPERATION = '0' // TODO: import it from cozy-bank
  83609. // helpers
  83610. const getCategoryId = o => {
  83611. return o.manualCategoryId
  83612. || o.automaticCategoryId
  83613. || UNCATEGORIZED_CAT_ID_OPERATION
  83614. }
  83615. const checkOperationCategory = (operation, categoryId) => {
  83616. return categoryId === getCategoryId(operation)
  83617. }
  83618. const isHealthOperation = operation => {
  83619. return checkOperationCategory(operation, HEALTH_CAT_ID_OPERATION)
  83620. }
  83621. const isUncategorizedOperation = operation => {
  83622. return checkOperationCategory(operation, UNCATEGORIZED_CAT_ID_OPERATION)
  83623. }
  83624. const isHealthBill = bill => {
  83625. return includes(HEALTH_VENDORS, bill.vendor)
  83626. }
  83627. // filters
  83628. const filterByIdentifiers = identifiers => {
  83629. identifiers = identifiers.map(i => i.toLowerCase())
  83630. return operation => {
  83631. const label = operation.label.toLowerCase()
  83632. return some(identifiers, identifier => includes(label, identifier))
  83633. }
  83634. }
  83635. const filterByDates = ({ minDate, maxDate }) => operation => {
  83636. return isWithinRange(operation.date, minDate, maxDate)
  83637. }
  83638. const filterByAmounts = ({ minAmount, maxAmount }) => operation => {
  83639. return operation.amount >= minAmount && operation.amount <= maxAmount
  83640. }
  83641. const filterByCategory = bill => operation => {
  83642. return isHealthBill(bill)
  83643. ? isHealthOperation(operation) || isUncategorizedOperation(operation)
  83644. : !isHealthOperation(operation) || isUncategorizedOperation(operation)
  83645. }
  83646. // combine filters
  83647. const operationsFilters = (bill, operations, options) => {
  83648. const filterByConditions = filters => op => {
  83649. return every(filters.map(f => f(op)))
  83650. }
  83651. const fByDates = filterByDates(getDateRangeFromBill(bill, options))
  83652. const fByAmounts = filterByAmounts(getAmountRangeFromBill(bill, options))
  83653. const fByCategory = filterByCategory(bill)
  83654. const conditions = [fByDates, fByAmounts, fByCategory]
  83655. // We filters with identifiers when
  83656. // - we search a credit operation
  83657. // - or when is bill is in the health category
  83658. if (options.credit || !isHealthBill(bill)) {
  83659. const fbyIdentifiers = filterByIdentifiers(getIdentifiers(options))
  83660. conditions.push(fbyIdentifiers)
  83661. }
  83662. return operations.filter(filterByConditions(conditions))
  83663. }
  83664. module.exports = {
  83665. filterByIdentifiers,
  83666. filterByDates,
  83667. filterByAmounts,
  83668. filterByCategory,
  83669. operationsFilters
  83670. }
  83671. /***/ }),
  83672. /* 946 */
  83673. /***/ (function(module, exports, __webpack_require__) {
  83674. var arrayEvery = __webpack_require__(947),
  83675. baseEvery = __webpack_require__(948),
  83676. baseIteratee = __webpack_require__(50),
  83677. isArray = __webpack_require__(9),
  83678. isIterateeCall = __webpack_require__(122);
  83679. /**
  83680. * Checks if `predicate` returns truthy for **all** elements of `collection`.
  83681. * Iteration is stopped once `predicate` returns falsey. The predicate is
  83682. * invoked with three arguments: (value, index|key, collection).
  83683. *
  83684. * **Note:** This method returns `true` for
  83685. * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
  83686. * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
  83687. * elements of empty collections.
  83688. *
  83689. * @static
  83690. * @memberOf _
  83691. * @since 0.1.0
  83692. * @category Collection
  83693. * @param {Array|Object} collection The collection to iterate over.
  83694. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  83695. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  83696. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  83697. * else `false`.
  83698. * @example
  83699. *
  83700. * _.every([true, 1, null, 'yes'], Boolean);
  83701. * // => false
  83702. *
  83703. * var users = [
  83704. * { 'user': 'barney', 'age': 36, 'active': false },
  83705. * { 'user': 'fred', 'age': 40, 'active': false }
  83706. * ];
  83707. *
  83708. * // The `_.matches` iteratee shorthand.
  83709. * _.every(users, { 'user': 'barney', 'active': false });
  83710. * // => false
  83711. *
  83712. * // The `_.matchesProperty` iteratee shorthand.
  83713. * _.every(users, ['active', false]);
  83714. * // => true
  83715. *
  83716. * // The `_.property` iteratee shorthand.
  83717. * _.every(users, 'active');
  83718. * // => false
  83719. */
  83720. function every(collection, predicate, guard) {
  83721. var func = isArray(collection) ? arrayEvery : baseEvery;
  83722. if (guard && isIterateeCall(collection, predicate, guard)) {
  83723. predicate = undefined;
  83724. }
  83725. return func(collection, baseIteratee(predicate, 3));
  83726. }
  83727. module.exports = every;
  83728. /***/ }),
  83729. /* 947 */
  83730. /***/ (function(module, exports) {
  83731. /**
  83732. * A specialized version of `_.every` for arrays without support for
  83733. * iteratee shorthands.
  83734. *
  83735. * @private
  83736. * @param {Array} [array] The array to iterate over.
  83737. * @param {Function} predicate The function invoked per iteration.
  83738. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  83739. * else `false`.
  83740. */
  83741. function arrayEvery(array, predicate) {
  83742. var index = -1,
  83743. length = array == null ? 0 : array.length;
  83744. while (++index < length) {
  83745. if (!predicate(array[index], index, array)) {
  83746. return false;
  83747. }
  83748. }
  83749. return true;
  83750. }
  83751. module.exports = arrayEvery;
  83752. /***/ }),
  83753. /* 948 */
  83754. /***/ (function(module, exports, __webpack_require__) {
  83755. var baseEach = __webpack_require__(69);
  83756. /**
  83757. * The base implementation of `_.every` without support for iteratee shorthands.
  83758. *
  83759. * @private
  83760. * @param {Array|Object} collection The collection to iterate over.
  83761. * @param {Function} predicate The function invoked per iteration.
  83762. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  83763. * else `false`
  83764. */
  83765. function baseEvery(collection, predicate) {
  83766. var result = true;
  83767. baseEach(collection, function(value, index, collection) {
  83768. result = !!predicate(value, index, collection);
  83769. return result;
  83770. });
  83771. return result;
  83772. }
  83773. module.exports = baseEvery;
  83774. /***/ }),
  83775. /* 949 */
  83776. /***/ (function(module, exports, __webpack_require__) {
  83777. var baseIndexOf = __webpack_require__(415),
  83778. isArrayLike = __webpack_require__(40),
  83779. isString = __webpack_require__(335),
  83780. toInteger = __webpack_require__(416),
  83781. values = __webpack_require__(950);
  83782. /* Built-in method references for those with the same name as other `lodash` methods. */
  83783. var nativeMax = Math.max;
  83784. /**
  83785. * Checks if `value` is in `collection`. If `collection` is a string, it's
  83786. * checked for a substring of `value`, otherwise
  83787. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  83788. * is used for equality comparisons. If `fromIndex` is negative, it's used as
  83789. * the offset from the end of `collection`.
  83790. *
  83791. * @static
  83792. * @memberOf _
  83793. * @since 0.1.0
  83794. * @category Collection
  83795. * @param {Array|Object|string} collection The collection to inspect.
  83796. * @param {*} value The value to search for.
  83797. * @param {number} [fromIndex=0] The index to search from.
  83798. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  83799. * @returns {boolean} Returns `true` if `value` is found, else `false`.
  83800. * @example
  83801. *
  83802. * _.includes([1, 2, 3], 1);
  83803. * // => true
  83804. *
  83805. * _.includes([1, 2, 3], 1, 2);
  83806. * // => false
  83807. *
  83808. * _.includes({ 'a': 1, 'b': 2 }, 1);
  83809. * // => true
  83810. *
  83811. * _.includes('abcd', 'bc');
  83812. * // => true
  83813. */
  83814. function includes(collection, value, fromIndex, guard) {
  83815. collection = isArrayLike(collection) ? collection : values(collection);
  83816. fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
  83817. var length = collection.length;
  83818. if (fromIndex < 0) {
  83819. fromIndex = nativeMax(length + fromIndex, 0);
  83820. }
  83821. return isString(collection)
  83822. ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
  83823. : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
  83824. }
  83825. module.exports = includes;
  83826. /***/ }),
  83827. /* 950 */
  83828. /***/ (function(module, exports, __webpack_require__) {
  83829. var baseValues = __webpack_require__(951),
  83830. keys = __webpack_require__(91);
  83831. /**
  83832. * Creates an array of the own enumerable string keyed property values of `object`.
  83833. *
  83834. * **Note:** Non-object values are coerced to objects.
  83835. *
  83836. * @static
  83837. * @since 0.1.0
  83838. * @memberOf _
  83839. * @category Object
  83840. * @param {Object} object The object to query.
  83841. * @returns {Array} Returns the array of property values.
  83842. * @example
  83843. *
  83844. * function Foo() {
  83845. * this.a = 1;
  83846. * this.b = 2;
  83847. * }
  83848. *
  83849. * Foo.prototype.c = 3;
  83850. *
  83851. * _.values(new Foo);
  83852. * // => [1, 2] (iteration order is not guaranteed)
  83853. *
  83854. * _.values('hi');
  83855. * // => ['h', 'i']
  83856. */
  83857. function values(object) {
  83858. return object == null ? [] : baseValues(object, keys(object));
  83859. }
  83860. module.exports = values;
  83861. /***/ }),
  83862. /* 951 */
  83863. /***/ (function(module, exports, __webpack_require__) {
  83864. var arrayMap = __webpack_require__(135);
  83865. /**
  83866. * The base implementation of `_.values` and `_.valuesIn` which creates an
  83867. * array of `object` property values corresponding to the property names
  83868. * of `props`.
  83869. *
  83870. * @private
  83871. * @param {Object} object The object to query.
  83872. * @param {Array} props The property names to get values for.
  83873. * @returns {Object} Returns the array of property values.
  83874. */
  83875. function baseValues(object, props) {
  83876. return arrayMap(props, function(key) {
  83877. return object[key];
  83878. });
  83879. }
  83880. module.exports = baseValues;
  83881. /***/ }),
  83882. /* 952 */
  83883. /***/ (function(module, exports, __webpack_require__) {
  83884. var parse = __webpack_require__(28)
  83885. /**
  83886. * @category Range Helpers
  83887. * @summary Is the given date within the range?
  83888. *
  83889. * @description
  83890. * Is the given date within the range?
  83891. *
  83892. * @param {Date|String|Number} date - the date to check
  83893. * @param {Date|String|Number} startDate - the start of range
  83894. * @param {Date|String|Number} endDate - the end of range
  83895. * @returns {Boolean} the date is within the range
  83896. * @throws {Error} startDate cannot be after endDate
  83897. *
  83898. * @example
  83899. * // For the date within the range:
  83900. * isWithinRange(
  83901. * new Date(2014, 0, 3), new Date(2014, 0, 1), new Date(2014, 0, 7)
  83902. * )
  83903. * //=> true
  83904. *
  83905. * @example
  83906. * // For the date outside of the range:
  83907. * isWithinRange(
  83908. * new Date(2014, 0, 10), new Date(2014, 0, 1), new Date(2014, 0, 7)
  83909. * )
  83910. * //=> false
  83911. */
  83912. function isWithinRange (dirtyDate, dirtyStartDate, dirtyEndDate) {
  83913. var time = parse(dirtyDate).getTime()
  83914. var startTime = parse(dirtyStartDate).getTime()
  83915. var endTime = parse(dirtyEndDate).getTime()
  83916. if (startTime > endTime) {
  83917. throw new Error('The start of the range cannot be after the end of the range')
  83918. }
  83919. return time >= startTime && time <= endTime
  83920. }
  83921. module.exports = isWithinRange
  83922. /***/ }),
  83923. /* 953 */
  83924. /***/ (function(module, exports, __webpack_require__) {
  83925. var baseFlatten = __webpack_require__(435),
  83926. baseOrderBy = __webpack_require__(954),
  83927. baseRest = __webpack_require__(120),
  83928. isIterateeCall = __webpack_require__(122);
  83929. /**
  83930. * Creates an array of elements, sorted in ascending order by the results of
  83931. * running each element in a collection thru each iteratee. This method
  83932. * performs a stable sort, that is, it preserves the original sort order of
  83933. * equal elements. The iteratees are invoked with one argument: (value).
  83934. *
  83935. * @static
  83936. * @memberOf _
  83937. * @since 0.1.0
  83938. * @category Collection
  83939. * @param {Array|Object} collection The collection to iterate over.
  83940. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  83941. * The iteratees to sort by.
  83942. * @returns {Array} Returns the new sorted array.
  83943. * @example
  83944. *
  83945. * var users = [
  83946. * { 'user': 'fred', 'age': 48 },
  83947. * { 'user': 'barney', 'age': 36 },
  83948. * { 'user': 'fred', 'age': 40 },
  83949. * { 'user': 'barney', 'age': 34 }
  83950. * ];
  83951. *
  83952. * _.sortBy(users, [function(o) { return o.user; }]);
  83953. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
  83954. *
  83955. * _.sortBy(users, ['user', 'age']);
  83956. * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
  83957. */
  83958. var sortBy = baseRest(function(collection, iteratees) {
  83959. if (collection == null) {
  83960. return [];
  83961. }
  83962. var length = iteratees.length;
  83963. if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
  83964. iteratees = [];
  83965. } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
  83966. iteratees = [iteratees[0]];
  83967. }
  83968. return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
  83969. });
  83970. module.exports = sortBy;
  83971. /***/ }),
  83972. /* 954 */
  83973. /***/ (function(module, exports, __webpack_require__) {
  83974. var arrayMap = __webpack_require__(135),
  83975. baseIteratee = __webpack_require__(50),
  83976. baseMap = __webpack_require__(436),
  83977. baseSortBy = __webpack_require__(955),
  83978. baseUnary = __webpack_require__(400),
  83979. compareMultiple = __webpack_require__(956),
  83980. identity = __webpack_require__(68);
  83981. /**
  83982. * The base implementation of `_.orderBy` without param guards.
  83983. *
  83984. * @private
  83985. * @param {Array|Object} collection The collection to iterate over.
  83986. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
  83987. * @param {string[]} orders The sort orders of `iteratees`.
  83988. * @returns {Array} Returns the new sorted array.
  83989. */
  83990. function baseOrderBy(collection, iteratees, orders) {
  83991. var index = -1;
  83992. iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));
  83993. var result = baseMap(collection, function(value, key, collection) {
  83994. var criteria = arrayMap(iteratees, function(iteratee) {
  83995. return iteratee(value);
  83996. });
  83997. return { 'criteria': criteria, 'index': ++index, 'value': value };
  83998. });
  83999. return baseSortBy(result, function(object, other) {
  84000. return compareMultiple(object, other, orders);
  84001. });
  84002. }
  84003. module.exports = baseOrderBy;
  84004. /***/ }),
  84005. /* 955 */
  84006. /***/ (function(module, exports) {
  84007. /**
  84008. * The base implementation of `_.sortBy` which uses `comparer` to define the
  84009. * sort order of `array` and replaces criteria objects with their corresponding
  84010. * values.
  84011. *
  84012. * @private
  84013. * @param {Array} array The array to sort.
  84014. * @param {Function} comparer The function to define sort order.
  84015. * @returns {Array} Returns `array`.
  84016. */
  84017. function baseSortBy(array, comparer) {
  84018. var length = array.length;
  84019. array.sort(comparer);
  84020. while (length--) {
  84021. array[length] = array[length].value;
  84022. }
  84023. return array;
  84024. }
  84025. module.exports = baseSortBy;
  84026. /***/ }),
  84027. /* 956 */
  84028. /***/ (function(module, exports, __webpack_require__) {
  84029. var compareAscending = __webpack_require__(957);
  84030. /**
  84031. * Used by `_.orderBy` to compare multiple properties of a value to another
  84032. * and stable sort them.
  84033. *
  84034. * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
  84035. * specify an order of "desc" for descending or "asc" for ascending sort order
  84036. * of corresponding values.
  84037. *
  84038. * @private
  84039. * @param {Object} object The object to compare.
  84040. * @param {Object} other The other object to compare.
  84041. * @param {boolean[]|string[]} orders The order to sort by for each property.
  84042. * @returns {number} Returns the sort order indicator for `object`.
  84043. */
  84044. function compareMultiple(object, other, orders) {
  84045. var index = -1,
  84046. objCriteria = object.criteria,
  84047. othCriteria = other.criteria,
  84048. length = objCriteria.length,
  84049. ordersLength = orders.length;
  84050. while (++index < length) {
  84051. var result = compareAscending(objCriteria[index], othCriteria[index]);
  84052. if (result) {
  84053. if (index >= ordersLength) {
  84054. return result;
  84055. }
  84056. var order = orders[index];
  84057. return result * (order == 'desc' ? -1 : 1);
  84058. }
  84059. }
  84060. // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
  84061. // that causes it, under certain circumstances, to provide the same value for
  84062. // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
  84063. // for more details.
  84064. //
  84065. // This also ensures a stable sort in V8 and other engines.
  84066. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
  84067. return object.index - other.index;
  84068. }
  84069. module.exports = compareMultiple;
  84070. /***/ }),
  84071. /* 957 */
  84072. /***/ (function(module, exports, __webpack_require__) {
  84073. var isSymbol = __webpack_require__(93);
  84074. /**
  84075. * Compares values to sort them in ascending order.
  84076. *
  84077. * @private
  84078. * @param {*} value The value to compare.
  84079. * @param {*} other The other value to compare.
  84080. * @returns {number} Returns the sort order indicator for `value`.
  84081. */
  84082. function compareAscending(value, other) {
  84083. if (value !== other) {
  84084. var valIsDefined = value !== undefined,
  84085. valIsNull = value === null,
  84086. valIsReflexive = value === value,
  84087. valIsSymbol = isSymbol(value);
  84088. var othIsDefined = other !== undefined,
  84089. othIsNull = other === null,
  84090. othIsReflexive = other === other,
  84091. othIsSymbol = isSymbol(other);
  84092. if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
  84093. (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
  84094. (valIsNull && othIsDefined && othIsReflexive) ||
  84095. (!valIsDefined && othIsReflexive) ||
  84096. !valIsReflexive) {
  84097. return 1;
  84098. }
  84099. if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
  84100. (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
  84101. (othIsNull && valIsDefined && valIsReflexive) ||
  84102. (!othIsDefined && valIsReflexive) ||
  84103. !othIsReflexive) {
  84104. return -1;
  84105. }
  84106. }
  84107. return 0;
  84108. }
  84109. module.exports = compareAscending;
  84110. /***/ }),
  84111. /* 958 */
  84112. /***/ (function(module, exports, __webpack_require__) {
  84113. var addDays = __webpack_require__(471)
  84114. /**
  84115. * @category Day Helpers
  84116. * @summary Subtract the specified number of days from the given date.
  84117. *
  84118. * @description
  84119. * Subtract the specified number of days from the given date.
  84120. *
  84121. * @param {Date|String|Number} date - the date to be changed
  84122. * @param {Number} amount - the amount of days to be subtracted
  84123. * @returns {Date} the new date with the days subtracted
  84124. *
  84125. * @example
  84126. * // Subtract 10 days from 1 September 2014:
  84127. * var result = subDays(new Date(2014, 8, 1), 10)
  84128. * //=> Fri Aug 22 2014 00:00:00
  84129. */
  84130. function subDays (dirtyDate, dirtyAmount) {
  84131. var amount = Number(dirtyAmount)
  84132. return addDays(dirtyDate, -amount)
  84133. }
  84134. module.exports = subDays
  84135. /***/ }),
  84136. /* 959 */
  84137. /***/ (function(module, exports, __webpack_require__) {
  84138. var parse = __webpack_require__(28)
  84139. var differenceInCalendarDays = __webpack_require__(472)
  84140. var compareAsc = __webpack_require__(961)
  84141. /**
  84142. * @category Day Helpers
  84143. * @summary Get the number of full days between the given dates.
  84144. *
  84145. * @description
  84146. * Get the number of full days between the given dates.
  84147. *
  84148. * @param {Date|String|Number} dateLeft - the later date
  84149. * @param {Date|String|Number} dateRight - the earlier date
  84150. * @returns {Number} the number of full days
  84151. *
  84152. * @example
  84153. * // How many full days are between
  84154. * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
  84155. * var result = differenceInDays(
  84156. * new Date(2012, 6, 2, 0, 0),
  84157. * new Date(2011, 6, 2, 23, 0)
  84158. * )
  84159. * //=> 365
  84160. */
  84161. function differenceInDays (dirtyDateLeft, dirtyDateRight) {
  84162. var dateLeft = parse(dirtyDateLeft)
  84163. var dateRight = parse(dirtyDateRight)
  84164. var sign = compareAsc(dateLeft, dateRight)
  84165. var difference = Math.abs(differenceInCalendarDays(dateLeft, dateRight))
  84166. dateLeft.setDate(dateLeft.getDate() - sign * difference)
  84167. // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full
  84168. // If so, result must be decreased by 1 in absolute value
  84169. var isLastDayNotFull = compareAsc(dateLeft, dateRight) === -sign
  84170. return sign * (difference - isLastDayNotFull)
  84171. }
  84172. module.exports = differenceInDays
  84173. /***/ }),
  84174. /* 960 */
  84175. /***/ (function(module, exports, __webpack_require__) {
  84176. var parse = __webpack_require__(28)
  84177. /**
  84178. * @category Day Helpers
  84179. * @summary Return the start of a day for the given date.
  84180. *
  84181. * @description
  84182. * Return the start of a day for the given date.
  84183. * The result will be in the local timezone.
  84184. *
  84185. * @param {Date|String|Number} date - the original date
  84186. * @returns {Date} the start of a day
  84187. *
  84188. * @example
  84189. * // The start of a day for 2 September 2014 11:55:00:
  84190. * var result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
  84191. * //=> Tue Sep 02 2014 00:00:00
  84192. */
  84193. function startOfDay (dirtyDate) {
  84194. var date = parse(dirtyDate)
  84195. date.setHours(0, 0, 0, 0)
  84196. return date
  84197. }
  84198. module.exports = startOfDay
  84199. /***/ }),
  84200. /* 961 */
  84201. /***/ (function(module, exports, __webpack_require__) {
  84202. var parse = __webpack_require__(28)
  84203. /**
  84204. * @category Common Helpers
  84205. * @summary Compare the two dates and return -1, 0 or 1.
  84206. *
  84207. * @description
  84208. * Compare the two dates and return 1 if the first date is after the second,
  84209. * -1 if the first date is before the second or 0 if dates are equal.
  84210. *
  84211. * @param {Date|String|Number} dateLeft - the first date to compare
  84212. * @param {Date|String|Number} dateRight - the second date to compare
  84213. * @returns {Number} the result of the comparison
  84214. *
  84215. * @example
  84216. * // Compare 11 February 1987 and 10 July 1989:
  84217. * var result = compareAsc(
  84218. * new Date(1987, 1, 11),
  84219. * new Date(1989, 6, 10)
  84220. * )
  84221. * //=> -1
  84222. *
  84223. * @example
  84224. * // Sort the array of dates:
  84225. * var result = [
  84226. * new Date(1995, 6, 2),
  84227. * new Date(1987, 1, 11),
  84228. * new Date(1989, 6, 10)
  84229. * ].sort(compareAsc)
  84230. * //=> [
  84231. * // Wed Feb 11 1987 00:00:00,
  84232. * // Mon Jul 10 1989 00:00:00,
  84233. * // Sun Jul 02 1995 00:00:00
  84234. * // ]
  84235. */
  84236. function compareAsc (dirtyDateLeft, dirtyDateRight) {
  84237. var dateLeft = parse(dirtyDateLeft)
  84238. var timeLeft = dateLeft.getTime()
  84239. var dateRight = parse(dirtyDateRight)
  84240. var timeRight = dateRight.getTime()
  84241. if (timeLeft < timeRight) {
  84242. return -1
  84243. } else if (timeLeft > timeRight) {
  84244. return 1
  84245. } else {
  84246. return 0
  84247. }
  84248. }
  84249. module.exports = compareAsc
  84250. /***/ }),
  84251. /* 962 */
  84252. /***/ (function(module, exports, __webpack_require__) {
  84253. const format = __webpack_require__(963)
  84254. const { getDateRangeFromBill, getAmountRangeFromBill } = __webpack_require__(207)
  84255. // cozy-stack limit to 100 elements max
  84256. const COZY_STACK_QUERY_LIMIT = 100
  84257. const DOCTYPE_OPERATIONS = 'io.cozy.bank.operations'
  84258. // Get the operations corresponding to the date interval
  84259. // around the date of the bill
  84260. const createDateSelector = (bill, options) => {
  84261. const { minDate, maxDate } = getDateRangeFromBill(bill, options)
  84262. const dateFormat = 'YYYY-MM-DDT00:00:00.000 [Z]'
  84263. return {
  84264. $gt: format(minDate, dateFormat),
  84265. $lt: format(maxDate, dateFormat)
  84266. }
  84267. }
  84268. // Get the operations corresponding to the date interval
  84269. // around the amount of the bill
  84270. const createAmountSelector = (bill, options) => {
  84271. const {minAmount, maxAmount} = getAmountRangeFromBill(bill, options)
  84272. return {
  84273. $gt: minAmount,
  84274. $lt: maxAmount
  84275. }
  84276. }
  84277. const getQueryOptions = (bill, options, ids) => {
  84278. const queryOptions = {
  84279. selector: {
  84280. date: createDateSelector(bill, options),
  84281. amount: createAmountSelector(bill, options)
  84282. },
  84283. sort: [{date: 'desc'}, {amount: 'desc'}],
  84284. COZY_STACK_QUERY_LIMIT
  84285. }
  84286. if (ids.length > 0) {
  84287. queryOptions.skip = ids.length
  84288. }
  84289. return queryOptions
  84290. }
  84291. const fetchNeighboringOperations = (cozyClient, bill, options) => {
  84292. let operations = []
  84293. const fetchAll = (index, ids = []) => {
  84294. const queryOptions = getQueryOptions(bill, options, ids)
  84295. return cozyClient.data.query(index, queryOptions)
  84296. .then(ops => {
  84297. operations = operations.concat(ops)
  84298. if (ops.length === COZY_STACK_QUERY_LIMIT) {
  84299. const newIds = ops.map(op => op._id)
  84300. return fetchAll(index, ids.concat(ops))
  84301. } else {
  84302. return operations
  84303. }
  84304. })
  84305. }
  84306. return cozyClient.data.defineIndex(DOCTYPE_OPERATIONS, ['date', 'amount'])
  84307. .then(index => fetchAll(index))
  84308. }
  84309. module.exports = {fetchNeighboringOperations}
  84310. /***/ }),
  84311. /* 963 */
  84312. /***/ (function(module, exports, __webpack_require__) {
  84313. var getDayOfYear = __webpack_require__(964)
  84314. var getISOWeek = __webpack_require__(966)
  84315. var getISOYear = __webpack_require__(473)
  84316. var parse = __webpack_require__(28)
  84317. var isValid = __webpack_require__(969)
  84318. var enLocale = __webpack_require__(970)
  84319. /**
  84320. * @category Common Helpers
  84321. * @summary Format the date.
  84322. *
  84323. * @description
  84324. * Return the formatted date string in the given format.
  84325. *
  84326. * Accepted tokens:
  84327. * | Unit | Token | Result examples |
  84328. * |-------------------------|-------|----------------------------------|
  84329. * | Month | M | 1, 2, ..., 12 |
  84330. * | | Mo | 1st, 2nd, ..., 12th |
  84331. * | | MM | 01, 02, ..., 12 |
  84332. * | | MMM | Jan, Feb, ..., Dec |
  84333. * | | MMMM | January, February, ..., December |
  84334. * | Quarter | Q | 1, 2, 3, 4 |
  84335. * | | Qo | 1st, 2nd, 3rd, 4th |
  84336. * | Day of month | D | 1, 2, ..., 31 |
  84337. * | | Do | 1st, 2nd, ..., 31st |
  84338. * | | DD | 01, 02, ..., 31 |
  84339. * | Day of year | DDD | 1, 2, ..., 366 |
  84340. * | | DDDo | 1st, 2nd, ..., 366th |
  84341. * | | DDDD | 001, 002, ..., 366 |
  84342. * | Day of week | d | 0, 1, ..., 6 |
  84343. * | | do | 0th, 1st, ..., 6th |
  84344. * | | dd | Su, Mo, ..., Sa |
  84345. * | | ddd | Sun, Mon, ..., Sat |
  84346. * | | dddd | Sunday, Monday, ..., Saturday |
  84347. * | Day of ISO week | E | 1, 2, ..., 7 |
  84348. * | ISO week | W | 1, 2, ..., 53 |
  84349. * | | Wo | 1st, 2nd, ..., 53rd |
  84350. * | | WW | 01, 02, ..., 53 |
  84351. * | Year | YY | 00, 01, ..., 99 |
  84352. * | | YYYY | 1900, 1901, ..., 2099 |
  84353. * | ISO week-numbering year | GG | 00, 01, ..., 99 |
  84354. * | | GGGG | 1900, 1901, ..., 2099 |
  84355. * | AM/PM | A | AM, PM |
  84356. * | | a | am, pm |
  84357. * | | aa | a.m., p.m. |
  84358. * | Hour | H | 0, 1, ... 23 |
  84359. * | | HH | 00, 01, ... 23 |
  84360. * | | h | 1, 2, ..., 12 |
  84361. * | | hh | 01, 02, ..., 12 |
  84362. * | Minute | m | 0, 1, ..., 59 |
  84363. * | | mm | 00, 01, ..., 59 |
  84364. * | Second | s | 0, 1, ..., 59 |
  84365. * | | ss | 00, 01, ..., 59 |
  84366. * | 1/10 of second | S | 0, 1, ..., 9 |
  84367. * | 1/100 of second | SS | 00, 01, ..., 99 |
  84368. * | Millisecond | SSS | 000, 001, ..., 999 |
  84369. * | Timezone | Z | -01:00, +00:00, ... +12:00 |
  84370. * | | ZZ | -0100, +0000, ..., +1200 |
  84371. * | Seconds timestamp | X | 512969520 |
  84372. * | Milliseconds timestamp | x | 512969520900 |
  84373. *
  84374. * The characters wrapped in square brackets are escaped.
  84375. *
  84376. * The result may vary by locale.
  84377. *
  84378. * @param {Date|String|Number} date - the original date
  84379. * @param {String} [format='YYYY-MM-DDTHH:mm:ss.SSSZ'] - the string of tokens
  84380. * @param {Object} [options] - the object with options
  84381. * @param {Object} [options.locale=enLocale] - the locale object
  84382. * @returns {String} the formatted date string
  84383. *
  84384. * @example
  84385. * // Represent 11 February 2014 in middle-endian format:
  84386. * var result = format(
  84387. * new Date(2014, 1, 11),
  84388. * 'MM/DD/YYYY'
  84389. * )
  84390. * //=> '02/11/2014'
  84391. *
  84392. * @example
  84393. * // Represent 2 July 2014 in Esperanto:
  84394. * var eoLocale = require('date-fns/locale/eo')
  84395. * var result = format(
  84396. * new Date(2014, 6, 2),
  84397. * 'Do [de] MMMM YYYY',
  84398. * {locale: eoLocale}
  84399. * )
  84400. * //=> '2-a de julio 2014'
  84401. */
  84402. function format (dirtyDate, dirtyFormatStr, dirtyOptions) {
  84403. var formatStr = dirtyFormatStr ? String(dirtyFormatStr) : 'YYYY-MM-DDTHH:mm:ss.SSSZ'
  84404. var options = dirtyOptions || {}
  84405. var locale = options.locale
  84406. var localeFormatters = enLocale.format.formatters
  84407. var formattingTokensRegExp = enLocale.format.formattingTokensRegExp
  84408. if (locale && locale.format && locale.format.formatters) {
  84409. localeFormatters = locale.format.formatters
  84410. if (locale.format.formattingTokensRegExp) {
  84411. formattingTokensRegExp = locale.format.formattingTokensRegExp
  84412. }
  84413. }
  84414. var date = parse(dirtyDate)
  84415. if (!isValid(date)) {
  84416. return 'Invalid Date'
  84417. }
  84418. var formatFn = buildFormatFn(formatStr, localeFormatters, formattingTokensRegExp)
  84419. return formatFn(date)
  84420. }
  84421. var formatters = {
  84422. // Month: 1, 2, ..., 12
  84423. 'M': function (date) {
  84424. return date.getMonth() + 1
  84425. },
  84426. // Month: 01, 02, ..., 12
  84427. 'MM': function (date) {
  84428. return addLeadingZeros(date.getMonth() + 1, 2)
  84429. },
  84430. // Quarter: 1, 2, 3, 4
  84431. 'Q': function (date) {
  84432. return Math.ceil((date.getMonth() + 1) / 3)
  84433. },
  84434. // Day of month: 1, 2, ..., 31
  84435. 'D': function (date) {
  84436. return date.getDate()
  84437. },
  84438. // Day of month: 01, 02, ..., 31
  84439. 'DD': function (date) {
  84440. return addLeadingZeros(date.getDate(), 2)
  84441. },
  84442. // Day of year: 1, 2, ..., 366
  84443. 'DDD': function (date) {
  84444. return getDayOfYear(date)
  84445. },
  84446. // Day of year: 001, 002, ..., 366
  84447. 'DDDD': function (date) {
  84448. return addLeadingZeros(getDayOfYear(date), 3)
  84449. },
  84450. // Day of week: 0, 1, ..., 6
  84451. 'd': function (date) {
  84452. return date.getDay()
  84453. },
  84454. // Day of ISO week: 1, 2, ..., 7
  84455. 'E': function (date) {
  84456. return date.getDay() || 7
  84457. },
  84458. // ISO week: 1, 2, ..., 53
  84459. 'W': function (date) {
  84460. return getISOWeek(date)
  84461. },
  84462. // ISO week: 01, 02, ..., 53
  84463. 'WW': function (date) {
  84464. return addLeadingZeros(getISOWeek(date), 2)
  84465. },
  84466. // Year: 00, 01, ..., 99
  84467. 'YY': function (date) {
  84468. return addLeadingZeros(date.getFullYear(), 4).substr(2)
  84469. },
  84470. // Year: 1900, 1901, ..., 2099
  84471. 'YYYY': function (date) {
  84472. return addLeadingZeros(date.getFullYear(), 4)
  84473. },
  84474. // ISO week-numbering year: 00, 01, ..., 99
  84475. 'GG': function (date) {
  84476. return String(getISOYear(date)).substr(2)
  84477. },
  84478. // ISO week-numbering year: 1900, 1901, ..., 2099
  84479. 'GGGG': function (date) {
  84480. return getISOYear(date)
  84481. },
  84482. // Hour: 0, 1, ... 23
  84483. 'H': function (date) {
  84484. return date.getHours()
  84485. },
  84486. // Hour: 00, 01, ..., 23
  84487. 'HH': function (date) {
  84488. return addLeadingZeros(date.getHours(), 2)
  84489. },
  84490. // Hour: 1, 2, ..., 12
  84491. 'h': function (date) {
  84492. var hours = date.getHours()
  84493. if (hours === 0) {
  84494. return 12
  84495. } else if (hours > 12) {
  84496. return hours % 12
  84497. } else {
  84498. return hours
  84499. }
  84500. },
  84501. // Hour: 01, 02, ..., 12
  84502. 'hh': function (date) {
  84503. return addLeadingZeros(formatters['h'](date), 2)
  84504. },
  84505. // Minute: 0, 1, ..., 59
  84506. 'm': function (date) {
  84507. return date.getMinutes()
  84508. },
  84509. // Minute: 00, 01, ..., 59
  84510. 'mm': function (date) {
  84511. return addLeadingZeros(date.getMinutes(), 2)
  84512. },
  84513. // Second: 0, 1, ..., 59
  84514. 's': function (date) {
  84515. return date.getSeconds()
  84516. },
  84517. // Second: 00, 01, ..., 59
  84518. 'ss': function (date) {
  84519. return addLeadingZeros(date.getSeconds(), 2)
  84520. },
  84521. // 1/10 of second: 0, 1, ..., 9
  84522. 'S': function (date) {
  84523. return Math.floor(date.getMilliseconds() / 100)
  84524. },
  84525. // 1/100 of second: 00, 01, ..., 99
  84526. 'SS': function (date) {
  84527. return addLeadingZeros(Math.floor(date.getMilliseconds() / 10), 2)
  84528. },
  84529. // Millisecond: 000, 001, ..., 999
  84530. 'SSS': function (date) {
  84531. return addLeadingZeros(date.getMilliseconds(), 3)
  84532. },
  84533. // Timezone: -01:00, +00:00, ... +12:00
  84534. 'Z': function (date) {
  84535. return formatTimezone(date.getTimezoneOffset(), ':')
  84536. },
  84537. // Timezone: -0100, +0000, ... +1200
  84538. 'ZZ': function (date) {
  84539. return formatTimezone(date.getTimezoneOffset())
  84540. },
  84541. // Seconds timestamp: 512969520
  84542. 'X': function (date) {
  84543. return Math.floor(date.getTime() / 1000)
  84544. },
  84545. // Milliseconds timestamp: 512969520900
  84546. 'x': function (date) {
  84547. return date.getTime()
  84548. }
  84549. }
  84550. function buildFormatFn (formatStr, localeFormatters, formattingTokensRegExp) {
  84551. var array = formatStr.match(formattingTokensRegExp)
  84552. var length = array.length
  84553. var i
  84554. var formatter
  84555. for (i = 0; i < length; i++) {
  84556. formatter = localeFormatters[array[i]] || formatters[array[i]]
  84557. if (formatter) {
  84558. array[i] = formatter
  84559. } else {
  84560. array[i] = removeFormattingTokens(array[i])
  84561. }
  84562. }
  84563. return function (date) {
  84564. var output = ''
  84565. for (var i = 0; i < length; i++) {
  84566. if (array[i] instanceof Function) {
  84567. output += array[i](date, formatters)
  84568. } else {
  84569. output += array[i]
  84570. }
  84571. }
  84572. return output
  84573. }
  84574. }
  84575. function removeFormattingTokens (input) {
  84576. if (input.match(/\[[\s\S]/)) {
  84577. return input.replace(/^\[|]$/g, '')
  84578. }
  84579. return input.replace(/\\/g, '')
  84580. }
  84581. function formatTimezone (offset, delimeter) {
  84582. delimeter = delimeter || ''
  84583. var sign = offset > 0 ? '-' : '+'
  84584. var absOffset = Math.abs(offset)
  84585. var hours = Math.floor(absOffset / 60)
  84586. var minutes = absOffset % 60
  84587. return sign + addLeadingZeros(hours, 2) + delimeter + addLeadingZeros(minutes, 2)
  84588. }
  84589. function addLeadingZeros (number, targetLength) {
  84590. var output = Math.abs(number).toString()
  84591. while (output.length < targetLength) {
  84592. output = '0' + output
  84593. }
  84594. return output
  84595. }
  84596. module.exports = format
  84597. /***/ }),
  84598. /* 964 */
  84599. /***/ (function(module, exports, __webpack_require__) {
  84600. var parse = __webpack_require__(28)
  84601. var startOfYear = __webpack_require__(965)
  84602. var differenceInCalendarDays = __webpack_require__(472)
  84603. /**
  84604. * @category Day Helpers
  84605. * @summary Get the day of the year of the given date.
  84606. *
  84607. * @description
  84608. * Get the day of the year of the given date.
  84609. *
  84610. * @param {Date|String|Number} date - the given date
  84611. * @returns {Number} the day of year
  84612. *
  84613. * @example
  84614. * // Which day of the year is 2 July 2014?
  84615. * var result = getDayOfYear(new Date(2014, 6, 2))
  84616. * //=> 183
  84617. */
  84618. function getDayOfYear (dirtyDate) {
  84619. var date = parse(dirtyDate)
  84620. var diff = differenceInCalendarDays(date, startOfYear(date))
  84621. var dayOfYear = diff + 1
  84622. return dayOfYear
  84623. }
  84624. module.exports = getDayOfYear
  84625. /***/ }),
  84626. /* 965 */
  84627. /***/ (function(module, exports, __webpack_require__) {
  84628. var parse = __webpack_require__(28)
  84629. /**
  84630. * @category Year Helpers
  84631. * @summary Return the start of a year for the given date.
  84632. *
  84633. * @description
  84634. * Return the start of a year for the given date.
  84635. * The result will be in the local timezone.
  84636. *
  84637. * @param {Date|String|Number} date - the original date
  84638. * @returns {Date} the start of a year
  84639. *
  84640. * @example
  84641. * // The start of a year for 2 September 2014 11:55:00:
  84642. * var result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
  84643. * //=> Wed Jan 01 2014 00:00:00
  84644. */
  84645. function startOfYear (dirtyDate) {
  84646. var cleanDate = parse(dirtyDate)
  84647. var date = new Date(0)
  84648. date.setFullYear(cleanDate.getFullYear(), 0, 1)
  84649. date.setHours(0, 0, 0, 0)
  84650. return date
  84651. }
  84652. module.exports = startOfYear
  84653. /***/ }),
  84654. /* 966 */
  84655. /***/ (function(module, exports, __webpack_require__) {
  84656. var parse = __webpack_require__(28)
  84657. var startOfISOWeek = __webpack_require__(208)
  84658. var startOfISOYear = __webpack_require__(968)
  84659. var MILLISECONDS_IN_WEEK = 604800000
  84660. /**
  84661. * @category ISO Week Helpers
  84662. * @summary Get the ISO week of the given date.
  84663. *
  84664. * @description
  84665. * Get the ISO week of the given date.
  84666. *
  84667. * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
  84668. *
  84669. * @param {Date|String|Number} date - the given date
  84670. * @returns {Number} the ISO week
  84671. *
  84672. * @example
  84673. * // Which week of the ISO-week numbering year is 2 January 2005?
  84674. * var result = getISOWeek(new Date(2005, 0, 2))
  84675. * //=> 53
  84676. */
  84677. function getISOWeek (dirtyDate) {
  84678. var date = parse(dirtyDate)
  84679. var diff = startOfISOWeek(date).getTime() - startOfISOYear(date).getTime()
  84680. // Round the number of days to the nearest integer
  84681. // because the number of milliseconds in a week is not constant
  84682. // (e.g. it's different in the week of the daylight saving time clock shift)
  84683. return Math.round(diff / MILLISECONDS_IN_WEEK) + 1
  84684. }
  84685. module.exports = getISOWeek
  84686. /***/ }),
  84687. /* 967 */
  84688. /***/ (function(module, exports, __webpack_require__) {
  84689. var parse = __webpack_require__(28)
  84690. /**
  84691. * @category Week Helpers
  84692. * @summary Return the start of a week for the given date.
  84693. *
  84694. * @description
  84695. * Return the start of a week for the given date.
  84696. * The result will be in the local timezone.
  84697. *
  84698. * @param {Date|String|Number} date - the original date
  84699. * @param {Object} [options] - the object with options
  84700. * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)
  84701. * @returns {Date} the start of a week
  84702. *
  84703. * @example
  84704. * // The start of a week for 2 September 2014 11:55:00:
  84705. * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
  84706. * //=> Sun Aug 31 2014 00:00:00
  84707. *
  84708. * @example
  84709. * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
  84710. * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})
  84711. * //=> Mon Sep 01 2014 00:00:00
  84712. */
  84713. function startOfWeek (dirtyDate, dirtyOptions) {
  84714. var weekStartsOn = dirtyOptions ? (Number(dirtyOptions.weekStartsOn) || 0) : 0
  84715. var date = parse(dirtyDate)
  84716. var day = date.getDay()
  84717. var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn
  84718. date.setDate(date.getDate() - diff)
  84719. date.setHours(0, 0, 0, 0)
  84720. return date
  84721. }
  84722. module.exports = startOfWeek
  84723. /***/ }),
  84724. /* 968 */
  84725. /***/ (function(module, exports, __webpack_require__) {
  84726. var getISOYear = __webpack_require__(473)
  84727. var startOfISOWeek = __webpack_require__(208)
  84728. /**
  84729. * @category ISO Week-Numbering Year Helpers
  84730. * @summary Return the start of an ISO week-numbering year for the given date.
  84731. *
  84732. * @description
  84733. * Return the start of an ISO week-numbering year,
  84734. * which always starts 3 days before the year's first Thursday.
  84735. * The result will be in the local timezone.
  84736. *
  84737. * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
  84738. *
  84739. * @param {Date|String|Number} date - the original date
  84740. * @returns {Date} the start of an ISO year
  84741. *
  84742. * @example
  84743. * // The start of an ISO week-numbering year for 2 July 2005:
  84744. * var result = startOfISOYear(new Date(2005, 6, 2))
  84745. * //=> Mon Jan 03 2005 00:00:00
  84746. */
  84747. function startOfISOYear (dirtyDate) {
  84748. var year = getISOYear(dirtyDate)
  84749. var fourthOfJanuary = new Date(0)
  84750. fourthOfJanuary.setFullYear(year, 0, 4)
  84751. fourthOfJanuary.setHours(0, 0, 0, 0)
  84752. var date = startOfISOWeek(fourthOfJanuary)
  84753. return date
  84754. }
  84755. module.exports = startOfISOYear
  84756. /***/ }),
  84757. /* 969 */
  84758. /***/ (function(module, exports, __webpack_require__) {
  84759. var isDate = __webpack_require__(470)
  84760. /**
  84761. * @category Common Helpers
  84762. * @summary Is the given date valid?
  84763. *
  84764. * @description
  84765. * Returns false if argument is Invalid Date and true otherwise.
  84766. * Invalid Date is a Date, whose time value is NaN.
  84767. *
  84768. * Time value of Date: http://es5.github.io/#x15.9.1.1
  84769. *
  84770. * @param {Date} date - the date to check
  84771. * @returns {Boolean} the date is valid
  84772. * @throws {TypeError} argument must be an instance of Date
  84773. *
  84774. * @example
  84775. * // For the valid date:
  84776. * var result = isValid(new Date(2014, 1, 31))
  84777. * //=> true
  84778. *
  84779. * @example
  84780. * // For the invalid date:
  84781. * var result = isValid(new Date(''))
  84782. * //=> false
  84783. */
  84784. function isValid (dirtyDate) {
  84785. if (isDate(dirtyDate)) {
  84786. return !isNaN(dirtyDate)
  84787. } else {
  84788. throw new TypeError(toString.call(dirtyDate) + ' is not an instance of Date')
  84789. }
  84790. }
  84791. module.exports = isValid
  84792. /***/ }),
  84793. /* 970 */
  84794. /***/ (function(module, exports, __webpack_require__) {
  84795. var buildDistanceInWordsLocale = __webpack_require__(971)
  84796. var buildFormatLocale = __webpack_require__(972)
  84797. /**
  84798. * @category Locales
  84799. * @summary English locale.
  84800. */
  84801. module.exports = {
  84802. distanceInWords: buildDistanceInWordsLocale(),
  84803. format: buildFormatLocale()
  84804. }
  84805. /***/ }),
  84806. /* 971 */
  84807. /***/ (function(module, exports) {
  84808. function buildDistanceInWordsLocale () {
  84809. var distanceInWordsLocale = {
  84810. lessThanXSeconds: {
  84811. one: 'less than a second',
  84812. other: 'less than {{count}} seconds'
  84813. },
  84814. xSeconds: {
  84815. one: '1 second',
  84816. other: '{{count}} seconds'
  84817. },
  84818. halfAMinute: 'half a minute',
  84819. lessThanXMinutes: {
  84820. one: 'less than a minute',
  84821. other: 'less than {{count}} minutes'
  84822. },
  84823. xMinutes: {
  84824. one: '1 minute',
  84825. other: '{{count}} minutes'
  84826. },
  84827. aboutXHours: {
  84828. one: 'about 1 hour',
  84829. other: 'about {{count}} hours'
  84830. },
  84831. xHours: {
  84832. one: '1 hour',
  84833. other: '{{count}} hours'
  84834. },
  84835. xDays: {
  84836. one: '1 day',
  84837. other: '{{count}} days'
  84838. },
  84839. aboutXMonths: {
  84840. one: 'about 1 month',
  84841. other: 'about {{count}} months'
  84842. },
  84843. xMonths: {
  84844. one: '1 month',
  84845. other: '{{count}} months'
  84846. },
  84847. aboutXYears: {
  84848. one: 'about 1 year',
  84849. other: 'about {{count}} years'
  84850. },
  84851. xYears: {
  84852. one: '1 year',
  84853. other: '{{count}} years'
  84854. },
  84855. overXYears: {
  84856. one: 'over 1 year',
  84857. other: 'over {{count}} years'
  84858. },
  84859. almostXYears: {
  84860. one: 'almost 1 year',
  84861. other: 'almost {{count}} years'
  84862. }
  84863. }
  84864. function localize (token, count, options) {
  84865. options = options || {}
  84866. var result
  84867. if (typeof distanceInWordsLocale[token] === 'string') {
  84868. result = distanceInWordsLocale[token]
  84869. } else if (count === 1) {
  84870. result = distanceInWordsLocale[token].one
  84871. } else {
  84872. result = distanceInWordsLocale[token].other.replace('{{count}}', count)
  84873. }
  84874. if (options.addSuffix) {
  84875. if (options.comparison > 0) {
  84876. return 'in ' + result
  84877. } else {
  84878. return result + ' ago'
  84879. }
  84880. }
  84881. return result
  84882. }
  84883. return {
  84884. localize: localize
  84885. }
  84886. }
  84887. module.exports = buildDistanceInWordsLocale
  84888. /***/ }),
  84889. /* 972 */
  84890. /***/ (function(module, exports, __webpack_require__) {
  84891. var buildFormattingTokensRegExp = __webpack_require__(973)
  84892. function buildFormatLocale () {
  84893. // Note: in English, the names of days of the week and months are capitalized.
  84894. // If you are making a new locale based on this one, check if the same is true for the language you're working on.
  84895. // Generally, formatted dates should look like they are in the middle of a sentence,
  84896. // e.g. in Spanish language the weekdays and months should be in the lowercase.
  84897. var months3char = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
  84898. var monthsFull = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
  84899. var weekdays2char = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']
  84900. var weekdays3char = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
  84901. var weekdaysFull = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
  84902. var meridiemUppercase = ['AM', 'PM']
  84903. var meridiemLowercase = ['am', 'pm']
  84904. var meridiemFull = ['a.m.', 'p.m.']
  84905. var formatters = {
  84906. // Month: Jan, Feb, ..., Dec
  84907. 'MMM': function (date) {
  84908. return months3char[date.getMonth()]
  84909. },
  84910. // Month: January, February, ..., December
  84911. 'MMMM': function (date) {
  84912. return monthsFull[date.getMonth()]
  84913. },
  84914. // Day of week: Su, Mo, ..., Sa
  84915. 'dd': function (date) {
  84916. return weekdays2char[date.getDay()]
  84917. },
  84918. // Day of week: Sun, Mon, ..., Sat
  84919. 'ddd': function (date) {
  84920. return weekdays3char[date.getDay()]
  84921. },
  84922. // Day of week: Sunday, Monday, ..., Saturday
  84923. 'dddd': function (date) {
  84924. return weekdaysFull[date.getDay()]
  84925. },
  84926. // AM, PM
  84927. 'A': function (date) {
  84928. return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0]
  84929. },
  84930. // am, pm
  84931. 'a': function (date) {
  84932. return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0]
  84933. },
  84934. // a.m., p.m.
  84935. 'aa': function (date) {
  84936. return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0]
  84937. }
  84938. }
  84939. // Generate ordinal version of formatters: M -> Mo, D -> Do, etc.
  84940. var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W']
  84941. ordinalFormatters.forEach(function (formatterToken) {
  84942. formatters[formatterToken + 'o'] = function (date, formatters) {
  84943. return ordinal(formatters[formatterToken](date))
  84944. }
  84945. })
  84946. return {
  84947. formatters: formatters,
  84948. formattingTokensRegExp: buildFormattingTokensRegExp(formatters)
  84949. }
  84950. }
  84951. function ordinal (number) {
  84952. var rem100 = number % 100
  84953. if (rem100 > 20 || rem100 < 10) {
  84954. switch (rem100 % 10) {
  84955. case 1:
  84956. return number + 'st'
  84957. case 2:
  84958. return number + 'nd'
  84959. case 3:
  84960. return number + 'rd'
  84961. }
  84962. }
  84963. return number + 'th'
  84964. }
  84965. module.exports = buildFormatLocale
  84966. /***/ }),
  84967. /* 973 */
  84968. /***/ (function(module, exports) {
  84969. var commonFormatterKeys = [
  84970. 'M', 'MM', 'Q', 'D', 'DD', 'DDD', 'DDDD', 'd',
  84971. 'E', 'W', 'WW', 'YY', 'YYYY', 'GG', 'GGGG',
  84972. 'H', 'HH', 'h', 'hh', 'm', 'mm',
  84973. 's', 'ss', 'S', 'SS', 'SSS',
  84974. 'Z', 'ZZ', 'X', 'x'
  84975. ]
  84976. function buildFormattingTokensRegExp (formatters) {
  84977. var formatterKeys = []
  84978. for (var key in formatters) {
  84979. if (formatters.hasOwnProperty(key)) {
  84980. formatterKeys.push(key)
  84981. }
  84982. }
  84983. var formattingTokens = commonFormatterKeys
  84984. .concat(formatterKeys)
  84985. .sort()
  84986. .reverse()
  84987. var formattingTokensRegExp = new RegExp(
  84988. '(\\[[^\\[]*\\])|(\\\\)?' + '(' + formattingTokens.join('|') + '|.)', 'g'
  84989. )
  84990. return formattingTokensRegExp
  84991. }
  84992. module.exports = buildFormattingTokensRegExp
  84993. /***/ }),
  84994. /* 974 */
  84995. /***/ (function(module, exports, __webpack_require__) {
  84996. /**
  84997. * The goal of this function is create or update the given entries according to if they already
  84998. * exist in the cozy or not
  84999. *
  85000. * - `entries` is an array of objects with any attributes :
  85001. *
  85002. * - `doctype` (string) is the cozy doctype where the entries should be saved
  85003. *
  85004. * - `filters` (array) is the list of attributes in each entry should be used to check if an entry
  85005. * is already saved in the cozy
  85006. *
  85007. * @module updateOrCreate
  85008. */
  85009. const bluebird = __webpack_require__(43)
  85010. const log = __webpack_require__(24).namespace('updateOrCreate')
  85011. const cozy = __webpack_require__(51)
  85012. module.exports = (entries = [], doctype, matchingAttributes = []) => {
  85013. return cozy.data.findAll(doctype)
  85014. .then(existings => bluebird.mapSeries(entries, entry => {
  85015. log('debug', entry)
  85016. // try to find a corresponding existing element
  85017. const toUpdate = existings.find(doc =>
  85018. matchingAttributes.reduce((isMatching, matchingAttribute) =>
  85019. isMatching && doc[matchingAttribute] === entry[matchingAttribute]
  85020. , true)
  85021. )
  85022. if (toUpdate) {
  85023. log('debug', 'upating')
  85024. return cozy.data.updateAttributes(doctype, toUpdate._id, entry)
  85025. } else {
  85026. log('debug', 'creating')
  85027. return cozy.data.create(doctype, entry)
  85028. }
  85029. }))
  85030. }
  85031. /***/ }),
  85032. /* 975 */
  85033. /***/ (function(module, exports, __webpack_require__) {
  85034. module.exports = __webpack_require__(976);
  85035. /***/ }),
  85036. /* 976 */
  85037. /***/ (function(module, exports, __webpack_require__) {
  85038. var Promise = __webpack_require__(43);
  85039. // Subclass of Error that can be thrown to indicate that retry should stop.
  85040. //
  85041. // If called with an instance of Error subclass, then the retry promise will be
  85042. // rejected with the given error.
  85043. //
  85044. // Otherwise the cancel error object itself is propagated to the caller.
  85045. //
  85046. function StopError(err) {
  85047. this.name = 'StopError';
  85048. if (err instanceof Error) {
  85049. this.err = err
  85050. } else {
  85051. this.message = err || 'cancelled'
  85052. }
  85053. }
  85054. StopError.prototype = Object.create(Error.prototype);
  85055. retry.StopError = StopError;
  85056. // Retry `func` until it succeeds.
  85057. //
  85058. // For each attempt, invokes `func` with `options.args` as arguments and
  85059. // `options.context` as `this`.
  85060. //
  85061. // Waits `options.interval` milliseconds (default 1000) between attempts.
  85062. //
  85063. // Increases wait by a factor of `options.backoff` each interval, up to
  85064. // a limit of `options.max_interval`.
  85065. //
  85066. // Keeps trying until `options.timeout` milliseconds have elapsed,
  85067. // or `options.max_tries` have been attempted, whichever comes first.
  85068. //
  85069. // If neither is specified, then the default is to make 5 attempts.
  85070. //
  85071. function retry(func, options) {
  85072. options = options || {};
  85073. var interval = typeof options.interval === 'number' ? options.interval : 1000;
  85074. var max_tries, giveup_time;
  85075. if (typeof(options.max_tries) !== 'undefined') {
  85076. max_tries = options.max_tries;
  85077. }
  85078. if (options.timeout) {
  85079. giveup_time = new Date().getTime() + options.timeout;
  85080. }
  85081. if (!max_tries && !giveup_time) {
  85082. max_tries = 5;
  85083. }
  85084. var tries = 0;
  85085. var start = new Date().getTime();
  85086. // If the user didn't supply a predicate function then add one that
  85087. // always succeeds.
  85088. //
  85089. // This is used in bluebird's filtered catch to flag the error types
  85090. // that should retry.
  85091. var predicate = options.predicate || function(err) { return true; }
  85092. var stopped = false;
  85093. function try_once() {
  85094. var tryStart = new Date().getTime();
  85095. return Promise.attempt(function() {
  85096. return func.apply(options.context, options.args);
  85097. })
  85098. .caught(StopError, function(err) {
  85099. stopped = true;
  85100. if (err.err instanceof Error) {
  85101. return Promise.reject(err.err);
  85102. } else {
  85103. return Promise.reject(err);
  85104. }
  85105. })
  85106. .caught(predicate, function(err) {
  85107. if (stopped) {
  85108. return Promise.reject(err);
  85109. }
  85110. ++tries;
  85111. if (tries > 1) {
  85112. interval = backoff(interval, options);
  85113. }
  85114. var now = new Date().getTime();
  85115. if ((max_tries && (tries === max_tries) ||
  85116. (giveup_time && (now + interval >= giveup_time)))) {
  85117. if (! (err instanceof Error)) {
  85118. var failure = err;
  85119. if (failure) {
  85120. if (typeof failure !== 'string') {
  85121. failure = JSON.stringify(failure);
  85122. }
  85123. }
  85124. err = new Error('rejected with non-error: ' + failure);
  85125. err.failure = failure;
  85126. } else if (options.throw_original) {
  85127. return Promise.reject(err);
  85128. }
  85129. var timeout = new Error('operation timed out after ' + (now - start) + ' ms, ' + tries + ' tries with error: ' + err.message);
  85130. timeout.failure = err;
  85131. timeout.code = 'ETIMEDOUT';
  85132. return Promise.reject(timeout);
  85133. } else {
  85134. var delay = interval - (now - tryStart);
  85135. if (delay <= 0) {
  85136. return try_once();
  85137. } else {
  85138. return Promise.delay(delay).then(try_once);
  85139. }
  85140. }
  85141. });
  85142. }
  85143. return try_once();
  85144. }
  85145. // Return the updated interval after applying the various backoff options
  85146. function backoff(interval, options) {
  85147. if (options.backoff) {
  85148. interval = interval * options.backoff;
  85149. }
  85150. if (options.max_interval) {
  85151. interval = Math.min(interval, options.max_interval);
  85152. }
  85153. return interval;
  85154. }
  85155. module.exports = retry;
  85156. /***/ })
  85157. /******/ ]);