{"errors":[],"warnings":[],"version":"2.4.1","hash":"2742bdc767a2b640c852","time":1077,"publicPath":"","assetsByChunkName":{"index":"Flipcard.js"},"assets":[{"name":"Flipcard.js","size":3364,"chunks":[0],"chunkNames":["index"],"emitted":true}],"entrypoints":{"index":{"chunks":[0],"assets":["Flipcard.js"]}},"chunks":[{"id":0,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":5820,"names":["index"],"files":["Flipcard.js"],"hash":"2a3f392fe6d9da245491","parents":[],"origins":[{"moduleId":1,"module":"/Users/kenneth/Sites/kennethormandy/react-flipcard/node_modules/babel-loader/lib/index.js??ref--0-0!/Users/kenneth/Sites/kennethormandy/react-flipcard/src/Flipcard.js","moduleIdentifier":"/Users/kenneth/Sites/kennethormandy/react-flipcard/node_modules/babel-loader/lib/index.js??ref--0-0!/Users/kenneth/Sites/kennethormandy/react-flipcard/src/Flipcard.js","moduleName":"./src/Flipcard.js","loc":"","name":"index","reasons":[]}]}],"modules":[{"id":0,"identifier":"external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","name":"external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","index":1,"index2":0,"size":42,"cacheable":false,"built":false,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":"/Users/kenneth/Sites/kennethormandy/react-flipcard/node_modules/babel-loader/lib/index.js??ref--0-0!/Users/kenneth/Sites/kennethormandy/react-flipcard/src/Flipcard.js","issuerId":1,"issuerName":"./src/Flipcard.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":1,"moduleIdentifier":"/Users/kenneth/Sites/kennethormandy/react-flipcard/node_modules/babel-loader/lib/index.js??ref--0-0!/Users/kenneth/Sites/kennethormandy/react-flipcard/src/Flipcard.js","module":"./src/Flipcard.js","moduleName":"./src/Flipcard.js","type":"cjs require","userRequest":"react","loc":"11:13-29"}],"usedExports":true,"providedExports":null,"depth":1,"parsedSrc":"function(e,t){e.exports=void 0}"},{"id":1,"identifier":"/Users/kenneth/Sites/kennethormandy/react-flipcard/node_modules/babel-loader/lib/index.js??ref--0-0!/Users/kenneth/Sites/kennethormandy/react-flipcard/src/Flipcard.js","name":"./src/Flipcard.js","index":0,"index2":1,"size":5778,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":null,"issuerId":null,"issuerName":null,"failed":false,"errors":0,"warnings":0,"reasons":[],"usedExports":true,"providedExports":null,"depth":0,"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// Rewrite of mzabriskie/react-flipcard, MIT via https://git.io/vdKLa\n// Adds support for revolving-door transition, MIT via https://git.io/vdKc7\n\nvar Flipcard = function (_React$Component) {\n  _inherits(Flipcard, _React$Component);\n\n  function Flipcard(props) {\n    _classCallCheck(this, Flipcard);\n\n    var _this = _possibleConstructorReturn(this, (Flipcard.__proto__ || Object.getPrototypeOf(Flipcard)).call(this, props));\n\n    _this.state = {\n      isFlipped: props.flipped,\n      flipperRotate: 0\n    };\n    return _this;\n  }\n\n  _createClass(Flipcard, [{\n    key: 'componentWillReceiveProps',\n    value: function componentWillReceiveProps(newProps) {\n      var state = this.state;\n      var props = this.props;\n      var rotate = state.flipperRotate;\n\n      if (props.type === 'revolving-door') {\n        rotate = state.flipperRotate + 180;\n      }\n\n      if (!props.disabled) {\n        if (newProps.flipped === true && state.isFlipped === false || newProps.flipped === false && state.isFlipped === true) {\n          return this.setState({\n            isFlipped: !state.isFlipped,\n            flipperRotate: rotate\n          });\n        }\n      }\n\n      return false;\n    }\n  }, {\n    key: 'render',\n    value: function render() {\n      var props = this.props;\n      var state = this.state;\n\n      var type = props.type,\n          flipped = props.flipped,\n          disabled = props.disabled,\n          classNameFlipper = props.classNameFlipper,\n          classNameFront = props.classNameFront,\n          classNameBack = props.classNameBack,\n          remainingProps = _objectWithoutProperties(props, ['type', 'flipped', 'disabled', 'classNameFlipper', 'classNameFront', 'classNameBack']);\n\n      // TODO Always seems to update styles on Safari?\n\n\n      var styles = {};\n      if (type === 'revolving-door') {\n        var rotateY = 'rotateY(' + state.flipperRotate + 'deg)';\n        styles = {\n          WebkitTransform: rotateY,\n          transform: rotateY\n        };\n      }\n\n      var classes = ['Flipcard-flipper', state.isFlipped === true ? 'Flipcard--flipped' : '', 'Flipcard--' + type, classNameFlipper];\n\n      return _react2.default.createElement(\n        'div',\n        _extends({}, remainingProps, { className: 'Flipcard', tabIndex: 0 }),\n        _react2.default.createElement(\n          'div',\n          { className: classes.join(' '), style: styles },\n          [0, 1].map(function (index) {\n            var child = props.children[index];\n            var zero = 0;\n            var one = 1;\n            if (index === 1) {\n              zero = 1;\n              one = 0;\n            }\n\n            return _react2.default.createElement(\n              'div',\n              {\n                key: 'Flipcard_card_' + index,\n                className: 'Flipcard-' + (index === 0 ? 'front ' + classNameFront : 'back ' + classNameBack),\n                style: {\n                  opacity: state.isFlipped ? zero : one,\n                  userSelect: state.isFlipped && !disabled === true ? 'none' : null,\n                  cursor: !disabled && (typeof props.onClick === 'function' || typeof child.props.onClick === 'function') ? 'pointer' : 'auto'\n                },\n                tabIndex: -1,\n                'aria-hidden': state.isFlipped && !disabled },\n              child\n            );\n          })\n        )\n      );\n    }\n  }]);\n\n  return Flipcard;\n}(_react2.default.Component);\n\nFlipcard.defaultProps = {\n  type: 'horizontal',\n  flipped: false,\n  disabled: false,\n  classNameFlipper: '',\n  classNameFront: '',\n  classNameBack: ''\n};\n\nexports.default = Flipcard;","parsedSrc":"function(e,t,r){\"use strict\";function n(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function o(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function i(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}function a(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,\"__esModule\",{value:!0});var p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),c=r(0),s=function(e){return e&&e.__esModule?e:{default:e}}(c),u=function(e){function t(e){o(this,t);var r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.state={isFlipped:e.flipped,flipperRotate:0},r}return a(t,e),l(t,[{key:\"componentWillReceiveProps\",value:function(e){var t=this.state,r=this.props,n=t.flipperRotate;return\"revolving-door\"===r.type&&(n=t.flipperRotate+180),!r.disabled&&(!0===e.flipped&&!1===t.isFlipped||!1===e.flipped&&!0===t.isFlipped)&&this.setState({isFlipped:!t.isFlipped,flipperRotate:n})}},{key:\"render\",value:function(){var e=this.props,t=this.state,r=e.type,o=(e.flipped,e.disabled),i=e.classNameFlipper,a=e.classNameFront,l=e.classNameBack,c=n(e,[\"type\",\"flipped\",\"disabled\",\"classNameFlipper\",\"classNameFront\",\"classNameBack\"]),u={};if(\"revolving-door\"===r){var f=\"rotateY(\"+t.flipperRotate+\"deg)\";u={WebkitTransform:f,transform:f}}var d=[\"Flipcard-flipper\",!0===t.isFlipped?\"Flipcard--flipped\":\"\",\"Flipcard--\"+r,i];return s.default.createElement(\"div\",p({},c,{className:\"Flipcard\",tabIndex:0}),s.default.createElement(\"div\",{className:d.join(\" \"),style:u},[0,1].map(function(r){var n=e.children[r],i=0,p=1;return 1===r&&(i=1,p=0),s.default.createElement(\"div\",{key:\"Flipcard_card_\"+r,className:\"Flipcard-\"+(0===r?\"front \"+a:\"back \"+l),style:{opacity:t.isFlipped?i:p,userSelect:t.isFlipped&&!0==!o?\"none\":null,cursor:o||\"function\"!=typeof e.onClick&&\"function\"!=typeof n.props.onClick?\"auto\":\"pointer\"},tabIndex:-1,\"aria-hidden\":t.isFlipped&&!o},n)})))}}]),t}(s.default.Component);u.defaultProps={type:\"horizontal\",flipped:!1,disabled:!1,classNameFlipper:\"\",classNameFront:\"\",classNameBack:\"\"},t.default=u}"}],"filteredModules":0,"children":[]}