Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ace-de/eua-google-places-client

Package Overview
Dependencies
Maintainers
7
Versions
218
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ace-de/eua-google-places-client - npm Package Compare versions

Comparing version 1.7.2 to 1.7.3

2

dist/index.esm.js

@@ -1,2 +0,2 @@

function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(t,e,r,n,o,a,i){try{var c=t[a](i),s=c.value}catch(u){return void r(u)}c.done?e(s):Promise.resolve(s).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,a){var i=t.apply(e,n);function c(t){r(i,o,a,c,s,"next",t)}function s(t){r(i,o,a,c,s,"throw",t)}c(void 0)}))}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(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 i(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s={exports:{}};!function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(x){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),i=new L(n||[]);return a._invoke=function(t,e,r){var n=f;return function(o,a){if(n===h)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw a;return R()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=A(i,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var s=l(t,e,r);if("normal"===s.type){if(n=r.done?d:p,s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=d,r.method="throw",r.arg=s.arg)}}}(t,r,i),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(x){return{type:"throw",arg:x}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",d="completed",y={};function g(){}function v(){}function m(){}var w={};s(w,a,(function(){return this}));var b=Object.getPrototypeOf,_=b&&b(b(I([])));_&&_!==r&&n.call(_,a)&&(w=_);var E=m.prototype=g.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,a,i,c){var s=l(t[o],t,a);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"===typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(s.arg)}var o;this._invoke=function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}}function A(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}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 S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function I(t){if(t){var r=t[a];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:R}}function R(){return{value:e,done:!0}}return v.prototype=m,s(E,"constructor",m),s(m,"constructor",v),v.displayName=s(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,c,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},O(P.prototype),s(P.prototype,i,(function(){return this})),t.AsyncIterator=P,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new P(u(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(E),s(E,c,"Generator"),s(E,a,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=I,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):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),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(r){"object"===typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}(s);var u=s.exports,l=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function f(t){return"string"===typeof t&&l.test(t)}for(var p=[],h=0;h<256;++h)p.push((h+256).toString(16).substr(1));function d(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:case 3:return e^r^n;case 2:return e&r^e&n^r&n}}function y(t,e){return t<<e|t>>>32-e}var g=function(t,e,r){function n(t,n,o,a){if("string"===typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}(t)),"string"===typeof n&&(n=function(t){if(!f(t))throw TypeError("Invalid UUID");var e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=255&e,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=255&e,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=255&e,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=255&e,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=255&e,r}(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var i=new Uint8Array(16+t.length);if(i.set(n),i.set(t,n.length),(i=r(i))[6]=15&i[6]|e,i[8]=63&i[8]|128,o){a=a||0;for(var c=0;c<16;++c)o[a+c]=i[c];return o}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(p[t[e+0]]+p[t[e+1]]+p[t[e+2]]+p[t[e+3]]+"-"+p[t[e+4]]+p[t[e+5]]+"-"+p[t[e+6]]+p[t[e+7]]+"-"+p[t[e+8]]+p[t[e+9]]+"-"+p[t[e+10]]+p[t[e+11]]+p[t[e+12]]+p[t[e+13]]+p[t[e+14]]+p[t[e+15]]).toLowerCase();if(!f(r))throw TypeError("Stringified UUID is invalid");return r}(i)}try{n.name=t}catch(o){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}("v5",80,(function(t){var e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"===typeof t){var n=unescape(encodeURIComponent(t));t=[];for(var o=0;o<n.length;++o)t.push(n.charCodeAt(o))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var a=t.length/4+2,i=Math.ceil(a/16),c=new Array(i),s=0;s<i;++s){for(var u=new Uint32Array(16),l=0;l<16;++l)u[l]=t[64*s+4*l]<<24|t[64*s+4*l+1]<<16|t[64*s+4*l+2]<<8|t[64*s+4*l+3];c[s]=u}c[i-1][14]=8*(t.length-1)/Math.pow(2,32),c[i-1][14]=Math.floor(c[i-1][14]),c[i-1][15]=8*(t.length-1)&4294967295;for(var f=0;f<i;++f){for(var p=new Uint32Array(80),h=0;h<16;++h)p[h]=c[f][h];for(var g=16;g<80;++g)p[g]=y(p[g-3]^p[g-8]^p[g-14]^p[g-16],1);for(var v=r[0],m=r[1],w=r[2],b=r[3],_=r[4],E=0;E<80;++E){var O=Math.floor(E/20),P=y(v,5)+d(O,m,w,b)+_+e[O]+p[E]>>>0;_=b,b=w,w=y(m,30)>>>0,m=v,v=P}r[0]=r[0]+v>>>0,r[1]=r[1]+m>>>0,r[2]=r[2]+w>>>0,r[3]=r[3]+b>>>0,r[4]=r[4]+_>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]})),v=g,m="9ad1c8c2-539a-4d52-9640-4f59254ba745",w=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.place_details,n=t.geometry;return e(e(e({locationId:t.id,locationType:null,street:"",city:"",postCode:"",country:"",countryCode:"",locationName:t.name||"",establishmentType:t.types||[],addressType:""},"object"===typeof n&&{longitude:n.location?n.location.lng():"",latitude:n.location?n.location.lat():""}),r&&"object"===typeof r&&{phoneNo:r.international_phone_number||"",openingHours:r.opening_hours||null,website:r.website||"",formattedAddress:r.formatted_address}),{},{businessStatus:t.business_status,placeId:t.place_id})},b=i((function t(){var r=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,t),this.initializeGooglePlacesService=function(){return new Promise((function(t,e){var n=r.serviceParameters.apiKey,o=document.createElement("script");o.src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&key=".concat(n,"&callback=Function.prototype"),o.addEventListener("load",(function(){return t(window.google)})),o.addEventListener("error",(function(t){return e(t)})),document.head.appendChild(o)})).then((function(){var t=document.createElement("div");t.setAttribute("id","googlePlacesMap"),document.body.appendChild(t);var e=new window.google.maps.Map(document.getElementById("googlePlacesMap"),{center:{lat:53.5584898,lng:9.7873983},zoom:13});return new window.google.maps.places.PlacesService(e)}))},this.searchPlaces=function(){var t=n(u.mark((function t(n){var o,a,i,c,s,l,f,p,h,d;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.placesServicePromise;case 2:return o=t.sent,a=n.searchQuery,i=n.latitude,c=n.longitude,s=n.viewport,l=n.placeTypes,f=void 0===l?[]:l,p=n.locationRadius,h=void 0===p?3e4:p,d=s?new window.google.maps.LatLngBounds({lat:s.southwest.latitude,lng:s.southwest.longitude},{lat:s.northeast.latitude,lng:s.northeast.longitude}):null,t.abrupt("return",new Promise((function(t,n){var u=a?function(t,e){return o.textSearch(t,e)}:function(t,e){return o.nearbySearch(t,e)};u(e(e(e(e({},!!a&&{query:a}),!!s&&{location:{lat:i,lng:c}}),s?{bounds:d}:{radius:h}),{},{type:f}),(function(e,o){if(o===window.google.maps.places.PlacesServiceStatus.OK||o===window.google.maps.places.PlacesServiceStatus.ZERO_RESULTS)if(o!==window.google.maps.places.PlacesServiceStatus.ZERO_RESULTS){var a=e.map((function(t){var e="".concat(t.geometry.location.lng()).concat(t.geometry.location.lat());return t.id="".concat(v(e,m),"--").concat(v(t.place_id,m)),t})).slice(0,10);Promise.all(a.map((function(t){return r.getPlaceDetails(t.id,t.place_id,["formatted_address","international_phone_number","opening_hours","utc_offset_minutes","types","place_id","website"])}))).then((function(e){var r=a.map((function(t){var r=e.find((function(e){return e.id===t.id}));return t.place_details=r.placeDetails,t}));t(r)})).catch((function(t){n(t)}))}else t([]);else n(o)}))})).catch((function(t){return{status:t}})).then((function(t){return{googlePlaceDTOs:t.map((function(t){return w(t)}))}})));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.getPlaceDetails=function(){var t=n(u.mark((function t(e,n){var o,a,i=arguments;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=i.length>2&&void 0!==i[2]?i[2]:[],t.next=3,r.placesServicePromise;case 3:return a=t.sent,t.abrupt("return",new Promise((function(t,e){a.getDetails({placeId:n,fields:o},(function(r,n){return n===window.google.maps.places.PlacesServiceStatus.OK&&r?t(r):e(n)}))})).then((function(t){return{id:e,placeDetails:t}})).catch((function(t){return{id:e,placeDetails:null}})));case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),this.serviceParameters=e({},a),this.placesServicePromise=this.initializeGooglePlacesService(),{searchPlaces:this.searchPlaces,getPlaceDetails:this.getPlaceDetails}})),_={ACCOUNTING:"accounting",AIRPORT:"airport",ATM:"atm",BANK:"bank",BICYCLE_STORE:"bicycle_store",BUS_STATION:"bus_station",CAR_DEALER:"car_dealer",CAR_RENTAL:"car_rental",CAR_REPAIR:"car_repair",CAR_WASH:"car_wash",CEMETERY:"cemetery",CITY_HALL:"city_hall",COURTHOUSE:"courthouse",DOCTOR:"doctor",DRUGSTORE:"drugstore",ELECTRICIAN:"electrician",FUNERAL_HOME:"funeral_home",GAS_STATION:"gas_station",HOSPITAL:"hospital",INSURANCE_AGENCY:"insurance_agency",LAWYER:"lawyer",LIGHT_RAIL_STATION:"light_rail_station",LOCAL_GOVERNMENT_OFFICE:"local_government_office",LOCKSMITH:"locksmith",LODGING:"lodging",MOVING_COMPANY:"moving_company",PARKING:"parking",PHARMACY:"pharmacy",PHYSIOTHERAPIST:"physiotherapist",PLUMBER:"plumber",POLICE:"police",POST_OFFICE:"post_office",RV_PARK:"rv_park",STORAGE:"storage",STORE:"store",SUBWAY_STATION:"subway_station",TAXI_STAND:"taxi_stand",TRAIN_STATION:"train_station",TRANSIT_STATION:"transit_station",VETERINARY_CARE:"veterinary_care"};export{b as GooglePlacesClient,_ as placeTypes};
function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(){r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(I){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:E(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(I){return{type:"throw",arg:I}}}t.wrap=l;var p={};function h(){}function d(){}function v(){}var y={};s(y,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&n.call(m,a)&&(y=m);var w=v.prototype=h.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=O(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function O(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function P(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 S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:d,configurable:!0}),d.displayName=s(v,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,s(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,c,(function(){return this})),t.AsyncIterator=_,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new _(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(w),s(w,u,"Generator"),s(w,a,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},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),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function n(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,u,"next",t)}function u(t){n(a,o,i,c,u,"throw",t)}c(void 0)}))}}function i(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,u(n.key),n)}}function a(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t,e,r){return(e=u(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t){var e=function(t,e){if("object"!==typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===typeof e?e:String(e)}var s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function l(t){return"string"===typeof t&&s.test(t)}for(var f=[],p=0;p<256;++p)f.push((p+256).toString(16).substr(1));var h="6ba7b810-9dad-11d1-80b4-00c04fd430c8",d="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function v(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:case 3:return e^r^n;case 2:return e&r^e&n^r&n}}function y(t,e){return t<<e|t>>>32-e}var g=function(t,e,r){function n(t,n,o,i){if("string"===typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}(t)),"string"===typeof n&&(n=function(t){if(!l(t))throw TypeError("Invalid UUID");var e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=255&e,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=255&e,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=255&e,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=255&e,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=255&e,r}(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var a=new Uint8Array(16+t.length);if(a.set(n),a.set(t,n.length),(a=r(a))[6]=15&a[6]|e,a[8]=63&a[8]|128,o){i=i||0;for(var c=0;c<16;++c)o[i+c]=a[c];return o}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(f[t[e+0]]+f[t[e+1]]+f[t[e+2]]+f[t[e+3]]+"-"+f[t[e+4]]+f[t[e+5]]+"-"+f[t[e+6]]+f[t[e+7]]+"-"+f[t[e+8]]+f[t[e+9]]+"-"+f[t[e+10]]+f[t[e+11]]+f[t[e+12]]+f[t[e+13]]+f[t[e+14]]+f[t[e+15]]).toLowerCase();if(!l(r))throw TypeError("Stringified UUID is invalid");return r}(a)}try{n.name=t}catch(o){}return n.DNS=h,n.URL=d,n}("v5",80,(function(t){var e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"===typeof t){var n=unescape(encodeURIComponent(t));t=[];for(var o=0;o<n.length;++o)t.push(n.charCodeAt(o))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var i=t.length/4+2,a=Math.ceil(i/16),c=new Array(a),u=0;u<a;++u){for(var s=new Uint32Array(16),l=0;l<16;++l)s[l]=t[64*u+4*l]<<24|t[64*u+4*l+1]<<16|t[64*u+4*l+2]<<8|t[64*u+4*l+3];c[u]=s}c[a-1][14]=8*(t.length-1)/Math.pow(2,32),c[a-1][14]=Math.floor(c[a-1][14]),c[a-1][15]=8*(t.length-1)&4294967295;for(var f=0;f<a;++f){for(var p=new Uint32Array(80),h=0;h<16;++h)p[h]=c[f][h];for(var d=16;d<80;++d)p[d]=y(p[d-3]^p[d-8]^p[d-14]^p[d-16],1);for(var g=r[0],m=r[1],w=r[2],b=r[3],_=r[4],E=0;E<80;++E){var O=Math.floor(E/20),P=y(g,5)+v(O,m,w,b)+_+e[O]+p[E]>>>0;_=b,b=w,w=y(m,30)>>>0,m=g,g=P}r[0]=r[0]+g>>>0,r[1]=r[1]+m>>>0,r[2]=r[2]+w>>>0,r[3]=r[3]+b>>>0,r[4]=r[4]+_>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]})),m=g,w="9ad1c8c2-539a-4d52-9640-4f59254ba745",b=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.place_details,n=t.geometry;return e(e(e({locationId:t.id,locationType:null,street:"",city:"",postCode:"",country:"",countryCode:"",locationName:t.name||"",establishmentType:t.types||[],addressType:""},"object"===typeof n&&{longitude:n.location?n.location.lng():"",latitude:n.location?n.location.lat():""}),r&&"object"===typeof r&&{phoneNo:r.international_phone_number||"",openingHours:r.opening_hours||null,website:r.website||"",formattedAddress:r.formatted_address}),{},{businessStatus:t.business_status,placeId:t.place_id})},_=a((function t(){var n=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.initializeGooglePlacesService=function(){return new Promise((function(t,e){var r=n.serviceParameters.apiKey,o=document.createElement("script");o.src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&key=".concat(r,"&callback=Function.prototype"),o.addEventListener("load",(function(){return t(window.google)})),o.addEventListener("error",(function(t){return e(t)})),document.head.appendChild(o)})).then((function(){var t=document.createElement("div");t.setAttribute("id","googlePlacesMap"),document.body.appendChild(t);var e=new window.google.maps.Map(document.getElementById("googlePlacesMap"),{center:{lat:53.5584898,lng:9.7873983},zoom:13});return new window.google.maps.places.PlacesService(e)}))},this.searchPlaces=function(){var t=o(r().mark((function t(o){var i,a,c,u,s,l,f,p,h,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.placesServicePromise;case 2:return i=t.sent,a=o.searchQuery,c=o.latitude,u=o.longitude,s=o.viewport,l=o.placeTypes,f=void 0===l?[]:l,p=o.locationRadius,h=void 0===p?3e4:p,d=s?new window.google.maps.LatLngBounds({lat:s.southwest.latitude,lng:s.southwest.longitude},{lat:s.northeast.latitude,lng:s.northeast.longitude}):null,t.abrupt("return",new Promise((function(t,r){var o=a?function(t,e){return i.textSearch(t,e)}:function(t,e){return i.nearbySearch(t,e)};o(e(e(e(e({},!!a&&{query:a}),!!s&&{location:{lat:c,lng:u}}),s?{bounds:d}:{radius:h}),{},{type:f}),(function(e,o){if(o===window.google.maps.places.PlacesServiceStatus.OK||o===window.google.maps.places.PlacesServiceStatus.ZERO_RESULTS)if(o!==window.google.maps.places.PlacesServiceStatus.ZERO_RESULTS){var i=e.map((function(t){var e="".concat(t.geometry.location.lng()).concat(t.geometry.location.lat());return t.id="".concat(m(e,w),"--").concat(m(t.place_id,w)),t})).slice(0,10);Promise.all(i.map((function(t){return n.getPlaceDetails(t.id,t.place_id,["formatted_address","international_phone_number","opening_hours","utc_offset_minutes","types","place_id","website"])}))).then((function(e){var r=i.map((function(t){var r=e.find((function(e){return e.id===t.id}));return t.place_details=r.placeDetails,t}));t(r)})).catch((function(t){r(t)}))}else t([]);else r(o)}))})).catch((function(t){return{status:t}})).then((function(t){return{googlePlaceDTOs:t.map((function(t){return b(t)}))}})));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.getPlaceDetails=function(){var t=o(r().mark((function t(e,o){var i,a,c=arguments;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=c.length>2&&void 0!==c[2]?c[2]:[],t.next=3,n.placesServicePromise;case 3:return a=t.sent,t.abrupt("return",new Promise((function(t,e){a.getDetails({placeId:o,fields:i},(function(r,n){return n===window.google.maps.places.PlacesServiceStatus.OK&&r?t(r):e(n)}))})).then((function(t){return{id:e,placeDetails:t}})).catch((function(t){return{id:e,placeDetails:null}})));case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),this.serviceParameters=e({},i),this.placesServicePromise=this.initializeGooglePlacesService(),{searchPlaces:this.searchPlaces,getPlaceDetails:this.getPlaceDetails}})),E={ACCOUNTING:"accounting",AIRPORT:"airport",ATM:"atm",BANK:"bank",BICYCLE_STORE:"bicycle_store",BUS_STATION:"bus_station",CAR_DEALER:"car_dealer",CAR_RENTAL:"car_rental",CAR_REPAIR:"car_repair",CAR_WASH:"car_wash",CEMETERY:"cemetery",CITY_HALL:"city_hall",COURTHOUSE:"courthouse",DOCTOR:"doctor",DRUGSTORE:"drugstore",ELECTRICIAN:"electrician",FUNERAL_HOME:"funeral_home",GAS_STATION:"gas_station",HOSPITAL:"hospital",INSURANCE_AGENCY:"insurance_agency",LAWYER:"lawyer",LIGHT_RAIL_STATION:"light_rail_station",LOCAL_GOVERNMENT_OFFICE:"local_government_office",LOCKSMITH:"locksmith",LODGING:"lodging",MOVING_COMPANY:"moving_company",PARKING:"parking",PHARMACY:"pharmacy",PHYSIOTHERAPIST:"physiotherapist",PLUMBER:"plumber",POLICE:"police",POST_OFFICE:"post_office",RV_PARK:"rv_park",STORAGE:"storage",STORE:"store",SUBWAY_STATION:"subway_station",TAXI_STAND:"taxi_stand",TRAIN_STATION:"train_station",TRANSIT_STATION:"transit_station",VETERINARY_CARE:"veterinary_care"};export{_ as GooglePlacesClient,E as placeTypes};
//# sourceMappingURL=index.esm.js.map

@@ -1,2 +0,2 @@

"use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(t,e,r,n,o,a,i){try{var c=t[a](i),s=c.value}catch(u){return void r(u)}c.done?e(s):Promise.resolve(s).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,a){var i=t.apply(e,n);function c(t){r(i,o,a,c,s,"next",t)}function s(t){r(i,o,a,c,s,"throw",t)}c(void 0)}))}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(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 i(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Object.defineProperty(exports,"__esModule",{value:!0});var s={exports:{}};!function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(x){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),i=new L(n||[]);return a._invoke=function(t,e,r){var n=f;return function(o,a){if(n===h)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw a;return R()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=T(i,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var s=l(t,e,r);if("normal"===s.type){if(n=r.done?d:p,s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=d,r.method="throw",r.arg=s.arg)}}}(t,r,i),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(x){return{type:"throw",arg:x}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",d="completed",y={};function g(){}function v(){}function m(){}var w={};s(w,a,(function(){return this}));var b=Object.getPrototypeOf,_=b&&b(b(I([])));_&&_!==r&&n.call(_,a)&&(w=_);var E=m.prototype=g.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,a,i,c){var s=l(t[o],t,a);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"===typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(s.arg)}var o;this._invoke=function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}}function T(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function A(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 S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function I(t){if(t){var r=t[a];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:R}}function R(){return{value:e,done:!0}}return v.prototype=m,s(E,"constructor",m),s(m,"constructor",v),v.displayName=s(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,c,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},O(P.prototype),s(P.prototype,i,(function(){return this})),t.AsyncIterator=P,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new P(u(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(E),s(E,c,"Generator"),s(E,a,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=I,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):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),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(r){"object"===typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}(s);var u=s.exports,l=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function f(t){return"string"===typeof t&&l.test(t)}for(var p=[],h=0;h<256;++h)p.push((h+256).toString(16).substr(1));function d(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:case 3:return e^r^n;case 2:return e&r^e&n^r&n}}function y(t,e){return t<<e|t>>>32-e}var g=function(t,e,r){function n(t,n,o,a){if("string"===typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}(t)),"string"===typeof n&&(n=function(t){if(!f(t))throw TypeError("Invalid UUID");var e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=255&e,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=255&e,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=255&e,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=255&e,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=255&e,r}(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var i=new Uint8Array(16+t.length);if(i.set(n),i.set(t,n.length),(i=r(i))[6]=15&i[6]|e,i[8]=63&i[8]|128,o){a=a||0;for(var c=0;c<16;++c)o[a+c]=i[c];return o}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(p[t[e+0]]+p[t[e+1]]+p[t[e+2]]+p[t[e+3]]+"-"+p[t[e+4]]+p[t[e+5]]+"-"+p[t[e+6]]+p[t[e+7]]+"-"+p[t[e+8]]+p[t[e+9]]+"-"+p[t[e+10]]+p[t[e+11]]+p[t[e+12]]+p[t[e+13]]+p[t[e+14]]+p[t[e+15]]).toLowerCase();if(!f(r))throw TypeError("Stringified UUID is invalid");return r}(i)}try{n.name=t}catch(o){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}("v5",80,(function(t){var e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"===typeof t){var n=unescape(encodeURIComponent(t));t=[];for(var o=0;o<n.length;++o)t.push(n.charCodeAt(o))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var a=t.length/4+2,i=Math.ceil(a/16),c=new Array(i),s=0;s<i;++s){for(var u=new Uint32Array(16),l=0;l<16;++l)u[l]=t[64*s+4*l]<<24|t[64*s+4*l+1]<<16|t[64*s+4*l+2]<<8|t[64*s+4*l+3];c[s]=u}c[i-1][14]=8*(t.length-1)/Math.pow(2,32),c[i-1][14]=Math.floor(c[i-1][14]),c[i-1][15]=8*(t.length-1)&4294967295;for(var f=0;f<i;++f){for(var p=new Uint32Array(80),h=0;h<16;++h)p[h]=c[f][h];for(var g=16;g<80;++g)p[g]=y(p[g-3]^p[g-8]^p[g-14]^p[g-16],1);for(var v=r[0],m=r[1],w=r[2],b=r[3],_=r[4],E=0;E<80;++E){var O=Math.floor(E/20),P=y(v,5)+d(O,m,w,b)+_+e[O]+p[E]>>>0;_=b,b=w,w=y(m,30)>>>0,m=v,v=P}r[0]=r[0]+v>>>0,r[1]=r[1]+m>>>0,r[2]=r[2]+w>>>0,r[3]=r[3]+b>>>0,r[4]=r[4]+_>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]})),v=g,m="9ad1c8c2-539a-4d52-9640-4f59254ba745",w=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.place_details,n=t.geometry;return e(e(e({locationId:t.id,locationType:null,street:"",city:"",postCode:"",country:"",countryCode:"",locationName:t.name||"",establishmentType:t.types||[],addressType:""},"object"===typeof n&&{longitude:n.location?n.location.lng():"",latitude:n.location?n.location.lat():""}),r&&"object"===typeof r&&{phoneNo:r.international_phone_number||"",openingHours:r.opening_hours||null,website:r.website||"",formattedAddress:r.formatted_address}),{},{businessStatus:t.business_status,placeId:t.place_id})},b=i((function t(){var r=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,t),this.initializeGooglePlacesService=function(){return new Promise((function(t,e){var n=r.serviceParameters.apiKey,o=document.createElement("script");o.src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&key=".concat(n,"&callback=Function.prototype"),o.addEventListener("load",(function(){return t(window.google)})),o.addEventListener("error",(function(t){return e(t)})),document.head.appendChild(o)})).then((function(){var t=document.createElement("div");t.setAttribute("id","googlePlacesMap"),document.body.appendChild(t);var e=new window.google.maps.Map(document.getElementById("googlePlacesMap"),{center:{lat:53.5584898,lng:9.7873983},zoom:13});return new window.google.maps.places.PlacesService(e)}))},this.searchPlaces=function(){var t=n(u.mark((function t(n){var o,a,i,c,s,l,f,p,h,d;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.placesServicePromise;case 2:return o=t.sent,a=n.searchQuery,i=n.latitude,c=n.longitude,s=n.viewport,l=n.placeTypes,f=void 0===l?[]:l,p=n.locationRadius,h=void 0===p?3e4:p,d=s?new window.google.maps.LatLngBounds({lat:s.southwest.latitude,lng:s.southwest.longitude},{lat:s.northeast.latitude,lng:s.northeast.longitude}):null,t.abrupt("return",new Promise((function(t,n){var u=a?function(t,e){return o.textSearch(t,e)}:function(t,e){return o.nearbySearch(t,e)};u(e(e(e(e({},!!a&&{query:a}),!!s&&{location:{lat:i,lng:c}}),s?{bounds:d}:{radius:h}),{},{type:f}),(function(e,o){if(o===window.google.maps.places.PlacesServiceStatus.OK||o===window.google.maps.places.PlacesServiceStatus.ZERO_RESULTS)if(o!==window.google.maps.places.PlacesServiceStatus.ZERO_RESULTS){var a=e.map((function(t){var e="".concat(t.geometry.location.lng()).concat(t.geometry.location.lat());return t.id="".concat(v(e,m),"--").concat(v(t.place_id,m)),t})).slice(0,10);Promise.all(a.map((function(t){return r.getPlaceDetails(t.id,t.place_id,["formatted_address","international_phone_number","opening_hours","utc_offset_minutes","types","place_id","website"])}))).then((function(e){var r=a.map((function(t){var r=e.find((function(e){return e.id===t.id}));return t.place_details=r.placeDetails,t}));t(r)})).catch((function(t){n(t)}))}else t([]);else n(o)}))})).catch((function(t){return{status:t}})).then((function(t){return{googlePlaceDTOs:t.map((function(t){return w(t)}))}})));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.getPlaceDetails=function(){var t=n(u.mark((function t(e,n){var o,a,i=arguments;return u.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=i.length>2&&void 0!==i[2]?i[2]:[],t.next=3,r.placesServicePromise;case 3:return a=t.sent,t.abrupt("return",new Promise((function(t,e){a.getDetails({placeId:n,fields:o},(function(r,n){return n===window.google.maps.places.PlacesServiceStatus.OK&&r?t(r):e(n)}))})).then((function(t){return{id:e,placeDetails:t}})).catch((function(t){return{id:e,placeDetails:null}})));case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),this.serviceParameters=e({},a),this.placesServicePromise=this.initializeGooglePlacesService(),{searchPlaces:this.searchPlaces,getPlaceDetails:this.getPlaceDetails}}));exports.GooglePlacesClient=b,exports.placeTypes={ACCOUNTING:"accounting",AIRPORT:"airport",ATM:"atm",BANK:"bank",BICYCLE_STORE:"bicycle_store",BUS_STATION:"bus_station",CAR_DEALER:"car_dealer",CAR_RENTAL:"car_rental",CAR_REPAIR:"car_repair",CAR_WASH:"car_wash",CEMETERY:"cemetery",CITY_HALL:"city_hall",COURTHOUSE:"courthouse",DOCTOR:"doctor",DRUGSTORE:"drugstore",ELECTRICIAN:"electrician",FUNERAL_HOME:"funeral_home",GAS_STATION:"gas_station",HOSPITAL:"hospital",INSURANCE_AGENCY:"insurance_agency",LAWYER:"lawyer",LIGHT_RAIL_STATION:"light_rail_station",LOCAL_GOVERNMENT_OFFICE:"local_government_office",LOCKSMITH:"locksmith",LODGING:"lodging",MOVING_COMPANY:"moving_company",PARKING:"parking",PHARMACY:"pharmacy",PHYSIOTHERAPIST:"physiotherapist",PLUMBER:"plumber",POLICE:"police",POST_OFFICE:"post_office",RV_PARK:"rv_park",STORAGE:"storage",STORE:"store",SUBWAY_STATION:"subway_station",TAXI_STAND:"taxi_stand",TRAIN_STATION:"train_station",TRANSIT_STATION:"transit_station",VETERINARY_CARE:"veterinary_care"};
"use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(){r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(I){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:O(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(I){return{type:"throw",arg:I}}}t.wrap=l;var p={};function h(){}function d(){}function v(){}var y={};s(y,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&n.call(m,a)&&(y=m);var w=v.prototype=h.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function P(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 S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:d,configurable:!0}),d.displayName=s(v,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,s(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},b(_.prototype),s(_.prototype,c,(function(){return this})),t.AsyncIterator=_,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new _(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(w),s(w,u,"Generator"),s(w,a,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},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),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function n(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,u,"next",t)}function u(t){n(a,o,i,c,u,"throw",t)}c(void 0)}))}}function i(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,u(n.key),n)}}function a(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t,e,r){return(e=u(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t){var e=function(t,e){if("object"!==typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===typeof e?e:String(e)}Object.defineProperty(exports,"__esModule",{value:!0});var s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function l(t){return"string"===typeof t&&s.test(t)}for(var f=[],p=0;p<256;++p)f.push((p+256).toString(16).substr(1));var h="6ba7b810-9dad-11d1-80b4-00c04fd430c8",d="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function v(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:case 3:return e^r^n;case 2:return e&r^e&n^r&n}}function y(t,e){return t<<e|t>>>32-e}var g=function(t,e,r){function n(t,n,o,i){if("string"===typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}(t)),"string"===typeof n&&(n=function(t){if(!l(t))throw TypeError("Invalid UUID");var e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=255&e,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=255&e,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=255&e,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=255&e,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=255&e,r}(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var a=new Uint8Array(16+t.length);if(a.set(n),a.set(t,n.length),(a=r(a))[6]=15&a[6]|e,a[8]=63&a[8]|128,o){i=i||0;for(var c=0;c<16;++c)o[i+c]=a[c];return o}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(f[t[e+0]]+f[t[e+1]]+f[t[e+2]]+f[t[e+3]]+"-"+f[t[e+4]]+f[t[e+5]]+"-"+f[t[e+6]]+f[t[e+7]]+"-"+f[t[e+8]]+f[t[e+9]]+"-"+f[t[e+10]]+f[t[e+11]]+f[t[e+12]]+f[t[e+13]]+f[t[e+14]]+f[t[e+15]]).toLowerCase();if(!l(r))throw TypeError("Stringified UUID is invalid");return r}(a)}try{n.name=t}catch(o){}return n.DNS=h,n.URL=d,n}("v5",80,(function(t){var e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"===typeof t){var n=unescape(encodeURIComponent(t));t=[];for(var o=0;o<n.length;++o)t.push(n.charCodeAt(o))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var i=t.length/4+2,a=Math.ceil(i/16),c=new Array(a),u=0;u<a;++u){for(var s=new Uint32Array(16),l=0;l<16;++l)s[l]=t[64*u+4*l]<<24|t[64*u+4*l+1]<<16|t[64*u+4*l+2]<<8|t[64*u+4*l+3];c[u]=s}c[a-1][14]=8*(t.length-1)/Math.pow(2,32),c[a-1][14]=Math.floor(c[a-1][14]),c[a-1][15]=8*(t.length-1)&4294967295;for(var f=0;f<a;++f){for(var p=new Uint32Array(80),h=0;h<16;++h)p[h]=c[f][h];for(var d=16;d<80;++d)p[d]=y(p[d-3]^p[d-8]^p[d-14]^p[d-16],1);for(var g=r[0],m=r[1],w=r[2],b=r[3],_=r[4],O=0;O<80;++O){var E=Math.floor(O/20),P=y(g,5)+v(E,m,w,b)+_+e[E]+p[O]>>>0;_=b,b=w,w=y(m,30)>>>0,m=g,g=P}r[0]=r[0]+g>>>0,r[1]=r[1]+m>>>0,r[2]=r[2]+w>>>0,r[3]=r[3]+b>>>0,r[4]=r[4]+_>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]})),m=g,w="9ad1c8c2-539a-4d52-9640-4f59254ba745",b=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.place_details,n=t.geometry;return e(e(e({locationId:t.id,locationType:null,street:"",city:"",postCode:"",country:"",countryCode:"",locationName:t.name||"",establishmentType:t.types||[],addressType:""},"object"===typeof n&&{longitude:n.location?n.location.lng():"",latitude:n.location?n.location.lat():""}),r&&"object"===typeof r&&{phoneNo:r.international_phone_number||"",openingHours:r.opening_hours||null,website:r.website||"",formattedAddress:r.formatted_address}),{},{businessStatus:t.business_status,placeId:t.place_id})},_=a((function t(){var n=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.initializeGooglePlacesService=function(){return new Promise((function(t,e){var r=n.serviceParameters.apiKey,o=document.createElement("script");o.src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&key=".concat(r,"&callback=Function.prototype"),o.addEventListener("load",(function(){return t(window.google)})),o.addEventListener("error",(function(t){return e(t)})),document.head.appendChild(o)})).then((function(){var t=document.createElement("div");t.setAttribute("id","googlePlacesMap"),document.body.appendChild(t);var e=new window.google.maps.Map(document.getElementById("googlePlacesMap"),{center:{lat:53.5584898,lng:9.7873983},zoom:13});return new window.google.maps.places.PlacesService(e)}))},this.searchPlaces=function(){var t=o(r().mark((function t(o){var i,a,c,u,s,l,f,p,h,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.placesServicePromise;case 2:return i=t.sent,a=o.searchQuery,c=o.latitude,u=o.longitude,s=o.viewport,l=o.placeTypes,f=void 0===l?[]:l,p=o.locationRadius,h=void 0===p?3e4:p,d=s?new window.google.maps.LatLngBounds({lat:s.southwest.latitude,lng:s.southwest.longitude},{lat:s.northeast.latitude,lng:s.northeast.longitude}):null,t.abrupt("return",new Promise((function(t,r){var o=a?function(t,e){return i.textSearch(t,e)}:function(t,e){return i.nearbySearch(t,e)};o(e(e(e(e({},!!a&&{query:a}),!!s&&{location:{lat:c,lng:u}}),s?{bounds:d}:{radius:h}),{},{type:f}),(function(e,o){if(o===window.google.maps.places.PlacesServiceStatus.OK||o===window.google.maps.places.PlacesServiceStatus.ZERO_RESULTS)if(o!==window.google.maps.places.PlacesServiceStatus.ZERO_RESULTS){var i=e.map((function(t){var e="".concat(t.geometry.location.lng()).concat(t.geometry.location.lat());return t.id="".concat(m(e,w),"--").concat(m(t.place_id,w)),t})).slice(0,10);Promise.all(i.map((function(t){return n.getPlaceDetails(t.id,t.place_id,["formatted_address","international_phone_number","opening_hours","utc_offset_minutes","types","place_id","website"])}))).then((function(e){var r=i.map((function(t){var r=e.find((function(e){return e.id===t.id}));return t.place_details=r.placeDetails,t}));t(r)})).catch((function(t){r(t)}))}else t([]);else r(o)}))})).catch((function(t){return{status:t}})).then((function(t){return{googlePlaceDTOs:t.map((function(t){return b(t)}))}})));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.getPlaceDetails=function(){var t=o(r().mark((function t(e,o){var i,a,c=arguments;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=c.length>2&&void 0!==c[2]?c[2]:[],t.next=3,n.placesServicePromise;case 3:return a=t.sent,t.abrupt("return",new Promise((function(t,e){a.getDetails({placeId:o,fields:i},(function(r,n){return n===window.google.maps.places.PlacesServiceStatus.OK&&r?t(r):e(n)}))})).then((function(t){return{id:e,placeDetails:t}})).catch((function(t){return{id:e,placeDetails:null}})));case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),this.serviceParameters=e({},i),this.placesServicePromise=this.initializeGooglePlacesService(),{searchPlaces:this.searchPlaces,getPlaceDetails:this.getPlaceDetails}}));exports.GooglePlacesClient=_,exports.placeTypes={ACCOUNTING:"accounting",AIRPORT:"airport",ATM:"atm",BANK:"bank",BICYCLE_STORE:"bicycle_store",BUS_STATION:"bus_station",CAR_DEALER:"car_dealer",CAR_RENTAL:"car_rental",CAR_REPAIR:"car_repair",CAR_WASH:"car_wash",CEMETERY:"cemetery",CITY_HALL:"city_hall",COURTHOUSE:"courthouse",DOCTOR:"doctor",DRUGSTORE:"drugstore",ELECTRICIAN:"electrician",FUNERAL_HOME:"funeral_home",GAS_STATION:"gas_station",HOSPITAL:"hospital",INSURANCE_AGENCY:"insurance_agency",LAWYER:"lawyer",LIGHT_RAIL_STATION:"light_rail_station",LOCAL_GOVERNMENT_OFFICE:"local_government_office",LOCKSMITH:"locksmith",LODGING:"lodging",MOVING_COMPANY:"moving_company",PARKING:"parking",PHARMACY:"pharmacy",PHYSIOTHERAPIST:"physiotherapist",PLUMBER:"plumber",POLICE:"police",POST_OFFICE:"post_office",RV_PARK:"rv_park",STORAGE:"storage",STORE:"store",SUBWAY_STATION:"subway_station",TAXI_STAND:"taxi_stand",TRAIN_STATION:"train_station",TRANSIT_STATION:"transit_station",VETERINARY_CARE:"veterinary_care"};
//# sourceMappingURL=index.js.map
{
"name": "@ace-de/eua-google-places-client",
"version": "1.7.2",
"version": "1.7.3",
"description": "EUA Google Places client",

@@ -33,3 +33,3 @@ "author": "Computer Rock",

},
"gitHead": "d16468aeccf7dfd4606e9560441b4d3fb0b24b45"
"gitHead": "a7b1bb48d52bb72c0f9cea2b32bb7e138890debd"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc