JS: google maps no-zoom param

This commit is contained in:
Tony Air 2020-02-18 03:29:28 +07:00
parent 52daee934e
commit 5136435b8f
8 changed files with 16 additions and 16 deletions

2
dist/js/app.js vendored

File diff suppressed because one or more lines are too long

2
dist/js/app.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
!function(e){var t={};function o(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/mnt/data/srv/dist/repositories/webpack-bootstrap-ui-kit/dist",o(o.s="./src/js/types/SilverShop.Page.CheckoutPageController.js")}({"./src/js/_components/_ui.map.api.js":function(e,t,o){"use strict";var n=o("jquery"),a=o.n(n),r=o("./src/js/_events.js"),i=o.n(r),s=(o("./src/scss/_components/_ui.map.scss"),o("./src/js/_consts.js"));function c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(e){var t="jsMapAPI",o=e("body"),n=s.a.MAP_DRIVER,a=window,r=function(){function r(a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var s=this,c=new n;s.$el=e(a);var l=s.$el,u=l.data();u.center=[u.lng?u.lng:o.data("default-lng"),u.lat?u.lat:o.data("default-lat")],u.style=u.style?jQuery.parseJSON(u.style):null,u["font-family"]=o.css("font-family"),console.log("".concat(t,": initializing ").concat(c.getName(),"...")),c.init(l,u),s.drv=c,l.on(i.a.MAPAPILOADED,(function(e){s.map=c.getMap(),u.geojson?(console.log("".concat(t,": setting up geocode data")),c.addGeoJson(u)):u.address?(console.log(u.address),console.log("".concat(t,": setting up address marker")),c.geocode(u.address,(function(e){console.log(e)}))):u.lat&&u.lng&&(console.log("".concat(t,": setting up single lat/lng marker")),u.icon||(u.icon='<i class="fas fa-map-marker-alt"></i>'),c.addMarker([u.lng,u.lat],u)),l.data("jsMapAPI",s),l.addClass("".concat(t,"-active")),l.trigger(i.a.MAPLOADED),console.log("".concat(t,": Map is loaded"))}))}var s,l,u;return s=r,u=[{key:"_jQueryInterface",value:function(){if("undefined"!==typeof a.localStorage)return this.each((function(){var t=e(this),o=t.data("jsMapAPI");o||(o=new r(this),t.data("jsMapAPI",o))}))}}],(l=[{key:"getMap",value:function(){return ui.map}},{key:"dispose",value:function(){this.$el=null,e.removeData(this.$el[0],"jsMapAPI"),this.$el.removeClass("".concat(t,"-active"))}}])&&c(s.prototype,l),u&&c(s,u),r}();e.fn[t]=r._jQueryInterface,e.fn[t].Constructor=r,e.fn[t].noConflict=function(){return e.fn[t]=JQUERY_NO_CONFLICT,r._jQueryInterface},e(a).on("".concat(i.a.AJAX," ").concat(i.a.LOADED),(function(){e(".mapAPI-map-container").jsMapAPI()}))}(a.a)},"./src/js/_consts.js":function(e,t,o){"use strict";var n=o("jquery"),a=o.n(n),r=o("./src/js/_events.js"),i=o.n(r);function s(e){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d={init:function(){return function(e){function t(e){var o,n,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=!(a=l(t).call(this))||"object"!==s(a)&&"function"!==typeof a?u(n):a;var r=u(o);return r.setMap(e.map),r.position=e.position,r.html=e.html?e.html:'<div class="mapboxgl-marker"><i class="marker-icon fas fa-map-marker-alt"></i></div>',r.divClass=e.divClass,r.align=e.align,r.isDebugMode=e.debug,r.onClick=e.onClick,r.onMouseOver=e.onMouseOver,r.isBoolean=function(e){return"boolean"===typeof e},r.isNotUndefined=function(e){return"undefined"!==typeof e},r.hasContent=function(e){return e.length>0},r.isString=function(e){return"string"===typeof e},r.isFunction=function(e){return"function"===typeof e},o}var o,n,a;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(t,google.maps.OverlayView),o=t,(n=[{key:"onAdd",value:function(){var e=this;e.div=document.createElement("div"),e.div.style.position="absolute",e.isNotUndefined(e.divClass)&&e.hasContent(e.divClass)&&(e.div.className=e.divClass),e.isNotUndefined(e.html)&&e.hasContent(e.html)&&e.isString(e.html)&&(e.div.innerHTML=e.html),e.isBoolean(e.isDebugMode)&&e.isDebugMode&&(e.div.className="debug-mode",e.div.innerHTML='<div style="height: 10px; width: 10px; background: red; border-radius: 100%;"></div><div style="position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;">Debug mode</div>',e.div.setAttribute("style","position: absolute;border: 5px dashed red;height: 150px;width: 150px;display: flex;justify-content: center;align-items: center;")),e.getPanes().overlayMouseTarget.appendChild(e.div),google.maps.event.addDomListener(e.div,"click",(function(t){google.maps.event.trigger(e,"click"),e.isFunction(e.onClick)&&e.onClick(),t.stopPropagation()})),google.maps.event.addDomListener(e.div,"mouseover",(function(t){google.maps.event.trigger(e,"mouseover"),e.isFunction(e.onMouseOver)&&e.onMouseOver(),t.stopPropagation()}))}},{key:"draw",value:function(){var e=this,t=$(e.div).find(".mapboxgl-marker,.marker-pin,.mapboxgl-popup,.popup");t.length||(t=$(e.div));var o=e.getProjection().fromLatLngToDivPixel(new google.maps.LatLng(e.position)),n={y:void 0,x:void 0},a=t.outerWidth(),r=t.outerHeight();switch(Array.isArray(e.align)?e.align.join(" "):""){case"left top":n.y=r,n.x=a;break;case"left center":n.y=r/2,n.x=a;break;case"left bottom":n.y=0,n.x=a;break;case"center top":n.y=r,n.x=a/2;break;case"center center":n.y=r/2,n.x=a/2;break;case"center bottom":n.y=0,n.x=a/2;break;case"right top":n.y=r,n.x=0;break;case"right center":n.y=r/2,n.x=0;break;case"right bottom":n.y=0,n.x=0;break;default:n.y=r/2,n.x=a/2}e.div.style.top="".concat(o.y-n.y,"px"),e.div.style.left="".concat(o.x-n.x,"px")}},{key:"getPosition",value:function(){return this.position}},{key:"getDiv",value:function(){return this.div}},{key:"setPosition",value:function(e,t){this.position=e,this.align=t,this.draw()}}])&&c(o.prototype,n),a&&c(o,a),t}()}};function f(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g={ENVS:["xs","sm","md","lg","xl","xxl","xxxl"],MAP_DRIVER:function(e){return function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}var o,n,a;return o=t,(n=[{key:"getName",value:function(){return"GoogleMapsDriver"}},{key:"init",value:function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this,a=window;n.$el=t,n.config=o,n.markers=[],a["init".concat(n.getName())]=function(){n.googleApiLoaded()},e("body").append('<script async defer src="https://maps.googleapis.com/maps/api/js?key='.concat(o.key,"&callback=init").concat(n.getName(),'"><\/script>'))}},{key:"googleApiLoaded",value:function(){var t=this,o=t.$el,n=t.config,a=o.find(".mapAPI-map"),r=n.mapZoom?n.mapZoom:10,s=n.center?{lat:n.center[1],lng:n.center[0]}:{lat:0,lng:0},c=n.style?n.style:null;console.log("".concat(t.getName(),": API is loaded")),t.MarkerUI=d.init(e),t.map=new google.maps.Map(a[0],{zoom:r,center:s,fullscreenControl:!0,styles:c}),t.default_zoom=r,a.addClass("mapboxgl-map"),t.popup=new t.MarkerUI({map:t.map,align:["center","top"],divClass:"mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none",html:'<div class="mapboxgl-popup-tip"></div><div class="mapboxgl-popup-content"><div class="mapboxgl-popup-close-button" type="button" aria-label="Close popup">\xd7</div><div class="html"></div></div>'}),t.geocoder=new google.maps.Geocoder,o.trigger(i.a.MAPAPILOADED)}},{key:"addMarker",value:function(t,o){var n=this,a={lat:t[1],lng:t[0]},r=new n.MarkerUI({position:a,map:n.map,align:["center","top"],html:'<div class="mapboxgl-marker"><div id="Marker'.concat(o.id,'" data-id="').concat(o.id,'" class="marker">').concat(o.icon,"</div></div>"),onClick:function(){var t=e("#Marker".concat(o.id));n.showPopup(a,o.content),t.trigger(i.a.MAPMARKERCLICK)}});return n.markers.push(r),r}},{key:"showPopup",value:function(t,o){var n=this,a=e(n.popup.getDiv());n.config.flyToMarker&&(n.map.setCenter(t),n.map.setZoom(18)),a.css({opacity:"0"}),a.removeClass("d-none"),a.find(".mapboxgl-popup-content .html").html(o),a.find(".mapboxgl-popup-close-button").on("click",(function(e){e.preventDefault(),n.hidePopup()})),n.popup.setPosition(t,["center","top"]),a.css({"margin-top":"-1rem",opacity:"1"})}},{key:"hidePopup",value:function(){e(this.popup.getDiv()).addClass("d-none"),this.config.noRestoreBounds||this.restoreBounds(),this.$el.trigger(i.a.MAPPOPUPCLOSE)}},{key:"geocode",value:function(e,t){var o=this;o.geocoder.geocode({address:e},(function(e,n){if("OK"===n)return"function"===typeof t&&t(e),e;console.error("".concat(o.getName(),": Geocode was not successful for the following reason: ").concat(n))}))}},{key:"reverseGeocode",value:function(e,t){var o=this;o.geocoder.geocode({location:latlng},(function(e,n){if("OK"===n)return"function"===typeof t&&t(e),e;console.error("".concat(o.getName(),": Reverse Geocoding was not successful for the following reason: ").concat(n))}))}},{key:"addGeoJson",value:function(e){var t=this,o=(e.geojson.features[0].geometry.coordinates,new google.maps.LatLngBounds);e.geojson.features.forEach((function(n){var a=n.id,r=n.geometry.coordinates,i=n.properties.content;t.addMarker(r,{id:a,content:i,icon:n.icon,flyToMarker:e.flyToMarker}),o.extend({lat:r[1],lng:r[0]})})),t.map.fitBounds(o,{padding:30}),t.default_bounds=o,t.default_zoom=t.map.getZoom()}},{key:"getMap",value:function(){return this.map}},{key:"getPopup",value:function(){return this.popup}},{key:"restoreBounds",value:function(){var e=this;e.default_bounds?e.map.fitBounds(e.default_bounds,{padding:30}):(e.markers[0]&&e.map.setCenter(e.markers[0].getPosition()),e.restoreZoom())}},{key:"restoreZoom",value:function(){this.map.setZoom(this.default_zoom)}}])&&f(o.prototype,n),a&&f(o,a),t}()}(a.a)};t.a=g},"./src/js/_events.js":function(e,t){e.exports={AJAX:"ajax-load",TABHIDDEN:"tab-hidden",TABFOCUSED:"tab-focused",OFFLINE:"offline",ONLINE:"online",LOADED:"load",SWIPELEFT:"swipeleft panleft",SWIPERIGHT:"swiperight panright",ALLERTAPPEARED:"alert-appeared",ALERTREMOVED:"alert-removed",LODEDANDREADY:"load-ready",LAZYIMAGEREADY:"image-lazy-bg-loaded",LAZYIMAGESREADY:"images-lazy-loaded",MAPLOADED:"map-loaded",MAPAPILOADED:"map-api-loaded",MAPMARKERCLICK:"map-marker-click",MAPPOPUPCLOSE:"map-popup-close",SCROLL:"scroll",RESIZE:"resize",CAROUSEL_READY:"bs.carousel.ready",SET_TARGET_UPDATE:"set-target-update",RESTORE_FIELD:"restore-field",FORM_INIT_BASICS:"form-basics",FORM_INIT_STEPPED:"form-init-stepped",FORM_INIT_VALIDATE:"form-init-validate",FORM_INIT_VALIDATE_FIELD:"form-init-validate-field",FORM_INIT_STORAGE:"form-init-storage",FORM_VALIDATION_FAILED:"form-validation-failed",FORM_STEPPED_NEW_STEP:"form-new-step",FORM_STEPPED_FIRST_STEP:"form-first-step",FORM_STEPPED_LAST_STEP:"form-last-step",FORM_FIELDS:"input,textarea,select"}},"./src/js/types/SilverShop.Page.CheckoutPageController.js":function(e,t,o){"use strict";o.r(t);o("./src/js/_components/_ui.map.api.js")},"./src/scss/_components/_ui.map.scss":function(e,t){},jquery:function(e,t){e.exports=jQuery}});
!function(e){var t={};function o(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/mnt/data/srv/dist/repositories/webpack-bootstrap-ui-kit/dist",o(o.s="./src/js/types/SilverShop.Page.CheckoutPageController.js")}({"./src/js/_components/_ui.map.api.js":function(e,t,o){"use strict";var n=o("jquery"),a=o.n(n),r=o("./src/js/_events.js"),i=o.n(r),s=(o("./src/scss/_components/_ui.map.scss"),o("./src/js/_consts.js"));function c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(e){var t="jsMapAPI",o=e("body"),n=s.a.MAP_DRIVER,a=window,r=function(){function r(a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var s=this,c=new n;s.$el=e(a);var l=s.$el,u=l.data();u.center=[u.lng?u.lng:o.data("default-lng"),u.lat?u.lat:o.data("default-lat")],u.style=u.style?jQuery.parseJSON(u.style):null,u["font-family"]=o.css("font-family"),console.log("".concat(t,": initializing ").concat(c.getName(),"...")),c.init(l,u),s.drv=c,l.on(i.a.MAPAPILOADED,(function(e){s.map=c.getMap(),u.geojson?(console.log("".concat(t,": setting up geocode data")),c.addGeoJson(u)):u.address?(console.log(u.address),console.log("".concat(t,": setting up address marker")),c.geocode(u.address,(function(e){console.log(e)}))):u.lat&&u.lng&&(console.log("".concat(t,": setting up single lat/lng marker")),u.icon||(u.icon='<i class="fas fa-map-marker-alt"></i>'),c.addMarker([u.lng,u.lat],u)),l.data("jsMapAPI",s),l.addClass("".concat(t,"-active")),l.trigger(i.a.MAPLOADED),console.log("".concat(t,": Map is loaded"))}))}var s,l,u;return s=r,u=[{key:"_jQueryInterface",value:function(){if("undefined"!==typeof a.localStorage)return this.each((function(){var t=e(this),o=t.data("jsMapAPI");o||(o=new r(this),t.data("jsMapAPI",o))}))}}],(l=[{key:"getMap",value:function(){return ui.map}},{key:"dispose",value:function(){this.$el=null,e.removeData(this.$el[0],"jsMapAPI"),this.$el.removeClass("".concat(t,"-active"))}}])&&c(s.prototype,l),u&&c(s,u),r}();e.fn[t]=r._jQueryInterface,e.fn[t].Constructor=r,e.fn[t].noConflict=function(){return e.fn[t]=JQUERY_NO_CONFLICT,r._jQueryInterface},e(a).on("".concat(i.a.AJAX," ").concat(i.a.LOADED),(function(){e(".mapAPI-map-container").jsMapAPI()}))}(a.a)},"./src/js/_consts.js":function(e,t,o){"use strict";var n=o("jquery"),a=o.n(n),r=o("./src/js/_events.js"),i=o.n(r);function s(e){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d={init:function(){return function(e){function t(e){var o,n,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=!(a=l(t).call(this))||"object"!==s(a)&&"function"!==typeof a?u(n):a;var r=u(o);return r.setMap(e.map),r.position=e.position,r.html=e.html?e.html:'<div class="mapboxgl-marker"><i class="marker-icon fas fa-map-marker-alt"></i></div>',r.divClass=e.divClass,r.align=e.align,r.isDebugMode=e.debug,r.onClick=e.onClick,r.onMouseOver=e.onMouseOver,r.isBoolean=function(e){return"boolean"===typeof e},r.isNotUndefined=function(e){return"undefined"!==typeof e},r.hasContent=function(e){return e.length>0},r.isString=function(e){return"string"===typeof e},r.isFunction=function(e){return"function"===typeof e},o}var o,n,a;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(t,google.maps.OverlayView),o=t,(n=[{key:"onAdd",value:function(){var e=this;e.div=document.createElement("div"),e.div.style.position="absolute",e.isNotUndefined(e.divClass)&&e.hasContent(e.divClass)&&(e.div.className=e.divClass),e.isNotUndefined(e.html)&&e.hasContent(e.html)&&e.isString(e.html)&&(e.div.innerHTML=e.html),e.isBoolean(e.isDebugMode)&&e.isDebugMode&&(e.div.className="debug-mode",e.div.innerHTML='<div style="height: 10px; width: 10px; background: red; border-radius: 100%;"></div><div style="position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;">Debug mode</div>',e.div.setAttribute("style","position: absolute;border: 5px dashed red;height: 150px;width: 150px;display: flex;justify-content: center;align-items: center;")),e.getPanes().overlayMouseTarget.appendChild(e.div),google.maps.event.addDomListener(e.div,"click",(function(t){google.maps.event.trigger(e,"click"),e.isFunction(e.onClick)&&e.onClick(),t.stopPropagation()})),google.maps.event.addDomListener(e.div,"mouseover",(function(t){google.maps.event.trigger(e,"mouseover"),e.isFunction(e.onMouseOver)&&e.onMouseOver(),t.stopPropagation()}))}},{key:"draw",value:function(){var e=this,t=$(e.div).find(".mapboxgl-marker,.marker-pin,.mapboxgl-popup,.popup");t.length||(t=$(e.div));var o=e.getProjection().fromLatLngToDivPixel(new google.maps.LatLng(e.position)),n={y:void 0,x:void 0},a=t.outerWidth(),r=t.outerHeight();switch(Array.isArray(e.align)?e.align.join(" "):""){case"left top":n.y=r,n.x=a;break;case"left center":n.y=r/2,n.x=a;break;case"left bottom":n.y=0,n.x=a;break;case"center top":n.y=r,n.x=a/2;break;case"center center":n.y=r/2,n.x=a/2;break;case"center bottom":n.y=0,n.x=a/2;break;case"right top":n.y=r,n.x=0;break;case"right center":n.y=r/2,n.x=0;break;case"right bottom":n.y=0,n.x=0;break;default:n.y=r/2,n.x=a/2}e.div.style.top="".concat(o.y-n.y,"px"),e.div.style.left="".concat(o.x-n.x,"px")}},{key:"getPosition",value:function(){return this.position}},{key:"getDiv",value:function(){return this.div}},{key:"setPosition",value:function(e,t){this.position=e,this.align=t,this.draw()}}])&&c(o.prototype,n),a&&c(o,a),t}()}};function f(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g={ENVS:["xs","sm","md","lg","xl","xxl","xxxl"],MAP_DRIVER:function(e){return function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}var o,n,a;return o=t,(n=[{key:"getName",value:function(){return"GoogleMapsDriver"}},{key:"init",value:function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this,a=window;n.$el=t,n.config=o,n.markers=[],a["init".concat(n.getName())]=function(){n.googleApiLoaded()},e("body").append('<script async defer src="https://maps.googleapis.com/maps/api/js?key='.concat(o.key,"&callback=init").concat(n.getName(),'"><\/script>'))}},{key:"googleApiLoaded",value:function(){var t=this,o=t.$el,n=t.config,a=o.find(".mapAPI-map"),r=n.mapZoom?n.mapZoom:10,s=n.center?{lat:n.center[1],lng:n.center[0]}:{lat:0,lng:0},c=n.style?n.style:null;console.log("".concat(t.getName(),": API is loaded")),t.MarkerUI=d.init(e),t.map=new google.maps.Map(a[0],{zoom:r,center:s,fullscreenControl:!0,styles:c}),t.default_zoom=r,a.addClass("mapboxgl-map"),t.popup=new t.MarkerUI({map:t.map,align:["center","top"],divClass:"mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none",html:'<div class="mapboxgl-popup-tip"></div><div class="mapboxgl-popup-content"><div class="mapboxgl-popup-close-button" type="button" aria-label="Close popup">\xd7</div><div class="html"></div></div>'}),t.geocoder=new google.maps.Geocoder,o.trigger(i.a.MAPAPILOADED)}},{key:"addMarker",value:function(t,o){var n=this,a={lat:t[1],lng:t[0]},r=new n.MarkerUI({position:a,map:n.map,align:["center","top"],html:'<div class="mapboxgl-marker"><div id="Marker'.concat(o.id,'" data-id="').concat(o.id,'" class="marker">').concat(o.icon,"</div></div>"),onClick:function(){var t=e("#Marker".concat(o.id));n.showPopup(a,o.content),t.trigger(i.a.MAPMARKERCLICK)}});return n.markers.push(r),r}},{key:"showPopup",value:function(t,o){var n=this,a=e(n.popup.getDiv());n.config.flyToMarker&&(n.map.setCenter(t),n.config.noZoom||n.map.setZoom(18)),a.css({opacity:"0"}),a.removeClass("d-none"),a.find(".mapboxgl-popup-content .html").html(o),a.find(".mapboxgl-popup-close-button").on("click",(function(e){e.preventDefault(),n.hidePopup()})),n.popup.setPosition(t,["center","top"]),a.css({"margin-top":"-1rem",opacity:"1"})}},{key:"hidePopup",value:function(){var t=this;e(t.popup.getDiv()).addClass("d-none"),t.config.noRestoreBounds&&!t.config.flyToBounds||t.restoreBounds(),t.$el.trigger(i.a.MAPPOPUPCLOSE)}},{key:"geocode",value:function(e,t){var o=this;o.geocoder.geocode({address:e},(function(e,n){if("OK"===n)return"function"===typeof t&&t(e),e;console.error("".concat(o.getName(),": Geocode was not successful for the following reason: ").concat(n))}))}},{key:"reverseGeocode",value:function(e,t){var o=this;o.geocoder.geocode({location:latlng},(function(e,n){if("OK"===n)return"function"===typeof t&&t(e),e;console.error("".concat(o.getName(),": Reverse Geocoding was not successful for the following reason: ").concat(n))}))}},{key:"addGeoJson",value:function(e){var t=this,o=(e.geojson.features[0].geometry.coordinates,new google.maps.LatLngBounds);e.geojson.features.forEach((function(n){var a=n.id,r=n.geometry.coordinates,i=n.properties.content;t.addMarker(r,{id:a,content:i,icon:n.icon,flyToMarker:e.flyToMarker}),o.extend({lat:r[1],lng:r[0]})})),t.map.fitBounds(o,{padding:30}),t.default_bounds=o,t.default_zoom=t.map.getZoom()}},{key:"getMap",value:function(){return this.map}},{key:"getPopup",value:function(){return this.popup}},{key:"restoreBounds",value:function(){var e=this;e.default_bounds?e.map.fitBounds(e.default_bounds,{padding:30}):(e.markers[0]&&e.map.setCenter(e.markers[0].getPosition()),e.restoreZoom())}},{key:"restoreZoom",value:function(){this.map.setZoom(this.default_zoom)}}])&&f(o.prototype,n),a&&f(o,a),t}()}(a.a)};t.a=g},"./src/js/_events.js":function(e,t){e.exports={AJAX:"ajax-load",TABHIDDEN:"tab-hidden",TABFOCUSED:"tab-focused",OFFLINE:"offline",ONLINE:"online",LOADED:"load",SWIPELEFT:"swipeleft panleft",SWIPERIGHT:"swiperight panright",ALLERTAPPEARED:"alert-appeared",ALERTREMOVED:"alert-removed",LODEDANDREADY:"load-ready",LAZYIMAGEREADY:"image-lazy-bg-loaded",LAZYIMAGESREADY:"images-lazy-loaded",MAPLOADED:"map-loaded",MAPAPILOADED:"map-api-loaded",MAPMARKERCLICK:"map-marker-click",MAPPOPUPCLOSE:"map-popup-close",SCROLL:"scroll",RESIZE:"resize",CAROUSEL_READY:"bs.carousel.ready",SET_TARGET_UPDATE:"set-target-update",RESTORE_FIELD:"restore-field",FORM_INIT_BASICS:"form-basics",FORM_INIT_STEPPED:"form-init-stepped",FORM_INIT_VALIDATE:"form-init-validate",FORM_INIT_VALIDATE_FIELD:"form-init-validate-field",FORM_INIT_STORAGE:"form-init-storage",FORM_VALIDATION_FAILED:"form-validation-failed",FORM_STEPPED_NEW_STEP:"form-new-step",FORM_STEPPED_FIRST_STEP:"form-first-step",FORM_STEPPED_LAST_STEP:"form-last-step",FORM_FIELDS:"input,textarea,select"}},"./src/js/types/SilverShop.Page.CheckoutPageController.js":function(e,t,o){"use strict";o.r(t);o("./src/js/_components/_ui.map.api.js")},"./src/scss/_components/_ui.map.scss":function(e,t){},jquery:function(e,t){e.exports=jQuery}});
//# sourceMappingURL=app_SilverShop.Page.CheckoutPageController.js.map

View File

@ -1 +1 @@
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/_components/_ui.map.api.js","webpack:///./src/js/_components/drivers/_map.google.marker.js","webpack:///./src/js/_components/drivers/_map.google.js","webpack:///./src/js/_consts.js","webpack:///./src/js/_events.js","webpack:///./src/js/types/SilverShop.Page.CheckoutPageController.js","webpack:///external \"jQuery\""],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","$","NAME","$BODY","MAP_DRIVER","CONSTS","W","window","MapAPI","el","ui","this","Drv","$el","config","data","jQuery","parseJSON","css","console","log","getName","init","drv","on","Events","MAPAPILOADED","e","map","getMap","addGeoJson","geocode","result","addMarker","addClass","trigger","MAPLOADED","localStorage","each","removeData","removeClass","fn","_jQueryInterface","Constructor","noConflict","JQUERY_NO_CONFLICT","AJAX","LOADED","jsMapAPI","Obj","options","setMap","position","html","divClass","align","isDebugMode","debug","onClick","onMouseOver","isBoolean","arg","isNotUndefined","hasContent","length","isString","isFunction","google","maps","OverlayView","div","document","createElement","style","className","innerHTML","setAttribute","getPanes","overlayMouseTarget","appendChild","event","addDomListener","stopPropagation","$div","find","positionInPixels","getProjection","fromLatLngToDivPixel","LatLng","offset","y","undefined","x","divWidth","outerWidth","divHeight","outerHeight","Array","isArray","join","top","left","draw","ENVS","markers","googleApiLoaded","append","$mapDiv","zoom","center","lat","lng","MarkerUI","Map","fullscreenControl","styles","default_zoom","popup","geocoder","Geocoder","crds","pos","marker","showPopup","MAPMARKERCLICK","push","content","$popup","getDiv","setCenter","setZoom","opacity","preventDefault","hidePopup","setPosition","restoreBounds","MAPPOPUPCLOSE","addr","callback","address","results","status","error","latLng","location","latlng","bounds","features","geometry","coordinates","LatLngBounds","forEach","id","properties","icon","flyToMarker","extend","fitBounds","padding","default_bounds","getZoom","getPosition","restoreZoom","TABHIDDEN","TABFOCUSED","OFFLINE","ONLINE","SWIPELEFT","SWIPERIGHT","ALLERTAPPEARED","ALERTREMOVED","LODEDANDREADY","LAZYIMAGEREADY","LAZYIMAGESREADY","SCROLL","RESIZE","CAROUSEL_READY","SET_TARGET_UPDATE","RESTORE_FIELD","FORM_INIT_BASICS","FORM_INIT_STEPPED","FORM_INIT_VALIDATE","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KAEOyG,mB,2BAlQS,KAAP,CAuQvBnH,MCzPYI,O,oCChBfrC,EAAOD,QAAU,CACf+E,KAAM,YACNqH,UAAW,aACXC,WAAY,cACZC,QAAS,UACTC,OAAQ,SACRvH,OAAQ,OACRwH,UAAW,oBACXC,WAAY,sBACZC,eAAgB,iBAChBC,aAAc,gBACdC,cAAe,aACfC,eAAgB,uBAChBC,gBAAiB,qBACjBzI,UAAW,aACXV,aAAc,iBACdkG,eAAgB,mBAChBY,cAAe,kBACfsC,OAAQ,SACRC,OAAQ,SACRC,eAAgB,oBAChBC,kBAAmB,oBACnBC,cAAe,gBACfC,iBAAkB,cAClBC,kBAAmB,oBACnBC,mBAAoB,qBACpBC,yBAA0B,2BAC1BC,kBAAmB,oBACnBC,uBAAwB,yBACxBC,sBAAuB,gBACvBC,wBAAyB,kBACzBC,uBAAwB,iBACxBC,YAAa,0B,wFCpCf,iD,2ECAA5N,EAAOD,QAAUiD","file":"js/app_SilverShop.Page.CheckoutPageController.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/mnt/data/srv/dist/repositories/webpack-bootstrap-ui-kit/dist\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/js/types/SilverShop.Page.CheckoutPageController.js\");\n","'use strict';\n\nimport $ from 'jquery';\nimport Events from '../_events';\n\nimport '../../scss/_components/_ui.map.scss';\n\nimport CONSTS from 'js/_consts';\n\nconst MapAPI = (($) => {\n // Constants\n const NAME = 'jsMapAPI';\n const DATA_KEY = NAME;\n const $BODY = $('body');\n\n const MAP_DRIVER = CONSTS['MAP_DRIVER'];\n const W = window;\n\n class MapAPI {\n // Constructor\n constructor(el) {\n const ui = this;\n const Drv = new MAP_DRIVER();\n\n ui.$el = $(el);\n\n const $el = ui.$el;\n const config = $el.data();\n\n config['center'] = [\n config['lng'] ? config['lng'] : $BODY.data('default-lng'),\n config['lat'] ? config['lat'] : $BODY.data('default-lat'),\n ];\n\n config['style'] = config['style']\n ? jQuery.parseJSON(config['style'])\n : null;\n\n config['font-family'] = $BODY.css('font-family');\n\n console.log(`${NAME}: initializing ${Drv.getName()}...`);\n Drv.init($el, config);\n ui.drv = Drv;\n\n $el.on(Events.MAPAPILOADED, (e) => {\n ui.map = Drv.getMap();\n\n if (config['geojson']) {\n console.log(`${NAME}: setting up geocode data`);\n Drv.addGeoJson(config);\n } else if (config['address']) {\n console.log(config['address']);\n console.log(`${NAME}: setting up address marker`);\n Drv.geocode(config['address'], (result) => {\n console.log(result);\n });\n } else if (config['lat'] && config['lng']) {\n console.log(`${NAME}: setting up single lat/lng marker`);\n\n if (!config['icon']) {\n config['icon'] = '<i class=\"fas fa-map-marker-alt\"></i>';\n }\n\n Drv.addMarker([config['lng'], config['lat']], config);\n }\n\n $el.data(DATA_KEY, ui);\n $el.addClass(`${NAME}-active`);\n\n $el.trigger(Events.MAPLOADED);\n console.log(`${NAME}: Map is loaded`);\n });\n }\n\n // Public methods\n getMap() {\n return ui.map;\n }\n\n dispose() {\n const ui = this;\n\n ui.$el = null;\n $.removeData(ui.$el[0], DATA_KEY);\n\n ui.$el.removeClass(`${NAME}-active`);\n }\n\n static _jQueryInterface() {\n if (typeof W.localStorage !== 'undefined') {\n return this.each(function() {\n // attach functionality to el\n const $el = $(this);\n let data = $el.data(DATA_KEY);\n\n if (!data) {\n data = new MapAPI(this);\n $el.data(DATA_KEY, data);\n }\n });\n }\n }\n }\n\n // jQuery interface\n $.fn[NAME] = MapAPI._jQueryInterface;\n $.fn[NAME].Constructor = MapAPI;\n $.fn[NAME].noConflict = function() {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return MapAPI._jQueryInterface;\n };\n\n // auto-apply\n $(W).on(`${Events.AJAX} ${Events.LOADED}`, () => {\n $('.mapAPI-map-container').jsMapAPI();\n });\n\n return MapAPI;\n})($);\n\nexport default MapAPI;\n","const Obj = {\n init: () => {\n class GoogleMapsHtmlOverlay extends google.maps.OverlayView {\n constructor(options) {\n super();\n const ui = this;\n\n ui.setMap(options.map);\n ui.position = options.position;\n ui.html = options.html\n ? options.html\n : '<div class=\"mapboxgl-marker\"><i class=\"marker-icon fas fa-map-marker-alt\"></i></div>';\n ui.divClass = options.divClass;\n ui.align = options.align;\n ui.isDebugMode = options.debug;\n ui.onClick = options.onClick;\n ui.onMouseOver = options.onMouseOver;\n\n ui.isBoolean = (arg) => {\n if (typeof arg === 'boolean') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isNotUndefined = (arg) => {\n if (typeof arg !== 'undefined') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.hasContent = (arg) => {\n if (arg.length > 0) {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isString = (arg) => {\n if (typeof arg === 'string') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isFunction = (arg) => {\n if (typeof arg === 'function') {\n return true;\n } else {\n return false;\n }\n };\n }\n onAdd() {\n const ui = this;\n\n // Create div element.\n ui.div = document.createElement('div');\n ui.div.style.position = 'absolute';\n\n // Validate and set custom div class\n if (ui.isNotUndefined(ui.divClass) && ui.hasContent(ui.divClass))\n ui.div.className = ui.divClass;\n\n // Validate and set custom HTML\n if (\n ui.isNotUndefined(ui.html) &&\n ui.hasContent(ui.html) &&\n ui.isString(ui.html)\n )\n ui.div.innerHTML = ui.html;\n\n // If debug mode is enabled custom content will be replaced with debug content\n if (ui.isBoolean(ui.isDebugMode) && ui.isDebugMode) {\n ui.div.className = 'debug-mode';\n ui.div.innerHTML =\n '<div style=\"height: 10px; width: 10px; background: red; border-radius: 100%;\"></div>' +\n '<div style=\"position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;\">Debug mode</div>';\n ui.div.setAttribute(\n 'style',\n 'position: absolute;' +\n 'border: 5px dashed red;' +\n 'height: 150px;' +\n 'width: 150px;' +\n 'display: flex;' +\n 'justify-content: center;' +\n 'align-items: center;',\n );\n }\n\n // Add element to clickable layer\n ui.getPanes().overlayMouseTarget.appendChild(ui.div);\n\n // Add listeners to the element.\n google.maps.event.addDomListener(ui.div, 'click', (event) => {\n google.maps.event.trigger(ui, 'click');\n if (ui.isFunction(ui.onClick)) ui.onClick();\n event.stopPropagation();\n });\n\n google.maps.event.addDomListener(ui.div, 'mouseover', (event) => {\n google.maps.event.trigger(ui, 'mouseover');\n if (ui.isFunction(ui.onMouseOver)) ui.onMouseOver();\n event.stopPropagation();\n });\n }\n\n draw() {\n const ui = this;\n let $div = $(ui.div).find(\n '.mapboxgl-marker,.marker-pin,.mapboxgl-popup,.popup',\n );\n if (!$div.length) {\n $div = $(ui.div);\n }\n\n // Calculate position of div\n const positionInPixels = ui\n .getProjection()\n .fromLatLngToDivPixel(new google.maps.LatLng(ui.position));\n\n // Align HTML overlay relative to original position\n const offset = {\n y: undefined,\n x: undefined,\n };\n const divWidth = $div.outerWidth();\n const divHeight = $div.outerHeight();\n\n switch (Array.isArray(ui.align) ? ui.align.join(' ') : '') {\n case 'left top':\n offset.y = divHeight;\n offset.x = divWidth;\n break;\n case 'left center':\n offset.y = divHeight / 2;\n offset.x = divWidth;\n break;\n case 'left bottom':\n offset.y = 0;\n offset.x = divWidth;\n break;\n case 'center top':\n offset.y = divHeight;\n offset.x = divWidth / 2;\n break;\n case 'center center':\n offset.y = divHeight / 2;\n offset.x = divWidth / 2;\n break;\n case 'center bottom':\n offset.y = 0;\n offset.x = divWidth / 2;\n break;\n case 'right top':\n offset.y = divHeight;\n offset.x = 0;\n break;\n case 'right center':\n offset.y = divHeight / 2;\n offset.x = 0;\n break;\n case 'right bottom':\n offset.y = 0;\n offset.x = 0;\n break;\n default:\n offset.y = divHeight / 2;\n offset.x = divWidth / 2;\n break;\n }\n\n // Set position\n ui.div.style.top = `${positionInPixels.y - offset.y}px`;\n ui.div.style.left = `${positionInPixels.x - offset.x}px`;\n }\n\n getPosition() {\n const ui = this;\n return ui.position;\n }\n\n getDiv() {\n const ui = this;\n return ui.div;\n }\n\n setPosition(position, align) {\n const ui = this;\n ui.position = position;\n ui.align = align;\n ui.draw();\n }\n }\n return GoogleMapsHtmlOverlay;\n },\n};\n\nexport default Obj;\n","'use strict';\n\nimport $ from 'jquery';\nimport Events from '../../_events';\nimport MarkerUI from './_map.google.marker';\n\nconst GoogleMapsDriver = (($) => {\n class GoogleMapsDriver {\n getName() {\n return 'GoogleMapsDriver';\n }\n\n init($el, config = []) {\n const ui = this;\n const W = window;\n\n ui.$el = $el;\n ui.config = config;\n ui.markers = [];\n\n W[`init${ui.getName()}`] = () => {\n ui.googleApiLoaded();\n };\n\n $('body').append(\n `<script async defer src=\"https://maps.googleapis.com/maps/api/js?key=${\n config['key']\n }&callback=init${ui.getName()}\"></script>`,\n );\n }\n\n googleApiLoaded() {\n const ui = this;\n\n const $el = ui.$el;\n const config = ui.config;\n const $mapDiv = $el.find('.mapAPI-map');\n\n const zoom = config['mapZoom'] ? config['mapZoom'] : 10;\n const center = config['center']\n ? {\n lat: config['center'][1],\n lng: config['center'][0],\n }\n : {\n lat: 0,\n lng: 0,\n };\n const style = config['style'] ? config['style'] : null;\n\n console.log(`${ui.getName()}: API is loaded`);\n // init fontawesome icons\n ui.MarkerUI = MarkerUI.init($);\n\n ui.map = new google.maps.Map($mapDiv[0], {\n zoom,\n center,\n fullscreenControl: true,\n styles: style,\n });\n\n ui.default_zoom = zoom;\n\n $mapDiv.addClass('mapboxgl-map');\n\n ui.popup = new ui.MarkerUI({\n map: ui.map,\n align: ['center', 'top'],\n divClass: 'mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none',\n html:\n '<div class=\"mapboxgl-popup-tip\"></div><div class=\"mapboxgl-popup-content\">' +\n '<div class=\"mapboxgl-popup-close-button\" type=\"button\" aria-label=\"Close popup\">×</div>' +\n '<div class=\"html\"></div>' +\n '</div>',\n });\n\n ui.geocoder = new google.maps.Geocoder();\n\n $el.trigger(Events.MAPAPILOADED);\n }\n\n addMarker(crds, config) {\n const ui = this;\n\n const pos = {\n lat: crds[1],\n lng: crds[0],\n };\n\n const marker = new ui.MarkerUI({\n position: pos,\n map: ui.map,\n align: ['center', 'top'],\n html: `<div class=\"mapboxgl-marker\"><div id=\"Marker${config['id']}\" data-id=\"${config['id']}\" class=\"marker\">${config['icon']}</div></div>`,\n onClick: () => {\n const $el = $(`#Marker${config['id']}`);\n ui.showPopup(pos, config['content']);\n\n $el.trigger(Events.MAPMARKERCLICK);\n },\n });\n\n ui.markers.push(marker);\n\n return marker;\n }\n\n showPopup(pos, content) {\n const ui = this;\n const $popup = $(ui.popup.getDiv());\n\n if (ui.config['flyToMarker']) {\n ui.map.setCenter(pos); // panTo\n ui.map.setZoom(18);\n }\n\n // keep it hidden to render content\n $popup.css({\n opacity: '0',\n });\n $popup.removeClass('d-none');\n\n $popup.find('.mapboxgl-popup-content .html').html(content);\n\n $popup.find('.mapboxgl-popup-close-button').on('click', (e) => {\n e.preventDefault();\n ui.hidePopup();\n });\n\n // set position when content was rendered\n ui.popup.setPosition(pos, ['center', 'top']);\n\n // display popup\n $popup.css({\n 'margin-top': '-1rem',\n opacity: '1',\n });\n }\n\n hidePopup() {\n const ui = this;\n const $popup = $(ui.popup.getDiv());\n\n $popup.addClass('d-none');\n if (!ui.config['noRestoreBounds']) {\n ui.restoreBounds();\n }\n\n ui.$el.trigger(Events.MAPPOPUPCLOSE);\n }\n\n geocode(addr, callback) {\n const ui = this;\n\n ui.geocoder.geocode(\n {\n address: addr,\n },\n (results, status) => {\n if (status === 'OK') {\n //results[0].geometry.location;\n\n if (typeof callback === 'function') {\n callback(results);\n }\n\n return results;\n } else {\n console.error(\n `${ui.getName()}: Geocode was not successful for the following reason: ${status}`,\n );\n }\n },\n );\n }\n\n reverseGeocode(latLng, callback) {\n const ui = this;\n\n ui.geocoder.geocode(\n {\n location: latlng,\n },\n (results, status) => {\n if (status === 'OK') {\n //results[0].formatted_address;\n\n if (typeof callback === 'function') {\n callback(results);\n }\n\n return results;\n } else {\n console.error(\n `${ui.getName()}: Reverse Geocoding was not successful for the following reason: ${status}`,\n );\n }\n },\n );\n }\n\n addGeoJson(config) {\n const ui = this;\n\n const firstMarker = config['geojson'].features[0].geometry.coordinates;\n //Map.setCenter(firstMarker);\n const bounds = new google.maps.LatLngBounds();\n\n // add markers to map\n config['geojson'].features.forEach((marker) => {\n const id = marker.id;\n const crds = marker.geometry.coordinates;\n const content = marker.properties.content;\n\n ui.addMarker(crds, {\n id,\n content,\n icon: marker.icon,\n flyToMarker: config['flyToMarker'],\n });\n\n bounds.extend({\n lat: crds[1],\n lng: crds[0],\n });\n });\n\n ui.map.fitBounds(bounds, {\n padding: 30,\n }); //panToBounds\n\n ui.default_bounds = bounds;\n ui.default_zoom = ui.map.getZoom();\n }\n\n getMap() {\n const ui = this;\n return ui.map;\n }\n\n getPopup() {\n const ui = this;\n return ui.popup;\n }\n\n restoreBounds() {\n const ui = this;\n\n if (ui.default_bounds) {\n ui.map.fitBounds(ui.default_bounds, {\n padding: 30,\n }); //panToBounds\n } else {\n if (ui.markers[0]) {\n ui.map.setCenter(ui.markers[0].getPosition());\n }\n\n ui.restoreZoom();\n }\n }\n\n restoreZoom() {\n const ui = this;\n\n ui.map.setZoom(ui.default_zoom);\n }\n }\n\n return GoogleMapsDriver;\n})($);\n\nexport default GoogleMapsDriver;\n","/**\n * Add your global events here\n */\n\nimport MAP_DRIVER from './_components/drivers/_map.google';\n//import MAP_DRIVER from './_components/drivers/_map.mapbox';\n\nconst CONSTS = {\n ENVS: [\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'xl',\n 'xxl',\n 'xxxl',\n ],\n MAP_DRIVER,\n};\n\nexport default CONSTS;\n","/**\n * Add your global events here\n */\n\nmodule.exports = {\n AJAX: 'ajax-load',\n TABHIDDEN: 'tab-hidden',\n TABFOCUSED: 'tab-focused',\n OFFLINE: 'offline',\n ONLINE: 'online',\n LOADED: 'load',\n SWIPELEFT: 'swipeleft panleft',\n SWIPERIGHT: 'swiperight panright',\n ALLERTAPPEARED: 'alert-appeared',\n ALERTREMOVED: 'alert-removed',\n LODEDANDREADY: 'load-ready',\n LAZYIMAGEREADY: 'image-lazy-bg-loaded',\n LAZYIMAGESREADY: 'images-lazy-loaded',\n MAPLOADED: 'map-loaded',\n MAPAPILOADED: 'map-api-loaded',\n MAPMARKERCLICK: 'map-marker-click',\n MAPPOPUPCLOSE: 'map-popup-close',\n SCROLL: 'scroll',\n RESIZE: 'resize',\n CAROUSEL_READY: 'bs.carousel.ready',\n SET_TARGET_UPDATE: 'set-target-update',\n RESTORE_FIELD: 'restore-field',\n FORM_INIT_BASICS: 'form-basics',\n FORM_INIT_STEPPED: 'form-init-stepped',\n FORM_INIT_VALIDATE: 'form-init-validate',\n FORM_INIT_VALIDATE_FIELD: 'form-init-validate-field',\n FORM_INIT_STORAGE: 'form-init-storage',\n FORM_VALIDATION_FAILED: 'form-validation-failed',\n FORM_STEPPED_NEW_STEP: 'form-new-step',\n FORM_STEPPED_FIRST_STEP: 'form-first-step',\n FORM_STEPPED_LAST_STEP: 'form-last-step',\n FORM_FIELDS: 'input,textarea,select',\n};\n","\"use strict\";\n\nimport '../_components/_ui.map.api';\n","module.exports = jQuery;"],"sourceRoot":""}
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/_components/_ui.map.api.js","webpack:///./src/js/_components/drivers/_map.google.marker.js","webpack:///./src/js/_components/drivers/_map.google.js","webpack:///./src/js/_consts.js","webpack:///./src/js/_events.js","webpack:///./src/js/types/SilverShop.Page.CheckoutPageController.js","webpack:///external \"jQuery\""],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","$","NAME","$BODY","MAP_DRIVER","CONSTS","W","window","MapAPI","el","ui","this","Drv","$el","config","data","jQuery","parseJSON","css","console","log","getName","init","drv","on","Events","MAPAPILOADED","e","map","getMap","addGeoJson","geocode","result","addMarker","addClass","trigger","MAPLOADED","localStorage","each","removeData","removeClass","fn","_jQueryInterface","Constructor","noConflict","JQUERY_NO_CONFLICT","AJAX","LOADED","jsMapAPI","Obj","options","setMap","position","html","divClass","align","isDebugMode","debug","onClick","onMouseOver","isBoolean","arg","isNotUndefined","hasContent","length","isString","isFunction","google","maps","OverlayView","div","document","createElement","style","className","innerHTML","setAttribute","getPanes","overlayMouseTarget","appendChild","event","addDomListener","stopPropagation","$div","find","positionInPixels","getProjection","fromLatLngToDivPixel","LatLng","offset","y","undefined","x","divWidth","outerWidth","divHeight","outerHeight","Array","isArray","join","top","left","draw","ENVS","markers","googleApiLoaded","append","$mapDiv","zoom","center","lat","lng","MarkerUI","Map","fullscreenControl","styles","default_zoom","popup","geocoder","Geocoder","crds","pos","marker","showPopup","MAPMARKERCLICK","push","content","$popup","getDiv","setCenter","setZoom","opacity","preventDefault","hidePopup","setPosition","restoreBounds","MAPPOPUPCLOSE","addr","callback","address","results","status","error","latLng","location","latlng","bounds","features","geometry","coordinates","LatLngBounds","forEach","id","properties","icon","flyToMarker","extend","fitBounds","padding","default_bounds","getZoom","getPosition","restoreZoom","TABHIDDEN","TABFOCUSED","OFFLINE","ONLINE","SWIPELEFT","SWIPERIGHT","ALLERTAPPEARED","ALERTREMOVED","LODEDANDREADY","LAZYIMAGEREADY","LAZYIMAGESREADY","SCROLL","RESIZE","CAROUSEL_READY","SET_TARGET_UPDATE","RESTORE_FIELD","FORM_INIT_BASICS","FORM_INIT_STEPPED","FORM_INIT_VALIDATE","FORM_INIT_VALIDATE_FIEL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PsB,oCAkQhBvJ,KAERiB,IAAIsG,QAFIvH,KAEOyG,mB,2BApQS,KAAP,CAyQvBnH,MC3PYI,O,oCChBfrC,EAAOD,QAAU,CACf+E,KAAM,YACNqH,UAAW,aACXC,WAAY,cACZC,QAAS,UACTC,OAAQ,SACRvH,OAAQ,OACRwH,UAAW,oBACXC,WAAY,sBACZC,eAAgB,iBAChBC,aAAc,gBACdC,cAAe,aACfC,eAAgB,uBAChBC,gBAAiB,qBACjBzI,UAAW,aACXV,aAAc,iBACdkG,eAAgB,mBAChBY,cAAe,kBACfsC,OAAQ,SACRC,OAAQ,SACRC,eAAgB,oBAChBC,kBAAmB,oBACnBC,cAAe,gBACfC,iBAAkB,cAClBC,kBAAmB,oBACnBC,mBAAoB,qBACpBC,yBAA0B,2BAC1BC,kBAAmB,oBACnBC,uBAAwB,yBACxBC,sBAAuB,gBACvBC,wBAAyB,kBACzBC,uBAAwB,iBACxBC,YAAa,0B,wFCpCf,iD,2ECAA5N,EAAOD,QAAUiD","file":"js/app_SilverShop.Page.CheckoutPageController.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/mnt/data/srv/dist/repositories/webpack-bootstrap-ui-kit/dist\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/js/types/SilverShop.Page.CheckoutPageController.js\");\n","'use strict';\n\nimport $ from 'jquery';\nimport Events from '../_events';\n\nimport '../../scss/_components/_ui.map.scss';\n\nimport CONSTS from 'js/_consts';\n\nconst MapAPI = (($) => {\n // Constants\n const NAME = 'jsMapAPI';\n const DATA_KEY = NAME;\n const $BODY = $('body');\n\n const MAP_DRIVER = CONSTS['MAP_DRIVER'];\n const W = window;\n\n class MapAPI {\n // Constructor\n constructor(el) {\n const ui = this;\n const Drv = new MAP_DRIVER();\n\n ui.$el = $(el);\n\n const $el = ui.$el;\n const config = $el.data();\n\n config['center'] = [\n config['lng'] ? config['lng'] : $BODY.data('default-lng'),\n config['lat'] ? config['lat'] : $BODY.data('default-lat'),\n ];\n\n config['style'] = config['style']\n ? jQuery.parseJSON(config['style'])\n : null;\n\n config['font-family'] = $BODY.css('font-family');\n\n console.log(`${NAME}: initializing ${Drv.getName()}...`);\n Drv.init($el, config);\n ui.drv = Drv;\n\n $el.on(Events.MAPAPILOADED, (e) => {\n ui.map = Drv.getMap();\n\n if (config['geojson']) {\n console.log(`${NAME}: setting up geocode data`);\n Drv.addGeoJson(config);\n } else if (config['address']) {\n console.log(config['address']);\n console.log(`${NAME}: setting up address marker`);\n Drv.geocode(config['address'], (result) => {\n console.log(result);\n });\n } else if (config['lat'] && config['lng']) {\n console.log(`${NAME}: setting up single lat/lng marker`);\n\n if (!config['icon']) {\n config['icon'] = '<i class=\"fas fa-map-marker-alt\"></i>';\n }\n\n Drv.addMarker([config['lng'], config['lat']], config);\n }\n\n $el.data(DATA_KEY, ui);\n $el.addClass(`${NAME}-active`);\n\n $el.trigger(Events.MAPLOADED);\n console.log(`${NAME}: Map is loaded`);\n });\n }\n\n // Public methods\n getMap() {\n return ui.map;\n }\n\n dispose() {\n const ui = this;\n\n ui.$el = null;\n $.removeData(ui.$el[0], DATA_KEY);\n\n ui.$el.removeClass(`${NAME}-active`);\n }\n\n static _jQueryInterface() {\n if (typeof W.localStorage !== 'undefined') {\n return this.each(function() {\n // attach functionality to el\n const $el = $(this);\n let data = $el.data(DATA_KEY);\n\n if (!data) {\n data = new MapAPI(this);\n $el.data(DATA_KEY, data);\n }\n });\n }\n }\n }\n\n // jQuery interface\n $.fn[NAME] = MapAPI._jQueryInterface;\n $.fn[NAME].Constructor = MapAPI;\n $.fn[NAME].noConflict = function() {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return MapAPI._jQueryInterface;\n };\n\n // auto-apply\n $(W).on(`${Events.AJAX} ${Events.LOADED}`, () => {\n $('.mapAPI-map-container').jsMapAPI();\n });\n\n return MapAPI;\n})($);\n\nexport default MapAPI;\n","const Obj = {\n init: () => {\n class GoogleMapsHtmlOverlay extends google.maps.OverlayView {\n constructor(options) {\n super();\n const ui = this;\n\n ui.setMap(options.map);\n ui.position = options.position;\n ui.html = options.html\n ? options.html\n : '<div class=\"mapboxgl-marker\"><i class=\"marker-icon fas fa-map-marker-alt\"></i></div>';\n ui.divClass = options.divClass;\n ui.align = options.align;\n ui.isDebugMode = options.debug;\n ui.onClick = options.onClick;\n ui.onMouseOver = options.onMouseOver;\n\n ui.isBoolean = (arg) => {\n if (typeof arg === 'boolean') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isNotUndefined = (arg) => {\n if (typeof arg !== 'undefined') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.hasContent = (arg) => {\n if (arg.length > 0) {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isString = (arg) => {\n if (typeof arg === 'string') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isFunction = (arg) => {\n if (typeof arg === 'function') {\n return true;\n } else {\n return false;\n }\n };\n }\n onAdd() {\n const ui = this;\n\n // Create div element.\n ui.div = document.createElement('div');\n ui.div.style.position = 'absolute';\n\n // Validate and set custom div class\n if (ui.isNotUndefined(ui.divClass) && ui.hasContent(ui.divClass))\n ui.div.className = ui.divClass;\n\n // Validate and set custom HTML\n if (\n ui.isNotUndefined(ui.html) &&\n ui.hasContent(ui.html) &&\n ui.isString(ui.html)\n )\n ui.div.innerHTML = ui.html;\n\n // If debug mode is enabled custom content will be replaced with debug content\n if (ui.isBoolean(ui.isDebugMode) && ui.isDebugMode) {\n ui.div.className = 'debug-mode';\n ui.div.innerHTML =\n '<div style=\"height: 10px; width: 10px; background: red; border-radius: 100%;\"></div>' +\n '<div style=\"position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;\">Debug mode</div>';\n ui.div.setAttribute(\n 'style',\n 'position: absolute;' +\n 'border: 5px dashed red;' +\n 'height: 150px;' +\n 'width: 150px;' +\n 'display: flex;' +\n 'justify-content: center;' +\n 'align-items: center;',\n );\n }\n\n // Add element to clickable layer\n ui.getPanes().overlayMouseTarget.appendChild(ui.div);\n\n // Add listeners to the element.\n google.maps.event.addDomListener(ui.div, 'click', (event) => {\n google.maps.event.trigger(ui, 'click');\n if (ui.isFunction(ui.onClick)) ui.onClick();\n event.stopPropagation();\n });\n\n google.maps.event.addDomListener(ui.div, 'mouseover', (event) => {\n google.maps.event.trigger(ui, 'mouseover');\n if (ui.isFunction(ui.onMouseOver)) ui.onMouseOver();\n event.stopPropagation();\n });\n }\n\n draw() {\n const ui = this;\n let $div = $(ui.div).find(\n '.mapboxgl-marker,.marker-pin,.mapboxgl-popup,.popup',\n );\n if (!$div.length) {\n $div = $(ui.div);\n }\n\n // Calculate position of div\n const positionInPixels = ui\n .getProjection()\n .fromLatLngToDivPixel(new google.maps.LatLng(ui.position));\n\n // Align HTML overlay relative to original position\n const offset = {\n y: undefined,\n x: undefined,\n };\n const divWidth = $div.outerWidth();\n const divHeight = $div.outerHeight();\n\n switch (Array.isArray(ui.align) ? ui.align.join(' ') : '') {\n case 'left top':\n offset.y = divHeight;\n offset.x = divWidth;\n break;\n case 'left center':\n offset.y = divHeight / 2;\n offset.x = divWidth;\n break;\n case 'left bottom':\n offset.y = 0;\n offset.x = divWidth;\n break;\n case 'center top':\n offset.y = divHeight;\n offset.x = divWidth / 2;\n break;\n case 'center center':\n offset.y = divHeight / 2;\n offset.x = divWidth / 2;\n break;\n case 'center bottom':\n offset.y = 0;\n offset.x = divWidth / 2;\n break;\n case 'right top':\n offset.y = divHeight;\n offset.x = 0;\n break;\n case 'right center':\n offset.y = divHeight / 2;\n offset.x = 0;\n break;\n case 'right bottom':\n offset.y = 0;\n offset.x = 0;\n break;\n default:\n offset.y = divHeight / 2;\n offset.x = divWidth / 2;\n break;\n }\n\n // Set position\n ui.div.style.top = `${positionInPixels.y - offset.y}px`;\n ui.div.style.left = `${positionInPixels.x - offset.x}px`;\n }\n\n getPosition() {\n const ui = this;\n return ui.position;\n }\n\n getDiv() {\n const ui = this;\n return ui.div;\n }\n\n setPosition(position, align) {\n const ui = this;\n ui.position = position;\n ui.align = align;\n ui.draw();\n }\n }\n return GoogleMapsHtmlOverlay;\n },\n};\n\nexport default Obj;\n","'use strict';\n\nimport $ from 'jquery';\nimport Events from '../../_events';\nimport MarkerUI from './_map.google.marker';\n\nconst GoogleMapsDriver = (($) => {\n class GoogleMapsDriver {\n getName() {\n return 'GoogleMapsDriver';\n }\n\n init($el, config = []) {\n const ui = this;\n const W = window;\n\n ui.$el = $el;\n ui.config = config;\n ui.markers = [];\n\n W[`init${ui.getName()}`] = () => {\n ui.googleApiLoaded();\n };\n\n $('body').append(\n `<script async defer src=\"https://maps.googleapis.com/maps/api/js?key=${\n config['key']\n }&callback=init${ui.getName()}\"></script>`,\n );\n }\n\n googleApiLoaded() {\n const ui = this;\n\n const $el = ui.$el;\n const config = ui.config;\n const $mapDiv = $el.find('.mapAPI-map');\n\n const zoom = config['mapZoom'] ? config['mapZoom'] : 10;\n const center = config['center']\n ? {\n lat: config['center'][1],\n lng: config['center'][0],\n }\n : {\n lat: 0,\n lng: 0,\n };\n const style = config['style'] ? config['style'] : null;\n\n console.log(`${ui.getName()}: API is loaded`);\n // init fontawesome icons\n ui.MarkerUI = MarkerUI.init($);\n\n ui.map = new google.maps.Map($mapDiv[0], {\n zoom,\n center,\n fullscreenControl: true,\n styles: style,\n });\n\n ui.default_zoom = zoom;\n\n $mapDiv.addClass('mapboxgl-map');\n\n ui.popup = new ui.MarkerUI({\n map: ui.map,\n align: ['center', 'top'],\n divClass: 'mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none',\n html:\n '<div class=\"mapboxgl-popup-tip\"></div><div class=\"mapboxgl-popup-content\">' +\n '<div class=\"mapboxgl-popup-close-button\" type=\"button\" aria-label=\"Close popup\">×</div>' +\n '<div class=\"html\"></div>' +\n '</div>',\n });\n\n ui.geocoder = new google.maps.Geocoder();\n\n $el.trigger(Events.MAPAPILOADED);\n }\n\n addMarker(crds, config) {\n const ui = this;\n\n const pos = {\n lat: crds[1],\n lng: crds[0],\n };\n\n const marker = new ui.MarkerUI({\n position: pos,\n map: ui.map,\n align: ['center', 'top'],\n html: `<div class=\"mapboxgl-marker\"><div id=\"Marker${config['id']}\" data-id=\"${config['id']}\" class=\"marker\">${config['icon']}</div></div>`,\n onClick: () => {\n const $el = $(`#Marker${config['id']}`);\n ui.showPopup(pos, config['content']);\n\n $el.trigger(Events.MAPMARKERCLICK);\n },\n });\n\n ui.markers.push(marker);\n\n return marker;\n }\n\n showPopup(pos, content) {\n const ui = this;\n const $popup = $(ui.popup.getDiv());\n\n if (ui.config['flyToMarker']) {\n ui.map.setCenter(pos); // panTo\n if (!ui.config['noZoom']) {\n ui.map.setZoom(18);\n }\n }\n\n // keep it hidden to render content\n $popup.css({\n opacity: '0',\n });\n $popup.removeClass('d-none');\n\n $popup.find('.mapboxgl-popup-content .html').html(content);\n\n $popup.find('.mapboxgl-popup-close-button').on('click', (e) => {\n e.preventDefault();\n ui.hidePopup();\n });\n\n // set position when content was rendered\n ui.popup.setPosition(pos, ['center', 'top']);\n\n // display popup\n $popup.css({\n 'margin-top': '-1rem',\n opacity: '1',\n });\n }\n\n hidePopup() {\n const ui = this;\n const $popup = $(ui.popup.getDiv());\n\n $popup.addClass('d-none');\n if (!ui.config['noRestoreBounds'] || ui.config['flyToBounds']) {\n ui.restoreBounds();\n }\n\n ui.$el.trigger(Events.MAPPOPUPCLOSE);\n }\n\n geocode(addr, callback) {\n const ui = this;\n\n ui.geocoder.geocode(\n {\n address: addr,\n },\n (results, status) => {\n if (status === 'OK') {\n //results[0].geometry.location;\n\n if (typeof callback === 'function') {\n callback(results);\n }\n\n return results;\n } else {\n console.error(\n `${ui.getName()}: Geocode was not successful for the following reason: ${status}`,\n );\n }\n },\n );\n }\n\n reverseGeocode(latLng, callback) {\n const ui = this;\n\n ui.geocoder.geocode(\n {\n location: latlng,\n },\n (results, status) => {\n if (status === 'OK') {\n //results[0].formatted_address;\n\n if (typeof callback === 'function') {\n callback(results);\n }\n\n return results;\n } else {\n console.error(\n `${ui.getName()}: Reverse Geocoding was not successful for the following reason: ${status}`,\n );\n }\n },\n );\n }\n\n addGeoJson(config) {\n const ui = this;\n\n const firstMarker = config['geojson'].features[0].geometry.coordinates;\n //Map.setCenter(firstMarker);\n const bounds = new google.maps.LatLngBounds();\n\n // add markers to map\n config['geojson'].features.forEach((marker) => {\n const id = marker.id;\n const crds = marker.geometry.coordinates;\n const content = marker.properties.content;\n\n ui.addMarker(crds, {\n id,\n content,\n icon: marker.icon,\n flyToMarker: config['flyToMarker'],\n });\n\n bounds.extend({\n lat: crds[1],\n lng: crds[0],\n });\n });\n\n ui.map.fitBounds(bounds, {\n padding: 30,\n }); //panToBounds\n\n ui.default_bounds = bounds;\n ui.default_zoom = ui.map.getZoom();\n }\n\n getMap() {\n const ui = this;\n return ui.map;\n }\n\n getPopup() {\n const ui = this;\n return ui.popup;\n }\n\n restoreBounds() {\n const ui = this;\n\n if (ui.default_bounds) {\n ui.map.fitBounds(ui.default_bounds, {\n padding: 30,\n }); //panToBounds\n } else {\n if (ui.markers[0]) {\n ui.map.setCenter(ui.markers[0].getPosition());\n }\n\n ui.restoreZoom();\n }\n }\n\n restoreZoom() {\n const ui = this;\n\n ui.map.setZoom(ui.default_zoom);\n }\n }\n\n return GoogleMapsDriver;\n})($);\n\nexport default GoogleMapsDriver;\n","/**\n * Add your global events here\n */\n\nimport MAP_DRIVER from './_components/drivers/_map.google';\n//import MAP_DRIVER from './_components/drivers/_map.mapbox';\n\nconst CONSTS = {\n ENVS: [\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'xl',\n 'xxl',\n 'xxxl',\n ],\n MAP_DRIVER,\n};\n\nexport default CONSTS;\n","/**\n * Add your global events here\n */\n\nmodule.exports = {\n AJAX: 'ajax-load',\n TABHIDDEN: 'tab-hidden',\n TABFOCUSED: 'tab-focused',\n OFFLINE: 'offline',\n ONLINE: 'online',\n LOADED: 'load',\n SWIPELEFT: 'swipeleft panleft',\n SWIPERIGHT: 'swiperight panright',\n ALLERTAPPEARED: 'alert-appeared',\n ALERTREMOVED: 'alert-removed',\n LODEDANDREADY: 'load-ready',\n LAZYIMAGEREADY: 'image-lazy-bg-loaded',\n LAZYIMAGESREADY: 'images-lazy-loaded',\n MAPLOADED: 'map-loaded',\n MAPAPILOADED: 'map-api-loaded',\n MAPMARKERCLICK: 'map-marker-click',\n MAPPOPUPCLOSE: 'map-popup-close',\n SCROLL: 'scroll',\n RESIZE: 'resize',\n CAROUSEL_READY: 'bs.carousel.ready',\n SET_TARGET_UPDATE: 'set-target-update',\n RESTORE_FIELD: 'restore-field',\n FORM_INIT_BASICS: 'form-basics',\n FORM_INIT_STEPPED: 'form-init-stepped',\n FORM_INIT_VALIDATE: 'form-init-validate',\n FORM_INIT_VALIDATE_FIELD: 'form-init-validate-field',\n FORM_INIT_STORAGE: 'form-init-storage',\n FORM_VALIDATION_FAILED: 'form-validation-failed',\n FORM_STEPPED_NEW_STEP: 'form-new-step',\n FORM_STEPPED_FIRST_STEP: 'form-first-step',\n FORM_STEPPED_LAST_STEP: 'form-last-step',\n FORM_FIELDS: 'input,textarea,select',\n};\n","\"use strict\";\n\nimport '../_components/_ui.map.api';\n","module.exports = jQuery;"],"sourceRoot":""}

View File

@ -1,2 +1,2 @@
!function(e){var t={};function o(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/mnt/data/srv/dist/repositories/webpack-bootstrap-ui-kit/dist",o(o.s="./src/js/types/Site.Controllers.MapElementController.js")}({"./src/js/_components/_ui.map.api.js":function(e,t,o){"use strict";var n=o("jquery"),a=o.n(n),i=o("./src/js/_events.js"),r=o.n(i),s=(o("./src/scss/_components/_ui.map.scss"),o("./src/js/_consts.js"));function c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(e){var t="jsMapAPI",o=e("body"),n=s.a.MAP_DRIVER,a=window,i=function(){function i(a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var s=this,c=new n;s.$el=e(a);var l=s.$el,u=l.data();u.center=[u.lng?u.lng:o.data("default-lng"),u.lat?u.lat:o.data("default-lat")],u.style=u.style?jQuery.parseJSON(u.style):null,u["font-family"]=o.css("font-family"),console.log("".concat(t,": initializing ").concat(c.getName(),"...")),c.init(l,u),s.drv=c,l.on(r.a.MAPAPILOADED,(function(e){s.map=c.getMap(),u.geojson?(console.log("".concat(t,": setting up geocode data")),c.addGeoJson(u)):u.address?(console.log(u.address),console.log("".concat(t,": setting up address marker")),c.geocode(u.address,(function(e){console.log(e)}))):u.lat&&u.lng&&(console.log("".concat(t,": setting up single lat/lng marker")),u.icon||(u.icon='<i class="fas fa-map-marker-alt"></i>'),c.addMarker([u.lng,u.lat],u)),l.data("jsMapAPI",s),l.addClass("".concat(t,"-active")),l.trigger(r.a.MAPLOADED),console.log("".concat(t,": Map is loaded"))}))}var s,l,u;return s=i,u=[{key:"_jQueryInterface",value:function(){if("undefined"!==typeof a.localStorage)return this.each((function(){var t=e(this),o=t.data("jsMapAPI");o||(o=new i(this),t.data("jsMapAPI",o))}))}}],(l=[{key:"getMap",value:function(){return ui.map}},{key:"dispose",value:function(){this.$el=null,e.removeData(this.$el[0],"jsMapAPI"),this.$el.removeClass("".concat(t,"-active"))}}])&&c(s.prototype,l),u&&c(s,u),i}();e.fn[t]=i._jQueryInterface,e.fn[t].Constructor=i,e.fn[t].noConflict=function(){return e.fn[t]=JQUERY_NO_CONFLICT,i._jQueryInterface},e(a).on("".concat(r.a.AJAX," ").concat(r.a.LOADED),(function(){e(".mapAPI-map-container").jsMapAPI()}))}(a.a)},"./src/js/_consts.js":function(e,t,o){"use strict";var n=o("jquery"),a=o.n(n),i=o("./src/js/_events.js"),r=o.n(i);function s(e){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d={init:function(){return function(e){function t(e){var o,n,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=!(a=l(t).call(this))||"object"!==s(a)&&"function"!==typeof a?u(n):a;var i=u(o);return i.setMap(e.map),i.position=e.position,i.html=e.html?e.html:'<div class="mapboxgl-marker"><i class="marker-icon fas fa-map-marker-alt"></i></div>',i.divClass=e.divClass,i.align=e.align,i.isDebugMode=e.debug,i.onClick=e.onClick,i.onMouseOver=e.onMouseOver,i.isBoolean=function(e){return"boolean"===typeof e},i.isNotUndefined=function(e){return"undefined"!==typeof e},i.hasContent=function(e){return e.length>0},i.isString=function(e){return"string"===typeof e},i.isFunction=function(e){return"function"===typeof e},o}var o,n,a;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(t,google.maps.OverlayView),o=t,(n=[{key:"onAdd",value:function(){var e=this;e.div=document.createElement("div"),e.div.style.position="absolute",e.isNotUndefined(e.divClass)&&e.hasContent(e.divClass)&&(e.div.className=e.divClass),e.isNotUndefined(e.html)&&e.hasContent(e.html)&&e.isString(e.html)&&(e.div.innerHTML=e.html),e.isBoolean(e.isDebugMode)&&e.isDebugMode&&(e.div.className="debug-mode",e.div.innerHTML='<div style="height: 10px; width: 10px; background: red; border-radius: 100%;"></div><div style="position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;">Debug mode</div>',e.div.setAttribute("style","position: absolute;border: 5px dashed red;height: 150px;width: 150px;display: flex;justify-content: center;align-items: center;")),e.getPanes().overlayMouseTarget.appendChild(e.div),google.maps.event.addDomListener(e.div,"click",(function(t){google.maps.event.trigger(e,"click"),e.isFunction(e.onClick)&&e.onClick(),t.stopPropagation()})),google.maps.event.addDomListener(e.div,"mouseover",(function(t){google.maps.event.trigger(e,"mouseover"),e.isFunction(e.onMouseOver)&&e.onMouseOver(),t.stopPropagation()}))}},{key:"draw",value:function(){var e=this,t=$(e.div).find(".mapboxgl-marker,.marker-pin,.mapboxgl-popup,.popup");t.length||(t=$(e.div));var o=e.getProjection().fromLatLngToDivPixel(new google.maps.LatLng(e.position)),n={y:void 0,x:void 0},a=t.outerWidth(),i=t.outerHeight();switch(Array.isArray(e.align)?e.align.join(" "):""){case"left top":n.y=i,n.x=a;break;case"left center":n.y=i/2,n.x=a;break;case"left bottom":n.y=0,n.x=a;break;case"center top":n.y=i,n.x=a/2;break;case"center center":n.y=i/2,n.x=a/2;break;case"center bottom":n.y=0,n.x=a/2;break;case"right top":n.y=i,n.x=0;break;case"right center":n.y=i/2,n.x=0;break;case"right bottom":n.y=0,n.x=0;break;default:n.y=i/2,n.x=a/2}e.div.style.top="".concat(o.y-n.y,"px"),e.div.style.left="".concat(o.x-n.x,"px")}},{key:"getPosition",value:function(){return this.position}},{key:"getDiv",value:function(){return this.div}},{key:"setPosition",value:function(e,t){this.position=e,this.align=t,this.draw()}}])&&c(o.prototype,n),a&&c(o,a),t}()}};function f(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g={ENVS:["xs","sm","md","lg","xl","xxl","xxxl"],MAP_DRIVER:function(e){return function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}var o,n,a;return o=t,(n=[{key:"getName",value:function(){return"GoogleMapsDriver"}},{key:"init",value:function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this,a=window;n.$el=t,n.config=o,n.markers=[],a["init".concat(n.getName())]=function(){n.googleApiLoaded()},e("body").append('<script async defer src="https://maps.googleapis.com/maps/api/js?key='.concat(o.key,"&callback=init").concat(n.getName(),'"><\/script>'))}},{key:"googleApiLoaded",value:function(){var t=this,o=t.$el,n=t.config,a=o.find(".mapAPI-map"),i=n.mapZoom?n.mapZoom:10,s=n.center?{lat:n.center[1],lng:n.center[0]}:{lat:0,lng:0},c=n.style?n.style:null;console.log("".concat(t.getName(),": API is loaded")),t.MarkerUI=d.init(e),t.map=new google.maps.Map(a[0],{zoom:i,center:s,fullscreenControl:!0,styles:c}),t.default_zoom=i,a.addClass("mapboxgl-map"),t.popup=new t.MarkerUI({map:t.map,align:["center","top"],divClass:"mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none",html:'<div class="mapboxgl-popup-tip"></div><div class="mapboxgl-popup-content"><div class="mapboxgl-popup-close-button" type="button" aria-label="Close popup">\xd7</div><div class="html"></div></div>'}),t.geocoder=new google.maps.Geocoder,o.trigger(r.a.MAPAPILOADED)}},{key:"addMarker",value:function(t,o){var n=this,a={lat:t[1],lng:t[0]},i=new n.MarkerUI({position:a,map:n.map,align:["center","top"],html:'<div class="mapboxgl-marker"><div id="Marker'.concat(o.id,'" data-id="').concat(o.id,'" class="marker">').concat(o.icon,"</div></div>"),onClick:function(){var t=e("#Marker".concat(o.id));n.showPopup(a,o.content),t.trigger(r.a.MAPMARKERCLICK)}});return n.markers.push(i),i}},{key:"showPopup",value:function(t,o){var n=this,a=e(n.popup.getDiv());n.config.flyToMarker&&(n.map.setCenter(t),n.map.setZoom(18)),a.css({opacity:"0"}),a.removeClass("d-none"),a.find(".mapboxgl-popup-content .html").html(o),a.find(".mapboxgl-popup-close-button").on("click",(function(e){e.preventDefault(),n.hidePopup()})),n.popup.setPosition(t,["center","top"]),a.css({"margin-top":"-1rem",opacity:"1"})}},{key:"hidePopup",value:function(){e(this.popup.getDiv()).addClass("d-none"),this.config.noRestoreBounds||this.restoreBounds(),this.$el.trigger(r.a.MAPPOPUPCLOSE)}},{key:"geocode",value:function(e,t){var o=this;o.geocoder.geocode({address:e},(function(e,n){if("OK"===n)return"function"===typeof t&&t(e),e;console.error("".concat(o.getName(),": Geocode was not successful for the following reason: ").concat(n))}))}},{key:"reverseGeocode",value:function(e,t){var o=this;o.geocoder.geocode({location:latlng},(function(e,n){if("OK"===n)return"function"===typeof t&&t(e),e;console.error("".concat(o.getName(),": Reverse Geocoding was not successful for the following reason: ").concat(n))}))}},{key:"addGeoJson",value:function(e){var t=this,o=(e.geojson.features[0].geometry.coordinates,new google.maps.LatLngBounds);e.geojson.features.forEach((function(n){var a=n.id,i=n.geometry.coordinates,r=n.properties.content;t.addMarker(i,{id:a,content:r,icon:n.icon,flyToMarker:e.flyToMarker}),o.extend({lat:i[1],lng:i[0]})})),t.map.fitBounds(o,{padding:30}),t.default_bounds=o,t.default_zoom=t.map.getZoom()}},{key:"getMap",value:function(){return this.map}},{key:"getPopup",value:function(){return this.popup}},{key:"restoreBounds",value:function(){var e=this;e.default_bounds?e.map.fitBounds(e.default_bounds,{padding:30}):(e.markers[0]&&e.map.setCenter(e.markers[0].getPosition()),e.restoreZoom())}},{key:"restoreZoom",value:function(){this.map.setZoom(this.default_zoom)}}])&&f(o.prototype,n),a&&f(o,a),t}()}(a.a)};t.a=g},"./src/js/_events.js":function(e,t){e.exports={AJAX:"ajax-load",TABHIDDEN:"tab-hidden",TABFOCUSED:"tab-focused",OFFLINE:"offline",ONLINE:"online",LOADED:"load",SWIPELEFT:"swipeleft panleft",SWIPERIGHT:"swiperight panright",ALLERTAPPEARED:"alert-appeared",ALERTREMOVED:"alert-removed",LODEDANDREADY:"load-ready",LAZYIMAGEREADY:"image-lazy-bg-loaded",LAZYIMAGESREADY:"images-lazy-loaded",MAPLOADED:"map-loaded",MAPAPILOADED:"map-api-loaded",MAPMARKERCLICK:"map-marker-click",MAPPOPUPCLOSE:"map-popup-close",SCROLL:"scroll",RESIZE:"resize",CAROUSEL_READY:"bs.carousel.ready",SET_TARGET_UPDATE:"set-target-update",RESTORE_FIELD:"restore-field",FORM_INIT_BASICS:"form-basics",FORM_INIT_STEPPED:"form-init-stepped",FORM_INIT_VALIDATE:"form-init-validate",FORM_INIT_VALIDATE_FIELD:"form-init-validate-field",FORM_INIT_STORAGE:"form-init-storage",FORM_VALIDATION_FAILED:"form-validation-failed",FORM_STEPPED_NEW_STEP:"form-new-step",FORM_STEPPED_FIRST_STEP:"form-first-step",FORM_STEPPED_LAST_STEP:"form-last-step",FORM_FIELDS:"input,textarea,select"}},"./src/js/types/Site.Controllers.MapElementController.js":function(e,t,o){"use strict";o.r(t);var n=o("jquery"),a=o.n(n),i=o("./src/js/_events.js"),r=o.n(i);o("./src/js/_components/_ui.map.api.js");function s(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var c=function(e){var t=window,o=(document,e("body")),n=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}var n,a,i;return n=t,i=[{key:"init",value:function(){this.dispose(),console.log("Initializing: ".concat("LocationUI"))}},{key:"initMap",value:function(){e(".mapAPI-map-container").find(".marker").on("".concat(r.a.MAPMARKERCLICK),(function(t){var n=e(t.currentTarget).data("id");o.find(".locations .location").removeClass("active"),o.find('.locations .location[data-id="'.concat(n,'"]')).addClass("active")})),o.find(".locations .location").on("click",(function(t){var n=e(t.currentTarget).data("id");o.find("#Marker".concat(n)).click()})),e(".mapAPI-map-container").on(r.a.MAPPOPUPCLOSE,(function(e){o.find(".locations .location").removeClass("active")}))}},{key:"dispose",value:function(){console.log("Destroying: ".concat("LocationUI"))}}],(a=null)&&s(n.prototype,a),i&&s(n,i),t}();return e(t).on("".concat(r.a.AJAX," ").concat(r.a.LOADED),(function(){n.init()})),e(t).on(r.a.MAPLOADED,(function(){n.initMap()})),n}(a.a);t.default=c},"./src/scss/_components/_ui.map.scss":function(e,t){},jquery:function(e,t){e.exports=jQuery}});
!function(e){var t={};function o(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/mnt/data/srv/dist/repositories/webpack-bootstrap-ui-kit/dist",o(o.s="./src/js/types/Site.Controllers.MapElementController.js")}({"./src/js/_components/_ui.map.api.js":function(e,t,o){"use strict";var n=o("jquery"),a=o.n(n),i=o("./src/js/_events.js"),r=o.n(i),s=(o("./src/scss/_components/_ui.map.scss"),o("./src/js/_consts.js"));function c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(e){var t="jsMapAPI",o=e("body"),n=s.a.MAP_DRIVER,a=window,i=function(){function i(a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var s=this,c=new n;s.$el=e(a);var l=s.$el,u=l.data();u.center=[u.lng?u.lng:o.data("default-lng"),u.lat?u.lat:o.data("default-lat")],u.style=u.style?jQuery.parseJSON(u.style):null,u["font-family"]=o.css("font-family"),console.log("".concat(t,": initializing ").concat(c.getName(),"...")),c.init(l,u),s.drv=c,l.on(r.a.MAPAPILOADED,(function(e){s.map=c.getMap(),u.geojson?(console.log("".concat(t,": setting up geocode data")),c.addGeoJson(u)):u.address?(console.log(u.address),console.log("".concat(t,": setting up address marker")),c.geocode(u.address,(function(e){console.log(e)}))):u.lat&&u.lng&&(console.log("".concat(t,": setting up single lat/lng marker")),u.icon||(u.icon='<i class="fas fa-map-marker-alt"></i>'),c.addMarker([u.lng,u.lat],u)),l.data("jsMapAPI",s),l.addClass("".concat(t,"-active")),l.trigger(r.a.MAPLOADED),console.log("".concat(t,": Map is loaded"))}))}var s,l,u;return s=i,u=[{key:"_jQueryInterface",value:function(){if("undefined"!==typeof a.localStorage)return this.each((function(){var t=e(this),o=t.data("jsMapAPI");o||(o=new i(this),t.data("jsMapAPI",o))}))}}],(l=[{key:"getMap",value:function(){return ui.map}},{key:"dispose",value:function(){this.$el=null,e.removeData(this.$el[0],"jsMapAPI"),this.$el.removeClass("".concat(t,"-active"))}}])&&c(s.prototype,l),u&&c(s,u),i}();e.fn[t]=i._jQueryInterface,e.fn[t].Constructor=i,e.fn[t].noConflict=function(){return e.fn[t]=JQUERY_NO_CONFLICT,i._jQueryInterface},e(a).on("".concat(r.a.AJAX," ").concat(r.a.LOADED),(function(){e(".mapAPI-map-container").jsMapAPI()}))}(a.a)},"./src/js/_consts.js":function(e,t,o){"use strict";var n=o("jquery"),a=o.n(n),i=o("./src/js/_events.js"),r=o.n(i);function s(e){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d={init:function(){return function(e){function t(e){var o,n,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=!(a=l(t).call(this))||"object"!==s(a)&&"function"!==typeof a?u(n):a;var i=u(o);return i.setMap(e.map),i.position=e.position,i.html=e.html?e.html:'<div class="mapboxgl-marker"><i class="marker-icon fas fa-map-marker-alt"></i></div>',i.divClass=e.divClass,i.align=e.align,i.isDebugMode=e.debug,i.onClick=e.onClick,i.onMouseOver=e.onMouseOver,i.isBoolean=function(e){return"boolean"===typeof e},i.isNotUndefined=function(e){return"undefined"!==typeof e},i.hasContent=function(e){return e.length>0},i.isString=function(e){return"string"===typeof e},i.isFunction=function(e){return"function"===typeof e},o}var o,n,a;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(t,google.maps.OverlayView),o=t,(n=[{key:"onAdd",value:function(){var e=this;e.div=document.createElement("div"),e.div.style.position="absolute",e.isNotUndefined(e.divClass)&&e.hasContent(e.divClass)&&(e.div.className=e.divClass),e.isNotUndefined(e.html)&&e.hasContent(e.html)&&e.isString(e.html)&&(e.div.innerHTML=e.html),e.isBoolean(e.isDebugMode)&&e.isDebugMode&&(e.div.className="debug-mode",e.div.innerHTML='<div style="height: 10px; width: 10px; background: red; border-radius: 100%;"></div><div style="position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;">Debug mode</div>',e.div.setAttribute("style","position: absolute;border: 5px dashed red;height: 150px;width: 150px;display: flex;justify-content: center;align-items: center;")),e.getPanes().overlayMouseTarget.appendChild(e.div),google.maps.event.addDomListener(e.div,"click",(function(t){google.maps.event.trigger(e,"click"),e.isFunction(e.onClick)&&e.onClick(),t.stopPropagation()})),google.maps.event.addDomListener(e.div,"mouseover",(function(t){google.maps.event.trigger(e,"mouseover"),e.isFunction(e.onMouseOver)&&e.onMouseOver(),t.stopPropagation()}))}},{key:"draw",value:function(){var e=this,t=$(e.div).find(".mapboxgl-marker,.marker-pin,.mapboxgl-popup,.popup");t.length||(t=$(e.div));var o=e.getProjection().fromLatLngToDivPixel(new google.maps.LatLng(e.position)),n={y:void 0,x:void 0},a=t.outerWidth(),i=t.outerHeight();switch(Array.isArray(e.align)?e.align.join(" "):""){case"left top":n.y=i,n.x=a;break;case"left center":n.y=i/2,n.x=a;break;case"left bottom":n.y=0,n.x=a;break;case"center top":n.y=i,n.x=a/2;break;case"center center":n.y=i/2,n.x=a/2;break;case"center bottom":n.y=0,n.x=a/2;break;case"right top":n.y=i,n.x=0;break;case"right center":n.y=i/2,n.x=0;break;case"right bottom":n.y=0,n.x=0;break;default:n.y=i/2,n.x=a/2}e.div.style.top="".concat(o.y-n.y,"px"),e.div.style.left="".concat(o.x-n.x,"px")}},{key:"getPosition",value:function(){return this.position}},{key:"getDiv",value:function(){return this.div}},{key:"setPosition",value:function(e,t){this.position=e,this.align=t,this.draw()}}])&&c(o.prototype,n),a&&c(o,a),t}()}};function f(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g={ENVS:["xs","sm","md","lg","xl","xxl","xxxl"],MAP_DRIVER:function(e){return function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}var o,n,a;return o=t,(n=[{key:"getName",value:function(){return"GoogleMapsDriver"}},{key:"init",value:function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this,a=window;n.$el=t,n.config=o,n.markers=[],a["init".concat(n.getName())]=function(){n.googleApiLoaded()},e("body").append('<script async defer src="https://maps.googleapis.com/maps/api/js?key='.concat(o.key,"&callback=init").concat(n.getName(),'"><\/script>'))}},{key:"googleApiLoaded",value:function(){var t=this,o=t.$el,n=t.config,a=o.find(".mapAPI-map"),i=n.mapZoom?n.mapZoom:10,s=n.center?{lat:n.center[1],lng:n.center[0]}:{lat:0,lng:0},c=n.style?n.style:null;console.log("".concat(t.getName(),": API is loaded")),t.MarkerUI=d.init(e),t.map=new google.maps.Map(a[0],{zoom:i,center:s,fullscreenControl:!0,styles:c}),t.default_zoom=i,a.addClass("mapboxgl-map"),t.popup=new t.MarkerUI({map:t.map,align:["center","top"],divClass:"mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none",html:'<div class="mapboxgl-popup-tip"></div><div class="mapboxgl-popup-content"><div class="mapboxgl-popup-close-button" type="button" aria-label="Close popup">\xd7</div><div class="html"></div></div>'}),t.geocoder=new google.maps.Geocoder,o.trigger(r.a.MAPAPILOADED)}},{key:"addMarker",value:function(t,o){var n=this,a={lat:t[1],lng:t[0]},i=new n.MarkerUI({position:a,map:n.map,align:["center","top"],html:'<div class="mapboxgl-marker"><div id="Marker'.concat(o.id,'" data-id="').concat(o.id,'" class="marker">').concat(o.icon,"</div></div>"),onClick:function(){var t=e("#Marker".concat(o.id));n.showPopup(a,o.content),t.trigger(r.a.MAPMARKERCLICK)}});return n.markers.push(i),i}},{key:"showPopup",value:function(t,o){var n=this,a=e(n.popup.getDiv());n.config.flyToMarker&&(n.map.setCenter(t),n.config.noZoom||n.map.setZoom(18)),a.css({opacity:"0"}),a.removeClass("d-none"),a.find(".mapboxgl-popup-content .html").html(o),a.find(".mapboxgl-popup-close-button").on("click",(function(e){e.preventDefault(),n.hidePopup()})),n.popup.setPosition(t,["center","top"]),a.css({"margin-top":"-1rem",opacity:"1"})}},{key:"hidePopup",value:function(){var t=this;e(t.popup.getDiv()).addClass("d-none"),t.config.noRestoreBounds&&!t.config.flyToBounds||t.restoreBounds(),t.$el.trigger(r.a.MAPPOPUPCLOSE)}},{key:"geocode",value:function(e,t){var o=this;o.geocoder.geocode({address:e},(function(e,n){if("OK"===n)return"function"===typeof t&&t(e),e;console.error("".concat(o.getName(),": Geocode was not successful for the following reason: ").concat(n))}))}},{key:"reverseGeocode",value:function(e,t){var o=this;o.geocoder.geocode({location:latlng},(function(e,n){if("OK"===n)return"function"===typeof t&&t(e),e;console.error("".concat(o.getName(),": Reverse Geocoding was not successful for the following reason: ").concat(n))}))}},{key:"addGeoJson",value:function(e){var t=this,o=(e.geojson.features[0].geometry.coordinates,new google.maps.LatLngBounds);e.geojson.features.forEach((function(n){var a=n.id,i=n.geometry.coordinates,r=n.properties.content;t.addMarker(i,{id:a,content:r,icon:n.icon,flyToMarker:e.flyToMarker}),o.extend({lat:i[1],lng:i[0]})})),t.map.fitBounds(o,{padding:30}),t.default_bounds=o,t.default_zoom=t.map.getZoom()}},{key:"getMap",value:function(){return this.map}},{key:"getPopup",value:function(){return this.popup}},{key:"restoreBounds",value:function(){var e=this;e.default_bounds?e.map.fitBounds(e.default_bounds,{padding:30}):(e.markers[0]&&e.map.setCenter(e.markers[0].getPosition()),e.restoreZoom())}},{key:"restoreZoom",value:function(){this.map.setZoom(this.default_zoom)}}])&&f(o.prototype,n),a&&f(o,a),t}()}(a.a)};t.a=g},"./src/js/_events.js":function(e,t){e.exports={AJAX:"ajax-load",TABHIDDEN:"tab-hidden",TABFOCUSED:"tab-focused",OFFLINE:"offline",ONLINE:"online",LOADED:"load",SWIPELEFT:"swipeleft panleft",SWIPERIGHT:"swiperight panright",ALLERTAPPEARED:"alert-appeared",ALERTREMOVED:"alert-removed",LODEDANDREADY:"load-ready",LAZYIMAGEREADY:"image-lazy-bg-loaded",LAZYIMAGESREADY:"images-lazy-loaded",MAPLOADED:"map-loaded",MAPAPILOADED:"map-api-loaded",MAPMARKERCLICK:"map-marker-click",MAPPOPUPCLOSE:"map-popup-close",SCROLL:"scroll",RESIZE:"resize",CAROUSEL_READY:"bs.carousel.ready",SET_TARGET_UPDATE:"set-target-update",RESTORE_FIELD:"restore-field",FORM_INIT_BASICS:"form-basics",FORM_INIT_STEPPED:"form-init-stepped",FORM_INIT_VALIDATE:"form-init-validate",FORM_INIT_VALIDATE_FIELD:"form-init-validate-field",FORM_INIT_STORAGE:"form-init-storage",FORM_VALIDATION_FAILED:"form-validation-failed",FORM_STEPPED_NEW_STEP:"form-new-step",FORM_STEPPED_FIRST_STEP:"form-first-step",FORM_STEPPED_LAST_STEP:"form-last-step",FORM_FIELDS:"input,textarea,select"}},"./src/js/types/Site.Controllers.MapElementController.js":function(e,t,o){"use strict";o.r(t);var n=o("jquery"),a=o.n(n),i=o("./src/js/_events.js"),r=o.n(i);o("./src/js/_components/_ui.map.api.js");function s(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var c=function(e){var t=window,o=(document,e("body")),n=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}var n,a,i;return n=t,i=[{key:"init",value:function(){this.dispose(),console.log("Initializing: ".concat("LocationUI"))}},{key:"initMap",value:function(){e(".mapAPI-map-container").find(".marker").on("".concat(r.a.MAPMARKERCLICK),(function(t){var n=e(t.currentTarget).data("id");o.find(".locations .location").removeClass("active"),o.find('.locations .location[data-id="'.concat(n,'"]')).addClass("active")})),o.find(".locations .location").on("click",(function(t){var n=e(t.currentTarget).data("id");o.find("#Marker".concat(n)).click()})),e(".mapAPI-map-container").on(r.a.MAPPOPUPCLOSE,(function(e){o.find(".locations .location").removeClass("active")}))}},{key:"dispose",value:function(){console.log("Destroying: ".concat("LocationUI"))}}],(a=null)&&s(n.prototype,a),i&&s(n,i),t}();return e(t).on("".concat(r.a.AJAX," ").concat(r.a.LOADED),(function(){n.init()})),e(t).on(r.a.MAPLOADED,(function(){n.initMap()})),n}(a.a);t.default=c},"./src/scss/_components/_ui.map.scss":function(e,t){},jquery:function(e,t){e.exports=jQuery}});
//# sourceMappingURL=app_Site.Controllers.MapElementController.js.map

View File

@ -1 +1 @@
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/_components/_ui.map.api.js","webpack:///./src/js/_components/drivers/_map.google.marker.js","webpack:///./src/js/_components/drivers/_map.google.js","webpack:///./src/js/_consts.js","webpack:///./src/js/_events.js","webpack:///./src/js/types/Site.Controllers.MapElementController.js","webpack:///external \"jQuery\""],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","$","NAME","$BODY","MAP_DRIVER","CONSTS","W","window","MapAPI","el","ui","this","Drv","$el","config","data","jQuery","parseJSON","css","console","log","getName","init","drv","on","Events","MAPAPILOADED","e","map","getMap","addGeoJson","geocode","result","addMarker","addClass","trigger","MAPLOADED","localStorage","each","removeData","removeClass","fn","_jQueryInterface","Constructor","noConflict","JQUERY_NO_CONFLICT","AJAX","LOADED","jsMapAPI","Obj","options","setMap","position","html","divClass","align","isDebugMode","debug","onClick","onMouseOver","isBoolean","arg","isNotUndefined","hasContent","length","isString","isFunction","google","maps","OverlayView","div","document","createElement","style","className","innerHTML","setAttribute","getPanes","overlayMouseTarget","appendChild","event","addDomListener","stopPropagation","$div","find","positionInPixels","getProjection","fromLatLngToDivPixel","LatLng","offset","y","undefined","x","divWidth","outerWidth","divHeight","outerHeight","Array","isArray","join","top","left","draw","ENVS","markers","googleApiLoaded","append","$mapDiv","zoom","center","lat","lng","MarkerUI","Map","fullscreenControl","styles","default_zoom","popup","geocoder","Geocoder","crds","pos","marker","showPopup","MAPMARKERCLICK","push","content","$popup","getDiv","setCenter","setZoom","opacity","preventDefault","hidePopup","setPosition","restoreBounds","MAPPOPUPCLOSE","addr","callback","address","results","status","error","latLng","location","latlng","bounds","features","geometry","coordinates","LatLngBounds","forEach","id","properties","icon","flyToMarker","extend","fitBounds","padding","default_bounds","getZoom","getPosition","restoreZoom","TABHIDDEN","TABFOCUSED","OFFLINE","ONLINE","SWIPELEFT","SWIPERIGHT","ALLERTAPPEARED","ALERTREMOVED","LODEDANDREADY","LAZYIMAGEREADY","LAZYIMAGESREADY","SCROLL","RESIZE","CAROUSEL_READY","SET_TARGET_UPDATE","RESTORE_FIELD","FORM_INIT_BASICS","FORM_INIT_STEPPED","FORM_INIT_VALIDATE","FORM_INIT_VALIDATE_FIELD","FORM_INIT_STORAGE","FORM_VALIDATION_FAILED","FORM_STEPPED_NEW_STEP","FORM_STEPPED_FIRST_STEP","FORM_STEPPED_LAST_STEP","FORM_FIELDS","LocationUI","$Body","dispose","currentTarget","click","initMap"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,qBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9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AY,eAhC5B,gCAqCrBrB,QAAQC,IAAR,sBA/BS,mB,EANY,O,2BAAA,KAiDzB,OARAnB,EAAEK,GAAGkB,GAAL,UAAWC,IAAOqB,KAAlB,YAA0BrB,IAAOsB,SAAU,WACzC8I,EAAWvK,UAGbrB,EAAEK,GAAGkB,GAAGC,IAAOW,WAAW,WACxByJ,EAAWK,aAGNL,EAjDW,CAmDjB5L,KAEY4L,a,2EC7Df7N,EAAOD,QAAUiD","file":"js/app_Site.Controllers.MapElementController.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/mnt/data/srv/dist/repositories/webpack-bootstrap-ui-kit/dist\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/js/types/Site.Controllers.MapElementController.js\");\n","'use strict';\n\nimport $ from 'jquery';\nimport Events from '../_events';\n\nimport '../../scss/_components/_ui.map.scss';\n\nimport CONSTS from 'js/_consts';\n\nconst MapAPI = (($) => {\n // Constants\n const NAME = 'jsMapAPI';\n const DATA_KEY = NAME;\n const $BODY = $('body');\n\n const MAP_DRIVER = CONSTS['MAP_DRIVER'];\n const W = window;\n\n class MapAPI {\n // Constructor\n constructor(el) {\n const ui = this;\n const Drv = new MAP_DRIVER();\n\n ui.$el = $(el);\n\n const $el = ui.$el;\n const config = $el.data();\n\n config['center'] = [\n config['lng'] ? config['lng'] : $BODY.data('default-lng'),\n config['lat'] ? config['lat'] : $BODY.data('default-lat'),\n ];\n\n config['style'] = config['style']\n ? jQuery.parseJSON(config['style'])\n : null;\n\n config['font-family'] = $BODY.css('font-family');\n\n console.log(`${NAME}: initializing ${Drv.getName()}...`);\n Drv.init($el, config);\n ui.drv = Drv;\n\n $el.on(Events.MAPAPILOADED, (e) => {\n ui.map = Drv.getMap();\n\n if (config['geojson']) {\n console.log(`${NAME}: setting up geocode data`);\n Drv.addGeoJson(config);\n } else if (config['address']) {\n console.log(config['address']);\n console.log(`${NAME}: setting up address marker`);\n Drv.geocode(config['address'], (result) => {\n console.log(result);\n });\n } else if (config['lat'] && config['lng']) {\n console.log(`${NAME}: setting up single lat/lng marker`);\n\n if (!config['icon']) {\n config['icon'] = '<i class=\"fas fa-map-marker-alt\"></i>';\n }\n\n Drv.addMarker([config['lng'], config['lat']], config);\n }\n\n $el.data(DATA_KEY, ui);\n $el.addClass(`${NAME}-active`);\n\n $el.trigger(Events.MAPLOADED);\n console.log(`${NAME}: Map is loaded`);\n });\n }\n\n // Public methods\n getMap() {\n return ui.map;\n }\n\n dispose() {\n const ui = this;\n\n ui.$el = null;\n $.removeData(ui.$el[0], DATA_KEY);\n\n ui.$el.removeClass(`${NAME}-active`);\n }\n\n static _jQueryInterface() {\n if (typeof W.localStorage !== 'undefined') {\n return this.each(function() {\n // attach functionality to el\n const $el = $(this);\n let data = $el.data(DATA_KEY);\n\n if (!data) {\n data = new MapAPI(this);\n $el.data(DATA_KEY, data);\n }\n });\n }\n }\n }\n\n // jQuery interface\n $.fn[NAME] = MapAPI._jQueryInterface;\n $.fn[NAME].Constructor = MapAPI;\n $.fn[NAME].noConflict = function() {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return MapAPI._jQueryInterface;\n };\n\n // auto-apply\n $(W).on(`${Events.AJAX} ${Events.LOADED}`, () => {\n $('.mapAPI-map-container').jsMapAPI();\n });\n\n return MapAPI;\n})($);\n\nexport default MapAPI;\n","const Obj = {\n init: () => {\n class GoogleMapsHtmlOverlay extends google.maps.OverlayView {\n constructor(options) {\n super();\n const ui = this;\n\n ui.setMap(options.map);\n ui.position = options.position;\n ui.html = options.html\n ? options.html\n : '<div class=\"mapboxgl-marker\"><i class=\"marker-icon fas fa-map-marker-alt\"></i></div>';\n ui.divClass = options.divClass;\n ui.align = options.align;\n ui.isDebugMode = options.debug;\n ui.onClick = options.onClick;\n ui.onMouseOver = options.onMouseOver;\n\n ui.isBoolean = (arg) => {\n if (typeof arg === 'boolean') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isNotUndefined = (arg) => {\n if (typeof arg !== 'undefined') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.hasContent = (arg) => {\n if (arg.length > 0) {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isString = (arg) => {\n if (typeof arg === 'string') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isFunction = (arg) => {\n if (typeof arg === 'function') {\n return true;\n } else {\n return false;\n }\n };\n }\n onAdd() {\n const ui = this;\n\n // Create div element.\n ui.div = document.createElement('div');\n ui.div.style.position = 'absolute';\n\n // Validate and set custom div class\n if (ui.isNotUndefined(ui.divClass) && ui.hasContent(ui.divClass))\n ui.div.className = ui.divClass;\n\n // Validate and set custom HTML\n if (\n ui.isNotUndefined(ui.html) &&\n ui.hasContent(ui.html) &&\n ui.isString(ui.html)\n )\n ui.div.innerHTML = ui.html;\n\n // If debug mode is enabled custom content will be replaced with debug content\n if (ui.isBoolean(ui.isDebugMode) && ui.isDebugMode) {\n ui.div.className = 'debug-mode';\n ui.div.innerHTML =\n '<div style=\"height: 10px; width: 10px; background: red; border-radius: 100%;\"></div>' +\n '<div style=\"position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;\">Debug mode</div>';\n ui.div.setAttribute(\n 'style',\n 'position: absolute;' +\n 'border: 5px dashed red;' +\n 'height: 150px;' +\n 'width: 150px;' +\n 'display: flex;' +\n 'justify-content: center;' +\n 'align-items: center;',\n );\n }\n\n // Add element to clickable layer\n ui.getPanes().overlayMouseTarget.appendChild(ui.div);\n\n // Add listeners to the element.\n google.maps.event.addDomListener(ui.div, 'click', (event) => {\n google.maps.event.trigger(ui, 'click');\n if (ui.isFunction(ui.onClick)) ui.onClick();\n event.stopPropagation();\n });\n\n google.maps.event.addDomListener(ui.div, 'mouseover', (event) => {\n google.maps.event.trigger(ui, 'mouseover');\n if (ui.isFunction(ui.onMouseOver)) ui.onMouseOver();\n event.stopPropagation();\n });\n }\n\n draw() {\n const ui = this;\n let $div = $(ui.div).find(\n '.mapboxgl-marker,.marker-pin,.mapboxgl-popup,.popup',\n );\n if (!$div.length) {\n $div = $(ui.div);\n }\n\n // Calculate position of div\n const positionInPixels = ui\n .getProjection()\n .fromLatLngToDivPixel(new google.maps.LatLng(ui.position));\n\n // Align HTML overlay relative to original position\n const offset = {\n y: undefined,\n x: undefined,\n };\n const divWidth = $div.outerWidth();\n const divHeight = $div.outerHeight();\n\n switch (Array.isArray(ui.align) ? ui.align.join(' ') : '') {\n case 'left top':\n offset.y = divHeight;\n offset.x = divWidth;\n break;\n case 'left center':\n offset.y = divHeight / 2;\n offset.x = divWidth;\n break;\n case 'left bottom':\n offset.y = 0;\n offset.x = divWidth;\n break;\n case 'center top':\n offset.y = divHeight;\n offset.x = divWidth / 2;\n break;\n case 'center center':\n offset.y = divHeight / 2;\n offset.x = divWidth / 2;\n break;\n case 'center bottom':\n offset.y = 0;\n offset.x = divWidth / 2;\n break;\n case 'right top':\n offset.y = divHeight;\n offset.x = 0;\n break;\n case 'right center':\n offset.y = divHeight / 2;\n offset.x = 0;\n break;\n case 'right bottom':\n offset.y = 0;\n offset.x = 0;\n break;\n default:\n offset.y = divHeight / 2;\n offset.x = divWidth / 2;\n break;\n }\n\n // Set position\n ui.div.style.top = `${positionInPixels.y - offset.y}px`;\n ui.div.style.left = `${positionInPixels.x - offset.x}px`;\n }\n\n getPosition() {\n const ui = this;\n return ui.position;\n }\n\n getDiv() {\n const ui = this;\n return ui.div;\n }\n\n setPosition(position, align) {\n const ui = this;\n ui.position = position;\n ui.align = align;\n ui.draw();\n }\n }\n return GoogleMapsHtmlOverlay;\n },\n};\n\nexport default Obj;\n","'use strict';\n\nimport $ from 'jquery';\nimport Events from '../../_events';\nimport MarkerUI from './_map.google.marker';\n\nconst GoogleMapsDriver = (($) => {\n class GoogleMapsDriver {\n getName() {\n return 'GoogleMapsDriver';\n }\n\n init($el, config = []) {\n const ui = this;\n const W = window;\n\n ui.$el = $el;\n ui.config = config;\n ui.markers = [];\n\n W[`init${ui.getName()}`] = () => {\n ui.googleApiLoaded();\n };\n\n $('body').append(\n `<script async defer src=\"https://maps.googleapis.com/maps/api/js?key=${\n config['key']\n }&callback=init${ui.getName()}\"></script>`,\n );\n }\n\n googleApiLoaded() {\n const ui = this;\n\n const $el = ui.$el;\n const config = ui.config;\n const $mapDiv = $el.find('.mapAPI-map');\n\n const zoom = config['mapZoom'] ? config['mapZoom'] : 10;\n const center = config['center']\n ? {\n lat: config['center'][1],\n lng: config['center'][0],\n }\n : {\n lat: 0,\n lng: 0,\n };\n const style = config['style'] ? config['style'] : null;\n\n console.log(`${ui.getName()}: API is loaded`);\n // init fontawesome icons\n ui.MarkerUI = MarkerUI.init($);\n\n ui.map = new google.maps.Map($mapDiv[0], {\n zoom,\n center,\n fullscreenControl: true,\n styles: style,\n });\n\n ui.default_zoom = zoom;\n\n $mapDiv.addClass('mapboxgl-map');\n\n ui.popup = new ui.MarkerUI({\n map: ui.map,\n align: ['center', 'top'],\n divClass: 'mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none',\n html:\n '<div class=\"mapboxgl-popup-tip\"></div><div class=\"mapboxgl-popup-content\">' +\n '<div class=\"mapboxgl-popup-close-button\" type=\"button\" aria-label=\"Close popup\">×</div>' +\n '<div class=\"html\"></div>' +\n '</div>',\n });\n\n ui.geocoder = new google.maps.Geocoder();\n\n $el.trigger(Events.MAPAPILOADED);\n }\n\n addMarker(crds, config) {\n const ui = this;\n\n const pos = {\n lat: crds[1],\n lng: crds[0],\n };\n\n const marker = new ui.MarkerUI({\n position: pos,\n map: ui.map,\n align: ['center', 'top'],\n html: `<div class=\"mapboxgl-marker\"><div id=\"Marker${config['id']}\" data-id=\"${config['id']}\" class=\"marker\">${config['icon']}</div></div>`,\n onClick: () => {\n const $el = $(`#Marker${config['id']}`);\n ui.showPopup(pos, config['content']);\n\n $el.trigger(Events.MAPMARKERCLICK);\n },\n });\n\n ui.markers.push(marker);\n\n return marker;\n }\n\n showPopup(pos, content) {\n const ui = this;\n const $popup = $(ui.popup.getDiv());\n\n if (ui.config['flyToMarker']) {\n ui.map.setCenter(pos); // panTo\n ui.map.setZoom(18);\n }\n\n // keep it hidden to render content\n $popup.css({\n opacity: '0',\n });\n $popup.removeClass('d-none');\n\n $popup.find('.mapboxgl-popup-content .html').html(content);\n\n $popup.find('.mapboxgl-popup-close-button').on('click', (e) => {\n e.preventDefault();\n ui.hidePopup();\n });\n\n // set position when content was rendered\n ui.popup.setPosition(pos, ['center', 'top']);\n\n // display popup\n $popup.css({\n 'margin-top': '-1rem',\n opacity: '1',\n });\n }\n\n hidePopup() {\n const ui = this;\n const $popup = $(ui.popup.getDiv());\n\n $popup.addClass('d-none');\n if (!ui.config['noRestoreBounds']) {\n ui.restoreBounds();\n }\n\n ui.$el.trigger(Events.MAPPOPUPCLOSE);\n }\n\n geocode(addr, callback) {\n const ui = this;\n\n ui.geocoder.geocode(\n {\n address: addr,\n },\n (results, status) => {\n if (status === 'OK') {\n //results[0].geometry.location;\n\n if (typeof callback === 'function') {\n callback(results);\n }\n\n return results;\n } else {\n console.error(\n `${ui.getName()}: Geocode was not successful for the following reason: ${status}`,\n );\n }\n },\n );\n }\n\n reverseGeocode(latLng, callback) {\n const ui = this;\n\n ui.geocoder.geocode(\n {\n location: latlng,\n },\n (results, status) => {\n if (status === 'OK') {\n //results[0].formatted_address;\n\n if (typeof callback === 'function') {\n callback(results);\n }\n\n return results;\n } else {\n console.error(\n `${ui.getName()}: Reverse Geocoding was not successful for the following reason: ${status}`,\n );\n }\n },\n );\n }\n\n addGeoJson(config) {\n const ui = this;\n\n const firstMarker = config['geojson'].features[0].geometry.coordinates;\n //Map.setCenter(firstMarker);\n const bounds = new google.maps.LatLngBounds();\n\n // add markers to map\n config['geojson'].features.forEach((marker) => {\n const id = marker.id;\n const crds = marker.geometry.coordinates;\n const content = marker.properties.content;\n\n ui.addMarker(crds, {\n id,\n content,\n icon: marker.icon,\n flyToMarker: config['flyToMarker'],\n });\n\n bounds.extend({\n lat: crds[1],\n lng: crds[0],\n });\n });\n\n ui.map.fitBounds(bounds, {\n padding: 30,\n }); //panToBounds\n\n ui.default_bounds = bounds;\n ui.default_zoom = ui.map.getZoom();\n }\n\n getMap() {\n const ui = this;\n return ui.map;\n }\n\n getPopup() {\n const ui = this;\n return ui.popup;\n }\n\n restoreBounds() {\n const ui = this;\n\n if (ui.default_bounds) {\n ui.map.fitBounds(ui.default_bounds, {\n padding: 30,\n }); //panToBounds\n } else {\n if (ui.markers[0]) {\n ui.map.setCenter(ui.markers[0].getPosition());\n }\n\n ui.restoreZoom();\n }\n }\n\n restoreZoom() {\n const ui = this;\n\n ui.map.setZoom(ui.default_zoom);\n }\n }\n\n return GoogleMapsDriver;\n})($);\n\nexport default GoogleMapsDriver;\n","/**\n * Add your global events here\n */\n\nimport MAP_DRIVER from './_components/drivers/_map.google';\n//import MAP_DRIVER from './_components/drivers/_map.mapbox';\n\nconst CONSTS = {\n ENVS: [\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'xl',\n 'xxl',\n 'xxxl',\n ],\n MAP_DRIVER,\n};\n\nexport default CONSTS;\n","/**\n * Add your global events here\n */\n\nmodule.exports = {\n AJAX: 'ajax-load',\n TABHIDDEN: 'tab-hidden',\n TABFOCUSED: 'tab-focused',\n OFFLINE: 'offline',\n ONLINE: 'online',\n LOADED: 'load',\n SWIPELEFT: 'swipeleft panleft',\n SWIPERIGHT: 'swiperight panright',\n ALLERTAPPEARED: 'alert-appeared',\n ALERTREMOVED: 'alert-removed',\n LODEDANDREADY: 'load-ready',\n LAZYIMAGEREADY: 'image-lazy-bg-loaded',\n LAZYIMAGESREADY: 'images-lazy-loaded',\n MAPLOADED: 'map-loaded',\n MAPAPILOADED: 'map-api-loaded',\n MAPMARKERCLICK: 'map-marker-click',\n MAPPOPUPCLOSE: 'map-popup-close',\n SCROLL: 'scroll',\n RESIZE: 'resize',\n CAROUSEL_READY: 'bs.carousel.ready',\n SET_TARGET_UPDATE: 'set-target-update',\n RESTORE_FIELD: 'restore-field',\n FORM_INIT_BASICS: 'form-basics',\n FORM_INIT_STEPPED: 'form-init-stepped',\n FORM_INIT_VALIDATE: 'form-init-validate',\n FORM_INIT_VALIDATE_FIELD: 'form-init-validate-field',\n FORM_INIT_STORAGE: 'form-init-storage',\n FORM_VALIDATION_FAILED: 'form-validation-failed',\n FORM_STEPPED_NEW_STEP: 'form-new-step',\n FORM_STEPPED_FIRST_STEP: 'form-first-step',\n FORM_STEPPED_LAST_STEP: 'form-last-step',\n FORM_FIELDS: 'input,textarea,select',\n};\n","\"use strict\";\n\nimport $ from 'jquery';\nimport Events from '../_events';\n\n// Mapbox API\nimport '../_components/_ui.map.api';\n\nconst LocationUI = (($) => {\n // Constants\n const W = window;\n const D = document;\n const $Body = $('body');\n\n const NAME = 'LocationUI';\n class LocationUI {\n // Static methods\n\n static init() {\n this.dispose();\n console.log(`Initializing: ${NAME}`);\n }\n\n static initMap() {\n $('.mapAPI-map-container').find('.marker').on(`${Events.MAPMARKERCLICK}`, (e) => {\n const $el = $(e.currentTarget);\n const id = $el.data('id');\n\n $Body.find('.locations .location').removeClass('active');\n $Body.find(`.locations .location[data-id=\"${ id }\"]`).addClass('active');\n });\n\n $Body.find('.locations .location').on('click', (e) => {\n const $el = $(e.currentTarget);\n const id = $el.data('id');\n\n $Body.find(`#Marker${id}`).click();\n });\n\n $('.mapAPI-map-container').on(Events.MAPPOPUPCLOSE, (e) => {\n $Body.find('.locations .location').removeClass('active');\n });\n }\n\n static dispose() {\n console.log(`Destroying: ${NAME}`);\n }\n }\n\n $(W).on(`${Events.AJAX} ${Events.LOADED}`, () => {\n LocationUI.init();\n });\n\n $(W).on(Events.MAPLOADED, () => {\n LocationUI.initMap();\n });\n\n return LocationUI;\n\n})($);\n\nexport default LocationUI;\n","module.exports = jQuery;"],"sourceRoot":""}
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/_components/_ui.map.api.js","webpack:///./src/js/_components/drivers/_map.google.marker.js","webpack:///./src/js/_components/drivers/_map.google.js","webpack:///./src/js/_consts.js","webpack:///./src/js/_events.js","webpack:///./src/js/types/Site.Controllers.MapElementController.js","webpack:///external \"jQuery\""],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","$","NAME","$BODY","MAP_DRIVER","CONSTS","W","window","MapAPI","el","ui","this","Drv","$el","config","data","jQuery","parseJSON","css","console","log","getName","init","drv","on","Events","MAPAPILOADED","e","map","getMap","addGeoJson","geocode","result","addMarker","addClass","trigger","MAPLOADED","localStorage","each","removeData","removeClass","fn","_jQueryInterface","Constructor","noConflict","JQUERY_NO_CONFLICT","AJAX","LOADED","jsMapAPI","Obj","options","setMap","position","html","divClass","align","isDebugMode","debug","onClick","onMouseOver","isBoolean","arg","isNotUndefined","hasContent","length","isString","isFunction","google","maps","OverlayView","div","document","createElement","style","className","innerHTML","setAttribute","getPanes","overlayMouseTarget","appendChild","event","addDomListener","stopPropagation","$div","find","positionInPixels","getProjection","fromLatLngToDivPixel","LatLng","offset","y","undefined","x","divWidth","outerWidth","divHeight","outerHeight","Array","isArray","join","top","left","draw","ENVS","markers","googleApiLoaded","append","$mapDiv","zoom","center","lat","lng","MarkerUI","Map","fullscreenControl","styles","default_zoom","popup","geocoder","Geocoder","crds","pos","marker","showPopup","MAPMARKERCLICK","push","content","$popup","getDiv","setCenter","setZoom","opacity","preventDefault","hidePopup","setPosition","restoreBounds","MAPPOPUPCLOSE","addr","callback","address","results","status","error","latLng","location","latlng","bounds","features","geometry","coordinates","LatLngBounds","forEach","id","properties","icon","flyToMarker","extend","fitBounds","padding","default_bounds","getZoom","getPosition","restoreZoom","TABHIDDEN","TABFOCUSED","OFFLINE","ONLINE","SWIPELEFT","SWIPERIGHT","ALLERTAPPEARED","ALERTREMOVED","LODEDANDREADY","LAZYIMAGEREADY","LAZYIMAGESREADY","SCROLL","RESIZE","CAROUSEL_READY","SET_TARGET_UPDATE","RESTORE_FIELD","FORM_INIT_BASICS","FORM_INIT_STEPPED","FORM_INIT_VALIDATE","FORM_INIT_VALIDATE_FIELD","FORM_INIT_STORAGE","FORM_VALIDATION_FAILED","FORM_STEPPED_NEW_STEP","FORM_STEPPED_FIRST_STEP","FORM_STEPPED_LAST_STEP","FORM_FIELDS","LocationUI","$Body","dispose","currentTarget","click","initMap"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,qBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,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BrBnB,EAAE,yBAAyBmF,KAAK,WAAW5D,GAA3C,UAAiDC,IAAOmG,iBAAkB,SAACjG,GACzE,IACM6H,EADMvJ,EAAE0B,EAAEqK,eACDjL,KAAK,MAEpB+K,EAAM1G,KAAK,wBAAwB5C,YAAY,UAC/CsJ,EAAM1G,KAAN,wCAA8CoE,EAA9C,OAAwDtH,SAAS,aAGnE4J,EAAM1G,KAAK,wBAAwB5D,GAAG,SAAS,SAACG,GAC9C,IACM6H,EADMvJ,EAAE0B,EAAEqK,eACDjL,KAAK,MAEpB+K,EAAM1G,KAAN,iBAAqBoE,IAAMyC,WAG7BhM,EAAE,yBAAyBuB,GAAGC,IAAO+G,eAAe,SAAC7G,GACnDmK,EAAM1G,KAAK,wBAAwB5C,YAAY,eAhC5B,gCAqCrBrB,QAAQC,IAAR,sBA/BS,mB,EANY,O,2BAAA,KAiDzB,OARAnB,EAAEK,GAAGkB,GAAL,UAAWC,IAAOqB,KAAlB,YAA0BrB,IAAOsB,SAAU,WACzC8I,EAAWvK,UAGbrB,EAAEK,GAAGkB,GAAGC,IAAOW,WAAW,WACxByJ,EAAWK,aAGNL,EAjDW,CAmDjB5L,KAEY4L,a,2EC7Df7N,EAAOD,QAAUiD","file":"js/app_Site.Controllers.MapElementController.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/mnt/data/srv/dist/repositories/webpack-bootstrap-ui-kit/dist\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/js/types/Site.Controllers.MapElementController.js\");\n","'use strict';\n\nimport $ from 'jquery';\nimport Events from '../_events';\n\nimport '../../scss/_components/_ui.map.scss';\n\nimport CONSTS from 'js/_consts';\n\nconst MapAPI = (($) => {\n // Constants\n const NAME = 'jsMapAPI';\n const DATA_KEY = NAME;\n const $BODY = $('body');\n\n const MAP_DRIVER = CONSTS['MAP_DRIVER'];\n const W = window;\n\n class MapAPI {\n // Constructor\n constructor(el) {\n const ui = this;\n const Drv = new MAP_DRIVER();\n\n ui.$el = $(el);\n\n const $el = ui.$el;\n const config = $el.data();\n\n config['center'] = [\n config['lng'] ? config['lng'] : $BODY.data('default-lng'),\n config['lat'] ? config['lat'] : $BODY.data('default-lat'),\n ];\n\n config['style'] = config['style']\n ? jQuery.parseJSON(config['style'])\n : null;\n\n config['font-family'] = $BODY.css('font-family');\n\n console.log(`${NAME}: initializing ${Drv.getName()}...`);\n Drv.init($el, config);\n ui.drv = Drv;\n\n $el.on(Events.MAPAPILOADED, (e) => {\n ui.map = Drv.getMap();\n\n if (config['geojson']) {\n console.log(`${NAME}: setting up geocode data`);\n Drv.addGeoJson(config);\n } else if (config['address']) {\n console.log(config['address']);\n console.log(`${NAME}: setting up address marker`);\n Drv.geocode(config['address'], (result) => {\n console.log(result);\n });\n } else if (config['lat'] && config['lng']) {\n console.log(`${NAME}: setting up single lat/lng marker`);\n\n if (!config['icon']) {\n config['icon'] = '<i class=\"fas fa-map-marker-alt\"></i>';\n }\n\n Drv.addMarker([config['lng'], config['lat']], config);\n }\n\n $el.data(DATA_KEY, ui);\n $el.addClass(`${NAME}-active`);\n\n $el.trigger(Events.MAPLOADED);\n console.log(`${NAME}: Map is loaded`);\n });\n }\n\n // Public methods\n getMap() {\n return ui.map;\n }\n\n dispose() {\n const ui = this;\n\n ui.$el = null;\n $.removeData(ui.$el[0], DATA_KEY);\n\n ui.$el.removeClass(`${NAME}-active`);\n }\n\n static _jQueryInterface() {\n if (typeof W.localStorage !== 'undefined') {\n return this.each(function() {\n // attach functionality to el\n const $el = $(this);\n let data = $el.data(DATA_KEY);\n\n if (!data) {\n data = new MapAPI(this);\n $el.data(DATA_KEY, data);\n }\n });\n }\n }\n }\n\n // jQuery interface\n $.fn[NAME] = MapAPI._jQueryInterface;\n $.fn[NAME].Constructor = MapAPI;\n $.fn[NAME].noConflict = function() {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return MapAPI._jQueryInterface;\n };\n\n // auto-apply\n $(W).on(`${Events.AJAX} ${Events.LOADED}`, () => {\n $('.mapAPI-map-container').jsMapAPI();\n });\n\n return MapAPI;\n})($);\n\nexport default MapAPI;\n","const Obj = {\n init: () => {\n class GoogleMapsHtmlOverlay extends google.maps.OverlayView {\n constructor(options) {\n super();\n const ui = this;\n\n ui.setMap(options.map);\n ui.position = options.position;\n ui.html = options.html\n ? options.html\n : '<div class=\"mapboxgl-marker\"><i class=\"marker-icon fas fa-map-marker-alt\"></i></div>';\n ui.divClass = options.divClass;\n ui.align = options.align;\n ui.isDebugMode = options.debug;\n ui.onClick = options.onClick;\n ui.onMouseOver = options.onMouseOver;\n\n ui.isBoolean = (arg) => {\n if (typeof arg === 'boolean') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isNotUndefined = (arg) => {\n if (typeof arg !== 'undefined') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.hasContent = (arg) => {\n if (arg.length > 0) {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isString = (arg) => {\n if (typeof arg === 'string') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isFunction = (arg) => {\n if (typeof arg === 'function') {\n return true;\n } else {\n return false;\n }\n };\n }\n onAdd() {\n const ui = this;\n\n // Create div element.\n ui.div = document.createElement('div');\n ui.div.style.position = 'absolute';\n\n // Validate and set custom div class\n if (ui.isNotUndefined(ui.divClass) && ui.hasContent(ui.divClass))\n ui.div.className = ui.divClass;\n\n // Validate and set custom HTML\n if (\n ui.isNotUndefined(ui.html) &&\n ui.hasContent(ui.html) &&\n ui.isString(ui.html)\n )\n ui.div.innerHTML = ui.html;\n\n // If debug mode is enabled custom content will be replaced with debug content\n if (ui.isBoolean(ui.isDebugMode) && ui.isDebugMode) {\n ui.div.className = 'debug-mode';\n ui.div.innerHTML =\n '<div style=\"height: 10px; width: 10px; background: red; border-radius: 100%;\"></div>' +\n '<div style=\"position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;\">Debug mode</div>';\n ui.div.setAttribute(\n 'style',\n 'position: absolute;' +\n 'border: 5px dashed red;' +\n 'height: 150px;' +\n 'width: 150px;' +\n 'display: flex;' +\n 'justify-content: center;' +\n 'align-items: center;',\n );\n }\n\n // Add element to clickable layer\n ui.getPanes().overlayMouseTarget.appendChild(ui.div);\n\n // Add listeners to the element.\n google.maps.event.addDomListener(ui.div, 'click', (event) => {\n google.maps.event.trigger(ui, 'click');\n if (ui.isFunction(ui.onClick)) ui.onClick();\n event.stopPropagation();\n });\n\n google.maps.event.addDomListener(ui.div, 'mouseover', (event) => {\n google.maps.event.trigger(ui, 'mouseover');\n if (ui.isFunction(ui.onMouseOver)) ui.onMouseOver();\n event.stopPropagation();\n });\n }\n\n draw() {\n const ui = this;\n let $div = $(ui.div).find(\n '.mapboxgl-marker,.marker-pin,.mapboxgl-popup,.popup',\n );\n if (!$div.length) {\n $div = $(ui.div);\n }\n\n // Calculate position of div\n const positionInPixels = ui\n .getProjection()\n .fromLatLngToDivPixel(new google.maps.LatLng(ui.position));\n\n // Align HTML overlay relative to original position\n const offset = {\n y: undefined,\n x: undefined,\n };\n const divWidth = $div.outerWidth();\n const divHeight = $div.outerHeight();\n\n switch (Array.isArray(ui.align) ? ui.align.join(' ') : '') {\n case 'left top':\n offset.y = divHeight;\n offset.x = divWidth;\n break;\n case 'left center':\n offset.y = divHeight / 2;\n offset.x = divWidth;\n break;\n case 'left bottom':\n offset.y = 0;\n offset.x = divWidth;\n break;\n case 'center top':\n offset.y = divHeight;\n offset.x = divWidth / 2;\n break;\n case 'center center':\n offset.y = divHeight / 2;\n offset.x = divWidth / 2;\n break;\n case 'center bottom':\n offset.y = 0;\n offset.x = divWidth / 2;\n break;\n case 'right top':\n offset.y = divHeight;\n offset.x = 0;\n break;\n case 'right center':\n offset.y = divHeight / 2;\n offset.x = 0;\n break;\n case 'right bottom':\n offset.y = 0;\n offset.x = 0;\n break;\n default:\n offset.y = divHeight / 2;\n offset.x = divWidth / 2;\n break;\n }\n\n // Set position\n ui.div.style.top = `${positionInPixels.y - offset.y}px`;\n ui.div.style.left = `${positionInPixels.x - offset.x}px`;\n }\n\n getPosition() {\n const ui = this;\n return ui.position;\n }\n\n getDiv() {\n const ui = this;\n return ui.div;\n }\n\n setPosition(position, align) {\n const ui = this;\n ui.position = position;\n ui.align = align;\n ui.draw();\n }\n }\n return GoogleMapsHtmlOverlay;\n },\n};\n\nexport default Obj;\n","'use strict';\n\nimport $ from 'jquery';\nimport Events from '../../_events';\nimport MarkerUI from './_map.google.marker';\n\nconst GoogleMapsDriver = (($) => {\n class GoogleMapsDriver {\n getName() {\n return 'GoogleMapsDriver';\n }\n\n init($el, config = []) {\n const ui = this;\n const W = window;\n\n ui.$el = $el;\n ui.config = config;\n ui.markers = [];\n\n W[`init${ui.getName()}`] = () => {\n ui.googleApiLoaded();\n };\n\n $('body').append(\n `<script async defer src=\"https://maps.googleapis.com/maps/api/js?key=${\n config['key']\n }&callback=init${ui.getName()}\"></script>`,\n );\n }\n\n googleApiLoaded() {\n const ui = this;\n\n const $el = ui.$el;\n const config = ui.config;\n const $mapDiv = $el.find('.mapAPI-map');\n\n const zoom = config['mapZoom'] ? config['mapZoom'] : 10;\n const center = config['center']\n ? {\n lat: config['center'][1],\n lng: config['center'][0],\n }\n : {\n lat: 0,\n lng: 0,\n };\n const style = config['style'] ? config['style'] : null;\n\n console.log(`${ui.getName()}: API is loaded`);\n // init fontawesome icons\n ui.MarkerUI = MarkerUI.init($);\n\n ui.map = new google.maps.Map($mapDiv[0], {\n zoom,\n center,\n fullscreenControl: true,\n styles: style,\n });\n\n ui.default_zoom = zoom;\n\n $mapDiv.addClass('mapboxgl-map');\n\n ui.popup = new ui.MarkerUI({\n map: ui.map,\n align: ['center', 'top'],\n divClass: 'mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none',\n html:\n '<div class=\"mapboxgl-popup-tip\"></div><div class=\"mapboxgl-popup-content\">' +\n '<div class=\"mapboxgl-popup-close-button\" type=\"button\" aria-label=\"Close popup\">×</div>' +\n '<div class=\"html\"></div>' +\n '</div>',\n });\n\n ui.geocoder = new google.maps.Geocoder();\n\n $el.trigger(Events.MAPAPILOADED);\n }\n\n addMarker(crds, config) {\n const ui = this;\n\n const pos = {\n lat: crds[1],\n lng: crds[0],\n };\n\n const marker = new ui.MarkerUI({\n position: pos,\n map: ui.map,\n align: ['center', 'top'],\n html: `<div class=\"mapboxgl-marker\"><div id=\"Marker${config['id']}\" data-id=\"${config['id']}\" class=\"marker\">${config['icon']}</div></div>`,\n onClick: () => {\n const $el = $(`#Marker${config['id']}`);\n ui.showPopup(pos, config['content']);\n\n $el.trigger(Events.MAPMARKERCLICK);\n },\n });\n\n ui.markers.push(marker);\n\n return marker;\n }\n\n showPopup(pos, content) {\n const ui = this;\n const $popup = $(ui.popup.getDiv());\n\n if (ui.config['flyToMarker']) {\n ui.map.setCenter(pos); // panTo\n if (!ui.config['noZoom']) {\n ui.map.setZoom(18);\n }\n }\n\n // keep it hidden to render content\n $popup.css({\n opacity: '0',\n });\n $popup.removeClass('d-none');\n\n $popup.find('.mapboxgl-popup-content .html').html(content);\n\n $popup.find('.mapboxgl-popup-close-button').on('click', (e) => {\n e.preventDefault();\n ui.hidePopup();\n });\n\n // set position when content was rendered\n ui.popup.setPosition(pos, ['center', 'top']);\n\n // display popup\n $popup.css({\n 'margin-top': '-1rem',\n opacity: '1',\n });\n }\n\n hidePopup() {\n const ui = this;\n const $popup = $(ui.popup.getDiv());\n\n $popup.addClass('d-none');\n if (!ui.config['noRestoreBounds'] || ui.config['flyToBounds']) {\n ui.restoreBounds();\n }\n\n ui.$el.trigger(Events.MAPPOPUPCLOSE);\n }\n\n geocode(addr, callback) {\n const ui = this;\n\n ui.geocoder.geocode(\n {\n address: addr,\n },\n (results, status) => {\n if (status === 'OK') {\n //results[0].geometry.location;\n\n if (typeof callback === 'function') {\n callback(results);\n }\n\n return results;\n } else {\n console.error(\n `${ui.getName()}: Geocode was not successful for the following reason: ${status}`,\n );\n }\n },\n );\n }\n\n reverseGeocode(latLng, callback) {\n const ui = this;\n\n ui.geocoder.geocode(\n {\n location: latlng,\n },\n (results, status) => {\n if (status === 'OK') {\n //results[0].formatted_address;\n\n if (typeof callback === 'function') {\n callback(results);\n }\n\n return results;\n } else {\n console.error(\n `${ui.getName()}: Reverse Geocoding was not successful for the following reason: ${status}`,\n );\n }\n },\n );\n }\n\n addGeoJson(config) {\n const ui = this;\n\n const firstMarker = config['geojson'].features[0].geometry.coordinates;\n //Map.setCenter(firstMarker);\n const bounds = new google.maps.LatLngBounds();\n\n // add markers to map\n config['geojson'].features.forEach((marker) => {\n const id = marker.id;\n const crds = marker.geometry.coordinates;\n const content = marker.properties.content;\n\n ui.addMarker(crds, {\n id,\n content,\n icon: marker.icon,\n flyToMarker: config['flyToMarker'],\n });\n\n bounds.extend({\n lat: crds[1],\n lng: crds[0],\n });\n });\n\n ui.map.fitBounds(bounds, {\n padding: 30,\n }); //panToBounds\n\n ui.default_bounds = bounds;\n ui.default_zoom = ui.map.getZoom();\n }\n\n getMap() {\n const ui = this;\n return ui.map;\n }\n\n getPopup() {\n const ui = this;\n return ui.popup;\n }\n\n restoreBounds() {\n const ui = this;\n\n if (ui.default_bounds) {\n ui.map.fitBounds(ui.default_bounds, {\n padding: 30,\n }); //panToBounds\n } else {\n if (ui.markers[0]) {\n ui.map.setCenter(ui.markers[0].getPosition());\n }\n\n ui.restoreZoom();\n }\n }\n\n restoreZoom() {\n const ui = this;\n\n ui.map.setZoom(ui.default_zoom);\n }\n }\n\n return GoogleMapsDriver;\n})($);\n\nexport default GoogleMapsDriver;\n","/**\n * Add your global events here\n */\n\nimport MAP_DRIVER from './_components/drivers/_map.google';\n//import MAP_DRIVER from './_components/drivers/_map.mapbox';\n\nconst CONSTS = {\n ENVS: [\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'xl',\n 'xxl',\n 'xxxl',\n ],\n MAP_DRIVER,\n};\n\nexport default CONSTS;\n","/**\n * Add your global events here\n */\n\nmodule.exports = {\n AJAX: 'ajax-load',\n TABHIDDEN: 'tab-hidden',\n TABFOCUSED: 'tab-focused',\n OFFLINE: 'offline',\n ONLINE: 'online',\n LOADED: 'load',\n SWIPELEFT: 'swipeleft panleft',\n SWIPERIGHT: 'swiperight panright',\n ALLERTAPPEARED: 'alert-appeared',\n ALERTREMOVED: 'alert-removed',\n LODEDANDREADY: 'load-ready',\n LAZYIMAGEREADY: 'image-lazy-bg-loaded',\n LAZYIMAGESREADY: 'images-lazy-loaded',\n MAPLOADED: 'map-loaded',\n MAPAPILOADED: 'map-api-loaded',\n MAPMARKERCLICK: 'map-marker-click',\n MAPPOPUPCLOSE: 'map-popup-close',\n SCROLL: 'scroll',\n RESIZE: 'resize',\n CAROUSEL_READY: 'bs.carousel.ready',\n SET_TARGET_UPDATE: 'set-target-update',\n RESTORE_FIELD: 'restore-field',\n FORM_INIT_BASICS: 'form-basics',\n FORM_INIT_STEPPED: 'form-init-stepped',\n FORM_INIT_VALIDATE: 'form-init-validate',\n FORM_INIT_VALIDATE_FIELD: 'form-init-validate-field',\n FORM_INIT_STORAGE: 'form-init-storage',\n FORM_VALIDATION_FAILED: 'form-validation-failed',\n FORM_STEPPED_NEW_STEP: 'form-new-step',\n FORM_STEPPED_FIRST_STEP: 'form-first-step',\n FORM_STEPPED_LAST_STEP: 'form-last-step',\n FORM_FIELDS: 'input,textarea,select',\n};\n","\"use strict\";\n\nimport $ from 'jquery';\nimport Events from '../_events';\n\n// Mapbox API\nimport '../_components/_ui.map.api';\n\nconst LocationUI = (($) => {\n // Constants\n const W = window;\n const D = document;\n const $Body = $('body');\n\n const NAME = 'LocationUI';\n class LocationUI {\n // Static methods\n\n static init() {\n this.dispose();\n console.log(`Initializing: ${NAME}`);\n }\n\n static initMap() {\n $('.mapAPI-map-container').find('.marker').on(`${Events.MAPMARKERCLICK}`, (e) => {\n const $el = $(e.currentTarget);\n const id = $el.data('id');\n\n $Body.find('.locations .location').removeClass('active');\n $Body.find(`.locations .location[data-id=\"${ id }\"]`).addClass('active');\n });\n\n $Body.find('.locations .location').on('click', (e) => {\n const $el = $(e.currentTarget);\n const id = $el.data('id');\n\n $Body.find(`#Marker${id}`).click();\n });\n\n $('.mapAPI-map-container').on(Events.MAPPOPUPCLOSE, (e) => {\n $Body.find('.locations .location').removeClass('active');\n });\n }\n\n static dispose() {\n console.log(`Destroying: ${NAME}`);\n }\n }\n\n $(W).on(`${Events.AJAX} ${Events.LOADED}`, () => {\n LocationUI.init();\n });\n\n $(W).on(Events.MAPLOADED, () => {\n LocationUI.initMap();\n });\n\n return LocationUI;\n\n})($);\n\nexport default LocationUI;\n","module.exports = jQuery;"],"sourceRoot":""}

View File

@ -1,6 +1,6 @@
{
"name": "@a2nt/ss-bootstrap-ui-webpack-boilerplate",
"version": "1.7.9",
"version": "1.8.0",
"author": "Tony Air <tony@twma.pro>",
"license": "MIT",
"description": "This UI Kit allows you to build Bootstrap 4 webapp with some extra UI features. It's easy to extend and easy to convert HTML templates to CMS templates.",

View File

@ -4,7 +4,7 @@ import $ from 'jquery';
import Events from '../../_events';
import MarkerUI from './_map.google.marker';
const GoogleMapsDriver = ($ => {
const GoogleMapsDriver = (($) => {
class GoogleMapsDriver {
getName() {
return 'GoogleMapsDriver';
@ -39,13 +39,13 @@ const GoogleMapsDriver = ($ => {
const zoom = config['mapZoom'] ? config['mapZoom'] : 10;
const center = config['center']
? {
lat: config['center'][1],
lng: config['center'][0],
}
lat: config['center'][1],
lng: config['center'][0],
}
: {
lat: 0,
lng: 0,
};
lat: 0,
lng: 0,
};
const style = config['style'] ? config['style'] : null;
console.log(`${ui.getName()}: API is loaded`);
@ -124,7 +124,7 @@ const GoogleMapsDriver = ($ => {
$popup.find('.mapboxgl-popup-content .html').html(content);
$popup.find('.mapboxgl-popup-close-button').on('click', e => {
$popup.find('.mapboxgl-popup-close-button').on('click', (e) => {
e.preventDefault();
ui.hidePopup();
});
@ -209,7 +209,7 @@ const GoogleMapsDriver = ($ => {
const bounds = new google.maps.LatLngBounds();
// add markers to map
config['geojson'].features.forEach(marker => {
config['geojson'].features.forEach((marker) => {
const id = marker.id;
const crds = marker.geometry.coordinates;
const content = marker.properties.content;