{"version":3,"sources":["webpack:///./app/javascript/public/raty.js"],"names":["$","methods","init","options","this","each","self","destroy","call","opt","extend","fn","raty","defaults","data","_adjustCallback","_adjustNumber","_adjustHints","score","_adjustedScore","starType","_adjustStarType","_adjustPath","_createStars","cancel","_createCancel","precision","_adjustPrecision","_createScore","_apply","_setTitle","_target","readOnly","_lock","style","cursor","_binds","i","length","_between","number","hints","halfShow","half","steps","group","Object","prototype","toString","j","hint","last","undefined","numberMax","path","charAt","replaces","replace","_fill","val","_roundStars","value","min","max","Math","parseFloat","_bindOverCancel","_bindClickCancel","_bindOutCancel","_bindOver","_bindClick","_bindOut","that","stars","on","evt","execute","alt","click","_roundHalfScore","removeAttr","_resetTitle","mouseout","icon","cancelOff","cancelClass","_setIcon","action","_getScoreByPosition","mouseover","starOff","cancelOn","attr","_buildScoreField","name","scoreName","type","appendTo","title","cancelHint","src","addClass","cancelPlace","prepend","append","targetScore","_nameForIndex","attrs","_getHint","space","children","_error","message","text","error","hash","star","turnOn","_turnOn","iconRange","irange","_getRangeIcon","range","_getFirstDecimal","decimal","split","result","parseInt","slice","starOn","off","getAttribute","size","_getWidth","pageX","offset","left","noRatedMsg","integer","ceil","set","move","width","eq","css","prop","hide","toFixed","round","down","up","full","_setTarget","target","targetFormat","is","html","targetText","targetType","mousemove","targetKeep","single","_unlock","removeAttribute","Event","raw","empty","removeData","clone","getScore","push","percent","trigger","readonly","reload","arguments","setScore","apply","method","Array","starHalf","jQuery","document"],"mappings":";gFAAA,eAWA,SAAUA,GACN,aAEA,IAAIC,EAAU,CACZC,KAAM,SAASC,GACb,OAAOC,KAAKC,MAAK,WACfD,KAAKE,KAAON,EAAEI,MAEdH,EAAQM,QAAQC,KAAKJ,KAAKE,MAE1BF,KAAKK,IAAMT,EAAEU,QAAO,EAAM,CAAC,EAAGV,EAAEW,GAAGC,KAAKC,SAAUV,EAASC,KAAKE,KAAKQ,QAErEb,EAAQc,gBAAgBP,KAAKJ,MAC7BH,EAAQe,cAAcR,KAA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KuB,GAELrL,EAAEsL,UAAU5G,GAAG,mBAAmB,WAChC1E,EAAE,gBAAgBY,KAAK,CACrB0C,KAAM,WACNX,MAAM,EACNoD,UAAW,mBAEb/F,EAAE,kBAAkBY,KAAK,CACrBoB,UAAU,EACVd,MAAO,WACH,OAAOlB,EAAEI,MAAMwF,KAAK,aACxB,EACAtC,KAAM,YAEZ,G","file":"js/118-82108df4e1a4b663b291.chunk.js","sourcesContent":["/*!\n * jQuery Raty - A Star Rating Plugin\n *\n * The MIT License\n *\n * author: Washington Botelho\n * github: wbotelhos/raty\n * version: 2.9.0\n *\n */\n\n(function($) {\n 'use strict';\n \n var methods = {\n init: function(options) {\n return this.each(function() {\n this.self = $(this);\n \n methods.destroy.call(this.self);\n \n this.opt = $.extend(true, {}, $.fn.raty.defaults, options, this.self.data());\n \n methods._adjustCallback.call(this);\n methods._adjustNumber.call(this);\n methods._adjustHints.call(this);\n \n this.opt.score = methods._adjustedScore.call(this, this.opt.score);\n \n if (this.opt.starType !== 'img') {\n methods._adjustStarType.call(this);\n }\n \n methods._adjustPath.call(this);\n methods._createStars.call(this);\n \n if (this.opt.cancel) {\n methods._createCancel.call(this);\n }\n \n if (this.opt.precision) {\n methods._adjustPrecision.call(this);\n }\n \n methods._createScore.call(this);\n methods._apply.call(this, this.opt.score);\n methods._setTitle.call(this, this.opt.score);\n methods._target.call(this, this.opt.score);\n \n if (this.opt.readOnly) {\n methods._lock.call(this);\n } else {\n this.style.cursor = 'pointer';\n \n methods._binds.call(this);\n }\n });\n },\n \n _adjustCallback: function() {\n var options = ['number', 'readOnly', 'score', 'scoreName', 'target', 'path'];\n \n for (var i = 0; i < options.length; i++) {\n if (typeof this.opt[options[i]] === 'function') {\n this.opt[options[i]] = this.opt[options[i]].call(this);\n }\n }\n },\n \n _adjustedScore: function(score) {\n if (!score) {\n return score;\n }\n \n return methods._between(score, 0, this.opt.number);\n },\n \n _adjustHints: function() {\n if (!this.opt.hints) {\n this.opt.hints = [];\n }\n \n if (!this.opt.halfShow && !this.opt.half) {\n return;\n }\n \n var steps = this.opt.precision ? 10 : 2;\n \n for (var i = 0; i < this.opt.number; i++) {\n var group = this.opt.hints[i];\n \n if (Object.prototype.toString.call(group) !== '[object Array]') {\n group = [group];\n }\n \n this.opt.hints[i] = [];\n \n for (var j = 0; j < steps; j++) {\n var\n hint = group[j],\n last = group[group.length - 1];\n \n if (last === undefined) {\n last = null;\n }\n \n this.opt.hints[i][j] = hint === undefined ? last : hint;\n }\n }\n },\n \n _adjustNumber: function() {\n this.opt.number = methods._between(this.opt.number, 1, this.opt.numberMax);\n },\n \n _adjustPath: function() {\n this.opt.path = this.opt.path || '';\n \n if (this.opt.path && this.opt.path.charAt(this.opt.path.length - 1) !== '/') {\n this.opt.path += '/';\n }\n },\n \n _adjustPrecision: function() {\n this.opt.half = true;\n },\n \n _adjustStarType: function() {\n var replaces = ['cancelOff', 'cancelOn', 'starHalf', 'starOff', 'starOn'];\n \n this.opt.path = '';\n \n for (var i = 0; i < replaces.length; i++) {\n this.opt[replaces[i]] = this.opt[replaces[i]].replace('.', '-');\n }\n },\n \n _apply: function(score) {\n methods._fill.call(this, score);\n \n if (score) {\n if (score > 0) {\n this.score.val(score);\n }\n \n methods._roundStars.call(this, score);\n }\n },\n \n _between: function(value, min, max) {\n return Math.min(Math.max(parseFloat(value), min), max);\n },\n \n _binds: function() {\n if (this.cancel) {\n methods._bindOverCancel.call(this);\n methods._bindClickCancel.call(this);\n methods._bindOutCancel.call(this);\n }\n \n methods._bindOver.call(this);\n methods._bindClick.call(this);\n methods._bindOut.call(this);\n },\n \n _bindClick: function() {\n var that = this;\n \n that.stars.on('click.raty', function(evt) {\n var\n execute = true,\n score = (that.opt.half || that.opt.precision) ? that.self.data('score') : (this.alt || $(this).data('alt'));\n \n if (that.opt.click) {\n execute = that.opt.click.call(that, +score, evt);\n }\n \n if (execute || execute === undefined) {\n if (that.opt.half && !that.opt.precision) {\n score = methods._roundHalfScore.call(that, score);\n }\n \n methods._apply.call(that, score);\n }\n });\n },\n \n _bindClickCancel: function() {\n var that = this;\n \n that.cancel.on('click.raty', function(evt) {\n that.score.removeAttr('value');\n \n if (that.opt.click) {\n that.opt.click.call(that, null, evt);\n }\n });\n },\n \n _bindOut: function() {\n var that = this;\n \n that.self.on('mouseleave.raty', function(evt) {\n var score = +that.score.val() || undefined;\n \n methods._apply.call(that, score);\n methods._target.call(that, score, evt);\n methods._resetTitle.call(that);\n \n if (that.opt.mouseout) {\n that.opt.mouseout.call(that, score, evt);\n }\n });\n },\n \n _bindOutCancel: function() {\n var that = this;\n \n that.cancel.on('mouseleave.raty', function(evt) {\n var icon = that.opt.cancelOff;\n \n if (that.opt.starType !== 'img') {\n icon = that.opt.cancelClass + ' ' + icon;\n }\n \n methods._setIcon.call(that, this, icon);\n \n if (that.opt.mouseout) {\n var score = +that.score.val() || undefined;\n \n that.opt.mouseout.call(that, score, evt);\n }\n });\n },\n \n _bindOver: function() {\n var\n that = this,\n action = that.opt.half ? 'mousemove.raty' : 'mouseover.raty';\n \n that.stars.on(action, function(evt) {\n var score = methods._getScoreByPosition.call(that, evt, this);\n \n methods._fill.call(that, score);\n \n if (that.opt.half) {\n methods._roundStars.call(that, score, evt);\n methods._setTitle.call(that, score, evt);\n \n that.self.data('score', score);\n }\n \n methods._target.call(that, score, evt);\n \n if (that.opt.mouseover) {\n that.opt.mouseover.call(that, score, evt);\n }\n });\n },\n \n _bindOverCancel: function() {\n var that = this;\n \n that.cancel.on('mouseover.raty', function(evt) {\n var\n starOff = that.opt.path + that.opt.starOff,\n icon = that.opt.cancelOn;\n \n if (that.opt.starType === 'img') {\n that.stars.attr('src', starOff);\n } else {\n icon = that.opt.cancelClass + ' ' + icon;\n \n that.stars.attr('class', starOff);\n }\n \n methods._setIcon.call(that, this, icon);\n methods._target.call(that, null, evt);\n \n if (that.opt.mouseover) {\n that.opt.mouseover.call(that, null);\n }\n });\n },\n \n _buildScoreField: function() {\n return $('', { name: this.opt.scoreName, type: 'hidden' }).appendTo(this);\n },\n \n _createCancel: function() {\n var\n icon = this.opt.path + this.opt.cancelOff,\n cancel = $('<' + this.opt.starType + ' />', { title: this.opt.cancelHint, 'class': this.opt.cancelClass });\n \n if (this.opt.starType === 'img') {\n cancel.attr({ src: icon, alt: 'x' });\n } else {\n // TODO: use $.data\n cancel.attr('data-alt', 'x').addClass(icon);\n }\n \n if (this.opt.cancelPlace === 'left') {\n this.self.prepend(' ').prepend(cancel);\n } else {\n this.self.append(' ').append(cancel);\n }\n \n this.cancel = cancel;\n },\n \n _createScore: function() {\n var score = $(this.opt.targetScore);\n \n this.score = score.length ? score : methods._buildScoreField.call(this);\n },\n \n _createStars: function() {\n for (var i = 1; i <= this.opt.number; i++) {\n var\n name = methods._nameForIndex.call(this, i),\n attrs = { alt: i, src: this.opt.path + this.opt[name] };\n \n if (this.opt.starType !== 'img') {\n attrs = { 'data-alt': i, 'class': attrs.src }; // TODO: use $.data.\n }\n \n attrs.title = methods._getHint.call(this, i);\n \n $('<' + this.opt.starType + ' />', attrs).appendTo(this);\n \n if (this.opt.space) {\n this.self.append(i < this.opt.number ? ' ' : '');\n }\n }\n \n this.stars = this.self.children(this.opt.starType);\n },\n \n _error: function(message) {\n $(this).text(message);\n \n $.error(message);\n },\n \n _fill: function(score) {\n var hash = 0;\n \n for (var i = 1; i <= this.stars.length; i++) {\n var\n icon,\n star = this.stars[i - 1],\n turnOn = methods._turnOn.call(this, i, score);\n \n if (this.opt.iconRange && this.opt.iconRange.length > hash) {\n var irange = this.opt.iconRange[hash];\n \n icon = methods._getRangeIcon.call(this, irange, turnOn);\n \n if (i <= irange.range) {\n methods._setIcon.call(this, star, icon);\n }\n \n if (i === irange.range) {\n hash++;\n }\n } else {\n icon = this.opt[turnOn ? 'starOn' : 'starOff'];\n \n methods._setIcon.call(this, star, icon);\n }\n }\n },\n \n _getFirstDecimal: function(number) {\n var\n decimal = number.toString().split('.')[1],\n result = 0;\n \n if (decimal) {\n result = parseInt(decimal.charAt(0), 10);\n \n if (decimal.slice(1, 5) === '9999') {\n result++;\n }\n }\n \n return result;\n },\n \n _getRangeIcon: function(irange, turnOn) {\n return turnOn ? irange.on || this.opt.starOn : irange.off || this.opt.starOff;\n },\n \n _getScoreByPosition: function(evt, icon) {\n var score = parseInt(icon.alt || icon.getAttribute('data-alt'), 10);\n \n if (this.opt.half) {\n var\n size = methods._getWidth.call(this),\n percent = parseFloat((evt.pageX - $(icon).offset().left) / size);\n \n score = score - 1 + percent;\n }\n \n return score;\n },\n \n _getHint: function(score, evt) {\n if (score !== 0 && !score) {\n return this.opt.noRatedMsg;\n }\n \n var\n decimal = methods._getFirstDecimal.call(this, score),\n integer = Math.ceil(score),\n group = this.opt.hints[(integer || 1) - 1],\n hint = group,\n set = !evt || this.move;\n \n if (this.opt.precision) {\n if (set) {\n decimal = decimal === 0 ? 9 : decimal - 1;\n }\n \n hint = group[decimal];\n } else if (this.opt.halfShow || this.opt.half) {\n decimal = set && decimal === 0 ? 1 : decimal > 5 ? 1 : 0;\n \n hint = group[decimal];\n }\n \n return hint === '' ? '' : hint || score;\n },\n \n _getWidth: function() {\n var width = this.stars[0].width || parseFloat(this.stars.eq(0).css('font-size'));\n \n if (!width) {\n methods._error.call(this, 'Could not get the icon width!');\n }\n \n return width;\n },\n \n _lock: function() {\n var hint = methods._getHint.call(this, this.score.val());\n \n this.style.cursor = '';\n this.title = hint;\n \n this.score.prop('readonly', true);\n this.stars.prop('title', hint);\n \n if (this.cancel) {\n this.cancel.hide();\n }\n \n this.self.data('readonly', true);\n },\n \n _nameForIndex: function(i) {\n return this.opt.score && this.opt.score >= i ? 'starOn' : 'starOff';\n },\n \n _resetTitle: function() {\n for (var i = 0; i < this.opt.number; i++) {\n this.stars[i].title = methods._getHint.call(this, i + 1);\n }\n },\n \n _roundHalfScore: function(score) {\n var\n integer = parseInt(score, 10),\n decimal = methods._getFirstDecimal.call(this, score);\n \n if (decimal !== 0) {\n decimal = decimal > 5 ? 1 : 0.5;\n }\n \n return integer + decimal;\n },\n \n _roundStars: function(score, evt) {\n var\n decimal = (score % 1).toFixed(2),\n name ;\n \n if (evt || this.move) {\n name = decimal > 0.5 ? 'starOn' : 'starHalf';\n } else if (decimal > this.opt.round.down) { // Up: [x.76 .. x.99]\n name = 'starOn';\n \n if (this.opt.halfShow && decimal < this.opt.round.up) { // Half: [x.26 .. x.75]\n name = 'starHalf';\n } else if (decimal < this.opt.round.full) { // Down: [x.00 .. x.5]\n name = 'starOff';\n }\n }\n \n if (name) {\n var\n icon = this.opt[name],\n star = this.stars[Math.ceil(score) - 1];\n \n methods._setIcon.call(this, star, icon);\n } // Full down: [x.00 .. x.25]\n },\n \n _setIcon: function(star, icon) {\n star[this.opt.starType === 'img' ? 'src' : 'className'] = this.opt.path + icon;\n },\n \n _setTarget: function(target, score) {\n if (score) {\n score = this.opt.targetFormat.toString().replace('{score}', score);\n }\n \n if (target.is(':input')) {\n target.val(score);\n } else {\n target.html(score);\n }\n },\n \n _setTitle: function(score, evt) {\n if (score) {\n var\n integer = parseInt(Math.ceil(score), 10),\n star = this.stars[integer - 1];\n \n star.title = methods._getHint.call(this, score, evt);\n }\n },\n \n _target: function(score, evt) {\n if (this.opt.target) {\n var target = $(this.opt.target);\n \n if (!target.length) {\n methods._error.call(this, 'Target selector invalid or missing!');\n }\n \n var mouseover = evt && evt.type === 'mouseover';\n \n if (score === undefined) {\n score = this.opt.targetText;\n } else if (score === null) {\n score = mouseover ? this.opt.cancelHint : this.opt.targetText;\n } else {\n if (this.opt.targetType === 'hint') {\n score = methods._getHint.call(this, score, evt);\n } else if (this.opt.precision) {\n score = parseFloat(score).toFixed(1);\n }\n \n var mousemove = evt && evt.type === 'mousemove';\n \n if (!mouseover && !mousemove && !this.opt.targetKeep) {\n score = this.opt.targetText;\n }\n }\n \n methods._setTarget.call(this, target, score);\n }\n },\n \n _turnOn: function(i, score) {\n return this.opt.single ? (i === score) : (i <= score);\n },\n \n _unlock: function() {\n this.style.cursor = 'pointer';\n this.removeAttribute('title');\n \n this.score.removeAttr('readonly');\n \n this.self.data('readonly', false);\n \n for (var i = 0; i < this.opt.number; i++) {\n this.stars[i].title = methods._getHint.call(this, i + 1);\n }\n \n if (this.cancel) {\n this.cancel.css('display', '');\n }\n },\n \n cancel: function(click) {\n return this.each(function() {\n var self = $(this);\n \n if (self.data('readonly') !== true) {\n methods[click ? 'click' : 'score'].call(self, null);\n \n this.score.removeAttr('value');\n }\n });\n },\n \n click: function(score) {\n return this.each(function() {\n if ($(this).data('readonly') !== true) {\n score = methods._adjustedScore.call(this, score);\n \n methods._apply.call(this, score);\n \n if (this.opt.click) {\n this.opt.click.call(this, score, $.Event('click'));\n }\n \n methods._target.call(this, score);\n }\n });\n },\n \n destroy: function() {\n return this.each(function() {\n var\n self = $(this),\n raw = self.data('raw');\n \n if (raw) {\n self.off('.raty').empty().css({ cursor: raw.style.cursor }).removeData('readonly');\n } else {\n self.data('raw', self.clone()[0]);\n }\n });\n },\n \n getScore: function() {\n var\n score = [],\n value ;\n \n this.each(function() {\n value = this.score.val();\n \n score.push(value ? +value : undefined);\n });\n \n return (score.length > 1) ? score : score[0];\n },\n \n move: function(score) {\n return this.each(function() {\n var\n integer = parseInt(score, 10),\n decimal = methods._getFirstDecimal.call(this, score);\n \n if (integer >= this.opt.number) {\n integer = this.opt.number - 1;\n decimal = 10;\n }\n \n var\n width = methods._getWidth.call(this),\n steps = width / 10,\n star = $(this.stars[integer]),\n percent = star.offset().left + steps * decimal,\n evt = $.Event('mousemove', { pageX: percent });\n \n this.move = true;\n \n star.trigger(evt);\n \n this.move = false;\n });\n },\n \n readOnly: function(readonly) {\n return this.each(function() {\n var self = $(this);\n \n if (self.data('readonly') !== readonly) {\n if (readonly) {\n self.off('.raty').children(this.opt.starType).off('.raty');\n \n methods._lock.call(this);\n } else {\n methods._binds.call(this);\n methods._unlock.call(this);\n }\n \n self.data('readonly', readonly);\n }\n });\n },\n \n reload: function() {\n return methods.set.call(this, {});\n },\n \n score: function() {\n var self = $(this);\n \n return arguments.length ? methods.setScore.apply(self, arguments) : methods.getScore.call(self);\n },\n \n set: function(options) {\n return this.each(function() {\n $(this).raty($.extend({}, this.opt, options));\n });\n },\n \n setScore: function(score) {\n return this.each(function() {\n if ($(this).data('readonly') !== true) {\n score = methods._adjustedScore.call(this, score);\n \n methods._apply.call(this, score);\n methods._target.call(this, score);\n }\n });\n }\n };\n \n $.fn.raty = function(method) {\n if (methods[method]) {\n return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));\n } else if (typeof method === 'object' || !method) {\n return methods.init.apply(this, arguments);\n } else {\n $.error('Method ' + method + ' does not exist!');\n }\n };\n \n $.fn.raty.defaults = {\n cancel: false,\n cancelClass: 'raty-cancel',\n cancelHint: 'Cancel this rating!',\n cancelOff: 'cancel-off.png',\n cancelOn: 'cancel-on.png',\n cancelPlace: 'left',\n click: undefined,\n half: false,\n halfShow: true,\n hints: ['bad', 'poor', 'regular', 'good', 'gorgeous'],\n iconRange: undefined,\n mouseout: undefined,\n mouseover: undefined,\n noRatedMsg: 'Not rated yet!',\n number: 5,\n numberMax: 20,\n path: undefined,\n precision: false,\n readOnly: false,\n round: { down: 0.25, full: 0.6, up: 0.76 },\n score: undefined,\n scoreName: 'score',\n single: false,\n space: true,\n starHalf: 'star-half.png',\n starOff: 'star-off.png',\n starOn: 'star-on.png',\n starType: 'img',\n target: undefined,\n targetFormat: '{score}',\n targetKeep: false,\n targetScore: undefined,\n targetText: '',\n targetType: 'hint'\n };\n })(jQuery);\n\n$(document).on('turbolinks:load', function() { \n $('#rating-form').raty({\n path: '/assets/',\n half: true,\n scoreName: 'review[rating]',\n });\n $('.review-rating').raty({\n readOnly: true,\n score: function() {\n return $(this).attr('data-score');\n },\n path: '/assets/'\n });\n});\n"],"sourceRoot":""}