
/* Smart UI v9.1.69 (2021-03-15) 
Copyright (c) 2011-2021 jQWidgets. 
License: https://htmlelements.com/license/ */ //

!function(e){var t={};function r(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(a,o,function(t){return e[t]}.bind(null,o));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=75)}({75:function(e,t){Smart("smart-map",class extends Smart.BaseElement{static get properties(){return{apiKey:{type:"string",value:""},query:{type:"string",value:"sofia"},mode:{allowedTypes:["place","search","view","directions","streetview"],type:"string",value:"place"},mapType:{allowedTypes:["roadmap","satellite","hybrid","terrain"],value:"",type:"string"},heading:{type:"string",value:"210"},pitch:{type:"string",value:"10"},terrain:{type:"string",value:"terrain"},zoom:{type:"string",value:"12"}}}static get styleUrls(){return["smart.map.css"]}template(){return'<div id=mapId><iframe width="100%" height="100%" id="map"  mode=\'[[mode]]\' class="smart-map-container" api-key=\'apiKey\' map-type=\'[[mapType]]\' query=\'[[query]]\'  frameborder="0" alllowfullscreen  aria-hidden="false" tabindex="0"> </iframe></div>'}render(){const e=this;if("roadmap"===e.$.map.mapType||"satellite"===e.mapType)return e.$.map.src="https://www.google.com/maps/embed/v1/"+e.mode+"?key="+e.apiKey+"&maptype="+e.mapType+"&q="+e.query,void super.render();if("streetview"===e.$.map.mode){const t=e.query;let r,a;window.initMap=function(){(new google.maps.Geocoder).geocode({address:t},(function(t,o){return o===google.maps.GeocoderStatus.OK?(r=t[0].geometry.location.lat(),a=t[0].geometry.location.lng()):console.error("Loading the map was not successful for the following reason: "+o),e.$.map.src="https://www.google.com/maps/embed/v1/"+e.mode+"?key="+e.apiKey+"&location="+r+","+a+"&heading="+e.heading+"&pitch="+e.pitch+"&fov=35"}))};const o=document.createElement("script");o.type="text/javascript",o.src="https://maps.googleapis.com/maps/api/js?key="+e.apiKey+"&callback=initMap&libraries=&v=weekly",o.defer=!0,document.body.appendChild(o)}if("terrain"===e.$.map.mapType){const o=e.query;var t,r,a;if(window.initTerrainMap=function(){(new google.maps.Geocoder).geocode({address:o},(function(o,n){if(n===google.maps.GeocoderStatus.OK){t=o[0].geometry.location.lat(),r=o[0].geometry.location.lng(),a=new google.maps.LatLng(t,r);e.querySelectorAll(".smart-container").length;const n=new google.maps.Map(e.querySelectorAll(".smart-container")[0],{zoom:parseInt(e.zoom),center:a,mapTypeId:"terrain"});new google.maps.Marker({position:a,map:n})}else console.error("Loading the map was not successful for the following reason: "+n)}))},e.querySelectorAll(".smart-container").length<2){const t=document.createElement("script");t.type="text/javascript",t.src="https://maps.googleapis.com/maps/api/js?key="+e.apiKey+"&callback=initTerrainMap",t.defer=!0,document.head.appendChild(t)}}super.render()}propertyChangedHandler(e,t,r){super.propertyChangedHandler(e,t,r),this.render()}})}});