o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1349296003.2414892t: @value{ I" length:EFi-I" digest; F"%a5c4be518ef337cd25bbdca43a90bf4bI" source; FI"-(function() { window.app = {}; this.app = window.app; this.app._routers = []; this.app.registerRouter = function(router) { return this._routers.push(router); }; Backbone.old_sync = Backbone.sync; }).call(this); var app_domain = 'iugu-ux.dev'; var enable_debug = true; var enable_ajax_on_subdomain = false; var api_base = 'http://iugu-ux.dev/'; var subdomain_xdr_url = ''; var app_root = '/'; (function() { }).call(this); (function() { this.JST || (this.JST = {}); this.JST["web-app/views/main-view"] = function(__obj) { if (!__obj) __obj = {}; var __out = [], __capture = function(callback) { var out = __out, result; __out = []; callback.call(this); result = __out.join(''); __out = out; return __safe(result); }, __sanitize = function(value) { if (value && value.ecoSafe) { return value; } else if (typeof value !== 'undefined' && value != null) { return __escape(value); } else { return ''; } }, __safe, __objSafe = __obj.safe, __escape = __obj.escape; __safe = __obj.safe = function(value) { if (value && value.ecoSafe) { return value; } else { if (!(typeof value !== 'undefined' && value != null)) value = ''; var result = new String(value); result.ecoSafe = true; return result; } }; if (!__escape) { __escape = __obj.escape = function(value) { return ('' + value) .replace(/&/g, '&') .replace(//g, '>') .replace(/"/g, '"'); }; } (function() { (function() { __out.push('
\n
\n
\n
\n
\n'); }).call(this); }).call(__obj); __obj.safe = __objSafe, __obj.escape = __escape; return __out.join(''); }; }).call(this); var AVAILABLE_LOCALES = Array(); AVAILABLE_LOCALES['pt-BR'] = { 'active_record': { 'errors': { 'invalid': 'é inválido' } }, 'quantity': { 'coupom': 'cupom', 'coupoms': 'cupons' } } AVAILABLE_LOCALES['en'] = { 'active_record': { 'errors': { 'invalid': 'is invalid' } }, 'quantity': { 'coupom': 'coupom', 'coupoms': 'coupoms' } } ; (function() { var _i18n; _i18n = (function() { function _i18n() {} _i18n.prototype.locale = "en"; _i18n.prototype.setDefaultLocale = function(_locale) { debug('Configuring Language: ' + _locale); return this.locale = _locale; }; _i18n.prototype.getText = function(_string, _locale) { var currentSegment, parts, _next, _translated_text; if (_locale == null) { _locale = ""; } if (_locale === "") { _locale = this.locale; } parts = _string.split('.'); _translated_text = null; if (!AVAILABLE_LOCALES[_locale]) { debug("ERROR.I18N.TRANSLATE_TABLE.LOCALE_NOT_EXISTS " + _locale); return "ERROR.I18N.TRANSLATE_TABLE.LOCALE_NOT_EXISTS"; } currentSegment = AVAILABLE_LOCALES[_locale]; while (parts.length) { _next = parts.shift(); if (!currentSegment[_next]) { debug("ERROR.I18N.TRANSLATE_TABLE.INVALID_SEGMENT " + _next); return "ERROR.I18N.TRANSLATE_TABLE.INVALID_SEGMENT"; } currentSegment = currentSegment[_next]; } if (typeof currentSegment !== "string") { debug("ERROR.I18N.TRANSLATE_TABLE.SEGMENT_NOT_TEXT"); return "ERROR.I18N.TRANSLATE_TABLE.SEGMENT_NOT_TEXT"; } return currentSegment; }; _i18n.prototype.pluralizeIf = function(_qty, _singular, _plural, _locale) { if (_locale == null) { _locale = ""; } if (_qty === 1) { return this.getText(_singular, _locale); } return this.getText(_plural, _locale); }; return _i18n; })(); this.i18n = new _i18n; this._t = _.bind(this.i18n.getText, this.i18n); this._p = _.bind(this.i18n.pluralizeIf, this.i18n); }).call(this); (function() { var _Sound; _Sound = (function() { _Sound.prototype.format = $.browser.webkit ? ".mp3" : ".wav"; _Sound.prototype.soundPath = "/assets/s/"; _Sound.prototype.sound = []; _Sound.prototype.environmentSound = null; _Sound.prototype.maxChannels = 8; function _Sound() { var i, _i; this.sound.size = 8; for (i = _i = 0; _i <= 7; i = ++_i) { this.sound[i] = null; } } _Sound.prototype.loadSoundChannel = function(name) { var snd; snd = new Audio(this.soundPath + name + this.format); snd.preload = false; snd.load(); return snd; }; _Sound.prototype.enableDesktopLoop = function(env) { if (typeof env.loop === 'boolean') { return env.loop = true; } else { return env.addEventListener('ended', function() { this.currentTime = 0; return this.play(); }, false); } }; _Sound.prototype.playDesktop = function(name, options) { var aChannel, i, _i; if (options == null) { options = {}; } if (options.environmentSound) { if (this.environmentSound) { this.environmentSound.stop(); } this.environmentSound = this.loadSoundChannel(name); if (options.environmentSound) { this.enableDesktopLoop(this.environmentSound); } this.environmentSound.play(); return; } aChannel = false; for (i = _i = 0; _i <= 8; i = ++_i) { if (this.sound[i] === null) { aChannel = i; break; } else if (this.sound[i] && (this.sound[i].currentTime === this.sound[i].duration || this.sound[i].currentTime === 0)) { aChannel = i; break; } } this.sound[aChannel] = this.loadSoundChannel(name); if (options.environmentSound) { this.enableDesktopLoop(this.sound[aChannel]); } return this.sound[aChannel].play(); }; _Sound.prototype.stopDesktop = function(channel) { if (this.sound[channel] && (this.sound[channel].currentTime === this.sound[channel].duration || this.sound[channel].currentTime === 0)) { return this.sound[channel].stop(); } }; _Sound.prototype.stopEnvironmentDesktop = function() { if (this.environmentSound) { return this.environmentSound.stop(); } }; _Sound.prototype.play = function(name, options) { if (options == null) { options = {}; } if (!IS_MOBILE) { return this.playDesktop(name, options); } }; _Sound.prototype.stop = function(channel) { if (!IS_MOBILE) { return this.stopDesktop(channel); } }; _Sound.prototype.stopEnvironment = function() { if (!IS_MOBILE) { return this.stopEnvironmentDesktop(); } }; return _Sound; })(); window.Sound = new _Sound(); }).call(this); (function() { this.detectLanguage = function() { var language; language = window.navigator.userLanguage || window.navigator.language; return language = language.toLowerCase().replace('-', '').replace('_', ''); }; this.getMousePos = function(event) { var cur_x, cur_y, touch; if (TOUCH_SUPPORT) { touch = event.originalEvent.touches[0] || event.originalEvent.changedTouches[0]; cur_x = touch.pageX; cur_y = touch.pageY; } else { cur_x = event.clientX; cur_y = event.clientY; } return { x: cur_x, y: cur_y }; }; this.distanceFrom = function(x, y, x0, y0) { return Math.sqrt((x -= x0) * x + (y -= y0) * y); }; this.buildParameters = function(_additional_parameters) { if (_additional_parameters == null) { _additional_parameters = {}; } return _.extend(_additional_parameters, { _t: _t, i18n: i18n, _p: _p }); }; this.debug = function(text) { if (!enable_debug) { return; } return console.log(text); }; String.prototype.capitalize = function() { return this.replace(/(^|\s)([a-z])/g, function(m, p1, p2) { return p1 + p2.toUpperCase(); }); }; this._callback_xdr = function() { app.ajax = app._xdr_frame.contentWindow.jQuery.ajax; return app._features['xdr'] = true; }; this._features_check = function() { debug('Waiting featured to be loaded...'); if (_.indexOf(_.values(this.app._features), false) !== -1) { return; } if (this.app._features_checker_interval) { clearInterval(this.app._features_checker_interval); } this.app._features_checker_interval = null; debug('All featured loaded'); _.each(this.app._routers, function(index) { return new index; }); if (this.app.initialize_backbone_history && Backbone.history) { debug('BackBone History Detected'); return Backbone.history.start({ pushState: true, root: this.app.root }); } }; this.run_webapp = function(run_routes) { if (run_routes == null) { run_routes = false; } debug('Running Application'); if (app_domain) { this.app.APP_DOMAIN = app_domain; document.domain = this.app.APP_DOMAIN; } if (this.app.API_IFRAME) { debug('Requested API calls inside