var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(f>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");var t="";for(var n=0;n127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t},_utf8_decode:function(e){var t="";var n=0;var r=c1=c2=0;while(n191&&r<224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&31)<<6|c2&63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63);n+=3}}return t}} var SERVER_CONF = $.parseJSON(Base64.decode('bnVsbA==')); String.prototype.format = function() { var formatted = this; for (var i = 0; i < arguments.length; i++) { var regexp = new RegExp('\\{'+i+'\\}', 'gi'); formatted = formatted.replace(regexp, arguments[i]); } return formatted; }; //outterHTML (function($) { $.fn.scrollTo = function(elem, speed) { $(this).animate({ scrollTop: $(this).scrollTop() - $(this).offset().top + $(elem).offset().top }, speed == undefined ? 1000 : speed); return this; }; $.fn.outerHTML = function() { return $(this).clone().wrap('
').parent().html(); }; })(jQuery); var CHUNK_TYPE = {}; CHUNK_TYPE.AIRPORT_CITY = 1; CHUNK_TYPE.CITY_AIRPORT = 2; CHUNK_TYPE.AIRPORT_PROVINCE = 3; CHUNK_TYPE.CITY_PROVINCE = 4; CHUNK_TYPE.IN_CITY = 5; CHUNK_TYPE.TOURISM = 6; CHUNK_TYPE.EVENTS = 7; var SERVICE_TYPE = {}; SERVICE_TYPE.TAXI_NORMAL = 1; SERVICE_TYPE.TAXI_FAMOUS = 2; SERVICE_TYPE.TAXI_RENTAL = 3; SERVICE_TYPE.BUS_NORMAL = 4; SERVICE_TYPE.BUS_FAMOUS = 5; SERVICE_TYPE.BUS_RENTAL = 6; SERVICE_TYPE.TRAIN_NORMAL = 7; SERVICE_TYPE.TRAIN_FAMOUS = 8; SERVICE_TYPE.TRAIN_RENTAL = 9; var DIMENSION_CONF = {}; DIMENSION_CONF.ONEWAY = 1; DIMENSION_CONF.TWOWAY = 2; DIMENSION_CONF.ROUNDTRIP = 3; var RIDE_METHOD = {}; RIDE_METHOD.DI_CHUNG = 2; RIDE_METHOD.DI_RIENG = 1; var VEHICLE_SERVICE = {}; VEHICLE_SERVICE[1] = 'Phổ Thông'; VEHICLE_SERVICE[2] = 'Hạng Sang'; VEHICLE_SERVICE[3] = 'Xe Nhỏ'; var select2Opts = { theme: "classic", allowClear: true, minimumResultsForSearch: 1, language: 'vi', } $(document).on('mousedown', '.select2', function() { if($(window).width() <= 600) { Utils.scrollTo($(this)); } }); /** * Combined, minified redistributable GNU ease.js file. * * Copyright (C) 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. * @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later */ 'use strict';var easejs={}; (function(B,n){var j={},h=function(b){var b=("/"===b.substr(0,1)?b:n+"/"+b).replace(/([^\/]+\/\.\.\/|\.\/|^\/)/g,""),c=j[b];if(void 0===c)throw"[ease.js] Undefined module: "+b;return c.exports};(function(b){function c(){if(!(this instanceof c))return new c;this.___$$id$$=e+f(1E8*a())}b.exports={};n="util/symbol";var a=Math.random,f=Math.floor,e=" "+String.fromCharCode(f(10*a())%31+1)+"$";c.prototype={toString:function(){return this.___$$id$$}};b.exports=c})(j["util/symbol/FallbackSymbol"]={},"."); (function(b){function c(){if(!(this instanceof c))return new c;this._alt={}}b.exports={};n="util";(0,eval)("var _the_global=this");c.expose=function(){return _the_global};c.prototype={provideAlt:function(a,c){if(!(void 0!==_the_global[a]||void 0!==this._alt[a]))return this._alt[a]=c(),this},get:function(a){return void 0!==this._alt[a]?this._alt[a]:_the_global[a]}};b.exports=c})(j["util/Global"]={},".");(function(b){b.exports={};n="util";var c=h("./symbol/FallbackSymbol"),a=h("./Global").expose(); b.exports=a.Symbol||c})(j["util/Symbol"]={},".");(function(b){b=b.exports={};n=".";var c={"public":1,"protected":2,"private":4,"static":8,"abstract":16,"const":32,virtual:64,override:128,proxy:256,weak:512},a={amods:c["public"]|c["protected"]|c["private"],virtual:c["abstract"]|c.virtual};b.kvals=c;b.kmasks=a;b.parseKeywords=function(b){var e=b,d=[],g=0,i={};if(1!==(d=(""+b).split(/\s+/)).length){e=d.pop();for(b=d.length;b--;){var C=d[b],r=c[C];if(!r)throw Error("Unexpected keyword for '"+e+"': "+ C);i[C]=!0;g|=r}}e.match(/^_[^_]/)&&!(g&a.amods)&&(i["private"]=!0,g|=c["private"]);return{name:e,keywords:i,bitwords:g}}})(j.prop_parser={},".");(function(b){function c(a){throw a;}function a(a,c,b){for(var e=b.length;e--;)null===b[e].match(/^[a-z_][a-z0-9_]*$/i)&&a(SyntaxError("Member "+c+" contains invalid parameter '"+b[e]+"'"))}function f(){return g?function(a,c,b){Object.defineProperty(a,c,{value:b,enumerable:!1,writable:!1,configurable:!1})}:function(a,c,b){a[c]=b}}var e=b.exports={};n="."; var d=h("./prop_parser").parseKeywords,g;a:{if("function"===typeof Object.defineProperty)try{Object.defineProperty({},"x",{});g=!0;break a}catch(i){}g=!1}e.Global=h("./util/Global");e.freeze="function"===typeof Object.freeze?Object.freeze:function(){};e.definePropertyFallback=function(a){if(void 0===a)return!g;g=!a;e.defineSecureProp=f();return e};e.defineSecureProp=f();e.clone=function r(a,c){c=!!c;if(a instanceof Array){if(!c)return a.slice(0);for(var b=[],e=0,d=a.length;e"}:function(){return"#"})}}var e=null,d=this;b.toString=a?function(){return a}:function(){return"(Class)"};return b};m.prototype.createAbstractCtor=function(a){var c=this,b=function(){if(!c._extending)throw Error("Abstract class "+(a||"(anonymous)")+" cannot be instantiated");};b.toString=a?function(){return a}: function(){return"(AbstractClass)"};return b};m.prototype._attachPropInit=function(a,c,b,e,d){var k=this;l.defineSecureProp(a,"__initProps",function(e){var e=!!e,f=a.___$$parent$$,t=this[u].vis,f=f&&f.__initProps;"function"===typeof f&&f.call(this,!0);f=k._visFactory.createPropProxy(this,t,c["public"]);t=t[d]=k._visFactory.setup(f,c,b);e||l.defineSecureProp(t,"__inst",this)})};m.prototype.initStaticVisibilityObj=function(a){var c=this,b=function(){};b.prototype=a;b=new b;a.___$$svis$$=b;b.$=function(){c._spropInternal= !0;var b=a.$.apply(a,arguments);c._spropInternal=!1;return b}};m.prototype.attachStatic=function(a,c,b,e){var d=c.methods,k=c.props,f=this;(c=b.___$$sinit$$)&&c(a,!0);if(!e)a.___$$sprops$$=k,l.defineSecureProp(a,"$",function(c,e){var d=!1,t=this.___$$sprops$$?this:a,u=t!==a,d=s.call(k["public"],c)&&"public";!d&&f._spropInternal&&(d=s.call(k["protected"],c)&&"protected"||!u&&s.call(k["private"],c)&&"private");if(!1===d)return(b.__cid&&b.$||m.ClassBase.$).apply(t,arguments);d=k[d][c];if(1]"}:function(){return"[object Interface]"}}function i(a){p.defineSecureProp(a,"isCompatible",function(b){return 0===j(a,b).length})}function j(a,b){var c=[];p.propParse(a.prototype,{method:function(a,d){"function"!==typeof b[a]?c.push([a,"missing"]):b[a].length', pr.attr('data-partner-name')); $.get('/home/partner_rating?id='+pid+'&vehicle_id='+$(self).parent().find('.vehicle_id').val()+'&lang=', function(data) { $("#popup_message").html(data); $("#popup_message .tabs" ).tabs({active: index}); $('#popup_message .icons img').click(function() { $('#popup_message .view img').attr('src', $(this).attr('data-large-src')); }); }); }, 'public static scrollTo': function(element) { if(element.size() > 0) { $('html, body').animate({scrollTop: element.eq(0).offset().top-15}, 500); } }, 'public static exception': function(msg) { throw new Error(msg); }, 'public static alert': function(msg, title, callback) { jAlert(msg, title?title:'Thông báo', callback); ga('send', 'event', { eventCategory: 'So lan user hien thi loi tren taxiairport.vn', eventAction: msg, eventLabel: msg, eventValue: 1}); }, 'public static ajaxPost': function(url, data, callback, dataType) { //neu ko pass thi dataType la: html if(!dataType) { dataType = 'json'; } $.ajax({ type: "POST", url: url, dataType: dataType, data: {data: data}, success: function(res) { if(callback) { callback(res); } }}); }, 'public static ajaxPost1': function(url, data, callback, dataType) { //neu ko pass thi dataType la: html if(!dataType) { dataType = 'json'; } $.ajax({ type: "POST", url: url, dataType: dataType, data: data, success: function(res) { if(callback) { callback(res); } }}); }, 'public static ajaxGet': function(url, data, callback, dataType) { //neu ko pass thi dataType la: html if(!dataType) { dataType = 'json'; } $.ajax({ type: "GET", url: url, dataType: dataType, data: {data: data}, success: function(res) { if(callback) { callback(res); } }}); }, 'private static ajaxGeoLocation': null, 'public static geoLocation': function(q, callback, prepare) { if(prepare) { prepare(); } if (Utils.ajaxGeoLocation) { Utils.ajaxGeoLocation.abort(); } var url = 'https://portal.dichung.vn/api/map/v1/geocode?address=%s'; url = url.replace('%s', q); Utils.ajaxGeoLocation = $.ajax({ type: "GET", url: url, dataType: 'json', success: function(res) { if(callback) { callback(res); } }, error: function (xhr, ajaxOptions, thrownError) { console.log(thrownError); console.log(xhr); console.log(ajaxOptions); Utils.alert('Có lỗi xảy ra, có thể tuyến bạn chọn hiện chưa sẵn sàng, vui lòng liên hệ tổng đài 19006022 để được hỗ trợ'); }}); }, 'public static initAutocomplete': function(id, callbackChange, removeInvalid) { /* var autocomplete = new google.maps.places.Autocomplete( document.getElementById(id), {types: ['geocode']}); */ var autocomplete = new google.maps.places.Autocomplete( document.getElementById(id)); autocomplete.addListener('place_changed', function() { if(callbackChange) { callbackChange(autocomplete.getPlace()); } }); if(removeInvalid) { $('#'+id).blur(function() { var self = $(this); setTimeout(function() { try { var place = autocomplete.getPlace(); if(place.formatted_address != self.val()) { self.val(place.formatted_address); } } catch(e) { self.val(''); } }, 200); }); } return autocomplete; }, 'public static tip': function(obj, content, title) { obj.qtip({ content: {text: content, title: title}, position: { my: 'bottom center', at: 'top center', } }); }, 'public static numberFormat': function(number, decimals, dec_point, thousands_sep) { number = (number + '') .replace(/[^0-9+\-Ee.]/g, ''); var n = !isFinite(+number) ? 0 : +number, prec = !isFinite(+decimals) ? 0 : Math.abs(decimals), sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep, dec = (typeof dec_point === 'undefined') ? '.' : dec_point, s = '', toFixedFix = function(n, prec) { var k = Math.pow(10, prec); return '' + (Math.round(n * k) / k) .toFixed(prec); }; // Fix for IE parseFloat(0.55).toFixed(0) = 0; s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)) .split('.'); if (s[0].length > 3) { s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep); } if ((s[1] || '') .length < prec) { s[1] = s[1] || ''; s[1] += new Array(prec - s[1].length + 1) .join('0'); } return s.join(dec); }, 'public static formatVnd': function(number) { return Utils.numberFormat(number, 0, 0, '.')+'đ'; }, 'public static getRandomInt': function(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; }, 'public static hideAlert': function() { $.alerts._hide(); }, 'const FORM_ERROR_BORDER_CLASS': 'error_border' /*'const LEGS': 4, 'private static _number': 0, 'public static create': function() { return Cow(); }, 'public static getNumber': function(){ { return this.__self.$( '_number' ); },*/ } );