/*! For license information please see dll.FlippableCard.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[44],{859:function(e,t,r){"use strict";r.r(t);var n=r(14),i=r.n(n),o=r(13),a=r.n(o),s=r(11),c=r.n(s),l=r(15),p=r.n(l),u=r(16),d=r.n(u),f=r(8),h=r.n(f),b=r(7),y=r.n(b),v=r(0),g=r.n(v),m=r(1),k=r.n(m),S=r(830),w=r.n(S),O=r(1012),F=r(104),j=r(38),T=r.n(j);function B(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?B(Object(r),!0).forEach((function(t){y()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=h()(e);if(t){var i=h()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return d()(this,r)}}var V=function(e){p()(r,e);var t=E(r);function r(e){var n;return i()(this,r),n=t.call(this,e),y()(c()(n),"oneShot",(function(){n.state.fired||n.setState({fired:!0,isFlipped:!n.state.isFlipped},(function(){n.props.onChange(n.state.isFlipped)}))})),y()(c()(n),"handleToggle",(function(){if(void 0!==n.props.value)return n.props.onChange(!n.props.value);n.props.oneTime?n.oneShot():n.setState({isFlipped:!n.state.isFlipped},(function(){n.props.onChange(n.state.isFlipped)}))})),y()(c()(n),"interaction",(function(){null===n.props.button&&n.handleToggle()})),n.state={isFlipped:e.defaultValue,fired:!1},n}return a()(r,[{key:"componentDidUpdate",value:function(e){e.defaultValue!==this.props.defaultValue&&this.setState({isFlipped:e.defaultValue})}},{key:"renderButton",value:function(){return null!==this.props.button?g.a.createElement(F.default,{onClick:this.handleToggle,block:!0},this.props.button):null}},{key:"render",value:function(){if(!T()(this.props.children))return g.a.createElement(O.default,{variant:"danger"},"The flippable card requires two child elements.");var e=void 0!==this.props.value?this.props.value:this.state.isFlipped,t={container:P({perspective:this.props.perspective,transformStyle:"preserve-3d",width:400,height:400,cursor:"pointer"},this.props.cardStyles.container),flipper:{position:"relative",transformStyle:"preserve-3d",width:"100%",height:"100%"},front:P({WebkitBackfaceVisibility:"hidden",backfaceVisibility:"hidden",left:"0",position:"absolute",top:"0",transform:"rotateY(".concat(e?180:0,"deg)"),transformStyle:"preserve-3d",width:"100%",height:"100%",zIndex:"2",transition:"".concat(this.props.flipSpeedBackToFront,"s")},this.props.cardStyles.front),back:P({WebkitBackfaceVisibility:"hidden",backfaceVisibility:"hidden",left:"0",position:"absolute",transform:"rotateY(".concat(e?0:-180,"deg)"),transformStyle:"preserve-3d",top:"0",width:"100%",height:"100%",zIndex:2,transition:"".concat(this.props.flipSpeedFrontToBack,"s")},this.props.cardStyles.back)},r=g.a.createElement("div",{id:this.props.id,role:"button",tabIndex:0,onClick:this.interaction,onKeyPress:this.interaction,className:"react-card-flip",style:t.container},g.a.createElement("div",{className:"react-card-flipper",style:t.flipper},g.a.createElement("div",{className:"react-card-front",style:t.front},this.props.children[0],this.renderButton()),g.a.createElement("div",{className:"react-card-back",style:t.back},this.props.children[1],this.renderButton())));return this.props.draggable?g.a.createElement(w.a,null,r):r}}]),r}(v.Component);V.propTypes={button:k.a.string,cardStyles:k.a.shape({container:k.a.object,front:k.a.object,back:k.a.object}),children:function(e,t,r){return 2!==g.a.Children.count(e[t])?new Error("".concat(r," requires two children.")):null},draggable:k.a.bool,flipSpeedBackToFront:k.a.number,flipSpeedFrontToBack:k.a.number,onChange:k.a.func,oneTime:k.a.bool,perspective:k.a.number,value:k.a.bool,defaultValue:k.a.bool},V.defaultProps={button:null,cardStyles:{container:{},front:{},back:{}},children:null,draggable:!1,flipSpeedBackToFront:1,flipSpeedFrontToBack:1,onChange:function(){},oneTime:!1,perspective:1e3,value:void 0,defaultValue:!1},t.default=V}}]);