(function(){"use strict";$.extend(u8.Base.Geolocation.prototype,{_loadSettings:function(e,o){if(this.settings){return o()}var t=this;u8.request("GeolocationChannel.GetSettings",function(e,i){t.settings=i.response||{licenseMode:"None"};o()})},_onProviderCreate:function(o){u8.tools.extendOwn(o,e)}});function e(){}$.extend(e,{geocode:function(e,o){var t=e&&(e.uid||e.address&&e.address.uid);if(t){return this._geocodeUid(e,o)}this._callOriginalMethod(e,o)},_geocodeUid:function(e,o){var t=this,i=e.uid||e.address&&e.address.uid;if(!u8.isValidRecordUid(i)){return o(this,{error:{message:"Failed to geocode invalid uid."}})}u8.request("GeolocationChannel.FindAddressFor",{uid:i},function(i,n){var r=n.response,s=r&&r.location;if(n.error){return o(t,n)}if(!s&&r&&r.queryString){return t._callOriginalMethod($.extend({},e,{address:r}),o)}o(t,{location:s&&new u8.Base.Geolocation.Location(s),address:r})})},_callOriginalMethod:function(e,o){this.constructor.prototype.geocode.call(this,e,o)}})})();