| 1 | function _assertThisInitialized(self) { |
| 2 | if (self === void 0) { |
| 3 | throw new ReferenceError( |
| 4 | "this hasn't been initialised - super() hasn't been called" |
| 5 | ); |
| 6 | } |
| 7 | return self; |
| 8 | } |
| 9 | function _defineProperty(obj, key, value) { |
| 10 | key = _toPropertyKey(key); |
| 11 | if (key in obj) { |
| 12 | Object.defineProperty(obj, key, { |
| 13 | value: value, |
| 14 | enumerable: true, |
| 15 | configurable: true, |
| 16 | writable: true, |
| 17 | }); |
| 18 | } else { |
| 19 | obj[key] = value; |
| 20 | } |
| 21 | return obj; |
| 22 | } |
| 23 | function _toPropertyKey(t) { |
| 24 | var i = _toPrimitive(t, 'string'); |
| 25 | return 'symbol' == typeof i ? i : i + ''; |
| 26 | } |
| 27 | function _toPrimitive(t, r) { |
| 28 | if ('object' != typeof t || !t) return t; |
| 29 | var e = t[Symbol.toPrimitive]; |
| 30 | if (void 0 !== e) { |
| 31 | var i = e.call(t, r || 'default'); |
| 32 | if ('object' != typeof i) return i; |
| 33 | throw new TypeError('@@toPrimitive must return a primitive value.'); |
| 34 | } |
| 35 | return ('string' === r ? String : Number)(t); |
| 36 | } |
| 37 | function _inheritsLoose(subClass, superClass) { |
| 38 | subClass.prototype = Object.create(superClass.prototype); |
| 39 | subClass.prototype.constructor = subClass; |
| 40 | _setPrototypeOf(subClass, superClass); |
| 41 | } |
| 42 | function _setPrototypeOf(o, p) { |
| 43 | _setPrototypeOf = Object.setPrototypeOf |
| 44 | ? Object.setPrototypeOf.bind() |
| 45 | : function _setPrototypeOf(o, p) { |
| 46 | o.__proto__ = p; |
| 47 | return o; |
| 48 | }; |
| 49 | return _setPrototypeOf(o, p); |
| 50 | } |
| 51 | // Compile this with Babel. |
| 52 | // babel --config-file ./babel.config.json BabelClasses.js --out-file BabelClasses-compiled.js --source-maps |
| 53 | |
| 54 | export let BabelClass = /*#__PURE__*/ (function (_React$Component) { |
| 55 | _inheritsLoose(BabelClass, _React$Component); |
| 56 | function BabelClass() { |
| 57 | return _React$Component.apply(this, arguments) || this; |
| 58 | } |
| 59 | var _proto = BabelClass.prototype; |
| 60 | _proto.render = function render() { |
| 61 | return this.props.children; |
| 62 | }; |
| 63 | return BabelClass; |
| 64 | })(React.Component); |
| 65 | export let BabelClassWithFields = /*#__PURE__*/ (function (_React$Component2) { |
| 66 | _inheritsLoose(BabelClassWithFields, _React$Component2); |
| 67 | function BabelClassWithFields(...args) { |
| 68 | var _this; |
| 69 | _this = _React$Component2.call(this, ...args) || this; |
| 70 | _defineProperty(_assertThisInitialized(_this), 'props', void 0); |
| 71 | _defineProperty(_assertThisInitialized(_this), 'state', {}); |
| 72 | return _this; |
| 73 | } // These compile to defineProperty which can break some interception techniques. |
| 74 | var _proto2 = BabelClassWithFields.prototype; |
| 75 | _proto2.render = function render() { |
| 76 | return this.props.children; |
| 77 | }; |
| 78 | return BabelClassWithFields; |
| 79 | })(React.Component); |
| 80 | |
| 81 | //# sourceMappingURL=BabelClasses-compiled.js.map |