From 6048637c9595e943950ba22423230d89f16a5112 Mon Sep 17 00:00:00 2001 From: "ilya.veklenko" Date: Mon, 13 Jun 2016 16:04:53 +0300 Subject: [PATCH] v3.1.11 --- bower.json | 2 +- libs/backendless.js | 4 ++-- libs/backendless.min.js | 8 +++----- libs/backendless.min.map | 2 +- package.json | 2 +- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/bower.json b/bower.json index c913b01c..4fdedde8 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "backendless", - "version": "3.1.10", + "version": "3.1.11", "homepage": "https://github.com/Backendless/JS-SDK", "authors": [ "Mark Piller " diff --git a/libs/backendless.js b/libs/backendless.js index 8ecc48e0..1a79b9ce 100644 --- a/libs/backendless.js +++ b/libs/backendless.js @@ -1,4 +1,4 @@ -// Backendless.js 3.1.10 +// Backendless.js 3.1.11 (function(factory) { var root = (typeof self == 'object' && self.self === self && self) || @@ -36,7 +36,7 @@ emptyFn = (function() { }); - Backendless.VERSION = '3.1.10'; + Backendless.VERSION = '3.1.11'; Backendless.serverURL = 'https://api.backendless.com'; Backendless.noConflict = function() { diff --git a/libs/backendless.min.js b/libs/backendless.min.js index 9126ca9e..69fd6d67 100644 --- a/libs/backendless.min.js +++ b/libs/backendless.min.js @@ -1,6 +1,4 @@ -(function(e){var t=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global;if(typeof define==="function"&&define.amd){define([],function(){return t.Backendless=e(t)})}else if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=t.Backendless=e(t)}else{t.Backendless=e(t)}})(function(root){"use strict";var NodeDevice={name:"NODEJS",platform:"NODEJS",uuid:"someId",version:"1"};var isBrowser=new Function("try {return this===window;}catch(e){ return false;}")();var WebSocket=null;var UIState=null;var previousBackendless=root.Backendless;var Backendless={},emptyFn=function(){};Backendless.VERSION="3.1.10";Backendless.serverURL="https://api.backendless.com";Backendless.noConflict=function(){root.Backendless=previousBackendless;return this};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(e,t){var n;if(this==null){throw new TypeError('"this" is null or not defined')}var s=Object(this);var r=s.length>>>0;if(r===0){return-1}var a=+t||0;if(Math.abs(a)===Infinity){a=0}if(a>=r){return-1}n=Math.max(a>=0?a:r-Math.abs(a),0);while(n=200&&t.status<300){s=r(t);i(s);e.asyncHandler.success&&e.asyncHandler.success(s)}else if(o()){e.asyncHandler.success&&e.asyncHandler.success(Backendless.LocalCache.get(e.urlBlueprint))}else{e.asyncHandler.fault&&e.asyncHandler.fault(a(t))}}}}t.send(e.data);if(e.isAsync){return t}else if(t.status>=200&&t.status<300){s=r(t);i(s);return s}else if(o()){return Backendless.LocalCache.get(e.urlBlueprint)}else{throw a(t)}};e.method=e.method||"GET";e.cachePolicy=e.cachePolicy||{policy:"ignoreCache"};e.isAsync=typeof e.isAsync=="boolean"?e.isAsync:false;e.cacheActive=e.method=="GET"&&t.indexOf(e.cachePolicy.policy)!=-1;e.urlBlueprint=e.url.replace(/([^A-Za-z0-9])/g,"");try{return n[e.cachePolicy.policy].call(this,e)}catch(r){throw r}};Backendless._ajax_for_nodejs=function(e){e.data=e.data||"";e.asyncHandler=e.asyncHandler||{};e.isAsync=typeof e.isAsync=="boolean"?e.isAsync:false;if(!e.isAsync){throw new Error("Use Async type of request using Backendless with NodeJS. Add Backendless.Async(successCallback, errorCallback) as last argument")}if(typeof e.data!=="string"){e.data=JSON.stringify(e.data)}var t=require("url").parse(e.url);var n=t.protocol==="https:";var s={host:t.hostname,port:t.port||(n?443:80),method:e.method||"GET",path:t.path,headers:{"Content-Length":e.data?Buffer.byteLength(e.data):0,"Content-Type":e.data?"application/json":"application/x-www-form-urlencoded","application-id":Backendless.applicationId,"secret-key":Backendless.secretKey,"application-type":"JS"}};if(currentUser!=null&&!!currentUser["user-token"]){s.headers["user-token"]=currentUser["user-token"]}var r;var a=require(n?"https":"http");var i=a.request(s,function(t){t.setEncoding("utf8");t.on("data",function(e){r=r?r+e:e});t.on("end",function(){var n=e.asyncHandler[t.statusCode>=200&&t.statusCode<300?"success":"fault"];if(Utils.isFunction(n)){var s=t.headers["content-type"];if(r!==undefined&&s&&s.indexOf("application/json")!==-1){r=tryParseJSON(r)}n(r)}})});i.on("error",function(t){e.asyncHandler.fault&&e.asyncHandler.fault(t)});i.write(e.data);return i.end()};Backendless._ajax=isBrowser?Backendless._ajax_for_browser:Backendless._ajax_for_nodejs;var getClassName=function(){if(this.prototype&&this.prototype.___class){return this.prototype.___class}if(Utils.isFunction(this)&&this.name){return this.name}var e=Utils.isFunction(this)?this.toString():this.constructor.toString(),t=e.match(/function\s+(\w+)/);return t&&t.length>1?t[1]:""};var encodeArrayToUriComponent=function(e){var t=[],n,s;for(n=0,s=e.length;ne["cachePolicy"]["timeToLive"]}}return t};var i=function(e){if(e&&Object.prototype.toString.call(e).slice(8,-1)=="Object"){if("cachePolicy"in e&&"timeToLive"in e["cachePolicy"]){e["cachePolicy"]["created"]=(new Date).getTime()}}};r();e.enabled=true;e.exists=function(t){return e.get(t)!==undefined};e.set=function(t,s){if(s===undefined){return e.remove(t)}r();var a=e.deserialize(n.getItem("Backendless"));i(s);a[t]=s;try{n.setItem("Backendless",e.serialize(a))}catch(o){a={};a[t]=s;n.setItem("Backendless",e.serialize(a))}return s};e.get=function(t){r();var s=e.deserialize(n.getItem("Backendless")),i=s[t],o=i;if(a(i)){delete s[t];n.setItem("Backendless",e.serialize(s));o=undefined}if(o&&o["cachePolicy"]){delete o["cachePolicy"]}return o};e.remove=function(t){var s;r();t=t.replace(/([^A-Za-z0-9-])/g,"");var a=e.deserialize(n.getItem("Backendless"));if(a.hasOwnProperty(t)){s=delete a[t]}n.setItem("Backendless",e.serialize(a));return s};e.clear=function(){n.setItem("Backendless",e.serialize({}))};e.getAll=function(){r();var t=e.deserialize(n.getItem("Backendless"));var s={};for(var a in t){if(t.hasOwnProperty(a)){s[a]=t[a];if(s[a]!==null&&s[a].hasOwnProperty("cachePolicy")){delete s[a]["cachePolicy"]}}}return s};e.flushExpired=function(){r();var t=e.deserialize(n.getItem("Backendless")),s;for(var i in t){if(t.hasOwnProperty(i)){s=t[i];if(a(s)){delete t[i];n.setItem("Backendless",e.serialize(t))}}}};e.getCachePolicy=function(t){r();var s=e.deserialize(n.getItem("Backendless"));var a=s[t];return a?a["cachePolicy"]:undefined}}return e}Backendless.LocalCache=setCache();if(Backendless.LocalCache.enabled){Backendless.LocalCache.flushExpired()}Backendless.Async=Async;function DataStore(e){this.model=Utils.isString(e)?function(){}:e;this.className=getClassName.call(e);if((typeof e).toLowerCase()==="string"){this.className=e}if(!this.className){throw"Class name should be specified"}this.restUrl=Backendless.appPath+"/data/"+this.className}DataStore.prototype={_extractQueryOptions:function(e){var t=[];if(typeof e.pageSize!="undefined"){if(e.pageSize<1||e.pageSize>100){throw new Error("PageSize can not be less then 1 or greater than 100")}t.push("pageSize="+encodeURIComponent(e.pageSize))}if(typeof e.offset!="undefined"){if(e.offset<0){throw new Error("Offset can not be less then 0")}t.push("offset="+encodeURIComponent(e.offset))}if(e.sortBy){if(Utils.isString(e.sortBy)){t.push("sortBy="+encodeURIComponent(e.sortBy))}else if(Utils.isArray(e.sortBy)){t.push("sortBy="+encodeArrayToUriComponent(e.sortBy))}}if(e.relationsDepth){if(Utils.isNumber(e.relationsDepth)){t.push("relationsDepth="+Math.floor(e.relationsDepth))}}if(e.relations){if(Utils.isArray(e.relations)){t.push("loadRelations="+(e.relations.length?encodeArrayToUriComponent(e.relations):"*"))}}return t.join("&")},_parseResponse:function(e){var t=this.model,n;e=e.fields||e;n=new t;extendCollection(e,this);deepExtend(n,e);return this._formCircDeps(n)},_parseFindResponse:function(e){var t,n,s=this.model,r;if(e.data){var a=e,i=a.data;for(t=0,n=i.length;t1&&!(arguments[1]instanceof Backendless.Async)){o+="?"}if(Utils.isString(t)){o+="where="+t}else{n=t;s=n}if(Utils.isNumber(n)){o+="&"+(new DataStore)._extractQueryOptions({pageSize:n})}if(Utils.isNumber(s)){o+="&"+(new DataStore)._extractQueryOptions({offset:s})}return Backendless._ajax({method:"GET",url:o,isAsync:i,asyncHandler:a})}else{throw new Error("View name is required string parameter")}},callStoredProcedure:function(e,t,n){var s=extractResponder(arguments),r=s!=null;if(Utils.isString(e)){var a=Backendless.appPath+"/data/"+e,i={};if(Utils.isObject(t)){i=JSON.stringify(t)}return Backendless._ajax({method:"POST",url:a,data:i,isAsync:r,asyncHandler:s})}else{throw new Error("Stored Procedure name is required string parameter")}},of:function(e){var t;if(Utils.isString(e)){if(e.toLowerCase()==="users"){throw new Error("Table 'Users' is not accessible through this signature. Use Backendless.Data.of( BackendlessUser.class ) instead")}t=e}else{t=getClassName.call(e)}var n=dataStoreCache[t];if(!n){n=new DataStore(e);dataStoreCache[t]=n}return n},describe:function(e,t){e=Utils.isString(e)?e:getClassName.call(e);var n=extractResponder(arguments),s=n!=null;return Backendless._ajax({method:"GET",url:Backendless.appPath+"/data/"+e+"/properties",isAsync:s,asyncHandler:n})}};function DataPermissions(){this.restUrl=Backendless.appPath+"/data";this.getRestUrl=function(e,t){return this.restUrl+"/"+encodeURIComponent(e.___class)+"/permissions/"+encodeURIComponent(t)+"/"+encodeURIComponent(e.objectId)};this.sendRequest=function(e,t,n,s,r,a){var i=extractResponder(arguments),o=i!=null,c={permission:s};if(!n.___class||!n.objectId){throw new Error('"dataObject.___class" and "dataObject.objectId" need to be specified')}if(e){c.user=e}else if(t){c.role=t}return Backendless._ajax({method:"PUT",url:this.getRestUrl(n,r),data:JSON.stringify(c),isAsync:o,asyncHandler:i})}}DataPermissions.prototype={FIND:{grantUser:function(e,t,n){return Backendless.Data.Permissions.sendRequest(e,null,t,"FIND","GRANT",n)},grantRole:function(e,t,n){return Backendless.Data.Permissions.sendRequest(null,e,t,"FIND","GRANT",n)},grant:function(e,t){return Backendless.Data.Permissions.sendRequest("*",null,e,"FIND","GRANT",t)},denyUser:function(e,t,n){return Backendless.Data.Permissions.sendRequest(e,null,t,"FIND","DENY",n)},denyRole:function(e,t,n){return Backendless.Data.Permissions.sendRequest(null,e,t,"FIND","DENY",n)},deny:function(e,t){return Backendless.Data.Permissions.sendRequest("*",null,e,"FIND","DENY",t)}},REMOVE:{grantUser:function(e,t,n){return Backendless.Data.Permissions.sendRequest(e,null,t,"REMOVE","GRANT",n)},grantRole:function(e,t,n){return Backendless.Data.Permissions.sendRequest(null,e,t,"REMOVE","GRANT",n)},grant:function(e,t){return Backendless.Data.Permissions.sendRequest("*",null,e,"REMOVE","GRANT",t)},denyUser:function(e,t,n){return Backendless.Data.Permissions.sendRequest(e,null,t,"REMOVE","DENY",n)},denyRole:function(e,t,n){return Backendless.Data.Permissions.sendRequest(null,e,t,"REMOVE","DENY",n)},deny:function(e,t){return Backendless.Data.Permissions.sendRequest("*",null,e,"REMOVE","DENY",t)}},UPDATE:{grantUser:function(e,t,n){return Backendless.Data.Permissions.sendRequest(e,null,t,"UPDATE","GRANT",n)},grantRole:function(e,t,n){return Backendless.Data.Permissions.sendRequest(null,e,t,"UPDATE","GRANT",n)},grant:function(e,t){return Backendless.Data.Permissions.sendRequest("*",null,e,"UPDATE","GRANT",t)},denyUser:function(e,t,n){return Backendless.Data.Permissions.sendRequest(e,null,t,"UPDATE","DENY",n)},denyRole:function(e,t,n){return Backendless.Data.Permissions.sendRequest(null,e,t,"UPDATE","DENY",n)},deny:function(e,t){return Backendless.Data.Permissions.sendRequest("*",null,e,"UPDATE","DENY",t)}}};function User(){}User.prototype.___class="Users";Backendless.User=User;var currentUser=null;var UserService=function(){this.restUrl=Backendless.appPath+"/users"};UserService.prototype={_wrapAsync:function(e,t){var n=this,s=function(s){currentUser=n._parseResponse(tryParseJSON(s),t);e.success(n._getUserFromResponse(currentUser))},r=function(t){e.fault(t)};return new Async(s,r)},_parseResponse:function(e,t){var n=new Backendless.User;deepExtend(n,e);if(t){Backendless.LocalCache.set("stayLoggedIn",t)}return n},register:function(e,t){if(!(e instanceof Backendless.User)){throw new Error("Only Backendless.User accepted")}var n=extractResponder(arguments);var s=n!=null;if(n){n=this._wrapAsync(n)}var r=Backendless._ajax({method:"POST",url:this.restUrl+"/register",isAsync:s,asyncHandler:n,data:JSON.stringify(e)});return s?r:this._parseResponse(r)},getUserRoles:function(e){var t=extractResponder(arguments);var n=t!=null;if(t){t=this._wrapAsync(t)}var s=Backendless._ajax({method:"GET",url:this.restUrl+"/userroles",isAsync:n,asyncHandler:t});return n?s:this._parseResponse(s)},roleHelper:function(e,t,n,s){if(!e){throw new Error("User identity can not be empty")}if(!t){throw new Error("Rolename can not be empty")}var r=extractResponder(arguments);return Backendless._ajax({method:"POST",url:this.restUrl+"/"+s,isAsync:!!r,asyncHandler:r,data:JSON.stringify({user:e,roleName:t})})},assignRole:function(e,t,n){return this.roleHelper(e,t,n,"assignRole")},unassignRole:function(e,t,n){return this.roleHelper(e,t,n,"unassignRole")},login:function(e,t,n,s){if(!e){throw new Error("Username can not be empty")}if(!t){throw new Error("Password can not be empty")}n=n===true;Backendless.LocalCache.remove("user-token");Backendless.LocalCache.remove("current-user-id");Backendless.LocalCache.set("stayLoggedIn",false);var r=extractResponder(arguments);var a=r!=null;if(r){r=this._wrapAsync(r,n)}var i={login:e,password:t};var o=Backendless._ajax({method:"POST",url:this.restUrl+"/login",isAsync:a,asyncHandler:r,data:JSON.stringify(i)});if(!a&&o){currentUser=this._parseResponse(o,n);o=this._getUserFromResponse(currentUser)}return o},_getUserFromResponse:function(e){Backendless.LocalCache.set("current-user-id",e.objectId);var t=new Backendless.User;for(var n in e){if(e.hasOwnProperty(n)){if(n=="user-token"){if(Backendless.LocalCache.get("stayLoggedIn")){Backendless.LocalCache.set("user-token",e[n])}continue}t[n]=e[n]}}return t},loggedInUser:function(){return Backendless.LocalCache.get("current-user-id")},describeUserClass:function(e){var t=extractResponder(arguments);var n=t!=null;return Backendless._ajax({method:"GET",url:this.restUrl+"/userclassprops",isAsync:n,asyncHandler:t})},restorePassword:function(e,t){if(!e){throw"Username can not be empty"}var n=extractResponder(arguments);var s=n!=null;return Backendless._ajax({method:"GET",url:this.restUrl+"/restorepassword/"+encodeURIComponent(e),isAsync:s,asyncHandler:n})},logout:function(e){var t=extractResponder(arguments),n=t!=null,s=n?t.fault:null,r=n?t.success:null,a={},i=function(){Backendless.LocalCache.remove("user-token");Backendless.LocalCache.remove("current-user-id");Backendless.LocalCache.remove("stayLoggedIn");currentUser=null},o=function(){i();if(Utils.isFunction(r)){r()}},c=function(e){if(Utils.isObject(e)&&[3064,3091,3090,3023].indexOf(e.code)!=-1){i()}if(Utils.isFunction(s)){s(e)}};if(t){t.fault=c;t.success=o}try{a=Backendless._ajax({method:"GET",url:this.restUrl+"/logout",isAsync:n,asyncHandler:t})}catch(l){c(l)}if(n){return a}else{i()}},getCurrentUser:function(){if(currentUser){return this._getUserFromResponse(currentUser)}var e=Backendless.LocalCache.get("stayLoggedIn");var t=e&&Backendless.LocalCache.get("current-user-id");return t&&persistence.of(User).findById(t)||null},update:function(e,t){var n=extractResponder(arguments);var s=n!=null;if(n){n=this._wrapAsync(n)}var r=Backendless._ajax({method:"PUT",url:this.restUrl+"/"+e.objectId,isAsync:s,asyncHandler:n,data:JSON.stringify(e)});return s?r:this._parseResponse(r)},loginWithFacebook:function(e,t,n,s){n=extractResponder(arguments);this._loginSocial("Facebook",e,t,n,null,s)},loginWithGooglePlus:function(e,t,n,s,r){n=extractResponder(arguments);this._loginSocial("GooglePlus",e,t,n,s,r)},loginWithTwitter:function(e,t,n){t=extractResponder(arguments);this._loginSocial("Twitter",e,null,t,null,n)},_socialContainer:function(e,t){var n;if(t){var s;t=t[0];n=document.createElement("div");n.innerHTML="Loading...";t.appendChild(n);t.style.cursor="wait";this.closeContainer=function(){t.style.cursor="default";t.removeChild(s)};this.removeLoading=function(){t.removeChild(n)};this.doAuthorizationActivity=function(e){this.removeLoading();s=document.createElement("iframe");s.frameBorder=0;s.width=t.style.width;s.height=t.style.height;s.id="SocialAuthFrame";s.setAttribute("src",e+"&output=embed");t.appendChild(s);s.onload=function(){t.style.cursor="default"}}}else{t=window.open("",e+" authorization","resizable=yes, scrollbars=yes, titlebar=yes, top=10, left=10");n=t.document.getElementsByTagName("body")[0].innerHTML;n="Loading...";t.document.getElementsByTagName("html")[0].style.cursor="wait";this.closeContainer=function(){t.close()};this.removeLoading=function(){n=null};this.doAuthorizationActivity=function(e){t.location.href=e;t.onload=function(){t.document.getElementsByTagName("html")[0].style.cursor="default"}}}},_loginSocial:function(e,t,n,s,r,a){var i=new this._socialContainer(e,r);s=s&&this._wrapAsync(s);Utils.addEvent("message",window,function(e){if(e.origin==Backendless.serverURL){var t=JSON.parse(e.data);if(t.fault){s.fault(t.fault)}else{Backendless.LocalCache.set("stayLoggedIn",!!a);currentUser=this.Backendless.UserService._parseResponse(t);s.success(this.Backendless.UserService._getUserFromResponse(currentUser))}Utils.removeEvent("message",window);i.closeContainer()}});var o=new Backendless.Async(function(e){i.doAuthorizationActivity(e)},function(e){i.closeContainer();s.fault(e)});var c={};c.fieldsMapping=t||{};c.permissions=n||[];Backendless._ajax({method:"POST",url:this.restUrl+"/social/oauth/"+e.toLowerCase()+"/request_url",isAsync:true,asyncHandler:o,data:JSON.stringify(c)})},loginWithFacebookSdk:function(e,t,n){if(!FB){throw new Error("Facebook SDK not found")}if(t instanceof Async){n=t;t=false}var s=this;FB.getLoginStatus(function(r){if(r.status==="connected"){s._sendSocialLoginRequest(s,r,"facebook",e,t,n)}else{FB.login(function(r){s._sendSocialLoginRequest(s,r,"facebook",e,t,n)})}})},loginWithGooglePlusSdk:function(e,t,n){if(!gapi){throw new Error("Google Plus SDK not found")}if(t instanceof Async){n=t;t=false}var s=this;gapi.auth.authorize({client_id:e.client_id,scope:"https://www.googleapis.com/auth/plus.login"},function(r){delete r["g-oauth-window"];s._sendSocialLoginRequest(s,r,"googleplus",e,t,n)})},_sendSocialLoginRequest:function(e,t,n,s,r,a){if(s){t["fieldsMapping"]=s}var i=new Backendless.Async(function(t){currentUser=e._parseResponse(t);Backendless.LocalCache.set("stayLoggedIn",!!r);a.success(e._getUserFromResponse(currentUser))},function(e){a.fault(e)});Backendless._ajax({method:"POST",url:e.restUrl+"/social/"+n+"/login/"+Backendless.applicationId,isAsync:true,asyncHandler:i,data:JSON.stringify(t)})},isValidLogin:function(e){var t=Backendless.LocalCache.get("user-token");var n=extractResponder(arguments);var s=n!=null;if(t){if(!e){try{var r=Backendless._ajax({method:"GET",url:Backendless.serverURL+"/"+Backendless.appVersion+"/users/isvalidusertoken/"+t});return!!r}catch(a){return false}}else{Backendless._ajax({method:"GET",url:Backendless.serverURL+"/"+Backendless.appVersion+"/users/isvalidusertoken/"+t,isAsync:s,asyncHandler:n&&this._wrapAsync(n)})}}else{var i=Backendless.UserService.getCurrentUser();if(s){setTimeout(function(){n[i?"success":"fault"]()},0)}else{return!!i}}}};function Geo(){this.restUrl=Backendless.appPath+"/geo";this.monitoringId=null}Geo.prototype={UNITS:{METERS:"METERS",KILOMETERS:"KILOMETERS",MILES:"MILES",YARDS:"YARDS",FEET:"FEET"},_parseResponse:function(e){var t=e.collection;extendCollection(t,this);return t},_load:function(e,t){var n=extractResponder(arguments),s=n!=null;var r=Backendless._ajax({method:"GET",url:e,isAsync:s,asyncHandler:n});return s?r:this._parseResponse(r)},_findHelpers:{searchRectangle:function(e){var t=["nwlat="+e[0],"nwlon="+e[1],"selat="+e[2],"selon="+e[3]];return t.join("&")},latitude:function(e){return"lat="+e},longitude:function(e){return"lon="+e; - -},metadata:function(e){return"metadata="+JSON.stringify(e)},units:function(e){return"units="+e},radius:function(e){return"r="+e},categories:function(e){e=Utils.isString(e)?[e]:e;return"categories="+encodeArrayToUriComponent(e)},includeMetadata:function(e){return"includemetadata="+e},pageSize:function(e){if(e<1||e>100){throw new Error("PageSize can not be less then 1 or greater than 100")}else{return"pagesize="+e}},offset:function(e){if(e<0){throw new Error("Offset can not be less then 0")}else{return"offset="+e}},relativeFindPercentThreshold:function(e){if(e<=0){throw new Error("Threshold can not be less then or equal 0")}else{return"relativeFindPercentThreshold="+e}},relativeFindMetadata:function(e){return"relativeFindMetadata="+encodeURIComponent(JSON.stringify(e))},condition:function(e){return"whereClause="+encodeURIComponent(e)},degreePerPixel:function(e){return"dpp="+e},clusterGridSize:function(e){return"clustergridsize="+e},geoFence:function(e){return"geoFence="+e}},savePoint:function(e,t){if(e.latitude===undefined||e.longitude===undefined){throw"Latitude or longitude not a number"}e.categories=e.categories||["Default"];e.categories=Utils.isArray(e.categories)?e.categories:[e.categories];var n=e.objectId;var s=n?"PATCH":"PUT",r=this.restUrl+"/points";if(n){r+="/"+n}var a=extractResponder(arguments);var i=a!=null;var o=function(e){var t=function(t){var n=t.geopoint;var s=new GeoPoint;s.categories=n.categories;s.latitude=n.latitude;s.longitude=n.longitude;s.metadata=n.metadata;s.objectId=n.objectId;t.geopoint=s;e.success(t)};var n=function(t){e.fault(t)};return new Async(t,n)};a=o(a);return Backendless._ajax({method:s,url:r,data:JSON.stringify(e),isAsync:i,asyncHandler:a})},addPoint:function(e,t){return this.savePoint.apply(this,arguments)},findUtil:function(e,t){var n=e["url"],s=extractResponder(arguments),r=false;if(e.searchRectangle&&e.radius){throw new Error("Inconsistent geo query. Query should not contain both rectangle and radius search parameters.")}else if(e.radius&&(e.latitude===undefined||e.longitude===undefined)){throw new Error("Latitude and longitude should be provided to search in radius")}else if((e.relativeFindMetadata||e.relativeFindPercentThreshold)&&!(e.relativeFindMetadata&&e.relativeFindPercentThreshold)){throw new Error("Inconsistent geo query. Query should contain both relativeFindPercentThreshold and relativeFindMetadata or none of them")}else{n+=e.searchRectangle?"/rect?":"/points?";n+=e.units?"units="+e.units:"";for(var a in e){if(e.hasOwnProperty(a)&&this._findHelpers.hasOwnProperty(a)&&e[a]!=null){n+="&"+this._findHelpers[a](e[a])}}}n=n.replace(/\?&/g,"?");var i=this;var o=function(t){var n=function(n){var s=n.collection.data;for(var r=0;r0?1:-1);var r=this._countLittleRadius(s);var a,i,o,c;if(r>n){a=e.longitude-180*n/r;i=2*e.longitude-a;a=this._updateDegree(a);i=i%360==180?180:this._updateDegree(i)}else{a=-180;i=180}if(e.latitude>0){o=s;c=2*e.latitude-s}else{c=s;o=2*e.latitude-s}return[Math.min(o,90),a,Math.max(c,-90),i]},_getOutRectangleNodes:function(e){var t=e[0].latitude;var n=e[0].longitude;var s=e[0].latitude;var r=e[0].longitude;var a=0,i=0,o=0;for(var c=1;ct){t=e[c].latitude}if(e[c].latitude-180||l>270){if(l>270){l-=360}o+=l;if(o0&&l<=180||l<=-270){if(l<=-270){l+=360}o+=l;if(o>i){i=o}}}n+=a;r+=i;if(r-n>=360){r=180;n=-180}else{r=this._updateDegree(r);n=this._updateDegree(n)}return[t,n,s,r]},_getPointPosition:function(e,t,n){var s=n.longitude-t.longitude;if(s<0&&s>-180||s>180){var r=t;t=n;n=r}if(e.latitude-180||a>180){a=(a-360)%360}var i=(n.longitude-t.longitude+360)%360;var o=i*(e.latitude-t.latitude)/(n.latitude-t.latitude)-a;if(o>0){return"INTERSECT"}return"NO_INTERSECT"},_isPointInRectangular:function(e,t,n){if(e.latitude>t.latitude||e.latituden.longitude){return e.longitude>=t.longitude||e.longitude<=n.longitude}else{return e.longitude>=t.longitude&&e.longitude<=n.longitude}},_isPointInCircle:function(e,t,n){return this._distance(e.latitude,e.longitude,t.latitude,t.longitude)<=n},_isPointInShape:function(e,t){var n=0;function s(e,t){return(e+1)%t.length}for(var r=0;r-1){(function(e,t,n){return f(e,t,n)})(c,t,d)}else{r["onstay"](o._trackedFences[c].geofenceName,o._trackedFences[c].objectId,t.latitude,t.longitude)}}else{clearTimeout(o._timers[o._trackedFences[c].geofenceName]);r[u](o._trackedFences[c].geofenceName,o._trackedFences[c].objectId,t.latitude,t.longitude)}}else if(s){s.latitude=t.latitude;s.longitude=t.longitude;if(u=="onenter"){o._runFenceAction(u,o._trackedFences[c].geofenceName,s,i);if(d>-1){(function(e,t,n,s){return h(e,t,n,s)})(c,t,d,s)}else{o._runFenceAction("onstay",o._trackedFences[c].geofenceName,s,i)}}else{clearTimeout(o._timers[o._trackedFences[c].geofenceName]);o._runFenceAction(u,o._trackedFences[c].geofenceName,s,i)}}}}},_mobilecheck:function(){var e=false;(function(t){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))){e=true}})(navigator.userAgent||navigator.vendor||window.opera);return e},_trackedFences:[],_lastResults:{},_startMonitoring:function(e,t,n){var s=this;var r=false;if(t instanceof GeoPoint){r=true}var a=this._getFences(e);for(var i=0;i=200&&t.status<300){a.success(JSON.parse(t.responseText))}else{a.fault(JSON.parse(t.responseText))}}}}t.sendAsBinary(s);if(a){return t}if(t.status>=200&&t.status<300){return t.responseText?JSON.parse(t.responseText):true}else{throw r(t)}}function sendEncoded(e){var t=new XMLHttpRequest,n="-backendless-multipart-form-boundary-"+getNow(),s=function(e){var t={};try{t=JSON.parse(e.responseText)}catch(n){t.message=e.responseText}t.statusCode=e.status;return t};t.open("PUT",this.uploadPath,true);t.setRequestHeader("Content-Type","text/plain");t.setRequestHeader("application-id",Backendless.applicationId);t.setRequestHeader("secret-key",Backendless.secretKey);t.setRequestHeader("application-type","JS");if(UIState!==null){t.setRequestHeader("uiState",UIState)}var r=this.asyncHandler;if(r){t.onreadystatechange=function(){if(t.readyState==4){if(t.status>=200&&t.status<300){r.success(JSON.parse(t.responseText))}else{r.fault(JSON.parse(t.responseText))}}}}t.send(e.target.result.split(",")[1]);if(r){return t}if(t.status>=200&&t.status<300){return t.responseText?JSON.parse(t.responseText):true}else{throw s(t)}}function FilePermissions(){this.restUrl=Backendless.appPath+"/files/permissions"}FilePermissions.prototype={grantUser:function(e,t,n,s){this.varType="user";this.id=e;return this.grant(t,n,s)},grantRole:function(e,t,n,s){this.varType="role";this.id=e;return this.grant(t,n,s)},grant:function(e,t,n){return this.sendRequest("GRANT",e,t,n)},denyUser:function(e,t,n,s){this.varType="role";this.id=e;return this.deny(t,n,s)},denyRole:function(e,t,n,s){this.varType="role";this.id=e;return this.deny(t,n,s)},deny:function(e,t,n){return this.sendRequest("DENY",e,t,n)},sendRequest:function(e,t,n,s){var r=extractResponder(arguments),a=r!=null,i={permission:n};i[this.varType]=this.id||"*";return Backendless._ajax({method:"PUT",url:this.restUrl+"/"+e+"/"+encodeURIComponent(t),data:JSON.stringify(i),isAsync:a,asyncHandler:r})}};function Files(){this.restUrl=Backendless.appPath+"/files"}Files.prototype={saveFile:function(e,t,n,s,r){if(!e||!Utils.isString(e)){throw new Error('Missing value for the "path" argument. The argument must contain a string value')}if(!t||!Utils.isString(e)){throw new Error('Missing value for the "fileName" argument. The argument must contain a string value')}if(s instanceof Backendless.Async){r=s;s=null}if(!(n instanceof File)){n=new Blob([n])}if(n.size>28e5){throw new Error("File Content size must be less than 2,800,000 bytes")}var a=this.restUrl+"/binary/"+e+(Utils.isString(t)?"/"+t:"")+(s?"?overwrite=true":"");try{var i=new FileReader;i.fileName=encodeURIComponent(t).replace(/'/g,"%27").replace(/"/g,"%22");i.uploadPath=a;i.onloadend=sendEncoded;if(r){i.asyncHandler=r}i.onerror=function(e){r.fault(e)};i.readAsDataURL(n);if(!r){return true}}catch(o){console.log(o)}},upload:function(e,t,n,s){e=e.files||e;var r=this.restUrl+"/"+t+"/";var a="";if(Utils.isBoolean(n)){a="?overwrite="+n}if(isBrowser){if(window.File&&window.FileList){if(e instanceof File){e=[e]}var i=0;for(var o=0,c=e.length;o1&&!(arguments[1]instanceof Backendless.Async)){c+="?"}if(Utils.isString(t)){c+="pattern="+t}if(Utils.isBoolean(n)){c+="&sub="+n}if(Utils.isNumber(s)){c+="&pagesize="+s}if(Utils.isNumber(r)){c+="&offset="+r}return Backendless._ajax({method:"GET",url:c,isAsync:o,asyncHandler:i})},renameFile:function(e,t,n){this._checkPath(e);var s={oldPathName:e,newName:t};return this._doAction("rename",s,n)},moveFile:function(e,t,n){this._checkPath(e);this._checkPath(t);var s={sourcePath:e,targetPath:t};return this._doAction("move",s,n)},copyFile:function(e,t,n){this._checkPath(e);this._checkPath(t);var s={sourcePath:e,targetPath:t};return this._doAction("copy",s,n)},_checkPath:function(e){if(!/^\//.test(e)){e="/"+e}return e},_doAction:function(e,t,n){var s=extractResponder(arguments);var r=s!=null;return Backendless._ajax({method:"PUT",url:this.restUrl+"/"+e,data:JSON.stringify(t),isAsync:r,asyncHandler:s})},remove:function(e,t){var n=extractResponder(arguments);var s=n!=null;var r=e.indexOf("http://")===0||e.indexOf("https://")===0?e:this.restUrl+"/"+e;Backendless._ajax({method:"DELETE",url:r,isAsync:s,asyncHandler:n})},exists:function(e,t){if(!e||!Utils.isString(e)){throw new Error('Missing value for the "path" argument. The argument must contain a string value')}var n=extractResponder(arguments),s=n!=null,r=this.restUrl+"/exists/"+e;return Backendless._ajax({method:"GET",url:r,isAsync:s,asyncHandler:n})},removeDirectory:function(e,t){var n=extractResponder(arguments);var s=n!=null;return Backendless._ajax({method:"DELETE",url:this.restUrl+"/"+e,isAsync:s,asyncHandler:n})}};function Commerce(){this.restUrl=Backendless.appPath+"/commerce/googleplay"}Commerce.prototype.validatePlayPurchase=function(e,t,n,s){if(arguments.length<3){throw new Error("Package Name, Product Id, Token must be provided and must be not an empty STRING!")}for(var r=arguments.length-2;r>=0;r--){if(!arguments[r]||!Utils.isString(arguments[r])){throw new Error("Package Name, Product Id, Token must be provided and must be not an empty STRING!")}}var a=extractResponder(arguments),i=a!=null;if(a){a=wrapAsync(a)}return Backendless._ajax({method:"GET",url:this.restUrl+"/validate/"+e+"/inapp/"+t+"/purchases/"+n,isAsync:i,asyncHandler:a})};Commerce.prototype.cancelPlaySubscription=function(e,t,n,s){if(arguments.length<3){throw new Error("Package Name, Subscription Id, Token must be provided and must be not an empty STRING!")}for(var r=arguments.length-2;r>=0;r--){if(!arguments[r]||!Utils.isString(arguments[r])){throw new Error("Package Name, Subscription Id, Token must be provided and must be not an empty STRING!")}}var a=extractResponder(arguments),i=a!=null;if(a){a=wrapAsync(a)}return Backendless._ajax({method:"POST",url:this.restUrl+"/"+e+"/subscription/"+t+"/purchases/"+n+"/cancel",isAsync:i,asyncHandler:a})};Commerce.prototype.getPlaySubscriptionStatus=function(e,t,n,s){if(arguments.length<3){throw new Error("Package Name, Subscription Id, Token must be provided and must be not an empty STRING!")}for(var r=arguments.length-2;r>=0;r--){if(!arguments[r]||!Utils.isString(arguments[r])){throw new Error("Package Name, Subscription Id, Token must be provided and must be not an empty STRING!")}}var a=extractResponder(arguments),i=a!=null;if(a){a=wrapAsync(a)}return Backendless._ajax({method:"GET",url:this.restUrl+"/"+e+"/subscription/"+t+"/purchases/"+n,isAsync:i,asyncHandler:a})};function Events(){this.restUrl=Backendless.appPath+"/servercode/events"}Events.prototype.dispatch=function(e,t,n){if(!e||!Utils.isString(e)){throw new Error("Event Name must be provided and must be not an empty STRING!"); - -}t=Utils.isObject(t)?t:{};var s=extractResponder(arguments),r=s!=null;if(s){s=wrapAsync(s)}t=t instanceof Backendless.Async?{}:t;return Backendless._ajax({method:"POST",url:this.restUrl+"/"+e,data:JSON.stringify(t),isAsync:r,asyncHandler:s})};var Cache=function(){};var FactoryMethods={};Cache.prototype={put:function(e,t,n,s){if(!Utils.isString(e)){throw new Error("You can use only String as key to put into Cache")}if(!(n instanceof Backendless.Async)){if(typeof n=="object"&&!arguments[3]){s=n;n=null}else if(typeof n!=("number"||"string")&&n!=null){throw new Error("You can use only String as timeToLive attribute to put into Cache")}}else{s=n;n=null}if(Utils.isObject(t)&&t.constructor!==Object){t.___class=t.___class||getClassName.call(t)}var r=extractResponder([s]),a=false;if(r!=null){a=true;r=wrapAsync(r)}return Backendless._ajax({method:"PUT",url:Backendless.serverURL+"/"+Backendless.appVersion+"/cache/"+e+(n?"?timeout="+n:""),data:JSON.stringify(t),isAsync:a,asyncHandler:r})},expireIn:function(e,t,n){if(Utils.isString(e)&&(Utils.isNumber(t)||Utils.isDate(t))&&t){t=Utils.isDate(t)?t.getTime():t;var s=extractResponder(arguments),r=false;if(s!=null){r=true;s=wrapAsync(s)}return Backendless._ajax({method:"PUT",url:Backendless.serverURL+"/"+Backendless.appVersion+"/cache/"+e+"/expireIn?timeout="+t,data:JSON.stringify({}),isAsync:r,asyncHandler:s})}else{throw new Error('The "key" argument must be String. The "seconds" argument can be either Number or Date')}},expireAt:function(e,t,n){if(Utils.isString(e)&&(Utils.isNumber(t)||Utils.isDate(t))&&t){t=Utils.isDate(t)?t.getTime():t;var s=extractResponder(arguments),r=false;if(s!=null){r=true;s=wrapAsync(s)}return Backendless._ajax({method:"PUT",url:Backendless.serverURL+"/"+Backendless.appVersion+"/cache/"+e+"/expireAt?timestamp="+t,data:JSON.stringify({}),isAsync:r,asyncHandler:s})}else{throw new Error("You can use only String as key while expire in Cache. Second attribute must be declared and must be a Number or Date type")}},cacheMethod:function(e,t,n,s){if(!Utils.isString(t)){throw new Error('The "key" argument must be String')}var r=extractResponder(arguments),a=false;if(r!=null){a=true;r=wrapAsync(r)}return Backendless._ajax({method:e,url:Backendless.serverURL+"/"+Backendless.appVersion+"/cache/"+t+(n?"/check":""),isAsync:a,asyncHandler:r})},contains:function(e,t){return this.cacheMethod("GET",e,true,t)},get:function(e,t){if(!Utils.isString(e)){throw new Error('The "key" argument must be String')}function n(e){var t=e&&e.___class;if(t){var n=FactoryMethods[t]||root[t];if(n){e=new n(e)}}return e}var s=extractResponder(arguments),r=false;if(s!=null){r=true;s=wrapAsync(s,n,this)}var a=Backendless._ajax({method:"GET",url:Backendless.serverURL+"/"+Backendless.appVersion+"/cache/"+e,isAsync:r,asyncHandler:s});return r?a:n(a)},remove:function(e,t){return this.cacheMethod("DELETE",e,false,t)},setObjectFactory:function(e,t){FactoryMethods[e]=t}};var Counters=function(){};var AtomicInstance=function(e){this.name=e};Counters.prototype={of:function(e){return new AtomicInstance(e)},getConstructor:function(){return this},counterNameValidation:function(e){if(!e){throw new Error('Missing value for the "counterName" argument. The argument must contain a string value.')}if(!Utils.isString(e)){throw new Error('Invalid value for the "value" argument. The argument must contain only string values')}this.name=e},implementMethod:function(e,t,n){var s=extractResponder(arguments),r=false;if(s!=null){r=true;s=wrapAsync(s)}return Backendless._ajax({method:e,url:Backendless.serverURL+"/"+Backendless.appVersion+"/counters/"+this.name+t,isAsync:r,asyncHandler:s})},incrementAndGet:function(e,t){this.counterNameValidation(e,t);return this.implementMethod("PUT","/increment/get",t)},getAndIncrement:function(e,t){this.counterNameValidation(e,t);return this.implementMethod("PUT","/get/increment",t)},decrementAndGet:function(e,t){this.counterNameValidation(e,t);return this.implementMethod("PUT","/decrement/get",t)},getAndDecrement:function(e,t){this.counterNameValidation(e,t);return this.implementMethod("PUT","/get/decrement",t)},reset:function(e,t){this.counterNameValidation(e,t);return this.implementMethod("PUT","/reset",t)},get:function(e,t){this.counterNameValidation(e,t);var n=extractResponder(arguments),s=false;if(n!=null){s=true;n=wrapAsync(n)}return Backendless._ajax({method:"GET",url:Backendless.serverURL+"/"+Backendless.appVersion+"/counters/"+this.name,isAsync:s,asyncHandler:n})},implementMethodWithValue:function(e,t,n){if(!t){throw new Error('Missing value for the "value" argument. The argument must contain a numeric value.')}if(!Utils.isNumber(t)){throw new Error('Invalid value for the "value" argument. The argument must contain only numeric values')}var s=extractResponder(arguments),r=false;if(s!=null){r=true;s=wrapAsync(s)}return Backendless._ajax({method:"PUT",url:Backendless.serverURL+"/"+Backendless.appVersion+"/counters/"+this.name+e+(t?t:""),isAsync:r,asyncHandler:s})},addAndGet:function(e,t,n){this.counterNameValidation(e,n);return this.implementMethodWithValue("/get/incrementby?value=",t,n)},getAndAdd:function(e,t,n){this.counterNameValidation(e,n);return this.implementMethodWithValue("/incrementby/get?value=",t,n)},compareAndSet:function(e,t,n,s){this.counterNameValidation(e,s);if(!t||!n){throw new Error('Missing values for the "expected" and/or "updated" arguments. The arguments must contain numeric values')}if(!Utils.isNumber(t)||!Utils.isNumber(n)){throw new Error('Missing value for the "expected" and/or "updated" arguments. The arguments must contain a numeric value')}var r=extractResponder(arguments),a=false;if(r!=null){a=true;r=wrapAsync(r)}return Backendless._ajax({method:"PUT",url:Backendless.serverURL+"/"+Backendless.appVersion+"/counters/"+this.name+"/get/compareandset?expected="+(t&&n?t+"&updatedvalue="+n:""),isAsync:a,asyncHandler:r})}};AtomicInstance.prototype={incrementAndGet:function(e){return Counters.prototype.getConstructor().incrementAndGet(this.name,e)},getAndIncrement:function(e){return Counters.prototype.getConstructor().getAndIncrement(this.name,e)},decrementAndGet:function(e){return Counters.prototype.getConstructor().decrementAndGet(this.name,e)},getAndDecrement:function(e){return Counters.prototype.getConstructor().getAndDecrement(this.name,e)},reset:function(e){return Counters.prototype.getConstructor().reset(this.name,e)},get:function(e){return Counters.prototype.getConstructor().get(this.name,e)},addAndGet:function(e,t){return Counters.prototype.getConstructor().addAndGet(this.name,e,t)},getAndAdd:function(e,t){return Counters.prototype.getConstructor().getAndAdd(this.name,e,t)},compareAndSet:function(e,t,n){return Counters.prototype.getConstructor().getAndAdd(this.name,e,t,n)}};var lastFlushListeners;Backendless.Logging={restUrl:root.url,loggers:{},logInfo:[],messagesCount:0,numOfMessages:10,timeFrequency:1,getLogger:function(e){if(!Utils.isString(e)){throw new Error("Invalid 'loggerName' value. LoggerName must be a string value")}if(!this.loggers[e]){this.loggers[e]=new Logging(e)}return this.loggers[e]},flush:function(){var e=extractResponder(arguments);if(this.logInfo.length){this.flushInterval&&clearTimeout(this.flushInterval);var t;var n=function(e){return function(){for(var n=0;nthis.numOfMessages-1){this.sendRequest()}},setLogReportingPolicy:function(e,t){this.numOfMessages=e;this.timeFrequency=t;this.checkMessagesLen()}};function Logging(e){this.name=e}function setLogMessage(e,t,n,s){var r={};r["message"]=n;r["timestamp"]=Date.now();r["exception"]=s?s:null;r["logger"]=e;r["log-level"]=t;Backendless.Logging.logInfo.push(r);Backendless.Logging.messagesCount++;Backendless.Logging.checkMessagesLen()}Logging.prototype={debug:function(e){return setLogMessage(this.name,"DEBUG",e)},info:function(e){return setLogMessage(this.name,"INFO",e)},warn:function(e,t){return setLogMessage(this.name,"WARN",e,t)},error:function(e,t){return setLogMessage(this.name,"ERROR",e,t)},fatal:function(e,t){return setLogMessage(this.name,"FATAL",e,t)},trace:function(e){return setLogMessage(this.name,"TRACE",e)}};function CustomServices(){}CustomServices.prototype={invoke:function(e,t,n,s,r){var a=extractResponder(arguments),i=a!=null;return Backendless._ajax({method:"POST",url:Backendless.serverURL+"/"+Backendless.appVersion+"/services/"+e+"/"+t+"/"+n,data:JSON.stringify(s),isAsync:i,asyncHandler:a})}};function promisify(e){return function(){var t=this;var n=[].slice.call(arguments);return new Promise(function(s,r){n.push(new Async(s,r,t));e.apply(t,n)})}}function promisifyPack(e){var t=e[0];var n=e[1];n.forEach(function(e){t[e]=promisify(t[e])})}function enablePromises(){if(promisesEnabled){return}if(typeof Promise==="undefined"){throw new Error("Promises are not supported by your browser. "+'Please use "Backendless.Async" to make async requests, '+"or upgrade to a modern browser.\nSee "+"http://caniuse.com/#feat=promises")}promisesEnabled=true;[[DataPermissions.prototype.FIND,Object.keys(DataPermissions.prototype.FIND)],[DataPermissions.prototype.REMOVE,Object.keys(DataPermissions.prototype.REMOVE)],[DataPermissions.prototype.UPDATE,Object.keys(DataPermissions.prototype.UPDATE)],[Files.prototype,["saveFile","upload","listing","_doAction","remove","exists","removeDirectory"]],[Commerce.prototype,["validatePlayPurchase","cancelPlaySubscription","getPlaySubscriptionStatus"]],[Counters.prototype,["implementMethod","get","implementMethodWithValue","compareAndSet"]],[DataStore.prototype,["save","remove","find","findById","loadRelations"]],[Cache.prototype,["put","expireIn","expireAt","cacheMethod","get"]],[persistence,["describe","getView","callStoredProcedure"]],[FilePermissions.prototype,["sendRequest"]],[CustomServices.prototype,["invoke"]],[Events.prototype,["dispatch"]],[PollingProxy.prototype,["poll"]],[Backendless.Logging,["flush"]],[Messaging.prototype,["publish","sendEmail","cancel","subscribe","registerDevice","getRegistrations","unregisterDevice"]],[Geo.prototype,["addPoint","savePoint","findUtil","loadMetadata","getClusterPoints","addCategory","getCategories","deleteCategory","deletePoint"]],[UserService.prototype,["register","getUserRoles","roleHelper","login","describeUserClass","restorePassword","logout","update","isValidLogin","loginWithFacebookSdk","loginWithGooglePlusSdk","loginWithGooglePlus","loginWithTwitter","loginWithFacebook"]]].forEach(promisifyPack);UserService.prototype.getCurrentUser=function(){if(currentUser){return Promise.resolve(this._getUserFromResponse(currentUser))}var e=Backendless.LocalCache.get("stayLoggedIn");var t=e&&Backendless.LocalCache.get("current-user-id");return t&&persistence.of(User).findById(t)||Promise.resolve(null)};UserService.prototype.isValidLogin=function(){var e=Backendless.LocalCache.get("user-token");if(e){return new Promise(function(t,n){return Backendless._ajax({method:"GET",url:Backendless.serverURL+"/"+Backendless.appVersion+"/users/isvalidusertoken/"+e,isAsync:true,asyncHandler:new Async(t,n)})})}return Backendless.UserService.getCurrentUser().then(function(e){return Promise.resolve(!!e)},function(){return Promise.resolve(false)})}}Backendless.initApp=function(e,t,n){Backendless.applicationId=e;Backendless.secretKey=t;Backendless.appVersion=n;Backendless.appPath=[Backendless.serverURL,Backendless.appVersion].join("/");Backendless.UserService=new UserService;Backendless.Users=Backendless.UserService;Backendless.Geo=new Geo;Backendless.Persistence=persistence;Backendless.Data=persistence;Backendless.Data.Permissions=new DataPermissions;Backendless.Messaging=new Messaging;Backendless.Files=new Files;Backendless.Files.Permissions=new FilePermissions;Backendless.Commerce=new Commerce;Backendless.Events=new Events;Backendless.Cache=new Cache;Backendless.Counters=new Counters;Backendless.CustomServices=new CustomServices;dataStoreCache={};currentUser=null};var DataQuery=function(){this.properties=[];this.condition=null;this.options=null;this.url=null};DataQuery.prototype={addProperty:function(e){this.properties=this.properties||[];this.properties.push(e)}};var GeoQuery=function(){this.searchRectangle=undefined;this.categories=[];this.includeMetadata=true;this.metadata=undefined;this.condition=undefined;this.relativeFindMetadata=undefined;this.relativeFindPercentThreshold=undefined;this.pageSize=undefined;this.latitude=undefined;this.longitude=undefined;this.radius=undefined;this.units=undefined;this.degreePerPixel=undefined;this.clusterGridSize=undefined};GeoQuery.prototype={addCategory:function(){this.categories=this.categories||[];this.categories.push()},setClusteringParams:function(e,t,n,s){s=s||0;var r=parseFloat(e),a=parseFloat(t),i=parseInt(n),o=parseInt(s);if(!isFinite(r)||r<-180||r>180){throw new Error("The westLongitude value must be a number in the range between -180 and 180")}if(!isFinite(a)||a<-180||a>180){throw new Error("The eastLongitude value must be a number in the range between -180 and 180")}if(!isFinite(i)||i<1){throw new Error("The mapWidth value must be a number greater or equal to 1")}if(!isFinite(o)||o<0){throw new Error("The clusterGridSize value must be a number greater or equal to 0")}var c=a-r;c<0&&(c+=360);this.degreePerPixel=c/i;this.clusterGridSize=o||null}};var GeoPoint=function(e){e=e||{};this.___class="GeoPoint";this.categories=e.categories;this.latitude=e.latitude;this.longitude=e.longitude;this.metadata=e.metadata;this.objectId=e.objectId};var GeoCluster=function(e){e=e||{};this.categories=e.categories;this.latitude=e.latitude;this.longitude=e.longitude;this.metadata=e.metadata;this.objectId=e.objectId;this.totalPoints=e.totalPoints;this.geoQuery=e.geoQuery};var PublishOptionsHeaders={MESSAGE_TAG:"message",IOS_ALERT_TAG:"ios-alert",IOS_BADGE_TAG:"ios-badge",IOS_SOUND_TAG:"ios-sound",ANDROID_TICKER_TEXT_TAG:"android-ticker-text",ANDROID_CONTENT_TITLE_TAG:"android-content-title",ANDROID_CONTENT_TEXT_TAG:"android-content-text",ANDROID_ACTION_TAG:"android-action",WP_TYPE_TAG:"wp-type",WP_TITLE_TAG:"wp-title",WP_TOAST_SUBTITLE_TAG:"wp-subtitle",WP_TOAST_PARAMETER_TAG:"wp-parameter",WP_TILE_BACKGROUND_IMAGE:"wp-backgroundImage",WP_TILE_COUNT:"wp-count",WP_TILE_BACK_TITLE:"wp-backTitle",WP_TILE_BACK_BACKGROUND_IMAGE:"wp-backImage",WP_TILE_BACK_CONTENT:"wp-backContent",WP_RAW_DATA:"wp-raw"};var PublishOptions=function(e){e=e||{};this.publisherId=e.publisherId||undefined;this.headers=e.headers||undefined;this.subtopic=e.subtopic||undefined};var DeliveryOptions=function(e){e=e||{};this.pushPolicy=e.pushPolicy||undefined;this.pushBroadcast=e.pushBroadcast||undefined;this.pushSinglecast=e.pushSinglecast||undefined;this.publishAt=e.publishAt||undefined;this.repeatEvery=e.repeatEvery||undefined;this.repeatExpiresAt=e.repeatExpiresAt||undefined};var Bodyparts=function(e){e=e||{};this.textmessage=e.textmessage||undefined;this.htmlmessage=e.htmlmessage||undefined};var SubscriptionOptions=function(e){e=e||{};this.subscriberId=e.subscriberId||undefined;this.subtopic=e.subtopic||undefined;this.selector=e.selector||undefined};Backendless.DataQuery=DataQuery;Backendless.GeoQuery=GeoQuery;Backendless.GeoPoint=GeoPoint;Backendless.GeoCluster=GeoCluster;Backendless.Bodyparts=Bodyparts;Backendless.PublishOptions=PublishOptions;Backendless.DeliveryOptions=DeliveryOptions;Backendless.SubscriptionOptions=SubscriptionOptions;Backendless.PublishOptionsHeaders=PublishOptionsHeaders;root.GeoPoint=Backendless.GeoPoint;root.GeoCluster=Backendless.GeoCluster;root.BackendlessGeoQuery=Backendless.GeoQuery;root.Bodyparts=Backendless.Bodyparts;root.PublishOptions=Backendless.PublishOptions;root.DeliveryOptions=Backendless.DeliveryOptions;root.SubscriptionOptions=Backendless.SubscriptionOptions;root.PublishOptionsHeaders=Backendless.PublishOptionsHeaders;return Backendless}); +(function(e){var t=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global;if(typeof define==="function"&&define.amd){define([],function(){return t.Backendless=e(t)})}else if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=t.Backendless=e(t)}else{t.Backendless=e(t)}})(function(root){"use strict";var NodeDevice={name:"NODEJS",platform:"NODEJS",uuid:"someId",version:"1"};var isBrowser=new Function("try {return this===window;}catch(e){ return false;}")();var WebSocket=null;var UIState=null;var previousBackendless=root.Backendless;var Backendless={},emptyFn=function(){};Backendless.VERSION="3.1.11";Backendless.serverURL="https://api.backendless.com";Backendless.noConflict=function(){root.Backendless=previousBackendless;return this};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(e,t){var n;if(this==null){throw new TypeError('"this" is null or not defined')}var s=Object(this);var r=s.length>>>0;if(r===0){return-1}var a=+t||0;if(Math.abs(a)===Infinity){a=0}if(a>=r){return-1}n=Math.max(a>=0?a:r-Math.abs(a),0);while(n=200&&t.status<300){s=r(t);i(s);e.asyncHandler.success&&e.asyncHandler.success(s)}else if(o()){e.asyncHandler.success&&e.asyncHandler.success(Backendless.LocalCache.get(e.urlBlueprint))}else{e.asyncHandler.fault&&e.asyncHandler.fault(a(t))}}}}t.send(e.data);if(e.isAsync){return t}else if(t.status>=200&&t.status<300){s=r(t);i(s);return s}else if(o()){return Backendless.LocalCache.get(e.urlBlueprint)}else{throw a(t)}};e.method=e.method||"GET";e.cachePolicy=e.cachePolicy||{policy:"ignoreCache"};e.isAsync=typeof e.isAsync=="boolean"?e.isAsync:false;e.cacheActive=e.method=="GET"&&t.indexOf(e.cachePolicy.policy)!=-1;e.urlBlueprint=e.url.replace(/([^A-Za-z0-9])/g,"");try{return n[e.cachePolicy.policy].call(this,e)}catch(r){throw r}};Backendless._ajax_for_nodejs=function(e){e.data=e.data||"";e.asyncHandler=e.asyncHandler||{};e.isAsync=typeof e.isAsync=="boolean"?e.isAsync:false;if(!e.isAsync){throw new Error("Use Async type of request using Backendless with NodeJS. Add Backendless.Async(successCallback, errorCallback) as last argument")}if(typeof e.data!=="string"){e.data=JSON.stringify(e.data)}var t=require("url").parse(e.url);var n=t.protocol==="https:";var s={host:t.hostname,port:t.port||(n?443:80),method:e.method||"GET",path:t.path,headers:{"Content-Length":e.data?Buffer.byteLength(e.data):0,"Content-Type":e.data?"application/json":"application/x-www-form-urlencoded","application-id":Backendless.applicationId,"secret-key":Backendless.secretKey,"application-type":"JS"}};if(currentUser!=null&&!!currentUser["user-token"]){s.headers["user-token"]=currentUser["user-token"]}var r;var a=require(n?"https":"http");var i=a.request(s,function(t){t.setEncoding("utf8");t.on("data",function(e){r=r?r+e:e});t.on("end",function(){var n=e.asyncHandler[t.statusCode>=200&&t.statusCode<300?"success":"fault"];if(Utils.isFunction(n)){var s=t.headers["content-type"];if(r!==undefined&&s&&s.indexOf("application/json")!==-1){r=tryParseJSON(r)}n(r)}})});i.on("error",function(t){e.asyncHandler.fault&&e.asyncHandler.fault(t)});i.write(e.data);return i.end()};Backendless._ajax=isBrowser?Backendless._ajax_for_browser:Backendless._ajax_for_nodejs;var getClassName=function(){if(this.prototype&&this.prototype.___class){return this.prototype.___class}if(Utils.isFunction(this)&&this.name){return this.name}var e=Utils.isFunction(this)?this.toString():this.constructor.toString(),t=e.match(/function\s+(\w+)/);return t&&t.length>1?t[1]:""};var encodeArrayToUriComponent=function(e){var t=[],n,s;for(n=0,s=e.length;ne["cachePolicy"]["timeToLive"]}}return t};var i=function(e){if(e&&Object.prototype.toString.call(e).slice(8,-1)=="Object"){if("cachePolicy"in e&&"timeToLive"in e["cachePolicy"]){e["cachePolicy"]["created"]=(new Date).getTime()}}};r();e.enabled=true;e.exists=function(t){return e.get(t)!==undefined};e.set=function(t,s){if(s===undefined){return e.remove(t)}r();var a=e.deserialize(n.getItem("Backendless"));i(s);a[t]=s;try{n.setItem("Backendless",e.serialize(a))}catch(o){a={};a[t]=s;n.setItem("Backendless",e.serialize(a))}return s};e.get=function(t){r();var s=e.deserialize(n.getItem("Backendless")),i=s[t],o=i;if(a(i)){delete s[t];n.setItem("Backendless",e.serialize(s));o=undefined}if(o&&o["cachePolicy"]){delete o["cachePolicy"]}return o};e.remove=function(t){var s;r();t=t.replace(/([^A-Za-z0-9-])/g,"");var a=e.deserialize(n.getItem("Backendless"));if(a.hasOwnProperty(t)){s=delete a[t]}n.setItem("Backendless",e.serialize(a));return s};e.clear=function(){n.setItem("Backendless",e.serialize({}))};e.getAll=function(){r();var t=e.deserialize(n.getItem("Backendless"));var s={};for(var a in t){if(t.hasOwnProperty(a)){s[a]=t[a];if(s[a]!==null&&s[a].hasOwnProperty("cachePolicy")){delete s[a]["cachePolicy"]}}}return s};e.flushExpired=function(){r();var t=e.deserialize(n.getItem("Backendless")),s;for(var i in t){if(t.hasOwnProperty(i)){s=t[i];if(a(s)){delete t[i];n.setItem("Backendless",e.serialize(t))}}}};e.getCachePolicy=function(t){r();var s=e.deserialize(n.getItem("Backendless"));var a=s[t];return a?a["cachePolicy"]:undefined}}return e}Backendless.LocalCache=setCache();if(Backendless.LocalCache.enabled){Backendless.LocalCache.flushExpired()}Backendless.Async=Async;function DataStore(e){this.model=Utils.isString(e)?function(){}:e;this.className=getClassName.call(e);if((typeof e).toLowerCase()==="string"){this.className=e}if(!this.className){throw"Class name should be specified"}this.restUrl=Backendless.appPath+"/data/"+this.className}DataStore.prototype={_extractQueryOptions:function(e){var t=[];if(typeof e.pageSize!="undefined"){if(e.pageSize<1||e.pageSize>100){throw new Error("PageSize can not be less then 1 or greater than 100")}t.push("pageSize="+encodeURIComponent(e.pageSize))}if(typeof e.offset!="undefined"){if(e.offset<0){throw new Error("Offset can not be less then 0")}t.push("offset="+encodeURIComponent(e.offset))}if(e.sortBy){if(Utils.isString(e.sortBy)){t.push("sortBy="+encodeURIComponent(e.sortBy))}else if(Utils.isArray(e.sortBy)){t.push("sortBy="+encodeArrayToUriComponent(e.sortBy))}}if(e.relationsDepth){if(Utils.isNumber(e.relationsDepth)){t.push("relationsDepth="+Math.floor(e.relationsDepth))}}if(e.relations){if(Utils.isArray(e.relations)){t.push("loadRelations="+(e.relations.length?encodeArrayToUriComponent(e.relations):"*"))}}return t.join("&")},_parseResponse:function(e){var t=this.model,n;e=e.fields||e;n=new t;extendCollection(e,this);deepExtend(n,e);return this._formCircDeps(n)},_parseFindResponse:function(e){var t,n,s=this.model,r;if(e.data){var a=e,i=a.data;for(t=0,n=i.length;t1&&!(arguments[1]instanceof Backendless.Async)){o+="?"}if(Utils.isString(t)){o+="where="+t}else{n=t;s=n}if(Utils.isNumber(n)){o+="&"+(new DataStore)._extractQueryOptions({pageSize:n})}if(Utils.isNumber(s)){o+="&"+(new DataStore)._extractQueryOptions({offset:s})}return Backendless._ajax({method:"GET",url:o,isAsync:i,asyncHandler:a})}else{throw new Error("View name is required string parameter")}},callStoredProcedure:function(e,t,n){var s=extractResponder(arguments),r=s!=null;if(Utils.isString(e)){var a=Backendless.appPath+"/data/"+e,i={};if(Utils.isObject(t)){i=JSON.stringify(t)}return Backendless._ajax({method:"POST",url:a,data:i,isAsync:r,asyncHandler:s})}else{throw new Error("Stored Procedure name is required string parameter")}},of:function(e){var t;if(Utils.isString(e)){if(e.toLowerCase()==="users"){throw new Error("Table 'Users' is not accessible through this signature. Use Backendless.Data.of( BackendlessUser.class ) instead")}t=e}else{t=getClassName.call(e)}var n=dataStoreCache[t];if(!n){n=new DataStore(e);dataStoreCache[t]=n}return n},describe:function(e,t){e=Utils.isString(e)?e:getClassName.call(e);var n=extractResponder(arguments),s=n!=null;return Backendless._ajax({method:"GET",url:Backendless.appPath+"/data/"+e+"/properties",isAsync:s,asyncHandler:n})}};function DataPermissions(){this.restUrl=Backendless.appPath+"/data";this.getRestUrl=function(e,t){return this.restUrl+"/"+encodeURIComponent(e.___class)+"/permissions/"+encodeURIComponent(t)+"/"+encodeURIComponent(e.objectId)};this.sendRequest=function(e,t,n,s,r,a){var i=extractResponder(arguments),o=i!=null,c={permission:s};if(!n.___class||!n.objectId){throw new Error('"dataObject.___class" and "dataObject.objectId" need to be specified')}if(e){c.user=e}else if(t){c.role=t}return Backendless._ajax({method:"PUT",url:this.getRestUrl(n,r),data:JSON.stringify(c),isAsync:o,asyncHandler:i})}}DataPermissions.prototype={FIND:{grantUser:function(e,t,n){return Backendless.Data.Permissions.sendRequest(e,null,t,"FIND","GRANT",n)},grantRole:function(e,t,n){return Backendless.Data.Permissions.sendRequest(null,e,t,"FIND","GRANT",n)},grant:function(e,t){return Backendless.Data.Permissions.sendRequest("*",null,e,"FIND","GRANT",t)},denyUser:function(e,t,n){return Backendless.Data.Permissions.sendRequest(e,null,t,"FIND","DENY",n)},denyRole:function(e,t,n){return Backendless.Data.Permissions.sendRequest(null,e,t,"FIND","DENY",n)},deny:function(e,t){return Backendless.Data.Permissions.sendRequest("*",null,e,"FIND","DENY",t)}},REMOVE:{grantUser:function(e,t,n){return Backendless.Data.Permissions.sendRequest(e,null,t,"REMOVE","GRANT",n)},grantRole:function(e,t,n){return Backendless.Data.Permissions.sendRequest(null,e,t,"REMOVE","GRANT",n)},grant:function(e,t){return Backendless.Data.Permissions.sendRequest("*",null,e,"REMOVE","GRANT",t)},denyUser:function(e,t,n){return Backendless.Data.Permissions.sendRequest(e,null,t,"REMOVE","DENY",n)},denyRole:function(e,t,n){return Backendless.Data.Permissions.sendRequest(null,e,t,"REMOVE","DENY",n)},deny:function(e,t){return Backendless.Data.Permissions.sendRequest("*",null,e,"REMOVE","DENY",t)}},UPDATE:{grantUser:function(e,t,n){return Backendless.Data.Permissions.sendRequest(e,null,t,"UPDATE","GRANT",n)},grantRole:function(e,t,n){return Backendless.Data.Permissions.sendRequest(null,e,t,"UPDATE","GRANT",n)},grant:function(e,t){return Backendless.Data.Permissions.sendRequest("*",null,e,"UPDATE","GRANT",t)},denyUser:function(e,t,n){return Backendless.Data.Permissions.sendRequest(e,null,t,"UPDATE","DENY",n)},denyRole:function(e,t,n){return Backendless.Data.Permissions.sendRequest(null,e,t,"UPDATE","DENY",n)},deny:function(e,t){return Backendless.Data.Permissions.sendRequest("*",null,e,"UPDATE","DENY",t)}}};function User(){}User.prototype.___class="Users";Backendless.User=User;var currentUser=null;var UserService=function(){this.restUrl=Backendless.appPath+"/users"};UserService.prototype={_wrapAsync:function(e,t){var n=this,s=function(s){currentUser=n._parseResponse(tryParseJSON(s),t);e.success(n._getUserFromResponse(currentUser))},r=function(t){e.fault(t)};return new Async(s,r)},_parseResponse:function(e,t){var n=new Backendless.User;deepExtend(n,e);if(t){Backendless.LocalCache.set("stayLoggedIn",t)}return n},register:function(e,t){if(!(e instanceof Backendless.User)){throw new Error("Only Backendless.User accepted")}var n=extractResponder(arguments);var s=n!=null;if(n){n=this._wrapAsync(n)}var r=Backendless._ajax({method:"POST",url:this.restUrl+"/register",isAsync:s,asyncHandler:n,data:JSON.stringify(e)});return s?r:this._parseResponse(r)},getUserRoles:function(e){var t=extractResponder(arguments);var n=t!=null;if(t){t=this._wrapAsync(t)}var s=Backendless._ajax({method:"GET",url:this.restUrl+"/userroles",isAsync:n,asyncHandler:t});return n?s:this._parseResponse(s)},roleHelper:function(e,t,n,s){if(!e){throw new Error("User identity can not be empty")}if(!t){throw new Error("Rolename can not be empty")}var r=extractResponder(arguments);return Backendless._ajax({method:"POST",url:this.restUrl+"/"+s,isAsync:!!r,asyncHandler:r,data:JSON.stringify({user:e,roleName:t})})},assignRole:function(e,t,n){return this.roleHelper(e,t,n,"assignRole")},unassignRole:function(e,t,n){return this.roleHelper(e,t,n,"unassignRole")},login:function(e,t,n,s){if(!e){throw new Error("Username can not be empty")}if(!t){throw new Error("Password can not be empty")}n=n===true;Backendless.LocalCache.remove("user-token");Backendless.LocalCache.remove("current-user-id");Backendless.LocalCache.set("stayLoggedIn",false);var r=extractResponder(arguments);var a=r!=null;if(r){r=this._wrapAsync(r,n)}var i={login:e,password:t};var o=Backendless._ajax({method:"POST",url:this.restUrl+"/login",isAsync:a,asyncHandler:r,data:JSON.stringify(i)});if(!a&&o){currentUser=this._parseResponse(o,n);o=this._getUserFromResponse(currentUser)}return o},_getUserFromResponse:function(e){Backendless.LocalCache.set("current-user-id",e.objectId);var t=new Backendless.User;for(var n in e){if(e.hasOwnProperty(n)){if(n=="user-token"){if(Backendless.LocalCache.get("stayLoggedIn")){Backendless.LocalCache.set("user-token",e[n])}continue}t[n]=e[n]}}return t},loggedInUser:function(){return Backendless.LocalCache.get("current-user-id")},describeUserClass:function(e){var t=extractResponder(arguments);var n=t!=null;return Backendless._ajax({method:"GET",url:this.restUrl+"/userclassprops",isAsync:n,asyncHandler:t})},restorePassword:function(e,t){if(!e){throw"Username can not be empty"}var n=extractResponder(arguments);var s=n!=null;return Backendless._ajax({method:"GET",url:this.restUrl+"/restorepassword/"+encodeURIComponent(e),isAsync:s,asyncHandler:n})},logout:function(e){var t=extractResponder(arguments),n=t!=null,s=n?t.fault:null,r=n?t.success:null,a={},i=function(){Backendless.LocalCache.remove("user-token");Backendless.LocalCache.remove("current-user-id");Backendless.LocalCache.remove("stayLoggedIn");currentUser=null},o=function(){i();if(Utils.isFunction(r)){r()}},c=function(e){if(Utils.isObject(e)&&[3064,3091,3090,3023].indexOf(e.code)!=-1){i()}if(Utils.isFunction(s)){s(e)}};if(t){t.fault=c;t.success=o}try{a=Backendless._ajax({method:"GET",url:this.restUrl+"/logout",isAsync:n,asyncHandler:t})}catch(l){c(l)}if(n){return a}else{i()}},getCurrentUser:function(){if(currentUser){return this._getUserFromResponse(currentUser)}var e=Backendless.LocalCache.get("stayLoggedIn");var t=e&&Backendless.LocalCache.get("current-user-id");return t&&persistence.of(User).findById(t)||null},update:function(e,t){var n=extractResponder(arguments);var s=n!=null;if(n){n=this._wrapAsync(n)}var r=Backendless._ajax({method:"PUT",url:this.restUrl+"/"+e.objectId,isAsync:s,asyncHandler:n,data:JSON.stringify(e)});return s?r:this._parseResponse(r)},loginWithFacebook:function(e,t,n,s){n=extractResponder(arguments);this._loginSocial("Facebook",e,t,n,null,s)},loginWithGooglePlus:function(e,t,n,s,r){n=extractResponder(arguments);this._loginSocial("GooglePlus",e,t,n,s,r)},loginWithTwitter:function(e,t,n){t=extractResponder(arguments);this._loginSocial("Twitter",e,null,t,null,n)},_socialContainer:function(e,t){var n;if(t){var s;t=t[0];n=document.createElement("div");n.innerHTML="Loading...";t.appendChild(n);t.style.cursor="wait";this.closeContainer=function(){t.style.cursor="default";t.removeChild(s)};this.removeLoading=function(){t.removeChild(n)};this.doAuthorizationActivity=function(e){this.removeLoading();s=document.createElement("iframe");s.frameBorder=0;s.width=t.style.width;s.height=t.style.height;s.id="SocialAuthFrame";s.setAttribute("src",e+"&output=embed");t.appendChild(s);s.onload=function(){t.style.cursor="default"}}}else{t=window.open("",e+" authorization","resizable=yes, scrollbars=yes, titlebar=yes, top=10, left=10");n=t.document.getElementsByTagName("body")[0].innerHTML;n="Loading...";t.document.getElementsByTagName("html")[0].style.cursor="wait";this.closeContainer=function(){t.close()};this.removeLoading=function(){n=null};this.doAuthorizationActivity=function(e){t.location.href=e;t.onload=function(){t.document.getElementsByTagName("html")[0].style.cursor="default"}}}},_loginSocial:function(e,t,n,s,r,a){var i=new this._socialContainer(e,r);s=s&&this._wrapAsync(s);Utils.addEvent("message",window,function(e){if(e.origin==Backendless.serverURL){var t=JSON.parse(e.data);if(t.fault){s.fault(t.fault)}else{Backendless.LocalCache.set("stayLoggedIn",!!a);currentUser=this.Backendless.UserService._parseResponse(t);s.success(this.Backendless.UserService._getUserFromResponse(currentUser))}Utils.removeEvent("message",window);i.closeContainer()}});var o=new Backendless.Async(function(e){i.doAuthorizationActivity(e)},function(e){i.closeContainer();s.fault(e)});var c={};c.fieldsMapping=t||{};c.permissions=n||[];Backendless._ajax({method:"POST",url:this.restUrl+"/social/oauth/"+e.toLowerCase()+"/request_url",isAsync:true,asyncHandler:o,data:JSON.stringify(c)})},loginWithFacebookSdk:function(e,t,n){if(!FB){throw new Error("Facebook SDK not found")}if(t instanceof Async){n=t;t=false}var s=this;FB.getLoginStatus(function(r){if(r.status==="connected"){s._sendSocialLoginRequest(s,r,"facebook",e,t,n)}else{FB.login(function(r){s._sendSocialLoginRequest(s,r,"facebook",e,t,n)})}})},loginWithGooglePlusSdk:function(e,t,n){if(!gapi){throw new Error("Google Plus SDK not found")}if(t instanceof Async){n=t;t=false}var s=this;gapi.auth.authorize({client_id:e.client_id,scope:"https://www.googleapis.com/auth/plus.login"},function(r){delete r["g-oauth-window"];s._sendSocialLoginRequest(s,r,"googleplus",e,t,n)})},_sendSocialLoginRequest:function(e,t,n,s,r,a){if(s){t["fieldsMapping"]=s}var i=new Backendless.Async(function(t){currentUser=e._parseResponse(t);Backendless.LocalCache.set("stayLoggedIn",!!r);a.success(e._getUserFromResponse(currentUser))},function(e){a.fault(e)});Backendless._ajax({method:"POST",url:e.restUrl+"/social/"+n+"/login/"+Backendless.applicationId,isAsync:true,asyncHandler:i,data:JSON.stringify(t)})},isValidLogin:function(e){var t=Backendless.LocalCache.get("user-token");var n=extractResponder(arguments);var s=n!=null;if(t){if(!e){try{var r=Backendless._ajax({method:"GET",url:Backendless.serverURL+"/"+Backendless.appVersion+"/users/isvalidusertoken/"+t});return!!r}catch(a){return false}}else{Backendless._ajax({method:"GET",url:Backendless.serverURL+"/"+Backendless.appVersion+"/users/isvalidusertoken/"+t,isAsync:s,asyncHandler:n&&this._wrapAsync(n)})}}else{var i=Backendless.UserService.getCurrentUser();if(s){setTimeout(function(){n[i?"success":"fault"]()},0)}else{return!!i}}},resendEmailConfirmation:function(e,t){if(!e||e instanceof Async){throw"Email cannot be empty"}var n=extractResponder(arguments);var s=!!n;return Backendless._ajax({method:"POST",url:this.restUrl+"/resendconfirmation/"+e,isAsync:s,asyncHandler:n})}};function Geo(){this.restUrl=Backendless.appPath+"/geo";this.monitoringId=null}Geo.prototype={UNITS:{METERS:"METERS",KILOMETERS:"KILOMETERS",MILES:"MILES",YARDS:"YARDS",FEET:"FEET"},_parseResponse:function(e){var t=e.collection;extendCollection(t,this);return t},_load:function(e,t){var n=extractResponder(arguments),s=n!=null;var r=Backendless._ajax({method:"GET", +url:e,isAsync:s,asyncHandler:n});return s?r:this._parseResponse(r)},_findHelpers:{searchRectangle:function(e){var t=["nwlat="+e[0],"nwlon="+e[1],"selat="+e[2],"selon="+e[3]];return t.join("&")},latitude:function(e){return"lat="+e},longitude:function(e){return"lon="+e},metadata:function(e){return"metadata="+JSON.stringify(e)},units:function(e){return"units="+e},radius:function(e){return"r="+e},categories:function(e){e=Utils.isString(e)?[e]:e;return"categories="+encodeArrayToUriComponent(e)},includeMetadata:function(e){return"includemetadata="+e},pageSize:function(e){if(e<1||e>100){throw new Error("PageSize can not be less then 1 or greater than 100")}else{return"pagesize="+e}},offset:function(e){if(e<0){throw new Error("Offset can not be less then 0")}else{return"offset="+e}},relativeFindPercentThreshold:function(e){if(e<=0){throw new Error("Threshold can not be less then or equal 0")}else{return"relativeFindPercentThreshold="+e}},relativeFindMetadata:function(e){return"relativeFindMetadata="+encodeURIComponent(JSON.stringify(e))},condition:function(e){return"whereClause="+encodeURIComponent(e)},degreePerPixel:function(e){return"dpp="+e},clusterGridSize:function(e){return"clustergridsize="+e},geoFence:function(e){return"geoFence="+e}},savePoint:function(e,t){if(e.latitude===undefined||e.longitude===undefined){throw"Latitude or longitude not a number"}e.categories=e.categories||["Default"];e.categories=Utils.isArray(e.categories)?e.categories:[e.categories];var n=e.objectId;var s=n?"PATCH":"PUT",r=this.restUrl+"/points";if(n){r+="/"+n}var a=extractResponder(arguments);var i=a!=null;var o=function(e){var t=function(t){var n=t.geopoint;var s=new GeoPoint;s.categories=n.categories;s.latitude=n.latitude;s.longitude=n.longitude;s.metadata=n.metadata;s.objectId=n.objectId;t.geopoint=s;e.success(t)};var n=function(t){e.fault(t)};return new Async(t,n)};a=o(a);return Backendless._ajax({method:s,url:r,data:JSON.stringify(e),isAsync:i,asyncHandler:a})},addPoint:function(e,t){return this.savePoint.apply(this,arguments)},findUtil:function(e,t){var n=e["url"],s=extractResponder(arguments),r=false;if(e.searchRectangle&&e.radius){throw new Error("Inconsistent geo query. Query should not contain both rectangle and radius search parameters.")}else if(e.radius&&(e.latitude===undefined||e.longitude===undefined)){throw new Error("Latitude and longitude should be provided to search in radius")}else if((e.relativeFindMetadata||e.relativeFindPercentThreshold)&&!(e.relativeFindMetadata&&e.relativeFindPercentThreshold)){throw new Error("Inconsistent geo query. Query should contain both relativeFindPercentThreshold and relativeFindMetadata or none of them")}else{n+=e.searchRectangle?"/rect?":"/points?";n+=e.units?"units="+e.units:"";for(var a in e){if(e.hasOwnProperty(a)&&this._findHelpers.hasOwnProperty(a)&&e[a]!=null){n+="&"+this._findHelpers[a](e[a])}}}n=n.replace(/\?&/g,"?");var i=this;var o=function(t){var n=function(n){var s=n.collection.data;for(var r=0;r0?1:-1);var r=this._countLittleRadius(s);var a,i,o,c;if(r>n){a=e.longitude-180*n/r;i=2*e.longitude-a;a=this._updateDegree(a);i=i%360==180?180:this._updateDegree(i)}else{a=-180;i=180}if(e.latitude>0){o=s;c=2*e.latitude-s}else{c=s;o=2*e.latitude-s}return[Math.min(o,90),a,Math.max(c,-90),i]},_getOutRectangleNodes:function(e){var t=e[0].latitude;var n=e[0].longitude;var s=e[0].latitude;var r=e[0].longitude;var a=0,i=0,o=0;for(var c=1;ct){t=e[c].latitude}if(e[c].latitude-180||l>270){if(l>270){l-=360}o+=l;if(o0&&l<=180||l<=-270){if(l<=-270){l+=360}o+=l;if(o>i){i=o}}}n+=a;r+=i;if(r-n>=360){r=180;n=-180}else{r=this._updateDegree(r);n=this._updateDegree(n)}return[t,n,s,r]},_getPointPosition:function(e,t,n){var s=n.longitude-t.longitude;if(s<0&&s>-180||s>180){var r=t;t=n;n=r}if(e.latitude-180||a>180){a=(a-360)%360}var i=(n.longitude-t.longitude+360)%360;var o=i*(e.latitude-t.latitude)/(n.latitude-t.latitude)-a;if(o>0){return"INTERSECT"}return"NO_INTERSECT"},_isPointInRectangular:function(e,t,n){if(e.latitude>t.latitude||e.latituden.longitude){return e.longitude>=t.longitude||e.longitude<=n.longitude}else{return e.longitude>=t.longitude&&e.longitude<=n.longitude}},_isPointInCircle:function(e,t,n){return this._distance(e.latitude,e.longitude,t.latitude,t.longitude)<=n},_isPointInShape:function(e,t){var n=0;function s(e,t){return(e+1)%t.length}for(var r=0;r-1){(function(e,t,n){return f(e,t,n)})(c,t,d)}else{r["onstay"](o._trackedFences[c].geofenceName,o._trackedFences[c].objectId,t.latitude,t.longitude)}}else{clearTimeout(o._timers[o._trackedFences[c].geofenceName]);r[u](o._trackedFences[c].geofenceName,o._trackedFences[c].objectId,t.latitude,t.longitude)}}else if(s){s.latitude=t.latitude;s.longitude=t.longitude;if(u=="onenter"){o._runFenceAction(u,o._trackedFences[c].geofenceName,s,i);if(d>-1){(function(e,t,n,s){return h(e,t,n,s)})(c,t,d,s)}else{o._runFenceAction("onstay",o._trackedFences[c].geofenceName,s,i)}}else{clearTimeout(o._timers[o._trackedFences[c].geofenceName]);o._runFenceAction(u,o._trackedFences[c].geofenceName,s,i)}}}}},_mobilecheck:function(){var e=false;(function(t){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))){e=true}})(navigator.userAgent||navigator.vendor||window.opera);return e},_trackedFences:[],_lastResults:{},_startMonitoring:function(e,t,n){var s=this;var r=false;if(t instanceof GeoPoint){r=true}var a=this._getFences(e);for(var i=0;i=200&&t.status<300){a.success(JSON.parse(t.responseText))}else{a.fault(JSON.parse(t.responseText))}}}}t.sendAsBinary(s);if(a){return t}if(t.status>=200&&t.status<300){return t.responseText?JSON.parse(t.responseText):true}else{throw r(t)}}function sendEncoded(e){var t=new XMLHttpRequest,n="-backendless-multipart-form-boundary-"+getNow(),s=function(e){var t={};try{t=JSON.parse(e.responseText)}catch(n){t.message=e.responseText}t.statusCode=e.status;return t};t.open("PUT",this.uploadPath,true);t.setRequestHeader("Content-Type","text/plain");t.setRequestHeader("application-id",Backendless.applicationId);t.setRequestHeader("secret-key",Backendless.secretKey);t.setRequestHeader("application-type","JS");if(UIState!==null){t.setRequestHeader("uiState",UIState)}var r=this.asyncHandler;if(r){t.onreadystatechange=function(){if(t.readyState==4){if(t.status>=200&&t.status<300){r.success(JSON.parse(t.responseText))}else{r.fault(JSON.parse(t.responseText))}}}}t.send(e.target.result.split(",")[1]);if(r){return t}if(t.status>=200&&t.status<300){return t.responseText?JSON.parse(t.responseText):true}else{throw s(t)}}function FilePermissions(){this.restUrl=Backendless.appPath+"/files/permissions"}FilePermissions.prototype={grantUser:function(e,t,n,s){this.varType="user";this.id=e;return this.grant(t,n,s)},grantRole:function(e,t,n,s){this.varType="role";this.id=e;return this.grant(t,n,s)},grant:function(e,t,n){return this.sendRequest("GRANT",e,t,n)},denyUser:function(e,t,n,s){this.varType="role";this.id=e;return this.deny(t,n,s)},denyRole:function(e,t,n,s){this.varType="role";this.id=e;return this.deny(t,n,s)},deny:function(e,t,n){return this.sendRequest("DENY",e,t,n)},sendRequest:function(e,t,n,s){var r=extractResponder(arguments),a=r!=null,i={permission:n};i[this.varType]=this.id||"*";return Backendless._ajax({method:"PUT",url:this.restUrl+"/"+e+"/"+encodeURIComponent(t),data:JSON.stringify(i),isAsync:a,asyncHandler:r})}};function Files(){this.restUrl=Backendless.appPath+"/files"}Files.prototype={saveFile:function(e,t,n,s,r){if(!e||!Utils.isString(e)){throw new Error('Missing value for the "path" argument. The argument must contain a string value')}if(!t||!Utils.isString(e)){throw new Error('Missing value for the "fileName" argument. The argument must contain a string value')}if(s instanceof Backendless.Async){r=s;s=null}if(!(n instanceof File)){n=new Blob([n])}if(n.size>28e5){throw new Error("File Content size must be less than 2,800,000 bytes")}var a=this.restUrl+"/binary/"+e+(Utils.isString(t)?"/"+t:"")+(s?"?overwrite=true":"");try{var i=new FileReader;i.fileName=encodeURIComponent(t).replace(/'/g,"%27").replace(/"/g,"%22");i.uploadPath=a;i.onloadend=sendEncoded;if(r){i.asyncHandler=r}i.onerror=function(e){r.fault(e)};i.readAsDataURL(n);if(!r){return true}}catch(o){console.log(o)}},upload:function(e,t,n,s){e=e.files||e;var r=this.restUrl+"/"+t+"/";var a="";if(Utils.isBoolean(n)){a="?overwrite="+n}if(isBrowser){if(window.File&&window.FileList){if(e instanceof File){e=[e]}var i=0;for(var o=0,c=e.length;o1&&!(arguments[1]instanceof Backendless.Async)){c+="?"}if(Utils.isString(t)){c+="pattern="+t}if(Utils.isBoolean(n)){c+="&sub="+n}if(Utils.isNumber(s)){c+="&pagesize="+s}if(Utils.isNumber(r)){c+="&offset="+r}return Backendless._ajax({method:"GET",url:c,isAsync:o,asyncHandler:i})},renameFile:function(e,t,n){this._checkPath(e);var s={oldPathName:e,newName:t};return this._doAction("rename",s,n)},moveFile:function(e,t,n){this._checkPath(e);this._checkPath(t);var s={sourcePath:e,targetPath:t};return this._doAction("move",s,n)},copyFile:function(e,t,n){this._checkPath(e);this._checkPath(t);var s={sourcePath:e,targetPath:t};return this._doAction("copy",s,n)},_checkPath:function(e){if(!/^\//.test(e)){e="/"+e}return e},_doAction:function(e,t,n){var s=extractResponder(arguments);var r=s!=null;return Backendless._ajax({method:"PUT",url:this.restUrl+"/"+e,data:JSON.stringify(t),isAsync:r,asyncHandler:s})},remove:function(e,t){var n=extractResponder(arguments);var s=n!=null;var r=e.indexOf("http://")===0||e.indexOf("https://")===0?e:this.restUrl+"/"+e;Backendless._ajax({method:"DELETE",url:r,isAsync:s,asyncHandler:n})},exists:function(e,t){if(!e||!Utils.isString(e)){throw new Error('Missing value for the "path" argument. The argument must contain a string value')}var n=extractResponder(arguments),s=n!=null,r=this.restUrl+"/exists/"+e;return Backendless._ajax({method:"GET",url:r,isAsync:s,asyncHandler:n})},removeDirectory:function(e,t){var n=extractResponder(arguments);var s=n!=null;return Backendless._ajax({method:"DELETE",url:this.restUrl+"/"+e,isAsync:s,asyncHandler:n})}};function Commerce(){this.restUrl=Backendless.appPath+"/commerce/googleplay"}Commerce.prototype.validatePlayPurchase=function(e,t,n,s){if(arguments.length<3){throw new Error("Package Name, Product Id, Token must be provided and must be not an empty STRING!")}for(var r=arguments.length-2;r>=0;r--){if(!arguments[r]||!Utils.isString(arguments[r])){throw new Error("Package Name, Product Id, Token must be provided and must be not an empty STRING!")}}var a=extractResponder(arguments),i=a!=null;if(a){a=wrapAsync(a)}return Backendless._ajax({method:"GET",url:this.restUrl+"/validate/"+e+"/inapp/"+t+"/purchases/"+n,isAsync:i,asyncHandler:a})};Commerce.prototype.cancelPlaySubscription=function(e,t,n,s){if(arguments.length<3){throw new Error("Package Name, Subscription Id, Token must be provided and must be not an empty STRING!")}for(var r=arguments.length-2;r>=0;r--){if(!arguments[r]||!Utils.isString(arguments[r])){throw new Error("Package Name, Subscription Id, Token must be provided and must be not an empty STRING!")}}var a=extractResponder(arguments),i=a!=null;if(a){a=wrapAsync(a)}return Backendless._ajax({method:"POST",url:this.restUrl+"/"+e+"/subscription/"+t+"/purchases/"+n+"/cancel",isAsync:i,asyncHandler:a})};Commerce.prototype.getPlaySubscriptionStatus=function(e,t,n,s){if(arguments.length<3){throw new Error("Package Name, Subscription Id, Token must be provided and must be not an empty STRING!")}for(var r=arguments.length-2;r>=0;r--){if(!arguments[r]||!Utils.isString(arguments[r])){throw new Error("Package Name, Subscription Id, Token must be provided and must be not an empty STRING!")}}var a=extractResponder(arguments),i=a!=null;if(a){a=wrapAsync(a)}return Backendless._ajax({method:"GET",url:this.restUrl+"/"+e+"/subscription/"+t+"/purchases/"+n, +isAsync:i,asyncHandler:a})};function Events(){this.restUrl=Backendless.appPath+"/servercode/events"}Events.prototype.dispatch=function(e,t,n){if(!e||!Utils.isString(e)){throw new Error("Event Name must be provided and must be not an empty STRING!")}t=Utils.isObject(t)?t:{};var s=extractResponder(arguments),r=s!=null;if(s){s=wrapAsync(s)}t=t instanceof Backendless.Async?{}:t;return Backendless._ajax({method:"POST",url:this.restUrl+"/"+e,data:JSON.stringify(t),isAsync:r,asyncHandler:s})};var Cache=function(){};var FactoryMethods={};Cache.prototype={put:function(e,t,n,s){if(!Utils.isString(e)){throw new Error("You can use only String as key to put into Cache")}if(!(n instanceof Backendless.Async)){if(typeof n=="object"&&!arguments[3]){s=n;n=null}else if(typeof n!=("number"||"string")&&n!=null){throw new Error("You can use only String as timeToLive attribute to put into Cache")}}else{s=n;n=null}if(Utils.isObject(t)&&t.constructor!==Object){t.___class=t.___class||getClassName.call(t)}var r=extractResponder([s]),a=false;if(r!=null){a=true;r=wrapAsync(r)}return Backendless._ajax({method:"PUT",url:Backendless.serverURL+"/"+Backendless.appVersion+"/cache/"+e+(n?"?timeout="+n:""),data:JSON.stringify(t),isAsync:a,asyncHandler:r})},expireIn:function(e,t,n){if(Utils.isString(e)&&(Utils.isNumber(t)||Utils.isDate(t))&&t){t=Utils.isDate(t)?t.getTime():t;var s=extractResponder(arguments),r=false;if(s!=null){r=true;s=wrapAsync(s)}return Backendless._ajax({method:"PUT",url:Backendless.serverURL+"/"+Backendless.appVersion+"/cache/"+e+"/expireIn?timeout="+t,data:JSON.stringify({}),isAsync:r,asyncHandler:s})}else{throw new Error('The "key" argument must be String. The "seconds" argument can be either Number or Date')}},expireAt:function(e,t,n){if(Utils.isString(e)&&(Utils.isNumber(t)||Utils.isDate(t))&&t){t=Utils.isDate(t)?t.getTime():t;var s=extractResponder(arguments),r=false;if(s!=null){r=true;s=wrapAsync(s)}return Backendless._ajax({method:"PUT",url:Backendless.serverURL+"/"+Backendless.appVersion+"/cache/"+e+"/expireAt?timestamp="+t,data:JSON.stringify({}),isAsync:r,asyncHandler:s})}else{throw new Error("You can use only String as key while expire in Cache. Second attribute must be declared and must be a Number or Date type")}},cacheMethod:function(e,t,n,s){if(!Utils.isString(t)){throw new Error('The "key" argument must be String')}var r=extractResponder(arguments),a=false;if(r!=null){a=true;r=wrapAsync(r)}return Backendless._ajax({method:e,url:Backendless.serverURL+"/"+Backendless.appVersion+"/cache/"+t+(n?"/check":""),isAsync:a,asyncHandler:r})},contains:function(e,t){return this.cacheMethod("GET",e,true,t)},get:function(e,t){if(!Utils.isString(e)){throw new Error('The "key" argument must be String')}function n(e){var t=e&&e.___class;if(t){var n=FactoryMethods[t]||root[t];if(n){e=new n(e)}}return e}var s=extractResponder(arguments),r=false;if(s!=null){r=true;s=wrapAsync(s,n,this)}var a=Backendless._ajax({method:"GET",url:Backendless.serverURL+"/"+Backendless.appVersion+"/cache/"+e,isAsync:r,asyncHandler:s});return r?a:n(a)},remove:function(e,t){return this.cacheMethod("DELETE",e,false,t)},setObjectFactory:function(e,t){FactoryMethods[e]=t}};var Counters=function(){};var AtomicInstance=function(e){this.name=e};Counters.prototype={of:function(e){return new AtomicInstance(e)},getConstructor:function(){return this},counterNameValidation:function(e){if(!e){throw new Error('Missing value for the "counterName" argument. The argument must contain a string value.')}if(!Utils.isString(e)){throw new Error('Invalid value for the "value" argument. The argument must contain only string values')}this.name=e},implementMethod:function(e,t,n){var s=extractResponder(arguments),r=false;if(s!=null){r=true;s=wrapAsync(s)}return Backendless._ajax({method:e,url:Backendless.serverURL+"/"+Backendless.appVersion+"/counters/"+this.name+t,isAsync:r,asyncHandler:s})},incrementAndGet:function(e,t){this.counterNameValidation(e,t);return this.implementMethod("PUT","/increment/get",t)},getAndIncrement:function(e,t){this.counterNameValidation(e,t);return this.implementMethod("PUT","/get/increment",t)},decrementAndGet:function(e,t){this.counterNameValidation(e,t);return this.implementMethod("PUT","/decrement/get",t)},getAndDecrement:function(e,t){this.counterNameValidation(e,t);return this.implementMethod("PUT","/get/decrement",t)},reset:function(e,t){this.counterNameValidation(e,t);return this.implementMethod("PUT","/reset",t)},get:function(e,t){this.counterNameValidation(e,t);var n=extractResponder(arguments),s=false;if(n!=null){s=true;n=wrapAsync(n)}return Backendless._ajax({method:"GET",url:Backendless.serverURL+"/"+Backendless.appVersion+"/counters/"+this.name,isAsync:s,asyncHandler:n})},implementMethodWithValue:function(e,t,n){if(!t){throw new Error('Missing value for the "value" argument. The argument must contain a numeric value.')}if(!Utils.isNumber(t)){throw new Error('Invalid value for the "value" argument. The argument must contain only numeric values')}var s=extractResponder(arguments),r=false;if(s!=null){r=true;s=wrapAsync(s)}return Backendless._ajax({method:"PUT",url:Backendless.serverURL+"/"+Backendless.appVersion+"/counters/"+this.name+e+(t?t:""),isAsync:r,asyncHandler:s})},addAndGet:function(e,t,n){this.counterNameValidation(e,n);return this.implementMethodWithValue("/get/incrementby?value=",t,n)},getAndAdd:function(e,t,n){this.counterNameValidation(e,n);return this.implementMethodWithValue("/incrementby/get?value=",t,n)},compareAndSet:function(e,t,n,s){this.counterNameValidation(e,s);if(!t||!n){throw new Error('Missing values for the "expected" and/or "updated" arguments. The arguments must contain numeric values')}if(!Utils.isNumber(t)||!Utils.isNumber(n)){throw new Error('Missing value for the "expected" and/or "updated" arguments. The arguments must contain a numeric value')}var r=extractResponder(arguments),a=false;if(r!=null){a=true;r=wrapAsync(r)}return Backendless._ajax({method:"PUT",url:Backendless.serverURL+"/"+Backendless.appVersion+"/counters/"+this.name+"/get/compareandset?expected="+(t&&n?t+"&updatedvalue="+n:""),isAsync:a,asyncHandler:r})}};AtomicInstance.prototype={incrementAndGet:function(e){return Counters.prototype.getConstructor().incrementAndGet(this.name,e)},getAndIncrement:function(e){return Counters.prototype.getConstructor().getAndIncrement(this.name,e)},decrementAndGet:function(e){return Counters.prototype.getConstructor().decrementAndGet(this.name,e)},getAndDecrement:function(e){return Counters.prototype.getConstructor().getAndDecrement(this.name,e)},reset:function(e){return Counters.prototype.getConstructor().reset(this.name,e)},get:function(e){return Counters.prototype.getConstructor().get(this.name,e)},addAndGet:function(e,t){return Counters.prototype.getConstructor().addAndGet(this.name,e,t)},getAndAdd:function(e,t){return Counters.prototype.getConstructor().getAndAdd(this.name,e,t)},compareAndSet:function(e,t,n){return Counters.prototype.getConstructor().getAndAdd(this.name,e,t,n)}};var lastFlushListeners;Backendless.Logging={restUrl:root.url,loggers:{},logInfo:[],messagesCount:0,numOfMessages:10,timeFrequency:1,getLogger:function(e){if(!Utils.isString(e)){throw new Error("Invalid 'loggerName' value. LoggerName must be a string value")}if(!this.loggers[e]){this.loggers[e]=new Logging(e)}return this.loggers[e]},flush:function(){var e=extractResponder(arguments);if(this.logInfo.length){this.flushInterval&&clearTimeout(this.flushInterval);var t;var n=function(e){return function(){for(var n=0;nthis.numOfMessages-1){this.sendRequest()}},setLogReportingPolicy:function(e,t){this.numOfMessages=e;this.timeFrequency=t;this.checkMessagesLen()}};function Logging(e){this.name=e}function setLogMessage(e,t,n,s){var r={};r["message"]=n;r["timestamp"]=Date.now();r["exception"]=s?s:null;r["logger"]=e;r["log-level"]=t;Backendless.Logging.logInfo.push(r);Backendless.Logging.messagesCount++;Backendless.Logging.checkMessagesLen()}Logging.prototype={debug:function(e){return setLogMessage(this.name,"DEBUG",e)},info:function(e){return setLogMessage(this.name,"INFO",e)},warn:function(e,t){return setLogMessage(this.name,"WARN",e,t)},error:function(e,t){return setLogMessage(this.name,"ERROR",e,t)},fatal:function(e,t){return setLogMessage(this.name,"FATAL",e,t)},trace:function(e){return setLogMessage(this.name,"TRACE",e)}};function CustomServices(){}CustomServices.prototype={invoke:function(e,t,n,s,r){var a=extractResponder(arguments),i=a!=null;return Backendless._ajax({method:"POST",url:Backendless.serverURL+"/"+Backendless.appVersion+"/services/"+e+"/"+t+"/"+n,data:JSON.stringify(s),isAsync:i,asyncHandler:a})}};function promisify(e){return function(){var t=this;var n=[].slice.call(arguments);return new Promise(function(s,r){n.push(new Async(s,r,t));e.apply(t,n)})}}function promisifyPack(e){var t=e[0];var n=e[1];n.forEach(function(e){t[e]=promisify(t[e])})}function enablePromises(){if(promisesEnabled){return}if(typeof Promise==="undefined"){throw new Error("Promises are not supported by your browser. "+'Please use "Backendless.Async" to make async requests, '+"or upgrade to a modern browser.\nSee "+"http://caniuse.com/#feat=promises")}promisesEnabled=true;[[DataPermissions.prototype.FIND,Object.keys(DataPermissions.prototype.FIND)],[DataPermissions.prototype.REMOVE,Object.keys(DataPermissions.prototype.REMOVE)],[DataPermissions.prototype.UPDATE,Object.keys(DataPermissions.prototype.UPDATE)],[Files.prototype,["saveFile","upload","listing","_doAction","remove","exists","removeDirectory"]],[Commerce.prototype,["validatePlayPurchase","cancelPlaySubscription","getPlaySubscriptionStatus"]],[Counters.prototype,["implementMethod","get","implementMethodWithValue","compareAndSet"]],[DataStore.prototype,["save","remove","find","findById","loadRelations"]],[Cache.prototype,["put","expireIn","expireAt","cacheMethod","get"]],[persistence,["describe","getView","callStoredProcedure"]],[FilePermissions.prototype,["sendRequest"]],[CustomServices.prototype,["invoke"]],[Events.prototype,["dispatch"]],[PollingProxy.prototype,["poll"]],[Backendless.Logging,["flush"]],[Messaging.prototype,["publish","sendEmail","cancel","subscribe","registerDevice","getRegistrations","unregisterDevice"]],[Geo.prototype,["addPoint","savePoint","findUtil","loadMetadata","getClusterPoints","addCategory","getCategories","deleteCategory","deletePoint"]],[UserService.prototype,["register","getUserRoles","roleHelper","login","describeUserClass","restorePassword","logout","update","isValidLogin","loginWithFacebookSdk","loginWithGooglePlusSdk","loginWithGooglePlus","loginWithTwitter","loginWithFacebook","resendEmailConfirmation"]]].forEach(promisifyPack);UserService.prototype.getCurrentUser=function(){if(currentUser){return Promise.resolve(this._getUserFromResponse(currentUser))}var e=Backendless.LocalCache.get("stayLoggedIn");var t=e&&Backendless.LocalCache.get("current-user-id");return t&&persistence.of(User).findById(t)||Promise.resolve(null)};UserService.prototype.isValidLogin=function(){var e=Backendless.LocalCache.get("user-token");if(e){return new Promise(function(t,n){return Backendless._ajax({method:"GET",url:Backendless.serverURL+"/"+Backendless.appVersion+"/users/isvalidusertoken/"+e,isAsync:true,asyncHandler:new Async(t,n)})})}return Backendless.UserService.getCurrentUser().then(function(e){return Promise.resolve(!!e)},function(){return Promise.resolve(false)})}}Backendless.initApp=function(e,t,n){Backendless.applicationId=e;Backendless.secretKey=t;Backendless.appVersion=n;Backendless.appPath=[Backendless.serverURL,Backendless.appVersion].join("/");Backendless.UserService=new UserService;Backendless.Users=Backendless.UserService;Backendless.Geo=new Geo;Backendless.Persistence=persistence;Backendless.Data=persistence;Backendless.Data.Permissions=new DataPermissions;Backendless.Messaging=new Messaging;Backendless.Files=new Files;Backendless.Files.Permissions=new FilePermissions;Backendless.Commerce=new Commerce;Backendless.Events=new Events;Backendless.Cache=new Cache;Backendless.Counters=new Counters;Backendless.CustomServices=new CustomServices;dataStoreCache={};currentUser=null};var DataQuery=function(){this.properties=[];this.condition=null;this.options=null;this.url=null};DataQuery.prototype={addProperty:function(e){this.properties=this.properties||[];this.properties.push(e)}};var GeoQuery=function(){this.searchRectangle=undefined;this.categories=[];this.includeMetadata=true;this.metadata=undefined;this.condition=undefined;this.relativeFindMetadata=undefined;this.relativeFindPercentThreshold=undefined;this.pageSize=undefined;this.latitude=undefined;this.longitude=undefined;this.radius=undefined;this.units=undefined;this.degreePerPixel=undefined;this.clusterGridSize=undefined};GeoQuery.prototype={addCategory:function(){this.categories=this.categories||[];this.categories.push()},setClusteringParams:function(e,t,n,s){s=s||0;var r=parseFloat(e),a=parseFloat(t),i=parseInt(n),o=parseInt(s);if(!isFinite(r)||r<-180||r>180){throw new Error("The westLongitude value must be a number in the range between -180 and 180")}if(!isFinite(a)||a<-180||a>180){throw new Error("The eastLongitude value must be a number in the range between -180 and 180")}if(!isFinite(i)||i<1){throw new Error("The mapWidth value must be a number greater or equal to 1")}if(!isFinite(o)||o<0){throw new Error("The clusterGridSize value must be a number greater or equal to 0")}var c=a-r;c<0&&(c+=360);this.degreePerPixel=c/i;this.clusterGridSize=o||null}};var GeoPoint=function(e){e=e||{};this.___class="GeoPoint";this.categories=e.categories;this.latitude=e.latitude;this.longitude=e.longitude;this.metadata=e.metadata;this.objectId=e.objectId};var GeoCluster=function(e){e=e||{};this.categories=e.categories;this.latitude=e.latitude;this.longitude=e.longitude;this.metadata=e.metadata;this.objectId=e.objectId;this.totalPoints=e.totalPoints;this.geoQuery=e.geoQuery};var PublishOptionsHeaders={MESSAGE_TAG:"message",IOS_ALERT_TAG:"ios-alert",IOS_BADGE_TAG:"ios-badge",IOS_SOUND_TAG:"ios-sound",ANDROID_TICKER_TEXT_TAG:"android-ticker-text",ANDROID_CONTENT_TITLE_TAG:"android-content-title",ANDROID_CONTENT_TEXT_TAG:"android-content-text",ANDROID_ACTION_TAG:"android-action",WP_TYPE_TAG:"wp-type",WP_TITLE_TAG:"wp-title",WP_TOAST_SUBTITLE_TAG:"wp-subtitle",WP_TOAST_PARAMETER_TAG:"wp-parameter",WP_TILE_BACKGROUND_IMAGE:"wp-backgroundImage",WP_TILE_COUNT:"wp-count",WP_TILE_BACK_TITLE:"wp-backTitle",WP_TILE_BACK_BACKGROUND_IMAGE:"wp-backImage",WP_TILE_BACK_CONTENT:"wp-backContent",WP_RAW_DATA:"wp-raw"};var PublishOptions=function(e){e=e||{};this.publisherId=e.publisherId||undefined;this.headers=e.headers||undefined;this.subtopic=e.subtopic||undefined};var DeliveryOptions=function(e){e=e||{};this.pushPolicy=e.pushPolicy||undefined;this.pushBroadcast=e.pushBroadcast||undefined;this.pushSinglecast=e.pushSinglecast||undefined;this.publishAt=e.publishAt||undefined;this.repeatEvery=e.repeatEvery||undefined;this.repeatExpiresAt=e.repeatExpiresAt||undefined};var Bodyparts=function(e){e=e||{};this.textmessage=e.textmessage||undefined;this.htmlmessage=e.htmlmessage||undefined};var SubscriptionOptions=function(e){e=e||{};this.subscriberId=e.subscriberId||undefined;this.subtopic=e.subtopic||undefined;this.selector=e.selector||undefined};Backendless.DataQuery=DataQuery;Backendless.GeoQuery=GeoQuery;Backendless.GeoPoint=GeoPoint;Backendless.GeoCluster=GeoCluster;Backendless.Bodyparts=Bodyparts;Backendless.PublishOptions=PublishOptions;Backendless.DeliveryOptions=DeliveryOptions;Backendless.SubscriptionOptions=SubscriptionOptions;Backendless.PublishOptionsHeaders=PublishOptionsHeaders;try{root.GeoPoint=Backendless.GeoPoint;root.GeoCluster=Backendless.GeoCluster;root.BackendlessGeoQuery=Backendless.GeoQuery;root.Bodyparts=Backendless.Bodyparts;root.PublishOptions=Backendless.PublishOptions;root.DeliveryOptions=Backendless.DeliveryOptions;root.SubscriptionOptions=Backendless.SubscriptionOptions;root.PublishOptionsHeaders=Backendless.PublishOptionsHeaders}catch(error){console&&console.warn(error)}return Backendless}); //# sourceMappingURL=libs/backendless.min.map \ No newline at end of file diff --git a/libs/backendless.min.map b/libs/backendless.min.map index 5404849a..149d240a 100644 --- a/libs/backendless.min.map +++ b/libs/backendless.min.map @@ -1 +1 @@ -{"version":3,"file":"libs/backendless.min.js","sources":["libs/backendless.js"],"names":["factory","root","self","global","define","amd","Backendless","exports","module","NodeDevice","name","platform","uuid","version","isBrowser","Function","WebSocket","UIState","previousBackendless","emptyFn","VERSION","serverURL","noConflict","this","Array","prototype","indexOf","searchElement","fromIndex","k","TypeError","O","Object","len","length","n","Math","abs","Infinity","max","initXHR","browser","ua","navigator","userAgent","toLowerCase","match","exec","matched","getNow","Date","getTime","promisesEnabled","enablePromises","Utils","isObject","obj","isString","toString","call","slice","isNumber","isFunction","isBoolean","isDate","isArray","addEvent","evnt","elem","func","addEventListener","attachEvent","isEmpty","key","hasOwnProperty","undefined","removeEvent","removeEventListener","detachEvent","XMLHttpRequest","sendAsBinary","text","data","ArrayBuffer","ui8a","Uint8Array","i","charCodeAt","send","e","tryParseJSON","s","JSON","parse","setUIState","stateName","Error","_ajax_for_browser","config","cashingAllowedArr","cacheMethods","ignoreCache","sendRequest","cacheOnly","cachedResult","LocalCache","get","url","replace","cacheError","message","statusCode","isAsync","asyncHandler","success","fault","remoteDataOnly","fromCacheOrRemote","fromRemoteOrCache","fromCacheAndRemote","result","remote","local","xhr","contentType","response","parseResponse","responseText","badResponse","status","cacheHandler","cloneObject","method","cacheActive","cachePolicy","set","urlBlueprint","exists","getCachePolicy","checkInCache","policy","open","setRequestHeader","applicationId","secretKey","currentUser","onreadystatechange","readyState","error","_ajax_for_nodejs","stringify","u","require","https","protocol","options","host","hostname","port","path","headers","Content-Length","Buffer","byteLength","Content-Type","application-id","secret-key","application-type","buffer","httpx","req","request","res","setEncoding","on","chunk","callback","write","end","_ajax","getClassName","___class","instStringified","constructor","results","encodeArrayToUriComponent","arr","props","push","encodeURIComponent","join","classWrapper","wrapper","wrapperName","Wrapper","property","eval","deepExtend","destination","source","extractResponder","args","Async","wrapAsync","async","parser","context","extendCollection","collection","dataMapper","nextPage","split","appVersion","_nextPage","_load","promisify","getPage","offset","pageSize","arguments","successCallback","faultCallback","setCache","store","localStorageName","storage","enabled","value","remove","clear","flushExpired","getAll","serialize","deserialize","isLocalStorageSupported","window","localStorage","setItem","removeItem","createBndlsStorage","expired","addTimestamp","val","backendlessObj","getItem","ret","prop","DataStore","model","className","restUrl","appPath","_extractQueryOptions","params","sortBy","relationsDepth","floor","relations","_parseResponse","_Model","item","fields","_formCircDeps","_parseFindResponse","responder","_replCircDeps","objMap","pos","genID","b","a","random","_replCircDepsHelper","__originSubID","circDepsIDs","_formCircDepsHelper","save","objRef","objId","objectId","find","dataQuery","whereClause","query","properties","condition","_buildArgsObject","type","findById","argsObj","apply","concat","loadRelations","findFirst","findLast","dataStoreCache","persistence","getView","viewName","callStoredProcedure","spName","argumentValues","of","tableName","describe","DataPermissions","getRestUrl","dataObject","permissionType","userid","rolename","permission","user","role","FIND","grantUser","Data","Permissions","grantRole","grant","denyUser","denyRole","deny","REMOVE","UPDATE","User","UserService","_wrapAsync","stayLoggedIn","me","_getUserFromResponse","register","getUserRoles","roleHelper","identity","operation","roleName","assignRole","unassignRole","login","username","password","newUser","loggedInUser","describeUserClass","restorePassword","emailAddress","logout","errorCallback","logoutUser","onLogoutSuccess","onLogoutError","code","getCurrentUser","currentUserId","update","loginWithFacebook","facebookFieldsMapping","permissions","_loginSocial","loginWithGooglePlus","googlePlusFieldsMapping","container","loginWithTwitter","twitterFieldsMapping","_socialContainer","socialType","loadingMsg","client","document","createElement","innerHTML","appendChild","style","cursor","closeContainer","removeChild","removeLoading","doAuthorizationActivity","frameBorder","width","height","id","setAttribute","onload","getElementsByTagName","close","location","href","fieldsMapping","socialContainer","origin","interimCallback","r","loginWithFacebookSdk","FB","getLoginStatus","_sendSocialLoginRequest","loginWithGooglePlusSdk","gapi","auth","authorize","client_id","scope","isValidLogin","userToken","setTimeout","Geo","monitoringId","UNITS","METERS","KILOMETERS","MILES","YARDS","FEET","_findHelpers","searchRectangle","arg","rect","latitude","longitude","metadata","units","radius","categories","includeMetadata","relativeFindPercentThreshold","relativeFindMetadata","degreePerPixel","clusterGridSize","geoFence","savePoint","geopoint","responderOverride","geoObject","geoPoint","GeoPoint","addPoint","findUtil","geoCollection","GeoCluster","totalPoints","geoQuery","distance","loadMetadata","GeoQuery","getClusterPoints","relativeFind","addCategory","getCategories","deleteCategory","deletePoint","point","pointId","getFencePoints","geoFenceName","_runFenceAction","action","runOnStayAction","runOnExitAction","runOnEnterAction","_getFences","EARTH_RADIUS","_distance","lat1","lon1","lat2","lon2","deltaLon","PI","acos","sin","cos","_updateDegree","degree","_countLittleRadius","h","diametre","l_2","pow","sqrt","_isDefiniteRect","nwPoint","sePoint","_getOutRectangle","_getOutRectangleNodes","_getOutRectangleCircle","center","bounded","boundLat","littleRadius","westLong","eastLong","northLat","southLat","min","geoPoints","nwLat","nwLon","seLat","seLon","minLon","maxLon","lon","_getPointPosition","first","second","delta","tmp","x","x2","_isPointInRectangular","currentPosition","_isPointInCircle","_isPointInShape","shape","count","getIndex","position","_isPointInFence","nodes","_typesMapper","RECT","fence","CIRCLE","outRect","SHAPE","_maxDuration","_timers","_checkPosition","geofenceName","coords","fences","GeoFenceCallback","lastResults","_trackedFences","isInFence","rule","duration","onStayDuration","timeoutFuncInApp","savedK","savedCoords","callBack","timeoutFuncRemote","clearTimeout","_mobilecheck","check","test","substr","vendor","opera","_lastResults","_startMonitoring","secondParam","isGeoPoint","ii","_containsByPropName","object","getPosition","getCurPos","geolocation","getCurrentPosition","timeout","enableHighAccuracy","setInterval","watchPosition","startGeofenceMonitoringWithInAppCallback","inAppCallback","startGeofenceMonitoringWithRemoteCallback","stopGeofenceMonitoring","splice","_lastResuls","clearInterval","clearWatch","Proxy","eventName","handler","eventHandlers","fireEvent","handlers","PollingProxy","timer","interval","needReconnect","onMessage","onError","poll","onTimeout","abort","SocketProxy","reconnectWithPolling","socket","onopen","sockOpen","onerror","sockError","onclose","onSocketClose","onmessage","event","Subscription","channelName","channelProperties","subscriptionId","_subscribe","onSubscribe","_async","_startSubscription","subscription","proxy","_switchToPolling","cancelSubscription","messages","Messaging","_getProperties","subscribe","subscriptionCallback","subscriptionOptions","that","publish","publishOptions","deliveryTarget","PublishOptions","DeliveryOptions","sendEmail","subject","bodyParts","recipients","attachments","Bodyparts","bodyparts","to","attachment","cancel","messageId","registerDevice","channels","expiration","device","deviceToken","deviceId","os","osVersion","fail","console","warn","projectid","appid","cordova","getRegistrations","unregisterDevice","log","getBuilder","filename","filedata","boundary","dashdash","crlf","builder","fileName","target","uploadPath","sendEncoded","FilePermissions","varType","Files","saveFile","fileContent","overwrite","File","Blob","size","baseUrl","reader","FileReader","onloadend","evn","readAsDataURL","err","upload","files","overwriting","FileList","filesError","readAsBinaryString","ifrm","body","form","enctype","index","lastIndexOf","substring","submit","listing","pattern","recursively","pagesize","renameFile","oldPathName","newName","_checkPath","parameters","_doAction","moveFile","sourcePath","targetPath","copyFile","actionType","fileURL","removeDirectory","Commerce","validatePlayPurchase","packageName","productId","token","cancelPlaySubscription","getPlaySubscriptionStatus","Events","dispatch","eventname","eventArgs","Cache","FactoryMethods","put","timeToLive","expireIn","seconds","expireAt","timestamp","cacheMethod","contain","contains","parseResult","clazz","setObjectFactory","objectName","factoryMethod","Counters","AtomicInstance","counterName","getConstructor","counterNameValidation","implementMethod","urlPart","incrementAndGet","getAndIncrement","decrementAndGet","getAndDecrement","reset","implementMethodWithValue","addAndGet","getAndAdd","compareAndSet","expected","updated","lastFlushListeners","Logging","loggers","logInfo","messagesCount","numOfMessages","timeFrequency","getLogger","loggerName","flush","flushInterval","listeners","cb","logging","checkMessagesLen","setLogReportingPolicy","setLogMessage","logger","logLevel","exception","messageObj","now","debug","info","fatal","trace","CustomServices","invoke","serviceName","serviceVersion","fn","Promise","resolve","reject","promisifyPack","methods","forEach","keys","then","initApp","appId","Users","Persistence","DataQuery","addProperty","setClusteringParams","westLongitude","eastLongitude","mapWidth","parsedWestLongitude","parseFloat","parsedEastLongitude","parsedMapWidth","parseInt","parsedClusterGridSize","isFinite","longDiff","PublishOptionsHeaders","MESSAGE_TAG","IOS_ALERT_TAG","IOS_BADGE_TAG","IOS_SOUND_TAG","ANDROID_TICKER_TEXT_TAG","ANDROID_CONTENT_TITLE_TAG","ANDROID_CONTENT_TEXT_TAG","ANDROID_ACTION_TAG","WP_TYPE_TAG","WP_TITLE_TAG","WP_TOAST_SUBTITLE_TAG","WP_TOAST_PARAMETER_TAG","WP_TILE_BACKGROUND_IMAGE","WP_TILE_COUNT","WP_TILE_BACK_TITLE","WP_TILE_BACK_BACKGROUND_IMAGE","WP_TILE_BACK_CONTENT","WP_RAW_DATA","publisherId","subtopic","pushPolicy","pushBroadcast","pushSinglecast","publishAt","repeatEvery","repeatExpiresAt","textmessage","htmlmessage","SubscriptionOptions","subscriberId","selector","BackendlessGeoQuery"],"mappings":"CAEA,SAAUA,GACN,GAAIC,SAAeC,OAAQ,UAAYA,KAAKA,OAASA,MAAQA,YACjDC,SAAU,UAAYA,OAAOA,SAAWA,QAAUA,MAE9D,UAAWC,UAAW,YAAcA,OAAOC,IAAK,CAC5CD,UAAW,WACP,MAAOH,GAAKK,YAAcN,EAAQC,SAGnC,UAAWM,WAAY,gBAAmBC,UAAW,YAAa,CACrEA,OAAOD,QAAUN,EAAKK,YAAcN,EAAQC,OACzC,CACHA,EAAKK,YAAcN,EAAQC,MAGhC,SAASA,MACR,YAEA,IAAIQ,aACAC,KAAU,SACVC,SAAU,SACVC,KAAU,SACVC,QAAU,IAGd,IAAIC,WAAY,GAAKC,UAAS,wDAE9B,IAAIC,WAAY,IAChB,IAAIC,SAAU,IAEd,IAAIC,qBAAsBjB,KAAKK,WAE/B,IAAIA,gBACAa,QAAc,YAGlBb,aAAYc,QAAU,QACtBd,aAAYe,UAAY,6BAExBf,aAAYgB,WAAa,WACrBrB,KAAKK,YAAcY,mBACnB,OAAOK,MAGX,KAAKC,MAAMC,UAAUC,QAAS,CAC1BF,MAAMC,UAAUC,QAAU,SAASC,EAAeC,GAC9C,GAAIC,EACJ,IAAIN,MAAQ,KAAM,CACd,KAAM,IAAIO,WAAU,iCAExB,GAAIC,GAAIC,OAAOT,KACf,IAAIU,GAAMF,EAAEG,SAAW,CACvB,IAAID,IAAQ,EAAG,CACX,OAAQ,EAEZ,GAAIE,IAAKP,GAAa,CACtB,IAAIQ,KAAKC,IAAIF,KAAOG,SAAU,CAC1BH,EAAI,EAER,GAAIA,GAAKF,EAAK,CACV,OAAQ,EAEZJ,EAAIO,KAAKG,IAAIJ,GAAK,EAAIA,EAAIF,EAAMG,KAAKC,IAAIF,GAAI,EAC7C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factory","root","self","global","define","amd","Backendless","exports","module","NodeDevice","name","platform","uuid","version","isBrowser","Function","WebSocket","UIState","previousBackendless","emptyFn","VERSION","serverURL","noConflict","this","Array","prototype","indexOf","searchElement","fromIndex","k","TypeError","O","Object","len","length","n","Math","abs","Infinity","max","initXHR","browser","userAgent","navigator","ua","toLowerCase","match","exec","matched","getNow","Date","getTime","promisesEnabled","enablePromises","Utils","isObject","obj","isString","toString","call","slice","isNumber","isFunction","isBoolean","isDate","isArray","addEvent","evnt","elem","func","addEventListener","attachEvent","isEmpty","key","hasOwnProperty","undefined","removeEvent","removeEventListener","detachEvent","XMLHttpRequest","sendAsBinary","text","data","ArrayBuffer","ui8a","Uint8Array","i","charCodeAt","send","e","tryParseJSON","s","JSON","parse","setUIState","stateName","Error","_ajax_for_browser","config","cashingAllowedArr","cacheMethods","ignoreCache","sendRequest","cacheOnly","cachedResult","LocalCache","get","url","replace","cacheError","message","statusCode","isAsync","asyncHandler","success","fault","remoteDataOnly","fromCacheOrRemote","fromRemoteOrCache","fromCacheAndRemote","result","remote","local","xhr","contentType","response","parseResponse","responseText","badResponse","status","cacheHandler","cloneObject","method","cacheActive","cachePolicy","set","urlBlueprint","exists","getCachePolicy","checkInCache","policy","open","setRequestHeader","applicationId","secretKey","currentUser","onreadystatechange","readyState","error","_ajax_for_nodejs","stringify","u","require","https","protocol","options","host","hostname","port","path","headers","Content-Length","Buffer","byteLength","Content-Type","application-id","secret-key","application-type","buffer","httpx","req","request","res","setEncoding","on","chunk","callback","write","end","_ajax","getClassName","___class","instStringified","constructor","results","encodeArrayToUriComponent","arr","props","push","encodeURIComponent","join","classWrapper","wrapper","wrapperName","Wrapper","property","eval","deepExtend","destination","source","extractResponder","args","Async","wrapAsync","async","parser","context","extendCollection","collection","dataMapper","nextPage","split","appVersion","_nextPage","_load","promisify","getPage","offset","pageSize","arguments","successCallback","faultCallback","setCache","store","localStorageName","storage","enabled","value","remove","clear","flushExpired","getAll","serialize","deserialize","isLocalStorageSupported","window","localStorage","setItem","removeItem","createBndlsStorage","expired","addTimestamp","val","backendlessObj","getItem","ret","prop","DataStore","model","className","restUrl","appPath","_extractQueryOptions","params","sortBy","relationsDepth","floor","relations","_parseResponse","_Model","item","fields","_formCircDeps","_parseFindResponse","responder","_replCircDeps","objMap","pos","genID","b","a","random","_replCircDepsHelper","__originSubID","circDepsIDs","_formCircDepsHelper","save","objRef","objId","objectId","find","dataQuery","whereClause","query","properties","condition","_buildArgsObject","type","findById","argsObj","apply","concat","loadRelations","findFirst","findLast","dataStoreCache","persistence","getView","viewName","callStoredProcedure","spName","argumentValues","of","tableName","describe","DataPermissions","getRestUrl","dataObject","permissionType","userid","rolename","permission","user","role","FIND","grantUser","Data","Permissions","grantRole","grant","denyUser","denyRole","deny","REMOVE","UPDATE","User","UserService","_wrapAsync","stayLoggedIn","me","_getUserFromResponse","register","getUserRoles","roleHelper","identity","operation","roleName","assignRole","unassignRole","login","username","password","newUser","loggedInUser","describeUserClass","restorePassword","emailAddress","logout","errorCallback","logoutUser","onLogoutSuccess","onLogoutError","code","getCurrentUser","currentUserId","update","loginWithFacebook","facebookFieldsMapping","permissions","_loginSocial","loginWithGooglePlus","googlePlusFieldsMapping","container","loginWithTwitter","twitterFieldsMapping","_socialContainer","socialType","loadingMsg","client","document","createElement","innerHTML","appendChild","style","cursor","closeContainer","removeChild","removeLoading","doAuthorizationActivity","frameBorder","width","height","id","setAttribute","onload","getElementsByTagName","close","location","href","fieldsMapping","socialContainer","origin","interimCallback","r","loginWithFacebookSdk","FB","getLoginStatus","_sendSocialLoginRequest","loginWithGooglePlusSdk","gapi","auth","authorize","client_id","scope","isValidLogin","userToken","setTimeout","resendEmailConfirmation","Geo","monitoringId","UNITS","METERS","KILOMETERS","MILES","YARDS","FEET","_findHelpers","searchRectangle","arg","rect","latitude","longitude","metadata","units","radius","categories","includeMetadata","relativeFindPercentThreshold","relativeFindMetadata","degreePerPixel","clusterGridSize","geoFence","savePoint","geopoint","responderOverride","geoObject","geoPoint","GeoPoint","addPoint","findUtil","geoCollection","GeoCluster","totalPoints","geoQuery","distance","loadMetadata","GeoQuery","getClusterPoints","relativeFind","addCategory","getCategories","deleteCategory","deletePoint","point","pointId","getFencePoints","geoFenceName","_runFenceAction","action","runOnStayAction","runOnExitAction","runOnEnterAction","_getFences","EARTH_RADIUS","_distance","lat1","lon1","lat2","lon2","deltaLon","PI","acos","sin","cos","_updateDegree","degree","_countLittleRadius","h","diametre","l_2","pow","sqrt","_isDefiniteRect","nwPoint","sePoint","_getOutRectangle","_getOutRectangleNodes","_getOutRectangleCircle","center","bounded","boundLat","littleRadius","westLong","eastLong","northLat","southLat","min","geoPoints","nwLat","nwLon","seLat","seLon","minLon","maxLon","lon","_getPointPosition","first","second","delta","tmp","x","x2","_isPointInRectangular","currentPosition","_isPointInCircle","_isPointInShape","shape","count","getIndex","position","_isPointInFence","nodes","_typesMapper","RECT","fence","CIRCLE","outRect","SHAPE","_maxDuration","_timers","_checkPosition","geofenceName","coords","fences","GeoFenceCallback","lastResults","_trackedFences","isInFence","rule","duration","onStayDuration","timeoutFuncInApp","savedK","savedCoords","callBack","timeoutFuncRemote","clearTimeout","_mobilecheck","check","test","substr","vendor","opera","_lastResults","_startMonitoring","secondParam","isGeoPoint","ii","_containsByPropName","object","getPosition","getCurPos","geolocation","getCurrentPosition","timeout","enableHighAccuracy","setInterval","watchPosition","startGeofenceMonitoringWithInAppCallback","inAppCallback","startGeofenceMonitoringWithRemoteCallback","stopGeofenceMonitoring","splice","_lastResuls","clearInterval","clearWatch","Proxy","eventName","handler","eventHandlers","fireEvent","handlers","PollingProxy","timer","interval","needReconnect","onMessage","onError","poll","onTimeout","abort","SocketProxy","reconnectWithPolling","socket","onopen","sockOpen","onerror","sockError","onclose","onSocketClose","onmessage","event","Subscription","channelName","channelProperties","subscriptionId","_subscribe","onSubscribe","_async","_startSubscription","subscription","proxy","_switchToPolling","cancelSubscription","messages","Messaging","_getProperties","subscribe","subscriptionCallback","subscriptionOptions","that","publish","publishOptions","deliveryTarget","PublishOptions","DeliveryOptions","sendEmail","subject","bodyParts","recipients","attachments","Bodyparts","bodyparts","to","attachment","cancel","messageId","registerDevice","channels","expiration","device","deviceToken","deviceId","os","osVersion","fail","console","warn","projectid","appid","cordova","getRegistrations","unregisterDevice","log","getBuilder","filename","filedata","boundary","dashdash","crlf","builder","fileName","target","uploadPath","sendEncoded","FilePermissions","varType","Files","saveFile","fileContent","overwrite","File","Blob","size","baseUrl","reader","FileReader","onloadend","evn","readAsDataURL","err","upload","files","overwriting","FileList","filesError","readAsBinaryString","ifrm","body","form","enctype","index","lastIndexOf","substring","submit","listing","pattern","recursively","pagesize","renameFile","oldPathName","newName","_checkPath","parameters","_doAction","moveFile","sourcePath","targetPath","copyFile","actionType","fileURL","removeDirectory","Commerce","validatePlayPurchase","packageName","productId","token","cancelPlaySubscription","getPlaySubscriptionStatus","Events","dispatch","eventname","eventArgs","Cache","FactoryMethods","put","timeToLive","expireIn","seconds","expireAt","timestamp","cacheMethod","contain","contains","parseResult","clazz","setObjectFactory","objectName","factoryMethod","Counters","AtomicInstance","counterName","getConstructor","counterNameValidation","implementMethod","urlPart","incrementAndGet","getAndIncrement","decrementAndGet","getAndDecrement","reset","implementMethodWithValue","addAndGet","getAndAdd","compareAndSet","expected","updated","lastFlushListeners","Logging","loggers","logInfo","messagesCount","numOfMessages","timeFrequency","getLogger","loggerName","flush","flushInterval","listeners","cb","logging","checkMessagesLen","setLogReportingPolicy","setLogMessage","logger","logLevel","exception","messageObj","now","debug","info","fatal","trace","CustomServices","invoke","serviceName","serviceVersion","fn","Promise","resolve","reject","promisifyPack","methods","forEach","keys","then","initApp","appId","Users","Persistence","DataQuery","addProperty","setClusteringParams","westLongitude","eastLongitude","mapWidth","parsedWestLongitude","parseFloat","parsedEastLongitude","parsedMapWidth","parseInt","parsedClusterGridSize","isFinite","longDiff","PublishOptionsHeaders","MESSAGE_TAG","IOS_ALERT_TAG","IOS_BADGE_TAG","IOS_SOUND_TAG","ANDROID_TICKER_TEXT_TAG","ANDROID_CONTENT_TITLE_TAG","ANDROID_CONTENT_TEXT_TAG","ANDROID_ACTION_TAG","WP_TYPE_TAG","WP_TITLE_TAG","WP_TOAST_SUBTITLE_TAG","WP_TOAST_PARAMETER_TAG","WP_TILE_BACKGROUND_IMAGE","WP_TILE_COUNT","WP_TILE_BACK_TITLE","WP_TILE_BACK_BACKGROUND_IMAGE","WP_TILE_BACK_CONTENT","WP_RAW_DATA","publisherId","subtopic","pushPolicy","pushBroadcast","pushSinglecast","publishAt","repeatEvery","repeatExpiresAt","textmessage","htmlmessage","SubscriptionOptions","subscriberId","selector","BackendlessGeoQuery"],"mappings":"CAEA,SAAUA,GACN,GAAIC,SAAeC,OAAQ,UAAYA,KAAKA,OAASA,MAAQA,YACjDC,SAAU,UAAYA,OAAOA,SAAWA,QAAUA,MAE9D,UAAWC,UAAW,YAAcA,OAAOC,IAAK,CAC5CD,UAAW,WACP,MAAOH,GAAKK,YAAcN,EAAQC,SAGnC,UAAWM,WAAY,gBAAmBC,UAAW,YAAa,CACrEA,OAAOD,QAAUN,EAAKK,YAAcN,EAAQC,OACzC,CACHA,EAAKK,YAAcN,EAAQC,MAGhC,SAASA,MACR,YAEA,IAAIQ,aACAC,KAAU,SACVC,SAAU,SACVC,KAAU,SACVC,QAAU,IAGd,IAAIC,WAAY,GAAKC,UAAS,wDAE9B,IAAIC,WAAY,IAChB,IAAIC,SAAU,IAEd,IAAIC,qBAAsBjB,KAAKK,WAE/B,IAAIA,gBACAa,QAAc,YAGlBb,aAAYc,QAAU,QACtBd,aAAYe,UAAY,6BAExBf,aAAYgB,WAAa,WACrBrB,KAAKK,YAAcY,mBACnB,OAAOK,MAGX,KAAKC,MAAMC,UAAUC,QAAS,CAC1BF,MAAMC,UAAUC,QAAU,SAASC,EAAeC,GAC9C,GAAIC,EACJ,IAAIN,MAAQ,KAAM,CACd,KAAM,IAAIO,WAAU,iCAExB,GAAIC,GAAIC,OAAOT,KACf,IAAIU,GA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SACxBjnB,aAAY0mB,eAAiBA,cAC7B1mB,aAAY2mB,gBAAkBA,eAC9B3mB,aAAYq0B,oBAAsBA,mBAClCr0B,aAAYwyB,sBAAwBA,qBAEpC,KAEI7yB,KAAKob,SAAW/a,YAAY+a,QAG5Bpb,MAAKwb,WAAanb,YAAYmb,UAG9Bxb,MAAK60B,oBAAsBx0B,YAAYwb,QAGvC7b,MAAKsnB,UAAYjnB,YAAYinB,SAG7BtnB,MAAK+mB,eAAiB1mB,YAAY0mB,cAGlC/mB,MAAKgnB,gBAAkB3mB,YAAY2mB,eAGnChnB,MAAK00B,oBAAsBr0B,YAAYq0B,mBAGvC10B,MAAK6yB,sBAAwBxyB,YAAYwyB,sBAC3C,MAAO1pB,OACLkf,SAAWA,QAAQC,KAAKnf,OAG5B,MAAO9I"} \ No newline at end of file diff --git a/package.json b/package.json index 6ae45e0d..b9ee8913 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "backendless", - "version": "3.1.10", + "version": "3.1.11", "description": "Backendless JavaScript SDK for Node.js and the browser", "main": "./libs/backendless.js", "scripts": {