radar-sdk-js
Advanced tools
Comparing version 3.5.0 to 3.5.1-beta
@@ -1,1 +0,1 @@ | ||
var Radar=function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n,r,o=function(t){return t&&t.Math==Math&&t},f=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||function(){return this}()||Function("return this")(),s=function(t){try{return!!t()}catch(t){return!0}},l=!s(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),i=!s(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}),a=Function.prototype.call,m=i?a.bind(a):function(){return a.apply(a,arguments)},u={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,p={f:c&&!u.call({1:2},1)?function(t){var e=c(this,t);return!!e&&e.enumerable}:u},v=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},d=Function.prototype,h=d.bind,g=d.call,y=i&&h.bind(g,g),E=i?function(t){return t&&y(t)}:function(t){return t&&function(){return g.apply(t,arguments)}},R=E({}.toString),S=E("".slice),O=function(t){return S(R(t),8,-1)},b=Object,x=E("".split),I=s(function(){return!b("z").propertyIsEnumerable(0)})?function(t){return"String"==O(t)?x(t,""):b(t)}:b,T=TypeError,w=function(t){if(null==t)throw T("Can't call method on "+t);return t},_=function(t){return I(w(t))},P=function(t){return"function"==typeof t},k=function(t){return"object"==typeof t?null!==t:P(t)},C=function(t,e){return arguments.length<2?(n=f[t],P(n)?n:void 0):f[t]&&f[t][e];var n},j=E({}.isPrototypeOf),A=C("navigator","userAgent")||"",N=f.process,L=f.Deno,D=N&&N.versions||L&&L.version,U=D&&D.v8;U&&(r=0<(n=U.split("."))[0]&&n[0]<4?1:+(n[0]+n[1])),!r&&A&&(!(n=A.match(/Edge\/(\d+)/))||74<=n[1])&&(n=A.match(/Chrome\/(\d+)/))&&(r=+n[1]);var M=r,G=!!Object.getOwnPropertySymbols&&!s(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&M&&M<41}),H=G&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,F=Object,B=H?function(t){return"symbol"==typeof t}:function(t){var e=C("Symbol");return P(e)&&j(e.prototype,F(t))},q=String,V=function(t){try{return q(t)}catch(t){return"Object"}},K=TypeError,Y=function(t){if(P(t))return t;throw K(V(t)+" is not a function")},$=function(t,e){var n=t[e];return null==n?void 0:Y(n)},W=TypeError,z=Object.defineProperty,J=function(e,n){try{z(f,e,{value:n,configurable:!0,writable:!0})}catch(t){f[e]=n}return n},Q="__core-js_shared__",X=f[Q]||J(Q,{}),Z=e(function(t){(t.exports=function(t,e){return X[t]||(X[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.23.3",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.3/LICENSE",source:"https://github.com/zloirock/core-js"})}),tt=Object,et=function(t){return tt(w(t))},nt=E({}.hasOwnProperty),rt=Object.hasOwn||function(t,e){return nt(et(t),e)},ot=0,it=Math.random(),at=E(1..toString),ut=function(t){return"Symbol("+(void 0===t?"":t)+")_"+at(++ot+it,36)},ct=Z("wks"),st=f.Symbol,ft=st&&st.for,lt=H?st:st&&st.withoutSetter||ut,pt=function(t){if(!rt(ct,t)||!G&&"string"!=typeof ct[t]){var e="Symbol."+t;G&&rt(st,t)?ct[t]=st[t]:ct[t]=H&&ft?ft(e):lt(e)}return ct[t]},vt=TypeError,dt=pt("toPrimitive"),ht=function(t,e){if(!k(t)||B(t))return t;var n,r=$(t,dt);if(r){if(void 0===e&&(e="default"),n=m(r,t,e),!k(n)||B(n))return n;throw vt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&P(n=t.toString)&&!k(r=m(n,t)))return r;if(P(n=t.valueOf)&&!k(r=m(n,t)))return r;if("string"!==e&&P(n=t.toString)&&!k(r=m(n,t)))return r;throw W("Can't convert object to primitive value")}(t,e)},gt=function(t){var e=ht(t,"string");return B(e)?e:e+""},yt=f.document,mt=k(yt)&&k(yt.createElement),Et=function(t){return mt?yt.createElement(t):{}},Rt=!l&&!s(function(){return 7!=Object.defineProperty(Et("div"),"a",{get:function(){return 7}}).a}),St=Object.getOwnPropertyDescriptor,Ot={f:l?St:function(t,e){if(t=_(t),e=gt(e),Rt)try{return St(t,e)}catch(t){}if(rt(t,e))return v(!m(p.f,t,e),t[e])}},bt=l&&s(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),xt=String,It=TypeError,Tt=function(t){if(k(t))return t;throw It(xt(t)+" is not an object")},wt=TypeError,_t=Object.defineProperty,Pt=Object.getOwnPropertyDescriptor,kt="enumerable",Ct="configurable",jt="writable",At={f:l?bt?function(t,e,n){if(Tt(t),e=gt(e),Tt(n),"function"==typeof t&&"prototype"===e&&"value"in n&&jt in n&&!n[jt]){var r=Pt(t,e);r&&r[jt]&&(t[e]=n.value,n={configurable:Ct in n?n[Ct]:r[Ct],enumerable:kt in n?n[kt]:r[kt],writable:!1})}return _t(t,e,n)}:_t:function(t,e,n){if(Tt(t),e=gt(e),Tt(n),Rt)try{return _t(t,e,n)}catch(t){}if("get"in n||"set"in n)throw wt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},Nt=l?function(t,e,n){return At.f(t,e,v(1,n))}:function(t,e,n){return t[e]=n,t},Lt=Function.prototype,Dt=l&&Object.getOwnPropertyDescriptor,Ut=rt(Lt,"name"),Mt={EXISTS:Ut,PROPER:Ut&&"something"===function(){}.name,CONFIGURABLE:Ut&&(!l||l&&Dt(Lt,"name").configurable)},Gt=E(Function.toString);P(X.inspectSource)||(X.inspectSource=function(t){return Gt(t)});var Ht,Ft,Bt,qt=X.inspectSource,Vt=f.WeakMap,Kt=P(Vt)&&/native code/.test(qt(Vt)),Yt=Z("keys"),$t=function(t){return Yt[t]||(Yt[t]=ut(t))},Wt={},zt="Object already initialized",Jt=f.TypeError,Qt=f.WeakMap;if(Kt||X.state){var Xt=X.state||(X.state=new Qt),Zt=E(Xt.get),te=E(Xt.has),ee=E(Xt.set);Ht=function(t,e){if(te(Xt,t))throw new Jt(zt);return e.facade=t,ee(Xt,t,e),e},Ft=function(t){return Zt(Xt,t)||{}},Bt=function(t){return te(Xt,t)}}else{var ne=$t("state");Wt[ne]=!0,Ht=function(t,e){if(rt(t,ne))throw new Jt(zt);return e.facade=t,Nt(t,ne,e),e},Ft=function(t){return rt(t,ne)?t[ne]:{}},Bt=function(t){return rt(t,ne)}}var re={set:Ht,get:Ft,has:Bt,enforce:function(t){return Bt(t)?Ft(t):Ht(t,{})},getterFor:function(n){return function(t){var e;if(!k(t)||(e=Ft(t)).type!==n)throw Jt("Incompatible receiver, "+n+" required");return e}}},oe=e(function(t){var o=Mt.CONFIGURABLE,i=re.enforce,e=re.get,a=Object.defineProperty,u=l&&!s(function(){return 8!==a(function(){},"length",{value:8}).length}),c=String(String).split("String"),n=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!rt(t,"name")||o&&t.name!==e)&&(l?a(t,"name",{value:e,configurable:!0}):t.name=e),u&&n&&rt(n,"arity")&&t.length!==n.arity&&a(t,"length",{value:n.arity});try{n&&rt(n,"constructor")&&n.constructor?l&&a(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=i(t);return rt(r,"source")||(r.source=c.join("string"==typeof e?e:"")),t};Function.prototype.toString=n(function(){return P(this)&&e(this).source||qt(this)},"toString")}),ie=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(P(n)&&oe(n,i,r),r.global)o?t[e]=n:J(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:At.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},ae=Math.ceil,ue=Math.floor,ce=Math.trunc||function(t){var e=+t;return(0<e?ue:ae)(e)},se=function(t){var e=+t;return e!=e||0===e?0:ce(e)},fe=Math.max,le=Math.min,pe=Math.min,ve=function(t){return 0<t?pe(se(t),9007199254740991):0},de=function(t){return ve(t.length)},he=function(s){return function(t,e,n){var r,o,i,a=_(t),u=de(a),c=(r=u,(o=se(n))<0?fe(o+r,0):le(o,r));if(s&&e!=e){for(;c<u;)if((i=a[c++])!=i)return!0}else for(;c<u;c++)if((s||c in a)&&a[c]===e)return s||c||0;return!s&&-1}},ge={includes:he(!0),indexOf:he(!1)}.indexOf,ye=E([].push),me=function(t,e){var n,r=_(t),o=0,i=[];for(n in r)!rt(Wt,n)&&rt(r,n)&&ye(i,n);for(;e.length>o;)rt(r,n=e[o++])&&(~ge(i,n)||ye(i,n));return i},Ee=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Re=Ee.concat("length","prototype"),Se={f:Object.getOwnPropertyNames||function(t){return me(t,Re)}},Oe={f:Object.getOwnPropertySymbols},be=E([].concat),xe=C("Reflect","ownKeys")||function(t){var e=Se.f(Tt(t)),n=Oe.f;return n?be(e,n(t)):e},Ie=function(t,e,n){for(var r=xe(e),o=At.f,i=Ot.f,a=0;a<r.length;a++){var u=r[a];rt(t,u)||n&&rt(n,u)||o(t,u,i(e,u))}},Te=/#|\.prototype\./,we=function(t,e){var n=Pe[_e(t)];return n==Ce||n!=ke&&(P(e)?s(e):!!e)},_e=we.normalize=function(t){return String(t).replace(Te,".").toLowerCase()},Pe=we.data={},ke=we.NATIVE="N",Ce=we.POLYFILL="P",je=we,Ae=Ot.f,Ne=function(t,e){var n,r,o,i,a,u=t.target,c=t.global,s=t.stat;if(n=c?f:s?f[u]||J(u,{}):(f[u]||{}).prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(a=Ae(n,r))&&a.value:n[r],!je(c?r:u+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ie(i,o)}(t.sham||o&&o.sham)&&Nt(i,"sham",!0),ie(n,r,i,t)}},Le=Object.keys||function(t){return me(t,Ee)};Ne({target:"Object",stat:!0,forced:s(function(){Le(1)})},{keys:function(t){return Le(et(t))}});var De={};De[pt("toStringTag")]="z";var Ue,Me="[object z]"===String(De),Ge=pt("toStringTag"),He=Object,Fe="Arguments"==O(function(){return arguments}()),Be=Me?O:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=He(t),Ge))?n:Fe?O(e):"Object"==(r=O(e))&&P(e.callee)?"Arguments":r},qe=String,Ve=function(t){if("Symbol"===Be(t))throw TypeError("Cannot convert a Symbol value to a string");return qe(t)},Ke="\t\n\v\f\r \u2028\u2029\ufeff",Ye=E("".replace),$e="["+Ke+"]",We=RegExp("^"+$e+$e+"*"),ze=RegExp($e+$e+"*$"),Je=function(n){return function(t){var e=Ve(w(t));return 1&n&&(e=Ye(e,We,"")),2&n&&(e=Ye(e,ze,"")),e}},Qe={start:Je(1),end:Je(2),trim:Je(3)},Xe=Mt.PROPER,Ze=Qe.trim;function tn(t){return(tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function en(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function nn(u){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=u.apply(t,a);function o(t){en(r,e,n,o,i,"next",t)}function i(t){en(r,e,n,o,i,"throw",t)}o(void 0)})}}function rn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function on(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function an(t,e,n){return e&&on(t.prototype,e),n&&on(t,n),t}function un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cn(o){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?un(Object(i),!0).forEach(function(t){var e,n,r;e=o,r=i[n=t],n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):un(Object(i)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(i,t))})}return o}Ne({target:"String",proto:!0,forced:(Ue="trim",s(function(){return!!Ke[Ue]()||" "!==" "[Ue]()||Xe&&Ke[Ue].name!==Ue}))},{trim:function(){return Ze(this)}});var sn=Me?{}.toString:function(){return"[object "+Be(this)+"]"};Me||ie(Object.prototype,"toString",sn,{unsafe:!0});var fn="process"==O(f.process),ln=String,pn=TypeError,vn=Object.setPrototypeOf||("__proto__"in{}?function(){var n,r=!1,t={};try{(n=E(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(t,[]),r=t instanceof Array}catch(t){}return function(t,e){return Tt(t),function(t){if("object"==typeof t||P(t))return;throw pn("Can't set "+ln(t)+" as a prototype")}(e),r?n(t,e):t.__proto__=e,t}}():void 0),dn=At.f,hn=pt("toStringTag"),gn=pt("species"),yn=TypeError,mn=function(){},En=[],Rn=C("Reflect","construct"),Sn=/^\s*(?:class|function)\b/,On=E(Sn.exec),bn=!Sn.exec(mn),xn=function(t){if(!P(t))return!1;try{return Rn(mn,En,t),!0}catch(t){return!1}},In=function(t){if(!P(t))return!1;switch(Be(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return bn||!!On(Sn,qt(t))}catch(t){return!0}};In.sham=!0;var Tn,wn,_n,Pn,kn=!Rn||s(function(){var t;return xn(xn.call)||!xn(Object)||!xn(function(){t=!0})||t})?In:xn,Cn=TypeError,jn=pt("species"),An=function(t,e){var n,r=Tt(t).constructor;return void 0===r||null==(n=Tt(r)[jn])?e:function(t){if(kn(t))return t;throw Cn(V(t)+" is not a constructor")}(n)},Nn=Function.prototype,Ln=Nn.apply,Dn=Nn.call,Un="object"==typeof Reflect&&Reflect.apply||(i?Dn.bind(Ln):function(){return Dn.apply(Ln,arguments)}),Mn=E(E.bind),Gn=function(t,e){return Y(t),void 0===e?t:i?Mn(t,e):function(){return t.apply(e,arguments)}},Hn=C("document","documentElement"),Fn=E([].slice),Bn=TypeError,qn=/(?:ipad|iphone|ipod).*applewebkit/i.test(A),Vn=f.setImmediate,Kn=f.clearImmediate,Yn=f.process,$n=f.Dispatch,Wn=f.Function,zn=f.MessageChannel,Jn=f.String,Qn=0,Xn={},Zn="onreadystatechange";try{Tn=f.location}catch(t){}var tr=function(t){if(rt(Xn,t)){var e=Xn[t];delete Xn[t],e()}},er=function(t){return function(){tr(t)}},nr=function(t){tr(t.data)},rr=function(t){f.postMessage(Jn(t),Tn.protocol+"//"+Tn.host)};Vn&&Kn||(Vn=function(t){!function(t,e){if(t<e)throw Bn("Not enough arguments")}(arguments.length,1);var e=P(t)?t:Wn(t),n=Fn(arguments,1);return Xn[++Qn]=function(){Un(e,void 0,n)},wn(Qn),Qn},Kn=function(t){delete Xn[t]},fn?wn=function(t){Yn.nextTick(er(t))}:$n&&$n.now?wn=function(t){$n.now(er(t))}:zn&&!qn?(Pn=(_n=new zn).port2,_n.port1.onmessage=nr,wn=Gn(Pn.postMessage,Pn)):f.addEventListener&&P(f.postMessage)&&!f.importScripts&&Tn&&"file:"!==Tn.protocol&&!s(rr)?(wn=rr,f.addEventListener("message",nr,!1)):wn=Zn in Et("script")?function(t){Hn.appendChild(Et("script"))[Zn]=function(){Hn.removeChild(this),tr(t)}}:function(t){setTimeout(er(t),0)});var or,ir,ar,ur,cr,sr,fr,lr,pr={set:Vn,clear:Kn},vr=/ipad|iphone|ipod/i.test(A)&&void 0!==f.Pebble,dr=/web0s(?!.*chrome)/i.test(A),hr=Ot.f,gr=pr.set,yr=f.MutationObserver||f.WebKitMutationObserver,mr=f.document,Er=f.process,Rr=f.Promise,Sr=hr(f,"queueMicrotask"),Or=Sr&&Sr.value;Or||(or=function(){var t,e;for(fn&&(t=Er.domain)&&t.exit();ir;){e=ir.fn,ir=ir.next;try{e()}catch(t){throw ir?ur():ar=void 0,t}}ar=void 0,t&&t.enter()},ur=qn||fn||dr||!yr||!mr?!vr&&Rr&&Rr.resolve?((fr=Rr.resolve(void 0)).constructor=Rr,lr=Gn(fr.then,fr),function(){lr(or)}):fn?function(){Er.nextTick(or)}:(gr=Gn(gr,f),function(){gr(or)}):(cr=!0,sr=mr.createTextNode(""),new yr(or).observe(sr,{characterData:!0}),function(){sr.data=cr=!cr}));var br=Or||function(t){var e={fn:t,next:void 0};ar&&(ar.next=e),ir||(ir=e,ur()),ar=e},xr=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Ir=function(){this.head=null,this.tail=null};Ir.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}};var Tr,wr,_r,Pr,kr,Cr,jr,Ar,Nr=Ir,Lr=f.Promise,Dr="object"==typeof window&&"object"!=typeof Deno,Ur=(Lr&&Lr.prototype,pt("species")),Mr=!1,Gr=P(f.PromiseRejectionEvent),Hr={CONSTRUCTOR:je("Promise",function(){var t=qt(Lr),e=t!==String(Lr);if(!e&&66===M)return!0;if(51<=M&&/native code/.test(t))return!1;var n=new Lr(function(t){t(1)}),r=function(t){t(function(){},function(){})};return(n.constructor={})[Ur]=r,!(Mr=n.then(function(){})instanceof r)||!e&&Dr&&!Gr}),REJECTION_EVENT:Gr,SUBCLASSING:Mr},Fr=function(t){var n,r;this.promise=new t(function(t,e){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=t,r=e}),this.resolve=Y(n),this.reject=Y(r)},Br={f:function(t){return new Fr(t)}},qr=pr.set,Vr="Promise",Kr=Hr.CONSTRUCTOR,Yr=Hr.REJECTION_EVENT,$r=Hr.SUBCLASSING,Wr=re.getterFor(Vr),zr=re.set,Jr=Lr&&Lr.prototype,Qr=Lr,Xr=Jr,Zr=f.TypeError,to=f.document,eo=f.process,no=Br.f,ro=no,oo=!!(to&&to.createEvent&&f.dispatchEvent),io="unhandledrejection",ao=function(t){var e;return!(!k(t)||!P(e=t.then))&&e},uo=function(t,e){var n,r,o,i=e.value,a=1==e.state,u=a?t.ok:t.fail,c=t.resolve,s=t.reject,f=t.domain;try{u?(a||(2===e.rejection&&po(e),e.rejection=1),!0===u?n=i:(f&&f.enter(),n=u(i),f&&(f.exit(),o=!0)),n===t.promise?s(Zr("Promise-chain cycle")):(r=ao(n))?m(r,n,c,s):c(n)):s(i)}catch(t){f&&!o&&f.exit(),s(t)}},co=function(n,r){n.notified||(n.notified=!0,br(function(){for(var t,e=n.reactions;t=e.get();)uo(t,n);n.notified=!1,r&&!n.rejection&&fo(n)}))},so=function(t,e,n){var r,o;oo?((r=to.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),f.dispatchEvent(r)):r={promise:e,reason:n},!Yr&&(o=f["on"+t])?o(r):t===io&&function(t,e){var n=f.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},fo=function(r){m(qr,f,function(){var t,e=r.facade,n=r.value;if(lo(r)&&(t=xr(function(){fn?eo.emit("unhandledRejection",n,e):so(io,e,n)}),r.rejection=fn||lo(r)?2:1,t.error))throw t.value})},lo=function(t){return 1!==t.rejection&&!t.parent},po=function(e){m(qr,f,function(){var t=e.facade;fn?eo.emit("rejectionHandled",t):so("rejectionhandled",t,e.value)})},vo=function(e,n,r){return function(t){e(n,t,r)}},ho=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,co(t,!0))},go=function(n,t,e){if(!n.done){n.done=!0,e&&(n=e);try{if(n.facade===t)throw Zr("Promise can't be resolved itself");var r=ao(t);r?br(function(){var e={done:!1};try{m(r,t,vo(go,e,n),vo(ho,e,n))}catch(t){ho(e,t,n)}}):(n.value=t,n.state=1,co(n,!1))}catch(t){ho({done:!1},t,n)}}};if(Kr&&(Xr=(Qr=function(t){!function(t,e){if(j(e,t))return;throw yn("Incorrect invocation")}(this,Xr),Y(t),m(Tr,this);var e=Wr(this);try{t(vo(go,e),vo(ho,e))}catch(t){ho(e,t)}}).prototype,(Tr=function(t){zr(this,{type:Vr,done:!1,notified:!1,parent:!1,reactions:new Nr,rejection:!1,state:0,value:void 0})}).prototype=ie(Xr,"then",function(t,e){var n=Wr(this),r=no(An(this,Qr));return n.parent=!0,r.ok=!P(t)||t,r.fail=P(e)&&e,r.domain=fn?eo.domain:void 0,0==n.state?n.reactions.add(r):br(function(){uo(r,n)}),r.promise}),wr=function(){var t=new Tr,e=Wr(t);this.promise=t,this.resolve=vo(go,e),this.reject=vo(ho,e)},Br.f=no=function(t){return t===Qr||void 0===t?new wr(t):ro(t)},P(Lr)&&Jr!==Object.prototype)){_r=Jr.then,$r||ie(Jr,"then",function(t,e){var n=this;return new Qr(function(t,e){m(_r,n,t,e)}).then(t,e)},{unsafe:!0});try{delete Jr.constructor}catch(t){}vn&&vn(Jr,Xr)}Ne({global:!0,constructor:!0,wrap:!0,forced:Kr},{Promise:Qr}),Cr=!(kr=Vr),(Pr=Qr)&&!Cr&&(Pr=Pr.prototype),Pr&&!rt(Pr,hn)&&dn(Pr,hn,{configurable:!0,value:kr}),jr=C(Vr),Ar=At.f,l&&jr&&!jr[gn]&&Ar(jr,gn,{configurable:!0,get:function(){return this}});var yo={},mo=pt("iterator"),Eo=Array.prototype,Ro=pt("iterator"),So=function(t){if(null!=t)return $(t,Ro)||$(t,"@@iterator")||yo[Be(t)]},Oo=TypeError,bo=function(t,e,n){var r,o;Tt(t);try{if(!(r=$(t,"return"))){if("throw"===e)throw n;return n}r=m(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return Tt(r),n},xo=TypeError,Io=function(t,e){this.stopped=t,this.result=e},To=Io.prototype,wo=function(t,e,n){var r,o,i,a,u,c,s,f,l=n&&n.that,p=!(!n||!n.AS_ENTRIES),v=!(!n||!n.IS_ITERATOR),d=!(!n||!n.INTERRUPTED),h=Gn(e,l),g=function(t){return r&&bo(r,"normal",t),new Io(!0,t)},y=function(t){return p?(Tt(t),d?h(t[0],t[1],g):h(t[0],t[1])):d?h(t,g):h(t)};if(v)r=t;else{if(!(o=So(t)))throw xo(V(t)+" is not iterable");if(void 0!==(f=o)&&(yo.Array===f||Eo[mo]===f)){for(i=0,a=de(t);i<a;i++)if((u=y(t[i]))&&j(To,u))return u;return new Io(!1)}r=function(t,e){var n=arguments.length<2?So(t):e;if(Y(n))return Tt(m(n,t));throw Oo(V(t)+" is not iterable")}(t,o)}for(c=r.next;!(s=m(c,r)).done;){try{u=y(s.value)}catch(t){bo(r,"throw",t)}if("object"==typeof u&&u&&j(To,u))return u}return new Io(!1)},_o=pt("iterator"),Po=!1;try{var ko=0,Co={next:function(){return{done:!!ko++}},return:function(){Po=!0}};Co[_o]=function(){return this},Array.from(Co,function(){throw 2})}catch(t){}var jo=Hr.CONSTRUCTOR||!function(t,e){if(!e&&!Po)return!1;var n=!1;try{var r={};r[_o]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}(function(t){Lr.all(t).then(void 0,function(){})});Ne({target:"Promise",stat:!0,forced:jo},{all:function(t){var u=this,e=Br.f(u),c=e.resolve,s=e.reject,n=xr(function(){var r=Y(u.resolve),o=[],i=0,a=1;wo(t,function(t){var e=i++,n=!1;a++,m(r,u,t).then(function(t){n||(n=!0,o[e]=t,--a||c(o))},s)}),--a||c(o)});return n.error&&s(n.value),e.promise}});var Ao=Hr.CONSTRUCTOR,No=Lr&&Lr.prototype;if(Ne({target:"Promise",proto:!0,forced:Ao,real:!0},{catch:function(t){return this.then(void 0,t)}}),P(Lr)){var Lo=C("Promise").prototype.catch;No.catch!==Lo&&ie(No,"catch",Lo,{unsafe:!0})}Ne({target:"Promise",stat:!0,forced:jo},{race:function(t){var n=this,r=Br.f(n),o=r.reject,e=xr(function(){var e=Y(n.resolve);wo(t,function(t){m(e,n,t).then(r.resolve,o)})});return e.error&&o(e.value),r.promise}}),Ne({target:"Promise",stat:!0,forced:Hr.CONSTRUCTOR},{reject:function(t){var e=Br.f(this);return m(e.reject,void 0,t),e.promise}});var Do=Hr.CONSTRUCTOR;C("Promise");Ne({target:"Promise",stat:!0,forced:Do},{resolve:function(t){return function(t,e){if(Tt(t),k(e)&&e.constructor===t)return e;var n=Br.f(t);return(0,n.resolve)(e),n.promise}(this,t)}});var Uo={SUCCESS:"SUCCESS",ERROR_PUBLISHABLE_KEY:"ERROR_PUBLISHABLE_KEY",ERROR_PERMISSIONS:"ERROR_PERMISSIONS",ERROR_LOCATION:"ERROR_LOCATION",ERROR_NETWORK:"ERROR_NETWORK",ERROR_BAD_REQUEST:"ERROR_BAD_REQUEST",ERROR_UNAUTHORIZED:"ERROR_UNAUTHORIZED",ERROR_PAYMENT_REQUIRED:"ERROR_PAYMENT_REQUIRED",ERROR_FORBIDDEN:"ERROR_FORBIDDEN",ERROR_NOT_FOUND:"ERROR_NOT_FOUND",ERROR_RATE_LIMIT:"ERROR_RATE_LIMIT",ERROR_SERVER:"ERROR_SERVER",ERROR_UNKNOWN:"ERROR_UNKNOWN"},Mo=function(){function t(){rn(this,t)}return an(t,null,[{key:"getCurrentPosition",value:function(){return new Promise(function(i,a){if(!navigator||!navigator.geolocation)return a(Uo.ERROR_LOCATION);navigator.geolocation.getCurrentPosition(function(t){if(!t||!t.coords)return a(Uo.ERROR_LOCATION);var e=t.coords,n=e.latitude,r=e.longitude,o=e.accuracy;return i({latitude:n,longitude:r,accuracy:o})},function(t){return t&&t.code&&1===t.code?a(Uo.ERROR_PERMISSIONS):a(Uo.ERROR_LOCATION)})})}}]),t}(),Go=Array.isArray||function(t){return"Array"==O(t)},Ho=TypeError,Fo=function(t){if(9007199254740991<t)throw Ho("Maximum allowed index exceeded");return t},Bo=function(t,e,n){var r=gt(e);r in t?At.f(t,r,v(0,n)):t[r]=n},qo=pt("species"),Vo=Array,Ko=function(t,e){return Go(n=t)&&(r=n.constructor,kn(r)&&(r===Vo||Go(r.prototype))?r=void 0:k(r)&&null===(r=r[qo])&&(r=void 0)),new(void 0===r?Vo:r)(0===e?0:e);var n,r},Yo=pt("species"),$o=function(e){return 51<=M||!s(function(){var t=[];return(t.constructor={})[Yo]=function(){return{foo:1}},1!==t[e](Boolean).foo})},Wo=pt("isConcatSpreadable"),zo=51<=M||!s(function(){var t=[];return t[Wo]=!1,t.concat()[0]!==t}),Jo=$o("concat"),Qo=function(t){if(!k(t))return!1;var e=t[Wo];return void 0!==e?!!e:Go(t)};Ne({target:"Array",proto:!0,arity:1,forced:!zo||!Jo},{concat:function(t){var e,n,r,o,i,a=et(this),u=Ko(a,0),c=0;for(e=-1,r=arguments.length;e<r;e++)if(i=-1===e?a:arguments[e],Qo(i))for(o=de(i),Fo(c+o),n=0;n<o;n++,c++)n in i&&Bo(u,c,i[n]);else Fo(c+1),Bo(u,c++,i);return u.length=c,u}});e(function(t){var e=function(a){var c,t=Object.prototype,f=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",r=e.toStringTag||"@@toStringTag";function u(t,e,n,r){var i,a,u,c,o=e&&e.prototype instanceof y?e:y,s=Object.create(o.prototype),f=new w(r||[]);return s._invoke=(i=t,a=n,u=f,c=p,function(t,e){if(c===d)throw new Error("Generator is already running");if(c===h){if("throw"===t)throw e;return P()}for(u.method=t,u.arg=e;;){var n=u.delegate;if(n){var r=x(n,u);if(r){if(r===g)continue;return r}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(c===p)throw c=h,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);c=d;var o=l(i,a,u);if("normal"===o.type){if(c=u.done?h:v,o.arg===g)continue;return{value:o.arg,done:u.done}}"throw"===o.type&&(c=h,u.method="throw",u.arg=o.arg)}}),s}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var p="suspendedStart",v="suspendedYield",d="executing",h="completed",g={};function y(){}function i(){}function s(){}var m={};m[o]=function(){return this};var E=Object.getPrototypeOf,R=E&&E(E(_([])));R&&R!==t&&f.call(R,o)&&(m=R);var S=s.prototype=y.prototype=Object.create(m);function O(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function b(c,s){var e;this._invoke=function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,o){var i=l(c[t],c,n);if("throw"!==i.type){var a=i.arg,u=a.value;return u&&"object"==typeof u&&f.call(u,"__await")?s.resolve(u.__await).then(function(t){e("next",t,r,o)},function(t){e("throw",t,r,o)}):s.resolve(u).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,o)})}o(i.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function x(t,e){var n=t.iterator[e.method];if(n===c){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=c,x(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,g;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=c),e.delegate=null,g):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function _(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(f.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=c,t.done=!0,t};return r.next=r}}return{next:P}}function P(){return{value:c,done:!0}}return i.prototype=S.constructor=s,s.constructor=i,s[r]=i.displayName="GeneratorFunction",a.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===i||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,r in t||(t[r]="GeneratorFunction")),t.prototype=Object.create(S),t},a.awrap=function(t){return{__await:t}},O(b.prototype),b.prototype[n]=function(){return this},a.AsyncIterator=b,a.async=function(t,e,n,r,o){void 0===o&&(o=Promise);var i=new b(u(t,e,n,r),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},O(S),S[r]="Generator",S[o]=function(){return this},S.toString=function(){return"[object Generator]"},a.keys=function(n){var r=[];for(var t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=_,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&f.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return i.type="throw",i.arg=n,r.next=t,e&&(r.method="next",r.arg=c),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=f.call(o,"catchLoc"),u=f.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&f.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=c),g}},a}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}});var Xo=E([].push),Zo=function(v){var d=1==v,h=2==v,g=3==v,y=4==v,m=6==v,E=7==v,R=5==v||m;return function(t,e,n,r){for(var o,i,a=et(t),u=I(a),c=Gn(e,n),s=de(u),f=0,l=r||Ko,p=d?l(t,s):h||E?l(t,0):void 0;f<s;f++)if((R||f in u)&&(i=c(o=u[f],f,a),v))if(d)p[f]=i;else if(i)switch(v){case 3:return!0;case 5:return o;case 6:return f;case 2:Xo(p,o)}else switch(v){case 4:return!1;case 7:Xo(p,o)}return m?-1:g||y?y:p}},ti={forEach:Zo(0),map:Zo(1),filter:Zo(2),some:Zo(3),every:Zo(4),find:Zo(5),findIndex:Zo(6),filterReject:Zo(7)},ei=function(t,e){var n=[][t];return!!n&&s(function(){n.call(null,e||function(){return 1},1)})},ni=ti.forEach,ri=ei("forEach")?[].forEach:function(t){return ni(this,t,1<arguments.length?arguments[1]:void 0)};Ne({target:"Array",proto:!0,forced:[].forEach!=ri},{forEach:ri});var oi=E([].join),ii=I!=Object,ai=ei("join",",");Ne({target:"Array",proto:!0,forced:ii||!ai},{join:function(t){return oi(_(this),void 0===t?",":t)}});var ui=ti.map;Ne({target:"Array",proto:!0,forced:!$o("map")},{map:function(t){return ui(this,t,1<arguments.length?arguments[1]:void 0)}});var ci={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},si=Et("span").classList,fi=si&&si.constructor&&si.constructor.prototype,li=fi===Object.prototype?void 0:fi,pi=function(e){if(e&&e.forEach!==ri)try{Nt(e,"forEach",ri)}catch(t){e.forEach=ri}};for(var vi in ci)ci[vi]&&pi(f[vi]&&f[vi].prototype);pi(li);var di,hi=function(){function t(){rn(this,t)}return an(t,null,[{key:"getStorage",value:function(){return window&&window.localStorage||void 0}},{key:"setItem",value:function(t,e){var n=this.getStorage();n&&null!=e&&n.setItem(t,e)}},{key:"getItem",value:function(t){var e=this.getStorage();if(!e)return null;var n=e.getItem(t);return null!=n?n:null}},{key:"removeItem",value:function(t){var e=this.getStorage();if(!e)return null;e.removeItem(t)}},{key:"clear",value:function(){var t=this.getStorage();if(!t)return null;t.clear()}},{key:"DESCRIPTION",get:function(){return"radar-description"}},{key:"DEVICE_ID",get:function(){return"radar-deviceId"}},{key:"DEVICE_TYPE",get:function(){return"radar-deviceType"}},{key:"METADATA",get:function(){return"radar-metadata"}},{key:"HOST",get:function(){return"radar-host"}},{key:"PUBLISHABLE_KEY",get:function(){return"radar-publishableKey"}},{key:"USER_ID",get:function(){return"radar-userId"}},{key:"INSTALL_ID",get:function(){return"radar-installId"}},{key:"TRIP_OPTIONS",get:function(){return"radar-trip-options"}},{key:"CUSTOM_HEADERS",get:function(){return"radar-custom-headers"}},{key:"BASE_API_PATH",get:function(){return"radar-base-api-path"}}]),t}(),gi=function(){function t(){rn(this,t)}return an(t,null,[{key:"getHost",value:function(){return hi.getItem(hi.HOST)||"https://api.radar.io"}}]),t}(),yi="3.5.0",mi=function(){function t(){rn(this,t)}return an(t,null,[{key:"request",value:function(l,p,v){return new Promise(function(e,n){var r=new XMLHttpRequest,t=hi.getItem(hi.BASE_API_PATH)||"v1",o="".concat(gi.getHost(),"/").concat(t,"/").concat(p),i={};if(Object.keys(v).forEach(function(t){var e=v[t];void 0!==e&&(i[t]=e)}),"GET"===l){var a=Object.keys(i).map(function(t){return"".concat(t,"=").concat(encodeURIComponent(i[t]))});if(0<a.length){var u=a.join("&");o="".concat(o,"?").concat(u)}i=void 0}r.open(l,o,!0);var c=hi.getItem(hi.PUBLISHABLE_KEY);if(c){r.setRequestHeader("Authorization",c),r.setRequestHeader("Content-Type","application/json"),r.setRequestHeader("X-Radar-Device-Type","Web"),r.setRequestHeader("X-Radar-SDK-Version",yi);var s=hi.getItem(hi.CUSTOM_HEADERS);if(s){var f=JSON.parse(s);Object.keys(f).forEach(function(t){r.setRequestHeader(t,f[t])})}r.onload=function(){var t;try{t=JSON.parse(r.response)}catch(t){n(Uo.ERROR_SERVER)}200==r.status?e(t):400===r.status?n({httpError:Uo.ERROR_BAD_REQUEST,response:t}):401===r.status?n({httpError:Uo.ERROR_UNAUTHORIZED,response:t}):402===r.status?n({httpError:Uo.ERROR_PAYMENT_REQUIRED,response:t}):403===r.status?n({httpError:Uo.ERROR_FORBIDDEN,response:t}):404===r.status?n({httpError:Uo.ERROR_NOT_FOUND,response:t}):429===r.status?n({httpError:Uo.ERROR_RATE_LIMIT,response:t}):500<=r.status&&r.status<600?n({httpError:Uo.ERROR_SERVER,response:t}):n({httpError:Uo.ERROR_UNKNOWN,response:t})},r.onerror=function(){n(Uo.ERROR_SERVER)},r.timeout=function(){n(Uo.ERROR_NETWORK)},r.send(JSON.stringify(i))}else n(Uo.ERROR_PUBLISHABLE_KEY)})}}]),t}(),Ei=function(){function t(){rn(this,t)}var e;return an(t,null,[{key:"getContext",value:(e=nn(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<a.length&&void 0!==a[0]?a[0]:{}).latitude&&e.longitude){t.next=5;break}return t.next=4,Mo.getCurrentPosition();case 4:e=t.sent;case 5:return r=(n=e).latitude,o=n.longitude,i={coordinates:"".concat(r,",").concat(o)},t.abrupt("return",mi.request("GET","context",i));case 8:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Ri=function(){function t(){rn(this,t)}var e,n,r;return an(t,null,[{key:"geocode",value:(r=nn(regeneratorRuntime.mark(function t(){var e,n,r,o,i=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<i.length&&void 0!==i[0]?i[0]:{},n=e.query,r=e.layers,o=e.country,t.abrupt("return",mi.request("GET","geocode/forward",{query:n,layers:r,country:o}));case 3:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"reverseGeocode",value:(n=nn(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<s.length&&void 0!==s[0]?s[0]:{}).latitude&&e.longitude){t.next=9;break}return t.next=4,Mo.getCurrentPosition();case 4:n=t.sent,r=n.latitude,o=n.longitude,e.latitude=r,e.longitude=o;case 9:return i=e.latitude,a=e.longitude,u=e.layers,c={coordinates:"".concat(i,",").concat(a),layers:u},t.abrupt("return",mi.request("GET","geocode/reverse",c));case 12:case"end":return t.stop()}},t)})),function(){return n.apply(this,arguments)})},{key:"ipGeocode",value:(e=nn(regeneratorRuntime.mark(function t(){var e,n,r=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<r.length&&void 0!==r[0]?r[0]:{},n=e.ip,t.abrupt("return",mi.request("GET","geocode/ip",{ip:n}));case 3:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Si=function(){function t(){rn(this,t)}var e,n;return an(t,null,[{key:"getDistanceToDestination",value:(n=nn(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s,f,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<l.length&&void 0!==l[0]?l[0]:{}).origin){t.next=8;break}return t.next=4,Mo.getCurrentPosition();case 4:n=t.sent,r=n.latitude,o=n.longitude,e.origin={latitude:r,longitude:o};case 8:return i=e.origin,a=e.destination,u=e.modes,c=e.units,s=e.geometry,i="".concat(i.latitude,",").concat(i.longitude),a&&(a="".concat(a.latitude,",").concat(a.longitude)),u&&(u=u.join(",")),f={origin:i,destination:a,modes:u,units:c,geometry:s},t.abrupt("return",mi.request("GET","route/distance",f));case 14:case"end":return t.stop()}},t)})),function(){return n.apply(this,arguments)})},{key:"getMatrixDistances",value:(e=nn(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s,f,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<l.length&&void 0!==l[0]?l[0]:{}).origins){t.next=8;break}return t.next=4,Mo.getCurrentPosition();case 4:n=t.sent,r=n.latitude,o=n.longitude,e.origins=[{latitude:r,longitude:o}];case 8:return i=e.origins,a=e.destinations,u=e.mode,c=e.units,s=e.geometry,i=(i||[]).map(function(t){return"".concat(t.latitude,",").concat(t.longitude)}).join("|"),a=(a||[]).map(function(t){return"".concat(t.latitude,",").concat(t.longitude)}).join("|"),f={origins:i,destinations:a,mode:u,units:c,geometry:s},t.abrupt("return",mi.request("GET","route/matrix",f));case 13:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Oi=function(){function t(){rn(this,t)}var e,n,r;return an(t,null,[{key:"searchPlaces",value:(r=nn(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s,f,l,p=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<p.length&&void 0!==p[0]?p[0]:{}).near){t.next=8;break}return t.next=4,Mo.getCurrentPosition();case 4:n=t.sent,r=n.latitude,o=n.longitude,e.near={latitude:r,longitude:o};case 8:return i=e.near,a=e.radius,u=e.chains,c=e.categories,s=e.groups,f=e.limit,i="".concat(i.latitude,",").concat(i.longitude),u&&(u=u.join(",")),c&&(c=c.join(",")),s&&(s=s.join(",")),l={near:i,radius:a,chains:u,categories:c,groups:s,limit:f},t.abrupt("return",mi.request("GET","search/places",l));case 15:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"searchGeofences",value:(n=nn(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s,f,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<l.length&&void 0!==l[0]?l[0]:{}).near){t.next=8;break}return t.next=4,Mo.getCurrentPosition();case 4:n=t.sent,r=n.latitude,o=n.longitude,e.near={latitude:r,longitude:o};case 8:return i=e.near,a=e.radius,u=e.tags,c=e.metadata,s=e.limit,i="".concat(i.latitude,",").concat(i.longitude),u&&(u=u.join(",")),f={near:i,radius:a,tags:u,limit:s},c&&Object.keys(c).forEach(function(t){var e="metadata[".concat(t,"]"),n=c[t];f[e]=n}),t.abrupt("return",mi.request("GET","search/geofences",f));case 14:case"end":return t.stop()}},t)})),function(){return n.apply(this,arguments)})},{key:"autocomplete",value:(e=nn(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s,f=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=0<f.length&&void 0!==f[0]?f[0]:{},o=r.query,i=r.near,a=r.limit,u=r.layers,c=r.country,(null===(e=i)||void 0===e?void 0:e.latitude)&&(null===(n=i)||void 0===n?void 0:n.longitude)&&(i="".concat(i.latitude,",").concat(i.longitude)),s={query:o,near:i,limit:a,layers:u,country:c},t.abrupt("return",mi.request("GET","search/autocomplete",s));case 5:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),bi=function(){var t=Tt(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},xi=f.RegExp,Ii=s(function(){var t=xi("a","y");return t.lastIndex=2,null!=t.exec("abcd")}),Ti=Ii||s(function(){return!xi("a","y").sticky}),wi={BROKEN_CARET:Ii||s(function(){var t=xi("^r","gy");return t.lastIndex=2,null!=t.exec("str")}),MISSED_STICKY:Ti,UNSUPPORTED_Y:Ii},_i={f:l&&!bt?Object.defineProperties:function(t,e){Tt(t);for(var n,r=_(e),o=Le(e),i=o.length,a=0;a<i;)At.f(t,n=o[a++],r[n]);return t}},Pi="prototype",ki="script",Ci=$t("IE_PROTO"),ji=function(){},Ai=function(t){return"<script>"+t+"</"+ki+">"},Ni=function(t){t.write(Ai("")),t.close();var e=t.parentWindow.Object;return t=null,e},Li=function(){try{di=new ActiveXObject("htmlfile")}catch(t){}var t,e;Li="undefined"!=typeof document?document.domain&&di?Ni(di):((e=Et("iframe")).style.display="none",Hn.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Ai("document.F=Object")),t.close(),t.F):Ni(di);for(var n=Ee.length;n--;)delete Li[Pi][Ee[n]];return Li()};Wt[Ci]=!0;var Di,Ui,Mi=Object.create||function(t,e){var n;return null!==t?(ji[Pi]=Tt(t),n=new ji,ji[Pi]=null,n[Ci]=t):n=Li(),void 0===e?n:_i.f(n,e)},Gi=f.RegExp,Hi=s(function(){var t=Gi(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}),Fi=f.RegExp,Bi=s(function(){var t=Fi("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}),qi=re.get,Vi=Z("native-string-replace",String.prototype.replace),Ki=RegExp.prototype.exec,Yi=Ki,$i=E("".charAt),Wi=E("".indexOf),zi=E("".replace),Ji=E("".slice),Qi=(Ui=/b*/g,m(Ki,Di=/a/,"a"),m(Ki,Ui,"a"),0!==Di.lastIndex||0!==Ui.lastIndex),Xi=wi.BROKEN_CARET,Zi=void 0!==/()??/.exec("")[1];(Qi||Zi||Xi||Hi||Bi)&&(Yi=function(t){var e,n,r,o,i,a,u,c=this,s=qi(c),f=Ve(t),l=s.raw;if(l)return l.lastIndex=c.lastIndex,e=m(Yi,l,f),c.lastIndex=l.lastIndex,e;var p=s.groups,v=Xi&&c.sticky,d=m(bi,c),h=c.source,g=0,y=f;if(v&&(d=zi(d,"y",""),-1===Wi(d,"g")&&(d+="g"),y=Ji(f,c.lastIndex),0<c.lastIndex&&(!c.multiline||c.multiline&&"\n"!==$i(f,c.lastIndex-1))&&(h="(?: "+h+")",y=" "+y,g++),n=new RegExp("^(?:"+h+")",d)),Zi&&(n=new RegExp("^"+h+"$(?!\\s)",d)),Qi&&(r=c.lastIndex),o=m(Ki,v?n:c,y),v?o?(o.input=Ji(o.input,g),o[0]=Ji(o[0],g),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Qi&&o&&(c.lastIndex=c.global?o.index+o[0].length:r),Zi&&o&&1<o.length&&m(Vi,o[0],n,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)}),o&&p)for(o.groups=a=Mi(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var ta=Yi;Ne({target:"RegExp",proto:!0,forced:/./.exec!==ta},{exec:ta});var ea=RegExp.prototype,na=Mt.PROPER,ra="toString",oa=RegExp.prototype[ra],ia=s(function(){return"/a/b"!=oa.call({source:"a",flags:"b"})}),aa=na&&oa.name!=ra;(ia||aa)&&ie(RegExp.prototype,ra,function(){var t,e,n=Tt(this);return"/"+Ve(n.source)+"/"+Ve(void 0!==(e=(t=n).flags)||"flags"in ea||rt(t,"flags")||!j(ea,t)?e:m(bi,t))},{unsafe:!0});var ua=pt("species"),ca=RegExp.prototype,sa=E("".charAt),fa=E("".charCodeAt),la=E("".slice),pa=function(u){return function(t,e){var n,r,o=Ve(w(t)),i=se(e),a=o.length;return i<0||a<=i?u?"":void 0:(n=fa(o,i))<55296||56319<n||i+1===a||(r=fa(o,i+1))<56320||57343<r?u?sa(o,i):n:u?la(o,i,i+2):r-56320+(n-55296<<10)+65536}},va={codeAt:pa(!1),charAt:pa(!0)}.charAt,da=Math.floor,ha=E("".charAt),ga=E("".replace),ya=E("".slice),ma=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ea=/\$([$&'`]|\d{1,2})/g,Ra=function(i,a,u,c,s,t){var f=u+i.length,l=c.length,e=Ea;return void 0!==s&&(s=et(s),e=ma),ga(t,e,function(t,e){var n;switch(ha(e,0)){case"$":return"$";case"&":return i;case"`":return ya(a,0,u);case"'":return ya(a,f);case"<":n=s[ya(e,1,-1)];break;default:var r=+e;if(0===r)return t;if(l<r){var o=da(r/10);return 0===o?t:o<=l?void 0===c[o-1]?ha(e,1):c[o-1]+ha(e,1):t}n=c[r-1]}return void 0===n?"":n})},Sa=TypeError,Oa=function(t,e){var n=t.exec;if(P(n)){var r=m(n,t,e);return null!==r&&Tt(r),r}if("RegExp"===O(t))return m(ta,t,e);throw Sa("RegExp#exec called on incompatible receiver")},ba=pt("replace"),xa=Math.max,Ia=Math.min,Ta=E([].concat),wa=E([].push),_a=E("".indexOf),Pa=E("".slice),ka="$0"==="a".replace(/./,"$0"),Ca=!!/./[ba]&&""===/./[ba]("a","$0");!function(n,t,e,r){var o=pt(n),u=!s(function(){var t={};return t[o]=function(){return 7},7!=""[n](t)}),i=u&&!s(function(){var t=!1,e=/a/;return"split"===n&&((e={constructor:{}}).constructor[ua]=function(){return e},e.flags="",e[o]=/./[o]),e.exec=function(){return t=!0,null},e[o](""),!t});if(!u||!i||e){var c=E(/./[o]),a=t(o,""[n],function(t,e,n,r,o){var i=E(t),a=e.exec;return a===ta||a===ca.exec?u&&!o?{done:!0,value:c(e,n,r)}:{done:!0,value:i(n,e,r)}:{done:!1}});ie(String.prototype,n,a[0]),ie(ca,o,a[1])}r&&Nt(ca[o],"sham",!0)}("replace",function(t,b,x){var I=Ca?"$":"$0";return[function(t,e){var n=w(this),r=null==t?void 0:$(t,ba);return r?m(r,t,n,e):m(b,Ve(n),t,e)},function(t,e){var n=Tt(this),r=Ve(t);if("string"==typeof e&&-1===_a(e,I)&&-1===_a(e,"$<")){var o=x(b,n,r,e);if(o.done)return o.value}var i=P(e);i||(e=Ve(e));var a=n.global;if(a){var u=n.unicode;n.lastIndex=0}for(var c,s,f=[];;){var l=Oa(n,r);if(null===l)break;if(wa(f,l),!a)break;""===Ve(l[0])&&(n.lastIndex=(c=r,(s=ve(n.lastIndex))+(u?va(c,s).length:1)))}for(var p,v="",d=0,h=0;h<f.length;h++){for(var g=Ve((l=f[h])[0]),y=xa(Ia(se(l.index),r.length),0),m=[],E=1;E<l.length;E++)wa(m,void 0===(p=l[E])?p:String(p));var R=l.groups;if(i){var S=Ta([g],m,y,r);void 0!==R&&wa(S,R);var O=Ve(Un(e,void 0,S))}else O=Ra(g,r,y,m,R,e);d<=y&&(v+=Pa(r,d,y)+O,d=y+g.length)}return v+Pa(r,d)}]},!!s(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})||!ka||Ca);var ja=function(){function t(){rn(this,t)}return an(t,null,[{key:"getId",value:function(){var t=hi.getItem(hi.DEVICE_ID);if(t)return t;var e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)});return hi.setItem(hi.DEVICE_ID,e),e}}]),t}(),Aa=function(){function t(){rn(this,t)}var e;return an(t,null,[{key:"trackOnce",value:(e=nn(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s,f,l,p,v,d,h=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=0<h.length&&void 0!==h[0]?h[0]:{},n=e.latitude,r=e.longitude,o=e.accuracy,n&&r){t.next=9;break}return t.next=5,Mo.getCurrentPosition();case 5:i=t.sent,n=i.latitude,r=i.longitude,o=i.accuracy;case 9:return a=ja.getId(),u=hi.getItem(hi.USER_ID),c=hi.getItem(hi.INSTALL_ID)||a,s=hi.getItem(hi.DEVICE_TYPE)||"Web",f=hi.getItem(hi.DESCRIPTION),(l=hi.getItem(hi.METADATA))&&(l=JSON.parse(l)),(p=hi.getItem(hi.TRIP_OPTIONS))&&(p=JSON.parse(p)),v=cn({},e,{accuracy:o,description:f,deviceId:a,deviceType:s,foreground:!0,installId:c,latitude:n,longitude:r,metadata:l,sdkVersion:yi,stopped:!0,userId:u,tripOptions:p}),t.next=21,mi.request("POST","track",v);case 21:return(d=t.sent).location={latitude:n,longitude:r,accuracy:o},t.abrupt("return",d);case 24:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Na=function(){function t(){rn(this,t)}var e;return an(t,null,[{key:"updateTrip",value:(e=nn(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u,c,s,f=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<f.length&&void 0!==f[0]?f[0]:{},n=1<f.length?f[1]:void 0,r=e.externalId,o=e.destinationGeofenceTag,i=e.destinationGeofenceExternalId,a=e.mode,u=e.metadata,c=e.approachingThreshold,s={externalId:r,status:n,destinationGeofenceTag:o,destinationGeofenceExternalId:i,mode:a,metadata:u,approachingThreshold:c},t.abrupt("return",mi.request("PATCH","trips/".concat(r),s));case 5:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),La=function(){function t(){rn(this,t)}var e;return an(t,null,[{key:"sendEvent",value:(e=nn(regeneratorRuntime.mark(function t(){var e,n,r,o,i,a,u=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<u.length&&void 0!==u[0]?u[0]:{},n=e.type,r=e.metadata,o=e.createdAt,i=ja.getId(),a=hi.getItem(hi.USER_ID),t.abrupt("return",mi.request("POST","events",{type:n,metadata:r,deviceId:i,userId:a,createdAt:o}));case 5:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Da="started",Ua="completed",Ma="canceled",Ga=function(){},Ha=function(e){return function(t){"string"!=typeof t?"object"===tn(t)&&t.httpError?e(t.httpError,{},t.response):e(Uo.ERROR_UNKNOWN,{}):e(t,{})}};return function(){function r(){rn(this,r)}return an(r,null,[{key:"initialize",value:function(t){t||console.error('Radar "initialize" was called without a publishable key'),hi.setItem(hi.PUBLISHABLE_KEY,t)}},{key:"setHost",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"v1";hi.setItem(hi.HOST,t),hi.setItem(hi.BASE_API_PATH,e)}},{key:"setUserId",value:function(t){t?hi.setItem(hi.USER_ID,String(t).trim()):hi.removeItem(hi.USER_ID)}},{key:"setDeviceId",value:function(t,e){t?hi.setItem(hi.DEVICE_ID,String(t).trim()):hi.removeItem(hi.DEVICE_ID),e?hi.setItem(hi.INSTALL_ID,String(e).trim()):hi.removeItem(hi.INSTALL_ID)}},{key:"setDeviceType",value:function(t){t?hi.setItem(hi.DEVICE_TYPE,String(t).trim()):hi.removeItem(hi.DEVICE_TYPE)}},{key:"setDescription",value:function(t){t?hi.setItem(hi.DESCRIPTION,String(t).trim()):hi.removeItem(hi.DESCRIPTION)}},{key:"setMetadata",value:function(t){t?hi.setItem(hi.METADATA,JSON.stringify(t)):hi.removeItem(hi.METADATA)}},{key:"setRequestHeaders",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};Object.keys(t).length?hi.setItem(hi.CUSTOM_HEADERS,JSON.stringify(t)):hi.removeItem(hi.CUSTOM_HEADERS)}},{key:"getLocation",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Ga;Mo.getCurrentPosition().then(function(t){e(null,{location:t,status:Uo.SUCCESS})}).catch(Ha(e))}},{key:"trackOnce",value:function(t){var e,n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ga;e="function"==typeof t?t:(n=t,r),Aa.trackOnce(n).then(function(t){e(null,{location:t.location,user:t.user,events:t.events,status:Uo.SUCCESS},t)}).catch(Ha(e))}},{key:"getContext",value:function(t){var e,n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ga;e="function"==typeof t?t:(n=t,r),Ei.getContext(n).then(function(t){e(null,{context:t.context,status:Uo.SUCCESS},t)}).catch(Ha(e))}},{key:"startTrip",value:function(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ga;Na.updateTrip(e,Da).then(function(t){r.setTripOptions(e),n(null,{trip:t.trip,events:t.events,status:Uo.SUCCESS},t)}).catch(Ha(n))}},{key:"updateTrip",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:Ga;Na.updateTrip(e,t).then(function(t){r.setTripOptions(e),n(null,{trip:t.trip,events:t.events,status:Uo.SUCCESS},t)}).catch(Ha(n))}},{key:"completeTrip",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Ga,t=r.getTripOptions();Na.updateTrip(t,Ua).then(function(t){r.clearTripOptions(),e(null,{trip:t.trip,events:t.events,status:Uo.SUCCESS},t)}).catch(Ha(e))}},{key:"cancelTrip",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Ga,t=r.getTripOptions();Na.updateTrip(t,Ma).then(function(t){r.clearTripOptions(),e(null,{trip:t.trip,events:t.events,status:Uo.SUCCESS},t)}).catch(Ha(e))}},{key:"setTripOptions",value:function(t){t?hi.setItem(hi.TRIP_OPTIONS,JSON.stringify(t)):r.clearTripOptions()}},{key:"clearTripOptions",value:function(){hi.removeItem(hi.TRIP_OPTIONS)}},{key:"getTripOptions",value:function(){var t=hi.getItem(hi.TRIP_OPTIONS);return t&&(t=JSON.parse(t)),t}},{key:"searchPlaces",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ga;Oi.searchPlaces(t).then(function(t){e(null,{places:t.places,status:Uo.SUCCESS},t)}).catch(Ha(e))}},{key:"searchGeofences",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ga;Oi.searchGeofences(t).then(function(t){e(null,{geofences:t.geofences,status:Uo.SUCCESS},t)}).catch(Ha(e))}},{key:"autocomplete",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ga;Oi.autocomplete(t).then(function(t){e(null,{addresses:t.addresses,status:Uo.SUCCESS},t)}).catch(Ha(e))}},{key:"geocode",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ga;Ri.geocode(t).then(function(t){e(null,{addresses:t.addresses,staus:Uo.SUCCESS},t)}).catch(Ha(e))}},{key:"reverseGeocode",value:function(t){var e,n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ga;e="function"==typeof t?t:(n=t,r),Ri.reverseGeocode(n).then(function(t){e(null,{addresses:t.addresses,status:Uo.SUCCESS},t)}).catch(Ha(e))}},{key:"ipGeocode",value:function(t){var e,n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ga;"function"==typeof t?e=t:"object"===tn(t)&&(n=t,e=r),Ri.ipGeocode(n).then(function(t){e(null,{address:t.address,status:Uo.SUCCESS},t)}).catch(Ha(e))}},{key:"getDistance",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ga;Si.getDistanceToDestination(t).then(function(t){e(null,{routes:t.routes,status:Uo.SUCCESS},t)}).catch(Ha(e))}},{key:"getMatrix",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ga;Si.getMatrixDistances(t).then(function(t){e(null,{origins:t.origins,destinations:t.destinations,matrix:t.matrix,status:Uo.SUCCESS},t)}).catch(Ha(e))}},{key:"sendEvent",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ga;La.sendEvent(t).then(function(t){e(null,{event:t.event,status:Uo.SUCCESS},t)}).catch(Ha(e))}},{key:"VERSION",get:function(){return yi}},{key:"STATUS",get:function(){return Uo}}]),r}()}(); | ||
var Radar=function(){"use strict";var s=function(t){try{return!!t()}catch(t){return!0}},f=!s(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r,n,o=function(t){return t&&t.Math==Math&&t},l=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||function(){return this}()||Function("return this")(),i=!s(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}),a=Function.prototype,u=a.bind,c=a.call,p=i&&u.bind(c,c),v=i?function(t){return t&&p(t)}:function(t){return t&&function(){return c.apply(t,arguments)}},w=function(t){return"function"==typeof t},d=/#|\.prototype\./,h=function(t,e){var r=y[g(t)];return r==E||r!=m&&(w(e)?s(e):!!e)},g=h.normalize=function(t){return String(t).replace(d,".").toLowerCase()},y=h.data={},m=h.NATIVE="N",E=h.POLYFILL="P",R=h,S=function(t){return"object"==typeof t?null!==t:w(t)},O=l.document,b=S(O)&&S(O.createElement),I=function(t){return b?O.createElement(t):{}},T=!f&&!s(function(){return 7!=Object.defineProperty(I("div"),"a",{get:function(){return 7}}).a}),x=f&&s(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),_=String,N=TypeError,C=function(t){if(S(t))return t;throw N(_(t)+" is not an object")},P=Function.prototype.call,k=i?P.bind(P):function(){return P.apply(P,arguments)},A=function(t,e){return arguments.length<2?(r=l[t],w(r)?r:void 0):l[t]&&l[t][e];var r},j=v({}.isPrototypeOf),L=A("navigator","userAgent")||"",D=l.process,U=l.Deno,M=D&&D.versions||U&&U.version,G=M&&M.v8;G&&(n=0<(r=G.split("."))[0]&&r[0]<4?1:+(r[0]+r[1])),!n&&L&&(!(r=L.match(/Edge\/(\d+)/))||74<=r[1])&&(r=L.match(/Chrome\/(\d+)/))&&(n=+r[1]);var F=n,H=!!Object.getOwnPropertySymbols&&!s(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&F&&F<41}),V=H&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,B=Object,q=V?function(t){return"symbol"==typeof t}:function(t){var e=A("Symbol");return w(e)&&j(e.prototype,B(t))},K=String,Y=function(t){try{return K(t)}catch(t){return"Object"}},$=TypeError,W=function(t){if(w(t))return t;throw $(Y(t)+" is not a function")},J=function(t,e){var r=t[e];return null==r?void 0:W(r)},z=TypeError,X=Object.defineProperty,Q=function(e,r){try{X(l,e,{value:r,configurable:!0,writable:!0})}catch(t){l[e]=r}return r},Z="__core-js_shared__",tt=l[Z]||Q(Z,{}),et=e(function(t){(t.exports=function(t,e){return tt[t]||(tt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.23.3",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.3/LICENSE",source:"https://github.com/zloirock/core-js"})}),rt=TypeError,nt=function(t){if(null==t)throw rt("Can't call method on "+t);return t},ot=Object,it=function(t){return ot(nt(t))},at=v({}.hasOwnProperty),ut=Object.hasOwn||function(t,e){return at(it(t),e)},ct=0,st=Math.random(),ft=v(1..toString),lt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ft(++ct+st,36)},pt=et("wks"),vt=l.Symbol,dt=vt&&vt.for,ht=V?vt:vt&&vt.withoutSetter||lt,gt=function(t){if(!ut(pt,t)||!H&&"string"!=typeof pt[t]){var e="Symbol."+t;H&&ut(vt,t)?pt[t]=vt[t]:pt[t]=V&&dt?dt(e):ht(e)}return pt[t]},yt=TypeError,mt=gt("toPrimitive"),Et=function(t,e){if(!S(t)||q(t))return t;var r,n=J(t,mt);if(n){if(void 0===e&&(e="default"),r=k(n,t,e),!S(r)||q(r))return r;throw yt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&w(r=t.toString)&&!S(n=k(r,t)))return n;if(w(r=t.valueOf)&&!S(n=k(r,t)))return n;if("string"!==e&&w(r=t.toString)&&!S(n=k(r,t)))return n;throw z("Can't convert object to primitive value")}(t,e)},Rt=function(t){var e=Et(t,"string");return q(e)?e:e+""},St=TypeError,Ot=Object.defineProperty,bt=Object.getOwnPropertyDescriptor,It="enumerable",Tt="configurable",wt="writable",xt={f:f?x?function(t,e,r){if(C(t),e=Rt(e),C(r),"function"==typeof t&&"prototype"===e&&"value"in r&&wt in r&&!r[wt]){var n=bt(t,e);n&&n[wt]&&(t[e]=r.value,r={configurable:Tt in r?r[Tt]:n[Tt],enumerable:It in r?r[It]:n[It],writable:!1})}return Ot(t,e,r)}:Ot:function(t,e,r){if(C(t),e=Rt(e),C(r),T)try{return Ot(t,e,r)}catch(t){}if("get"in r||"set"in r)throw St("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},_t=Function.prototype,Nt=f&&Object.getOwnPropertyDescriptor,Ct=ut(_t,"name"),Pt={EXISTS:Ct,PROPER:Ct&&"something"===function(){}.name,CONFIGURABLE:Ct&&(!f||f&&Nt(_t,"name").configurable)},kt=v(Function.toString);w(tt.inspectSource)||(tt.inspectSource=function(t){return kt(t)});var At,jt,Lt,Dt=tt.inspectSource,Ut=l.WeakMap,Mt=w(Ut)&&/native code/.test(Dt(Ut)),Gt=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Ft=f?function(t,e,r){return xt.f(t,e,Gt(1,r))}:function(t,e,r){return t[e]=r,t},Ht=et("keys"),Vt=function(t){return Ht[t]||(Ht[t]=lt(t))},Bt={},qt="Object already initialized",Kt=l.TypeError,Yt=l.WeakMap;if(Mt||tt.state){var $t=tt.state||(tt.state=new Yt),Wt=v($t.get),Jt=v($t.has),zt=v($t.set);At=function(t,e){if(Jt($t,t))throw new Kt(qt);return e.facade=t,zt($t,t,e),e},jt=function(t){return Wt($t,t)||{}},Lt=function(t){return Jt($t,t)}}else{var Xt=Vt("state");Bt[Xt]=!0,At=function(t,e){if(ut(t,Xt))throw new Kt(qt);return e.facade=t,Ft(t,Xt,e),e},jt=function(t){return ut(t,Xt)?t[Xt]:{}},Lt=function(t){return ut(t,Xt)}}var Qt={set:At,get:jt,has:Lt,enforce:function(t){return Lt(t)?jt(t):At(t,{})},getterFor:function(r){return function(t){var e;if(!S(t)||(e=jt(t)).type!==r)throw Kt("Incompatible receiver, "+r+" required");return e}}},Zt=e(function(t){var o=Pt.CONFIGURABLE,i=Qt.enforce,e=Qt.get,a=Object.defineProperty,u=f&&!s(function(){return 8!==a(function(){},"length",{value:8}).length}),c=String(String).split("String"),r=t.exports=function(t,e,r){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!ut(t,"name")||o&&t.name!==e)&&(f?a(t,"name",{value:e,configurable:!0}):t.name=e),u&&r&&ut(r,"arity")&&t.length!==r.arity&&a(t,"length",{value:r.arity});try{r&&ut(r,"constructor")&&r.constructor?f&&a(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=i(t);return ut(n,"source")||(n.source=c.join("string"==typeof e?e:"")),t};Function.prototype.toString=r(function(){return w(this)&&e(this).source||Dt(this)},"toString")}),te=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(w(r)&&Zt(r,i,n),n.global)o?t[e]=r:Q(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:xt.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},ee=String,re=TypeError,ne=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,t={};try{(r=v(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(t,[]),n=t instanceof Array}catch(t){}return function(t,e){return C(t),function(t){if("object"==typeof t||w(t))return;throw re("Can't set "+ee(t)+" as a prototype")}(e),n?r(t,e):t.__proto__=e,t}}():void 0),oe=v({}.toString),ie=v("".slice),ae=function(t){return ie(oe(t),8,-1)},ue=Object,ce=v("".split),se=s(function(){return!ue("z").propertyIsEnumerable(0)})?function(t){return"String"==ae(t)?ce(t,""):ue(t)}:ue,fe=function(t){return se(nt(t))},le=Math.ceil,pe=Math.floor,ve=Math.trunc||function(t){var e=+t;return(0<e?pe:le)(e)},de=function(t){var e=+t;return e!=e||0===e?0:ve(e)},he=Math.max,ge=Math.min,ye=Math.min,me=function(t){return 0<t?ye(de(t),9007199254740991):0},Ee=function(t){return me(t.length)},Re=function(s){return function(t,e,r){var n,o,i,a=fe(t),u=Ee(a),c=(n=u,(o=de(r))<0?he(o+n,0):ge(o,n));if(s&&e!=e){for(;c<u;)if((i=a[c++])!=i)return!0}else for(;c<u;c++)if((s||c in a)&&a[c]===e)return s||c||0;return!s&&-1}},Se={includes:Re(!0),indexOf:Re(!1)}.indexOf,Oe=v([].push),be=function(t,e){var r,n=fe(t),o=0,i=[];for(r in n)!ut(Bt,r)&&ut(n,r)&&Oe(i,r);for(;e.length>o;)ut(n,r=e[o++])&&(~Se(i,r)||Oe(i,r));return i},Ie=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Te=Ie.concat("length","prototype"),we={f:Object.getOwnPropertyNames||function(t){return be(t,Te)}},xe={}.propertyIsEnumerable,_e=Object.getOwnPropertyDescriptor,Ne={f:_e&&!xe.call({1:2},1)?function(t){var e=_e(this,t);return!!e&&e.enumerable}:xe},Ce=Object.getOwnPropertyDescriptor,Pe={f:f?Ce:function(t,e){if(t=fe(t),e=Rt(e),T)try{return Ce(t,e)}catch(t){}if(ut(t,e))return Gt(!k(Ne.f,t,e),t[e])}},ke=v(1..valueOf),Ae={};Ae[gt("toStringTag")]="z";var je="[object z]"===String(Ae),Le=gt("toStringTag"),De=Object,Ue="Arguments"==ae(function(){return arguments}()),Me=je?ae:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=De(t),Le))?r:Ue?ae(e):"Object"==(n=ae(e))&&w(e.callee)?"Arguments":n},Ge=String,Fe=function(t){if("Symbol"===Me(t))throw TypeError("Cannot convert a Symbol value to a string");return Ge(t)},He="\t\n\v\f\r \u2028\u2029\ufeff",Ve=v("".replace),Be="["+He+"]",qe=RegExp("^"+Be+Be+"*"),Ke=RegExp(Be+Be+"*$"),Ye=function(r){return function(t){var e=Fe(nt(t));return 1&r&&(e=Ve(e,qe,"")),2&r&&(e=Ve(e,Ke,"")),e}},$e={start:Ye(1),end:Ye(2),trim:Ye(3)},We=we.f,Je=Pe.f,ze=xt.f,Xe=$e.trim,Qe="Number",Ze=l[Qe],tr=Ze.prototype,er=l.TypeError,rr=v("".slice),nr=v("".charCodeAt),or=function(t){var e,r,n,o,i,a,u,c,s=Et(t,"number");if(q(s))throw er("Cannot convert a Symbol value to a number");if("string"==typeof s&&2<s.length)if(s=Xe(s),43===(e=nr(s,0))||45===e){if(88===(r=nr(s,2))||120===r)return NaN}else if(48===e){switch(nr(s,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+s}for(a=(i=rr(s,2)).length,u=0;u<a;u++)if((c=nr(i,u))<48||o<c)return NaN;return parseInt(i,n)}return+s};if(R(Qe,!Ze(" 0o1")||!Ze("0b1")||Ze("+0x1"))){for(var ir,ar=function(t){var e,r,n,o,i,a,u=arguments.length<1?0:Ze("bigint"==typeof(e=Et(t,"number"))?e:or(e)),c=this;return j(tr,c)&&s(function(){ke(c)})?(r=Object(u),n=c,o=ar,ne&&w(i=n.constructor)&&i!==o&&S(a=i.prototype)&&a!==o.prototype&&ne(r,a),r):u},ur=f?We(Ze):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),cr=0;ur.length>cr;cr++)ut(Ze,ir=ur[cr])&&!ut(ar,ir)&&ze(ar,ir,Je(Ze,ir));(ar.prototype=tr).constructor=ar,te(l,Qe,ar,{constructor:!0})}var sr={f:Object.getOwnPropertySymbols},fr=v([].concat),lr=A("Reflect","ownKeys")||function(t){var e=we.f(C(t)),r=sr.f;return r?fr(e,r(t)):e},pr=function(t,e,r){for(var n=lr(e),o=xt.f,i=Pe.f,a=0;a<n.length;a++){var u=n[a];ut(t,u)||r&&ut(r,u)||o(t,u,i(e,u))}},vr=Pe.f,dr=function(t,e){var r,n,o,i,a,u=t.target,c=t.global,s=t.stat;if(r=c?l:s?l[u]||Q(u,{}):(l[u]||{}).prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(a=vr(r,n))&&a.value:r[n],!R(c?n:u+(s?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;pr(i,o)}(t.sham||o&&o.sham)&&Ft(i,"sham",!0),te(r,n,i,t)}};dr({target:"Number",stat:!0},{isNaN:function(t){return t!=t}});var hr=Object.keys||function(t){return be(t,Ie)};dr({target:"Object",stat:!0,forced:s(function(){hr(1)})},{keys:function(t){return hr(it(t))}});var gr,yr=Pt.PROPER,mr=$e.trim;function Er(t){return(Er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Rr(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function Sr(u){return function(){var t=this,a=arguments;return new Promise(function(e,r){var n=u.apply(t,a);function o(t){Rr(n,e,r,o,i,"next",t)}function i(t){Rr(n,e,r,o,i,"throw",t)}o(void 0)})}}function Or(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function br(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ir(t,e,r){return e&&br(t.prototype,e),r&&br(t,r),t}function Tr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function wr(o){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Tr(Object(i),!0).forEach(function(t){var e,r,n;e=o,n=i[r=t],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):Tr(Object(i)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(i,t))})}return o}dr({target:"String",proto:!0,forced:(gr="trim",s(function(){return!!He[gr]()||" "!==" "[gr]()||yr&&He[gr].name!==gr}))},{trim:function(){return mr(this)}});var xr=je?{}.toString:function(){return"[object "+Me(this)+"]"};je||te(Object.prototype,"toString",xr,{unsafe:!0});var _r="process"==ae(l.process),Nr=xt.f,Cr=gt("toStringTag"),Pr=gt("species"),kr=TypeError,Ar=function(){},jr=[],Lr=A("Reflect","construct"),Dr=/^\s*(?:class|function)\b/,Ur=v(Dr.exec),Mr=!Dr.exec(Ar),Gr=function(t){if(!w(t))return!1;try{return Lr(Ar,jr,t),!0}catch(t){return!1}},Fr=function(t){if(!w(t))return!1;switch(Me(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Mr||!!Ur(Dr,Dt(t))}catch(t){return!0}};Fr.sham=!0;var Hr,Vr,Br,qr,Kr=!Lr||s(function(){var t;return Gr(Gr.call)||!Gr(Object)||!Gr(function(){t=!0})||t})?Fr:Gr,Yr=TypeError,$r=gt("species"),Wr=function(t,e){var r,n=C(t).constructor;return void 0===n||null==(r=C(n)[$r])?e:function(t){if(Kr(t))return t;throw Yr(Y(t)+" is not a constructor")}(r)},Jr=Function.prototype,zr=Jr.apply,Xr=Jr.call,Qr="object"==typeof Reflect&&Reflect.apply||(i?Xr.bind(zr):function(){return Xr.apply(zr,arguments)}),Zr=v(v.bind),tn=function(t,e){return W(t),void 0===e?t:i?Zr(t,e):function(){return t.apply(e,arguments)}},en=A("document","documentElement"),rn=v([].slice),nn=TypeError,on=/(?:ipad|iphone|ipod).*applewebkit/i.test(L),an=l.setImmediate,un=l.clearImmediate,cn=l.process,sn=l.Dispatch,fn=l.Function,ln=l.MessageChannel,pn=l.String,vn=0,dn={},hn="onreadystatechange";try{Hr=l.location}catch(t){}var gn=function(t){if(ut(dn,t)){var e=dn[t];delete dn[t],e()}},yn=function(t){return function(){gn(t)}},mn=function(t){gn(t.data)},En=function(t){l.postMessage(pn(t),Hr.protocol+"//"+Hr.host)};an&&un||(an=function(t){!function(t,e){if(t<e)throw nn("Not enough arguments")}(arguments.length,1);var e=w(t)?t:fn(t),r=rn(arguments,1);return dn[++vn]=function(){Qr(e,void 0,r)},Vr(vn),vn},un=function(t){delete dn[t]},_r?Vr=function(t){cn.nextTick(yn(t))}:sn&&sn.now?Vr=function(t){sn.now(yn(t))}:ln&&!on?(qr=(Br=new ln).port2,Br.port1.onmessage=mn,Vr=tn(qr.postMessage,qr)):l.addEventListener&&w(l.postMessage)&&!l.importScripts&&Hr&&"file:"!==Hr.protocol&&!s(En)?(Vr=En,l.addEventListener("message",mn,!1)):Vr=hn in I("script")?function(t){en.appendChild(I("script"))[hn]=function(){en.removeChild(this),gn(t)}}:function(t){setTimeout(yn(t),0)});var Rn,Sn,On,bn,In,Tn,wn,xn,_n={set:an,clear:un},Nn=/ipad|iphone|ipod/i.test(L)&&void 0!==l.Pebble,Cn=/web0s(?!.*chrome)/i.test(L),Pn=Pe.f,kn=_n.set,An=l.MutationObserver||l.WebKitMutationObserver,jn=l.document,Ln=l.process,Dn=l.Promise,Un=Pn(l,"queueMicrotask"),Mn=Un&&Un.value;Mn||(Rn=function(){var t,e;for(_r&&(t=Ln.domain)&&t.exit();Sn;){e=Sn.fn,Sn=Sn.next;try{e()}catch(t){throw Sn?bn():On=void 0,t}}On=void 0,t&&t.enter()},bn=on||_r||Cn||!An||!jn?!Nn&&Dn&&Dn.resolve?((wn=Dn.resolve(void 0)).constructor=Dn,xn=tn(wn.then,wn),function(){xn(Rn)}):_r?function(){Ln.nextTick(Rn)}:(kn=tn(kn,l),function(){kn(Rn)}):(In=!0,Tn=jn.createTextNode(""),new An(Rn).observe(Tn,{characterData:!0}),function(){Tn.data=In=!In}));var Gn=Mn||function(t){var e={fn:t,next:void 0};On&&(On.next=e),Sn||(Sn=e,bn()),On=e},Fn=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Hn=function(){this.head=null,this.tail=null};Hn.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}};var Vn,Bn,qn,Kn,Yn,$n,Wn,Jn,zn=Hn,Xn=l.Promise,Qn="object"==typeof window&&"object"!=typeof Deno,Zn=(Xn&&Xn.prototype,gt("species")),to=!1,eo=w(l.PromiseRejectionEvent),ro={CONSTRUCTOR:R("Promise",function(){var t=Dt(Xn),e=t!==String(Xn);if(!e&&66===F)return!0;if(51<=F&&/native code/.test(t))return!1;var r=new Xn(function(t){t(1)}),n=function(t){t(function(){},function(){})};return(r.constructor={})[Zn]=n,!(to=r.then(function(){})instanceof n)||!e&&Qn&&!eo}),REJECTION_EVENT:eo,SUBCLASSING:to},no=function(t){var r,n;this.promise=new t(function(t,e){if(void 0!==r||void 0!==n)throw TypeError("Bad Promise constructor");r=t,n=e}),this.resolve=W(r),this.reject=W(n)},oo={f:function(t){return new no(t)}},io=_n.set,ao="Promise",uo=ro.CONSTRUCTOR,co=ro.REJECTION_EVENT,so=ro.SUBCLASSING,fo=Qt.getterFor(ao),lo=Qt.set,po=Xn&&Xn.prototype,vo=Xn,ho=po,go=l.TypeError,yo=l.document,mo=l.process,Eo=oo.f,Ro=Eo,So=!!(yo&&yo.createEvent&&l.dispatchEvent),Oo="unhandledrejection",bo=function(t){var e;return!(!S(t)||!w(e=t.then))&&e},Io=function(t,e){var r,n,o,i=e.value,a=1==e.state,u=a?t.ok:t.fail,c=t.resolve,s=t.reject,f=t.domain;try{u?(a||(2===e.rejection&&No(e),e.rejection=1),!0===u?r=i:(f&&f.enter(),r=u(i),f&&(f.exit(),o=!0)),r===t.promise?s(go("Promise-chain cycle")):(n=bo(r))?k(n,r,c,s):c(r)):s(i)}catch(t){f&&!o&&f.exit(),s(t)}},To=function(r,n){r.notified||(r.notified=!0,Gn(function(){for(var t,e=r.reactions;t=e.get();)Io(t,r);r.notified=!1,n&&!r.rejection&&xo(r)}))},wo=function(t,e,r){var n,o;So?((n=yo.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),l.dispatchEvent(n)):n={promise:e,reason:r},!co&&(o=l["on"+t])?o(n):t===Oo&&function(t,e){var r=l.console;r&&r.error&&(1==arguments.length?r.error(t):r.error(t,e))}("Unhandled promise rejection",r)},xo=function(n){k(io,l,function(){var t,e=n.facade,r=n.value;if(_o(n)&&(t=Fn(function(){_r?mo.emit("unhandledRejection",r,e):wo(Oo,e,r)}),n.rejection=_r||_o(n)?2:1,t.error))throw t.value})},_o=function(t){return 1!==t.rejection&&!t.parent},No=function(e){k(io,l,function(){var t=e.facade;_r?mo.emit("rejectionHandled",t):wo("rejectionhandled",t,e.value)})},Co=function(e,r,n){return function(t){e(r,t,n)}},Po=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,To(t,!0))},ko=function(r,t,e){if(!r.done){r.done=!0,e&&(r=e);try{if(r.facade===t)throw go("Promise can't be resolved itself");var n=bo(t);n?Gn(function(){var e={done:!1};try{k(n,t,Co(ko,e,r),Co(Po,e,r))}catch(t){Po(e,t,r)}}):(r.value=t,r.state=1,To(r,!1))}catch(t){Po({done:!1},t,r)}}};if(uo&&(ho=(vo=function(t){!function(t,e){if(j(e,t))return;throw kr("Incorrect invocation")}(this,ho),W(t),k(Vn,this);var e=fo(this);try{t(Co(ko,e),Co(Po,e))}catch(t){Po(e,t)}}).prototype,(Vn=function(t){lo(this,{type:ao,done:!1,notified:!1,parent:!1,reactions:new zn,rejection:!1,state:0,value:void 0})}).prototype=te(ho,"then",function(t,e){var r=fo(this),n=Eo(Wr(this,vo));return r.parent=!0,n.ok=!w(t)||t,n.fail=w(e)&&e,n.domain=_r?mo.domain:void 0,0==r.state?r.reactions.add(n):Gn(function(){Io(n,r)}),n.promise}),Bn=function(){var t=new Vn,e=fo(t);this.promise=t,this.resolve=Co(ko,e),this.reject=Co(Po,e)},oo.f=Eo=function(t){return t===vo||void 0===t?new Bn(t):Ro(t)},w(Xn)&&po!==Object.prototype)){qn=po.then,so||te(po,"then",function(t,e){var r=this;return new vo(function(t,e){k(qn,r,t,e)}).then(t,e)},{unsafe:!0});try{delete po.constructor}catch(t){}ne&&ne(po,ho)}dr({global:!0,constructor:!0,wrap:!0,forced:uo},{Promise:vo}),$n=!(Yn=ao),(Kn=vo)&&!$n&&(Kn=Kn.prototype),Kn&&!ut(Kn,Cr)&&Nr(Kn,Cr,{configurable:!0,value:Yn}),Wn=A(ao),Jn=xt.f,f&&Wn&&!Wn[Pr]&&Jn(Wn,Pr,{configurable:!0,get:function(){return this}});var Ao={},jo=gt("iterator"),Lo=Array.prototype,Do=gt("iterator"),Uo=function(t){if(null!=t)return J(t,Do)||J(t,"@@iterator")||Ao[Me(t)]},Mo=TypeError,Go=function(t,e,r){var n,o;C(t);try{if(!(n=J(t,"return"))){if("throw"===e)throw r;return r}n=k(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return C(n),r},Fo=TypeError,Ho=function(t,e){this.stopped=t,this.result=e},Vo=Ho.prototype,Bo=function(t,e,r){var n,o,i,a,u,c,s,f,l=r&&r.that,p=!(!r||!r.AS_ENTRIES),v=!(!r||!r.IS_ITERATOR),d=!(!r||!r.INTERRUPTED),h=tn(e,l),g=function(t){return n&&Go(n,"normal",t),new Ho(!0,t)},y=function(t){return p?(C(t),d?h(t[0],t[1],g):h(t[0],t[1])):d?h(t,g):h(t)};if(v)n=t;else{if(!(o=Uo(t)))throw Fo(Y(t)+" is not iterable");if(void 0!==(f=o)&&(Ao.Array===f||Lo[jo]===f)){for(i=0,a=Ee(t);i<a;i++)if((u=y(t[i]))&&j(Vo,u))return u;return new Ho(!1)}n=function(t,e){var r=arguments.length<2?Uo(t):e;if(W(r))return C(k(r,t));throw Mo(Y(t)+" is not iterable")}(t,o)}for(c=n.next;!(s=k(c,n)).done;){try{u=y(s.value)}catch(t){Go(n,"throw",t)}if("object"==typeof u&&u&&j(Vo,u))return u}return new Ho(!1)},qo=gt("iterator"),Ko=!1;try{var Yo=0,$o={next:function(){return{done:!!Yo++}},return:function(){Ko=!0}};$o[qo]=function(){return this},Array.from($o,function(){throw 2})}catch(t){}var Wo=ro.CONSTRUCTOR||!function(t,e){if(!e&&!Ko)return!1;var r=!1;try{var n={};n[qo]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}(function(t){Xn.all(t).then(void 0,function(){})});dr({target:"Promise",stat:!0,forced:Wo},{all:function(t){var u=this,e=oo.f(u),c=e.resolve,s=e.reject,r=Fn(function(){var n=W(u.resolve),o=[],i=0,a=1;Bo(t,function(t){var e=i++,r=!1;a++,k(n,u,t).then(function(t){r||(r=!0,o[e]=t,--a||c(o))},s)}),--a||c(o)});return r.error&&s(r.value),e.promise}});var Jo=ro.CONSTRUCTOR,zo=Xn&&Xn.prototype;if(dr({target:"Promise",proto:!0,forced:Jo,real:!0},{catch:function(t){return this.then(void 0,t)}}),w(Xn)){var Xo=A("Promise").prototype.catch;zo.catch!==Xo&&te(zo,"catch",Xo,{unsafe:!0})}dr({target:"Promise",stat:!0,forced:Wo},{race:function(t){var r=this,n=oo.f(r),o=n.reject,e=Fn(function(){var e=W(r.resolve);Bo(t,function(t){k(e,r,t).then(n.resolve,o)})});return e.error&&o(e.value),n.promise}}),dr({target:"Promise",stat:!0,forced:ro.CONSTRUCTOR},{reject:function(t){var e=oo.f(this);return k(e.reject,void 0,t),e.promise}});var Qo=ro.CONSTRUCTOR;A("Promise");dr({target:"Promise",stat:!0,forced:Qo},{resolve:function(t){return function(t,e){if(C(t),S(e)&&e.constructor===t)return e;var r=oo.f(t);return(0,r.resolve)(e),r.promise}(this,t)}});var Zo={SUCCESS:"SUCCESS",ERROR_PUBLISHABLE_KEY:"ERROR_PUBLISHABLE_KEY",ERROR_PERMISSIONS:"ERROR_PERMISSIONS",ERROR_LOCATION:"ERROR_LOCATION",ERROR_NETWORK:"ERROR_NETWORK",ERROR_BAD_REQUEST:"ERROR_BAD_REQUEST",ERROR_UNAUTHORIZED:"ERROR_UNAUTHORIZED",ERROR_PAYMENT_REQUIRED:"ERROR_PAYMENT_REQUIRED",ERROR_FORBIDDEN:"ERROR_FORBIDDEN",ERROR_NOT_FOUND:"ERROR_NOT_FOUND",ERROR_RATE_LIMIT:"ERROR_RATE_LIMIT",ERROR_SERVER:"ERROR_SERVER",ERROR_UNKNOWN:"ERROR_UNKNOWN"},ti=function(){function t(){Or(this,t)}return Ir(t,null,[{key:"getStorage",value:function(){return window&&window.localStorage||void 0}},{key:"setItem",value:function(t,e){var r=this.getStorage();r&&null!=e&&r.setItem(t,e)}},{key:"getItem",value:function(t){var e=this.getStorage();if(!e)return null;var r=e.getItem(t);return null!=r?r:null}},{key:"removeItem",value:function(t){var e=this.getStorage();if(!e)return null;e.removeItem(t)}},{key:"clear",value:function(){var t=this.getStorage();if(!t)return null;t.clear()}},{key:"DESCRIPTION",get:function(){return"radar-description"}},{key:"DEVICE_ID",get:function(){return"radar-deviceId"}},{key:"DEVICE_TYPE",get:function(){return"radar-deviceType"}},{key:"METADATA",get:function(){return"radar-metadata"}},{key:"HOST",get:function(){return"radar-host"}},{key:"PUBLISHABLE_KEY",get:function(){return"radar-publishableKey"}},{key:"USER_ID",get:function(){return"radar-userId"}},{key:"INSTALL_ID",get:function(){return"radar-installId"}},{key:"TRIP_OPTIONS",get:function(){return"radar-trip-options"}},{key:"CUSTOM_HEADERS",get:function(){return"radar-custom-headers"}},{key:"BASE_API_PATH",get:function(){return"radar-base-api-path"}},{key:"CACHE_LOCATION_MINUTES",get:function(){return"radar-cache-location-minutes"}},{key:"LAST_LOCATION",get:function(){return"radar-last-location"}}]),t}(),ei=function(){function t(){Or(this,t)}return Ir(t,null,[{key:"getCurrentPosition",value:function(){return new Promise(function(u,c){if(!navigator||!navigator.geolocation)return c(Zo.ERROR_LOCATION);var s=parseFloat(ti.getItem(ti.CACHE_LOCATION_MINUTES));if(s)try{var t=JSON.parse(ti.getItem(ti.LAST_LOCATION));if(t){var e=t.latitude,r=t.longitude,n=t.accuracy;if(Date.now()<parseInt(t.expiresAt)&&e&&r&&n)return u({latitude:e,longitude:r,accuracy:n})}}catch(t){console.warn("Radar SDK: could not load cached location.")}navigator.geolocation.getCurrentPosition(function(t){if(!t||!t.coords)return c(Zo.ERROR_LOCATION);var e=t.coords,r=e.latitude,n=e.longitude,o=e.accuracy;if(s){var i=Date.now(),a={latitude:r,longitude:n,accuracy:o,updatedAt:i,expiresAt:i+60*s*1e3};ti.setItem(ti.LAST_LOCATION,JSON.stringify(a))}return u({latitude:r,longitude:n,accuracy:o})},function(t){return t&&t.code&&1===t.code?c(Zo.ERROR_PERMISSIONS):c(Zo.ERROR_LOCATION)})})}}]),t}(),ri=Array.isArray||function(t){return"Array"==ae(t)},ni=TypeError,oi=function(t){if(9007199254740991<t)throw ni("Maximum allowed index exceeded");return t},ii=function(t,e,r){var n=Rt(e);n in t?xt.f(t,n,Gt(0,r)):t[n]=r},ai=gt("species"),ui=Array,ci=function(t,e){return ri(r=t)&&(n=r.constructor,Kr(n)&&(n===ui||ri(n.prototype))?n=void 0:S(n)&&null===(n=n[ai])&&(n=void 0)),new(void 0===n?ui:n)(0===e?0:e);var r,n},si=gt("species"),fi=function(e){return 51<=F||!s(function(){var t=[];return(t.constructor={})[si]=function(){return{foo:1}},1!==t[e](Boolean).foo})},li=gt("isConcatSpreadable"),pi=51<=F||!s(function(){var t=[];return t[li]=!1,t.concat()[0]!==t}),vi=fi("concat"),di=function(t){if(!S(t))return!1;var e=t[li];return void 0!==e?!!e:ri(t)};dr({target:"Array",proto:!0,arity:1,forced:!pi||!vi},{concat:function(t){var e,r,n,o,i,a=it(this),u=ci(a,0),c=0;for(e=-1,n=arguments.length;e<n;e++)if(i=-1===e?a:arguments[e],di(i))for(o=Ee(i),oi(c+o),r=0;r<o;r++,c++)r in i&&ii(u,c,i[r]);else oi(c+1),ii(u,c++,i);return u.length=c,u}});e(function(t){var e=function(a){var c,t=Object.prototype,f=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",n=e.toStringTag||"@@toStringTag";function u(t,e,r,n){var i,a,u,c,o=e&&e.prototype instanceof y?e:y,s=Object.create(o.prototype),f=new x(n||[]);return s._invoke=(i=t,a=r,u=f,c=p,function(t,e){if(c===d)throw new Error("Generator is already running");if(c===h){if("throw"===t)throw e;return N()}for(u.method=t,u.arg=e;;){var r=u.delegate;if(r){var n=I(r,u);if(n){if(n===g)continue;return n}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(c===p)throw c=h,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);c=d;var o=l(i,a,u);if("normal"===o.type){if(c=u.done?h:v,o.arg===g)continue;return{value:o.arg,done:u.done}}"throw"===o.type&&(c=h,u.method="throw",u.arg=o.arg)}}),s}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var p="suspendedStart",v="suspendedYield",d="executing",h="completed",g={};function y(){}function i(){}function s(){}var m={};m[o]=function(){return this};var E=Object.getPrototypeOf,R=E&&E(E(_([])));R&&R!==t&&f.call(R,o)&&(m=R);var S=s.prototype=y.prototype=Object.create(m);function O(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function b(c,s){var e;this._invoke=function(r,n){function t(){return new s(function(t,e){!function e(t,r,n,o){var i=l(c[t],c,r);if("throw"!==i.type){var a=i.arg,u=a.value;return u&&"object"==typeof u&&f.call(u,"__await")?s.resolve(u.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):s.resolve(u).then(function(t){a.value=t,n(a)},function(t){return e("throw",t,n,o)})}o(i.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}}function I(t,e){var r=t.iterator[e.method];if(r===c){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=c,I(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,g;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=c),e.delegate=null,g):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function _(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(f.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=c,t.done=!0,t};return n.next=n}}return{next:N}}function N(){return{value:c,done:!0}}return i.prototype=S.constructor=s,s.constructor=i,s[n]=i.displayName="GeneratorFunction",a.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===i||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,n in t||(t[n]="GeneratorFunction")),t.prototype=Object.create(S),t},a.awrap=function(t){return{__await:t}},O(b.prototype),b.prototype[r]=function(){return this},a.AsyncIterator=b,a.async=function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new b(u(t,e,r,n),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},O(S),S[n]="Generator",S[o]=function(){return this},S.toString=function(){return"[object Generator]"},a.keys=function(r){var n=[];for(var t in r)n.push(t);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=_,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&f.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function t(t,e){return i.type="throw",i.arg=r,n.next=t,e&&(n.method="next",n.arg=c),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=f.call(o,"catchLoc"),u=f.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&f.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),w(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;w(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=c),g}},a}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}});var hi=v([].push),gi=function(v){var d=1==v,h=2==v,g=3==v,y=4==v,m=6==v,E=7==v,R=5==v||m;return function(t,e,r,n){for(var o,i,a=it(t),u=se(a),c=tn(e,r),s=Ee(u),f=0,l=n||ci,p=d?l(t,s):h||E?l(t,0):void 0;f<s;f++)if((R||f in u)&&(i=c(o=u[f],f,a),v))if(d)p[f]=i;else if(i)switch(v){case 3:return!0;case 5:return o;case 6:return f;case 2:hi(p,o)}else switch(v){case 4:return!1;case 7:hi(p,o)}return m?-1:g||y?y:p}},yi={forEach:gi(0),map:gi(1),filter:gi(2),some:gi(3),every:gi(4),find:gi(5),findIndex:gi(6),filterReject:gi(7)},mi=function(t,e){var r=[][t];return!!r&&s(function(){r.call(null,e||function(){return 1},1)})},Ei=yi.forEach,Ri=mi("forEach")?[].forEach:function(t){return Ei(this,t,1<arguments.length?arguments[1]:void 0)};dr({target:"Array",proto:!0,forced:[].forEach!=Ri},{forEach:Ri});var Si=v([].join),Oi=se!=Object,bi=mi("join",",");dr({target:"Array",proto:!0,forced:Oi||!bi},{join:function(t){return Si(fe(this),void 0===t?",":t)}});var Ii=yi.map;dr({target:"Array",proto:!0,forced:!fi("map")},{map:function(t){return Ii(this,t,1<arguments.length?arguments[1]:void 0)}});var Ti={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},wi=I("span").classList,xi=wi&&wi.constructor&&wi.constructor.prototype,_i=xi===Object.prototype?void 0:xi,Ni=function(e){if(e&&e.forEach!==Ri)try{Ft(e,"forEach",Ri)}catch(t){e.forEach=Ri}};for(var Ci in Ti)Ti[Ci]&&Ni(l[Ci]&&l[Ci].prototype);Ni(_i);var Pi,ki=function(){function t(){Or(this,t)}return Ir(t,null,[{key:"getHost",value:function(){return ti.getItem(ti.HOST)||"https://api.radar.io"}}]),t}(),Ai="3.5.1-beta",ji=function(){function t(){Or(this,t)}return Ir(t,null,[{key:"request",value:function(l,p,v){return new Promise(function(e,r){var n=new XMLHttpRequest,t=ti.getItem(ti.BASE_API_PATH)||"v1",o="".concat(ki.getHost(),"/").concat(t,"/").concat(p),i={};if(Object.keys(v).forEach(function(t){var e=v[t];void 0!==e&&(i[t]=e)}),"GET"===l){var a=Object.keys(i).map(function(t){return"".concat(t,"=").concat(encodeURIComponent(i[t]))});if(0<a.length){var u=a.join("&");o="".concat(o,"?").concat(u)}i=void 0}n.open(l,o,!0);var c=ti.getItem(ti.PUBLISHABLE_KEY);if(c){n.setRequestHeader("Authorization",c),n.setRequestHeader("Content-Type","application/json"),n.setRequestHeader("X-Radar-Device-Type","Web"),n.setRequestHeader("X-Radar-SDK-Version",Ai);var s=ti.getItem(ti.CUSTOM_HEADERS);if(s){var f=JSON.parse(s);Object.keys(f).forEach(function(t){n.setRequestHeader(t,f[t])})}n.onload=function(){var t;try{t=JSON.parse(n.response)}catch(t){r(Zo.ERROR_SERVER)}200==n.status?e(t):400===n.status?r({httpError:Zo.ERROR_BAD_REQUEST,response:t}):401===n.status?r({httpError:Zo.ERROR_UNAUTHORIZED,response:t}):402===n.status?r({httpError:Zo.ERROR_PAYMENT_REQUIRED,response:t}):403===n.status?r({httpError:Zo.ERROR_FORBIDDEN,response:t}):404===n.status?r({httpError:Zo.ERROR_NOT_FOUND,response:t}):429===n.status?r({httpError:Zo.ERROR_RATE_LIMIT,response:t}):500<=n.status&&n.status<600?r({httpError:Zo.ERROR_SERVER,response:t}):r({httpError:Zo.ERROR_UNKNOWN,response:t})},n.onerror=function(){r(Zo.ERROR_SERVER)},n.timeout=function(){r(Zo.ERROR_NETWORK)},n.send(JSON.stringify(i))}else r(Zo.ERROR_PUBLISHABLE_KEY)})}}]),t}(),Li=function(){function t(){Or(this,t)}var e;return Ir(t,null,[{key:"getContext",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<a.length&&void 0!==a[0]?a[0]:{}).latitude&&e.longitude){t.next=5;break}return t.next=4,ei.getCurrentPosition();case 4:e=t.sent;case 5:return n=(r=e).latitude,o=r.longitude,i={coordinates:"".concat(n,",").concat(o)},t.abrupt("return",ji.request("GET","context",i));case 8:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Di=function(){function t(){Or(this,t)}var e,r,n;return Ir(t,null,[{key:"geocode",value:(n=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<i.length&&void 0!==i[0]?i[0]:{},r=e.query,n=e.layers,o=e.country,t.abrupt("return",ji.request("GET","geocode/forward",{query:r,layers:n,country:o}));case 3:case"end":return t.stop()}},t)})),function(){return n.apply(this,arguments)})},{key:"reverseGeocode",value:(r=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<s.length&&void 0!==s[0]?s[0]:{}).latitude&&e.longitude){t.next=9;break}return t.next=4,ei.getCurrentPosition();case 4:r=t.sent,n=r.latitude,o=r.longitude,e.latitude=n,e.longitude=o;case 9:return i=e.latitude,a=e.longitude,u=e.layers,c={coordinates:"".concat(i,",").concat(a),layers:u},t.abrupt("return",ji.request("GET","geocode/reverse",c));case 12:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"ipGeocode",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<n.length&&void 0!==n[0]?n[0]:{},r=e.ip,t.abrupt("return",ji.request("GET","geocode/ip",{ip:r}));case 3:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Ui=function(){function t(){Or(this,t)}var e,r;return Ir(t,null,[{key:"getDistanceToDestination",value:(r=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l,p=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<p.length&&void 0!==p[0]?p[0]:{}).origin){t.next=8;break}return t.next=4,ei.getCurrentPosition();case 4:r=t.sent,n=r.latitude,o=r.longitude,e.origin={latitude:n,longitude:o};case 8:return i=e.origin,a=e.destination,u=e.modes,c=e.units,s=e.geometry,f=e.geometryPoints,i="".concat(i.latitude,",").concat(i.longitude),a&&(a="".concat(a.latitude,",").concat(a.longitude)),u&&(u=u.join(",")),l={origin:i,destination:a,modes:u,units:c,geometry:s,geometryPoints:f},t.abrupt("return",ji.request("GET","route/distance",l));case 14:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"getMatrixDistances",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<l.length&&void 0!==l[0]?l[0]:{}).origins){t.next=8;break}return t.next=4,ei.getCurrentPosition();case 4:r=t.sent,n=r.latitude,o=r.longitude,e.origins=[{latitude:n,longitude:o}];case 8:return i=e.origins,a=e.destinations,u=e.mode,c=e.units,s=e.geometry,i=(i||[]).map(function(t){return"".concat(t.latitude,",").concat(t.longitude)}).join("|"),a=(a||[]).map(function(t){return"".concat(t.latitude,",").concat(t.longitude)}).join("|"),f={origins:i,destinations:a,mode:u,units:c,geometry:s},t.abrupt("return",ji.request("GET","route/matrix",f));case 13:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Mi=function(){function t(){Or(this,t)}var e,r,n;return Ir(t,null,[{key:"searchPlaces",value:(n=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l,p=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<p.length&&void 0!==p[0]?p[0]:{}).near){t.next=8;break}return t.next=4,ei.getCurrentPosition();case 4:r=t.sent,n=r.latitude,o=r.longitude,e.near={latitude:n,longitude:o};case 8:return i=e.near,a=e.radius,u=e.chains,c=e.categories,s=e.groups,f=e.limit,i="".concat(i.latitude,",").concat(i.longitude),u&&(u=u.join(",")),c&&(c=c.join(",")),s&&(s=s.join(",")),l={near:i,radius:a,chains:u,categories:c,groups:s,limit:f},t.abrupt("return",ji.request("GET","search/places",l));case 15:case"end":return t.stop()}},t)})),function(){return n.apply(this,arguments)})},{key:"searchGeofences",value:(r=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((e=0<l.length&&void 0!==l[0]?l[0]:{}).near){t.next=8;break}return t.next=4,ei.getCurrentPosition();case 4:r=t.sent,n=r.latitude,o=r.longitude,e.near={latitude:n,longitude:o};case 8:return i=e.near,a=e.radius,u=e.tags,c=e.metadata,s=e.limit,i="".concat(i.latitude,",").concat(i.longitude),u&&(u=u.join(",")),f={near:i,radius:a,tags:u,limit:s},c&&Object.keys(c).forEach(function(t){var e="metadata[".concat(t,"]"),r=c[t];f[e]=r}),t.abrupt("return",ji.request("GET","search/geofences",f));case 14:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)})},{key:"autocomplete",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=0<f.length&&void 0!==f[0]?f[0]:{},o=n.query,i=n.near,a=n.limit,u=n.layers,c=n.country,(null===(e=i)||void 0===e?void 0:e.latitude)&&(null===(r=i)||void 0===r?void 0:r.longitude)&&(i="".concat(i.latitude,",").concat(i.longitude)),s={query:o,near:i,limit:a,layers:u,country:c},t.abrupt("return",ji.request("GET","search/autocomplete",s));case 5:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Gi=function(){var t=C(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},Fi=l.RegExp,Hi=s(function(){var t=Fi("a","y");return t.lastIndex=2,null!=t.exec("abcd")}),Vi=Hi||s(function(){return!Fi("a","y").sticky}),Bi={BROKEN_CARET:Hi||s(function(){var t=Fi("^r","gy");return t.lastIndex=2,null!=t.exec("str")}),MISSED_STICKY:Vi,UNSUPPORTED_Y:Hi},qi={f:f&&!x?Object.defineProperties:function(t,e){C(t);for(var r,n=fe(e),o=hr(e),i=o.length,a=0;a<i;)xt.f(t,r=o[a++],n[r]);return t}},Ki="prototype",Yi="script",$i=Vt("IE_PROTO"),Wi=function(){},Ji=function(t){return"<script>"+t+"</"+Yi+">"},zi=function(t){t.write(Ji("")),t.close();var e=t.parentWindow.Object;return t=null,e},Xi=function(){try{Pi=new ActiveXObject("htmlfile")}catch(t){}var t,e;Xi="undefined"!=typeof document?document.domain&&Pi?zi(Pi):((e=I("iframe")).style.display="none",en.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Ji("document.F=Object")),t.close(),t.F):zi(Pi);for(var r=Ie.length;r--;)delete Xi[Ki][Ie[r]];return Xi()};Bt[$i]=!0;var Qi,Zi,ta=Object.create||function(t,e){var r;return null!==t?(Wi[Ki]=C(t),r=new Wi,Wi[Ki]=null,r[$i]=t):r=Xi(),void 0===e?r:qi.f(r,e)},ea=l.RegExp,ra=s(function(){var t=ea(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}),na=l.RegExp,oa=s(function(){var t=na("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}),ia=Qt.get,aa=et("native-string-replace",String.prototype.replace),ua=RegExp.prototype.exec,ca=ua,sa=v("".charAt),fa=v("".indexOf),la=v("".replace),pa=v("".slice),va=(Zi=/b*/g,k(ua,Qi=/a/,"a"),k(ua,Zi,"a"),0!==Qi.lastIndex||0!==Zi.lastIndex),da=Bi.BROKEN_CARET,ha=void 0!==/()??/.exec("")[1];(va||ha||da||ra||oa)&&(ca=function(t){var e,r,n,o,i,a,u,c=this,s=ia(c),f=Fe(t),l=s.raw;if(l)return l.lastIndex=c.lastIndex,e=k(ca,l,f),c.lastIndex=l.lastIndex,e;var p=s.groups,v=da&&c.sticky,d=k(Gi,c),h=c.source,g=0,y=f;if(v&&(d=la(d,"y",""),-1===fa(d,"g")&&(d+="g"),y=pa(f,c.lastIndex),0<c.lastIndex&&(!c.multiline||c.multiline&&"\n"!==sa(f,c.lastIndex-1))&&(h="(?: "+h+")",y=" "+y,g++),r=new RegExp("^(?:"+h+")",d)),ha&&(r=new RegExp("^"+h+"$(?!\\s)",d)),va&&(n=c.lastIndex),o=k(ua,v?r:c,y),v?o?(o.input=pa(o.input,g),o[0]=pa(o[0],g),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:va&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),ha&&o&&1<o.length&&k(aa,o[0],r,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)}),o&&p)for(o.groups=a=ta(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var ga=ca;dr({target:"RegExp",proto:!0,forced:/./.exec!==ga},{exec:ga});var ya=RegExp.prototype,ma=Pt.PROPER,Ea="toString",Ra=RegExp.prototype[Ea],Sa=s(function(){return"/a/b"!=Ra.call({source:"a",flags:"b"})}),Oa=ma&&Ra.name!=Ea;(Sa||Oa)&&te(RegExp.prototype,Ea,function(){var t,e,r=C(this);return"/"+Fe(r.source)+"/"+Fe(void 0!==(e=(t=r).flags)||"flags"in ya||ut(t,"flags")||!j(ya,t)?e:k(Gi,t))},{unsafe:!0});var ba=gt("species"),Ia=RegExp.prototype,Ta=v("".charAt),wa=v("".charCodeAt),xa=v("".slice),_a=function(u){return function(t,e){var r,n,o=Fe(nt(t)),i=de(e),a=o.length;return i<0||a<=i?u?"":void 0:(r=wa(o,i))<55296||56319<r||i+1===a||(n=wa(o,i+1))<56320||57343<n?u?Ta(o,i):r:u?xa(o,i,i+2):n-56320+(r-55296<<10)+65536}},Na={codeAt:_a(!1),charAt:_a(!0)}.charAt,Ca=Math.floor,Pa=v("".charAt),ka=v("".replace),Aa=v("".slice),ja=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,La=/\$([$&'`]|\d{1,2})/g,Da=function(i,a,u,c,s,t){var f=u+i.length,l=c.length,e=La;return void 0!==s&&(s=it(s),e=ja),ka(t,e,function(t,e){var r;switch(Pa(e,0)){case"$":return"$";case"&":return i;case"`":return Aa(a,0,u);case"'":return Aa(a,f);case"<":r=s[Aa(e,1,-1)];break;default:var n=+e;if(0===n)return t;if(l<n){var o=Ca(n/10);return 0===o?t:o<=l?void 0===c[o-1]?Pa(e,1):c[o-1]+Pa(e,1):t}r=c[n-1]}return void 0===r?"":r})},Ua=TypeError,Ma=function(t,e){var r=t.exec;if(w(r)){var n=k(r,t,e);return null!==n&&C(n),n}if("RegExp"===ae(t))return k(ga,t,e);throw Ua("RegExp#exec called on incompatible receiver")},Ga=gt("replace"),Fa=Math.max,Ha=Math.min,Va=v([].concat),Ba=v([].push),qa=v("".indexOf),Ka=v("".slice),Ya="$0"==="a".replace(/./,"$0"),$a=!!/./[Ga]&&""===/./[Ga]("a","$0");!function(r,t,e,n){var o=gt(r),u=!s(function(){var t={};return t[o]=function(){return 7},7!=""[r](t)}),i=u&&!s(function(){var t=!1,e=/a/;return"split"===r&&((e={constructor:{}}).constructor[ba]=function(){return e},e.flags="",e[o]=/./[o]),e.exec=function(){return t=!0,null},e[o](""),!t});if(!u||!i||e){var c=v(/./[o]),a=t(o,""[r],function(t,e,r,n,o){var i=v(t),a=e.exec;return a===ga||a===Ia.exec?u&&!o?{done:!0,value:c(e,r,n)}:{done:!0,value:i(r,e,n)}:{done:!1}});te(String.prototype,r,a[0]),te(Ia,o,a[1])}n&&Ft(Ia[o],"sham",!0)}("replace",function(t,b,I){var T=$a?"$":"$0";return[function(t,e){var r=nt(this),n=null==t?void 0:J(t,Ga);return n?k(n,t,r,e):k(b,Fe(r),t,e)},function(t,e){var r=C(this),n=Fe(t);if("string"==typeof e&&-1===qa(e,T)&&-1===qa(e,"$<")){var o=I(b,r,n,e);if(o.done)return o.value}var i=w(e);i||(e=Fe(e));var a=r.global;if(a){var u=r.unicode;r.lastIndex=0}for(var c,s,f=[];;){var l=Ma(r,n);if(null===l)break;if(Ba(f,l),!a)break;""===Fe(l[0])&&(r.lastIndex=(c=n,(s=me(r.lastIndex))+(u?Na(c,s).length:1)))}for(var p,v="",d=0,h=0;h<f.length;h++){for(var g=Fe((l=f[h])[0]),y=Fa(Ha(de(l.index),n.length),0),m=[],E=1;E<l.length;E++)Ba(m,void 0===(p=l[E])?p:String(p));var R=l.groups;if(i){var S=Va([g],m,y,n);void 0!==R&&Ba(S,R);var O=Fe(Qr(e,void 0,S))}else O=Da(g,n,y,m,R,e);d<=y&&(v+=Ka(n,d,y)+O,d=y+g.length)}return v+Ka(n,d)}]},!!s(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})||!Ya||$a);var Wa=function(){function t(){Or(this,t)}return Ir(t,null,[{key:"getId",value:function(){var t=ti.getItem(ti.DEVICE_ID);if(t)return t;var e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)});return ti.setItem(ti.DEVICE_ID,e),e}}]),t}(),Ja=function(){function t(){Or(this,t)}var e;return Ir(t,null,[{key:"trackOnce",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f,l,p,v,d,h=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=0<h.length&&void 0!==h[0]?h[0]:{},r=e.latitude,n=e.longitude,o=e.accuracy,r&&n){t.next=9;break}return t.next=5,ei.getCurrentPosition();case 5:i=t.sent,r=i.latitude,n=i.longitude,o=i.accuracy;case 9:return a=Wa.getId(),u=ti.getItem(ti.USER_ID),c=ti.getItem(ti.INSTALL_ID)||a,s=ti.getItem(ti.DEVICE_TYPE)||"Web",f=ti.getItem(ti.DESCRIPTION),(l=ti.getItem(ti.METADATA))&&(l=JSON.parse(l)),(p=ti.getItem(ti.TRIP_OPTIONS))&&(p=JSON.parse(p)),v=wr({},e,{accuracy:o,description:f,deviceId:a,deviceType:s,foreground:!0,installId:c,latitude:r,longitude:n,metadata:l,sdkVersion:Ai,stopped:!0,userId:u,tripOptions:p}),t.next=21,ji.request("POST","track",v);case 21:return(d=t.sent).location={latitude:r,longitude:n,accuracy:o},t.abrupt("return",d);case 24:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),za=function(){function t(){Or(this,t)}var e;return Ir(t,null,[{key:"updateTrip",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u,c,s,f=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<f.length&&void 0!==f[0]?f[0]:{},r=1<f.length?f[1]:void 0,n=e.externalId,o=e.destinationGeofenceTag,i=e.destinationGeofenceExternalId,a=e.mode,u=e.metadata,c=e.approachingThreshold,s={externalId:n,status:r,destinationGeofenceTag:o,destinationGeofenceExternalId:i,mode:a,metadata:u,approachingThreshold:c},t.abrupt("return",ji.request("PATCH","trips/".concat(n),s));case 5:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Xa=function(){function t(){Or(this,t)}var e;return Ir(t,null,[{key:"sendEvent",value:(e=Sr(regeneratorRuntime.mark(function t(){var e,r,n,o,i,a,u=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<u.length&&void 0!==u[0]?u[0]:{},r=e.type,n=e.metadata,o=e.createdAt,i=Wa.getId(),a=ti.getItem(ti.USER_ID),t.abrupt("return",ji.request("POST","events",{type:r,metadata:n,deviceId:i,userId:a,createdAt:o}));case 5:case"end":return t.stop()}},t)})),function(){return e.apply(this,arguments)})}]),t}(),Qa="started",Za="completed",tu="canceled",eu=function(){},ru=function(e){return function(t){"string"!=typeof t?"object"===Er(t)&&t.httpError?e(t.httpError,{},t.response):e(Zo.ERROR_UNKNOWN,{}):e(t,{})}};return function(){function n(){Or(this,n)}return Ir(n,null,[{key:"initialize",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};t||console.error('Radar "initialize" was called without a publishable key'),ti.setItem(ti.PUBLISHABLE_KEY,t);var r=e.cacheLocationMinutes;if(r){var n=Number(r);Number.isNaN(n)?console.warn('Radar SDK: invalid number for option "cacheLocationMinutes"'):ti.setItem(ti.CACHE_LOCATION_MINUTES,r)}else ti.removeItem(ti.CACHE_LOCATION_MINUTES)}},{key:"setHost",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"v1";ti.setItem(ti.HOST,t),ti.setItem(ti.BASE_API_PATH,e)}},{key:"setUserId",value:function(t){t?ti.setItem(ti.USER_ID,String(t).trim()):ti.removeItem(ti.USER_ID)}},{key:"setDeviceId",value:function(t,e){t?ti.setItem(ti.DEVICE_ID,String(t).trim()):ti.removeItem(ti.DEVICE_ID),e?ti.setItem(ti.INSTALL_ID,String(e).trim()):ti.removeItem(ti.INSTALL_ID)}},{key:"setDeviceType",value:function(t){t?ti.setItem(ti.DEVICE_TYPE,String(t).trim()):ti.removeItem(ti.DEVICE_TYPE)}},{key:"setDescription",value:function(t){t?ti.setItem(ti.DESCRIPTION,String(t).trim()):ti.removeItem(ti.DESCRIPTION)}},{key:"setMetadata",value:function(t){t?ti.setItem(ti.METADATA,JSON.stringify(t)):ti.removeItem(ti.METADATA)}},{key:"setRequestHeaders",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};Object.keys(t).length?ti.setItem(ti.CUSTOM_HEADERS,JSON.stringify(t)):ti.removeItem(ti.CUSTOM_HEADERS)}},{key:"getLocation",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:eu;ei.getCurrentPosition().then(function(t){e(null,{location:t,status:Zo.SUCCESS})}).catch(ru(e))}},{key:"trackOnce",value:function(t){var e,r,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;e="function"==typeof t?t:(r=t,n),Ja.trackOnce(r).then(function(t){e(null,{location:t.location,user:t.user,events:t.events,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"getContext",value:function(t){var e,r,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;e="function"==typeof t?t:(r=t,n),Li.getContext(r).then(function(t){e(null,{context:t.context,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"startTrip",value:function(e){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;za.updateTrip(e,Qa).then(function(t){n.setTripOptions(e),r(null,{trip:t.trip,events:t.events,status:Zo.SUCCESS},t)}).catch(ru(r))}},{key:"updateTrip",value:function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:eu;za.updateTrip(e,t).then(function(t){n.setTripOptions(e),r(null,{trip:t.trip,events:t.events,status:Zo.SUCCESS},t)}).catch(ru(r))}},{key:"completeTrip",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:eu,t=n.getTripOptions();za.updateTrip(t,Za).then(function(t){n.clearTripOptions(),e(null,{trip:t.trip,events:t.events,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"cancelTrip",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:eu,t=n.getTripOptions();za.updateTrip(t,tu).then(function(t){n.clearTripOptions(),e(null,{trip:t.trip,events:t.events,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"setTripOptions",value:function(t){t?ti.setItem(ti.TRIP_OPTIONS,JSON.stringify(t)):n.clearTripOptions()}},{key:"clearTripOptions",value:function(){ti.removeItem(ti.TRIP_OPTIONS)}},{key:"getTripOptions",value:function(){var t=ti.getItem(ti.TRIP_OPTIONS);return t&&(t=JSON.parse(t)),t}},{key:"searchPlaces",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;Mi.searchPlaces(t).then(function(t){e(null,{places:t.places,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"searchGeofences",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;Mi.searchGeofences(t).then(function(t){e(null,{geofences:t.geofences,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"autocomplete",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;Mi.autocomplete(t).then(function(t){e(null,{addresses:t.addresses,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"geocode",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;Di.geocode(t).then(function(t){e(null,{addresses:t.addresses,staus:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"reverseGeocode",value:function(t){var e,r,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;e="function"==typeof t?t:(r=t,n),Di.reverseGeocode(r).then(function(t){e(null,{addresses:t.addresses,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"ipGeocode",value:function(t){var e,r,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;"function"==typeof t?e=t:"object"===Er(t)&&(r=t,e=n),Di.ipGeocode(r).then(function(t){e(null,{address:t.address,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"getDistance",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;Ui.getDistanceToDestination(t).then(function(t){e(null,{routes:t.routes,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"getMatrix",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;Ui.getMatrixDistances(t).then(function(t){e(null,{origins:t.origins,destinations:t.destinations,matrix:t.matrix,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"sendEvent",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:eu;Xa.sendEvent(t).then(function(t){e(null,{event:t.event,status:Zo.SUCCESS},t)}).catch(ru(e))}},{key:"VERSION",get:function(){return Ai}},{key:"STATUS",get:function(){return Zo}}]),n}()}(); |
@@ -6,3 +6,3 @@ { | ||
"license": "Apache-2.0", | ||
"version": "3.5.0", | ||
"version": "3.5.1-beta", | ||
"main": "dist/index.js", | ||
@@ -9,0 +9,0 @@ "files": [ |
@@ -17,2 +17,3 @@ import Http from '../http'; | ||
geometry, | ||
geometryPoints, | ||
} = routingOptions; | ||
@@ -25,2 +26,3 @@ | ||
} | ||
if (modes) { | ||
@@ -36,2 +38,3 @@ modes = modes.join(','); | ||
geometry, | ||
geometryPoints | ||
}; | ||
@@ -38,0 +41,0 @@ |
@@ -49,3 +49,3 @@ import Navigator from './navigator'; | ||
static initialize(publishableKey) { | ||
static initialize(publishableKey, options={}) { | ||
if (!publishableKey) { | ||
@@ -55,5 +55,18 @@ console.error('Radar "initialize" was called without a publishable key'); | ||
Storage.setItem(Storage.PUBLISHABLE_KEY, publishableKey); | ||
const { cacheLocationMinutes } = options; | ||
if (cacheLocationMinutes) { | ||
const number = Number(cacheLocationMinutes); | ||
if (Number.isNaN(number)) { | ||
console.warn('Radar SDK: invalid number for option "cacheLocationMinutes"'); | ||
} else { | ||
Storage.setItem(Storage.CACHE_LOCATION_MINUTES, cacheLocationMinutes); | ||
} | ||
} else { | ||
Storage.removeItem(Storage.CACHE_LOCATION_MINUTES); | ||
} | ||
} | ||
static setHost(host, baseApiPath = API_VERSION) { | ||
static setHost(host, baseApiPath=API_VERSION) { | ||
Storage.setItem(Storage.HOST, host); | ||
@@ -155,3 +168,2 @@ Storage.setItem(Storage.BASE_API_PATH, baseApiPath); | ||
callback = arg0; | ||
} else { | ||
@@ -286,3 +298,2 @@ location = arg0; | ||
callback = arg0; | ||
} else if (typeof arg0 === 'object') { | ||
@@ -289,0 +300,0 @@ geocodeOptions = arg0; |
import STATUS from './status'; | ||
import Storage from './storage'; | ||
@@ -11,2 +12,19 @@ class Navigator { | ||
const cacheLocationMinutes = parseFloat(Storage.getItem(Storage.CACHE_LOCATION_MINUTES)); | ||
if (cacheLocationMinutes) { | ||
try { | ||
const lastLocation = JSON.parse(Storage.getItem(Storage.LAST_LOCATION)); | ||
if (lastLocation) { | ||
const { latitude, longitude, accuracy } = lastLocation; | ||
if (Date.now() < parseInt(lastLocation.expiresAt)) { // check expiration stuff goes here | ||
if (latitude && longitude && accuracy) { | ||
return resolve({ latitude, longitude, accuracy }); | ||
} | ||
} | ||
} | ||
} catch (e) { | ||
console.warn('Radar SDK: could not load cached location.'); | ||
} | ||
} | ||
navigator.geolocation.getCurrentPosition( | ||
@@ -21,2 +39,10 @@ // success callback | ||
if (cacheLocationMinutes) { | ||
const updatedAt = Date.now(); | ||
const expiresAt = updatedAt + (cacheLocationMinutes * 60 * 1000); // convert to ms | ||
const lastLocation = { latitude, longitude, accuracy, updatedAt, expiresAt }; | ||
Storage.setItem(Storage.LAST_LOCATION, JSON.stringify(lastLocation)); | ||
} | ||
return resolve({ latitude, longitude, accuracy }); | ||
@@ -23,0 +49,0 @@ }, |
@@ -37,2 +37,8 @@ class Storage { | ||
} | ||
static get CACHE_LOCATION_MINUTES() { | ||
return 'radar-cache-location-minutes' | ||
} | ||
static get LAST_LOCATION() { | ||
return 'radar-last-location'; | ||
} | ||
@@ -39,0 +45,0 @@ static getStorage() { |
@@ -1,1 +0,1 @@ | ||
export default '3.5.0'; | ||
export default '3.5.1-beta'; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
438521
10274
1