@mjhls/mjh-framework 1.0.1049 → 1.0.1050-lightbox-v1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/AD.js +1 -1
  3. package/dist/cjs/AD300x250.js +3 -2
  4. package/dist/cjs/AD300x250x600.js +3 -2
  5. package/dist/cjs/AD728x90.js +3 -2
  6. package/dist/cjs/ADFloatingFooter.js +3 -2
  7. package/dist/cjs/ADGutter.js +3 -2
  8. package/dist/cjs/{ADInfeed-0519664d.js → ADInfeed-89f63b7d.js} +1 -1
  9. package/dist/cjs/ADSkyscraper.js +3 -2
  10. package/dist/cjs/ADSponsoredResources.js +3 -2
  11. package/dist/cjs/ADWebcast.js +3 -2
  12. package/dist/cjs/ADWelcome.js +3 -2
  13. package/dist/cjs/{ADlgInfeed-e544ac1c.js → ADlgInfeed-a536168e.js} +1 -1
  14. package/dist/cjs/AdSlot.js +3 -2
  15. package/dist/cjs/AdSlotsProvider.js +3 -2
  16. package/dist/cjs/AlgoliaSearch.js +72 -399
  17. package/dist/cjs/ArticleCarousel.js +1 -1
  18. package/dist/cjs/ArticleProgramLandingPage.js +5 -4
  19. package/dist/cjs/ArticleSeriesLandingPage.js +5 -4
  20. package/dist/cjs/ArticleSeriesListing.js +3 -2
  21. package/dist/cjs/Auth.js +1492 -10
  22. package/dist/cjs/AuthWrapper.js +1565 -293
  23. package/dist/cjs/CEDeckSupabase.js +3 -2
  24. package/dist/cjs/CMEDeck.js +3 -2
  25. package/dist/cjs/Column3.js +3 -2
  26. package/dist/cjs/ContentCardPaginated.js +5 -4
  27. package/dist/cjs/DeckContent.js +5 -4
  28. package/dist/cjs/DeckQueue.js +4 -3
  29. package/dist/cjs/DeckQueuePaginated.js +4 -3
  30. package/dist/cjs/{Dfp-67646058.js → Dfp-c313a700.js} +2 -1
  31. package/dist/cjs/EventsDeck.js +1 -1
  32. package/dist/cjs/ExternalResources.js +5 -4
  33. package/dist/cjs/Feature.js +1 -1
  34. package/dist/cjs/GridContent.js +6 -5
  35. package/dist/cjs/GridContentPaginated.js +6 -5
  36. package/dist/cjs/GridHero.js +1 -1
  37. package/dist/cjs/HamMagazine.js +2 -2
  38. package/dist/cjs/Hero.js +1 -1
  39. package/dist/cjs/HorizontalArticleListing.js +5 -4
  40. package/dist/cjs/{ImageSlider-62a43659.js → ImageSlider-d65bc9c8.js} +106 -123
  41. package/dist/cjs/IssueLanding.js +7 -6
  42. package/dist/cjs/LeftNav.js +3 -2
  43. package/dist/cjs/MasterDeck.js +5 -4
  44. package/dist/cjs/MasterDeckPaginated.js +5 -4
  45. package/dist/cjs/{MediaSeriesCard-3ee52557.js → MediaSeriesCard-41d76fe4.js} +1 -1
  46. package/dist/cjs/MediaSeriesLanding.js +10 -9
  47. package/dist/cjs/MediaSeriesLandingPaginated.js +10 -9
  48. package/dist/cjs/NavMagazine.js +2 -2
  49. package/dist/cjs/NavNative.js +1 -1
  50. package/dist/cjs/OncliveLargeHero.js +1 -1
  51. package/dist/cjs/PartnerDetailListing.js +8 -7
  52. package/dist/cjs/PartnerDetailListingPaginated.js +8 -7
  53. package/dist/cjs/PodcastsLanding.js +8 -7
  54. package/dist/cjs/PubSection.js +6 -5
  55. package/dist/cjs/QueueDeckExpanded.js +6 -5
  56. package/dist/cjs/QueueDeckExpandedPaginated.js +6 -5
  57. package/dist/cjs/SeriesListingDeck.js +4 -3
  58. package/dist/cjs/{SeriesSlider-edcb8e4b.js → SeriesSlider-c7ed509b.js} +1 -1
  59. package/dist/cjs/{SocialSearchComponent-e9ec9c63.js → SocialSearchComponent-d7e5d3a6.js} +1 -1
  60. package/dist/cjs/TaxonomyDescription.js +5 -4
  61. package/dist/cjs/TemplateNormal.js +4 -3
  62. package/dist/cjs/ThumbnailCard.js +1 -1
  63. package/dist/cjs/{Tooltip-980a1d1a.js → Tooltip-02a841b5.js} +348 -140
  64. package/dist/cjs/Ustream.js +1 -1
  65. package/dist/cjs/VideoProgramLandingPage.js +5 -4
  66. package/dist/cjs/VideoSeriesLandingPage.js +5 -4
  67. package/dist/cjs/VideoSeriesListing.js +3 -2
  68. package/dist/cjs/View.js +6 -5
  69. package/dist/cjs/YahooHero.js +1 -1
  70. package/dist/cjs/YoutubeGroup.js +1 -1
  71. package/dist/cjs/{entities-3f9d0f2f.js → entities-df1aed86.js} +4 -0
  72. package/dist/cjs/events-1b438fe7.js +469 -0
  73. package/dist/cjs/getSerializers.js +5 -4
  74. package/dist/cjs/{index-8041a4eb.js → index-9ec837cc.js} +0 -10
  75. package/dist/cjs/{index-7435b964.js → index-d2a6ef75.js} +2 -467
  76. package/dist/cjs/{index-46b63e4b.js → index-f582e937.js} +15 -24
  77. package/dist/cjs/index.js +11 -11
  78. package/dist/cjs/{main-47be4f9f.js → main-ae8472f3.js} +4 -9
  79. package/dist/esm/AD.js +1 -1
  80. package/dist/esm/AD300x250.js +3 -2
  81. package/dist/esm/AD300x250x600.js +3 -2
  82. package/dist/esm/AD728x90.js +3 -2
  83. package/dist/esm/ADFloatingFooter.js +3 -2
  84. package/dist/esm/ADGutter.js +3 -2
  85. package/dist/esm/{ADInfeed-c3f5613e.js → ADInfeed-c14e043c.js} +1 -1
  86. package/dist/esm/ADSkyscraper.js +3 -2
  87. package/dist/esm/ADSponsoredResources.js +3 -2
  88. package/dist/esm/ADWebcast.js +3 -2
  89. package/dist/esm/ADWelcome.js +3 -2
  90. package/dist/esm/{ADlgInfeed-2b148f3f.js → ADlgInfeed-2892de3c.js} +1 -1
  91. package/dist/esm/AdSlot.js +3 -2
  92. package/dist/esm/AdSlotsProvider.js +3 -2
  93. package/dist/esm/AlgoliaSearch.js +71 -398
  94. package/dist/esm/ArticleCarousel.js +1 -1
  95. package/dist/esm/ArticleProgramLandingPage.js +5 -4
  96. package/dist/esm/ArticleSeriesLandingPage.js +5 -4
  97. package/dist/esm/ArticleSeriesListing.js +3 -2
  98. package/dist/esm/Auth.js +1492 -9
  99. package/dist/esm/AuthWrapper.js +1559 -287
  100. package/dist/esm/CEDeckSupabase.js +3 -2
  101. package/dist/esm/CMEDeck.js +3 -2
  102. package/dist/esm/Column3.js +3 -2
  103. package/dist/esm/ContentCardPaginated.js +5 -4
  104. package/dist/esm/DeckContent.js +5 -4
  105. package/dist/esm/DeckQueue.js +4 -3
  106. package/dist/esm/DeckQueuePaginated.js +4 -3
  107. package/dist/esm/{Dfp-cf85d203.js → Dfp-102f0beb.js} +2 -1
  108. package/dist/esm/EventsDeck.js +1 -1
  109. package/dist/esm/ExternalResources.js +5 -4
  110. package/dist/esm/Feature.js +1 -1
  111. package/dist/esm/GridContent.js +6 -5
  112. package/dist/esm/GridContentPaginated.js +6 -5
  113. package/dist/esm/GridHero.js +1 -1
  114. package/dist/esm/HamMagazine.js +2 -2
  115. package/dist/esm/Hero.js +1 -1
  116. package/dist/esm/HorizontalArticleListing.js +5 -4
  117. package/dist/esm/{ImageSlider-aea3a615.js → ImageSlider-da225417.js} +107 -124
  118. package/dist/esm/IssueLanding.js +7 -6
  119. package/dist/esm/LeftNav.js +3 -2
  120. package/dist/esm/MasterDeck.js +5 -4
  121. package/dist/esm/MasterDeckPaginated.js +5 -4
  122. package/dist/esm/{MediaSeriesCard-0f3cb954.js → MediaSeriesCard-43858b3f.js} +1 -1
  123. package/dist/esm/MediaSeriesLanding.js +10 -9
  124. package/dist/esm/MediaSeriesLandingPaginated.js +10 -9
  125. package/dist/esm/NavMagazine.js +2 -2
  126. package/dist/esm/NavNative.js +1 -1
  127. package/dist/esm/OncliveLargeHero.js +1 -1
  128. package/dist/esm/PartnerDetailListing.js +8 -7
  129. package/dist/esm/PartnerDetailListingPaginated.js +8 -7
  130. package/dist/esm/PodcastsLanding.js +8 -7
  131. package/dist/esm/PubSection.js +6 -5
  132. package/dist/esm/QueueDeckExpanded.js +6 -5
  133. package/dist/esm/QueueDeckExpandedPaginated.js +6 -5
  134. package/dist/esm/SeriesListingDeck.js +4 -3
  135. package/dist/esm/{SeriesSlider-2e83e861.js → SeriesSlider-b467f00c.js} +1 -1
  136. package/dist/esm/{SocialSearchComponent-020f9e81.js → SocialSearchComponent-6065bff2.js} +1 -1
  137. package/dist/esm/TaxonomyDescription.js +5 -4
  138. package/dist/esm/TemplateNormal.js +4 -3
  139. package/dist/esm/ThumbnailCard.js +1 -1
  140. package/dist/esm/{Tooltip-51957f7c.js → Tooltip-7a093cd4.js} +506 -298
  141. package/dist/esm/Ustream.js +1 -1
  142. package/dist/esm/VideoProgramLandingPage.js +5 -4
  143. package/dist/esm/VideoSeriesLandingPage.js +5 -4
  144. package/dist/esm/VideoSeriesListing.js +3 -2
  145. package/dist/esm/View.js +6 -5
  146. package/dist/esm/YahooHero.js +1 -1
  147. package/dist/esm/YoutubeGroup.js +1 -1
  148. package/dist/esm/{entities-932b50cf.js → entities-6d9154b4.js} +4 -0
  149. package/dist/esm/events-6c3a7a63.js +467 -0
  150. package/dist/esm/getSerializers.js +5 -4
  151. package/dist/esm/{index-67e1773f.js → index-0ce54f8a.js} +1 -10
  152. package/dist/esm/{index-be57519b.js → index-acb44b58.js} +15 -24
  153. package/dist/esm/{index-5cc7b406.js → index-f0fc23eb.js} +1 -466
  154. package/dist/esm/index.js +11 -11
  155. package/dist/esm/{main-f97773b2.js → main-754d4992.js} +4 -9
  156. package/package.json +115 -115
package/dist/esm/Auth.js CHANGED
@@ -9,10 +9,9 @@ import useSWR from 'swr';
9
9
  import { s as serialize_1, p as parse_1 } from './index-db3bb315.js';
10
10
  import Local from 'passport-local';
11
11
  import mysql from 'mysql';
12
- import { u as util$1 } from './util-8ed16d48.js';
13
- import util from 'util.promisify';
12
+ import { u as util } from './util-8ed16d48.js';
13
+ import { c as createCommonjsModule } from './_commonjsHelpers-0c4b6f40.js';
14
14
  import { m as md5 } from './md5-4e42248e.js';
15
- import './_commonjsHelpers-0c4b6f40.js';
16
15
  import './core.get-iterator-method-ea258bb1.js';
17
16
  import './web.dom.iterable-ab4dea5c.js';
18
17
  import './_library-528f1934.js';
@@ -1312,7 +1311,1491 @@ var iron = /*#__PURE__*/Object.freeze({
1312
1311
  getSession: getSession
1313
1312
  });
1314
1313
 
1315
- util.shim();
1314
+ var toStr$6 = Object.prototype.toString;
1315
+
1316
+ var isArguments = function isArguments(value) {
1317
+ var str = toStr$6.call(value);
1318
+ var isArgs = str === '[object Arguments]';
1319
+ if (!isArgs) {
1320
+ isArgs = str !== '[object Array]' &&
1321
+ value !== null &&
1322
+ typeof value === 'object' &&
1323
+ typeof value.length === 'number' &&
1324
+ value.length >= 0 &&
1325
+ toStr$6.call(value.callee) === '[object Function]';
1326
+ }
1327
+ return isArgs;
1328
+ };
1329
+
1330
+ var keysShim$1;
1331
+ if (!Object.keys) {
1332
+ // modified from https://github.com/es-shims/es5-shim
1333
+ var has$1 = Object.prototype.hasOwnProperty;
1334
+ var toStr$5 = Object.prototype.toString;
1335
+ var isArgs = isArguments; // eslint-disable-line global-require
1336
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
1337
+ var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
1338
+ var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
1339
+ var dontEnums = [
1340
+ 'toString',
1341
+ 'toLocaleString',
1342
+ 'valueOf',
1343
+ 'hasOwnProperty',
1344
+ 'isPrototypeOf',
1345
+ 'propertyIsEnumerable',
1346
+ 'constructor'
1347
+ ];
1348
+ var equalsConstructorPrototype = function (o) {
1349
+ var ctor = o.constructor;
1350
+ return ctor && ctor.prototype === o;
1351
+ };
1352
+ var excludedKeys = {
1353
+ $applicationCache: true,
1354
+ $console: true,
1355
+ $external: true,
1356
+ $frame: true,
1357
+ $frameElement: true,
1358
+ $frames: true,
1359
+ $innerHeight: true,
1360
+ $innerWidth: true,
1361
+ $onmozfullscreenchange: true,
1362
+ $onmozfullscreenerror: true,
1363
+ $outerHeight: true,
1364
+ $outerWidth: true,
1365
+ $pageXOffset: true,
1366
+ $pageYOffset: true,
1367
+ $parent: true,
1368
+ $scrollLeft: true,
1369
+ $scrollTop: true,
1370
+ $scrollX: true,
1371
+ $scrollY: true,
1372
+ $self: true,
1373
+ $webkitIndexedDB: true,
1374
+ $webkitStorageInfo: true,
1375
+ $window: true
1376
+ };
1377
+ var hasAutomationEqualityBug = (function () {
1378
+ /* global window */
1379
+ if (typeof window === 'undefined') { return false; }
1380
+ for (var k in window) {
1381
+ try {
1382
+ if (!excludedKeys['$' + k] && has$1.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
1383
+ try {
1384
+ equalsConstructorPrototype(window[k]);
1385
+ } catch (e) {
1386
+ return true;
1387
+ }
1388
+ }
1389
+ } catch (e) {
1390
+ return true;
1391
+ }
1392
+ }
1393
+ return false;
1394
+ }());
1395
+ var equalsConstructorPrototypeIfNotBuggy = function (o) {
1396
+ /* global window */
1397
+ if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
1398
+ return equalsConstructorPrototype(o);
1399
+ }
1400
+ try {
1401
+ return equalsConstructorPrototype(o);
1402
+ } catch (e) {
1403
+ return false;
1404
+ }
1405
+ };
1406
+
1407
+ keysShim$1 = function keys(object) {
1408
+ var isObject = object !== null && typeof object === 'object';
1409
+ var isFunction = toStr$5.call(object) === '[object Function]';
1410
+ var isArguments = isArgs(object);
1411
+ var isString = isObject && toStr$5.call(object) === '[object String]';
1412
+ var theKeys = [];
1413
+
1414
+ if (!isObject && !isFunction && !isArguments) {
1415
+ throw new TypeError('Object.keys called on a non-object');
1416
+ }
1417
+
1418
+ var skipProto = hasProtoEnumBug && isFunction;
1419
+ if (isString && object.length > 0 && !has$1.call(object, 0)) {
1420
+ for (var i = 0; i < object.length; ++i) {
1421
+ theKeys.push(String(i));
1422
+ }
1423
+ }
1424
+
1425
+ if (isArguments && object.length > 0) {
1426
+ for (var j = 0; j < object.length; ++j) {
1427
+ theKeys.push(String(j));
1428
+ }
1429
+ } else {
1430
+ for (var name in object) {
1431
+ if (!(skipProto && name === 'prototype') && has$1.call(object, name)) {
1432
+ theKeys.push(String(name));
1433
+ }
1434
+ }
1435
+ }
1436
+
1437
+ if (hasDontEnumBug) {
1438
+ var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
1439
+
1440
+ for (var k = 0; k < dontEnums.length; ++k) {
1441
+ if (!(skipConstructor && dontEnums[k] === 'constructor') && has$1.call(object, dontEnums[k])) {
1442
+ theKeys.push(dontEnums[k]);
1443
+ }
1444
+ }
1445
+ }
1446
+ return theKeys;
1447
+ };
1448
+ }
1449
+ var implementation$3 = keysShim$1;
1450
+
1451
+ var slice$1 = Array.prototype.slice;
1452
+
1453
+
1454
+ var origKeys = Object.keys;
1455
+ var keysShim = origKeys ? function keys(o) { return origKeys(o); } : implementation$3;
1456
+
1457
+ var originalKeys = Object.keys;
1458
+
1459
+ keysShim.shim = function shimObjectKeys() {
1460
+ if (Object.keys) {
1461
+ var keysWorksWithArguments = (function () {
1462
+ // Safari 5.0 bug
1463
+ var args = Object.keys(arguments);
1464
+ return args && args.length === arguments.length;
1465
+ }(1, 2));
1466
+ if (!keysWorksWithArguments) {
1467
+ Object.keys = function keys(object) { // eslint-disable-line func-name-matching
1468
+ if (isArguments(object)) {
1469
+ return originalKeys(slice$1.call(object));
1470
+ }
1471
+ return originalKeys(object);
1472
+ };
1473
+ }
1474
+ } else {
1475
+ Object.keys = keysShim;
1476
+ }
1477
+ return Object.keys || keysShim;
1478
+ };
1479
+
1480
+ var objectKeys = keysShim;
1481
+
1482
+ var hasSymbols$3 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
1483
+
1484
+ var toStr$4 = Object.prototype.toString;
1485
+ var concat = Array.prototype.concat;
1486
+ var origDefineProperty = Object.defineProperty;
1487
+
1488
+ var isFunction = function (fn) {
1489
+ return typeof fn === 'function' && toStr$4.call(fn) === '[object Function]';
1490
+ };
1491
+
1492
+ var arePropertyDescriptorsSupported = function () {
1493
+ var obj = {};
1494
+ try {
1495
+ origDefineProperty(obj, 'x', { enumerable: false, value: obj });
1496
+ // eslint-disable-next-line no-unused-vars, no-restricted-syntax
1497
+ for (var _ in obj) { // jscs:ignore disallowUnusedVariables
1498
+ return false;
1499
+ }
1500
+ return obj.x === obj;
1501
+ } catch (e) { /* this is IE 8. */
1502
+ return false;
1503
+ }
1504
+ };
1505
+ var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
1506
+
1507
+ var defineProperty = function (object, name, value, predicate) {
1508
+ if (name in object && (!isFunction(predicate) || !predicate())) {
1509
+ return;
1510
+ }
1511
+ if (supportsDescriptors) {
1512
+ origDefineProperty(object, name, {
1513
+ configurable: true,
1514
+ enumerable: false,
1515
+ value: value,
1516
+ writable: true
1517
+ });
1518
+ } else {
1519
+ object[name] = value;
1520
+ }
1521
+ };
1522
+
1523
+ var defineProperties = function (object, map) {
1524
+ var predicates = arguments.length > 2 ? arguments[2] : {};
1525
+ var props = objectKeys(map);
1526
+ if (hasSymbols$3) {
1527
+ props = concat.call(props, Object.getOwnPropertySymbols(map));
1528
+ }
1529
+ for (var i = 0; i < props.length; i += 1) {
1530
+ defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
1531
+ }
1532
+ };
1533
+
1534
+ defineProperties.supportsDescriptors = !!supportsDescriptors;
1535
+
1536
+ var defineProperties_1 = defineProperties;
1537
+
1538
+ /* eslint no-invalid-this: 1 */
1539
+
1540
+ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
1541
+ var slice = Array.prototype.slice;
1542
+ var toStr$3 = Object.prototype.toString;
1543
+ var funcType = '[object Function]';
1544
+
1545
+ var implementation$2 = function bind(that) {
1546
+ var target = this;
1547
+ if (typeof target !== 'function' || toStr$3.call(target) !== funcType) {
1548
+ throw new TypeError(ERROR_MESSAGE + target);
1549
+ }
1550
+ var args = slice.call(arguments, 1);
1551
+
1552
+ var bound;
1553
+ var binder = function () {
1554
+ if (this instanceof bound) {
1555
+ var result = target.apply(
1556
+ this,
1557
+ args.concat(slice.call(arguments))
1558
+ );
1559
+ if (Object(result) === result) {
1560
+ return result;
1561
+ }
1562
+ return this;
1563
+ } else {
1564
+ return target.apply(
1565
+ that,
1566
+ args.concat(slice.call(arguments))
1567
+ );
1568
+ }
1569
+ };
1570
+
1571
+ var boundLength = Math.max(0, target.length - args.length);
1572
+ var boundArgs = [];
1573
+ for (var i = 0; i < boundLength; i++) {
1574
+ boundArgs.push('$' + i);
1575
+ }
1576
+
1577
+ bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
1578
+
1579
+ if (target.prototype) {
1580
+ var Empty = function Empty() {};
1581
+ Empty.prototype = target.prototype;
1582
+ bound.prototype = new Empty();
1583
+ Empty.prototype = null;
1584
+ }
1585
+
1586
+ return bound;
1587
+ };
1588
+
1589
+ var functionBind = Function.prototype.bind || implementation$2;
1590
+
1591
+ /* eslint complexity: [2, 18], max-statements: [2, 33] */
1592
+ var shams$1 = function hasSymbols() {
1593
+ if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
1594
+ if (typeof Symbol.iterator === 'symbol') { return true; }
1595
+
1596
+ var obj = {};
1597
+ var sym = Symbol('test');
1598
+ var symObj = Object(sym);
1599
+ if (typeof sym === 'string') { return false; }
1600
+
1601
+ if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
1602
+ if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
1603
+
1604
+ // temp disabled per https://github.com/ljharb/object.assign/issues/17
1605
+ // if (sym instanceof Symbol) { return false; }
1606
+ // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
1607
+ // if (!(symObj instanceof Symbol)) { return false; }
1608
+
1609
+ // if (typeof Symbol.prototype.toString !== 'function') { return false; }
1610
+ // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
1611
+
1612
+ var symVal = 42;
1613
+ obj[sym] = symVal;
1614
+ for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
1615
+ if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
1616
+
1617
+ if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
1618
+
1619
+ var syms = Object.getOwnPropertySymbols(obj);
1620
+ if (syms.length !== 1 || syms[0] !== sym) { return false; }
1621
+
1622
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
1623
+
1624
+ if (typeof Object.getOwnPropertyDescriptor === 'function') {
1625
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
1626
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
1627
+ }
1628
+
1629
+ return true;
1630
+ };
1631
+
1632
+ var origSymbol = typeof Symbol !== 'undefined' && Symbol;
1633
+
1634
+
1635
+ var hasSymbols$2 = function hasNativeSymbols() {
1636
+ if (typeof origSymbol !== 'function') { return false; }
1637
+ if (typeof Symbol !== 'function') { return false; }
1638
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
1639
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
1640
+
1641
+ return shams$1();
1642
+ };
1643
+
1644
+ var src = functionBind.call(Function.call, Object.prototype.hasOwnProperty);
1645
+
1646
+ var undefined$1;
1647
+
1648
+ var $SyntaxError$1 = SyntaxError;
1649
+ var $Function = Function;
1650
+ var $TypeError$5 = TypeError;
1651
+
1652
+ // eslint-disable-next-line consistent-return
1653
+ var getEvalledConstructor = function (expressionSyntax) {
1654
+ try {
1655
+ return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
1656
+ } catch (e) {}
1657
+ };
1658
+
1659
+ var $gOPD$2 = Object.getOwnPropertyDescriptor;
1660
+ if ($gOPD$2) {
1661
+ try {
1662
+ $gOPD$2({}, '');
1663
+ } catch (e) {
1664
+ $gOPD$2 = null; // this is IE 8, which has a broken gOPD
1665
+ }
1666
+ }
1667
+
1668
+ var throwTypeError = function () {
1669
+ throw new $TypeError$5();
1670
+ };
1671
+ var ThrowTypeError = $gOPD$2
1672
+ ? (function () {
1673
+ try {
1674
+ // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
1675
+ arguments.callee; // IE 8 does not throw here
1676
+ return throwTypeError;
1677
+ } catch (calleeThrows) {
1678
+ try {
1679
+ // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
1680
+ return $gOPD$2(arguments, 'callee').get;
1681
+ } catch (gOPDthrows) {
1682
+ return throwTypeError;
1683
+ }
1684
+ }
1685
+ }())
1686
+ : throwTypeError;
1687
+
1688
+ var hasSymbols$1 = hasSymbols$2();
1689
+
1690
+ var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
1691
+
1692
+ var needsEval = {};
1693
+
1694
+ var TypedArray = typeof Uint8Array === 'undefined' ? undefined$1 : getProto(Uint8Array);
1695
+
1696
+ var INTRINSICS = {
1697
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
1698
+ '%Array%': Array,
1699
+ '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
1700
+ '%ArrayIteratorPrototype%': hasSymbols$1 ? getProto([][Symbol.iterator]()) : undefined$1,
1701
+ '%AsyncFromSyncIteratorPrototype%': undefined$1,
1702
+ '%AsyncFunction%': needsEval,
1703
+ '%AsyncGenerator%': needsEval,
1704
+ '%AsyncGeneratorFunction%': needsEval,
1705
+ '%AsyncIteratorPrototype%': needsEval,
1706
+ '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
1707
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
1708
+ '%Boolean%': Boolean,
1709
+ '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
1710
+ '%Date%': Date,
1711
+ '%decodeURI%': decodeURI,
1712
+ '%decodeURIComponent%': decodeURIComponent,
1713
+ '%encodeURI%': encodeURI,
1714
+ '%encodeURIComponent%': encodeURIComponent,
1715
+ '%Error%': Error,
1716
+ '%eval%': eval, // eslint-disable-line no-eval
1717
+ '%EvalError%': EvalError,
1718
+ '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
1719
+ '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
1720
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
1721
+ '%Function%': $Function,
1722
+ '%GeneratorFunction%': needsEval,
1723
+ '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
1724
+ '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
1725
+ '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
1726
+ '%isFinite%': isFinite,
1727
+ '%isNaN%': isNaN,
1728
+ '%IteratorPrototype%': hasSymbols$1 ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
1729
+ '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
1730
+ '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
1731
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$1 ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
1732
+ '%Math%': Math,
1733
+ '%Number%': Number,
1734
+ '%Object%': Object,
1735
+ '%parseFloat%': parseFloat,
1736
+ '%parseInt%': parseInt,
1737
+ '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
1738
+ '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
1739
+ '%RangeError%': RangeError,
1740
+ '%ReferenceError%': ReferenceError,
1741
+ '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
1742
+ '%RegExp%': RegExp,
1743
+ '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
1744
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$1 ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
1745
+ '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
1746
+ '%String%': String,
1747
+ '%StringIteratorPrototype%': hasSymbols$1 ? getProto(''[Symbol.iterator]()) : undefined$1,
1748
+ '%Symbol%': hasSymbols$1 ? Symbol : undefined$1,
1749
+ '%SyntaxError%': $SyntaxError$1,
1750
+ '%ThrowTypeError%': ThrowTypeError,
1751
+ '%TypedArray%': TypedArray,
1752
+ '%TypeError%': $TypeError$5,
1753
+ '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
1754
+ '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
1755
+ '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
1756
+ '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
1757
+ '%URIError%': URIError,
1758
+ '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
1759
+ '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
1760
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
1761
+ };
1762
+
1763
+ var doEval = function doEval(name) {
1764
+ var value;
1765
+ if (name === '%AsyncFunction%') {
1766
+ value = getEvalledConstructor('async function () {}');
1767
+ } else if (name === '%GeneratorFunction%') {
1768
+ value = getEvalledConstructor('function* () {}');
1769
+ } else if (name === '%AsyncGeneratorFunction%') {
1770
+ value = getEvalledConstructor('async function* () {}');
1771
+ } else if (name === '%AsyncGenerator%') {
1772
+ var fn = doEval('%AsyncGeneratorFunction%');
1773
+ if (fn) {
1774
+ value = fn.prototype;
1775
+ }
1776
+ } else if (name === '%AsyncIteratorPrototype%') {
1777
+ var gen = doEval('%AsyncGenerator%');
1778
+ if (gen) {
1779
+ value = getProto(gen.prototype);
1780
+ }
1781
+ }
1782
+
1783
+ INTRINSICS[name] = value;
1784
+
1785
+ return value;
1786
+ };
1787
+
1788
+ var LEGACY_ALIASES = {
1789
+ '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
1790
+ '%ArrayPrototype%': ['Array', 'prototype'],
1791
+ '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
1792
+ '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
1793
+ '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
1794
+ '%ArrayProto_values%': ['Array', 'prototype', 'values'],
1795
+ '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
1796
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
1797
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
1798
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
1799
+ '%DataViewPrototype%': ['DataView', 'prototype'],
1800
+ '%DatePrototype%': ['Date', 'prototype'],
1801
+ '%ErrorPrototype%': ['Error', 'prototype'],
1802
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
1803
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
1804
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
1805
+ '%FunctionPrototype%': ['Function', 'prototype'],
1806
+ '%Generator%': ['GeneratorFunction', 'prototype'],
1807
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
1808
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
1809
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
1810
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
1811
+ '%JSONParse%': ['JSON', 'parse'],
1812
+ '%JSONStringify%': ['JSON', 'stringify'],
1813
+ '%MapPrototype%': ['Map', 'prototype'],
1814
+ '%NumberPrototype%': ['Number', 'prototype'],
1815
+ '%ObjectPrototype%': ['Object', 'prototype'],
1816
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
1817
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
1818
+ '%PromisePrototype%': ['Promise', 'prototype'],
1819
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
1820
+ '%Promise_all%': ['Promise', 'all'],
1821
+ '%Promise_reject%': ['Promise', 'reject'],
1822
+ '%Promise_resolve%': ['Promise', 'resolve'],
1823
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
1824
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
1825
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
1826
+ '%SetPrototype%': ['Set', 'prototype'],
1827
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
1828
+ '%StringPrototype%': ['String', 'prototype'],
1829
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
1830
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
1831
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
1832
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
1833
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
1834
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
1835
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
1836
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
1837
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
1838
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
1839
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
1840
+ };
1841
+
1842
+
1843
+
1844
+ var $concat$2 = functionBind.call(Function.call, Array.prototype.concat);
1845
+ var $spliceApply = functionBind.call(Function.apply, Array.prototype.splice);
1846
+ var $replace = functionBind.call(Function.call, String.prototype.replace);
1847
+ var $strSlice = functionBind.call(Function.call, String.prototype.slice);
1848
+
1849
+ /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
1850
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
1851
+ var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
1852
+ var stringToPath = function stringToPath(string) {
1853
+ var first = $strSlice(string, 0, 1);
1854
+ var last = $strSlice(string, -1);
1855
+ if (first === '%' && last !== '%') {
1856
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
1857
+ } else if (last === '%' && first !== '%') {
1858
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
1859
+ }
1860
+ var result = [];
1861
+ $replace(string, rePropName, function (match, number, quote, subString) {
1862
+ result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
1863
+ });
1864
+ return result;
1865
+ };
1866
+ /* end adaptation */
1867
+
1868
+ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
1869
+ var intrinsicName = name;
1870
+ var alias;
1871
+ if (src(LEGACY_ALIASES, intrinsicName)) {
1872
+ alias = LEGACY_ALIASES[intrinsicName];
1873
+ intrinsicName = '%' + alias[0] + '%';
1874
+ }
1875
+
1876
+ if (src(INTRINSICS, intrinsicName)) {
1877
+ var value = INTRINSICS[intrinsicName];
1878
+ if (value === needsEval) {
1879
+ value = doEval(intrinsicName);
1880
+ }
1881
+ if (typeof value === 'undefined' && !allowMissing) {
1882
+ throw new $TypeError$5('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
1883
+ }
1884
+
1885
+ return {
1886
+ alias: alias,
1887
+ name: intrinsicName,
1888
+ value: value
1889
+ };
1890
+ }
1891
+
1892
+ throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
1893
+ };
1894
+
1895
+ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
1896
+ if (typeof name !== 'string' || name.length === 0) {
1897
+ throw new $TypeError$5('intrinsic name must be a non-empty string');
1898
+ }
1899
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
1900
+ throw new $TypeError$5('"allowMissing" argument must be a boolean');
1901
+ }
1902
+
1903
+ var parts = stringToPath(name);
1904
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
1905
+
1906
+ var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
1907
+ var intrinsicRealName = intrinsic.name;
1908
+ var value = intrinsic.value;
1909
+ var skipFurtherCaching = false;
1910
+
1911
+ var alias = intrinsic.alias;
1912
+ if (alias) {
1913
+ intrinsicBaseName = alias[0];
1914
+ $spliceApply(parts, $concat$2([0, 1], alias));
1915
+ }
1916
+
1917
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
1918
+ var part = parts[i];
1919
+ var first = $strSlice(part, 0, 1);
1920
+ var last = $strSlice(part, -1);
1921
+ if (
1922
+ (
1923
+ (first === '"' || first === "'" || first === '`')
1924
+ || (last === '"' || last === "'" || last === '`')
1925
+ )
1926
+ && first !== last
1927
+ ) {
1928
+ throw new $SyntaxError$1('property names with quotes must have matching quotes');
1929
+ }
1930
+ if (part === 'constructor' || !isOwn) {
1931
+ skipFurtherCaching = true;
1932
+ }
1933
+
1934
+ intrinsicBaseName += '.' + part;
1935
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
1936
+
1937
+ if (src(INTRINSICS, intrinsicRealName)) {
1938
+ value = INTRINSICS[intrinsicRealName];
1939
+ } else if (value != null) {
1940
+ if (!(part in value)) {
1941
+ if (!allowMissing) {
1942
+ throw new $TypeError$5('base intrinsic for ' + name + ' exists, but the property is not available.');
1943
+ }
1944
+ return void undefined$1;
1945
+ }
1946
+ if ($gOPD$2 && (i + 1) >= parts.length) {
1947
+ var desc = $gOPD$2(value, part);
1948
+ isOwn = !!desc;
1949
+
1950
+ // By convention, when a data property is converted to an accessor
1951
+ // property to emulate a data property that does not suffer from
1952
+ // the override mistake, that accessor's getter is marked with
1953
+ // an `originalValue` property. Here, when we detect this, we
1954
+ // uphold the illusion by pretending to see that original data
1955
+ // property, i.e., returning the value rather than the getter
1956
+ // itself.
1957
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
1958
+ value = desc.get;
1959
+ } else {
1960
+ value = value[part];
1961
+ }
1962
+ } else {
1963
+ isOwn = src(value, part);
1964
+ value = value[part];
1965
+ }
1966
+
1967
+ if (isOwn && !skipFurtherCaching) {
1968
+ INTRINSICS[intrinsicRealName] = value;
1969
+ }
1970
+ }
1971
+ }
1972
+ return value;
1973
+ };
1974
+
1975
+ var callBind = createCommonjsModule(function (module) {
1976
+
1977
+
1978
+
1979
+
1980
+ var $apply = getIntrinsic('%Function.prototype.apply%');
1981
+ var $call = getIntrinsic('%Function.prototype.call%');
1982
+ var $reflectApply = getIntrinsic('%Reflect.apply%', true) || functionBind.call($call, $apply);
1983
+
1984
+ var $gOPD = getIntrinsic('%Object.getOwnPropertyDescriptor%', true);
1985
+ var $defineProperty = getIntrinsic('%Object.defineProperty%', true);
1986
+ var $max = getIntrinsic('%Math.max%');
1987
+
1988
+ if ($defineProperty) {
1989
+ try {
1990
+ $defineProperty({}, 'a', { value: 1 });
1991
+ } catch (e) {
1992
+ // IE 8 has a broken defineProperty
1993
+ $defineProperty = null;
1994
+ }
1995
+ }
1996
+
1997
+ module.exports = function callBind(originalFunction) {
1998
+ var func = $reflectApply(functionBind, $call, arguments);
1999
+ if ($gOPD && $defineProperty) {
2000
+ var desc = $gOPD(func, 'length');
2001
+ if (desc.configurable) {
2002
+ // original length, plus the receiver, minus any additional arguments (after the receiver)
2003
+ $defineProperty(
2004
+ func,
2005
+ 'length',
2006
+ { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
2007
+ );
2008
+ }
2009
+ }
2010
+ return func;
2011
+ };
2012
+
2013
+ var applyBind = function applyBind() {
2014
+ return $reflectApply(functionBind, $apply, arguments);
2015
+ };
2016
+
2017
+ if ($defineProperty) {
2018
+ $defineProperty(module.exports, 'apply', { value: applyBind });
2019
+ } else {
2020
+ module.exports.apply = applyBind;
2021
+ }
2022
+ });
2023
+ callBind.apply;
2024
+
2025
+ var $indexOf = callBind(getIntrinsic('String.prototype.indexOf'));
2026
+
2027
+ var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
2028
+ var intrinsic = getIntrinsic(name, !!allowMissing);
2029
+ if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
2030
+ return callBind(intrinsic);
2031
+ }
2032
+ return intrinsic;
2033
+ };
2034
+
2035
+ var $Array$1 = getIntrinsic('%Array%');
2036
+
2037
+ // eslint-disable-next-line global-require
2038
+ var toStr$2 = !$Array$1.isArray && callBound$1('Object.prototype.toString');
2039
+
2040
+ // https://ecma-international.org/ecma-262/6.0/#sec-isarray
2041
+
2042
+ var IsArray$1 = $Array$1.isArray || function IsArray(argument) {
2043
+ return toStr$2(argument) === '[object Array]';
2044
+ };
2045
+
2046
+ var $defineProperty = getIntrinsic('%Object.defineProperty%', true);
2047
+
2048
+ if ($defineProperty) {
2049
+ try {
2050
+ $defineProperty({}, 'a', { value: 1 });
2051
+ } catch (e) {
2052
+ // IE 8 has a broken defineProperty
2053
+ $defineProperty = null;
2054
+ }
2055
+ }
2056
+
2057
+ // node v0.6 has a bug where array lengths can be Set but not Defined
2058
+ var hasArrayLengthDefineBug = Object.defineProperty && Object.defineProperty([], 'length', { value: 1 }).length === 0;
2059
+
2060
+ // eslint-disable-next-line global-require
2061
+ var isArray = hasArrayLengthDefineBug && IsArray$1; // this does not depend on any other AOs.
2062
+
2063
+
2064
+
2065
+ var $isEnumerable$1 = callBound$1('Object.prototype.propertyIsEnumerable');
2066
+
2067
+ // eslint-disable-next-line max-params
2068
+ var DefineOwnProperty = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {
2069
+ if (!$defineProperty) {
2070
+ if (!IsDataDescriptor(desc)) {
2071
+ // ES3 does not support getters/setters
2072
+ return false;
2073
+ }
2074
+ if (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {
2075
+ return false;
2076
+ }
2077
+
2078
+ // fallback for ES3
2079
+ if (P in O && $isEnumerable$1(O, P) !== !!desc['[[Enumerable]]']) {
2080
+ // a non-enumerable existing property
2081
+ return false;
2082
+ }
2083
+
2084
+ // property does not exist at all, or exists but is enumerable
2085
+ var V = desc['[[Value]]'];
2086
+ // eslint-disable-next-line no-param-reassign
2087
+ O[P] = V; // will use [[Define]]
2088
+ return SameValue(O[P], V);
2089
+ }
2090
+ if (
2091
+ hasArrayLengthDefineBug
2092
+ && P === 'length'
2093
+ && '[[Value]]' in desc
2094
+ && isArray(O)
2095
+ && O.length !== desc['[[Value]]']
2096
+ ) {
2097
+ // eslint-disable-next-line no-param-reassign
2098
+ O.length = desc['[[Value]]'];
2099
+ return O.length === desc['[[Value]]'];
2100
+ }
2101
+
2102
+ $defineProperty(O, P, FromPropertyDescriptor(desc));
2103
+ return true;
2104
+ };
2105
+
2106
+ var $TypeError$4 = getIntrinsic('%TypeError%');
2107
+ var $SyntaxError = getIntrinsic('%SyntaxError%');
2108
+
2109
+
2110
+
2111
+ var predicates = {
2112
+ // https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type
2113
+ 'Property Descriptor': function isPropertyDescriptor(Type, Desc) {
2114
+ if (Type(Desc) !== 'Object') {
2115
+ return false;
2116
+ }
2117
+ var allowed = {
2118
+ '[[Configurable]]': true,
2119
+ '[[Enumerable]]': true,
2120
+ '[[Get]]': true,
2121
+ '[[Set]]': true,
2122
+ '[[Value]]': true,
2123
+ '[[Writable]]': true
2124
+ };
2125
+
2126
+ for (var key in Desc) { // eslint-disable-line
2127
+ if (src(Desc, key) && !allowed[key]) {
2128
+ return false;
2129
+ }
2130
+ }
2131
+
2132
+ var isData = src(Desc, '[[Value]]');
2133
+ var IsAccessor = src(Desc, '[[Get]]') || src(Desc, '[[Set]]');
2134
+ if (isData && IsAccessor) {
2135
+ throw new $TypeError$4('Property Descriptors may not be both accessor and data descriptors');
2136
+ }
2137
+ return true;
2138
+ }
2139
+ };
2140
+
2141
+ var assertRecord = function assertRecord(Type, recordType, argumentName, value) {
2142
+ var predicate = predicates[recordType];
2143
+ if (typeof predicate !== 'function') {
2144
+ throw new $SyntaxError('unknown record type: ' + recordType);
2145
+ }
2146
+ if (!predicate(Type, value)) {
2147
+ throw new $TypeError$4(argumentName + ' must be a ' + recordType);
2148
+ }
2149
+ };
2150
+
2151
+ // https://262.ecma-international.org/5.1/#sec-8
2152
+
2153
+ var Type$1 = function Type(x) {
2154
+ if (x === null) {
2155
+ return 'Null';
2156
+ }
2157
+ if (typeof x === 'undefined') {
2158
+ return 'Undefined';
2159
+ }
2160
+ if (typeof x === 'function' || typeof x === 'object') {
2161
+ return 'Object';
2162
+ }
2163
+ if (typeof x === 'number') {
2164
+ return 'Number';
2165
+ }
2166
+ if (typeof x === 'boolean') {
2167
+ return 'Boolean';
2168
+ }
2169
+ if (typeof x === 'string') {
2170
+ return 'String';
2171
+ }
2172
+ };
2173
+
2174
+ // https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values
2175
+
2176
+ var Type = function Type(x) {
2177
+ if (typeof x === 'symbol') {
2178
+ return 'Symbol';
2179
+ }
2180
+ if (typeof x === 'bigint') {
2181
+ return 'BigInt';
2182
+ }
2183
+ return Type$1(x);
2184
+ };
2185
+
2186
+ // https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor
2187
+
2188
+ var FromPropertyDescriptor = function FromPropertyDescriptor(Desc) {
2189
+ if (typeof Desc === 'undefined') {
2190
+ return Desc;
2191
+ }
2192
+
2193
+ assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
2194
+
2195
+ var obj = {};
2196
+ if ('[[Value]]' in Desc) {
2197
+ obj.value = Desc['[[Value]]'];
2198
+ }
2199
+ if ('[[Writable]]' in Desc) {
2200
+ obj.writable = Desc['[[Writable]]'];
2201
+ }
2202
+ if ('[[Get]]' in Desc) {
2203
+ obj.get = Desc['[[Get]]'];
2204
+ }
2205
+ if ('[[Set]]' in Desc) {
2206
+ obj.set = Desc['[[Set]]'];
2207
+ }
2208
+ if ('[[Enumerable]]' in Desc) {
2209
+ obj.enumerable = Desc['[[Enumerable]]'];
2210
+ }
2211
+ if ('[[Configurable]]' in Desc) {
2212
+ obj.configurable = Desc['[[Configurable]]'];
2213
+ }
2214
+ return obj;
2215
+ };
2216
+
2217
+ var $gOPD$1 = getIntrinsic('%Object.getOwnPropertyDescriptor%', true);
2218
+ if ($gOPD$1) {
2219
+ try {
2220
+ $gOPD$1([], 'length');
2221
+ } catch (e) {
2222
+ // IE 8 has a broken gOPD
2223
+ $gOPD$1 = null;
2224
+ }
2225
+ }
2226
+
2227
+ var getOwnPropertyDescriptor = $gOPD$1;
2228
+
2229
+ var $Array = getIntrinsic('%Array%');
2230
+
2231
+ // eslint-disable-next-line global-require
2232
+ var toStr$1 = !$Array.isArray && callBound$1('Object.prototype.toString');
2233
+
2234
+ // https://ecma-international.org/ecma-262/6.0/#sec-isarray
2235
+
2236
+ var IsArray = $Array.isArray || function IsArray(argument) {
2237
+ return toStr$1(argument) === '[object Array]';
2238
+ };
2239
+
2240
+ // https://ecma-international.org/ecma-262/6.0/#sec-ispropertykey
2241
+
2242
+ var IsPropertyKey = function IsPropertyKey(argument) {
2243
+ return typeof argument === 'string' || typeof argument === 'symbol';
2244
+ };
2245
+
2246
+ var shams = function hasToStringTagShams() {
2247
+ return shams$1() && !!Symbol.toStringTag;
2248
+ };
2249
+
2250
+ var hasToStringTag$1 = shams();
2251
+ var has;
2252
+ var $exec;
2253
+ var isRegexMarker;
2254
+ var badStringifier;
2255
+
2256
+ if (hasToStringTag$1) {
2257
+ has = callBound$1('Object.prototype.hasOwnProperty');
2258
+ $exec = callBound$1('RegExp.prototype.exec');
2259
+ isRegexMarker = {};
2260
+
2261
+ var throwRegexMarker = function () {
2262
+ throw isRegexMarker;
2263
+ };
2264
+ badStringifier = {
2265
+ toString: throwRegexMarker,
2266
+ valueOf: throwRegexMarker
2267
+ };
2268
+
2269
+ if (typeof Symbol.toPrimitive === 'symbol') {
2270
+ badStringifier[Symbol.toPrimitive] = throwRegexMarker;
2271
+ }
2272
+ }
2273
+
2274
+ var $toString = callBound$1('Object.prototype.toString');
2275
+ var gOPD = Object.getOwnPropertyDescriptor;
2276
+ var regexClass = '[object RegExp]';
2277
+
2278
+ var isRegex = hasToStringTag$1
2279
+ // eslint-disable-next-line consistent-return
2280
+ ? function isRegex(value) {
2281
+ if (!value || typeof value !== 'object') {
2282
+ return false;
2283
+ }
2284
+
2285
+ var descriptor = gOPD(value, 'lastIndex');
2286
+ var hasLastIndexDataProperty = descriptor && has(descriptor, 'value');
2287
+ if (!hasLastIndexDataProperty) {
2288
+ return false;
2289
+ }
2290
+
2291
+ try {
2292
+ $exec(value, badStringifier);
2293
+ } catch (e) {
2294
+ return e === isRegexMarker;
2295
+ }
2296
+ }
2297
+ : function isRegex(value) {
2298
+ // In older browsers, typeof regex incorrectly returns 'function'
2299
+ if (!value || (typeof value !== 'object' && typeof value !== 'function')) {
2300
+ return false;
2301
+ }
2302
+
2303
+ return $toString(value) === regexClass;
2304
+ };
2305
+
2306
+ // http://262.ecma-international.org/5.1/#sec-9.2
2307
+
2308
+ var ToBoolean = function ToBoolean(value) { return !!value; };
2309
+
2310
+ var $match = getIntrinsic('%Symbol.match%', true);
2311
+
2312
+
2313
+
2314
+
2315
+
2316
+ // https://ecma-international.org/ecma-262/6.0/#sec-isregexp
2317
+
2318
+ var IsRegExp = function IsRegExp(argument) {
2319
+ if (!argument || typeof argument !== 'object') {
2320
+ return false;
2321
+ }
2322
+ if ($match) {
2323
+ var isRegExp = argument[$match];
2324
+ if (typeof isRegExp !== 'undefined') {
2325
+ return ToBoolean(isRegExp);
2326
+ }
2327
+ }
2328
+ return isRegex(argument);
2329
+ };
2330
+
2331
+ var fnToStr = Function.prototype.toString;
2332
+ var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;
2333
+ var badArrayLike;
2334
+ var isCallableMarker;
2335
+ if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {
2336
+ try {
2337
+ badArrayLike = Object.defineProperty({}, 'length', {
2338
+ get: function () {
2339
+ throw isCallableMarker;
2340
+ }
2341
+ });
2342
+ isCallableMarker = {};
2343
+ // eslint-disable-next-line no-throw-literal
2344
+ reflectApply(function () { throw 42; }, null, badArrayLike);
2345
+ } catch (_) {
2346
+ if (_ !== isCallableMarker) {
2347
+ reflectApply = null;
2348
+ }
2349
+ }
2350
+ } else {
2351
+ reflectApply = null;
2352
+ }
2353
+
2354
+ var constructorRegex = /^\s*class\b/;
2355
+ var isES6ClassFn = function isES6ClassFunction(value) {
2356
+ try {
2357
+ var fnStr = fnToStr.call(value);
2358
+ return constructorRegex.test(fnStr);
2359
+ } catch (e) {
2360
+ return false; // not a function
2361
+ }
2362
+ };
2363
+
2364
+ var tryFunctionObject = function tryFunctionToStr(value) {
2365
+ try {
2366
+ if (isES6ClassFn(value)) { return false; }
2367
+ fnToStr.call(value);
2368
+ return true;
2369
+ } catch (e) {
2370
+ return false;
2371
+ }
2372
+ };
2373
+ var toStr = Object.prototype.toString;
2374
+ var fnClass = '[object Function]';
2375
+ var genClass = '[object GeneratorFunction]';
2376
+ var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`
2377
+ /* globals document: false */
2378
+ var documentDotAll = typeof document === 'object' && typeof document.all === 'undefined' && document.all !== undefined ? document.all : {};
2379
+
2380
+ var isCallable = reflectApply
2381
+ ? function isCallable(value) {
2382
+ if (value === documentDotAll) { return true; }
2383
+ if (!value) { return false; }
2384
+ if (typeof value !== 'function' && typeof value !== 'object') { return false; }
2385
+ if (typeof value === 'function' && !value.prototype) { return true; }
2386
+ try {
2387
+ reflectApply(value, null, badArrayLike);
2388
+ } catch (e) {
2389
+ if (e !== isCallableMarker) { return false; }
2390
+ }
2391
+ return !isES6ClassFn(value);
2392
+ }
2393
+ : function isCallable(value) {
2394
+ if (value === documentDotAll) { return true; }
2395
+ if (!value) { return false; }
2396
+ if (typeof value !== 'function' && typeof value !== 'object') { return false; }
2397
+ if (typeof value === 'function' && !value.prototype) { return true; }
2398
+ if (hasToStringTag) { return tryFunctionObject(value); }
2399
+ if (isES6ClassFn(value)) { return false; }
2400
+ var strClass = toStr.call(value);
2401
+ return strClass === fnClass || strClass === genClass;
2402
+ };
2403
+
2404
+ // http://262.ecma-international.org/5.1/#sec-9.11
2405
+
2406
+ var IsCallable = isCallable;
2407
+
2408
+ var $TypeError$3 = getIntrinsic('%TypeError%');
2409
+
2410
+
2411
+
2412
+
2413
+
2414
+ // https://262.ecma-international.org/5.1/#sec-8.10.5
2415
+
2416
+ var ToPropertyDescriptor = function ToPropertyDescriptor(Obj) {
2417
+ if (Type(Obj) !== 'Object') {
2418
+ throw new $TypeError$3('ToPropertyDescriptor requires an object');
2419
+ }
2420
+
2421
+ var desc = {};
2422
+ if (src(Obj, 'enumerable')) {
2423
+ desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);
2424
+ }
2425
+ if (src(Obj, 'configurable')) {
2426
+ desc['[[Configurable]]'] = ToBoolean(Obj.configurable);
2427
+ }
2428
+ if (src(Obj, 'value')) {
2429
+ desc['[[Value]]'] = Obj.value;
2430
+ }
2431
+ if (src(Obj, 'writable')) {
2432
+ desc['[[Writable]]'] = ToBoolean(Obj.writable);
2433
+ }
2434
+ if (src(Obj, 'get')) {
2435
+ var getter = Obj.get;
2436
+ if (typeof getter !== 'undefined' && !IsCallable(getter)) {
2437
+ throw new $TypeError$3('getter must be a function');
2438
+ }
2439
+ desc['[[Get]]'] = getter;
2440
+ }
2441
+ if (src(Obj, 'set')) {
2442
+ var setter = Obj.set;
2443
+ if (typeof setter !== 'undefined' && !IsCallable(setter)) {
2444
+ throw new $TypeError$3('setter must be a function');
2445
+ }
2446
+ desc['[[Set]]'] = setter;
2447
+ }
2448
+
2449
+ if ((src(desc, '[[Get]]') || src(desc, '[[Set]]')) && (src(desc, '[[Value]]') || src(desc, '[[Writable]]'))) {
2450
+ throw new $TypeError$3('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
2451
+ }
2452
+ return desc;
2453
+ };
2454
+
2455
+ var $TypeError$2 = getIntrinsic('%TypeError%');
2456
+
2457
+
2458
+
2459
+ var $isEnumerable = callBound$1('Object.prototype.propertyIsEnumerable');
2460
+
2461
+
2462
+
2463
+
2464
+
2465
+
2466
+
2467
+
2468
+
2469
+ // https://ecma-international.org/ecma-262/6.0/#sec-ordinarygetownproperty
2470
+
2471
+ var OrdinaryGetOwnProperty = function OrdinaryGetOwnProperty(O, P) {
2472
+ if (Type(O) !== 'Object') {
2473
+ throw new $TypeError$2('Assertion failed: O must be an Object');
2474
+ }
2475
+ if (!IsPropertyKey(P)) {
2476
+ throw new $TypeError$2('Assertion failed: P must be a Property Key');
2477
+ }
2478
+ if (!src(O, P)) {
2479
+ return void 0;
2480
+ }
2481
+ if (!getOwnPropertyDescriptor) {
2482
+ // ES3 / IE 8 fallback
2483
+ var arrayLength = IsArray(O) && P === 'length';
2484
+ var regexLastIndex = IsRegExp(O) && P === 'lastIndex';
2485
+ return {
2486
+ '[[Configurable]]': !(arrayLength || regexLastIndex),
2487
+ '[[Enumerable]]': $isEnumerable(O, P),
2488
+ '[[Value]]': O[P],
2489
+ '[[Writable]]': true
2490
+ };
2491
+ }
2492
+ return ToPropertyDescriptor(getOwnPropertyDescriptor(O, P));
2493
+ };
2494
+
2495
+ // https://ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor
2496
+
2497
+ var IsDataDescriptor = function IsDataDescriptor(Desc) {
2498
+ if (typeof Desc === 'undefined') {
2499
+ return false;
2500
+ }
2501
+
2502
+ assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
2503
+
2504
+ if (!src(Desc, '[[Value]]') && !src(Desc, '[[Writable]]')) {
2505
+ return false;
2506
+ }
2507
+
2508
+ return true;
2509
+ };
2510
+
2511
+ var isPrimitive = function isPrimitive(value) {
2512
+ return value === null || (typeof value !== 'function' && typeof value !== 'object');
2513
+ };
2514
+
2515
+ var $Object$1 = getIntrinsic('%Object%');
2516
+
2517
+
2518
+
2519
+ var $preventExtensions = $Object$1.preventExtensions;
2520
+ var $isExtensible = $Object$1.isExtensible;
2521
+
2522
+ // https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o
2523
+
2524
+ var IsExtensible = $preventExtensions
2525
+ ? function IsExtensible(obj) {
2526
+ return !isPrimitive(obj) && $isExtensible(obj);
2527
+ }
2528
+ : function IsExtensible(obj) {
2529
+ return !isPrimitive(obj);
2530
+ };
2531
+
2532
+ var _isNaN = Number.isNaN || function isNaN(a) {
2533
+ return a !== a;
2534
+ };
2535
+
2536
+ // http://262.ecma-international.org/5.1/#sec-9.12
2537
+
2538
+ var SameValue = function SameValue(x, y) {
2539
+ if (x === y) { // 0 === -0, but they are not identical.
2540
+ if (x === 0) { return 1 / x === 1 / y; }
2541
+ return true;
2542
+ }
2543
+ return _isNaN(x) && _isNaN(y);
2544
+ };
2545
+
2546
+ var $TypeError$1 = getIntrinsic('%TypeError%');
2547
+
2548
+
2549
+
2550
+
2551
+
2552
+
2553
+
2554
+
2555
+
2556
+
2557
+
2558
+ // https://ecma-international.org/ecma-262/6.0/#sec-createdataproperty
2559
+
2560
+ var CreateDataProperty = function CreateDataProperty(O, P, V) {
2561
+ if (Type(O) !== 'Object') {
2562
+ throw new $TypeError$1('Assertion failed: Type(O) is not Object');
2563
+ }
2564
+ if (!IsPropertyKey(P)) {
2565
+ throw new $TypeError$1('Assertion failed: IsPropertyKey(P) is not true');
2566
+ }
2567
+ var oldDesc = OrdinaryGetOwnProperty(O, P);
2568
+ var extensible = !oldDesc || IsExtensible(O);
2569
+ var immutable = oldDesc && (!oldDesc['[[Writable]]'] || !oldDesc['[[Configurable]]']);
2570
+ if (immutable || !extensible) {
2571
+ return false;
2572
+ }
2573
+ return DefineOwnProperty(
2574
+ IsDataDescriptor,
2575
+ SameValue,
2576
+ FromPropertyDescriptor,
2577
+ O,
2578
+ P,
2579
+ {
2580
+ '[[Configurable]]': true,
2581
+ '[[Enumerable]]': true,
2582
+ '[[Value]]': V,
2583
+ '[[Writable]]': true
2584
+ }
2585
+ );
2586
+ };
2587
+
2588
+ var $TypeError = getIntrinsic('%TypeError%');
2589
+
2590
+ // http://262.ecma-international.org/5.1/#sec-9.10
2591
+
2592
+ var CheckObjectCoercible = function CheckObjectCoercible(value, optMessage) {
2593
+ if (value == null) {
2594
+ throw new $TypeError(optMessage || ('Cannot call method on ' + value));
2595
+ }
2596
+ return value;
2597
+ };
2598
+
2599
+ var RequireObjectCoercible = CheckObjectCoercible;
2600
+
2601
+ var $Object = getIntrinsic('%Object%');
2602
+
2603
+
2604
+
2605
+ // https://ecma-international.org/ecma-262/6.0/#sec-toobject
2606
+
2607
+ var ToObject = function ToObject(value) {
2608
+ RequireObjectCoercible(value);
2609
+ return $Object(value);
2610
+ };
2611
+
2612
+ var $gOPD = Object.getOwnPropertyDescriptor;
2613
+ var $getOwnNames = Object.getOwnPropertyNames;
2614
+ var $getSymbols = Object.getOwnPropertySymbols;
2615
+ var $concat$1 = callBound$1('Array.prototype.concat');
2616
+ var $reduce = callBound$1('Array.prototype.reduce');
2617
+ var getAll = $getSymbols ? function (obj) {
2618
+ return $concat$1($getOwnNames(obj), $getSymbols(obj));
2619
+ } : $getOwnNames;
2620
+
2621
+ var isES5$1 = IsCallable($gOPD) && IsCallable($getOwnNames);
2622
+
2623
+ var implementation$1 = function getOwnPropertyDescriptors(value) {
2624
+ RequireObjectCoercible(value);
2625
+ if (!isES5$1) {
2626
+ throw new TypeError('getOwnPropertyDescriptors requires Object.getOwnPropertyDescriptor');
2627
+ }
2628
+
2629
+ var O = ToObject(value);
2630
+ return $reduce(
2631
+ getAll(O),
2632
+ function (acc, key) {
2633
+ var descriptor = $gOPD(O, key);
2634
+ if (typeof descriptor !== 'undefined') {
2635
+ CreateDataProperty(acc, key, descriptor);
2636
+ }
2637
+ return acc;
2638
+ },
2639
+ {}
2640
+ );
2641
+ };
2642
+
2643
+ var polyfill$2 = function getPolyfill() {
2644
+ return typeof Object.getOwnPropertyDescriptors === 'function' ? Object.getOwnPropertyDescriptors : implementation$1;
2645
+ };
2646
+
2647
+ var shim$1 = function shimGetOwnPropertyDescriptors() {
2648
+ var polyfill = polyfill$2();
2649
+ defineProperties_1(
2650
+ Object,
2651
+ { getOwnPropertyDescriptors: polyfill },
2652
+ { getOwnPropertyDescriptors: function () { return Object.getOwnPropertyDescriptors !== polyfill; } }
2653
+ );
2654
+ return polyfill;
2655
+ };
2656
+
2657
+ var bound = callBind(polyfill$2(), Object);
2658
+
2659
+ defineProperties_1(bound, {
2660
+ getPolyfill: polyfill$2,
2661
+ implementation: implementation$1,
2662
+ shim: shim$1
2663
+ });
2664
+
2665
+ var object_getownpropertydescriptors = bound;
2666
+
2667
+ // TODO; semver-major: remove
2668
+
2669
+ var callBound = callBound$1;
2670
+
2671
+ var isES5 = typeof Object.defineProperty === 'function'
2672
+ && typeof Object.defineProperties === 'function';
2673
+
2674
+ var hasProto = [].__proto__ === Array.prototype; // eslint-disable-line no-proto
2675
+
2676
+ if (!isES5 || !hasProto) {
2677
+ throw new TypeError('util.promisify requires a true ES5 environment, that also supports `__proto__`');
2678
+ }
2679
+
2680
+
2681
+
2682
+ if (typeof Promise !== 'function') {
2683
+ throw new TypeError('`Promise` must be globally available for util.promisify to work.');
2684
+ }
2685
+
2686
+
2687
+
2688
+ var $slice = callBound('Array.prototype.slice');
2689
+ var $concat = callBound('Array.prototype.concat');
2690
+ var $forEach = callBound('Array.prototype.forEach');
2691
+
2692
+ var hasSymbols = hasSymbols$2();
2693
+
2694
+ var kCustomPromisifiedSymbol = hasSymbols ? Symbol('util.promisify.custom') : null;
2695
+ var kCustomPromisifyArgsSymbol = hasSymbols ? Symbol('customPromisifyArgs') : null;
2696
+
2697
+ var implementation = function promisify(orig) {
2698
+ if (typeof orig !== 'function') {
2699
+ var error = new TypeError('The "original" argument must be of type function');
2700
+ error.name = 'TypeError [ERR_INVALID_ARG_TYPE]';
2701
+ error.code = 'ERR_INVALID_ARG_TYPE';
2702
+ throw error;
2703
+ }
2704
+
2705
+ if (hasSymbols && orig[kCustomPromisifiedSymbol]) {
2706
+ var customFunction = orig[kCustomPromisifiedSymbol];
2707
+ if (typeof customFunction !== 'function') {
2708
+ throw new TypeError('The [util.promisify.custom] property must be a function');
2709
+ }
2710
+ Object.defineProperty(customFunction, kCustomPromisifiedSymbol, {
2711
+ configurable: true,
2712
+ enumerable: false,
2713
+ value: customFunction,
2714
+ writable: false
2715
+ });
2716
+ return customFunction;
2717
+ }
2718
+
2719
+ // Names to create an object from in case the callback receives multiple
2720
+ // arguments, e.g. ['stdout', 'stderr'] for child_process.exec.
2721
+ var argumentNames = orig[kCustomPromisifyArgsSymbol];
2722
+
2723
+ var promisified = function fn() {
2724
+ var args = $slice(arguments);
2725
+ var self = this; // eslint-disable-line no-invalid-this
2726
+ return new Promise(function (resolve, reject) {
2727
+ orig.apply(self, $concat(args, function (err) {
2728
+ var values = arguments.length > 1 ? $slice(arguments, 1) : [];
2729
+ if (err) {
2730
+ reject(err);
2731
+ } else if (typeof argumentNames !== 'undefined' && values.length > 1) {
2732
+ var obj = {};
2733
+ $forEach(argumentNames, function (name, index) {
2734
+ obj[name] = values[index];
2735
+ });
2736
+ resolve(obj);
2737
+ } else {
2738
+ resolve(values[0]);
2739
+ }
2740
+ }));
2741
+ });
2742
+ };
2743
+
2744
+ promisified.__proto__ = orig.__proto__; // eslint-disable-line no-proto
2745
+
2746
+ Object.defineProperty(promisified, kCustomPromisifiedSymbol, {
2747
+ configurable: true,
2748
+ enumerable: false,
2749
+ value: promisified,
2750
+ writable: false
2751
+ });
2752
+ return Object.defineProperties(promisified, object_getownpropertydescriptors(orig));
2753
+ };
2754
+
2755
+ var custom = kCustomPromisifiedSymbol;
2756
+ var customPromisifyArgs = kCustomPromisifyArgsSymbol;
2757
+ implementation.custom = custom;
2758
+ implementation.customPromisifyArgs = customPromisifyArgs;
2759
+
2760
+ var polyfill$1 = function getPolyfill() {
2761
+ if (typeof util.promisify === 'function') {
2762
+ return util.promisify;
2763
+ }
2764
+ return implementation;
2765
+ };
2766
+
2767
+ var shim = function shimUtilPromisify() {
2768
+ var polyfill = polyfill$1();
2769
+ if (polyfill !== util.promisify) {
2770
+ Object.defineProperty(util, 'promisify', {
2771
+ configurable: true,
2772
+ enumerable: true,
2773
+ value: polyfill,
2774
+ writable: true
2775
+ });
2776
+ }
2777
+ return polyfill;
2778
+ };
2779
+
2780
+ var polyfill = polyfill$1();
2781
+
2782
+
2783
+ /* eslint-disable no-unused-vars */
2784
+ var boundPromisify = function promisify(orig) {
2785
+ /* eslint-enable no-unused-vars */
2786
+ return polyfill.apply(util, arguments);
2787
+ };
2788
+ defineProperties_1(boundPromisify, {
2789
+ custom: polyfill.custom,
2790
+ customPromisifyArgs: polyfill.customPromisifyArgs,
2791
+ getPolyfill: polyfill$1,
2792
+ implementation: implementation,
2793
+ shim: shim
2794
+ });
2795
+
2796
+ var util_promisify = boundPromisify;
2797
+
2798
+ util_promisify.shim();
1316
2799
 
1317
2800
  function connect() {
1318
2801
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
@@ -1329,19 +2812,19 @@ function connect() {
1329
2812
  var connection = mysql.createConnection(config);
1330
2813
  return {
1331
2814
  query: function query(sql, args) {
1332
- return util$1.promisify(connection.query).call(connection, sql, args);
2815
+ return util.promisify(connection.query).call(connection, sql, args);
1333
2816
  },
1334
2817
  beginTransaction: function beginTransaction() {
1335
- return util$1.promisify(connection.beginTransaction).call(connection);
2818
+ return util.promisify(connection.beginTransaction).call(connection);
1336
2819
  },
1337
2820
  commit: function commit() {
1338
- return util$1.promisify(connection.commit).call(connection);
2821
+ return util.promisify(connection.commit).call(connection);
1339
2822
  },
1340
2823
  rollback: function rollback() {
1341
- return util$1.promisify(connection.rollback).call(connection);
2824
+ return util.promisify(connection.rollback).call(connection);
1342
2825
  },
1343
2826
  close: function close() {
1344
- return util$1.promisify(connection.end).call(connection);
2827
+ return util.promisify(connection.end).call(connection);
1345
2828
  }
1346
2829
  };
1347
2830
  }