Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-rating

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-rating - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

src/.Rating.jsx.swp

310

lib/react-rating.js

@@ -1,2 +0,2 @@

/*! react-rating - 0.9.0 | (c) 2015, 2017 dreyescat | MIT | https://github.com/dreyescat/react-rating */
/*! react-rating - 0.9.1 | (c) 2015, 2017 dreyescat | MIT | https://github.com/dreyescat/react-rating */
(function webpackUniversalModuleDefinition(root, factory) {

@@ -90,7 +90,7 @@ if(typeof exports === 'object' && typeof module === 'object')

var _style = __webpack_require__(12);
var _style = __webpack_require__(13);
var _style2 = _interopRequireDefault(_style);
var _PercentageSymbol = __webpack_require__(14);
var _PercentageSymbol = __webpack_require__(15);

@@ -273,13 +273,16 @@ var _PercentageSymbol2 = _interopRequireDefault(_PercentageSymbol);

symbolNodes.push(_react2['default'].createElement(_PercentageSymbol2['default'], {
var listeners = !readonly && {
onClick: this.handleClick.bind(this, i),
onMouseMove: this.handleMouseMove.bind(this, i),
onTouchMove: this.handleMouseMove.bind(this, i),
onTouchEnd: this.handleClick.bind(this, i)
};
symbolNodes.push(_react2['default'].createElement(_PercentageSymbol2['default'], _extends({
key: i,
background: emptySymbols[i % emptySymbols.length],
icon: icon[i % icon.length],
percent: percent,
onClick: this.handleClick.bind(this, i),
onMouseMove: this.handleMouseMove.bind(this, i),
onTouchMove: this.handleMouseMove.bind(this, i),
onTouchEnd: this.handleClick.bind(this, i),
percent: percent
}, listeners, {
direction: this.state.direction
}));
})));
}

@@ -293,3 +296,3 @@

},
onMouseLeave: this.handleMouseLeave
onMouseLeave: !readonly ? this.handleMouseLeave : undefined
}, other),

@@ -368,8 +371,6 @@ symbolNodes

/* WEBPACK VAR INJECTION */(function(process) {/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

@@ -396,3 +397,3 @@

// http://fb.me/prop-types-in-prod
module.exports = __webpack_require__(11)();
module.exports = __webpack_require__(12)();
}

@@ -597,8 +598,6 @@

/* WEBPACK VAR INJECTION */(function(process) {/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

@@ -611,5 +610,6 @@

var warning = __webpack_require__(8);
var assign = __webpack_require__(9);
var ReactPropTypesSecret = __webpack_require__(9);
var checkPropTypes = __webpack_require__(10);
var ReactPropTypesSecret = __webpack_require__(10);
var checkPropTypes = __webpack_require__(11);

@@ -710,3 +710,4 @@ module.exports = function(isValidElement, throwOnDirectAccess) {

oneOfType: createUnionTypeChecker,
shape: createShapeTypeChecker
shape: createShapeTypeChecker,
exact: createStrictShapeTypeChecker,
};

@@ -926,3 +927,3 @@

false,
'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
'received %s at index %s.',

@@ -981,2 +982,32 @@ getPostfixForTypeWarning(checker),

function createStrictShapeTypeChecker(shapeTypes) {
function validate(props, propName, componentName, location, propFullName) {
var propValue = props[propName];
var propType = getPropType(propValue);
if (propType !== 'object') {
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
}
// We need to check all keys in case some are required but missing from
// props.
var allKeys = assign({}, props[propName], shapeTypes);
for (var key in allKeys) {
var checker = shapeTypes[key];
if (!checker) {
return new PropTypeError(
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
);
}
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
if (error) {
return error;
}
}
return null;
}
return createChainableTypeChecker(validate);
}
function isNode(propValue) {

@@ -1124,7 +1155,5 @@ switch (typeof propValue) {

* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*

@@ -1166,7 +1195,5 @@ *

* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*

@@ -1227,8 +1254,6 @@ */

/* WEBPACK VAR INJECTION */(function(process) {/**
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.
* Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*

@@ -1251,41 +1276,39 @@ */

if (process.env.NODE_ENV !== 'production') {
(function () {
var printWarning = function printWarning(format) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var printWarning = function printWarning(format) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var argIndex = 0;
var message = 'Warning: ' + format.replace(/%s/g, function () {
return args[argIndex++];
});
if (typeof console !== 'undefined') {
console.error(message);
}
try {
// --- Welcome to debugging React ---
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch (x) {}
};
var argIndex = 0;
var message = 'Warning: ' + format.replace(/%s/g, function () {
return args[argIndex++];
});
if (typeof console !== 'undefined') {
console.error(message);
}
try {
// --- Welcome to debugging React ---
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch (x) {}
};
warning = function warning(condition, format) {
if (format === undefined) {
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
}
warning = function warning(condition, format) {
if (format === undefined) {
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
}
if (format.indexOf('Failed Composite propType: ') === 0) {
return; // Ignore CompositeComponent proptype check.
if (format.indexOf('Failed Composite propType: ') === 0) {
return; // Ignore CompositeComponent proptype check.
}
if (!condition) {
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
args[_key2 - 2] = arguments[_key2];
}
if (!condition) {
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
args[_key2 - 2] = arguments[_key2];
}
printWarning.apply(undefined, [format].concat(args));
}
};
})();
printWarning.apply(undefined, [format].concat(args));
}
};
}

@@ -1300,9 +1323,103 @@

/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
'use strict';
/* eslint-disable no-unused-vars */
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var hasOwnProperty = Object.prototype.hasOwnProperty;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
function toObject(val) {
if (val === null || val === undefined) {
throw new TypeError('Object.assign cannot be called with null or undefined');
}
return Object(val);
}
function shouldUseNative() {
try {
if (!Object.assign) {
return false;
}
// Detect buggy property enumeration order in older V8 versions.
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
test1[5] = 'de';
if (Object.getOwnPropertyNames(test1)[0] === '5') {
return false;
}
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
var test2 = {};
for (var i = 0; i < 10; i++) {
test2['_' + String.fromCharCode(i)] = i;
}
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
return test2[n];
});
if (order2.join('') !== '0123456789') {
return false;
}
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
var test3 = {};
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
test3[letter] = letter;
});
if (Object.keys(Object.assign({}, test3)).join('') !==
'abcdefghijklmnopqrst') {
return false;
}
return true;
} catch (err) {
// We don't expect any of the above to throw, but better to be safe.
return false;
}
}
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
var from;
var to = toObject(target);
var symbols;
for (var s = 1; s < arguments.length; s++) {
from = Object(arguments[s]);
for (var key in from) {
if (hasOwnProperty.call(from, key)) {
to[key] = from[key];
}
}
if (getOwnPropertySymbols) {
symbols = getOwnPropertySymbols(from);
for (var i = 0; i < symbols.length; i++) {
if (propIsEnumerable.call(from, symbols[i])) {
to[symbols[i]] = from[symbols[i]];
}
}
}
}
return to;
};
/***/ }),
/* 10 */
/***/ (function(module, exports) {
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

@@ -1318,12 +1435,10 @@

/***/ }),
/* 10 */
/* 11 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

@@ -1336,3 +1451,3 @@

var warning = __webpack_require__(8);
var ReactPropTypesSecret = __webpack_require__(9);
var ReactPropTypesSecret = __webpack_require__(10);
var loggedTypeFailures = {};

@@ -1363,3 +1478,3 @@ }

// behavior as without this statement except with a better message.
invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);
invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);

@@ -1389,12 +1504,10 @@ } catch (ex) {

/***/ }),
/* 11 */
/* 12 */
/***/ (function(module, exports, __webpack_require__) {
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

@@ -1406,3 +1519,3 @@

var invariant = __webpack_require__(7);
var ReactPropTypesSecret = __webpack_require__(9);
var ReactPropTypesSecret = __webpack_require__(10);

@@ -1445,3 +1558,4 @@ module.exports = function() {

oneOfType: getShim,
shape: getShim
shape: getShim,
exact: getShim
};

@@ -1457,3 +1571,3 @@

/***/ }),
/* 12 */
/* 13 */
/***/ (function(module, exports, __webpack_require__) {

@@ -1463,3 +1577,3 @@

var merge = __webpack_require__(13);
var merge = __webpack_require__(14);

@@ -1487,3 +1601,3 @@ var style = {

/***/ }),
/* 13 */
/* 14 */
/***/ (function(module, exports) {

@@ -1505,3 +1619,3 @@

/***/ }),
/* 14 */
/* 15 */
/***/ (function(module, exports, __webpack_require__) {

@@ -1508,0 +1622,0 @@

@@ -1,2 +0,7 @@

/*! react-rating - 0.9.0 | (c) 2015, 2017 dreyescat | MIT | https://github.com/dreyescat/react-rating */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactRating=t(require("react")):e.ReactRating=t(e.React)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/lib",t(0)}([function(e,t,n){"use strict";e.exports=n(9)},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function i(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){v&&d&&(v=!1,d.length?h=d.concat(h):y=-1,h.length&&u())}function u(){if(!v){var e=o(a);v=!0;for(var t=h.length;t;){for(d=h,h=[];++y<t;)d&&d[y].run();y=-1,t=h.length}d=null,v=!1,i(e)}}function s(e,t){this.fun=e,this.array=t}function c(){}var l,f,p=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(e){f=r}}();var d,h=[],v=!1,y=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new s(e,t)),1!==h.length||v||o(u)},s.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.prependListener=c,p.prependOnceListener=c,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){(function(t){"use strict";function n(e,t,n,o,i,a,u,s){if(r(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,o,i,a,u,s],f=0;c=new Error(t.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var r=function(e){};"production"!==t.env.NODE_ENV&&(r=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),e.exports=n}).call(t,n(1))},function(e,t){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=n},function(e,t,n){(function(t){"use strict";var r=n(2),o=r;"production"!==t.env.NODE_ENV&&!function(){var e=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,function(){return n[o++]});"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};o=function(t,n){if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==n.indexOf("Failed Composite propType: ")&&!t){for(var r=arguments.length,o=Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];e.apply(void 0,[n].concat(o))}}}(),e.exports=o}).call(t,n(1))},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},i=!0;e.exports=n(14)(o,i)}else e.exports=n(13)()}).call(t,n(1))},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(7),a=r(i),u=n(6),s=(r(u),function(e){return a.default.isValidElement(e)?e:"object"==typeof e&&null!==e?a.default.createElement("span",{style:e}):"[object String]"===Object.prototype.toString.call(e)?a.default.createElement("span",{className:e}):void 0}),c=function(e){var t,n=s(e.background),r=s(e.icon),i=(t={display:"inline-block",position:"absolute",overflow:"hidden",top:0},o(t,"rtl"===e.direction?"right":"left",0),o(t,"width",void 0!==e.percent?e.percent+"%":"auto"),t),u={cursor:e.onClick||e.onMouseOver?"pointer":"auto",display:"inline-block",position:"relative"};return a.default.createElement("span",{style:u,onClick:e.onClick,onMouseMove:e.onMouseMove,onTouchMove:e.onMouseMove,onTouchEnd:e.onClick},n,a.default.createElement("span",{style:i},r))};c.propTypes=!1,e.exports=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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)}var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;r=!1,null===o&&(o=Function.prototype);var u=Object.getOwnPropertyDescriptor(o,i);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(o);if(null===c)return;e=c,t=i,n=a,r=!0,u=c=void 0}},l=n(7),f=r(l),p=n(6),d=(r(p),n(11)),h=r(d),v=n(8),y=r(v),m=function(e,t){var n=e.step,r=n>0?e.start:e.stop,o=n>0?e.stop:e.start;if(n&&r<=t&&t<=o)return(t-e.start)/n},b=function(e){function t(e){i(this,t),c(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e);var n=void 0!==e.initialRate?e.initialRate:e.placeholderRate;this.state={index:m(e,n),indexOver:void 0,direction:"ltr"},this.ratingContainer=null,this.handleClick=this.handleClick.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this)}return a(t,e),s(t,[{key:"componentDidMount",value:function(){this.setState({direction:window.getComputedStyle(this.ratingContainer,null).getPropertyValue("direction")})}},{key:"componentWillReceiveProps",value:function(e){var t=void 0!==e.initialRate?e.initialRate:e.placeholderRate;this.setState({index:m(e,t),selected:void 0!==e.initialRate})}},{key:"handleClick",value:function(e,t){if(!this.props.readonly){var n=e+this._fractionalIndex(t);this.props.onClick(this._indexToRate(n),t),this.state.index!==n&&(this.props.onChange(this._indexToRate(n)),this.setState({indexOver:void 0,index:n,selected:!0}))}}},{key:"handleMouseLeave",value:function(){this.props.readonly||(this.props.onRate(),this.setState({indexOver:void 0}))}},{key:"handleMouseMove",value:function(e,t){if(!this.props.readonly){var n=e+this._fractionalIndex(t);this.state.indexOver!==n&&(this.props.onRate(this._indexToRate(n)),this.setState({indexOver:n}))}}},{key:"_indexToRate",value:function(e){return this.props.start+Math.floor(e)*this.props.step+this.props.step*this._roundToFraction(e%1)}},{key:"_rateToIndex",value:function(e){return m(this.props,e)}},{key:"_roundToFraction",value:function(e){var t=Math.ceil(e%1*this.props.fractions)/this.props.fractions,n=Math.pow(10,this.props.scale),r=Math.floor(e)+Math.floor(t*n)/n;return r>this.props.stop?this.props.stop:r}},{key:"_fractionalIndex",value:function(e){var t=e.nativeEvent.type.indexOf("touch")>-1?e.nativeEvent.type.indexOf("touchend")>-1?e.changedTouches[0].clientX:e.touches[0].clientX:e.clientX,n="rtl"===this.state.direction?e.currentTarget.getBoundingClientRect().right-t:t-e.currentTarget.getBoundingClientRect().left;return this._roundToFraction(n/e.currentTarget.offsetWidth)}},{key:"render",value:function(){for(var e=this,t=this.props,n=(t.start,t.stop),r=(t.step,t.initialRate),i=t.placeholderRate,a=(t.empty,t.full,t.placeholder,t.readonly,t.quiet),s=(t.fractions,t.scale,t.onChange,t.onClick,t.onRate,o(t,["start","stop","step","initialRate","placeholderRate","empty","full","placeholder","readonly","quiet","fractions","scale","onChange","onClick","onRate"])),c=[],l=[].concat(this.props.empty),p=[].concat(this.props.placeholder),d=[].concat(this.props.full),h=a||void 0===this.state.indexOver?this.state.index:this.state.indexOver,v=Math.floor(h),m=this.state.selected||void 0!==r||void 0===i||!a&&void 0!==this.state.indexOver?d:p,b=0;b<Math.floor(this._rateToIndex(n));b++){var g=b-v===0?h%1*100:b-v<0?100:0;c.push(f.default.createElement(y.default,{key:b,background:l[b%l.length],icon:m[b%m.length],percent:g,onClick:this.handleClick.bind(this,b),onMouseMove:this.handleMouseMove.bind(this,b),onTouchMove:this.handleMouseMove.bind(this,b),onTouchEnd:this.handleClick.bind(this,b),direction:this.state.direction}))}return f.default.createElement("span",u({ref:function(t){e.ratingContainer=t},onMouseLeave:this.handleMouseLeave},s),c)}}]),t}(f.default.Component);b.defaultProps={start:0,stop:5,step:1,empty:h.default.empty,placeholder:h.default.placeholder,full:h.default.full,fractions:1,scale:3,onChange:function(e){},onClick:function(e){},onRate:function(e){}},b.propTypes=!1,e.exports=b},function(e,t){"use strict";e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}},function(e,t,n){"use strict";var r=n(10),o={display:"inline-block",borderRadius:"50%",border:"5px double white",width:30,height:30};e.exports={empty:r(o,{backgroundColor:"#ccc"}),full:r(o,{backgroundColor:"black"}),placeholder:r(o,{backgroundColor:"red"})}},function(e,t,n){(function(t){"use strict";function r(e,n,r,s,c){if("production"!==t.env.NODE_ENV)for(var l in e)if(e.hasOwnProperty(l)){var f;try{o("function"==typeof e[l],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",s||"React class",r,l),f=e[l](n,l,s,r,null,a)}catch(e){f=e}if(i(!f||f instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",s||"React class",r,l,typeof f),f instanceof Error&&!(f.message in u)){u[f.message]=!0;var p=c?c():"";i(!1,"Failed %s type: %s%s",r,f.message,null!=p?p:"")}}}if("production"!==t.env.NODE_ENV)var o=n(3),i=n(5),a=n(4),u={};e.exports=r}).call(t,n(1))},function(e,t,n){"use strict";var r=n(2),o=n(3),i=n(4);e.exports=function(){function e(e,t,n,r,a,u){u!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){(function(t){"use strict";var r=n(2),o=n(3),i=n(5),a=n(4),u=n(12);e.exports=function(e,n){function s(e){var t=e&&(M&&e[M]||e[j]);if("function"==typeof t)return t}function c(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function l(e){this.message=e,this.stack=""}function f(e){function r(r,c,f,p,d,h,v){if(p=p||C,h=h||f,v!==a)if(n)o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==t.env.NODE_ENV&&"undefined"!=typeof console){var y=p+":"+f;!u[y]&&s<3&&(i(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",h,p),u[y]=!0,s++)}return null==c[f]?r?new l(null===c[f]?"The "+d+" `"+h+"` is marked as required "+("in `"+p+"`, but its value is `null`."):"The "+d+" `"+h+"` is marked as required in "+("`"+p+"`, but its value is `undefined`.")):null:e(c,f,p,d,h)}if("production"!==t.env.NODE_ENV)var u={},s=0;var c=r.bind(null,!1);return c.isRequired=r.bind(null,!0),c}function p(e){function t(t,n,r,o,i,a){var u=t[n],s=E(u);if(s!==e){var c=R(u);return new l("Invalid "+o+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return f(t)}function d(){return f(r.thatReturnsNull)}function h(e){function t(t,n,r,o,i){if("function"!=typeof e)return new l("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=t[n];if(!Array.isArray(u)){var s=E(u);return new l("Invalid "+o+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var c=0;c<u.length;c++){var f=e(u,c,r,o,i+"["+c+"]",a);if(f instanceof Error)return f}return null}return f(t)}function v(){function t(t,n,r,o,i){var a=t[n];if(!e(a)){var u=E(a);return new l("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return f(t)}function y(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||C,u=_(t[n]);return new l("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("instance of `"+a+"`."))}return null}return f(t)}function m(e){function n(t,n,r,o,i){for(var a=t[n],u=0;u<e.length;u++)if(c(a,e[u]))return null;var s=JSON.stringify(e);return new l("Invalid "+o+" `"+i+"` of value `"+a+"` "+("supplied to `"+r+"`, expected one of "+s+"."))}return Array.isArray(e)?f(n):("production"!==t.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOf, expected an instance of array."):void 0,r.thatReturnsNull)}function b(e){function t(t,n,r,o,i){if("function"!=typeof e)return new l("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=t[n],s=E(u);if("object"!==s)return new l("Invalid "+o+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an object."));for(var c in u)if(u.hasOwnProperty(c)){var f=e(u,c,r,o,i+"."+c,a);if(f instanceof Error)return f}return null}return f(t)}function g(e){function n(t,n,r,o,i){for(var u=0;u<e.length;u++){var s=e[u];if(null==s(t,n,r,o,i,a))return null}return new l("Invalid "+o+" `"+i+"` supplied to "+("`"+r+"`."))}if(!Array.isArray(e))return"production"!==t.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOfType, expected an instance of array."):void 0,r.thatReturnsNull;for(var o=0;o<e.length;o++){var u=e[o];if("function"!=typeof u)return i(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",k(u),o),r.thatReturnsNull}return f(n)}function x(){function e(e,t,n,r,o){return T(e[t])?null:new l("Invalid "+r+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return f(e)}function O(e){function t(t,n,r,o,i){var u=t[n],s=E(u);if("object"!==s)return new l("Invalid "+o+" `"+i+"` of type `"+s+"` "+("supplied to `"+r+"`, expected `object`."));for(var c in e){var f=e[c];if(f){var p=f(u,c,r,o,i+"."+c,a);if(p)return p}}return null}return f(t)}function T(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(T);if(null===t||e(t))return!0;var n=s(t);if(!n)return!1;var r,o=n.call(t);if(n!==t.entries){for(;!(r=o.next()).done;)if(!T(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!T(i[1]))return!1}return!0;default:return!1}}function w(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function E(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":w(t,e)?"symbol":t}function R(e){if("undefined"==typeof e||null===e)return""+e;var t=E(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function k(e){var t=R(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function _(e){return e.constructor&&e.constructor.name?e.constructor.name:C}var M="function"==typeof Symbol&&Symbol.iterator,j="@@iterator",C="<<anonymous>>",P={array:p("array"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:d(),arrayOf:h,element:v(),instanceOf:y,node:x(),objectOf:b,oneOf:m,oneOfType:g,shape:O};return l.prototype=Error.prototype,P.checkPropTypes=u,P.PropTypes=P,P}}).call(t,n(1))}])});
/*! react-rating - 0.9.1 | (c) 2015, 2017 dreyescat | MIT | https://github.com/dreyescat/react-rating */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactRating=t(require("react")):e.ReactRating=t(e.React)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/lib",t(0)}([function(e,t,n){"use strict";e.exports=n(9)},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function i(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){v&&d&&(v=!1,d.length?h=d.concat(h):y=-1,h.length&&u())}function u(){if(!v){var e=o(a);v=!0;for(var t=h.length;t;){for(d=h,h=[];++y<t;)d&&d[y].run();y=-1,t=h.length}d=null,v=!1,i(e)}}function c(e,t){this.fun=e,this.array=t}function s(){}var l,f,p=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(e){f=r}}();var d,h=[],v=!1,y=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new c(e,t)),1!==h.length||v||o(u)},c.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=s,p.addListener=s,p.once=s,p.off=s,p.removeListener=s,p.removeAllListeners=s,p.emit=s,p.prependListener=s,p.prependOnceListener=s,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){(function(t){"use strict";function n(e,t,n,o,i,a,u,c){if(r(t),!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,o,i,a,u,c],f=0;s=new Error(t.replace(/%s/g,function(){return l[f++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var r=function(e){};"production"!==t.env.NODE_ENV&&(r=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),e.exports=n}).call(t,n(1))},function(e,t){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=n},function(e,t,n){(function(t){"use strict";var r=n(2),o=r;if("production"!==t.env.NODE_ENV){var i=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,function(){return n[o++]});"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};o=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];i.apply(void 0,[t].concat(r))}}}e.exports=o}).call(t,n(1))},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},i=!0;e.exports=n(15)(o,i)}else e.exports=n(14)()}).call(t,n(1))},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(7),a=r(i),u=n(6),c=(r(u),function(e){return a.default.isValidElement(e)?e:"object"==typeof e&&null!==e?a.default.createElement("span",{style:e}):"[object String]"===Object.prototype.toString.call(e)?a.default.createElement("span",{className:e}):void 0}),s=function(e){var t,n=c(e.background),r=c(e.icon),i=(t={display:"inline-block",position:"absolute",overflow:"hidden",top:0},o(t,"rtl"===e.direction?"right":"left",0),o(t,"width",void 0!==e.percent?e.percent+"%":"auto"),t),u={cursor:e.onClick||e.onMouseOver?"pointer":"auto",display:"inline-block",position:"relative"};return a.default.createElement("span",{style:u,onClick:e.onClick,onMouseMove:e.onMouseMove,onTouchMove:e.onMouseMove,onTouchEnd:e.onClick},n,a.default.createElement("span",{style:i},r))};s.propTypes=!1,e.exports=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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)}var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;r=!1,null===o&&(o=Function.prototype);var u=Object.getOwnPropertyDescriptor(o,i);if(void 0!==u){if("value"in u)return u.value;var c=u.get;if(void 0===c)return;return c.call(a)}var s=Object.getPrototypeOf(o);if(null===s)return;e=s,t=i,n=a,r=!0,u=s=void 0}},l=n(7),f=r(l),p=n(6),d=(r(p),n(11)),h=r(d),v=n(8),y=r(v),b=function(e,t){var n=e.step,r=n>0?e.start:e.stop,o=n>0?e.stop:e.start;if(n&&r<=t&&t<=o)return(t-e.start)/n},g=function(e){function t(e){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e);var n=void 0!==e.initialRate?e.initialRate:e.placeholderRate;this.state={index:b(e,n),indexOver:void 0,direction:"ltr"},this.ratingContainer=null,this.handleClick=this.handleClick.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this)}return a(t,e),c(t,[{key:"componentDidMount",value:function(){this.setState({direction:window.getComputedStyle(this.ratingContainer,null).getPropertyValue("direction")})}},{key:"componentWillReceiveProps",value:function(e){var t=void 0!==e.initialRate?e.initialRate:e.placeholderRate;this.setState({index:b(e,t),selected:void 0!==e.initialRate})}},{key:"handleClick",value:function(e,t){if(!this.props.readonly){var n=e+this._fractionalIndex(t);this.props.onClick(this._indexToRate(n),t),this.state.index!==n&&(this.props.onChange(this._indexToRate(n)),this.setState({indexOver:void 0,index:n,selected:!0}))}}},{key:"handleMouseLeave",value:function(){this.props.readonly||(this.props.onRate(),this.setState({indexOver:void 0}))}},{key:"handleMouseMove",value:function(e,t){if(!this.props.readonly){var n=e+this._fractionalIndex(t);this.state.indexOver!==n&&(this.props.onRate(this._indexToRate(n)),this.setState({indexOver:n}))}}},{key:"_indexToRate",value:function(e){return this.props.start+Math.floor(e)*this.props.step+this.props.step*this._roundToFraction(e%1)}},{key:"_rateToIndex",value:function(e){return b(this.props,e)}},{key:"_roundToFraction",value:function(e){var t=Math.ceil(e%1*this.props.fractions)/this.props.fractions,n=Math.pow(10,this.props.scale),r=Math.floor(e)+Math.floor(t*n)/n;return r>this.props.stop?this.props.stop:r}},{key:"_fractionalIndex",value:function(e){var t=e.nativeEvent.type.indexOf("touch")>-1?e.nativeEvent.type.indexOf("touchend")>-1?e.changedTouches[0].clientX:e.touches[0].clientX:e.clientX,n="rtl"===this.state.direction?e.currentTarget.getBoundingClientRect().right-t:t-e.currentTarget.getBoundingClientRect().left;return this._roundToFraction(n/e.currentTarget.offsetWidth)}},{key:"render",value:function(){for(var e=this,t=this.props,n=(t.start,t.stop),r=(t.step,t.initialRate),i=t.placeholderRate,a=(t.empty,t.full,t.placeholder,t.readonly),c=t.quiet,s=(t.fractions,t.scale,t.onChange,t.onClick,t.onRate,o(t,["start","stop","step","initialRate","placeholderRate","empty","full","placeholder","readonly","quiet","fractions","scale","onChange","onClick","onRate"])),l=[],p=[].concat(this.props.empty),d=[].concat(this.props.placeholder),h=[].concat(this.props.full),v=c||void 0===this.state.indexOver?this.state.index:this.state.indexOver,b=Math.floor(v),g=this.state.selected||void 0!==r||void 0===i||!c&&void 0!==this.state.indexOver?h:d,m=0;m<Math.floor(this._rateToIndex(n));m++){var O=m-b===0?v%1*100:m-b<0?100:0,x=!a&&{onClick:this.handleClick.bind(this,m),onMouseMove:this.handleMouseMove.bind(this,m),onTouchMove:this.handleMouseMove.bind(this,m),onTouchEnd:this.handleClick.bind(this,m)};l.push(f.default.createElement(y.default,u({key:m,background:p[m%p.length],icon:g[m%g.length],percent:O},x,{direction:this.state.direction})))}return f.default.createElement("span",u({ref:function(t){e.ratingContainer=t},onMouseLeave:a?void 0:this.handleMouseLeave},s),l)}}]),t}(f.default.Component);g.defaultProps={start:0,stop:5,step:1,empty:h.default.empty,placeholder:h.default.placeholder,full:h.default.full,fractions:1,scale:3,onChange:function(e){},onClick:function(e){},onRate:function(e){}},g.propTypes=!1,e.exports=g},function(e,t){"use strict";e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}},function(e,t,n){"use strict";var r=n(10),o={display:"inline-block",borderRadius:"50%",border:"5px double white",width:30,height:30};e.exports={empty:r(o,{backgroundColor:"#ccc"}),full:r(o,{backgroundColor:"black"}),placeholder:r(o,{backgroundColor:"red"})}},function(e,t){/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,u,c=n(e),s=1;s<arguments.length;s++){r=Object(arguments[s]);for(var l in r)i.call(r,l)&&(c[l]=r[l]);if(o){u=o(r);for(var f=0;f<u.length;f++)a.call(r,u[f])&&(c[u[f]]=r[u[f]])}}return c}},function(e,t,n){(function(t){"use strict";function r(e,n,r,c,s){if("production"!==t.env.NODE_ENV)for(var l in e)if(e.hasOwnProperty(l)){var f;try{o("function"==typeof e[l],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",c||"React class",r,l,typeof e[l]),f=e[l](n,l,c,r,null,a)}catch(e){f=e}if(i(!f||f instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",c||"React class",r,l,typeof f),f instanceof Error&&!(f.message in u)){u[f.message]=!0;var p=s?s():"";i(!1,"Failed %s type: %s%s",r,f.message,null!=p?p:"")}}}if("production"!==t.env.NODE_ENV)var o=n(3),i=n(5),a=n(4),u={};e.exports=r}).call(t,n(1))},function(e,t,n){"use strict";var r=n(2),o=n(3),i=n(4);e.exports=function(){function e(e,t,n,r,a,u){u!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){(function(t){"use strict";var r=n(2),o=n(3),i=n(5),a=n(12),u=n(4),c=n(13);e.exports=function(e,n){function s(e){var t=e&&(P&&e[P]||e[C]);if("function"==typeof t)return t}function l(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function f(e){this.message=e,this.stack=""}function p(e){function r(r,s,l,p,d,h,v){if(p=p||N,h=h||l,v!==u)if(n)o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==t.env.NODE_ENV&&"undefined"!=typeof console){var y=p+":"+l;!a[y]&&c<3&&(i(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",h,p),a[y]=!0,c++)}return null==s[l]?r?new f(null===s[l]?"The "+d+" `"+h+"` is marked as required "+("in `"+p+"`, but its value is `null`."):"The "+d+" `"+h+"` is marked as required in "+("`"+p+"`, but its value is `undefined`.")):null:e(s,l,p,d,h)}if("production"!==t.env.NODE_ENV)var a={},c=0;var s=r.bind(null,!1);return s.isRequired=r.bind(null,!0),s}function d(e){function t(t,n,r,o,i,a){var u=t[n],c=j(u);if(c!==e){var s=R(u);return new f("Invalid "+o+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return p(t)}function h(){return p(r.thatReturnsNull)}function v(e){function t(t,n,r,o,i){if("function"!=typeof e)return new f("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a)){var c=j(a);return new f("Invalid "+o+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var s=0;s<a.length;s++){var l=e(a,s,r,o,i+"["+s+"]",u);if(l instanceof Error)return l}return null}return p(t)}function y(){function t(t,n,r,o,i){var a=t[n];if(!e(a)){var u=j(a);return new f("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return p(t)}function b(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||N,u=M(t[n]);return new f("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("instance of `"+a+"`."))}return null}return p(t)}function g(e){function n(t,n,r,o,i){for(var a=t[n],u=0;u<e.length;u++)if(l(a,e[u]))return null;var c=JSON.stringify(e);return new f("Invalid "+o+" `"+i+"` of value `"+a+"` "+("supplied to `"+r+"`, expected one of "+c+"."))}return Array.isArray(e)?p(n):("production"!==t.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOf, expected an instance of array."):void 0,r.thatReturnsNull)}function m(e){function t(t,n,r,o,i){if("function"!=typeof e)return new f("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],c=j(a);if("object"!==c)return new f("Invalid "+o+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an object."));for(var s in a)if(a.hasOwnProperty(s)){var l=e(a,s,r,o,i+"."+s,u);if(l instanceof Error)return l}return null}return p(t)}function O(e){function n(t,n,r,o,i){for(var a=0;a<e.length;a++){var c=e[a];if(null==c(t,n,r,o,i,u))return null}return new f("Invalid "+o+" `"+i+"` supplied to "+("`"+r+"`."))}if(!Array.isArray(e))return"production"!==t.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOfType, expected an instance of array."):void 0,r.thatReturnsNull;for(var o=0;o<e.length;o++){var a=e[o];if("function"!=typeof a)return i(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",_(a),o),r.thatReturnsNull}return p(n)}function x(){function e(e,t,n,r,o){return k(e[t])?null:new f("Invalid "+r+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return p(e)}function w(e){function t(t,n,r,o,i){var a=t[n],c=j(a);if("object"!==c)return new f("Invalid "+o+" `"+i+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));for(var s in e){var l=e[s];if(l){var p=l(a,s,r,o,i+"."+s,u);if(p)return p}}return null}return p(t)}function T(e){function t(t,n,r,o,i){var c=t[n],s=j(c);if("object"!==s)return new f("Invalid "+o+" `"+i+"` of type `"+s+"` "+("supplied to `"+r+"`, expected `object`."));var l=a({},t[n],e);for(var p in l){var d=e[p];if(!d)return new f("Invalid "+o+" `"+i+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var h=d(c,p,r,o,i+"."+p,u);if(h)return h}return null}return p(t)}function k(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(k);if(null===t||e(t))return!0;var n=s(t);if(!n)return!1;var r,o=n.call(t);if(n!==t.entries){for(;!(r=o.next()).done;)if(!k(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!k(i[1]))return!1}return!0;default:return!1}}function E(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function j(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":E(t,e)?"symbol":t}function R(e){if("undefined"==typeof e||null===e)return""+e;var t=j(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function _(e){var t=R(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function M(e){return e.constructor&&e.constructor.name?e.constructor.name:N}var P="function"==typeof Symbol&&Symbol.iterator,C="@@iterator",N="<<anonymous>>",S={array:d("array"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:h(),arrayOf:v,element:y(),instanceOf:b,node:x(),objectOf:m,oneOf:g,oneOfType:O,shape:w,exact:T};return f.prototype=Error.prototype,S.checkPropTypes=c,S.PropTypes=S,S}}).call(t,n(1))}])});
{
"name": "react-rating",
"version": "0.9.0",
"version": "0.9.1",
"description": "A rating react component with custom symbols",

@@ -61,2 +61,3 @@ "main": "lib/react-rating.js",

"react-dom": "^16.0.0",
"react-test-renderer": "^16.2.0",
"webpack": "^1.10.1",

@@ -63,0 +64,0 @@ "webpack-dev-server": "^1.10.1"

@@ -176,2 +176,8 @@ 'use strict';

const listeners = !readonly && {
onClick: this.handleClick.bind(this, i),
onMouseMove: this.handleMouseMove.bind(this, i),
onTouchMove: this.handleMouseMove.bind(this, i),
onTouchEnd: this.handleClick.bind(this, i)
};
symbolNodes.push(

@@ -183,6 +189,3 @@ <Symbol

percent={percent}
onClick={this.handleClick.bind(this, i)}
onMouseMove={this.handleMouseMove.bind(this, i)}
onTouchMove={this.handleMouseMove.bind(this, i)}
onTouchEnd={this.handleClick.bind(this, i)}
{...listeners}
direction={this.state.direction}

@@ -198,3 +201,3 @@ />

}}
onMouseLeave={this.handleMouseLeave}
onMouseLeave={!readonly ? this.handleMouseLeave : undefined}
{...other}

@@ -201,0 +204,0 @@ >

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc