waygo-maps 1.0.1 → 1.0.3
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.
- package/dist/bundle.js +1 -1
- package/dist/style.css +1499 -0
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see bundle.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.waygomaps=e():t.waygomaps=e()}(this,(()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})}};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var e;t.g.importScripts&&(e=t.g.location+"");var n=t.g.document;if(!e&&n&&(n.currentScript&&"SCRIPT"===n.currentScript.tagName.toUpperCase()&&(e=n.currentScript.src),!e)){var r=n.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t.p=e})();var e={};t.d(e,{default:()=>da});var n={};function r(t,e){return function(){return t.apply(e,arguments)}}t.r(n),t.d(n,{hasBrowserEnv:()=>ht,hasStandardBrowserEnv:()=>dt,hasStandardBrowserWebWorkerEnv:()=>yt,navigator:()=>pt,origin:()=>mt});const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,a=(c=Object.create(null),t=>{const e=o.call(t);return c[e]||(c[e]=e.slice(8,-1).toLowerCase())});var c;const s=t=>(t=t.toLowerCase(),e=>a(e)===t),u=t=>e=>typeof e===t,{isArray:l}=Array,f=u("undefined"),h=s("ArrayBuffer"),p=u("string"),d=u("function"),y=u("number"),m=t=>null!==t&&"object"==typeof t,v=t=>{if("object"!==a(t))return!1;const e=i(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},b=s("Date"),g=s("File"),w=s("Blob"),S=s("FileList"),E=s("URLSearchParams"),[O,_,P,j]=["ReadableStream","Request","Response","Headers"].map(s);function x(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),l(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(r=0;r<i;r++)a=o[r],e.call(null,t[a],a,t)}}function k(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,o=n.length;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,L=t=>!f(t)&&t!==C,B=(T="undefined"!=typeof Uint8Array&&i(Uint8Array),t=>T&&t instanceof T);var T;const R=s("HTMLFormElement"),N=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),A=s("RegExp"),D=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};x(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},F="abcdefghijklmnopqrstuvwxyz",I="0123456789",V={DIGIT:I,ALPHA:F,ALPHA_DIGIT:F+F.toUpperCase()+I},z=s("AsyncFunction"),H=(M="function"==typeof setImmediate,U=d(C.postMessage),M?setImmediate:U?(q=`axios@${Math.random()}`,G=[],C.addEventListener("message",(({source:t,data:e})=>{t===C&&e===q&&G.length&&G.shift()()}),!1),t=>{G.push(t),C.postMessage(q,"*")}):t=>setTimeout(t));var M,U,q,G;const W="undefined"!=typeof queueMicrotask?queueMicrotask.bind(C):"undefined"!=typeof process&&process.nextTick||H,K={isArray:l,isArrayBuffer:h,isBuffer:function(t){return null!==t&&!f(t)&&null!==t.constructor&&!f(t.constructor)&&d(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||d(t.append)&&("formdata"===(e=a(t))||"object"===e&&d(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&h(t.buffer),e},isString:p,isNumber:y,isBoolean:t=>!0===t||!1===t,isObject:m,isPlainObject:v,isReadableStream:O,isRequest:_,isResponse:P,isHeaders:j,isUndefined:f,isDate:b,isFile:g,isBlob:w,isRegExp:A,isFunction:d,isStream:t=>m(t)&&d(t.pipe),isURLSearchParams:E,isTypedArray:B,isFileList:S,forEach:x,merge:function t(){const{caseless:e}=L(this)&&this||{},n={},r=(r,o)=>{const i=e&&k(n,o)||o;v(n[i])&&v(r)?n[i]=t(n[i],r):v(r)?n[i]=t({},r):l(r)?n[i]=r.slice():n[i]=r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&x(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:o}={})=>(x(e,((e,o)=>{n&&d(e)?t[o]=r(e,n):t[o]=e}),{allOwnKeys:o}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,a,c;const s={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),a=o.length;a-- >0;)c=o[a],r&&!r(c,t,e)||s[c]||(e[c]=t[c],s[c]=!0);t=!1!==n&&i(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:a,kindOfTest:s,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(l(t))return t;let e=t.length;if(!y(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:R,hasOwnProperty:N,hasOwnProp:N,reduceDescriptors:D,freezeMethods:t=>{D(t,((e,n)=>{if(d(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];d(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return l(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:k,global:C,isContextDefined:L,ALPHABET:V,generateString:(t=16,e=V.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&d(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(m(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=l(t)?[]:{};return x(t,((t,e)=>{const i=n(t,r+1);!f(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:z,isThenable:t=>t&&(m(t)||d(t))&&d(t.then)&&d(t.catch),setImmediate:H,asap:W};function J(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}K.inherits(J,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}});const Z=J.prototype,Y={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{Y[t]={value:t}})),Object.defineProperties(J,Y),Object.defineProperty(Z,"isAxiosError",{value:!0}),J.from=(t,e,n,r,o,i)=>{const a=Object.create(Z);return K.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),J.call(a,t.message,e,n,r,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const $=J;function Q(t){return K.isPlainObject(t)||K.isArray(t)}function X(t){return K.endsWith(t,"[]")?t.slice(0,-2):t}function tt(t,e,n){return t?t.concat(e).map((function(t,e){return t=X(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const et=K.toFlatObject(K,{},null,(function(t){return/^is[A-Z]/.test(t)})),nt=function(t,e,n){if(!K.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!K.isUndefined(e[t])}))).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,c=(n.Blob||"undefined"!=typeof Blob&&Blob)&&K.isSpecCompliantForm(e);if(!K.isFunction(o))throw new TypeError("visitor must be a function");function s(t){if(null===t)return"";if(K.isDate(t))return t.toISOString();if(!c&&K.isBlob(t))throw new $("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(t)||K.isTypedArray(t)?c&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function u(t,n,o){let c=t;if(t&&!o&&"object"==typeof t)if(K.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(K.isArray(t)&&function(t){return K.isArray(t)&&!t.some(Q)}(t)||(K.isFileList(t)||K.endsWith(n,"[]"))&&(c=K.toArray(t)))return n=X(n),c.forEach((function(t,r){!K.isUndefined(t)&&null!==t&&e.append(!0===a?tt([n],r,i):null===a?n:n+"[]",s(t))})),!1;return!!Q(t)||(e.append(tt(o,n,i),s(t)),!1)}const l=[],f=Object.assign(et,{defaultVisitor:u,convertValue:s,isVisitable:Q});if(!K.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!K.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),K.forEach(n,(function(n,i){!0===(!(K.isUndefined(n)||null===n)&&o.call(e,n,K.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e};function rt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function ot(t,e){this._pairs=[],t&&nt(t,this,e)}const it=ot.prototype;it.append=function(t,e){this._pairs.push([t,e])},it.toString=function(t){const e=t?function(e){return t.call(this,e,rt)}:rt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const at=ot;function ct(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function st(t,e,n){if(!e)return t;const r=n&&n.encode||ct,o=n&&n.serialize;let i;if(i=o?o(e,n):K.isURLSearchParams(e)?e.toString():new at(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}const ut=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){K.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},lt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ft={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:at,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ht="undefined"!=typeof window&&"undefined"!=typeof document,pt="object"==typeof navigator&&navigator||void 0,dt=ht&&(!pt||["ReactNative","NativeScript","NS"].indexOf(pt.product)<0),yt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,mt=ht&&window.location.href||"http://localhost",vt={...n,...ft},bt=function(t){function e(t,n,r,o){let i=t[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),c=o>=t.length;return i=!i&&K.isArray(r)?r.length:i,c?(K.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&K.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&K.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}(r[i])),!a)}if(K.isFormData(t)&&K.isFunction(t.entries)){const n={};return K.forEachEntry(t,((t,r)=>{e(function(t){return K.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null},gt={transitional:lt,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=K.isObject(t);if(o&&K.isHTMLForm(t)&&(t=new FormData(t)),K.isFormData(t))return r?JSON.stringify(bt(t)):t;if(K.isArrayBuffer(t)||K.isBuffer(t)||K.isStream(t)||K.isFile(t)||K.isBlob(t)||K.isReadableStream(t))return t;if(K.isArrayBufferView(t))return t.buffer;if(K.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return nt(t,new vt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return vt.isNode&&K.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=K.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return nt(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(K.isString(t))try{return(0,JSON.parse)(t),K.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||gt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(K.isResponse(t)||K.isReadableStream(t))return t;if(t&&K.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw $.from(t,$.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:vt.classes.FormData,Blob:vt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],(t=>{gt.headers[t]={}}));const wt=gt,St=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Et=Symbol("internals");function Ot(t){return t&&String(t).trim().toLowerCase()}function _t(t){return!1===t||null==t?t:K.isArray(t)?t.map(_t):String(t)}function Pt(t,e,n,r,o){return K.isFunction(r)?r.call(this,e,n):(o&&(e=n),K.isString(e)?K.isString(r)?-1!==e.indexOf(r):K.isRegExp(r)?r.test(e):void 0:void 0)}class jt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=Ot(e);if(!o)throw new Error("header name must be a non-empty string");const i=K.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=_t(t))}const i=(t,e)=>K.forEach(t,((t,n)=>o(t,n,e)));if(K.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(K.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&St[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e);else if(K.isHeaders(t))for(const[e,r]of t.entries())o(r,e,n);else null!=t&&o(e,t,n);return this}get(t,e){if(t=Ot(t)){const n=K.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(K.isFunction(e))return e.call(this,t,n);if(K.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ot(t)){const n=K.findKey(this,t);return!(!n||void 0===this[n]||e&&!Pt(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=Ot(t)){const o=K.findKey(n,t);!o||e&&!Pt(0,n[o],o,e)||(delete n[o],r=!0)}}return K.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!Pt(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return K.forEach(this,((r,o)=>{const i=K.findKey(n,o);if(i)return e[i]=_t(r),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete e[o],e[a]=_t(r),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return K.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&K.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[Et]=this[Et]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=Ot(t);e[r]||(function(t,e){const n=K.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return K.isArray(t)?t.forEach(r):r(t),this}}jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(jt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),K.freezeMethods(jt);const xt=jt;function kt(t,e){const n=this||wt,r=e||n,o=xt.from(r.headers);let i=r.data;return K.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Ct(t){return!(!t||!t.__CANCEL__)}function Lt(t,e,n){$.call(this,null==t?"canceled":t,$.ERR_CANCELED,e,n),this.name="CanceledError"}K.inherits(Lt,$,{__CANCEL__:!0});const Bt=Lt;function Tt(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new $("Request failed with status code "+n.status,[$.ERR_BAD_REQUEST,$.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}const Rt=(t,e,n=3)=>{let r=0;const o=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(c){const s=Date.now(),u=r[a];o||(o=s),n[i]=c,r[i]=s;let l=a,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),s-o<e)return;const h=u&&s-u;return h?Math.round(1e3*f/h):void 0}}(50,250);return function(t,e){let n,r,o=0,i=1e3/e;const a=(e,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),t.apply(null,e)};return[(...t)=>{const e=Date.now(),c=e-o;c>=i?a(t,e):(n=t,r||(r=setTimeout((()=>{r=null,a(n)}),i-c)))},()=>n&&a(n)]}((n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,c=i-r,s=o(c);r=i,t({loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:s||void 0,estimated:s&&a&&i<=a?(a-i)/s:void 0,event:n,lengthComputable:null!=a,[e?"download":"upload"]:!0})}),n)},Nt=(t,e)=>{const n=null!=t;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},At=t=>(...e)=>K.asap((()=>t(...e))),Dt=vt.hasStandardBrowserEnv?function(){const t=vt.navigator&&/(msie|trident)/i.test(vt.navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=K.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0},Ft=vt.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const a=[t+"="+encodeURIComponent(e)];K.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),K.isString(r)&&a.push("path="+r),K.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function It(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Vt=t=>t instanceof xt?{...t}:t;function zt(t,e){e=e||{};const n={};function r(t,e,n){return K.isPlainObject(t)&&K.isPlainObject(e)?K.merge.call({caseless:n},t,e):K.isPlainObject(e)?K.merge({},e):K.isArray(e)?e.slice():e}function o(t,e,n){return K.isUndefined(e)?K.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!K.isUndefined(e))return r(void 0,e)}function a(t,e){return K.isUndefined(e)?K.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function c(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const s={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(t,e)=>o(Vt(t),Vt(e),!0)};return K.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=s[r]||o,a=i(t[r],e[r],r);K.isUndefined(a)&&i!==c||(n[r]=a)})),n}const Ht=t=>{const e=zt({},t);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:c,auth:s}=e;if(e.headers=c=xt.from(c),e.url=st(It(e.baseURL,e.url),t.params,t.paramsSerializer),s&&c.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),K.isFormData(r))if(vt.hasStandardBrowserEnv||vt.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if(!1!==(n=c.getContentType())){const[t,...e]=n?n.split(";").map((t=>t.trim())).filter(Boolean):[];c.setContentType([t||"multipart/form-data",...e].join("; "))}if(vt.hasStandardBrowserEnv&&(o&&K.isFunction(o)&&(o=o(e)),o||!1!==o&&Dt(e.url))){const t=i&&a&&Ft.read(a);t&&c.set(i,t)}return e},Mt="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const r=Ht(t);let o=r.data;const i=xt.from(r.headers).normalize();let a,c,s,u,l,{responseType:f,onUploadProgress:h,onDownloadProgress:p}=r;function d(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let y=new XMLHttpRequest;function m(){if(!y)return;const r=xt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());Tt((function(t){e(t),d()}),(function(t){n(t),d()}),{data:f&&"text"!==f&&"json"!==f?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:r,config:t,request:y}),y=null}y.open(r.method.toUpperCase(),r.url,!0),y.timeout=r.timeout,"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(m)},y.onabort=function(){y&&(n(new $("Request aborted",$.ECONNABORTED,t,y)),y=null)},y.onerror=function(){n(new $("Network Error",$.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let e=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||lt;r.timeoutErrorMessage&&(e=r.timeoutErrorMessage),n(new $(e,o.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,t,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&K.forEach(i.toJSON(),(function(t,e){y.setRequestHeader(e,t)})),K.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),f&&"json"!==f&&(y.responseType=r.responseType),p&&([s,l]=Rt(p,!0),y.addEventListener("progress",s)),h&&y.upload&&([c,u]=Rt(h),y.upload.addEventListener("progress",c),y.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(a=e=>{y&&(n(!e||e.type?new Bt(null,t,y):e),y.abort(),y=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const v=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(r.url);v&&-1===vt.protocols.indexOf(v)?n(new $("Unsupported protocol "+v+":",$.ERR_BAD_REQUEST,t)):y.send(o||null)}))},Ut=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,r=new AbortController;const o=function(t){if(!n){n=!0,a();const e=t instanceof Error?t:this.reason;r.abort(e instanceof $?e:new Bt(e instanceof Error?e.message:e))}};let i=e&&setTimeout((()=>{i=null,o(new $(`timeout ${e} of ms exceeded`,$.ETIMEDOUT))}),e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(o):t.removeEventListener("abort",o)})),t=null)};t.forEach((t=>t.addEventListener("abort",o)));const{signal:c}=r;return c.unsubscribe=()=>K.asap(a),c}},qt=function*(t,e){let n=t.byteLength;if(!e||n<e)return void(yield t);let r,o=0;for(;o<n;)r=o+e,yield t.slice(o,r),o=r},Gt=(t,e,n,r)=>{const o=async function*(t,e){for await(const n of async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}}(t))yield*qt(n,e)}(t,e);let i,a=0,c=t=>{i||(i=!0,r&&r(t))};return new ReadableStream({async pull(t){try{const{done:e,value:r}=await o.next();if(e)return c(),void t.close();let i=r.byteLength;if(n){let t=a+=i;n(t)}t.enqueue(new Uint8Array(r))}catch(t){throw c(t),t}},cancel:t=>(c(t),o.return())},{highWaterMark:2})},Wt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Kt=Wt&&"function"==typeof ReadableStream,Jt=Wt&&("function"==typeof TextEncoder?(Zt=new TextEncoder,t=>Zt.encode(t)):async t=>new Uint8Array(await new Response(t).arrayBuffer()));var Zt;const Yt=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},$t=Kt&&Yt((()=>{let t=!1;const e=new Request(vt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),Qt=Kt&&Yt((()=>K.isReadableStream(new Response("").body))),Xt={stream:Qt&&(t=>t.body)};var te;Wt&&(te=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!Xt[t]&&(Xt[t]=K.isFunction(te[t])?e=>e[t]():(e,n)=>{throw new $(`Response type '${t}' is not supported`,$.ERR_NOT_SUPPORT,n)})})));const ee={http:null,xhr:Mt,fetch:Wt&&(async t=>{let{url:e,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:c,onUploadProgress:s,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:h}=Ht(t);u=u?(u+"").toLowerCase():"text";let p,d=Ut([o,i&&i.toAbortSignal()],a);const y=d&&d.unsubscribe&&(()=>{d.unsubscribe()});let m;try{if(s&&$t&&"get"!==n&&"head"!==n&&0!==(m=await(async(t,e)=>{const n=K.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(K.isBlob(t))return t.size;if(K.isSpecCompliantForm(t)){const e=new Request(vt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return K.isArrayBufferView(t)||K.isArrayBuffer(t)?t.byteLength:(K.isURLSearchParams(t)&&(t+=""),K.isString(t)?(await Jt(t)).byteLength:void 0)})(e):n})(l,r))){let t,n=new Request(e,{method:"POST",body:r,duplex:"half"});if(K.isFormData(r)&&(t=n.headers.get("content-type"))&&l.setContentType(t),n.body){const[t,e]=Nt(m,Rt(At(s)));r=Gt(n.body,65536,t,e)}}K.isString(f)||(f=f?"include":"omit");const o="credentials"in Request.prototype;p=new Request(e,{...h,signal:d,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:o?f:void 0});let i=await fetch(p);const a=Qt&&("stream"===u||"response"===u);if(Qt&&(c||a&&y)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=i[e]}));const e=K.toFiniteNumber(i.headers.get("content-length")),[n,r]=c&&Nt(e,Rt(At(c),!0))||[];i=new Response(Gt(i.body,65536,n,(()=>{r&&r(),y&&y()})),t)}u=u||"text";let v=await Xt[K.findKey(Xt,u)||"text"](i,t);return!a&&y&&y(),await new Promise(((e,n)=>{Tt(e,n,{data:v,headers:xt.from(i.headers),status:i.status,statusText:i.statusText,config:t,request:p})}))}catch(e){if(y&&y(),e&&"TypeError"===e.name&&/fetch/i.test(e.message))throw Object.assign(new $("Network Error",$.ERR_NETWORK,t,p),{cause:e.cause||e});throw $.from(e,e&&e.code,t,p)}})};K.forEach(ee,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const ne=t=>`- ${t}`,re=t=>K.isFunction(t)||null===t||!1===t,oe=t=>{t=K.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i<e;i++){let e;if(n=t[i],r=n,!re(n)&&(r=ee[(e=String(n)).toLowerCase()],void 0===r))throw new $(`Unknown adapter '${e}'`);if(r)break;o[e||"#"+i]=r}if(!r){const t=Object.entries(o).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let n=e?t.length>1?"since :\n"+t.map(ne).join("\n"):" "+ne(t[0]):"as no adapter specified";throw new $("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function ie(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Bt(null,t)}function ae(t){return ie(t),t.headers=xt.from(t.headers),t.data=kt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),oe(t.adapter||wt.adapter)(t).then((function(e){return ie(t),e.data=kt.call(t,t.transformResponse,e),e.headers=xt.from(e.headers),e}),(function(e){return Ct(e)||(ie(t),e&&e.response&&(e.response.data=kt.call(t,t.transformResponse,e.response),e.response.headers=xt.from(e.response.headers))),Promise.reject(e)}))}const ce={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{ce[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const se={};ce.transitional=function(t,e,n){function r(t,e){return"[Axios v1.7.7] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new $(r(o," has been removed"+(e?" in "+e:"")),$.ERR_DEPRECATED);return e&&!se[o]&&(se[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}};const ue={assertOptions:function(t,e,n){if("object"!=typeof t)throw new $("options must be an object",$.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],a=e[i];if(a){const e=t[i],n=void 0===e||a(e,i,t);if(!0!==n)throw new $("option "+i+" must be "+n,$.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new $("Unknown option "+i,$.ERR_BAD_OPTION)}},validators:ce},le=ue.validators;class fe{constructor(t){this.defaults=t,this.interceptors={request:new ut,response:new ut}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";try{t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}catch(t){}}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=zt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&ue.assertOptions(n,{silentJSONParsing:le.transitional(le.boolean),forcedJSONParsing:le.transitional(le.boolean),clarifyTimeoutError:le.transitional(le.boolean)},!1),null!=r&&(K.isFunction(r)?e.paramsSerializer={serialize:r}:ue.assertOptions(r,{encode:le.function,serialize:le.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&K.merge(o.common,o[e.method]);o&&K.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=xt.concat(i,o);const a=[];let c=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(c=c&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const s=[];let u;this.interceptors.response.forEach((function(t){s.push(t.fulfilled,t.rejected)}));let l,f=0;if(!c){const t=[ae.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,s),l=t.length,u=Promise.resolve(e);f<l;)u=u.then(t[f++],t[f++]);return u}l=a.length;let h=e;for(f=0;f<l;){const t=a[f++],e=a[f++];try{h=t(h)}catch(t){e.call(this,t);break}}try{u=ae.call(this,h)}catch(t){return Promise.reject(t)}for(f=0,l=s.length;f<l;)u=u.then(s[f++],s[f++]);return u}getUri(t){return st(It((t=zt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}K.forEach(["delete","get","head","options"],(function(t){fe.prototype[t]=function(e,n){return this.request(zt(n||{},{method:t,url:e,data:(n||{}).data}))}})),K.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(zt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}fe.prototype[t]=e(),fe.prototype[t+"Form"]=e(!0)}));const he=fe;class pe{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new Bt(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new pe((function(e){t=e})),cancel:t}}}const de=pe,ye={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ye).forEach((([t,e])=>{ye[e]=t}));const me=ye,ve=function t(e){const n=new he(e),o=r(he.prototype.request,n);return K.extend(o,he.prototype,n,{allOwnKeys:!0}),K.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return t(zt(e,n))},o}(wt);ve.Axios=he,ve.CanceledError=Bt,ve.CancelToken=de,ve.isCancel=Ct,ve.VERSION="1.7.7",ve.toFormData=nt,ve.AxiosError=$,ve.Cancel=ve.CanceledError,ve.all=function(t){return Promise.all(t)},ve.spread=function(t){return function(e){return t.apply(null,e)}},ve.isAxiosError=function(t){return K.isObject(t)&&!0===t.isAxiosError},ve.mergeConfig=zt,ve.AxiosHeaders=xt,ve.formToJSON=t=>bt(K.isHTMLForm(t)?new FormData(t):t),ve.getAdapter=oe,ve.HttpStatusCode=me,ve.default=ve;const be=ve;function ge(t){return ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ge(t)}function we(){we=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==ge(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,n,r){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(ge(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=B,L.prototype={constructor:L,reset:function(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(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Se(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Ee(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Se(i,r,o,a,c,"next",t)}function c(t){Se(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Oe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,_e(r.key),r)}}function _e(t){var e=function(t){if("object"!=ge(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ge(e)?e:e+""}var Pe=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.client=be.create({baseURL:e})},e=[{key:"get",value:function(){var t=Ee(we().mark((function t(e,n){var r;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.client.get(e,{params:n});case 3:return r=t.sent,t.abrupt("return",r.data);case 7:throw t.prev=7,t.t0=t.catch(0),new Error("GET ".concat(e," failed: ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,this,[[0,7]])})));return function(e,n){return t.apply(this,arguments)}}()},{key:"post",value:(o=Ee(we().mark((function t(e,n){var r;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.client.post(e,n);case 3:return r=t.sent,t.abrupt("return",r.data);case 7:throw t.prev=7,t.t0=t.catch(0),new Error("POST ".concat(e," failed: ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return o.apply(this,arguments)})},{key:"put",value:(r=Ee(we().mark((function t(e,n){var r;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.client.put(e,n);case 3:return r=t.sent,t.abrupt("return",r.data);case 7:throw t.prev=7,t.t0=t.catch(0),new Error("PUT ".concat(e," failed: ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return r.apply(this,arguments)})},{key:"delete",value:(n=Ee(we().mark((function t(e,n){var r;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.client.delete(e,{params:n});case 3:return r=t.sent,t.abrupt("return",r.data);case 7:throw t.prev=7,t.t0=t.catch(0),new Error("DELETE ".concat(e," failed: ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return n.apply(this,arguments)})}],e&&Oe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,o}();const je=Pe;function xe(t){return xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xe(t)}function ke(){ke=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==xe(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,n,r){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(xe(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=B,L.prototype={constructor:L,reset:function(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(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Ce(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Le(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Be(r.key),r)}}function Be(t){var e=function(t){if("object"!=xe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xe(e)?e:e+""}var Te=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.apiManager=e},e=[{key:"fetchMapStyle",value:(n=ke().mark((function t(e,n,r){return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.apiManager.get("/map-views/v1/".concat(e,"/").concat(n,"/").concat(r,"/style"));case 3:return t.abrupt("return",t.sent);case 6:return t.prev=6,t.t0=t.catch(0),console.error("Error fetching map data:",t.t0),t.abrupt("return",null);case 10:case"end":return t.stop()}}),t,this,[[0,6]])})),r=function(){var t=this,e=arguments;return new Promise((function(r,o){var i=n.apply(t,e);function a(t){Ce(i,r,o,a,c,"next",t)}function c(t){Ce(i,r,o,a,c,"throw",t)}a(void 0)}))},function(t,e,n){return r.apply(this,arguments)})}],e&&Le(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}();const Re=Te;function Ne(t){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ne(t)}function Ae(){Ae=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Ne(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,n,r){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Ne(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=B,L.prototype={constructor:L,reset:function(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(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function De(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Fe(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){De(i,r,o,a,c,"next",t)}function c(t){De(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Ie(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ve(r.key),r)}}function Ve(t){var e=function(t){if("object"!=Ne(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ne(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ne(e)?e:e+""}var ze=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.apiManager=e},e=[{key:"search",value:(r=Fe(Ae().mark((function t(e,n,r,o){var i;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.apiManager.get("/search/v1/".concat(e,"/").concat(n,"/").concat(r),{q:o});case 3:return i=t.sent,t.abrupt("return",i);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error searching query:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e,n,o){return r.apply(this,arguments)})},{key:"fetchContentPlacementDetails",value:(n=Fe(Ae().mark((function t(e){var n;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.apiManager.get("/search/v1/details/".concat(e));case 3:return n=t.sent,t.abrupt("return",n);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error fetching content placment details:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return n.apply(this,arguments)})}],e&&Ie(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}();const He=ze;function Me(t){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Me(t)}function Ue(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,qe(r.key),r)}}function qe(t){var e=function(t){if("object"!=Me(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Me(e)?e:e+""}const Ge=new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.apiKey=null,this.apiManager=new je("https://api.waygomaps.com"),this.mapViewApi=new Re(this.apiManager),this.SearchApi=new He(this.apiManager)},(e=[{key:"setApiKey",value:function(t){this.apiKey=t}},{key:"getMapViewApi",value:function(){return this.mapViewApi}},{key:"getSearchApi",value:function(){return this.SearchApi}}])&&Ue(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());function We(t){return new Promise((function(e,n){var r=document.createElement("script");r.type="text/javascript",r.src=t,r.onload=function(){return e()},r.onerror=function(){return n(new Error("Failed to load script: ".concat(t)))},document.head.appendChild(r)}))}function Ke(t){return new Promise((function(e,n){var r=document.createElement("link");r.rel="stylesheet",r.href=t,r.onload=function(){return e()},r.onerror=function(){return n(new Error("Failed to load CSS: ".concat(t)))},document.head.appendChild(r)}))}function Je(t){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Je(t)}function Ze(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ye(r.key),r)}}function Ye(t){var e=function(t){if("object"!=Je(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Je(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Je(e)?e:e+""}const $e=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._listeners={}},e=[{key:"on",value:function(t,e){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e),this}},{key:"off",value:function(t,e){if(!this._listeners[t])return this;var n=this._listeners[t].indexOf(e);return-1!==n&&this._listeners[t].splice(n,1),this}},{key:"fire",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._listeners[t]?(e.type=t,this._listeners[t].forEach((function(t){return t(e)})),this):this}}],e&&Ze(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Qe(t){return Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qe(t)}function Xe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,tn(r.key),r)}}function tn(t){var e=function(t){if("object"!=Qe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Qe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qe(e)?e:e+""}function en(t,e,n){return e=rn(e),function(t,e){if(e&&("object"==Qe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,nn()?Reflect.construct(e,n||[],rn(t).constructor):e.apply(t,n))}function nn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(nn=function(){return!!t})()}function rn(t){return rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rn(t)}function on(t,e){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},on(t,e)}const an=new(function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),en(this,e)}return function(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&&on(t,e)}(e,t),n=e,r=[{key:"emit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.fire(t,e)}}],r&&Xe(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}($e));function cn(t){return cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cn(t)}function sn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,un(r.key),r)}}function un(t){var e=function(t){if("object"!=cn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=cn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==cn(e)?e:e+""}function ln(t,e,n){return e=hn(e),function(t,e){if(e&&("object"==cn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,fn()?Reflect.construct(e,n||[],hn(t).constructor):e.apply(t,n))}function fn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(fn=function(){return!!t})()}function hn(t){return hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hn(t)}function pn(t,e){return pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pn(t,e)}const dn=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=ln(this,e)).options=n,t.globalHandlers={},t.stateSubscriptions=[],t}return function(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&&pn(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){}},{key:"render",value:function(){}},{key:"destroy",value:function(){this.removeAllGlobalHandlers(),this.unsubscribeAllState()}},{key:"addGlobalHandler",value:function(t,e){this.globalHandlers[t]||(this.globalHandlers[t]=[]),this.globalHandlers[t].push(e),an.on(t,e)}},{key:"removeGlobalHandler",value:function(t,e){this.globalHandlers[t]&&(this.globalHandlers[t]=this.globalHandlers[t].filter((function(t){return t!==e})),an.off(t,e))}},{key:"removeAllGlobalHandlers",value:function(){var t=this,e=function(e){t.globalHandlers[e].forEach((function(t){return an.off(e,t)}))};for(var n in this.globalHandlers)e(n);this.globalHandlers={}}},{key:"subscribeToState",value:function(t){this.stateSubscriptions.push(t),StateStore.subscribe(t)}},{key:"unsubscribeFromState",value:function(t){this.stateSubscriptions=this.stateSubscriptions.filter((function(e){return e!==t})),StateStore.unsubscribe(t)}},{key:"unsubscribeAllState",value:function(){this.stateSubscriptions.forEach((function(t){return StateStore.unsubscribe(t)})),this.stateSubscriptions=[]}}])&&sn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}($e);function yn(t){return yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yn(t)}function mn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,vn(r.key),r)}}function vn(t){var e=function(t){if("object"!=yn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=yn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yn(e)?e:e+""}const bn=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.mapView=e,this.state="default",this.stateHistory=["default"]},e=[{key:"transitionTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.state=t;var n=this.stateHistory[this.stateHistory.length-1];"default"==t?this.stateHistory=["default"]:t!==n&&this.stateHistory.push(t),console.log("STATE LENGTH PROPER",this.stateHistory.length,this.stateHistory),this.mapView.fire("state:".concat(t),e)}}],e&&mn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function gn(t){return gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gn(t)}function wn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Sn(r.key),r)}}function Sn(t){var e=function(t){if("object"!=gn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=gn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==gn(e)?e:e+""}function En(t,e,n){return e=_n(e),function(t,e){if(e&&("object"==gn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,On()?Reflect.construct(e,n||[],_n(t).constructor):e.apply(t,n))}function On(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(On=function(){return!!t})()}function _n(t){return _n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_n(t)}function Pn(t,e){return Pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Pn(t,e)}const jn=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=En(this,e,[r])).result=t,n._initialize(),n}return function(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&&Pn(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="search-results-view-cell",this.render(),this._setupEventListeners()}},{key:"_setupEventListeners",value:function(){var t=this;this.element.addEventListener("click",(function(){return t.fire("click",{result:t.result})}))}},{key:"render",value:function(){this.element.innerHTML='\n <div class="result-title">'.concat(this.result.name,'</div>\n <div class="result-subtitle">').concat(this.result.contextual_location,"</div>\n ")}},{key:"getElement",value:function(){return this.element}}])&&wn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function xn(t){return xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xn(t)}function kn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Cn(r.key),r)}}function Cn(t){var e=function(t){if("object"!=xn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xn(e)?e:e+""}function Ln(t,e,n){return e=Tn(e),function(t,e){if(e&&("object"==xn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Bn()?Reflect.construct(e,n||[],Tn(t).constructor):e.apply(t,n))}function Bn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Bn=function(){return!!t})()}function Tn(t){return Tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Tn(t)}function Rn(t,e){return Rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Rn(t,e)}const Nn=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Ln(this,e,[n]))._initialize(),t}return function(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&&Rn(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.results=[],this.element=document.createElement("div"),this.element.className="search-results-view",this.titleElement=document.createElement("h3"),this.titleElement.className="search-results-title",this.element.appendChild(this.titleElement)}},{key:"updateView",value:function(t,e){this.results=t,t.length>1&&this.setTitle("".concat(t.length," results found for '").concat(e,"'")),1===t.length&&this.setTitle("".concat(t.length," result found for '").concat(e,"'")),0===t.length&&this.setTitle("No matching results for '".concat(e,"'")),this.render()}},{key:"updateResults",value:function(t){this.results=t,this.render()}},{key:"render",value:function(){for(var t=this;this.element.children.length>1;)this.element.removeChild(this.element.lastChild);this.results.forEach((function(e){var n=new jn(e);n.on("click",(function(){return t.fire("selectCell",{result:e})})),t.element.appendChild(n.getElement())}))}},{key:"setTitle",value:function(t){this.titleElement.innerText=t}},{key:"show",value:function(){this.element.classList.add("visible")}},{key:"hide",value:function(){this.element.classList.remove("visible")}},{key:"getElement",value:function(){return this.element}}])&&kn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function An(t){return An="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},An(t)}function Dn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Fn(r.key),r)}}function Fn(t){var e=function(t){if("object"!=An(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=An(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==An(e)?e:e+""}const In=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e},(e=[{key:"onAdd",value:function(t){this.map=t}},{key:"onRemove",value:function(){this.container.parentNode.removeChild(this.container),this.map=void 0}}])&&Dn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Vn(t){return Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vn(t)}function zn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Hn(r.key),r)}}function Hn(t){var e=function(t){if("object"!=Vn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Vn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vn(e)?e:e+""}function Mn(t,e,n){return e=Gn(e),function(t,e){if(e&&("object"==Vn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Un()?Reflect.construct(e,n||[],Gn(t).constructor):e.apply(t,n))}function Un(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Un=function(){return!!t})()}function qn(){return qn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Gn(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},qn.apply(null,arguments)}function Gn(t){return Gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gn(t)}function Wn(t,e){return Wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Wn(t,e)}const Kn=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Mn(this,e,[n])).searchResultsView=new Nn,t.searchedQuery=null,t.map=null,t}return function(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&&Wn(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){this.map=t,this.container=document.createElement("div"),this.container.className="search-results-control-container";var e=this.searchResultsView.getElement();return this.container.appendChild(e),this.initializeEventListeners(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=qn(Gn(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("initiate:search",this._handleInitiateSearchState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.searchResultsView.on("closeView",this._handleCloseSearchResultsView.bind(this)),this.searchResultsView.on("selectCell",this._handleSearchResultSelect.bind(this))}},{key:"_handleInitiateSearchState",value:function(){this.map.setToSearchState(this.searchedQuery)}},{key:"_handleSearchResultSelect",value:function(t){var e=t.result.placement_id;this.map.setToSelectedContentState([e])}},{key:"_handleCloseSearchResultsView",value:function(){this.map.setToDefaultState()}},{key:"_handleDefaultState",value:function(){this.searchedQuery=null,this.searchResultsView.updateResults([]),this.hide()}},{key:"_handleSearchState",value:function(t){var e=t.query,n=t.results;this.searchedQuery=e,this.searchResultsView.updateResults([]),this.searchResultsView.updateView(n,e),this.show()}},{key:"_handleSelectedContentState",value:function(t){this.searchResultsView.updateResults([]),this.hide()}},{key:"_handleDirectionsState",value:function(t){console.log("handling directions state in search results control")}},{key:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&zn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(In);function Jn(t){return Jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jn(t)}function Zn(){Zn=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Jn(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,n,r){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Jn(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=B,L.prototype={constructor:L,reset:function(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(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Yn(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function $n(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Yn(i,r,o,a,c,"next",t)}function c(t){Yn(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Qn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Xn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Qn(Object(n),!0).forEach((function(e){tr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function tr(t,e,n){return(e=nr(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function er(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,nr(r.key),r)}}function nr(t){var e=function(t){if("object"!=Jn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Jn(e)?e:e+""}function rr(t,e,n){return e=ir(e),function(t,e){if(e&&("object"==Jn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,or()?Reflect.construct(e,n||[],ir(t).constructor):e.apply(t,n))}function or(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(or=function(){return!!t})()}function ir(t){return ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ir(t)}function ar(t,e){return ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ar(t,e)}var cr={"c66d7e2c3ebd4a8fa60efa5bf3b5b301:2d4911eda2ef4950b307e51cd0ccf35e":{steps:["Leave Roundtable and make a left","Turn right after walking 177 feet","Turn left after walking 203 feet","Turn right after walking 100 feet","Continue straight in 242 feet","Arrive at Stage 4, on your left"],path:[[-81.55730801074388,-195.68687504906683],[-66.79352848318483,-195.68687504906688],[-66.79352848318483,-136.30367294932935],[-6.7541584044446665,-136.30367294932955],[-6.7541584044446195,-106.92078820451393],[81.82851876090972,-106.92078820451393],[81.82851876090972,-47.20950211527508],[140.88363687114594,-47.20950211527508]]}},sr={container:"map",sourceId:"collision-conference.2024.2xw_YUXYS8GoDTB2AQgN3A",center:[0,0],zoom:12,bearing:0,pitch:0,minPitch:0,maxPitch:75,minZoom:0,maxZoom:22,bounds:null,doubleClickZoom:!0,dragPan:!0,dragRotate:!0,scrollZoom:!0,touchPitch:!0,touchZoomRotate:!0,interactive:!0,trackResize:!0,keyboard:!0},ur=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=rr(this,e,[Xn(Xn({},sr),n)])).mapViewApi=Ge.getMapViewApi(),t.searchApi=Ge.getSearchApi(),t.mapContainer=document.createElement("div"),t.mapContainer.className="inner-map-container",t.ready=t._initialize(n),t._stateCoordinator=new bn(t),t}return function(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&&ar(t,e)}(e,t),n=e,r=[{key:"_initialize",value:(f=$n(Zn().mark((function t(){var e,n=this;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("Initializing map view component.."),t.prev=1,t.next=4,this._loadMapLibraries();case 4:return this.render(),t.next=7,this._fetchMapStyle();case 7:e=t.sent,"undefined"!=typeof mapboxgl&&e?(mapboxgl.accessToken="pk.eyJ1Ijoid2F5Z28tbWFwcyIsImEiOiJjbGtxYzZ1N3QxdG43M210bXFuYmJ4a3gxIn0.tlbznj_fRJ8La6s2UUMO6A",this.map=new mapboxgl.Map({container:this.mapContainer,style:"mapbox://styles/waygo-maps/".concat(e),center:this.options.center,zoom:this.options.zoom,bearing:this.options.bearing,pitch:this.options.pitch,minPitch:this.options.minPitch,maxPitch:this.options.maxPitch,minZoom:this.options.minZoom,maxZoom:this.options.maxZoom,bounds:this.options.bounds,doubleClickZoom:this.options.doubleClickZoom,dragPan:this.options.dragPan,dragRotate:this.options.dragRotate,scrollZoom:this.options.scrollZoom,touchPitch:this.options.touchPitch,touchZoomRotate:this.options.touchZoomRotate,interactive:this.options.interactive,trackResize:this.options.trackResize,keyboard:this.options.keyboard}),this.map.on("load",(function(){return n.fire("load")})),this._initializeEventListeners()):console.error("Mapbox GL JS is not loaded."),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),console.error("Failed to initialize the map:",t.t0);case 14:case"end":return t.stop()}}),t,this,[[1,11]])}))),function(){return f.apply(this,arguments)})},{key:"_initializeEventListeners",value:function(){var t=this;this.mapContainer.addEventListener("mousedown",(function(e){return t.fire("mousedown",{originalEvent:e})})),this.mapContainer.addEventListener("click",(function(e){return t.fire("click",{originalEvent:e})})),this.mapContainer.addEventListener("mouseover",(function(e){return t.fire("mouseover",{originalEvent:e})})),this.mapContainer.addEventListener("mousemove",(function(e){return t.fire("mousemove",{originalEvent:e})})),this.mapContainer.addEventListener("dblclick",(function(e){return t.fire("dblclick",{originalEvent:e})})),this.mapContainer.addEventListener("mouseout",(function(e){return t.fire("mouseout",{originalEvent:e})})),this.mapContainer.addEventListener("contextmenu",(function(e){return t.fire("contextmenu",{originalEvent:e})})),this.mapContainer.addEventListener("wheel",(function(e){return t.fire("wheel",{originalEvent:e})})),this.mapContainer.addEventListener("touchstart",(function(e){return t.fire("touchstart",{originalEvent:e})})),this.mapContainer.addEventListener("touchend",(function(e){return t.fire("touchend",{originalEvent:e})})),this.mapContainer.addEventListener("touchmove",(function(e){return t.fire("touchmove",{originalEvent:e})})),this.mapContainer.addEventListener("touchcancel",(function(e){return t.fire("touchcancel",{originalEvent:e})})),this.mapContainer.addEventListener("move",(function(e){return t.fire("move",{originalEvent:e})})),["movestart","move","moveend","dragstart","drag","dragend","zoomstart","zoom","zoomend","rotatestart","rotate","rotateend","pitchstart","pitch","pitchend","boxzoomstart","boxzoomend","boxzoomcancel"].forEach((function(e){t.map.on(e,(function(n){t.fire(e,{originalEvent:n})}))}))}},{key:"_fetchMapStyle",value:(l=$n(Zn().mark((function t(){var e,n,r,o,i;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(3===(e=this.options.sourceId.split(".")).length){t.next=4;break}return console.error('The mapViewId format is incorrect. It should be in the format "businessId.mapId.mapViewId".'),t.abrupt("return");case 4:return n=e[0]||"",r=e[1]||"",o=e[2]||"",t.prev=7,t.next=10,this.mapViewApi.fetchMapStyle(n,r,o);case 10:return i=t.sent,console.log("Fetched map style:",i.style_id),t.abrupt("return",i.style_id);case 15:t.prev=15,t.t0=t.catch(7),console.error("Error fetching map style:",t.t0);case 18:case"end":return t.stop()}}),t,this,[[7,15]])}))),function(){return l.apply(this,arguments)})},{key:"_loadMapLibraries",value:(u=$n(Zn().mark((function t(){return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("Loading map libraries"),t.next=3,Ke("https://api.mapbox.com/mapbox-gl-js/v3.5.1/mapbox-gl.css");case 3:return t.next=5,We("https://api.mapbox.com/mapbox-gl-js/v3.5.1/mapbox-gl.js");case 5:console.log("Map libraries loaded");case 6:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)})},{key:"render",value:function(){var t=document.getElementById(this.options.container);t?(t.appendChild(this.mapContainer),this.mapContainer.style.width="100%",this.mapContainer.style.height="100%",this.mapContainer.style.position="relative"):console.error('Container element with id "'.concat(this.containerId,'" not found.'))}},{key:"addControl",value:function(t){var e=t.onAdd(this);this.mapContainer.appendChild(e)}},{key:"removeControl",value:function(t){this.map.removeControl(t)}},{key:"setToDefaultState",value:function(){this._stateCoordinator.transitionTo("default")}},{key:"setToSearchState",value:(s=$n(Zn().mark((function t(e){var n;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.search(e);case 2:n=t.sent,this._stateCoordinator.transitionTo("search",{query:e,results:n});case 4:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"setToSelectedContentState",value:(c=$n(Zn().mark((function t(e){var n,r;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e[e.length-1],t.next=3,this.getContentPlacementDetails(n);case 3:r=t.sent,this._stateCoordinator.transitionTo("selectedContent",{contentPlacementIds:e,selectedContentPlacement:r});case 5:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"setToDirectionsState",value:(a=$n(Zn().mark((function t(){var e,n,r,o,i=arguments;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=i.length>1&&void 0!==i[1]?i[1]:null,r=null,!(e=i.length>0&&void 0!==i[0]?i[0]:null)){t.next=7;break}return t.next=6,this.getContentPlacementDetails(e);case 6:r=t.sent;case 7:if(o=null,!n){t.next=12;break}return t.next=11,this.getContentPlacementDetails(n);case 11:o=t.sent;case 12:this._stateCoordinator.transitionTo("directions",{startContentPlacement:r,endContentPlacement:o});case 13:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"initiateBack",value:function(){this.fire("initiate:back")}},{key:"initiateSetToSearchState",value:function(){this.fire("initiate:search")}},{key:"findPath",value:function(t,e){console.log("finding path",t,e);var n=cr["".concat(t,":").concat(e)];console.log("DATA",n);var r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null===e&&(e=[0,0]),console.log("CHECK1",e);var r=[],o=function(t){console.log("CHECK3");var e=t*Math.PI/180,n=6378137,r=6356752.314;console.log("CHECK4",e,n,r);var o=(Math.pow(n,.5)-Math.pow(r,.5))/Math.pow(n,.5);console.log("CHECK5",o);var i=1/(111132.954-559.822*Math.cos(2*e)+1.175*Math.cos(4*e));console.log("CHECK6",i);var a=1/(Math.PI*n*Math.cos(e)/(180*Math.pow(1-Math.pow(o,2)*Math.pow(Math.sin(e),2),.5)));return console.log("CHECK7",a),{meterToLat:i,meterToLon:a}}(e[1]),i=o.meterToLat,a=o.meterToLon;return console.log("CHECK2",i,a),t.forEach((function(t){var o=function(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,i=t[0],a=t[1],c=e[0];return{lat:e[1]+a*o*n,lon:c+i*o*r}}(t,e,i,a,n),c=o.lat,s=o.lon;r.push([s,c])})),r}(n.path,null,10);return console.log("COORDINATES:",r),{coordinates:r,steps:n.steps}}},{key:"_findFeatureByPlacementId",value:function(t){var e=this.map.queryRenderedFeatures({filter:["==",["get","placement_id"],t]});return e.length>0?e[0]:null}},{key:"getCenter",value:function(){if(this.map)return this.map.getCenter();console.error("Map is not initialized.")}},{key:"setCenter",value:function(t){this.map?this.map.setCenter(t):console.error("Map is not initialized.")}},{key:"search",value:(i=$n(Zn().mark((function t(e){return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(""!==e){t.next=2;break}return t.abrupt("return");case 2:return t.prev=2,t.next=5,this.searchApi.search("e9df990cbd084934973a87fc2f3b0e74","move-america-2024","FTdsy9btTs6qumoZ6E8Z2Q",e);case 5:return t.abrupt("return",t.sent);case 8:t.prev=8,t.t0=t.catch(2),axios.isCancel(t.t0)?console.log("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 11:case"end":return t.stop()}}),t,this,[[2,8]])}))),function(t){return i.apply(this,arguments)})},{key:"getContentPlacementDetails",value:(o=$n(Zn().mark((function t(e){return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.searchApi.fetchContentPlacementDetails(e);case 3:return t.abrupt("return",t.sent);case 6:t.prev=6,t.t0=t.catch(0),axios.isCancel(t.t0)?console.log("Request canceled:",t.t0.message):console.error("Fetching content placement details error:",t.t0);case 9:case"end":return t.stop()}}),t,this,[[0,6]])}))),function(t){return o.apply(this,arguments)})}],r&&er(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i,a,c,s,u,l,f}(dn);const lr=t.p+"f8965838ad87362f7fd1507af2a45dfa.svg",fr=t.p+"7d2fb7c25b2d12614aeb1b025a51b86f.svg",hr=t.p+"709b5ad35fbbdaa1c4b5222a276444fa.svg",pr=t.p+"507fada530642f8f1084a961a554e5a5.svg";function dr(t){return dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dr(t)}function yr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,mr(r.key),r)}}function mr(t){var e=function(t){if("object"!=dr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=dr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==dr(e)?e:e+""}function vr(t,e,n){return e=gr(e),function(t,e){if(e&&("object"==dr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,br()?Reflect.construct(e,n||[],gr(t).constructor):e.apply(t,n))}function br(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(br=function(){return!!t})()}function gr(t){return gr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},gr(t)}function wr(t,e){return wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wr(t,e)}const Sr=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=vr(this,e,[n]))._initialize(),t}return function(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&&wr(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="search-bar-container",this.input=document.createElement("input"),this.input.type="text",this.input.placeholder="Search MOVE America 2024",this.input.className="search-bar",this.rightButton=document.createElement("button"),this.rightButton.className="search-bar-button-right",this.updateRightButtonIcon("search"),this.leftButton=document.createElement("button"),this.leftButton.className="search-bar-button-left",this.updateLeftButtonIcon("none"),this.element.appendChild(this.leftButton),this.element.appendChild(this.input),this.element.appendChild(this.rightButton),this._setupEventListeners()}},{key:"_setupEventListeners",value:function(){var t=this;this.input.addEventListener("input",(function(e){return t._handleInput(e)})),this.input.addEventListener("focus",this._handleFocus.bind(this)),this.input.addEventListener("blur",this._handleBlur.bind(this)),this.input.addEventListener("keydown",(function(e){"Enter"===e.key&&t._handleEnterSelect(e)})),this.rightButton.addEventListener("click",(function(e){return t._handleRightButtonSelect(e)})),this.leftButton.addEventListener("click",(function(e){return t._handleLeftButtonSelect(e)}))}},{key:"_handleInput",value:function(t){this.fire("input",{event:t,query:this.getText()})}},{key:"_handleFocus",value:function(){this.fire("focus")}},{key:"_handleBlur",value:function(){var t=this;setTimeout((function(){var e=document.activeElement;e===t.rightButton?(t.updateStyleWithoutSuggestions(),t.fire("blur")):e===t.input||(t.updateStyleWithoutSuggestions(),t.fire("blur"))}),150)}},{key:"_handleEnterSelect",value:function(t){var e=this.getText();e.length>0&&(this.fire("search",{query:e,event:t}),this.input.blur())}},{key:"_handleRightButtonSelect",value:function(t){if("search"===this.rightButtonState){var e=this.getText();e.length>0&&(this.fire("search",{query:e,event:t}),this.input.blur())}else"cancel"===this.rightButtonState&&this.fire("cancel",{event:t})}},{key:"_handleLeftButtonSelect",value:function(t){"logo"===this.leftButtonState?this.input.focus():"back"===this.leftButtonState&&this.fire("back")}},{key:"updateStyleWithSuggestions",value:function(){this.element.classList.add("with-results")}},{key:"updateStyleWithoutSuggestions",value:function(){this.element.classList.remove("with-results")}},{key:"updateRightButtonIcon",value:function(t){this.rightButtonState=t,"search"===t?(this.rightButton.innerHTML='<img src="'.concat(lr,'" alt="Search" />'),this.rightButton.style.display="flex"):"cancel"===t?(this.rightButton.innerHTML='<img src="'.concat(fr,'" alt="Cancel" />'),this.rightButton.style.display="flex"):"none"===t&&(this.rightButton.style.display="none")}},{key:"updateLeftButtonIcon",value:function(t){if(this.leftButtonState=t,"logo"===t){this.leftButton.innerHTML='<img src="'.concat(pr,'" alt="').concat(t,'" />');var e=this.leftButton.querySelector("img");e.style.width="16px",e.style.height="16px",this.leftButton.style.display="flex"}else if("back"===t){this.leftButton.innerHTML='<img src="'.concat(hr,'" alt="').concat(t,'" />');var n=this.leftButton.querySelector("img");n.style.width="20px",n.style.height="20px",this.leftButton.style.display="flex"}else"none"===t&&(this.leftButton.style.display="none")}},{key:"getText",value:function(){return this.input.value}},{key:"setText",value:function(t){this.input.value=t}},{key:"setPlaceholderText",value:function(t){this.input.placeholder=t}},{key:"getElement",value:function(){return this.element}}],r&&yr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Er(t){return Er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Er(t)}function Or(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,_r(r.key),r)}}function _r(t){var e=function(t){if("object"!=Er(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Er(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Er(e)?e:e+""}function Pr(t,e,n){return e=xr(e),function(t,e){if(e&&("object"==Er(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,jr()?Reflect.construct(e,n||[],xr(t).constructor):e.apply(t,n))}function jr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(jr=function(){return!!t})()}function xr(t){return xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xr(t)}function kr(t,e){return kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},kr(t,e)}const Cr=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=Pr(this,e,[r])).result=t,n._initialize(),n}return function(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&&kr(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="search-bar-suggestions-view-cell",this.render(),this._setupEventListeners()}},{key:"_setupEventListeners",value:function(){var t=this;this.element.addEventListener("click",(function(){return t.fire("click",{result:t.result})}))}},{key:"render",value:function(){this.element.innerHTML='\n <div class="suggestion-title">'.concat(this.result.name,'</div>\n <div class="suggestion-subtitle">').concat(this.result.contextual_location,"</div>\n ")}},{key:"getElement",value:function(){return this.element}}])&&Or(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Lr(t){return Lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lr(t)}function Br(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Tr(r.key),r)}}function Tr(t){var e=function(t){if("object"!=Lr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Lr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Lr(e)?e:e+""}function Rr(t,e,n){return e=Ar(e),function(t,e){if(e&&("object"==Lr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Nr()?Reflect.construct(e,n||[],Ar(t).constructor):e.apply(t,n))}function Nr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Nr=function(){return!!t})()}function Ar(t){return Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ar(t)}function Dr(t,e){return Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Dr(t,e)}const Fr=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Rr(this,e,[n]))._initialize(),t}return function(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&&Dr(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.results=[],this.element=document.createElement("div"),this.element.className="search-bar-suggestions-view"}},{key:"updateResults",value:function(t){this.results=t,this.render()}},{key:"render",value:function(){var t=this;this.element.innerHTML="",this.results.forEach((function(e){var n=new Cr(e);n.on("click",(function(){return t.fire("selectCell",{result:e})})),t.element.appendChild(n.getElement())}))}},{key:"clearResults",value:function(){this.updateResults([])}},{key:"show",value:function(){this.element.classList.add("visible")}},{key:"hide",value:function(){this.element.classList.remove("visible")}},{key:"getElement",value:function(){return this.element}}])&&Br(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Ir(t){return Ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ir(t)}function Vr(){Vr=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Ir(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,n,r){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Ir(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=B,L.prototype={constructor:L,reset:function(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(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function zr(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Hr(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){zr(i,r,o,a,c,"next",t)}function c(t){zr(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Mr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ur(r.key),r)}}function Ur(t){var e=function(t){if("object"!=Ir(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ir(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ir(e)?e:e+""}function qr(t,e,n){return e=Wr(e),function(t,e){if(e&&("object"==Ir(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Gr()?Reflect.construct(e,n||[],Wr(t).constructor):e.apply(t,n))}function Gr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Gr=function(){return!!t})()}function Wr(t){return Wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wr(t)}function Kr(t,e){return Kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Kr(t,e)}const Jr=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=qr(this,e,[n])).searchApi=Ge.getSearchApi(),t.element=document.createElement("div"),t.element.className="search-box",t.searchBar=new Sr,t.searchBarSuggestionsView=new Fr,t.searchCount=0,t.initializeHandlers(),t._render(),t}return function(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&&Kr(t,e)}(e,t),n=e,r=[{key:"initializeHandlers",value:function(){this.searchBar.on("input",this._handleSearchBarInput.bind(this)),this.searchBar.on("focus",this._handleSearchBarFocus.bind(this)),this.searchBar.on("blur",this._handleSearchBarBlur.bind(this)),this.searchBar.on("search",this._handleSearchBarSearch.bind(this)),this.searchBar.on("back",this._handleSearchBarBack.bind(this)),this.searchBarSuggestionsView.on("selectCell",this._handleSearchResultSelect.bind(this))}},{key:"_handleSearchBarBack",value:function(){this.fire("selectBack")}},{key:"_handleSearchBarSearch",value:function(t){var e=t.query;t.event,this.fire("search",{query:e})}},{key:"_handleSearchResultSelect",value:function(t){t.result}},{key:"_handleSearchBarFocus",value:(a=Hr(Vr().mark((function t(){var e;return Vr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((e=this.searchBar.getText()).length>0)){t.next=5;break}return t.next=4,this.getSearchBarSuggestions(e);case 4:this.openSuggestionsView();case 5:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"_handleSearchBarBlur",value:function(){this.searchBarSuggestionsView.hide()}},{key:"_handleSearchBarInput",value:(i=Hr(Vr().mark((function t(e){var n;return Vr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.query,this.openSuggestionsView(),t.next=4,this.getSearchBarSuggestions(n);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_render",value:function(){this.element.appendChild(this.searchBar.getElement()),this.element.appendChild(this.searchBarSuggestionsView.getElement())}},{key:"getElement",value:function(){return this.element}},{key:"openSuggestionsView",value:function(){this.searchBarSuggestionsView.show(),this.searchBar.updateStyleWithSuggestions()}},{key:"closeSuggestionsView",value:function(){this.searchBarSuggestionsView.hide(),this.searchBar.updateStyleWithoutSuggestions()}},{key:"getSearchBarSuggestions",value:(o=Hr(Vr().mark((function t(e){var n,r;return Vr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=++this.searchCount,""!==e){t.next=5;break}return this.searchBarSuggestionsView.updateResults([]),this.closeSuggestionsView(),t.abrupt("return");case 5:return t.prev=5,t.next=8,this.searchApi.search("e9df990cbd084934973a87fc2f3b0e74","move-america-2024","FTdsy9btTs6qumoZ6E8Z2Q",e);case 8:r=t.sent,n===this.searchCount&&this.searchBarSuggestionsView.updateResults(r),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(5),be.isCancel(t.t0)?console.log("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 15:case"end":return t.stop()}}),t,this,[[5,12]])}))),function(t){return o.apply(this,arguments)})}],r&&Mr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i,a}(dn);function Zr(t){return Zr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zr(t)}function Yr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,$r(r.key),r)}}function $r(t){var e=function(t){if("object"!=Zr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Zr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Zr(e)?e:e+""}function Qr(t,e,n){return e=eo(e),function(t,e){if(e&&("object"==Zr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Xr()?Reflect.construct(e,n||[],eo(t).constructor):e.apply(t,n))}function Xr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xr=function(){return!!t})()}function to(){return to="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=eo(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},to.apply(null,arguments)}function eo(t){return eo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},eo(t)}function no(t,e){return no=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},no(t,e)}const ro=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Qr(this,e,[n])).searchBox=new Jr,t.map=null,t}return function(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&&no(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){this.map=t,this.container=document.createElement("div"),this.container.className="search-box-control-container";var e=this.searchBox.getElement();return this.container.appendChild(e),this.show(),this.initializeEventListeners(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=to(eo(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.searchBox.searchBarSuggestionsView.on("selectCell",this._handleSuggestionSelect.bind(this)),this.searchBox.searchBar.on("cancel",this._handleSearchBarCancel.bind(this)),this.searchBox.on("search",this._handleSearchBoxSearch.bind(this)),this.searchBox.on("selectBack",this._handleSearchBoxSelectBack.bind(this)),this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this))}},{key:"_handleSearchBoxSelectBack",value:function(){this.map.initiateBack()}},{key:"_handleSearchBarCancel",value:function(t){this.map.setToDefaultState()}},{key:"_handleSearchBoxSearch",value:function(t){var e=t.query;this.map.setToSearchState(e)}},{key:"_handleSuggestionSelect",value:function(t){var e=t.result;this.map.setToSelectedContentState([e.placement_id])}},{key:"_handleDefaultState",value:function(){this.searchBox.searchBarSuggestionsView.clearResults(),this.searchBox.closeSuggestionsView(),this.searchBox.searchBar.setText(""),this.searchBox.searchBar.input.focus(),this.searchBox.searchBar.updateRightButtonIcon("search"),this.searchBox.searchBar.updateLeftButtonIcon("none"),this.show()}},{key:"_handleSearchState",value:function(t){var e=t.query,n=t.results;console.log("SEARC",e,n),this.searchBox.searchBar.setText(e),this.searchBox.searchBar.updateRightButtonIcon("cancel"),this.searchBox.searchBar.updateLeftButtonIcon("none"),this.show()}},{key:"_handleSelectedContentState",value:function(t){var e=t.contentPlacementIds,n=t.selectedContentPlacement;this.show();var r=n.content.title_key,o=n.content.data[r];this.searchBox.searchBar.setText(o),this.searchBox.searchBar.updateRightButtonIcon("cancel"),this.map._stateCoordinator.stateHistory.length>2||e.length>1?this.searchBox.searchBar.updateLeftButtonIcon("back"):this.searchBox.searchBar.updateLeftButtonIcon("none")}},{key:"_handleDirectionsState",value:function(t){console.log("handling directions state in search box control"),this.map._stateCoordinator.stateHistory.length>2?this.searchBox.searchBar.updateLeftButtonIcon("back"):this.searchBox.searchBar.updateLeftButtonIcon("none")}},{key:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&Yr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(In);function oo(t){return oo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oo(t)}function io(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ao(r.key),r)}}function ao(t){var e=function(t){if("object"!=oo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=oo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==oo(e)?e:e+""}function co(t,e,n){return e=uo(e),function(t,e){if(e&&("object"==oo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,so()?Reflect.construct(e,n||[],uo(t).constructor):e.apply(t,n))}function so(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(so=function(){return!!t})()}function uo(t){return uo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},uo(t)}function lo(t,e){return lo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},lo(t,e)}const fo=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=co(this,e,[r])).items=n,t.containerClass=r.container,t.element=document.createElement("div"),t.element.className="slider-bar-container ".concat(t.containerClass),t.sliderBar=document.createElement("div"),t.sliderBar.className="slider-bar ".concat(t.containerClass,"-bar"),t.leftButton=document.createElement("button"),t.leftButton.className="scroll-button left ".concat(t.containerClass,"-scroll-button"),t.leftButton.addEventListener("click",(function(){return t._scrollSliderBar("left")})),t.rightButton=document.createElement("button"),t.rightButton.className="scroll-button right ".concat(t.containerClass,"-scroll-button"),t.rightButton.addEventListener("click",(function(){return t._scrollSliderBar("right")})),t.buttonElements=[],t._render(),t.sliderBar.addEventListener("scroll",(function(){return t._updateScrollButtons()})),setTimeout((function(){return t._updateScrollButtons()}),.8),t}return function(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&&lo(t,e)}(e,t),n=e,r=[{key:"_render",value:function(){var t=this;this.items.forEach((function(e){var n=e.title,r=e.imageUrl,o=document.createElement("button");if(o.addEventListener("click",t._handleSliderButtonSelect.bind(t)),o.className="slider-bar-button ".concat(t.containerClass,"-button"),r){var i=document.createElement("img");i.src=r,i.alt=n,i.className="slider-bar-button-image ".concat(t.containerClass,"-button-image"),o.appendChild(i)}else console.log("No image found for slider bar button.");var a=document.createElement("span");a.textContent=n,o.appendChild(a),t.buttonElements.push(o),t.sliderBar.appendChild(o)})),this.element.appendChild(this.leftButton),this.element.appendChild(this.sliderBar),this.element.appendChild(this.rightButton)}},{key:"_handleSliderButtonSelect",value:function(t){var e=t.currentTarget,n=e.querySelector("span").textContent;if(e.classList.contains("selected"))e.classList.remove("selected"),this.fire("deselect");else{var r=document.querySelector(".slider-bar-button.selected");r&&r.classList.remove("selected"),e.classList.add("selected"),this.fire("selectNew",{query:n})}}},{key:"_scrollSliderBar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:275,n=this.sliderBar.scrollWidth-this.sliderBar.clientWidth,r=this.sliderBar.scrollLeft,o=e;if("right"===t){var i=n-r;i<e&&(o=i)}"left"===t?this.sliderBar.scrollBy({left:-e,behavior:"smooth"}):"right"===t&&this.sliderBar.scrollBy({left:o,behavior:"smooth"})}},{key:"_updateScrollButtons",value:function(){var t=this.sliderBar.scrollLeft,e=this.sliderBar.scrollWidth-this.sliderBar.clientWidth;this.leftButton.style.display=t<=0?"none":"block";var n=Math.abs(e-t);this.rightButton.style.display=n<=1?"none":"block"}},{key:"deselectAll",value:function(){this.sliderBar.querySelectorAll(".slider-bar-button.selected").forEach((function(t){return t.classList.remove("selected")}))}},{key:"deselectAllNotMatchingQuery",value:function(t){this.sliderBar.querySelectorAll(".slider-bar-button.selected").forEach((function(e){e.textContent!==t&&e.classList.remove("selected")}))}},{key:"invertButtonAtIndex",value:function(t){var e=this.buttonElements[t];e?e.classList.toggle("inverted"):console.error("Button at index ".concat(t," does not exist."))}},{key:"getElement",value:function(){return this.element}},{key:"show",value:function(){this.element.classList.add("visible")}},{key:"hide",value:function(){this.element.classList.remove("visible")}}],r&&io(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function ho(t){return ho="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ho(t)}function po(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,yo(r.key),r)}}function yo(t){var e=function(t){if("object"!=ho(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ho(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ho(e)?e:e+""}function mo(t,e,n){return e=go(e),function(t,e){if(e&&("object"==ho(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,vo()?Reflect.construct(e,n||[],go(t).constructor):e.apply(t,n))}function vo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(vo=function(){return!!t})()}function bo(){return bo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=go(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},bo.apply(null,arguments)}function go(t){return go=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},go(t)}function wo(t,e){return wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wo(t,e)}const So=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=mo(this,e,[n])).categoryBar=new fo([{title:"Energy & charging"},{title:"Mobility"},{title:"Automotive"},{title:"Indoor mapping"},{title:"Supply chain"},{title:"Tech data"},{title:"Insurance"},{title:"Rideshare"},{title:"Manufacturing"},{title:"Autonomous vehicles"},{title:"Human resources"},{title:"Battery tech"},{title:"Renewable energy"}],{container:"category-bar"}),t.map=null,t}return function(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&&wo(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){this.map=t,this.container=document.createElement("div"),this.container.className="category-bar-control-container";var e=this.categoryBar.getElement();return this.container.appendChild(e),this.initializeEventListeners(),this.show(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=bo(go(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.categoryBar.on("selectNew",this._handleNewCategoryButtonSelect.bind(this)),this.categoryBar.on("deselect",this._handleCategoryButtonDeselect.bind(this)),this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this))}},{key:"_handleDefaultState",value:function(){this.show(),this.categoryBar.deselectAll()}},{key:"_handleSelectedContentState",value:function(t){this.hide()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleNewCategoryButtonSelect",value:function(t){var e=t.query;this.map.setToSearchState(e)}},{key:"_handleCategoryButtonDeselect",value:function(){this.map.setToDefaultState()}},{key:"_handleSearchState",value:function(t){var e=t.query;t.results,this.show(),this.categoryBar.deselectAllNotMatchingQuery(e)}},{key:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&po(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(In),Eo=(t.p,t.p+"1b7f16a1f8c7a51acb29667188b93cd4.svg");function Oo(t){return Oo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oo(t)}function _o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Po(r.key),r)}}function Po(t){var e=function(t){if("object"!=Oo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Oo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Oo(e)?e:e+""}function jo(t,e,n){return e=ko(e),function(t,e){if(e&&("object"==Oo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xo()?Reflect.construct(e,n||[],ko(t).constructor):e.apply(t,n))}function xo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xo=function(){return!!t})()}function ko(t){return ko=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ko(t)}function Co(t,e){return Co=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Co(t,e)}const Lo=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=jo(this,e,[r])).contentPlacement=t,n._initialize(),n}return function(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&&Co(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){var t=this.contentPlacement.content;this.element=document.createElement("div"),this.element.className="content-placement-header",this.textContainer=document.createElement("div"),this.textContainer.className="header-text-container",this.nameElement=document.createElement("div"),this.nameElement.className="header-content-name",this.nameElement.textContent=t.data[t.title_key],this.catalogNameElement=document.createElement("div"),this.catalogNameElement.className="header-catalog-name",this.catalogNameElement.textContent=this.contentPlacement.catalog.title,this.textContainer.appendChild(this.nameElement),this.textContainer.appendChild(this.catalogNameElement),this.imageViewElement=document.createElement("div"),this.imageViewElement.className="header-image-view",this.element.appendChild(this.imageViewElement),this.element.appendChild(this.textContainer)}},{key:"getElement",value:function(){return this.element}}])&&_o(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Bo(t){return Bo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bo(t)}function To(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ro(r.key),r)}}function Ro(t){var e=function(t){if("object"!=Bo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Bo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bo(e)?e:e+""}function No(t,e,n){return e=Do(e),function(t,e){if(e&&("object"==Bo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ao()?Reflect.construct(e,n||[],Do(t).constructor):e.apply(t,n))}function Ao(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ao=function(){return!!t})()}function Do(t){return Do=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Do(t)}function Fo(t,e){return Fo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Fo(t,e)}const Io=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=No(this,e,[o])).icon=t,r.text=n,r._initialize(),r}return function(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&&Fo(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="contextual-location-view",this.imageViewElement=document.createElement("img"),this.imageViewElement.className="contextual-location-image",this.imageViewElement.src=this.icon,this.textElement=document.createElement("span"),this.textElement.textContent=this.text,this.textElement.className="contextual-location-text",this.element.appendChild(this.imageViewElement),this.element.appendChild(this.textElement)}},{key:"getElement",value:function(){return this.element}}])&&To(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Vo(t){return Vo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vo(t)}function zo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ho(r.key),r)}}function Ho(t){var e=function(t){if("object"!=Vo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Vo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vo(e)?e:e+""}function Mo(t,e,n){return e=qo(e),function(t,e){if(e&&("object"==Vo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Uo()?Reflect.construct(e,n||[],qo(t).constructor):e.apply(t,n))}function Uo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Uo=function(){return!!t})()}function qo(t){return qo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qo(t)}function Go(t,e){return Go=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Go(t,e)}const Wo=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=Mo(this,e,[r])).data=t,n._initialize(),n}return function(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&&Go(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("div"),this.element.className="content-placement-details-view",this.titleView=document.createElement("div"),this.titleView.className="content-details-section-title",this.titleView.textContent="Additional details",this.element.appendChild(this.titleView);var e=Object.keys(this.data);e.forEach((function(n,r){var o=t.data[n],i=document.createElement("div");i.className="details-view-item";var a=document.createElement("div");a.className="details-view-key",a.textContent=n;var c=document.createElement("span");if(c.className="details-view-value",c.textContent=o,i.appendChild(a),i.appendChild(c),r<e.length-1){var s=document.createElement("hr");s.className="details-view-line",i.append(s)}t.element.appendChild(i)}))}},{key:"getElement",value:function(){return this.element}}])&&zo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Ko(t){return Ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ko(t)}function Jo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Zo(r.key),r)}}function Zo(t){var e=function(t){if("object"!=Ko(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ko(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ko(e)?e:e+""}function Yo(t,e,n){return e=Qo(e),function(t,e){if(e&&("object"==Ko(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,$o()?Reflect.construct(e,n||[],Qo(t).constructor):e.apply(t,n))}function $o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($o=function(){return!!t})()}function Qo(t){return Qo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qo(t)}function Xo(t,e){return Xo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xo(t,e)}const ti=function(t){function e(t,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=Yo(this,e,[i])).title=t,o.subtitle=n,o.placementId=r,o._initialize(),o}return function(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&&Xo(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("button"),this.element.className="content-details-child-view",this.titleElement=document.createElement("div"),this.titleElement.className="content-details-child-view-title",this.titleElement.textContent=this.title+" --\x3e",this.subtitleElement=document.createElement("div"),this.subtitleElement.className="content-details-child-view-subtitle",this.subtitleElement.textContent=this.subtitle,this._render()}},{key:"_render",value:function(){this.element.appendChild(this.titleElement),this.element.appendChild(this.subtitleElement)}},{key:"getElement",value:function(){return this.element}}])&&Jo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function ei(t){return ei="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ei(t)}function ni(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ri(r.key),r)}}function ri(t){var e=function(t){if("object"!=ei(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ei(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ei(e)?e:e+""}function oi(t,e,n){return e=ai(e),function(t,e){if(e&&("object"==ei(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ii()?Reflect.construct(e,n||[],ai(t).constructor):e.apply(t,n))}function ii(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ii=function(){return!!t})()}function ai(t){return ai=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ai(t)}function ci(t,e){return ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ci(t,e)}const si=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=oi(this,e,[o])).title=t,r.children=n,r._initialize(),r}return function(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&&ci(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("div"),this.element.className="content-children-view",this.titleView=document.createElement("div"),this.titleView.className="content-details-section-title",this.titleView.textContent=this.title,this.element.appendChild(this.titleView),this.childrenElements=[],this.childrenListView=document.createElement("div"),this.childrenListView.className="content-details-children-list-view",this.children.forEach((function(e){var n=new ti(e.name,e.contextual_location,e.placement_id);t.childrenListView.appendChild(n.getElement()),t.childrenElements.push(n)})),this.element.appendChild(this.childrenListView),this._setupEventListeners()}},{key:"_setupEventListeners",value:function(){var t=this;this.childrenElements.forEach((function(e){e.getElement().addEventListener("click",(function(n){return t._handleChildSelect(n,e)}))}))}},{key:"_handleChildSelect",value:function(t,e){this.fire("selectChildContentPlacement",{placementId:e.placementId})}},{key:"getElement",value:function(){return this.element}}],r&&ni(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn),ui=t.p+"4b9ae054d996b09c84d311ff59d62135.svg";function li(t){return li="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},li(t)}function fi(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return hi(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hi(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function pi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,di(r.key),r)}}function di(t){var e=function(t){if("object"!=li(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=li(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==li(e)?e:e+""}function yi(t,e,n){return e=vi(e),function(t,e){if(e&&("object"==li(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,mi()?Reflect.construct(e,n||[],vi(t).constructor):e.apply(t,n))}function mi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(mi=function(){return!!t})()}function vi(t){return vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vi(t)}function bi(t,e){return bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bi(t,e)}const gi=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=yi(this,e,[n])).contentPlacement=null,t.element=document.createElement("div"),t.element.className="content-details",t.header=document.createElement("div"),t.header.className="content-details-header",t.contentPlacementHeader=null,t.actionsView=document.createElement("div"),t.actionsView.className="content-details-section",t.actionButtons=document.createElement("div"),t.actionButtons.className="content-details-action-buttons",t.directionsButton=document.createElement("button"),t.directionsButton.className="content-details-directions-button",t.directionsButton.textContent="Directions",t.shareButton=document.createElement("button"),t.shareButton.className="content-details-share-button",t.shareButton.textContent="Share",t.locationButton=null,t.websiteButton=null,t.detailsView=null,t.childrenComponents=[],t}return function(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&&bi(t,e)}(e,t),n=e,(r=[{key:"_setupEventListeners",value:function(){var t=this;this.childrenComponents.forEach((function(e){e.on("selectChildContentPlacement",t._handleSelectChildContentPlacement.bind(t))})),this.directionsButton.addEventListener("click",this._handleDirectionsButtonSelect.bind(this))}},{key:"_render",value:function(){var t=this;this.element.innerHTML="",this.header.innerHTML="",this.actionsView.innerHTML="",this.contentPlacementHeader&&this.header.appendChild(this.contentPlacementHeader.getElement()),this.actionButtons.appendChild(this.directionsButton),this.actionButtons.appendChild(this.shareButton),this.header.appendChild(this.actionButtons),this.locationButton&&this.actionsView.appendChild(this.locationButton.getElement()),this.websiteButton&&this.actionsView.appendChild(this.websiteButton.getElement()),this.header.appendChild(this.actionsView),this.element.appendChild(this.header),this.detailsView&&(this.detailsView.innerHTML="",this.element.appendChild(this.detailsView.getElement())),this.childrenComponents.forEach((function(e){t.element.appendChild(e.getElement())}))}},{key:"_handleDirectionsButtonSelect",value:function(){this.fire("selectDirectionsButton",{placementId:this.contentPlacement.placement_id})}},{key:"_handleBackArrowClick",value:function(){this.fire("selectBackButton")}},{key:"_handleSelectChildContentPlacement",value:function(t){var e=t.placementId;this.fire("selectChildContentPlacement",{placementId:e})}},{key:"findViableAdditionalData",value:function(t){var e=t.content.data,n=Object.keys(e),r=[t.content.title_key,"Feature","Features","Feature ID","feature_id","Website","Website URL","LinkedIn","Files & media"],o={};return n.forEach((function(t){var n=e[t];r.includes(t)||null==n||""===n||(o[t]=n)})),o}},{key:"updateView",value:function(t){this.contentPlacement=t,this.contentPlacementHeader=new Lo(t),this.locationButton=new Io(Eo,t.contextual_location);var e=t.content.data.Website||t.content.data.LinkedIn||t.content.data["Website URL"];this.websiteButton=e?new Io(ui,e):null;var n=this.findViableAdditionalData(t),r=Object.keys(n);this.detailsView=r.length>0?new Wo(n):null,this.childrenComponents=[];for(var o=0,i=Object.entries(t.children);o<i.length;o++){var a=fi(i[o],2),c=a[0],s=a[1],u=new si(c,s);this.childrenComponents.push(u)}this._setupEventListeners(),this._render()}},{key:"getElement",value:function(){return this.element}}])&&pi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function wi(t){return wi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wi(t)}function Si(){Si=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==wi(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,n,r){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(wi(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=B,L.prototype={constructor:L,reset:function(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(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Ei(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Oi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,_i(r.key),r)}}function _i(t){var e=function(t){if("object"!=wi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=wi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==wi(e)?e:e+""}function Pi(t,e,n){return e=ki(e),function(t,e){if(e&&("object"==wi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ji()?Reflect.construct(e,n||[],ki(t).constructor):e.apply(t,n))}function ji(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ji=function(){return!!t})()}function xi(){return xi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ki(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},xi.apply(null,arguments)}function ki(t){return ki=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ki(t)}function Ci(t,e){return Ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ci(t,e)}const Li=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Pi(this,e,[n])).map=null,t.contentPlacementIds=[],t.currentContentPlacement=null,t}return function(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&&Ci(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){return this.map=t,this.container=document.createElement("div"),this.container.className="content-details-control-container",this.initializeEventListeners(),this.hide(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=xi(ki(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.map.on("initiate:back",this._handleMapInitiateBack.bind(this))}},{key:"_handleMapInitiateBack",value:function(){var t=this.map._stateCoordinator.state;if("selectedContent"===t){if(0===this.contentPlacementIds.length)return;if(1===this.contentPlacementIds.length){var e=this.map._stateCoordinator.stateHistory,n=e[e.length-2];e.pop(),e.pop(),"search"===n?this.map.initiateSetToSearchState():this.map.setToDefaultState()}else this.contentPlacementIds.pop(),this.map.setToSelectedContentState(this.contentPlacementIds)}else"directions"===t&&(console.log("THIS IS BACK IN DIRECTIONS STATE:",this.contentPlacementIds.length),this.map.setToSelectedContentState(this.contentPlacementIds))}},{key:"_handleSelectChildContentPlacement",value:function(t){var e=t.placementId;this.contentPlacementIds.push(e),this.map.setToSelectedContentState(this.contentPlacementIds)}},{key:"_handleDefaultState",value:function(){this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews()}},{key:"_handleSearchState",value:function(t){this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews()}},{key:"_handleSelectedContentState",value:function(t){var e=t.contentPlacementIds,n=t.selectedContentPlacement;this.contentPlacementIds=e,this.currentContentPlacement=n,console.log("SELECTED",n),this._updateContentViews(),this.show()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleSelectDirectionsButton",value:(o=Si().mark((function t(e){var n;return Si().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.placementId,t.next=3,this.map.setToDirectionsState(null,n);case 3:case"end":return t.stop()}}),t,this)})),i=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){Ei(i,n,r,a,c,"next",t)}function c(t){Ei(i,n,r,a,c,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})},{key:"_updateContentViews",value:function(){this._clearViews(),this._render()}},{key:"_render",value:function(){if(0!==this.contentPlacementIds.length&&null!==this.currentContentPlacement){var t=new gi;t.updateView(this.currentContentPlacement),t.on("selectChildContentPlacement",this._handleSelectChildContentPlacement.bind(this)),t.on("selectDirectionsButton",this._handleSelectDirectionsButton.bind(this)),this.container.appendChild(t.getElement())}}},{key:"_clearViews",value:function(){for(;this.container.firstChild;)this.container.removeChild(this.container.firstChild)}},{key:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&Oi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i}(In);function Bi(t){return Bi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bi(t)}function Ti(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ri(r.key),r)}}function Ri(t){var e=function(t){if("object"!=Bi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Bi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bi(e)?e:e+""}function Ni(t,e,n){return e=Fi(e),function(t,e){if(e&&("object"==Bi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ai()?Reflect.construct(e,n||[],Fi(t).constructor):e.apply(t,n))}function Ai(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ai=function(){return!!t})()}function Di(){return Di="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Fi(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Di.apply(null,arguments)}function Fi(t){return Fi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fi(t)}function Ii(t,e){return Ii=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ii(t,e)}const Vi=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Ni(this,e,[n])).map=null,t.previouslySelectedFeature=null,t.previouslySelectedIcon=null,t.previouslySelectedTextColor=null,t.previouslySelectedTextOffset=null,t.previouslyHoveredFeature=null,t.originalTextColor=null,t.textColorReference={},t.currentView=null,t.selectedTextColor="#BE2E28",t}return function(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&&Ii(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){return this.map=t,this.container=document.createElement("div"),this.container.className="interaction-control-container",this.initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.createHighlightedContentLayer(),this.createSelectedContentLayer(),this.storeTextColorReferences(),this.applyHoverEffectToAllSymbolLayers(),this.container}},{key:"_initialize",value:function(){var t=this.map.mapContainer.offsetWidth;this._configureView(t)}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=Di(Fi(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"_attachResizeListener",value:function(){var t=this;window.addEventListener("resize",(function(){var e=t.map.mapContainer.offsetWidth;t._configureView(e)}))}},{key:"_configureView",value:function(t){t>767?this._setViewForDesktop():this._setViewForMobile()}},{key:"_setViewForDesktop",value:function(){this.currentView="desktop"}},{key:"_setViewForMobile",value:function(){this.currentView="mobile"}},{key:"initializeEventListeners",value:function(){var t=this;this.map.map.on("styleimagemissing",(function(t){var e=t.id;console.warn('Image "'.concat(e,'" could not be loaded.'))})),this.map.map.on("click",(function(e){t._handleClick(e)})),this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this))}},{key:"storeTextColorReferences",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){if("symbol"===e.type){var n=t.map.map.getPaintProperty(e.id,"text-color");void 0!==n&&(t.textColorReference[e.id]=n)}}))}},{key:"createSelectedContentLayer",value:function(){this.map.map.addSource("selected-content",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.map.addLayer({id:"selected-content-layer",type:"symbol",source:"selected-content",layout:{"text-field":["get","title"],"text-font":["Inter Medium"],"text-size":14,"text-justify":"left","text-anchor":"bottom-left","text-offset":[1.3,-1],"icon-image":"selected-pin","icon-size":.5,"icon-offset":[0,-5],"icon-anchor":"bottom","symbol-z-elevate":!0,"text-padding":10,"icon-padding":5},paint:{"text-color":"#BE2E28","text-halo-color":"#ffffff","text-halo-width":1}})}},{key:"createHighlightedContentLayer",value:function(){this.map.map.addSource("highlighted-content",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.map.addLayer({id:"highlighted-content-layer",type:"symbol",source:"highlighted-content",layout:{"text-field":["get","title"],"text-font":["Inter Medium"],"text-size":14,"text-justify":"left","text-anchor":"bottom-left","text-offset":[1.2,-.6],"icon-image":"highlightedPin","icon-size":.5,"icon-offset":[0,-5],"icon-anchor":"bottom","symbol-z-elevate":!0,"text-padding":5,"icon-padding":5},paint:{"text-color":"#1E1E1E","text-halo-color":"#ffffff","text-halo-width":1}})}},{key:"clearSelectedContentLayer",value:function(){this.map.map.getSource("selected-content").setData({type:"FeatureCollection",features:[]})}},{key:"clearHighlightedContentLayer",value:function(){this.map.map.getSource("highlighted-content").setData({type:"FeatureCollection",features:[]})}},{key:"addSelectedFeature",value:function(t,e){var n=this.map.map.getSource("selected-content"),r=n._data,o={type:"Feature",geometry:{type:"Point",coordinates:t},properties:e};r.features.push(o),n.setData(r)}},{key:"addHighlightedFeature",value:function(t,e){var n=this.map.map.getSource("highlighted-content"),r=n._data,o={type:"Feature",geometry:{type:"Point",coordinates:t},properties:e};r.features.push(o),n.setData(r)}},{key:"_handleDefaultState",value:function(){this.clearHighlightedContentLayer(),this.clearSelectedContentLayer(),this.showSymbolLayers()}},{key:"_handleSearchState",value:function(t){t.query;var e=t.results;this.hideSymbolLayers(),this.clearSelectedContentLayer(),this.updateLabelsForSearchResults(e)}},{key:"_handleSelectedContentState",value:function(t){t.contentPlacementIds;var e=t.selectedContentPlacement;this.updateLabelForSelectedContentPlacement(e)}},{key:"_handleDirectionsState",value:function(t){console.log("handling directions state in interaction control")}},{key:"hideSymbolLayers",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){"symbol"===e.type&&"selected-content-layer"!==e.id&&"highlighted-content-layer"!==e.id&&t.map.map.setLayoutProperty(e.id,"visibility","none")}))}},{key:"showSymbolLayers",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){"symbol"===e.type&&t.map.map.setLayoutProperty(e.id,"visibility","visible")}))}},{key:"updateLabelsForSearchResults",value:function(t){var e=this;this.clearHighlightedContentLayer();var n=[];if(t.forEach((function(t){var r=t.placement_id,o=e.map._findFeatureByPlacementId(r);if(o){var i=o.geometry.coordinates,a=o.properties;e.addHighlightedFeature(i,a),n.push(o)}})),n.length){var r=new mapboxgl.LngLatBounds;if(n.forEach((function(t){r.extend(t.geometry.coordinates)})),"desktop"===this.currentView)this.map.map.fitBounds(r,{padding:{top:200,bottom:200,left:550,right:200},maxZoom:15,duration:1e3});else if("mobile"===this.currentView){var o=.55*this.map.mapContainer.offsetHeight,i=.2*this.map.mapContainer.offsetWidth;this.map.map.fitBounds(r,{padding:{top:200,bottom:o,left:i,right:i},maxZoom:15,duration:1e3})}}}},{key:"updateLabelForSelectedContentPlacement",value:function(t){var e=t.placement_id;this.clearSelectedContentLayer();var n=this.map.map.queryRenderedFeatures({filter:["==",["get","placement_id"],e]});if(0!==n.length){var r=n[0],o=r.geometry.coordinates,i=r.properties;if(this.addSelectedFeature(o,i),"desktop"===this.currentView)this.map.map.easeTo({center:o,padding:{top:0,bottom:0,left:330,right:0},duration:1e3});else if("mobile"===this.currentView){var a=.35*this.map.mapContainer.offsetHeight;this.map.map.easeTo({center:o,padding:{top:0,bottom:a,left:0,right:0},duration:1e3})}}}},{key:"applyHoverEffectToAllSymbolLayers",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){if("symbol"===e.type){var n=e.id,r=t.textColorReference[n];t.map.map.on("mouseenter",n,(function(e){var o=e.features[0],i=o.properties.placement_id;if(t.previouslySelectedFeature&&t.previouslySelectedFeature.layer.id===o.layer.id){t.originalTextColor=t.previouslySelectedTextColor;var a=t.previouslySelectedFeature.properties.placement_id;t.map.map.setPaintProperty(n,"text-color",["case",["==",["get","placement_id"],i],"#4B90F7",["==",["get","placement_id"],a],t.selectedTextColor,r])}else t.originalTextColor=t.map.map.getPaintProperty(n,"text-color"),t.map.map.setPaintProperty(n,"text-color",["case",["==",["get","placement_id"],i],"#4B90F7",r]);t.map.map.getCanvas().style.cursor="pointer"})),t.map.map.on("mouseleave",n,(function(){if(t.previouslySelectedFeature){var e=t.previouslySelectedFeature.properties.placement_id;t.map.map.setPaintProperty(n,"text-color",["case",["==",["get","placement_id"],e],t.selectedTextColor,r])}else t.map.map.setPaintProperty(n,"text-color",r);t.map.map.getCanvas().style.cursor="default"}))}}))}},{key:"_handleClick",value:function(t){var e=this.map.map.queryRenderedFeatures(t.point).filter((function(t){return"symbol"===t.layer.type}));if(e.length>0){var n=e[0].properties.placement_id;this.map.setToSelectedContentState([n])}}}],r&&Ti(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(In);function zi(t){return zi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zi(t)}function Hi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Mi(r.key),r)}}function Mi(t){var e=function(t){if("object"!=zi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=zi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zi(e)?e:e+""}function Ui(t,e,n){return e=Gi(e),function(t,e){if(e&&("object"==zi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,qi()?Reflect.construct(e,n||[],Gi(t).constructor):e.apply(t,n))}function qi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(qi=function(){return!!t})()}function Gi(t){return Gi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gi(t)}function Wi(t,e){return Wi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Wi(t,e)}const Ki=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=Ui(this,e,[r])).steps=t,n._initialize(),n}return function(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&&Wi(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="steps-view",this._render(this.steps)}},{key:"_render",value:function(t){console.log("HERE ARE STEPSSS",t);var e=document.createElement("h2");e.textContent="Steps",this.element.appendChild(e);var n=document.createElement("ul");t.forEach((function(t){var e=document.createElement("li");e.textContent=t,n.appendChild(e)})),this.element.appendChild(n)}},{key:"getElement",value:function(){return this.element}}])&&Hi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Ji(t){return Ji="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ji(t)}function Zi(){Zi=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Ji(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,n,r){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Ji(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=B,L.prototype={constructor:L,reset:function(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(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Yi(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function $i(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Yi(i,r,o,a,c,"next",t)}function c(t){Yi(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Qi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Xi(r.key),r)}}function Xi(t){var e=function(t){if("object"!=Ji(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ji(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ji(e)?e:e+""}function ta(t,e,n){return e=na(e),function(t,e){if(e&&("object"==Ji(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ea()?Reflect.construct(e,n||[],na(t).constructor):e.apply(t,n))}function ea(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ea=function(){return!!t})()}function na(t){return na=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},na(t)}function ra(t,e){return ra=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ra(t,e)}t.p;const oa=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=ta(this,e,[n])).startSearchBox=new Jr,t.endSearchBox=new Jr,t.startContentPlacement=null,t.endContentPlacement=null,t.steps=null,t.searchApi=Ge.getSearchApi(),t._initialize(),t}return function(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&&ra(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="directions-view",this.directionsViewHeader=document.createElement("div"),this.directionsViewHeader.className="directions-view-header",this.searchBoxesContainer=document.createElement("div"),this.searchBoxesContainer.className="directions-search-boxes-container",this.circlesAndSearchWrapper=document.createElement("div"),this.circlesAndSearchWrapper.className="directions-circles-search-wrapper";var t=this._createCirclesContainer();this.circlesAndSearchWrapper.appendChild(t),this.startSearchBox.searchBar.updateLeftButtonIcon("none"),this.startSearchBox.searchBar.updateRightButtonIcon("none"),this.endSearchBox.searchBar.updateLeftButtonIcon("none"),this.endSearchBox.searchBar.updateRightButtonIcon("none"),this.startSearchBox.searchBar.setPlaceholderText("Choose starting point"),this.endSearchBox.searchBar.setPlaceholderText("Choose destination"),this.searchBoxesContainer.appendChild(this.startSearchBox.getElement()),this.searchBoxesContainer.appendChild(this.endSearchBox.getElement()),this.circlesAndSearchWrapper.appendChild(this.searchBoxesContainer),this.directionsViewHeader.appendChild(this.circlesAndSearchWrapper),this._render(),this._setupEventListeners()}},{key:"_createCirclesContainer",value:function(){var t=document.createElement("div");t.className="directions-circles-container";var e=document.createElement("div");e.className="large-circle";var n=document.createElement("div");n.className="end-circle";var r=document.createElement("div");r.className="small-circle";var o=document.createElement("div");o.className="small-circle";var i=document.createElement("div");return i.className="small-circle",t.appendChild(e),t.appendChild(r),t.appendChild(o),t.appendChild(i),t.appendChild(n),t}},{key:"_render",value:function(){if(this.element.appendChild(this.directionsViewHeader),this.steps){var t=new Ki(this.steps);this.element.appendChild(t.getElement())}}},{key:"_setupEventListeners",value:function(){this.startSearchBox.searchBar.on("focus",this._handleStartSearchBarFocus.bind(this)),this.startSearchBox.searchBar.on("blur",this._handleStartSearchBarBlur.bind(this)),this.endSearchBox.searchBar.on("focus",this._handleEndSearchBarFocus.bind(this)),this.endSearchBox.searchBar.on("blur",this._handleEndSearchBarBlur.bind(this)),this.startSearchBox.searchBarSuggestionsView.on("selectCell",this._handleStartContentPlacementSelect.bind(this)),this.endSearchBox.searchBarSuggestionsView.on("selectCell",this._handleEndContentPlacementSelect.bind(this))}},{key:"_handleStartContentPlacementSelect",value:(i=$i(Zi().mark((function t(e){var n,r,o;return Zi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.result,r=n.placement_id,this.startSearchBox.searchBar.setText(n.name),t.next=5,this.searchApi.fetchContentPlacementDetails(r);case 5:o=t.sent,this.updateView(o,this.endContentPlacement);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_handleEndContentPlacementSelect",value:(o=$i(Zi().mark((function t(e){var n,r,o;return Zi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.result,r=n.placement_id,this.endSearchBox.searchBar.setText(n.name),t.next=5,this.searchApi.fetchContentPlacementDetails(r);case 5:o=t.sent,this.updateView(this.startContentPlacement,o);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"_handleStartSearchBarFocus",value:function(){this.startSearchBox.searchBar.updateRightButtonIcon("search")}},{key:"_handleEndSearchBarFocus",value:function(){this.endSearchBox.searchBar.updateRightButtonIcon("search")}},{key:"_handleStartSearchBarBlur",value:function(){this.startSearchBox.searchBar.updateRightButtonIcon("none")}},{key:"_handleEndSearchBarBlur",value:function(){this.endSearchBox.searchBar.updateRightButtonIcon("none")}},{key:"updateView",value:function(t,e){if(this.startContentPlacement=t,this.endContentPlacement=e,t&&e)console.log("BOTH ARE THERE, LETS FIRE PATH"),this.fire("initiate:findPath",{startContentPlacementId:t.placement_id,endContentPlacementId:e.placement_id});else if(t){var n=t.content.data[t.content.title_key];this.startSearchBox.searchBar.setText(n),this.endSearchBox.searchBar.setText(""),this.endSearchBox.searchBar.input.focus(),this.clearSteps()}else if(e){var r=e.content.data[e.content.title_key];this.endSearchBox.searchBar.setText(r),this.startSearchBox.searchBar.setText(""),this.startSearchBox.searchBar.input.focus(),this.clearSteps()}}},{key:"setSteps",value:function(t){this.steps=t,this._render()}},{key:"clearSteps",value:function(){var t=this.element.querySelector(".steps-view");t&&t.remove()}},{key:"getElement",value:function(){return this.element}}],r&&Qi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i}(dn);function ia(t){return ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ia(t)}function aa(t,e,n){return(e=sa(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ca(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,sa(r.key),r)}}function sa(t){var e=function(t){if("object"!=ia(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ia(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ia(e)?e:e+""}function ua(t,e,n){return e=ha(e),function(t,e){if(e&&("object"==ia(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,la()?Reflect.construct(e,n||[],ha(t).constructor):e.apply(t,n))}function la(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(la=function(){return!!t})()}function fa(){return fa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ha(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},fa.apply(null,arguments)}function ha(t){return ha=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ha(t)}function pa(t,e){return pa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pa(t,e)}const da={MapView:ur,SearchBox:Jr,SearchBoxControl:ro,CategoryBarControl:So,SearchResultsControl:Kn,ContentPlacementControl:Li,InteractionControl:Vi,DirectionsControl:function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=ua(this,e,[n])).directionsView=null,t.map=null,t}return function(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&&pa(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){return this.map=t,this.container=document.createElement("div"),this.container.className="directions-control-container",this.directionsView=new oa,this.container.appendChild(this.directionsView.getElement()),this.initializeEventListeners(),this.createDirectionsLineLayer(),this.hide(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=fa(ha(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.directionsView.on("initiate:findPath",this._handleIntiateFindPath.bind(this))}},{key:"createDirectionsLineLayer",value:function(){this.map.map.addSource("directionsLineSource",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"LineString",coordinates:[]}}}),this.map.map.addLayer({id:"directionsLineLayer",type:"line",source:"directionsLineSource",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#1e1e1e","line-width":8}}),this.map.map.moveLayer("directionsLineLayer","special-areas")}},{key:"updateLineData",value:function(t){this.map.map.getSource("directionsLineSource").setData({type:"Feature",properties:{},geometry:{type:"LineString",coordinates:t}});var e=new mapboxgl.LngLatBounds;t.forEach((function(t){e.extend(t)})),this.map.map.fitBounds(e,aa(aa(aa({padding:200},"padding",{top:200,bottom:200,left:500,right:150}),"maxZoom",15),"duration",1e3))}},{key:"clearLineData",value:function(){this.map.map.getSource("directionsLineSource").setData({type:"Feature",properties:{},geometry:{type:"LineString",coordinates:[]}})}},{key:"_handleDefaultState",value:function(){this.hide()}},{key:"_handleSearchState",value:function(t){t.query,t.results,this.hide()}},{key:"_handleSelectedContentState",value:function(t){t.contentPlacementIds,t.selectedContentPlacement,this.hide(),this.directionsView.updateView(null,null),this.clearLineData()}},{key:"_handleDirectionsState",value:function(t){var e=t.startContentPlacement,n=t.endContentPlacement;console.log("handling directions state in directions control",t),this.show(),this.clearLineData(),this.directionsView.updateView(e,n)}},{key:"_handleIntiateFindPath",value:function(t){var e=t.startContentPlacementId,n=t.endContentPlacementId;this.clearLineData();var r=this.map.findPath(e,n);console.log("HERE IS PATH RESPONSEEE",r);var o=r.coordinates,i=r.steps;this.updateLineData(o),this.directionsView.setSteps(i)}},{key:"_handleSelectDirectionsButton",value:function(t){t.placementId}},{key:"_render",value:function(){console.log("render")}},{key:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&ca(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(In),setApiKey:Ge.setApiKey.bind(Ge)};return e.default})()));
|
|
2
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.waygomaps=e():t.waygomaps=e()}(this,(()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})}};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var e;t.g.importScripts&&(e=t.g.location+"");var n=t.g.document;if(!e&&n&&(n.currentScript&&"SCRIPT"===n.currentScript.tagName.toUpperCase()&&(e=n.currentScript.src),!e)){var r=n.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t.p=e})();var e={};t.d(e,{default:()=>ma});var n={};function r(t,e){return function(){return t.apply(e,arguments)}}t.r(n),t.d(n,{hasBrowserEnv:()=>ht,hasStandardBrowserEnv:()=>dt,hasStandardBrowserWebWorkerEnv:()=>yt,navigator:()=>pt,origin:()=>mt});const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,a=(c=Object.create(null),t=>{const e=o.call(t);return c[e]||(c[e]=e.slice(8,-1).toLowerCase())});var c;const s=t=>(t=t.toLowerCase(),e=>a(e)===t),u=t=>e=>typeof e===t,{isArray:l}=Array,f=u("undefined"),h=s("ArrayBuffer"),p=u("string"),d=u("function"),y=u("number"),m=t=>null!==t&&"object"==typeof t,v=t=>{if("object"!==a(t))return!1;const e=i(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},b=s("Date"),g=s("File"),w=s("Blob"),S=s("FileList"),E=s("URLSearchParams"),[O,_,P,j]=["ReadableStream","Request","Response","Headers"].map(s);function x(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),l(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(r=0;r<i;r++)a=o[r],e.call(null,t[a],a,t)}}function k(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,o=n.length;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,L=t=>!f(t)&&t!==C,B=(T="undefined"!=typeof Uint8Array&&i(Uint8Array),t=>T&&t instanceof T);var T;const R=s("HTMLFormElement"),N=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),A=s("RegExp"),D=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};x(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},F="abcdefghijklmnopqrstuvwxyz",I="0123456789",V={DIGIT:I,ALPHA:F,ALPHA_DIGIT:F+F.toUpperCase()+I},z=s("AsyncFunction"),H=(M="function"==typeof setImmediate,U=d(C.postMessage),M?setImmediate:U?(q=`axios@${Math.random()}`,G=[],C.addEventListener("message",(({source:t,data:e})=>{t===C&&e===q&&G.length&&G.shift()()}),!1),t=>{G.push(t),C.postMessage(q,"*")}):t=>setTimeout(t));var M,U,q,G;const W="undefined"!=typeof queueMicrotask?queueMicrotask.bind(C):"undefined"!=typeof process&&process.nextTick||H,K={isArray:l,isArrayBuffer:h,isBuffer:function(t){return null!==t&&!f(t)&&null!==t.constructor&&!f(t.constructor)&&d(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||d(t.append)&&("formdata"===(e=a(t))||"object"===e&&d(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&h(t.buffer),e},isString:p,isNumber:y,isBoolean:t=>!0===t||!1===t,isObject:m,isPlainObject:v,isReadableStream:O,isRequest:_,isResponse:P,isHeaders:j,isUndefined:f,isDate:b,isFile:g,isBlob:w,isRegExp:A,isFunction:d,isStream:t=>m(t)&&d(t.pipe),isURLSearchParams:E,isTypedArray:B,isFileList:S,forEach:x,merge:function t(){const{caseless:e}=L(this)&&this||{},n={},r=(r,o)=>{const i=e&&k(n,o)||o;v(n[i])&&v(r)?n[i]=t(n[i],r):v(r)?n[i]=t({},r):l(r)?n[i]=r.slice():n[i]=r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&x(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:o}={})=>(x(e,((e,o)=>{n&&d(e)?t[o]=r(e,n):t[o]=e}),{allOwnKeys:o}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,a,c;const s={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),a=o.length;a-- >0;)c=o[a],r&&!r(c,t,e)||s[c]||(e[c]=t[c],s[c]=!0);t=!1!==n&&i(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:a,kindOfTest:s,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(l(t))return t;let e=t.length;if(!y(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:R,hasOwnProperty:N,hasOwnProp:N,reduceDescriptors:D,freezeMethods:t=>{D(t,((e,n)=>{if(d(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];d(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return l(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:k,global:C,isContextDefined:L,ALPHABET:V,generateString:(t=16,e=V.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&d(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(m(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=l(t)?[]:{};return x(t,((t,e)=>{const i=n(t,r+1);!f(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:z,isThenable:t=>t&&(m(t)||d(t))&&d(t.then)&&d(t.catch),setImmediate:H,asap:W};function J(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}K.inherits(J,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}});const Z=J.prototype,Y={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{Y[t]={value:t}})),Object.defineProperties(J,Y),Object.defineProperty(Z,"isAxiosError",{value:!0}),J.from=(t,e,n,r,o,i)=>{const a=Object.create(Z);return K.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),J.call(a,t.message,e,n,r,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const $=J;function Q(t){return K.isPlainObject(t)||K.isArray(t)}function X(t){return K.endsWith(t,"[]")?t.slice(0,-2):t}function tt(t,e,n){return t?t.concat(e).map((function(t,e){return t=X(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const et=K.toFlatObject(K,{},null,(function(t){return/^is[A-Z]/.test(t)})),nt=function(t,e,n){if(!K.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!K.isUndefined(e[t])}))).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,c=(n.Blob||"undefined"!=typeof Blob&&Blob)&&K.isSpecCompliantForm(e);if(!K.isFunction(o))throw new TypeError("visitor must be a function");function s(t){if(null===t)return"";if(K.isDate(t))return t.toISOString();if(!c&&K.isBlob(t))throw new $("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(t)||K.isTypedArray(t)?c&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function u(t,n,o){let c=t;if(t&&!o&&"object"==typeof t)if(K.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(K.isArray(t)&&function(t){return K.isArray(t)&&!t.some(Q)}(t)||(K.isFileList(t)||K.endsWith(n,"[]"))&&(c=K.toArray(t)))return n=X(n),c.forEach((function(t,r){!K.isUndefined(t)&&null!==t&&e.append(!0===a?tt([n],r,i):null===a?n:n+"[]",s(t))})),!1;return!!Q(t)||(e.append(tt(o,n,i),s(t)),!1)}const l=[],f=Object.assign(et,{defaultVisitor:u,convertValue:s,isVisitable:Q});if(!K.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!K.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),K.forEach(n,(function(n,i){!0===(!(K.isUndefined(n)||null===n)&&o.call(e,n,K.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e};function rt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function ot(t,e){this._pairs=[],t&&nt(t,this,e)}const it=ot.prototype;it.append=function(t,e){this._pairs.push([t,e])},it.toString=function(t){const e=t?function(e){return t.call(this,e,rt)}:rt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const at=ot;function ct(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function st(t,e,n){if(!e)return t;const r=n&&n.encode||ct,o=n&&n.serialize;let i;if(i=o?o(e,n):K.isURLSearchParams(e)?e.toString():new at(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}const ut=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){K.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},lt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ft={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:at,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ht="undefined"!=typeof window&&"undefined"!=typeof document,pt="object"==typeof navigator&&navigator||void 0,dt=ht&&(!pt||["ReactNative","NativeScript","NS"].indexOf(pt.product)<0),yt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,mt=ht&&window.location.href||"http://localhost",vt={...n,...ft},bt=function(t){function e(t,n,r,o){let i=t[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),c=o>=t.length;return i=!i&&K.isArray(r)?r.length:i,c?(K.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&K.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&K.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}(r[i])),!a)}if(K.isFormData(t)&&K.isFunction(t.entries)){const n={};return K.forEachEntry(t,((t,r)=>{e(function(t){return K.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null},gt={transitional:lt,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=K.isObject(t);if(o&&K.isHTMLForm(t)&&(t=new FormData(t)),K.isFormData(t))return r?JSON.stringify(bt(t)):t;if(K.isArrayBuffer(t)||K.isBuffer(t)||K.isStream(t)||K.isFile(t)||K.isBlob(t)||K.isReadableStream(t))return t;if(K.isArrayBufferView(t))return t.buffer;if(K.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return nt(t,new vt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return vt.isNode&&K.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=K.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return nt(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(K.isString(t))try{return(0,JSON.parse)(t),K.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||gt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(K.isResponse(t)||K.isReadableStream(t))return t;if(t&&K.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw $.from(t,$.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:vt.classes.FormData,Blob:vt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],(t=>{gt.headers[t]={}}));const wt=gt,St=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Et=Symbol("internals");function Ot(t){return t&&String(t).trim().toLowerCase()}function _t(t){return!1===t||null==t?t:K.isArray(t)?t.map(_t):String(t)}function Pt(t,e,n,r,o){return K.isFunction(r)?r.call(this,e,n):(o&&(e=n),K.isString(e)?K.isString(r)?-1!==e.indexOf(r):K.isRegExp(r)?r.test(e):void 0:void 0)}class jt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=Ot(e);if(!o)throw new Error("header name must be a non-empty string");const i=K.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=_t(t))}const i=(t,e)=>K.forEach(t,((t,n)=>o(t,n,e)));if(K.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(K.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&St[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e);else if(K.isHeaders(t))for(const[e,r]of t.entries())o(r,e,n);else null!=t&&o(e,t,n);return this}get(t,e){if(t=Ot(t)){const n=K.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(K.isFunction(e))return e.call(this,t,n);if(K.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ot(t)){const n=K.findKey(this,t);return!(!n||void 0===this[n]||e&&!Pt(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=Ot(t)){const o=K.findKey(n,t);!o||e&&!Pt(0,n[o],o,e)||(delete n[o],r=!0)}}return K.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!Pt(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return K.forEach(this,((r,o)=>{const i=K.findKey(n,o);if(i)return e[i]=_t(r),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete e[o],e[a]=_t(r),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return K.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&K.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[Et]=this[Et]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=Ot(t);e[r]||(function(t,e){const n=K.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return K.isArray(t)?t.forEach(r):r(t),this}}jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(jt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),K.freezeMethods(jt);const xt=jt;function kt(t,e){const n=this||wt,r=e||n,o=xt.from(r.headers);let i=r.data;return K.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Ct(t){return!(!t||!t.__CANCEL__)}function Lt(t,e,n){$.call(this,null==t?"canceled":t,$.ERR_CANCELED,e,n),this.name="CanceledError"}K.inherits(Lt,$,{__CANCEL__:!0});const Bt=Lt;function Tt(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new $("Request failed with status code "+n.status,[$.ERR_BAD_REQUEST,$.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}const Rt=(t,e,n=3)=>{let r=0;const o=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(c){const s=Date.now(),u=r[a];o||(o=s),n[i]=c,r[i]=s;let l=a,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),s-o<e)return;const h=u&&s-u;return h?Math.round(1e3*f/h):void 0}}(50,250);return function(t,e){let n,r,o=0,i=1e3/e;const a=(e,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),t.apply(null,e)};return[(...t)=>{const e=Date.now(),c=e-o;c>=i?a(t,e):(n=t,r||(r=setTimeout((()=>{r=null,a(n)}),i-c)))},()=>n&&a(n)]}((n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,c=i-r,s=o(c);r=i,t({loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:s||void 0,estimated:s&&a&&i<=a?(a-i)/s:void 0,event:n,lengthComputable:null!=a,[e?"download":"upload"]:!0})}),n)},Nt=(t,e)=>{const n=null!=t;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},At=t=>(...e)=>K.asap((()=>t(...e))),Dt=vt.hasStandardBrowserEnv?function(){const t=vt.navigator&&/(msie|trident)/i.test(vt.navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=K.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0},Ft=vt.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const a=[t+"="+encodeURIComponent(e)];K.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),K.isString(r)&&a.push("path="+r),K.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function It(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Vt=t=>t instanceof xt?{...t}:t;function zt(t,e){e=e||{};const n={};function r(t,e,n){return K.isPlainObject(t)&&K.isPlainObject(e)?K.merge.call({caseless:n},t,e):K.isPlainObject(e)?K.merge({},e):K.isArray(e)?e.slice():e}function o(t,e,n){return K.isUndefined(e)?K.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!K.isUndefined(e))return r(void 0,e)}function a(t,e){return K.isUndefined(e)?K.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function c(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const s={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(t,e)=>o(Vt(t),Vt(e),!0)};return K.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=s[r]||o,a=i(t[r],e[r],r);K.isUndefined(a)&&i!==c||(n[r]=a)})),n}const Ht=t=>{const e=zt({},t);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:c,auth:s}=e;if(e.headers=c=xt.from(c),e.url=st(It(e.baseURL,e.url),t.params,t.paramsSerializer),s&&c.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),K.isFormData(r))if(vt.hasStandardBrowserEnv||vt.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if(!1!==(n=c.getContentType())){const[t,...e]=n?n.split(";").map((t=>t.trim())).filter(Boolean):[];c.setContentType([t||"multipart/form-data",...e].join("; "))}if(vt.hasStandardBrowserEnv&&(o&&K.isFunction(o)&&(o=o(e)),o||!1!==o&&Dt(e.url))){const t=i&&a&&Ft.read(a);t&&c.set(i,t)}return e},Mt="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const r=Ht(t);let o=r.data;const i=xt.from(r.headers).normalize();let a,c,s,u,l,{responseType:f,onUploadProgress:h,onDownloadProgress:p}=r;function d(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let y=new XMLHttpRequest;function m(){if(!y)return;const r=xt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());Tt((function(t){e(t),d()}),(function(t){n(t),d()}),{data:f&&"text"!==f&&"json"!==f?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:r,config:t,request:y}),y=null}y.open(r.method.toUpperCase(),r.url,!0),y.timeout=r.timeout,"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(m)},y.onabort=function(){y&&(n(new $("Request aborted",$.ECONNABORTED,t,y)),y=null)},y.onerror=function(){n(new $("Network Error",$.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let e=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||lt;r.timeoutErrorMessage&&(e=r.timeoutErrorMessage),n(new $(e,o.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,t,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&K.forEach(i.toJSON(),(function(t,e){y.setRequestHeader(e,t)})),K.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),f&&"json"!==f&&(y.responseType=r.responseType),p&&([s,l]=Rt(p,!0),y.addEventListener("progress",s)),h&&y.upload&&([c,u]=Rt(h),y.upload.addEventListener("progress",c),y.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(a=e=>{y&&(n(!e||e.type?new Bt(null,t,y):e),y.abort(),y=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const v=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(r.url);v&&-1===vt.protocols.indexOf(v)?n(new $("Unsupported protocol "+v+":",$.ERR_BAD_REQUEST,t)):y.send(o||null)}))},Ut=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,r=new AbortController;const o=function(t){if(!n){n=!0,a();const e=t instanceof Error?t:this.reason;r.abort(e instanceof $?e:new Bt(e instanceof Error?e.message:e))}};let i=e&&setTimeout((()=>{i=null,o(new $(`timeout ${e} of ms exceeded`,$.ETIMEDOUT))}),e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(o):t.removeEventListener("abort",o)})),t=null)};t.forEach((t=>t.addEventListener("abort",o)));const{signal:c}=r;return c.unsubscribe=()=>K.asap(a),c}},qt=function*(t,e){let n=t.byteLength;if(!e||n<e)return void(yield t);let r,o=0;for(;o<n;)r=o+e,yield t.slice(o,r),o=r},Gt=(t,e,n,r)=>{const o=async function*(t,e){for await(const n of async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}}(t))yield*qt(n,e)}(t,e);let i,a=0,c=t=>{i||(i=!0,r&&r(t))};return new ReadableStream({async pull(t){try{const{done:e,value:r}=await o.next();if(e)return c(),void t.close();let i=r.byteLength;if(n){let t=a+=i;n(t)}t.enqueue(new Uint8Array(r))}catch(t){throw c(t),t}},cancel:t=>(c(t),o.return())},{highWaterMark:2})},Wt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Kt=Wt&&"function"==typeof ReadableStream,Jt=Wt&&("function"==typeof TextEncoder?(Zt=new TextEncoder,t=>Zt.encode(t)):async t=>new Uint8Array(await new Response(t).arrayBuffer()));var Zt;const Yt=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},$t=Kt&&Yt((()=>{let t=!1;const e=new Request(vt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),Qt=Kt&&Yt((()=>K.isReadableStream(new Response("").body))),Xt={stream:Qt&&(t=>t.body)};var te;Wt&&(te=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!Xt[t]&&(Xt[t]=K.isFunction(te[t])?e=>e[t]():(e,n)=>{throw new $(`Response type '${t}' is not supported`,$.ERR_NOT_SUPPORT,n)})})));const ee={http:null,xhr:Mt,fetch:Wt&&(async t=>{let{url:e,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:c,onUploadProgress:s,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:h}=Ht(t);u=u?(u+"").toLowerCase():"text";let p,d=Ut([o,i&&i.toAbortSignal()],a);const y=d&&d.unsubscribe&&(()=>{d.unsubscribe()});let m;try{if(s&&$t&&"get"!==n&&"head"!==n&&0!==(m=await(async(t,e)=>{const n=K.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(K.isBlob(t))return t.size;if(K.isSpecCompliantForm(t)){const e=new Request(vt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return K.isArrayBufferView(t)||K.isArrayBuffer(t)?t.byteLength:(K.isURLSearchParams(t)&&(t+=""),K.isString(t)?(await Jt(t)).byteLength:void 0)})(e):n})(l,r))){let t,n=new Request(e,{method:"POST",body:r,duplex:"half"});if(K.isFormData(r)&&(t=n.headers.get("content-type"))&&l.setContentType(t),n.body){const[t,e]=Nt(m,Rt(At(s)));r=Gt(n.body,65536,t,e)}}K.isString(f)||(f=f?"include":"omit");const o="credentials"in Request.prototype;p=new Request(e,{...h,signal:d,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:o?f:void 0});let i=await fetch(p);const a=Qt&&("stream"===u||"response"===u);if(Qt&&(c||a&&y)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=i[e]}));const e=K.toFiniteNumber(i.headers.get("content-length")),[n,r]=c&&Nt(e,Rt(At(c),!0))||[];i=new Response(Gt(i.body,65536,n,(()=>{r&&r(),y&&y()})),t)}u=u||"text";let v=await Xt[K.findKey(Xt,u)||"text"](i,t);return!a&&y&&y(),await new Promise(((e,n)=>{Tt(e,n,{data:v,headers:xt.from(i.headers),status:i.status,statusText:i.statusText,config:t,request:p})}))}catch(e){if(y&&y(),e&&"TypeError"===e.name&&/fetch/i.test(e.message))throw Object.assign(new $("Network Error",$.ERR_NETWORK,t,p),{cause:e.cause||e});throw $.from(e,e&&e.code,t,p)}})};K.forEach(ee,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const ne=t=>`- ${t}`,re=t=>K.isFunction(t)||null===t||!1===t,oe=t=>{t=K.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i<e;i++){let e;if(n=t[i],r=n,!re(n)&&(r=ee[(e=String(n)).toLowerCase()],void 0===r))throw new $(`Unknown adapter '${e}'`);if(r)break;o[e||"#"+i]=r}if(!r){const t=Object.entries(o).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let n=e?t.length>1?"since :\n"+t.map(ne).join("\n"):" "+ne(t[0]):"as no adapter specified";throw new $("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function ie(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Bt(null,t)}function ae(t){return ie(t),t.headers=xt.from(t.headers),t.data=kt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),oe(t.adapter||wt.adapter)(t).then((function(e){return ie(t),e.data=kt.call(t,t.transformResponse,e),e.headers=xt.from(e.headers),e}),(function(e){return Ct(e)||(ie(t),e&&e.response&&(e.response.data=kt.call(t,t.transformResponse,e.response),e.response.headers=xt.from(e.response.headers))),Promise.reject(e)}))}const ce={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{ce[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const se={};ce.transitional=function(t,e,n){function r(t,e){return"[Axios v1.7.7] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new $(r(o," has been removed"+(e?" in "+e:"")),$.ERR_DEPRECATED);return e&&!se[o]&&(se[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}};const ue={assertOptions:function(t,e,n){if("object"!=typeof t)throw new $("options must be an object",$.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],a=e[i];if(a){const e=t[i],n=void 0===e||a(e,i,t);if(!0!==n)throw new $("option "+i+" must be "+n,$.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new $("Unknown option "+i,$.ERR_BAD_OPTION)}},validators:ce},le=ue.validators;class fe{constructor(t){this.defaults=t,this.interceptors={request:new ut,response:new ut}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";try{t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}catch(t){}}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=zt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&ue.assertOptions(n,{silentJSONParsing:le.transitional(le.boolean),forcedJSONParsing:le.transitional(le.boolean),clarifyTimeoutError:le.transitional(le.boolean)},!1),null!=r&&(K.isFunction(r)?e.paramsSerializer={serialize:r}:ue.assertOptions(r,{encode:le.function,serialize:le.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&K.merge(o.common,o[e.method]);o&&K.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=xt.concat(i,o);const a=[];let c=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(c=c&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const s=[];let u;this.interceptors.response.forEach((function(t){s.push(t.fulfilled,t.rejected)}));let l,f=0;if(!c){const t=[ae.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,s),l=t.length,u=Promise.resolve(e);f<l;)u=u.then(t[f++],t[f++]);return u}l=a.length;let h=e;for(f=0;f<l;){const t=a[f++],e=a[f++];try{h=t(h)}catch(t){e.call(this,t);break}}try{u=ae.call(this,h)}catch(t){return Promise.reject(t)}for(f=0,l=s.length;f<l;)u=u.then(s[f++],s[f++]);return u}getUri(t){return st(It((t=zt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}K.forEach(["delete","get","head","options"],(function(t){fe.prototype[t]=function(e,n){return this.request(zt(n||{},{method:t,url:e,data:(n||{}).data}))}})),K.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(zt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}fe.prototype[t]=e(),fe.prototype[t+"Form"]=e(!0)}));const he=fe;class pe{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new Bt(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new pe((function(e){t=e})),cancel:t}}}const de=pe,ye={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ye).forEach((([t,e])=>{ye[e]=t}));const me=ye,ve=function t(e){const n=new he(e),o=r(he.prototype.request,n);return K.extend(o,he.prototype,n,{allOwnKeys:!0}),K.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return t(zt(e,n))},o}(wt);ve.Axios=he,ve.CanceledError=Bt,ve.CancelToken=de,ve.isCancel=Ct,ve.VERSION="1.7.7",ve.toFormData=nt,ve.AxiosError=$,ve.Cancel=ve.CanceledError,ve.all=function(t){return Promise.all(t)},ve.spread=function(t){return function(e){return t.apply(null,e)}},ve.isAxiosError=function(t){return K.isObject(t)&&!0===t.isAxiosError},ve.mergeConfig=zt,ve.AxiosHeaders=xt,ve.formToJSON=t=>bt(K.isHTMLForm(t)?new FormData(t):t),ve.getAdapter=oe,ve.HttpStatusCode=me,ve.default=ve;const be=ve;function ge(t){return ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ge(t)}function we(){we=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==ge(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,n,r){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(ge(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=B,L.prototype={constructor:L,reset:function(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(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Se(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Ee(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Se(i,r,o,a,c,"next",t)}function c(t){Se(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Oe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,_e(r.key),r)}}function _e(t){var e=function(t){if("object"!=ge(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ge(e)?e:e+""}var Pe=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.client=be.create({baseURL:e})},e=[{key:"get",value:function(){var t=Ee(we().mark((function t(e,n){var r;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.client.get(e,{params:n});case 3:return r=t.sent,t.abrupt("return",r.data);case 7:throw t.prev=7,t.t0=t.catch(0),new Error("GET ".concat(e," failed: ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,this,[[0,7]])})));return function(e,n){return t.apply(this,arguments)}}()},{key:"post",value:(o=Ee(we().mark((function t(e,n){var r;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.client.post(e,n);case 3:return r=t.sent,t.abrupt("return",r.data);case 7:throw t.prev=7,t.t0=t.catch(0),new Error("POST ".concat(e," failed: ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return o.apply(this,arguments)})},{key:"put",value:(r=Ee(we().mark((function t(e,n){var r;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.client.put(e,n);case 3:return r=t.sent,t.abrupt("return",r.data);case 7:throw t.prev=7,t.t0=t.catch(0),new Error("PUT ".concat(e," failed: ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return r.apply(this,arguments)})},{key:"delete",value:(n=Ee(we().mark((function t(e,n){var r;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.client.delete(e,{params:n});case 3:return r=t.sent,t.abrupt("return",r.data);case 7:throw t.prev=7,t.t0=t.catch(0),new Error("DELETE ".concat(e," failed: ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return n.apply(this,arguments)})}],e&&Oe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,o}();const je=Pe;function xe(t){return xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xe(t)}function ke(){ke=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==xe(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,n,r){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(xe(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=B,L.prototype={constructor:L,reset:function(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(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Ce(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Le(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Be(r.key),r)}}function Be(t){var e=function(t){if("object"!=xe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xe(e)?e:e+""}var Te=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.apiManager=e},e=[{key:"fetchMapStyle",value:(n=ke().mark((function t(e,n,r){return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.apiManager.get("/map-views/v1/".concat(e,"/").concat(n,"/").concat(r,"/style"));case 3:return t.abrupt("return",t.sent);case 6:return t.prev=6,t.t0=t.catch(0),console.error("Error fetching map data:",t.t0),t.abrupt("return",null);case 10:case"end":return t.stop()}}),t,this,[[0,6]])})),r=function(){var t=this,e=arguments;return new Promise((function(r,o){var i=n.apply(t,e);function a(t){Ce(i,r,o,a,c,"next",t)}function c(t){Ce(i,r,o,a,c,"throw",t)}a(void 0)}))},function(t,e,n){return r.apply(this,arguments)})}],e&&Le(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}();const Re=Te;function Ne(t){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ne(t)}function Ae(){Ae=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Ne(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,n,r){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Ne(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=B,L.prototype={constructor:L,reset:function(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(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function De(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Fe(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){De(i,r,o,a,c,"next",t)}function c(t){De(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Ie(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ve(r.key),r)}}function Ve(t){var e=function(t){if("object"!=Ne(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ne(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ne(e)?e:e+""}var ze=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.apiManager=e},e=[{key:"search",value:(r=Fe(Ae().mark((function t(e,n,r,o){var i;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.apiManager.get("/search/v1/".concat(e,"/").concat(n,"/").concat(r),{q:o});case 3:return i=t.sent,t.abrupt("return",i);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error searching query:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e,n,o){return r.apply(this,arguments)})},{key:"fetchContentPlacementDetails",value:(n=Fe(Ae().mark((function t(e){var n;return Ae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.apiManager.get("/search/v1/details/".concat(e));case 3:return n=t.sent,t.abrupt("return",n);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error fetching content placment details:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return n.apply(this,arguments)})}],e&&Ie(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}();const He=ze;function Me(t){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Me(t)}function Ue(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,qe(r.key),r)}}function qe(t){var e=function(t){if("object"!=Me(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Me(e)?e:e+""}const Ge=new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.apiKey=null,this.apiManager=new je("https://api.waygomaps.com"),this.mapViewApi=new Re(this.apiManager),this.SearchApi=new He(this.apiManager)},(e=[{key:"setApiKey",value:function(t){this.apiKey=t}},{key:"getMapViewApi",value:function(){return this.mapViewApi}},{key:"getSearchApi",value:function(){return this.SearchApi}}])&&Ue(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());function We(t){return new Promise((function(e,n){var r=document.createElement("script");r.type="text/javascript",r.src=t,r.onload=function(){return e()},r.onerror=function(){return n(new Error("Failed to load script: ".concat(t)))},document.head.appendChild(r)}))}function Ke(t){return new Promise((function(e,n){var r=document.createElement("link");r.rel="stylesheet",r.href=t,r.onload=function(){return e()},r.onerror=function(){return n(new Error("Failed to load CSS: ".concat(t)))},document.head.appendChild(r)}))}function Je(t){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Je(t)}function Ze(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ye(r.key),r)}}function Ye(t){var e=function(t){if("object"!=Je(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Je(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Je(e)?e:e+""}const $e=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._listeners={}},e=[{key:"on",value:function(t,e){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e),this}},{key:"off",value:function(t,e){if(!this._listeners[t])return this;var n=this._listeners[t].indexOf(e);return-1!==n&&this._listeners[t].splice(n,1),this}},{key:"fire",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._listeners[t]?(e.type=t,this._listeners[t].forEach((function(t){return t(e)})),this):this}}],e&&Ze(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Qe(t){return Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qe(t)}function Xe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,tn(r.key),r)}}function tn(t){var e=function(t){if("object"!=Qe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Qe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qe(e)?e:e+""}function en(t,e,n){return e=rn(e),function(t,e){if(e&&("object"==Qe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,nn()?Reflect.construct(e,n||[],rn(t).constructor):e.apply(t,n))}function nn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(nn=function(){return!!t})()}function rn(t){return rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rn(t)}function on(t,e){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},on(t,e)}const an=new(function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),en(this,e)}return function(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&&on(t,e)}(e,t),n=e,r=[{key:"emit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.fire(t,e)}}],r&&Xe(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}($e));function cn(t){return cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cn(t)}function sn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,un(r.key),r)}}function un(t){var e=function(t){if("object"!=cn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=cn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==cn(e)?e:e+""}function ln(t,e,n){return e=hn(e),function(t,e){if(e&&("object"==cn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,fn()?Reflect.construct(e,n||[],hn(t).constructor):e.apply(t,n))}function fn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(fn=function(){return!!t})()}function hn(t){return hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hn(t)}function pn(t,e){return pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pn(t,e)}const dn=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=ln(this,e)).options=n,t.globalHandlers={},t.stateSubscriptions=[],t}return function(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&&pn(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){}},{key:"render",value:function(){}},{key:"destroy",value:function(){this.removeAllGlobalHandlers(),this.unsubscribeAllState()}},{key:"addGlobalHandler",value:function(t,e){this.globalHandlers[t]||(this.globalHandlers[t]=[]),this.globalHandlers[t].push(e),an.on(t,e)}},{key:"removeGlobalHandler",value:function(t,e){this.globalHandlers[t]&&(this.globalHandlers[t]=this.globalHandlers[t].filter((function(t){return t!==e})),an.off(t,e))}},{key:"removeAllGlobalHandlers",value:function(){var t=this,e=function(e){t.globalHandlers[e].forEach((function(t){return an.off(e,t)}))};for(var n in this.globalHandlers)e(n);this.globalHandlers={}}},{key:"subscribeToState",value:function(t){this.stateSubscriptions.push(t),StateStore.subscribe(t)}},{key:"unsubscribeFromState",value:function(t){this.stateSubscriptions=this.stateSubscriptions.filter((function(e){return e!==t})),StateStore.unsubscribe(t)}},{key:"unsubscribeAllState",value:function(){this.stateSubscriptions.forEach((function(t){return StateStore.unsubscribe(t)})),this.stateSubscriptions=[]}}])&&sn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}($e);function yn(t){return yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yn(t)}function mn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,vn(r.key),r)}}function vn(t){var e=function(t){if("object"!=yn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=yn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yn(e)?e:e+""}const bn=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.mapView=e,this.state="default",this.stateHistory=["default"]},e=[{key:"transitionTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.state=t;var n=this.stateHistory[this.stateHistory.length-1];"default"==t?this.stateHistory=["default"]:t!==n&&this.stateHistory.push(t),console.log("STATE LENGTH PROPER",this.stateHistory.length,this.stateHistory),this.mapView.fire("state:".concat(t),e)}}],e&&mn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function gn(t){return gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gn(t)}function wn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Sn(r.key),r)}}function Sn(t){var e=function(t){if("object"!=gn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=gn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==gn(e)?e:e+""}function En(t,e,n){return e=_n(e),function(t,e){if(e&&("object"==gn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,On()?Reflect.construct(e,n||[],_n(t).constructor):e.apply(t,n))}function On(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(On=function(){return!!t})()}function _n(t){return _n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_n(t)}function Pn(t,e){return Pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Pn(t,e)}const jn=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=En(this,e,[r])).result=t,n._initialize(),n}return function(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&&Pn(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="search-results-view-cell",this.render(),this._setupEventListeners()}},{key:"_setupEventListeners",value:function(){var t=this;this.element.addEventListener("click",(function(){return t.fire("click",{result:t.result})}))}},{key:"render",value:function(){this.element.innerHTML='\n <div class="result-title">'.concat(this.result.name,'</div>\n <div class="result-subtitle">').concat(this.result.contextual_location,"</div>\n ")}},{key:"getElement",value:function(){return this.element}}])&&wn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function xn(t){return xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xn(t)}function kn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Cn(r.key),r)}}function Cn(t){var e=function(t){if("object"!=xn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xn(e)?e:e+""}function Ln(t,e,n){return e=Tn(e),function(t,e){if(e&&("object"==xn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Bn()?Reflect.construct(e,n||[],Tn(t).constructor):e.apply(t,n))}function Bn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Bn=function(){return!!t})()}function Tn(t){return Tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Tn(t)}function Rn(t,e){return Rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Rn(t,e)}const Nn=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Ln(this,e,[n]))._initialize(),t}return function(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&&Rn(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.results=[],this.element=document.createElement("div"),this.element.className="search-results-view",this.titleElement=document.createElement("h3"),this.titleElement.className="search-results-title",this.element.appendChild(this.titleElement)}},{key:"updateView",value:function(t,e){this.results=t,t.length>1&&this.setTitle("".concat(t.length," results found for '").concat(e,"'")),1===t.length&&this.setTitle("".concat(t.length," result found for '").concat(e,"'")),0===t.length&&this.setTitle("No matching results for '".concat(e,"'")),this.render()}},{key:"updateResults",value:function(t){this.results=t,this.render()}},{key:"render",value:function(){for(var t=this;this.element.children.length>1;)this.element.removeChild(this.element.lastChild);this.results.forEach((function(e){var n=new jn(e);n.on("click",(function(){return t.fire("selectCell",{result:e})})),t.element.appendChild(n.getElement())}))}},{key:"setTitle",value:function(t){this.titleElement.innerText=t}},{key:"show",value:function(){this.element.classList.add("visible")}},{key:"hide",value:function(){this.element.classList.remove("visible")}},{key:"getElement",value:function(){return this.element}}])&&kn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function An(t){return An="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},An(t)}function Dn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Fn(r.key),r)}}function Fn(t){var e=function(t){if("object"!=An(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=An(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==An(e)?e:e+""}const In=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e},(e=[{key:"onAdd",value:function(t){this.map=t}},{key:"onRemove",value:function(){this.container.parentNode.removeChild(this.container),this.map=void 0}}])&&Dn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Vn(t){return Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vn(t)}function zn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Hn(r.key),r)}}function Hn(t){var e=function(t){if("object"!=Vn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Vn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vn(e)?e:e+""}function Mn(t,e,n){return e=Gn(e),function(t,e){if(e&&("object"==Vn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Un()?Reflect.construct(e,n||[],Gn(t).constructor):e.apply(t,n))}function Un(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Un=function(){return!!t})()}function qn(){return qn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Gn(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},qn.apply(null,arguments)}function Gn(t){return Gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gn(t)}function Wn(t,e){return Wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Wn(t,e)}const Kn=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Mn(this,e,[n])).searchResultsView=new Nn,t.searchedQuery=null,t.map=null,t}return function(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&&Wn(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){this.map=t,this.container=document.createElement("div"),this.container.className="search-results-control-container";var e=this.searchResultsView.getElement();return this.container.appendChild(e),this.initializeEventListeners(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=qn(Gn(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("initiate:search",this._handleInitiateSearchState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.searchResultsView.on("closeView",this._handleCloseSearchResultsView.bind(this)),this.searchResultsView.on("selectCell",this._handleSearchResultSelect.bind(this))}},{key:"_handleInitiateSearchState",value:function(){this.map.setToSearchState(this.searchedQuery)}},{key:"_handleSearchResultSelect",value:function(t){var e=t.result.placement_id;this.map.setToSelectedContentState([e])}},{key:"_handleCloseSearchResultsView",value:function(){this.map.setToDefaultState()}},{key:"_handleDefaultState",value:function(){this.searchedQuery=null,this.searchResultsView.updateResults([]),this.hide()}},{key:"_handleSearchState",value:function(t){var e=t.query,n=t.results;this.searchedQuery=e,this.searchResultsView.updateResults([]),this.searchResultsView.updateView(n,e),this.show()}},{key:"_handleSelectedContentState",value:function(t){this.searchResultsView.updateResults([]),this.hide()}},{key:"_handleDirectionsState",value:function(t){console.log("handling directions state in search results control")}},{key:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&zn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(In);function Jn(t){return Jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jn(t)}function Zn(){Zn=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Jn(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,n,r){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Jn(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=B,L.prototype={constructor:L,reset:function(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(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Yn(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function $n(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Yn(i,r,o,a,c,"next",t)}function c(t){Yn(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Qn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Xn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Qn(Object(n),!0).forEach((function(e){tr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function tr(t,e,n){return(e=nr(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function er(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,nr(r.key),r)}}function nr(t){var e=function(t){if("object"!=Jn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Jn(e)?e:e+""}function rr(t,e,n){return e=ir(e),function(t,e){if(e&&("object"==Jn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,or()?Reflect.construct(e,n||[],ir(t).constructor):e.apply(t,n))}function or(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(or=function(){return!!t})()}function ir(t){return ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ir(t)}function ar(t,e){return ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ar(t,e)}var cr={"c66d7e2c3ebd4a8fa60efa5bf3b5b301:2d4911eda2ef4950b307e51cd0ccf35e":{steps:["Leave Roundtable and make a left","Turn right after walking 177 feet","Turn left after walking 203 feet","Turn right after walking 100 feet","Continue straight in 242 feet","Arrive at Stage 4, on your left"],path:[[-81.55730801074388,-195.68687504906683],[-66.79352848318483,-195.68687504906688],[-66.79352848318483,-136.30367294932935],[-6.7541584044446665,-136.30367294932955],[-6.7541584044446195,-106.92078820451393],[81.82851876090972,-106.92078820451393],[81.82851876090972,-47.20950211527508],[140.88363687114594,-47.20950211527508]]}},sr={container:"map",sourceId:"collision-conference.2024.2xw_YUXYS8GoDTB2AQgN3A",center:[0,0],zoom:12,bearing:0,pitch:0,minPitch:0,maxPitch:75,minZoom:0,maxZoom:22,bounds:null,doubleClickZoom:!0,dragPan:!0,dragRotate:!0,scrollZoom:!0,touchPitch:!0,touchZoomRotate:!0,interactive:!0,trackResize:!0,keyboard:!0},ur=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=rr(this,e,[Xn(Xn({},sr),n)])).mapViewApi=Ge.getMapViewApi(),t.searchApi=Ge.getSearchApi(),t.mapContainer=document.createElement("div"),t.mapContainer.className="inner-map-container",t.ready=t._initialize(n),t._stateCoordinator=new bn(t),t}return function(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&&ar(t,e)}(e,t),n=e,r=[{key:"_initialize",value:(f=$n(Zn().mark((function t(){var e,n=this;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("Initializing map view component.."),t.prev=1,t.next=4,this._loadMapLibraries();case 4:return this.render(),t.next=7,this._fetchMapStyle();case 7:e=t.sent,"undefined"!=typeof mapboxgl&&e?(mapboxgl.accessToken="pk.eyJ1Ijoid2F5Z28tbWFwcyIsImEiOiJjbGtxYzZ1N3QxdG43M210bXFuYmJ4a3gxIn0.tlbznj_fRJ8La6s2UUMO6A",this.map=new mapboxgl.Map({container:this.mapContainer,style:"mapbox://styles/waygo-maps/".concat(e),center:this.options.center,zoom:this.options.zoom,bearing:this.options.bearing,pitch:this.options.pitch,minPitch:this.options.minPitch,maxPitch:this.options.maxPitch,minZoom:this.options.minZoom,maxZoom:this.options.maxZoom,bounds:this.options.bounds,doubleClickZoom:this.options.doubleClickZoom,dragPan:this.options.dragPan,dragRotate:this.options.dragRotate,scrollZoom:this.options.scrollZoom,touchPitch:this.options.touchPitch,touchZoomRotate:this.options.touchZoomRotate,interactive:this.options.interactive,trackResize:this.options.trackResize,keyboard:this.options.keyboard}),this.map.on("load",(function(){return n.fire("load")})),this._initializeEventListeners()):console.error("Mapbox GL JS is not loaded."),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),console.error("Failed to initialize the map:",t.t0);case 14:case"end":return t.stop()}}),t,this,[[1,11]])}))),function(){return f.apply(this,arguments)})},{key:"_initializeEventListeners",value:function(){var t=this;this.mapContainer.addEventListener("mousedown",(function(e){return t.fire("mousedown",{originalEvent:e})})),this.mapContainer.addEventListener("click",(function(e){return t.fire("click",{originalEvent:e})})),this.mapContainer.addEventListener("mouseover",(function(e){return t.fire("mouseover",{originalEvent:e})})),this.mapContainer.addEventListener("mousemove",(function(e){return t.fire("mousemove",{originalEvent:e})})),this.mapContainer.addEventListener("dblclick",(function(e){return t.fire("dblclick",{originalEvent:e})})),this.mapContainer.addEventListener("mouseout",(function(e){return t.fire("mouseout",{originalEvent:e})})),this.mapContainer.addEventListener("contextmenu",(function(e){return t.fire("contextmenu",{originalEvent:e})})),this.mapContainer.addEventListener("wheel",(function(e){return t.fire("wheel",{originalEvent:e})})),this.mapContainer.addEventListener("touchstart",(function(e){return t.fire("touchstart",{originalEvent:e})})),this.mapContainer.addEventListener("touchend",(function(e){return t.fire("touchend",{originalEvent:e})})),this.mapContainer.addEventListener("touchmove",(function(e){return t.fire("touchmove",{originalEvent:e})})),this.mapContainer.addEventListener("touchcancel",(function(e){return t.fire("touchcancel",{originalEvent:e})})),this.mapContainer.addEventListener("move",(function(e){return t.fire("move",{originalEvent:e})})),["movestart","move","moveend","dragstart","drag","dragend","zoomstart","zoom","zoomend","rotatestart","rotate","rotateend","pitchstart","pitch","pitchend","boxzoomstart","boxzoomend","boxzoomcancel"].forEach((function(e){t.map.on(e,(function(n){t.fire(e,{originalEvent:n})}))}))}},{key:"_fetchMapStyle",value:(l=$n(Zn().mark((function t(){var e,n,r,o,i;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(3===(e=this.options.sourceId.split(".")).length){t.next=4;break}return console.error('The mapViewId format is incorrect. It should be in the format "businessId.mapId.mapViewId".'),t.abrupt("return");case 4:return n=e[0]||"",r=e[1]||"",o=e[2]||"",t.prev=7,t.next=10,this.mapViewApi.fetchMapStyle(n,r,o);case 10:return i=t.sent,console.log("Fetched map style:",i.style_id),t.abrupt("return",i.style_id);case 15:t.prev=15,t.t0=t.catch(7),console.error("Error fetching map style:",t.t0);case 18:case"end":return t.stop()}}),t,this,[[7,15]])}))),function(){return l.apply(this,arguments)})},{key:"_loadMapLibraries",value:(u=$n(Zn().mark((function t(){return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("Loading map libraries"),t.next=3,Ke("https://api.mapbox.com/mapbox-gl-js/v3.5.1/mapbox-gl.css");case 3:return t.next=5,We("https://api.mapbox.com/mapbox-gl-js/v3.5.1/mapbox-gl.js");case 5:console.log("Map libraries loaded");case 6:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)})},{key:"render",value:function(){var t=document.getElementById(this.options.container);t?(t.appendChild(this.mapContainer),this.mapContainer.style.width="100%",this.mapContainer.style.height="100%",this.mapContainer.style.position="relative"):console.error('Container element with id "'.concat(this.containerId,'" not found.'))}},{key:"addControl",value:function(t){var e=t.onAdd(this);this.mapContainer.appendChild(e)}},{key:"removeControl",value:function(t){this.map.removeControl(t)}},{key:"setToDefaultState",value:function(){this._stateCoordinator.transitionTo("default")}},{key:"setToSearchState",value:(s=$n(Zn().mark((function t(e){var n;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.search(e);case 2:n=t.sent,this._stateCoordinator.transitionTo("search",{query:e,results:n});case 4:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"setToSelectedContentState",value:(c=$n(Zn().mark((function t(e){var n,r;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e[e.length-1],t.next=3,this.getContentPlacementDetails(n);case 3:r=t.sent,this._stateCoordinator.transitionTo("selectedContent",{contentPlacementIds:e,selectedContentPlacement:r});case 5:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"setToDirectionsState",value:(a=$n(Zn().mark((function t(){var e,n,r,o,i=arguments;return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=i.length>1&&void 0!==i[1]?i[1]:null,r=null,!(e=i.length>0&&void 0!==i[0]?i[0]:null)){t.next=7;break}return t.next=6,this.getContentPlacementDetails(e);case 6:r=t.sent;case 7:if(o=null,!n){t.next=12;break}return t.next=11,this.getContentPlacementDetails(n);case 11:o=t.sent;case 12:this._stateCoordinator.transitionTo("directions",{startContentPlacement:r,endContentPlacement:o});case 13:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"initiateBack",value:function(){this.fire("initiate:back")}},{key:"initiateSetToSearchState",value:function(){this.fire("initiate:search")}},{key:"findPath",value:function(t,e){console.log("finding path",t,e);var n=cr["".concat(t,":").concat(e)];console.log("DATA",n);var r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null===e&&(e=[0,0]),console.log("CHECK1",e);var r=[],o=function(t){console.log("CHECK3");var e=t*Math.PI/180,n=6378137,r=6356752.314;console.log("CHECK4",e,n,r);var o=(Math.pow(n,.5)-Math.pow(r,.5))/Math.pow(n,.5);console.log("CHECK5",o);var i=1/(111132.954-559.822*Math.cos(2*e)+1.175*Math.cos(4*e));console.log("CHECK6",i);var a=1/(Math.PI*n*Math.cos(e)/(180*Math.pow(1-Math.pow(o,2)*Math.pow(Math.sin(e),2),.5)));return console.log("CHECK7",a),{meterToLat:i,meterToLon:a}}(e[1]),i=o.meterToLat,a=o.meterToLon;return console.log("CHECK2",i,a),t.forEach((function(t){var o=function(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,i=t[0],a=t[1],c=e[0];return{lat:e[1]+a*o*n,lon:c+i*o*r}}(t,e,i,a,n),c=o.lat,s=o.lon;r.push([s,c])})),r}(n.path,null,10);return console.log("COORDINATES:",r),{coordinates:r,steps:n.steps}}},{key:"_findFeatureByPlacementId",value:function(t){var e=this.map.queryRenderedFeatures({filter:["==",["get","placement_id"],t]});return e.length>0?e[0]:null}},{key:"getCenter",value:function(){if(this.map)return this.map.getCenter();console.error("Map is not initialized.")}},{key:"setCenter",value:function(t){this.map?this.map.setCenter(t):console.error("Map is not initialized.")}},{key:"search",value:(i=$n(Zn().mark((function t(e){return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(""!==e){t.next=2;break}return t.abrupt("return");case 2:return t.prev=2,t.next=5,this.searchApi.search("e9df990cbd084934973a87fc2f3b0e74","move-america-2024","FTdsy9btTs6qumoZ6E8Z2Q",e);case 5:return t.abrupt("return",t.sent);case 8:t.prev=8,t.t0=t.catch(2),axios.isCancel(t.t0)?console.log("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 11:case"end":return t.stop()}}),t,this,[[2,8]])}))),function(t){return i.apply(this,arguments)})},{key:"getContentPlacementDetails",value:(o=$n(Zn().mark((function t(e){return Zn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.searchApi.fetchContentPlacementDetails(e);case 3:return t.abrupt("return",t.sent);case 6:t.prev=6,t.t0=t.catch(0),axios.isCancel(t.t0)?console.log("Request canceled:",t.t0.message):console.error("Fetching content placement details error:",t.t0);case 9:case"end":return t.stop()}}),t,this,[[0,6]])}))),function(t){return o.apply(this,arguments)})}],r&&er(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i,a,c,s,u,l,f}(dn);const lr=t.p+"f8965838ad87362f7fd1507af2a45dfa.svg",fr=t.p+"7d2fb7c25b2d12614aeb1b025a51b86f.svg",hr=t.p+"709b5ad35fbbdaa1c4b5222a276444fa.svg",pr=t.p+"507fada530642f8f1084a961a554e5a5.svg";function dr(t){return dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dr(t)}function yr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,mr(r.key),r)}}function mr(t){var e=function(t){if("object"!=dr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=dr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==dr(e)?e:e+""}function vr(t,e,n){return e=gr(e),function(t,e){if(e&&("object"==dr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,br()?Reflect.construct(e,n||[],gr(t).constructor):e.apply(t,n))}function br(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(br=function(){return!!t})()}function gr(t){return gr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},gr(t)}function wr(t,e){return wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wr(t,e)}const Sr=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=vr(this,e,[n]))._initialize(),t}return function(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&&wr(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="search-bar-container",this.input=document.createElement("input"),this.input.type="text",this.input.placeholder="Search MOVE America 2024",this.input.className="search-bar",this.rightButton=document.createElement("button"),this.rightButton.className="search-bar-button-right",this.updateRightButtonIcon("search"),this.leftButton=document.createElement("button"),this.leftButton.className="search-bar-button-left",this.updateLeftButtonIcon("none"),this.element.appendChild(this.leftButton),this.element.appendChild(this.input),this.element.appendChild(this.rightButton),this._setupEventListeners()}},{key:"_setupEventListeners",value:function(){var t=this;this.input.addEventListener("input",(function(e){return t._handleInput(e)})),this.input.addEventListener("focus",this._handleFocus.bind(this)),this.input.addEventListener("blur",this._handleBlur.bind(this)),this.input.addEventListener("keydown",(function(e){"Enter"===e.key&&t._handleEnterSelect(e)})),this.rightButton.addEventListener("click",(function(e){return t._handleRightButtonSelect(e)})),this.leftButton.addEventListener("click",(function(e){return t._handleLeftButtonSelect(e)}))}},{key:"_handleInput",value:function(t){this.fire("input",{event:t,query:this.getText()})}},{key:"_handleFocus",value:function(){this.fire("focus")}},{key:"_handleBlur",value:function(){var t=this;setTimeout((function(){var e=document.activeElement;e===t.rightButton?(t.updateStyleWithoutSuggestions(),t.fire("blur")):e===t.input||(t.updateStyleWithoutSuggestions(),t.fire("blur"))}),150)}},{key:"_handleEnterSelect",value:function(t){var e=this.getText();e.length>0&&(this.fire("search",{query:e,event:t}),this.input.blur())}},{key:"_handleRightButtonSelect",value:function(t){if("search"===this.rightButtonState){var e=this.getText();e.length>0&&(this.fire("search",{query:e,event:t}),this.input.blur())}else"cancel"===this.rightButtonState&&this.fire("cancel",{event:t})}},{key:"_handleLeftButtonSelect",value:function(t){"logo"===this.leftButtonState?this.input.focus():"back"===this.leftButtonState&&this.fire("back")}},{key:"updateStyleWithSuggestions",value:function(){this.element.classList.add("with-results")}},{key:"updateStyleWithoutSuggestions",value:function(){this.element.classList.remove("with-results")}},{key:"updateRightButtonIcon",value:function(t){this.rightButtonState=t,"search"===t?(this.rightButton.innerHTML='<img src="'.concat(lr,'" alt="Search" />'),this.rightButton.style.display="flex"):"cancel"===t?(this.rightButton.innerHTML='<img src="'.concat(fr,'" alt="Cancel" />'),this.rightButton.style.display="flex"):"none"===t&&(this.rightButton.style.display="none")}},{key:"updateLeftButtonIcon",value:function(t){if(this.leftButtonState=t,"logo"===t){this.leftButton.innerHTML='<img src="'.concat(pr,'" alt="').concat(t,'" />');var e=this.leftButton.querySelector("img");e.style.width="16px",e.style.height="16px",this.leftButton.style.display="flex"}else if("back"===t){this.leftButton.innerHTML='<img src="'.concat(hr,'" alt="').concat(t,'" />');var n=this.leftButton.querySelector("img");n.style.width="20px",n.style.height="20px",this.leftButton.style.display="flex"}else"none"===t&&(this.leftButton.style.display="none")}},{key:"getText",value:function(){return this.input.value}},{key:"setText",value:function(t){this.input.value=t}},{key:"setPlaceholderText",value:function(t){this.input.placeholder=t}},{key:"getElement",value:function(){return this.element}}],r&&yr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Er(t){return Er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Er(t)}function Or(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,_r(r.key),r)}}function _r(t){var e=function(t){if("object"!=Er(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Er(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Er(e)?e:e+""}function Pr(t,e,n){return e=xr(e),function(t,e){if(e&&("object"==Er(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,jr()?Reflect.construct(e,n||[],xr(t).constructor):e.apply(t,n))}function jr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(jr=function(){return!!t})()}function xr(t){return xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xr(t)}function kr(t,e){return kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},kr(t,e)}const Cr=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=Pr(this,e,[r])).result=t,n._initialize(),n}return function(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&&kr(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="search-bar-suggestions-view-cell",this.render(),this._setupEventListeners()}},{key:"_setupEventListeners",value:function(){var t=this;this.element.addEventListener("click",(function(){return t.fire("click",{result:t.result})}))}},{key:"render",value:function(){this.element.innerHTML='\n <div class="suggestion-title">'.concat(this.result.name,'</div>\n <div class="suggestion-subtitle">').concat(this.result.contextual_location,"</div>\n ")}},{key:"getElement",value:function(){return this.element}}])&&Or(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Lr(t){return Lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lr(t)}function Br(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Tr(r.key),r)}}function Tr(t){var e=function(t){if("object"!=Lr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Lr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Lr(e)?e:e+""}function Rr(t,e,n){return e=Ar(e),function(t,e){if(e&&("object"==Lr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Nr()?Reflect.construct(e,n||[],Ar(t).constructor):e.apply(t,n))}function Nr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Nr=function(){return!!t})()}function Ar(t){return Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ar(t)}function Dr(t,e){return Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Dr(t,e)}const Fr=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Rr(this,e,[n]))._initialize(),t}return function(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&&Dr(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.results=[],this.element=document.createElement("div"),this.element.className="search-bar-suggestions-view"}},{key:"updateResults",value:function(t){this.results=t,this.render()}},{key:"render",value:function(){var t=this;this.element.innerHTML="",this.results.forEach((function(e){var n=new Cr(e);n.on("click",(function(){return t.fire("selectCell",{result:e})})),t.element.appendChild(n.getElement())}))}},{key:"clearResults",value:function(){this.updateResults([])}},{key:"show",value:function(){this.element.classList.add("visible")}},{key:"hide",value:function(){this.element.classList.remove("visible")}},{key:"getElement",value:function(){return this.element}}])&&Br(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Ir(t){return Ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ir(t)}function Vr(){Vr=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Ir(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,n,r){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Ir(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=B,L.prototype={constructor:L,reset:function(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(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function zr(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Hr(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){zr(i,r,o,a,c,"next",t)}function c(t){zr(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Mr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ur(r.key),r)}}function Ur(t){var e=function(t){if("object"!=Ir(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ir(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ir(e)?e:e+""}function qr(t,e,n){return e=Wr(e),function(t,e){if(e&&("object"==Ir(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Gr()?Reflect.construct(e,n||[],Wr(t).constructor):e.apply(t,n))}function Gr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Gr=function(){return!!t})()}function Wr(t){return Wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wr(t)}function Kr(t,e){return Kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Kr(t,e)}const Jr=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=qr(this,e,[n])).searchApi=Ge.getSearchApi(),t.element=document.createElement("div"),t.element.className="search-box",t.searchBar=new Sr,t.searchBarSuggestionsView=new Fr,t.searchCount=0,t.initializeHandlers(),t._render(),t}return function(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&&Kr(t,e)}(e,t),n=e,r=[{key:"initializeHandlers",value:function(){this.searchBar.on("input",this._handleSearchBarInput.bind(this)),this.searchBar.on("focus",this._handleSearchBarFocus.bind(this)),this.searchBar.on("blur",this._handleSearchBarBlur.bind(this)),this.searchBar.on("search",this._handleSearchBarSearch.bind(this)),this.searchBar.on("back",this._handleSearchBarBack.bind(this)),this.searchBarSuggestionsView.on("selectCell",this._handleSearchResultSelect.bind(this))}},{key:"_handleSearchBarBack",value:function(){this.fire("selectBack")}},{key:"_handleSearchBarSearch",value:function(t){var e=t.query;t.event,this.fire("search",{query:e})}},{key:"_handleSearchResultSelect",value:function(t){t.result}},{key:"_handleSearchBarFocus",value:(a=Hr(Vr().mark((function t(){var e;return Vr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((e=this.searchBar.getText()).length>0)){t.next=5;break}return t.next=4,this.getSearchBarSuggestions(e);case 4:this.openSuggestionsView();case 5:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"_handleSearchBarBlur",value:function(){this.searchBarSuggestionsView.hide()}},{key:"_handleSearchBarInput",value:(i=Hr(Vr().mark((function t(e){var n;return Vr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.query,this.openSuggestionsView(),t.next=4,this.getSearchBarSuggestions(n);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_render",value:function(){this.element.appendChild(this.searchBar.getElement()),this.element.appendChild(this.searchBarSuggestionsView.getElement())}},{key:"getElement",value:function(){return this.element}},{key:"openSuggestionsView",value:function(){this.searchBarSuggestionsView.show(),this.searchBar.updateStyleWithSuggestions()}},{key:"closeSuggestionsView",value:function(){this.searchBarSuggestionsView.hide(),this.searchBar.updateStyleWithoutSuggestions()}},{key:"getSearchBarSuggestions",value:(o=Hr(Vr().mark((function t(e){var n,r;return Vr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=++this.searchCount,""!==e){t.next=5;break}return this.searchBarSuggestionsView.updateResults([]),this.closeSuggestionsView(),t.abrupt("return");case 5:return t.prev=5,t.next=8,this.searchApi.search("e9df990cbd084934973a87fc2f3b0e74","move-america-2024","FTdsy9btTs6qumoZ6E8Z2Q",e);case 8:r=t.sent,n===this.searchCount&&this.searchBarSuggestionsView.updateResults(r),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(5),be.isCancel(t.t0)?console.log("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 15:case"end":return t.stop()}}),t,this,[[5,12]])}))),function(t){return o.apply(this,arguments)})}],r&&Mr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i,a}(dn);function Zr(t){return Zr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zr(t)}function Yr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,$r(r.key),r)}}function $r(t){var e=function(t){if("object"!=Zr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Zr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Zr(e)?e:e+""}function Qr(t,e,n){return e=eo(e),function(t,e){if(e&&("object"==Zr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Xr()?Reflect.construct(e,n||[],eo(t).constructor):e.apply(t,n))}function Xr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xr=function(){return!!t})()}function to(){return to="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=eo(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},to.apply(null,arguments)}function eo(t){return eo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},eo(t)}function no(t,e){return no=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},no(t,e)}const ro=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Qr(this,e,[n])).searchBox=new Jr,t.map=null,t}return function(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&&no(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){this.map=t,this.container=document.createElement("div"),this.container.className="search-box-control-container";var e=this.searchBox.getElement();return this.container.appendChild(e),this.show(),this.initializeEventListeners(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=to(eo(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.searchBox.searchBarSuggestionsView.on("selectCell",this._handleSuggestionSelect.bind(this)),this.searchBox.searchBar.on("cancel",this._handleSearchBarCancel.bind(this)),this.searchBox.on("search",this._handleSearchBoxSearch.bind(this)),this.searchBox.on("selectBack",this._handleSearchBoxSelectBack.bind(this)),this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this))}},{key:"_handleSearchBoxSelectBack",value:function(){this.map.initiateBack()}},{key:"_handleSearchBarCancel",value:function(t){this.map.setToDefaultState()}},{key:"_handleSearchBoxSearch",value:function(t){var e=t.query;this.map.setToSearchState(e)}},{key:"_handleSuggestionSelect",value:function(t){var e=t.result;this.map.setToSelectedContentState([e.placement_id])}},{key:"_handleDefaultState",value:function(){this.searchBox.searchBarSuggestionsView.clearResults(),this.searchBox.closeSuggestionsView(),this.searchBox.searchBar.setText(""),this.searchBox.searchBar.input.focus(),this.searchBox.searchBar.updateRightButtonIcon("search"),this.searchBox.searchBar.updateLeftButtonIcon("none"),this.show()}},{key:"_handleSearchState",value:function(t){var e=t.query,n=t.results;console.log("SEARC",e,n),this.searchBox.searchBar.setText(e),this.searchBox.searchBar.updateRightButtonIcon("cancel"),this.searchBox.searchBar.updateLeftButtonIcon("none"),this.show()}},{key:"_handleSelectedContentState",value:function(t){var e=t.contentPlacementIds,n=t.selectedContentPlacement;this.show();var r=n.content.title_key,o=n.content.data[r];this.searchBox.searchBar.setText(o),this.searchBox.searchBar.updateRightButtonIcon("cancel"),this.map._stateCoordinator.stateHistory.length>2||e.length>1?this.searchBox.searchBar.updateLeftButtonIcon("back"):this.searchBox.searchBar.updateLeftButtonIcon("none")}},{key:"_handleDirectionsState",value:function(t){console.log("handling directions state in search box control"),this.map._stateCoordinator.stateHistory.length>2?this.searchBox.searchBar.updateLeftButtonIcon("back"):this.searchBox.searchBar.updateLeftButtonIcon("none")}},{key:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&Yr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(In),oo=t.p+"63aa91aee195b612708db336ad5020db.svg",io=t.p+"84f745ccc69c8befebe5f8e8713c14cf.svg";function ao(t){return ao="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ao(t)}function co(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,so(r.key),r)}}function so(t){var e=function(t){if("object"!=ao(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ao(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ao(e)?e:e+""}function uo(t,e,n){return e=fo(e),function(t,e){if(e&&("object"==ao(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,lo()?Reflect.construct(e,n||[],fo(t).constructor):e.apply(t,n))}function lo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(lo=function(){return!!t})()}function fo(t){return fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fo(t)}function ho(t,e){return ho=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ho(t,e)}const po=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=uo(this,e,[r])).items=n,t.containerClass=r.container,t.element=document.createElement("div"),t.element.className="slider-bar-container ".concat(t.containerClass),t.sliderBar=document.createElement("div"),t.sliderBar.className="slider-bar ".concat(t.containerClass,"-bar"),t.leftButton=document.createElement("button"),t.leftButton.className="scroll-button left ".concat(t.containerClass,"-scroll-button"),t.leftButton.style.backgroundImage="url(".concat(oo,")"),t.leftButton.addEventListener("click",(function(){return t._scrollSliderBar("left")})),t.rightButton=document.createElement("button"),t.rightButton.className="scroll-button right ".concat(t.containerClass,"-scroll-button"),t.rightButton.style.backgroundImage="url(".concat(io,")"),t.rightButton.addEventListener("click",(function(){return t._scrollSliderBar("right")})),t.buttonElements=[],t._render(),t.sliderBar.addEventListener("scroll",(function(){return t._updateScrollButtons()})),setTimeout((function(){return t._updateScrollButtons()}),.8),t}return function(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&&ho(t,e)}(e,t),n=e,r=[{key:"_render",value:function(){var t=this;this.items.forEach((function(e){var n=e.title,r=e.imageUrl,o=document.createElement("button");if(o.addEventListener("click",t._handleSliderButtonSelect.bind(t)),o.className="slider-bar-button ".concat(t.containerClass,"-button"),r){var i=document.createElement("img");i.src=r,i.alt=n,i.className="slider-bar-button-image ".concat(t.containerClass,"-button-image"),o.appendChild(i)}else console.log("No image found for slider bar button.");var a=document.createElement("span");a.textContent=n,o.appendChild(a),t.buttonElements.push(o),t.sliderBar.appendChild(o)})),this.element.appendChild(this.leftButton),this.element.appendChild(this.sliderBar),this.element.appendChild(this.rightButton)}},{key:"_handleSliderButtonSelect",value:function(t){var e=t.currentTarget,n=e.querySelector("span").textContent;if(e.classList.contains("selected"))e.classList.remove("selected"),this.fire("deselect");else{var r=document.querySelector(".slider-bar-button.selected");r&&r.classList.remove("selected"),e.classList.add("selected"),this.fire("selectNew",{query:n})}}},{key:"_scrollSliderBar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:275,n=this.sliderBar.scrollWidth-this.sliderBar.clientWidth,r=this.sliderBar.scrollLeft,o=e;if("right"===t){var i=n-r;i<e&&(o=i)}"left"===t?this.sliderBar.scrollBy({left:-e,behavior:"smooth"}):"right"===t&&this.sliderBar.scrollBy({left:o,behavior:"smooth"})}},{key:"_updateScrollButtons",value:function(){var t=this.sliderBar.scrollLeft,e=this.sliderBar.scrollWidth-this.sliderBar.clientWidth;this.leftButton.style.display=t<=0?"none":"block";var n=Math.abs(e-t);this.rightButton.style.display=n<=1?"none":"block"}},{key:"deselectAll",value:function(){this.sliderBar.querySelectorAll(".slider-bar-button.selected").forEach((function(t){return t.classList.remove("selected")}))}},{key:"deselectAllNotMatchingQuery",value:function(t){this.sliderBar.querySelectorAll(".slider-bar-button.selected").forEach((function(e){e.textContent!==t&&e.classList.remove("selected")}))}},{key:"invertButtonAtIndex",value:function(t){var e=this.buttonElements[t];e?e.classList.toggle("inverted"):console.error("Button at index ".concat(t," does not exist."))}},{key:"getElement",value:function(){return this.element}},{key:"show",value:function(){this.element.classList.add("visible")}},{key:"hide",value:function(){this.element.classList.remove("visible")}}],r&&co(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function yo(t){return yo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yo(t)}function mo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,vo(r.key),r)}}function vo(t){var e=function(t){if("object"!=yo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=yo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yo(e)?e:e+""}function bo(t,e,n){return e=So(e),function(t,e){if(e&&("object"==yo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,go()?Reflect.construct(e,n||[],So(t).constructor):e.apply(t,n))}function go(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(go=function(){return!!t})()}function wo(){return wo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=So(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},wo.apply(null,arguments)}function So(t){return So=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},So(t)}function Eo(t,e){return Eo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Eo(t,e)}const Oo=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=bo(this,e,[n])).categoryBar=new po([{title:"Energy & charging"},{title:"Mobility"},{title:"Automotive"},{title:"Indoor mapping"},{title:"Supply chain"},{title:"Tech data"},{title:"Insurance"},{title:"Rideshare"},{title:"Manufacturing"},{title:"Autonomous vehicles"},{title:"Human resources"},{title:"Battery tech"},{title:"Renewable energy"}],{container:"category-bar"}),t.map=null,t}return function(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&&Eo(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){this.map=t,this.container=document.createElement("div"),this.container.className="category-bar-control-container";var e=this.categoryBar.getElement();return this.container.appendChild(e),this.initializeEventListeners(),this.show(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=wo(So(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.categoryBar.on("selectNew",this._handleNewCategoryButtonSelect.bind(this)),this.categoryBar.on("deselect",this._handleCategoryButtonDeselect.bind(this)),this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this))}},{key:"_handleDefaultState",value:function(){this.show(),this.categoryBar.deselectAll()}},{key:"_handleSelectedContentState",value:function(t){this.hide()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleNewCategoryButtonSelect",value:function(t){var e=t.query;this.map.setToSearchState(e)}},{key:"_handleCategoryButtonDeselect",value:function(){this.map.setToDefaultState()}},{key:"_handleSearchState",value:function(t){var e=t.query;t.results,this.show(),this.categoryBar.deselectAllNotMatchingQuery(e)}},{key:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&mo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(In),_o=(t.p,t.p+"1b7f16a1f8c7a51acb29667188b93cd4.svg");function Po(t){return Po="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Po(t)}function jo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,xo(r.key),r)}}function xo(t){var e=function(t){if("object"!=Po(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Po(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Po(e)?e:e+""}function ko(t,e,n){return e=Lo(e),function(t,e){if(e&&("object"==Po(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Co()?Reflect.construct(e,n||[],Lo(t).constructor):e.apply(t,n))}function Co(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Co=function(){return!!t})()}function Lo(t){return Lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Lo(t)}function Bo(t,e){return Bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bo(t,e)}const To=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=ko(this,e,[r])).contentPlacement=t,n._initialize(),n}return function(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&&Bo(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){var t=this.contentPlacement.content;this.element=document.createElement("div"),this.element.className="content-placement-header",this.textContainer=document.createElement("div"),this.textContainer.className="header-text-container",this.nameElement=document.createElement("div"),this.nameElement.className="header-content-name",this.nameElement.textContent=t.data[t.title_key],this.catalogNameElement=document.createElement("div"),this.catalogNameElement.className="header-catalog-name",this.catalogNameElement.textContent=this.contentPlacement.catalog.title,this.textContainer.appendChild(this.nameElement),this.textContainer.appendChild(this.catalogNameElement),this.imageViewElement=document.createElement("div"),this.imageViewElement.className="header-image-view",this.element.appendChild(this.imageViewElement),this.element.appendChild(this.textContainer)}},{key:"getElement",value:function(){return this.element}}])&&jo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Ro(t){return Ro="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ro(t)}function No(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ao(r.key),r)}}function Ao(t){var e=function(t){if("object"!=Ro(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ro(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ro(e)?e:e+""}function Do(t,e,n){return e=Io(e),function(t,e){if(e&&("object"==Ro(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Fo()?Reflect.construct(e,n||[],Io(t).constructor):e.apply(t,n))}function Fo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Fo=function(){return!!t})()}function Io(t){return Io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Io(t)}function Vo(t,e){return Vo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vo(t,e)}const zo=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=Do(this,e,[o])).icon=t,r.text=n,r._initialize(),r}return function(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&&Vo(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="contextual-location-view",this.imageViewElement=document.createElement("img"),this.imageViewElement.className="contextual-location-image",this.imageViewElement.src=this.icon,this.textElement=document.createElement("span"),this.textElement.textContent=this.text,this.textElement.className="contextual-location-text",this.element.appendChild(this.imageViewElement),this.element.appendChild(this.textElement)}},{key:"getElement",value:function(){return this.element}}])&&No(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Ho(t){return Ho="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ho(t)}function Mo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Uo(r.key),r)}}function Uo(t){var e=function(t){if("object"!=Ho(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ho(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ho(e)?e:e+""}function qo(t,e,n){return e=Wo(e),function(t,e){if(e&&("object"==Ho(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Go()?Reflect.construct(e,n||[],Wo(t).constructor):e.apply(t,n))}function Go(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Go=function(){return!!t})()}function Wo(t){return Wo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wo(t)}function Ko(t,e){return Ko=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ko(t,e)}const Jo=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=qo(this,e,[r])).data=t,n._initialize(),n}return function(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&&Ko(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("div"),this.element.className="content-placement-details-view",this.titleView=document.createElement("div"),this.titleView.className="content-details-section-title",this.titleView.textContent="Additional details",this.element.appendChild(this.titleView);var e=Object.keys(this.data);e.forEach((function(n,r){var o=t.data[n],i=document.createElement("div");i.className="details-view-item";var a=document.createElement("div");a.className="details-view-key",a.textContent=n;var c=document.createElement("span");if(c.className="details-view-value",c.textContent=o,i.appendChild(a),i.appendChild(c),r<e.length-1){var s=document.createElement("hr");s.className="details-view-line",i.append(s)}t.element.appendChild(i)}))}},{key:"getElement",value:function(){return this.element}}])&&Mo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Zo(t){return Zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zo(t)}function Yo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,$o(r.key),r)}}function $o(t){var e=function(t){if("object"!=Zo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Zo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Zo(e)?e:e+""}function Qo(t,e,n){return e=ti(e),function(t,e){if(e&&("object"==Zo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Xo()?Reflect.construct(e,n||[],ti(t).constructor):e.apply(t,n))}function Xo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xo=function(){return!!t})()}function ti(t){return ti=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ti(t)}function ei(t,e){return ei=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ei(t,e)}const ni=function(t){function e(t,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=Qo(this,e,[i])).title=t,o.subtitle=n,o.placementId=r,o._initialize(),o}return function(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&&ei(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("button"),this.element.className="content-details-child-view",this.titleElement=document.createElement("div"),this.titleElement.className="content-details-child-view-title",this.titleElement.textContent=this.title+" --\x3e",this.subtitleElement=document.createElement("div"),this.subtitleElement.className="content-details-child-view-subtitle",this.subtitleElement.textContent=this.subtitle,this._render()}},{key:"_render",value:function(){this.element.appendChild(this.titleElement),this.element.appendChild(this.subtitleElement)}},{key:"getElement",value:function(){return this.element}}])&&Yo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function ri(t){return ri="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ri(t)}function oi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ii(r.key),r)}}function ii(t){var e=function(t){if("object"!=ri(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ri(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ri(e)?e:e+""}function ai(t,e,n){return e=si(e),function(t,e){if(e&&("object"==ri(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ci()?Reflect.construct(e,n||[],si(t).constructor):e.apply(t,n))}function ci(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ci=function(){return!!t})()}function si(t){return si=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},si(t)}function ui(t,e){return ui=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ui(t,e)}const li=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=ai(this,e,[o])).title=t,r.children=n,r._initialize(),r}return function(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&&ui(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("div"),this.element.className="content-children-view",this.titleView=document.createElement("div"),this.titleView.className="content-details-section-title",this.titleView.textContent=this.title,this.element.appendChild(this.titleView),this.childrenElements=[],this.childrenListView=document.createElement("div"),this.childrenListView.className="content-details-children-list-view",this.children.forEach((function(e){var n=new ni(e.name,e.contextual_location,e.placement_id);t.childrenListView.appendChild(n.getElement()),t.childrenElements.push(n)})),this.element.appendChild(this.childrenListView),this._setupEventListeners()}},{key:"_setupEventListeners",value:function(){var t=this;this.childrenElements.forEach((function(e){e.getElement().addEventListener("click",(function(n){return t._handleChildSelect(n,e)}))}))}},{key:"_handleChildSelect",value:function(t,e){this.fire("selectChildContentPlacement",{placementId:e.placementId})}},{key:"getElement",value:function(){return this.element}}],r&&oi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn),fi=t.p+"4b9ae054d996b09c84d311ff59d62135.svg";function hi(t){return hi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hi(t)}function pi(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return di(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?di(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function di(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function yi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,mi(r.key),r)}}function mi(t){var e=function(t){if("object"!=hi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=hi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==hi(e)?e:e+""}function vi(t,e,n){return e=gi(e),function(t,e){if(e&&("object"==hi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,bi()?Reflect.construct(e,n||[],gi(t).constructor):e.apply(t,n))}function bi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(bi=function(){return!!t})()}function gi(t){return gi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},gi(t)}function wi(t,e){return wi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wi(t,e)}const Si=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=vi(this,e,[n])).contentPlacement=null,t.element=document.createElement("div"),t.element.className="content-details",t.header=document.createElement("div"),t.header.className="content-details-header",t.contentPlacementHeader=null,t.actionsView=document.createElement("div"),t.actionsView.className="content-details-section",t.actionButtons=document.createElement("div"),t.actionButtons.className="content-details-action-buttons",t.directionsButton=document.createElement("button"),t.directionsButton.className="content-details-directions-button",t.directionsButton.textContent="Directions",t.shareButton=document.createElement("button"),t.shareButton.className="content-details-share-button",t.shareButton.textContent="Share",t.locationButton=null,t.websiteButton=null,t.detailsView=null,t.childrenComponents=[],t}return function(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&&wi(t,e)}(e,t),n=e,(r=[{key:"_setupEventListeners",value:function(){var t=this;this.childrenComponents.forEach((function(e){e.on("selectChildContentPlacement",t._handleSelectChildContentPlacement.bind(t))})),this.directionsButton.addEventListener("click",this._handleDirectionsButtonSelect.bind(this))}},{key:"_render",value:function(){var t=this;this.element.innerHTML="",this.header.innerHTML="",this.actionsView.innerHTML="",this.contentPlacementHeader&&this.header.appendChild(this.contentPlacementHeader.getElement()),this.actionButtons.appendChild(this.directionsButton),this.actionButtons.appendChild(this.shareButton),this.header.appendChild(this.actionButtons),this.locationButton&&this.actionsView.appendChild(this.locationButton.getElement()),this.websiteButton&&this.actionsView.appendChild(this.websiteButton.getElement()),this.header.appendChild(this.actionsView),this.element.appendChild(this.header),this.detailsView&&(this.detailsView.innerHTML="",this.element.appendChild(this.detailsView.getElement())),this.childrenComponents.forEach((function(e){t.element.appendChild(e.getElement())}))}},{key:"_handleDirectionsButtonSelect",value:function(){this.fire("selectDirectionsButton",{placementId:this.contentPlacement.placement_id})}},{key:"_handleBackArrowClick",value:function(){this.fire("selectBackButton")}},{key:"_handleSelectChildContentPlacement",value:function(t){var e=t.placementId;this.fire("selectChildContentPlacement",{placementId:e})}},{key:"findViableAdditionalData",value:function(t){var e=t.content.data,n=Object.keys(e),r=[t.content.title_key,"Feature","Features","Feature ID","feature_id","Website","Website URL","LinkedIn","Files & media"],o={};return n.forEach((function(t){var n=e[t];r.includes(t)||null==n||""===n||(o[t]=n)})),o}},{key:"updateView",value:function(t){this.contentPlacement=t,this.contentPlacementHeader=new To(t),this.locationButton=new zo(_o,t.contextual_location);var e=t.content.data.Website||t.content.data.LinkedIn||t.content.data["Website URL"];this.websiteButton=e?new zo(fi,e):null;var n=this.findViableAdditionalData(t),r=Object.keys(n);this.detailsView=r.length>0?new Jo(n):null,this.childrenComponents=[];for(var o=0,i=Object.entries(t.children);o<i.length;o++){var a=pi(i[o],2),c=a[0],s=a[1],u=new li(c,s);this.childrenComponents.push(u)}this._setupEventListeners(),this._render()}},{key:"getElement",value:function(){return this.element}}])&&yi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Ei(t){return Ei="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ei(t)}function Oi(){Oi=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Ei(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,n,r){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Ei(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=B,L.prototype={constructor:L,reset:function(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(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function _i(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Pi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ji(r.key),r)}}function ji(t){var e=function(t){if("object"!=Ei(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ei(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ei(e)?e:e+""}function xi(t,e,n){return e=Li(e),function(t,e){if(e&&("object"==Ei(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ki()?Reflect.construct(e,n||[],Li(t).constructor):e.apply(t,n))}function ki(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ki=function(){return!!t})()}function Ci(){return Ci="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Li(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ci.apply(null,arguments)}function Li(t){return Li=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Li(t)}function Bi(t,e){return Bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bi(t,e)}const Ti=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=xi(this,e,[n])).map=null,t.contentPlacementIds=[],t.currentContentPlacement=null,t}return function(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&&Bi(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){return this.map=t,this.container=document.createElement("div"),this.container.className="content-details-control-container",this.initializeEventListeners(),this.hide(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=Ci(Li(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.map.on("initiate:back",this._handleMapInitiateBack.bind(this))}},{key:"_handleMapInitiateBack",value:function(){var t=this.map._stateCoordinator.state;if("selectedContent"===t){if(0===this.contentPlacementIds.length)return;if(1===this.contentPlacementIds.length){var e=this.map._stateCoordinator.stateHistory,n=e[e.length-2];e.pop(),e.pop(),"search"===n?this.map.initiateSetToSearchState():this.map.setToDefaultState()}else this.contentPlacementIds.pop(),this.map.setToSelectedContentState(this.contentPlacementIds)}else"directions"===t&&(console.log("THIS IS BACK IN DIRECTIONS STATE:",this.contentPlacementIds.length),this.map.setToSelectedContentState(this.contentPlacementIds))}},{key:"_handleSelectChildContentPlacement",value:function(t){var e=t.placementId;this.contentPlacementIds.push(e),this.map.setToSelectedContentState(this.contentPlacementIds)}},{key:"_handleDefaultState",value:function(){this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews()}},{key:"_handleSearchState",value:function(t){this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews()}},{key:"_handleSelectedContentState",value:function(t){var e=t.contentPlacementIds,n=t.selectedContentPlacement;this.contentPlacementIds=e,this.currentContentPlacement=n,console.log("SELECTED",n),this._updateContentViews(),this.show()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleSelectDirectionsButton",value:(o=Oi().mark((function t(e){var n;return Oi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.placementId,t.next=3,this.map.setToDirectionsState(null,n);case 3:case"end":return t.stop()}}),t,this)})),i=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){_i(i,n,r,a,c,"next",t)}function c(t){_i(i,n,r,a,c,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})},{key:"_updateContentViews",value:function(){this._clearViews(),this._render()}},{key:"_render",value:function(){if(0!==this.contentPlacementIds.length&&null!==this.currentContentPlacement){var t=new Si;t.updateView(this.currentContentPlacement),t.on("selectChildContentPlacement",this._handleSelectChildContentPlacement.bind(this)),t.on("selectDirectionsButton",this._handleSelectDirectionsButton.bind(this)),this.container.appendChild(t.getElement())}}},{key:"_clearViews",value:function(){for(;this.container.firstChild;)this.container.removeChild(this.container.firstChild)}},{key:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&Pi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i}(In);function Ri(t){return Ri="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ri(t)}function Ni(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ai(r.key),r)}}function Ai(t){var e=function(t){if("object"!=Ri(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ri(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ri(e)?e:e+""}function Di(t,e,n){return e=Vi(e),function(t,e){if(e&&("object"==Ri(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Fi()?Reflect.construct(e,n||[],Vi(t).constructor):e.apply(t,n))}function Fi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Fi=function(){return!!t})()}function Ii(){return Ii="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Vi(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ii.apply(null,arguments)}function Vi(t){return Vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vi(t)}function zi(t,e){return zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zi(t,e)}const Hi=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Di(this,e,[n])).map=null,t.previouslySelectedFeature=null,t.previouslySelectedIcon=null,t.previouslySelectedTextColor=null,t.previouslySelectedTextOffset=null,t.previouslyHoveredFeature=null,t.originalTextColor=null,t.textColorReference={},t.currentView=null,t.selectedTextColor="#BE2E28",t}return function(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&&zi(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){return this.map=t,this.container=document.createElement("div"),this.container.className="interaction-control-container",this.initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.createHighlightedContentLayer(),this.createSelectedContentLayer(),this.storeTextColorReferences(),this.applyHoverEffectToAllSymbolLayers(),this.container}},{key:"_initialize",value:function(){var t=this.map.mapContainer.offsetWidth;this._configureView(t)}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=Ii(Vi(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"_attachResizeListener",value:function(){var t=this;window.addEventListener("resize",(function(){var e=t.map.mapContainer.offsetWidth;t._configureView(e)}))}},{key:"_configureView",value:function(t){t>767?this._setViewForDesktop():this._setViewForMobile()}},{key:"_setViewForDesktop",value:function(){this.currentView="desktop"}},{key:"_setViewForMobile",value:function(){this.currentView="mobile"}},{key:"initializeEventListeners",value:function(){var t=this;this.map.map.on("styleimagemissing",(function(t){var e=t.id;console.warn('Image "'.concat(e,'" could not be loaded.'))})),this.map.map.on("click",(function(e){t._handleClick(e)})),this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this))}},{key:"storeTextColorReferences",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){if("symbol"===e.type){var n=t.map.map.getPaintProperty(e.id,"text-color");void 0!==n&&(t.textColorReference[e.id]=n)}}))}},{key:"createSelectedContentLayer",value:function(){this.map.map.addSource("selected-content",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.map.addLayer({id:"selected-content-layer",type:"symbol",source:"selected-content",layout:{"text-field":["get","title"],"text-font":["Inter Medium"],"text-size":14,"text-justify":"left","text-anchor":"bottom-left","text-offset":[1.3,-1],"icon-image":"selected-pin","icon-size":.5,"icon-offset":[0,-5],"icon-anchor":"bottom","symbol-z-elevate":!0,"text-padding":10,"icon-padding":5},paint:{"text-color":"#BE2E28","text-halo-color":"#ffffff","text-halo-width":1}})}},{key:"createHighlightedContentLayer",value:function(){this.map.map.addSource("highlighted-content",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.map.addLayer({id:"highlighted-content-layer",type:"symbol",source:"highlighted-content",layout:{"text-field":["get","title"],"text-font":["Inter Medium"],"text-size":14,"text-justify":"left","text-anchor":"bottom-left","text-offset":[1.2,-.6],"icon-image":"highlightedPin","icon-size":.5,"icon-offset":[0,-5],"icon-anchor":"bottom","symbol-z-elevate":!0,"text-padding":5,"icon-padding":5},paint:{"text-color":"#1E1E1E","text-halo-color":"#ffffff","text-halo-width":1}})}},{key:"clearSelectedContentLayer",value:function(){this.map.map.getSource("selected-content").setData({type:"FeatureCollection",features:[]})}},{key:"clearHighlightedContentLayer",value:function(){this.map.map.getSource("highlighted-content").setData({type:"FeatureCollection",features:[]})}},{key:"addSelectedFeature",value:function(t,e){var n=this.map.map.getSource("selected-content"),r=n._data,o={type:"Feature",geometry:{type:"Point",coordinates:t},properties:e};r.features.push(o),n.setData(r)}},{key:"addHighlightedFeature",value:function(t,e){var n=this.map.map.getSource("highlighted-content"),r=n._data,o={type:"Feature",geometry:{type:"Point",coordinates:t},properties:e};r.features.push(o),n.setData(r)}},{key:"_handleDefaultState",value:function(){this.clearHighlightedContentLayer(),this.clearSelectedContentLayer(),this.showSymbolLayers()}},{key:"_handleSearchState",value:function(t){t.query;var e=t.results;this.hideSymbolLayers(),this.clearSelectedContentLayer(),this.updateLabelsForSearchResults(e)}},{key:"_handleSelectedContentState",value:function(t){t.contentPlacementIds;var e=t.selectedContentPlacement;this.updateLabelForSelectedContentPlacement(e)}},{key:"_handleDirectionsState",value:function(t){console.log("handling directions state in interaction control")}},{key:"hideSymbolLayers",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){"symbol"===e.type&&"selected-content-layer"!==e.id&&"highlighted-content-layer"!==e.id&&t.map.map.setLayoutProperty(e.id,"visibility","none")}))}},{key:"showSymbolLayers",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){"symbol"===e.type&&t.map.map.setLayoutProperty(e.id,"visibility","visible")}))}},{key:"updateLabelsForSearchResults",value:function(t){var e=this;this.clearHighlightedContentLayer();var n=[];if(t.forEach((function(t){var r=t.placement_id,o=e.map._findFeatureByPlacementId(r);if(o){var i=o.geometry.coordinates,a=o.properties;e.addHighlightedFeature(i,a),n.push(o)}})),n.length){var r=new mapboxgl.LngLatBounds;if(n.forEach((function(t){r.extend(t.geometry.coordinates)})),"desktop"===this.currentView)this.map.map.fitBounds(r,{padding:{top:200,bottom:200,left:550,right:200},maxZoom:15,duration:1e3});else if("mobile"===this.currentView){var o=.55*this.map.mapContainer.offsetHeight,i=.2*this.map.mapContainer.offsetWidth;this.map.map.fitBounds(r,{padding:{top:200,bottom:o,left:i,right:i},maxZoom:15,duration:1e3})}}}},{key:"updateLabelForSelectedContentPlacement",value:function(t){var e=t.placement_id;this.clearSelectedContentLayer();var n=this.map.map.queryRenderedFeatures({filter:["==",["get","placement_id"],e]});if(0!==n.length){var r=n[0],o=r.geometry.coordinates,i=r.properties;if(this.addSelectedFeature(o,i),"desktop"===this.currentView)this.map.map.easeTo({center:o,padding:{top:0,bottom:0,left:330,right:0},duration:1e3});else if("mobile"===this.currentView){var a=.35*this.map.mapContainer.offsetHeight;this.map.map.easeTo({center:o,padding:{top:0,bottom:a,left:0,right:0},duration:1e3})}}}},{key:"applyHoverEffectToAllSymbolLayers",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){if("symbol"===e.type){var n=e.id,r=t.textColorReference[n];t.map.map.on("mouseenter",n,(function(e){var o=e.features[0],i=o.properties.placement_id;if(t.previouslySelectedFeature&&t.previouslySelectedFeature.layer.id===o.layer.id){t.originalTextColor=t.previouslySelectedTextColor;var a=t.previouslySelectedFeature.properties.placement_id;t.map.map.setPaintProperty(n,"text-color",["case",["==",["get","placement_id"],i],"#4B90F7",["==",["get","placement_id"],a],t.selectedTextColor,r])}else t.originalTextColor=t.map.map.getPaintProperty(n,"text-color"),t.map.map.setPaintProperty(n,"text-color",["case",["==",["get","placement_id"],i],"#4B90F7",r]);t.map.map.getCanvas().style.cursor="pointer"})),t.map.map.on("mouseleave",n,(function(){if(t.previouslySelectedFeature){var e=t.previouslySelectedFeature.properties.placement_id;t.map.map.setPaintProperty(n,"text-color",["case",["==",["get","placement_id"],e],t.selectedTextColor,r])}else t.map.map.setPaintProperty(n,"text-color",r);t.map.map.getCanvas().style.cursor="default"}))}}))}},{key:"_handleClick",value:function(t){var e=this.map.map.queryRenderedFeatures(t.point).filter((function(t){return"symbol"===t.layer.type}));if(e.length>0){var n=e[0].properties.placement_id;this.map.setToSelectedContentState([n])}}}],r&&Ni(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(In);function Mi(t){return Mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mi(t)}function Ui(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,qi(r.key),r)}}function qi(t){var e=function(t){if("object"!=Mi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Mi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Mi(e)?e:e+""}function Gi(t,e,n){return e=Ki(e),function(t,e){if(e&&("object"==Mi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Wi()?Reflect.construct(e,n||[],Ki(t).constructor):e.apply(t,n))}function Wi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Wi=function(){return!!t})()}function Ki(t){return Ki=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ki(t)}function Ji(t,e){return Ji=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ji(t,e)}const Zi=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=Gi(this,e,[r])).steps=t,n._initialize(),n}return function(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&&Ji(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="steps-view",this._render(this.steps)}},{key:"_render",value:function(t){console.log("HERE ARE STEPSSS",t);var e=document.createElement("h2");e.textContent="Steps",this.element.appendChild(e);var n=document.createElement("ul");t.forEach((function(t){var e=document.createElement("li");e.textContent=t,n.appendChild(e)})),this.element.appendChild(n)}},{key:"getElement",value:function(){return this.element}}])&&Ui(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(dn);function Yi(t){return Yi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yi(t)}function $i(){$i=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new L(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(B([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==Yi(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,n,r){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=x(c,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function x(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function B(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Yi(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(P.prototype),u(P.prototype,c,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=B,L.prototype={constructor:L,reset:function(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(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Qi(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Xi(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Qi(i,r,o,a,c,"next",t)}function c(t){Qi(i,r,o,a,c,"throw",t)}a(void 0)}))}}function ta(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ea(r.key),r)}}function ea(t){var e=function(t){if("object"!=Yi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Yi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Yi(e)?e:e+""}function na(t,e,n){return e=oa(e),function(t,e){if(e&&("object"==Yi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ra()?Reflect.construct(e,n||[],oa(t).constructor):e.apply(t,n))}function ra(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ra=function(){return!!t})()}function oa(t){return oa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},oa(t)}function ia(t,e){return ia=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ia(t,e)}t.p;const aa=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=na(this,e,[n])).startSearchBox=new Jr,t.endSearchBox=new Jr,t.startContentPlacement=null,t.endContentPlacement=null,t.steps=null,t.searchApi=Ge.getSearchApi(),t._initialize(),t}return function(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&&ia(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="directions-view",this.directionsViewHeader=document.createElement("div"),this.directionsViewHeader.className="directions-view-header",this.searchBoxesContainer=document.createElement("div"),this.searchBoxesContainer.className="directions-search-boxes-container",this.circlesAndSearchWrapper=document.createElement("div"),this.circlesAndSearchWrapper.className="directions-circles-search-wrapper";var t=this._createCirclesContainer();this.circlesAndSearchWrapper.appendChild(t),this.startSearchBox.searchBar.updateLeftButtonIcon("none"),this.startSearchBox.searchBar.updateRightButtonIcon("none"),this.endSearchBox.searchBar.updateLeftButtonIcon("none"),this.endSearchBox.searchBar.updateRightButtonIcon("none"),this.startSearchBox.searchBar.setPlaceholderText("Choose starting point"),this.endSearchBox.searchBar.setPlaceholderText("Choose destination"),this.searchBoxesContainer.appendChild(this.startSearchBox.getElement()),this.searchBoxesContainer.appendChild(this.endSearchBox.getElement()),this.circlesAndSearchWrapper.appendChild(this.searchBoxesContainer),this.directionsViewHeader.appendChild(this.circlesAndSearchWrapper),this._render(),this._setupEventListeners()}},{key:"_createCirclesContainer",value:function(){var t=document.createElement("div");t.className="directions-circles-container";var e=document.createElement("div");e.className="large-circle";var n=document.createElement("div");n.className="end-circle";var r=document.createElement("div");r.className="small-circle";var o=document.createElement("div");o.className="small-circle";var i=document.createElement("div");return i.className="small-circle",t.appendChild(e),t.appendChild(r),t.appendChild(o),t.appendChild(i),t.appendChild(n),t}},{key:"_render",value:function(){if(this.element.appendChild(this.directionsViewHeader),this.steps){var t=new Zi(this.steps);this.element.appendChild(t.getElement())}}},{key:"_setupEventListeners",value:function(){this.startSearchBox.searchBar.on("focus",this._handleStartSearchBarFocus.bind(this)),this.startSearchBox.searchBar.on("blur",this._handleStartSearchBarBlur.bind(this)),this.endSearchBox.searchBar.on("focus",this._handleEndSearchBarFocus.bind(this)),this.endSearchBox.searchBar.on("blur",this._handleEndSearchBarBlur.bind(this)),this.startSearchBox.searchBarSuggestionsView.on("selectCell",this._handleStartContentPlacementSelect.bind(this)),this.endSearchBox.searchBarSuggestionsView.on("selectCell",this._handleEndContentPlacementSelect.bind(this))}},{key:"_handleStartContentPlacementSelect",value:(i=Xi($i().mark((function t(e){var n,r,o;return $i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.result,r=n.placement_id,this.startSearchBox.searchBar.setText(n.name),t.next=5,this.searchApi.fetchContentPlacementDetails(r);case 5:o=t.sent,this.updateView(o,this.endContentPlacement);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_handleEndContentPlacementSelect",value:(o=Xi($i().mark((function t(e){var n,r,o;return $i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.result,r=n.placement_id,this.endSearchBox.searchBar.setText(n.name),t.next=5,this.searchApi.fetchContentPlacementDetails(r);case 5:o=t.sent,this.updateView(this.startContentPlacement,o);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"_handleStartSearchBarFocus",value:function(){this.startSearchBox.searchBar.updateRightButtonIcon("search")}},{key:"_handleEndSearchBarFocus",value:function(){this.endSearchBox.searchBar.updateRightButtonIcon("search")}},{key:"_handleStartSearchBarBlur",value:function(){this.startSearchBox.searchBar.updateRightButtonIcon("none")}},{key:"_handleEndSearchBarBlur",value:function(){this.endSearchBox.searchBar.updateRightButtonIcon("none")}},{key:"updateView",value:function(t,e){if(this.startContentPlacement=t,this.endContentPlacement=e,t&&e)console.log("BOTH ARE THERE, LETS FIRE PATH"),this.fire("initiate:findPath",{startContentPlacementId:t.placement_id,endContentPlacementId:e.placement_id});else if(t){var n=t.content.data[t.content.title_key];this.startSearchBox.searchBar.setText(n),this.endSearchBox.searchBar.setText(""),this.endSearchBox.searchBar.input.focus(),this.clearSteps()}else if(e){var r=e.content.data[e.content.title_key];this.endSearchBox.searchBar.setText(r),this.startSearchBox.searchBar.setText(""),this.startSearchBox.searchBar.input.focus(),this.clearSteps()}}},{key:"setSteps",value:function(t){this.steps=t,this._render()}},{key:"clearSteps",value:function(){var t=this.element.querySelector(".steps-view");t&&t.remove()}},{key:"getElement",value:function(){return this.element}}],r&&ta(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,i}(dn);function ca(t){return ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ca(t)}function sa(t,e,n){return(e=la(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ua(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,la(r.key),r)}}function la(t){var e=function(t){if("object"!=ca(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ca(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ca(e)?e:e+""}function fa(t,e,n){return e=da(e),function(t,e){if(e&&("object"==ca(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ha()?Reflect.construct(e,n||[],da(t).constructor):e.apply(t,n))}function ha(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ha=function(){return!!t})()}function pa(){return pa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=da(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},pa.apply(null,arguments)}function da(t){return da=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},da(t)}function ya(t,e){return ya=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ya(t,e)}const ma={MapView:ur,SearchBox:Jr,SearchBoxControl:ro,CategoryBarControl:Oo,SearchResultsControl:Kn,ContentPlacementControl:Ti,InteractionControl:Hi,DirectionsControl:function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=fa(this,e,[n])).directionsView=null,t.map=null,t}return function(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&&ya(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){return this.map=t,this.container=document.createElement("div"),this.container.className="directions-control-container",this.directionsView=new aa,this.container.appendChild(this.directionsView.getElement()),this.initializeEventListeners(),this.createDirectionsLineLayer(),this.hide(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=pa(da(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.map.on("state:default",this._handleDefaultState.bind(this)),this.map.on("state:search",this._handleSearchState.bind(this)),this.map.on("state:selectedContent",this._handleSelectedContentState.bind(this)),this.map.on("state:directions",this._handleDirectionsState.bind(this)),this.directionsView.on("initiate:findPath",this._handleIntiateFindPath.bind(this))}},{key:"createDirectionsLineLayer",value:function(){this.map.map.addSource("directionsLineSource",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"LineString",coordinates:[]}}}),this.map.map.addLayer({id:"directionsLineLayer",type:"line",source:"directionsLineSource",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#1e1e1e","line-width":8}}),this.map.map.moveLayer("directionsLineLayer","special-areas")}},{key:"updateLineData",value:function(t){this.map.map.getSource("directionsLineSource").setData({type:"Feature",properties:{},geometry:{type:"LineString",coordinates:t}});var e=new mapboxgl.LngLatBounds;t.forEach((function(t){e.extend(t)})),this.map.map.fitBounds(e,sa(sa(sa({padding:200},"padding",{top:200,bottom:200,left:500,right:150}),"maxZoom",15),"duration",1e3))}},{key:"clearLineData",value:function(){this.map.map.getSource("directionsLineSource").setData({type:"Feature",properties:{},geometry:{type:"LineString",coordinates:[]}})}},{key:"_handleDefaultState",value:function(){this.hide()}},{key:"_handleSearchState",value:function(t){t.query,t.results,this.hide()}},{key:"_handleSelectedContentState",value:function(t){t.contentPlacementIds,t.selectedContentPlacement,this.hide(),this.directionsView.updateView(null,null),this.clearLineData()}},{key:"_handleDirectionsState",value:function(t){var e=t.startContentPlacement,n=t.endContentPlacement;console.log("handling directions state in directions control",t),this.show(),this.clearLineData(),this.directionsView.updateView(e,n)}},{key:"_handleIntiateFindPath",value:function(t){var e=t.startContentPlacementId,n=t.endContentPlacementId;this.clearLineData();var r=this.map.findPath(e,n);console.log("HERE IS PATH RESPONSEEE",r);var o=r.coordinates,i=r.steps;this.updateLineData(o),this.directionsView.setSteps(i)}},{key:"_handleSelectDirectionsButton",value:function(t){t.placementId}},{key:"_render",value:function(){console.log("render")}},{key:"show",value:function(){this.container.classList.add("visible")}},{key:"hide",value:function(){this.container.classList.remove("visible")}}],r&&ua(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(In),setApiKey:Ge.setApiKey.bind(Ge)};return e.default})()));
|