From 5d3259a5a25b8b9df295fdf52b20d361483c40ff Mon Sep 17 00:00:00 2001 From: Tony Air Date: Tue, 26 Jan 2021 15:30:54 +0700 Subject: [PATCH] IMPR: Mobile friendly tables --- dist/css/app.css | 4 ++- dist/css/app_editor.css | 4 ++- dist/js/app.js | 2 +- dist/records.json | 52 -------------------------------------- dist/report.html | 4 +-- src/js/_main.js | 2 +- src/scss/types/editor.scss | 12 +++++++++ 7 files changed, 22 insertions(+), 58 deletions(-) diff --git a/dist/css/app.css b/dist/css/app.css index d124a38..4b07fa8 100644 --- a/dist/css/app.css +++ b/dist/css/app.css @@ -10832,7 +10832,9 @@ p:last-child { content: attr(data-label); font-weight: bold; width: 12rem; - min-width: 12rem; } } + min-width: 12rem; + padding: 0 0.5rem; + display: block; } } .typography > *:last-child { margin-bottom: 0; } diff --git a/dist/css/app_editor.css b/dist/css/app_editor.css index 56f6641..f7eeb00 100644 --- a/dist/css/app_editor.css +++ b/dist/css/app_editor.css @@ -438,5 +438,7 @@ iframe { content: attr(data-label); font-weight: bold; width: 12rem; - min-width: 12rem; } } + min-width: 12rem; + padding: 0 0.5rem; + display: block; } } diff --git a/dist/js/app.js b/dist/js/app.js index 06f54b4..20cbee6 100644 --- a/dist/js/app.js +++ b/dist/js/app.js @@ -177,7 +177,7 @@ eval("function _gaLt(event) {\n if (typeof ga !== 'function') {\n return;\n /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXTERNAL MODULE: external \"jQuery\"\nvar external_jQuery_ = __webpack_require__(\"jquery\");\nvar external_jQuery_default = /*#__PURE__*/__webpack_require__.n(external_jQuery_);\n;// CONCATENATED MODULE: ./src/scss/app.scss\n// extracted by mini-css-extract-plugin\n\n// EXTERNAL MODULE: ./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/util.js\nvar util = __webpack_require__(\"./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/util.js\");\n// EXTERNAL MODULE: ./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/alert.js\nvar dist_alert = __webpack_require__(\"./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/alert.js\");\n// EXTERNAL MODULE: ./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/button.js\nvar dist_button = __webpack_require__(\"./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/button.js\");\n// EXTERNAL MODULE: ./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/carousel.js\nvar carousel = __webpack_require__(\"./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/carousel.js\");\n// EXTERNAL MODULE: ./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/collapse.js\nvar collapse = __webpack_require__(\"./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/collapse.js\");\n// EXTERNAL MODULE: ./node_modules/.pnpm/hammerjs@2.0.8/node_modules/hammerjs/hammer.js\nvar hammer = __webpack_require__(\"./node_modules/.pnpm/hammerjs@2.0.8/node_modules/hammerjs/hammer.js\");\n// EXTERNAL MODULE: ./node_modules/.pnpm/jquery-hammerjs@2.0.0/node_modules/jquery-hammerjs/jquery.hammer.js\nvar jquery_hammer = __webpack_require__(\"./node_modules/.pnpm/jquery-hammerjs@2.0.0/node_modules/jquery-hammerjs/jquery.hammer.js\");\n;// CONCATENATED MODULE: ./src/js/_events.js\n/**\n * Add your global events here\n */\n/* harmony default export */ var _events = ({\n AJAX: 'ajax-load',\n AJAXMAIN: 'ajax-main-load',\n MAININIT: 'main-init',\n TABHIDDEN: 'tab-hidden',\n TABFOCUSED: 'tab-focused',\n OFFLINE: 'offline',\n ONLINE: 'online',\n BACKONLINE: 'back-online',\n TOUCHENABLE: 'touch-enabled',\n TOUCHDISABLED: 'touch-disabled',\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// EXTERNAL MODULE: ./node_modules/.pnpm/jquery-hoverintent@1.10.1/node_modules/jquery-hoverintent/jquery.hoverIntent.js\nvar jquery_hoverIntent = __webpack_require__(\"./node_modules/.pnpm/jquery-hoverintent@1.10.1/node_modules/jquery-hoverintent/jquery.hoverIntent.js\");\n;// CONCATENATED MODULE: ./node_modules/.pnpm/@googlemaps/markerclustererplus@1.0.3/node_modules/@googlemaps/markerclustererplus/dist/index.esm.js\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n\n/* global Reflect, Promise */\nvar _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n};\n\nfunction __extends(d, b) {\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nvar _assign = function __assign() {\n _assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return _assign.apply(this, arguments);\n};\n/**\r\n * Copyright 2019 Google LLC. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Extends an object's prototype by another's.\r\n *\r\n * @param type1 The Type to be extended.\r\n * @param type2 The Type to extend with.\r\n * @ignore\r\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nfunction extend(type1, type2) {\n // eslint-disable-next-line prefer-const\n for (var property in type2.prototype) {\n type1.prototype[property] = type2.prototype[property];\n }\n}\n/**\r\n * @ignore\r\n */\n\n\nvar OverlayViewSafe =\n/** @class */\nfunction () {\n function OverlayViewSafe() {\n // MarkerClusterer implements google.maps.OverlayView interface. We use the\n // extend function to extend MarkerClusterer with google.maps.OverlayView\n // because it might not always be available when the code is defined so we\n // look for it at the last possible moment. If it doesn't exist now then\n // there is no point going ahead :)\n extend(OverlayViewSafe, google.maps.OverlayView);\n }\n\n return OverlayViewSafe;\n}();\n/**\r\n * Copyright 2019 Google LLC. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n *\r\n * @hidden\r\n */\n\n\nfunction toCssText(styles) {\n return Object.keys(styles).reduce(function (acc, key) {\n if (styles[key]) {\n acc.push(key + \":\" + styles[key]);\n }\n\n return acc;\n }, []).join(\";\");\n}\n/**\r\n *\r\n * @hidden\r\n */\n\n\nfunction coercePixels(pixels) {\n return pixels ? pixels + \"px\" : undefined;\n}\n/**\r\n * A cluster icon.\r\n */\n\n\nvar ClusterIcon =\n/** @class */\nfunction (_super) {\n __extends(ClusterIcon, _super);\n /**\r\n * @param cluster_ The cluster with which the icon is to be associated.\r\n * @param styles_ An array of {@link ClusterIconStyle} defining the cluster icons\r\n * to use for various cluster sizes.\r\n */\n\n\n function ClusterIcon(cluster_, styles_) {\n var _this = _super.call(this) || this;\n\n _this.cluster_ = cluster_;\n _this.styles_ = styles_;\n _this.center_ = null;\n _this.div_ = null;\n _this.sums_ = null;\n _this.visible_ = false;\n _this.style = null;\n\n _this.setMap(cluster_.getMap()); // Note: this causes onAdd to be called\n\n\n return _this;\n }\n /**\r\n * Adds the icon to the DOM.\r\n */\n\n\n ClusterIcon.prototype.onAdd = function () {\n var _this = this;\n\n var cMouseDownInCluster;\n var cDraggingMapByCluster;\n var mc = this.cluster_.getMarkerClusterer();\n\n var _a = google.maps.version.split(\".\"),\n major = _a[0],\n minor = _a[1];\n\n var gmVersion = parseInt(major, 10) * 100 + parseInt(minor, 10);\n this.div_ = document.createElement(\"div\");\n\n if (this.visible_) {\n this.show();\n }\n\n this.getPanes().overlayMouseTarget.appendChild(this.div_); // Fix for Issue 157\n\n this.boundsChangedListener_ = google.maps.event.addListener(this.getMap(), \"bounds_changed\", function () {\n cDraggingMapByCluster = cMouseDownInCluster;\n });\n google.maps.event.addDomListener(this.div_, \"mousedown\", function () {\n cMouseDownInCluster = true;\n cDraggingMapByCluster = false;\n }); // March 1, 2018: Fix for this 3.32 exp bug, https://issuetracker.google.com/issues/73571522\n // But it doesn't work with earlier releases so do a version check.\n\n if (gmVersion >= 332) {\n // Ugly version-dependent code\n google.maps.event.addDomListener(this.div_, \"touchstart\", function (e) {\n e.stopPropagation();\n });\n }\n\n google.maps.event.addDomListener(this.div_, \"click\", function (e) {\n cMouseDownInCluster = false;\n\n if (!cDraggingMapByCluster) {\n /**\r\n * This event is fired when a cluster marker is clicked.\r\n * @name MarkerClusterer#click\r\n * @param {Cluster} c The cluster that was clicked.\r\n * @event\r\n */\n google.maps.event.trigger(mc, \"click\", _this.cluster_);\n google.maps.event.trigger(mc, \"clusterclick\", _this.cluster_); // deprecated name\n // The default click handler follows. Disable it by setting\n // the zoomOnClick property to false.\n\n if (mc.getZoomOnClick()) {\n // Zoom into the cluster.\n var mz_1 = mc.getMaxZoom();\n\n var theBounds_1 = _this.cluster_.getBounds();\n\n mc.getMap().fitBounds(theBounds_1); // There is a fix for Issue 170 here:\n\n setTimeout(function () {\n mc.getMap().fitBounds(theBounds_1); // Don't zoom beyond the max zoom level\n\n if (mz_1 !== null && mc.getMap().getZoom() > mz_1) {\n mc.getMap().setZoom(mz_1 + 1);\n }\n }, 100);\n } // Prevent event propagation to the map:\n\n\n e.cancelBubble = true;\n\n if (e.stopPropagation) {\n e.stopPropagation();\n }\n }\n });\n google.maps.event.addDomListener(this.div_, \"mouseover\", function () {\n /**\r\n * This event is fired when the mouse moves over a cluster marker.\r\n * @name MarkerClusterer#mouseover\r\n * @param {Cluster} c The cluster that the mouse moved over.\r\n * @event\r\n */\n google.maps.event.trigger(mc, \"mouseover\", _this.cluster_);\n });\n google.maps.event.addDomListener(this.div_, \"mouseout\", function () {\n /**\r\n * This event is fired when the mouse moves out of a cluster marker.\r\n * @name MarkerClusterer#mouseout\r\n * @param {Cluster} c The cluster that the mouse moved out of.\r\n * @event\r\n */\n google.maps.event.trigger(mc, \"mouseout\", _this.cluster_);\n });\n };\n /**\r\n * Removes the icon from the DOM.\r\n */\n\n\n ClusterIcon.prototype.onRemove = function () {\n if (this.div_ && this.div_.parentNode) {\n this.hide();\n google.maps.event.removeListener(this.boundsChangedListener_);\n google.maps.event.clearInstanceListeners(this.div_);\n this.div_.parentNode.removeChild(this.div_);\n this.div_ = null;\n }\n };\n /**\r\n * Draws the icon.\r\n */\n\n\n ClusterIcon.prototype.draw = function () {\n if (this.visible_) {\n var pos = this.getPosFromLatLng_(this.center_);\n this.div_.style.top = pos.y + \"px\";\n this.div_.style.left = pos.x + \"px\";\n }\n };\n /**\r\n * Hides the icon.\r\n */\n\n\n ClusterIcon.prototype.hide = function () {\n if (this.div_) {\n this.div_.style.display = \"none\";\n }\n\n this.visible_ = false;\n };\n /**\r\n * Positions and shows the icon.\r\n */\n\n\n ClusterIcon.prototype.show = function () {\n if (this.div_) {\n this.div_.className = this.className_;\n this.div_.style.cssText = this.createCss_(this.getPosFromLatLng_(this.center_));\n this.div_.innerHTML = (this.style.url ? this.getImageElementHtml() : \"\") + this.getLabelDivHtml();\n\n if (typeof this.sums_.title === \"undefined\" || this.sums_.title === \"\") {\n this.div_.title = this.cluster_.getMarkerClusterer().getTitle();\n } else {\n this.div_.title = this.sums_.title;\n }\n\n this.div_.style.display = \"\";\n }\n\n this.visible_ = true;\n };\n\n ClusterIcon.prototype.getLabelDivHtml = function () {\n var mc = this.cluster_.getMarkerClusterer();\n var ariaLabel = mc.ariaLabelFn(this.sums_.text);\n var divStyle = {\n position: \"absolute\",\n top: coercePixels(this.anchorText_[0]),\n left: coercePixels(this.anchorText_[1]),\n color: this.style.textColor,\n \"font-size\": coercePixels(this.style.textSize),\n \"font-family\": this.style.fontFamily,\n \"font-weight\": this.style.fontWeight,\n \"font-style\": this.style.fontStyle,\n \"text-decoration\": this.style.textDecoration,\n \"text-align\": \"center\",\n width: coercePixels(this.style.width),\n \"line-height\": coercePixels(this.style.textLineHeight)\n };\n return \"\\n
\\n \" + this.sums_.text + \"\\n
\\n\";\n };\n\n ClusterIcon.prototype.getImageElementHtml = function () {\n // NOTE: values must be specified in px units\n var bp = (this.style.backgroundPosition || \"0 0\").split(\" \");\n var spriteH = parseInt(bp[0].replace(/^\\s+|\\s+$/g, \"\"), 10);\n var spriteV = parseInt(bp[1].replace(/^\\s+|\\s+$/g, \"\"), 10);\n var dimensions = {};\n\n if (this.cluster_.getMarkerClusterer().getEnableRetinaIcons()) {\n dimensions = {\n width: coercePixels(this.style.width),\n height: coercePixels(this.style.height)\n };\n } else {\n var _a = [-1 * spriteV, -1 * spriteH + this.style.width, -1 * spriteV + this.style.height, -1 * spriteH],\n Y1 = _a[0],\n X1 = _a[1],\n Y2 = _a[2],\n X2 = _a[3];\n dimensions = {\n clip: \"rect(\" + Y1 + \"px, \" + X1 + \"px, \" + Y2 + \"px, \" + X2 + \"px)\"\n };\n }\n\n var cssText = toCssText(_assign({\n position: \"absolute\",\n top: coercePixels(spriteV),\n left: coercePixels(spriteH)\n }, dimensions));\n return \"\\\"\"\";\n };\n /**\r\n * Sets the icon styles to the appropriate element in the styles array.\r\n *\r\n * @ignore\r\n * @param sums The icon label text and styles index.\r\n */\n\n\n ClusterIcon.prototype.useStyle = function (sums) {\n this.sums_ = sums;\n var index = Math.max(0, sums.index - 1);\n index = Math.min(this.styles_.length - 1, index);\n this.style = this.styles_[index];\n this.anchorText_ = this.style.anchorText || [0, 0];\n this.anchorIcon_ = this.style.anchorIcon || [Math.floor(this.style.height / 2), Math.floor(this.style.width / 2)];\n this.className_ = this.cluster_.getMarkerClusterer().getClusterClass() + \" \" + (this.style.className || \"cluster-\" + index);\n };\n /**\r\n * Sets the position at which to center the icon.\r\n *\r\n * @param center The latlng to set as the center.\r\n */\n\n\n ClusterIcon.prototype.setCenter = function (center) {\n this.center_ = center;\n };\n /**\r\n * Creates the `cssText` style parameter based on the position of the icon.\r\n *\r\n * @param pos The position of the icon.\r\n * @return The CSS style text.\r\n */\n\n\n ClusterIcon.prototype.createCss_ = function (pos) {\n return toCssText({\n \"z-index\": \"\" + this.cluster_.getMarkerClusterer().getZIndex(),\n top: coercePixels(pos.y),\n left: coercePixels(pos.x),\n width: coercePixels(this.style.width),\n height: coercePixels(this.style.height),\n cursor: \"pointer\",\n position: \"absolute\",\n \"-webkit-user-select\": \"none\",\n \"-khtml-user-select\": \"none\",\n \"-moz-user-select\": \"none\",\n \"-o-user-select\": \"none\",\n \"user-select\": \"none\"\n });\n };\n /**\r\n * Returns the position at which to place the DIV depending on the latlng.\r\n *\r\n * @param latlng The position in latlng.\r\n * @return The position in pixels.\r\n */\n\n\n ClusterIcon.prototype.getPosFromLatLng_ = function (latlng) {\n var pos = this.getProjection().fromLatLngToDivPixel(latlng);\n pos.x = Math.floor(pos.x - this.anchorIcon_[1]);\n pos.y = Math.floor(pos.y - this.anchorIcon_[0]);\n return pos;\n };\n\n return ClusterIcon;\n}(OverlayViewSafe);\n/**\r\n * Copyright 2019 Google LLC. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Creates a single cluster that manages a group of proximate markers.\r\n * Used internally, do not call this constructor directly.\r\n */\n\n\nvar Cluster =\n/** @class */\nfunction () {\n /**\r\n *\r\n * @param markerClusterer_ The `MarkerClusterer` object with which this\r\n * cluster is associated.\r\n */\n function Cluster(markerClusterer_) {\n this.markerClusterer_ = markerClusterer_;\n this.map_ = this.markerClusterer_.getMap();\n this.minClusterSize_ = this.markerClusterer_.getMinimumClusterSize();\n this.averageCenter_ = this.markerClusterer_.getAverageCenter();\n this.markers_ = []; // TODO: type;\n\n this.center_ = null;\n this.bounds_ = null;\n this.clusterIcon_ = new ClusterIcon(this, this.markerClusterer_.getStyles());\n }\n /**\r\n * Returns the number of markers managed by the cluster. You can call this from\r\n * a `click`, `mouseover`, or `mouseout` event handler for the `MarkerClusterer` object.\r\n *\r\n * @return The number of markers in the cluster.\r\n */\n\n\n Cluster.prototype.getSize = function () {\n return this.markers_.length;\n };\n /**\r\n * Returns the array of markers managed by the cluster. You can call this from\r\n * a `click`, `mouseover`, or `mouseout` event handler for the `MarkerClusterer` object.\r\n *\r\n * @return The array of markers in the cluster.\r\n */\n\n\n Cluster.prototype.getMarkers = function () {\n return this.markers_;\n };\n /**\r\n * Returns the center of the cluster. You can call this from\r\n * a `click`, `mouseover`, or `mouseout` event handler\r\n * for the `MarkerClusterer` object.\r\n *\r\n * @return The center of the cluster.\r\n */\n\n\n Cluster.prototype.getCenter = function () {\n return this.center_;\n };\n /**\r\n * Returns the map with which the cluster is associated.\r\n *\r\n * @return The map.\r\n * @ignore\r\n */\n\n\n Cluster.prototype.getMap = function () {\n return this.map_;\n };\n /**\r\n * Returns the `MarkerClusterer` object with which the cluster is associated.\r\n *\r\n * @return The associated marker clusterer.\r\n * @ignore\r\n */\n\n\n Cluster.prototype.getMarkerClusterer = function () {\n return this.markerClusterer_;\n };\n /**\r\n * Returns the bounds of the cluster.\r\n *\r\n * @return the cluster bounds.\r\n * @ignore\r\n */\n\n\n Cluster.prototype.getBounds = function () {\n var bounds = new google.maps.LatLngBounds(this.center_, this.center_);\n var markers = this.getMarkers();\n\n for (var i = 0; i < markers.length; i++) {\n bounds.extend(markers[i].getPosition());\n }\n\n return bounds;\n };\n /**\r\n * Removes the cluster from the map.\r\n *\r\n * @ignore\r\n */\n\n\n Cluster.prototype.remove = function () {\n this.clusterIcon_.setMap(null);\n this.markers_ = [];\n delete this.markers_;\n };\n /**\r\n * Adds a marker to the cluster.\r\n *\r\n * @param marker The marker to be added.\r\n * @return True if the marker was added.\r\n * @ignore\r\n */\n\n\n Cluster.prototype.addMarker = function (marker) {\n if (this.isMarkerAlreadyAdded_(marker)) {\n return false;\n }\n\n if (!this.center_) {\n this.center_ = marker.getPosition();\n this.calculateBounds_();\n } else {\n if (this.averageCenter_) {\n var l = this.markers_.length + 1;\n var lat = (this.center_.lat() * (l - 1) + marker.getPosition().lat()) / l;\n var lng = (this.center_.lng() * (l - 1) + marker.getPosition().lng()) / l;\n this.center_ = new google.maps.LatLng(lat, lng);\n this.calculateBounds_();\n }\n }\n\n marker.isAdded = true;\n this.markers_.push(marker);\n var mCount = this.markers_.length;\n var mz = this.markerClusterer_.getMaxZoom();\n\n if (mz !== null && this.map_.getZoom() > mz) {\n // Zoomed in past max zoom, so show the marker.\n if (marker.getMap() !== this.map_) {\n marker.setMap(this.map_);\n }\n } else if (mCount < this.minClusterSize_) {\n // Min cluster size not reached so show the marker.\n if (marker.getMap() !== this.map_) {\n marker.setMap(this.map_);\n }\n } else if (mCount === this.minClusterSize_) {\n // Hide the markers that were showing.\n for (var i = 0; i < mCount; i++) {\n this.markers_[i].setMap(null);\n }\n } else {\n marker.setMap(null);\n }\n\n return true;\n };\n /**\r\n * Determines if a marker lies within the cluster's bounds.\r\n *\r\n * @param marker The marker to check.\r\n * @return True if the marker lies in the bounds.\r\n * @ignore\r\n */\n\n\n Cluster.prototype.isMarkerInClusterBounds = function (marker) {\n return this.bounds_.contains(marker.getPosition());\n };\n /**\r\n * Calculates the extended bounds of the cluster with the grid.\r\n */\n\n\n Cluster.prototype.calculateBounds_ = function () {\n var bounds = new google.maps.LatLngBounds(this.center_, this.center_);\n this.bounds_ = this.markerClusterer_.getExtendedBounds(bounds);\n };\n /**\r\n * Updates the cluster icon.\r\n */\n\n\n Cluster.prototype.updateIcon = function () {\n var mCount = this.markers_.length;\n var mz = this.markerClusterer_.getMaxZoom();\n\n if (mz !== null && this.map_.getZoom() > mz) {\n this.clusterIcon_.hide();\n return;\n }\n\n if (mCount < this.minClusterSize_) {\n // Min cluster size not yet reached.\n this.clusterIcon_.hide();\n return;\n }\n\n var numStyles = this.markerClusterer_.getStyles().length;\n var sums = this.markerClusterer_.getCalculator()(this.markers_, numStyles);\n this.clusterIcon_.setCenter(this.center_);\n this.clusterIcon_.useStyle(sums);\n this.clusterIcon_.show();\n };\n /**\r\n * Determines if a marker has already been added to the cluster.\r\n *\r\n * @param marker The marker to check.\r\n * @return True if the marker has already been added.\r\n */\n\n\n Cluster.prototype.isMarkerAlreadyAdded_ = function (marker) {\n if (this.markers_.indexOf) {\n return this.markers_.indexOf(marker) !== -1;\n } else {\n for (var i = 0; i < this.markers_.length; i++) {\n if (marker === this.markers_[i]) {\n return true;\n }\n }\n }\n\n return false;\n };\n\n return Cluster;\n}();\n/**\r\n * Copyright 2019 Google LLC. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * @ignore\r\n */\n\n\nvar getOption = function getOption(options, prop, def) {\n if (options[prop] !== undefined) {\n return options[prop];\n } else {\n return def;\n }\n};\n\nvar MarkerClusterer =\n/** @class */\nfunction (_super) {\n __extends(MarkerClusterer, _super);\n /**\r\n * Creates a MarkerClusterer object with the options specified in {@link MarkerClustererOptions}.\r\n * @param map The Google map to attach to.\r\n * @param markers The markers to be added to the cluster.\r\n * @param options The optional parameters.\r\n */\n\n\n function MarkerClusterer(map, markers, options) {\n if (markers === void 0) {\n markers = [];\n }\n\n if (options === void 0) {\n options = {};\n }\n\n var _this = _super.call(this) || this;\n\n _this.options = options;\n _this.markers_ = [];\n _this.clusters_ = [];\n _this.listeners_ = [];\n _this.activeMap_ = null;\n _this.ready_ = false;\n\n _this.ariaLabelFn = _this.options.ariaLabelFn || function () {\n return \"\";\n };\n\n _this.zIndex_ = _this.options.zIndex || google.maps.Marker.MAX_ZINDEX + 1;\n _this.gridSize_ = _this.options.gridSize || 60;\n _this.minClusterSize_ = _this.options.minimumClusterSize || 2;\n _this.maxZoom_ = _this.options.maxZoom || null;\n _this.styles_ = _this.options.styles || [];\n _this.title_ = _this.options.title || \"\";\n _this.zoomOnClick_ = getOption(_this.options, \"zoomOnClick\", true);\n _this.averageCenter_ = getOption(_this.options, \"averageCenter\", false);\n _this.ignoreHidden_ = getOption(_this.options, \"ignoreHidden\", false);\n _this.enableRetinaIcons_ = getOption(_this.options, \"enableRetinaIcons\", false);\n _this.imagePath_ = _this.options.imagePath || MarkerClusterer.IMAGE_PATH;\n _this.imageExtension_ = _this.options.imageExtension || MarkerClusterer.IMAGE_EXTENSION;\n _this.imageSizes_ = _this.options.imageSizes || MarkerClusterer.IMAGE_SIZES;\n _this.calculator_ = _this.options.calculator || MarkerClusterer.CALCULATOR;\n _this.batchSize_ = _this.options.batchSize || MarkerClusterer.BATCH_SIZE;\n _this.batchSizeIE_ = _this.options.batchSizeIE || MarkerClusterer.BATCH_SIZE_IE;\n _this.clusterClass_ = _this.options.clusterClass || \"cluster\";\n\n if (navigator.userAgent.toLowerCase().indexOf(\"msie\") !== -1) {\n // Try to avoid IE timeout when processing a huge number of markers:\n _this.batchSize_ = _this.batchSizeIE_;\n }\n\n _this.setupStyles_();\n\n _this.addMarkers(markers, true);\n\n _this.setMap(map); // Note: this causes onAdd to be called\n\n\n return _this;\n }\n /**\r\n * Implementation of the onAdd interface method.\r\n * @ignore\r\n */\n\n\n MarkerClusterer.prototype.onAdd = function () {\n var _this = this;\n\n this.activeMap_ = this.getMap();\n this.ready_ = true;\n this.repaint();\n this.prevZoom_ = this.getMap().getZoom(); // Add the map event listeners\n\n this.listeners_ = [google.maps.event.addListener(this.getMap(), \"zoom_changed\", function () {\n var map = _this.getMap(); // eslint-disable-line @typescript-eslint/no-explicit-any\n // Fix for bug #407\n // Determines map type and prevents illegal zoom levels\n\n\n var minZoom = map.minZoom || 0;\n var maxZoom = Math.min(map.maxZoom || 100, map.mapTypes[map.getMapTypeId()].maxZoom);\n var zoom = Math.min(Math.max(_this.getMap().getZoom(), minZoom), maxZoom);\n\n if (_this.prevZoom_ != zoom) {\n _this.prevZoom_ = zoom;\n\n _this.resetViewport_(false);\n }\n }), google.maps.event.addListener(this.getMap(), \"idle\", function () {\n _this.redraw_();\n })];\n };\n /**\r\n * Implementation of the onRemove interface method.\r\n * Removes map event listeners and all cluster icons from the DOM.\r\n * All managed markers are also put back on the map.\r\n * @ignore\r\n */\n\n\n MarkerClusterer.prototype.onRemove = function () {\n // Put all the managed markers back on the map:\n for (var i = 0; i < this.markers_.length; i++) {\n if (this.markers_[i].getMap() !== this.activeMap_) {\n this.markers_[i].setMap(this.activeMap_);\n }\n } // Remove all clusters:\n\n\n for (var i = 0; i < this.clusters_.length; i++) {\n this.clusters_[i].remove();\n }\n\n this.clusters_ = []; // Remove map event listeners:\n\n for (var i = 0; i < this.listeners_.length; i++) {\n google.maps.event.removeListener(this.listeners_[i]);\n }\n\n this.listeners_ = [];\n this.activeMap_ = null;\n this.ready_ = false;\n };\n /**\r\n * Implementation of the draw interface method.\r\n * @ignore\r\n */\n\n\n MarkerClusterer.prototype.draw = function () {};\n /**\r\n * Sets up the styles object.\r\n */\n\n\n MarkerClusterer.prototype.setupStyles_ = function () {\n if (this.styles_.length > 0) {\n return;\n }\n\n for (var i = 0; i < this.imageSizes_.length; i++) {\n var size = this.imageSizes_[i];\n this.styles_.push(MarkerClusterer.withDefaultStyle({\n url: this.imagePath_ + (i + 1) + \".\" + this.imageExtension_,\n height: size,\n width: size\n }));\n }\n };\n /**\r\n * Fits the map to the bounds of the markers managed by the clusterer.\r\n */\n\n\n MarkerClusterer.prototype.fitMapToMarkers = function (padding) {\n var markers = this.getMarkers();\n var bounds = new google.maps.LatLngBounds();\n\n for (var i = 0; i < markers.length; i++) {\n // March 3, 2018: Bug fix -- honor the ignoreHidden property\n if (markers[i].getVisible() || !this.getIgnoreHidden()) {\n bounds.extend(markers[i].getPosition());\n }\n }\n\n this.getMap().fitBounds(bounds, padding);\n };\n /**\r\n * Returns the value of the `gridSize` property.\r\n *\r\n * @return The grid size.\r\n */\n\n\n MarkerClusterer.prototype.getGridSize = function () {\n return this.gridSize_;\n };\n /**\r\n * Sets the value of the `gridSize` property.\r\n *\r\n * @param gridSize The grid size.\r\n */\n\n\n MarkerClusterer.prototype.setGridSize = function (gridSize) {\n this.gridSize_ = gridSize;\n };\n /**\r\n * Returns the value of the `minimumClusterSize` property.\r\n *\r\n * @return The minimum cluster size.\r\n */\n\n\n MarkerClusterer.prototype.getMinimumClusterSize = function () {\n return this.minClusterSize_;\n };\n /**\r\n * Sets the value of the `minimumClusterSize` property.\r\n *\r\n * @param minimumClusterSize The minimum cluster size.\r\n */\n\n\n MarkerClusterer.prototype.setMinimumClusterSize = function (minimumClusterSize) {\n this.minClusterSize_ = minimumClusterSize;\n };\n /**\r\n * Returns the value of the `maxZoom` property.\r\n *\r\n * @return The maximum zoom level.\r\n */\n\n\n MarkerClusterer.prototype.getMaxZoom = function () {\n return this.maxZoom_;\n };\n /**\r\n * Sets the value of the `maxZoom` property.\r\n *\r\n * @param maxZoom The maximum zoom level.\r\n */\n\n\n MarkerClusterer.prototype.setMaxZoom = function (maxZoom) {\n this.maxZoom_ = maxZoom;\n };\n\n MarkerClusterer.prototype.getZIndex = function () {\n return this.zIndex_;\n };\n\n MarkerClusterer.prototype.setZIndex = function (zIndex) {\n this.zIndex_ = zIndex;\n };\n /**\r\n * Returns the value of the `styles` property.\r\n *\r\n * @return The array of styles defining the cluster markers to be used.\r\n */\n\n\n MarkerClusterer.prototype.getStyles = function () {\n return this.styles_;\n };\n /**\r\n * Sets the value of the `styles` property.\r\n *\r\n * @param styles The array of styles to use.\r\n */\n\n\n MarkerClusterer.prototype.setStyles = function (styles) {\n this.styles_ = styles;\n };\n /**\r\n * Returns the value of the `title` property.\r\n *\r\n * @return The content of the title text.\r\n */\n\n\n MarkerClusterer.prototype.getTitle = function () {\n return this.title_;\n };\n /**\r\n * Sets the value of the `title` property.\r\n *\r\n * @param title The value of the title property.\r\n */\n\n\n MarkerClusterer.prototype.setTitle = function (title) {\n this.title_ = title;\n };\n /**\r\n * Returns the value of the `zoomOnClick` property.\r\n *\r\n * @return True if zoomOnClick property is set.\r\n */\n\n\n MarkerClusterer.prototype.getZoomOnClick = function () {\n return this.zoomOnClick_;\n };\n /**\r\n * Sets the value of the `zoomOnClick` property.\r\n *\r\n * @param zoomOnClick The value of the zoomOnClick property.\r\n */\n\n\n MarkerClusterer.prototype.setZoomOnClick = function (zoomOnClick) {\n this.zoomOnClick_ = zoomOnClick;\n };\n /**\r\n * Returns the value of the `averageCenter` property.\r\n *\r\n * @return True if averageCenter property is set.\r\n */\n\n\n MarkerClusterer.prototype.getAverageCenter = function () {\n return this.averageCenter_;\n };\n /**\r\n * Sets the value of the `averageCenter` property.\r\n *\r\n * @param averageCenter The value of the averageCenter property.\r\n */\n\n\n MarkerClusterer.prototype.setAverageCenter = function (averageCenter) {\n this.averageCenter_ = averageCenter;\n };\n /**\r\n * Returns the value of the `ignoreHidden` property.\r\n *\r\n * @return True if ignoreHidden property is set.\r\n */\n\n\n MarkerClusterer.prototype.getIgnoreHidden = function () {\n return this.ignoreHidden_;\n };\n /**\r\n * Sets the value of the `ignoreHidden` property.\r\n *\r\n * @param ignoreHidden The value of the ignoreHidden property.\r\n */\n\n\n MarkerClusterer.prototype.setIgnoreHidden = function (ignoreHidden) {\n this.ignoreHidden_ = ignoreHidden;\n };\n /**\r\n * Returns the value of the `enableRetinaIcons` property.\r\n *\r\n * @return True if enableRetinaIcons property is set.\r\n */\n\n\n MarkerClusterer.prototype.getEnableRetinaIcons = function () {\n return this.enableRetinaIcons_;\n };\n /**\r\n * Sets the value of the `enableRetinaIcons` property.\r\n *\r\n * @param enableRetinaIcons The value of the enableRetinaIcons property.\r\n */\n\n\n MarkerClusterer.prototype.setEnableRetinaIcons = function (enableRetinaIcons) {\n this.enableRetinaIcons_ = enableRetinaIcons;\n };\n /**\r\n * Returns the value of the `imageExtension` property.\r\n *\r\n * @return The value of the imageExtension property.\r\n */\n\n\n MarkerClusterer.prototype.getImageExtension = function () {\n return this.imageExtension_;\n };\n /**\r\n * Sets the value of the `imageExtension` property.\r\n *\r\n * @param imageExtension The value of the imageExtension property.\r\n */\n\n\n MarkerClusterer.prototype.setImageExtension = function (imageExtension) {\n this.imageExtension_ = imageExtension;\n };\n /**\r\n * Returns the value of the `imagePath` property.\r\n *\r\n * @return The value of the imagePath property.\r\n */\n\n\n MarkerClusterer.prototype.getImagePath = function () {\n return this.imagePath_;\n };\n /**\r\n * Sets the value of the `imagePath` property.\r\n *\r\n * @param imagePath The value of the imagePath property.\r\n */\n\n\n MarkerClusterer.prototype.setImagePath = function (imagePath) {\n this.imagePath_ = imagePath;\n };\n /**\r\n * Returns the value of the `imageSizes` property.\r\n *\r\n * @return The value of the imageSizes property.\r\n */\n\n\n MarkerClusterer.prototype.getImageSizes = function () {\n return this.imageSizes_;\n };\n /**\r\n * Sets the value of the `imageSizes` property.\r\n *\r\n * @param imageSizes The value of the imageSizes property.\r\n */\n\n\n MarkerClusterer.prototype.setImageSizes = function (imageSizes) {\n this.imageSizes_ = imageSizes;\n };\n /**\r\n * Returns the value of the `calculator` property.\r\n *\r\n * @return the value of the calculator property.\r\n */\n\n\n MarkerClusterer.prototype.getCalculator = function () {\n return this.calculator_;\n };\n /**\r\n * Sets the value of the `calculator` property.\r\n *\r\n * @param calculator The value of the calculator property.\r\n */\n\n\n MarkerClusterer.prototype.setCalculator = function (calculator) {\n this.calculator_ = calculator;\n };\n /**\r\n * Returns the value of the `batchSizeIE` property.\r\n *\r\n * @return the value of the batchSizeIE property.\r\n */\n\n\n MarkerClusterer.prototype.getBatchSizeIE = function () {\n return this.batchSizeIE_;\n };\n /**\r\n * Sets the value of the `batchSizeIE` property.\r\n *\r\n * @param batchSizeIE The value of the batchSizeIE property.\r\n */\n\n\n MarkerClusterer.prototype.setBatchSizeIE = function (batchSizeIE) {\n this.batchSizeIE_ = batchSizeIE;\n };\n /**\r\n * Returns the value of the `clusterClass` property.\r\n *\r\n * @return the value of the clusterClass property.\r\n */\n\n\n MarkerClusterer.prototype.getClusterClass = function () {\n return this.clusterClass_;\n };\n /**\r\n * Sets the value of the `clusterClass` property.\r\n *\r\n * @param clusterClass The value of the clusterClass property.\r\n */\n\n\n MarkerClusterer.prototype.setClusterClass = function (clusterClass) {\n this.clusterClass_ = clusterClass;\n };\n /**\r\n * Returns the array of markers managed by the clusterer.\r\n *\r\n * @return The array of markers managed by the clusterer.\r\n */\n\n\n MarkerClusterer.prototype.getMarkers = function () {\n return this.markers_;\n };\n /**\r\n * Returns the number of markers managed by the clusterer.\r\n *\r\n * @return The number of markers.\r\n */\n\n\n MarkerClusterer.prototype.getTotalMarkers = function () {\n return this.markers_.length;\n };\n /**\r\n * Returns the current array of clusters formed by the clusterer.\r\n *\r\n * @return The array of clusters formed by the clusterer.\r\n */\n\n\n MarkerClusterer.prototype.getClusters = function () {\n return this.clusters_;\n };\n /**\r\n * Returns the number of clusters formed by the clusterer.\r\n *\r\n * @return The number of clusters formed by the clusterer.\r\n */\n\n\n MarkerClusterer.prototype.getTotalClusters = function () {\n return this.clusters_.length;\n };\n /**\r\n * Adds a marker to the clusterer. The clusters are redrawn unless\r\n * `nodraw` is set to `true`.\r\n *\r\n * @param marker The marker to add.\r\n * @param nodraw Set to `true` to prevent redrawing.\r\n */\n\n\n MarkerClusterer.prototype.addMarker = function (marker, nodraw) {\n this.pushMarkerTo_(marker);\n\n if (!nodraw) {\n this.redraw_();\n }\n };\n /**\r\n * Adds an array of markers to the clusterer. The clusters are redrawn unless\r\n * `nodraw` is set to `true`.\r\n *\r\n * @param markers The markers to add.\r\n * @param nodraw Set to `true` to prevent redrawing.\r\n */\n\n\n MarkerClusterer.prototype.addMarkers = function (markers, nodraw) {\n for (var key in markers) {\n if (Object.prototype.hasOwnProperty.call(markers, key)) {\n this.pushMarkerTo_(markers[key]);\n }\n }\n\n if (!nodraw) {\n this.redraw_();\n }\n };\n /**\r\n * Pushes a marker to the clusterer.\r\n *\r\n * @param marker The marker to add.\r\n */\n\n\n MarkerClusterer.prototype.pushMarkerTo_ = function (marker) {\n var _this = this; // If the marker is draggable add a listener so we can update the clusters on the dragend:\n\n\n if (marker.getDraggable()) {\n google.maps.event.addListener(marker, \"dragend\", function () {\n if (_this.ready_) {\n marker.isAdded = false;\n\n _this.repaint();\n }\n });\n }\n\n marker.isAdded = false;\n this.markers_.push(marker);\n };\n /**\r\n * Removes a marker from the cluster. The clusters are redrawn unless\r\n * `nodraw` is set to `true`. Returns `true` if the\r\n * marker was removed from the clusterer.\r\n *\r\n * @param marker The marker to remove.\r\n * @param nodraw Set to `true` to prevent redrawing.\r\n * @return True if the marker was removed from the clusterer.\r\n */\n\n\n MarkerClusterer.prototype.removeMarker = function (marker, nodraw) {\n var removed = this.removeMarker_(marker);\n\n if (!nodraw && removed) {\n this.repaint();\n }\n\n return removed;\n };\n /**\r\n * Removes an array of markers from the cluster. The clusters are redrawn unless\r\n * `nodraw` is set to `true`. Returns `true` if markers were removed from the clusterer.\r\n *\r\n * @param markers The markers to remove.\r\n * @param nodraw Set to `true` to prevent redrawing.\r\n * @return True if markers were removed from the clusterer.\r\n */\n\n\n MarkerClusterer.prototype.removeMarkers = function (markers, nodraw) {\n var removed = false;\n\n for (var i = 0; i < markers.length; i++) {\n var r = this.removeMarker_(markers[i]);\n removed = removed || r;\n }\n\n if (!nodraw && removed) {\n this.repaint();\n }\n\n return removed;\n };\n /**\r\n * Removes a marker and returns true if removed, false if not.\r\n *\r\n * @param marker The marker to remove\r\n * @return Whether the marker was removed or not\r\n */\n\n\n MarkerClusterer.prototype.removeMarker_ = function (marker) {\n var index = -1;\n\n if (this.markers_.indexOf) {\n index = this.markers_.indexOf(marker);\n } else {\n for (var i = 0; i < this.markers_.length; i++) {\n if (marker === this.markers_[i]) {\n index = i;\n break;\n }\n }\n }\n\n if (index === -1) {\n // Marker is not in our list of markers, so do nothing:\n return false;\n }\n\n marker.setMap(null);\n this.markers_.splice(index, 1); // Remove the marker from the list of managed markers\n\n return true;\n };\n /**\r\n * Removes all clusters and markers from the map and also removes all markers\r\n * managed by the clusterer.\r\n */\n\n\n MarkerClusterer.prototype.clearMarkers = function () {\n this.resetViewport_(true);\n this.markers_ = [];\n };\n /**\r\n * Recalculates and redraws all the marker clusters from scratch.\r\n * Call this after changing any properties.\r\n */\n\n\n MarkerClusterer.prototype.repaint = function () {\n var oldClusters = this.clusters_.slice();\n this.clusters_ = [];\n this.resetViewport_(false);\n this.redraw_(); // Remove the old clusters.\n // Do it in a timeout to prevent blinking effect.\n\n setTimeout(function () {\n for (var i = 0; i < oldClusters.length; i++) {\n oldClusters[i].remove();\n }\n }, 0);\n };\n /**\r\n * Returns the current bounds extended by the grid size.\r\n *\r\n * @param bounds The bounds to extend.\r\n * @return The extended bounds.\r\n * @ignore\r\n */\n\n\n MarkerClusterer.prototype.getExtendedBounds = function (bounds) {\n var projection = this.getProjection(); // Turn the bounds into latlng.\n\n var tr = new google.maps.LatLng(bounds.getNorthEast().lat(), bounds.getNorthEast().lng());\n var bl = new google.maps.LatLng(bounds.getSouthWest().lat(), bounds.getSouthWest().lng()); // Convert the points to pixels and the extend out by the grid size.\n\n var trPix = projection.fromLatLngToDivPixel(tr);\n trPix.x += this.gridSize_;\n trPix.y -= this.gridSize_;\n var blPix = projection.fromLatLngToDivPixel(bl);\n blPix.x -= this.gridSize_;\n blPix.y += this.gridSize_; // Convert the pixel points back to LatLng\n\n var ne = projection.fromDivPixelToLatLng(trPix);\n var sw = projection.fromDivPixelToLatLng(blPix); // Extend the bounds to contain the new bounds.\n\n bounds.extend(ne);\n bounds.extend(sw);\n return bounds;\n };\n /**\r\n * Redraws all the clusters.\r\n */\n\n\n MarkerClusterer.prototype.redraw_ = function () {\n this.createClusters_(0);\n };\n /**\r\n * Removes all clusters from the map. The markers are also removed from the map\r\n * if `hide` is set to `true`.\r\n *\r\n * @param hide Set to `true` to also remove the markers from the map.\r\n */\n\n\n MarkerClusterer.prototype.resetViewport_ = function (hide) {\n // Remove all the clusters\n for (var i = 0; i < this.clusters_.length; i++) {\n this.clusters_[i].remove();\n }\n\n this.clusters_ = []; // Reset the markers to not be added and to be removed from the map.\n\n for (var i = 0; i < this.markers_.length; i++) {\n var marker = this.markers_[i];\n marker.isAdded = false;\n\n if (hide) {\n marker.setMap(null);\n }\n }\n };\n /**\r\n * Calculates the distance between two latlng locations in km.\r\n *\r\n * @param p1 The first lat lng point.\r\n * @param p2 The second lat lng point.\r\n * @return The distance between the two points in km.\r\n * @link http://www.movable-type.co.uk/scripts/latlong.html\r\n */\n\n\n MarkerClusterer.prototype.distanceBetweenPoints_ = function (p1, p2) {\n var R = 6371; // Radius of the Earth in km\n\n var dLat = (p2.lat() - p1.lat()) * Math.PI / 180;\n var dLon = (p2.lng() - p1.lng()) * Math.PI / 180;\n var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) * Math.sin(dLon / 2) * Math.sin(dLon / 2);\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n return R * c;\n };\n /**\r\n * Determines if a marker is contained in a bounds.\r\n *\r\n * @param marker The marker to check.\r\n * @param bounds The bounds to check against.\r\n * @return True if the marker is in the bounds.\r\n */\n\n\n MarkerClusterer.prototype.isMarkerInBounds_ = function (marker, bounds) {\n return bounds.contains(marker.getPosition());\n };\n /**\r\n * Adds a marker to a cluster, or creates a new cluster.\r\n *\r\n * @param marker The marker to add.\r\n */\n\n\n MarkerClusterer.prototype.addToClosestCluster_ = function (marker) {\n var distance = 40000; // Some large number\n\n var clusterToAddTo = null;\n\n for (var i = 0; i < this.clusters_.length; i++) {\n var cluster = this.clusters_[i];\n var center = cluster.getCenter();\n\n if (center) {\n var d = this.distanceBetweenPoints_(center, marker.getPosition());\n\n if (d < distance) {\n distance = d;\n clusterToAddTo = cluster;\n }\n }\n }\n\n if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {\n clusterToAddTo.addMarker(marker);\n } else {\n var cluster = new Cluster(this);\n cluster.addMarker(marker);\n this.clusters_.push(cluster);\n }\n };\n /**\r\n * Creates the clusters. This is done in batches to avoid timeout errors\r\n * in some browsers when there is a huge number of markers.\r\n *\r\n * @param iFirst The index of the first marker in the batch of\r\n * markers to be added to clusters.\r\n */\n\n\n MarkerClusterer.prototype.createClusters_ = function (iFirst) {\n var _this = this;\n\n if (!this.ready_) {\n return;\n } // Cancel previous batch processing if we're working on the first batch:\n\n\n if (iFirst === 0) {\n google.maps.event.trigger(this, \"clusteringbegin\", this);\n\n if (typeof this.timerRefStatic !== \"undefined\") {\n clearTimeout(this.timerRefStatic);\n delete this.timerRefStatic;\n }\n } // Get our current map view bounds.\n // Create a new bounds object so we don't affect the map.\n //\n // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug:\n\n\n var mapBounds;\n\n if (this.getMap().getZoom() > 3) {\n mapBounds = new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(), this.getMap().getBounds().getNorthEast());\n } else {\n mapBounds = new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625));\n }\n\n var bounds = this.getExtendedBounds(mapBounds);\n var iLast = Math.min(iFirst + this.batchSize_, this.markers_.length);\n\n for (var i = iFirst; i < iLast; i++) {\n var marker = this.markers_[i];\n\n if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) {\n if (!this.ignoreHidden_ || this.ignoreHidden_ && marker.getVisible()) {\n this.addToClosestCluster_(marker);\n }\n }\n }\n\n if (iLast < this.markers_.length) {\n this.timerRefStatic = window.setTimeout(function () {\n _this.createClusters_(iLast);\n }, 0);\n } else {\n delete this.timerRefStatic;\n google.maps.event.trigger(this, \"clusteringend\", this);\n\n for (var i = 0; i < this.clusters_.length; i++) {\n this.clusters_[i].updateIcon();\n }\n }\n };\n /**\r\n * The default function for determining the label text and style\r\n * for a cluster icon.\r\n *\r\n * @param markers The array of markers represented by the cluster.\r\n * @param numStyles The number of marker styles available.\r\n * @return The information resource for the cluster.\r\n */\n\n\n MarkerClusterer.CALCULATOR = function (markers, numStyles) {\n var index = 0;\n var count = markers.length;\n var dv = count;\n\n while (dv !== 0) {\n dv = Math.floor(dv / 10);\n index++;\n }\n\n index = Math.min(index, numStyles);\n return {\n text: count.toString(),\n index: index,\n title: \"\"\n };\n };\n /**\r\n * Generates default styles augmented with user passed values.\r\n * Useful when you want to override some default values but keep untouched\r\n *\r\n * @param overrides override default values\r\n */\n\n\n MarkerClusterer.withDefaultStyle = function (overrides) {\n return _assign({\n textColor: \"black\",\n textSize: 11,\n textDecoration: \"none\",\n textLineHeight: overrides.height,\n fontWeight: \"bold\",\n fontStyle: \"normal\",\n fontFamily: \"Arial,sans-serif\",\n backgroundPosition: \"0 0\"\n }, overrides);\n };\n /**\r\n * The number of markers to process in one batch.\r\n */\n\n\n MarkerClusterer.BATCH_SIZE = 2000;\n /**\r\n * The number of markers to process in one batch (IE only).\r\n */\n\n MarkerClusterer.BATCH_SIZE_IE = 500;\n /**\r\n * The default root name for the marker cluster images.\r\n */\n\n MarkerClusterer.IMAGE_PATH = \"../images/m\";\n /**\r\n * The default extension name for the marker cluster images.\r\n */\n\n MarkerClusterer.IMAGE_EXTENSION = \"png\";\n /**\r\n * The default array of sizes for the marker cluster images.\r\n */\n\n MarkerClusterer.IMAGE_SIZES = [53, 56, 66, 78, 90];\n return MarkerClusterer;\n}(OverlayViewSafe);\n/**\r\n * Copyright 2019 Google LLC. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\n/* harmony default export */ var index_esm = (MarkerClusterer);\n;// CONCATENATED MODULE: ./src/js/_components/drivers/_map.google.marker.js\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\nvar Obj = {\n init: function init() {\n var GoogleMapsHtmlOverlay = /*#__PURE__*/function (_google$maps$OverlayV) {\n _inherits(GoogleMapsHtmlOverlay, _google$maps$OverlayV);\n\n var _super = _createSuper(GoogleMapsHtmlOverlay);\n\n function GoogleMapsHtmlOverlay(options) {\n var _this;\n\n _classCallCheck(this, GoogleMapsHtmlOverlay);\n\n _this = _super.call(this);\n\n var ui = _assertThisInitialized(_this);\n\n ui.ownerMap = options.map; //ui.setMap(options.map);\n\n ui.position = options.position;\n ui.html = options.html ? options.html : '
';\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 = function (arg) {\n if (typeof arg === 'boolean') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isNotUndefined = function (arg) {\n if (typeof arg !== 'undefined') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.hasContent = function (arg) {\n if (arg.length > 0) {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isString = function (arg) {\n if (typeof arg === 'string') {\n return true;\n } else {\n return false;\n }\n };\n\n ui.isFunction = function (arg) {\n if (typeof arg === 'function') {\n return true;\n } else {\n return false;\n }\n };\n\n return _this;\n }\n\n _createClass(GoogleMapsHtmlOverlay, [{\n key: \"onAdd\",\n value: function onAdd() {\n var ui = this; // Create div element.\n\n ui.div = document.createElement('div');\n ui.div.style.position = 'absolute'; // Validate and set custom div class\n\n if (ui.isNotUndefined(ui.divClass) && ui.hasContent(ui.divClass)) ui.div.className = ui.divClass; // Validate and set custom HTML\n\n if (ui.isNotUndefined(ui.html) && ui.hasContent(ui.html) && ui.isString(ui.html)) ui.div.innerHTML = ui.html; // If debug mode is enabled custom content will be replaced with debug content\n\n if (ui.isBoolean(ui.isDebugMode) && ui.isDebugMode) {\n ui.div.className = 'debug-mode';\n ui.div.innerHTML = '
' + '
Debug mode
';\n ui.div.setAttribute('style', 'position: absolute;' + 'border: 5px dashed red;' + 'height: 150px;' + 'width: 150px;' + 'display: flex;' + 'justify-content: center;' + 'align-items: center;');\n } // Add element to clickable layer\n\n\n ui.getPanes().overlayMouseTarget.appendChild(ui.div); // Add listeners to the element.\n\n google.maps.event.addDomListener(ui.div, 'click', function (event) {\n google.maps.event.trigger(ui, 'click');\n if (ui.isFunction(ui.onClick)) ui.onClick();\n event.stopPropagation();\n });\n google.maps.event.addDomListener(ui.div, 'mouseover', function (event) {\n google.maps.event.trigger(ui, 'mouseover');\n if (ui.isFunction(ui.onMouseOver)) ui.onMouseOver();\n event.stopPropagation();\n });\n }\n }, {\n key: \"draw\",\n value: function draw() {\n var ui = this;\n var $div = external_jQuery_default()(ui.div).find('.mapboxgl-marker,.marker-pin,.mapboxgl-popup,.popup');\n\n if (!$div.length) {\n $div = external_jQuery_default()(ui.div);\n } // Calculate position of div\n\n\n var projection = ui.getProjection();\n\n if (!projection) {\n console.log('GoogleMapsHtmlOverlay: current map is missing');\n return null;\n }\n\n var positionInPixels = projection.fromLatLngToDivPixel(ui.getPosition()); // Align HTML overlay relative to original position\n\n var offset = {\n y: undefined,\n x: undefined\n };\n var divWidth = $div.outerWidth();\n var 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\n case 'left center':\n offset.y = divHeight / 2;\n offset.x = divWidth;\n break;\n\n case 'left bottom':\n offset.y = 0;\n offset.x = divWidth;\n break;\n\n case 'center top':\n offset.y = divHeight;\n offset.x = divWidth / 2;\n break;\n\n case 'center center':\n offset.y = divHeight / 2;\n offset.x = divWidth / 2;\n break;\n\n case 'center bottom':\n offset.y = 0;\n offset.x = divWidth / 2;\n break;\n\n case 'right top':\n offset.y = divHeight;\n offset.x = 0;\n break;\n\n case 'right center':\n offset.y = divHeight / 2;\n offset.x = 0;\n break;\n\n case 'right bottom':\n offset.y = 0;\n offset.x = 0;\n break;\n\n default:\n offset.y = divHeight / 2;\n offset.x = divWidth / 2;\n break;\n } // Set position\n\n\n ui.div.style.top = \"\".concat(positionInPixels.y - offset.y, \"px\");\n ui.div.style.left = \"\".concat(positionInPixels.x - offset.x, \"px\");\n }\n }, {\n key: \"getPosition\",\n value: function getPosition() {\n var ui = this;\n return new google.maps.LatLng(ui.position);\n }\n }, {\n key: \"getDiv\",\n value: function getDiv() {\n var ui = this;\n return ui.div;\n }\n }, {\n key: \"setPosition\",\n value: function setPosition(position, align) {\n var ui = this;\n ui.position = position;\n ui.align = align;\n ui.draw();\n }\n }, {\n key: \"remove\",\n value: function remove() {\n var ui = this;\n ui.setMap(null);\n ui.div.remove();\n } // emulate google.maps.Marker functionality for compatibility (for example with @googlemaps/markerclustererplus)\n\n }, {\n key: \"getDraggable\",\n value: function getDraggable() {\n return false;\n }\n }]);\n\n return GoogleMapsHtmlOverlay;\n }(google.maps.OverlayView);\n\n return GoogleMapsHtmlOverlay;\n }\n};\n/* harmony default export */ var _map_google_marker = (Obj);\n;// CONCATENATED MODULE: ./src/js/_components/drivers/_map.google.js\n\n\nfunction _map_google_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _map_google_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _map_google_createClass(Constructor, protoProps, staticProps) { if (protoProps) _map_google_defineProperties(Constructor.prototype, protoProps); if (staticProps) _map_google_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\n\n\nvar GoogleMapsDriver = function ($) {\n var GoogleMapsDriver = /*#__PURE__*/function () {\n function GoogleMapsDriver() {\n _map_google_classCallCheck(this, GoogleMapsDriver);\n }\n\n _map_google_createClass(GoogleMapsDriver, [{\n key: \"getName\",\n value: function getName() {\n return 'GoogleMapsDriver';\n }\n }, {\n key: \"init\",\n value: function init($el) {\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var ui = this;\n var W = window;\n ui.$el = $el;\n ui.config = config;\n ui.markers = [];\n\n W[\"init\".concat(ui.getName())] = function () {\n ui.googleApiLoaded();\n };\n\n $('body').append(\"\"));\n }\n }, {\n key: \"googleApiLoaded\",\n value: function googleApiLoaded() {\n var ui = this;\n var $el = ui.$el;\n var config = ui.config;\n var $mapDiv = $el.find('.mapAPI-map');\n var zoom = config['mapZoom'] ? config['mapZoom'] : 10;\n var center = config['center'] ? {\n lat: config['center'][1],\n lng: config['center'][0]\n } : {\n lat: 0,\n lng: 0\n };\n var style = config['style'] ? config['style'] : null;\n console.log(\"\".concat(ui.getName(), \": API is loaded\")); // init fontawesome icons\n\n ui.MarkerUI = _map_google_marker.init($);\n ui.map = new google.maps.Map($mapDiv[0], {\n zoom: zoom,\n center: center,\n fullscreenControl: true,\n styles: style\n });\n ui.default_zoom = zoom;\n $mapDiv.addClass('mapboxgl-map');\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 });\n ui.popup.setMap(ui.map);\n ui.geocoder = new google.maps.Geocoder();\n ui.cluster = new index_esm(ui.map, null, {\n styles: [{\n width: 30,\n height: 30,\n className: 'mapboxgl-cluster'\n }]\n });\n $el.trigger(_events.MAPAPILOADED);\n }\n }, {\n key: \"addMarker\",\n value: function addMarker(crds, config) {\n var ui = this;\n var pos = {\n lat: crds[1],\n lng: crds[0]\n };\n var marker = new ui.MarkerUI({\n position: pos,\n map: ui.map,\n align: ['center', 'top'],\n html: \"
\").concat(config['icon'], \"
\"),\n onClick: function onClick() {\n var $el = $(\"#Marker\".concat(config['id']));\n ui.showPopup(pos, config['content']);\n $el.trigger(_events.MAPMARKERCLICK);\n }\n });\n ui.markers.push(marker);\n ui.cluster.addMarker(marker);\n return marker;\n }\n }, {\n key: \"showPopup\",\n value: function showPopup(pos, content) {\n var ui = this;\n var $popup = $(ui.popup.getDiv());\n\n if (ui.config['flyToMarker']) {\n ui.map.setCenter(pos); // panTo\n\n if (!ui.config['noZoom']) {\n ui.map.setZoom(18);\n }\n } // keep it hidden to render content\n\n\n $popup.css({\n opacity: '0'\n });\n $popup.removeClass('d-none');\n $popup.find('.mapboxgl-popup-content .html').html(content);\n $popup.find('.mapboxgl-popup-close-button').on('click', function (e) {\n e.preventDefault();\n ui.hidePopup();\n }); // set position when content was rendered\n\n ui.popup.setPosition(pos, ['center', 'top']); // display popup\n\n $popup.css({\n 'margin-top': '-1rem',\n opacity: '1'\n });\n }\n }, {\n key: \"hidePopup\",\n value: function hidePopup() {\n var ui = this;\n var $popup = $(ui.popup.getDiv());\n $popup.addClass('d-none');\n\n if (!ui.config['noRestoreBounds'] || ui.config['flyToBounds']) {\n ui.restoreBounds();\n }\n\n ui.$el.trigger(_events.MAPPOPUPCLOSE);\n }\n }, {\n key: \"geocode\",\n value: function geocode(addr, callback) {\n var ui = this;\n ui.geocoder.geocode({\n address: addr\n }, function (results, status) {\n if (status === 'OK') {\n //results[0].geometry.location;\n if (typeof callback === 'function') {\n callback(results);\n }\n\n return results;\n } else {\n console.error(\"\".concat(ui.getName(), \": Geocode was not successful for the following reason: \").concat(status));\n }\n });\n }\n }, {\n key: \"reverseGeocode\",\n value: function reverseGeocode(latLng, callback) {\n var ui = this;\n ui.geocoder.geocode({\n location: latlng\n }, function (results, status) {\n if (status === 'OK') {\n //results[0].formatted_address;\n if (typeof callback === 'function') {\n callback(results);\n }\n\n return results;\n } else {\n console.error(\"\".concat(ui.getName(), \": Reverse Geocoding was not successful for the following reason: \").concat(status));\n }\n });\n }\n }, {\n key: \"addGeoJson\",\n value: function addGeoJson(config) {\n var ui = this;\n var firstMarker = config['geojson'].features[0].geometry.coordinates; //Map.setCenter(firstMarker);\n\n var bounds = new google.maps.LatLngBounds(); // add markers to map\n\n config['geojson'].features.forEach(function (marker) {\n var id = marker.id;\n var crds = marker.geometry.coordinates;\n var content = marker.properties.content;\n ui.addMarker(crds, {\n id: id,\n content: content,\n icon: marker.icon,\n flyToMarker: config['flyToMarker']\n });\n bounds.extend({\n lat: crds[1],\n lng: crds[0]\n });\n });\n\n if (ui.markers.length > 1) {\n ui.map.fitBounds(bounds, {\n padding: 30\n }); //panToBounds\n } else if (ui.markers[0]) {\n ui.map.setCenter(ui.markers[0].getPosition());\n }\n\n ui.default_bounds = bounds;\n ui.default_zoom = ui.map.getZoom();\n }\n }, {\n key: \"getMap\",\n value: function getMap() {\n var ui = this;\n return ui.map;\n }\n }, {\n key: \"getPopup\",\n value: function getPopup() {\n var ui = this;\n return ui.popup;\n }\n }, {\n key: \"restoreBounds\",\n value: function restoreBounds() {\n var ui = this;\n\n if (ui.default_bounds && ui.markers.length > 1) {\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 key: \"restoreZoom\",\n value: function restoreZoom() {\n var ui = this;\n ui.map.setZoom(ui.default_zoom);\n }\n }]);\n\n return GoogleMapsDriver;\n }();\n\n return GoogleMapsDriver;\n}((external_jQuery_default()));\n\n/* harmony default export */ var _map_google = (GoogleMapsDriver);\n;// CONCATENATED MODULE: ./src/js/_consts.js\n/**\n * Add your global events here\n */\n //import MAP_DRIVER from './_components/drivers/_map.mapbox';\n\nvar CONSTS = {\n ENVS: ['xs', 'sm', 'md', 'lg', 'xl', 'xxl', 'xxxl'],\n MAP_DRIVER: _map_google\n};\n/* harmony default export */ var _consts = (CONSTS);\n;// CONCATENATED MODULE: ./src/js/_events.router.js\n\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _events_router_typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _events_router_typeof = function _typeof(obj) { return typeof obj; }; } else { _events_router_typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _events_router_typeof(obj); }\n\nfunction _events_router_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _events_router_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _events_router_createClass(Constructor, protoProps, staticProps) { if (protoProps) _events_router_defineProperties(Constructor.prototype, protoProps); if (staticProps) _events_router_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n/**\n * Route side-wide events\n */\n\nvar EventsUI = function ($) {\n var on = $.fn.on;\n var off = $.fn.off; // Constants\n\n var W = window;\n var $W = $(W);\n var D = document;\n var $Body = $('body');\n var NAME = 'EventsUI';\n\n var EventsUI = /*#__PURE__*/function () {\n function EventsUI() {\n _events_router_classCallCheck(this, EventsUI);\n }\n\n _events_router_createClass(EventsUI, null, [{\n key: \"process\",\n value: function process(el, args) {\n var modEl = el;\n var eventName = args[0];\n var tagName = _events_router_typeof(el) !== undefined ? $(el).prop('tagName') : null;\n\n switch (tagName) {\n case 'HTML':\n case 'BODY':\n modEl = $W;\n break;\n }\n\n return [modEl, args];\n }\n }]);\n\n return EventsUI;\n }(); // rewrite jQuery functions\n\n\n $.fn.on = function () {\n var result = EventsUI.process(this, arguments);\n return on.apply.apply(on, _toConsumableArray(result));\n };\n\n $.fn.off = function () {\n var result = EventsUI.process(this, arguments);\n return off.apply.apply(off, _toConsumableArray(result));\n };\n\n var scrollTop = $.fn.scrollTop; // rewrite scrollTop\n\n $.fn.scrollTop = function () {\n var el = this;\n var args = arguments;\n var tagName = _events_router_typeof(el) !== undefined ? $(el).prop('tagName') : null;\n\n switch (tagName) {\n case 'HTML':\n case 'BODY':\n el = $W;\n break;\n }\n\n return scrollTop.apply(el, args);\n };\n}((external_jQuery_default()));\n\n/* harmony default export */ var _events_router = (EventsUI);\n;// CONCATENATED MODULE: ./src/js/_components/_ui.spinner.js\n\n\nfunction _ui_spinner_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _ui_spinner_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _ui_spinner_createClass(Constructor, protoProps, staticProps) { if (protoProps) _ui_spinner_defineProperties(Constructor.prototype, protoProps); if (staticProps) _ui_spinner_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\nvar SpinnerUI = function ($) {\n var SpinnerUI = /*#__PURE__*/function () {\n function SpinnerUI() {\n _ui_spinner_classCallCheck(this, SpinnerUI);\n }\n\n _ui_spinner_createClass(SpinnerUI, null, [{\n key: \"show\",\n value: function show(callback) {\n $('#PageLoading').show(0, callback);\n }\n }, {\n key: \"hide\",\n value: function hide(callback) {\n $('#PageLoading').hide('slow', callback);\n }\n }]);\n\n return SpinnerUI;\n }();\n\n return SpinnerUI;\n}((external_jQuery_default()));\n\n/* harmony default export */ var _ui_spinner = (SpinnerUI);\n;// CONCATENATED MODULE: ./src/js/_components/_ui.ajax.js\n\n\nfunction _ui_ajax_typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _ui_ajax_typeof = function _typeof(obj) { return typeof obj; }; } else { _ui_ajax_typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _ui_ajax_typeof(obj); }\n\nfunction _ui_ajax_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _ui_ajax_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _ui_ajax_createClass(Constructor, protoProps, staticProps) { if (protoProps) _ui_ajax_defineProperties(Constructor.prototype, protoProps); if (staticProps) _ui_ajax_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\n\nvar AjaxUI = function ($) {\n // Constants\n var G = window;\n var D = document;\n var $Html = $('html');\n var $Body = $('body');\n var NAME = 'jsAjaxUI';\n var DATA_KEY = NAME;\n\n var AjaxUI = /*#__PURE__*/function () {\n // Constructor\n function AjaxUI(element) {\n _ui_ajax_classCallCheck(this, AjaxUI);\n\n this._element = element;\n var $element = $(this._element);\n $element.addClass(\"\".concat(NAME, \"-active\"));\n $element.bind('click', function (e) {\n e.preventDefault();\n var $this = $(this);\n $('.ajax').each(function () {\n var $this = $(this);\n $this.removeClass('active');\n $this.parents('.nav-item').removeClass('active');\n });\n $this.addClass('loading');\n AjaxUI.load($this.attr('href'), function () {\n $this.removeClass('loading');\n $this.parents('.nav-item').addClass('active');\n $this.addClass('active');\n });\n });\n } // Public methods\n\n\n _ui_ajax_createClass(AjaxUI, [{\n key: \"dispose\",\n value: function dispose() {\n var $element = $(this._element);\n $element.removeClass(\"\".concat(NAME, \"-active\"));\n $.removeData(this._element, DATA_KEY);\n this._element = null;\n }\n }], [{\n key: \"load\",\n value: function load(url, callback) {\n // show spinner\n _ui_spinner.show(function () {\n $Body.removeClass('loaded');\n }); // update document location\n\n G.MainUI.updateLocation(url);\n var absoluteLocation = G.URLDetails['base'] + G.URLDetails['relative'].substring(1);\n\n if (absoluteLocation !== G.location.href) {\n G.history.pushState({\n ajax: true,\n page: absoluteLocation\n }, document.title, absoluteLocation);\n }\n\n $.ajax({\n sync: false,\n async: true,\n url: url,\n dataType: 'json',\n method: 'GET',\n cache: false,\n error: function error(jqXHR) {\n console.warn(\"\".concat(NAME, \": AJAX request failure: \").concat(jqXHR.statusText));\n G.location.href = url; // google analytics\n\n if (typeof G.ga === 'function') {\n G.ga('send', 'event', 'error', 'AJAX ERROR', jqXHR.statusText);\n }\n },\n success: function success(data, status, jqXHR) {\n AjaxUI.process(data, jqXHR, callback); // google analytics\n\n if (typeof G.ga === 'function') {\n G.ga('set', {\n page: G.URLDetails['relative'] + G.URLDetails['hash'],\n title: jqXHR.getResponseHeader('X-Title')\n });\n G.ga('send', 'pageview');\n }\n }\n });\n }\n }, {\n key: \"process\",\n value: function process(data, jqXHR, callback) {\n var _this = this;\n\n var css = jqXHR.getResponseHeader('X-Include-CSS').split(',') || [];\n var js = jqXHR.getResponseHeader('X-Include-JS').split(',') || []; // Replace HTML regions\n\n if (_ui_ajax_typeof(data.regions) === 'object') {\n for (var key in data.regions) {\n if (typeof data.regions[key] === 'string') {\n AjaxUI.replaceRegion(data.regions[key], key);\n }\n }\n } // remove already loaded scripts\n\n\n $('link[type=\"text/css\"]').each(function () {\n var i = css.indexOf($(this).attr('href'));\n\n if (i > -1) {\n css.splice(i, 1);\n } else if (!$Body.data('unload-blocked')) {\n console.log(\"\".concat(NAME, \": Unloading | \").concat($(this).attr('href')));\n $(this).remove();\n }\n });\n $('script[type=\"text/javascript\"]').each(function () {\n var i = js.indexOf($(this).attr('src'));\n\n if (i > -1) {\n js.splice(i, 1);\n } else if (!$Body.data('unload-blocked')) {\n console.log(\"\".concat(NAME, \": Unloading | \").concat($(this).attr('src')));\n $(this).remove();\n }\n }); // preload CSS\n\n this.preload(css).then(function () {\n var $head = $('head');\n css.forEach(function (el) {\n $head.append(\"\"));\n }); // preload JS\n\n _this.preload(js, 'script').then(function () {\n js.forEach(function (el) {\n $Body.append(\"\"));\n });\n console.log(\"\".concat(NAME, \": New page is loaded!\")); // trigger events\n\n if (_ui_ajax_typeof(data.events) === 'object') {\n for (var eventName in data.events) {\n $(D).trigger(eventName, [data.events[eventName]]);\n }\n }\n\n if (typeof callback !== 'undefined') {\n callback();\n }\n\n $(G).trigger(_events.AJAX);\n });\n });\n }\n }, {\n key: \"preload\",\n value: function preload(items) {\n var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'text';\n var cache = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var itemCallback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n if (!items.length) {\n return $.Deferred().resolve().promise();\n }\n\n var dfds = [];\n items.forEach(function (url, i) {\n var dfd = $.Deferred();\n $.ajax({\n dataType: type,\n cache: cache,\n url: url\n }).always(function () {\n dfd.resolve();\n\n if (itemCallback) {\n itemCallback(i, url);\n }\n });\n dfds.push(dfd);\n }); // return a master promise object which will resolve when all the deferred objects have resolved\n\n return $.when.apply($, dfds);\n }\n }, {\n key: \"replaceRegion\",\n value: function replaceRegion(html, key) {\n var $region = $(\"[data-ajax-region=\\\"\".concat(key, \"\\\"]\"));\n\n if ($region.length) {\n $region.empty().append(html);\n } else {\n console.warn(\"\".concat(NAME, \": Region returned without class or id!\"));\n }\n }\n }, {\n key: \"_jQueryInterface\",\n value: function _jQueryInterface() {\n return this.each(function () {\n // attach functionality to element\n var $element = $(this);\n var data = $element.data(DATA_KEY);\n\n if (!data) {\n data = new AjaxUI(this);\n $element.data(DATA_KEY, data);\n }\n });\n }\n }]);\n\n return AjaxUI;\n }(); // jQuery interface\n\n\n $.fn[NAME] = AjaxUI._jQueryInterface;\n $.fn[NAME].Constructor = AjaxUI;\n\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return AjaxUI._jQueryInterface;\n }; // auto-apply\n\n\n $('.ajax').ready(function () {\n $('.ajax').jsAjaxUI();\n }); // AJAX update browser title\n\n $(D).on('layoutRefresh', function (e, data) {\n D.title = data.Title;\n $Html.attr('class', '');\n\n if (data.ClassName) {\n $Html.addClass(data.ClassName);\n } //data.Link = (data.Link === '/home/') ? '/' : data.Link;\n\n }); // Back/Forward functionality\n\n G.onpopstate = function (event) {\n var $existingLink = $(\"a[href^=\\\"\".concat(D.location, \"\\\"]\"));\n\n if (event.state !== null && event.state.ajax) {\n console.log(\"\".concat(NAME, \": GOBACK (AJAX state)\"));\n AjaxUI.load(event.state.page);\n } else if ($existingLink.length && $existingLink.hasClass('ajax')) {\n console.log(\"\".concat(NAME, \": GOBACK (AJAX link)\"));\n $existingLink.trigger('click');\n } else if (D.location.href !== G.location.href) {\n console.log(\"\".concat(NAME, \": GOBACK (HTTP)\"));\n G.location.href = D.location;\n }\n }; // manage AJAX requests\n\n\n $.ajaxPrefilter(function (options, originalOptions, jqXHR) {\n jqXHR.opts = options;\n $.xhrPool.requests[jqXHR.opts.url] = jqXHR;\n });\n $.xhrPool = {\n requests: {},\n paused: false,\n pauseAll: function pauseAll() {\n $.xhrPool.paused = true;\n /*for (let url in $.xhrPool.requests) {\n const jqXHR = $.xhrPool.requests[url];\n jqXHR.abort();\n console.log(`${NAME}: AJAX request is paused (${jqXHR.opts.url})`);\n }*/\n },\n restoreAll: function restoreAll() {\n for (var url in $.xhrPool.requests) {\n var jqXHR = $.xhrPool.requests[url];\n $.ajax(jqXHR.opts);\n console.log(\"\".concat(NAME, \": AJAX request is restored (\").concat(jqXHR.opts.url, \")\"));\n }\n\n $.xhrPool.paused = false;\n }\n };\n $.ajaxSetup({\n beforeSend: function beforeSend(jqXHR) {},\n // and connection to list\n complete: function complete(jqXHR) {\n if (!$.xhrPool.paused) {\n //console.log(`${NAME}: AJAX request is done (${jqXHR.opts.url})`);\n delete $.xhrPool.requests[jqXHR.opts.url];\n }\n }\n }); // attach events\n\n $Body.on(\"\".concat(_events.OFFLINE), function () {\n $.xhrPool.pauseAll();\n });\n $Body.on(\"\".concat(_events.BACKONLINE), function () {\n $.xhrPool.restoreAll();\n });\n return AjaxUI;\n}((external_jQuery_default()));\n\n/* harmony default export */ var _ui_ajax = (AjaxUI);\n;// CONCATENATED MODULE: ./src/js/_components/_ui.form.fields.js\n\n\nfunction _ui_form_fields_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _ui_form_fields_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _ui_form_fields_createClass(Constructor, protoProps, staticProps) { if (protoProps) _ui_form_fields_defineProperties(Constructor.prototype, protoProps); if (staticProps) _ui_form_fields_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\nvar FormFieldUI = function ($) {\n // Constants\n var NAME = 'jsFormFieldUI';\n var DATA_KEY = NAME;\n var $Html = $('html, body');\n\n var FormFieldUI = /*#__PURE__*/function () {\n function FormFieldUI(el) {\n _ui_form_fields_classCallCheck(this, FormFieldUI);\n\n var ui = this;\n ui.$el = $(el);\n ui.shown = true;\n ui.$el.data(DATA_KEY, ui); //ui.$actions = ui.$el.parents('form').children('.btn-toolbar,.form-actions');\n\n ui.vals = {\n val: ui.$el.val(),\n checked: ui.$el.is(':checked')\n }; // bootstrap collapse integration\n\n ui.$el.parents('.optionset').not('.field').removeClass('collapse');\n ui.$collapse = ui.$el.parents('.field.collapse').not('.composite').first();\n\n if (ui.$collapse.length) {\n ui.$el.removeClass('collapse');\n ui.$collapse.on('show.bs.collapse', function (e) {\n ui.show();\n });\n ui.$collapse.on('hidden.bs.collapse', function (e) {\n ui.hide();\n });\n }\n\n ui.$el.addClass(\"\".concat(NAME, \"-active\"));\n return ui;\n } // Public methods\n\n\n _ui_form_fields_createClass(FormFieldUI, [{\n key: \"dispose\",\n value: function dispose() {\n var ui = this;\n var $el = ui.$el;\n $el.removeClass(\"\".concat(NAME, \"-active\"));\n $.removeData($el[0], DATA_KEY);\n }\n }, {\n key: \"show\",\n value: function show() {\n var ui = this;\n var $el = ui.$el;\n ui.restore();\n ui.shown = true;\n /*if (ui.$collapse.length) {\n ui.$collapse.collapse('show');\n }\n if ($el.hasClass('collapse')) {\n $el.collapse('show');\n }*/\n\n $el.trigger(\"shown.\".concat(NAME));\n }\n }, {\n key: \"hide\",\n value: function hide() {\n var ui = this;\n var $el = ui.$el;\n ui.wipe();\n ui.shown = false;\n /*if (ui.$collapse.length) {\n ui.$collapse.collapse('hide');\n }\n if ($el.hasClass('collapse')) {\n $el.collapse('hide');\n }\n $el.trigger('change');*/\n\n $el.trigger(\"hidden.\".concat(NAME));\n }\n }, {\n key: \"wipe\",\n value: function wipe() {\n var ui = this;\n var $el = ui.$el;\n ui.vals = {\n name: $el.attr('name'),\n val: $el.val(),\n checked: $el.is(':checked')\n };\n $el.val('');\n $el.prop('checked', false);\n }\n }, {\n key: \"restore\",\n value: function restore() {\n var ui = this;\n var $el = ui.$el;\n var checked = ui.vals['checked'];\n $el.val(ui.vals['val']);\n $el.prop('checked', checked);\n }\n }, {\n key: \"addMessage\",\n value: function addMessage(msg) {\n var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var scrollTo = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var ui = this;\n var $field = ui.$el.closest('.field');\n $field.addClass('has-message');\n\n if (msg) {\n $field.append(\"
\").concat(msg, \"
\"));\n }\n\n if (scrollTo) {\n var pos = $field.offset().top;\n $field.focus();\n $Html.scrollTop(pos - 100);\n }\n }\n }, {\n key: \"removeMessages\",\n value: function removeMessages() {\n var ui = this;\n var $field = ui.$el.closest('.field');\n $field.removeClass('has-message');\n $field.find('.message').remove();\n }\n }], [{\n key: \"_jQueryInterface\",\n value: function _jQueryInterface() {\n return this.each(function () {\n // attach functionality to el\n var $el = $(this);\n var data = $el.data(DATA_KEY);\n\n if (!data) {\n data = new FormFieldUI(this);\n $el.data(DATA_KEY, data);\n }\n });\n }\n }]);\n\n return FormFieldUI;\n }(); // jQuery interface\n\n\n $.fn[NAME] = FormFieldUI._jQueryInterface;\n $.fn[NAME].Constructor = FormFieldUI;\n\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return FormFieldUI._jQueryInterface;\n };\n\n return FormFieldUI;\n}((external_jQuery_default()));\n\n/* harmony default export */ var _ui_form_fields = (FormFieldUI);\n;// CONCATENATED MODULE: ./src/js/_components/_ui.form.basics.js\n\n\nfunction _ui_form_basics_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _ui_form_basics_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _ui_form_basics_createClass(Constructor, protoProps, staticProps) { if (protoProps) _ui_form_basics_defineProperties(Constructor.prototype, protoProps); if (staticProps) _ui_form_basics_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\n\n\nvar FormBasics = function ($) {\n // Constants\n var NAME = 'jsFormBasics';\n var DATA_KEY = NAME;\n var $Html = $('html, body');\n var W = window;\n var D = document;\n\n var FormBasics = /*#__PURE__*/function () {\n function FormBasics(el) {\n _ui_form_basics_classCallCheck(this, FormBasics);\n\n var ui = this;\n var $el = $(el);\n ui._el = el;\n ui.dispose();\n console.log(\"\".concat(NAME, \": init\"));\n $el.data(DATA_KEY, this); //$('[data-inputmask]').inputmask();\n\n var $fields = $el.find(_events.FORM_FIELDS); // init fields ui\n\n $fields.each(function (i, el) {\n // skip some fields here\n new _ui_form_fields(el);\n });\n $fields.each(function (e, el) {\n var $el = $(el);\n\n if ($el.hasClass('required') || $el.attr('aria-required')) {\n $el.closest('.field').addClass('required');\n }\n });\n var $radioOptions = $el.find('input[type=\"radio\"]');\n $radioOptions.each(function (e, el) {\n var $el = $(el);\n\n if ($el.is(':checked')) {\n $el.parents('.radio').addClass('checked');\n }\n });\n $radioOptions.on('change', function (e) {\n var $el = $(e.currentTarget);\n var $parent = $el.parents('.radio');\n $parent.siblings('.radio').each(function (i, el) {\n var $el = $(el);\n\n if (!$el.find('input').is(':checked')) {\n $el.removeClass('checked');\n }\n });\n\n if ($el.is(':checked')) {\n $parent.addClass('checked');\n }\n });\n $el.on('submit', function (e) {\n setTimeout(function () {\n if (!$el.find('.error').length) {\n _ui_spinner.show();\n }\n }, 100);\n });\n $('.field.password .show-password').on('click', function (e) {\n console.log(\"\".concat(NAME, \": .field.password .show-password (click)\"));\n var $el = $(e.currentTarget);\n var $field = $el.siblings('input');\n var $icon = $el.find('.fas');\n var attr = $field.attr('type');\n\n if (attr === 'password') {\n $field.attr('type', 'text');\n $icon.removeClass('fa-eye').addClass('fa-eye-slash');\n } else {\n $field.attr('type', 'password');\n $icon.removeClass('fa-eye-slash').addClass('fa-eye');\n }\n });\n $el.addClass(\"\".concat(NAME, \"-active\"));\n $el.trigger(_events.FORM_INIT_BASICS);\n } // Public methods\n\n\n _ui_form_basics_createClass(FormBasics, [{\n key: \"dispose\",\n value: function dispose() {\n console.log(\"\".concat(NAME, \": dispose\"));\n var ui = this;\n var $el = $(ui._el);\n $.removeData(ui._el, DATA_KEY);\n ui._el = null;\n $el.removeClass(\"\".concat(NAME, \"-active\"));\n }\n }], [{\n key: \"_jQueryInterface\",\n value: function _jQueryInterface() {\n var _this = this;\n\n return this.each(function () {\n // attach functionality to el\n var $el = $(_this);\n var data = $el.data(DATA_KEY);\n\n if (!data) {\n data = new FormBasics(_this);\n $el.data(DATA_KEY, data);\n }\n });\n }\n }]);\n\n return FormBasics;\n }(); // jQuery interface\n\n\n $.fn[NAME] = FormBasics._jQueryInterface;\n $.fn[NAME].Constructor = FormBasics;\n\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return FormBasics._jQueryInterface;\n };\n\n var init = function init() {\n $('form').jsFormBasics();\n }; // auto-apply\n\n\n $(W).on(\"\".concat(NAME, \".init \").concat(_events.AJAX, \" \").concat(_events.LOADED), function () {\n init();\n });\n return FormBasics;\n}((external_jQuery_default()));\n\n/* harmony default export */ var _ui_form_basics = (FormBasics);\n;// CONCATENATED MODULE: ./src/js/_components/_ui.header-footer.js\n\n\nfunction _ui_header_footer_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _ui_header_footer_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _ui_header_footer_createClass(Constructor, protoProps, staticProps) { if (protoProps) _ui_header_footer_defineProperties(Constructor.prototype, protoProps); if (staticProps) _ui_header_footer_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\nvar HeaderUI = function ($) {\n var D = document;\n var W = window;\n var $Body = $('html,body');\n var NAME = 'HeaderUI';\n var CLASSNAME = \"js\".concat(NAME);\n\n var HeaderUI = /*#__PURE__*/function () {\n function HeaderUI() {\n _ui_header_footer_classCallCheck(this, HeaderUI);\n }\n\n _ui_header_footer_createClass(HeaderUI, null, [{\n key: \"init\",\n value: function init() {\n var ui = this;\n ui.dispose();\n console.log(\"\".concat(NAME, \": init\"));\n var $header = $(\"#Header,.js\".concat(NAME));\n\n var updateHeader = function updateHeader() {\n var h = $header.height();\n var s = $Body.scrollTop();\n\n if (s + 50 > h) {\n $Body.addClass('shrink');\n } else {\n $Body.removeClass('shrink');\n }\n };\n\n updateHeader();\n\n var updateFooter = function updateFooter(i, el) {\n var $el = $(el);\n var footerHeight = $el.height();\n $el.css('height', footerHeight);\n $el.css('margin-top', -footerHeight);\n $el.siblings('.wrapper').css('padding-bottom', footerHeight);\n };\n\n $('.footer,.jsFooterUI').css('height', 'auto');\n setTimeout(function () {\n $('.footer,.jsFooterUI').each(updateFooter);\n }, 500);\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n console.log(\"\".concat(NAME, \": dispose\"));\n $Body.removeClass('shrink');\n $(\"#Header,.js\".concat(NAME, \",.footer,.jsFooterUI,.wrapper\")).attr('css', '');\n }\n }]);\n\n return HeaderUI;\n }();\n\n $(W).on(\"\".concat(_events.AJAX, \" \").concat(_events.LOADED), function () {\n HeaderUI.init();\n }); // align event content\n\n $(W).on(\"\".concat(_events.RESIZE), function () {\n setTimeout(function () {\n HeaderUI.init();\n }, 200);\n });\n W.HeaderUI = new HeaderUI();\n return HeaderUI;\n}((external_jQuery_default()));\n\n/* harmony default export */ var _ui_header_footer = (HeaderUI);\n// EXTERNAL MODULE: ./node_modules/.pnpm/smooth-scroll@16.1.3/node_modules/smooth-scroll/dist/smooth-scroll.polyfills.min.js\nvar smooth_scroll_polyfills_min = __webpack_require__(\"./node_modules/.pnpm/smooth-scroll@16.1.3/node_modules/smooth-scroll/dist/smooth-scroll.polyfills.min.js\");\nvar smooth_scroll_polyfills_min_default = /*#__PURE__*/__webpack_require__.n(smooth_scroll_polyfills_min);\n;// CONCATENATED MODULE: ./src/js/_main.js\n\n\nfunction _main_toConsumableArray(arr) { return _main_arrayWithoutHoles(arr) || _main_iterableToArray(arr) || _main_unsupportedIterableToArray(arr) || _main_nonIterableSpread(); }\n\nfunction _main_nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _main_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _main_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _main_arrayLikeToArray(o, minLen); }\n\nfunction _main_iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _main_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _main_arrayLikeToArray(arr); }\n\nfunction _main_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _main_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _main_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _main_createClass(Constructor, protoProps, staticProps) { if (protoProps) _main_defineProperties(Constructor.prototype, protoProps); if (staticProps) _main_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\n\n // AJAX functionality\n\n\n\n\n\nvar smoothScroll = smooth_scroll_polyfills_min_default()();\n\nvar MainUI = function ($) {\n // Constants\n var W = window;\n var $W = $(W);\n var D = document;\n var $Body = $('body');\n var NAME = 'MainUI';\n console.clear();\n console.info(\"%cUI Kit \".concat(\"@a2nt/ss-bootstrap-ui-webpack-boilerplate\", \" \").concat(\"2.8.6\"), 'color:yellow;font-size:14px');\n console.info(\"%c\".concat(UIMetaNAME, \" \").concat(UIMetaVersion), 'color:yellow;font-size:12px');\n console.info(\"%chttps://github.com/a2nt/webpack-bootstrap-ui-kit by \".concat(\"Tony Air \"), 'color:yellow;font-size:10px');\n console.groupCollapsed('Events');\n Object.keys(_events).forEach(function (k) {\n console.info(\"\".concat(k, \": \").concat(_events[k]));\n });\n console.groupEnd('Events');\n console.groupCollapsed('Consts');\n Object.keys(_consts).forEach(function (k) {\n console.info(\"\".concat(k, \": \").concat(_consts[k]));\n });\n console.groupEnd('Events');\n console.groupCollapsed('Init');\n console.time('init');\n $W.on(\"\".concat(_events.LODEDANDREADY), function () {\n console.groupEnd('Init');\n console.timeEnd('init');\n console.time('Post-init');\n console.groupCollapsed('Post-init');\n }); // get browser locale\n //const Locale = $('html').attr('lang').substring(0, 2);\n\n var $AlertNotify = $('#AlertNotify');\n var $SiteWideMessage = $('#SiteWideMessage'); // get browser window visibility preferences\n // Opera 12.10, Firefox >=18, Chrome >=31, IE11\n\n var HiddenName = 'hidden';\n var VisibilityChangeEvent = 'visibilitychange'; // update visibility state\n\n D.addEventListener(VisibilityChangeEvent, function () {\n if (D.visibilityState === HiddenName) {\n console.log(\"\".concat(NAME, \": Tab: hidden\"));\n $Body.addClass('is-hidden');\n $Body.trigger(_events.TABHIDDEN);\n $W.trigger(_events.TABHIDDEN);\n } else {\n console.log(\"\".concat(NAME, \": Tab: focused\"));\n $Body.removeClass('is-hidden');\n $Body.trigger(_events.TABFOCUSED);\n $W.trigger(_events.TABFOCUSED);\n }\n }); // session ping\n\n var pingInterval;\n var pingLock = false;\n\n var sessionPing = function sessionPing() {\n if (pingLock || $Body.hasClass('is-offline')) {\n return;\n }\n\n console.log(\"\".concat(NAME, \": session ping\"));\n pingLock = true;\n $.ajax({\n sync: false,\n async: true,\n cache: false,\n url: '/Security/ping',\n global: false,\n type: 'POST',\n complete: function complete(data, datastatus) {\n updateOnlineStatus();\n\n if (datastatus !== 'success') {\n console.warn(\"\".concat(NAME, \": ping failed\"));\n clearInterval(pingInterval);\n pingInterval = null;\n }\n\n pingLock = false;\n }\n });\n }; // update online/offline state\n\n\n var statusLock = false;\n\n var updateOnlineStatus = function updateOnlineStatus() {\n if (statusLock) {\n return;\n }\n\n statusLock = true;\n\n if (typeof navigator.onLine === 'undefined') {\n return false;\n }\n\n if (!navigator.onLine) {\n console.log(\"\".concat(NAME, \": Offline\"));\n clearInterval(pingInterval);\n pingInterval = null;\n $Body.addClass('is-offline');\n $Body.removeClass('is-online');\n $Body.trigger(_events.OFFLINE);\n $W.trigger(_events.OFFLINE);\n statusLock = false;\n return true;\n }\n\n if (!pingInterval) {\n pingInterval = setInterval(sessionPing, 300000); // 5 min in ms\n }\n\n if ($Body.hasClass('is-offline')) {\n sessionPing();\n console.log(\"\".concat(NAME, \": is back online\"));\n $Body.trigger(_events.BACKONLINE);\n } else {\n console.log(\"\".concat(NAME, \": Online\"));\n }\n\n $Body.addClass('is-online');\n $Body.removeClass('is-offline');\n $Body.trigger(_events.ONLINE);\n $W.trigger(_events.ONLINE);\n statusLock = false;\n return true;\n };\n\n W.addEventListener(\"\".concat(_events.OFFLINE), function () {\n updateOnlineStatus();\n }, false);\n W.addEventListener(\"\".concat(_events.ONLINE), function () {\n updateOnlineStatus();\n }, false);\n $W.on(\"\".concat(_events.LOADED, \" \").concat(_events.AJAX), function () {\n updateOnlineStatus();\n }); // scrollTo\n\n var ScrollTo = function ScrollTo(trigger, selector) {\n smoothScroll.animateScroll(D.querySelector(selector), trigger, {\n speed: 500,\n offset: -20 //easing: 'easeInOutCubic',\n // Callback API\n //before: (anchor, toggle) => {}, // Callback to run before scroll\n //`after: (anchor, toggle) => {} // Callback to run after scroll\n\n });\n };\n\n W.URLDetails = {\n base: $('base').attr('href'),\n relative: '/',\n hash: ''\n };\n var eventFired = false;\n\n var setTouchScreen = function setTouchScreen(bool) {\n if (W.IsTouchScreen === bool || eventFired) {\n return;\n }\n\n eventFired = true;\n W.IsTouchScreen = bool;\n $.support.touch = W.IsTouchScreen;\n\n if (bool) {\n console.log(\"\".concat(NAME, \": Touch screen enabled\"));\n $Body.trigger(_events.TOUCHENABLE);\n $W.trigger(_events.TOUCHENABLE);\n } else {\n console.log(\"\".concat(NAME, \": Touch screen disabled\"));\n $Body.trigger(_events.TOUCHDISABLED);\n $W.trigger(_events.TOUCHDISABLED);\n } // prevent firing touch and mouse events together\n\n\n setTimeout(function () {\n eventFired = false;\n }, 200);\n };\n\n setTouchScreen('ontouchstart' in window || navigator.msMaxTouchPoints > 0); // disable touch on mouse events\n\n /*D.addEventListener('mousemove', () => {\n setTouchScreen(false);\n });\n D.addEventListener('mousedown', () => {\n setTouchScreen(false);\n });*/\n // enable touch screen on touch events\n\n D.addEventListener('touchmove', function () {\n setTouchScreen(true);\n });\n D.addEventListener('touchstart', function () {\n setTouchScreen(true);\n });\n\n var MainUI = /*#__PURE__*/function () {\n function MainUI() {\n _main_classCallCheck(this, MainUI);\n }\n\n _main_createClass(MainUI, null, [{\n key: \"init\",\n // Static methods\n value: function init() {\n var ui = this;\n ui.dispose();\n console.log(\"\".concat(NAME, \": init\")); // update location details\n\n ui.updateLocation(); // mark available offline areas\n\n if ('caches' in W) {\n $('a.offline').addClass('offline-available');\n }\n\n ui.loadImages(); // detect bootstrap screen size\n\n ui.detectBootstrapScreenSize(); // mark external links\n\n $('a.external,a[rel=\"external\"]').attr('target', '_blank'); // show encoded emails\n\n /*$(D).find('.obm').each(() => {\n if ($(this).attr('data-val') !== undefined) {\n const email = $(this).attr('data-val').split('')\n .reverse()\n .join('')\n .slice(0, -8)\n .replace(/[a-zA-Z]/g, (c) => String.fromCharCode((c <= 'Z' ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26))\n .replace('#AT#', '@');\n const attr = $(this).attr('data-val-append');\n if (attr !== undefined && attr !== false) {\n $(this).append(email);\n }\n if ($(this).find('.sr-only').length > 0) {\n $(this).find('.sr-only').append(email);\n }\n if ($(this).attr('href') !== undefined) {\n $(this).attr('href', `mailto:${email}`);\n }\n }\n });*/\n //\n // scroll links\n\n $('.js-scrollTo').on('click', function (e) {\n console.log(\"\".concat(NAME, \": .js-scrollTo\"));\n e.preventDefault();\n var el = e.currentTarget;\n var $el = $(e.currentTarget);\n ScrollTo(el, $el.attr('data-target'));\n }); // load external fonts\n\n if ($('[data-extfont]').length) {\n console.log(\"\".concat(NAME, \": loading external fonts [data-extfont]\"));\n $.getScript('//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js', function () {\n var fonts = [];\n $('[data-extfont]').each(function (i, el) {\n fonts[i] = $(el).attr('data-extfont');\n });\n W.WebFont.load({\n google: {\n families: fonts\n }\n });\n });\n } // data-set links\n\n\n $('[data-set-target]').on('click', function (e) {\n console.log(\"\".concat(NAME, \": [data-set-target]\"));\n var $el = $(e.currentTarget);\n var $target = $($el.data('set-target'));\n\n if (!$target.length) {\n return;\n }\n\n $target.each(function (i, targetEl) {\n var $targetEl = $(targetEl);\n var tag = $targetEl.prop('tagName').toLowerCase();\n\n if (tag === 'input' || tag === 'select') {\n $targetEl.val($el.data('set-val'));\n } else if (!$targetEl.hasClass('field')) {\n $targetEl.text($el.data('set-val'));\n }\n });\n $el.trigger(_events.SET_TARGET_UPDATE);\n $target.closest('form').trigger(_events.SET_TARGET_UPDATE);\n }); // emulate links\n\n $('.a[data-href]').on('click', function (e) {\n console.log(\"\".concat(NAME, \": js link processing .a[data-href]\"));\n var $el = $(e.currentTarget);\n var href = $el.data('href');\n\n if (!href.length) {\n console.warn(\"\".concat(NAME, \": .a[data-href] | Missing data-href\"));\n console.warn($el);\n }\n\n W.location.assign(href);\n }); // set attributes for mobile friendly tables\n\n $('.typography table').each(function (i, el) {\n var $table = $(el);\n var $header = $table.find('thead tr:first-child');\n\n if (!$header.length) {\n $header = $(el).find('tr:first-child');\n }\n\n $header.find('td').each(function (i, h) {\n var $h = $(h);\n $table.find('tr').find(\"td:eq(\".concat(i, \")\")).each(function (i, el) {\n var $el = $(el);\n\n if (!$el.attr('data-label')) {\n $el.attr('data-label', $h.text());\n }\n });\n });\n }); //\n // hide spinner\n\n _ui_spinner.hide(function () {\n $Body.addClass('loaded');\n }); // fire page printing\n\n if (W.URLDetails['hash'].indexOf('printpage') > -1) {\n W.print();\n }\n\n $Body.data(NAME, ui);\n $W.removeClass('lock-main-init');\n }\n }, {\n key: \"detectBootstrapScreenSize\",\n value: function detectBootstrapScreenSize() {\n var $el = $('
');\n\n var envs = _main_toConsumableArray(_consts.ENVS);\n\n $Body.append($el);\n var curEnv = envs.shift();\n envs = envs.reverse();\n\n for (var i = 0; i < envs.length; ++i) {\n var env = envs[i];\n $el.addClass(\"d-\".concat(env, \"-none\"));\n\n if ($el.is(':hidden')) {\n curEnv = env;\n break;\n }\n }\n\n $el.remove();\n $Body.removeClass(envs);\n $Body.addClass(curEnv);\n var landscape = true;\n\n if ($W.width() > $W.height()) {\n $Body.removeClass('portrait');\n $Body.addClass('landscape');\n } else {\n landscape = false;\n $Body.removeClass('landscape');\n $Body.addClass('portrait');\n }\n\n console.log(\"\".concat(NAME, \": screen size detected \").concat(curEnv, \" | landscape \").concat(landscape));\n return curEnv;\n }\n }, {\n key: \"updateLocation\",\n value: function updateLocation(url) {\n var location = url || W.location.href;\n location = location.replace(W.URLDetails['base'], '/');\n var hash = location.indexOf('#');\n W.URLDetails.relative = location.split('#')[0];\n W.URLDetails.hash = hash >= 0 ? location.substr(location.indexOf('#')) : '';\n } // show site-wide alert\n\n }, {\n key: \"alert\",\n value: function alert(msg, cls) {\n $SiteWideMessage.fadeOut('fast');\n $SiteWideMessage.html(\"
×\").concat(msg, \"
\"));\n $SiteWideMessage.find('.page-alert').alert();\n $SiteWideMessage.find('.close[data-dismiss=\"alert\"]').click(function () {\n $SiteWideMessage.fadeOut('slow', function () {\n $SiteWideMessage.find('.page-alert').alert('close');\n });\n });\n $SiteWideMessage.fadeIn('slow');\n\n if ($AlertNotify.length) {\n $AlertNotify[0].play();\n }\n\n $W.trigger(\"\".concat(_events.ALLERTAPPEARED));\n } // hide site-wide alert\n\n }, {\n key: \"alertHide\",\n value: function alertHide() {\n if ($SiteWideMessage.length !== 0) {\n $SiteWideMessage.fadeOut('slow', function () {\n $SiteWideMessage.find('.alert').alert('close');\n });\n }\n\n if ($AlertNotify.length && typeof $AlertNotify[0].stop !== 'undefined') {\n $AlertNotify[0].stop();\n }\n\n $W.trigger(\"\".concat(_events.ALLERTREMOVED));\n } // load all images\n\n }, {\n key: \"loadImages\",\n value: function loadImages() {\n var $imgs = $Body.find('img').not('.loaded');\n var $imgUrls = [];\n var $imgLazyUrls = []; // collect image details\n\n $imgs.each(function (i, el) {\n var $el = $(el);\n var src = $el.attr('src');\n var lazySrc = $el.data('lazy-src');\n\n if ($el.hasClass('loaded')) {\n return;\n }\n\n if (src && src.length) {\n $imgUrls.push(src);\n }\n\n if (lazySrc && lazySrc.length) {\n $imgLazyUrls.push(lazySrc);\n $el.addClass('loading');\n _ui_ajax.preload([lazySrc]).then(function () {\n $el.attr('src', lazySrc);\n $el.on(\"\".concat(_events.LOADED), function () {\n $el.addClass('loaded');\n $el.removeClass('loading');\n $el.trigger(\"\".concat(_events.LAZYIMAGEREADY));\n });\n });\n }\n }); // load lazy backgrounds\n\n $Body.find('[data-lazy-bg]').not('.loaded').each(function (i, el) {\n var $el = $(el);\n var lazySrc = $el.data('lazy-bg');\n\n if ($el.hasClass('loaded')) {\n return;\n }\n\n if (lazySrc && lazySrc.length) {\n $imgLazyUrls.push(lazySrc);\n $el.addClass('loading');\n _ui_ajax.preload([lazySrc]).then(function () {\n $el.css({\n 'background-image': \"url(\".concat(lazySrc, \")\")\n });\n $el.addClass('loaded');\n $el.removeClass('loading');\n $el.trigger(\"\".concat(_events.LAZYIMAGEREADY));\n });\n }\n }); // replace img src\n\n $Body.find('[data-src-replace]').not('.loaded').each(function (i, el) {\n var $el = $(el);\n var lazySrc = $el.data('src-replace');\n\n if ($el.hasClass('loaded')) {\n return;\n }\n\n if (lazySrc && lazySrc.length) {\n $el.addClass('loaded');\n $el.attr('src', lazySrc);\n }\n }); // load defined images\n\n _ui_ajax.preload($imgUrls).then(function () {\n $W.trigger('images-loaded'); // load lazy images\n\n _ui_ajax.preload($imgLazyUrls).then(function () {\n console.log(\"\".concat(NAME, \": All images are loaded!\"));\n setTimeout(function () {\n $W.trigger(\"\".concat(_events.LAZYIMAGESREADY));\n console.groupEnd('Post-init');\n console.timeEnd('Post-init');\n }, 100);\n });\n });\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n console.log(\"\".concat(NAME, \": dispose\"));\n }\n }]);\n\n return MainUI;\n }();\n\n $W.on(\"\".concat(_events.MAININIT, \" \").concat(_events.AJAX, \" \").concat(_events.AJAXMAIN, \" \").concat(_events.LOADED), function () {\n if ($W.hasClass('lock-main-init')) {\n console.warn(\"\".concat(NAME, \": locked\"));\n return;\n }\n\n $W.addClass('lock-main-init');\n MainUI.init();\n });\n $W.on(\"\".concat(_events.RESIZE), function () {\n MainUI.detectBootstrapScreenSize();\n });\n $W.on('beforeunload unload', function () {\n _ui_spinner.show(function () {\n $Body.removeClass('loaded');\n });\n }); // hide spinner on target _blank\n\n $('[target=\"_blank\"],.external').not('[data-toggle=\"lightbox\"],[data-lightbox-gallery]').on('click submit touch', function (e) {\n console.log(\"\".concat(NAME, \": External link\"));\n setTimeout(function () {\n _ui_spinner.hide(function () {\n $Body.addClass('loaded');\n });\n }, 1000);\n });\n W.MainUI = MainUI;\n return MainUI;\n}((external_jQuery_default()));\n\n/* harmony default export */ var _main = (MainUI);\n;// CONCATENATED MODULE: ./src/js/_components/_ui.hover.js\n/*\n * Conflicts with 'bootstrap/js/dist/dropdown'\n */\n\n\nfunction _ui_hover_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _ui_hover_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _ui_hover_createClass(Constructor, protoProps, staticProps) { if (protoProps) _ui_hover_defineProperties(Constructor.prototype, protoProps); if (staticProps) _ui_hover_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\n\n\nvar HoverUI = function ($) {\n // Constants\n var W = window;\n var D = document;\n var $Html = $('html');\n var $Body = $('body');\n var NAME = 'jsHoverUI';\n var DATA_KEY = NAME;\n\n var HoverUI = /*#__PURE__*/function () {\n // Constructor\n function HoverUI(el) {\n _ui_hover_classCallCheck(this, HoverUI);\n\n console.log(\"\".concat(NAME, \": init\"));\n var ui = this;\n var $el = $(el);\n\n if ($el.is('[target=\"_blank\"],.external,[data-toggle=\"lightbox\"],[data-lightbox-gallery]')) {\n return true;\n }\n\n ui.$el = $el; // find parent\n\n var $parent = $el.parents('.nav-item, .dropdown');\n $parent = $parent && $parent.length ? $parent.first() : null; //$parent = $parent ? $parent : $el.parent();\n\n ui.$parent = $parent; // find target\n\n var $target = $el.data('target');\n $target = $target && $target.length ? $target : null;\n $target = $target ? $target : $parent ? $parent.find('.dropdown-menu').first() : null;\n\n if (!$target || !$target.length) {\n console.warn(\"\".concat(NAME, \": Missing target for:\"));\n console.warn($el);\n return;\n }\n\n ui.$target = $target;\n var $triger = $parent ? $parent : $el;\n ui.$triger = $triger; // integrate with dropdown-toggle\n\n $('[data-toggle=\"dropdown\"]').on('click touch', function (e) {\n console.log(\"\".concat(NAME, \": dropdown click-touch\"));\n ui.hide();\n });\n\n if (!W.isTouch) {\n $triger.hoverIntent({\n sensitivity: 10,\n interval: 50,\n over: function over() {\n ui.show();\n },\n out: function out() {\n ui.hide();\n }\n });\n }\n\n $el.off('click touch');\n $el.on('click touch', function (e) {\n var size = _main.detectBootstrapScreenSize();\n console.log(\"\".concat(NAME, \": click-touch size: \").concat(size));\n\n if (size === 'xs' || !$el.data('allow-click') || W.IsTouchScreen && !$el.data('allow-touch-click')) {\n console.log(\"\".concat(NAME, \": click-touch prevent click\"));\n e.stopPropagation();\n e.preventDefault();\n }\n\n if (ui.isShown()) {\n ui.hide();\n } else {\n ui.show();\n }\n });\n $el.data(NAME, ui);\n $triger.addClass(\"\".concat(NAME, \"-active\"));\n }\n\n _ui_hover_createClass(HoverUI, [{\n key: \"isShown\",\n value: function isShown() {\n return this.$target.hasClass('show');\n }\n }, {\n key: \"show\",\n value: function show() {\n var ui = this;\n ui.$el.parents('.dropdown').not('.active').each(function (i, el) {\n var $el = $(el);\n $el.find('.dropdown').removeClass('show');\n $el.addClass('show');\n });\n ui.$target.addClass('show');\n }\n }, {\n key: \"hide\",\n value: function hide() {\n var ui = this;\n var $el = ui.$target;\n $el.removeClass('show');\n $el.find('.dropdown-menu').removeClass('show');\n $el.parent('.dropdown').removeClass('show');\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n var ui = this;\n var $el = ui.$el;\n console.log(\"\".concat(NAME, \": dispose\"));\n ui.$triger.removeClass(\"\".concat(NAME, \"-active\"));\n $.removeData($el, DATA_KEY);\n ui.$el = null;\n ui.$parent = null;\n ui.$target = null;\n ui.$triger = null;\n }\n }], [{\n key: \"_jQueryInterface\",\n value: function _jQueryInterface() {\n return this.each(function () {\n // attach functionality to el\n var $el = $(this);\n var data = $el.data(DATA_KEY);\n\n if (!data) {\n data = new HoverUI(this);\n $el.data(DATA_KEY, data);\n }\n });\n }\n }]);\n\n return HoverUI;\n }(); // jQuery interface\n\n\n $.fn[NAME] = HoverUI._jQueryInterface;\n $.fn[NAME].Constructor = HoverUI;\n\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return HoverUI._jQueryInterface;\n }; // auto-apply\n\n\n $('[data-toggle=\"hover\"]').ready(function () {\n $('[data-toggle=\"hover\"]').jsHoverUI();\n }); // rewrite 'bootstrap/js/dist/dropdown'\n\n $('[data-toggle=\"dropdown\"]').on('click touch', function (e) {\n e.preventDefault();\n var $el = $(e.currentTarget);\n var $parent = $el.parent('.dropdown'); // hide siblings\n\n $parent.parent().find('.dropdown, .dropdown-menu').removeClass('show');\n\n if ($parent.hasClass('show')) {\n $parent.removeClass('show');\n $parent.find('.dropdown-menu').removeClass('show');\n } else {\n $parent.addClass('show');\n $parent.find('.dropdown-menu').addClass('show');\n }\n });\n return HoverUI;\n}((external_jQuery_default()));\n\n/* harmony default export */ var _ui_hover = (HoverUI);\n;// CONCATENATED MODULE: ./src/js/_components/_ui.carousel.js\n\n\nfunction _ui_carousel_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _ui_carousel_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _ui_carousel_createClass(Constructor, protoProps, staticProps) { if (protoProps) _ui_carousel_defineProperties(Constructor.prototype, protoProps); if (staticProps) _ui_carousel_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\n\n\nvar CarouselUI = function ($) {\n // Constants\n var NAME = 'CarouselUI';\n\n var CarouselUI = /*#__PURE__*/function () {\n function CarouselUI() {\n _ui_carousel_classCallCheck(this, CarouselUI);\n }\n\n _ui_carousel_createClass(CarouselUI, null, [{\n key: \"each\",\n // Static methods\n value: function each(callback) {\n $(\"js\".concat(NAME, \", .js-carousel\")).each(function (i, e) {\n callback(i, $(e));\n });\n }\n }, {\n key: \"init\",\n value: function init() {\n this.dispose();\n console.log(\"\".concat(NAME, \": init\"));\n this.each(function (i, e) {\n var $e = $(e),\n id = \"Carousel\".concat(i);\n $e.attr('id', id);\n $e.data('id', i);\n var $items = $(e).find('.carousel-item'),\n count = $items.length;\n\n if (!count) {\n return;\n } // create carousel-controls\n\n\n if ($e.data('indicators')) {\n var $indicators = $('
    ');\n $indicators.append(\"
  1. \"));\n\n for (var _i = 1; _i < count; _i++) {\n $indicators.append(\"
  2. \"));\n }\n\n $e.prepend($indicators);\n } // create arrows\n\n\n if ($e.data('arrows')) {\n $e.prepend(\"Previous\"));\n $e.prepend(\"Next\"));\n } // init carousel\n\n\n $e.carousel();\n var $youtubeSlides = $e.find('iframe[src^=\"https://www.youtube.com/embed/\"]');\n $e.on('slide.bs.carousel', function () {\n if ($youtubeSlides.length) {\n $youtubeSlides.each(function (i, e) {\n var $e = $(e);\n\n try {\n $e.data('player', new YT.Player(e, {\n events: {\n onReady: function onReady() {\n $e.data('player').pauseVideo();\n }\n }\n }));\n $e.data('player').pauseVideo();\n } catch (e) {}\n });\n }\n });\n $e.find('.carousel-control-prev').on('click', function (e) {\n e.preventDefault();\n $e.carousel('prev');\n });\n $e.find('.carousel-control-next').on('click', function (e) {\n e.preventDefault();\n $e.carousel('next');\n }); // init touch swipes\n\n $e.hammer().bind(_events.SWIPELEFT, function (e) {\n $(event.target).carousel('next');\n });\n $e.hammer().bind(_events.SWIPERIGHT, function (e) {\n $(event.target).carousel('prev');\n });\n /*$e.find('.carousel-item').hammer().bind('tap', (event) => {\n $(event.target).carousel('next');\n });*/\n\n $e.addClass(\"js\".concat(NAME, \"-active\"));\n $e.trigger(_events.CAROUSEL_READY);\n });\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n this.each(function (i, e) {\n $(e).carousel('dispose');\n });\n }\n }]);\n\n return CarouselUI;\n }();\n\n $(window).on(\"\".concat(_events.LODEDANDREADY), function () {\n CarouselUI.init();\n });\n return CarouselUI;\n}((external_jQuery_default()));\n\n/* harmony default export */ var _ui_carousel = (CarouselUI);\n;// CONCATENATED MODULE: ./src/js/_components/_ui.menu.js\n\n\nfunction _ui_menu_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _ui_menu_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _ui_menu_createClass(Constructor, protoProps, staticProps) { if (protoProps) _ui_menu_defineProperties(Constructor.prototype, protoProps); if (staticProps) _ui_menu_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\nvar SlidingMenu = function ($) {\n // Constants\n var NAME = 'jsSlidingMenu';\n var DATA_KEY = NAME;\n\n var SlidingMenu = /*#__PURE__*/function () {\n // Constructor\n function SlidingMenu(element) {\n _ui_menu_classCallCheck(this, SlidingMenu);\n\n console.log(\"\".concat(NAME, \": init\"));\n this._element = element;\n var $element = $(this._element);\n $element.addClass(\"\".concat(NAME, \"-active\")); // esc button\n\n $(window).on('keyup', function (e) {\n if (e.which === 27) {\n $element.find('.is-open[data-toggle=\"offcanvas\"]').click();\n }\n });\n } // Public methods\n\n\n _ui_menu_createClass(SlidingMenu, [{\n key: \"dispose\",\n value: function dispose() {\n console.log(\"\".concat(NAME, \": dispose\"));\n $(this._element).removeClass(\"\".concat(NAME, \"-active\"));\n $.removeData(this._element, DATA_KEY);\n this._element = null;\n }\n }], [{\n key: \"_jQueryInterface\",\n value: function _jQueryInterface() {\n return this.each(function () {\n // attach functionality to element\n var $element = $(this);\n var data = $element.data(DATA_KEY);\n\n if (!data) {\n data = new SlidingMenu(this);\n $element.data(DATA_KEY, data);\n }\n });\n }\n }]);\n\n return SlidingMenu;\n }(); // jQuery interface\n\n\n $.fn[NAME] = SlidingMenu._jQueryInterface;\n $.fn[NAME].Constructor = SlidingMenu;\n\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return SlidingMenu._jQueryInterface;\n }; // auto-apply\n\n\n $(\".ui.\".concat(NAME)).ready(function () {\n $(\".ui.\".concat(NAME)).jsSlidingMenu();\n });\n return SlidingMenu;\n}((external_jQuery_default()));\n\n/* harmony default export */ var _ui_menu = (SlidingMenu);\n// EXTERNAL MODULE: ./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/modal.js\nvar modal = __webpack_require__(\"./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/modal.js\");\n// EXTERNAL MODULE: ./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/tooltip.js\nvar tooltip = __webpack_require__(\"./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/tooltip.js\");\n// EXTERNAL MODULE: ./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/popover.js\nvar popover = __webpack_require__(\"./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/popover.js\");\n// EXTERNAL MODULE: ./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/scrollspy.js\nvar scrollspy = __webpack_require__(\"./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/scrollspy.js\");\n// EXTERNAL MODULE: ./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/tab.js\nvar tab = __webpack_require__(\"./node_modules/.pnpm/bootstrap@4.6.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/tab.js\");\n;// CONCATENATED MODULE: ./src/js/_components/_ui.cookie.js\n\n\nfunction _ui_cookie_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _ui_cookie_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _ui_cookie_createClass(Constructor, protoProps, staticProps) { if (protoProps) _ui_cookie_defineProperties(Constructor.prototype, protoProps); if (staticProps) _ui_cookie_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\nvar CookieUI = function ($) {\n var D = document;\n var W = window;\n\n var CookieUI = /*#__PURE__*/function () {\n function CookieUI() {\n _ui_cookie_classCallCheck(this, CookieUI);\n }\n\n _ui_cookie_createClass(CookieUI, null, [{\n key: \"get\",\n value: function get(name) {\n return D.cookie.split('; ').reduce(function (r, v) {\n var parts = v.split('=');\n return parts[0] === name ? decodeURIComponent(parts[1]) : r;\n }, '');\n }\n }, {\n key: \"set\",\n value: function set(name, value) {\n var days = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 7;\n var path = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '/';\n var expires = new Date(Date.now() + days * 864e5).toUTCString();\n D.cookie = \"\".concat(name, \"=\").concat(encodeURIComponent(value), \"; expires=\").concat(expires, \"; path=\").concat(path);\n }\n }]);\n\n return CookieUI;\n }(); //W.CookieUI = new CookieUI();\n\n\n return CookieUI;\n}((external_jQuery_default()));\n\n/* harmony default export */ var _ui_cookie = (CookieUI);\n;// CONCATENATED MODULE: ./src/js/_components/_ui.flyout.js\n\n\nfunction _ui_flyout_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _ui_flyout_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _ui_flyout_createClass(Constructor, protoProps, staticProps) { if (protoProps) _ui_flyout_defineProperties(Constructor.prototype, protoProps); if (staticProps) _ui_flyout_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\n\nvar FlyoutUI = function ($) {\n var W = window;\n var D = document;\n var $Body = $('body');\n var NAME = 'FlyoutUI';\n var COOKIE = \"\".concat(NAME, \"-hide\");\n var TIMEOUT = 2000;\n\n var FlyoutUI = /*#__PURE__*/function () {\n function FlyoutUI() {\n _ui_flyout_classCallCheck(this, FlyoutUI);\n }\n\n _ui_flyout_createClass(FlyoutUI, null, [{\n key: \"init\",\n value: function init() {\n console.log(\"\".concat(NAME, \": init\"));\n var ui = this;\n ui.$modal = $(\".flyout-\".concat(NAME));\n\n if (!ui.$modal.length) {\n return false;\n }\n\n var $close = ui.$modal.find(\".flyout-\".concat(NAME, \"__close\"));\n ui.$modal.data(NAME, ui);\n\n if ($close.length) {\n $close.on('click', function () {\n ui.hide();\n });\n }\n\n var hide = _ui_cookie.get(COOKIE);\n\n if (!$close.length || !hide || hide !== 'true') {\n setTimeout(function () {\n ui.show();\n }, TIMEOUT);\n }\n }\n }, {\n key: \"show\",\n value: function show(callback) {\n var ui = this;\n ui.$modal.addClass(\"flyout-\".concat(NAME, \"__active\"));\n }\n }, {\n key: \"hide\",\n value: function hide(callback) {\n var ui = this;\n _ui_cookie.set(COOKIE, 'true', 1);\n ui.$modal.removeClass(\"flyout-\".concat(NAME, \"__active\"));\n }\n }]);\n\n return FlyoutUI;\n }();\n\n $(W).on(\"\".concat(NAME, \".init \").concat(_events.AJAX, \" \").concat(_events.LOADED), function () {\n FlyoutUI.init();\n });\n W.FlyoutUI = FlyoutUI;\n return FlyoutUI;\n}((external_jQuery_default()));\n\n/* harmony default export */ var _ui_flyout = (FlyoutUI);\n;// CONCATENATED MODULE: ./src/js/_components/_ui.sidebar.js\n //import StickySidebar from 'sticky-sidebar/src/sticky-sidebar';\n\nfunction _ui_sidebar_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _ui_sidebar_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _ui_sidebar_createClass(Constructor, protoProps, staticProps) { if (protoProps) _ui_sidebar_defineProperties(Constructor.prototype, protoProps); if (staticProps) _ui_sidebar_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\nvar SidebarUI = function ($) {\n var D = document;\n var W = window;\n var $Body = $('body');\n var NAME = 'SidebarUI';\n var CLASSNAME = \"js\".concat(NAME);\n var CONTENTHOLDER = 'content-holder';\n var INNERWRAPPER = \"\".concat(CLASSNAME, \"__inner\");\n\n var SidebarUI = /*#__PURE__*/function () {\n function SidebarUI() {\n _ui_sidebar_classCallCheck(this, SidebarUI);\n }\n\n _ui_sidebar_createClass(SidebarUI, null, [{\n key: \"init\",\n value: function init() {\n var ui = this;\n ui.dispose();\n\n if (!$(\".\".concat(CLASSNAME)).length) {\n return;\n }\n\n console.log(\"\".concat(NAME, \": init ...\")); //const fontSize = parseInt($Body.css('font-size'));\n\n var fontSize = 0;\n var contentElement = $(\".\".concat(CONTENTHOLDER))[0]; //$(`.${CLASSNAME}`).wrapInner(`
    `);\n\n var $el = $(\".\".concat(CLASSNAME));\n var $innerWrapper = $(\".\".concat(INNERWRAPPER));\n /*const sticky = new StickySidebar(`.${CLASSNAME}`, {\n topSpacing: fontSize,\n bottomSpacing: fontSize,\n containerSelector: CONTENTHOLDER,\n innerWrapperSelector: INNERWRAPPER,\n });*/\n\n $el.addClass(\"\".concat(CLASSNAME, \"-active\"));\n $Body.on(\"\".concat(_events.SCROLL, \" \").concat(_events.RESIZE), function (e) {\n var contentOffset = parseInt(contentElement.offsetTop) + fontSize;\n var contentOffsetHeight = parseInt(contentElement.offsetHeight) - fontSize;\n var sidebarWidth = $el[0].offsetWidth;\n var scrollPos = parseInt($Body.scrollTop()); // normal pos\n\n if (contentOffset >= scrollPos) {\n $innerWrapper.attr('style', '');\n } else if (scrollPos >= contentOffset + contentOffsetHeight - $innerWrapper[0].offsetHeight) {\n // bottom pos\n $innerWrapper.attr('style', \"position:absolute;bottom:\".concat(fontSize, \"px\"));\n } else {\n // scrolled pos\n $innerWrapper.attr('style', \"position:fixed;top:\".concat(fontSize, \"px;width:\").concat(sidebarWidth, \"px\"));\n }\n });\n }\n }, {\n key: \"dispose\",\n value: function dispose() {\n console.log(\"\".concat(NAME, \": dispose\"));\n }\n }]);\n\n return SidebarUI;\n }();\n\n $(W).on(\"\".concat(NAME, \".init \").concat(_events.LODEDANDREADY), function () {\n SidebarUI.init();\n });\n W.SidebarUI = new SidebarUI();\n return SidebarUI;\n}((external_jQuery_default()));\n\n/* harmony default export */ var _ui_sidebar = (SidebarUI);\n;// CONCATENATED MODULE: ./src/js/_components/_ui.video.preview.js\n\n\nfunction _ui_video_preview_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _ui_video_preview_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _ui_video_preview_createClass(Constructor, protoProps, staticProps) { if (protoProps) _ui_video_preview_defineProperties(Constructor.prototype, protoProps); if (staticProps) _ui_video_preview_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\n\n\nvar VideoPreviewUI = function ($) {\n var NAME = 'jsVideoPreviewUI';\n var DATA_KEY = NAME;\n var G = window;\n var D = document;\n\n var VideoPreviewUI = /*#__PURE__*/function () {\n function VideoPreviewUI(el) {\n _ui_video_preview_classCallCheck(this, VideoPreviewUI);\n\n var ui = this;\n ui.$_el = $(el);\n ui.innerHTML = ui.$_el[0].innerHTML;\n ui.$_el.data(DATA_KEY, this);\n var href = ui.$_el.attr('href') || ui.$_el.data('href');\n\n var YouTubeGetID = function YouTubeGetID(url) {\n var parsedURL = url.split(/(vi\\/|v%3D|v=|\\/v\\/|youtu\\.be\\/|\\/embed\\/)/);\n console.log(\"\".concat(NAME, \": \").concat(parsedURL));\n return undefined !== parsedURL[2] ? parsedURL[2].split(/[^0-9a-z_-]/i)[0] : parsedURL[0];\n };\n\n var video;\n\n if (video = href.match(/(youtube|youtube-nocookie|youtu|vimeo)\\.(com|be)\\/(watch\\?v=([\\w-]+)|([\\w-]+))/)) {\n var video_id;\n\n if (video[1] === 'youtube' || video[1] === 'youtube-nocookie' || video[1] === 'youtu') {\n video_id = YouTubeGetID(href);\n }\n\n if (video[1] == 'vimeo') {\n video_id = video[3];\n ui.$_el.addClass('loading');\n $.ajax({\n type: 'GET',\n url: \"https://vimeo.com/api/v2/video/\".concat(video_id, \".json\"),\n jsonp: 'callback',\n dataType: 'jsonp',\n success: function success(data) {\n var thumbnail_src = data[0].thumbnail_large;\n ui.show(thumbnail_src);\n ui.$_el.removeClass('loading');\n }\n });\n return;\n }\n\n if (video_id) {\n ui.show(\"//i3.ytimg.com/vi/\".concat(video_id, \"/0.jpg\"));\n }\n }\n }\n\n _ui_video_preview_createClass(VideoPreviewUI, [{\n key: \"show\",\n value: function show(src) {\n var ui = this;\n ui.$_el[0].innerHTML = '';\n ui.$_el.append(\"\\\"Video\\\"\"));\n }\n }], [{\n key: \"dispose\",\n value: function dispose() {\n console.log(\"\".concat(NAME, \": dispose\"));\n ui.$_el[0].innerHTML = ui.innerHTML;\n }\n }, {\n key: \"_jQueryInterface\",\n value: function _jQueryInterface() {\n return this.each(function (i, el) {\n // attach functionality to element\n var $el = $(el);\n var data = $el.data(DATA_KEY);\n\n if (!data) {\n data = new VideoPreviewUI(el);\n $el.data(DATA_KEY, data);\n }\n });\n }\n }]);\n\n return VideoPreviewUI;\n }(); // jQuery interface\n\n\n $.fn[NAME] = VideoPreviewUI._jQueryInterface;\n $.fn[NAME].Constructor = VideoPreviewUI;\n\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT;\n return VideoPreviewUI._jQueryInterface;\n }; // auto-apply\n\n\n $(window).on(\"\".concat(_events.LODEDANDREADY), function () {\n console.log(\"\".concat(NAME, \": init\"));\n $('[data-video-preview=\"true\"]').each(function (i, el) {\n $(el).jsVideoPreviewUI();\n });\n });\n return VideoPreviewUI;\n}((external_jQuery_default()));\n\n/* harmony default export */ var _ui_video_preview = (VideoPreviewUI);\n;// CONCATENATED MODULE: ./node_modules/.pnpm/@a2nt/meta-lightbox@2.7.3/node_modules/@a2nt/meta-lightbox/src/scss/app.scss\n// extracted by mini-css-extract-plugin\n\n;// CONCATENATED MODULE: ./node_modules/.pnpm/@a2nt/meta-lightbox@2.7.3/node_modules/@a2nt/meta-lightbox/src/js/_events.js\n/**\n * Add your global events here\n */\n/* harmony default export */ var js_events = ({\n AJAX: 'ajax-load',\n AJAXMAIN: 'ajax-main-load',\n MAININIT: 'main-init',\n TABHIDDEN: 'tab-hidden',\n TABFOCUSED: 'tab-focused',\n OFFLINE: 'offline',\n ONLINE: 'online',\n BACKONLINE: 'back-online',\n TOUCHENABLE: 'touch-enabled',\n TOUCHDISABLED: 'touch-disabled',\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;// CONCATENATED MODULE: ./node_modules/.pnpm/@a2nt/meta-lightbox@2.7.3/node_modules/@a2nt/meta-lightbox/src/js/meta-lightbox.js\n/*\n * MetaLightbox\n * https://tony.twma.pro\n *\n */\n// optional:\n//=require ../../bower_components/jquery-zoom/jquery.zoom.js\n\n\nfunction meta_lightbox_typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { meta_lightbox_typeof = function _typeof(obj) { return typeof obj; }; } else { meta_lightbox_typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return meta_lightbox_typeof(obj); }\n\nfunction meta_lightbox_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction meta_lightbox_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction meta_lightbox_createClass(Constructor, protoProps, staticProps) { if (protoProps) meta_lightbox_defineProperties(Constructor.prototype, protoProps); if (staticProps) meta_lightbox_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\nvar MetaLightboxUI = function ($) {\n var W = window;\n var $W = $(W);\n var D = document;\n var $Body = $('body');\n var NAME = 'MetaLightboxUI';\n var NETWORK_ERROR = '
    Connection failure.
    ';\n\n var MetaLightboxUI = /*#__PURE__*/function () {\n function MetaLightboxUI() {\n meta_lightbox_classCallCheck(this, MetaLightboxUI);\n }\n\n meta_lightbox_createClass(MetaLightboxUI, null, [{\n key: \"init\",\n value: function init() {\n console.log(\"\".concat(NAME, \": init ...\"));\n var ui = this;\n ui.isMSIE =\n /*@cc_on!@*/\n 0;\n\n try {\n ui.isHidpi = ui.is_hdpi();\n } catch (e) {\n console.log(\"\".concat(NAME, \": catch\"));\n }\n\n $(\".js\".concat(NAME, \",[data-toggle=\\\"lightbox\\\"],[data-lightbox-gallery]\")).on('click', function (e) {\n e.preventDefault();\n e.stopPropagation();\n var $link = $(e.currentTarget);\n ui.show($link);\n });\n $(\".js\".concat(NAME, \"-close-inline\")).on('click', function (e) {\n var $el = $(e.currentTarget);\n $el.parents('.meta-lightbox-overlay').removeClass('meta-lightbox-open');\n });\n }\n }, {\n key: \"is_hdpi\",\n value: function is_hdpi() {\n console.log(\"\".concat(NAME, \": isHidpi\"));\n var mediaQuery = '(-webkit-min-device-pixel-ratio: 1.5),\\\n (min--moz-device-pixel-ratio: 1.5),\\\n (-o-min-device-pixel-ratio: 3/2),\\\n (min-resolution: 1.5dppx)';\n if (W.devicePixelRatio > 1) return true;\n return W.matchMedia && W.matchMedia(mediaQuery).matches;\n }\n }, {\n key: \"show\",\n value: function show($link) {\n console.log(\"\".concat(NAME, \": show\"));\n var ui = this;\n var $lightbox = ui.constructLightbox();\n if (!$lightbox) return;\n var $content = ui.$content;\n if (!$content) return;\n $Body.addClass(\"meta-lightbox-body-effect-fade\"); // Add content\n\n ui.process($content, $link); // Nav\n\n if ($link.data('lightbox-gallery')) {\n var $galleryItems = $(\"[data-lightbox-gallery=\\\"\".concat($link.data('lightbox-gallery'), \"\\\"]\"));\n\n if ($galleryItems.length === 1) {\n $('.meta-lightbox-nav').hide();\n } else {\n $('.meta-lightbox-nav').show();\n } // Prev\n\n\n $('.meta-lightbox-prev').off('click').on('click', function (e) {\n e.preventDefault();\n var index = $galleryItems.index($link);\n var $currentLink = $galleryItems.eq(index - 1);\n if (!$currentLink.length) $currentLink = $galleryItems.last(); //ui.hide();\n\n setTimeout(function () {\n ui.show($currentLink);\n }, 10);\n }); // Next\n\n $('.meta-lightbox-next').off('click').on('click', function (e) {\n e.preventDefault();\n var index = $galleryItems.index($link);\n var $currentLink = $galleryItems.eq(index + 1);\n if (!$currentLink.length) $currentLink = $galleryItems.first(); //ui.hide();\n\n setTimeout(function () {\n ui.show($currentLink);\n }, 10);\n });\n }\n\n setTimeout(function () {\n ui.$overlay.addClass('meta-lightbox-open');\n }, 1); // For CSS transitions\n }\n }, {\n key: \"constructLightbox\",\n value: function constructLightbox() {\n console.log(\"\".concat(NAME, \": constructLightbox\"));\n var ui = this;\n var overlay = $('
    ', {\n class: 'meta-lightbox-overlay meta-lightbox-theme-default meta-lightbox-effect-fade'\n });\n var wrap = $('
    ', {\n class: 'meta-lightbox-wrap'\n });\n var content = $('
    ', {\n class: 'meta-lightbox-content'\n });\n var nav = $(' Previous Next');\n var close = $('Close');\n var title = $('
    ', {\n class: 'meta-lightbox-title-wrap'\n });\n if (ui.$overlay) return ui.$overlay;\n if (ui.isMSIE) overlay.addClass('meta-lightbox-ie');\n wrap.append(content);\n wrap.append(title);\n overlay.append(wrap);\n overlay.append(nav);\n overlay.append(close);\n $Body.append(overlay);\n overlay.on('click', function (e) {\n e.preventDefault();\n ui.hide();\n });\n close.on('click', function (e) {\n e.preventDefault();\n ui.hide();\n });\n ui.$overlay = overlay;\n ui.$content = content;\n ui.$title = title;\n return ui.$overlay;\n }\n }, {\n key: \"setTitle\",\n value: function setTitle(str) {\n var ui = this;\n ui.$title.html(str);\n }\n }, {\n key: \"process\",\n value: function process($content, $link) {\n console.log(\"\".concat(NAME, \": process\"));\n var ui = this;\n var href = $link.attr('href') && $link.attr('href').length ? $link.attr('href') : $link.data('href'); // add custom link specific class\n\n ui.$content.attr('class', 'meta-lightbox-content');\n ui.$content.addClass($link.data('lightbox-class'));\n\n if (!href.length) {\n console.log($link);\n console.error(\"\".concat(NAME, \": href(attr/data) is missing\"));\n }\n\n var $pageSpinner = $('#PageLoading .loading-spinner');\n var loadingContent = $pageSpinner.length ? $pageSpinner.clone() : '';\n ui.$content.append(loadingContent).addClass('meta-lightbox-loading'); // Image\n\n if (href.match(/\\.(jpeg|jpg|gif|png|svg)$/i) || $link.data('force') === 'image') {\n $.ajax({\n url: href,\n success: function success() {\n var img = $('', {\n src: href\n });\n var wrap = $('
    ');\n var imgwrapper = $('');\n imgwrapper.append(img);\n wrap.append(imgwrapper); // Vertically center images\n\n wrap.css({\n 'line-height': \"\".concat($content.height(), \"px\"),\n height: \"\".concat($content.height(), \"px\") // For Firefox\n\n });\n $W.resize(function () {\n wrap.css({\n 'line-height': \"\".concat($content.height(), \"px\"),\n height: \"\".concat($content.height(), \"px\") // For Firefox\n\n });\n });\n\n if (typeof imgwrapper['zoom'] !== 'undefined') {\n imgwrapper.zoom();\n } else {\n imgwrapper.addClass('no-zoom');\n }\n\n ui.$content.html(wrap);\n ui.contentLoaded();\n },\n error: function error(jqXHR, status) {\n var wrap = $(NETWORK_ERROR);\n ui.$content.html(wrap);\n ui.contentLoaded();\n }\n }); // Set the title\n\n var title = $link.data('title') ? $link.data('title') : $link.attr('title');\n ui.setTitle(title); // google analytics\n\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'Image Click', href);\n }\n } // Video (Youtube/Vimeo)\n else if (href.match(/(youtube|youtube-nocookie|youtu|vimeo)\\.(com|be)\\/(watch\\?v=([\\w-]+)|([\\w-]+))/) || $link.data('force') === 'youtube' || $link.data('force') === 'vimeo') {\n var video = href.match(/(youtube|youtube-nocookie|youtu|vimeo)\\.(com|be)\\/(watch\\?v=([\\w-]+)|([\\w-]+))/);\n var classTerm = 'meta-lightbox-video';\n var src;\n\n if (video[1] == 'youtube') {\n src = \"https://www.youtube.com/embed/\".concat(video[4]);\n classTerm = \"\".concat(classTerm, \" meta-lightbox-youtube\");\n }\n\n if (video[1] == 'youtu') {\n src = \"https://www.youtube.com/embed/\".concat(video[3]);\n classTerm = \"\".concat(classTerm, \" meta-lightbox-youtube\");\n }\n\n if (video[1] == 'youtube-nocookie') {\n src = \"https://www.youtube-nocookie.com/embed/\".concat(video[4]);\n classTerm = \"\".concat(classTerm, \" meta-lightbox-youtube\");\n }\n\n if (video[1] == 'vimeo') {\n src = \"https://player.vimeo.com/video/\".concat(video[3]);\n classTerm = \"\".concat(classTerm, \" meta-lightbox-vimeo\");\n }\n\n if (!src) {\n console.warn(\"\".concat(NAME, \": Video loading bad URL\"));\n return false;\n }\n\n var $iframe = ui.loadIframe(src, classTerm);\n\n if (!$iframe) {\n $link.addClass('meta-offline');\n return false;\n }\n\n $link.removeClass('meta-offline'); // Set the title\n\n var _title = $link.data('title') ? $link.data('title') : $link.attr('title');\n\n ui.setTitle(_title); // google analytics\n\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'Video Click', video);\n }\n } // Inline HTML\n else if (href.substring(0, 1) == '#' || $link.data('force') === 'inline') {\n if ($(href).length) {\n wrap = $('
    ');\n wrap.append($(href).clone().show()); // Vertically center html\n\n if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': \"\".concat(-(wrap.outerHeight() / 2), \"px\")\n });\n }\n\n $W.resize(function () {\n if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': \"\".concat(-(wrap.outerHeight() / 2), \"px\")\n });\n }\n });\n ui.$content.html(wrap);\n ui.contentLoaded();\n } else {\n wrap = $(NETWORK_ERROR);\n ui.$content.html(wrap);\n ui.contentLoaded();\n }\n\n $('.meta-lightbox-title-wrap').html(''); // google analytics\n\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'inline HTML click', href);\n }\n } // AJAX/iFrame (default)\n else {\n if ($link.data('force-iframe') || $link.data('force') === 'iframe') {\n console.log(\"\".concat(NAME, \": IFrame forced\"));\n\n var _$iframe = ui.loadIframe(href, 'meta-lightbox-iframe-content');\n\n if (!_$iframe) {\n $link.addClass('meta-offline');\n return false;\n }\n\n $link.removeClass('meta-offline');\n return true;\n }\n\n console.log(\"\".concat(NAME, \": loading AJAX\"));\n $.ajax({\n sync: false,\n async: true,\n url: href,\n dataType: 'html',\n method: 'GET',\n cache: false,\n statusCode: {\n 404: function _() {\n console.log(\"\".concat(NAME, \": page not found\"));\n W.location.href = url;\n },\n 302: function _() {\n console.log(\"\".concat(NAME, \": redirect 302\"));\n W.location.href = url;\n }\n },\n error: function error(jqXHR, status) {\n console.log(\"\".concat(NAME, \": AJAX request failure.\").concat(jqXHR.statusText));\n var wrap = $(NETWORK_ERROR);\n ui.$content.html(wrap);\n ui.contentLoaded(); // google analytics\n\n if (typeof ga === 'function') {\n ga('send', 'event', 'error', 'AJAX ERROR', jqXHR.statusText);\n }\n },\n success: function success(data, status, jqXHR) {\n console.log(\"\".concat(NAME, \": AJAX success\"));\n\n try {\n var dataJson = $.parseJSON(data);\n\n if (meta_lightbox_typeof(dataJson) === 'object') {\n console.log(\"\".concat(NAME, \": AJAX JSON\")); // Replace regions\n\n if (meta_lightbox_typeof(dataJson['regions']) === 'object' && typeof dataJson['regions']['LayoutAjax'] !== 'undefinded') {\n var wrap = $('
    ');\n wrap.html(dataJson['regions']['LayoutAjax']);\n ui.$content.html(wrap);\n ui.contentLoaded();\n } // trigger events\n\n /*if (typeof (data['events']) === 'object') {\n for (var eventName in data.events) {\n $(D).trigger(eventName, [data['events'][eventName]]);\n }\n }*/\n\n\n var title = jqXHR.getResponseHeader('X-Title'),\n link = jqXHR.getResponseHeader('X-Link');\n\n if (title && title.length && link && link.length && link !== W.location.href && link.substring(0, link.indexOf('#')) !== W.location.href.replace($('base').attr('href'), '/')) {\n $('.meta-lightbox-ajax').data('curr-title', D.title);\n $('.meta-lightbox-ajax').data('curr-link', W.location.href);\n\n if (typeof W.localStorage !== 'undefined' && link !== '/') {\n W.localStorage.setItem('current-page', link);\n }\n\n if (D.URL !== link && D.URL !== $('base').attr('href') + link && D.URL !== \"\".concat($('base').attr('href'), \"/\").concat(link)) {\n W.history.pushState({\n title: title,\n page: link,\n ajax: 'true'\n }, title, link);\n }\n\n $('.meta-lightbox-title-wrap').html(''); // google analytics\n\n if (typeof ga === 'function') {\n ga('set', {\n page: link.replace($('base').attr('href'), ''),\n title: title\n });\n ga('send', 'pageview');\n }\n }\n }\n } catch (e) {\n console.log(\"\".concat(NAME, \": AJAX HTML\"));\n var $wrap = $('
    ');\n $wrap.append(data);\n ui.$content.html($wrap);\n ui.contentLoaded();\n } // Vertically center html\n\n /*if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n $W.resize(() => {\n if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n });*/\n\n /*setTimeout(() => {\n $W.resize();\n if (typeof W.imagesLoaded === 'function') {\n W.imagesLoaded().then(() => {\n $W.resize();\n });\n }\n }, 500);*/\n\n\n ui.contentLoaded();\n }\n });\n }\n }\n }, {\n key: \"loadIframe\",\n value: function loadIframe(href, classTerm) {\n var ui = this;\n var $iframe = $('