@royaloperahouse/chord 2.6.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/dist/chord.cjs.development.js +705 -677
- package/dist/chord.cjs.development.js.map +1 -1
- package/dist/chord.cjs.production.min.js +1 -1
- package/dist/chord.cjs.production.min.js.map +1 -1
- package/dist/chord.esm.js +706 -677
- package/dist/chord.esm.js.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/organisms/index.d.ts +1 -2
- package/dist/index.d.ts +2 -2
- package/package.json +8 -2
- package/dist/components/organisms/LiveChat/LiveChat.d.ts +0 -3
- package/dist/components/organisms/LiveChat/index.d.ts +0 -2
package/dist/chord.esm.js
CHANGED
|
@@ -2618,13 +2618,15 @@ var Icon = /*#__PURE__*/memo(function (_ref) {
|
|
|
2618
2618
|
});
|
|
2619
2619
|
Icon.displayName = 'Icon';
|
|
2620
2620
|
|
|
2621
|
+
var _excluded = ["children", "iconName", "iconDirection", "iconClassName", "color"];
|
|
2622
|
+
|
|
2621
2623
|
var Button = function Button(_ref) {
|
|
2622
2624
|
var children = _ref.children,
|
|
2623
2625
|
iconName = _ref.iconName,
|
|
2624
2626
|
iconDirection = _ref.iconDirection,
|
|
2625
2627
|
iconClassName = _ref.iconClassName,
|
|
2626
2628
|
color = _ref.color,
|
|
2627
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
2629
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
2628
2630
|
|
|
2629
2631
|
var truncatedString = children.substring(0, 30);
|
|
2630
2632
|
return /*#__PURE__*/React__default.createElement(ButtonWrapper, Object.assign({}, rest, {
|
|
@@ -2745,10 +2747,12 @@ var IInformationBackgroundColour;
|
|
|
2745
2747
|
IInformationBackgroundColour["White"] = "white";
|
|
2746
2748
|
})(IInformationBackgroundColour || (IInformationBackgroundColour = {}));
|
|
2747
2749
|
|
|
2750
|
+
var _excluded$1 = ["children", "disabled"];
|
|
2751
|
+
|
|
2748
2752
|
var PrimaryButton = function PrimaryButton(_ref) {
|
|
2749
2753
|
var children = _ref.children,
|
|
2750
2754
|
disabled = _ref.disabled,
|
|
2751
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
2755
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
2752
2756
|
|
|
2753
2757
|
var description = 'This button is currently disabled';
|
|
2754
2758
|
return disabled ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(AriaDescription, {
|
|
@@ -2772,9 +2776,11 @@ var PrimaryButtonWrapper$1 = /*#__PURE__*/styled(Button)(_templateObject$5 || (_
|
|
|
2772
2776
|
return color ? "var(--base-color-" + color + ")" : theme.colors.primary;
|
|
2773
2777
|
});
|
|
2774
2778
|
|
|
2779
|
+
var _excluded$2 = ["children"];
|
|
2780
|
+
|
|
2775
2781
|
var SecondaryButton = function SecondaryButton(_ref) {
|
|
2776
2782
|
var children = _ref.children,
|
|
2777
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
2783
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
2778
2784
|
|
|
2779
2785
|
return /*#__PURE__*/React__default.createElement(PrimaryButtonWrapper$1, Object.assign({
|
|
2780
2786
|
color: Colors.Primary
|
|
@@ -2788,10 +2794,12 @@ var TertiaryButtonWrapper = /*#__PURE__*/styled.a(_templateObject$6 || (_templat
|
|
|
2788
2794
|
});
|
|
2789
2795
|
var TertiaryIconWrapper = /*#__PURE__*/styled.span(_templateObject2$1 || (_templateObject2$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: var(--button-icon-width);\n min-width: 20px;\n height: var(--button-icon-height);\n margin-left: var(--button-icon-margin);\n display: inline-block;\n"])));
|
|
2790
2796
|
|
|
2797
|
+
var _excluded$3 = ["children", "color"];
|
|
2798
|
+
|
|
2791
2799
|
var Button$1 = function Button(_ref) {
|
|
2792
2800
|
var children = _ref.children,
|
|
2793
2801
|
color = _ref.color,
|
|
2794
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
2802
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
2795
2803
|
|
|
2796
2804
|
var truncatedString = children.substring(0, 100);
|
|
2797
2805
|
return /*#__PURE__*/React__default.createElement(TertiaryButtonWrapper, Object.assign({}, rest, {
|
|
@@ -3322,6 +3330,7 @@ var ErrorLabel = /*#__PURE__*/styled.div(_templateObject6 || (_templateObject6 =
|
|
|
3322
3330
|
return 'var(--base-color-errorstate)';
|
|
3323
3331
|
});
|
|
3324
3332
|
|
|
3333
|
+
var _excluded$4 = ["children", "disabled", "error", "darkMode", "blackBox"];
|
|
3325
3334
|
/**
|
|
3326
3335
|
* A Radio component, that wraps around the native `<input type="radio"/>` element
|
|
3327
3336
|
* and adds some extra styling, states and information around it (i.e. an error label,
|
|
@@ -3351,7 +3360,7 @@ var Radio2 = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3351
3360
|
darkMode = _ref$darkMode === void 0 ? false : _ref$darkMode,
|
|
3352
3361
|
_ref$blackBox = _ref.blackBox,
|
|
3353
3362
|
blackBox = _ref$blackBox === void 0 ? false : _ref$blackBox,
|
|
3354
|
-
inputProps = _objectWithoutPropertiesLoose(_ref,
|
|
3363
|
+
inputProps = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
3355
3364
|
|
|
3356
3365
|
return /*#__PURE__*/React__default.createElement(Container, null, /*#__PURE__*/React__default.createElement(TickboxLabel, {
|
|
3357
3366
|
darkMode: darkMode,
|
|
@@ -3871,6 +3880,8 @@ var TabLinkWrapper = /*#__PURE__*/styled.a(_templateObject$m || (_templateObject
|
|
|
3871
3880
|
});
|
|
3872
3881
|
var TabLinkIconWrapper = /*#__PURE__*/styled.span(_templateObject2$b || (_templateObject2$b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: var(--button-icon-width);\n height: var(--button-icon-height);\n margin-right: var(--button-icon-margin);\n"])));
|
|
3873
3882
|
|
|
3883
|
+
var _excluded$5 = ["children", "iconName", "iconDirection", "color", "hoverColor"];
|
|
3884
|
+
|
|
3874
3885
|
var TabLink = function TabLink(_ref) {
|
|
3875
3886
|
var children = _ref.children,
|
|
3876
3887
|
iconName = _ref.iconName,
|
|
@@ -3879,7 +3890,7 @@ var TabLink = function TabLink(_ref) {
|
|
|
3879
3890
|
color = _ref$color === void 0 ? Colors.DarkGrey : _ref$color,
|
|
3880
3891
|
_ref$hoverColor = _ref.hoverColor,
|
|
3881
3892
|
hoverColor = _ref$hoverColor === void 0 ? Colors.Primary : _ref$hoverColor,
|
|
3882
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
3893
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
3883
3894
|
|
|
3884
3895
|
return /*#__PURE__*/React__default.createElement(TabLinkWrapper, Object.assign({
|
|
3885
3896
|
color: color,
|
|
@@ -3929,6 +3940,7 @@ var TextAreaError = /*#__PURE__*/styled.div(_templateObject4$3 || (_templateObje
|
|
|
3929
3940
|
return darkMode ? 'var(--base-color-white)' : 'var(--base-color-errorstate)';
|
|
3930
3941
|
});
|
|
3931
3942
|
|
|
3943
|
+
var _excluded$6 = ["label", "error", "width", "darkMode", "height", "columnStartDesktop", "columnStartDevice", "columnSpanDesktop", "columnSpanDevice", "maxLength", "tabIndex"];
|
|
3932
3944
|
/**
|
|
3933
3945
|
* An HTML textarea component for Chord.
|
|
3934
3946
|
*
|
|
@@ -3990,7 +4002,7 @@ var TextArea = function TextArea(_ref) {
|
|
|
3990
4002
|
maxLength = _ref$maxLength === void 0 ? 950 : _ref$maxLength,
|
|
3991
4003
|
_ref$tabIndex = _ref.tabIndex,
|
|
3992
4004
|
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex,
|
|
3993
|
-
textareaProps = _objectWithoutPropertiesLoose(_ref,
|
|
4005
|
+
textareaProps = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
3994
4006
|
|
|
3995
4007
|
return /*#__PURE__*/React__default.createElement(GridItem, {
|
|
3996
4008
|
columnStartDesktop: columnStartDesktop,
|
|
@@ -4050,6 +4062,7 @@ var ErrorLabel$1 = /*#__PURE__*/styled.div(_templateObject6$1 || (_templateObjec
|
|
|
4050
4062
|
return "var(--base-color-errorstate)";
|
|
4051
4063
|
});
|
|
4052
4064
|
|
|
4065
|
+
var _excluded$7 = ["label", "type", "error", "darkMode", "width"];
|
|
4053
4066
|
/**
|
|
4054
4067
|
* A text field component, that wraps around the native `<input />` element
|
|
4055
4068
|
* and adds some extra states and information around it (i.e. a text and an error labels,
|
|
@@ -4097,7 +4110,7 @@ var TextField = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
4097
4110
|
_ref$darkMode = _ref.darkMode,
|
|
4098
4111
|
darkMode = _ref$darkMode === void 0 ? false : _ref$darkMode,
|
|
4099
4112
|
width = _ref.width,
|
|
4100
|
-
inputProps = _objectWithoutPropertiesLoose(_ref,
|
|
4113
|
+
inputProps = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
4101
4114
|
|
|
4102
4115
|
var _useState = useState(false),
|
|
4103
4116
|
showPassword = _useState[0],
|
|
@@ -4188,6 +4201,7 @@ var ErrorLabel$2 = /*#__PURE__*/styled.p(_templateObject5$3 || (_templateObject5
|
|
|
4188
4201
|
return darkMode ? theme.colors.white : theme.colors.error;
|
|
4189
4202
|
});
|
|
4190
4203
|
|
|
4204
|
+
var _excluded$8 = ["label", "error", "darkMode", "width"];
|
|
4191
4205
|
/**
|
|
4192
4206
|
* @deprecated
|
|
4193
4207
|
*
|
|
@@ -4202,7 +4216,7 @@ var TextFieldLegacy = function TextFieldLegacy(_ref) {
|
|
|
4202
4216
|
_ref$darkMode = _ref.darkMode,
|
|
4203
4217
|
darkMode = _ref$darkMode === void 0 ? false : _ref$darkMode,
|
|
4204
4218
|
width = _ref.width,
|
|
4205
|
-
inputProps = _objectWithoutPropertiesLoose(_ref,
|
|
4219
|
+
inputProps = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
4206
4220
|
|
|
4207
4221
|
return /*#__PURE__*/React__default.createElement(TextFieldContainer, null, /*#__PURE__*/React__default.createElement("label", null, /*#__PURE__*/React__default.createElement(TextLabel$2, {
|
|
4208
4222
|
darkMode: darkMode,
|
|
@@ -4229,12 +4243,14 @@ var TextLinkWrapper = /*#__PURE__*/styled.a(_templateObject$q || (_templateObjec
|
|
|
4229
4243
|
});
|
|
4230
4244
|
var TextLinkIconWrapper = /*#__PURE__*/styled.span(_templateObject2$f || (_templateObject2$f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: var(--button-icon-width);\n height: var(--button-icon-height);\n margin-left: var(--button-icon-margin);\n"])));
|
|
4231
4245
|
|
|
4246
|
+
var _excluded$9 = ["children", "iconName", "iconDirection", "color"];
|
|
4247
|
+
|
|
4232
4248
|
var TextLink = function TextLink(_ref) {
|
|
4233
4249
|
var children = _ref.children,
|
|
4234
4250
|
iconName = _ref.iconName,
|
|
4235
4251
|
iconDirection = _ref.iconDirection,
|
|
4236
4252
|
color = _ref.color,
|
|
4237
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
4253
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
4238
4254
|
|
|
4239
4255
|
var truncatedString = children.substring(0, 30);
|
|
4240
4256
|
return /*#__PURE__*/React__default.createElement(TextLinkWrapper, Object.assign({
|
|
@@ -4429,6 +4445,7 @@ var ErrorLabel$3 = /*#__PURE__*/styled.div(_templateObject6$2 || (_templateObjec
|
|
|
4429
4445
|
return 'var(--base-color-errorstate)';
|
|
4430
4446
|
});
|
|
4431
4447
|
|
|
4448
|
+
var _excluded$a = ["children", "disabled", "error", "darkMode", "blackBox"];
|
|
4432
4449
|
/**
|
|
4433
4450
|
* A Tickbox component, that wraps around the native `<input type="checkbox"/>` element
|
|
4434
4451
|
* and adds some extra styling, states and information around it (i.e. an error label,
|
|
@@ -4458,7 +4475,7 @@ var Tickbox2 = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
4458
4475
|
darkMode = _ref$darkMode === void 0 ? false : _ref$darkMode,
|
|
4459
4476
|
_ref$blackBox = _ref.blackBox,
|
|
4460
4477
|
blackBox = _ref$blackBox === void 0 ? false : _ref$blackBox,
|
|
4461
|
-
inputProps = _objectWithoutPropertiesLoose(_ref,
|
|
4478
|
+
inputProps = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
4462
4479
|
|
|
4463
4480
|
return /*#__PURE__*/React__default.createElement(Container$2, null, /*#__PURE__*/React__default.createElement(TickboxLabel$2, {
|
|
4464
4481
|
darkMode: darkMode,
|
|
@@ -4616,197 +4633,201 @@ function createCommonjsModule(fn, module) {
|
|
|
4616
4633
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
4617
4634
|
}
|
|
4618
4635
|
|
|
4619
|
-
var runtime_1 =
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
var runtime = function (exports) {
|
|
4627
|
-
|
|
4628
|
-
var Op = Object.prototype;
|
|
4629
|
-
var hasOwn = Op.hasOwnProperty;
|
|
4630
|
-
var undefined$1; // More compressible than void 0.
|
|
4631
|
-
|
|
4632
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
4633
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
4634
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
4635
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
4636
|
-
|
|
4637
|
-
function define(obj, key, value) {
|
|
4638
|
-
Object.defineProperty(obj, key, {
|
|
4639
|
-
value: value,
|
|
4640
|
-
enumerable: true,
|
|
4641
|
-
configurable: true,
|
|
4642
|
-
writable: true
|
|
4643
|
-
});
|
|
4644
|
-
return obj[key];
|
|
4645
|
-
}
|
|
4636
|
+
var runtime_1 = createCommonjsModule(function (module) {
|
|
4637
|
+
/**
|
|
4638
|
+
* Copyright (c) 2014-present, Facebook, Inc.
|
|
4639
|
+
*
|
|
4640
|
+
* This source code is licensed under the MIT license found in the
|
|
4641
|
+
* LICENSE file in the root directory of this source tree.
|
|
4642
|
+
*/
|
|
4646
4643
|
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4644
|
+
var runtime = (function (exports) {
|
|
4645
|
+
|
|
4646
|
+
var Op = Object.prototype;
|
|
4647
|
+
var hasOwn = Op.hasOwnProperty;
|
|
4648
|
+
var undefined$1; // More compressible than void 0.
|
|
4649
|
+
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
4650
|
+
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
4651
|
+
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
4652
|
+
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
4653
|
+
|
|
4654
|
+
function define(obj, key, value) {
|
|
4655
|
+
Object.defineProperty(obj, key, {
|
|
4656
|
+
value: value,
|
|
4657
|
+
enumerable: true,
|
|
4658
|
+
configurable: true,
|
|
4659
|
+
writable: true
|
|
4660
|
+
});
|
|
4661
|
+
return obj[key];
|
|
4662
|
+
}
|
|
4663
|
+
try {
|
|
4664
|
+
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
4665
|
+
define({}, "");
|
|
4666
|
+
} catch (err) {
|
|
4667
|
+
define = function(obj, key, value) {
|
|
4668
|
+
return obj[key] = value;
|
|
4669
|
+
};
|
|
4670
|
+
}
|
|
4655
4671
|
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
// .throw, and .return methods.
|
|
4672
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
4673
|
+
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
4674
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
4675
|
+
var generator = Object.create(protoGenerator.prototype);
|
|
4676
|
+
var context = new Context(tryLocsList || []);
|
|
4662
4677
|
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4678
|
+
// The ._invoke method unifies the implementations of the .next,
|
|
4679
|
+
// .throw, and .return methods.
|
|
4680
|
+
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
4666
4681
|
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
type: "throw",
|
|
4687
|
-
arg: err
|
|
4688
|
-
};
|
|
4689
|
-
}
|
|
4682
|
+
return generator;
|
|
4683
|
+
}
|
|
4684
|
+
exports.wrap = wrap;
|
|
4685
|
+
|
|
4686
|
+
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
4687
|
+
// record like context.tryEntries[i].completion. This interface could
|
|
4688
|
+
// have been (and was previously) designed to take a closure to be
|
|
4689
|
+
// invoked without arguments, but in all the cases we care about we
|
|
4690
|
+
// already have an existing method we want to call, so there's no need
|
|
4691
|
+
// to create a new function object. We can even get away with assuming
|
|
4692
|
+
// the method takes exactly one argument, since that happens to be true
|
|
4693
|
+
// in every case, so we don't have to touch the arguments object. The
|
|
4694
|
+
// only additional allocation required is the completion record, which
|
|
4695
|
+
// has a stable shape and so hopefully should be cheap to allocate.
|
|
4696
|
+
function tryCatch(fn, obj, arg) {
|
|
4697
|
+
try {
|
|
4698
|
+
return { type: "normal", arg: fn.call(obj, arg) };
|
|
4699
|
+
} catch (err) {
|
|
4700
|
+
return { type: "throw", arg: err };
|
|
4690
4701
|
}
|
|
4702
|
+
}
|
|
4691
4703
|
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4704
|
+
var GenStateSuspendedStart = "suspendedStart";
|
|
4705
|
+
var GenStateSuspendedYield = "suspendedYield";
|
|
4706
|
+
var GenStateExecuting = "executing";
|
|
4707
|
+
var GenStateCompleted = "completed";
|
|
4708
|
+
|
|
4709
|
+
// Returning this object from the innerFn has the same effect as
|
|
4710
|
+
// breaking out of the dispatch switch statement.
|
|
4711
|
+
var ContinueSentinel = {};
|
|
4712
|
+
|
|
4713
|
+
// Dummy constructor functions that we use as the .constructor and
|
|
4714
|
+
// .constructor.prototype properties for functions that return Generator
|
|
4715
|
+
// objects. For full spec compliance, you may wish to configure your
|
|
4716
|
+
// minifier not to mangle the names of these two functions.
|
|
4717
|
+
function Generator() {}
|
|
4718
|
+
function GeneratorFunction() {}
|
|
4719
|
+
function GeneratorFunctionPrototype() {}
|
|
4720
|
+
|
|
4721
|
+
// This is a polyfill for %IteratorPrototype% for environments that
|
|
4722
|
+
// don't natively support it.
|
|
4723
|
+
var IteratorPrototype = {};
|
|
4724
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
4725
|
+
return this;
|
|
4726
|
+
});
|
|
4709
4727
|
|
|
4728
|
+
var getProto = Object.getPrototypeOf;
|
|
4729
|
+
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
4730
|
+
if (NativeIteratorPrototype &&
|
|
4731
|
+
NativeIteratorPrototype !== Op &&
|
|
4732
|
+
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
4733
|
+
// This environment has a native %IteratorPrototype%; use it instead
|
|
4734
|
+
// of the polyfill.
|
|
4735
|
+
IteratorPrototype = NativeIteratorPrototype;
|
|
4736
|
+
}
|
|
4710
4737
|
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4738
|
+
var Gp = GeneratorFunctionPrototype.prototype =
|
|
4739
|
+
Generator.prototype = Object.create(IteratorPrototype);
|
|
4740
|
+
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
4741
|
+
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
4742
|
+
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
4743
|
+
GeneratorFunction.displayName = define(
|
|
4744
|
+
GeneratorFunctionPrototype,
|
|
4745
|
+
toStringTagSymbol,
|
|
4746
|
+
"GeneratorFunction"
|
|
4747
|
+
);
|
|
4748
|
+
|
|
4749
|
+
// Helper for defining the .next, .throw, and .return methods of the
|
|
4750
|
+
// Iterator interface in terms of a single ._invoke method.
|
|
4751
|
+
function defineIteratorMethods(prototype) {
|
|
4752
|
+
["next", "throw", "return"].forEach(function(method) {
|
|
4753
|
+
define(prototype, method, function(arg) {
|
|
4754
|
+
return this._invoke(method, arg);
|
|
4755
|
+
});
|
|
4714
4756
|
});
|
|
4715
|
-
|
|
4716
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
4757
|
+
}
|
|
4717
4758
|
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4759
|
+
exports.isGeneratorFunction = function(genFun) {
|
|
4760
|
+
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
4761
|
+
return ctor
|
|
4762
|
+
? ctor === GeneratorFunction ||
|
|
4763
|
+
// For the native GeneratorFunction constructor, the best we can
|
|
4764
|
+
// do is to check its .name property.
|
|
4765
|
+
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
4766
|
+
: false;
|
|
4767
|
+
};
|
|
4723
4768
|
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
function defineIteratorMethods(prototype) {
|
|
4732
|
-
["next", "throw", "return"].forEach(function (method) {
|
|
4733
|
-
define(prototype, method, function (arg) {
|
|
4734
|
-
return this._invoke(method, arg);
|
|
4735
|
-
});
|
|
4736
|
-
});
|
|
4769
|
+
exports.mark = function(genFun) {
|
|
4770
|
+
if (Object.setPrototypeOf) {
|
|
4771
|
+
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
4772
|
+
} else {
|
|
4773
|
+
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
4774
|
+
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
4737
4775
|
}
|
|
4776
|
+
genFun.prototype = Object.create(Gp);
|
|
4777
|
+
return genFun;
|
|
4778
|
+
};
|
|
4738
4779
|
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
};
|
|
4780
|
+
// Within the body of any async function, `await x` is transformed to
|
|
4781
|
+
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
4782
|
+
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
4783
|
+
// meant to be awaited.
|
|
4784
|
+
exports.awrap = function(arg) {
|
|
4785
|
+
return { __await: arg };
|
|
4786
|
+
};
|
|
4745
4787
|
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4788
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
4789
|
+
function invoke(method, arg, resolve, reject) {
|
|
4790
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
4791
|
+
if (record.type === "throw") {
|
|
4792
|
+
reject(record.arg);
|
|
4749
4793
|
} else {
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
// meant to be awaited.
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
exports.awrap = function (arg) {
|
|
4763
|
-
return {
|
|
4764
|
-
__await: arg
|
|
4765
|
-
};
|
|
4766
|
-
};
|
|
4767
|
-
|
|
4768
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
4769
|
-
function invoke(method, arg, resolve, reject) {
|
|
4770
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
4771
|
-
|
|
4772
|
-
if (record.type === "throw") {
|
|
4773
|
-
reject(record.arg);
|
|
4774
|
-
} else {
|
|
4775
|
-
var result = record.arg;
|
|
4776
|
-
var value = result.value;
|
|
4777
|
-
|
|
4778
|
-
if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
|
|
4779
|
-
return PromiseImpl.resolve(value.__await).then(function (value) {
|
|
4780
|
-
invoke("next", value, resolve, reject);
|
|
4781
|
-
}, function (err) {
|
|
4782
|
-
invoke("throw", err, resolve, reject);
|
|
4783
|
-
});
|
|
4784
|
-
}
|
|
4785
|
-
|
|
4786
|
-
return PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
4787
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
4788
|
-
// the .value of the Promise<{value,done}> result for the
|
|
4789
|
-
// current iteration.
|
|
4790
|
-
result.value = unwrapped;
|
|
4791
|
-
resolve(result);
|
|
4792
|
-
}, function (error) {
|
|
4793
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
4794
|
-
// into the async generator function so it can be handled there.
|
|
4795
|
-
return invoke("throw", error, resolve, reject);
|
|
4794
|
+
var result = record.arg;
|
|
4795
|
+
var value = result.value;
|
|
4796
|
+
if (value &&
|
|
4797
|
+
typeof value === "object" &&
|
|
4798
|
+
hasOwn.call(value, "__await")) {
|
|
4799
|
+
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
4800
|
+
invoke("next", value, resolve, reject);
|
|
4801
|
+
}, function(err) {
|
|
4802
|
+
invoke("throw", err, resolve, reject);
|
|
4796
4803
|
});
|
|
4797
4804
|
}
|
|
4805
|
+
|
|
4806
|
+
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
4807
|
+
// When a yielded Promise is resolved, its final value becomes
|
|
4808
|
+
// the .value of the Promise<{value,done}> result for the
|
|
4809
|
+
// current iteration.
|
|
4810
|
+
result.value = unwrapped;
|
|
4811
|
+
resolve(result);
|
|
4812
|
+
}, function(error) {
|
|
4813
|
+
// If a rejected Promise was yielded, throw the rejection back
|
|
4814
|
+
// into the async generator function so it can be handled there.
|
|
4815
|
+
return invoke("throw", error, resolve, reject);
|
|
4816
|
+
});
|
|
4798
4817
|
}
|
|
4818
|
+
}
|
|
4799
4819
|
|
|
4800
|
-
|
|
4820
|
+
var previousPromise;
|
|
4801
4821
|
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4822
|
+
function enqueue(method, arg) {
|
|
4823
|
+
function callInvokeWithMethodAndArg() {
|
|
4824
|
+
return new PromiseImpl(function(resolve, reject) {
|
|
4825
|
+
invoke(method, arg, resolve, reject);
|
|
4826
|
+
});
|
|
4827
|
+
}
|
|
4808
4828
|
|
|
4809
|
-
|
|
4829
|
+
return previousPromise =
|
|
4830
|
+
// If enqueue has been called before, then we want to wait until
|
|
4810
4831
|
// all previous Promises have been resolved before calling invoke,
|
|
4811
4832
|
// so that results are always delivered in the correct order. If
|
|
4812
4833
|
// enqueue has not been called before, then it is important to
|
|
@@ -4818,527 +4839,554 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
4818
4839
|
// execute code before the first await. Since we implement simple
|
|
4819
4840
|
// async functions in terms of async generators, it is especially
|
|
4820
4841
|
// important to get this right, even though it requires care.
|
|
4821
|
-
previousPromise ? previousPromise.then(
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
this._invoke = enqueue;
|
|
4842
|
+
previousPromise ? previousPromise.then(
|
|
4843
|
+
callInvokeWithMethodAndArg,
|
|
4844
|
+
// Avoid propagating failures to Promises returned by later
|
|
4845
|
+
// invocations of the iterator.
|
|
4846
|
+
callInvokeWithMethodAndArg
|
|
4847
|
+
) : callInvokeWithMethodAndArg();
|
|
4829
4848
|
}
|
|
4830
4849
|
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
|
|
4836
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
4837
|
-
// the final result produced by the iterator.
|
|
4838
|
-
|
|
4839
|
-
exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
4840
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
4841
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
4842
|
-
return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
|
|
4843
|
-
: iter.next().then(function (result) {
|
|
4844
|
-
return result.done ? result.value : iter.next();
|
|
4845
|
-
});
|
|
4846
|
-
};
|
|
4850
|
+
// Define the unified helper method that is used to implement .next,
|
|
4851
|
+
// .throw, and .return (see defineIteratorMethods).
|
|
4852
|
+
this._invoke = enqueue;
|
|
4853
|
+
}
|
|
4847
4854
|
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4855
|
+
defineIteratorMethods(AsyncIterator.prototype);
|
|
4856
|
+
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
4857
|
+
return this;
|
|
4858
|
+
});
|
|
4859
|
+
exports.AsyncIterator = AsyncIterator;
|
|
4860
|
+
|
|
4861
|
+
// Note that simple async functions are implemented on top of
|
|
4862
|
+
// AsyncIterator objects; they just return a Promise for the value of
|
|
4863
|
+
// the final result produced by the iterator.
|
|
4864
|
+
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
4865
|
+
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
4866
|
+
|
|
4867
|
+
var iter = new AsyncIterator(
|
|
4868
|
+
wrap(innerFn, outerFn, self, tryLocsList),
|
|
4869
|
+
PromiseImpl
|
|
4870
|
+
);
|
|
4871
|
+
|
|
4872
|
+
return exports.isGeneratorFunction(outerFn)
|
|
4873
|
+
? iter // If outerFn is a generator, return the full iterator.
|
|
4874
|
+
: iter.next().then(function(result) {
|
|
4875
|
+
return result.done ? result.value : iter.next();
|
|
4876
|
+
});
|
|
4877
|
+
};
|
|
4854
4878
|
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
throw arg;
|
|
4858
|
-
} // Be forgiving, per 25.3.3.3.3 of the spec:
|
|
4859
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
4879
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
4880
|
+
var state = GenStateSuspendedStart;
|
|
4860
4881
|
|
|
4882
|
+
return function invoke(method, arg) {
|
|
4883
|
+
if (state === GenStateExecuting) {
|
|
4884
|
+
throw new Error("Generator is already running");
|
|
4885
|
+
}
|
|
4861
4886
|
|
|
4862
|
-
|
|
4887
|
+
if (state === GenStateCompleted) {
|
|
4888
|
+
if (method === "throw") {
|
|
4889
|
+
throw arg;
|
|
4863
4890
|
}
|
|
4864
4891
|
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
var delegate = context.delegate;
|
|
4892
|
+
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
4893
|
+
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
4894
|
+
return doneResult();
|
|
4895
|
+
}
|
|
4870
4896
|
|
|
4871
|
-
|
|
4872
|
-
|
|
4897
|
+
context.method = method;
|
|
4898
|
+
context.arg = arg;
|
|
4873
4899
|
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4900
|
+
while (true) {
|
|
4901
|
+
var delegate = context.delegate;
|
|
4902
|
+
if (delegate) {
|
|
4903
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
4904
|
+
if (delegateResult) {
|
|
4905
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
4906
|
+
return delegateResult;
|
|
4878
4907
|
}
|
|
4908
|
+
}
|
|
4879
4909
|
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
} else if (context.method === "throw") {
|
|
4885
|
-
if (state === GenStateSuspendedStart) {
|
|
4886
|
-
state = GenStateCompleted;
|
|
4887
|
-
throw context.arg;
|
|
4888
|
-
}
|
|
4910
|
+
if (context.method === "next") {
|
|
4911
|
+
// Setting context._sent for legacy support of Babel's
|
|
4912
|
+
// function.sent implementation.
|
|
4913
|
+
context.sent = context._sent = context.arg;
|
|
4889
4914
|
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4915
|
+
} else if (context.method === "throw") {
|
|
4916
|
+
if (state === GenStateSuspendedStart) {
|
|
4917
|
+
state = GenStateCompleted;
|
|
4918
|
+
throw context.arg;
|
|
4893
4919
|
}
|
|
4894
4920
|
|
|
4895
|
-
|
|
4896
|
-
var record = tryCatch(innerFn, self, context);
|
|
4921
|
+
context.dispatchException(context.arg);
|
|
4897
4922
|
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
state = context.done ? GenStateCompleted : GenStateSuspendedYield;
|
|
4923
|
+
} else if (context.method === "return") {
|
|
4924
|
+
context.abrupt("return", context.arg);
|
|
4925
|
+
}
|
|
4902
4926
|
|
|
4903
|
-
|
|
4904
|
-
continue;
|
|
4905
|
-
}
|
|
4927
|
+
state = GenStateExecuting;
|
|
4906
4928
|
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4929
|
+
var record = tryCatch(innerFn, self, context);
|
|
4930
|
+
if (record.type === "normal") {
|
|
4931
|
+
// If an exception is thrown from innerFn, we leave state ===
|
|
4932
|
+
// GenStateExecuting and loop back for another invocation.
|
|
4933
|
+
state = context.done
|
|
4934
|
+
? GenStateCompleted
|
|
4935
|
+
: GenStateSuspendedYield;
|
|
4914
4936
|
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
}
|
|
4918
|
-
}
|
|
4919
|
-
};
|
|
4920
|
-
} // Call delegate.iterator[context.method](context.arg) and handle the
|
|
4921
|
-
// result, either by returning a { value, done } result from the
|
|
4922
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
4923
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
4927
|
-
var method = delegate.iterator[context.method];
|
|
4928
|
-
|
|
4929
|
-
if (method === undefined$1) {
|
|
4930
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
4931
|
-
// method always terminates the yield* loop.
|
|
4932
|
-
context.delegate = null;
|
|
4933
|
-
|
|
4934
|
-
if (context.method === "throw") {
|
|
4935
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
4936
|
-
if (delegate.iterator["return"]) {
|
|
4937
|
-
// If the delegate iterator has a return method, give it a
|
|
4938
|
-
// chance to clean up.
|
|
4939
|
-
context.method = "return";
|
|
4940
|
-
context.arg = undefined$1;
|
|
4941
|
-
maybeInvokeDelegate(delegate, context);
|
|
4942
|
-
|
|
4943
|
-
if (context.method === "throw") {
|
|
4944
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
4945
|
-
// "return" to "throw", let that override the TypeError below.
|
|
4946
|
-
return ContinueSentinel;
|
|
4947
|
-
}
|
|
4937
|
+
if (record.arg === ContinueSentinel) {
|
|
4938
|
+
continue;
|
|
4948
4939
|
}
|
|
4949
4940
|
|
|
4941
|
+
return {
|
|
4942
|
+
value: record.arg,
|
|
4943
|
+
done: context.done
|
|
4944
|
+
};
|
|
4945
|
+
|
|
4946
|
+
} else if (record.type === "throw") {
|
|
4947
|
+
state = GenStateCompleted;
|
|
4948
|
+
// Dispatch the exception by looping back around to the
|
|
4949
|
+
// context.dispatchException(context.arg) call above.
|
|
4950
4950
|
context.method = "throw";
|
|
4951
|
-
context.arg =
|
|
4951
|
+
context.arg = record.arg;
|
|
4952
4952
|
}
|
|
4953
|
-
|
|
4954
|
-
return ContinueSentinel;
|
|
4955
4953
|
}
|
|
4954
|
+
};
|
|
4955
|
+
}
|
|
4956
4956
|
|
|
4957
|
-
|
|
4957
|
+
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
4958
|
+
// result, either by returning a { value, done } result from the
|
|
4959
|
+
// delegate iterator, or by modifying context.method and context.arg,
|
|
4960
|
+
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
4961
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
4962
|
+
var method = delegate.iterator[context.method];
|
|
4963
|
+
if (method === undefined$1) {
|
|
4964
|
+
// A .throw or .return when the delegate iterator has no .throw
|
|
4965
|
+
// method always terminates the yield* loop.
|
|
4966
|
+
context.delegate = null;
|
|
4958
4967
|
|
|
4959
|
-
if (
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4968
|
+
if (context.method === "throw") {
|
|
4969
|
+
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
4970
|
+
if (delegate.iterator["return"]) {
|
|
4971
|
+
// If the delegate iterator has a return method, give it a
|
|
4972
|
+
// chance to clean up.
|
|
4973
|
+
context.method = "return";
|
|
4974
|
+
context.arg = undefined$1;
|
|
4975
|
+
maybeInvokeDelegate(delegate, context);
|
|
4965
4976
|
|
|
4966
|
-
|
|
4977
|
+
if (context.method === "throw") {
|
|
4978
|
+
// If maybeInvokeDelegate(context) changed context.method from
|
|
4979
|
+
// "return" to "throw", let that override the TypeError below.
|
|
4980
|
+
return ContinueSentinel;
|
|
4981
|
+
}
|
|
4982
|
+
}
|
|
4967
4983
|
|
|
4968
|
-
if (!info) {
|
|
4969
4984
|
context.method = "throw";
|
|
4970
|
-
context.arg = new TypeError(
|
|
4971
|
-
|
|
4972
|
-
return ContinueSentinel;
|
|
4985
|
+
context.arg = new TypeError(
|
|
4986
|
+
"The iterator does not provide a 'throw' method");
|
|
4973
4987
|
}
|
|
4974
4988
|
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
4978
|
-
context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
|
|
4979
|
-
|
|
4980
|
-
context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
|
|
4981
|
-
// exception, let the outer generator proceed normally. If
|
|
4982
|
-
// context.method was "next", forget context.arg since it has been
|
|
4983
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
4984
|
-
// "return", allow the original .return call to continue in the
|
|
4985
|
-
// outer generator.
|
|
4986
|
-
|
|
4987
|
-
if (context.method !== "return") {
|
|
4988
|
-
context.method = "next";
|
|
4989
|
-
context.arg = undefined$1;
|
|
4990
|
-
}
|
|
4991
|
-
} else {
|
|
4992
|
-
// Re-yield the result returned by the delegate method.
|
|
4993
|
-
return info;
|
|
4994
|
-
} // The delegate iterator is finished, so forget it and continue with
|
|
4995
|
-
// the outer generator.
|
|
4989
|
+
return ContinueSentinel;
|
|
4990
|
+
}
|
|
4996
4991
|
|
|
4992
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
4997
4993
|
|
|
4994
|
+
if (record.type === "throw") {
|
|
4995
|
+
context.method = "throw";
|
|
4996
|
+
context.arg = record.arg;
|
|
4998
4997
|
context.delegate = null;
|
|
4999
4998
|
return ContinueSentinel;
|
|
5000
|
-
}
|
|
5001
|
-
// unified ._invoke helper method.
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
defineIteratorMethods(Gp);
|
|
5005
|
-
define(Gp, toStringTagSymbol, "Generator"); // A Generator should always return itself as the iterator object when the
|
|
5006
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
5007
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
5008
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
5009
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
5010
|
-
|
|
5011
|
-
define(Gp, iteratorSymbol, function () {
|
|
5012
|
-
return this;
|
|
5013
|
-
});
|
|
5014
|
-
define(Gp, "toString", function () {
|
|
5015
|
-
return "[object Generator]";
|
|
5016
|
-
});
|
|
4999
|
+
}
|
|
5017
5000
|
|
|
5018
|
-
|
|
5019
|
-
var entry = {
|
|
5020
|
-
tryLoc: locs[0]
|
|
5021
|
-
};
|
|
5001
|
+
var info = record.arg;
|
|
5022
5002
|
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5003
|
+
if (! info) {
|
|
5004
|
+
context.method = "throw";
|
|
5005
|
+
context.arg = new TypeError("iterator result is not an object");
|
|
5006
|
+
context.delegate = null;
|
|
5007
|
+
return ContinueSentinel;
|
|
5008
|
+
}
|
|
5026
5009
|
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5010
|
+
if (info.done) {
|
|
5011
|
+
// Assign the result of the finished delegate to the temporary
|
|
5012
|
+
// variable specified by delegate.resultName (see delegateYield).
|
|
5013
|
+
context[delegate.resultName] = info.value;
|
|
5014
|
+
|
|
5015
|
+
// Resume execution at the desired location (see delegateYield).
|
|
5016
|
+
context.next = delegate.nextLoc;
|
|
5017
|
+
|
|
5018
|
+
// If context.method was "throw" but the delegate handled the
|
|
5019
|
+
// exception, let the outer generator proceed normally. If
|
|
5020
|
+
// context.method was "next", forget context.arg since it has been
|
|
5021
|
+
// "consumed" by the delegate iterator. If context.method was
|
|
5022
|
+
// "return", allow the original .return call to continue in the
|
|
5023
|
+
// outer generator.
|
|
5024
|
+
if (context.method !== "return") {
|
|
5025
|
+
context.method = "next";
|
|
5026
|
+
context.arg = undefined$1;
|
|
5030
5027
|
}
|
|
5031
5028
|
|
|
5032
|
-
|
|
5029
|
+
} else {
|
|
5030
|
+
// Re-yield the result returned by the delegate method.
|
|
5031
|
+
return info;
|
|
5033
5032
|
}
|
|
5034
5033
|
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
}
|
|
5034
|
+
// The delegate iterator is finished, so forget it and continue with
|
|
5035
|
+
// the outer generator.
|
|
5036
|
+
context.delegate = null;
|
|
5037
|
+
return ContinueSentinel;
|
|
5038
|
+
}
|
|
5041
5039
|
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
// locations where there is no enclosing try statement.
|
|
5046
|
-
this.tryEntries = [{
|
|
5047
|
-
tryLoc: "root"
|
|
5048
|
-
}];
|
|
5049
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
5050
|
-
this.reset(true);
|
|
5051
|
-
}
|
|
5040
|
+
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
5041
|
+
// unified ._invoke helper method.
|
|
5042
|
+
defineIteratorMethods(Gp);
|
|
5052
5043
|
|
|
5053
|
-
|
|
5054
|
-
var keys = [];
|
|
5044
|
+
define(Gp, toStringTagSymbol, "Generator");
|
|
5055
5045
|
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5046
|
+
// A Generator should always return itself as the iterator object when the
|
|
5047
|
+
// @@iterator function is called on it. Some browsers' implementations of the
|
|
5048
|
+
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
5049
|
+
// object to not be returned from this call. This ensures that doesn't happen.
|
|
5050
|
+
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
5051
|
+
define(Gp, iteratorSymbol, function() {
|
|
5052
|
+
return this;
|
|
5053
|
+
});
|
|
5059
5054
|
|
|
5060
|
-
|
|
5061
|
-
|
|
5055
|
+
define(Gp, "toString", function() {
|
|
5056
|
+
return "[object Generator]";
|
|
5057
|
+
});
|
|
5062
5058
|
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
var key = keys.pop();
|
|
5059
|
+
function pushTryEntry(locs) {
|
|
5060
|
+
var entry = { tryLoc: locs[0] };
|
|
5066
5061
|
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
return next;
|
|
5071
|
-
}
|
|
5072
|
-
} // To avoid creating an additional object, we just hang the .value
|
|
5073
|
-
// and .done properties off the next function object itself. This
|
|
5074
|
-
// also ensures that the minifier will not anonymize the function.
|
|
5062
|
+
if (1 in locs) {
|
|
5063
|
+
entry.catchLoc = locs[1];
|
|
5064
|
+
}
|
|
5075
5065
|
|
|
5066
|
+
if (2 in locs) {
|
|
5067
|
+
entry.finallyLoc = locs[2];
|
|
5068
|
+
entry.afterLoc = locs[3];
|
|
5069
|
+
}
|
|
5076
5070
|
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
};
|
|
5080
|
-
};
|
|
5071
|
+
this.tryEntries.push(entry);
|
|
5072
|
+
}
|
|
5081
5073
|
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5074
|
+
function resetTryEntry(entry) {
|
|
5075
|
+
var record = entry.completion || {};
|
|
5076
|
+
record.type = "normal";
|
|
5077
|
+
delete record.arg;
|
|
5078
|
+
entry.completion = record;
|
|
5079
|
+
}
|
|
5085
5080
|
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5081
|
+
function Context(tryLocsList) {
|
|
5082
|
+
// The root entry object (effectively a try statement without a catch
|
|
5083
|
+
// or a finally block) gives us a place to store values thrown from
|
|
5084
|
+
// locations where there is no enclosing try statement.
|
|
5085
|
+
this.tryEntries = [{ tryLoc: "root" }];
|
|
5086
|
+
tryLocsList.forEach(pushTryEntry, this);
|
|
5087
|
+
this.reset(true);
|
|
5088
|
+
}
|
|
5089
5089
|
|
|
5090
|
-
|
|
5091
|
-
|
|
5090
|
+
exports.keys = function(object) {
|
|
5091
|
+
var keys = [];
|
|
5092
|
+
for (var key in object) {
|
|
5093
|
+
keys.push(key);
|
|
5094
|
+
}
|
|
5095
|
+
keys.reverse();
|
|
5096
|
+
|
|
5097
|
+
// Rather than returning an object with a next method, we keep
|
|
5098
|
+
// things simple and return the next function itself.
|
|
5099
|
+
return function next() {
|
|
5100
|
+
while (keys.length) {
|
|
5101
|
+
var key = keys.pop();
|
|
5102
|
+
if (key in object) {
|
|
5103
|
+
next.value = key;
|
|
5104
|
+
next.done = false;
|
|
5105
|
+
return next;
|
|
5092
5106
|
}
|
|
5107
|
+
}
|
|
5093
5108
|
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
return next;
|
|
5102
|
-
}
|
|
5103
|
-
}
|
|
5109
|
+
// To avoid creating an additional object, we just hang the .value
|
|
5110
|
+
// and .done properties off the next function object itself. This
|
|
5111
|
+
// also ensures that the minifier will not anonymize the function.
|
|
5112
|
+
next.done = true;
|
|
5113
|
+
return next;
|
|
5114
|
+
};
|
|
5115
|
+
};
|
|
5104
5116
|
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5117
|
+
function values(iterable) {
|
|
5118
|
+
if (iterable) {
|
|
5119
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
5120
|
+
if (iteratorMethod) {
|
|
5121
|
+
return iteratorMethod.call(iterable);
|
|
5122
|
+
}
|
|
5109
5123
|
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
}
|
|
5124
|
+
if (typeof iterable.next === "function") {
|
|
5125
|
+
return iterable;
|
|
5126
|
+
}
|
|
5113
5127
|
|
|
5128
|
+
if (!isNaN(iterable.length)) {
|
|
5129
|
+
var i = -1, next = function next() {
|
|
5130
|
+
while (++i < iterable.length) {
|
|
5131
|
+
if (hasOwn.call(iterable, i)) {
|
|
5132
|
+
next.value = iterable[i];
|
|
5133
|
+
next.done = false;
|
|
5134
|
+
return next;
|
|
5135
|
+
}
|
|
5136
|
+
}
|
|
5114
5137
|
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
};
|
|
5118
|
-
}
|
|
5138
|
+
next.value = undefined$1;
|
|
5139
|
+
next.done = true;
|
|
5119
5140
|
|
|
5120
|
-
|
|
5141
|
+
return next;
|
|
5142
|
+
};
|
|
5121
5143
|
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
value: undefined$1,
|
|
5125
|
-
done: true
|
|
5126
|
-
};
|
|
5144
|
+
return next.next = next;
|
|
5145
|
+
}
|
|
5127
5146
|
}
|
|
5128
5147
|
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
this.next = 0; // Resetting context._sent for legacy support of Babel's
|
|
5134
|
-
// function.sent implementation.
|
|
5148
|
+
// Return an iterator with no values.
|
|
5149
|
+
return { next: doneResult };
|
|
5150
|
+
}
|
|
5151
|
+
exports.values = values;
|
|
5135
5152
|
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
this.method = "next";
|
|
5140
|
-
this.arg = undefined$1;
|
|
5141
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
5153
|
+
function doneResult() {
|
|
5154
|
+
return { value: undefined$1, done: true };
|
|
5155
|
+
}
|
|
5142
5156
|
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5157
|
+
Context.prototype = {
|
|
5158
|
+
constructor: Context,
|
|
5159
|
+
|
|
5160
|
+
reset: function(skipTempReset) {
|
|
5161
|
+
this.prev = 0;
|
|
5162
|
+
this.next = 0;
|
|
5163
|
+
// Resetting context._sent for legacy support of Babel's
|
|
5164
|
+
// function.sent implementation.
|
|
5165
|
+
this.sent = this._sent = undefined$1;
|
|
5166
|
+
this.done = false;
|
|
5167
|
+
this.delegate = null;
|
|
5168
|
+
|
|
5169
|
+
this.method = "next";
|
|
5170
|
+
this.arg = undefined$1;
|
|
5171
|
+
|
|
5172
|
+
this.tryEntries.forEach(resetTryEntry);
|
|
5173
|
+
|
|
5174
|
+
if (!skipTempReset) {
|
|
5175
|
+
for (var name in this) {
|
|
5176
|
+
// Not sure about the optimal order of these conditions:
|
|
5177
|
+
if (name.charAt(0) === "t" &&
|
|
5178
|
+
hasOwn.call(this, name) &&
|
|
5179
|
+
!isNaN(+name.slice(1))) {
|
|
5180
|
+
this[name] = undefined$1;
|
|
5149
5181
|
}
|
|
5150
5182
|
}
|
|
5151
|
-
}
|
|
5152
|
-
|
|
5153
|
-
this.done = true;
|
|
5154
|
-
var rootEntry = this.tryEntries[0];
|
|
5155
|
-
var rootRecord = rootEntry.completion;
|
|
5183
|
+
}
|
|
5184
|
+
},
|
|
5156
5185
|
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
}
|
|
5186
|
+
stop: function() {
|
|
5187
|
+
this.done = true;
|
|
5160
5188
|
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
}
|
|
5189
|
+
var rootEntry = this.tryEntries[0];
|
|
5190
|
+
var rootRecord = rootEntry.completion;
|
|
5191
|
+
if (rootRecord.type === "throw") {
|
|
5192
|
+
throw rootRecord.arg;
|
|
5193
|
+
}
|
|
5167
5194
|
|
|
5168
|
-
|
|
5195
|
+
return this.rval;
|
|
5196
|
+
},
|
|
5169
5197
|
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5198
|
+
dispatchException: function(exception) {
|
|
5199
|
+
if (this.done) {
|
|
5200
|
+
throw exception;
|
|
5201
|
+
}
|
|
5174
5202
|
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
}
|
|
5203
|
+
var context = this;
|
|
5204
|
+
function handle(loc, caught) {
|
|
5205
|
+
record.type = "throw";
|
|
5206
|
+
record.arg = exception;
|
|
5207
|
+
context.next = loc;
|
|
5181
5208
|
|
|
5182
|
-
|
|
5209
|
+
if (caught) {
|
|
5210
|
+
// If the dispatched exception was caught by a catch block,
|
|
5211
|
+
// then let that catch block handle the exception normally.
|
|
5212
|
+
context.method = "next";
|
|
5213
|
+
context.arg = undefined$1;
|
|
5183
5214
|
}
|
|
5184
5215
|
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
var record = entry.completion;
|
|
5216
|
+
return !! caught;
|
|
5217
|
+
}
|
|
5188
5218
|
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
// throw the exception.
|
|
5193
|
-
return handle("end");
|
|
5194
|
-
}
|
|
5219
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
5220
|
+
var entry = this.tryEntries[i];
|
|
5221
|
+
var record = entry.completion;
|
|
5195
5222
|
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
if (this.prev < entry.catchLoc) {
|
|
5202
|
-
return handle(entry.catchLoc, true);
|
|
5203
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
5204
|
-
return handle(entry.finallyLoc);
|
|
5205
|
-
}
|
|
5206
|
-
} else if (hasCatch) {
|
|
5207
|
-
if (this.prev < entry.catchLoc) {
|
|
5208
|
-
return handle(entry.catchLoc, true);
|
|
5209
|
-
}
|
|
5210
|
-
} else if (hasFinally) {
|
|
5211
|
-
if (this.prev < entry.finallyLoc) {
|
|
5212
|
-
return handle(entry.finallyLoc);
|
|
5213
|
-
}
|
|
5214
|
-
} else {
|
|
5215
|
-
throw new Error("try statement without catch or finally");
|
|
5216
|
-
}
|
|
5217
|
-
}
|
|
5223
|
+
if (entry.tryLoc === "root") {
|
|
5224
|
+
// Exception thrown outside of any try block that could handle
|
|
5225
|
+
// it, so set the completion value of the entire function to
|
|
5226
|
+
// throw the exception.
|
|
5227
|
+
return handle("end");
|
|
5218
5228
|
}
|
|
5219
|
-
},
|
|
5220
|
-
abrupt: function abrupt(type, arg) {
|
|
5221
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
5222
|
-
var entry = this.tryEntries[i];
|
|
5223
5229
|
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
}
|
|
5228
|
-
}
|
|
5230
|
+
if (entry.tryLoc <= this.prev) {
|
|
5231
|
+
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
5232
|
+
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
5229
5233
|
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5234
|
+
if (hasCatch && hasFinally) {
|
|
5235
|
+
if (this.prev < entry.catchLoc) {
|
|
5236
|
+
return handle(entry.catchLoc, true);
|
|
5237
|
+
} else if (this.prev < entry.finallyLoc) {
|
|
5238
|
+
return handle(entry.finallyLoc);
|
|
5239
|
+
}
|
|
5235
5240
|
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5241
|
+
} else if (hasCatch) {
|
|
5242
|
+
if (this.prev < entry.catchLoc) {
|
|
5243
|
+
return handle(entry.catchLoc, true);
|
|
5244
|
+
}
|
|
5239
5245
|
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
}
|
|
5246
|
+
} else if (hasFinally) {
|
|
5247
|
+
if (this.prev < entry.finallyLoc) {
|
|
5248
|
+
return handle(entry.finallyLoc);
|
|
5249
|
+
}
|
|
5245
5250
|
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
if (record.type === "throw") {
|
|
5250
|
-
throw record.arg;
|
|
5251
|
+
} else {
|
|
5252
|
+
throw new Error("try statement without catch or finally");
|
|
5253
|
+
}
|
|
5251
5254
|
}
|
|
5255
|
+
}
|
|
5256
|
+
},
|
|
5252
5257
|
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5258
|
+
abrupt: function(type, arg) {
|
|
5259
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
5260
|
+
var entry = this.tryEntries[i];
|
|
5261
|
+
if (entry.tryLoc <= this.prev &&
|
|
5262
|
+
hasOwn.call(entry, "finallyLoc") &&
|
|
5263
|
+
this.prev < entry.finallyLoc) {
|
|
5264
|
+
var finallyEntry = entry;
|
|
5265
|
+
break;
|
|
5261
5266
|
}
|
|
5267
|
+
}
|
|
5262
5268
|
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5269
|
+
if (finallyEntry &&
|
|
5270
|
+
(type === "break" ||
|
|
5271
|
+
type === "continue") &&
|
|
5272
|
+
finallyEntry.tryLoc <= arg &&
|
|
5273
|
+
arg <= finallyEntry.finallyLoc) {
|
|
5274
|
+
// Ignore the finally entry if control is not jumping to a
|
|
5275
|
+
// location outside the try/catch block.
|
|
5276
|
+
finallyEntry = null;
|
|
5277
|
+
}
|
|
5268
5278
|
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
return ContinueSentinel;
|
|
5273
|
-
}
|
|
5274
|
-
}
|
|
5275
|
-
},
|
|
5276
|
-
"catch": function _catch(tryLoc) {
|
|
5277
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
5278
|
-
var entry = this.tryEntries[i];
|
|
5279
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
5280
|
+
record.type = type;
|
|
5281
|
+
record.arg = arg;
|
|
5279
5282
|
|
|
5280
|
-
|
|
5281
|
-
|
|
5283
|
+
if (finallyEntry) {
|
|
5284
|
+
this.method = "next";
|
|
5285
|
+
this.next = finallyEntry.finallyLoc;
|
|
5286
|
+
return ContinueSentinel;
|
|
5287
|
+
}
|
|
5282
5288
|
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
resetTryEntry(entry);
|
|
5286
|
-
}
|
|
5289
|
+
return this.complete(record);
|
|
5290
|
+
},
|
|
5287
5291
|
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
+
complete: function(record, afterLoc) {
|
|
5293
|
+
if (record.type === "throw") {
|
|
5294
|
+
throw record.arg;
|
|
5295
|
+
}
|
|
5292
5296
|
|
|
5297
|
+
if (record.type === "break" ||
|
|
5298
|
+
record.type === "continue") {
|
|
5299
|
+
this.next = record.arg;
|
|
5300
|
+
} else if (record.type === "return") {
|
|
5301
|
+
this.rval = this.arg = record.arg;
|
|
5302
|
+
this.method = "return";
|
|
5303
|
+
this.next = "end";
|
|
5304
|
+
} else if (record.type === "normal" && afterLoc) {
|
|
5305
|
+
this.next = afterLoc;
|
|
5306
|
+
}
|
|
5293
5307
|
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5308
|
+
return ContinueSentinel;
|
|
5309
|
+
},
|
|
5310
|
+
|
|
5311
|
+
finish: function(finallyLoc) {
|
|
5312
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
5313
|
+
var entry = this.tryEntries[i];
|
|
5314
|
+
if (entry.finallyLoc === finallyLoc) {
|
|
5315
|
+
this.complete(entry.completion, entry.afterLoc);
|
|
5316
|
+
resetTryEntry(entry);
|
|
5317
|
+
return ContinueSentinel;
|
|
5318
|
+
}
|
|
5319
|
+
}
|
|
5320
|
+
},
|
|
5302
5321
|
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5322
|
+
"catch": function(tryLoc) {
|
|
5323
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
5324
|
+
var entry = this.tryEntries[i];
|
|
5325
|
+
if (entry.tryLoc === tryLoc) {
|
|
5326
|
+
var record = entry.completion;
|
|
5327
|
+
if (record.type === "throw") {
|
|
5328
|
+
var thrown = record.arg;
|
|
5329
|
+
resetTryEntry(entry);
|
|
5330
|
+
}
|
|
5331
|
+
return thrown;
|
|
5307
5332
|
}
|
|
5333
|
+
}
|
|
5308
5334
|
|
|
5309
|
-
|
|
5335
|
+
// The context.catch method must only be called with a location
|
|
5336
|
+
// argument that corresponds to a known catch block.
|
|
5337
|
+
throw new Error("illegal catch attempt");
|
|
5338
|
+
},
|
|
5339
|
+
|
|
5340
|
+
delegateYield: function(iterable, resultName, nextLoc) {
|
|
5341
|
+
this.delegate = {
|
|
5342
|
+
iterator: values(iterable),
|
|
5343
|
+
resultName: resultName,
|
|
5344
|
+
nextLoc: nextLoc
|
|
5345
|
+
};
|
|
5346
|
+
|
|
5347
|
+
if (this.method === "next") {
|
|
5348
|
+
// Deliberately forget the last sent value so that we don't
|
|
5349
|
+
// accidentally pass it on to the delegate.
|
|
5350
|
+
this.arg = undefined$1;
|
|
5310
5351
|
}
|
|
5311
|
-
}; // Regardless of whether this script is executing as a CommonJS module
|
|
5312
|
-
// or not, return the runtime object so that we can declare the variable
|
|
5313
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
5314
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
5315
5352
|
|
|
5316
|
-
|
|
5317
|
-
|
|
5353
|
+
return ContinueSentinel;
|
|
5354
|
+
}
|
|
5355
|
+
};
|
|
5356
|
+
|
|
5357
|
+
// Regardless of whether this script is executing as a CommonJS module
|
|
5358
|
+
// or not, return the runtime object so that we can declare the variable
|
|
5359
|
+
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
5360
|
+
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
5361
|
+
return exports;
|
|
5362
|
+
|
|
5363
|
+
}(
|
|
5364
|
+
// If this script is executing as a CommonJS module, use module.exports
|
|
5318
5365
|
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
5319
5366
|
// object. Either way, the resulting object will be used to initialize
|
|
5320
5367
|
// the regeneratorRuntime variable at the top of this file.
|
|
5321
|
-
module.exports
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5368
|
+
module.exports
|
|
5369
|
+
));
|
|
5370
|
+
|
|
5371
|
+
try {
|
|
5372
|
+
regeneratorRuntime = runtime;
|
|
5373
|
+
} catch (accidentalStrictMode) {
|
|
5374
|
+
// This module should not be running in strict mode, so the above
|
|
5375
|
+
// assignment should always work unless something is misconfigured. Just
|
|
5376
|
+
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
5377
|
+
// we can explicitly access globalThis. In older engines we can escape
|
|
5378
|
+
// strict mode using a global Function call. This could conceivably fail
|
|
5379
|
+
// if a Content Security Policy forbids using Function, but in that case
|
|
5380
|
+
// the proper solution is to fix the accidental strict mode problem. If
|
|
5381
|
+
// you've misconfigured your bundler to force strict mode and applied a
|
|
5382
|
+
// CSP to forbid Function, and you're not willing to fix either of those
|
|
5383
|
+
// problems, please detail your unique predicament in a GitHub issue.
|
|
5384
|
+
if (typeof globalThis === "object") {
|
|
5385
|
+
globalThis.regeneratorRuntime = runtime;
|
|
5386
|
+
} else {
|
|
5387
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
|
5341
5388
|
}
|
|
5389
|
+
}
|
|
5342
5390
|
});
|
|
5343
5391
|
|
|
5344
5392
|
var _templateObject$v, _templateObject2$j, _templateObject3$c, _templateObject4$9, _templateObject5$6, _templateObject6$4, _templateObject7$1, _templateObject8$1, _templateObject9, _templateObject10;
|
|
@@ -6021,7 +6069,7 @@ var useBasket = function useBasket(expiryUnixTimestamp, numItems, numVirtualItem
|
|
|
6021
6069
|
if (!expiryUnixTimestamp || numItems === 0) return function () {
|
|
6022
6070
|
return undefined;
|
|
6023
6071
|
};
|
|
6024
|
-
var interval = setInterval(function () {
|
|
6072
|
+
var interval = window.setInterval(function () {
|
|
6025
6073
|
setSeconds(getSecondsUntil(expiryUnixTimestamp));
|
|
6026
6074
|
}, 1000);
|
|
6027
6075
|
setTimer(interval);
|
|
@@ -6196,7 +6244,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
6196
6244
|
clearTimeout(timerCloseOptions);
|
|
6197
6245
|
}
|
|
6198
6246
|
|
|
6199
|
-
timerCloseOptions = setTimeout(function () {
|
|
6247
|
+
timerCloseOptions = window.setTimeout(function () {
|
|
6200
6248
|
setOpen(false);
|
|
6201
6249
|
setLockOpen(false);
|
|
6202
6250
|
setTitleSelected(false);
|
|
@@ -6836,6 +6884,8 @@ var ContactNewsletter = function ContactNewsletter(_ref) {
|
|
|
6836
6884
|
}, contact.title))));
|
|
6837
6885
|
};
|
|
6838
6886
|
|
|
6887
|
+
var _excluded$b = ["dataRoh"];
|
|
6888
|
+
|
|
6839
6889
|
var Footer = function Footer(_ref) {
|
|
6840
6890
|
var data = _ref.data;
|
|
6841
6891
|
var policyLinks = data.policyLinks;
|
|
@@ -6845,7 +6895,7 @@ var Footer = function Footer(_ref) {
|
|
|
6845
6895
|
|
|
6846
6896
|
var _data$artsLogo = data.artsLogo,
|
|
6847
6897
|
artsDataRoh = _data$artsLogo.dataRoh,
|
|
6848
|
-
artsLogo = _objectWithoutPropertiesLoose(_data$artsLogo,
|
|
6898
|
+
artsLogo = _objectWithoutPropertiesLoose(_data$artsLogo, _excluded$b);
|
|
6849
6899
|
|
|
6850
6900
|
var additionalInfo = data.additionalInfo;
|
|
6851
6901
|
return /*#__PURE__*/React__default.createElement(FooterSection, null, /*#__PURE__*/React__default.createElement(Grid, null, /*#__PURE__*/React__default.createElement(GridItem, {
|
|
@@ -6900,6 +6950,8 @@ var ArrowsContainer = /*#__PURE__*/styled.div(_templateObject5$c || (_templateOb
|
|
|
6900
6950
|
});
|
|
6901
6951
|
var ArrowWrapper = /*#__PURE__*/styled.div(_templateObject6$9 || (_templateObject6$9 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 24px;\n height: 24px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: flex-center;\n\n :hover {\n && svg path {\n fill: var(--base-color-primary);\n }\n }\n"])));
|
|
6902
6952
|
|
|
6953
|
+
var _excluded$c = ["id", "text"];
|
|
6954
|
+
|
|
6903
6955
|
var AnchorTabBar = function AnchorTabBar(_ref) {
|
|
6904
6956
|
var tabs = _ref.tabs,
|
|
6905
6957
|
onTabClick = _ref.onTabClick,
|
|
@@ -6979,7 +7031,7 @@ var AnchorTabBar = function AnchorTabBar(_ref) {
|
|
|
6979
7031
|
}
|
|
6980
7032
|
|
|
6981
7033
|
if (timer !== null) clearTimeout(timer);
|
|
6982
|
-
timer = setTimeout(function () {
|
|
7034
|
+
timer = window.setTimeout(function () {
|
|
6983
7035
|
if (window.pageYOffset > topOffset + navigationHeight && wrapperRef.current) {
|
|
6984
7036
|
changeWrapperVisibility(true, window.pageYOffset - navigationHeight);
|
|
6985
7037
|
}
|
|
@@ -7114,7 +7166,7 @@ var AnchorTabBar = function AnchorTabBar(_ref) {
|
|
|
7114
7166
|
}, tabs.map(function (_ref4) {
|
|
7115
7167
|
var id = _ref4.id,
|
|
7116
7168
|
text = _ref4.text,
|
|
7117
|
-
rest = _objectWithoutPropertiesLoose(_ref4,
|
|
7169
|
+
rest = _objectWithoutPropertiesLoose(_ref4, _excluded$c);
|
|
7118
7170
|
|
|
7119
7171
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
7120
7172
|
key: id
|
|
@@ -7170,6 +7222,9 @@ var PrimaryButtonReverse = /*#__PURE__*/styled(PrimaryButton)(_templateObject8$4
|
|
|
7170
7222
|
var MessageWrapper = /*#__PURE__*/styled.div(_templateObject9$2 || (_templateObject9$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n margin-right: var(--grid-outer-margin);\n height: var(--button-height);\n\n h6 {\n margin: 0;\n padding: 0;\n }\n\n @media ", " {\n & {\n margin-right: var(--grid-margin);\n }\n }\n\n @media ", " {\n & {\n display: none;\n }\n }\n"])), devices.tablet, devices.mobile);
|
|
7171
7223
|
var MessageWrapperMobile = /*#__PURE__*/styled.div(_templateObject10$2 || (_templateObject10$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n h6 {\n margin: 0;\n padding: 0;\n }\n display: none;\n\n @media ", " {\n & {\n display: flex;\n align-items: center;\n margin-left: var(--grid-margin);\n padding: 12px 0;\n }\n }\n"])), devices.mobile);
|
|
7172
7224
|
|
|
7225
|
+
var _excluded$d = ["text"],
|
|
7226
|
+
_excluded2 = ["text"];
|
|
7227
|
+
|
|
7173
7228
|
var TitleWithCTA = function TitleWithCTA(_ref) {
|
|
7174
7229
|
var title = _ref.title,
|
|
7175
7230
|
links = _ref.links,
|
|
@@ -7179,11 +7234,11 @@ var TitleWithCTA = function TitleWithCTA(_ref) {
|
|
|
7179
7234
|
|
|
7180
7235
|
var _ref2 = (links == null ? void 0 : links[0]) || {},
|
|
7181
7236
|
primaryButtonText = _ref2.text,
|
|
7182
|
-
primaryButtonProps = _objectWithoutPropertiesLoose(_ref2,
|
|
7237
|
+
primaryButtonProps = _objectWithoutPropertiesLoose(_ref2, _excluded$d);
|
|
7183
7238
|
|
|
7184
7239
|
var _ref3 = (links == null ? void 0 : links[1]) || {},
|
|
7185
7240
|
secondaryButtonText = _ref3.text,
|
|
7186
|
-
secondaryButtonProps = _objectWithoutPropertiesLoose(_ref3,
|
|
7241
|
+
secondaryButtonProps = _objectWithoutPropertiesLoose(_ref3, _excluded2);
|
|
7187
7242
|
|
|
7188
7243
|
return /*#__PURE__*/React__default.createElement(TitleCTAGridWrapper, {
|
|
7189
7244
|
sticky: sticky
|
|
@@ -7525,11 +7580,13 @@ var AuxiliaryButtonWrapper = /*#__PURE__*/styled(Button)(_templateObject$Q || (_
|
|
|
7525
7580
|
return color;
|
|
7526
7581
|
});
|
|
7527
7582
|
|
|
7583
|
+
var _excluded$e = ["children"];
|
|
7584
|
+
|
|
7528
7585
|
var AuxiliaryButton = function AuxiliaryButton(_ref) {
|
|
7529
7586
|
var _props$color;
|
|
7530
7587
|
|
|
7531
7588
|
var children = _ref.children,
|
|
7532
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
7589
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
7533
7590
|
|
|
7534
7591
|
return /*#__PURE__*/React__default.createElement(AuxiliaryButtonWrapper, Object.assign({}, props, {
|
|
7535
7592
|
color: (_props$color = props.color) != null ? _props$color : Colors.Black,
|
|
@@ -7695,6 +7752,9 @@ var truncateReactNodeString = function truncateReactNodeString(node, resultLengt
|
|
|
7695
7752
|
return truncateHtmlString(nodeString, resultLength, addDots);
|
|
7696
7753
|
};
|
|
7697
7754
|
|
|
7755
|
+
var _excluded$f = ["text"],
|
|
7756
|
+
_excluded2$1 = ["text"];
|
|
7757
|
+
|
|
7698
7758
|
var _buttonTypeToButton;
|
|
7699
7759
|
var LENGTH_LARGE_TEXT$1 = 28;
|
|
7700
7760
|
var LENGTH_SMALL_TEXT$2 = 19;
|
|
@@ -7748,7 +7808,7 @@ var Card = function Card(_ref) {
|
|
|
7748
7808
|
var _ref2 = firstButton || {},
|
|
7749
7809
|
_ref2$text = _ref2.text,
|
|
7750
7810
|
firstButtonText = _ref2$text === void 0 ? '' : _ref2$text,
|
|
7751
|
-
restFirstButton = _objectWithoutPropertiesLoose(_ref2,
|
|
7811
|
+
restFirstButton = _objectWithoutPropertiesLoose(_ref2, _excluded$f);
|
|
7752
7812
|
|
|
7753
7813
|
var primaryButtonTextTruncate = size === 'small' ? truncate(firstButtonText, LENGTH_SMALL_TEXT$2) : truncate(firstButtonText, LENGTH_LARGE_TEXT$1);
|
|
7754
7814
|
var secondButton = links == null ? void 0 : links[1];
|
|
@@ -7756,7 +7816,7 @@ var Card = function Card(_ref) {
|
|
|
7756
7816
|
var _ref3 = secondButton || {},
|
|
7757
7817
|
_ref3$text = _ref3.text,
|
|
7758
7818
|
secondButtonText = _ref3$text === void 0 ? '' : _ref3$text,
|
|
7759
|
-
restSecondButton = _objectWithoutPropertiesLoose(_ref3,
|
|
7819
|
+
restSecondButton = _objectWithoutPropertiesLoose(_ref3, _excluded2$1);
|
|
7760
7820
|
|
|
7761
7821
|
var tertiaryButtonTextTruncate = size === 'small' ? truncate(secondButtonText, LENGTH_SMALL_TEXT$2) : truncate(secondButtonText, LENGTH_LARGE_TEXT$1);
|
|
7762
7822
|
|
|
@@ -8245,6 +8305,8 @@ var LogoWrapper$1 = /*#__PURE__*/styled.div(_templateObject6$f || (_templateObje
|
|
|
8245
8305
|
var ButtonWrapper$1 = /*#__PURE__*/styled.div(_templateObject7$9 || (_templateObject7$9 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n grid-area: button;\n justify-self: end;\n align-self: end;\n\n @media ", " {\n & {\n justify-self: center;\n align-self: center;\n width: 100%;\n margin-top: 16px;\n }\n }\n"])), devices.mobile);
|
|
8246
8306
|
var PageHeadingText = /*#__PURE__*/styled.div(_templateObject8$7 || (_templateObject8$7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: var(--font-size-altHeader-6);\n font-weight: var(--font-weight-altHeader-6);\n letter-spacing: var(--letter-spacing-altHeader-6);\n line-height: var(--line-height-altHeader-6);\n font-feature-settings: var(--font-feature-settings-altHeader);\n font-family: var(--font-family-altHeader);\n text-transform: var(--text-transform-altHeader);\n word-break: var(--word-break-altHeader);\n"])));
|
|
8247
8307
|
|
|
8308
|
+
var _excluded$g = ["text"];
|
|
8309
|
+
|
|
8248
8310
|
var PageHeading = function PageHeading(_ref) {
|
|
8249
8311
|
var title = _ref.title,
|
|
8250
8312
|
text = _ref.text,
|
|
@@ -8261,7 +8323,7 @@ var PageHeading = function PageHeading(_ref) {
|
|
|
8261
8323
|
|
|
8262
8324
|
var _ref2 = link || {},
|
|
8263
8325
|
linkText = _ref2.text,
|
|
8264
|
-
restLink = _objectWithoutPropertiesLoose(_ref2,
|
|
8326
|
+
restLink = _objectWithoutPropertiesLoose(_ref2, _excluded$g);
|
|
8265
8327
|
|
|
8266
8328
|
var truncatedText = text == null ? void 0 : text.substring(0, copyCharLimit);
|
|
8267
8329
|
var truncatedTitle = title && title.substring(0, titleCharLimit);
|
|
@@ -8290,9 +8352,11 @@ var PageHeading = function PageHeading(_ref) {
|
|
|
8290
8352
|
}, /*#__PURE__*/React__default.createElement(PrimaryButton, Object.assign({}, restLink), linkText)) : null));
|
|
8291
8353
|
};
|
|
8292
8354
|
|
|
8355
|
+
var _excluded$h = ["link"];
|
|
8356
|
+
|
|
8293
8357
|
var PageHeadingCore = function PageHeadingCore(_ref) {
|
|
8294
8358
|
var link = _ref.link,
|
|
8295
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
8359
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
8296
8360
|
|
|
8297
8361
|
var coreLink = link && _extends({}, link, {
|
|
8298
8362
|
color: Colors.White,
|
|
@@ -8306,9 +8370,11 @@ var PageHeadingCore = function PageHeadingCore(_ref) {
|
|
|
8306
8370
|
})));
|
|
8307
8371
|
};
|
|
8308
8372
|
|
|
8373
|
+
var _excluded$i = ["link"];
|
|
8374
|
+
|
|
8309
8375
|
var PageHeadingCinema = function PageHeadingCinema(_ref) {
|
|
8310
8376
|
var link = _ref.link,
|
|
8311
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
8377
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
8312
8378
|
|
|
8313
8379
|
var cinemaLink = link && _extends({}, link, {
|
|
8314
8380
|
color: Colors.Black,
|
|
@@ -8334,6 +8400,8 @@ var TextWrapper$1 = /*#__PURE__*/styled.div(_templateObject6$g || (_templateObje
|
|
|
8334
8400
|
var ButtonWrapper$2 = /*#__PURE__*/styled.div(_templateObject7$a || (_templateObject7$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n grid-area: button;\n align-self: end;\n display: flex;\n justify-content: center;\n margin-top: 40px;\n\n @media ", " {\n & {\n margin-top: 0px;\n margin-bottom: 20px;\n }\n }\n"])), devices.mobile);
|
|
8335
8401
|
var ScrollDownWrapper = /*#__PURE__*/styled.div(_templateObject8$8 || (_templateObject8$8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: 20px;\n left: var(--grid-outer-margin);\n width: fit-content;\n z-index: ", ";\n\n @keyframes UpDown {\n 0%,\n 100% {\n transform: translateY(0);\n }\n 50% {\n transform: translateY(8px);\n }\n }\n\n a {\n font-size: var(--font-size-overline-1);\n font-weight: var(--font-weight-overline-1);\n letter-spacing: var(--letter-spacing-overline-1);\n border: none;\n padding: 0;\n :hover {\n border: none;\n\n > span {\n animation: UpDown 1500ms linear infinite;\n }\n }\n }\n\n @media ", " {\n & {\n display: none;\n }\n }\n\n @media ", " {\n & {\n display: none;\n }\n }\n"])), zIndexes.contentOverlay, devices.mobile, devices.tablet);
|
|
8336
8402
|
|
|
8403
|
+
var _excluded$j = ["text"];
|
|
8404
|
+
|
|
8337
8405
|
var PageHeadingImpact = function PageHeadingImpact(_ref) {
|
|
8338
8406
|
var children = _ref.children,
|
|
8339
8407
|
text = _ref.text,
|
|
@@ -8352,7 +8420,7 @@ var PageHeadingImpact = function PageHeadingImpact(_ref) {
|
|
|
8352
8420
|
|
|
8353
8421
|
var _ref2 = link || {},
|
|
8354
8422
|
linkText = _ref2.text,
|
|
8355
|
-
restLink = _objectWithoutPropertiesLoose(_ref2,
|
|
8423
|
+
restLink = _objectWithoutPropertiesLoose(_ref2, _excluded$j);
|
|
8356
8424
|
|
|
8357
8425
|
return /*#__PURE__*/React__default.createElement(ImpactWrapper, {
|
|
8358
8426
|
bgUrlDesktop: bgUrlDesktop,
|
|
@@ -8446,9 +8514,11 @@ var PageHeadingPanel = function PageHeadingPanel(_ref) {
|
|
|
8446
8514
|
var _templateObject$_;
|
|
8447
8515
|
var StreamWrapper = /*#__PURE__*/styled.div(_templateObject$_ || (_templateObject$_ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n h2::selection,\n div::selection {\n color: #1866dc;\n background-color: #fff;\n }\n"])));
|
|
8448
8516
|
|
|
8517
|
+
var _excluded$k = ["link"];
|
|
8518
|
+
|
|
8449
8519
|
var PageHeadingStream = function PageHeadingStream(_ref) {
|
|
8450
8520
|
var link = _ref.link,
|
|
8451
|
-
rest = _objectWithoutPropertiesLoose(_ref,
|
|
8521
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$k);
|
|
8452
8522
|
|
|
8453
8523
|
var streamLink = link && _extends({}, link, {
|
|
8454
8524
|
color: Colors.Black,
|
|
@@ -8640,6 +8710,8 @@ var useMobile = function useMobile() {
|
|
|
8640
8710
|
return mobile;
|
|
8641
8711
|
};
|
|
8642
8712
|
|
|
8713
|
+
var _excluded$l = ["text"];
|
|
8714
|
+
|
|
8643
8715
|
var useResponsiveVideo = function useResponsiveVideo(video, poster) {
|
|
8644
8716
|
var mobileVideo = video.mobile || video.desktop;
|
|
8645
8717
|
var desktopVideo = video.desktop || video.mobile;
|
|
@@ -8758,7 +8830,7 @@ var PageHeadingCompact = function PageHeadingCompact(_ref4) {
|
|
|
8758
8830
|
|
|
8759
8831
|
var _ref5 = link || {},
|
|
8760
8832
|
linkText = _ref5.text,
|
|
8761
|
-
restLink = _objectWithoutPropertiesLoose(_ref5,
|
|
8833
|
+
restLink = _objectWithoutPropertiesLoose(_ref5, _excluded$l);
|
|
8762
8834
|
|
|
8763
8835
|
var titleSize = title && title.length > 20 ? 4 : 3;
|
|
8764
8836
|
var video = {
|
|
@@ -9105,6 +9177,10 @@ var PromoWithTagsContainer = /*#__PURE__*/styled.div(_templateObject19 || (_temp
|
|
|
9105
9177
|
var TimerWrapper$1 = /*#__PURE__*/styled.div(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 32px;\n"])));
|
|
9106
9178
|
var EndDateText = /*#__PURE__*/styled.div(_templateObject21 || (_templateObject21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-bottom: 1px solid var(--base-color-black);\n padding-bottom: 32px;\n margin-bottom: 32px;\n\n @media ", " {\n padding-bottom: 20px;\n margin-bottom: 20px;\n }\n"])), devices.mobile);
|
|
9107
9179
|
|
|
9180
|
+
var _excluded$m = ["text"],
|
|
9181
|
+
_excluded2$2 = ["text"],
|
|
9182
|
+
_excluded3 = ["text"];
|
|
9183
|
+
|
|
9108
9184
|
var _buttonTypeToButton$1;
|
|
9109
9185
|
var LENGTH_TEXT$1 = 28;
|
|
9110
9186
|
var LENGTH_TEXT_PARAGRAPH = 130;
|
|
@@ -9175,7 +9251,7 @@ var PromoWithTags = function PromoWithTags(_ref) {
|
|
|
9175
9251
|
var _ref2 = firstButton || {},
|
|
9176
9252
|
_ref2$text = _ref2.text,
|
|
9177
9253
|
firstButtonText = _ref2$text === void 0 ? '' : _ref2$text,
|
|
9178
|
-
restFirstButton = _objectWithoutPropertiesLoose(_ref2,
|
|
9254
|
+
restFirstButton = _objectWithoutPropertiesLoose(_ref2, _excluded$m);
|
|
9179
9255
|
|
|
9180
9256
|
var primaryButtonTextTruncate = truncate(firstButtonText, LENGTH_TEXT$1);
|
|
9181
9257
|
var secondButton = links == null ? void 0 : links[1];
|
|
@@ -9183,7 +9259,7 @@ var PromoWithTags = function PromoWithTags(_ref) {
|
|
|
9183
9259
|
var _ref3 = secondButton || {},
|
|
9184
9260
|
_ref3$text = _ref3.text,
|
|
9185
9261
|
secondButtonText = _ref3$text === void 0 ? '' : _ref3$text,
|
|
9186
|
-
restSecondButton = _objectWithoutPropertiesLoose(_ref3,
|
|
9262
|
+
restSecondButton = _objectWithoutPropertiesLoose(_ref3, _excluded2$2);
|
|
9187
9263
|
|
|
9188
9264
|
var secondButtonTextTruncate = truncate(secondButtonText, LENGTH_TEXT$1);
|
|
9189
9265
|
var textTruncate = asCard ? truncate(text || '', LENGTH_TEXT_PARAGRAPH) : text;
|
|
@@ -9192,7 +9268,7 @@ var PromoWithTags = function PromoWithTags(_ref) {
|
|
|
9192
9268
|
var textLinkItems = textLinks ? textLinks.map(function (link, index) {
|
|
9193
9269
|
var _link$text = link.text,
|
|
9194
9270
|
textLinkText = _link$text === void 0 ? '' : _link$text,
|
|
9195
|
-
restTextLink = _objectWithoutPropertiesLoose(link,
|
|
9271
|
+
restTextLink = _objectWithoutPropertiesLoose(link, _excluded3);
|
|
9196
9272
|
|
|
9197
9273
|
return /*#__PURE__*/React__default.createElement(TextLinkWrapper$2, {
|
|
9198
9274
|
key: index
|
|
@@ -9487,6 +9563,8 @@ var PromoChild = function PromoChild(_ref) {
|
|
|
9487
9563
|
}));
|
|
9488
9564
|
};
|
|
9489
9565
|
|
|
9566
|
+
var _excluded$n = ["text"],
|
|
9567
|
+
_excluded2$3 = ["text"];
|
|
9490
9568
|
var LENGTH_TEXT$3 = 28;
|
|
9491
9569
|
|
|
9492
9570
|
var PromoWithTitle = function PromoWithTitle(_ref) {
|
|
@@ -9514,7 +9592,7 @@ var PromoWithTitle = function PromoWithTitle(_ref) {
|
|
|
9514
9592
|
var _ref2 = primaryButton || {},
|
|
9515
9593
|
_ref2$text = _ref2.text,
|
|
9516
9594
|
primaryButtonText = _ref2$text === void 0 ? '' : _ref2$text,
|
|
9517
|
-
restPrimaryButton = _objectWithoutPropertiesLoose(_ref2,
|
|
9595
|
+
restPrimaryButton = _objectWithoutPropertiesLoose(_ref2, _excluded$n);
|
|
9518
9596
|
|
|
9519
9597
|
var primaryButtonTextTruncate = truncate(primaryButtonText, LENGTH_TEXT$3);
|
|
9520
9598
|
var tertiaryButton = links == null ? void 0 : links[1];
|
|
@@ -9522,7 +9600,7 @@ var PromoWithTitle = function PromoWithTitle(_ref) {
|
|
|
9522
9600
|
var _ref3 = tertiaryButton || {},
|
|
9523
9601
|
_ref3$text = _ref3.text,
|
|
9524
9602
|
tertiaryButtonText = _ref3$text === void 0 ? '' : _ref3$text,
|
|
9525
|
-
restTertiaryButton = _objectWithoutPropertiesLoose(_ref3,
|
|
9603
|
+
restTertiaryButton = _objectWithoutPropertiesLoose(_ref3, _excluded2$3);
|
|
9526
9604
|
|
|
9527
9605
|
var tertiaryButtonTextTruncate = truncate(tertiaryButtonText, LENGTH_TEXT$3);
|
|
9528
9606
|
var defaultVideoSettings = {
|
|
@@ -10251,6 +10329,7 @@ var ErrorLabel$5 = /*#__PURE__*/styled.div(_templateObject4$y || (_templateObjec
|
|
|
10251
10329
|
return "var(--base-color-errorstate)";
|
|
10252
10330
|
});
|
|
10253
10331
|
|
|
10332
|
+
var _excluded$o = ["label", "error", "width", "darkMode", "isSearchable", "components"];
|
|
10254
10333
|
var DropdownIndicator = function DropdownIndicator(props) {
|
|
10255
10334
|
return /*#__PURE__*/React__default.createElement(components.DropdownIndicator, Object.assign({}, props), /*#__PURE__*/React__default.createElement(Icon, {
|
|
10256
10335
|
iconName: "DropdownArrow"
|
|
@@ -10302,7 +10381,7 @@ var SelectComponent = function SelectComponent(_ref2) {
|
|
|
10302
10381
|
_ref2$isSearchable = _ref2.isSearchable,
|
|
10303
10382
|
isSearchable = _ref2$isSearchable === void 0 ? false : _ref2$isSearchable,
|
|
10304
10383
|
components = _ref2.components,
|
|
10305
|
-
selectProps = _objectWithoutPropertiesLoose(_ref2,
|
|
10384
|
+
selectProps = _objectWithoutPropertiesLoose(_ref2, _excluded$o);
|
|
10306
10385
|
|
|
10307
10386
|
return /*#__PURE__*/React__default.createElement(WrapperComponent, {
|
|
10308
10387
|
label: label,
|
|
@@ -10321,6 +10400,7 @@ var SelectComponent = function SelectComponent(_ref2) {
|
|
|
10321
10400
|
})));
|
|
10322
10401
|
};
|
|
10323
10402
|
|
|
10403
|
+
var _excluded$p = ["label", "error", "width", "darkMode", "components"];
|
|
10324
10404
|
/**
|
|
10325
10405
|
* The Select2Async component is similar to Select 2, but uses react-select async
|
|
10326
10406
|
* component for select instead of regular react-select component. This can be used
|
|
@@ -10343,7 +10423,7 @@ var SelectComponent$1 = function SelectComponent(_ref) {
|
|
|
10343
10423
|
_ref$darkMode = _ref.darkMode,
|
|
10344
10424
|
darkMode = _ref$darkMode === void 0 ? false : _ref$darkMode,
|
|
10345
10425
|
components = _ref.components,
|
|
10346
|
-
selectProps = _objectWithoutPropertiesLoose(_ref,
|
|
10426
|
+
selectProps = _objectWithoutPropertiesLoose(_ref, _excluded$p);
|
|
10347
10427
|
|
|
10348
10428
|
return /*#__PURE__*/React__default.createElement(WrapperComponent, {
|
|
10349
10429
|
label: label,
|
|
@@ -11119,58 +11199,6 @@ var UpsellSection = function UpsellSection(_ref) {
|
|
|
11119
11199
|
})))));
|
|
11120
11200
|
};
|
|
11121
11201
|
|
|
11122
|
-
var SCRIPT_SRC = 'https://talkdeskchatsdk.talkdeskapp.com/talkdeskchatsdk.js?t=';
|
|
11123
|
-
var DATA_BIND = '5ea4b1ad-1a17-11ec-af32-06f09e0065e0';
|
|
11124
|
-
var DATA_ORG = '';
|
|
11125
|
-
var DIV_ID = 'tdWebchat';
|
|
11126
|
-
var THEME_ICON = 'https://static.roh.org.uk/logos/crest.svg';
|
|
11127
|
-
var THEME_FONT_BODY = fontFamilies.sansSerifFallback;
|
|
11128
|
-
var THEME_COLOR = core.colors.core;
|
|
11129
|
-
var THEME_COLOR_LIGHT = core.colors.core + '80';
|
|
11130
|
-
var THEME_COLOR_BLACK = core.colors.black;
|
|
11131
|
-
var THEME_COLOR_LIGHTGREY = core.colors.lightgrey;
|
|
11132
|
-
var THEME_COLOR_WHITE = core.colors.white;
|
|
11133
|
-
var THEME_COLOR_MIDGREY = core.colors.midgrey;
|
|
11134
|
-
var SCRIPT_CONTENT = "var webchat;\n((window, document, node, props, configs) => {\n if (window.TalkdeskChatSDK) {\n console.error(\"TalkdeskChatSDK already included\");\n return;\n }\n var divContainer = document.createElement(\"div\");\n divContainer.id = node;\n document.body.appendChild(divContainer);\n var currentDate = new Date().getTime();\n var src = \"" + SCRIPT_SRC + "\" + currentDate;\n var script = document.createElement(\"script\");\n var firstScriptTag = document.getElementsByTagName(\"script\")[0];\n script.type = \"text/javascript\";\n script.charset = \"UTF-8\";\n script.id = \"tdwebchatscript\";\n script.src = src;\n script.async = true;\n firstScriptTag.parentNode.insertBefore(script, firstScriptTag);\n script.onload = () => {\n webchat = TalkdeskChatSDK(node, props);\n webchat.init(configs);\n };\n})(\n window,\n document,\n \"" + DIV_ID + "\",\n { flowId: \"cd19d348b5fb4a0ab0d3277686f28d1e\", accountId: \"\", region: \"td-us-1\" },\n { enableEmoji: true, enableUserInput: true, styles :{\n \"botIcon\": \"" + THEME_ICON + "\",\n \"botBackgroundColor\":\"" + THEME_COLOR_LIGHTGREY + "\",\n \"botTextColor\": \"" + THEME_COLOR_BLACK + "\",\n \"chatTitle\": \"Royal Opera House\",\n \"chatThemeColor\": \"" + THEME_COLOR + "\",\n \"chatTitleIcon\": \"" + THEME_ICON + "\",\n \"customButtonBackgroundColor\": \"" + THEME_COLOR + "\",\n \"customButtonBorderColor\": \"" + THEME_COLOR + "\",\n \"customButtonColor\": \"" + THEME_COLOR_WHITE + "\",\n \"userBackgroundColor\":\"" + THEME_COLOR_LIGHTGREY + "\",\n \"userTextColor\": \"" + THEME_COLOR_BLACK + "\",\n \"userBackgroundColor\":\"" + THEME_COLOR_MIDGREY + "\",\n \"userTextColor\": \"" + THEME_COLOR_BLACK + "\",\n \"welcomeMessageBackgroundColor\": \"" + THEME_COLOR_LIGHT + "\",\n \"welcomeMessageContentFontSize\": \"18px\",\n \"welcomeMessageTitleFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"welcomeMessageContentFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customMessageFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customMessageNoBubbleFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customButtonFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customFieldLabelFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customFieldInputFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customDropdownLabelFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"customDropdownInputFontFamily\": \"" + THEME_FONT_BODY + "\",\n \"startChatButtonBackgroundColor\": \"" + THEME_COLOR + "\",\n \"startChatButtonBorderColor\": \"" + THEME_COLOR + "\",\n \"startChatButtonTextColor\": \"" + THEME_COLOR_WHITE + "\",\n \"startChatButtonHoverBackgroundColor\": \"" + THEME_COLOR + "\",\n \"startChatButtonHoverBorderColor\": \"" + THEME_COLOR + "\",\n \"startChatButtonHoverTextColor\": \"" + THEME_COLOR_WHITE + "\",\n \"startChatButtonFontFamily\": \"" + THEME_FONT_BODY + "\",\n }}\n);";
|
|
11135
|
-
|
|
11136
|
-
var loadLiveChatScript = function loadLiveChatScript(callback) {
|
|
11137
|
-
var existingScript = document.getElementById(DIV_ID);
|
|
11138
|
-
|
|
11139
|
-
if (!existingScript) {
|
|
11140
|
-
var liveChatDiv = document.createElement('div');
|
|
11141
|
-
liveChatDiv.id = DIV_ID;
|
|
11142
|
-
liveChatDiv.setAttribute('data-bind', DATA_BIND);
|
|
11143
|
-
liveChatDiv.setAttribute('data-org', DATA_ORG);
|
|
11144
|
-
var script = document.createElement('script');
|
|
11145
|
-
var scriptBody = document.createTextNode(SCRIPT_CONTENT);
|
|
11146
|
-
script.appendChild(scriptBody);
|
|
11147
|
-
document.body.appendChild(liveChatDiv);
|
|
11148
|
-
document.body.appendChild(script);
|
|
11149
|
-
|
|
11150
|
-
script.onload = function () {
|
|
11151
|
-
if (callback) callback();
|
|
11152
|
-
};
|
|
11153
|
-
}
|
|
11154
|
-
|
|
11155
|
-
if (existingScript && callback) callback();
|
|
11156
|
-
};
|
|
11157
|
-
|
|
11158
|
-
var LiveChat = function LiveChat() {
|
|
11159
|
-
// eslint-disable-next-line
|
|
11160
|
-
var _React$useState = useState(false),
|
|
11161
|
-
loaded = _React$useState[0],
|
|
11162
|
-
setLoaded = _React$useState[1];
|
|
11163
|
-
|
|
11164
|
-
useEffect(function () {
|
|
11165
|
-
loadLiveChatScript(function () {
|
|
11166
|
-
setLoaded(true);
|
|
11167
|
-
});
|
|
11168
|
-
});
|
|
11169
|
-
return /*#__PURE__*/createElement("span", {
|
|
11170
|
-
"data-loaded": loaded
|
|
11171
|
-
});
|
|
11172
|
-
};
|
|
11173
|
-
|
|
11174
11202
|
var _templateObject$1k, _templateObject2$Z;
|
|
11175
11203
|
var StickyBarWrapper = /*#__PURE__*/styled.div(_templateObject$1k || (_templateObject$1k = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n top: 0;\n position: sticky;\n z-index: ", ";\n background-color: var(--base-color-white);\n"])), zIndexes.anchor);
|
|
11176
11204
|
var StickyBarGrid = /*#__PURE__*/styled(Grid)(_templateObject2$Z || (_templateObject2$Z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n padding: 28px 0 26px;\n\n @media ", " {\n padding: 24px 0 28px;\n }\n\n @media ", " {\n border-bottom: none;\n }\n"])), function (_ref) {
|
|
@@ -11207,6 +11235,7 @@ var CloseButton = /*#__PURE__*/styled.button(_templateObject2$_ || (_templateObj
|
|
|
11207
11235
|
var ContentWrapper$1 = /*#__PURE__*/styled.div(_templateObject3$P || (_templateObject3$P = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
11208
11236
|
var Overlay = /*#__PURE__*/styled(Grid)(_templateObject4$E || (_templateObject4$E = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100vh;\n align-content: center;\n background-color: rgba(0, 0, 0, 0.4);\n"])));
|
|
11209
11237
|
|
|
11238
|
+
var _excluded$q = ["isOpen", "setIsOpen", "children", "appElementId"];
|
|
11210
11239
|
var MAX_Z_INDEX = 9999999999;
|
|
11211
11240
|
|
|
11212
11241
|
if (Modal.defaultStyles.content) {
|
|
@@ -11283,7 +11312,7 @@ var ModalWindow = function ModalWindow(_ref) {
|
|
|
11283
11312
|
setIsOpen = _ref.setIsOpen,
|
|
11284
11313
|
children = _ref.children,
|
|
11285
11314
|
appElementId = _ref.appElementId,
|
|
11286
|
-
modalProps = _objectWithoutPropertiesLoose(_ref,
|
|
11315
|
+
modalProps = _objectWithoutPropertiesLoose(_ref, _excluded$q);
|
|
11287
11316
|
|
|
11288
11317
|
var isMobile = useMobile();
|
|
11289
11318
|
var customStyles = {
|
|
@@ -12332,5 +12361,5 @@ var GlobalStyles = /*#__PURE__*/createGlobalStyle(_templateObject$1n || (_templa
|
|
|
12332
12361
|
return theme.fonts.tablet.sizes.body[1];
|
|
12333
12362
|
}, devices.desktop, devices.largeDesktop);
|
|
12334
12363
|
|
|
12335
|
-
export { Accordion, Accordions, AltHeader, AnchorTabBar, AnnouncementBanner, AspectRatio, AuxiliaryButton, AuxiliaryNav, BodyText, ButtonType, Card, Cards, CarouselType, CinemaBadge, Colors, ContactCard, ContentSummary, ControlledDropdown, CreditListing, Editorial, FilterToggles, Footer, GlobalStyles, Grid, GridItem, Header, IInformationBackgroundColour, Icon, ImageAspectRatioWrapper, ImageWithCaption, Information,
|
|
12364
|
+
export { Accordion, Accordions, AltHeader, AnchorTabBar, AnnouncementBanner, AspectRatio, AuxiliaryButton, AuxiliaryNav, BodyText, ButtonType, Card, Cards, CarouselType, CinemaBadge, Colors, ContactCard, ContentSummary, ControlledDropdown, CreditListing, Editorial, FilterToggles, Footer, GlobalStyles, Grid, GridItem, Header, IInformationBackgroundColour, Icon, ImageAspectRatioWrapper, ImageWithCaption, Information, MiniCard, ModalWindow, Navigation, Overline, PageHeadingCinema, PageHeadingCompact, PageHeadingCore, PageHeadingImpact, PageHeadingPanel, PageHeadingStream, Pagination, PasswordStrength, PeopleListing, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Quote, Radio, Radio2, RadioGroup, RadioGroup2, ReadMore, RotatorButtons, SearchBar, SecondaryButton, SecondaryLogo, SectionSplitter, SectionTitle, Select, SelectComponent as Select2, SelectComponent$1 as Select2Async, Sponsorship, StatusBanner, Component as Stepper, StickyBar, StreamBadge, Subtitle, Tab, TabLink, Table, Tabs, Button$1 as TertiaryButton, TextArea, TextField, TextFieldLegacy, TextLink, TextOnly, Theme as ThemeProvider, ThemeType, Tickbox, Tickbox2, TickboxMode, Timer, TitleWithCTA, ToggleButton, TypeTags, UpsellCard, UpsellSection, VideoControls, VideoWithControls$1 as VideoWithControls, breakpoints, devices, zIndexes };
|
|
12336
12365
|
//# sourceMappingURL=chord.esm.js.map
|