-
Notifications
You must be signed in to change notification settings - Fork 8
/
geoloqi.min.js
1 lines (1 loc) · 42 KB
/
geoloqi.min.js
1
var JSON;JSON||(JSON={}),function(){function str(e,t){var n,r,i,s,o=gap,u,a=t[e];a&&typeof a=="object"&&typeof a.toJSON=="function"&&(a=a.toJSON(e)),typeof rep=="function"&&(a=rep.call(t,e,a));switch(typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";gap+=indent,u=[];if(Object.prototype.toString.apply(a)==="[object Array]"){s=a.length;for(n=0;n<s;n+=1)u[n]=str(n,a)||"null";return i=u.length===0?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+o+"]":"["+u.join(",")+"]",gap=o,i}if(rep&&typeof rep=="object"){s=rep.length;for(n=0;n<s;n+=1)typeof rep[n]=="string"&&(r=rep[n],i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i))}else for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i));return i=u.length===0?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+o+"}":"{"+u.join(",")+"}",gap=o,i}}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function f(e){return e<10?"0"+e:e}"use strict",typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(e){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(e,t,n){var r;gap="",indent="";if(typeof n=="number")for(r=0;r<n;r+=1)indent+=" ";else typeof n=="string"&&(indent=n);rep=t;if(!t||typeof t=="function"||typeof t=="object"&&typeof t.length=="number")return str("",{"":e});throw new Error("JSON.stringify")}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(e,t){var n,r,i=e[t];if(i&&typeof i=="object")for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r=walk(i,n),r!==undefined?i[n]=r:delete i[n]);return reviver.call(e,t,i)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}();(function(e,t,n,r,i,s){function w(e,t){var n=typeof e[t];return n=="function"||n=="object"&&!!e[t]||n=="unknown"}function E(e,t){return typeof e[t]=="object"&&!!e[t]}function S(e){return Object.prototype.toString.call(e)==="[object Array]"}function x(){try{var e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");return y=Array.prototype.slice.call(e.GetVariable("$version").match(/(\d+),(\d+),(\d+),(\d+)/),1),b=parseInt(y[0],10)>9&&parseInt(y[1],10)>0,e=null,!0}catch(t){return!1}}function A(){if(C)return;C=!0;for(var e=0;e<k.length;e++)k[e]();k.length=0}function M(e,t){if(C){e.call(t);return}k.push(function(){e.call(t)})}function _(){var e=parent;if(h!=="")for(var t=0,n=h.split(".");t<n.length;t++)e=e[n[t]];return e.easyXDM}function D(t){return e.easyXDM=d,h=t,h&&(v="easyXDM_"+h.replace(".","_")+"_"),p}function P(e){return e.match(f)[3]}function H(e){return e.match(f)[4]||""}function B(e){var t=e.toLowerCase().match(f),n=t[2],r=t[3],i=t[4]||"";if(n=="http:"&&i==":80"||n=="https:"&&i==":443")i="";return n+"//"+r+i}function j(e){e=e.replace(c,"$1/");if(!e.match(/^(http||https):\/\//)){var t=e.substring(0,1)==="/"?"":n.pathname;t.substring(t.length-1)!=="/"&&(t=t.substring(0,t.lastIndexOf("/")+1)),e=n.protocol+"//"+n.host+t+e}while(l.test(e))e=e.replace(l,"");return e}function F(e,t){var n="",r=e.indexOf("#");r!==-1&&(n=e.substring(r),e=e.substring(0,r));var i=[];for(var o in t)t.hasOwnProperty(o)&&i.push(o+"="+s(t[o]));return e+(g?"#":e.indexOf("?")==-1?"?":"&")+i.join("&")+n}function q(e){return typeof e=="undefined"}function U(e,t,n){var r;for(var i in t)t.hasOwnProperty(i)&&(i in e?(r=t[i],typeof r=="object"?U(e[i],r,n):n||(e[i]=t[i])):e[i]=t[i]);return e}function z(){var e=t.body.appendChild(t.createElement("form")),n=e.appendChild(t.createElement("input"));n.name=v+"TEST"+u,m=n!==e.elements[n.name],t.body.removeChild(e)}function W(e){q(m)&&z();var n;m?n=t.createElement('<iframe name="'+e.props.name+'"/>'):(n=t.createElement("IFRAME"),n.name=e.props.name),n.id=n.name=e.props.name,delete e.props.name,e.onLoad&&T(n,"load",e.onLoad),typeof e.container=="string"&&(e.container=t.getElementById(e.container)),e.container||(U(n.style,{position:"absolute",top:"-2000px"}),e.container=t.body);var r=e.props.src;return delete e.props.src,U(n,e.props),n.border=n.frameBorder=0,n.allowTransparency=!0,e.container.appendChild(n),n.src=r,e.props.src=r,n}function X(e,t){typeof e=="string"&&(e=[e]);var n,r=e.length;while(r--){n=e[r],n=new RegExp(n.substr(0,1)=="^"?n:"^"+n.replace(/(\*)/g,".$1").replace(/\?/g,".")+"$");if(n.test(t))return!0}return!1}function V(r){var i=r.protocol,s;r.isHost=r.isHost||q(I.xdm_p),g=r.hash||!1,r.props||(r.props={});if(!r.isHost){r.channel=I.xdm_c,r.secret=I.xdm_s,r.remote=I.xdm_e,i=I.xdm_p;if(r.acl&&!X(r.acl,r.remote))throw new Error("Access denied for "+r.remote)}else r.remote=j(r.remote),r.channel=r.channel||"default"+u++,r.secret=Math.random().toString(16).substring(2),q(i)&&(B(n.href)==B(r.remote)?i="4":w(e,"postMessage")||w(t,"postMessage")?i="1":r.swf&&w(e,"ActiveXObject")&&x()?i="6":navigator.product==="Gecko"&&"frameElement"in e&&navigator.userAgent.indexOf("WebKit")==-1?i="5":r.remoteHelper?(r.remoteHelper=j(r.remoteHelper),i="2"):i="0");r.protocol=i;switch(i){case"0":U(r,{interval:100,delay:2e3,useResize:!0,useParent:!1,usePolling:!1},!0);if(r.isHost){if(!r.local){var o=n.protocol+"//"+n.host,a=t.body.getElementsByTagName("img"),f,l=a.length;while(l--){f=a[l];if(f.src.substring(0,o.length)===o){r.local=f.src;break}}r.local||(r.local=e)}var c={xdm_c:r.channel,xdm_p:0};r.local===e?(r.usePolling=!0,r.useParent=!0,r.local=n.protocol+"//"+n.host+n.pathname+n.search,c.xdm_e=r.local,c.xdm_pa=1):c.xdm_e=j(r.local),r.container&&(r.useResize=!1,c.xdm_po=1),r.remote=F(r.remote,c)}else U(r,{channel:I.xdm_c,remote:I.xdm_e,useParent:!q(I.xdm_pa),usePolling:!q(I.xdm_po),useResize:r.useParent?!1:r.useResize});s=[new p.stack.HashTransport(r),new p.stack.ReliableBehavior({}),new p.stack.QueueBehavior({encode:!0,maxLength:4e3-r.remote.length}),new p.stack.VerifyBehavior({initiate:r.isHost})];break;case"1":s=[new p.stack.PostMessageTransport(r)];break;case"2":s=[new p.stack.NameTransport(r),new p.stack.QueueBehavior,new p.stack.VerifyBehavior({initiate:r.isHost})];break;case"3":s=[new p.stack.NixTransport(r)];break;case"4":s=[new p.stack.SameOriginTransport(r)];break;case"5":s=[new p.stack.FrameElementTransport(r)];break;case"6":y||x(),s=[new p.stack.FlashTransport(r)]}return s.push(new p.stack.QueueBehavior({lazy:r.lazy,remove:!0})),s}function $(e){var t,n={incoming:function(e,t){this.up.incoming(e,t)},outgoing:function(e,t){this.down.outgoing(e,t)},callback:function(e){this.up.callback(e)},init:function(){this.down.init()},destroy:function(){this.down.destroy()}};for(var r=0,i=e.length;r<i;r++)t=e[r],U(t,n,!0),r!==0&&(t.down=e[r-1]),r!==i-1&&(t.up=e[r+1]);return t}function J(e){e.up.down=e.down,e.down.up=e.up,e.up=e.down=null}var o=this,u=Math.floor(Math.random()*1e4),a=Function.prototype,f=/^((http.?:)\/\/([^:\/\s]+)(:\d+)*)/,l=/[\-\w]+\/\.\.\//,c=/([^:])\/\//g,h="",p={},d=e.easyXDM,v="easyXDM_",m,g=!1,y,b,T,N;if(w(e,"addEventListener"))T=function(e,t,n){e.addEventListener(t,n,!1)},N=function(e,t,n){e.removeEventListener(t,n,!1)};else{if(!w(e,"attachEvent"))throw new Error("Browser not supported");T=function(e,t,n){e.attachEvent("on"+t,n)},N=function(e,t,n){e.detachEvent("on"+t,n)}}var C=!1,k=[],L;"readyState"in t?(L=t.readyState,C=L=="complete"||~navigator.userAgent.indexOf("AppleWebKit/")&&(L=="loaded"||L=="interactive")):C=!!t.body;if(!C){if(w(e,"addEventListener"))T(t,"DOMContentLoaded",A);else{T(t,"readystatechange",function(){t.readyState=="complete"&&A()});if(t.documentElement.doScroll&&e===top){var O=function(){if(C)return;try{t.documentElement.doScroll("left")}catch(e){r(O,1);return}A()};O()}}T(e,"load",A)}var I=function(e){e=e.substring(1).split("&");var t={},n,r=e.length;while(r--)n=e[r].split("="),t[n[0]]=i(n[1]);return t}(/xdm_e=/.test(n.search)?n.search:n.hash),R=function(){var e={},t={a:[1,2,3]},n='{"a":[1,2,3]}';return typeof JSON!="undefined"&&typeof JSON.stringify=="function"&&JSON.stringify(t).replace(/\s/g,"")===n?JSON:(Object.toJSON&&Object.toJSON(t).replace(/\s/g,"")===n&&(e.stringify=Object.toJSON),typeof String.prototype.evalJSON=="function"&&(t=n.evalJSON(),t.a&&t.a.length===3&&t.a[2]===3&&(e.parse=function(e){return e.evalJSON()})),e.stringify&&e.parse?(R=function(){return e},e):null)};U(p,{version:"2.4.15.118",query:I,stack:{},apply:U,getJSONObject:R,whenReady:M,noConflict:D}),p.DomHelper={on:T,un:N,requiresJSON:function(n){E(e,"JSON")||t.write('<script type="text/javascript" src="'+n+'"></script>')}},function(){var e={};p.Fn={set:function(t,n){e[t]=n},get:function(t,n){var r=e[t];return n&&delete e[t],r}}}(),p.Socket=function(e){var t=$(V(e).concat([{incoming:function(t,n){e.onMessage(t,n)},callback:function(t){e.onReady&&e.onReady(t)}}])),n=B(e.remote);this.origin=B(e.remote),this.destroy=function(){t.destroy()},this.postMessage=function(e){t.outgoing(e,n)},t.init()},p.Rpc=function(e,t){if(t.local)for(var n in t.local)if(t.local.hasOwnProperty(n)){var r=t.local[n];typeof r=="function"&&(t.local[n]={method:r})}var i=$(V(e).concat([new p.stack.RpcBehavior(this,t),{callback:function(t){e.onReady&&e.onReady(t)}}]));this.origin=B(e.remote),this.destroy=function(){i.destroy()},i.init()},p.stack.SameOriginTransport=function(e){var t,i,s,o;return t={outgoing:function(e,t,n){s(e),n&&n()},destroy:function(){i&&(i.parentNode.removeChild(i),i=null)},onDOMReady:function(){o=B(e.remote),e.isHost?(U(e.props,{src:F(e.remote,{xdm_e:n.protocol+"//"+n.host+n.pathname,xdm_c:e.channel,xdm_p:4}),name:v+e.channel+"_provider"}),i=W(e),p.Fn.set(e.channel,function(e){return s=e,r(function(){t.up.callback(!0)},0),function(e){t.up.incoming(e,o)}})):(s=_().Fn.get(e.channel,!0)(function(e){t.up.incoming(e,o)}),r(function(){t.up.callback(!0)},0))},init:function(){M(t.onDOMReady,t)}}},p.stack.FlashTransport=function(e){function c(e,t){r(function(){i.up.incoming(e,a)},0)}function d(n){var r=e.swf+"?host="+e.isHost,i="easyXDM_swf_"+Math.floor(Math.random()*1e4);p.Fn.set("flash_loaded"+n.replace(/[\-.]/g,"_"),function(){p.stack.FlashTransport[n].swf=f=l.firstChild;var e=p.stack.FlashTransport[n].queue;for(var t=0;t<e.length;t++)e[t]();e.length=0}),e.swfContainer?l=typeof e.swfContainer=="string"?t.getElementById(e.swfContainer):e.swfContainer:(l=t.createElement("div"),U(l.style,b&&e.swfNoThrottle?{height:"20px",width:"20px",position:"fixed",right:0,top:0}:{height:"1px",width:"1px",position:"absolute",overflow:"hidden",right:0,top:0}),t.body.appendChild(l));var s="callback=flash_loaded"+n.replace(/[\-.]/g,"_")+"&proto="+o.location.protocol+"&domain="+P(o.location.href)+"&port="+H(o.location.href)+"&ns="+h;l.innerHTML="<object height='20' width='20' type='application/x-shockwave-flash' id='"+i+"' data='"+r+"'><param name='allowScriptAccess' value='always'></param><param name='wmode' value='transparent'><param name='movie' value='"+r+"'></param><param name='flashvars' value='"+s+"'></param><embed type='application/x-shockwave-flash' FlashVars='"+s+"' allowScriptAccess='always' wmode='transparent' src='"+r+"' height='1' width='1'></embed></object>"}var i,s,u,a,f,l;return i={outgoing:function(t,n,r){f.postMessage(e.channel,t.toString()),r&&r()},destroy:function(){try{f.destroyChannel(e.channel)}catch(t){}f=null,s&&(s.parentNode.removeChild(s),s=null)},onDOMReady:function(){a=e.remote,p.Fn.set("flash_"+e.channel+"_init",function(){r(function(){i.up.callback(!0)})}),p.Fn.set("flash_"+e.channel+"_onMessage",c),e.swf=j(e.swf);var t=P(e.swf),o=function(){p.stack.FlashTransport[t].init=!0,f=p.stack.FlashTransport[t].swf,f.createChannel(e.channel,e.secret,B(e.remote),e.isHost),e.isHost&&(b&&e.swfNoThrottle&&U(e.props,{position:"fixed",right:0,top:0,height:"20px",width:"20px"}),U(e.props,{src:F(e.remote,{xdm_e:B(n.href),xdm_c:e.channel,xdm_p:6,xdm_s:e.secret}),name:v+e.channel+"_provider"}),s=W(e))};p.stack.FlashTransport[t]&&p.stack.FlashTransport[t].init?o():p.stack.FlashTransport[t]?p.stack.FlashTransport[t].queue.push(o):(p.stack.FlashTransport[t]={queue:[o]},d(t))},init:function(){M(i.onDOMReady,i)}}},p.stack.PostMessageTransport=function(t){function a(e){if(e.origin)return B(e.origin);if(e.uri)return B(e.uri);if(e.domain)return n.protocol+"//"+e.domain;throw"Unable to retrieve the origin of the event"}function f(e){var n=a(e);n==u&&e.data.substring(0,t.channel.length+1)==t.channel+" "&&i.up.incoming(e.data.substring(t.channel.length+1),n)}var i,s,o,u;return i={outgoing:function(e,n,r){o.postMessage(t.channel+" "+e,n||u),r&&r()},destroy:function(){N(e,"message",f),s&&(o=null,s.parentNode.removeChild(s),s=null)},onDOMReady:function(){u=B(t.remote);if(t.isHost){var a=function(n){n.data==t.channel+"-ready"&&(o="postMessage"in s.contentWindow?s.contentWindow:s.contentWindow.document,N(e,"message",a),T(e,"message",f),r(function(){i.up.callback(!0)},0))};T(e,"message",a),U(t.props,{src:F(t.remote,{xdm_e:B(n.href),xdm_c:t.channel,xdm_p:1}),name:v+t.channel+"_provider"}),s=W(t)}else T(e,"message",f),o="postMessage"in e.parent?e.parent:e.parent.document,o.postMessage(t.channel+"-ready",u),r(function(){i.up.callback(!0)},0)},init:function(){M(i.onDOMReady,i)}}},p.stack.FrameElementTransport=function(i){var s,o,u,a;return s={outgoing:function(e,t,n){u.call(this,e),n&&n()},destroy:function(){o&&(o.parentNode.removeChild(o),o=null)},onDOMReady:function(){a=B(i.remote),i.isHost?(U(i.props,{src:F(i.remote,{xdm_e:B(n.href),xdm_c:i.channel,xdm_p:5}),name:v+i.channel+"_provider"}),o=W(i),o.fn=function(e){return delete o.fn,u=e,r(function(){s.up.callback(!0)},0),function(e){s.up.incoming(e,a)}}):(t.referrer&&B(t.referrer)!=I.xdm_e&&(e.top.location=I.xdm_e),u=e.frameElement.fn(function(e){s.up.incoming(e,a)}),s.up.callback(!0))},init:function(){M(s.onDOMReady,s)}}},p.stack.NameTransport=function(e){function l(t){var r=e.remoteHelper+(n?"#_3":"#_2")+e.channel;i.contentWindow.sendMessage(t,r)}function c(){n?(++o===2||!n)&&t.up.callback(!0):(l("ready"),t.up.callback(!0))}function h(e){t.up.incoming(e,a)}function d(){u&&r(function(){u(!0)},0)}var t,n,i,s,o,u,a,f;return t={outgoing:function(e,t,n){u=n,l(e)},destroy:function(){i.parentNode.removeChild(i),i=null,n&&(s.parentNode.removeChild(s),s=null)},onDOMReady:function(){n=e.isHost,o=0,a=B(e.remote),e.local=j(e.local),n?(p.Fn.set(e.channel,function(t){n&&t==="ready"&&(p.Fn.set(e.channel,h),c())}),f=F(e.remote,{xdm_e:e.local,xdm_c:e.channel,xdm_p:2}),U(e.props,{src:f+"#"+e.channel,name:v+e.channel+"_provider"}),s=W(e)):(e.remoteHelper=e.remote,p.Fn.set(e.channel,h)),i=W({props:{src:e.local+"#_4"+e.channel},onLoad:function t(){var n=i||this;N(n,"load",t),p.Fn.set(e.channel+"_load",d),function s(){typeof n.contentWindow.sendMessage=="function"?c():r(s,50)}()}})},init:function(){M(t.onDOMReady,t)}}},p.stack.HashTransport=function(t){function d(e){if(!c)return;var n=t.remote+"#"+f++ +"_"+e;(s||!h?c.contentWindow:c).location=n}function m(e){a=e,n.up.incoming(a.substring(a.indexOf("_")+1),p)}function g(){if(!l)return;var e=l.location.href,t="",n=e.indexOf("#");n!=-1&&(t=e.substring(n)),t&&t!=a&&m(t)}function y(){o=setInterval(g,u)}var n,i=this,s,o,u,a,f,l,c,h,p;return n={outgoing:function(e,t){d(e)},destroy:function(){e.clearInterval(o),(s||!h)&&c.parentNode.removeChild(c),c=null},onDOMReady:function(){s=t.isHost,u=t.interval,a="#"+t.channel,f=0,h=t.useParent,p=B(t.remote);if(s){t.props={src:t.remote,name:v+t.channel+"_provider"};if(h)t.onLoad=function(){l=e,y(),n.up.callback(!0)};else{var i=0,o=t.delay/50;(function d(){if(++i>o)throw new Error("Unable to reference listenerwindow");try{l=c.contentWindow.frames[v+t.channel+"_consumer"]}catch(e){}l?(y(),n.up.callback(!0)):r(d,50)})()}c=W(t)}else l=e,y(),h?(c=parent,n.up.callback(!0)):(U(t,{props:{src:t.remote+"#"+t.channel+new Date,name:v+t.channel+"_consumer"},onLoad:function(){n.up.callback(!0)}}),c=W(t))},init:function(){M(n.onDOMReady,n)}}},p.stack.ReliableBehavior=function(e){var t,n,r=0,i=0,s="";return t={incoming:function(e,o){var u=e.indexOf("_"),a=e.substring(0,u).split(",");e=e.substring(u+1),a[0]==r&&(s="",n&&n(!0)),e.length>0&&(t.down.outgoing(a[1]+","+r+"_"+s,o),i!=a[1]&&(i=a[1],t.up.incoming(e,o)))},outgoing:function(e,o,u){s=e,n=u,t.down.outgoing(i+","+ ++r+"_"+e,o)}}},p.stack.QueueBehavior=function(e){function h(){if(e.remove&&n.length===0){J(t);return}if(o||n.length===0||a)return;o=!0;var i=n.shift();t.down.outgoing(i.data,i.origin,function(e){o=!1,i.callback&&r(function(){i.callback(e)},0),h()})}var t,n=[],o=!0,u="",a,f=0,l=!1,c=!1;return t={init:function(){q(e)&&(e={}),e.maxLength&&(f=e.maxLength,c=!0),e.lazy?l=!0:t.down.init()},callback:function(e){o=!1;var n=t.up;h(),n.callback(e)},incoming:function(n,r){if(c){var s=n.indexOf("_"),o=parseInt(n.substring(0,s),10);u+=n.substring(s+1),o===0&&(e.encode&&(u=i(u)),t.up.incoming(u,r),u="")}else t.up.incoming(n,r)},outgoing:function(r,i,o){e.encode&&(r=s(r));var u=[],a;if(c){while(r.length!==0)a=r.substring(0,f),r=r.substring(a.length),u.push(a);while(a=u.shift())n.push({data:u.length+"_"+a,origin:i,callback:u.length===0?o:null})}else n.push({data:r,origin:i,callback:o});l?t.down.init():h()},destroy:function(){a=!0,t.down.destroy()}}},p.stack.VerifyBehavior=function(e){function s(){n=Math.random().toString(16).substring(2),t.down.outgoing(n)}var t,n,r,i=!1;return t={incoming:function(i,o){var u=i.indexOf("_");u===-1?i===n?t.up.callback(!0):r||(r=i,e.initiate||s(),t.down.outgoing(i)):i.substring(0,u)===r&&t.up.incoming(i.substring(u+1),o)},outgoing:function(e,r,i){t.down.outgoing(n+"_"+e,r,i)},callback:function(t){e.initiate&&s()}}},p.stack.RpcBehavior=function(e,t){function o(e){e.jsonrpc="2.0",n.down.outgoing(r.stringify(e))}function u(e,t){var n=Array.prototype.slice;return function(){var r=arguments.length,u,a={method:t};r>0&&typeof arguments[r-1]=="function"?(r>1&&typeof arguments[r-2]=="function"?(u={success:arguments[r-2],error:arguments[r-1]},a.params=n.call(arguments,0,r-2)):(u={success:arguments[r-1]},a.params=n.call(arguments,0,r-1)),s[""+ ++i]=u,a.id=i):a.params=n.call(arguments,0),e.namedParams&&a.params.length===1&&(a.params=a.params[0]),o(a)}}function f(e,t,n,r){if(!n){t&&o({id:t,error:{code:-32601,message:"Procedure not found."}});return}var i,s;t?(i=function(e){i=a,o({id:t,result:e})},s=function(e,n){s=a;var r={id:t,error:{code:-32099,message:e}};n&&(r.error.data=n),o(r)}):i=s=a,S(r)||(r=[r]);try{var u=n.method.apply(n.scope,r.concat([i,s]));q(u)||i(u)}catch(f){s(f.message)}}var n,r=t.serializer||R(),i=0,s={};return n={incoming:function(e,n){var i=r.parse(e);if(i.method)t.handle?t.handle(i,o):f(i.method,i.id,t.local[i.method],i.params);else{var u=s[i.id];i.error?u.error&&u.error(i.error):u.success&&u.success(i.result),delete s[i.id]}},init:function(){if(t.remote)for(var r in t.remote)t.remote.hasOwnProperty(r)&&(e[r]=u(t.remote[r],r));n.down.init()},destroy:function(){for(var r in t.remote)t.remote.hasOwnProperty(r)&&e.hasOwnProperty(r)&&delete e[r];n.down.destroy()}}},o.easyXDM=p})(window,document,location,window.setTimeout,decodeURIComponent,encodeURIComponent);var geoloqi=function(){function S(e){var t=document.location.hash.substring(1),n={};d=e?g.merge(defaultConfig,e):defaultConfig,t!==""&&x(t),d.apiKey&&(d.client_id=d.apiKey),!i.auth&&d.createOrRestoreUser&&!x(g.session.load())&&geoloqi.execute("POST","user/create_anon",{client_id:d.client_id},function(e,t){t||x(e)})}function x(e){var t;return typeof e=="string"?t=g.objectify(e):t=e,t&&(i.auth=t,g.session.create(t),i.onAuthorize!==null&&i.onAuthorize(t)),i.auth}function T(e){x(e)}function N(){window.console&&console.log("WARNING: OAuth features will be removed from a future version of geoloqi.js"),L(!0)}function C(){window.console&&console.log("WARNING: OAuth features will be removed from a future version of geoloqi.js"),L(!1)}function k(){window.console&&console.log("WARNING: OAuth features will be removed from a future version of geoloqi.js"),L(!0)}function L(e){var t={},n="";if(v===null){t={response_type:"token",client_id:d.client_id},d.redirect_uri&&(t.redirect_uri=d.redirect_uri),e===!0&&(t.mode="popup"),n=a+f+"?"+g.serialize(t),g.serialize(t);if(e===!0){var r=window.open(n,"_geoloqi_auth_popup","height=500,width=700");window.focus&&r.focus()}else window.location=n}}function A(){return i.auth&&i.auth.access_token?!0:!1}function O(){i.auth=null,g.session.destroy()}function M(e,t,n,r){arguments.length==4?H("GET",e,t,n,r):arguments.length==3?typeof arguments[1]=="function"&&typeof arguments[2]=="object"?(alias_callback=arguments[1],alias_context=arguments[2],H("GET",e,{},alias_callback,alias_context)):H("GET",e,t,n):arguments.length==2&&(n=arguments[1],H("GET",e,{},n))}function _(e,t,n,r){H("POST",e,t,n,r)}function D(e){B("POST","oauth/token",{grant_type:"password",client_id:d.client_id,username:e.username,password:e.password},P)}function P(e,t){t?i.onLoginError(t):x(e)}function H(e,t,n,r,i){if(!A())throw"Not logged in, no access_token is present. Authorize the user with geoloqi.authorize() first.";B(e,t,n,r,i)}function B(r,s,o,u,a){var f=g.guid(),l={};r=="POST"&&typeof o=="string"&&(o=g.objectify(o));var c=i.auth!==null?i.auth.access_token:"";l={method:r,path:s,args:o,accessToken:c,callbackId:f,sdkVersion:e,sdkBuild:t,packageName:d.package_name?d.package_name:null,packageVersion:d.package_version?d.package_version:null},u&&(n[f]=a?g.bind(u,a):u),E.postMessage(JSON.stringify(l))}function j(e){if(e.origin!=a)return!1;var t=JSON.parse(e.data);typeof t.oauth=="object"?(typeof t.oauth.auth=="string"&&T(t.oauth.auth),typeof t.oauth.error=="string"&&i.onOAuthError!==null&&i.onOAuthError(t.oauth.error)):(typeof t.response=="string"&&(t.response=JSON.parse(t.response)),typeof t.error=="string"&&(t.error=JSON.parse(t.error)),typeof n[t.callbackId]=="function"&&n[t.callbackId](t.response,t.error,geoloqi.util.parseHeaders(t.headers)))}var e="1.0.18",t="a7b91c21adcc3a48ff2b795c4aad6dcf5c9f7159",n={},r=this,i={},s="https://api.geoloqi.com",o="/js/",u=s+o+"receiver.html",a="https://geoloqi.com",f="/oauth/authorize",l=a+f,c=null,h=easyXDM.noConflict("geoloqi"),p="_geoloqi_auth",d={},v=null,m=null,g={},y=null,b=null,w=null;defaultConfig={package_name:null,package_version:null};var E=new h.Socket({remote:u,onMessage:function(e,t){if(t!=s&&t!=a)return!1;var r=JSON.parse(e);typeof r.oauth=="object"?(typeof r.oauth.auth=="string"&&T(r.oauth.auth),typeof r.oauth.error=="string"&&i.onOAuthError!==null&&i.onOAuthError(r.oauth.error)):(typeof r.response=="string"&&(r.response=JSON.parse(r.response)),typeof r.error=="string"&&(r.error[0]=="{"?r.error=JSON.parse(r.error):r.error={error_code:500,error:"unknown_error",error_description:r.error}),typeof n[r.callbackId]=="function"&&n[r.callbackId](r.response,r.error,geoloqi.util.parseHeaders(r.headers)))}});return i.init=S,i.auth=v,i.config=d,i.onAuthorize=y,i.onOAuthError=b,i.onLoginError=w,i.authenticate=N,i.authenticateWithRedirect=N.authenticateWithRedirect,i.authenticateWithPopup=k,i.logged_in=A,i.expire=O,i.get=M,i.post=_,i.login=D,i.execute=B,i.receive=j,g.session=function(){var e={};try{localStorage.setItem("mod","mod"),localStorage.removeItem("mod"),localStorageTest=!0}catch(t){localStorageTest=!1}return feature=localStorageTest?"localStorage":"cookie",persist=d.persist?d.persist:feature,create=function(e){g[persist].set(e)},e.create=create,load=function(){return g[persist].get()},e.load=load,destroy=function(){g[persist].erase()},e.destroy=destroy,e}(),g.serialize=function(e){var t=[];for(var n in e)t.push(n+"="+encodeURIComponent(e[n]));return t.join("&")},g.objectify=function(e){var t={},n=/([^&=]+)=([^&]*)/g,r;while(r=n.exec(e))t[decodeURIComponent(r[1])]=decodeURIComponent(r[2]);return t},g.cookie={set:function(e,t){var n;if(t){var r=new Date;r.setTime(r.getTime()+t*1e3),n="; expires="+r.toGMTString()}else n="";document.cookie=p+"="+JSON.stringify(e)+n+"; path=/"},get:function(){var e=p+"=",t=document.cookie.split(";");for(var n=0;n<t.length;n++){var r=t[n];while(r.charAt(0)==" ")r=r.substring(1,r.length);if(r.indexOf(e)===0)return JSON.parse(r.substring(e.length,r.length))}return null},erase:function(){g.cookie.set("",-1)}},g.localStorage={set:function(e){localStorage.setItem(p,JSON.stringify(e))},get:function(){return JSON.parse(localStorage.getItem(p))},erase:function(){localStorage.removeItem(p)}},g.date={},g.date.toISO8601=function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"Z"},g.guid=function(){return"g"+(Math.random()*(1<<30)).toString(16).replace(".","")},g.merge=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},g.mergeDeep=function(e,t){for(var n in t)try{t[n].constructor==Object?e[n]=MergeRecursive(e[n],t[n]):e[n]=t[n]}catch(r){e[n]=t[n]}return e},g.toQueryString=function(e,t){if(typeof e!="object")return"";var n="";for(var r in e)if(e.hasOwnProperty(r)){var i=t?t+"."+r:r;if(e[r]instanceof Array)for(var s=0;s<e[r].length;s++)typeof e[r][s]=="object"?n+="&"+obj2query(e[r][s],i):n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(e[r][s]);else e[r]instanceof Date?n+="&"+encodeURIComponent(i)+"="+e[r].getTime():e[r]instanceof Object?e.toString&&e.toString!==Object.prototype.toString?n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(e[r].toString()):n+="&"+obj2query(e[r],forPHP,i):n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(e[r])}return n.replace(/^&/,"")},g.bind=function(e,t){var n,r;if(typeof e!="function")throw new TypeError;return typeof Function.prototype.bind=="function"?e.bind(t):(r=Array.prototype.slice.call(arguments,2),n=function(){if(this instanceof n){ctor.prototype=e.prototype;var i=new ctor,s=e.apply(i,r.concat(Array.prototype.slice.call(arguments)));return Object(s)===s?s:i}return e.apply(t,r.concat(Array.prototype.slice.call(arguments)))})},g.parseHeaders=function(e){var t={};if(e){var n=e.split("\n");for(var r=0;r<n.length;r++){var i=n[r].split(":"),s=i.splice(0,1)[0],o=i.join(":");s&&o&&(t[s]=o)}}return t},i.util=g,pointDefaults={success:null,error:null,context:null,raw:null},sendPoint=function(e,t){geoloqi.post("location/update",[{date:g.date.toISO8601(new Date(e.timestamp)),location:{position:{latitude:e.coords.latitude,longitude:e.coords.longitude,speed:e.coords.speed?e.coords.speed:0,altitude:e.coords.altitude?e.coords.altitude:0,horizontal_accuracy:e.coords.accuracy,vertical_accuracy:e.coords.altitudeAccuracy?e.coords.altitudeAccuracy:0},type:"point"},raw:t.raw}]),typeof t.success=="function"&&t.success.apply(t.context,[e])},updateLocation=function(e){function t(e){sendPoint(e,settings)}function n(){typeof settings.error=="function"&&settings.error.apply(settings.context)}settings=g.merge(pointDefaults,e);if(A()&&navigator.geolocation)navigator.geolocation.getCurrentPosition(t,n,{enableHighAccuracy:!0});else{if(!navigator.geolocation)throw"Client does not support HTML5 Geolocation. This function is unavailable";if(!A())throw"Not logged in, no access_token is present. Authorize the user with geoloqi.authorize() first."}},i.updateLocation=updateLocation,watchPosition=function(e){var t=function(){var t=this;this.settings=g.merge(pointDefaults,e),this.settings.context=this.settings.context?this.settings.context:this,this.success=function(e){sendPoint(e,t.settings)},this.error=function(){typeof t.settings.error=="function"&&t.settings.error.call(t.settings.context)},this.start()};t.prototype={stop:function(){navigator.geolocation.clearWatch(this._watcher)},start:function(){this._watcher=navigator.geolocation.watchPosition(this.success,this.error,{enableHighAccuracy:!0})}};if(A()&&navigator.geolocation)return new t;if(!navigator.geolocation)throw"Client does not support HTML5 Geolocation. This function is unavailable";if(!A())throw"Not logged in, no access_token is present. Authorize the user with geoloqi.authorize() first."},i.watchPosition=watchPosition,Batch=function(){var e=function(){this.jobs=[]};return e.prototype={get:function(e,t,n){return this.build_request(e+"?"+g.toQueryString(t),{},n),this},post:function(e,t,n){return this.build_request(e,t,n),this},build_request:function(e,t,n){return this.jobs.push({relative_url:e,body:t,headers:n}),this},run:function(e,t){if(!A())throw"Not logged in, no access_token is present. Authorize the user with geoloqi.authorize() first.";return _("batch/run",{access_token:i.auth.access_token,batch:this.jobs},e,t),this},clear:function(){return this.jobs=[],this}},new e},i.Batch=Batch,i}();window.addEventListener?window.addEventListener("message",function(e){geoloqi.receive(e)}):window.attachEvent&&window.attachEvent("onmessage",function(e){geoloqi.receive(e)});if(!geoloqi)var geoloqi={};geoloqi.maps=function(){var e={},t={};t.merge=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},e.setDefault=function(e){e instanceof google.maps.Map&&(n.map=e,n.pin.map=e,n.line.map=e,n.handle.map=e)},e.getMap=function(){return n.map},e.styles={},e.styles.define=function(n,r,i){i=typeof i!="undefined"?i:!1,e.styles[n]=t.merge(e.styles._default,r),i&&e.styles.setDefault(n)},e.styles.setDefault=function(t){e.styles._default=e.styles[t]},e.styles._default={marker:{},circles:{count:1,fillColor:"#CE7F2C",fillOpacity:.2,strokeColor:"#CE7F2C",strokeWeight:2,strokeOpacity:.6},handle:{},line:{strokeColor:"#000",strokeWeight:2,strokeOpacity:.6},info:{useInfobox:!1}},e.styles.geoloqi_js=e.styles._default;var n={map:null,pin:{style:"_default",map:null,visible:!0,clickable:!1,draggable:!0,editable:!0,radius:100,minRadius:100,autopan:!1,toggleInfobox:!1},line:{clickable:!1,map:null},handle:{icon:e.styles._default.handle.icon,shadow:e.styles._default.handle.shadow,map:null,draggable:!0,raiseOnDrag:!1,clickable:!1,visible:!0},info:{useInfobox:!1,opened:!1,toggleInfoOnClick:!0,openAfterDrag:!0},events:{dragstart:null,dragend:null,drag:null,open:null,close:null,lock:null,unlock:null,radius_changed:null,position_changed:null,map_changed:null,create:null,show:null,hide:null,click:null}};return e.helpers={},e.helpers.fitMapToRadius=function(e,t){bounds=new google.maps.LatLngBounds;var r=google.maps.geometry.spherical;bounds.extend(r.computeOffset(e,t,0)),bounds.extend(r.computeOffset(e,t,180)),bounds.extend(r.computeOffset(e,t,270)),bounds.extend(r.computeOffset(e,t,90)),n.map.fitBounds(bounds)},e.helpers.getIdealRadiusForMap=function(t){fraction=typeof t!="undefined"?100/t:4;var n=e.getMap().getBounds(),r=n.getNorthEast(),i=n.getSouthWest(),s=new google.maps.LatLng(i.lat(),r.lng());return google.maps.geometry.spherical.computeDistanceBetween(r,s)/fraction},e.pins={},e.pins.Basic=function(r,i){i=typeof i!="undefined"?i:!0;var s=function(){this.options=t.merge(n.pin,r),this.style=e.styles[this.options.style],this.options.icon=this.style.marker.icon,this.options.shadow=this.style.marker.shadow,this.options.position instanceof google.maps.LatLng==0&&(this.options.position=new google.maps.LatLng(this.options.position.latitude,this.options.position.longitude)),this.options.editable?r.draggable=!0:r.draggable=!1,this.isVisible=typeof this.options.map=="object"?!0:!1,this.events=t.merge(n.events,r.events),i&&this.initPin()};return s.prototype={centerHere:function(){return mapToPan=this.getMap(),mapToPan.panTo(this.getPosition()),this},onMap:function(){return typeof this.getMap()=="object"?!0:!1},showOnMap:function(e){return e=e?e:n.map,this.marker.setVisible(!0),this.marker.setMap(e),google.maps.event.trigger(this.marker,"show"),this},removeFromMap:function(){return this.marker.setMap(null),google.maps.event.trigger(this.marker,"hide"),this},setDraggable:function(e){return this.marker.setDraggable(e),this},getDraggable:function(){return this.marker.getDraggable()},toggleDraggable:function(){return this.getDraggable()?this.setDraggable(!1):this.setDraggable(!0),this},getMap:function(){return this.marker.getMap()},moveTo:function(e,t){return t=typeof t!="undefined"?t:!1,e instanceof google.maps.LatLng==0&&(e=new google.maps.LatLng(e.latitude,e.longitude)),this.setPosition(e),t&&this.centerHere(),this},setPosition:function(e){return e instanceof google.maps.LatLng==0&&(e=new google.maps.LatLng(e.latitude,e.longitude)),this.marker.setPosition(e),this},getPosition:function(){return this.marker.getPosition()},getLat:function(){return this.getPosition().lat()},getLng:function(){return this.getPosition().lng()},setMap:function(e){return this.marker.setMap(e),google.maps.event.trigger(this.marker,"map_changed"),this},initPin:function(){var e=this;this.marker=new google.maps.Marker(this.options),google.maps.event.addListener(this.marker,"dragstart",function(t){e.events.dragstart?e.events.dragstart.apply(e,[t]):null}),google.maps.event.addListener(this.marker,"drag",function(t){e.events.drag?e.events.drag.apply(e,[t]):null}),google.maps.event.addListener(this.marker,"dragend",function(t){e.options.autopan&&e.getMap().panTo(e.getPosition()),e.events.dragend?e.events.dragend.apply(e,[t]):null}),google.maps.event.addListener(this.marker,"position_changed",function(t){e.events.position_changed?e.events.position_changed.apply(e,[t]):null}),google.maps.event.addListener(this.marker,"map_changed",function(t){e.events.map_changed?e.events.map_changed.apply(e):null}),google.maps.event.addListener(this.marker,"click",function(t){e.events.click?e.events.click.apply(e,[t]):null}),this.events.create?this.events.create():null}},new s},e.pins.WithRadius=function(r,i,s){s=typeof s!="undefined"?s:!0,i=typeof i!="undefined"?i:!0;var o=function(){this.options=t.merge(n.pin,r),this.style=e.styles[this.options.style],this.handleOptions=t.merge(n.handle,this.style.handle),this.handleOptions.position=new google.maps.LatLng(0,0),this.handleOptions.map=this.options.map,this.lineOptions=t.merge(n.line,this.style.line),this.lineOptions.map=this.options.map,this.minRadius=this.options.minRadius,this.hideCircles=function(){if(this.circles.length>0)for(var e=0;e<this.circles.length;e++)this.circles[e].circle.setMap(null);return this},this.showCircles=function(){if(this.circles.length>0)for(var e=0;e<this.circles.length;e++)this.circles[e].circle.setMap(this.getMap());return this},this.getRadius=function(){return this.circles[0].circle.getRadius()},this.setupCircles=function(e,t){var n=this;e=e?e:this.radius,e=Math.max(n.minRadius,e),t=typeof t!="undefined"?t:this.onMap(),this.hideCircles(),this.circles=[];for(var r=0;r<this.style.circles.count;r++)this.circles.push({circle:new google.maps.Circle({center:this.getPosition(),radius:e-r*3,fillColor:this.style.circles.fillColor,fillOpacity:this.style.circles.fillOpacity,strokeColor:this.style.circles.strokeColor,strokeWeight:this.style.circles.strokeWeight,strokeOpacity:this.style.circles.strokeOpacity,map:t?this.getMap():null,zIndex:-1}),index:r}),this.circles[r].circle.bindTo("center",this.marker,"position");return google.maps.event.trigger(this.marker,"radius_changed"),this.updateHandle(),this.updateLine(),this},this.updateHandle=function(){return this.handle.setPosition(google.maps.geometry.spherical.computeOffset(this.marker.getPosition(),this.getRadius(),135)),this},this.updateLine=function(){return this.line.setPath([this.getPosition(),this.handle.getPosition()]),this},this.hideHandle=function(){return this.line.setMap(null),this.handle.setMap(null),this},this.fitCircles=function(t){return t=t?t:50,this.setupCircles(e.helpers.getIdealRadiusForMap(t)),this},this.showHandle=function(){return this.updateHandle(),this.updateLine(),this.line.setMap(this.getMap()),this.handle.setMap(this.getMap()),this},this.fitCircles=function(){return this.setupCircles(e.helpers.getIdealRadiusForMap()),this},this.lockPin=function(){return this.isLocked||(this.setDraggable(!1),this.isLocked=!0,this.hideHandle(),google.maps.event.trigger(this.marker,"locked")),this},this.unlockPin=function(){return this.isLocked&&(this.marker.setDraggable(!0),this.isLocked=!1,this.getMap()&&this.showHandle(),google.maps.event.trigger(this.marker,"unlocked")),this},this.toggleLock=function(){return this.isLocked?this.unlockPin():this.lockPin(),this},this.initRadius=function(){var t=this;this.line=new google.maps.Polyline(this.lineOptions),this.handle=new google.maps.Marker(this.handleOptions),this.circles=[],this.options.draggable=this.options.editable,this.options.editable?this.unlockPin():this.lockPin(),this.setupCircles(this.options.radius,this.options.map),this.updateHandle(),this.updateLine(),google.maps.event.addListener(this.marker,"hide",function(e){t.hideHandle(),t.hideCircles()}),google.maps.event.addListener(this.marker,"map_changed",function(e){t.isLocked||t.showHandle();for(var n=0;n<=t.circles.length-1;n++)t.circles[n].circle.setMap(t.getMap())}),google.maps.event.addListener(this.marker,"show",function(e){t.isLocked||t.showHandle(),t.showCircles()}),google.maps.event.addListener(this.marker,"position_changed",function(e){t.updateHandle(),t.updateLine()}),google.maps.event.addListener(this.marker,"dragstart",function(e){t.hideHandle()}),google.maps.event.addListener(this.marker,"radius_changed",function(e){t.events.radius_changed?t.events.radius_changed.apply(t):null}),google.maps.event.addListener(this.marker,"dragend",function(e){t.updateHandle(),t.showHandle()}),google.maps.event.addListener(this.handle,"drag",function(e){var n=google.maps.geometry.spherical,r=t.getPosition(),i=e.latLng,s=function(e){return e*(Math.PI/180)},o=n.computeHeading(r,i),u=45+o,a=n.computeDistanceBetween(r,i);projectedRadius=-1*Math.cos(s(u))*a,newRadius=projectedRadius>=t.minRadius?projectedRadius:t.minRadius;if(newRadius>=t.minRadius){t.handle.setPosition(n.computeOffset(r,newRadius,135)),t.updateLine();for(var f=0;f<t.style.circles.count;f++)t.circles[f].circle.setRadius(newRadius-f*3)}}),google.maps.event.addListener(this.handle,"dragend",function(r){var i=n.map.getBounds();i.contains(t.handle.getPosition())||e.helpers.fitMapToRadius(t.marker.getPosition(),t.getRadius()),google.maps.event.trigger(t.marker,"radius_changed")})},i?this.initRadius():null};return s?o.prototype=new e.pins.Basic(r):"",new o},e.pins.WithInfobox=function(r,i,s){s=typeof s!="undefined"?s:!0,i=typeof i!="undefined"?i:!0;var o=function(){this.options=t.merge(n.pin,r),this.style=e.styles[this.options.style],this.infoOptions=t.merge(t.merge(n.info,this.style.info),r),this.hide=function(){return this.infoVisible=!1,!this.options.content instanceof google.maps.InfoWindow?this.info.hide():this.close(),this},this.show=function(){return this.infoVisible=!0,!this.options.content instanceof google.maps.InfoWindow?this.info.show(n.map,this.marker):this.open(),this},this.open=function(){return this.opened=!0,this.infoVisible=!0,this.delayedInfobox=!0,this.info.open(n.map,this.marker),google.maps.event.trigger(this.marker,"open"),this},this.close=function(){return this.opened=!1,this.infoVisible=!1,this.info.close(),google.maps.event.trigger(this.marker,"close"),this},this.toggleInfo=function(){return this.infoVisible?this.hide():this.show(),this},this.setContent=function(e){return this.info.setContent(e),this},this.getContent=function(e){return this.info.getContent()},this.setInfo=function(e,t){return typeof t!="undefined"?t:!1,this.info?this.info.close():null,this.info=e,this.opened=t,t?this.info.open(n.map,this.marker):this.close(),google.maps.event.addListener(this.info,"close",function(){self.opened=!1}),google.maps.event.addListener(this.info,"closeclick",function(){self.opened=!1}),this},this.initInfobox=function(){var e=this;this.opened=this.infoOptions.opened,this.infoOptions.position=null,typeof this.options.content=="string"?this.infoOptions.useInfobox?this.setInfo(new InfoBox(this.infoOptions),this.opened):this.setInfo(new google.maps.InfoWindow(this.infoOptions),this.opened):this.options.content instanceof InfoBox||this.options.content instanceof google.maps.InfoWindow?this.setInfo(this.options.content,this.opened):this.info=null,this.options.toggleInfoOnClick&&(this.isClickable=!0,this.marker.setClickable(!0),this.clickEvent=google.maps.event.addListener(this.marker,"click",function(t){e.opened?e.close():e.open()})),this.delayedInfobox=!1,google.maps.event.addListener(this.marker,"dragstart",function(t){e.hide()}),google.maps.event.addListener(this.marker,"dragend",function(t){e.infoVisible||e.show()}),google.maps.event.addListener(this.marker,"hide",function(t){e.info.close()}),google.maps.event.addListener(this.marker,"open",function(t){e.events.open?e.events.open.apply(e,[t]):null}),google.maps.event.addListener(this.marker,"close",function(t){e.events.close?e.events.close.apply(e,[t]):null})},i?this.initInfobox():null};return s?o.prototype=new e.pins.Basic(r):null,new o},e.pins.WithInfoboxAndRadius=function(n,r,i){i=typeof i!="undefined"?i:!0,r=typeof r!="undefined"?r:!0;var s=function(){this.initInfoboxAndRadius=function(){var e=this;google.maps.event.addListener(this.handle,"dragstart",function(t){e.opened&&e.options.openAfterDrag&&e.close()}),google.maps.event.addListener(this.handle,"dragend",function(t){!e.opened&&e.options.openAfterDrag&&e.open()})},r&&(this.initRadius(),this.initInfobox(),this.initInfoboxAndRadius())};return s.prototype=t.merge(new e.pins.WithRadius(n,!1,!0),new e.pins.WithInfobox(n,!1,!1)),new s},e.InfoBox=function(r,i){return style=i?e.styles[i]:e.styles._default,options=t.merge(n.info,style.info),options.content=r,new InfoBox(options)},e}();if(typeof geoloqi=="undefined")var geoloqi={};geoloqi.Socket=function(e,t,n){var r=function(){n=typeof n=="undefined"?{}:n;var r=this,i="https://subscribe.geoloqi.com:443";this.auth=t,this.type=e,this.events={start:n.start||null,location:n.location||null,disconnect:n.disconnect||null},this.socket=io.connect(i),this.start=function(){this.socket.on("enter authentication",function(e){r.socket.emit("token",r.type+"-"+r.auth),r.events.start}),this.socket.on("location",function(e){var e=JSON.parse(e);r.events.location(e)}),this.socket.on("disconnect",r.events.disconnect)}};return new r};