waygo-maps 1.0.59 → 1.0.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/bundle.js +2 -2
  2. package/package.json +1 -1
package/dist/bundle.js CHANGED
@@ -581,7 +581,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
581
581
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
582
582
 
583
583
  "use strict";
584
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _components_ContentPlacementView_ContentDetails__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/ContentPlacementView/ContentDetails */ \"./src/components/ContentPlacementView/ContentDetails.js\");\n/* harmony import */ var _core_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/Control */ \"./src/core/Control.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, \"catch\": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nfunction _possibleConstructorReturn(t, e) { if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e; if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\"); return _assertThisInitialized(t); }\nfunction _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); return e; }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nfunction _superPropGet(t, e, r, o) { var p = _get(_getPrototypeOf(1 & o ? t.prototype : t), e, r); return 2 & o ? function (t) { return p.apply(r, t); } : p; }\nfunction _get() { return _get = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = _superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, _get.apply(null, arguments); }\nfunction _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); return t; }\nfunction _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }\nfunction _inherits(t, e) { if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, \"prototype\", { writable: !1 }), e && _setPrototypeOf(t, e); }\nfunction _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }\n\n\nvar ContentPlacementControl = /*#__PURE__*/function (_Control) {\n function ContentPlacementControl() {\n var _this;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, ContentPlacementControl);\n _this = _callSuper(this, ContentPlacementControl, [options]);\n _this.map = null;\n _this.contentPlacementIds = [];\n _this.currentContentPlacement = null;\n _this.contentPlacementView = null;\n _this.currentTop = window.innerHeight;\n _this.startingY = 0;\n _this.scrollConfiguration = {\n initialHeight: 0.38,\n // percent of the map container height\n minDistFromBottom: 110 // 185 // in px\n };\n _this.isDragging = false;\n _this.isAtTop = false;\n _this.velocity = 0;\n _this.decelerationFactor = 0.95;\n _this.minVelocity = 0.1;\n return _this;\n }\n _inherits(ContentPlacementControl, _Control);\n return _createClass(ContentPlacementControl, [{\n key: \"onAdd\",\n value: function onAdd(map) {\n this.map = map;\n this.container = document.createElement('div');\n this.container.className = 'content-details-control-container';\n console.log(\"HEREREE\", window.innerHeight);\n this.initializeEventListeners();\n this._attachResizeListener();\n this._initialize();\n this.hide();\n return this.container;\n }\n }, {\n key: \"onRemove\",\n value: function onRemove() {\n _superPropGet(ContentPlacementControl, \"onRemove\", this, 3)([]);\n }\n }, {\n key: \"initializeEventListeners\",\n value: function initializeEventListeners() {\n this.map.on('state:default', this._handleDefaultState.bind(this));\n this.map.on('state:search', this._handleSearchState.bind(this));\n this.map.on('state:selectedContent', this._handleSelectedContentState.bind(this));\n this.map.on('state:directions', this._handleDirectionsState.bind(this));\n this.map.on('initiate:back', this._handleMapInitiateBack.bind(this));\n this.map.map.on('mousedown', this._handleMapFocus.bind(this));\n this.map.map.on('touchstart', this._handleMapFocus.bind(this));\n this.container.addEventListener('mousedown', function (e) {\n return e.stopPropagation();\n });\n this.container.addEventListener('click', function (e) {\n return e.stopPropagation();\n });\n this.container.addEventListener('dblclick', function (e) {\n return e.stopPropagation();\n });\n // this.container.addEventListener('touchstart', (e) => e.stopPropagation());\n\n this.container.addEventListener('touchstart', this.handleTouchStart.bind(this));\n this.container.addEventListener('touchmove', this.handleTouchMove.bind(this));\n this.container.addEventListener('touchend', this.handleTouchEnd.bind(this));\n this.container.addEventListener('wheel', this.handleWheelScroll.bind(this));\n }\n }, {\n key: \"_handleMapFocus\",\n value: function _handleMapFocus(e) {\n if (this.currentViewType === 'desktop') return;\n var features = this.map.map.queryRenderedFeatures(e.point);\n var symbolFeatures = features.filter(function (feature) {\n return feature.layer.type === 'symbol';\n });\n console.log('symbol feagures');\n console.log(symbolFeatures);\n if (symbolFeatures.length === 0) {\n this.scrollToMin(true);\n }\n }\n }, {\n key: \"handleTouchStart\",\n value: function handleTouchStart(event) {\n event.stopPropagation();\n this.startingY = event.touches[0].clientY;\n this.isDragging = true;\n this.velocity = 0;\n }\n }, {\n key: \"handleScrolling\",\n value: function handleScrolling(scrollAmount) {\n var element = this.contentPlacementView.getElement();\n var elementHeight = element.offsetHeight;\n var rect = this.map.mapContainer.getBoundingClientRect();\n var containerBottom = rect.bottom;\n var newTop = null;\n if (scrollAmount <= 0) {\n newTop = Math.max(containerBottom - elementHeight - rect.top, this.currentTop + scrollAmount);\n } else if (scrollAmount > 0) {\n newTop = Math.min(containerBottom - this.scrollConfiguration.minDistFromBottom - rect.top, this.currentTop + scrollAmount);\n }\n console.log(\"new top\", newTop);\n this.scrollTo(newTop);\n }\n }, {\n key: \"handleTouchMove\",\n value: function handleTouchMove(event) {\n if (this.currentViewType === 'desktop') return;\n if (!this.isDragging) return;\n var touchY = event.touches[0].clientY;\n var scrollAmount = -1 * (this.startingY - touchY);\n this.velocity = scrollAmount;\n this.handleScrolling(scrollAmount);\n this.startingY = touchY;\n }\n }, {\n key: \"handleTouchEnd\",\n value: function handleTouchEnd() {\n this.isDragging = false;\n this._applyInertia();\n }\n }, {\n key: \"_applyInertia\",\n value: function _applyInertia() {\n var _this2 = this;\n var rect = this.map.mapContainer.getBoundingClientRect();\n var element = this.contentPlacementView.getElement();\n var elementHeight = element.offsetHeight;\n var containerBottom = rect.bottom;\n var upperLimit = containerBottom - elementHeight - rect.top; // Upper scroll boundary\n var lowerLimit = containerBottom - this.scrollConfiguration.minDistFromBottom - rect.top;\n var _inertia = function inertia() {\n if (Math.abs(_this2.velocity) < _this2.minVelocity) return; // Stop when velocity is too low\n var newTop = _this2.currentTop + _this2.velocity;\n if (newTop <= upperLimit) {\n _this2.scrollTo(upperLimit);\n _this2.velocity = 0; // Stop inertia\n return;\n } else if (newTop >= lowerLimit) {\n _this2.scrollTo(lowerLimit);\n _this2.velocity = 0; // Stop inertia\n return;\n }\n _this2.velocity *= _this2.decelerationFactor; // Apply deceleration\n _this2.scrollTo(newTop); // Update position\n\n requestAnimationFrame(_inertia);\n };\n _inertia();\n }\n }, {\n key: \"handleWheelScroll\",\n value: function handleWheelScroll(event) {\n if (this.currentViewType === 'desktop') return;\n var scrollAmount = -event.deltaY;\n this.handleScrolling(scrollAmount);\n }\n\n // handleScroll() {\n // if (this.container.classList.contains('mobile-view')) {\n // // Get current scroll position\n // const scrollAmount = this.container.scrollTop;\n\n // // Adjust bottom position based on scroll amount\n // // As the user scrolls up, the container moves up (increase the bottom offset)\n // this.container.style.bottom = `${Math.min(45 + scrollAmount / 10, 100)}%`;\n\n // // If you want the container to reset to the bottom when done scrolling, add this:\n // clearTimeout(this.isScrolling);\n // this.isScrolling = setTimeout(() => {\n // this.container.style.bottom = '0px'; // Reset position when scrolling stops\n // }, 200);\n // }\n // }\n }, {\n key: \"_renderDesktopView\",\n value: function _renderDesktopView() {\n if (!this.contentPlacementView) {\n return;\n }\n var element = this.contentPlacementView.getElement();\n this.container.appendChild(element);\n this.container.classList.remove('mobile-view');\n this.container.classList.add('desktop-view');\n }\n }, {\n key: \"_renderMobileView\",\n value: function _renderMobileView() {\n if (!this.contentPlacementView) {\n return;\n }\n var element = this.contentPlacementView.getElement();\n this.container.appendChild(element);\n this.container.classList.remove('desktop-view');\n this.container.classList.add('mobile-view');\n }\n }, {\n key: \"_handleMapInitiateBack\",\n value: function _handleMapInitiateBack() {\n var currentState = this.map._stateCoordinator.state;\n if (currentState === 'selectedContent') {\n if (this.contentPlacementIds.length === 0) return;else if (this.contentPlacementIds.length === 1) {\n var stateHistory = this.map._stateCoordinator.stateHistory;\n var previousMapState = stateHistory[stateHistory.length - 2];\n stateHistory.pop();\n stateHistory.pop();\n if (previousMapState === 'search') {\n this.map.initiateSetToSearchState();\n } else {\n this.map.setToDefaultState();\n }\n } else {\n this.contentPlacementIds.pop();\n this.map.setToSelectedContentState(this.contentPlacementIds);\n }\n } else if (currentState === 'directions') {\n this.map.setToSelectedContentState(this.contentPlacementIds);\n }\n }\n }, {\n key: \"_handleSelectChildContentPlacement\",\n value: function _handleSelectChildContentPlacement(data) {\n var placementId = data.placementId;\n this.contentPlacementIds.push(placementId);\n this.map.setToSelectedContentState(this.contentPlacementIds);\n }\n }, {\n key: \"_handleDefaultState\",\n value: function _handleDefaultState() {\n this.hide();\n this.contentPlacementIds = [];\n this.currentContentPlacement = null;\n this._clearViews();\n if (this.currentViewType === 'mobile') {\n this._scrollToBottom();\n }\n }\n }, {\n key: \"_handleSearchState\",\n value: function _handleSearchState(_) {\n this.hide();\n this.contentPlacementIds = [];\n this.currentContentPlacement = null;\n this._clearViews();\n if (this.currentViewType === 'mobile') {\n this._scrollToBottom();\n }\n }\n }, {\n key: \"_handleSelectedContentState\",\n value: function _handleSelectedContentState(data) {\n var contentPlacementIds = data.contentPlacementIds,\n selectedContentPlacement = data.selectedContentPlacement;\n this.contentPlacementIds = contentPlacementIds;\n this.currentContentPlacement = selectedContentPlacement;\n this._updateContentViews();\n this.show();\n }\n }, {\n key: \"_handleDirectionsState\",\n value: function _handleDirectionsState(_) {\n this.hide();\n }\n }, {\n key: \"_handleSelectDirectionsButton\",\n value: function () {\n var _handleSelectDirectionsButton2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {\n var placementId;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n placementId = data.placementId;\n _context.next = 3;\n return this.map.setToDirectionsState(null, placementId);\n case 3:\n case \"end\":\n return _context.stop();\n }\n }, _callee, this);\n }));\n function _handleSelectDirectionsButton(_x) {\n return _handleSelectDirectionsButton2.apply(this, arguments);\n }\n return _handleSelectDirectionsButton;\n }()\n }, {\n key: \"_handleSelectShareButton\",\n value: function () {\n var _handleSelectShareButton2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(data) {\n var _this3 = this;\n var placementId, floor, accountId, mapId, mapViewId, textToCopy;\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n placementId = data.placementId;\n floor = this.map.getCurrentFloor();\n accountId = this.map.mapData.account_id;\n mapId = this.map.mapData.map_id;\n mapViewId = this.map.mapData.map_view_id;\n textToCopy = \"https://maps.waygomaps.com/\".concat(accountId, \"/\").concat(mapId, \"/\").concat(mapViewId, \"/\").concat(floor, \"/selected-content/\").concat(placementId, \"/0.0,0.0,14.2,45.0,-37.0\");\n navigator.clipboard.writeText(textToCopy).then(function () {\n _this3.contentPlacementView.showCopyPopup();\n })[\"catch\"](function (err) {\n return console.error('Failed to copy text:', err);\n });\n case 7:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2, this);\n }));\n function _handleSelectShareButton(_x2) {\n return _handleSelectShareButton2.apply(this, arguments);\n }\n return _handleSelectShareButton;\n }()\n }, {\n key: \"_updateContentViews\",\n value: function _updateContentViews() {\n this._clearViews();\n this._render();\n }\n }, {\n key: \"hide\",\n value: function hide() {\n this.container.scrollTop = 0;\n if (!this.container) {\n return;\n }\n this.container.style.display = 'none';\n }\n }, {\n key: \"scrollTo\",\n value: function scrollTo(targetHeight) {\n var _this4 = this;\n var animation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var animationOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var defaultAnimationOptions = {\n duration: 150,\n easing: 'easeInOut'\n };\n var options = _objectSpread(_objectSpread({}, defaultAnimationOptions), animationOptions);\n var startHeight = this.currentTop;\n var distance = targetHeight - startHeight;\n var startTime = null;\n\n // Easing functions\n var easingFunctions = {\n linear: function linear(t) {\n return t;\n },\n easeInOut: function easeInOut(t) {\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n },\n easeIn: function easeIn(t) {\n return t * t;\n },\n easeOut: function easeOut(t) {\n return t * (2 - t);\n }\n };\n\n // Choose easing function\n var easingFunction = easingFunctions[options.easing] || easingFunctions.easeInOut;\n var duration = options.duration;\n if (!animation) {\n this.currentTop = targetHeight; // Set the target height immediately\n this.container.style.top = \"\".concat(this.currentTop, \"px\");\n this.container.style.height = \"calc(100vh - \".concat(this.currentTop, \"px)\"); // Update height\n return; // Exit the function early\n }\n\n // Animate function using requestAnimationFrame\n var _animate = function animate(currentTime) {\n if (startTime === null) startTime = currentTime;\n var elapsed = currentTime - startTime;\n var progress = Math.min(elapsed / duration, 1); // Ensure progress doesn't exceed 1\n\n // Calculate current top position based on easing function\n var easedProgress = easingFunction(progress);\n var newHeight = startHeight + easedProgress * distance;\n\n // Update the container's top position and height\n _this4.currentTop = newHeight;\n _this4.container.style.top = \"\".concat(_this4.currentTop, \"px\");\n _this4.container.style.height = \"calc(100vh - \".concat(_this4.currentTop, \"px)\");\n if (progress < 1) {\n requestAnimationFrame(_animate); // Continue animating\n }\n };\n\n // Start the animation\n requestAnimationFrame(_animate);\n }\n }, {\n key: \"_resetScroll\",\n value: function _resetScroll() {\n var rect = this.map.mapContainer.getBoundingClientRect();\n var height = this.map.mapContainer.offsetHeight;\n if (this.currentTop < rect.top) {\n this.scrollTo(rect.bottom);\n }\n console.log(rect.top, height);\n console.log(rect.top + height * (1 - this.scrollConfiguration.initialHeight));\n this.scrollTo(height * (1 - this.scrollConfiguration.initialHeight), true);\n }\n }, {\n key: \"_scrollToBottom\",\n value: function _scrollToBottom() {\n var rect = this.map.mapContainer.getBoundingClientRect();\n this.scrollTo(rect.bottom);\n }\n }, {\n key: \"scrollToMin\",\n value: function scrollToMin() {\n var animate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var rect = this.map.mapContainer.getBoundingClientRect();\n this.scrollTo(rect.bottom - this.scrollConfiguration.minDistFromBottom, animate);\n }\n }, {\n key: \"_render\",\n value: function _render() {\n if (this.contentPlacementIds.length === 0 || this.currentContentPlacement === null) return;\n if (this.currentViewType === 'mobile') {\n this._resetScroll();\n }\n this.contentPlacementView = new _components_ContentPlacementView_ContentDetails__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\n this.contentPlacementView.updateView(this.currentContentPlacement);\n this.contentPlacementView.on('selectChildContentPlacement', this._handleSelectChildContentPlacement.bind(this));\n this.contentPlacementView.on('selectDirectionsButton', this._handleSelectDirectionsButton.bind(this));\n this.contentPlacementView.on('selectShareButton', this._handleSelectShareButton.bind(this));\n this._initialize();\n }\n }]);\n}(_core_Control__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ContentPlacementControl);\n\n//# sourceURL=webpack://waygomaps/./src/Controls/ContentPlacementControl.js?");
584
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _components_ContentPlacementView_ContentDetails__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/ContentPlacementView/ContentDetails */ \"./src/components/ContentPlacementView/ContentDetails.js\");\n/* harmony import */ var _core_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/Control */ \"./src/core/Control.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, \"catch\": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nfunction _possibleConstructorReturn(t, e) { if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e; if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\"); return _assertThisInitialized(t); }\nfunction _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); return e; }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nfunction _superPropGet(t, e, r, o) { var p = _get(_getPrototypeOf(1 & o ? t.prototype : t), e, r); return 2 & o ? function (t) { return p.apply(r, t); } : p; }\nfunction _get() { return _get = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = _superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, _get.apply(null, arguments); }\nfunction _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); return t; }\nfunction _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }\nfunction _inherits(t, e) { if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, \"prototype\", { writable: !1 }), e && _setPrototypeOf(t, e); }\nfunction _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }\n\n\nvar ContentPlacementControl = /*#__PURE__*/function (_Control) {\n function ContentPlacementControl() {\n var _this;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, ContentPlacementControl);\n _this = _callSuper(this, ContentPlacementControl, [options]);\n _this.map = null;\n _this.contentPlacementIds = [];\n _this.currentContentPlacement = null;\n _this.contentPlacementView = null;\n _this.currentTop = window.innerHeight;\n _this.startingY = 0;\n _this.scrollConfiguration = {\n initialHeight: 0.38,\n // percent of the map container height\n minDistFromBottom: 110 // 185 // in px\n };\n _this.isDragging = false;\n _this.isAtTop = false;\n _this.velocity = 0;\n _this.decelerationFactor = 0.95;\n _this.minVelocity = 0.1;\n return _this;\n }\n _inherits(ContentPlacementControl, _Control);\n return _createClass(ContentPlacementControl, [{\n key: \"onAdd\",\n value: function onAdd(map) {\n this.map = map;\n this.container = document.createElement('div');\n this.container.className = 'content-details-control-container';\n console.log(\"HEREREE\", window.innerHeight);\n this.initializeEventListeners();\n this._attachResizeListener();\n this._initialize();\n this.hide();\n return this.container;\n }\n }, {\n key: \"onRemove\",\n value: function onRemove() {\n _superPropGet(ContentPlacementControl, \"onRemove\", this, 3)([]);\n }\n }, {\n key: \"initializeEventListeners\",\n value: function initializeEventListeners() {\n this.map.on('state:default', this._handleDefaultState.bind(this));\n this.map.on('state:search', this._handleSearchState.bind(this));\n this.map.on('state:selectedContent', this._handleSelectedContentState.bind(this));\n this.map.on('state:directions', this._handleDirectionsState.bind(this));\n this.map.on('initiate:back', this._handleMapInitiateBack.bind(this));\n this.map.map.on('mousedown', this._handleMapFocus.bind(this));\n this.map.map.on('touchstart', this._handleMapFocus.bind(this));\n this.container.addEventListener('mousedown', function (e) {\n return e.stopPropagation();\n });\n this.container.addEventListener('click', function (e) {\n return e.stopPropagation();\n });\n this.container.addEventListener('dblclick', function (e) {\n return e.stopPropagation();\n });\n // this.container.addEventListener('touchstart', (e) => e.stopPropagation());\n\n this.container.addEventListener('touchstart', this.handleTouchStart.bind(this));\n this.container.addEventListener('touchmove', this.handleTouchMove.bind(this));\n this.container.addEventListener('touchend', this.handleTouchEnd.bind(this));\n this.container.addEventListener('wheel', this.handleWheelScroll.bind(this));\n }\n }, {\n key: \"_handleMapFocus\",\n value: function _handleMapFocus(e) {\n if (this.currentViewType === 'desktop') return;\n var features = this.map.map.queryRenderedFeatures(e.point);\n var symbolFeatures = features.filter(function (feature) {\n return feature.layer.type === 'symbol';\n });\n console.log('symbol feagures');\n console.log(symbolFeatures);\n if (symbolFeatures.length === 0) {\n this.scrollToMin(true);\n }\n }\n }, {\n key: \"handleTouchStart\",\n value: function handleTouchStart(event) {\n event.stopPropagation();\n this.startingY = event.touches[0].clientY;\n this.isDragging = true;\n this.velocity = 0;\n }\n }, {\n key: \"handleScrolling\",\n value: function handleScrolling(scrollAmount) {\n var element = this.contentPlacementView.getElement();\n var elementHeight = element.offsetHeight;\n var rect = this.map.mapContainer.getBoundingClientRect();\n var containerBottom = rect.bottom;\n var newTop = null;\n if (scrollAmount <= 0) {\n newTop = Math.max(containerBottom - elementHeight - rect.top, this.currentTop + scrollAmount);\n } else if (scrollAmount > 0) {\n newTop = Math.min(containerBottom - this.scrollConfiguration.minDistFromBottom - rect.top, this.currentTop + scrollAmount);\n }\n console.log(\"new top\", newTop);\n this.scrollTo(newTop);\n }\n }, {\n key: \"handleTouchMove\",\n value: function handleTouchMove(event) {\n if (this.currentViewType === 'desktop') return;\n if (!this.isDragging) return;\n var touchY = event.touches[0].clientY;\n var scrollAmount = -1 * (this.startingY - touchY);\n this.velocity = scrollAmount;\n this.handleScrolling(scrollAmount);\n this.startingY = touchY;\n }\n }, {\n key: \"handleTouchEnd\",\n value: function handleTouchEnd() {\n this.isDragging = false;\n this._applyInertia();\n }\n }, {\n key: \"_applyInertia\",\n value: function _applyInertia() {\n var _this2 = this;\n var rect = this.map.mapContainer.getBoundingClientRect();\n var element = this.contentPlacementView.getElement();\n var elementHeight = element.offsetHeight;\n var containerBottom = rect.bottom;\n var upperLimit = containerBottom - elementHeight - rect.top; // Upper scroll boundary\n var lowerLimit = containerBottom - this.scrollConfiguration.minDistFromBottom - rect.top;\n var _inertia = function inertia() {\n if (Math.abs(_this2.velocity) < _this2.minVelocity) return; // Stop when velocity is too low\n var newTop = _this2.currentTop + _this2.velocity;\n if (newTop <= upperLimit) {\n _this2.scrollTo(upperLimit);\n _this2.velocity = 0; // Stop inertia\n return;\n } else if (newTop >= lowerLimit) {\n _this2.scrollTo(lowerLimit);\n _this2.velocity = 0; // Stop inertia\n return;\n }\n _this2.velocity *= _this2.decelerationFactor; // Apply deceleration\n _this2.scrollTo(newTop); // Update position\n\n requestAnimationFrame(_inertia);\n };\n _inertia();\n }\n }, {\n key: \"handleWheelScroll\",\n value: function handleWheelScroll(event) {\n if (this.currentViewType === 'desktop') return;\n var scrollAmount = -event.deltaY;\n this.handleScrolling(scrollAmount);\n }\n\n // handleScroll() {\n // if (this.container.classList.contains('mobile-view')) {\n // // Get current scroll position\n // const scrollAmount = this.container.scrollTop;\n\n // // Adjust bottom position based on scroll amount\n // // As the user scrolls up, the container moves up (increase the bottom offset)\n // this.container.style.bottom = `${Math.min(45 + scrollAmount / 10, 100)}%`;\n\n // // If you want the container to reset to the bottom when done scrolling, add this:\n // clearTimeout(this.isScrolling);\n // this.isScrolling = setTimeout(() => {\n // this.container.style.bottom = '0px'; // Reset position when scrolling stops\n // }, 200);\n // }\n // }\n }, {\n key: \"_renderDesktopView\",\n value: function _renderDesktopView() {\n if (!this.contentPlacementView) {\n return;\n }\n var element = this.contentPlacementView.getElement();\n this.container.appendChild(element);\n this.container.classList.remove('mobile-view');\n this.container.classList.add('desktop-view');\n }\n }, {\n key: \"_renderMobileView\",\n value: function _renderMobileView() {\n if (!this.contentPlacementView) {\n return;\n }\n var element = this.contentPlacementView.getElement();\n this.container.appendChild(element);\n this.container.classList.remove('desktop-view');\n this.container.classList.add('mobile-view');\n }\n }, {\n key: \"_handleMapInitiateBack\",\n value: function _handleMapInitiateBack() {\n var currentState = this.map._stateCoordinator.state;\n if (currentState === 'selectedContent') {\n if (this.contentPlacementIds.length === 0) return;else if (this.contentPlacementIds.length === 1) {\n var stateHistory = this.map._stateCoordinator.stateHistory;\n var previousMapState = stateHistory[stateHistory.length - 2];\n stateHistory.pop();\n stateHistory.pop();\n if (previousMapState === 'search') {\n this.map.initiateSetToSearchState();\n } else {\n this.map.setToDefaultState();\n }\n } else {\n this.contentPlacementIds.pop();\n this.map.setToSelectedContentState(this.contentPlacementIds);\n }\n } else if (currentState === 'directions') {\n this.map.setToSelectedContentState(this.contentPlacementIds);\n }\n }\n }, {\n key: \"_handleSelectChildContentPlacement\",\n value: function _handleSelectChildContentPlacement(data) {\n var placementId = data.placementId;\n this.contentPlacementIds.push(placementId);\n this.map.setToSelectedContentState(this.contentPlacementIds);\n }\n }, {\n key: \"_handleDefaultState\",\n value: function _handleDefaultState() {\n this.hide();\n this.contentPlacementIds = [];\n this.currentContentPlacement = null;\n this._clearViews();\n if (this.currentViewType === 'mobile') {\n this._scrollToBottom();\n }\n }\n }, {\n key: \"_handleSearchState\",\n value: function _handleSearchState(_) {\n this.hide();\n this.contentPlacementIds = [];\n this.currentContentPlacement = null;\n this._clearViews();\n if (this.currentViewType === 'mobile') {\n this._scrollToBottom();\n }\n }\n }, {\n key: \"_handleSelectedContentState\",\n value: function _handleSelectedContentState(data) {\n var contentPlacementIds = data.contentPlacementIds,\n selectedContentPlacement = data.selectedContentPlacement;\n this.contentPlacementIds = contentPlacementIds;\n this.currentContentPlacement = selectedContentPlacement;\n this._updateContentViews();\n this.show();\n }\n }, {\n key: \"_handleDirectionsState\",\n value: function _handleDirectionsState(_) {\n this.hide();\n }\n }, {\n key: \"_handleSelectDirectionsButton\",\n value: function () {\n var _handleSelectDirectionsButton2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {\n var placementId;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n placementId = data.placementId;\n _context.next = 3;\n return this.map.setToDirectionsState(null, placementId);\n case 3:\n case \"end\":\n return _context.stop();\n }\n }, _callee, this);\n }));\n function _handleSelectDirectionsButton(_x) {\n return _handleSelectDirectionsButton2.apply(this, arguments);\n }\n return _handleSelectDirectionsButton;\n }()\n }, {\n key: \"_handleSelectShareButton\",\n value: function () {\n var _handleSelectShareButton2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(data) {\n var _this3 = this;\n var placementId, floor, accountId, mapId, mapViewId, center, longitude, latitude, pitch, bearing, zoom, textToCopy;\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n placementId = data.placementId;\n floor = this.map.getCurrentFloor();\n accountId = this.map.mapData.account_id;\n mapId = this.map.mapData.map_id;\n mapViewId = this.map.mapData.map_view_id;\n center = this.map.map.getCenter(); // Returns a LngLat object\n longitude = center.lng;\n latitude = center.lat;\n pitch = this.map.map.getPitch(); // Returns the pitch (tilt angle)\n bearing = this.map.map.getBearing(); // Returns the bearing (rotation angle)\n zoom = this.map.map.getZoom();\n console.log(pitch, bearing, zoom, center);\n textToCopy = \"https://maps.waygomaps.com/\".concat(accountId, \"/\").concat(mapId, \"/\").concat(mapViewId, \"/\").concat(floor, \"/selected-content/\").concat(placementId, \"/\").concat(longitude, \",\").concat(latitude, \",\").concat(zoom, \",\").concat(pitch, \",\").concat(bearing);\n navigator.clipboard.writeText(textToCopy).then(function () {\n _this3.contentPlacementView.showCopyPopup();\n })[\"catch\"](function (err) {\n return console.error('Failed to copy text:', err);\n });\n case 14:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2, this);\n }));\n function _handleSelectShareButton(_x2) {\n return _handleSelectShareButton2.apply(this, arguments);\n }\n return _handleSelectShareButton;\n }()\n }, {\n key: \"_updateContentViews\",\n value: function _updateContentViews() {\n this._clearViews();\n this._render();\n }\n }, {\n key: \"hide\",\n value: function hide() {\n this.container.scrollTop = 0;\n if (!this.container) {\n return;\n }\n this.container.style.display = 'none';\n }\n }, {\n key: \"scrollTo\",\n value: function scrollTo(targetHeight) {\n var _this4 = this;\n var animation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var animationOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var defaultAnimationOptions = {\n duration: 150,\n easing: 'easeInOut'\n };\n var options = _objectSpread(_objectSpread({}, defaultAnimationOptions), animationOptions);\n var startHeight = this.currentTop;\n var distance = targetHeight - startHeight;\n var startTime = null;\n\n // Easing functions\n var easingFunctions = {\n linear: function linear(t) {\n return t;\n },\n easeInOut: function easeInOut(t) {\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n },\n easeIn: function easeIn(t) {\n return t * t;\n },\n easeOut: function easeOut(t) {\n return t * (2 - t);\n }\n };\n\n // Choose easing function\n var easingFunction = easingFunctions[options.easing] || easingFunctions.easeInOut;\n var duration = options.duration;\n if (!animation) {\n this.currentTop = targetHeight; // Set the target height immediately\n this.container.style.top = \"\".concat(this.currentTop, \"px\");\n this.container.style.height = \"calc(100vh - \".concat(this.currentTop, \"px)\"); // Update height\n return; // Exit the function early\n }\n\n // Animate function using requestAnimationFrame\n var _animate = function animate(currentTime) {\n if (startTime === null) startTime = currentTime;\n var elapsed = currentTime - startTime;\n var progress = Math.min(elapsed / duration, 1); // Ensure progress doesn't exceed 1\n\n // Calculate current top position based on easing function\n var easedProgress = easingFunction(progress);\n var newHeight = startHeight + easedProgress * distance;\n\n // Update the container's top position and height\n _this4.currentTop = newHeight;\n _this4.container.style.top = \"\".concat(_this4.currentTop, \"px\");\n _this4.container.style.height = \"calc(100vh - \".concat(_this4.currentTop, \"px)\");\n if (progress < 1) {\n requestAnimationFrame(_animate); // Continue animating\n }\n };\n\n // Start the animation\n requestAnimationFrame(_animate);\n }\n }, {\n key: \"_resetScroll\",\n value: function _resetScroll() {\n var rect = this.map.mapContainer.getBoundingClientRect();\n var height = this.map.mapContainer.offsetHeight;\n if (this.currentTop < rect.top) {\n this.scrollTo(rect.bottom);\n }\n console.log(rect.top, height);\n console.log(rect.top + height * (1 - this.scrollConfiguration.initialHeight));\n this.scrollTo(height * (1 - this.scrollConfiguration.initialHeight), true);\n }\n }, {\n key: \"_scrollToBottom\",\n value: function _scrollToBottom() {\n var rect = this.map.mapContainer.getBoundingClientRect();\n this.scrollTo(rect.bottom);\n }\n }, {\n key: \"scrollToMin\",\n value: function scrollToMin() {\n var animate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var rect = this.map.mapContainer.getBoundingClientRect();\n this.scrollTo(rect.bottom - this.scrollConfiguration.minDistFromBottom, animate);\n }\n }, {\n key: \"_render\",\n value: function _render() {\n if (this.contentPlacementIds.length === 0 || this.currentContentPlacement === null) return;\n if (this.currentViewType === 'mobile') {\n this._resetScroll();\n }\n this.contentPlacementView = new _components_ContentPlacementView_ContentDetails__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\n this.contentPlacementView.updateView(this.currentContentPlacement);\n this.contentPlacementView.on('selectChildContentPlacement', this._handleSelectChildContentPlacement.bind(this));\n this.contentPlacementView.on('selectDirectionsButton', this._handleSelectDirectionsButton.bind(this));\n this.contentPlacementView.on('selectShareButton', this._handleSelectShareButton.bind(this));\n this._initialize();\n }\n }]);\n}(_core_Control__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ContentPlacementControl);\n\n//# sourceURL=webpack://waygomaps/./src/Controls/ContentPlacementControl.js?");
585
585
 
586
586
  /***/ }),
587
587
 
@@ -768,7 +768,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
768
768
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
769
769
 
770
770
  "use strict";
771
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _core_Component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Component */ \"./src/core/Component.js\");\n/* harmony import */ var _SearchBox_SearchBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SearchBox/SearchBox */ \"./src/components/SearchBox/SearchBox.js\");\n/* harmony import */ var _DirectionsView_StepsView__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../DirectionsView/StepsView */ \"./src/components/DirectionsView/StepsView.js\");\n/* harmony import */ var _WaygoMaps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../WaygoMaps */ \"./src/WaygoMaps.js\");\n/* harmony import */ var _assets_pinOutlineIcon_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../assets/pinOutlineIcon.svg */ \"./src/assets/pinOutlineIcon.svg\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, \"catch\": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nfunction _possibleConstructorReturn(t, e) { if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e; if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\"); return _assertThisInitialized(t); }\nfunction _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); return e; }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nfunction _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }\nfunction _inherits(t, e) { if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, \"prototype\", { writable: !1 }), e && _setPrototypeOf(t, e); }\nfunction _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }\n\n\n\n\n\nvar DirectionsView = /*#__PURE__*/function (_Component) {\n function DirectionsView() {\n var _this;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, DirectionsView);\n _this = _callSuper(this, DirectionsView, [options]);\n _this.startSearchBox = new _SearchBox_SearchBox__WEBPACK_IMPORTED_MODULE_1__[\"default\"](); // Create a SearchBox for the start location\n _this.endSearchBox = new _SearchBox_SearchBox__WEBPACK_IMPORTED_MODULE_1__[\"default\"](); // Create a SearchBox for the end location\n\n _this.startContentPlacement = null;\n _this.endContentPlacement = null;\n _this.pathData = null;\n _this.searchApi = _WaygoMaps__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getSearchApi();\n _this.stepsView = new _DirectionsView_StepsView__WEBPACK_IMPORTED_MODULE_2__[\"default\"]();\n _this._initialize();\n return _this;\n }\n _inherits(DirectionsView, _Component);\n return _createClass(DirectionsView, [{\n key: \"_initialize\",\n value: function _initialize() {\n this.element = document.createElement(\"div\");\n this.element.className = \"directions-view\";\n this.directionsViewHeader = document.createElement(\"div\");\n this.directionsViewHeader.className = \"directions-view-header\";\n this.searchBoxesContainer = document.createElement('div');\n this.searchBoxesContainer.className = \"directions-search-boxes-container\";\n this.circlesAndSearchWrapper = document.createElement('div');\n this.circlesAndSearchWrapper.className = 'directions-circles-search-wrapper';\n var circlesContainer = this._createCirclesContainer();\n this.circlesAndSearchWrapper.appendChild(circlesContainer);\n this.startSearchBox.searchBar.updateLeftButtonIcon('none');\n this.startSearchBox.searchBar.updateRightButtonIcon('none');\n this.endSearchBox.searchBar.updateLeftButtonIcon('none');\n this.endSearchBox.searchBar.updateRightButtonIcon('none');\n this.startSearchBox.searchBar.setPlaceholderText('Choose starting point');\n this.endSearchBox.searchBar.setPlaceholderText('Choose destination');\n this.searchBoxesContainer.appendChild(this.startSearchBox.getElement());\n this.searchBoxesContainer.appendChild(this.endSearchBox.getElement());\n this.circlesAndSearchWrapper.appendChild(this.searchBoxesContainer);\n this.directionsViewHeader.appendChild(this.circlesAndSearchWrapper);\n this._render();\n this._setupEventListeners();\n }\n }, {\n key: \"_createCirclesContainer\",\n value: function _createCirclesContainer() {\n var circlesContainer = document.createElement('div');\n circlesContainer.className = \"directions-circles-container\";\n var startCircle = document.createElement('div');\n startCircle.className = \"large-circle\";\n var endCircle = document.createElement('div');\n endCircle.className = \"end-circle\";\n var smallCircle1 = document.createElement('div');\n smallCircle1.className = \"small-circle\";\n var smallCircle2 = document.createElement('div');\n smallCircle2.className = \"small-circle\";\n var smallCircle3 = document.createElement('div');\n smallCircle3.className = \"small-circle\";\n circlesContainer.appendChild(startCircle);\n circlesContainer.appendChild(smallCircle1);\n circlesContainer.appendChild(smallCircle2);\n circlesContainer.appendChild(smallCircle3);\n circlesContainer.appendChild(endCircle);\n return circlesContainer;\n }\n }, {\n key: \"_render\",\n value: function _render() {\n this.element.innerHTML = \"\";\n this.element.appendChild(this.directionsViewHeader);\n if (this.pathData) {\n this.element.appendChild(this.stepsView.getElement());\n }\n }\n }, {\n key: \"_setupEventListeners\",\n value: function _setupEventListeners() {\n this.startSearchBox.searchBar.on('focus', this._handleStartSearchBarFocus.bind(this));\n this.startSearchBox.searchBar.on('blur', this._handleStartSearchBarBlur.bind(this));\n this.startSearchBox.on('getSearchBarSuggestions', this._handleGettingStartSearchBarSuggestions.bind(this));\n this.endSearchBox.searchBar.on('focus', this._handleEndSearchBarFocus.bind(this));\n this.endSearchBox.searchBar.on('blur', this._handleEndSearchBarBlur.bind(this));\n this.endSearchBox.on('getSearchBarSuggestions', this._handleGettingEndSearchBarSuggestions.bind(this));\n this.startSearchBox.searchBarSuggestionsView.on('selectCell', this._handleStartContentPlacementSelect.bind(this));\n this.endSearchBox.searchBarSuggestionsView.on('selectCell', this._handleEndContentPlacementSelect.bind(this));\n this.stepsView.on('legSelect', this._handleLegChange.bind(this));\n }\n }, {\n key: \"_handleLegChange\",\n value: function _handleLegChange(data) {\n var index = data.index;\n this.fire('initiate:changeLeg', data);\n }\n }, {\n key: \"_handleGettingStartSearchBarSuggestions\",\n value: function () {\n var _handleGettingStartSearchBarSuggestions2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {\n var query;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n query = data.query;\n this.fire('getStartSuggestions', {\n query: query\n });\n case 2:\n case \"end\":\n return _context.stop();\n }\n }, _callee, this);\n }));\n function _handleGettingStartSearchBarSuggestions(_x) {\n return _handleGettingStartSearchBarSuggestions2.apply(this, arguments);\n }\n return _handleGettingStartSearchBarSuggestions;\n }()\n }, {\n key: \"_handleGettingEndSearchBarSuggestions\",\n value: function () {\n var _handleGettingEndSearchBarSuggestions2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(data) {\n var query;\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n query = data.query;\n this.fire('getEndSuggestions', {\n query: query\n });\n case 2:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2, this);\n }));\n function _handleGettingEndSearchBarSuggestions(_x2) {\n return _handleGettingEndSearchBarSuggestions2.apply(this, arguments);\n }\n return _handleGettingEndSearchBarSuggestions;\n }()\n }, {\n key: \"_handleStartContentPlacementSelect\",\n value: function () {\n var _handleStartContentPlacementSelect2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(data) {\n var result, placementId, startContentPlacement;\n return _regeneratorRuntime().wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n result = data.result;\n placementId = result.placement_id;\n this.startSearchBox.searchBar.setText(result.name);\n _context3.next = 5;\n return this.searchApi.fetchContentPlacementDetails(placementId);\n case 5:\n startContentPlacement = _context3.sent;\n console.log(\"FETCHED CONTENT PLACEMENT DETAILS:\");\n console.log(startContentPlacement);\n this.fire('selectedStartContentPlacement', {\n startContentPlacement: startContentPlacement\n });\n this.updateView(startContentPlacement, this.endContentPlacement);\n case 10:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3, this);\n }));\n function _handleStartContentPlacementSelect(_x3) {\n return _handleStartContentPlacementSelect2.apply(this, arguments);\n }\n return _handleStartContentPlacementSelect;\n }()\n }, {\n key: \"_handleEndContentPlacementSelect\",\n value: function () {\n var _handleEndContentPlacementSelect2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(data) {\n var result, placementId, endContentPlacement;\n return _regeneratorRuntime().wrap(function _callee4$(_context4) {\n while (1) switch (_context4.prev = _context4.next) {\n case 0:\n result = data.result;\n placementId = result.placement_id;\n this.endSearchBox.searchBar.setText(result.name);\n _context4.next = 5;\n return this.searchApi.fetchContentPlacementDetails(placementId);\n case 5:\n endContentPlacement = _context4.sent;\n this.fire('selectedEndContentPlacement', {\n endContentPlacement: endContentPlacement\n });\n this.updateView(this.startContentPlacement, endContentPlacement);\n case 8:\n case \"end\":\n return _context4.stop();\n }\n }, _callee4, this);\n }));\n function _handleEndContentPlacementSelect(_x4) {\n return _handleEndContentPlacementSelect2.apply(this, arguments);\n }\n return _handleEndContentPlacementSelect;\n }()\n }, {\n key: \"_handleStartSearchBarFocus\",\n value: function _handleStartSearchBarFocus() {\n this.startSearchBox.searchBar.updateRightButtonIcon('search');\n }\n }, {\n key: \"_handleEndSearchBarFocus\",\n value: function _handleEndSearchBarFocus() {\n this.endSearchBox.searchBar.updateRightButtonIcon('search');\n }\n }, {\n key: \"_handleStartSearchBarBlur\",\n value: function _handleStartSearchBarBlur() {\n this.startSearchBox.searchBar.updateRightButtonIcon('none');\n }\n }, {\n key: \"_handleEndSearchBarBlur\",\n value: function _handleEndSearchBarBlur() {\n this.endSearchBox.searchBar.updateRightButtonIcon('none');\n }\n }, {\n key: \"updateView\",\n value: function updateView(startContentPlacement, endContentPlacement) {\n this.startContentPlacement = startContentPlacement;\n this.endContentPlacement = endContentPlacement;\n if (startContentPlacement && endContentPlacement) {\n this.fire('initiate:findPath', {\n startContentPlacementId: startContentPlacement.placement_id,\n endContentPlacementId: endContentPlacement.placement_id\n });\n } else if (startContentPlacement) {\n var data = startContentPlacement.content.data;\n var titleKey = startContentPlacement.content.title_key;\n var title = data[titleKey];\n this.startSearchBox.searchBar.setText(title);\n this.endSearchBox.searchBar.setText('');\n this.endSearchBox.searchBar.input.focus();\n this.clearSteps();\n } else if (endContentPlacement) {\n var _data = endContentPlacement.content.data;\n var _titleKey = endContentPlacement.content.title_key;\n var _title = _data[_titleKey];\n this.endSearchBox.searchBar.setText(_title);\n this.startSearchBox.searchBar.setText('');\n this.startSearchBox.searchBar.input.focus();\n this.clearSteps();\n }\n }\n }, {\n key: \"setSteps\",\n value: function setSteps(steps) {\n this.steps = steps;\n this._render();\n }\n }, {\n key: \"setNewPath\",\n value: function setNewPath(pathData) {\n // Add extra leg for testing\n var leg = pathData.legs[0];\n var step = leg.steps[0];\n var customLeg = {\n floor: 1,\n steps: [{\n instruction: 'right',\n distance: 20.0,\n path: step.path,\n text: 'Instruction for this step'\n }, {\n instruction: 'right',\n distance: 20.0,\n path: step.path,\n text: 'Instruction for this step'\n }, {\n instruction: 'right',\n distance: 20.0,\n path: step.path,\n text: 'Instruction for this step'\n }]\n };\n // const customLeg2 = {\n // floor: 2,\n // steps: [\n // {\n // instruction: 'right',\n // distance: 20.0,\n // path: step.path,\n // text: 'Instruction for this step'\n // },\n // {\n // instruction: 'right',\n // distance: 20.0,\n // path: step.path,\n // text: 'Instruction for this step'\n // },\n // {\n // instruction: 'right',\n // distance: 20.0,\n // path: step.path,\n // text: 'Instruction for this step'\n // }\n // ]\n // }\n pathData.legs.push(customLeg);\n // pathData.legs.push(customLeg2);\n\n this.pathData = pathData;\n this.stepsView.setNewPath(pathData);\n this._render();\n }\n }, {\n key: \"clearSteps\",\n value: function clearSteps() {\n var stepsViewElement = this.element.querySelector('.steps-view'); // Assuming .steps-view is a class in StepsView\n if (stepsViewElement) {\n stepsViewElement.remove(); // Remove the StepsView element if it exists\n }\n }\n }, {\n key: \"getElement\",\n value: function getElement() {\n return this.element;\n }\n }]);\n}(_core_Component__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DirectionsView);\n\n//# sourceURL=webpack://waygomaps/./src/components/DirectionsView/DirectionsView.js?");
771
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _core_Component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Component */ \"./src/core/Component.js\");\n/* harmony import */ var _SearchBox_SearchBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SearchBox/SearchBox */ \"./src/components/SearchBox/SearchBox.js\");\n/* harmony import */ var _DirectionsView_StepsView__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../DirectionsView/StepsView */ \"./src/components/DirectionsView/StepsView.js\");\n/* harmony import */ var _WaygoMaps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../WaygoMaps */ \"./src/WaygoMaps.js\");\n/* harmony import */ var _assets_pinOutlineIcon_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../assets/pinOutlineIcon.svg */ \"./src/assets/pinOutlineIcon.svg\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, \"catch\": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nfunction _possibleConstructorReturn(t, e) { if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e; if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\"); return _assertThisInitialized(t); }\nfunction _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); return e; }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nfunction _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }\nfunction _inherits(t, e) { if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, \"prototype\", { writable: !1 }), e && _setPrototypeOf(t, e); }\nfunction _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }\n\n\n\n\n\nvar DirectionsView = /*#__PURE__*/function (_Component) {\n function DirectionsView() {\n var _this;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, DirectionsView);\n _this = _callSuper(this, DirectionsView, [options]);\n _this.startSearchBox = new _SearchBox_SearchBox__WEBPACK_IMPORTED_MODULE_1__[\"default\"](); // Create a SearchBox for the start location\n _this.endSearchBox = new _SearchBox_SearchBox__WEBPACK_IMPORTED_MODULE_1__[\"default\"](); // Create a SearchBox for the end location\n\n _this.startContentPlacement = null;\n _this.endContentPlacement = null;\n _this.pathData = null;\n _this.searchApi = _WaygoMaps__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getSearchApi();\n _this.stepsView = new _DirectionsView_StepsView__WEBPACK_IMPORTED_MODULE_2__[\"default\"]();\n _this._initialize();\n return _this;\n }\n _inherits(DirectionsView, _Component);\n return _createClass(DirectionsView, [{\n key: \"_initialize\",\n value: function _initialize() {\n this.element = document.createElement(\"div\");\n this.element.className = \"directions-view\";\n this.directionsViewHeader = document.createElement(\"div\");\n this.directionsViewHeader.className = \"directions-view-header\";\n this.searchBoxesContainer = document.createElement('div');\n this.searchBoxesContainer.className = \"directions-search-boxes-container\";\n this.circlesAndSearchWrapper = document.createElement('div');\n this.circlesAndSearchWrapper.className = 'directions-circles-search-wrapper';\n var circlesContainer = this._createCirclesContainer();\n this.circlesAndSearchWrapper.appendChild(circlesContainer);\n this.startSearchBox.searchBar.updateLeftButtonIcon('none');\n this.startSearchBox.searchBar.updateRightButtonIcon('none');\n this.endSearchBox.searchBar.updateLeftButtonIcon('none');\n this.endSearchBox.searchBar.updateRightButtonIcon('none');\n this.startSearchBox.searchBar.setPlaceholderText('Choose starting point');\n this.endSearchBox.searchBar.setPlaceholderText('Choose destination');\n this.searchBoxesContainer.appendChild(this.startSearchBox.getElement());\n this.searchBoxesContainer.appendChild(this.endSearchBox.getElement());\n this.circlesAndSearchWrapper.appendChild(this.searchBoxesContainer);\n this.directionsViewHeader.appendChild(this.circlesAndSearchWrapper);\n this._render();\n this._setupEventListeners();\n }\n }, {\n key: \"_createCirclesContainer\",\n value: function _createCirclesContainer() {\n var circlesContainer = document.createElement('div');\n circlesContainer.className = \"directions-circles-container\";\n var startCircle = document.createElement('div');\n startCircle.className = \"large-circle\";\n var endCircle = document.createElement('div');\n endCircle.className = \"end-circle\";\n var smallCircle1 = document.createElement('div');\n smallCircle1.className = \"small-circle\";\n var smallCircle2 = document.createElement('div');\n smallCircle2.className = \"small-circle\";\n var smallCircle3 = document.createElement('div');\n smallCircle3.className = \"small-circle\";\n circlesContainer.appendChild(startCircle);\n circlesContainer.appendChild(smallCircle1);\n circlesContainer.appendChild(smallCircle2);\n circlesContainer.appendChild(smallCircle3);\n circlesContainer.appendChild(endCircle);\n return circlesContainer;\n }\n }, {\n key: \"_render\",\n value: function _render() {\n this.element.innerHTML = \"\";\n this.element.appendChild(this.directionsViewHeader);\n if (this.pathData) {\n this.element.appendChild(this.stepsView.getElement());\n }\n }\n }, {\n key: \"_setupEventListeners\",\n value: function _setupEventListeners() {\n this.startSearchBox.searchBar.on('focus', this._handleStartSearchBarFocus.bind(this));\n this.startSearchBox.searchBar.on('blur', this._handleStartSearchBarBlur.bind(this));\n this.startSearchBox.on('getSearchBarSuggestions', this._handleGettingStartSearchBarSuggestions.bind(this));\n this.endSearchBox.searchBar.on('focus', this._handleEndSearchBarFocus.bind(this));\n this.endSearchBox.searchBar.on('blur', this._handleEndSearchBarBlur.bind(this));\n this.endSearchBox.on('getSearchBarSuggestions', this._handleGettingEndSearchBarSuggestions.bind(this));\n this.startSearchBox.searchBarSuggestionsView.on('selectCell', this._handleStartContentPlacementSelect.bind(this));\n this.endSearchBox.searchBarSuggestionsView.on('selectCell', this._handleEndContentPlacementSelect.bind(this));\n this.stepsView.on('legSelect', this._handleLegChange.bind(this));\n }\n }, {\n key: \"_handleLegChange\",\n value: function _handleLegChange(data) {\n var index = data.index;\n this.fire('initiate:changeLeg', data);\n }\n }, {\n key: \"_handleGettingStartSearchBarSuggestions\",\n value: function () {\n var _handleGettingStartSearchBarSuggestions2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {\n var query;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n query = data.query;\n this.fire('getStartSuggestions', {\n query: query\n });\n case 2:\n case \"end\":\n return _context.stop();\n }\n }, _callee, this);\n }));\n function _handleGettingStartSearchBarSuggestions(_x) {\n return _handleGettingStartSearchBarSuggestions2.apply(this, arguments);\n }\n return _handleGettingStartSearchBarSuggestions;\n }()\n }, {\n key: \"_handleGettingEndSearchBarSuggestions\",\n value: function () {\n var _handleGettingEndSearchBarSuggestions2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(data) {\n var query;\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n query = data.query;\n this.fire('getEndSuggestions', {\n query: query\n });\n case 2:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2, this);\n }));\n function _handleGettingEndSearchBarSuggestions(_x2) {\n return _handleGettingEndSearchBarSuggestions2.apply(this, arguments);\n }\n return _handleGettingEndSearchBarSuggestions;\n }()\n }, {\n key: \"_handleStartContentPlacementSelect\",\n value: function () {\n var _handleStartContentPlacementSelect2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(data) {\n var result, placementId, startContentPlacement;\n return _regeneratorRuntime().wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n result = data.result;\n placementId = result.placement_id;\n this.startSearchBox.searchBar.setText(result.name);\n _context3.next = 5;\n return this.searchApi.fetchContentPlacementDetails(placementId);\n case 5:\n startContentPlacement = _context3.sent;\n console.log(\"FETCHED CONTENT PLACEMENT DETAILS:\");\n console.log(startContentPlacement);\n this.fire('selectedStartContentPlacement', {\n startContentPlacement: startContentPlacement\n });\n this.updateView(startContentPlacement, this.endContentPlacement);\n case 10:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3, this);\n }));\n function _handleStartContentPlacementSelect(_x3) {\n return _handleStartContentPlacementSelect2.apply(this, arguments);\n }\n return _handleStartContentPlacementSelect;\n }()\n }, {\n key: \"_handleEndContentPlacementSelect\",\n value: function () {\n var _handleEndContentPlacementSelect2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(data) {\n var result, placementId, endContentPlacement;\n return _regeneratorRuntime().wrap(function _callee4$(_context4) {\n while (1) switch (_context4.prev = _context4.next) {\n case 0:\n result = data.result;\n placementId = result.placement_id;\n this.endSearchBox.searchBar.setText(result.name);\n _context4.next = 5;\n return this.searchApi.fetchContentPlacementDetails(placementId);\n case 5:\n endContentPlacement = _context4.sent;\n this.fire('selectedEndContentPlacement', {\n endContentPlacement: endContentPlacement\n });\n this.updateView(this.startContentPlacement, endContentPlacement);\n case 8:\n case \"end\":\n return _context4.stop();\n }\n }, _callee4, this);\n }));\n function _handleEndContentPlacementSelect(_x4) {\n return _handleEndContentPlacementSelect2.apply(this, arguments);\n }\n return _handleEndContentPlacementSelect;\n }()\n }, {\n key: \"_handleStartSearchBarFocus\",\n value: function _handleStartSearchBarFocus() {\n this.startSearchBox.searchBar.updateRightButtonIcon('search');\n }\n }, {\n key: \"_handleEndSearchBarFocus\",\n value: function _handleEndSearchBarFocus() {\n this.endSearchBox.searchBar.updateRightButtonIcon('search');\n }\n }, {\n key: \"_handleStartSearchBarBlur\",\n value: function _handleStartSearchBarBlur() {\n this.startSearchBox.searchBar.updateRightButtonIcon('none');\n }\n }, {\n key: \"_handleEndSearchBarBlur\",\n value: function _handleEndSearchBarBlur() {\n this.endSearchBox.searchBar.updateRightButtonIcon('none');\n }\n }, {\n key: \"updateView\",\n value: function updateView(startContentPlacement, endContentPlacement) {\n this.startContentPlacement = startContentPlacement;\n this.endContentPlacement = endContentPlacement;\n if (startContentPlacement && endContentPlacement) {\n this.fire('initiate:findPath', {\n startContentPlacementId: startContentPlacement.placement_id,\n endContentPlacementId: endContentPlacement.placement_id\n });\n } else if (startContentPlacement) {\n var data = startContentPlacement.content.data;\n var titleKey = startContentPlacement.content.title_key;\n var title = data[titleKey];\n this.startSearchBox.searchBar.setText(title);\n this.endSearchBox.searchBar.setText('');\n this.endSearchBox.searchBar.input.focus();\n this.clearSteps();\n } else if (endContentPlacement) {\n var _data = endContentPlacement.content.data;\n var _titleKey = endContentPlacement.content.title_key;\n var _title = _data[_titleKey];\n this.endSearchBox.searchBar.setText(_title);\n this.startSearchBox.searchBar.setText('');\n this.startSearchBox.searchBar.input.focus();\n this.clearSteps();\n }\n }\n }, {\n key: \"setSteps\",\n value: function setSteps(steps) {\n this.steps = steps;\n this._render();\n }\n }, {\n key: \"setNewPath\",\n value: function setNewPath(pathData) {\n // Add extra leg for testing\n // const leg = pathData.legs[0];\n // const step = leg.steps[0];\n // const customLeg = {\n // floor: 1,\n // steps: [\n // {\n // instruction: 'right',\n // distance: 20.0,\n // path: step.path,\n // text: 'Instruction for this step'\n // },\n // {\n // instruction: 'right',\n // distance: 20.0,\n // path: step.path,\n // text: 'Instruction for this step'\n // },\n // {\n // instruction: 'right',\n // distance: 20.0,\n // path: step.path,\n // text: 'Instruction for this step'\n // }\n // ]\n // }\n // const customLeg2 = {\n // floor: 2,\n // steps: [\n // {\n // instruction: 'right',\n // distance: 20.0,\n // path: step.path,\n // text: 'Instruction for this step'\n // },\n // {\n // instruction: 'right',\n // distance: 20.0,\n // path: step.path,\n // text: 'Instruction for this step'\n // },\n // {\n // instruction: 'right',\n // distance: 20.0,\n // path: step.path,\n // text: 'Instruction for this step'\n // }\n // ]\n // }\n // pathData.legs.push(customLeg);\n // pathData.legs.push(customLeg2);\n\n this.pathData = pathData;\n this.stepsView.setNewPath(pathData);\n this._render();\n }\n }, {\n key: \"clearSteps\",\n value: function clearSteps() {\n var stepsViewElement = this.element.querySelector('.steps-view'); // Assuming .steps-view is a class in StepsView\n if (stepsViewElement) {\n stepsViewElement.remove(); // Remove the StepsView element if it exists\n }\n }\n }, {\n key: \"getElement\",\n value: function getElement() {\n return this.element;\n }\n }]);\n}(_core_Component__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DirectionsView);\n\n//# sourceURL=webpack://waygomaps/./src/components/DirectionsView/DirectionsView.js?");
772
772
 
773
773
  /***/ }),
774
774
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waygo-maps",
3
- "version": "1.0.59",
3
+ "version": "1.0.60",
4
4
  "main": "dist/bundle.js",
5
5
  "files": [
6
6
  "dist/bundle.js",