waygo-maps 1.1.120 → 1.1.122
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/bundle.js.map +1 -1
- package/dist/style.css +21 -25
- package/dist/style.css.map +1 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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,(()=>(()=>{var t={526:(t,e)=>{"use strict";e.byteLength=function(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,o=u(t),a=o[0],s=o[1],c=new i(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),l=0,h=s>0?a-4:a;for(n=0;n<h;n+=4)e=r[t.charCodeAt(n)]<<18|r[t.charCodeAt(n+1)]<<12|r[t.charCodeAt(n+2)]<<6|r[t.charCodeAt(n+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===s&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,c[l++]=255&e),1===s&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],a=16383,u=0,c=r-i;u<c;u+=a)o.push(s(t,u,u+a>c?c:u+a));return 1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=o[a],r[o.charCodeAt(a)]=a;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function s(t,e,r){for(var i,o,a=[],u=e;u<r;u+=3)i=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(255&t[u+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},287:(t,e,n)=>{"use strict";const r=n(526),i=n(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=s,e.IS=50;const a=2147483647;function u(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,s.prototype),e}function s(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return c(t,e,n)}function c(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|y(t,e);let r=u(n);const i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(q(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(q(t,ArrayBuffer)||t&&q(t.buffer,ArrayBuffer))return p(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(q(t,SharedArrayBuffer)||t&&q(t.buffer,SharedArrayBuffer)))return p(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return s.from(r,e,n);const i=function(t){if(s.isBuffer(t)){const e=0|d(t.length),n=u(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||K(t.length)?u(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return l(t),u(t<0?0:0|d(t))}function f(t){const e=t.length<0?0:0|d(t.length),n=u(e);for(let r=0;r<e;r+=1)n[r]=255&t[r];return n}function p(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(r,s.prototype),r}function d(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function y(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Z(t).length;default:if(i)return r?-1:G(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,n);case"utf8":case"utf-8":return A(this,e,n);case"ascii":return S(this,e,n);case"latin1":case"binary":return I(this,e,n);case"base64":return j(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function D(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),K(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,i){let o,a=1,u=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,u/=2,s/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let r=-1;for(o=n;o<u;o++)if(c(t,o)===c(e,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===s)return r*a}else-1!==r&&(o-=o-r),r=-1}else for(n+s>u&&(n=u-s),o=n;o>=0;o--){let n=!0;for(let r=0;r<s;r++)if(c(t,o+r)!==c(e,r)){n=!1;break}if(n)return o}return-1}function M(t,e,n,r){n=Number(n)||0;const i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;const o=e.length;let a;for(r>o/2&&(r=o/2),a=0;a<r;++a){const r=parseInt(e.substr(2*a,2),16);if(K(r))return a;t[n+a]=r}return a}function b(t,e,n,r){return W(G(e,t.length-n),t,n,r)}function w(t,e,n,r){return W(function(t){const e=[];for(let n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function E(t,e,n,r){return W(Z(e),t,n,r)}function C(t,e,n,r){return W(function(t,e){let n,r,i;const o=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function j(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function A(t,e,n){n=Math.min(t.length,n);const r=[];let i=e;for(;i<n;){const e=t[i];let o=null,a=e>239?4:e>223?3:e>191?2:1;if(i+a<=n){let n,r,u,s;switch(a){case 1:e<128&&(o=e);break;case 2:n=t[i+1],128==(192&n)&&(s=(31&e)<<6|63&n,s>127&&(o=s));break;case 3:n=t[i+1],r=t[i+2],128==(192&n)&&128==(192&r)&&(s=(15&e)<<12|(63&n)<<6|63&r,s>2047&&(s<55296||s>57343)&&(o=s));break;case 4:n=t[i+1],r=t[i+2],u=t[i+3],128==(192&n)&&128==(192&r)&&128==(192&u)&&(s=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&u,s>65535&&s<1114112&&(o=s))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(t){const e=t.length;if(e<=N)return String.fromCharCode.apply(String,t);let n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=N));return n}(r)}s.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(t,e,n){return c(t,e,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(t,e,n){return function(t,e,n){return l(t),t<=0?u(t):void 0!==e?"string"==typeof n?u(t).fill(e,n):u(t).fill(e):u(t)}(t,e,n)},s.allocUnsafe=function(t){return h(t)},s.allocUnsafeSlow=function(t){return h(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(q(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),q(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,r=e.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);let n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;const r=s.allocUnsafe(e);let i=0;for(n=0;n<t.length;++n){let e=t[n];if(q(e,Uint8Array))i+e.length>r.length?(s.isBuffer(e)||(e=s.from(e)),e.copy(r,i)):Uint8Array.prototype.set.call(r,e,i);else{if(!s.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,i)}i+=e.length}return r},s.byteLength=y,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)g(this,e,e+1);return this},s.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},s.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},s.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?A(this,0,t):m.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){let t="";const n=e.IS;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},o&&(s.prototype[o]=s.prototype.inspect),s.prototype.compare=function(t,e,n,r,i){if(q(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;let o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0);const u=Math.min(o,a),c=this.slice(r,i),l=t.slice(e,n);for(let t=0;t<u;++t)if(c[t]!==l[t]){o=c[t],a=l[t];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},s.prototype.indexOf=function(t,e,n){return D(this,t,e,n,!0)},s.prototype.lastIndexOf=function(t,e,n){return D(this,t,e,n,!1)},s.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return M(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":case"latin1":case"binary":return w(this,t,e,n);case"base64":return E(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const N=4096;function S(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function I(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function T(t,e,n){const r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=e;r<n;++r)i+=J[t[r]];return i}function F(t,e,n){const r=t.slice(e,n);let i="";for(let t=0;t<r.length-1;t+=2)i+=String.fromCharCode(r[t]+256*r[t+1]);return i}function O(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function x(t,e,n,r,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function k(t,e,n,r,i){Q(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,n}function L(t,e,n,r,i){Q(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n+7]=o,o>>=8,t[n+6]=o,o>>=8,t[n+5]=o,o>>=8,t[n+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=a,a>>=8,t[n+2]=a,a>>=8,t[n+1]=a,a>>=8,t[n]=a,n+8}function _(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(t,e,n,r,o){return e=+e,n>>>=0,o||_(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function B(t,e,n,r,o){return e=+e,n>>>=0,o||_(t,0,n,8),i.write(t,e,n,r,52,8),n+8}s.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);const r=this.subarray(t,e);return Object.setPrototypeOf(r,s.prototype),r},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);let r=this[t],i=1,o=0;for(;++o<e&&(i*=256);)r+=this[t+o]*i;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);let r=this[t+--e],i=1;for(;e>0&&(i*=256);)r+=this[t+--e]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=X((function(t){Y(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),s.prototype.readBigUInt64BE=X((function(t){Y(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),s.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);let r=this[t],i=1,o=0;for(;++o<e&&(i*=256);)r+=this[t+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);let r=e,i=1,o=this[t+--r];for(;r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=X((function(t){Y(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),s.prototype.readBigInt64BE=X((function(t){Y(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+n)})),s.prototype.readFloatLE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||x(this,t,e,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||x(this,t,e,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||x(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||x(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||x(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||x(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||x(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigUInt64LE=X((function(t,e=0){return k(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=X((function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);x(this,t,e,n,r-1,-r)}let i=0,o=1,a=0;for(this[e]=255&t;++i<n&&(o*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);x(this,t,e,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||x(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||x(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||x(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||x(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||x(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigInt64LE=X((function(t,e=0){return k(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=X((function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(t,e,n){return z(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return z(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return B(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return B(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);const i=r-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e),i},s.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){const e=t.charCodeAt(0);("utf8"===r&&e<128||"latin1"===r)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;let i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{const o=s.isBuffer(t)?t:s.from(t,r),a=o.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<n-e;++i)this[i+e]=o[i%a]}return this};const P={};function U(t,e,n){P[t]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function R(t){let e="",n=t.length;const r="-"===t[0]?1:0;for(;n>=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function Q(t,e,n,r,i,o){if(t>n||t<e){const r="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${e}${r} and <= ${n}${r}`,new P.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,n){Y(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||V(e,t.length-(n+1))}(r,i,o)}function Y(t,e){if("number"!=typeof t)throw new P.ERR_INVALID_ARG_TYPE(e,"number",t)}function V(t,e,n){if(Math.floor(t)!==t)throw Y(t,n),new P.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new P.ERR_BUFFER_OUT_OF_BOUNDS;throw new P.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(t,e,n){let r=`The value of "${t}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=R(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=R(i)),i+="n"),r+=` It must be ${e}. Received ${i}`,r}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function G(t,e){let n;e=e||1/0;const r=t.length;let i=null;const o=[];for(let a=0;a<r;++a){if(n=t.charCodeAt(a),n>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Z(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,n,r){let i;for(i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function K(t){return t!=t}const J=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)e[r+i]=t[n]+t[i]}return e}();function X(t){return"undefined"==typeof BigInt?$:t}function $(){throw new Error("BigInt not supported")}},320:t=>{"use strict";var e={single_source_shortest_paths:function(t,n,r){var i={},o={};o[n]=0;var a,u,s,c,l,h,f,p=e.PriorityQueue.make();for(p.push(n,0);!p.empty();)for(s in u=(a=p.pop()).value,c=a.cost,l=t[u]||{})l.hasOwnProperty(s)&&(h=c+l[s],f=o[s],(void 0===o[s]||f>h)&&(o[s]=h,p.push(s,h),i[s]=u));if(void 0!==r&&void 0===o[r]){var d=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(d)}return i},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,n,r){var i=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,i={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(i[n]=r[n]);return i.queue=[],i.sorter=t.sorter||r.default_sorter,i},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e},251:(t,e)=>{e.read=function(t,e,n,r,i){var o,a,u=8*i-r-1,s=(1<<u)-1,c=s>>1,l=-7,h=n?i-1:0,f=n?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=u;l>0;o=256*o+t[e+h],h+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===s)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=c}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,u,s,c=8*o-i-1,l=(1<<c)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),(e+=a+h>=1?f/s:f*Math.pow(2,1-h))*s>=2&&(a++,s/=2),a+h>=l?(u=0,a=l):a+h>=1?(u=(e*s-1)*Math.pow(2,i),a+=h):(u=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&u,p+=d,u/=256,i-=8);for(a=a<<i|u,c+=i;c>0;t[n+p]=255&a,p+=d,a/=256,c-=8);t[n+p-d]|=128*y}},975:(t,e,n)=>{"use strict";var r=n(606);function i(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function o(t,e){for(var n,r="",i=0,o=-1,a=0,u=0;u<=t.length;++u){if(u<t.length)n=t.charCodeAt(u);else{if(47===n)break;n=47}if(47===n){if(o===u-1||1===a);else if(o!==u-1&&2===a){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var s=r.lastIndexOf("/");if(s!==r.length-1){-1===s?(r="",i=0):i=(r=r.slice(0,s)).length-1-r.lastIndexOf("/"),o=u,a=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=u,a=0;continue}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+t.slice(o+1,u):r=t.slice(o+1,u),i=u-o-1;o=u,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var a={resolve:function(){for(var t,e="",n=!1,a=arguments.length-1;a>=-1&&!n;a--){var u;a>=0?u=arguments[a]:(void 0===t&&(t=r.cwd()),u=t),i(u),0!==u.length&&(e=u+"/"+e,n=47===u.charCodeAt(0))}return e=o(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(i(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=o(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return i(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];i(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":a.normalize(t)},relative:function(t,e){if(i(t),i(e),t===e)return"";if((t=a.resolve(t))===(e=a.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var r=t.length,o=r-n,u=1;u<e.length&&47===e.charCodeAt(u);++u);for(var s=e.length-u,c=o<s?o:s,l=-1,h=0;h<=c;++h){if(h===c){if(s>c){if(47===e.charCodeAt(u+h))return e.slice(u+h+1);if(0===h)return e.slice(u+h)}else o>c&&(47===t.charCodeAt(n+h)?l=h:0===h&&(l=0));break}var f=t.charCodeAt(n+h);if(f!==e.charCodeAt(u+h))break;47===f&&(l=h)}var p="";for(h=n+l+1;h<=r;++h)h!==r&&47!==t.charCodeAt(h)||(0===p.length?p+="..":p+="/..");return p.length>0?p+e.slice(u+l):(u+=l,47===e.charCodeAt(u)&&++u,e.slice(u))},_makeLong:function(t){return t},dirname:function(t){if(i(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,o=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!o){r=a;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"//":t.slice(0,r)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');i(t);var n,r=0,o=-1,a=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var u=e.length-1,s=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!a){r=n+1;break}}else-1===s&&(a=!1,s=n+1),u>=0&&(c===e.charCodeAt(u)?-1==--u&&(o=n):(u=-1,o=s))}return r===o?o=s:-1===o&&(o=t.length),t.slice(r,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){r=n+1;break}}else-1===o&&(a=!1,o=n+1);return-1===o?"":t.slice(r,o)},extname:function(t){i(t);for(var e=-1,n=0,r=-1,o=!0,a=0,u=t.length-1;u>=0;--u){var s=t.charCodeAt(u);if(47!==s)-1===r&&(o=!1,r=u+1),46===s?-1===e?e=u:1!==a&&(a=1):-1!==e&&(a=-1);else if(!o){n=u+1;break}}return-1===e||-1===r||0===a||1===a&&e===r-1&&e===n+1?"":t.slice(e,r)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+"/"+r:r}(0,t)},parse:function(t){i(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,r=t.charCodeAt(0),o=47===r;o?(e.root="/",n=1):n=0;for(var a=-1,u=0,s=-1,c=!0,l=t.length-1,h=0;l>=n;--l)if(47!==(r=t.charCodeAt(l)))-1===s&&(c=!1,s=l+1),46===r?-1===a?a=l:1!==h&&(h=1):-1!==a&&(h=-1);else if(!c){u=l+1;break}return-1===a||-1===s||0===h||1===h&&a===s-1&&a===u+1?-1!==s&&(e.base=e.name=0===u&&o?t.slice(1,s):t.slice(u,s)):(0===u&&o?(e.name=t.slice(1,a),e.base=t.slice(1,s)):(e.name=t.slice(u,a),e.base=t.slice(u,s)),e.ext=t.slice(a,s)),u>0?e.dir=t.slice(0,u-1):o&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,t.exports=a},606:t=>{var e,n,r=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var u,s=[],c=!1,l=-1;function h(){c&&u&&(c=!1,u.length?s=u.concat(s):l=-1,s.length&&f())}function f(){if(!c){var t=a(h);c=!0;for(var e=s.length;e;){for(u=s,s=[];++l<e;)u&&u[l].run();l=-1,e=s.length}u=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{return n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function d(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new p(t,e)),1!==s.length||c||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=d,r.addListener=d,r.once=d,r.off=d,r.removeListener=d,r.removeAllListeners=d,r.emit=d,r.prependListener=d,r.prependOnceListener=d,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},583:(t,e,n)=>{const r=n(333),i=n(157),o=n(280),a=n(375);function u(t,e,n,o,a){const u=[].slice.call(arguments,1),s=u.length,c="function"==typeof u[s-1];if(!c&&!r())throw new Error("Callback required as last argument");if(!c){if(s<1)throw new Error("Too few arguments provided");return 1===s?(n=e,e=o=void 0):2!==s||e.getContext||(o=n,n=e,e=void 0),new Promise((function(r,a){try{const a=i.create(n,o);r(t(a,e,o))}catch(t){a(t)}}))}if(s<2)throw new Error("Too few arguments provided");2===s?(a=n,n=e,e=o=void 0):3===s&&(e.getContext&&void 0===a?(a=o,o=void 0):(a=o,o=n,n=e,e=void 0));try{const r=i.create(n,o);a(null,t(r,e,o))}catch(t){a(t)}}e.create=i.create,e.toCanvas=u.bind(null,o.render),e.toDataURL=u.bind(null,o.renderToDataURL),e.toString=u.bind(null,(function(t,e,n){return a.render(t,n)}))},333:t=>{t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},421:(t,e,n)=>{const r=n(886).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];const e=Math.floor(t/7)+2,n=r(t),i=145===n?26:2*Math.ceil((n-13)/(2*e-2)),o=[n-7];for(let t=1;t<e-1;t++)o[t]=o[t-1]-i;return o.push(6),o.reverse()},e.getPositions=function(t){const n=[],r=e.getRowColCoords(t),i=r.length;for(let t=0;t<i;t++)for(let e=0;e<i;e++)0===t&&0===e||0===t&&e===i-1||t===i-1&&0===e||n.push([r[t],r[e]]);return n}},433:(t,e,n)=>{const r=n(208),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(t){this.mode=r.ALPHANUMERIC,this.data=t}o.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let n=45*i.indexOf(this.data[e]);n+=i.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(i.indexOf(this.data[e]),6)},t.exports=o},899:t=>{function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=e},820:t=>{function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}e.prototype.set=function(t,e,n,r){const i=t*this.size+e;this.data[i]=n,r&&(this.reservedBit[i]=!0)},e.prototype.get=function(t,e){return this.data[t*this.size+e]},e.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},e.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=e},822:(t,e,n)=>{const r=n(208);function i(t){this.mode=r.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}i.getBitsLength=function(t){return 8*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},t.exports=i},518:(t,e,n)=>{const r=n(953),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(t,e){switch(e){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case r.L:return o[4*(t-1)+0];case r.M:return o[4*(t-1)+1];case r.Q:return o[4*(t-1)+2];case r.H:return o[4*(t-1)+3];default:return}}},953:(t,e)=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return n}}},756:(t,e,n)=>{const r=n(886).getSymbolSize;e.getPositions=function(t){const e=r(t);return[[0,0],[e-7,0],[0,e-7]]}},565:(t,e,n)=>{const r=n(886),i=r.getBCHDigit(1335);e.getEncodedBits=function(t,e){const n=t.bit<<3|e;let o=n<<10;for(;r.getBCHDigit(o)-i>=0;)o^=1335<<r.getBCHDigit(o)-i;return 21522^(n<<10|o)}},731:(t,e)=>{const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let t=1;for(let e=0;e<255;e++)n[e]=t,r[t]=e,t<<=1,256&t&&(t^=285);for(let t=255;t<512;t++)n[t]=n[t-255]}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return r[t]},e.exp=function(t){return n[t]},e.mul=function(t,e){return 0===t||0===e?0:n[r[t]+r[e]]}},861:(t,e,n)=>{const r=n(208),i=n(886);function o(t){this.mode=r.KANJI,this.data=t}o.getBitsLength=function(t){return 13*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=i.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},t.exports=o},332:(t,e)=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const e=t.size;let n=0,r=0,i=0,o=null,a=null;for(let u=0;u<e;u++){r=i=0,o=a=null;for(let s=0;s<e;s++){let e=t.get(u,s);e===o?r++:(r>=5&&(n+=r-5+3),o=e,r=1),e=t.get(s,u),e===a?i++:(i>=5&&(n+=i-5+3),a=e,i=1)}r>=5&&(n+=r-5+3),i>=5&&(n+=i-5+3)}return n},e.getPenaltyN2=function(t){const e=t.size;let n=0;for(let r=0;r<e-1;r++)for(let i=0;i<e-1;i++){const e=t.get(r,i)+t.get(r,i+1)+t.get(r+1,i)+t.get(r+1,i+1);4!==e&&0!==e||n++}return 3*n},e.getPenaltyN3=function(t){const e=t.size;let n=0,r=0,i=0;for(let o=0;o<e;o++){r=i=0;for(let a=0;a<e;a++)r=r<<1&2047|t.get(o,a),a>=10&&(1488===r||93===r)&&n++,i=i<<1&2047|t.get(a,o),a>=10&&(1488===i||93===i)&&n++}return 40*n},e.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return 10*Math.abs(Math.ceil(100*e/n/5)-10)},e.applyMask=function(t,e){const r=e.size;for(let i=0;i<r;i++)for(let o=0;o<r;o++)e.isReserved(o,i)||e.xor(o,i,n(t,o,i))},e.getBestMask=function(t,n){const r=Object.keys(e.Patterns).length;let i=0,o=1/0;for(let a=0;a<r;a++){n(a),e.applyMask(a,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(a,t),r<o&&(o=r,i=a)}return i}},208:(t,e,n)=>{const r=n(878),i=n(44);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return i.testNumeric(t)?e.NUMERIC:i.testAlphanumeric(t)?e.ALPHANUMERIC:i.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return n}}},357:(t,e,n)=>{const r=n(208);function i(t){this.mode=r.NUMERIC,this.data=t.toString()}i.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const i=this.data.length-e;i>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*i+1))},t.exports=i},713:(t,e,n)=>{const r=n(731);e.mul=function(t,e){const n=new Uint8Array(t.length+e.length-1);for(let i=0;i<t.length;i++)for(let o=0;o<e.length;o++)n[i+o]^=r.mul(t[i],e[o]);return n},e.mod=function(t,e){let n=new Uint8Array(t);for(;n.length-e.length>=0;){const t=n[0];for(let i=0;i<e.length;i++)n[i]^=r.mul(e[i],t);let i=0;for(;i<n.length&&0===n[i];)i++;n=n.slice(i)}return n},e.generateECPolynomial=function(t){let n=new Uint8Array([1]);for(let i=0;i<t;i++)n=e.mul(n,new Uint8Array([1,r.exp(i)]));return n}},157:(t,e,n)=>{const r=n(886),i=n(953),o=n(899),a=n(820),u=n(421),s=n(756),c=n(332),l=n(518),h=n(764),f=n(427),p=n(565),d=n(208),y=n(801);function m(t,e,n){const r=t.size,i=p.getEncodedBits(e,n);let o,a;for(o=0;o<15;o++)a=1==(i>>o&1),o<6?t.set(o,8,a,!0):o<8?t.set(o+1,8,a,!0):t.set(r-15+o,8,a,!0),o<8?t.set(8,r-o-1,a,!0):o<9?t.set(8,15-o-1+1,a,!0):t.set(8,15-o-1,a,!0);t.set(r-8,8,1,!0)}function g(t,e,n,i){let p;if(Array.isArray(t))p=y.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let r=e;if(!r){const e=y.rawSplit(t);r=f.getBestVersionForData(e,n)}p=y.fromString(t,r||40)}}const g=f.getBestVersionForData(p,n);if(!g)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<g)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+g+".\n")}else e=g;const D=function(t,e,n){const i=new o;n.forEach((function(e){i.put(e.mode.bit,4),i.put(e.getLength(),d.getCharCountIndicator(e.mode,t)),e.write(i)}));const a=8*(r.getSymbolTotalCodewords(t)-l.getTotalCodewordsCount(t,e));for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const u=(a-i.getLengthInBits())/8;for(let t=0;t<u;t++)i.put(t%2?17:236,8);return function(t,e,n){const i=r.getSymbolTotalCodewords(e),o=i-l.getTotalCodewordsCount(e,n),a=l.getBlocksCount(e,n),u=a-i%a,s=Math.floor(i/a),c=Math.floor(o/a),f=c+1,p=s-c,d=new h(p);let y=0;const m=new Array(a),g=new Array(a);let D=0;const v=new Uint8Array(t.buffer);for(let t=0;t<a;t++){const e=t<u?c:f;m[t]=v.slice(y,y+e),g[t]=d.encode(m[t]),y+=e,D=Math.max(D,e)}const M=new Uint8Array(i);let b,w,E=0;for(b=0;b<D;b++)for(w=0;w<a;w++)b<m[w].length&&(M[E++]=m[w][b]);for(b=0;b<p;b++)for(w=0;w<a;w++)M[E++]=g[w][b];return M}(i,t,e)}(e,n,p),v=r.getSymbolSize(e),M=new a(v);return function(t,e){const n=t.size,r=s.getPositions(e);for(let e=0;e<r.length;e++){const i=r[e][0],o=r[e][1];for(let e=-1;e<=7;e++)if(!(i+e<=-1||n<=i+e))for(let r=-1;r<=7;r++)o+r<=-1||n<=o+r||(e>=0&&e<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===e||6===e)||e>=2&&e<=4&&r>=2&&r<=4?t.set(i+e,o+r,!0,!0):t.set(i+e,o+r,!1,!0))}}(M,e),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(M),function(t,e){const n=u.getPositions(e);for(let e=0;e<n.length;e++){const r=n[e][0],i=n[e][1];for(let e=-2;e<=2;e++)for(let n=-2;n<=2;n++)-2===e||2===e||-2===n||2===n||0===e&&0===n?t.set(r+e,i+n,!0,!0):t.set(r+e,i+n,!1,!0)}}(M,e),m(M,n,0),e>=7&&function(t,e){const n=t.size,r=f.getEncodedBits(e);let i,o,a;for(let e=0;e<18;e++)i=Math.floor(e/3),o=e%3+n-8-3,a=1==(r>>e&1),t.set(i,o,a,!0),t.set(o,i,a,!0)}(M,e),function(t,e){const n=t.size;let r=-1,i=n-1,o=7,a=0;for(let u=n-1;u>0;u-=2)for(6===u&&u--;;){for(let n=0;n<2;n++)if(!t.isReserved(i,u-n)){let r=!1;a<e.length&&(r=1==(e[a]>>>o&1)),t.set(i,u-n,r),o--,-1===o&&(a++,o=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}(M,D),isNaN(i)&&(i=c.getBestMask(M,m.bind(null,M,n))),c.applyMask(i,M),m(M,n,i),{modules:M,version:e,errorCorrectionLevel:n,maskPattern:i,segments:p}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");let n,o,a=i.M;return void 0!==e&&(a=i.from(e.errorCorrectionLevel,i.M),n=f.from(e.version),o=c.from(e.maskPattern),e.toSJISFunc&&r.setToSJISFunction(e.toSJISFunc)),g(t,n,a,o)}},764:(t,e,n)=>{const r=n(713);function i(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(t){this.degree=t,this.genPoly=r.generateECPolynomial(this.degree)},i.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(t.length+this.degree);e.set(t);const n=r.mod(e,this.genPoly),i=this.degree-n.length;if(i>0){const t=new Uint8Array(this.degree);return t.set(n,i),t}return n},t.exports=i},44:(t,e)=>{const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";e.KANJI=new RegExp(r,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(i,"g"),e.NUMERIC=new RegExp(n,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const o=new RegExp("^"+r+"$"),a=new RegExp("^"+n+"$"),u=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return o.test(t)},e.testNumeric=function(t){return a.test(t)},e.testAlphanumeric=function(t){return u.test(t)}},801:(t,e,n)=>{const r=n(208),i=n(357),o=n(433),a=n(822),u=n(861),s=n(44),c=n(886),l=n(320);function h(t){return unescape(encodeURIComponent(t)).length}function f(t,e,n){const r=[];let i;for(;null!==(i=t.exec(n));)r.push({data:i[0],index:i.index,mode:e,length:i[0].length});return r}function p(t){const e=f(s.NUMERIC,r.NUMERIC,t),n=f(s.ALPHANUMERIC,r.ALPHANUMERIC,t);let i,o;return c.isKanjiModeEnabled()?(i=f(s.BYTE,r.BYTE,t),o=f(s.KANJI,r.KANJI,t)):(i=f(s.BYTE_KANJI,r.BYTE,t),o=[]),e.concat(n,i,o).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function d(t,e){switch(e){case r.NUMERIC:return i.getBitsLength(t);case r.ALPHANUMERIC:return o.getBitsLength(t);case r.KANJI:return u.getBitsLength(t);case r.BYTE:return a.getBitsLength(t)}}function y(t,e){let n;const s=r.getBestModeForData(t);if(n=r.from(e,s),n!==r.BYTE&&n.bit<s.bit)throw new Error('"'+t+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(s));switch(n!==r.KANJI||c.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new i(t);case r.ALPHANUMERIC:return new o(t);case r.KANJI:return new u(t);case r.BYTE:return new a(t)}}e.fromArray=function(t){return t.reduce((function(t,e){return"string"==typeof e?t.push(y(e,null)):e.data&&t.push(y(e.data,e.mode)),t}),[])},e.fromString=function(t,n){const i=function(t){const e=[];for(let n=0;n<t.length;n++){const i=t[n];switch(i.mode){case r.NUMERIC:e.push([i,{data:i.data,mode:r.ALPHANUMERIC,length:i.length},{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.ALPHANUMERIC:e.push([i,{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.KANJI:e.push([i,{data:i.data,mode:r.BYTE,length:h(i.data)}]);break;case r.BYTE:e.push([{data:i.data,mode:r.BYTE,length:h(i.data)}])}}return e}(p(t,c.isKanjiModeEnabled())),o=function(t,e){const n={},i={start:{}};let o=["start"];for(let a=0;a<t.length;a++){const u=t[a],s=[];for(let t=0;t<u.length;t++){const c=u[t],l=""+a+t;s.push(l),n[l]={node:c,lastCount:0},i[l]={};for(let t=0;t<o.length;t++){const a=o[t];n[a]&&n[a].node.mode===c.mode?(i[a][l]=d(n[a].lastCount+c.length,c.mode)-d(n[a].lastCount,c.mode),n[a].lastCount+=c.length):(n[a]&&(n[a].lastCount=c.length),i[a][l]=d(c.length,c.mode)+4+r.getCharCountIndicator(c.mode,e))}}o=s}for(let t=0;t<o.length;t++)i[o[t]].end=0;return{map:i,table:n}}(i,n),a=l.find_path(o.map,"start","end"),u=[];for(let t=1;t<a.length-1;t++)u.push(o.table[a[t]].node);return e.fromArray(u.reduce((function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[]))},e.rawSplit=function(t){return e.fromArray(p(t,c.isKanjiModeEnabled()))}},886:(t,e)=>{let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return r[t]},e.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},e.isKanjiModeEnabled=function(){return void 0!==n},e.toSJIS=function(t){return n(t)}},878:(t,e)=>{e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},427:(t,e,n)=>{const r=n(886),i=n(518),o=n(953),a=n(208),u=n(878),s=r.getBCHDigit(7973);function c(t,e){return a.getCharCountIndicator(t,e)+4}function l(t,e){let n=0;return t.forEach((function(t){const r=c(t.mode,e);n+=r+t.getBitsLength()})),n}e.from=function(t,e){return u.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,n){if(!u.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);const o=8*(r.getSymbolTotalCodewords(t)-i.getTotalCodewordsCount(t,e));if(n===a.MIXED)return o;const s=o-c(n,t);switch(n){case a.NUMERIC:return Math.floor(s/10*3);case a.ALPHANUMERIC:return Math.floor(s/11*2);case a.KANJI:return Math.floor(s/13);case a.BYTE:default:return Math.floor(s/8)}},e.getBestVersionForData=function(t,n){let r;const i=o.from(n,o.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let r=1;r<=40;r++)if(l(t,r)<=e.getCapacity(r,n,a.MIXED))return r}(t,i);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}(r.mode,r.getLength(),i)},e.getEncodedBits=function(t){if(!u.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;r.getBCHDigit(e)-s>=0;)e^=7973<<r.getBCHDigit(e)-s;return t<<12|e}},280:(t,e,n)=>{const r=n(726);e.render=function(t,e,n){let i=n,o=e;void 0!==i||e&&e.getContext||(i=e,e=void 0),e||(o=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),i=r.getOptions(i);const a=r.getImageWidth(t.modules.size,i),u=o.getContext("2d"),s=u.createImageData(a,a);return r.qrToImageData(s.data,t,i),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(u,o,a),u.putImageData(s,0,0),o},e.renderToDataURL=function(t,n,r){let i=r;void 0!==i||n&&n.getContext||(i=n,n=void 0),i||(i={});const o=e.render(t,n,i),a=i.type||"image/png",u=i.rendererOpts||{};return o.toDataURL(a,u.quality)}},375:(t,e,n)=>{const r=n(726);function i(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function o(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}e.render=function(t,e,n){const a=r.getOptions(e),u=t.modules.size,s=t.modules.data,c=u+2*a.margin,l=a.color.light.a?"<path "+i(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",h="<path "+i(a.color.dark,"stroke")+' d="'+function(t,e,n){let r="",i=0,a=!1,u=0;for(let s=0;s<t.length;s++){const c=Math.floor(s%e),l=Math.floor(s/e);c||a||(a=!0),t[s]?(u++,s>0&&c>0&&t[s-1]||(r+=a?o("M",c+n,.5+l+n):o("m",i,0),i=0,a=!1),c+1<e&&t[s+1]||(r+=o("h",u),u=0)):i++}return r}(s,u,a.margin)+'"/>',f='viewBox="0 0 '+c+" "+c+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+f+' shape-rendering="crispEdges">'+l+h+"</svg>\n";return"function"==typeof n&&n(null,p),p}},726:(t,e)=>{function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});const e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,i=t.scale||4;return{width:r,scale:r?4:i,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){const r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){const i=n.modules.size,o=n.modules.data,a=e.getScale(i,r),u=Math.floor((i+2*r.margin)*a),s=r.margin*a,c=[r.color.light,r.color.dark];for(let e=0;e<u;e++)for(let n=0;n<u;n++){let l=4*(e*u+n),h=r.color.light;e>=s&&n>=s&&e<u-s&&n<u-s&&(h=c[o[Math.floor((e-s)/a)*i+Math.floor((n-s)/a)]?1:0]),t[l++]=h.r,t[l++]=h.g,t[l++]=h.b,t[l]=h.a}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!t||!/^http(s?):/.test(t));)t=r[i--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t})();var r={};return(()=>{"use strict";n.d(r,{default:()=>Nh});var t={};function e(t,e){return function(){return t.apply(e,arguments)}}n.r(t),n.d(t,{hasBrowserEnv:()=>dt,hasStandardBrowserEnv:()=>mt,hasStandardBrowserWebWorkerEnv:()=>gt,navigator:()=>yt,origin:()=>Dt});var i=n(606);const{toString:o}=Object.prototype,{getPrototypeOf:a}=Object,u=(s=Object.create(null),t=>{const e=o.call(t);return s[e]||(s[e]=e.slice(8,-1).toLowerCase())});var s;const c=t=>(t=t.toLowerCase(),e=>u(e)===t),l=t=>e=>typeof e===t,{isArray:h}=Array,f=l("undefined"),p=c("ArrayBuffer"),d=l("string"),y=l("function"),m=l("number"),g=t=>null!==t&&"object"==typeof t,D=t=>{if("object"!==u(t))return!1;const e=a(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},v=c("Date"),M=c("File"),b=c("Blob"),w=c("FileList"),E=c("URLSearchParams"),[C,j,A,N]=["ReadableStream","Request","Response","Headers"].map(c);function S(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,i;if("object"!=typeof t&&(t=[t]),h(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let a;for(r=0;r<o;r++)a=i[r],e.call(null,t[a],a,t)}}function I(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,i=n.length;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}const T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,F=t=>!f(t)&&t!==T,O=(x="undefined"!=typeof Uint8Array&&a(Uint8Array),t=>x&&t instanceof x);var x;const k=c("HTMLFormElement"),L=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),_=c("RegExp"),z=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};S(n,((n,i)=>{let o;!1!==(o=e(n,i,t))&&(r[i]=o||n)})),Object.defineProperties(t,r)},B="abcdefghijklmnopqrstuvwxyz",P="0123456789",U={DIGIT:P,ALPHA:B,ALPHA_DIGIT:B+B.toUpperCase()+P},R=c("AsyncFunction"),Q=(Y="function"==typeof setImmediate,V=y(T.postMessage),Y?setImmediate:V?(H=`axios@${Math.random()}`,G=[],T.addEventListener("message",(({source:t,data:e})=>{t===T&&e===H&&G.length&&G.shift()()}),!1),t=>{G.push(t),T.postMessage(H,"*")}):t=>setTimeout(t));var Y,V,H,G;const Z="undefined"!=typeof queueMicrotask?queueMicrotask.bind(T):void 0!==i&&i.nextTick||Q,W={isArray:h,isArrayBuffer:p,isBuffer:function(t){return null!==t&&!f(t)&&null!==t.constructor&&!f(t.constructor)&&y(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||y(t.append)&&("formdata"===(e=u(t))||"object"===e&&y(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&p(t.buffer),e},isString:d,isNumber:m,isBoolean:t=>!0===t||!1===t,isObject:g,isPlainObject:D,isReadableStream:C,isRequest:j,isResponse:A,isHeaders:N,isUndefined:f,isDate:v,isFile:M,isBlob:b,isRegExp:_,isFunction:y,isStream:t=>g(t)&&y(t.pipe),isURLSearchParams:E,isTypedArray:O,isFileList:w,forEach:S,merge:function t(){const{caseless:e}=F(this)&&this||{},n={},r=(r,i)=>{const o=e&&I(n,i)||i;D(n[o])&&D(r)?n[o]=t(n[o],r):D(r)?n[o]=t({},r):h(r)?n[o]=r.slice():n[o]=r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&S(arguments[t],r);return n},extend:(t,n,r,{allOwnKeys:i}={})=>(S(n,((n,i)=>{r&&y(n)?t[i]=e(n,r):t[i]=n}),{allOwnKeys:i}),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 i,o,u;const s={};if(e=e||{},null==t)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)u=i[o],r&&!r(u,t,e)||s[u]||(e[u]=t[u],s[u]=!0);t=!1!==n&&a(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:u,kindOfTest:c,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(h(t))return t;let e=t.length;if(!m(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:k,hasOwnProperty:L,hasOwnProp:L,reduceDescriptors:z,freezeMethods:t=>{z(t,((e,n)=>{if(y(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];y(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 h(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:I,global:T,isContextDefined:F,ALPHABET:U,generateString:(t=16,e=U.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&y(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(g(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const i=h(t)?[]:{};return S(t,((t,e)=>{const o=n(t,r+1);!f(o)&&(i[e]=o)})),e[r]=void 0,i}}return t};return n(t,0)},isAsyncFn:R,isThenable:t=>t&&(g(t)||y(t))&&y(t.then)&&y(t.catch),setImmediate:Q,asap:Z};function q(t,e,n,r,i){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),i&&(this.response=i,this.status=i.status?i.status:null)}W.inherits(q,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:W.toJSONObject(this.config),code:this.code,status:this.status}}});const K=q.prototype,J={};["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=>{J[t]={value:t}})),Object.defineProperties(q,J),Object.defineProperty(K,"isAxiosError",{value:!0}),q.from=(t,e,n,r,i,o)=>{const a=Object.create(K);return W.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),q.call(a,t.message,e,n,r,i),a.cause=t,a.name=t.name,o&&Object.assign(a,o),a};const X=q;var $=n(287).hp;function tt(t){return W.isPlainObject(t)||W.isArray(t)}function et(t){return W.endsWith(t,"[]")?t.slice(0,-2):t}function nt(t,e,n){return t?t.concat(e).map((function(t,e){return t=et(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const rt=W.toFlatObject(W,{},null,(function(t){return/^is[A-Z]/.test(t)})),it=function(t,e,n){if(!W.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!W.isUndefined(e[t])}))).metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,u=(n.Blob||"undefined"!=typeof Blob&&Blob)&&W.isSpecCompliantForm(e);if(!W.isFunction(i))throw new TypeError("visitor must be a function");function s(t){if(null===t)return"";if(W.isDate(t))return t.toISOString();if(!u&&W.isBlob(t))throw new X("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(t)||W.isTypedArray(t)?u&&"function"==typeof Blob?new Blob([t]):$.from(t):t}function c(t,n,i){let u=t;if(t&&!i&&"object"==typeof t)if(W.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(W.isArray(t)&&function(t){return W.isArray(t)&&!t.some(tt)}(t)||(W.isFileList(t)||W.endsWith(n,"[]"))&&(u=W.toArray(t)))return n=et(n),u.forEach((function(t,r){!W.isUndefined(t)&&null!==t&&e.append(!0===a?nt([n],r,o):null===a?n:n+"[]",s(t))})),!1;return!!tt(t)||(e.append(nt(i,n,o),s(t)),!1)}const l=[],h=Object.assign(rt,{defaultVisitor:c,convertValue:s,isVisitable:tt});if(!W.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!W.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),W.forEach(n,(function(n,o){!0===(!(W.isUndefined(n)||null===n)&&i.call(e,n,W.isString(o)?o.trim():o,r,h))&&t(n,r?r.concat(o):[o])})),l.pop()}}(t),e};function ot(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function at(t,e){this._pairs=[],t&&it(t,this,e)}const ut=at.prototype;ut.append=function(t,e){this._pairs.push([t,e])},ut.toString=function(t){const e=t?function(e){return t.call(this,e,ot)}:ot;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const st=at;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 lt(t,e,n){if(!e)return t;const r=n&&n.encode||ct,i=n&&n.serialize;let o;if(o=i?i(e,n):W.isURLSearchParams(e)?e.toString():new st(e,n).toString(r),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}const ht=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){W.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},ft={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},pt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:st,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},dt="undefined"!=typeof window&&"undefined"!=typeof document,yt="object"==typeof navigator&&navigator||void 0,mt=dt&&(!yt||["ReactNative","NativeScript","NS"].indexOf(yt.product)<0),gt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Dt=dt&&window.location.href||"http://localhost",vt={...t,...pt},Mt=function(t){function e(t,n,r,i){let o=t[i++];if("__proto__"===o)return!0;const a=Number.isFinite(+o),u=i>=t.length;return o=!o&&W.isArray(r)?r.length:o,u?(W.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a):(r[o]&&W.isObject(r[o])||(r[o]=[]),e(t,n,r[o],i)&&W.isArray(r[o])&&(r[o]=function(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}(r[o])),!a)}if(W.isFormData(t)&&W.isFunction(t.entries)){const n={};return W.forEachEntry(t,((t,r)=>{e(function(t){return W.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null},bt={transitional:ft,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,i=W.isObject(t);if(i&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return r?JSON.stringify(Mt(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t)||W.isReadableStream(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return it(t,new vt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return vt.isNode&&W.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=W.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return it(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),function(t){if(W.isString(t))try{return(0,JSON.parse)(t),W.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||bt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(W.isResponse(t)||W.isReadableStream(t))return t;if(t&&W.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 X.from(t,X.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}}};W.forEach(["delete","get","head","post","put","patch"],(t=>{bt.headers[t]={}}));const wt=bt,Et=W.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"]),Ct=Symbol("internals");function jt(t){return t&&String(t).trim().toLowerCase()}function At(t){return!1===t||null==t?t:W.isArray(t)?t.map(At):String(t)}function Nt(t,e,n,r,i){return W.isFunction(r)?r.call(this,e,n):(i&&(e=n),W.isString(e)?W.isString(r)?-1!==e.indexOf(r):W.isRegExp(r)?r.test(e):void 0:void 0)}class St{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function i(t,e,n){const i=jt(e);if(!i)throw new Error("header name must be a non-empty string");const o=W.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||e]=At(t))}const o=(t,e)=>W.forEach(t,((t,n)=>i(t,n,e)));if(W.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(W.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))o((t=>{const e={};let n,r,i;return t&&t.split("\n").forEach((function(t){i=t.indexOf(":"),n=t.substring(0,i).trim().toLowerCase(),r=t.substring(i+1).trim(),!n||e[n]&&Et[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(W.isHeaders(t))for(const[e,r]of t.entries())i(r,e,n);else null!=t&&i(e,t,n);return this}get(t,e){if(t=jt(t)){const n=W.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(W.isFunction(e))return e.call(this,t,n);if(W.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=jt(t)){const n=W.findKey(this,t);return!(!n||void 0===this[n]||e&&!Nt(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function i(t){if(t=jt(t)){const i=W.findKey(n,t);!i||e&&!Nt(0,n[i],i,e)||(delete n[i],r=!0)}}return W.isArray(t)?t.forEach(i):i(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const i=e[n];t&&!Nt(0,this[i],i,t,!0)||(delete this[i],r=!0)}return r}normalize(t){const e=this,n={};return W.forEach(this,((r,i)=>{const o=W.findKey(n,i);if(o)return e[o]=At(r),void delete e[i];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(i):String(i).trim();a!==i&&delete e[i],e[a]=At(r),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return W.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&W.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[Ct]=this[Ct]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=jt(t);e[r]||(function(t,e){const n=W.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,i){return this[r].call(this,e,t,n,i)},configurable:!0})}))}(n,t),e[r]=!0)}return W.isArray(t)?t.forEach(r):r(t),this}}St.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),W.reduceDescriptors(St.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),W.freezeMethods(St);const It=St;function Tt(t,e){const n=this||wt,r=e||n,i=It.from(r.headers);let o=r.data;return W.forEach(t,(function(t){o=t.call(n,o,i.normalize(),e?e.status:void 0)})),i.normalize(),o}function Ft(t){return!(!t||!t.__CANCEL__)}function Ot(t,e,n){X.call(this,null==t?"canceled":t,X.ERR_CANCELED,e,n),this.name="CanceledError"}W.inherits(Ot,X,{__CANCEL__:!0});const xt=Ot;function kt(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new X("Request failed with status code "+n.status,[X.ERR_BAD_REQUEST,X.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}const Lt=(t,e,n=3)=>{let r=0;const i=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i,o=0,a=0;return e=void 0!==e?e:1e3,function(u){const s=Date.now(),c=r[a];i||(i=s),n[o]=u,r[o]=s;let l=a,h=0;for(;l!==o;)h+=n[l++],l%=t;if(o=(o+1)%t,o===a&&(a=(a+1)%t),s-i<e)return;const f=c&&s-c;return f?Math.round(1e3*h/f):void 0}}(50,250);return function(t,e){let n,r,i=0,o=1e3/e;const a=(e,o=Date.now())=>{i=o,n=null,r&&(clearTimeout(r),r=null),t.apply(null,e)};return[(...t)=>{const e=Date.now(),u=e-i;u>=o?a(t,e):(n=t,r||(r=setTimeout((()=>{r=null,a(n)}),o-u)))},()=>n&&a(n)]}((n=>{const o=n.loaded,a=n.lengthComputable?n.total:void 0,u=o-r,s=i(u);r=o,t({loaded:o,total:a,progress:a?o/a:void 0,bytes:u,rate:s||void 0,estimated:s&&a&&o<=a?(a-o)/s:void 0,event:n,lengthComputable:null!=a,[e?"download":"upload"]:!0})}),n)},_t=(t,e)=>{const n=null!=t;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},zt=t=>(...e)=>W.asap((()=>t(...e))),Bt=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=W.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0},Pt=vt.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const a=[t+"="+encodeURIComponent(e)];W.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),W.isString(r)&&a.push("path="+r),W.isString(i)&&a.push("domain="+i),!0===o&&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 Ut(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 Rt=t=>t instanceof It?{...t}:t;function Qt(t,e){e=e||{};const n={};function r(t,e,n){return W.isPlainObject(t)&&W.isPlainObject(e)?W.merge.call({caseless:n},t,e):W.isPlainObject(e)?W.merge({},e):W.isArray(e)?e.slice():e}function i(t,e,n){return W.isUndefined(e)?W.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function o(t,e){if(!W.isUndefined(e))return r(void 0,e)}function a(t,e){return W.isUndefined(e)?W.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function u(n,i,o){return o in e?r(n,i):o in t?r(void 0,n):void 0}const s={url:o,method:o,data:o,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:u,headers:(t,e)=>i(Rt(t),Rt(e),!0)};return W.forEach(Object.keys(Object.assign({},t,e)),(function(r){const o=s[r]||i,a=o(t[r],e[r],r);W.isUndefined(a)&&o!==u||(n[r]=a)})),n}const Yt=t=>{const e=Qt({},t);let n,{data:r,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:a,headers:u,auth:s}=e;if(e.headers=u=It.from(u),e.url=lt(Ut(e.baseURL,e.url),t.params,t.paramsSerializer),s&&u.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),W.isFormData(r))if(vt.hasStandardBrowserEnv||vt.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(!1!==(n=u.getContentType())){const[t,...e]=n?n.split(";").map((t=>t.trim())).filter(Boolean):[];u.setContentType([t||"multipart/form-data",...e].join("; "))}if(vt.hasStandardBrowserEnv&&(i&&W.isFunction(i)&&(i=i(e)),i||!1!==i&&Bt(e.url))){const t=o&&a&&Pt.read(a);t&&u.set(o,t)}return e},Vt="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const r=Yt(t);let i=r.data;const o=It.from(r.headers).normalize();let a,u,s,c,l,{responseType:h,onUploadProgress:f,onDownloadProgress:p}=r;function d(){c&&c(),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=It.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());kt((function(t){e(t),d()}),(function(t){n(t),d()}),{data:h&&"text"!==h&&"json"!==h?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 X("Request aborted",X.ECONNABORTED,t,y)),y=null)},y.onerror=function(){n(new X("Network Error",X.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let e=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||ft;r.timeoutErrorMessage&&(e=r.timeoutErrorMessage),n(new X(e,i.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,t,y)),y=null},void 0===i&&o.setContentType(null),"setRequestHeader"in y&&W.forEach(o.toJSON(),(function(t,e){y.setRequestHeader(e,t)})),W.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),h&&"json"!==h&&(y.responseType=r.responseType),p&&([s,l]=Lt(p,!0),y.addEventListener("progress",s)),f&&y.upload&&([u,c]=Lt(f),y.upload.addEventListener("progress",u),y.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=e=>{y&&(n(!e||e.type?new xt(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 g=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(r.url);g&&-1===vt.protocols.indexOf(g)?n(new X("Unsupported protocol "+g+":",X.ERR_BAD_REQUEST,t)):y.send(i||null)}))},Ht=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,r=new AbortController;const i=function(t){if(!n){n=!0,a();const e=t instanceof Error?t:this.reason;r.abort(e instanceof X?e:new xt(e instanceof Error?e.message:e))}};let o=e&&setTimeout((()=>{o=null,i(new X(`timeout ${e} of ms exceeded`,X.ETIMEDOUT))}),e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(i):t.removeEventListener("abort",i)})),t=null)};t.forEach((t=>t.addEventListener("abort",i)));const{signal:u}=r;return u.unsubscribe=()=>W.asap(a),u}},Gt=function*(t,e){let n=t.byteLength;if(!e||n<e)return void(yield t);let r,i=0;for(;i<n;)r=i+e,yield t.slice(i,r),i=r},Zt=(t,e,n,r)=>{const i=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*Gt(n,e)}(t,e);let o,a=0,u=t=>{o||(o=!0,r&&r(t))};return new ReadableStream({async pull(t){try{const{done:e,value:r}=await i.next();if(e)return u(),void t.close();let o=r.byteLength;if(n){let t=a+=o;n(t)}t.enqueue(new Uint8Array(r))}catch(t){throw u(t),t}},cancel:t=>(u(t),i.return())},{highWaterMark:2})},Wt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,qt=Wt&&"function"==typeof ReadableStream,Kt=Wt&&("function"==typeof TextEncoder?(Jt=new TextEncoder,t=>Jt.encode(t)):async t=>new Uint8Array(await new Response(t).arrayBuffer()));var Jt;const Xt=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},$t=qt&&Xt((()=>{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})),te=qt&&Xt((()=>W.isReadableStream(new Response("").body))),ee={stream:te&&(t=>t.body)};var ne;Wt&&(ne=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!ee[t]&&(ee[t]=W.isFunction(ne[t])?e=>e[t]():(e,n)=>{throw new X(`Response type '${t}' is not supported`,X.ERR_NOT_SUPPORT,n)})})));const re={http:null,xhr:Vt,fetch:Wt&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:u,onUploadProgress:s,responseType:c,headers:l,withCredentials:h="same-origin",fetchOptions:f}=Yt(t);c=c?(c+"").toLowerCase():"text";let p,d=Ht([i,o&&o.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=W.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(W.isBlob(t))return t.size;if(W.isSpecCompliantForm(t)){const e=new Request(vt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return W.isArrayBufferView(t)||W.isArrayBuffer(t)?t.byteLength:(W.isURLSearchParams(t)&&(t+=""),W.isString(t)?(await Kt(t)).byteLength:void 0)})(e):n})(l,r))){let t,n=new Request(e,{method:"POST",body:r,duplex:"half"});if(W.isFormData(r)&&(t=n.headers.get("content-type"))&&l.setContentType(t),n.body){const[t,e]=_t(m,Lt(zt(s)));r=Zt(n.body,65536,t,e)}}W.isString(h)||(h=h?"include":"omit");const i="credentials"in Request.prototype;p=new Request(e,{...f,signal:d,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:i?h:void 0});let o=await fetch(p);const a=te&&("stream"===c||"response"===c);if(te&&(u||a&&y)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=o[e]}));const e=W.toFiniteNumber(o.headers.get("content-length")),[n,r]=u&&_t(e,Lt(zt(u),!0))||[];o=new Response(Zt(o.body,65536,n,(()=>{r&&r(),y&&y()})),t)}c=c||"text";let g=await ee[W.findKey(ee,c)||"text"](o,t);return!a&&y&&y(),await new Promise(((e,n)=>{kt(e,n,{data:g,headers:It.from(o.headers),status:o.status,statusText:o.statusText,config:t,request:p})}))}catch(e){if(y&&y(),e&&"TypeError"===e.name&&/fetch/i.test(e.message))throw Object.assign(new X("Network Error",X.ERR_NETWORK,t,p),{cause:e.cause||e});throw X.from(e,e&&e.code,t,p)}})};W.forEach(re,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const ie=t=>`- ${t}`,oe=t=>W.isFunction(t)||null===t||!1===t,ae=t=>{t=W.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let o=0;o<e;o++){let e;if(n=t[o],r=n,!oe(n)&&(r=re[(e=String(n)).toLowerCase()],void 0===r))throw new X(`Unknown adapter '${e}'`);if(r)break;i[e||"#"+o]=r}if(!r){const t=Object.entries(i).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(ie).join("\n"):" "+ie(t[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function ue(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new xt(null,t)}function se(t){return ue(t),t.headers=It.from(t.headers),t.data=Tt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ae(t.adapter||wt.adapter)(t).then((function(e){return ue(t),e.data=Tt.call(t,t.transformResponse,e),e.headers=It.from(e.headers),e}),(function(e){return Ft(e)||(ue(t),e&&e.response&&(e.response.data=Tt.call(t,t.transformResponse,e.response),e.response.headers=It.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 le={};ce.transitional=function(t,e,n){function r(t,e){return"[Axios v1.7.7] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,i,o)=>{if(!1===t)throw new X(r(i," has been removed"+(e?" in "+e:"")),X.ERR_DEPRECATED);return e&&!le[i]&&(le[i]=!0,console.warn(r(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,i,o)}};const he={assertOptions:function(t,e,n){if("object"!=typeof t)throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],a=e[o];if(a){const e=t[o],n=void 0===e||a(e,o,t);if(!0!==n)throw new X("option "+o+" must be "+n,X.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new X("Unknown option "+o,X.ERR_BAD_OPTION)}},validators:ce},fe=he.validators;class pe{constructor(t){this.defaults=t,this.interceptors={request:new ht,response:new ht}}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=Qt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:i}=e;void 0!==n&&he.assertOptions(n,{silentJSONParsing:fe.transitional(fe.boolean),forcedJSONParsing:fe.transitional(fe.boolean),clarifyTimeoutError:fe.transitional(fe.boolean)},!1),null!=r&&(W.isFunction(r)?e.paramsSerializer={serialize:r}:he.assertOptions(r,{encode:fe.function,serialize:fe.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&W.merge(i.common,i[e.method]);i&&W.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete i[t]})),e.headers=It.concat(o,i);const a=[];let u=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(u=u&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const s=[];let c;this.interceptors.response.forEach((function(t){s.push(t.fulfilled,t.rejected)}));let l,h=0;if(!u){const t=[se.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,s),l=t.length,c=Promise.resolve(e);h<l;)c=c.then(t[h++],t[h++]);return c}l=a.length;let f=e;for(h=0;h<l;){const t=a[h++],e=a[h++];try{f=t(f)}catch(t){e.call(this,t);break}}try{c=se.call(this,f)}catch(t){return Promise.reject(t)}for(h=0,l=s.length;h<l;)c=c.then(s[h++],s[h++]);return c}getUri(t){return lt(Ut((t=Qt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}W.forEach(["delete","get","head","options"],(function(t){pe.prototype[t]=function(e,n){return this.request(Qt(n||{},{method:t,url:e,data:(n||{}).data}))}})),W.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,i){return this.request(Qt(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}pe.prototype[t]=e(),pe.prototype[t+"Form"]=e(!0)}));const de=pe;class ye{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,i){n.reason||(n.reason=new xt(t,r,i),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 ye((function(e){t=e})),cancel:t}}}const me=ye,ge={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(ge).forEach((([t,e])=>{ge[e]=t}));const De=ge,ve=function t(n){const r=new de(n),i=e(de.prototype.request,r);return W.extend(i,de.prototype,r,{allOwnKeys:!0}),W.extend(i,r,null,{allOwnKeys:!0}),i.create=function(e){return t(Qt(n,e))},i}(wt);ve.Axios=de,ve.CanceledError=xt,ve.CancelToken=me,ve.isCancel=Ft,ve.VERSION="1.7.7",ve.toFormData=it,ve.AxiosError=X,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 W.isObject(t)&&!0===t.isAxiosError},ve.mergeConfig=Qt,ve.AxiosHeaders=It,ve.formToJSON=t=>Mt(W.isHTMLForm(t)?new FormData(t):t),ve.getAdapter=ae,ve.HttpStatusCode=De,ve.default=ve;const Me=ve;function be(t){return be="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},be(t)}function we(){we=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==be(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(be(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Ee(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function Ce(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Ee(o,r,i,a,u,"next",t)}function u(t){Ee(o,r,i,a,u,"throw",t)}a(void 0)}))}}function je(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,Ae(r.key),r)}}function Ae(t){var e=function(t){if("object"!=be(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==be(e)?e:e+""}var Ne=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=Me.create({baseURL:e}),this.client.interceptors.request.use((function(t){var e=nn.getApiKey(),n=nn.getAccountId();return e?(t.headers["Waygo-API-Key"]=e,n&&(t.headers["Waygo-Account"]=n),["post","put"].includes(t.method)?t.headers["Content-Type"]="application/json":delete t.headers["Content-Type"],t):(console.error("Must include API key using waygomaps.setApiKey('YOUR-API-KEY'):"),Promise.reject(new Error("API key is missing")))}))},e=[{key:"get",value:function(){var t=Ce(we().mark((function t(e){var n,r,i=arguments;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=i.length>1&&void 0!==i[1]?i[1]:{},t.prev=1,t.next=4,this.client.get(e,{params:n});case 4:return r=t.sent,t.abrupt("return",r.data);case 8:throw t.prev=8,t.t0=t.catch(1),new Error("GET ".concat(e," failed: ").concat(t.t0.message));case 11:case"end":return t.stop()}}),t,this,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()},{key:"post",value:(i=Ce(we().mark((function t(e,n){var r,i,o=arguments;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=o.length>2&&void 0!==o[2]?o[2]:{},t.prev=1,t.next=4,this.client.post(e,n,{params:r});case 4:return i=t.sent,t.abrupt("return",i.data);case 8:throw t.prev=8,t.t0=t.catch(1),new Error("POST ".concat(e," failed: ").concat(t.t0.message));case 11:case"end":return t.stop()}}),t,this,[[1,8]])}))),function(t,e){return i.apply(this,arguments)})},{key:"put",value:(r=Ce(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=Ce(we().mark((function t(e){var n,r,i=arguments;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=i.length>1&&void 0!==i[1]?i[1]:{},t.prev=1,t.next=4,this.client.delete(e,{params:n});case 4:return r=t.sent,t.abrupt("return",r.data);case 8:throw t.prev=8,t.t0=t.catch(1),new Error("DELETE ".concat(e," failed: ").concat(t.t0.message));case 11:case"end":return t.stop()}}),t,this,[[1,8]])}))),function(t){return n.apply(this,arguments)})}],e&&je(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,i}();const Se=Ne;function Ie(t){return Ie="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},Ie(t)}function Te(){Te=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==Ie(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(Ie(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Fe(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function Oe(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Fe(o,r,i,a,u,"next",t)}function u(t){Fe(o,r,i,a,u,"throw",t)}a(void 0)}))}}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,ke(r.key),r)}}function ke(t){var e=function(t){if("object"!=Ie(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ie(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ie(e)?e:e+""}var Le=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:"loadMapView",value:(r=Oe(Te().mark((function t(e){var n,r,i,o=arguments;return Te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:null,t.prev=1,r="/map-views/v1/".concat(e,"/load"),i=n?{map_view_id:n}:{},t.next=6,this.apiManager.get(r,i);case 6:return t.abrupt("return",t.sent);case 9:return t.prev=9,t.t0=t.catch(1),console.error("Error fetching map data:",t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,this,[[1,9]])}))),function(t){return r.apply(this,arguments)})},{key:"loadMapViewSelectionState",value:(n=Oe(Te().mark((function t(e){var n,r,i,o,a,u=arguments;return Te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:null,r=u.length>2&&void 0!==u[2]?u[2]:null,i=u.length>3&&void 0!==u[3]?u[3]:null,t.prev=3,o="/map-views/v1/".concat(e,"/load/selection-state"),a={},n&&(a.map_view_id=n),null!==i&&(a.floor=i),t.next=10,this.apiManager.post(o,r,a);case 10:return t.abrupt("return",t.sent);case 13:return t.prev=13,t.t0=t.catch(3),console.error("Error loading map view selection state:",t.t0),t.abrupt("return",null);case 17:case"end":return t.stop()}}),t,this,[[3,13]])}))),function(t){return n.apply(this,arguments)})}],e&&xe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}();const _e=Le;function ze(t){return ze="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},ze(t)}function Be(){Be=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==ze(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(ze(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Pe(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function Ue(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Pe(o,r,i,a,u,"next",t)}function u(t){Pe(o,r,i,a,u,"throw",t)}a(void 0)}))}}function Re(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"!=ze(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ze(e)?e:e+""}var Ye=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=Ue(Be().mark((function t(e,n,r){var i,o,a,u,s,c=arguments;return Be().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=c.length>3&&void 0!==c[3]?c[3]:0,o=c.length>4&&void 0!==c[4]?c[4]:30,a=c.length>5&&void 0!==c[5]?c[5]:null,t.prev=4,u={q:r,skip:i,limit:o},console.log("params:",u),null!==a&&(u.floor=a),t.next=10,this.apiManager.get("/search/v1/".concat(e,"/").concat(n),u);case 10:return s=t.sent,t.abrupt("return",s);case 14:return t.prev=14,t.t0=t.catch(4),console.error("Error searching query:",t.t0),t.abrupt("return",null);case 18:case"end":return t.stop()}}),t,this,[[4,14]])}))),function(t,e,n){return r.apply(this,arguments)})},{key:"fetchContentPlacementDetails",value:(n=Ue(Be().mark((function t(e){var n;return Be().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));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&&Re(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}();const Ve=Ye;function He(t){return He="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},He(t)}function Ge(){Ge=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==He(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(He(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Ze(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function We(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Ze(o,r,i,a,u,"next",t)}function u(t){Ze(o,r,i,a,u,"throw",t)}a(void 0)}))}}function qe(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,Ke(r.key),r)}}function Ke(t){var e=function(t){if("object"!=He(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=He(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==He(e)?e:e+""}var Je=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:"findPath",value:(i=We(Ge().mark((function t(e,n,r){var i;return Ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i={start_placement_id:n,end_placement_id:r,map_id:e},t.next=4,this.apiManager.post("/routes/v1/path",i);case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error fetching path data:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e,n){return i.apply(this,arguments)})},{key:"findPathFromNodeToPlacement",value:(r=We(Ge().mark((function t(e,n,r){var i;return Ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i={start_node_id:n,end_placement_id:r,map_id:e},t.next=4,this.apiManager.post("/routes/v1/path/node_to_placement",i);case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error fetching path data:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e,n){return r.apply(this,arguments)})},{key:"findClosestNode",value:(n=We(Ge().mark((function t(e,n,r){var i;return Ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i={map_id:e,coordinate:n,floor_num:r},t.next=4,this.apiManager.post("/routes/v1/closest",i);case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error fetching node data:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e,r){return n.apply(this,arguments)})}],e&&qe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,i}();const Xe=Je;function $e(t){return $e="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},$e(t)}function tn(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,en(r.key),r)}}function en(t){var e=function(t){if("object"!=$e(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=$e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$e(e)?e:e+""}const nn=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.accountId=null,this.apiManager=new Se("https://api.waygomaps.com"),this.mapViewApi=new _e(this.apiManager),this.SearchApi=new Ve(this.apiManager),this.RoutesApi=new Xe(this.apiManager)},(e=[{key:"setApiKey",value:function(t){this.apiKey=t}},{key:"getApiKey",value:function(){return this.apiKey}},{key:"setAccountId",value:function(t){this.accountId=t}},{key:"getAccountId",value:function(){return this.accountId}},{key:"getMapViewApi",value:function(){return this.mapViewApi}},{key:"getSearchApi",value:function(){return this.SearchApi}},{key:"getRotuesApi",value:function(){return this.RoutesApi}}])&&tn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());function rn(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 on(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 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 un(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 sn(t,e,n){return(e=ln(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cn(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,ln(r.key),r)}}function ln(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 hn=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]:{};if(!this._listeners[t])return this;var n=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?un(Object(n),!0).forEach((function(e){sn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):un(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e);return n.hasOwnProperty("type")||(n.type=t),this._listeners[t].forEach((function(e,r){try{e(n)}catch(e){console.error(" ❌ Events: Error in listener ".concat(r+1," for event '").concat(t,"':"),e)}})),this}}],e&&cn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function fn(t){return fn="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},fn(t)}function pn(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,dn(r.key),r)}}function dn(t){var e=function(t){if("object"!=fn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=fn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fn(e)?e:e+""}function yn(t,e,n){return e=gn(e),function(t,e){if(e&&("object"==fn(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,mn()?Reflect.construct(e,n||[],gn(t).constructor):e.apply(t,n))}function mn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(mn=function(){return!!t})()}function gn(t){return gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},gn(t)}function Dn(t,e){return Dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Dn(t,e)}const vn=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),yn(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&&Dn(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&&pn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(hn));function Mn(t){return Mn="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},Mn(t)}function bn(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,wn(r.key),r)}}function wn(t){var e=function(t){if("object"!=Mn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Mn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Mn(e)?e:e+""}function En(t,e,n){return e=jn(e),function(t,e){if(e&&("object"==Mn(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,Cn()?Reflect.construct(e,n||[],jn(t).constructor):e.apply(t,n))}function Cn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Cn=function(){return!!t})()}function jn(t){return jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jn(t)}function An(t,e){return An=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},An(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=En(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&&An(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),vn.on(t,e)}},{key:"removeGlobalHandler",value:function(t,e){this.globalHandlers[t]&&(this.globalHandlers[t]=this.globalHandlers[t].filter((function(t){return t!==e})),vn.off(t,e))}},{key:"removeAllGlobalHandlers",value:function(){var t=this,e=function(e){t.globalHandlers[e].forEach((function(t){return vn.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=[]}}])&&bn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(hn);function Sn(t){return Sn="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},Sn(t)}function In(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"!=Sn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Sn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Sn(e)?e:e+""}const Fn=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"],this.isLoading=!1,this.loadingType=null},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),this.mapView.fire("state:".concat(t),e)}},{key:"setLoading",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=(this.isLoading,this.loadingType);this.isLoading=t,this.loadingType=e,t?this.mapView.fire("loading:start",{type:e}):this.mapView.fire("loading:end",{type:e||n})}},{key:"getLoadingState",value:function(){return{isLoading:this.isLoading,loadingType:this.loadingType}}}],e&&In(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();var On=["outdoor-cities-demo","johnson-controls-roadshow-2026"];function xn(t){var e=t*Math.PI/180,n=6378137,r=(Math.pow(n,.5)-Math.pow(6356752.314,.5))/Math.pow(n,.5);return{meterToLat:1/(111132.954-559.822*Math.cos(2*e)+1.175*Math.cos(4*e)),meterToLon:1/(Math.PI*n*Math.cos(e)/(180*Math.pow(1-Math.pow(r,2)*Math.pow(Math.sin(e),2),.5)))}}function kn(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]);var r=t[0],i=t[1],o=e[0],a=e[1],u=xn(a);return{lat:a+i*n*u.meterToLat,lon:o+r*n*u.meterToLon}}function Ln(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]);var r=[];return t.forEach((function(t){var i=kn(t,e,n),o=i.lat,a=i.lon;r.push([a,o])})),r}function _n(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]);var r=e[0],i=e[1],o=t[0],a=t[1],u=xn(i),s=u.meterToLat,c=u.meterToLon,l=(a-i)/n/s;return[Number(((o-r)/n/c).toFixed(2)),Number(l.toFixed(2))]}function zn(t){return zn="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},zn(t)}function Bn(){Bn=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==zn(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(zn(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Pn(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}var Un=null;function Rn(){return"undefined"!=typeof navigator&&void 0!==navigator.geolocation&&"function"==typeof navigator.geolocation.getCurrentPosition}function Qn(){return Yn.apply(this,arguments)}function Yn(){var t;return t=Bn().mark((function t(){var e;return Bn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Rn()){t.next=2;break}return t.abrupt("return","unsupported");case 2:if(void 0!==navigator.permissions&&"function"==typeof navigator.permissions.query){t.next=4;break}return t.abrupt("return","prompt");case 4:return t.prev=4,t.next=7,navigator.permissions.query({name:"geolocation"});case 7:return e=t.sent,t.abrupt("return",e.state);case 11:return t.prev=11,t.t0=t.catch(4),t.abrupt("return","prompt");case 14:case"end":return t.stop()}}),t,null,[[4,11]])})),Yn=function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Pn(o,r,i,a,u,"next",t)}function u(t){Pn(o,r,i,a,u,"throw",t)}a(void 0)}))},Yn.apply(this,arguments)}function Vn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.enableHighAccuracy,n=void 0===e||e,r=t.timeout,i=void 0===r?1e4:r,o=t.maximumAge,a=void 0===o?3e4:o;return new Promise((function(t,e){if(Rn()){var r=Un?Date.now()-Un.timestamp>3e4?(Un=null,null):Un:null;r?t(r):navigator.geolocation.getCurrentPosition((function(e){var n={coordinate:[e.coords.longitude,e.coords.latitude],accuracy:e.coords.accuracy,timestamp:Date.now()};Un=n,t(n)}),(function(t){var n;switch(t.code){case 1:n="DENIED";break;case 2:default:n="UNAVAILABLE";break;case 3:n="TIMEOUT"}e({code:n,message:t.message})}),{enableHighAccuracy:n,timeout:i,maximumAge:a})}else e({code:"UNAVAILABLE",message:"Geolocation is not supported by this browser."})}))}function Hn(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 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)}var Zn,Wn="desktop",qn="mobile",Kn="kiosk",Jn=[Wn,qn,Kn],Xn={min:15,max:48},$n=["bottomEdgeHeightInches","screenHeightInches","screenWidthInches","pixelsPerInch"];function tr(t){return"number"==typeof t&&Number.isFinite(t)&&t>0}function er(t){return"string"==typeof t&&""!==t.trim()}function nr(t){return null!==t&&"object"===Gn(t)&&!Array.isArray(t)}function rr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=null!=t.viewType?t.viewType:null,r=null!=t.viewTypeData?t.viewTypeData:null,i=null;null!=t.location&&(er(t.location)?i=t.location:e.push("`location` must be a non-empty string; ignoring it."));var o=null;if(null!==n){var a="string"==typeof n?n.trim().toLowerCase():null;a&&Jn.includes(a)?o=a:e.push('Invalid viewType "'.concat(n,'". Expected one of: ').concat(Jn.join(", "),". Falling back to automatic desktop/mobile detection."))}var u=null;null!==r&&(nr(r)?u=r:e.push("viewTypeData must be an object; ignoring it."));var s=!1;null===o&&null!==i&&(o=Kn,s=!0,e.push("`location` was set without a viewType — enabling kiosk mode for backwards compatibility. Prefer viewType: 'kiosk' with viewTypeData: { location } going forward.")),null===o&&null!==u&&(e.push("viewTypeData was provided without a viewType (and no legacy `location`); ignoring it and detecting desktop/mobile from the map width."),u=null);var c,l=i,h=null;if(o===Kn){var f=null;u&&null!=u.location&&(er(u.location)?f=u.location:e.push("viewTypeData.location must be a non-empty string; ignoring it.")),null!==f&&null!==i&&f!==i&&e.push("Both viewTypeData.location and the legacy `location` option were set; using viewTypeData.location."),l=null!==f?f:i;var p=function(t){var e=[];if(null==t)return{mount:null,warnings:e};if(!nr(t))return e.push("viewTypeData.mount must be an object; ignoring it."),{mount:null,warnings:e};var n={bottomEdgeHeightInches:null,screenHeightInches:null,screenWidthInches:null,pixelsPerInch:null};$n.forEach((function(r){null!=t[r]&&(tr(t[r])?n[r]=t[r]:e.push("viewTypeData.mount.".concat(r," must be a positive, finite number; ignoring it.")))}));var r=Object.keys(t).filter((function(t){return!$n.includes(t)}));return r.length>0&&e.push("viewTypeData.mount has unrecognized properties (".concat(r.join(", "),"); expected ").concat($n.join(", "),".")),$n.some((function(t){return null!==n[t]}))?((null===n.bottomEdgeHeightInches||null===n.screenHeightInches&&null===n.pixelsPerInch)&&e.push('Kiosk mount data needs bottomEdgeHeightInches plus screenHeightInches (or pixelsPerInch) to place the 15–48" reach band; the conservative default layout will be used until both are provided.'),{mount:n,warnings:e}):(e.push("viewTypeData.mount contained no usable measurements; ignoring it."),{mount:null,warnings:e})}(u?u.mount:null),d=p.mount,y=p.warnings;e.push.apply(e,function(t){if(Array.isArray(t))return Hn(t)}(c=y)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(c)||function(t,e){if(t){if("string"==typeof t)return Hn(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)?Hn(t,e):void 0}}(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),null===l&&e.push('Kiosk view type enabled without a `location` node id — "directions from here" and the QR hand-off need a fixed kiosk position.'),u&&null!=u.mount||e.push('Kiosk view type enabled without mount data (viewTypeData.mount) — the 15–48" reach band cannot be computed, so the conservative default layout will be used. Provide it for accessibility-compliant installs.'),h={location:l,mount:d}}else null!==o&&(null!==i&&e.push("viewType '".concat(o,"' was explicitly set, so the legacy `location` option no longer enables kiosk mode; it is kept only as the fixed directions start point.")),null!==u&&e.push("viewType '".concat(o,"' does not take any viewTypeData today; it is stored but unused.")));return{viewType:o,viewTypeData:u,location:l,kioskConfig:h,legacyKiosk:s,warnings:e}}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 or(t,e){if(t){if("string"==typeof t)return ar(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)?ar(t,e):void 0}}function ar(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 ur(){ur=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==ir(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(ir(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function sr(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function cr(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){sr(o,r,i,a,u,"next",t)}function u(t){sr(o,r,i,a,u,"throw",t)}a(void 0)}))}}function lr(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 hr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?lr(Object(n),!0).forEach((function(e){gr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function fr(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,Dr(r.key),r)}}function pr(t,e,n){return e=yr(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,dr()?Reflect.construct(e,n||[],yr(t).constructor):e.apply(t,n))}function dr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(dr=function(){return!!t})()}function yr(t){return yr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yr(t)}function mr(t,e){return mr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mr(t,e)}function gr(t,e,n){return(e=Dr(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Dr(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+""}var vr={default:"3.5.1","johnson-controls-roadshow-2026":"3.17.0","usbank-del-coronado-2026":"3.17.0","toronto-fifa-world-cup-26":"3.17.0"},Mr={"johnson-controls-roadshow-2026":{text:"Find out more",key:"Registration"}},br=["johnson-controls-roadshow-2026"],wr=["johnson-controls-roadshow-2026"],Er=["usbank-del-coronado-2026","toronto-fifa-world-cup-26"],Cr=["usbank-del-coronado-2026"];function jr(t){var e=vr[t]||vr.default;return{css:"https://api.mapbox.com/mapbox-gl-js/v".concat(e,"/mapbox-gl.css"),js:"https://api.mapbox.com/mapbox-gl-js/v".concat(e,"/mapbox-gl.js")}}var Ar=(gr(gr(gr(gr(gr(gr(gr(gr(gr(gr(Zn={container:"map",sourceId:"2024.2xw_YUXYS8GoDTB2AQgN3A",center:[0,0],floor:0,zoom:13,bearing:0,pitch:22},"bearing",0),"minPitch",0),"maxPitch",60),"minZoom",0),"maxZoom",19.5),"bounds",null),"doubleClickZoom",!0),"dragPan",!0),"dragRotate",!0),"scrollZoom",!0),gr(gr(gr(gr(gr(gr(gr(gr(gr(gr(Zn,"touchPitch",!0),"touchZoomRotate",!0),"interactive",!0),"trackResize",!0),"keyboard",!0),"defaultControls",!1),"setup",!1),"selectionCriteria",null),"initialState","default"),"initialStateData",null),gr(gr(gr(gr(Zn,"viewType",null),"viewTypeData",null),"location",null),"showQRCodeInKioskMode",!0)),Nr=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=pr(this,e,[hr(hr({},Ar),n)])).mapViewApi=nn.getMapViewApi(),t.searchApi=nn.getSearchApi(),t.routesApi=nn.getRotuesApi(),t.mapContainer=document.createElement("div"),t.mapContainer.className="inner-map-container",t._userProvidedCenter=Object.prototype.hasOwnProperty.call(n,"center"),t._userProvidedFloor=Object.prototype.hasOwnProperty.call(n,"floor"),t.initialState=n.initialState||"default",t.initialStateData=n.initialStateData||null,t._applyViewTypeConfig(rr({viewType:t.options.viewType,viewTypeData:t.options.viewTypeData,location:t.options.location})),"selection"===t.initialState&&(t._createSelectionLoadingOverlay(),t._showSelectionLoadingOverlay()),t._currentFloorIndex=t.options.floor,t._defaultFloorIndex=t.options.floor||0,t._defaultZoom=t.options.zoom||13,t._defaultBearing=t.options.bearing||0,t._defaultPitch=t.options.pitch||0,t.ready=t._initialize(n),t.initialLoad=!1,t.originalFilters={},t.mapData=null,t._stateCoordinator=new Fn(t),t.defaultControls=n.defaultControls,t.setupControl=null,t.modalContainer=null,t.selectionCriteria=n.selectionCriteria||null,t.multiSelect=!0,t.confirmedSelection=null,t.kioskResetTimer=null,t.kioskCountdownInterval=null,t._kioskResetListenersAttached=!1,t.gpsEnabled=!1,t.gpsPermissionState="prompt",t.viewType===Kn?t._initializeKioskReset():console.log("📍 Not in kiosk mode - no auto-reset timer"),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&&mr(t,e)}(e,t),n=e,r=[{key:"_applyViewTypeConfig",value:function(t){t.warnings.forEach((function(t){return console.warn("⚠️ MapView: ".concat(t))})),this.viewType=t.viewType,this.viewTypeData=t.viewTypeData,this.location=t.location,this.kioskConfig=t.kioskConfig}},{key:"getViewType",value:function(){return this.viewType}},{key:"isKioskMode",get:function(){return this.viewType===Kn}},{key:"setViewType",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n="string"==typeof t?t.trim().toLowerCase():null;if(!Jn.includes(n))return console.warn("⚠️ MapView: setViewType expects one of: ".concat(Jn.join(", "),' — received "').concat(t,'". View type unchanged.')),!1;var r=this.viewType;return this._applyViewTypeConfig(rr({viewType:n,viewTypeData:e,location:this.location})),this.viewType===Kn?this._initializeKioskReset():this._destroyKioskTimer(),this._initializeGps(),this.fire("viewTypeChanged",{viewType:this.viewType,previousViewType:r,viewTypeData:this.viewTypeData}),!0}},{key:"getKioskReachBand",value:function(){if(this.viewType!==Kn||!this.kioskConfig||!this.kioskConfig.mount)return null;var t=this.mapContainer?this.mapContainer.offsetHeight:0;return function(t,e){if(!nr(t)||!tr(e))return null;var n=t.bottomEdgeHeightInches,r=t.screenHeightInches,i=t.pixelsPerInch;if(!tr(n))return null;var o=tr(i)?i:tr(r)?e/r:null;if(!tr(o))return null;var a=n+(tr(r)?r:e/o),u=function(t){return(a-t)*o},s=function(t){return Math.min(Math.max(t,0),e)},c=s(u(Xn.max)),l=s(u(Xn.min));return{topPx:c,bottomPx:l,heightPx:Math.max(0,l-c),pixelsPerInch:o,isOnScreen:l>c}}(this.kioskConfig.mount,t)}},{key:"showModal",value:function(t){var e=this;this.modalContainer||(this.modalContainer=document.createElement("div"),this.modalContainer.className="waygo-map-modal-container",this.mapContainer.appendChild(this.modalContainer),this.modalContainer.addEventListener("click",(function(t){t.target===e.modalContainer&&e.hideModal()})));var n=document.createElement("div");n.className="waygo-map-modal-content","string"==typeof t?n.innerHTML=t:n.appendChild(t),this.modalContainer.innerHTML="",this.modalContainer.appendChild(n),this.modalContainer.style.display="flex"}},{key:"hideModal",value:function(){this.modalContainer&&(this.modalContainer.style.display="none")}},{key:"_initialize",value:(D=cr(ur().mark((function t(){var e,n,r=this;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e=this.options.sourceId.split(".")[0],t.next=4,this._loadMapLibraries(e);case 4:return mapboxgl.clearStorage(),this.render(),t.next=8,this._initializeMapData();case 8:if(this.mapData){t.next=11;break}return console.error("Error initializing map data."),t.abrupt("return");case 11:this._applyMapDataDefaults(),n=this.mapData.style_id,this.mapData.map_id,"undefined"!=typeof mapboxgl&&n?(mapboxgl.accessToken="pk.eyJ1Ijoid2F5Z28tbWFwcyIsImEiOiJjbGtxYzZ1N3QxdG43M210bXFuYmJ4a3gxIn0.tlbznj_fRJ8La6s2UUMO6A",this.map=new mapboxgl.Map({container:this.mapContainer,style:"mapbox://styles/waygo-maps/".concat(n),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("styledata",(function(){r.initialLoad||(r._initializeOriginalFilters(),r.updateFloor(r.options.floor,!1),r.initialLoad=!0)})),this.map.on("style.load",(function(){console.log(mapboxgl.version)})),this.map.on("load",(function(){r.defaultControls&&(r._addLogoImage(),r._addDefaultControls(),r.updateFloor(r.options.floor,!1)),r._initializeState(),r.fire("load",{mapData:r.mapData})})),this._initializeEventListeners()):console.error("Mapbox GL JS is not loaded."),t.next=20;break;case 17:t.prev=17,t.t0=t.catch(0),console.error("Failed to initialize the map:",t.t0);case 20:case"end":return t.stop()}}),t,this,[[0,17]])}))),function(){return D.apply(this,arguments)})},{key:"_addLogoImage",value:function(){if("johnson-controls-roadshow-2026"!==this.mapData.map_id){var t=document.createElement("div");t.className="logo-image-container";var e=document.createElement("img");e.className="logo-outline-element",e.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAxMCIgaGVpZ2h0PSI5NjQiIHZpZXdCb3g9IjAgMCA0MDEwIDk2NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02NTAuNzI2IDI0My40ODRDNTkzLjUyNyAyMTIuNzQ1IDU3My4wOTIgMjA5LjE4MiA1NjEuNjI3IDIwOS4xNzRDNTQ5LjYxMiAyMDkuMTY2IDUyNy42ODEgMjEzLjA2NiA0NjQuOTU0IDI0Ny4wMkwyMDkuMTkxIDQxOC4wOTNMMjA5LjE5MSA3MDIuMzkxTDQ2OS44OTQgNjA4LjY0QzUyNi4yNjcgNTg4LjM2OCA1ODcuOTQxIDU4OC4zNjggNjQ0LjMxMyA2MDguNjRMOTA1LjAxNyA3MDIuMzkxVjI2MC44Nkw5NzcuOTEyIDMxMC44NjhDOTgwLjQ2OCAzMTIuNjIxIDk4Mi45NDggMzE0LjQ1OCA5ODUuMzUxIDMxNi4zNzNDMTAxNS44OCAzNDAuNzEyIDEwMzMuODcgMzc3Ljc0NSAxMDMzLjg3IDQxNy4xMjJWNzAyLjM5MUMxMDMzLjg3IDc0NC4xMDYgMTAxNC41MyA3NzkuOTE4IDk4NS4zNTEgODAzLjE0M0M5ODEuMjk1IDgwNi4zNzEgOTc3LjA1IDgwOS4zNTYgOTcyLjY0IDgxMi4wOEM5NDAuOTEgODMxLjY3NyA5MDAuNjY2IDgzNy43NiA4NjEuNDEyIDgyMy42NDRMNjAwLjcwOSA3MjkuODkzQzU3Mi41MjIgNzE5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ODg0QzMzMDAuMTQgODg0IDM0MDUuNjkgODIxLjEzMSAzNDA1LjY5IDY4Ni4xNzJWMjg2LjMyNEgzMzE2Ljg5Wk0zMTgzLjcgNjIzLjMwM0MzMTA3LjQ2IDYyMy4zMDMgMzA1MC41IDU2Ny4xMzkgMzA1MC41IDQ5MS42OTZDMzA1MC41IDQxNi4yNTMgMzEwNy40NiAzNjAuMDkgMzE4My43IDM2MC4wOUMzMjU5LjkzIDM2MC4wOSAzMzE2Ljg5IDQxNi4yNTMgMzMxNi44OSA0OTEuNjk2QzMzMTYuODkgNTY3LjEzOSAzMjU5LjkzIDYyMy4zMDMgMzE4My43IDYyMy4zMDNaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMzcwOC44NCA3MTYuMzQ5QzM4MzEuOTkgNzE2LjM0OSAzOTMwIDYxOS45NSAzOTMwIDQ5NS44ODhDMzkzMCAzNzAuOTg4IDM4MzEuOTkgMjc1LjQyNyAzNzA4Ljg0IDI3NS40MjdDMzU4Ni41NCAyNzUuNDI3IDM0ODcuNjkgMzcwLjk4OCAzNDg3LjY5IDQ5NS44ODhDMzQ4Ny42OSA2MTkuOTUgMzU4Ni41NCA3MTYuMzQ5IDM3MDguODQgNzE2LjM0OVpNMzcwOC44NCA2MjguMzMyQzM2MzUuMTIgNjI4LjMzMiAzNTc4LjE2IDU3Mi4xNjkgMzU3OC4xNiA0OTUuODg4QzM1NzguMTYgNDE5LjYwNiAzNjM1LjEyIDM2My40NDMgMzcwOC44NCAzNjMuNDQzQzM3ODIuNTYgMzYzLjQ0MyAzODM5LjUzIDQxOS42MDYgMzgzOS41MyA0OTUuODg4QzM4MzkuNTMgNTcyLjE2OSAzNzgyLjU2IDYyOC4zMzIgMzcwOC44NCA2MjguMzMyWiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",n.alt="Clickable image",t.appendChild(n),t.addEventListener("click",(function(){window.open("https://waygomaps.com","_blank")})),this.mapContainer.appendChild(t)}}},{key:"getCurrentFloor",value:function(){return this._currentFloorIndex}},{key:"_addDefaultControls",value:function(){var t=this;("selection"===this._stateCoordinator.state?[new Nh.FloorSelectorControl,new Nh.ContentPlacementControl,new Nh.InteractionControl]:[new Nh.SearchBoxControl,new Nh.FloorSelectorControl,new Nh.CategoryBarControl,new Nh.ContentSearchControl,new Nh.ContentDetailsControl,new Nh.DirectionsControl,new Nh.InteractionControl]).forEach((function(e){return t.addControl(e)}))}},{key:"_initializeOriginalFilters",value:function(){var t=this;this.map.getStyle().layers.forEach((function(e){"background"!==e.type&&"raster"!==e.type&&"heatmap"!==e.type&&(t.originalFilters[e.id]=t.map.getFilter(e.id)||null)}))}},{key:"_initializeEventListeners",value:function(){var t=this,e={passive:!0};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})}),e),this.mapContainer.addEventListener("touchend",(function(e){return t.fire("touchend",{originalEvent:e})}),e),this.mapContainer.addEventListener("touchmove",(function(e){return t.fire("touchmove",{originalEvent:e})}),e),this.mapContainer.addEventListener("touchcancel",(function(e){return t.fire("touchcancel",{originalEvent:e})}),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})}))})),this.on("selection:confirmed",(function(e){t.confirmedSelection=e.feature}))}},{key:"_applyMapDataDefaults",value:function(){if(this.mapData){var t=this.mapData,e=t.reference_coordinate,n=t.default_floor;!this._userProvidedCenter&&function(t){if(!Array.isArray(t)||t.length<2)return!1;var e=Number(t[0]),n=Number(t[1]);return!Number.isNaN(e)&&!Number.isNaN(n)&&!function(t){return!(!Array.isArray(t)||t.length<2)&&0===Number(t[0])&&0===Number(t[1])}(t)}(e)&&(this.options.center=e),this._userProvidedFloor||null==n||(this.options.floor=n,this._currentFloorIndex=n,this._defaultFloorIndex=n)}}},{key:"_initializeMapData",value:(g=cr(ur().mark((function t(){var e,n,r,i;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((e=this.options.sourceId.split(".")).length<1||e.length>2)){t.next=4;break}return console.error('The sourceId format is incorrect. It should be in the format "mapId" or "mapId.mapViewId".'),t.abrupt("return");case 4:return n=e[0],r=e[1],t.prev=6,t.next=9,this.mapViewApi.loadMapView(n,r);case 9:return i=t.sent,this.mapData=i,nn.setAccountId(i.account_id),t.next=14,this._initializeGps();case 14:t.next=19;break;case 16:t.prev=16,t.t0=t.catch(6),console.error("Error fetching map style:",t.t0);case 19:case"end":return t.stop()}}),t,this,[[6,16]])}))),function(){return g.apply(this,arguments)})},{key:"_initializeGps",value:(m=cr(ur().mark((function t(){var e,n,r;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.mapData){t.next=2;break}return t.abrupt("return");case 2:if(e=Er.includes(this.mapData.map_id),n=!!this.options.setup,r=e&&this.viewType!==Kn&&!n&&Rn(),this.gpsEnabled=r,!r){t.next=10;break}return t.next=9,Qn();case 9:this.gpsPermissionState=t.sent;case 10:case"end":return t.stop()}}),t,this)}))),function(){return m.apply(this,arguments)})},{key:"shouldShowGpsCell",value:function(){return this.gpsEnabled&&"denied"!==this.gpsPermissionState&&!this.location}},{key:"shouldRenderDirectionsSteps",value:function(){var t,e=null===(t=this.mapData)||void 0===t?void 0:t.map_id;return!e||!Cr.includes(e)}},{key:"_loadMapLibraries",value:(y=cr(ur().mark((function t(e){var n,r,i;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=jr(e),r=n.css,i=n.js,t.next=3,on(r);case 3:return t.next=5,rn(i);case 5:mapboxgl.clearStorage();case 6:case"end":return t.stop()}}),t)}))),function(t){return y.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:"updateFloor",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.map.getStyle().layers.forEach((function(n){if("background"!==n.type&&"raster"!==n.type&&"heatmap"!==n.type){var r=e.originalFilters[n.id];e.map.setFilter(n.id,r);var i=["==",["get","_floor"],t];if(r){var o=["all",i,r];e.map.setFilter(n.id,o)}else e.map.setFilter(n.id,i)}})),this._currentFloorIndex=t;var o=null!==i?i:this.map.getPitch(),a=null!==r?r:this.map.getBearing();if(n){var u=this.map.getStyle(),s=Object.keys(u.sources),c=[];if(s.forEach((function(n){var r="".concat(t,"-feature"),i=e.map.querySourceFeatures(n,{sourceLayer:r});c=c.concat(i)})),c.length>0){var l=new mapboxgl.LngLatBounds;c.forEach((function(t){var e=t.geometry;"Point"===e.type?l.extend(e.coordinates):"LineString"===e.type?e.coordinates.forEach((function(t){return l.extend(t)})):"Polygon"===e.type&&e.coordinates[0].forEach((function(t){return l.extend(t)}))})),this.map.fitBounds(l,{padding:{top:50,bottom:150,left:50,right:50},duration:1300,maxZoom:15.5,pitch:o,bearing:a})}else this.map.once("moveend",(function(){var n=[];if(s.forEach((function(r){var i="".concat(t,"-feature"),o=e.map.querySourceFeatures(r,{sourceLayer:i});n=n.concat(o)})),n.length>0){var r=new mapboxgl.LngLatBounds;n.forEach((function(t){var e=t.geometry;"Point"===e.type?r.extend(e.coordinates):"LineString"===e.type?e.coordinates.forEach((function(t){return r.extend(t)})):"Polygon"===e.type&&e.coordinates[0].forEach((function(t){return r.extend(t)}))})),e.map.fitBounds(r,{padding:50,duration:1300,maxZoom:15.5,pitch:o,bearing:a})}})),this.map.flyTo({zoom:this.map.getZoom()-3,duration:500,essential:!0})}this.fire("floorChanged",{floorIndex:t})}},{key:"addHighlightedFeature",value:function(t,e){var n=this.map.getSource("highlighted-content"),r=n._data,i={type:"Feature",geometry:{type:"Point",coordinates:t},properties:e};return r.features.push(i),n.setData(r),i}},{key:"addHighlightedDotFeature",value:function(t,e){var n=this.map.getSource("highlighted-content-dots");if(!n)return null;var r=n._data,i={type:"Feature",geometry:{type:"Point",coordinates:t},properties:e};return r.features.push(i),n.setData(r),i}},{key:"addSelectedFeature",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.map.getSource("selected-content"),i=r._data,o={type:"Feature",geometry:{type:"Point",coordinates:t},properties:e};n?i.features.push(o):i.features=[o],r.setData(i)}},{key:"clearSelectedContentLayer",value:function(){this.map.getSource("selected-content").setData({type:"FeatureCollection",features:[]})}},{key:"clearHighlightedContentLayer",value:function(){this.map.getSource("highlighted-content").setData({type:"FeatureCollection",features:[]});var t=this.map.getSource("highlighted-content-dots");t&&t.setData({type:"FeatureCollection",features:[]})}},{key:"addControl",value:function(t){var e=t.onAdd(this);this.mapContainer.appendChild(e)}},{key:"removeControl",value:function(t){this.map.removeControl(t)}},{key:"getCurrentState",value:function(){return this._stateCoordinator.state}},{key:"setToDefaultState",value:function(){this._stateCoordinator.transitionTo("default")}},{key:"setToSearchState",value:(d=cr(ur().mark((function t(e){var n,r,i,o,a=arguments;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:0,r=a.length>2&&void 0!==a[2]?a[2]:30,i=a.length>3&&void 0!==a[3]?a[3]:null,this._stateCoordinator.setLoading(!0,"search"),t.prev=4,t.next=7,this.search(e,n,r,i);case 7:o=t.sent,this._stateCoordinator.transitionTo("search",{query:e,results:o}),t.next=15;break;case 11:t.prev=11,t.t0=t.catch(4),console.error("❌ MapView: Search error occurred:",t.t0),this._stateCoordinator.setLoading(!1,"search");case 15:return t.prev=15,this._stateCoordinator.setLoading(!1,"search"),t.finish(15);case 18:case"end":return t.stop()}}),t,this,[[4,11,15,18]])}))),function(t){return d.apply(this,arguments)})},{key:"setToSelectedContentState",value:(p=cr(ur().mark((function t(e){var n,r;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._stateCoordinator.setLoading(!0,"content"),t.prev=1,n=e[e.length-1],t.next=5,this.getContentPlacementDetails(n);case 5:r=t.sent,this.updateFloor(r.floor),this._stateCoordinator.transitionTo("selectedContent",{contentPlacementIds:e,selectedContentPlacement:r}),t.next=14;break;case 10:t.prev=10,t.t0=t.catch(1),console.error("❌ MapView: Content loading error occurred:",t.t0),this._stateCoordinator.setLoading(!1,"content");case 14:return t.prev=14,this._stateCoordinator.setLoading(!1,"content"),t.finish(14);case 17:case"end":return t.stop()}}),t,this,[[1,10,14,17]])}))),function(t){return p.apply(this,arguments)})},{key:"setToDirectionsState",value:(f=cr(ur().mark((function t(){var e,n,r,i,o,a,u,s,c=arguments;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=c.length>0&&void 0!==c[0]?c[0]:null,n=c.length>1&&void 0!==c[1]?c[1]:null,r=c.length>2&&void 0!==c[2]?c[2]:{},t.prev=3,o=null,a=null,u=!!r.fromLocation,""!==e&&null!=e||(e=null),!r.startNodeId){t.next=13;break}a=r.startNodeId,console.log("🔵 MapView: Using startNodeId from options: ".concat(a)),t.next=33;break;case 13:if(e||null===(i=this.initialStateData)||void 0===i||!i.startNodeId){t.next=18;break}a=this.initialStateData.startNodeId,console.log("🔵 MapView: Using startNodeId from initialStateData: ".concat(a)),t.next=33;break;case 18:if(!e){t.next=33;break}return console.log("🔵 MapView: Attempting to fetch startContentPlacement for ID: ".concat(e)),t.prev=20,t.next=23,this.getContentPlacementDetails(e);case 23:o=t.sent,console.log("🔵 MapView: getContentPlacementDetails returned:",o),o&&o.placement_id?console.log("🔵 MapView: Successfully fetched startContentPlacement with placement_id: ".concat(o.placement_id)):(console.log("🔵 MapView: startContentPlacementId is a node ID (fetch returned invalid result): ".concat(e)),a=e,o=null),t.next=33;break;case 28:t.prev=28,t.t0=t.catch(20),console.log("🔵 MapView: Error fetching startContentPlacement (likely a node ID): ".concat(e),t.t0),a=e,o=null;case 33:if(s=null,!n){t.next=38;break}return t.next=37,this.getContentPlacementDetails(n);case 37:s=t.sent;case 38:console.log("🔵 MapView: Transitioning to directions state with:",{startContentPlacement:!!o,endContentPlacement:!!s,startNodeId:a}),this._stateCoordinator.transitionTo("directions",{startContentPlacement:o,endContentPlacement:s,startNodeId:a,fromLocation:u}),t.next=45;break;case 42:t.prev=42,t.t1=t.catch(3),console.error("❌ MapView: Directions state error occurred:",t.t1);case 45:case"end":return t.stop()}}),t,this,[[3,42],[20,28]])}))),function(){return f.apply(this,arguments)})},{key:"setToSetupState",value:(h=cr(ur().mark((function t(){return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.map&&this.map.easeTo({pitch:0,bearing:0,duration:0}),this.setupControl||(this.setupControl=new Nh.SetupControl,this.addControl(this.setupControl)),this._stateCoordinator.transitionTo("setup");case 3:case"end":return t.stop()}}),t,this)}))),function(){return h.apply(this,arguments)})},{key:"setToSelectionState",value:(l=cr(ur().mark((function t(e){var n,r,i,o,a,u,s=arguments;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=!(s.length>1&&void 0!==s[1])||s[1],this.selectionCriteria=e,this.multiSelect=n,this._stateCoordinator.setLoading(!0,"selection"),t.prev=4,t.next=7,this.mapViewApi.loadMapViewSelectionState(this.mapData.map_id,this.mapData.map_view_id,e);case 7:a=t.sent,this.selectionGeoJSON=a,console.log("✅ Selection GeoJSON loaded:",{type:null==a?void 0:a.type,featureCount:null==a||null===(r=a.features)||void 0===r?void 0:r.length,firstFeature:null==a||null===(i=a.features)||void 0===i?void 0:i[0],fullData:a}),this._stateCoordinator.transitionTo("selection",{criteria:e,geojson:a,multiSelect:n}),(null==a||null===(o=a.features)||void 0===o?void 0:o.length)>0&&(this.map.easeTo({pitch:0,bearing:0,duration:500}),u=new mapboxgl.LngLatBounds,a&&a.features&&(a.features.forEach((function(t){t.geometry&&t.geometry.coordinates&&("Point"===t.geometry.type?u.extend(t.geometry.coordinates):"LineString"===t.geometry.type?t.geometry.coordinates.forEach((function(t){return u.extend(t)})):"Polygon"===t.geometry.type&&t.geometry.coordinates[0].forEach((function(t){return u.extend(t)})))})),!1===u.isEmpty()&&this.map.fitBounds(u,{padding:80,duration:1e3,maxZoom:16}))),t.next=19;break;case 14:t.prev=14,t.t0=t.catch(4),console.error("❌ Error loading map view selection state:",t.t0),this.selectionGeoJSON=null,this._stateCoordinator.transitionTo("selection",{criteria:e,geojson:null,multiSelect:n});case 19:return t.prev=19,this._stateCoordinator.setLoading(!1,"selection"),t.finish(19);case 22:case"end":return t.stop()}}),t,this,[[4,14,19,22]])}))),function(t){return l.apply(this,arguments)})},{key:"getConfirmedSelection",value:function(){return this.confirmedSelection}},{key:"initiateBack",value:function(){this.fire("initiate:back")}},{key:"initiateSetToSearchState",value:function(){this.fire("initiate:search")}},{key:"initiateFindPath",value:function(t,e){this.fire("initiate:findPath",{startContentPlacementId:t,endContentPlacementId:e})}},{key:"initiateFindPathFromLocation",value:function(t){this.fire("initiate:findPathFromLocation",{location:this.location,endContentPlacement:t})}},{key:"findPath",value:(c=cr(ur().mark((function t(e,n){var r;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._stateCoordinator.setLoading(!0,"directions"),t.prev=1,t.next=4,this.routesApi.findPath(this.mapData.map_id,e,n);case 4:if(!(r=t.sent)){t.next=9;break}return t.abrupt("return",r);case 9:console.error("Failed to find path.");case 10:return t.prev=10,this._stateCoordinator.setLoading(!1,"directions"),t.finish(10);case 13:case"end":return t.stop()}}),t,this,[[1,,10,13]])}))),function(t,e){return c.apply(this,arguments)})},{key:"findPathFromNodeToPlacement",value:(s=cr(ur().mark((function t(e,n){var r;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._stateCoordinator.setLoading(!0,"directions"),t.prev=1,t.next=4,this.routesApi.findPathFromNodeToPlacement(this.mapData.map_id,e,n);case 4:if(!(r=t.sent)){t.next=9;break}return t.abrupt("return",r);case 9:console.error("Failed to find path.");case 10:return t.prev=10,this._stateCoordinator.setLoading(!1,"directions"),t.finish(10);case 13:case"end":return t.stop()}}),t,this,[[1,,10,13]])}))),function(t,e){return s.apply(this,arguments)})},{key:"useCurrentLocation",value:(u=cr(ur().mark((function t(e){var n,r,i,o,a,u,s,c,l;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.location){t.next=2;break}return t.abrupt("return");case 2:if(this.gpsEnabled&&this.mapData){t.next=5;break}return this.fire("gps:fallback",{reason:"UNAVAILABLE"}),t.abrupt("return");case 5:return this._stateCoordinator.setLoading(!0,"directions"),t.prev=6,t.prev=7,t.next=10,Vn();case 10:n=t.sent,this.gpsPermissionState="granted",t.next=19;break;case 14:return t.prev=14,t.t0=t.catch(7),t.t0&&"DENIED"===t.t0.code&&(this.gpsPermissionState="denied"),this.fire("gps:fallback",{reason:t.t0&&t.t0.code||"UNAVAILABLE"}),t.abrupt("return");case 19:return r=this.mapData.reference_coordinate||[0,0],i=this.mapData.coordinate_scaling_multiplier||1,o=_n(n.coordinate,r,i),a=null!=this.mapData.default_floor?this.mapData.default_floor:0,t.next=25,this.routesApi.findClosestNode(this.mapData.map_id,o,a);case 25:if((u=t.sent)&&u.node_id){t.next=29;break}return this.fire("gps:fallback",{reason:"NO_NODE"}),t.abrupt("return");case 29:if(s=u.position_x-o[0],c=u.position_y-o[1],!((l=Math.sqrt(s*s+c*c))>500)){t.next=36;break}return console.log("🔵 MapView: GPS too far from nearest node (".concat(l.toFixed(1),"m > ").concat(500,"m)")),this.fire("gps:fallback",{reason:"TOO_FAR"}),t.abrupt("return");case 36:return t.next=38,this.setToDirectionsState(null,e,{startNodeId:u.node_id,fromLocation:!0});case 38:t.next=44;break;case 40:t.prev=40,t.t1=t.catch(6),console.error("❌ MapView: useCurrentLocation error:",t.t1),this.fire("gps:fallback",{reason:"UNAVAILABLE"});case 44:return t.prev=44,this._stateCoordinator.setLoading(!1,"directions"),t.finish(44);case 47:case"end":return t.stop()}}),t,this,[[6,40,44,47],[7,14]])}))),function(t){return u.apply(this,arguments)})},{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:(a=cr(ur().mark((function t(e){var n,r,i,o,a=arguments;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=a.length>1&&void 0!==a[1]?a[1]:0,r=a.length>2&&void 0!==a[2]?a[2]:30,i=a.length>3&&void 0!==a[3]?a[3]:null,""!==e){t.next=5;break}return t.abrupt("return");case 5:if(this.mapData){t.next=7;break}return t.abrupt("return");case 7:return o="searchable_data_string","johnson-controls-roadshow-2026"===this.mapData.map_id&&(o=null),t.prev=9,t.next=12,this.searchApi.search(this.mapData.map_id,this.mapData.map_view_id,e,n,r,i,o);case 12:return t.abrupt("return",t.sent);case 15:t.prev=15,t.t0=t.catch(9),axios.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 18:case"end":return t.stop()}}),t,this,[[9,15]])}))),function(t){return a.apply(this,arguments)})},{key:"getContentPlacementDetails",value:(o=cr(ur().mark((function t(e){var n;return ur().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 n=t.sent,t.abrupt("return",n);case 7:t.prev=7,t.t0=t.catch(0),axios.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Fetching content placement details error:",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return o.apply(this,arguments)})},{key:"flyTo",value:function(t){this.map.flyTo(t)}},{key:"removeMatchingFeaturesFromExistingLayers",value:function(t){var e=this;this.map.getStyle().layers.forEach((function(n){if("background"!==n.type&&"raster"!==n.type&&"heatmap"!==n.type){var r=n.id;if(r.includes("selectable-")||r.includes("booked-")||r.includes("selected-feature")||r.includes("confirmed-selection"))return;for(var i=e.map.getFilter(r),o=null,a=function(){var t,e=function(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,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||or(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.")}()}(s[u],2),n=e[0],r=e[1];if(Array.isArray(r)){var i=r.map((function(t){return["==",["get",n],t]}));t=["any"].concat(function(t){return function(t){if(Array.isArray(t))return ar(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||or(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i))}else t=["==",["get",n],r];o=null===o?t:["all",o,t]},u=0,s=Object.entries(t);u<s.length;u++)a();var c=["!",o];if(c)if(i){var l=["all",i,c];e.map.setFilter(r,l)}else e.map.setFilter(r,c)}}))}},{key:"_getLabelGeometry",value:function(t){var e,n,r,i=(null===(e=this.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],o=(null===(n=this.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30,a=(null===(r=this.mapData)||void 0===r?void 0:r.map_id)||null;if(On.includes(a))return t.geometry;if(t.properties.label_location){var u=t.properties.label_location;if("string"==typeof u)try{u=JSON.parse(u)}catch(e){return console.warn("Failed to parse label_location JSON:",e),t.geometry}if(u&&u.coordinates&&Array.isArray(u.coordinates)&&u.coordinates.length>=2){var s=u.coordinates;if("number"==typeof s[0]&&"number"==typeof s[1]){var c=Ln([s],i,o);return{type:"Point",coordinates:[Math.round(1e6*c[0][0])/1e6,Math.round(1e6*c[0][1])/1e6]}}}}return t.geometry}},{key:"_findOriginalFeature",value:function(t){return this.selectionGeoJSON&&this.selectionGeoJSON.features?this.selectionGeoJSON.features.find((function(e){return e.properties.feature_id===t})):null}},{key:"createSelectableContentLayers",value:function(){var t=this,e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null)||this.selectionGeoJSON;if(e&&e.features)try{var n,r;this.map.getLayer("selectable-label-layer")&&this.map.removeLayer("selectable-label-layer"),this.map.getLayer("selectable-outline-layer")&&this.map.removeLayer("selectable-outline-layer"),this.map.getLayer("selectable-fill-layer")&&this.map.removeLayer("selectable-fill-layer"),this.map.getLayer("booked-label-layer")&&this.map.removeLayer("booked-label-layer"),this.map.getLayer("booked-fill-layer")&&this.map.removeLayer("booked-fill-layer"),this.map.getSource("selectable-labels")&&this.map.removeSource("selectable-labels"),this.map.getSource("selectable-content")&&this.map.removeSource("selectable-content"),this.map.getSource("booked-labels")&&this.map.removeSource("booked-labels"),this.map.getSource("booked-content")&&this.map.removeSource("booked-content");var i=(null===(n=this.mapData)||void 0===n?void 0:n.reference_coordinate)||[0,0],o=(null===(r=this.mapData)||void 0===r?void 0:r.coordinate_scaling_multiplier)||30,a=e.features,u=a.filter((function(t){return"booked"!==t.properties.booking_status})),s=a.filter((function(t){return"booked"===t.properties.booking_status})),c={type:"FeatureCollection",features:u},l={type:"FeatureCollection",features:s};this.map.addSource("selectable-content",{type:"geojson",data:c,promoteId:"feature_id"}),this.map.addSource("booked-content",{type:"geojson",data:l,promoteId:"feature_id"});var h=u.map((function(t){return{type:"Feature",geometry:t.properties.label_location?{type:"Point",coordinates:Ln([t.properties.label_location.coordinates],i,o)[0]}:t.geometry,properties:t.properties}})),f=s.map((function(t){return{type:"Feature",geometry:t.properties.label_location?{type:"Point",coordinates:Ln([t.properties.label_location.coordinates],i,o)[0]}:t.geometry,properties:t.properties}}));this.map.addSource("selectable-labels",{type:"geojson",data:{type:"FeatureCollection",features:h}}),this.map.addSource("booked-labels",{type:"geojson",data:{type:"FeatureCollection",features:f}});var p=document.createElement("canvas");p.width=48,p.height=48;var d=p.getContext("2d");d.scale(1,1),d.fillStyle="white",d.beginPath(),d.arc(24,24,20,0,2*Math.PI),d.fill(),d.strokeStyle="#00C853",d.lineWidth=3,d.stroke(),d.strokeStyle="#00C853",d.lineWidth=4,d.lineCap="round",d.lineJoin="round",d.beginPath(),d.moveTo(14,24),d.lineTo(20,30),d.lineTo(34,16),d.stroke();var y=p.toDataURL("image/png");this.map.loadImage(y,(function(e,n){e?console.error("❌ Error loading canvas checkmark icon:",e):(t.map.addImage("checkmark-icon",n),t.map.getLayer("confirmed-selection-icon-layer")||t.map.addLayer({id:"confirmed-selection-icon-layer",type:"symbol",source:"confirmed-selection-labels",layout:{"icon-image":"checkmark-icon","icon-size":.6,"icon-anchor":"center","icon-allow-overlap":!0}}))})),this.map.addSource("confirmed-selection-labels",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.addLayer({id:"confirmed-selection-label-layer",type:"symbol",source:"confirmed-selection-labels",layout:{"text-field":["get","name"],"text-font":["Inter Medium","Arial Unicode MS Regular"],"text-size":["interpolate",["exponential",1.99],["zoom"],12,1.5,22,1e3]},paint:{"text-color":"#00C853","text-halo-color":"#ffffff","text-halo-width":1}}),this.map.addSource("confirmed-selection",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.addLayer({id:"booked-fill-layer",type:"fill",source:"booked-content",paint:{"fill-color":"#f2f2f2","fill-opacity":1}}),this.map.addLayer({id:"booked-label-layer",type:"symbol",source:"booked-labels",layout:{"text-field":["get","name"],"text-font":["Inter Medium","Arial Unicode MS Regular"],"text-size":["interpolate",["exponential",1.99],["zoom"],12,1.5,22,1e3]},paint:{"text-color":"#666666","text-halo-color":"#ffffff","text-halo-width":1}}),this.map.addLayer({id:"selectable-fill-layer",type:"fill",source:"selectable-content",paint:{"fill-color":"#FFFFFF","fill-opacity":.8}}),this.map.addLayer({id:"selectable-outline-layer",type:"line",source:"selectable-content",paint:{"line-color":"#1987ff","line-width":2}}),this.map.addLayer({id:"confirmed-selection-fill-layer",type:"fill",source:"confirmed-selection",paint:{"fill-color":"#d1fae2","fill-opacity":["interpolate",["linear"],["zoom"],10,.6,16,.8]}}),this.map.addLayer({id:"confirmed-selection-outline-layer",type:"line",source:"confirmed-selection",paint:{"line-color":"#00C853","line-width":2,"line-opacity":["interpolate",["linear"],["zoom"],10,.7,16,1]}}),this.map.addLayer({id:"selectable-label-layer",type:"symbol",source:"selectable-labels",layout:{"text-field":["get","name"],"text-font":["Inter Medium","Arial Unicode MS Regular"],"text-size":["interpolate",["exponential",1.99],["zoom"],12,1.5,22,1e3]},paint:{"text-color":"#0263ca","text-halo-color":"#ffffff","text-halo-width":1}}),this.map.getStyle().layers.filter((function(t){return t.id.includes("selectable-")||t.id.includes("booked-")||t.id.includes("confirmed-selection")}))}catch(t){console.error("❌ ERROR:",t),console.error("Stack:",t.stack)}else console.error("❌ NO DATA TO CREATE LAYERS")}},{key:"removeSelectableContentLayers",value:function(){var t=this;["selectable-label-layer","selectable-outline-layer","selectable-fill-layer","booked-label-layer","booked-fill-layer","confirmed-selection-fill-layer","confirmed-selection-outline-layer","confirmed-selection-icon-layer","confirmed-selection-label-layer"].forEach((function(e){t.map.getLayer(e)&&t.map.removeLayer(e)})),this.map.getSource("selectable-content")&&this.map.removeSource("selectable-content"),this.map.getSource("selectable-labels")&&this.map.removeSource("selectable-labels"),this.map.getSource("booked-content")&&this.map.removeSource("booked-content"),this.map.getSource("booked-labels")&&this.map.removeSource("booked-labels"),this.map.getSource("confirmed-selection")&&this.map.removeSource("confirmed-selection"),this.map.getSource("confirmed-selection-labels")&&this.map.removeSource("confirmed-selection-labels"),this.map.hasImage("checkmark-icon")&&this.map.removeImage("checkmark-icon")}},{key:"clearSelectionLayers",value:function(){var t=this.map.getSource("confirmed-selection"),e=this.map.getSource("confirmed-selection-labels");t&&t.setData({type:"FeatureCollection",features:[]}),e&&e.setData({type:"FeatureCollection",features:[]})}},{key:"addConfirmedSelectionFeature",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.map.getSource("confirmed-selection"),i=this.map.getSource("confirmed-selection-labels"),o=this.map.getSource("selectable-content"),a=this.map.getSource("selectable-labels");if(r&&i&&o&&a){var u=r._data,s=i._data,c=o._data,l=a._data,h=t.properties.feature_id;if(n&&(u.features.forEach((function(t){var n=t.properties.feature_id,r=e._findOriginalFeature(n);r?(c.features.push(r),l.features.push({type:"Feature",geometry:e._getLabelGeometry(r),properties:r.properties})):(console.warn("⚠️ Original feature not found for feature:",n),c.features.push(t),l.features.push({type:"Feature",geometry:e._getLabelGeometry(t),properties:t.properties}))})),u.features=[],s.features=[]),!u.features.some((function(t){return t.properties.feature_id===h}))){u.features.push(t),r.setData(u);var f={type:"Feature",geometry:this._getLabelGeometry(t),properties:t.properties};s.features.push(f),i.setData(s),c.features=c.features.filter((function(t){return t.properties.feature_id!==h})),o.setData(c),l.features=l.features.filter((function(t){return t.properties.feature_id!==h})),a.setData(l)}}else console.error("❌ Required sources not found for confirmed selection")}},{key:"removeConfirmedSelectionFeature",value:function(t){var e=this.map.getSource("confirmed-selection"),n=this.map.getSource("confirmed-selection-labels"),r=this.map.getSource("selectable-content"),i=this.map.getSource("selectable-labels");if(e&&n&&r&&i){var o=e._data,a=n._data,u=r._data,s=i._data,c=o.features.find((function(e){return e.properties.feature_id===t}));if(c){var l=this._findOriginalFeature(t);if(l){u.features.push(l),r.setData(u);var h={type:"Feature",geometry:this._getLabelGeometry(l),properties:l.properties};s.features.push(h),i.setData(s)}else{console.warn("⚠️ Original feature not found for feature:",t);var f=c;u.features.push(f),r.setData(u);var p={type:"Feature",geometry:this._getLabelGeometry(f),properties:f.properties};s.features.push(p),i.setData(s)}o.features=o.features.filter((function(e){return e.properties.feature_id!==t})),e.setData(o),a.features=a.features.filter((function(e){return e.properties.feature_id!==t})),n.setData(a)}}else console.error("❌ Required sources not found for confirmed selection")}},{key:"getConfirmedSelectionFeatures",value:function(){var t=this.map.getSource("confirmed-selection");return t&&t._data.features||[]}},{key:"isFeatureSelected",value:function(t){return this.getConfirmedSelectionFeatures().some((function(e){return e.properties.placement_id===t||e.properties.feature_id===t}))}},{key:"_initializeState",value:(i=cr(ur().mark((function t(){var e,n;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,t.t0=this.initialState,t.next="default"===t.t0?4:"search"===t.t0?6:"selectedContent"===t.t0?13:"directions"===t.t0?20:"selection"===t.t0?23:"setup"===t.t0?32:35;break;case 4:return this._stateCoordinator.transitionTo("default"),t.abrupt("break",38);case 6:if(!this.initialStateData||!this.initialStateData.query){t.next=11;break}return t.next=9,this.setToSearchState(this.initialStateData.query,this.initialStateData.skip||0,this.initialStateData.limit||30,this.initialStateData.floor||null);case 9:t.next=12;break;case 11:console.warn("⚠️ Search state requires initialStateData with query property");case 12:return t.abrupt("break",38);case 13:if(!this.initialStateData||!this.initialStateData.contentPlacementIds){t.next=18;break}return t.next=16,this.setToSelectedContentState(this.initialStateData.contentPlacementIds);case 16:t.next=19;break;case 18:console.warn("⚠️ SelectedContent state requires initialStateData with contentPlacementIds property");case 19:return t.abrupt("break",38);case 20:return t.next=22,this.setToDirectionsState((null===(e=this.initialStateData)||void 0===e?void 0:e.startContentPlacementId)||null,(null===(n=this.initialStateData)||void 0===n?void 0:n.endContentPlacementId)||null);case 22:return t.abrupt("break",38);case 23:if(!this.initialStateData||!this.initialStateData.criteria){t.next=29;break}return t.next=26,this.setToSelectionState(this.initialStateData.criteria,!1!==this.initialStateData.multiSelect);case 26:this._hideSelectionLoadingOverlay(),t.next=31;break;case 29:console.warn("⚠️ Selection state requires initialStateData with criteria property"),this._hideSelectionLoadingOverlay();case 31:return t.abrupt("break",38);case 32:return t.next=34,this.setToSetupState();case 34:return t.abrupt("break",38);case 35:return console.warn("⚠️ Unknown initial state:",this.initialState),this._hideSelectionLoadingOverlay(),t.abrupt("break",38);case 38:t.next=45;break;case 40:t.prev=40,t.t1=t.catch(0),console.error("❌ Error initializing state:",t.t1),this._hideSelectionLoadingOverlay(),this._stateCoordinator.transitionTo("default");case 45:case"end":return t.stop()}}),t,this,[[0,40]])}))),function(){return i.apply(this,arguments)})},{key:"_createSelectionLoadingOverlay",value:function(){this.selectionLoadingOverlay=document.createElement("div"),this.selectionLoadingOverlay.className="selection-loading-overlay";var t=document.createElement("div");t.className="selection-circular-progress";var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("viewBox","0 0 40 40");var n=document.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("class","progress-ring"),n.setAttribute("cx","20"),n.setAttribute("cy","20"),n.setAttribute("r","15");var r=document.createElementNS("http://www.w3.org/2000/svg","circle");r.setAttribute("class","progress-ring-fill"),r.setAttribute("cx","20"),r.setAttribute("cy","20"),r.setAttribute("r","15"),e.appendChild(n),e.appendChild(r),t.appendChild(e),this.selectionLoadingOverlay.appendChild(t);var i=document.getElementById(this.options.container);i?i.appendChild(this.selectionLoadingOverlay):this.mapContainer.appendChild(this.selectionLoadingOverlay)}},{key:"_showSelectionLoadingOverlay",value:function(){if(this.selectionLoadingOverlay){this.selectionLoadingOverlay.style.display="flex";var t=this.selectionLoadingOverlay.querySelector(".progress-ring-fill");t&&(t.classList.remove("animating"),t.style.strokeDashoffset="94.2",setTimeout((function(){t.classList.add("animating")}),50))}}},{key:"_hideSelectionLoadingOverlay",value:function(){if(this.selectionLoadingOverlay){this.selectionLoadingOverlay.classList.add("hidden");var t=this.selectionLoadingOverlay.querySelector(".progress-ring-fill");t&&(t.classList.remove("animating"),t.style.strokeDashoffset="188.4")}}},{key:"_initializeKioskReset",value:function(){var t=this;this._kioskResetListenersAttached||(this._kioskResetListenersAttached=!0,this.on("state:default",(function(){return t._resetKioskTimer()})),this.on("state:search",(function(){return t._resetKioskTimer()})),this.on("state:selectedContent",(function(){return t._resetKioskTimer()})),this.on("state:directions",(function(){return t._resetKioskTimer()})),this.on("state:setup",(function(){return t._resetKioskTimer()})),this.on("state:selection",(function(){return t._resetKioskTimer()})),this.on("moveend",(function(){return t._resetKioskTimer()})),this.on("zoomend",(function(){return t._resetKioskTimer()})),this.on("pitchend",(function(){return t._resetKioskTimer()})),this.on("rotateend",(function(){return t._resetKioskTimer()})),this.on("dragend",(function(){return t._resetKioskTimer()}))),setTimeout((function(){t._startKioskTimer()}),100)}},{key:"_startKioskTimer",value:function(){var t=this;if(this.viewType===Kn){var e=90;this.kioskResetTimer&&clearTimeout(this.kioskResetTimer),this.kioskCountdownInterval&&clearInterval(this.kioskCountdownInterval),this.kioskCountdownInterval=setInterval((function(){--e<=0&&clearInterval(t.kioskCountdownInterval)}),1e3),this.kioskResetTimer=setTimeout((function(){var e=t._stateCoordinator.state,n=(t._currentFloorIndex,t._defaultFloorIndex),r=t._defaultBearing,i=t._defaultPitch;t.hideModal(),t.updateFloor(n,!0,r,i),"default"!==e&&t.setToDefaultState(),t.kioskCountdownInterval&&clearInterval(t.kioskCountdownInterval)}),9e4)}}},{key:"_resetKioskTimer",value:function(){this.viewType===Kn&&(this._stateCoordinator.state,this.kioskResetTimer&&clearTimeout(this.kioskResetTimer),this.kioskCountdownInterval&&clearInterval(this.kioskCountdownInterval),this._startKioskTimer())}},{key:"_destroyKioskTimer",value:function(){this.kioskResetTimer&&(clearTimeout(this.kioskResetTimer),this.kioskResetTimer=null),this.kioskCountdownInterval&&(clearInterval(this.kioskCountdownInterval),this.kioskCountdownInterval=null)}}],r&&fr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o,a,u,s,c,l,h,f,p,d,y,m,g,D}(Nn);const Sr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE4IDZMNiAxOCIgc3Ryb2tlPSIjMTcxNzE3IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNNiA2TDE4IDE4IiBzdHJva2U9IiMxNzE3MTciIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=",Ir="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzI1MzFfOTIpIj4KPHBhdGggZD0iTTEyIDIyQzE3LjUyMjggMjIgMjIgMTcuNTIyOCAyMiAxMkMyMiA2LjQ3NzE1IDE3LjUyMjggMiAxMiAyQzYuNDc3MTUgMiAyIDYuNDc3MTUgMiAxMkMyIDE3LjUyMjggNi40NzcxNSAyMiAxMiAyMloiIHN0cm9rZT0iI0U1RTdFQiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KPHBhdGggZD0iTTE5LjE0MjEgNS4wNzEwN0MxNS4yMzY4IDEuMTY1NzIgOC45MDUzNiAxLjE2NTcyIDUuMDAwMDEgNS4wNzEwNyIgc3Ryb2tlPSIjMTcxNzE3IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzI1MzFfOTIiPgo8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==";function Tr(t){return Tr="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},Tr(t)}function Fr(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,Or(r.key),r)}}function Or(t){var e=function(t){if("object"!=Tr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Tr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Tr(e)?e:e+""}function xr(t,e,n){return e=Lr(e),function(t,e){if(e&&("object"==Tr(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,kr()?Reflect.construct(e,n||[],Lr(t).constructor):e.apply(t,n))}function kr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(kr=function(){return!!t})()}function Lr(t){return Lr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Lr(t)}function _r(t,e){return _r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_r(t,e)}const zr=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=xr(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&&_r(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="",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.loadingIndicator=document.createElement("div"),this.loadingIndicator.className="search-bar-loading-indicator",this.loadingIndicator.innerHTML='<img src="'.concat(Ir,'" alt="Loading" />'),this.loadingIndicator.style.display="none",this.element.appendChild(this.leftButton),this.element.appendChild(this.input),this.element.appendChild(this.loadingIndicator),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(){var t=this,e=window.innerHeight,n=0,r=function(){var i=window.innerHeight;i===e?n+=1:n=0,e=i,n>=3?t.fire("focus"):requestAnimationFrame(r)};requestAnimationFrame(r)}},{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("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iNyIgc3Ryb2tlPSIjMTcxNzE3IiBzdHJva2Utd2lkdGg9IjIiLz4KPHBhdGggZD0iTTIwIDIwTDE3IDE3IiBzdHJva2U9IiMxNzE3MTciIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+Cjwvc3ZnPgo=",'" alt="Search" />'),this.rightButton.style.display="flex"):"cancel"===t?(this.rightButton.innerHTML='<img src="'.concat(Sr,'" 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("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQ5IiBoZWlnaHQ9IjExNyIgdmlld0JveD0iMCAwIDE0OSAxMTciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0yMC41IDk2LjgwOVY1Mi42ODIxTDYwLjE5NzIgMjYuMTI5NEM2OS45MzMyIDIwLjg1OTIgNzMuMzM3MiAyMC4yNTM5IDc1LjIwMjEgMjAuMjU1MUM3Ny4wMzg2IDIwLjI1NjQgODAuMzU4MSAyMC44NDU0IDg5LjkwMzEgMjYuMDUyOEwxMDEuNSAzNC4wMDg2VjkuNzU1MTJMMTAyLjA5OCAxMC4xNjVMMTAwLjQgOC45OTk5OUM3OS4zMzc2IC0yLjYzOTk3IDcxLjE1OTUgLTIuNjc5NjYgNDkuODMzMyA4Ljk5OTk5TDkuMzgwNTIgMzYuMDU4MkMzLjgzMTI2IDM5Ljc3IDAuNSA0Ni4wMDU5IDAuNSA1Mi42ODIxVjk2LjgwOUMwLjUgMTEwLjY1OCAxNC4yMzU4IDEyMC4zMTYgMjcuMjY3OSAxMTUuNjI5TDY3LjczMiAxMDEuMDc4QzcyLjEwNjkgOTkuNTA0MyA3Ni44OTMxIDk5LjUwNDMgODEuMjY4IDEwMS4wNzhMMTIxLjczMiAxMTUuNjI5QzEzNC43NjQgMTIwLjMxNiAxNDguNSAxMTAuNjU4IDE0OC41IDk2LjgwOVY1Mi41MzE1QzE0OC41IDQ1LjkzODUgMTQ1LjI1MSAzOS43NjkxIDEzOS44MTQgMzYuMDM5NEwxMjguNSAyOC4yNzc1Vjk2LjgwOUw4OC4wMzU5IDgyLjI1NzVDNzkuMjg2MiA3OS4xMTEgNjkuNzEzOCA3OS4xMTEgNjAuOTY0MSA4Mi4yNTc1TDIwLjUgOTYuODA5WiIgZmlsbD0iIzFFMUUxRSIvPgo8L3N2Zz4K",'" 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("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTguNDYwMDIgMTEuMjg5NUwxNC4xMiA1LjYzOTU1QzE0LjIxMyA1LjU0NTgyIDE0LjMyMzYgNS40NzE0MyAxNC40NDU0IDUuNDIwNjZDMTQuNTY3MyA1LjM2OTg5IDE0LjY5OCA1LjM0Mzc1IDE0LjgzIDUuMzQzNzVDMTQuOTYyIDUuMzQzNzUgMTUuMDkyNyA1LjM2OTg5IDE1LjIxNDYgNS40MjA2NkMxNS4zMzY1IDUuNDcxNDMgMTUuNDQ3MSA1LjU0NTgyIDE1LjU0IDUuNjM5NTVDMTUuNzI2MyA1LjgyNjkxIDE1LjgzMDggNi4wODAzNiAxNS44MzA4IDYuMzQ0NTVDMTUuODMwOCA2LjYwODczIDE1LjcyNjMgNi44NjIxOSAxNS41NCA3LjA0OTU1TDEwLjU5IDEyLjA0OTVMMTUuNTQgMTYuOTk5NUMxNS43MjYzIDE3LjE4NjkgMTUuODMwOCAxNy40NDA0IDE1LjgzMDggMTcuNzA0NUMxNS44MzA4IDE3Ljk2ODcgMTUuNzI2MyAxOC4yMjIyIDE1LjU0IDE4LjQwOTVDMTUuNDQ3NCAxOC41MDQgMTUuMzM3IDE4LjU3OTIgMTUuMjE1MSAxOC42MzA3QzE1LjA5MzIgMTguNjgyMiAxNC45NjIzIDE4LjcwOSAxNC44MyAxOC43MDk1QzE0LjY5NzcgMTguNzA5IDE0LjU2NjggMTguNjgyMiAxNC40NDUgMTguNjMwN0MxNC4zMjMxIDE4LjU3OTIgMTQuMjEyNiAxOC41MDQgMTQuMTIgMTguNDA5NUw4LjQ2MDAyIDEyLjc1OTVDOC4zNTg1MSAxMi42NjU5IDguMjc3NSAxMi41NTIzIDguMjIyMSAxMi40MjU4QzguMTY2NjkgMTIuMjk5MyA4LjEzODA5IDEyLjE2MjYgOC4xMzgwOSAxMi4wMjQ1QzguMTM4MDkgMTEuODg2NCA4LjE2NjY5IDExLjc0OTggOC4yMjIxIDExLjYyMzNDOC4yNzc1IDExLjQ5NjggOC4zNTg1MSAxMS4zODMyIDguNDYwMDIgMTEuMjg5NVYxMS4yODk1WiIgZmlsbD0iIzFFMUUxRSIvPgo8L3N2Zz4K",'" 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:"setPlaceholderText",value:function(t){this.input.placeholder=t}},{key:"getText",value:function(){return this.input.value}},{key:"setText",value:function(t){this.input.value=t}},{key:"getElement",value:function(){return this.element}},{key:"setViewForDesktop",value:function(){this.element.classList.remove("mobile-view"),this.input.classList.remove("mobile-view")}},{key:"setViewForMobile",value:function(){this.element.classList.add("mobile-view"),this.input.classList.add("mobile-view")}},{key:"showLoading",value:function(){this.loadingIndicator.style.display="flex"}},{key:"hideLoading",value:function(){this.loadingIndicator.style.display="none",this.rightButton.style.display="flex"}}],r&&Fr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function Br(t){return Br="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},Br(t)}function Pr(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"!=Br(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Br(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Br(e)?e:e+""}function Rr(t,e,n){return e=Yr(e),function(t,e){if(e&&("object"==Br(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,Qr()?Reflect.construct(e,n||[],Yr(t).constructor):e.apply(t,n))}function Qr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Qr=function(){return!!t})()}function Yr(t){return Yr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Yr(t)}function Vr(t,e){return Vr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vr(t,e)}const Hr=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=Rr(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&&Vr(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.result&&"gps-current-location"===this.result.type&&this.element.classList.add("search-bar-suggestions-view-cell--gps"),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(){if(this.result&&"gps-current-location"===this.result.type)this.element.innerHTML='\n <div class="suggestion-gps-icon" aria-hidden="true">\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <circle cx="12" cy="12" r="3"></circle>\n <line x1="12" y1="2" x2="12" y2="5"></line>\n <line x1="12" y1="19" x2="12" y2="22"></line>\n <line x1="2" y1="12" x2="5" y2="12"></line>\n <line x1="19" y1="12" x2="22" y2="12"></line>\n </svg>\n </div>\n <div class="suggestion-title">Use current location</div>\n ';else{var t=this.result.catalog.content_title_key;this.element.innerHTML='\n <div class="suggestion-title">'.concat(this.result.content.data[t],'</div>\n <div class="suggestion-subtitle">').concat(this.result.contextual_location,"</div>\n ")}}},{key:"getElement",value:function(){return this.element}}])&&Pr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function Gr(t){return Gr="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},Gr(t)}function Zr(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,Wr(r.key),r)}}function Wr(t){var e=function(t){if("object"!=Gr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Gr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Gr(e)?e:e+""}function qr(t,e,n){return e=Jr(e),function(t,e){if(e&&("object"==Gr(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,Kr()?Reflect.construct(e,n||[],Jr(t).constructor):e.apply(t,n))}function Kr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Kr=function(){return!!t})()}function Jr(t){return Jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Jr(t)}function Xr(t,e){return Xr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xr(t,e)}const $r=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]))._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&&Xr(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.results=[],this.pinnedResults=[],this.element=document.createElement("div"),this.element.className="search-bar-suggestions-view"}},{key:"updateResults",value:function(t){this.results=t,this.render()}},{key:"setPinnedResults",value:function(t){this.pinnedResults=t||[],this.render()}},{key:"hasPinnedResults",value:function(){return this.pinnedResults.length>0}},{key:"render",value:function(){var t=this;this.element.innerHTML="",this.pinnedResults.forEach((function(e){var n=new Hr(e);n.on("click",(function(){return t.fire("selectCell",{result:e})})),t.element.appendChild(n.getElement())})),this.results.forEach((function(e){var n=new Hr(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}},{key:"setViewForDesktop",value:function(){}},{key:"setViewForMobile",value:function(){}}])&&Zr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function ti(t){return ti="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},ti(t)}function ei(){ei=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==ti(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(ti(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function ni(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function ri(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){ni(o,r,i,a,u,"next",t)}function u(t){ni(o,r,i,a,u,"throw",t)}a(void 0)}))}}function ii(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,oi(r.key),r)}}function oi(t){var e=function(t){if("object"!=ti(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ti(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ti(e)?e:e+""}function ai(t,e,n){return e=si(e),function(t,e){if(e&&("object"==ti(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,ui()?Reflect.construct(e,n||[],si(t).constructor):e.apply(t,n))}function ui(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ui=function(){return!!t})()}function si(t){return si=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},si(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=ai(this,e,[n])).element=document.createElement("div"),t.element.className="search-box",t.searchBar=new zr,t.searchBarSuggestionsView=new $r,t.searchCount=0,t.showSuggestionsOnEmptyFocus=!1,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&&ci(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)),window.addEventListener("resize",(function(t){t.preventDefault()}))}},{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=ri(ei().mark((function t(){var e;return ei().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((e=this.searchBar.getText()).length>2)){t.next=7;break}return t.next=4,this.getSearchBarSuggestions(e);case 4:this.openSuggestionsView(),t.next=8;break;case 7:this.showSuggestionsOnEmptyFocus&&this.searchBarSuggestionsView.hasPinnedResults()&&this.openSuggestionsView();case 8:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"_handleSearchBarBlur",value:function(){this.closeSuggestionsView()}},{key:"_handleSearchBarInput",value:(o=ri(ei().mark((function t(e){var n;return ei().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0===(n=e.query).length){t.next=7;break}return this.openSuggestionsView(),t.next=5,this.getSearchBarSuggestions(n);case 5:t.next=8;break;case 7:this.showSuggestionsOnEmptyFocus&&this.searchBarSuggestionsView.hasPinnedResults()?(this.searchBarSuggestionsView.updateResults([]),this.openSuggestionsView()):this.closeSuggestionsView();case 8:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"_render",value:function(){this.element.appendChild(this.searchBar.getElement()),this.element.appendChild(this.searchBarSuggestionsView.getElement())}},{key:"setViewForDesktop",value:function(){this.searchBar.setViewForDesktop(),this.searchBarSuggestionsView.setViewForDesktop()}},{key:"setViewForMobile",value:function(){this.searchBar.setViewForMobile(),this.searchBarSuggestionsView.setViewForMobile()}},{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:"setPinnedResults",value:function(t){this.searchBarSuggestionsView.setPinnedResults(t)}},{key:"clearPinnedResults",value:function(){this.searchBarSuggestionsView.setPinnedResults([])}},{key:"setShowSuggestionsOnEmptyFocus",value:function(t){this.showSuggestionsOnEmptyFocus=!!t}},{key:"getSearchBarSuggestions",value:(i=ri(ei().mark((function t(e){return ei().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.fire("getSearchBarSuggestions",{query:e});case 1:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})}],r&&ii(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o,a}(Nn);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 fi(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,pi(r.key),r)}}function pi(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+""}const di=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,this.map=null,this.currentViewType=null,this.currentLayoutType=null,this._viewTypeChangeHandler=null},(e=[{key:"onAdd",value:function(t){this.map=t}},{key:"onRemove",value:function(){this._detachViewTypeListener(),this.container&&(this.container.parentNode.removeChild(this.container),this.map=void 0)}},{key:"_attachResizeListener",value:function(){var t=this.map.mapContainer.offsetWidth;this._configureView(t)}},{key:"_initialize",value:function(){if(this.map){this._attachViewTypeListener();var t=this.map.mapContainer.offsetWidth;this._configureView(t)}}},{key:"_attachViewTypeListener",value:function(){var t=this;this._viewTypeChangeHandler||this.map&&"function"==typeof this.map.on&&(this._viewTypeChangeHandler=function(){t.map&&t.container&&t._configureView(t.map.mapContainer.offsetWidth)},this.map.on("viewTypeChanged",this._viewTypeChangeHandler))}},{key:"_detachViewTypeListener",value:function(){this._viewTypeChangeHandler&&(this.map&&"function"==typeof this.map.off&&this.map.off("viewTypeChanged",this._viewTypeChangeHandler),this._viewTypeChangeHandler=null)}},{key:"_configureView",value:function(t){this.currentLayoutType=function(t){return t>767?Wn:qn}(t);var e=this.map&&"function"==typeof this.map.getViewType?this.map.getViewType():null;this.currentViewType=e||this.currentLayoutType,this._updateContentView()}},{key:"_setViewForDesktop",value:function(){this.currentViewType=Wn,this.currentLayoutType=Wn,this._updateContentView()}},{key:"_setViewForMobile",value:function(){this.currentViewType=qn,this.currentLayoutType=qn,this._updateContentView()}},{key:"_updateContentView",value:function(){this._clearViews(),this.currentViewType===Kn?(this.container.classList.add("kiosk-view"),this._renderKioskView()):this.currentViewType===Wn?this._renderDesktopView():this._renderMobileView()}},{key:"_isDesktopLayout",value:function(){return this.currentViewType===Kn?this.currentLayoutType===Wn:this.currentViewType===Wn}},{key:"_isMobileLayout",value:function(){return this.currentViewType===Kn?this.currentLayoutType===qn:this.currentViewType===qn}},{key:"_clearViews",value:function(){for(this.container.classList.remove("kiosk-view");this.container.firstChild;)this.container.removeChild(this.container.firstChild),this.container.classList.remove("mobile-view"),this.container.classList.remove("desktop-view")}},{key:"show",value:function(){this.container&&(this.container.style.display="block",this._isMobileLayout()&&(document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"))}},{key:"hide",value:function(){this.container&&(this.container.style.display="none",document.body.style.overflow="",document.documentElement.style.overflow="")}},{key:"_renderDesktopView",value:function(){}},{key:"_renderMobileView",value:function(){}},{key:"_renderKioskView",value:function(){this.currentLayoutType===Wn?this._renderDesktopView():this._renderMobileView()}}])&&fi(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();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 mi(){mi=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==yi(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(yi(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function gi(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function Di(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,vi(r.key),r)}}function vi(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 Mi(t,e,n){return e=Ei(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,bi()?Reflect.construct(e,n||[],Ei(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 wi(){return wi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ei(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},wi.apply(null,arguments)}function Ei(t){return Ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ei(t)}function Ci(t,e){return Ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ci(t,e)}const ji=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=Mi(this,e,[n])).searchBox=new li,t.searchApi=nn.getSearchApi(),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){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._initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.show(),this.testLoadingState=this._testLoadingState.bind(this),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=wi(Ei(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.searchBox.on("getSearchBarSuggestions",this._handleGettingSearchBarSuggestions.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)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("state:selection",this._handleSelectionState.bind(this)),this.map.on("load",this._handleMapLoad.bind(this)),this.map.on("loading:start",this._handleLoadingStart.bind(this)),this.map.on("loading:end",this._handleLoadingEnd.bind(this))}},{key:"_handleMapLoad",value:function(t){var e=t.mapData.map_name;e?this.searchBox.searchBar.setPlaceholderText("Search ".concat(e)):this.searchBox.searchBar.setPlaceholderText("Search")}},{key:"_handleGettingSearchBarSuggestions",value:(i=mi().mark((function t(e){var n,r,i;return mi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.query,r=++this.searchBox.searchCount,""!==n){t.next=5;break}return this.searchBox.searchBarSuggestionsView.updateResults([]),t.abrupt("return");case 5:if(this.map.mapData){t.next=7;break}return t.abrupt("return");case 7:return t.prev=9,t.next=12,this.searchApi.search(this.map.mapData.map_id,this.map.mapData.map_view_id,n,0,5);case 12:i=t.sent,r===this.searchBox.searchCount&&this.searchBox.searchBarSuggestionsView.updateResults(i),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(9),Me.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 19:case"end":return t.stop()}}),t,this,[[9,16]])})),o=function(){var t=this,e=arguments;return new Promise((function(n,r){var o=i.apply(t,e);function a(t){gi(o,n,r,a,u,"next",t)}function u(t){gi(o,n,r,a,u,"throw",t)}a(void 0)}))},function(t){return o.apply(this,arguments)})},{key:"_renderDesktopView",value:function(){var t=this.searchBox.getElement();this.container.appendChild(t),this.container.classList.add("desktop-view"),this.container.classList.remove("mobile-view"),t&&this.searchBox.setViewForDesktop()}},{key:"_renderMobileView",value:function(){var t=this.searchBox.getElement();this.container.appendChild(t),this.container.classList.add("mobile-view"),this.container.classList.remove("desktop-view"),t&&this.searchBox.setViewForMobile()}},{key:"bringToFront",value:function(){this.container.style.zIndex="10"}},{key:"bringBack",value:function(){this.container.style.zIndex=""}},{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.updateRightButtonIcon("search"),this.searchBox.searchBar.updateLeftButtonIcon("none"),this.searchBox.searchBar.hideLoading(),this.bringToFront(),this.show()}},{key:"_handleSearchState",value:function(t){var e=t.query;t.results,this.searchBox.searchBar.setText(e),this.searchBox.searchBar.updateRightButtonIcon("cancel"),this.searchBox.searchBar.updateLeftButtonIcon("none"),this.bringToFront(),this.show()}},{key:"_handleSelectedContentState",value:function(t){var e=t.contentPlacementIds,n=t.selectedContentPlacement;this.show(),this.bringToFront();var r=n.catalog.content_title_key,i=n.content.data[r];this.searchBox.searchBar.setText(i),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){this.show(),this.bringBack();var e=this.map._stateCoordinator.stateHistory.length;this.searchBox.searchBar.updateRightButtonIcon("cancel"),e>2?this.searchBox.searchBar.updateLeftButtonIcon("back"):this.searchBox.searchBar.updateLeftButtonIcon("none")}},{key:"_handleSetupState",value:function(){this.hide()}},{key:"_handleSelectionState",value:function(t){this.hide()}},{key:"_handleLoadingStart",value:function(t){this.searchBox.searchBar.showLoading(),this.searchBox.searchBar.updateRightButtonIcon(this.searchBox.searchBar.rightButtonState),this.searchBox.searchBar.updateLeftButtonIcon(this.searchBox.searchBar.leftButtonState)}},{key:"_handleLoadingEnd",value:function(t){this.searchBox.searchBar.hideLoading()}},{key:"_testLoadingState",value:function(){var t=this;this.searchBox.searchBar.showLoading(),setTimeout((function(){t.searchBox.searchBar.hideLoading()}),2e3)}}],r&&Di(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o}(di);function Ai(t){return Ai="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},Ai(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,Si(r.key),r)}}function Si(t){var e=function(t){if("object"!=Ai(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ai(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ai(e)?e:e+""}function Ii(t,e,n){return e=Fi(e),function(t,e){if(e&&("object"==Ai(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,Ti()?Reflect.construct(e,n||[],Fi(t).constructor):e.apply(t,n))}function Ti(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ti=function(){return!!t})()}function Fi(t){return Fi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fi(t)}function Oi(t,e){return Oi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Oi(t,e)}const xi=function(t){function e(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=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=Ii(this,e,[i])).items=r,n.buttonElements=[],n.allowsToggle=null===(t=i.allowsToggle)||void 0===t||t,n.containerClass=i.container,n.element=document.createElement("div"),n.element.className="slider-bar-container ".concat(n.containerClass),n.sliderBar=document.createElement("div"),n.sliderBar.className="slider-bar ".concat(n.containerClass,"-bar"),n.sliderBarViewport=document.createElement("div"),n.sliderBarViewport.className="slider-bar-viewport ".concat(n.containerClass,"-viewport"),n.sliderBarViewport.appendChild(n.sliderBar),n.leftButton=document.createElement("button"),n.leftButton.className="scroll-button left ".concat(n.containerClass,"-scroll-button"),n.leftButton.style.backgroundImage="url(".concat("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZS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MTUuMTIwNyAxNi41NTg5IDE1LjEyMDcgMTYuMjk0N0MxNS4xMjA3IDE2LjAzMDUgMTUuMDE2MiAxNS43NzcxIDE0LjgyOTkgMTUuNTg5N0wxMS4yODk5IDExLjk5OTdaIiBmaWxsPSIjMTcxNzE3Ii8+Cjwvc3ZnPgo=",")"),n.leftButton.addEventListener("click",(function(){return n._scrollSliderBar("left")})),n.rightButton=document.createElement("button"),n.rightButton.className="scroll-button right ".concat(n.containerClass,"-scroll-button"),n.rightButton.style.backgroundImage="url(".concat("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE0LjgyOTkgMTEuMjg5N0wxMC41ODk5IDcuMDQ5N0MxMC40OTcgNi45NTU5OCAxMC4zODY0IDYuODgxNTggMTAuMjY0NSA2LjgzMDgxQzEwLjE0MjcgNi43ODAwNCAxMC4wMTIgNi43NTM5MSA5Ljg3OTk0IDYuNzUzOTFDOS43NDc5MyA2Ljc1MzkxIDkuNjE3MjMgNi43ODAwNCA5LjQ5NTM3IDYuODMwODFDOS4zNzM1MSA2Ljg4MTU4IDkuMjYyOTEgNi45NTU5OCA5LjE2OTk0IDcuMDQ5N0M4Ljk4MzY5IDcuMjM3MDcgOC44NzkxNSA3LjQ5MDUyIDguODc5MTUgNy43NTQ3QzguODc5MTUgOC4wMTg4OSA4Ljk4MzY5IDguMjcyMzQgOS4xNjk5NCA4LjQ1OTdMMTIuNzA5OSAxMS45OTk3TDkuMTY5OTQgMTUuNTM5N0M4Ljk4MzY5IDE1LjcyNzEgOC44NzkxNSAxNS45ODA1IDguODc5MTUgMTYuMjQ0N0M4Ljg3OTE1IDE2LjUwODkgOC45ODM2OSAxNi43NjIzIDkuMTY5OTQgMTYuOTQ5N0M5LjI2MzM4IDE3LjA0MjQgOS4zNzQyIDE3LjExNTcgOS40OTYwNCAxNy4xNjU1QzkuNjE3ODcgMTcuMjE1MiA5Ljc0ODM0IDE3LjI0MDUgOS44Nzk5NCAxNy4yMzk3QzEwLjAxMTUgMTcuMjQwNSAxMC4xNDIgMTcuMjE1MiAxMC4yNjM4IDE3LjE2NTVDMTAuMzg1NyAxNy4xMTU3IDEwLjQ5NjUgMTcuMDQyNCAxMC41ODk5IDE2Ljk0OTdMMTQuODI5OSAxMi43MDk3QzE0LjkyMzcgMTIuNjE2NyAxNC45OTgxIDEyLjUwNjEgMTUuMDQ4OCAxMi4zODQzQzE1LjA5OTYgMTIuMjYyNCAxNS4xMjU3IDEyLjEzMTcgMTUuMTI1NyAxMS45OTk3QzE1LjEyNTcgMTEuODY3NyAxNS4wOTk2IDExLjczNyAxNS4wNDg4IDExLjYxNTFDMTQuOTk4MSAxMS40OTMzIDE0LjkyMzcgMTEuMzgyNyAxNC44Mjk5IDExLjI4OTdaIiBmaWxsPSIjMTcxNzE3Ii8+Cjwvc3ZnPgo=",")"),n.rightButton.addEventListener("click",(function(){return n._scrollSliderBar("right")})),n.buttonElements=[],n.selectedValue=null,n._render(),n.sliderBarViewport.addEventListener("scroll",(function(){return n._updateScrollButtons()})),setTimeout((function(){return n._updateScrollButtons()}),.8),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&&Oi(t,e)}(e,t),n=e,r=[{key:"updateItems",value:function(t){this.items=t,this.sliderBar.innerHTML="",this.buttonElements=[],this._render(),this._updateScrollButtons()}},{key:"_render",value:function(){var t=this;this.items.forEach((function(e){var n=document.createElement("button");n.addEventListener("click",t._handleSliderButtonSelect.bind(t)),n.className="slider-bar-button ".concat(t.containerClass,"-button");var r=document.createElement("span");r.textContent=e,n.appendChild(r),t.buttonElements.push(n),t.sliderBar.appendChild(n)})),this.element.appendChild(this.leftButton),this.element.appendChild(this.sliderBarViewport),this.element.appendChild(this.rightButton)}},{key:"setViewForDesktop",value:function(){this.buttonElements.forEach((function(t){t&&t.classList.remove("mobile-view")}))}},{key:"setViewForMobile",value:function(){this.buttonElements.forEach((function(t){t&&t.classList.add("mobile-view")}))}},{key:"_handleSliderButtonSelect",value:function(t){var e=t.currentTarget,n=e.querySelector("span").textContent,r=this.buttonElements.indexOf(e);if(e.classList.contains("selected"))this.allowsToggle&&(e.classList.remove("selected"),this.fire("".concat(this.containerClass,":deselect")),this.selectedValue=null);else{var i=document.querySelector(".slider-bar-button.".concat(this.containerClass,"-button.selected"));i&&i.classList.remove("selected"),e.classList.add("selected"),this.selectedValue=n,this.fire("".concat(this.containerClass,":selectNew"),{query:n,index:r})}}},{key:"_scrollSliderBar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:275,n=this.sliderBarViewport.scrollWidth-this.sliderBarViewport.clientWidth,r=this.sliderBarViewport.scrollLeft,i=e;if("right"===t){var o=n-r;o<e&&(i=o)}"left"===t?this.sliderBarViewport.scrollBy({left:-e,behavior:"smooth"}):"right"===t&&this.sliderBarViewport.scrollBy({left:i,behavior:"smooth"})}},{key:"_updateScrollButtons",value:function(){var t=this.sliderBarViewport.scrollLeft,e=this.sliderBarViewport.scrollWidth-this.sliderBarViewport.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(){var t=this.sliderBar.querySelectorAll(".slider-bar-button.".concat(this.containerClass,"-button.selected"));t&&t.forEach((function(t){return t.classList.remove("selected")}))}},{key:"deselectAllNotMatchingQuery",value:function(t){var e=this.sliderBar.querySelectorAll(".slider-bar-button.".concat(this.containerClass,"-button.selected"));e&&e.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:"selectButtonAtIndex",value:function(t){var e=this.buttonElements[t];if(e)if(e.classList.contains("selected"))console.log("button is already selected");else{this.deselectAll();var n=e.querySelector("span").textContent;e.classList.add("selected"),this.selectedValue=n,this.fire("".concat(this.containerClass,":selectNew"),{query:n,index:t})}}},{key:"getIndexOfSelectedButton",value:function(){return this.buttonElements.findIndex((function(t){return t.classList.contains("selected")}))}},{key:"refresh",value:function(){var t=this;this.element.innerHTML="",this.sliderBar.innerHTML="",this.buttonElements=[],this._render(),setTimeout((function(){t._updateScrollButtons()}),100)}},{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&&Ni(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function ki(t){return ki="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},ki(t)}function Li(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"!=ki(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ki(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ki(e)?e:e+""}function zi(t,e,n){return e=Ui(e),function(t,e){if(e&&("object"==ki(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||[],Ui(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 Pi(){return Pi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ui(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Pi.apply(null,arguments)}function Ui(t){return Ui=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ui(t)}function Ri(t,e){return Ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ri(t,e)}const Qi=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=zi(this,e,[n])).categoryBarContainerName="category-bar",t.categoryBar=new xi([],{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&&Ri(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._attachResizeListener(),this._initialize(),this._showIfHasItems(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=Pi(Ui(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.categoryBar.on("".concat(this.categoryBarContainerName,":selectNew"),this._handleNewCategoryButtonSelect.bind(this)),this.categoryBar.on("".concat(this.categoryBarContainerName,":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)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("state:selection",this._handleSelectionState.bind(this)),this.map.on("load",this._handleMapLoad.bind(this))}},{key:"_handleMapLoad",value:function(t){var e=t.mapData.suggested_search_terms;e&&this.categoryBar.updateItems(e);var n=this.map.getCurrentState();"default"!==n&&"search"!==n||this._showIfHasItems()}},{key:"_hasItems",value:function(){return Array.isArray(this.categoryBar.items)&&this.categoryBar.items.length>0}},{key:"_showIfHasItems",value:function(){this._hasItems()?this.show():this.hide()}},{key:"_renderDesktopView",value:function(){var t=this.categoryBar.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view"),this.map.mapContainer.offsetWidth,this.categoryBar.setViewForDesktop()}},{key:"_renderMobileView",value:function(){var t=this.categoryBar.getElement();this.container.appendChild(t),this.map.mapContainer.offsetWidth,this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view"),this.categoryBar.setViewForMobile()}},{key:"_handleDefaultState",value:function(){this.categoryBar.refresh(),this.categoryBar.deselectAll(),this._showIfHasItems()}},{key:"_handleSelectedContentState",value:function(t){this.hide()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleNewCategoryButtonSelect",value:function(t){var e=t.query,n=this.map.getCurrentFloor();this.map.setToSearchState(e,0,30,n)}},{key:"_handleCategoryButtonDeselect",value:function(){this.map.setToDefaultState()}},{key:"_handleSearchState",value:function(t){var e=t.query;t.results,this._showIfHasItems(),this.categoryBar.deselectAllNotMatchingQuery(e)}},{key:"_handleSetupState",value:function(){this.hide()}},{key:"_handleSelectionState",value:function(){this.hide()}}],r&&Li(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(di);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 Vi(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,Hi(r.key),r)}}function Hi(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 Gi(t,e,n){return e=Wi(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,Zi()?Reflect.construct(e,n||[],Wi(t).constructor):e.apply(t,n))}function Zi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zi=function(){return!!t})()}function Wi(t){return Wi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wi(t)}function qi(t,e){return qi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qi(t,e)}const Ki=function(t){function e(t,n){var r,i=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=Gi(this,e,[i])).label=t,r.url=n,r.showIcon=!1!==i.showIcon,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&&qi(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("button"),this.element.type="button",this.element.className="pill-button",this.labelElement=document.createElement("span"),this.labelElement.className="pill-button-label",this.labelElement.textContent=this.label,this.element.appendChild(this.labelElement),this.showIcon&&this.element.insertAdjacentHTML("beforeend",'\n<svg class="pill-button-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">\n <path d="M7 17L17 7"></path>\n <path d="M7 7h10v10"></path>\n</svg>\n'),this.element.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),t.fire("click",{url:t.url})}))}},{key:"getElement",value:function(){return this.element}}])&&Vi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);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 Xi(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"!=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 to(t,e,n){return e=no(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,eo()?Reflect.construct(e,n||[],no(t).constructor):e.apply(t,n))}function eo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(eo=function(){return!!t})()}function no(t){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},no(t)}function ro(t,e){return ro=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ro(t,e)}function io(t){if("string"!=typeof t)return null;var e=t.trim();return""===e?null:/^https?:\/\//i.test(e)?e:"https://".concat(e)}function oo(t){var e=io(t);if(!e)return!1;try{var n=new URL(e);if("http:"!==n.protocol&&"https:"!==n.protocol)return!1;var r=n.hostname;return!(!r||!r.includes(".")&&"localhost"!==r)}catch(t){return!1}}const ao=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=to(this,e,[n]))._kioskTimer=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&&ro(t,e)}(e,t),n=e,r=[{key:"show",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.isKioskMode,o=void 0!==i&&i,a=r.onConfirm,u=void 0===a?null:a,s=r.onCancel,c=void 0===s?null:s,l=io(e);if(l)if(o)this._showKioskTransient(t);else{var h=document.createElement("div");h.className="url-confirmation-popup-card";var f=document.createElement("div");f.className="url-confirmation-popup-title",f.textContent="Open external link?",h.appendChild(f);var p=document.createElement("div");p.className="url-confirmation-popup-body",p.textContent="This will open in your browser:",h.appendChild(p);var d=document.createElement("div");d.className="url-confirmation-popup-url",d.textContent=l,h.appendChild(d);var y=document.createElement("div");y.className="url-confirmation-popup-actions";var m=document.createElement("button");m.className="url-confirmation-popup-cancel",m.textContent="Cancel",m.addEventListener("click",(function(){n._dismiss(t),"function"==typeof c&&c()})),y.appendChild(m);var g=document.createElement("button");g.className="url-confirmation-popup-confirm",g.textContent="Open Link",g.addEventListener("click",(function(){n._dismiss(t),window.open(l,"_blank","noopener,noreferrer"),"function"==typeof u&&u()})),y.appendChild(g),h.appendChild(y),this._presentCard(t,h)}else console.warn("⚠️ UrlConfirmationPopup: invalid URL",e)}},{key:"_showKioskTransient",value:function(t){var e=this,n=document.createElement("div");n.className="url-confirmation-popup-card url-confirmation-popup-card--kiosk";var r=document.createElement("div");r.className="url-confirmation-popup-title",r.textContent="Links are disabled",n.appendChild(r);var i=document.createElement("div");i.className="url-confirmation-popup-body",i.textContent="External links can't be opened on this kiosk.",n.appendChild(i),this._presentCard(t,n),this._kioskTimer&&clearTimeout(this._kioskTimer),this._kioskTimer=setTimeout((function(){e._kioskTimer=null,e._dismiss(t)}),2500)}},{key:"_presentCard",value:function(t,e){if(t.showModal(e),t.modalContainer){this._previousContainerBg=t.modalContainer.style.backgroundColor,t.modalContainer.style.backgroundColor="rgba(0, 0, 0, 0.35)";var n=t.modalContainer.querySelector(".waygo-map-modal-content");n&&(n.style.backgroundColor="transparent",n.style.width="auto",n.style.height="auto",n.style.maxWidth="none",n.style.maxHeight="none",n.style.boxShadow="none",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center")}}},{key:"_dismiss",value:function(t){this._kioskTimer&&(clearTimeout(this._kioskTimer),this._kioskTimer=null),this._resetModalStyles(t),t.hideModal()}},{key:"_resetModalStyles",value:function(t){t.modalContainer&&void 0!==this._previousContainerBg&&(t.modalContainer.style.backgroundColor=this._previousContainerBg,this._previousContainerBg=void 0)}}],r&&Xi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function uo(t){return uo="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},uo(t)}function so(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,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||go(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 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,lo(r.key),r)}}function lo(t){var e=function(t){if("object"!=uo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=uo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==uo(e)?e:e+""}function ho(t,e,n){return e=po(e),function(t,e){if(e&&("object"==uo(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||[],po(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 po(t){return po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},po(t)}function yo(t,e){return yo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},yo(t,e)}function mo(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=go(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function go(t,e){if(t){if("string"==typeof t)return Do(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)?Do(t,e):void 0}}function Do(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}var vo=new Set(["the","of","and","&"]),Mo=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uD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DEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])|(?:[0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDF50-\uDF59\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD839[\uDCF0-\uDCF9]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9])/;function bo(t){return t.replace(/^(?:[\0-\/:-@\[-`\{-\xA9\xAB-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u065F\u066A-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07BF\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0965\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09E5\u09F2\u09F3\u09FA\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A65\u0A70\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AE5\u0AF0-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B65\u0B70\u0B78-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0BE5\u0BF3-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C65\u0C70-\u0C77\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CE5\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57\u0D62-\u0D65\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DE5\u0DF0-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F1F\u0F34-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u104A-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u1368\u137D-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u17DF\u17EA-\u17EF\u17FA-\u180F\u181A-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19FF\u1A17-\u1A1F\u1A55-\u1A7F\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B4F\u1B5A-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BFF\u1C24-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u206F\u2072\u2073\u207A-\u207E\u208A-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A-\u245F\u249C-\u24E9\u2500-\u2775\u2794-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFC\u2CFE\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3008-\u3020\u302A-\u3030\u3036\u3037\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u3191\u3196-\u319F\u31C0-\u31EF\u3200-\u321F\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6F0-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA82F\uA836-\uA83F\uA874-\uA881\uA8B4-\uA8CF\uA8DA-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9DA-\uA9DF\uA9E5\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA4F\uA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[\uDC00-\uDCFF\uDD0D-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+|(?:[\0-\/:-@\[-`\{-\xA9\xAB-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u065F\u066A-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07BF\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0965\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09E5\u09F2\u09F3\u09FA\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A65\u0A70\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AE5\u0AF0-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B65\u0B70\u0B78-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0BE5\u0BF3-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C65\u0C70-\u0C77\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CE5\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57\u0D62-\u0D65\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DE5\u0DF0-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F1F\u0F34-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u104A-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u1368\u137D-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u17DF\u17EA-\u17EF\u17FA-\u180F\u181A-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19FF\u1A17-\u1A1F\u1A55-\u1A7F\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B4F\u1B5A-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BFF\u1C24-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u206F\u2072\u2073\u207A-\u207E\u208A-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A-\u245F\u249C-\u24E9\u2500-\u2775\u2794-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFC\u2CFE\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3008-\u3020\u302A-\u3030\u3036\u3037\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u3191\u3196-\u319F\u31C0-\u31EF\u3200-\u321F\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6F0-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA82F\uA836-\uA83F\uA874-\uA881\uA8B4-\uA8CF\uA8DA-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9DA-\uA9DF\uA9E5\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uF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\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDEEF\uDEFA-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDCEF\uDCFA-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD0-\uDCFF\uDD44-\uDD4A\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDC70\uDCAC\uDCB0\uDCB5-\uDD00\uDD2E\uDD3E-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+$/g,"")}function wo(t){var e,n=mo(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(Mo.test(r))return r}}catch(t){n.e(t)}finally{n.f()}return null}const Eo=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=ho(this,e,[r])).childPlacement=t,n.maxValueLength=50,n.maxEntriesToShow=3,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&&yo(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="content-details-child-view",this.element.setAttribute("role","button"),this.element.tabIndex=0,this.bodyElement=document.createElement("div"),this.bodyElement.className="content-details-child-view-body",this.titleElement=document.createElement("div"),this.titleElement.className="content-details-child-view-title";var t=this.childPlacement.catalog.content_title_key,e=this.childPlacement.content.data[t];this.titleElement.textContent="".concat(e),this._render()}},{key:"_getDisplayImageUrl",value:function(){var t,e,n=null===(t=this.childPlacement.catalog)||void 0===t?void 0:t.content_display_img_key;if(!n)return null;var r=null===(e=this.childPlacement.content)||void 0===e||null===(e=e.data)||void 0===e?void 0:e[n];if(null==r)return null;if("string"==typeof r){var i=r.trim();return""===i?null:i}return r}},{key:"_getTitleInitials",value:function(t){if(null==t)return null;var e=String(t).trim();if(""===e||!Mo.test(e))return null;var n=e.split(/[\s&]+/).filter((function(t){return t.length>0})).map(bo).filter((function(t){return t.length>0&&!vo.has(t.toLowerCase())}));if(n.length>=2){var r=wo(n[0]),i=wo(n[1]);if(r&&i)return(r+i).toLocaleUpperCase()}var o=function(t){var e,n=[],r=mo(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(Mo.test(i)&&(n.push(i),2===n.length))break}}catch(t){r.e(t)}finally{r.f()}return n}(e);return 0===o.length?null:o.join("").toLocaleUpperCase()}},{key:"_truncateText",value:function(t,e){return t.length>e?t.slice(0,e-3)+"...":t}},{key:"findViableDataEntriesInSchemaOrder",value:function(t){for(var e=t.content.data||{},n=t.catalog.data_schema||{},r=t.catalog.content_title_key,i=t.catalog.content_display_img_key,o=t.excluded_child_fields||[],a=[],u=0,s=Object.entries(n);u<s.length;u++){var c=so(s[u],2),l=c[0],h=c[1];if(!l.startsWith("_")&&"image"!==h&&"url"!==h&&l!==r&&l!==i&&!o.includes(l)){var f=e[l];f&&"string"==typeof f&&""!==f.trim()&&a.push([l,f.trim()])}}return a}},{key:"findViableUrlEntriesInSchemaOrder",value:function(t){for(var e=t.catalog.data_schema||{},n=[],r=0,i=Object.entries(e);r<i.length;r++){var o,a=so(i[r],2),u=a[0],s=a[1];if(!u.startsWith("_")&&"url"===s){var c=null===(o=t.content.data)||void 0===o?void 0:o[u];oo(c)&&n.push([u,io(c)])}}return n}},{key:"_renderUrlPills",value:function(){var t=this,e=this.findViableUrlEntriesInSchemaOrder(this.childPlacement);if(0!==e.length){var n=document.createElement("div");n.className="content-details-child-view-pills",e.forEach((function(e){var r=so(e,2),i=r[0],o=r[1],a=new Ki(i,o);a.on("click",(function(e){var n=e.url;t.fire("selectUrlButton",{url:n,source:"list-pill"})})),n.appendChild(a.getElement())})),this.bodyElement.appendChild(n)}}},{key:"_renderImageFallback",value:function(t,e){t.classList.add("content-details-child-view-image--placeholder");var n=this._getTitleInitials(e);if(null===n){var r=document.createElement("img");return r.className="content-details-child-view-image-fallback-icon",r.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHZpZXdCb3g9IjAgMCAzNCAzNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTciIGN5PSIxNyIgcj0iMTMuNzUiIHN0cm9rZT0iI0UxRTFFMSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KPHBhdGggZD0iTTEyLjc1IDE1LjgzMzNDMTMuNjcwNSAxNS44MzMzIDE0LjQxNjYgMTUuMDg3MSAxNC40MTY2IDE0LjE2NjdDMTQuNDE2NiAxMy4yNDYyIDEzLjY3MDUgMTIuNSAxMi43NSAxMi41Q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ZpbGw9IiNFMUUxRTEiLz4KPC9zdmc+Cg==",r.alt="",void t.appendChild(r)}var i=document.createElement("span");i.className="content-details-child-view-image-initials",i.textContent=n,t.appendChild(i)}},{key:"_renderImageView",value:function(t){var e=this;this.element.classList.add("content-details-child-view--with-image");var n=document.createElement("div");n.className="content-details-child-view-image";var r=this._getDisplayImageUrl();if(r){var i=document.createElement("img");i.className="content-details-child-view-image-src",i.src=r,i.alt="",i.addEventListener("error",(function(){i.remove(),e._renderImageFallback(n,t)})),n.appendChild(i)}else this._renderImageFallback(n,t);this.element.appendChild(n)}},{key:"_render",value:function(){var t,e=this,n=this.childPlacement.catalog.content_title_key,r=this.childPlacement.content.data[n];this._renderImageView(r);var i=null===(t=this.childPlacement.catalog)||void 0===t?void 0:t.title;if(i&&""!==String(i).trim()){var o=document.createElement("div");o.className="content-details-child-view-catalog-title",o.textContent=String(i).trim(),this.bodyElement.appendChild(o)}this.bodyElement.appendChild(this.titleElement);var a=this.findViableDataEntriesInSchemaOrder(this.childPlacement),u=a.slice(0,this.maxEntriesToShow);if(0===a.length)this.element.classList.add("content-details-child-view--title-only");else{var s=document.createElement("div");s.className="content-details-child-view-details",u.forEach((function(t){var n=so(t,2),r=n[0],i=n[1],o=document.createElement("div");o.className="content-details-child-view-data-row";var a=document.createElement("div");a.className="content-details-child-view-data-key",a.textContent=r;var u=document.createElement("div");u.className="content-details-child-view-data-value",u.textContent=e._truncateText(String(i),e.maxValueLength),o.appendChild(a),o.appendChild(u),s.appendChild(o)})),this.bodyElement.appendChild(s)}this._renderUrlPills(),this.element.appendChild(this.bodyElement)}},{key:"getElement",value:function(){return this.element}}])&&co(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function Co(t){return Co="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},Co(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,Ao(r.key),r)}}function Ao(t){var e=function(t){if("object"!=Co(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Co(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Co(e)?e:e+""}function No(t,e,n){return e=Io(e),function(t,e){if(e&&("object"==Co(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||[],Io(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 Io(t){return Io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Io(t)}function To(t,e){return To=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},To(t,e)}const Fo=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=No(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&&To(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){var t=this;this._cell=new Eo(this.result),this.element=this._cell.getElement(),this._cell.on("selectUrlButton",(function(e){return t.fire("selectUrlButton",e)})),this._setupEventListeners()}},{key:"_setupEventListeners",value:function(){var t=this;this.element.addEventListener("click",(function(){return t.fire("click",{result:t.result})})),this.element.addEventListener("mouseover",(function(){return t.fire("hover",{result:t.result})})),this.element.addEventListener("mouseout",(function(){return t.fire("hoverOut",{result:t.result})}))}},{key:"getElement",value:function(){return this.element}}])&&jo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);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 xo(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,ko(r.key),r)}}function ko(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 Lo(t,e,n){return e=zo(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,_o()?Reflect.construct(e,n||[],zo(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 zo(t){return zo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zo(t)}function Bo(t,e){return Bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bo(t,e)}const Po=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=Lo(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&&Bo(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="loading-cell",this.render()}},{key:"render",value:function(){this.element.innerHTML='\n <div class="loading-spinner"></div>\n '}},{key:"getElement",value:function(){return this.element}}])&&xo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function Uo(t){return Uo="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},Uo(t)}function Ro(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 Qo(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"!=Uo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Uo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Uo(e)?e:e+""}function Vo(t,e,n){return e=Go(e),function(t,e){if(e&&("object"==Uo(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,Ho()?Reflect.construct(e,n||[],Go(t).constructor):e.apply(t,n))}function Ho(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ho=function(){return!!t})()}function Go(t){return Go=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Go(t)}function Zo(t,e){return Zo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zo(t,e)}const Wo=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=Vo(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&&Zo(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.results=[],this.loading=!1,this.element=document.createElement("div"),this.element.className="search-results-view",this.scrollBody=document.createElement("div"),this.scrollBody.className="search-results-view-scroll",this.titleElement=document.createElement("h3"),this.titleElement.className="search-results-title",this.scrollBody.appendChild(this.titleElement),this.element.appendChild(this.scrollBody)}},{key:"showLoadingCell",value:function(){if(!this.loading){var t=new Po;this.loading=!0,this.scrollBody.appendChild(t.getElement())}}},{key:"hideLoadingCell",value:function(){var t=this.element.querySelector(".loading-cell");t&&t.parentNode&&t.parentNode.removeChild(t),this.loading=!1}},{key:"updateView",value:function(t,e){this.results=t,t.length>0&&this.setTitle("Results for '".concat(e,"'")),0===t.length&&this.setTitle("No matching results for '".concat(e,"'")),this.scrollToTop(),this.render()}},{key:"scrollToTop",value:function(){this.scrollBody.scrollTop=0}},{key:"updateResults",value:function(t){this.results=t,this.render()}},{key:"extendResults",value:function(t){var e;(e=this.results).push.apply(e,function(t){return function(t){if(Array.isArray(t))return Ro(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ro(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)?Ro(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)),this.render()}},{key:"render",value:function(){for(var t=this;this.scrollBody.children.length>1;)this.scrollBody.removeChild(this.scrollBody.lastChild);var e=document.createElement("div");e.className="content-details-children-list-view",this.results.forEach((function(n){var r=new Fo(n);r.on("click",(function(){return t.fire("selectCell",{result:n})})),r.on("hover",(function(){return t.fire("hoverCell",{result:n})})),r.on("hoverOut",(function(){return t.fire("hoverOutCell",{result:n})})),r.on("selectUrlButton",(function(e){return t.fire("selectUrlButton",e)})),e.appendChild(r.getElement())})),this.scrollBody.appendChild(e)}},{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}},{key:"getScrollElement",value:function(){return this.scrollBody}}])&&Qo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function qo(t){return qo="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},qo(t)}function Ko(){Ko=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==qo(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(qo(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Jo(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function Xo(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Jo(o,r,i,a,u,"next",t)}function u(t){Jo(o,r,i,a,u,"throw",t)}a(void 0)}))}}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,ta(r.key),r)}}function ta(t){var e=function(t){if("object"!=qo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=qo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qo(e)?e:e+""}function ea(t,e,n){return e=ia(e),function(t,e){if(e&&("object"==qo(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,na()?Reflect.construct(e,n||[],ia(t).constructor):e.apply(t,n))}function na(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(na=function(){return!!t})()}function ra(){return ra="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ia(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ra.apply(null,arguments)}function ia(t){return ia=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ia(t)}function oa(t,e){return oa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},oa(t,e)}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=ea(this,e,[n])).searchResultsView=new Wo,t.searchApi=nn.getSearchApi(),t.searchedQuery=null,t.map=null,t.lastSearchLength=0,t.skip=0,t.limit=30,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&&oa(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.hide(),this._initializeEventListeners(),this._attachResizeListener(),this._attachScrollListener(),this._initialize(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=ra(ia(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"show",value:function(){this.container&&(this.container.style.display="flex",this._isMobileLayout()&&(document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"))}},{key:"hide",value:function(){this.container&&(this.container.style.display="none",document.body.style.overflow="",document.documentElement.style.overflow="")}},{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.map.on("state:setup",this._handleSetupState.bind(this)),this.searchResultsView.on("closeView",this._handleCloseSearchResultsView.bind(this)),this.searchResultsView.on("selectCell",this._handleSearchResultSelect.bind(this)),this.searchResultsView.on("selectUrlButton",this._handleSelectUrlButton.bind(this)),this.searchResultsView.on("hoverCell",this._handleCellHover.bind(this)),this.searchResultsView.on("hoverOutCell",this._handleCellHoverOut.bind(this))}},{key:"_handleCellHover",value:function(t){var e=t.result;this.map.fire("hoverSearchResult",{result:e})}},{key:"_handleCellHoverOut",value:function(t){var e=t.result;this.map.fire("hoverEndSearchResult",{result:e})}},{key:"_attachScrollListener",value:function(){this.searchResultsView.getScrollElement().addEventListener("scroll",this._handleScroll.bind(this))}},{key:"_renderDesktopView",value:function(){var t=this.searchResultsView.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view")}},{key:"_renderMobileView",value:function(){var t=this.searchResultsView.getElement();this.container.appendChild(t),this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view")}},{key:"_handleScroll",value:(o=Xo(Ko().mark((function t(){var e,n,r,i,o;return Ko().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.searchResultsView.getScrollElement(),n=e.scrollTop,r=e.scrollHeight,i=e.clientHeight,!(r-n-i+0<10)||this.searchResultsView.loading||this.lastSearchLength!==this.limit){t.next=17;break}return this.searchResultsView.showLoadingCell(),t.next=8,this._getAdditionalSearchResults();case 8:if(o=t.sent){t.next=12;break}return this.searchResultsView.hideLoadingCell(),t.abrupt("return");case 12:this.lastSearchLength=o.length,this.searchResultsView.extendResults(o),this.skip+=this.limit,this.map.fire("additionalSearchResults",{results:o}),this.searchResultsView.hideLoadingCell();case 17:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"_getAdditionalSearchResults",value:(i=Xo(Ko().mark((function t(){var e,n,r;return Ko().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.searchedQuery,n=this.map.getCurrentFloor(),""!==e){t.next=5;break}return this.searchBox.searchBarSuggestionsView.updateResults([]),t.abrupt("return");case 5:if(this.map.mapData){t.next=7;break}return t.abrupt("return");case 7:return t.prev=7,t.next=10,this.searchApi.search(this.map.mapData.map_id,this.map.mapData.map_view_id,e,this.skip,this.limit,n);case 10:return r=t.sent,t.abrupt("return",r);case 14:t.prev=14,t.t0=t.catch(7),axios.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 17:case"end":return t.stop()}}),t,this,[[7,14]])}))),function(){return i.apply(this,arguments)})},{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:"_handleSelectUrlButton",value:function(t){var e=t.url;e&&(this.urlConfirmationPopup||(this.urlConfirmationPopup=new ao),this.urlConfirmationPopup.show(this.map,e,{isKioskMode:"kiosk"===this.currentViewType}))}},{key:"_handleCloseSearchResultsView",value:function(){this.map.setToDefaultState()}},{key:"_handleDefaultState",value:function(){this.searchedQuery=null,this.searchResultsView.updateResults([]),this.searchResultsView.scrollToTop(),this.hide()}},{key:"_handleSearchState",value:function(t){var e=t.query,n=t.results;this.searchedQuery=e,this.lastSearchLength=n.length,this.skip=this.limit,this.searchResultsView.updateView(n,e),this.show()}},{key:"_handleSelectedContentState",value:function(t){this.searchResultsView.updateResults([]),this.hide()}},{key:"_handleDirectionsState",value:function(t){}},{key:"_handleSetupState",value:function(){this.hide()}}],r&&$o(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o}(di);function ua(t){return ua="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},ua(t)}function sa(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,ca(r.key),r)}}function ca(t){var e=function(t){if("object"!=ua(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ua(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ua(e)?e:e+""}function la(t,e,n){return e=fa(e),function(t,e){if(e&&("object"==ua(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||[],fa(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 fa(t){return fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fa(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=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=la(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&&pa(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("div"),this.element.className="sticky-panel-header",this.handleElement=document.createElement("div"),this.handleElement.className="sticky-panel-handle",this.handleElement.setAttribute("aria-hidden","true"),this.element.appendChild(this.handleElement),this.rowElement=null,this.titleElement=null,this.buttonsElement=null,this.customSlotElement=null,null!=this.options.title&&this.setTitle(this.options.title),Array.isArray(this.options.buttons)&&this.options.buttons.forEach((function(e){return t.addButton(e)})),null!=this.options.customElement&&this.setCustomElement(this.options.customElement)}},{key:"_ensureRow",value:function(){this.rowElement||(this.rowElement=document.createElement("div"),this.rowElement.className="sticky-panel-header-row",this.customSlotElement?this.element.insertBefore(this.rowElement,this.customSlotElement):this.element.appendChild(this.rowElement))}},{key:"_ensureTitle",value:function(){this.titleElement||(this._ensureRow(),this.titleElement=document.createElement("h3"),this.titleElement.className="sticky-panel-title",this.rowElement.insertBefore(this.titleElement,this.rowElement.firstChild))}},{key:"_ensureButtons",value:function(){this.buttonsElement||(this._ensureRow(),this.buttonsElement=document.createElement("div"),this.buttonsElement.className="sticky-panel-header-buttons",this.rowElement.appendChild(this.buttonsElement))}},{key:"setTitle",value:function(t){this._ensureTitle(),this.titleElement.textContent=null!=t?String(t):""}},{key:"addButton",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.label,n=t.onClick,r=t.ariaLabel,i=t.className;this._ensureButtons();var o=document.createElement("button");return o.type="button",o.className="sticky-panel-header-button".concat(i?" ".concat(i):""),o.textContent=null!=e?String(e):"",r&&o.setAttribute("aria-label",r),"function"==typeof n&&o.addEventListener("click",n),this.buttonsElement.appendChild(o),o}},{key:"setCustomElement",value:function(t){for(this.customSlotElement||(this.customSlotElement=document.createElement("div"),this.customSlotElement.className="sticky-panel-header-custom",this.element.appendChild(this.customSlotElement));this.customSlotElement.firstChild;)this.customSlotElement.removeChild(this.customSlotElement.firstChild);if(null!=t){var e="function"==typeof t.getElement?t.getElement():t;this.customSlotElement.appendChild(e)}}},{key:"getElement",value:function(){return this.element}}],r&&sa(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function ya(t){return ya="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},ya(t)}function ma(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,ga(r.key),r)}}function ga(t){var e=function(t){if("object"!=ya(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ya(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ya(e)?e:e+""}function Da(t,e,n){return e=ba(e),function(t,e){if(e&&("object"==ya(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,va()?Reflect.construct(e,n||[],ba(t).constructor):e.apply(t,n))}function va(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(va=function(){return!!t})()}function Ma(){return Ma="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ba(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Ma.apply(null,arguments)}function ba(t){return ba=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ba(t)}function wa(t,e){return wa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wa(t,e)}const Ea=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=Da(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&&wa(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("div"),this.element.className="sticky-panel-content",this.innerElement=document.createElement("div"),this.innerElement.className="sticky-panel-content-inner",this.element.appendChild(this.innerElement),this._onNativeScroll=function(){t.element.scrollTop=0,t.element.scrollLeft=0},this.element.addEventListener("scroll",this._onNativeScroll)}},{key:"setContent",value:function(t){for(;this.innerElement.firstChild;)this.innerElement.removeChild(this.innerElement.firstChild);if(null!=t){var e="function"==typeof t.getElement?t.getElement():t;this.innerElement.appendChild(e)}}},{key:"setScrollTop",value:function(t){this.innerElement.style.transform=t>0?"translate3d(0, ".concat(-t,"px, 0)"):""}},{key:"getContentHeight",value:function(){return this.innerElement.offsetHeight}},{key:"getElement",value:function(){return this.element}},{key:"getInnerElement",value:function(){return this.innerElement}},{key:"destroy",value:function(){var t,n,r;this.element.removeEventListener("scroll",this._onNativeScroll),(t=e,n=this,r=Ma(ba(1&3?t.prototype:t),"destroy",n),function(t){return r.apply(n,t)})([])}}],r&&ma(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);var Ca=.55;function ja(t,e){return e>0&&t>0?(1-1/(t*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ca)/e+1))*e:0}function Aa(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ca;if(!(e>0&&t>0))return 0;var r=Math.min(t,e*(1-1e-9));return r*e/(n*(e-r))}function Na(t){return Na="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},Na(t)}var Sa=["collapsed","mid","full"],Ia=Object.freeze({collapsed:.2,mid:.5,full:.9});function Ta(t){if(null==t)return Ia;var e=[];return"object"!==Na(t)||Array.isArray(t)?e.push("stickyPoints must be an object like { collapsed, mid, full }"):(Sa.forEach((function(n){var r;"number"==typeof(r=t[n])&&Number.isFinite(r)&&r>0&&r<=1||e.push("stickyPoints.".concat(n," must be a number in (0, 1] — received ").concat(JSON.stringify(t[n])))})),0!==e.length||t.collapsed<t.mid&&t.mid<t.full||e.push("stickyPoints must satisfy collapsed < mid < full — received ".concat(t.collapsed," / ").concat(t.mid," / ").concat(t.full))),e.length>0?(console.warn("⚠️ StickyPanelView: invalid stickyPoints (".concat(e.join("; "),"). Falling back to defaults ").concat(Ia.collapsed,"/").concat(Ia.mid,"/").concat(Ia.full,".")),Ia):Object.freeze({collapsed:t.collapsed,mid:t.mid,full:t.full})}function Fa(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mid";return Sa.includes(t)?t:(null!=t&&console.warn('⚠️ StickyPanelView: unknown sticky point "'.concat(t,'" — expected one of ').concat(Sa.join(", "),". Using '").concat(e,"'.")),e)}var Oa=1e-6;const xa={schedule:function(t){return requestAnimationFrame(t)},cancel:function(t){cancelAnimationFrame(t)},now:function(){return performance.now()}};function ka(t){return ka="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},ka(t)}function La(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,_a(r.key),r)}}function _a(t){var e=function(t){if("object"!=ka(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ka(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ka(e)?e:e+""}const za=function(){return t=function t(e){var n=e.from,r=e.to,i=e.velocity,o=void 0===i?0:i,a=e.stiffness,u=void 0===a?420:a,s=e.damping,c=void 0===s?38:s,l=e.mass,h=void 0===l?1:l,f=e.restDelta,p=void 0===f?.3:f,d=e.restSpeed,y=void 0===d?10:d,m=e.onUpdate,g=e.onComplete,D=e.scheduler,v=void 0===D?xa:D;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.to=r,this.stiffness=u,this.damping=c,this.mass=h,this.restDelta=p,this.restSpeed=y,this.onUpdate=m,this.onComplete=g,this.scheduler=v,this._value=n,this._velocity=1e3*o,this._running=!1,this._frameId=null,this._lastTime=0},(e=[{key:"start",value:function(){var t=this;return this._running||(this._running=!0,this._lastTime=this.scheduler.now(),this._frameId=this.scheduler.schedule((function(){return t._tick()}))),this}},{key:"stop",value:function(){return this._running?(this._running=!1,null!==this._frameId&&(this.scheduler.cancel(this._frameId),this._frameId=null),this):this}},{key:"isRunning",get:function(){return this._running}},{key:"getVelocity",value:function(){return this._velocity/1e3}},{key:"getValue",value:function(){return this._value}},{key:"_tick",value:function(){var t=this;if(this._running){var e=this.scheduler.now(),n=Math.min(e-this._lastTime,64);for(this._lastTime=e;n>0;){var r=Math.min(n,8)/1e3;n-=8;var i=(-this.stiffness*(this._value-this.to)-this.damping*this._velocity)/this.mass;this._velocity+=i*r,this._value+=this._velocity*r}if(Math.abs(this._velocity)<this.restSpeed&&Math.abs(this._value-this.to)<this.restDelta)return this._value=this.to,this._velocity=0,this._running=!1,this._frameId=null,this.onUpdate(this._value),void(this.onComplete&&this.onComplete());this.onUpdate(this._value),this._frameId=this.scheduler.schedule((function(){return t._tick()}))}}}])&&La(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Ba(t){return Ba="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},Ba(t)}function Pa(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,Ua(r.key),r)}}function Ua(t){var e=function(t){if("object"!=Ba(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ba(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ba(e)?e:e+""}const Ra=function(){return t=function t(e){var n=e.from,r=e.velocity,i=e.min,o=e.max,a=e.decayRate,u=void 0===a?.998:a,s=e.restSpeed,c=void 0===s?.02:s,l=e.onUpdate,h=e.onComplete,f=e.scheduler,p=void 0===f?xa:f;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.min=i,this.max=o,this.decayRate=u,this.restSpeed=c,this.onUpdate=l,this.onComplete=h,this.scheduler=p,this._value=n,this._velocity=r,this._running=!1,this._frameId=null,this._lastTime=0},(e=[{key:"start",value:function(){var t=this;return this._running||(this._running=!0,this._lastTime=this.scheduler.now(),this._frameId=this.scheduler.schedule((function(){return t._tick()}))),this}},{key:"stop",value:function(){return this._running?(this._running=!1,null!==this._frameId&&(this.scheduler.cancel(this._frameId),this._frameId=null),this):this}},{key:"isRunning",get:function(){return this._running}},{key:"getVelocity",value:function(){return this._velocity}},{key:"getValue",value:function(){return this._value}},{key:"_finish",value:function(t){var e=this._velocity;this._running=!1,this._frameId=null,this._velocity=0,this.onUpdate(this._value),this.onComplete&&this.onComplete(this._value,e,t)}},{key:"_tick",value:function(){var t=this;if(this._running){var e=this.scheduler.now(),n=Math.min(e-this._lastTime,64);for(this._lastTime=e;n>0;){var r=Math.min(n,8);if(n-=8,this._value+=this._velocity*r,this._velocity*=Math.pow(this.decayRate,r),this._value<=this.min)return this._value=this.min,void this._finish("min");if(this._value>=this.max)return this._value=this.max,void this._finish("max")}Math.abs(this._velocity)<this.restSpeed?this._finish(null):(this.onUpdate(this._value),this._frameId=this.scheduler.schedule((function(){return t._tick()})))}}}])&&Pa(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Qa(t){return Qa="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},Qa(t)}function Ya(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 Va(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ya(Object(n),!0).forEach((function(e){Ha(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ha(t,e,n){return(e=Za(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ga(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,Za(r.key),r)}}function Za(t){var e=function(t){if("object"!=Qa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Qa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qa(e)?e:e+""}var Wa=1e-6,qa=1e-4,Ka=Object.freeze({snapVelocityThresholdPxPerMs:.25,flingVelocityThresholdPxPerMs:.05,maxVelocityPxPerMs:6,rubberbandCoefficient:Ca,panelSpring:Object.freeze({stiffness:420,damping:38}),scrollReturnSpring:Object.freeze({stiffness:600,damping:50}),scrollDecayRate:.998}),Ja=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.points,r=e.initialPoint,i=void 0===r?"mid":r,o=e.metrics,a=e.callbacks,u=void 0===a?{}:a,s=e.scheduler,c=void 0===s?xa:s,l=e.config,h=void 0===l?{}:l;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.points=Ta(n),this.initialPoint=Fa(i),this.metrics=o,this.callbacks=u,this.scheduler=c,this.config=Va(Va({},Ka),h),this.position=0,this.scrollTop=0,this.stickyPoint=null,this._drag=null,this._panelAnimation=null,this._panelAnimationTargetKey=null,this._dismissFinish=null,this._scrollDecay=null,this._scrollReturn=null,this._initialized=!1,this._destroyed=!1},e=[{key:"getPosition",value:function(){return this.position}},{key:"getScrollTop",value:function(){return this.scrollTop}},{key:"getStickyPoint",value:function(){return this.stickyPoint}},{key:"isDragging",value:function(){return null!==this._drag}},{key:"initializePosition",value:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).animate,e=void 0===t||t;this._destroyed||this._initialized||(this._initialized=!0,this.snapTo(this.initialPoint,{animate:e}))}},{key:"refreshMetrics",value:function(){if(!this._destroyed){if(this._panelAnimation&&this._panelAnimation.isRunning){var t=this._panelAnimationTargetKey,e=this._dismissFinish;this._stopPanelAnimation(),e?(this._setPosition(0),e()):t&&(this._setPosition(this.points[t]),this._settle(t))}var n=this._maxScroll();this.scrollTop>n&&(this._stopScrollAnimations(),this._setScroll(n)),this.renderCurrent()}}},{key:"renderCurrent",value:function(){this._destroyed||(this._emitPanelPosition(),this._emitScroll())}},{key:"destroy",value:function(){this._stopAllAnimations(),this._drag=null,this._destroyed=!0}},{key:"dragStart",value:function(t){this._destroyed||this._height()<=0||(this._stopAllAnimations(),this._drag={region:"header"===t?"header":"content",rawPosition:this._displayToRaw(this.position)},this._emitDragging(!0))}},{key:"dragMove",value:function(t){if(!this._destroyed&&this._drag){var e=this._height();if(!(e<=0)&&Number.isFinite(t)&&0!==t){var n=-t/e;"header"===this._drag.region?this._drag.rawPosition+=n:this._contentDragBy(n,e),this._setPosition(this._rawToDisplay(this._drag.rawPosition))}}}},{key:"dragEnd",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(!this._destroyed&&this._drag){var e=this._drag,n=e.region,r=e.rawPosition;this._drag=null,this._emitDragging(!1);var i=this.config.maxVelocityPxPerMs,o=Number.isFinite(t)?t:0,a=Math.max(-i,Math.min(i,-o));if("content"===n&&Math.abs(r-this.points.full)<qa){var u=this._maxScroll();if(u>Wa&&(this.scrollTop>Wa||a>0))return this._settle("full"),void(Math.abs(a)>=this.config.flingVelocityThresholdPxPerMs&&this._startScrollDecay(a,u))}var s=function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Ca,a=0,u=0;if(t>n)a=t-n,u=i-n;else{if(!(t<e))return 1;a=e-t,u=e-r}if(!(u>0))return 0;var s=a*o/u+1;return o/(s*s)}(r,this.points.collapsed,this.points.full,0,1,this.config.rubberbandCoefficient);this._snapFrom(a*s)}}},{key:"dragCancel",value:function(){this.dragEnd(0)}},{key:"snapTo",value:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).animate,n=void 0===e||e;if(this._destroyed)return!1;if(!Sa.includes(t))return console.warn("⚠️ StickyPanelView: snapTo expects one of ".concat(Sa.join(", "),' — received "').concat(t,'".')),!1;if(this._drag)return!1;this._stopPanelAnimation();var r=this.points[t];return!n||this._height()<=0?(this._setPosition(r),this._settle(t),!0):(this._animatePanelTo(t,0),!0)}},{key:"presentAt",value:function(t){return!(this._destroyed||this._drag||this._height()<=0||!Number.isFinite(t)||(this._stopAllAnimations(),this._setPosition(Math.max(0,Math.min(1,t))),0))}},{key:"beginPresentation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.startPosition,n=void 0===e?null:e,r=t.snapTo,i=void 0===r?this.initialPoint:r,o=t.animate,a=void 0===o||o;if(!this._destroyed){this._drag&&(this._drag=null,this._emitDragging(!1)),this._stopAllAnimations(),this._initialized=!0;var u=this._maxScroll();this.scrollTop>u&&this._setScroll(u),this._height()>0&&null!=n&&Number.isFinite(n)?this._setPosition(Math.max(0,Math.min(1,n))):this.renderCurrent(),this.snapTo(i,{animate:a})}}},{key:"dismiss",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.animate,r=void 0===n||n,i=e.onComplete;if(!this._destroyed){this._drag&&(this._drag=null,this._emitDragging(!1)),this._stopAllAnimations(),this.stickyPoint=null;var o=function(){t._dismissFinish=null,t._stopScrollAnimations(),t._setScroll(0),i&&i()},a=this._height();if(!r||a<=0||this.position<=Wa)return this._setPosition(0),void o();this._dismissFinish=o,this._panelAnimation=new za({from:this.position*a,to:0,velocity:0,stiffness:this.config.panelSpring.stiffness,damping:this.config.panelSpring.damping,scheduler:this.scheduler,onUpdate:function(e){return t._setPosition(Math.max(0,Math.min(1,e/a)))},onComplete:function(){t._panelAnimation=null,t._setPosition(0),o()}}).start()}}},{key:"scrollToTop",value:function(){this._destroyed||(this._stopScrollAnimations(),this._setScroll(0))}},{key:"stepUp",value:function(){var t=this;if(this._destroyed||this._drag||this._height()<=0)return!1;var e=Sa.map((function(e){return{key:e,value:t.points[e]}})).filter((function(e){return e.value>t.position+qa}));if(0===e.length)return!1;var n=e.reduce((function(t,e){return e.value<t.value?e:t}));return this._stopPanelAnimation(),this._animatePanelTo(n.key,0),!0}},{key:"setStickyPoints",value:function(t){this._destroyed||(this.points=Ta(t),!this._drag&&this.stickyPoint&&this.snapTo(this.stickyPoint,{animate:!0}))}},{key:"_contentDragBy",value:function(t,e){var n=this._drag,r=this.points.full;if(t>0){var i=t;if(n.rawPosition<r-Wa){var o=Math.min(i,r-n.rawPosition);n.rawPosition+=o,i-=o}if(i>Wa&&n.rawPosition<=r+Wa){var a=this._maxScroll();if(a>Wa&&this.scrollTop<a-Wa){var u=Math.min(i*e,a-this.scrollTop);this._setScroll(this.scrollTop+u),i-=u/e,n.rawPosition=r}}i>Wa&&(n.rawPosition+=i)}else{var s=-t;if(n.rawPosition>r+Wa){var c=Math.min(s,n.rawPosition-r);n.rawPosition-=c,s-=c}if(s>Wa&&this.scrollTop>Wa){var l=Math.min(s*e,this.scrollTop);this._setScroll(this.scrollTop-l),s-=l/e}s>Wa&&(n.rawPosition-=s)}}},{key:"_snapFrom",value:function(t){var e=this._height();if(!(e<=0)){var n=t/e,r=this.config.snapVelocityThresholdPxPerMs/e,i=function(t,e,n,r){var i=Sa.map((function(t){return{key:t,value:n[t]}}));if(Math.abs(e)>=r){if(e>0){var o=i.filter((function(e){return e.value>t+Oa}));return o.length>0?o.reduce((function(t,e){return e.value<t.value?e:t})):i[i.length-1]}var a=i.filter((function(e){return e.value<t-Oa}));return a.length>0?a.reduce((function(t,e){return e.value>t.value?e:t})):i[0]}return i.reduce((function(e,n){return Math.abs(n.value-t)<Math.abs(e.value-t)?n:e}))}(this.position,n,this.points,r);this._animatePanelTo(i.key,t)}}},{key:"_animatePanelTo",value:function(t,e){var n=this,r=this._height(),i=this.points[t];this._stopPanelAnimation(),this._panelAnimationTargetKey=t,this._panelAnimation=new za({from:this.position*r,to:i*r,velocity:e,stiffness:this.config.panelSpring.stiffness,damping:this.config.panelSpring.damping,scheduler:this.scheduler,onUpdate:function(t){n._setPosition(Math.max(0,Math.min(1,t/r)))},onComplete:function(){n._panelAnimation=null,n._panelAnimationTargetKey=null,n._setPosition(i),n._settle(t)}}).start()}},{key:"_startScrollDecay",value:function(t,e){var n=this;this._stopScrollAnimations(),this._scrollDecay=new Ra({from:this.scrollTop,velocity:t,min:0,max:e,decayRate:this.config.scrollDecayRate,scheduler:this.scheduler,onUpdate:function(t){return n._setScroll(t)},onComplete:function(t,e,r){n._scrollDecay=null,n._setScroll(t),"min"===r&&e<-n.config.flingVelocityThresholdPxPerMs&&n._snapFrom(e)}}).start()}},{key:"_ensureScrollInvariant",value:function(){var t=this;this.scrollTop<=Wa||this.position>=this.points.full-qa||this._scrollReturn&&this._scrollReturn.isRunning||this._drag&&"content"===this._drag.region||(this._scrollDecay&&(this._scrollDecay.stop(),this._scrollDecay=null),this._scrollReturn=new za({from:this.scrollTop,to:0,velocity:0,stiffness:this.config.scrollReturnSpring.stiffness,damping:this.config.scrollReturnSpring.damping,scheduler:this.scheduler,onUpdate:function(e){return t._setScroll(Math.max(0,e))},onComplete:function(){t._scrollReturn=null,t._setScroll(0)}}).start())}},{key:"_height",value:function(){var t=this.metrics&&"function"==typeof this.metrics.getMapHeight?this.metrics.getMapHeight():0;return Number.isFinite(t)&&t>0?t:0}},{key:"_maxScroll",value:function(){var t=this.metrics&&"function"==typeof this.metrics.getMaxScroll?this.metrics.getMaxScroll():0;return Number.isFinite(t)&&t>0?t:0}},{key:"_displayToRaw",value:function(t){return function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Ca;return t>n?n+Aa(t-n,i-n,o):t<e?e-Aa(e-t,e-r,o):t}(t,this.points.collapsed,this.points.full,0,1,this.config.rubberbandCoefficient)}},{key:"_rawToDisplay",value:function(t){return function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Ca;return t>n?n+ja(t-n,i-n,o):t<e?e-ja(e-t,e-r,o):t}(t,this.points.collapsed,this.points.full,0,1,this.config.rubberbandCoefficient)}},{key:"_setPosition",value:function(t){this.position=Math.max(0,Math.min(1,t)),this._emitPanelPosition(),this._ensureScrollInvariant()}},{key:"_setScroll",value:function(t){this.scrollTop=Math.max(0,t),this._emitScroll()}},{key:"_settle",value:function(t){var e=this.stickyPoint;this.stickyPoint=t,this._ensureScrollInvariant(),e!==t&&this.callbacks.onStickyPointChange&&this.callbacks.onStickyPointChange({stickyPoint:t,previousStickyPoint:e})}},{key:"_emitPanelPosition",value:function(){this.callbacks.onPanelPositionChange&&this.callbacks.onPanelPositionChange(this.position)}},{key:"_emitScroll",value:function(){this.callbacks.onScrollChange&&this.callbacks.onScrollChange(this.scrollTop)}},{key:"_emitDragging",value:function(t){this.callbacks.onDraggingChange&&this.callbacks.onDraggingChange(t)}},{key:"_stopPanelAnimation",value:function(){this._panelAnimation&&(this._panelAnimation.stop(),this._panelAnimation=null,this._panelAnimationTargetKey=null),this._dismissFinish=null}},{key:"_stopScrollAnimations",value:function(){this._scrollDecay&&(this._scrollDecay.stop(),this._scrollDecay=null),this._scrollReturn&&(this._scrollReturn.stop(),this._scrollReturn=null)}},{key:"_stopAllAnimations",value:function(){this._stopPanelAnimation(),this._stopScrollAnimations()}}],e&&Ga(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();const Xa=Ja;function $a(t){return $a="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},$a(t)}function tu(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,eu(r.key),r)}}function eu(t){var e=function(t){if("object"!=$a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=$a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$a(e)?e:e+""}const nu=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.windowMs,r=void 0===n?100:n,i=e.maxIdleMs,o=void 0===i?80:i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.windowMs=r,this.maxIdleMs=o,this._samples=[]},(e=[{key:"reset",value:function(){this._samples=[]}},{key:"addSample",value:function(t,e){this._samples.push({value:t,time:e}),this._prune(e)}},{key:"_prune",value:function(t){for(var e=t-this.windowMs;this._samples.length>2&&this._samples[0].time<e;)this._samples.shift()}},{key:"getVelocity",value:function(t){if(this._samples.length<2)return 0;var e=this._samples[this._samples.length-1];if(t-e.time>this.maxIdleMs)return 0;for(var n=e.time-this.windowMs,r=this._samples[0],i=0;i<this._samples.length-1;i++)if(this._samples[i].time>=n){r=this._samples[i];break}var o=e.time-r.time;return o<1e-6?0:(e.value-r.value)/o}}])&&tu(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function ru(t){return ru="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},ru(t)}function iu(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,ou(r.key),r)}}function ou(t){var e=function(t){if("object"!=ru(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ru(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ru(e)?e:e+""}const au=function(){return t=function t(e){var n=e.element,r=e.isHeaderTarget,i=e.onDragStart,o=e.onDragMove,a=e.onDragEnd,u=e.onDragCancel,s=e.onTap,c=e.now;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.element=n,this.isHeaderTarget=r,this.onDragStart=i,this.onDragMove=o,this.onDragEnd=a,this.onDragCancel=u||function(){return a(0)},this.onTap=s||null,this.now=c||function(){return performance.now()},this._tracker=new nu,this._pointerId=null,this._startY=0,this._lastY=0,this._moved=!1,this._region=null,this._downTarget=null,this._suppressClick=!1,this._suppressClickUntil=0,this._onPointerDown=this._onPointerDown.bind(this),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onPointerCancel=this._onPointerCancel.bind(this),this._onClickCapture=this._onClickCapture.bind(this),this._onNativeDragStart=this._onNativeDragStart.bind(this),this._onSelectStart=this._onSelectStart.bind(this),this.element.addEventListener("pointerdown",this._onPointerDown),this.element.addEventListener("click",this._onClickCapture,!0),this.element.addEventListener("dragstart",this._onNativeDragStart),document.addEventListener("selectstart",this._onSelectStart)},(e=[{key:"isActive",value:function(){return null!==this._pointerId}},{key:"destroy",value:function(){this._removeWindowListeners(),this.element.removeEventListener("pointerdown",this._onPointerDown),this.element.removeEventListener("click",this._onClickCapture,!0),this.element.removeEventListener("dragstart",this._onNativeDragStart),document.removeEventListener("selectstart",this._onSelectStart),this._pointerId=null}},{key:"_onPointerDown",value:function(t){null===this._pointerId&&("mouse"===t.pointerType&&0!==t.button||("mouse"!==t.pointerType||!t.cancelable||t.target instanceof Element&&t.target.closest("input, textarea, select, [contenteditable]")||t.preventDefault(),this._pointerId=t.pointerId,this._startY=t.clientY,this._lastY=t.clientY,this._moved=!1,this._region=this.isHeaderTarget(t.target)?"header":"content",this._downTarget=t.target,this._suppressClick=!1,this._suppressClickUntil=0,this._tracker.reset(),this._tracker.addSample(t.clientY,this.now()),window.addEventListener("pointermove",this._onPointerMove,{passive:!1}),window.addEventListener("pointerup",this._onPointerUp),window.addEventListener("pointercancel",this._onPointerCancel),this.onDragStart(this._region)))}},{key:"_onPointerMove",value:function(t){if(t.pointerId===this._pointerId){var e=t.clientY-this._lastY;if(this._lastY=t.clientY,this._tracker.addSample(t.clientY,this.now()),!this._moved&&Math.abs(t.clientY-this._startY)>4){this._moved=!0;try{this.element.setPointerCapture(t.pointerId)}catch(t){}}this._moved&&t.cancelable&&t.preventDefault(),0!==e&&this.onDragMove(e)}}},{key:"_onPointerUp",value:function(t){if(t.pointerId===this._pointerId){var e=this._tracker.getVelocity(this.now()),n=!this._moved,r=this._region,i=this._downTarget;this._suppressClick=this._moved,this._suppressClickUntil=this.now()+500,this._teardownGesture(),this.onDragEnd(e),n&&this.onTap&&this.onTap(r,i)}}},{key:"_onPointerCancel",value:function(t){t.pointerId===this._pointerId&&(this._teardownGesture(),this.onDragCancel())}},{key:"_teardownGesture",value:function(){if(this._removeWindowListeners(),null!==this._pointerId)try{this.element.releasePointerCapture(this._pointerId)}catch(t){}this._pointerId=null,this._moved=!1,this._region=null,this._downTarget=null}},{key:"_removeWindowListeners",value:function(){window.removeEventListener("pointermove",this._onPointerMove),window.removeEventListener("pointerup",this._onPointerUp),window.removeEventListener("pointercancel",this._onPointerCancel)}},{key:"_onClickCapture",value:function(t){this._suppressClick&&(this._suppressClick=!1,this.now()>this._suppressClickUntil||(t.preventDefault(),t.stopPropagation()))}},{key:"_onNativeDragStart",value:function(t){t.preventDefault()}},{key:"_onSelectStart",value:function(t){null!==this._pointerId&&this._moved&&t.preventDefault()}}])&&iu(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function uu(t){return uu="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},uu(t)}function su(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,cu(r.key),r)}}function cu(t){var e=function(t){if("object"!=uu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=uu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==uu(e)?e:e+""}const lu=function(){return t=function t(e){var n=e.element,r=e.onDragStart,i=e.onDragMove,o=e.onDragEnd,a=e.isEnabled,u=e.idleMs,s=void 0===u?150:u,c=e.now;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.element=n,this.onDragStart=r,this.onDragMove=i,this.onDragEnd=o,this.isEnabled=a||function(){return!0},this.idleMs=s,this.now=c||function(){return performance.now()},this._tracker=new nu,this._active=!1,this._syntheticY=0,this._lastVelocity=0,this._idleTimer=null,this._onWheel=this._onWheel.bind(this),this.element.addEventListener("wheel",this._onWheel,{passive:!1})},(e=[{key:"isActive",value:function(){return this._active}},{key:"cancel",value:function(){null!==this._idleTimer&&(clearTimeout(this._idleTimer),this._idleTimer=null),this._active=!1,this._lastVelocity=0}},{key:"destroy",value:function(){this.element.removeEventListener("wheel",this._onWheel),this.cancel()}},{key:"_onWheel",value:function(t){if(!t.ctrlKey&&this.isEnabled()){t.preventDefault();var e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=16:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this.element.clientHeight||800),0!==(e=Math.max(-160,Math.min(160,e)))){var n=this.now();this._active||(this._active=!0,this._syntheticY=0,this._tracker.reset(),this._tracker.addSample(0,n),this.onDragStart("content"));var r=-e;this._syntheticY+=r,this._tracker.addSample(this._syntheticY,n),this._lastVelocity=this._tracker.getVelocity(n),this.onDragMove(r),this._restartIdleTimer()}}}},{key:"_restartIdleTimer",value:function(){var t=this;null!==this._idleTimer&&clearTimeout(this._idleTimer),this._idleTimer=setTimeout((function(){t._idleTimer=null,t._active=!1,t.onDragEnd(t._lastVelocity)}),this.idleMs)}}])&&su(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function hu(t){return hu="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},hu(t)}var fu=new WeakMap;function pu(t){return null!==t&&("object"===hu(t)||"function"==typeof t)}function du(t){return du="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},du(t)}function yu(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,mu(r.key),r)}}function mu(t){var e=function(t){if("object"!=du(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=du(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==du(e)?e:e+""}function gu(t,e,n){return e=Mu(e),function(t,e){if(e&&("object"==du(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,Du()?Reflect.construct(e,n||[],Mu(t).constructor):e.apply(t,n))}function Du(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Du=function(){return!!t})()}function vu(){return vu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Mu(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},vu.apply(null,arguments)}function Mu(t){return Mu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Mu(t)}function bu(t,e){return bu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bu(t,e)}const wu=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=gu(this,e,[n])).points=Ta(n.stickyPoints),t.initialPoint=Fa(n.initialPoint),t._mapHeight=0,t._headerHeight=0,t._contentHeight=0,t._laidOut=!1,t._handoffHost=null,t._presented=!1,t._mapCollapseTarget=null,t._initialize(),null!=n.content&&t.setContentView(n.content),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&&bu(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("div"),this.element.className="sticky-panel",this.sheetElement=document.createElement("div"),this.sheetElement.className="sticky-panel-sheet",this.sheetElement.setAttribute("role","region"),this.options.header&&null!=this.options.header.title&&this.sheetElement.setAttribute("aria-label",String(this.options.header.title)),this.element.appendChild(this.sheetElement),this.header=new da(this.options.header||{}),this.content=new Ea,this.sheetElement.appendChild(this.header.getElement()),this.sheetElement.appendChild(this.content.getElement()),this.controller=new Xa({points:this.points,initialPoint:this.initialPoint,metrics:{getMapHeight:function(){return t._mapHeight},getMaxScroll:function(){return t._computeMaxScroll()}},callbacks:{onPanelPositionChange:function(e){return t._applyPanelPosition(e)},onScrollChange:function(e){return t._applyScroll(e)},onStickyPointChange:function(e){return t.fire("stickypointchange",e)},onDraggingChange:function(e){return t._applyDragState(e)}},config:this.options.physics||{}}),this.recognizer=new au({element:this.sheetElement,isHeaderTarget:function(e){return e instanceof Node&&t.header.getElement().contains(e)},onDragStart:function(e){t.wheelAdapter.cancel(),t.controller.dragStart(e)},onDragMove:function(e){return t.controller.dragMove(e)},onDragEnd:function(e){return t.controller.dragEnd(e)},onDragCancel:function(){return t.controller.dragCancel()},onTap:function(e,n){return t._handleTap(e,n)}}),this.wheelAdapter=new lu({element:this.sheetElement,isEnabled:function(){return!t.recognizer.isActive()},onDragStart:function(e){return t.controller.dragStart(e)},onDragMove:function(e){return t.controller.dragMove(e)},onDragEnd:function(e){return t.controller.dragEnd(e)}}),this._observeSizes()}},{key:"_observeSizes",value:function(){var t=this;this._onWindowResize=null,"undefined"!=typeof ResizeObserver?(this._resizeObserver=new ResizeObserver((function(){return t._handleResize()})),this._resizeObserver.observe(this.element),this._resizeObserver.observe(this.header.getElement()),this._resizeObserver.observe(this.content.getInnerElement())):(this._resizeObserver=null,this._onWindowResize=function(){return t._handleResize()},window.addEventListener("resize",this._onWindowResize))}},{key:"_measure",value:function(){this._mapHeight=this.element.clientHeight,this._headerHeight=this.header.getElement().offsetHeight,this._contentHeight=this.content.getContentHeight()}},{key:"_computeMaxScroll",value:function(){if(this._mapHeight<=0)return 0;var t=this.points.full*this._mapHeight-this._headerHeight;return Math.max(0,this._contentHeight-Math.max(t,0))}},{key:"_handleResize",value:function(){this._measure(),this._mapHeight<=0||(this._laidOut?this.controller.refreshMetrics():(this._laidOut=!0,this.controller.initializePosition({animate:!0})))}},{key:"refreshLayout",value:function(){this._handleResize()}},{key:"_handleTap",value:function(t,e){"header"===t&&(e instanceof Element&&e.closest('button, a, input, select, textarea, [role="button"]')||this.controller.stepUp())}},{key:"_applyPanelPosition",value:function(t){this.sheetElement.style.transform="translate3d(0, ".concat(-t*this._mapHeight,"px, 0)"),this._presented&&this._handoffHost&&this._mapHeight>0&&function(t,e,n){var r=n.position,i=n.stickyPoint,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Date.now();pu(t)&&e&&fu.set(t,{owner:e,position:r,stickyPoint:i,active:!0,updatedAt:o})}(this._handoffHost,this,{position:t,stickyPoint:this.controller.getStickyPoint()}),this.fire("positionchange",{position:t})}},{key:"_applyScroll",value:function(t){this.content.setScrollTop(t),this.fire("scrollchange",{scrollTop:t})}},{key:"_applyDragState",value:function(t){this.sheetElement.classList.toggle("sticky-panel-sheet--dragging",t),this.fire("dragstatechange",{isDragging:t})}},{key:"setContentView",value:function(t){this.content.setContent(t),this.controller.scrollToTop(),this._measure(),this.controller.refreshMetrics()}},{key:"setTitle",value:function(t){this.header.setTitle(t),this.sheetElement.setAttribute("aria-label",null!=t?String(t):"")}},{key:"addHeaderButton",value:function(t){return this.header.addButton(t)}},{key:"setHeaderCustomElement",value:function(t){this.header.setCustomElement(t)}},{key:"snapTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.controller.snapTo(t,e)}},{key:"getStickyPoints",value:function(){return this.points}},{key:"setStickyPoints",value:function(t){this.points=Ta(t),this.controller.setStickyPoints(this.points)}},{key:"getPosition",value:function(){return this.controller.getPosition()}},{key:"getStickyPoint",value:function(){return this.controller.getStickyPoint()}},{key:"getScrollTop",value:function(){return this.controller.getScrollTop()}},{key:"getMaxScroll",value:function(){return this._computeMaxScroll()}},{key:"isDragging",value:function(){return this.controller.isDragging()}},{key:"setHandoffHost",value:function(t){this._handoffHost=t}},{key:"present",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.snapTo,n=void 0===e?this.initialPoint:e,r=t.animate,i=void 0===r||r,o=this._handoffHost?function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();if(!pu(t))return null;var n=fu.get(t);return n?!n.active&&e-n.updatedAt>600?null:{position:n.position,stickyPoint:n.stickyPoint}:null}(this._handoffHost):null;this._presented=!0,this.element.classList.remove("sticky-panel--hidden"),this.sheetElement.classList.remove("sticky-panel-sheet--dismissing"),this._measure(),this._mapHeight>0&&(this._laidOut=!0),this.controller.beginPresentation({startPosition:o&&this._mapHeight>0?o.position:null,snapTo:n,animate:i})}},{key:"dismiss",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.animate,r=void 0===n||n,i=e.onHidden;this._presented?(this._handoffHost&&function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.position,i=n.stickyPoint,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Date.now();if(pu(t)&&e){var a=fu.get(t);a&&a.owner===e&&fu.set(t,{owner:e,position:null!=r?r:a.position,stickyPoint:void 0!==i?i:a.stickyPoint,active:!1,updatedAt:o})}}(this._handoffHost,this,{position:this.controller.getPosition(),stickyPoint:this.controller.getStickyPoint()}),this._presented=!1,this.sheetElement.classList.add("sticky-panel-sheet--dismissing"),this.controller.dismiss({animate:r,onComplete:function(){t._presented||(t.element.classList.add("sticky-panel--hidden"),t.sheetElement.classList.remove("sticky-panel-sheet--dismissing"),i&&i())}})):i&&i()}},{key:"isPresented",value:function(){return this._presented}},{key:"enableCollapseOnMapInteraction",value:function(t){var e=this;if(t&&this._mapCollapseTarget!==t){this._mapCollapseTarget=t;var n=function(t){return e._handleMapFocus(t)},r=function(){var e=t.map;return!(!e||"function"!=typeof e.on||(e.on("mousedown",n),e.on("touchstart",n),0))};r()||"function"!=typeof t.on||t.on("load",r)}}},{key:"_handleMapFocus",value:function(t){if(this._presented&&!(this._mapHeight<=0)&&t&&t.point){var e=this._mapCollapseTarget;if(e&&e.map){var n=[];try{n=e.map.queryRenderedFeatures(t.point)||[]}catch(t){return}0===n.filter((function(t){var e;return"symbol"===(null==t||null===(e=t.layer)||void 0===e?void 0:e.type)})).length&&this.controller.snapTo("collapsed")}}}},{key:"show",value:function(){this.element.classList.remove("sticky-panel--hidden"),this.refreshLayout()}},{key:"hide",value:function(){this.element.classList.add("sticky-panel--hidden")}},{key:"getElement",value:function(){return this.element}},{key:"destroy",value:function(){var t,n,r;this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),this._onWindowResize&&(window.removeEventListener("resize",this._onWindowResize),this._onWindowResize=null),this.recognizer.destroy(),this.wheelAdapter.destroy(),this.controller.destroy(),this.content.destroy(),this.element.parentNode&&this.element.parentNode.removeChild(this.element),(t=e,n=this,r=vu(Mu(1&3?t.prototype:t),"destroy",n),function(t){return r.apply(n,t)})([])}}],r&&yu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function Eu(t){return Eu="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},Eu(t)}function Cu(){Cu=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==Eu(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(Eu(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function ju(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function Au(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){ju(o,r,i,a,u,"next",t)}function u(t){ju(o,r,i,a,u,"throw",t)}a(void 0)}))}}function Nu(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,Su(r.key),r)}}function Su(t){var e=function(t){if("object"!=Eu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Eu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Eu(e)?e:e+""}function Iu(t,e,n){return e=Ou(e),function(t,e){if(e&&("object"==Eu(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,Tu()?Reflect.construct(e,n||[],Ou(t).constructor):e.apply(t,n))}function Tu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tu=function(){return!!t})()}function Fu(){return Fu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ou(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Fu.apply(null,arguments)}function Ou(t){return Ou=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ou(t)}function xu(t,e){return xu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},xu(t,e)}var ku={collapsed:.1,mid:.55,full:.97},Lu="search-results-view--panel-hosted";const _u=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=Iu(this,e,[n])).searchResultsView=new Wo,t.searchApi=nn.getSearchApi(),t.searchedQuery=null,t.map=null,t.lastSearchLength=0,t.skip=0,t.limit=30,t._presentation=null,t.stickyPanelView=new wu({stickyPoints:ku,initialPoint:"mid",header:{buttons:[{label:"✕",ariaLabel:"Close search results",onClick:function(){t.map&&t.map.setToDefaultState()}}]}}),t.stickyPanelView.on("scrollchange",(function(e){var n=e.scrollTop;t._maybeLoadMoreFromPanel(n)})),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&&xu(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-search-control-container",this.hide(),this._initializeEventListeners(),this._attachResizeListener(),this._attachScrollListener(),this._initialize(),this.stickyPanelView.setHandoffHost(t),this.stickyPanelView.enableCollapseOnMapInteraction(t),this.container}},{key:"onRemove",value:function(){var t,n,r;this.stickyPanelView.destroy(),(t=e,n=this,r=Fu(Ou(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"show",value:function(){this.container&&(this.container.style.display="flex",this._isMobileLayout()&&(document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"))}},{key:"hide",value:function(){this.container&&(this.container.style.display="none",document.body.style.overflow="",document.documentElement.style.overflow="")}},{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.map.on("state:setup",this._handleSetupState.bind(this)),this.searchResultsView.on("closeView",this._handleCloseSearchResultsView.bind(this)),this.searchResultsView.on("selectCell",this._handleSearchResultSelect.bind(this)),this.searchResultsView.on("selectUrlButton",this._handleSelectUrlButton.bind(this)),this.searchResultsView.on("hoverCell",this._handleCellHover.bind(this)),this.searchResultsView.on("hoverOutCell",this._handleCellHoverOut.bind(this))}},{key:"_renderDesktopView",value:function(){this._presentation="desktop",this.stickyPanelView.dismiss({animate:!1});var t=this.searchResultsView.getElement();t.classList.remove(Lu),this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view")}},{key:"_renderMobileView",value:function(){this._presentation="panel";var t=this.searchResultsView.getElement();t.classList.add(Lu),this.stickyPanelView.setContentView(t),this.container.appendChild(this.stickyPanelView.getElement()),this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view"),this.stickyPanelView.refreshLayout(),this.map&&"function"==typeof this.map.getCurrentState&&"search"===this.map.getCurrentState()&&null!=this.searchedQuery&&this.stickyPanelView.present({snapTo:"mid"})}},{key:"_attachScrollListener",value:function(){this.searchResultsView.getScrollElement().addEventListener("scroll",this._handleScroll.bind(this))}},{key:"_handleScroll",value:(a=Au(Cu().mark((function t(){var e,n,r,i;return Cu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("desktop"===this._presentation){t.next=2;break}return t.abrupt("return");case 2:if(e=this.searchResultsView.getScrollElement(),n=e.scrollTop,r=e.scrollHeight,i=e.clientHeight,!(r-n-i<10)){t.next=6;break}return t.next=6,this._loadMoreResults();case 6:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"_maybeLoadMoreFromPanel",value:function(t){if("panel"===this._presentation){var e=this.stickyPanelView.getMaxScroll();e<=0||e-t<10&&this._loadMoreResults()}}},{key:"_loadMoreResults",value:(o=Au(Cu().mark((function t(){var e;return Cu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.searchResultsView.loading&&this.lastSearchLength===this.limit){t.next=2;break}return t.abrupt("return");case 2:return this.searchResultsView.showLoadingCell(),t.next=5,this._getAdditionalSearchResults();case 5:if(e=t.sent){t.next=9;break}return this.searchResultsView.hideLoadingCell(),t.abrupt("return");case 9:this.lastSearchLength=e.length,this.searchResultsView.extendResults(e),this.skip+=this.limit,this.map.fire("additionalSearchResults",{results:e}),this.searchResultsView.hideLoadingCell();case 14:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"_getAdditionalSearchResults",value:(i=Au(Cu().mark((function t(){var e,n,r;return Cu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=this.searchedQuery)&&this.map&&this.map.mapData){t.next=3;break}return t.abrupt("return",null);case 3:return n=this.map.getCurrentFloor(),t.prev=4,t.next=7,this.searchApi.search(this.map.mapData.map_id,this.map.mapData.map_view_id,e,this.skip,this.limit,n);case 7:return r=t.sent,t.abrupt("return",r);case 11:return t.prev=11,t.t0=t.catch(4),Me.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0),t.abrupt("return",null);case 15:case"end":return t.stop()}}),t,this,[[4,11]])}))),function(){return i.apply(this,arguments)})},{key:"_handleCellHover",value:function(t){var e=t.result;this.map.fire("hoverSearchResult",{result:e})}},{key:"_handleCellHoverOut",value:function(t){var e=t.result;this.map.fire("hoverEndSearchResult",{result:e})}},{key:"_handleSearchResultSelect",value:function(t){var e=t.result.placement_id;this.map.setToSelectedContentState([e])}},{key:"_handleSelectUrlButton",value:function(t){var e=t.url;e&&(this.urlConfirmationPopup||(this.urlConfirmationPopup=new ao),this.urlConfirmationPopup.show(this.map,e,{isKioskMode:"kiosk"===this.currentViewType}))}},{key:"_handleCloseSearchResultsView",value:function(){this.map.setToDefaultState()}},{key:"_handleInitiateSearchState",value:function(){this.map.setToSearchState(this.searchedQuery)}},{key:"_handleDefaultState",value:function(){var t=this;this.searchedQuery=null;var e=function(){t.searchResultsView.updateResults([]),t.searchResultsView.scrollToTop()};"panel"===this._presentation?this.stickyPanelView.dismiss({onHidden:function(){t.hide(),e()}}):(this.hide(),e())}},{key:"_handleSearchState",value:function(t){var e=t.query,n=t.results;this.searchedQuery=e,this.lastSearchLength=n.length,this.skip=this.limit,this.searchResultsView.updateView(n,e),this.searchResultsView.getElement().classList.toggle("search-results-view--empty",0===n.length),this.show(),"panel"===this._presentation&&(this.stickyPanelView.setTitle(e),this.stickyPanelView.present({snapTo:"mid"}))}},{key:"_handleSelectedContentState",value:function(t){this.stickyPanelView.dismiss({animate:!1}),this.hide(),this.searchResultsView.updateResults([])}},{key:"_handleDirectionsState",value:function(t){}},{key:"_handleSetupState",value:function(){this.stickyPanelView.dismiss({animate:!1}),this.hide()}}],r&&Nu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o,a}(di);function zu(t){return zu="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},zu(t)}function Bu(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,Pu(r.key),r)}}function Pu(t){var e=function(t){if("object"!=zu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=zu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zu(e)?e:e+""}function Uu(t,e,n){return e=Qu(e),function(t,e){if(e&&("object"==zu(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,Ru()?Reflect.construct(e,n||[],Qu(t).constructor):e.apply(t,n))}function Ru(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ru=function(){return!!t})()}function Qu(t){return Qu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qu(t)}function Yu(t,e){return Yu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yu(t,e)}const Vu=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=Uu(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&&Yu(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.textContainer.style.paddingLeft="10px",this.nameElement=document.createElement("div"),this.nameElement.className="header-content-name";var e=this.contentPlacement.catalog.content_title_key,n=t.data[e];this.nameElement.textContent=n,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);var r=this.contentPlacement.catalog.content_display_img_key,i=t.data[r];if(i){this.imageViewElement=document.createElement("div"),this.imageViewElement.className="header-image-view";var o=document.createElement("img");o.className="header-image",o.src=i,o.style.width="100%",o.style.height="100%",o.style.objectFit="contain",o.style.background="white",this.imageViewElement.appendChild(o),this.element.appendChild(this.imageViewElement)}this.element.appendChild(this.textContainer)}},{key:"getElement",value:function(){return this.element}}])&&Bu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function Hu(t){return Hu="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},Hu(t)}function Gu(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,Zu(r.key),r)}}function Zu(t){var e=function(t){if("object"!=Hu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Hu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hu(e)?e:e+""}function Wu(t,e,n){return e=Ku(e),function(t,e){if(e&&("object"==Hu(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,qu()?Reflect.construct(e,n||[],Ku(t).constructor):e.apply(t,n))}function qu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(qu=function(){return!!t})()}function Ku(t){return Ku=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ku(t)}function Ju(t,e){return Ju=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ju(t,e)}const Xu=function(t){function e(t,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=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),(r=Wu(this,e,[o])).icon=t,r.text=n,r.link=i,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&&Ju(t,e)}(e,t),n=e,(r=[{key:"_formatUrl",value:function(t){return t?(t=t.trim(),/^https?:\/\//i.test(t)||(t="https://"+t),t):t}},{key:"_initialize",value:function(){this.link?(this.element=document.createElement("a"),this.element.href=this._formatUrl(this.link),this.element.target="_blank",this.element.rel="noopener noreferrer",this.element.style.textDecoration="none"):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}}])&&Gu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function $u(t){return $u="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},$u(t)}function ts(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,es(r.key),r)}}function es(t){var e=function(t){if("object"!=$u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=$u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$u(e)?e:e+""}function ns(t,e,n){return e=is(e),function(t,e){if(e&&("object"==$u(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,rs()?Reflect.construct(e,n||[],is(t).constructor):e.apply(t,n))}function rs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(rs=function(){return!!t})()}function is(t){return is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},is(t)}function os(t,e){return os=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},os(t,e)}const as=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=ns(this,e,[r])).data=t,n.showTitle=!1!==r.showTitle,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&&os(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",Object.keys(this.data).forEach((function(e,n){var r=t.data[e],i=document.createElement("div");i.className="details-view-item";var o=document.createElement("div");o.className="details-view-key",o.textContent=e;var a=document.createElement("span");a.className="details-view-value",a.textContent=r,i.appendChild(o),i.appendChild(a),t.element.appendChild(i)}))}},{key:"getElement",value:function(){return this.element}}])&&ts(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function us(t){return us="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},us(t)}function ss(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,cs(r.key),r)}}function cs(t){var e=function(t){if("object"!=us(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=us(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==us(e)?e:e+""}function ls(t,e,n){return e=fs(e),function(t,e){if(e&&("object"==us(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,hs()?Reflect.construct(e,n||[],fs(t).constructor):e.apply(t,n))}function hs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(hs=function(){return!!t})()}function fs(t){return fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fs(t)}function ps(t,e){return ps=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ps(t,e)}const ds=function(t){function e(t,n){var r,i=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=ls(this,e,[i])).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&&ps(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-children-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 Eo(e);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.on("selectUrlButton",(function(e){return t.fire("selectUrlButton",e)})),e.getElement().addEventListener("click",(function(n){return t._handleChildSelect(n,e)}))}))}},{key:"_handleChildSelect",value:function(t,e){this.fire("selectChildContentPlacement",{placementId:e.childPlacement.placement_id})}},{key:"getElement",value:function(){return this.element}}],r&&ss(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn),ys="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIxLjQxIDguNjQwMTNDMjEuNDEgOC42NDAxMyAyMS40MSA4LjY0MDEzIDIxLjQxIDguNTkwMTNDMjAuNzA1MyA2LjY2NjM1IDE5LjQyNjkgNS4wMDU0MSAxNy43NDc0IDMuODMxOTlDMTYuMDY4IDIuNjU4NTcgMTQuMDY4NyAyLjAyOTMgMTIuMDIgMi4wMjkzQzkuOTcxMiAyLjAyOTMgNy45NzE4OSAyLjY1ODU3IDYuMjkyNDYgMy44MzE5OUM0LjYxMzA0IDUuMDA1NDEgMy4zMzQ1NSA2LjY2NjM1IDIuNjI5OTUgOC41OTAxM0MyLjYyOTk1IDguNTkwMTMgMi42Mjk5NSA4LjU5MDEzIDIuNjI5OTUgOC42NDAxM0MxLjg0MzA4IDEwLjgxMSAxLjg0MzA4IDEzLjE4OTIgMi42Mjk5NSAxNS4zNjAxQzIuNjI5OTUgMTUuMzYwMSAyLjYyOTk1IDE1LjM2MDEgMi42Mjk5NSAxNS40MTAxQzMuMzM0NTUgMTcuMzMzOSA0LjYxMzA0IDE4Ljk5NDggNi4yOTI0NiAyMC4xNjgzQzcuOTcxODkgMjEuMzQxNyA5Ljk3MTIgMjEuOTcxIDE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gOC4wMDAxM0gxNy41MkMxNy4yODUyIDcuMTA4MjggMTYuOTQ5NyA2LjI0NjA2IDE2LjUyIDUuNDMwMTNDMTcuNTAwNyA2LjA5ODIgMTguMzIwNSA2Ljk3NjA3IDE4LjkyIDguMDAwMTNaTTEzIDQuMzAwMTNDMTQuMjI4MiA1LjIwMTQ0IDE1LjA5MDggNi41MTQ4OSAxNS40MyA4LjAwMDEzSDEzVjQuMzAwMTNaTTEzIDE5LjcwMDFWMTYuMDAwMUgxNS40M0MxNS4wOTA4IDE3LjQ4NTQgMTQuMjI4MiAxOC43OTg4IDEzIDE5LjcwMDFaTTE1Ljg2IDE0LjAwMDFIMTNWMTAuMDAwMUgxNS44NkMxNi4wNDY2IDExLjMyNjkgMTYuMDQ2NiAxMi42NzMzIDE1Ljg2IDE0LjAwMDFaTTE2LjU1IDE4LjU3MDFDMTYuOTc5NyAxNy43NTQyIDE3LjMxNTIgMTYuODkyIDE3LjU1IDE2LjAwMDFIMTguOTVDMTguMzUwNSAxNy4wMjQyIDE3LjUzMDcgMTcuOTAyMSAxNi41NSAxOC41NzAxWk0xOS43NCAxNC4wMDAxSDE3Ljg4QzE3Ljk2MTMgMTMuMzM2NiAxOC4wMDE0IDEyLjY2ODYgMTggMTIuMDAwMUMxOC4wMDExIDExLjMzMTYgMTcuOTYxIDEwLjY2MzcgMTcuODggMTAuMDAwMUgxOS43NEMyMC4wODY3IDExLjMxMDkgMjAuMDg2NyAxMi42ODkzIDE5Ljc0IDE0LjAwMDFaIiBmaWxsPSIjMTcxNzE3Ii8+Cjwvc3ZnPgo=";function ms(t){return ms="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},ms(t)}function gs(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 Ds(t,e,n){return(e=Cs(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vs(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=bs(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function Ms(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,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||bs(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 bs(t,e){if(t){if("string"==typeof t)return ws(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)?ws(t,e):void 0}}function ws(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 Es(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,Cs(r.key),r)}}function Cs(t){var e=function(t){if("object"!=ms(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ms(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ms(e)?e:e+""}function js(t,e,n){return e=Ns(e),function(t,e){if(e&&("object"==ms(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,As()?Reflect.construct(e,n||[],Ns(t).constructor):e.apply(t,n))}function As(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(As=function(){return!!t})()}function Ns(t){return Ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ns(t)}function Ss(t,e){return Ss=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ss(t,e)}const Is=function(t){function e(){var t,n=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,e),(t=js(this,e,[n])).contentPlacement=null,t.isSelectionMode=!1,t.isKioskMode=n.isKioskMode||!1,t.mapId=n.mapId||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.ctaButton=document.createElement("button"),t.ctaButton.className="content-details-primary-button content-details-cta-button",t.ctaButtonUrl=null,t.directionsButton=document.createElement("button"),t.directionsButton.className="content-details-primary-button",t.directionsButton.textContent="Directions",t.confirmButton=document.createElement("button"),t.confirmButton.className="content-details-primary-button",t.confirmButton.textContent="Confirm Selection",t.shareButton=document.createElement("button"),t.shareButton.className="content-details-share-button",t.shareButton.textContent="Share";var r=document.createElement("img");return r.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1IDcuM1Y3LjNDMTUgNi4wODU0IDE1IDUuNDc4MTEgMTQuNzQ1IDUuMDIyNzZDMTQuNTY0OCA0LjcwMDk0IDE0LjI5OTEgNC40MzUyMyAxMy45NzcyIDQuMjU1MDFDMTMuNTIxOSA0IDEyLjkxNDYgNCAxMS43IDRIOEM2LjExNDM4IDQgNS4xNzE1NyA0IDQuNTg1NzkgNC41ODU3OUM0IDUuMTcxNTcgNCA2LjExNDM4IDQgOFYxMS43QzQgMTIuOTE0NiA0IDEzLjUyMTkgNC4yNTUwMSAxMy45NzcyQzQuNDM1MjMgMTQuMjk5MSA0LjcwMDk0IDE0LjU2NDggNS4wMjI3NiAxNC43NDVDNS40NzgxMSAxNSA2LjA4NTQgMTUgNy4zIDE1VjE1IiBzdHJva2U9IiMxQjFCMUIiIHN0cm9rZS13aWR0aD0iMS41Ii8+CjxyZWN0IHg9IjkiIHk9IjkiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxMSIgcng9IjIiIHN0cm9rZT0iIzFCMUIxQiIgc3Ryb2tlLXdpZHRoPSIxLjUiLz4KPC9zdmc+Cg==",r.className="copy-icon",t.shareButton.appendChild(r),t.locationButton=null,t.websiteButtons=[],t.detailsView=null,t.childrenComponents=[],t.imageContainer=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&&Ss(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)),e.on("selectUrlButton",(function(e){return t.fire("selectUrlButton",e)}))})),this.directionsButton.addEventListener("click",this._handleDirectionsButtonSelect.bind(this)),this.confirmButton.addEventListener("click",this._handleConfirmButtonSelect.bind(this)),this.shareButton.addEventListener("click",this._handleShareButtonSelect.bind(this)),this.ctaButton.addEventListener("click",this._handleCtaButtonSelect.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.replaceChildren(),this.ctaButtonUrl&&this.actionButtons.appendChild(this.ctaButton),this.isSelectionMode?this.actionButtons.appendChild(this.confirmButton):On.includes(this.mapId)||this.actionButtons.appendChild(this.directionsButton),this.isKioskMode||wr.includes(this.mapId)||this.actionButtons.appendChild(this.shareButton),this.actionButtons.childElementCount>0&&this.header.appendChild(this.actionButtons),this.locationButton&&this.actionsView.appendChild(this.locationButton.getElement()),this.websiteButtons.forEach((function(e){t.actionsView.appendChild(e.getElement())})),this.imageContainer&&this.actionsView.appendChild(this.imageContainer),this.header.appendChild(this.actionsView),this.detailsView&&this.header.appendChild(this.detailsView.getElement()),this.element.appendChild(this.header),this.childrenComponents.forEach((function(e){t.element.appendChild(e.getElement())}))}},{key:"_handleShareButtonSelect",value:function(){this.fire("selectShareButton",{placementId:this.contentPlacement.placement_id})}},{key:"showCopyPopup",value:function(){var t=document.createElement("div");t.className="copy-popup",t.textContent="Copied to clipboard";var e=this.shareButton.getBoundingClientRect();t.style.position="absolute",t.style.left="".concat(e.left+e.width/2-60,"px"),t.style.top="".concat(e.bottom+window.scrollY,"px"),t.style.zIndex="9999",document.body.appendChild(t),setTimeout((function(){t.style.opacity="0",t.style.transition="opacity 0.5s",setTimeout((function(){t.remove()}),500)}),1500)}},{key:"_handleDirectionsButtonSelect",value:function(){this.fire("selectDirectionsButton",{placementId:this.contentPlacement.placement_id})}},{key:"_handleConfirmButtonSelect",value:function(){this.fire("selectConfirmButton",{placementId:this.contentPlacement.placement_id})}},{key:"_handleCtaButtonSelect",value:function(){this.ctaButtonUrl&&this.fire("selectUrlButton",{url:this.ctaButtonUrl,source:"cta"})}},{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){for(var e=t.catalog.data_schema,n=t.catalog.content_title_key,r=t.excluded_child_fields||[],i={},o=0,a=Object.entries(e);o<a.length;o++){var u=Ms(a[o],2),s=u[0],c=u[1];if(!s.startsWith("_")&&"image"!==c&&"url"!==c&&s!==n&&!r.includes(s)){var l=t.content.data[s];if(l&&""!==l.trim()){var h=l.trim();i[s]=h}}}return i}},{key:"updateView",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.contentPlacement=t,this.isSelectionMode=n,this.isKioskMode=r,this.mapId=i,this.contentPlacementHeader=new Vu(t);var o=t.catalog.data_schema,a=Object.entries(o).filter((function(t){return!Ms(t,1)[0].startsWith("_")}));this.locationButton=new Xu("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDJDOS44NzgyNyAyIDcuODQzNDQgMi44NDI4NSA2LjM0MzE1IDQuMzQzMTVDNC44NDI4NSA1Ljg0MzQ0IDQgNy44NzgyNyA0IDEwQzQgMTUuNCAxMS4wNSAyMS41IDExLjM1IDIxLjc2QzExLjUzMTEgMjEuOTE0OSAxMS43NjE2IDIyLjAwMDE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OSA2IDEyIDZaTTEyIDEyQzExLjYwNDQgMTIgMTEuMjE3OCAxMS44ODI3IDEwLjg4ODkgMTEuNjYyOUMxMC41NiAxMS40NDMyIDEwLjMwMzYgMTEuMTMwOCAxMC4xNTIyIDEwLjc2NTRDMTAuMDAwOSAxMC4zOTk5IDkuOTYxMjYgOS45OTc3OCAxMC4wMzg0IDkuNjA5ODJDMTAuMTE1NiA5LjIyMTg2IDEwLjMwNjEgOC44NjU0OSAxMC41ODU4IDguNTg1NzlDMTAuODY1NSA4LjMwNjA4IDExLjIyMTkgOC4xMTU2IDExLjYwOTggOC4wMzg0M0MxMS45OTc4IDcuOTYxMjYgMTIuMzk5OSA4LjAwMDg3IDEyLjc2NTQgOC4xNTIyNEMxMy4xMzA4IDguMzAzNjIgMTMuNDQzMiA4LjU1OTk2IDEzLjY2MjkgOC44ODg4NkMxMy44ODI3IDkuMjE3NzYgMTQgOS42MDQ0NCAxNCAxMEMxNCAxMC41MzA0IDEzLjc4OTMgMTEuMDM5MSAxMy40MTQyIDExLjQxNDJDMTMuMDM5MSAxMS43ODkzIDEyLjUzMDQgMTIgMTIgMTJaIiBmaWxsPSIjMTcxNzE3Ii8+Cjwvc3ZnPgo=",t.contextual_location),this.websiteButtons=[];var u,s=vs(a);try{var c=function(){var n=Ms(u.value,2),r=n[0];if("url"===n[1]){var i=t.content.data[r];if(oo(i)){var o=new Xu(ys,i,i);o.getElement().addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),e.fire("selectUrlButton",{url:i,source:"website"})})),e.websiteButtons.push(o)}}};for(s.s();!(u=s.n()).done;)c()}catch(t){s.e(t)}finally{s.f()}this.ctaButtonUrl=null;var l=this.mapId?Mr[this.mapId]:null;if(l){var h,f=null===(h=t.content.data)||void 0===h?void 0:h[l.key];oo(f)&&(this.ctaButtonUrl=io(f),this.ctaButton.textContent=l.text)}var p,d=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?gs(Object(n),!0).forEach((function(e){Ds(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gs(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t.content.data),y=[],m=t.catalog.content_display_img_key,g=vs(a);try{for(g.s();!(p=g.n()).done;){var D=Ms(p.value,2),v=D[0];if("image"===D[1]&&v!==m){var M=t.content.data[v];M&&y.push(M),delete d[v]}}}catch(t){g.e(t)}finally{g.f()}var b=this.findViableAdditionalData(t),w=Object.keys(b);this.detailsView=w.length>0?new as(b):null,this.childrenComponents=[];for(var E=0,C=Object.entries(t.children);E<C.length;E++){var j=Ms(C[E],2),A=j[0],N=j[1],S=new ds(A,N);this.childrenComponents.push(S)}if(y.length>0){this.imageContainer=document.createElement("div"),this.imageContainer.className="content-details-image-container";var I=document.createElement("img");I.src=y[0],I.className="content-details-preview-image";var T=document.createElement("div");T.className="image-hover-popup",T.textContent="See photos",this.imageContainer.appendChild(I),this.imageContainer.appendChild(T),this.imageContainer.addEventListener("click",(function(){e.fire("selectPhotos",{placementId:e.contentPlacement.placement_id,images:y})}))}else this.imageContainer=null;this._setupEventListeners(),this._render()}},{key:"getElement",value:function(){return this.element}}],r&&Es(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function Ts(t){return Ts="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},Ts(t)}function Fs(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,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Os(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)?Os(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 Os(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 xs(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,ks(r.key),r)}}function ks(t){var e=function(t){if("object"!=Ts(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ts(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ts(e)?e:e+""}function Ls(t,e,n){return e=zs(e),function(t,e){if(e&&("object"==Ts(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,_s()?Reflect.construct(e,n||[],zs(t).constructor):e.apply(t,n))}function _s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_s=function(){return!!t})()}function zs(t){return zs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zs(t)}function Bs(t,e){return Bs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bs(t,e)}const Ps=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=Ls(this,e,[r])).contentPlacement=t,n.isOptimistic=t.isOptimistic||!1,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&&Bs(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="selection-content-item",this._render()}},{key:"_render",value:function(){var t=this;this.element.innerHTML="";var e=document.createElement("div");e.className="selection-item-selected-indicator";var n=document.createElement("canvas"),r=window.devicePixelRatio||1;n.width=24*r,n.height=24*r,n.style.width="24px",n.style.height="24px";var i=n.getContext("2d");i.scale(r,r),i.fillStyle="white",i.beginPath(),i.arc(12,12,10,0,2*Math.PI),i.fill(),i.strokeStyle="#00C853",i.lineWidth=2,i.stroke(),i.strokeStyle="#00C853",i.lineWidth=2,i.lineCap="round",i.lineJoin="round",i.beginPath(),i.moveTo(7,12),i.lineTo(10,15),i.lineTo(17,8),i.stroke(),e.appendChild(n),this.element.appendChild(e);var o=document.createElement("div");o.className="selection-item-content",this.isOptimistic?this._renderOptimisticContent(o):this._renderFullContent(o),this.element.appendChild(o);var a=document.createElement("div");a.className="selection-item-delete-button";var u=document.createElement("img");u.src=Sr,u.alt="Remove selection",u.className="selection-item-delete-icon",a.appendChild(u),a.addEventListener("click",(function(e){e.stopPropagation(),t._handleDeselect()})),o.appendChild(a)}},{key:"_renderOptimisticContent",value:function(t){var e,n,r=document.createElement("div");r.className="content-placement-header";var i=document.createElement("div");i.className="header-text-container",i.style.paddingLeft="10px",i.style.display="flex",i.style.flexDirection="column",i.style.alignItems="flex-start",i.style.justifyContent="center";var o=document.createElement("div");o.className="header-content-name";var a=(null===(e=this.contentPlacement.catalog)||void 0===e?void 0:e.content_title_key)||"name",u=(null===(n=this.contentPlacement.content)||void 0===n||null===(n=n.data)||void 0===n?void 0:n[a])||this.contentPlacement.name||"Unknown Feature";o.textContent=u,i.appendChild(o),r.appendChild(i),t.appendChild(r);var s=document.createElement("div");s.style.display="flex",s.style.justifyContent="center",s.style.alignItems="center",s.style.marginTop="12px",s.style.marginBottom="8px";var c=document.createElement("img");c.src=Ir,c.alt="Loading",c.style.width="20px",c.style.height="20px",c.style.animation="smoothSpin 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) infinite",s.appendChild(c),t.appendChild(s)}},{key:"_renderFullContent",value:function(t){var e,n=this.findViableAdditionalData(this.contentPlacement),r=Object.keys(n).length>0;if(this.contentPlacement.catalog){var i=new Vu(this.contentPlacement).getElement();r?i.classList.add("has-additional-details"):i.classList.add("no-additional-details"),t.appendChild(i)}else{var o=document.createElement("div");o.className="content-placement-header";var a=document.createElement("div");a.className="header-text-container",a.style.paddingLeft="10px";var u=document.createElement("div");u.className="header-content-name",u.textContent=this.contentPlacement.name||"Unknown Feature",a.appendChild(u),o.appendChild(a),t.appendChild(o)}if(null!==(e=this.contentPlacement.catalog)&&void 0!==e&&e.data_schema)for(var s=this.contentPlacement.catalog.data_schema,c=0,l=Object.entries(s);c<l.length;c++){var h=Fs(l[c],2),f=h[0];if("url"===h[1]){var p,d=null===(p=this.contentPlacement.content)||void 0===p||null===(p=p.data)||void 0===p?void 0:p[f];if(d&&""!==d.trim()){var y=new ContextualLocationView(ys,d,d);t.appendChild(y.getElement())}}}if(r){var m=new as(n,{showTitle:!1});t.appendChild(m.getElement())}var g=this._getAdditionalImages();if(g.length>0){var D=this._createImageContainer(g);t.appendChild(D)}}},{key:"updateWithFullContent",value:function(t){this.contentPlacement=t,this.isOptimistic=!1,this._render()}},{key:"findViableAdditionalData",value:function(t){if(!t.catalog||!t.catalog.data_schema)return{};for(var e=t.catalog.data_schema,n=t.catalog.content_title_key,r=t.excluded_child_fields||[],i={},o=0,a=Object.entries(e);o<a.length;o++){var u=Fs(a[o],2),s=u[0],c=u[1];if("image"!==c&&"url"!==c&&s!==n&&!r.includes(s)){var l,h=null===(l=t.content)||void 0===l||null===(l=l.data)||void 0===l?void 0:l[s];if(h&&""!==h.trim()){var f=h.trim();i[s]=f}}}return i}},{key:"_getAdditionalImages",value:function(){var t=[];if(!this.contentPlacement.catalog||!this.contentPlacement.catalog.data_schema)return t;for(var e=this.contentPlacement.catalog.data_schema,n=this.contentPlacement.catalog.content_display_img_key,r=0,i=Object.entries(e);r<i.length;r++){var o=Fs(i[r],2),a=o[0];if("image"===o[1]&&a!==n){var u,s=null===(u=this.contentPlacement.content)||void 0===u||null===(u=u.data)||void 0===u?void 0:u[a];s&&t.push(s)}}return t}},{key:"_createImageContainer",value:function(t){var e=this,n=document.createElement("div");n.className="selection-item-image-container";var r=document.createElement("img");r.src=t[0],r.className="selection-item-preview-image";var i=document.createElement("div");return i.className="image-hover-popup",i.textContent="See photos",n.appendChild(r),n.appendChild(i),n.addEventListener("click",(function(n){n.stopPropagation(),e.fire("selectPhotos",{placementId:e.contentPlacement.placement_id,images:t})})),n}},{key:"_handleDeselect",value:function(){this.fire("deselect:feature",{placementId:this.contentPlacement.placement_id||this.contentPlacement.feature_id})}},{key:"getElement",value:function(){return this.element}}],r&&xs(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function Us(t){return Us="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},Us(t)}function Rs(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,Qs(r.key),r)}}function Qs(t){var e=function(t){if("object"!=Us(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Us(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Us(e)?e:e+""}function Ys(t,e,n){return e=Hs(e),function(t,e){if(e&&("object"==Us(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,Vs()?Reflect.construct(e,n||[],Hs(t).constructor):e.apply(t,n))}function Vs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vs=function(){return!!t})()}function Hs(t){return Hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hs(t)}function Gs(t,e){return Gs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gs(t,e)}const Zs=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=Ys(this,e,[n])).selectedPlacements=[],t.contentItems=[],t.optimisticItems=new Map,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&&Gs(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="selection-content-view",this._render()}},{key:"_render",value:function(){this.element.innerHTML="";var t=document.createElement("div");t.className="selection-view-header",t.textContent="Selected content",this.element.appendChild(t);var e=document.createElement("div");if(e.className="selection-items-list",this.contentItems.length>0||this.optimisticItems.size>0)this.contentItems.forEach((function(t){e.appendChild(t.getElement())})),this.optimisticItems.forEach((function(t){e.appendChild(t.getElement())}));else{var n=document.createElement("div");n.className="selection-empty-state",n.textContent="Click features on the map to select them",e.appendChild(n)}this.element.appendChild(e)}},{key:"updateSelections",value:function(t){var e=this;this.selectedPlacements=t,this.contentItems=[],this.selectedPlacements.forEach((function(t){var n=new Ps(t);n.on("deselect:feature",e._handleDeselectFeature.bind(e)),n.on("selectPhotos",e._handleSelectPhotos.bind(e)),e.contentItems.push(n)})),this._render()}},{key:"addSelection",value:function(t){this.selectedPlacements.some((function(e){return e.placement_id===t.placement_id}))||(this.selectedPlacements.push(t),this.updateSelections(this.selectedPlacements))}},{key:"removeSelection",value:function(t){this.selectedPlacements=this.selectedPlacements.filter((function(e){return e.placement_id!==t})),this.updateSelections(this.selectedPlacements)}},{key:"_handleDeselectFeature",value:function(t){var e=t.placementId;this.fire("deselect:feature",{placementId:e})}},{key:"_handleSelectPhotos",value:function(t){this.fire("selectPhotos",t)}},{key:"clearSelections",value:function(){this.selectedPlacements=[],this.contentItems=[],this._render()}},{key:"getElement",value:function(){return this.element}},{key:"addOptimisticItem",value:function(t){var e=t.properties.placement_id||t.properties.feature_id,n=t.properties.name||"Unknown Feature",r={placement_id:e,name:n,content:{data:{name:n}},catalog:{content_title_key:"name",title:t.properties.type||"Feature",data_schema:{name:"text"}},isOptimistic:!0},i=new Ps(r);i.on("deselect:feature",this._handleDeselectFeature.bind(this)),i.on("selectPhotos",this._handleSelectPhotos.bind(this)),this.contentItems.push(i),this._render()}},{key:"updateOptimisticItem",value:function(t,e){var n=this.contentItems.find((function(e){return e.contentPlacement.placement_id===t&&e.isOptimistic}));n&&(n.updateWithFullContent(e),this._render())}},{key:"removeOptimisticItem",value:function(t){var e=this.contentItems.findIndex((function(e){return e.contentPlacement.placement_id===t&&e.isOptimistic}));-1!==e&&(this.contentItems.splice(e,1),this._render())}}])&&Rs(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function Ws(t){return Ws="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},Ws(t)}function qs(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 Ks(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?qs(Object(n),!0).forEach((function(e){Js(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qs(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Js(t,e,n){return(e=nc(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Xs(){Xs=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==Ws(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(Ws(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function $s(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function tc(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){$s(o,r,i,a,u,"next",t)}function u(t){$s(o,r,i,a,u,"throw",t)}a(void 0)}))}}function ec(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,nc(r.key),r)}}function nc(t){var e=function(t){if("object"!=Ws(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ws(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ws(e)?e:e+""}function rc(t,e,n){return e=ac(e),function(t,e){if(e&&("object"==Ws(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,ic()?Reflect.construct(e,n||[],ac(t).constructor):e.apply(t,n))}function ic(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ic=function(){return!!t})()}function oc(){return oc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ac(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},oc.apply(null,arguments)}function ac(t){return ac=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ac(t)}function uc(t,e){return uc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},uc(t,e)}const sc=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=rc(this,e,[n])).map=null,t.contentPlacementIds=[],t.currentContentPlacement=null,t.contentPlacementView=null,t.selectionContentView=null,t.selectedPlacements=[],t.urlConfirmationPopup=null,t.currentTop=window.innerHeight,t.startingY=0,t.scrollConfiguration={initialHeight:.5,minDistFromBottom:110},t.isDragging=!1,t.isAtTop=!1,t.velocity=0,t.decelerationFactor=.95,t.minVelocity=.1,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&&uc(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._attachResizeListener(),this._initialize(),this.hide(),this.container}},{key:"onRemove",value:function(){var t,n,r;this._documentTouchMoveHandler&&document.removeEventListener("touchmove",this._documentTouchMoveHandler,{capture:!0}),this._documentWheelHandler&&document.removeEventListener("wheel",this._documentWheelHandler,{capture:!0}),document.body.style.overflow="",document.documentElement.style.overflow="",(t=e,n=this,r=oc(ac(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){var t=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)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("state:selection",this._handleSelectionState.bind(this)),this.map.on("selection:featureSelected",this._handleSelectionFeatureSelected.bind(this)),this.map.on("selection:featureDeselected",this._handleSelectionFeatureDeselected.bind(this)),this.map.on("selection:featureSelectedOptimistic",this._handleSelectionFeatureSelectedOptimistic.bind(this)),this.map.on("selection:changed",this._handleSelectionChanged.bind(this)),this.map.on("initiate:back",this._handleMapInitiateBack.bind(this)),this.map.map.on("mousedown",this._handleMapFocus.bind(this)),this.map.map.on("touchstart",this._handleMapFocus.bind(this)),this.container.addEventListener("mousedown",(function(t){return t.stopPropagation()})),this.container.addEventListener("click",(function(t){return t.stopPropagation()})),this.container.addEventListener("dblclick",(function(t){return t.stopPropagation()})),this.container.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!1}),this.container.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!1}),this.container.addEventListener("touchend",this.handleTouchEnd.bind(this)),this.container.addEventListener("wheel",this.handleWheelScroll.bind(this),{passive:!1}),this._documentTouchMoveHandler=function(e){t._isMobileLayout()&&"none"!==t.container.style.display&&t.container.contains(e.target)&&e.preventDefault()},document.addEventListener("touchmove",this._documentTouchMoveHandler,{passive:!1,capture:!0}),this._documentWheelHandler=function(e){t._isMobileLayout()&&"none"!==t.container.style.display&&t.container.contains(e.target)&&e.preventDefault()},document.addEventListener("wheel",this._documentWheelHandler,{passive:!1,capture:!0})}},{key:"_handleSelectionFeatureSelectedOptimistic",value:function(t){var e=t.feature;e.properties.placement_id,this.map.multiSelect||(this.selectedPlacements=[],this.selectionContentView&&(this.selectionContentView.contentItems=[],this.selectionContentView._render())),this.selectionContentView&&this.selectionContentView.addOptimisticItem(e),this.show()}},{key:"_handleMapFocus",value:function(t){if(!this._isDesktopLayout()&&t&&t.point){var e=[];try{e=this.map.map.queryRenderedFeatures(t.point)||[]}catch(t){return}0===e.filter((function(t){var e;return"symbol"===(null==t||null===(e=t.layer)||void 0===e?void 0:e.type)})).length&&this.scrollToMin(!0)}}},{key:"handleTouchStart",value:function(t){t.stopPropagation(),this.startingY=t.touches[0].clientY,this.isDragging=!0,this.velocity=0}},{key:"handleScrolling",value:function(t){var e=this.contentPlacementView.getElement().offsetHeight,n=this.map.mapContainer.getBoundingClientRect(),r=n.bottom,i=null;t<=0?i=Math.max(r-e-n.top,this.currentTop+t):t>0&&(i=Math.min(r-this.scrollConfiguration.minDistFromBottom-n.top,this.currentTop+t)),this.scrollTo(i)}},{key:"handleTouchMove",value:function(t){if(!this._isDesktopLayout()&&this.isDragging){t.preventDefault();var e=t.touches[0].clientY,n=-1*(this.startingY-e);this.velocity=n,this.handleScrolling(n),this.startingY=e}}},{key:"handleTouchEnd",value:function(){this.isDragging=!1,this._applyInertia()}},{key:"_applyInertia",value:function(){var t=this,e=this.map.mapContainer.getBoundingClientRect(),n=this.contentPlacementView.getElement().offsetHeight,r=e.bottom,i=r-n-e.top,o=r-this.scrollConfiguration.minDistFromBottom-e.top,a=this.velocity,u=performance.now(),s=function(){var e=performance.now()-u;if(e>=400||Math.abs(t.velocity)<t.minVelocity)t.velocity=0;else{var n=e/400,r=1-Math.pow(1-n,2);t.velocity=a*(1-r);var c=t.currentTop+t.velocity;if(c<=i)return t.scrollTo(i),void(t.velocity=0);if(c>=o)return t.scrollTo(o),void(t.velocity=0);t.scrollTo(c),requestAnimationFrame(s)}};s()}},{key:"handleWheelScroll",value:function(t){if(!this._isDesktopLayout()){t.preventDefault();var e=-t.deltaY;this.handleScrolling(e)}}},{key:"_renderDesktopView",value:function(){if(this.contentPlacementView){var t=this.contentPlacementView.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view")}}},{key:"_renderMobileView",value:function(){if(this.contentPlacementView){var t=this.contentPlacementView.getElement();this.container.appendChild(t),this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view")}}},{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?this.map.setToSelectedContentState(this.contentPlacementIds):"selection"===t&&(this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews())}},{key:"_handleSelectChildContentPlacement",value:function(t){var e=t.placementId;this.contentPlacementIds.push(e),this.map.setToSelectedContentState(this.contentPlacementIds)}},{key:"_handleDefaultState",value:(a=tc(Xs().mark((function t(){return Xs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.container.classList.remove("selection-mode"),!this._isMobileLayout()){t.next=4;break}return t.next=4,this._scrollToBottom(!0,{duration:50});case 4:this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews();case 8:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"_handleSearchState",value:function(t){this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews(),this._isMobileLayout()&&this._scrollToBottom()}},{key:"_handleSelectedContentState",value:function(t){var e=t.contentPlacementIds,n=t.selectedContentPlacement;this.contentPlacementIds=e,this.currentContentPlacement=n,this._updateContentViews(),this.show()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleSetupState",value:function(){this.hide()}},{key:"_handleSelectionState",value:function(t){this.selectedPlacements=[],this._clearViews(),this.map.clearSelectionLayers(),this._updateSelectionView(),this.show()}},{key:"_handleSelectionFeatureSelected",value:function(t){var e=t.feature,n=t.contentPlacement;if(!this.selectedPlacements.some((function(t){return t.placement_id===n.placement_id}))){var r=!this.map.multiSelect;this.map.addConfirmedSelectionFeature(e,r),this.map.multiSelect||(this.selectedPlacements=[]),this.selectedPlacements.push(n),this.selectionContentView&&this.selectionContentView.updateOptimisticItem(n.placement_id,n)}this._updateSelectionView(),this.show()}},{key:"_handleSelectionFeatureDeselected",value:function(t){t.feature;var e=t.placementId;this.map.removeConfirmedSelectionFeature(e),this.selectedPlacements=this.selectedPlacements.filter((function(t){return t.placement_id!==e})),this._updateSelectionView()}},{key:"_updateSelectionView",value:function(){var t=this;this.container.innerHTML="",this._isDesktopLayout()?(this.container.classList.add("desktop-view"),this.container.classList.remove("mobile-view")):(this.container.classList.add("mobile-view"),this.container.classList.remove("desktop-view")),this.container.classList.toggle("kiosk-view","kiosk"===this.currentViewType),this.selectionContentView||(this.selectionContentView=new Zs,this.selectionContentView.on("deselect:feature",(function(e){t._handleDeselectFeature(e)})),this.selectionContentView.on("selectPhotos",(function(e){t._handleSelectPhotos(e)}))),this.selectionContentView.updateSelections(this.selectedPlacements),this.container.appendChild(this.selectionContentView.getElement())}},{key:"_handleDeselectFeature",value:function(t){var e=t.placementId,n=this.map.getConfirmedSelectionFeatures().find((function(t){return t.properties.placement_id===e||t.properties.feature_id===e}));if(n){var r=n.properties.feature_id;this.map.removeConfirmedSelectionFeature(r),this.map.fire("selection:featureDeselected",{feature:n,placementId:n.properties.placement_id||r}),this.selectedPlacements=this.selectedPlacements.filter((function(t){return t.placement_id!==e})),this._updateSelectionView(),this.map.fire("selection:changed",{selectedContent:this.map.getConfirmedSelectionFeatures().map((function(t){return t.properties})),selectionCount:this.map.getConfirmedSelectionFeatures().length})}else console.warn("⚠️ Feature not found in confirmed selection for deselection:",e)}},{key:"_handleSelectionChanged",value:function(t){t.selectedContent,t.selectionCount}},{key:"_handleSelectDirectionsButton",value:(o=tc(Xs().mark((function t(e){var n;return Xs().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)}))),function(t){return o.apply(this,arguments)})},{key:"_handleSelectShareButton",value:(i=tc(Xs().mark((function t(e){var n,r,i,o,a,u,s,c,l,h,f,p=this;return Xs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.placementId,r=this.map.getCurrentFloor(),this.map.mapData.account_id,i=this.map.mapData.map_id,o=this.map.mapData.map_view_id,a=this.map.map.getCenter(),u=a.lng.toFixed(6),s=a.lat.toFixed(6),c=this.map.map.getPitch().toFixed(2),l=this.map.map.getBearing().toFixed(2),h=this.map.map.getZoom().toFixed(2),f="https://maps.waygomaps.com/".concat(i,"/").concat(o,"/selected-content/").concat(n,"/f").concat(r,"@").concat(u,",").concat(s,",").concat(h,",").concat(c,",").concat(l),navigator.clipboard.writeText(f).then((function(){p.contentPlacementView.showCopyPopup()})).catch((function(t){return console.error("Failed to copy text:",t)}));case 13:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_handleSelectUrlButton",value:function(t){var e=t.url;e&&(this.urlConfirmationPopup||(this.urlConfirmationPopup=new ao),this.urlConfirmationPopup.show(this.map,e,{isKioskMode:"kiosk"===this.currentViewType}))}},{key:"_handleSelectPhotos",value:function(t){var e=this,n=(t.placementId,t.images),r=0,i=n.length;this._isDesktopLayout()||this._isMobileLayout()?(this.map.showModal('\n <div class="waygo-map-modal-content photo-modal">\n <button class="modal-close-button">\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />\n </svg>\n </button>\n \n <div class="modal-counter">\n <span id="imageCounter">'.concat(r+1," / ").concat(i,'</span>\n </div>\n \n <div class="modal-image-container">\n <button id="prevButton" class="modal-nav-button prev">\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5L8.25 12l7.5-7.5" />\n </svg>\n </button>\n \n <div class="modal-image-wrapper">\n <img id="modalImage" src="').concat(n[r],'" class="modal-image">\n </div>\n \n <button id="nextButton" class="modal-nav-button next">\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />\n </svg>\n </button>\n </div>\n </div>\n ')),document.querySelector(".modal-close-button").addEventListener("click",(function(){return e.map.hideModal()}))):this.map.showModal('\n <div class="waygo-map-modal-content photo-modal">\n <img src="'.concat(n[r],'" class="modal-image">\n </div>\n '));var o=document.getElementById("modalImage"),a=document.getElementById("prevButton"),u=document.getElementById("nextButton"),s=document.getElementById("imageCounter");a.onclick=function(){r=(r-1+n.length)%n.length,o.src=n[r],s.textContent="".concat(r+1," / ").concat(i)},u.onclick=function(){r=(r+1)%n.length,o.src=n[r],s.textContent="".concat(r+1," / ").concat(i)}}},{key:"_updateContentViews",value:function(){this._clearViews(),this._render()}},{key:"hide",value:function(){this.container.scrollTop=0,this.container&&(this.container.style.display="none")}},{key:"scrollTo",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=Ks(Ks({},{duration:150,easing:"easeInOut"}),r),o=this.currentTop,a=t-o,u=null,s={linear:function(t){return t},easeInOut:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeIn:function(t){return t*t},easeOut:function(t){return t*(2-t)}},c=s[i.easing]||s.easeInOut,l=i.duration;return new Promise((function(r){if(!n)return e.currentTop=t,e.container.style.top="".concat(e.currentTop,"px"),e.container.style.height="calc(100vh - ".concat(e.currentTop,"px)"),void r();var i=function(t){null===u&&(u=t);var n=t-u,s=Math.min(n/l,1),h=c(s),f=o+h*a;e.currentTop=f,e.container.style.top="".concat(e.currentTop,"px"),e.container.style.height="calc(100vh - ".concat(e.currentTop,"px)"),s<1?requestAnimationFrame(i):r()};requestAnimationFrame(i)}))}},{key:"_resetScroll",value:function(){var t=this,e=this.map.mapContainer.getBoundingClientRect(),n=this.map.mapContainer.offsetHeight;this.currentTop<e.top&&this.scrollTo(e.bottom);var r=this.contentPlacementView.findViableAdditionalData(this.currentContentPlacement),i=Object.keys(r).length,o=Object.keys(this.currentContentPlacement.children).length,a=n*(1-this.scrollConfiguration.initialHeight);0===i&&0===o?setTimeout((function(){if(t.contentPlacementView&&t.contentPlacementView.contentPlacementHeader){var e=t.contentPlacementView.header.offsetHeight;a=n-e-20}t.scrollTo(a,!0)}),50):this.scrollTo(a,!0)}},{key:"_scrollToBottom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.map.mapContainer.getBoundingClientRect();return this.scrollTo(n.bottom,t,e)}},{key:"scrollToMin",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.map.mapContainer.getBoundingClientRect();this.scrollTo(e.bottom-this.scrollConfiguration.minDistFromBottom,t)}},{key:"_render",value:function(){var t;if(0!==this.contentPlacementIds.length&&null!==this.currentContentPlacement){this.contentPlacementView=new Is;var e="selection"===this.map.getCurrentState(),n="kiosk"===this.currentViewType,r=(null===(t=this.map.mapData)||void 0===t?void 0:t.map_id)||null;this.contentPlacementView.updateView(this.currentContentPlacement,e,n,r),this.contentPlacementView.on("selectChildContentPlacement",this._handleSelectChildContentPlacement.bind(this)),this.contentPlacementView.on("selectDirectionsButton",this._handleSelectDirectionsButton.bind(this)),this.contentPlacementView.on("selectShareButton",this._handleSelectShareButton.bind(this)),this.contentPlacementView.on("selectPhotos",this._handleSelectPhotos.bind(this)),this.contentPlacementView.on("selectUrlButton",this._handleSelectUrlButton.bind(this)),this._initialize(),this._isMobileLayout()&&this._resetScroll()}}},{key:"_handleSelectionFeatureDeselectedOptimistic",value:function(t){var e=t.placementId;this.selectionContentView&&this.selectionContentView.removeOptimisticItem(e)}}],r&&ec(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o,a}(di);function cc(t){return cc="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},cc(t)}function lc(){lc=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==cc(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(cc(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function hc(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function fc(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){hc(o,r,i,a,u,"next",t)}function u(t){hc(o,r,i,a,u,"throw",t)}a(void 0)}))}}function pc(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,dc(r.key),r)}}function dc(t){var e=function(t){if("object"!=cc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=cc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==cc(e)?e:e+""}function yc(t,e,n){return e=Dc(e),function(t,e){if(e&&("object"==cc(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,mc()?Reflect.construct(e,n||[],Dc(t).constructor):e.apply(t,n))}function mc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(mc=function(){return!!t})()}function gc(){return gc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Dc(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},gc.apply(null,arguments)}function Dc(t){return Dc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Dc(t)}function vc(t,e){return vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vc(t,e)}var Mc={collapsed:.1,mid:.44,full:.97},bc="content-details--consolidated",wc="content-details--card",Ec="content-details--panel-hosted";const Cc=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=yc(this,e,[n])).map=null,t.contentPlacementIds=[],t.currentContentPlacement=null,t.contentDetailsView=null,t.urlConfirmationPopup=null,t._presentation=null,t.stickyPanelView=new wu({stickyPoints:Mc,initialPoint:"mid",header:{buttons:[{label:"✕",ariaLabel:"Close details",onClick:function(){t.map&&t.map.setToDefaultState()}}]}}),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&&vc(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-panel-control-container",this.hide(),this._initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.stickyPanelView.setHandoffHost(t),this.stickyPanelView.enableCollapseOnMapInteraction(t),this.container}},{key:"onRemove",value:function(){var t,n,r;this.stickyPanelView.destroy(),(t=e,n=this,r=gc(Dc(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"show",value:function(){this.container&&(this.container.style.display="flex",this._isMobileLayout()&&(document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"))}},{key:"hide",value:function(){this.container&&(this.container.style.display="none",document.body.style.overflow="",document.documentElement.style.overflow="")}},{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("state:setup",this._handleSetupState.bind(this)),this.map.on("state:selection",this._handleSelectionState.bind(this)),this.map.on("initiate:back",this._handleMapInitiateBack.bind(this))}},{key:"_renderDesktopView",value:function(){if(this._presentation="desktop",this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view"),this.contentDetailsView){var t=this.contentDetailsView.getElement();t.classList.add(bc,wc),t.classList.remove(Ec),this.container.appendChild(t)}}},{key:"_renderMobileView",value:function(){if(this._presentation="panel",this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view"),this.contentDetailsView){var t=this.contentDetailsView.getElement();t.classList.add(bc,Ec),t.classList.remove(wc),this.stickyPanelView.setContentView(t)}this.container.appendChild(this.stickyPanelView.getElement()),this.stickyPanelView.refreshLayout(),this.map&&"function"==typeof this.map.getCurrentState&&"selectedContent"===this.map.getCurrentState()&&this.contentDetailsView&&this.stickyPanelView.present({snapTo:"mid"})}},{key:"_handleSelectedContentState",value:function(t){var e=t||{},n=e.contentPlacementIds,r=void 0===n?[]:n,i=e.selectedContentPlacement,o=void 0===i?null:i;if(!Array.isArray(r)||0===r.length||!o)return this.stickyPanelView.dismiss({animate:!1}),this.hide(),void this._clearContent();this.contentPlacementIds=r,this.currentContentPlacement=o,this._buildContentDetailsView(),this._updateContentView(),this.show(),"panel"===this._presentation&&this.stickyPanelView.present({snapTo:"mid"})}},{key:"_handleDefaultState",value:function(){var t=this,e=function(){return t._clearContent()};"panel"===this._presentation?this.stickyPanelView.dismiss({onHidden:function(){t.hide(),e()}}):(this.hide(),e())}},{key:"_handleSearchState",value:function(t){this.stickyPanelView.dismiss({animate:!1}),this.hide(),this._clearContent()}},{key:"_handleDirectionsState",value:function(t){this.stickyPanelView.dismiss({animate:!1}),this.hide()}},{key:"_handleSetupState",value:function(){this.stickyPanelView.dismiss({animate:!1}),this.hide()}},{key:"_handleSelectionState",value:function(t){this.stickyPanelView.dismiss({animate:!1}),this.hide(),this._clearContent()}},{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&&this.map.setToSelectedContentState(this.contentPlacementIds)}},{key:"_buildContentDetailsView",value:function(){var t;if(0!==this.contentPlacementIds.length&&null!==this.currentContentPlacement){this.contentDetailsView=new Is;var e="kiosk"===this.currentViewType,n=(null===(t=this.map.mapData)||void 0===t?void 0:t.map_id)||null;this.contentDetailsView.updateView(this.currentContentPlacement,!1,e,n),this.contentDetailsView.on("selectChildContentPlacement",this._handleSelectChildContentPlacement.bind(this)),this.contentDetailsView.on("selectDirectionsButton",this._handleSelectDirectionsButton.bind(this)),this.contentDetailsView.on("selectShareButton",this._handleSelectShareButton.bind(this)),this.contentDetailsView.on("selectPhotos",this._handleSelectPhotos.bind(this)),this.contentDetailsView.on("selectUrlButton",this._handleSelectUrlButton.bind(this))}else this.contentDetailsView=null}},{key:"_clearContent",value:function(){this.contentPlacementIds=[],this.currentContentPlacement=null,this.contentDetailsView=null,this.stickyPanelView.setContentView(null),this._clearViews()}},{key:"_handleSelectChildContentPlacement",value:function(t){var e=t.placementId;this.contentPlacementIds.push(e),this.map.setToSelectedContentState(this.contentPlacementIds)}},{key:"_handleSelectDirectionsButton",value:(o=fc(lc().mark((function t(e){var n;return lc().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)}))),function(t){return o.apply(this,arguments)})},{key:"_handleSelectShareButton",value:(i=fc(lc().mark((function t(e){var n,r,i,o,a,u,s,c,l,h,f,p=this;return lc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.placementId,r=this.map.getCurrentFloor(),i=this.map.mapData.map_id,o=this.map.mapData.map_view_id,a=this.map.map.getCenter(),u=a.lng.toFixed(6),s=a.lat.toFixed(6),c=this.map.map.getPitch().toFixed(2),l=this.map.map.getBearing().toFixed(2),h=this.map.map.getZoom().toFixed(2),f="https://maps.waygomaps.com/".concat(i,"/").concat(o,"/selected-content/").concat(n,"/f").concat(r,"@").concat(u,",").concat(s,",").concat(h,",").concat(c,",").concat(l),navigator.clipboard.writeText(f).then((function(){p.contentDetailsView&&p.contentDetailsView.showCopyPopup()})).catch((function(t){return console.error("Failed to copy text:",t)}));case 12:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_handleSelectUrlButton",value:function(t){var e=t.url;e&&(this.urlConfirmationPopup||(this.urlConfirmationPopup=new ao),this.urlConfirmationPopup.show(this.map,e,{isKioskMode:"kiosk"===this.currentViewType}))}},{key:"_handleSelectPhotos",value:function(t){var e=t.images;!function(t,e){if(t&&Array.isArray(e)&&0!==e.length){var n=0,r=e.length;t.showModal('\n <div class="waygo-map-modal-content photo-modal">\n <button class="modal-close-button">\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />\n </svg>\n </button>\n\n <div class="modal-counter">\n <span id="imageCounter">'.concat(n+1," / ").concat(r,'</span>\n </div>\n\n <div class="modal-image-container">\n <button id="prevButton" class="modal-nav-button prev">\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5L8.25 12l7.5-7.5" />\n </svg>\n </button>\n\n <div class="modal-image-wrapper">\n <img id="modalImage" src="').concat(e[n],'" class="modal-image">\n </div>\n\n <button id="nextButton" class="modal-nav-button next">\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />\n </svg>\n </button>\n </div>\n </div>\n '));var i=document.querySelector(".modal-close-button");i&&i.addEventListener("click",(function(){return t.hideModal()}));var o=document.getElementById("modalImage"),a=document.getElementById("prevButton"),u=document.getElementById("nextButton"),s=document.getElementById("imageCounter");if(o&&a&&u&&s){var c=function(t){n=(t+r)%r,o.src=e[n],s.textContent="".concat(n+1," / ").concat(r)};a.onclick=function(){return c(n-1)},u.onclick=function(){return c(n+1)}}}}(this.map,e)}}],r&&pc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o}(di);function jc(t){return jc="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},jc(t)}function Ac(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,Nc(r.key),r)}}function Nc(t){var e=function(t){if("object"!=jc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=jc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jc(e)?e:e+""}function Sc(t,e,n){return e=Tc(e),function(t,e){if(e&&("object"==jc(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,Ic()?Reflect.construct(e,n||[],Tc(t).constructor):e.apply(t,n))}function Ic(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ic=function(){return!!t})()}function Tc(t){return Tc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Tc(t)}function Fc(t,e){return Fc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Fc(t,e)}const Oc=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=Sc(this,e,[n]))._initialize(),t.node=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&&Fc(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("div"),this.element.className="setup-view",this.titleElement=document.createElement("h3"),this.titleElement.className="setup-title",this.setTitle("Kiosk setup");var e=document.createElement("div");e.className="setup-instructions";var n=document.createElement("p");n.innerHTML='In kiosk mode, navigation paths are set to start from the kiosk position, by default.<br><br><b>Drag the red point on the map to set your kiosk position.</b><br><br>Once you are done, click "Configure Map" to load the configured map in kiosk mode, or "Exit" to exit kiosk mode. <br><br>The kiosk URL displayed below can be copied to load this configuration at a later time.',e.appendChild(n),this.codeContainer=document.createElement("div"),this.codeContainer.className="setup-code-container",this.codeSnippet=document.createElement("pre"),this.codeSnippet.className="setup-code-snippet",this.map&&(this.codeSnippet.innerHTML="waygomaps.com/".concat(this.map.mapData.map_id,"?location=").concat(this.node.node_id)),this.copyButton=document.createElement("button"),this.copyButton.className="setup-copy-button",this.copyButton.innerText="Copy",this.copyButton.addEventListener("click",(function(){navigator.clipboard.writeText(t.codeSnippet.innerText),t.copyButton.innerText="Copied!",setTimeout((function(){copyButton.innerText="Copy"}),2e3)})),this.codeContainer.appendChild(this.codeSnippet),this.codeContainer.appendChild(this.copyButton);var r=document.createElement("div");r.className="setup-buttons-container";var i=document.createElement("button");i.className="setup-button exit",i.innerText="Exit",i.addEventListener("click",(function(){t.fire("exit")}));var o=document.createElement("button");o.className="setup-button configure",o.innerText="Configure Map",o.addEventListener("click",(function(){t.fire("configure")})),r.appendChild(i),r.appendChild(o),this.element.appendChild(this.titleElement),this.element.appendChild(e),this.element.appendChild(this.codeContainer),this.element.appendChild(r)}},{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}}])&&Ac(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function xc(t){return xc="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},xc(t)}function kc(){kc=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==xc(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(xc(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Lc(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function _c(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Lc(o,r,i,a,u,"next",t)}function u(t){Lc(o,r,i,a,u,"throw",t)}a(void 0)}))}}function zc(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,Bc(r.key),r)}}function Bc(t){var e=function(t){if("object"!=xc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xc(e)?e:e+""}function Pc(t,e,n){return e=Qc(e),function(t,e){if(e&&("object"==xc(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,Uc()?Reflect.construct(e,n||[],Qc(t).constructor):e.apply(t,n))}function Uc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Uc=function(){return!!t})()}function Rc(){return Rc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Qc(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Rc.apply(null,arguments)}function Qc(t){return Qc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qc(t)}function Yc(t,e){return Yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yc(t,e)}const Vc=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=Pc(this,e,[n])).setupView=new Oc,t.routesApi=nn.getRotuesApi(),t.node=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&&Yc(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){return this.map=t,this.container=document.createElement("div"),this.container.className="setup-control-container",this._initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.show(),this.container}},{key:"onRemove",value:function(){var t,n,r;this.removeDraggablePoint(),(t=e,n=this,r=Rc(Qc(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"removeDraggablePoint",value:function(){this.map&&this.map.map&&(this.map.map.getLayer("point")&&this.map.map.removeLayer("point"),this.map.map.getLayer("point-border")&&this.map.map.removeLayer("point-border"),this.map.map.getSource("point")&&this.map.map.removeSource("point"))}},{key:"initializeDraggablePoint",value:function(){var t,e=this,n=this.map.map.getCanvas(),r=(null===(t=this.map.mapData)||void 0===t?void 0:t.reference_coordinate)||[0,0],i={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[r[0],r[1]]},properties:{_floor:this.map.getCurrentFloor()}}]},o=function(t){var n=t.lngLat;i.features[0].geometry.coordinates=[n.lng,n.lat];var r=e.map.map.getSource("point");r&&r.setData(i)},a=function(){var t=_c(kc().mark((function t(r){var a,u,s,c,l,h,f;return kc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=r.lngLat,n.style.cursor="",c=(null===(a=e.map.mapData)||void 0===a?void 0:a.reference_coordinate)||[0,0],l=(null===(u=e.map.mapData)||void 0===u?void 0:u.coordinate_scaling_multiplier)||30,h=_n([s.lng,s.lat],c,l),f=i.features[0].properties._floor,t.next=8,e.getClosestNode(h,f);case 8:e.map.map.off("mousemove",o),e.map.map.off("touchmove",o);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();this.map.on("floorChanged",(function(t){var n=t.floorIndex;i.features[0].properties._floor=n;var r=e.map.map.getSource("point");r&&r.setData(i)})),this.map.map.addSource("point",{type:"geojson",data:i}),this.map.map.addLayer({id:"point-border",type:"circle",source:"point",paint:{"circle-radius":18,"circle-color":"#FFFFFF"}}),this.map.map.addLayer({id:"point",type:"circle",source:"point",paint:{"circle-radius":15,"circle-color":"#F84C4C"}}),this.map.map.on("mouseenter","point",(function(){e.map.map.setPaintProperty("point","circle-color","#FF8080"),n.style.cursor="pointer"})),this.map.map.on("mouseleave","point",(function(){e.map.map.setPaintProperty("point","circle-color","#F84C4C"),n.style.cursor="default"})),this.map.map.on("mousedown","point",(function(t){t.preventDefault(),n.style.cursor="grabbing",e.map.map.on("mousemove",o),e.map.map.once("mouseup",a)})),this.map.map.on("touchstart","point",(function(t){1===t.points.length&&(t.preventDefault(),e.map.map.on("touchmove",o),e.map.map.once("touchend",a))}))}},{key:"getVertex",value:function(){var t,e,n=this.map.map.querySourceFeatures("point"),r=(null===(t=this.map.mapData)||void 0===t?void 0:t.reference_coordinate)||[0,0],i=(null===(e=this.map.mapData)||void 0===e?void 0:e.coordinate_scaling_multiplier)||30;return n.length>0?_n(n[0].geometry.coordinates,r,i):null}},{key:"getClosestNode",value:(o=_c(kc().mark((function t(e,n){var r;return kc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.routesApi.findClosestNode(this.map.mapData.map_id,e,n);case 2:r=t.sent,this.node=r,this.map.location=r.node_id,this.setupView.codeSnippet.innerHTML="https://maps.waygomaps.com/".concat(this.map.mapData.map_id,"?location=").concat(r.node_id);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return o.apply(this,arguments)})},{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("state:setup",this._handleSetupState.bind(this)),this.map.on("load",this._handleMapLoad.bind(this)),this.map.on("floorChanged",this._handleFloorChange.bind(this)),this.setupView.on("exit",this._handleSetupViewExitState.bind(this)),this.setupView.on("configure",this._handleSetupViewConfigureState.bind(this))}},{key:"_handleMapLoad",value:function(t){}},{key:"_renderDesktopView",value:function(){this.container.classList.add("desktop-view"),this.container.classList.remove("mobile-view")}},{key:"_renderMobileView",value:function(){this.container.classList.add("mobile-view"),this.container.classList.remove("desktop-view")}},{key:"bringToFront",value:function(){this.container.style.zIndex="1"}},{key:"bringBack",value:function(){this.container.style.zIndex=""}},{key:"_handleDefaultState",value:function(){this.hide()}},{key:"_handleSearchState",value:function(t){this.hide()}},{key:"_handleSelectedContentState",value:function(t){this.hide()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleSetupState",value:(i=_c(kc().mark((function t(){var e=this;return kc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.initializeDraggablePoint(),this.show(),setTimeout(_c(kc().mark((function t(){var n,r,i;return kc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.getVertex(),r=e.map.getCurrentFloor(),null===n||null===r){t.next=5;break}return t.next=5,e.getClosestNode(n,r);case 5:i=e.setupView.getElement(),e.container.appendChild(i);case 7:case"end":return t.stop()}}),t)}))),200);case 3:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"_handleFloorChange",value:function(t){var e=t.floorIndex,n=this.getVertex();"setup"===this.map.getCurrentState()&&this.getClosestNode(n,e)}},{key:"_handleSetupViewExitState",value:function(){this.removeDraggablePoint(),this.map.setToDefaultState()}},{key:"_handleSetupViewConfigureState",value:function(){this.removeDraggablePoint(),this.node&&this.node.node_id&&this.map.setViewType("kiosk",{location:this.node.node_id}),this.map.setToDefaultState()}}],r&&zc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o}(di);function Hc(t){return Hc="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},Hc(t)}function Gc(t){return function(t){if(Array.isArray(t))return qc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Wc(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zc(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,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||Wc(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 Wc(t,e){if(t){if("string"==typeof t)return qc(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)?qc(t,e):void 0}}function qc(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 Kc(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 Jc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Kc(Object(n),!0).forEach((function(e){Xc(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kc(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Xc(t,e,n){return(e=tl(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $c(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,tl(r.key),r)}}function tl(t){var e=function(t){if("object"!=Hc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Hc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hc(e)?e:e+""}function el(t,e,n){return e=il(e),function(t,e){if(e&&("object"==Hc(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,nl()?Reflect.construct(e,n||[],il(t).constructor):e.apply(t,n))}function nl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(nl=function(){return!!t})()}function rl(){return rl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=il(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},rl.apply(null,arguments)}function il(t){return il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},il(t)}function ol(t,e){return ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ol(t,e)}var al=["text-opacity","icon-opacity"],ul=["text-halo-color","icon-halo-color"],sl={"text-opacity":1,"icon-opacity":1};const cl=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=el(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.selectedTextColor="#BE2E28",t.interactionEnabled=!0,t.selectionCriteria=null,t.originalPaintProperties={},t.selectionModeExpressions={},t.selectionHoverColor="#4A90E2",t.currentHoveredLayerId=null,t.currentHoveredFeatureId=null,t.selectionHoverHandler=null,t.searchSymbolOpacityBackup={},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&&ol(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.createHighlightedContentDotLayer(),this.createSelectedContentLayer(),this.storeTextColorReferences(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=rl(il(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{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)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("state:selection",this._handleSelectionState.bind(this)),this.map.on("additionalSearchResults",this._handleAdditionalSearch.bind(this)),this.map.on("hoverSearchResult",this._handleHoverSearchResult.bind(this)),this.map.on("hoverEndSearchResult",this._handleHoverEndSearchResult.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:"_getSelectedContentLayerPaint",value:function(){var t,e=null===(t=this.map)||void 0===t||null===(t=t.mapData)||void 0===t?void 0:t.map_id;return{"text-color":e&&br.includes(e)?"#ff6661":"#BE2E28","text-halo-color":e&&br.includes(e)?"#1c1c1c":"#ffffff","text-halo-width":e&&br.includes(e)?2:1}}},{key:"_getHighlightedContentLayerPaint",value:function(){var t,e=null===(t=this.map)||void 0===t||null===(t=t.mapData)||void 0===t?void 0:t.map_id;return{"text-color":e&&br.includes(e)?"#ffffff":"#1E1E1E","text-halo-color":e&&br.includes(e)?"#1c1c1c":"#ffffff","text-halo-width":e&&br.includes(e)?2:1}}},{key:"_getTextSize",value:function(){var t,e=null===(t=this.map)||void 0===t||null===(t=t.mapData)||void 0===t?void 0:t.map_id;return e&&br.includes(e)?16:14}},{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","name"],"text-font":["Inter Medium"],"text-size":this._getTextSize(),"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:this._getSelectedContentLayerPaint()})}},{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","name"],"text-font":["Inter Medium"],"text-size":this._getTextSize(),"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":2,"icon-padding":1},paint:this._getHighlightedContentLayerPaint()})}},{key:"createHighlightedContentDotLayer",value:function(){this.map.map.addSource("highlighted-content-dots",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.map.addLayer({id:"highlighted-content-dot-layer",type:"symbol",source:"highlighted-content-dots",layout:{"icon-image":"highlightedDot","icon-size":.24,"icon-offset":[0,-5],"icon-anchor":"bottom","symbol-z-elevate":!0,"icon-padding":1},paint:this._getHighlightedContentLayerPaint()},"highlighted-content-layer")}},{key:"_handleDefaultState",value:function(){this.interactionEnabled=!0,this.removeSelectionVisuals(),this.selectionCriteria=null,this.applyHoverEffectToAllSymbolLayers(),this.map.clearHighlightedContentLayer(),this.map.clearSelectedContentLayer(),this.showSymbolLayers()}},{key:"_handleSearchState",value:function(t){t.query;var e=t.results;this.interactionEnabled=!0,this.applyHoverEffectToAllSymbolLayers(),this.hideSymbolLayers(),this.map.clearSelectedContentLayer();var n=e.reduce((function(t,e){return t[e.floor]=(t[e.floor]||0)+1,t}),{}),r=Object.entries(n).reduce((function(t,e){return e[1]>t[1]?e:t}),[0,0])[0],i=this.map.getCurrentFloor(),o=e.some((function(t){return t.floor===i})),a=i;o||(a=r,this.map.updateFloor(parseInt(a))),a=parseInt(a),this.updateLabelsForSearchResults(e,!0,a)}},{key:"_handleAdditionalSearch",value:function(t){var e=t.results;this.updateLabelsForSearchResults(e,!0)}},{key:"_handleHoverSearchResult",value:function(t){var e=t.result;this.updateLabelForSelectedContentPlacement(e,!1)}},{key:"_handleHoverEndSearchResult",value:function(){"search"===this.map.getCurrentState()&&this.map.clearSelectedContentLayer()}},{key:"_handleSelectedContentState",value:function(t){t.contentPlacementIds;var e=t.selectedContentPlacement;this.interactionEnabled=!0,this.applyHoverEffectToAllSymbolLayers(),this.showSymbolLayers(),this.updateLabelForSelectedContentPlacement(e)}},{key:"_handleDirectionsState",value:function(t){t.endContentPlacement,this.interactionEnabled=!1,this.removeHoverEffects(),this.showSymbolLayers()}},{key:"_handleSetupState",value:function(){this.interactionEnabled=!1,this.removeHoverEffects()}},{key:"_handleSelectionState",value:function(t){var e=t.criteria,n=t.geojson;this.selectionCriteria=e,this.interactionEnabled=!0,this.applySelectionModeVisuals(e),this.map.removeMatchingFeaturesFromExistingLayers(e),this.map.createSelectableContentLayers(n),this.processPendingExtrusionFeatures(),this.processPendingSymbolFeatures(),this.applySelectableHoverEffects()}},{key:"_isProtectedSymbolLayer",value:function(t){return"selected-content-layer"===t||"highlighted-content-layer"===t||"highlighted-content-dot-layer"===t||t.startsWith("IMAGE")}},{key:"_scaleOpacityForDimming",value:function(t,e){return void 0===t?e:Array.isArray(t)?["*",t,e]:t*e}},{key:"_parseLiteralColorToRgba",value:function(t){if("string"!=typeof t)return null;var e=t.trim().toLowerCase(),n={white:{r:255,g:255,b:255,a:1},black:{r:0,g:0,b:0,a:1}};if(n[e])return Jc({},n[e]);if(e.startsWith("#")){var r=e.slice(1);if(3===r.length&&(r=r.split("").map((function(t){return t+t})).join("")),6===r.length||8===r.length)return{r:parseInt(r.slice(0,2),16),g:parseInt(r.slice(2,4),16),b:parseInt(r.slice(4,6),16),a:8===r.length?parseInt(r.slice(6,8),16)/255:1}}var i=e.match(/^rgba?\(([^)]+)\)$/);if(i){var o,a=i[1].split(",").map((function(t){return parseFloat(t.trim())}));if(a.length>=3)return{r:a[0],g:a[1],b:a[2],a:null!==(o=a[3])&&void 0!==o?o:1}}return null}},{key:"_dimHaloColorForDimming",value:function(t,e){if(void 0!==t){if(Array.isArray(t)){if("rgba"===t[0]&&t.length>=5){var n=t[4],r=Array.isArray(n)?["*",n,e]:n*e;return["rgba",t[1],t[2],t[3],r]}return t}var i=this._parseLiteralColorToRgba(t);return i?(i.a*=e,"rgba(".concat(i.r,", ").concat(i.g,", ").concat(i.b,", ").concat(i.a,")")):t}}},{key:"_getSafePaintProperty",value:function(t,e){try{return this.map.map.getPaintProperty(t,e)}catch(n){return void console.warn('Unable to read paint property "'.concat(e,'" on layer "').concat(t,'":'),n)}}},{key:"_setSafePaintProperty",value:function(t,e,n){try{this.map.map.setPaintProperty(t,e,n)}catch(n){console.warn('Unable to set paint property "'.concat(e,'" on layer "').concat(t,'":'),n)}}},{key:"_restoreDimmedPaintProperty",value:function(t,e,n){var r=void 0===n?sl[e]:n;void 0!==r&&this._setSafePaintProperty(t,e,r)}},{key:"hideSymbolLayers",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){if("symbol"===e.type&&!t._isProtectedSymbolLayer(e.id)){var n=e.id;if(!t.searchSymbolOpacityBackup[n]){var r={};al.forEach((function(e){var i=t._getSafePaintProperty(n,e);r[e]=i,t._setSafePaintProperty(n,e,t._scaleOpacityForDimming(i,.5))})),ul.forEach((function(e){var i=t._getSafePaintProperty(n,e);if(void 0!==i){var o=t._dimHaloColorForDimming(i,.5);r[e]=i,o!==i&&t._setSafePaintProperty(n,e,o)}})),Object.keys(r).length>0&&(t.searchSymbolOpacityBackup[n]=r)}}}))}},{key:"showSymbolLayers",value:function(){var t=this;Object.entries(this.searchSymbolOpacityBackup).forEach((function(e){var n=Zc(e,2),r=n[0],i=n[1];Object.entries(i).forEach((function(e){var n=Zc(e,2),i=n[0],o=n[1];t._restoreDimmedPaintProperty(r,i,o)}))})),this.searchSymbolOpacityBackup={}}},{key:"updateLabelsForSearchResults",value:function(t){var e,n,r=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;null===o&&(o=this.map.getCurrentFloor());var a=(null===(e=this.map.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],u=(null===(n=this.map.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30;this.map.clearHighlightedContentLayer();var s=[],c=[],l=t.length;if(t.forEach((function(t){var e,n;t._floor=t.floor,n="outdoor-cities-demo"===((null===(e=r.map.mapData)||void 0===e?void 0:e.map_id)||null)?t.location:Ln([t.location],a,u)[0];var i=t.catalog.content_title_key;t.name=t.content.data[i];var l=r.map.addHighlightedFeature(n,t);r.map.addHighlightedDotFeature(n,t),s.push(l),t.floor===o&&c.push(l)})),c.length&&i){var h,f,p,d,y=new mapboxgl.LngLatBounds,m=null===(h=this.map)||void 0===h||null===(h=h.mapData)||void 0===h?void 0:h.map_id;d=1===l&&this._isDesktopLayout()?15:1===l&&this._isMobileLayout()?16:15,"usbank-del-coronado-2026"===m&&(d=18),c.forEach((function(t){y.extend(t.geometry.coordinates)}));var g=null!==(f=this.map.options.pitch)&&void 0!==f?f:0,D=null!==(p=this.map.options.bearing)&&void 0!==p?p:0;if(this._isDesktopLayout())this.map.map.fitBounds(y,{padding:{top:100,bottom:100,left:500,right:100},maxZoom:d,pitch:g,bearing:D,duration:1e3});else if(this._isMobileLayout()){var v;v=1===l?0:100;var M=.57*this.map.mapContainer.offsetHeight,b=.08*this.map.mapContainer.offsetWidth;this.map.map.fitBounds(y,{padding:{top:160,bottom:M,left:b,right:b+v},maxZoom:d,pitch:g,bearing:D,duration:1e3})}}}},{key:"_getSelectionFeaturesProperties",value:function(){return this.map.getConfirmedSelectionFeatures().map((function(t){return t.properties}))}},{key:"updateLabelForSelectedContentPlacement",value:function(t){var e,n,r,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.map.clearSelectedContentLayer();var o,a=(null===(e=this.map.mapData)||void 0===e?void 0:e.map_id)||null;console.log("🔵 InteractionControl: mapId:",a);var u=(null===(n=this.map.mapData)||void 0===n?void 0:n.reference_coordinate)||[0,0],s=(null===(r=this.map.mapData)||void 0===r?void 0:r.coordinate_scaling_multiplier)||30;if(o="outdoor-cities-demo"===a?t.location:Ln([t.location],u,s)[0],t._floor=t.floor,!t.name&&t.content&&t.catalog){var c=t.catalog.content_title_key,l=t.content.data[c];t.name=l}if(this.map.addSelectedFeature(o,t),i)if(this._isDesktopLayout())this.map.map.easeTo({center:o,padding:{top:0,bottom:0,left:330,right:0},duration:1e3});else if(this._isMobileLayout()){var h=.44*this.map.mapContainer.offsetHeight;this.map.map.easeTo({center:o,padding:{top:100,bottom:h,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 i=e.features[0],o=i.properties.placement_id;if(t.previouslySelectedFeature&&t.previouslySelectedFeature.layer.id===i.layer.id){t.originalTextColor=t.previouslySelectedTextColor;var a=t.previouslySelectedFeature.properties.placement_id;t.map.map.setPaintProperty(n,"text-color",["case",["==",["get","placement_id"],o],"#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"],o],"#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:"removeHoverEffects",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.setPaintProperty(n,"text-color",r),t.map.map.off("mouseenter",n),t.map.map.off("mouseleave",n)}})),this.map.map.getCanvas().style.cursor="default"}},{key:"applySelectionModeVisuals",value:function(t){var e=this,n=this.map.map.getStyle().layers;this.originalPaintProperties={},n.forEach((function(t){if("background"===t.type){var n=t.id;return e.originalPaintProperties[n]||(e.originalPaintProperties[n]={}),e.originalPaintProperties[n]["background-color"]=e.map.map.getPaintProperty(n,"background-color"),void e.map.map.setPaintProperty(n,"background-color","#f5f5f5")}if("raster"!==t.type&&"heatmap"!==t.type){var r=t.id;if(r.includes("selectable-"))return;if(e.originalPaintProperties[r]||(e.originalPaintProperties[r]={}),"symbol"===t.type){if(r.includes("selectable-")||r.includes("booked-")||r.includes("confirmed-selection"))return;var i=e.map.map.getLayer(r),o=i.source,a=i.sourceLayer,u=i.filter,s=[];try{var c=e.map.map.getSource(o);c&&"vector"===c.type&&a?s=e.map.map.querySourceFeatures(o,{sourceLayer:a,filter:u}):c&&"geojson"===c.type&&(s=c._data.features||[])}catch(t){console.error("❌ Error getting symbol features before layer hiding:",t)}e.originalPaintProperties[r]={"text-opacity":e.map.map.getPaintProperty(r,"text-opacity"),"icon-opacity":e.map.map.getPaintProperty(r,"icon-opacity"),"text-color":e.map.map.getPaintProperty(r,"text-color"),source:o,"source-layer":a,filter:u,features:s},e.map.map.setLayoutProperty(r,"visibility","none"),e.pendingSymbolFeatures||(e.pendingSymbolFeatures=[]),e.pendingSymbolFeatures.push({layerId:r,features:s})}else if("fill"===t.type){e.originalPaintProperties[r]["fill-opacity"]=e.map.map.getPaintProperty(r,"fill-opacity"),e.originalPaintProperties[r]["fill-color"]=e.map.map.getPaintProperty(r,"fill-color");var l=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["fill-opacity"],.5],h=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["fill-color"],"#f7f7f8"];e.map.map.setPaintProperty(r,"fill-color",h),e.map.map.setPaintProperty(r,"fill-opacity",l)}else if("line"===t.type){e.originalPaintProperties[r]["line-opacity"]=e.map.map.getPaintProperty(r,"line-opacity"),e.originalPaintProperties[r]["line-color"]=e.map.map.getPaintProperty(r,"line-color");var f=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["line-opacity"],.6],p=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["line-color"],"#AAAAAA"];e.map.map.setPaintProperty(r,"line-color",p),e.map.map.setPaintProperty(r,"line-opacity",f)}else if("circle"===t.type){e.originalPaintProperties[r]["circle-opacity"]=e.map.map.getPaintProperty(r,"circle-opacity"),e.originalPaintProperties[r]["circle-color"]=e.map.map.getPaintProperty(r,"circle-color");var d=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["circle-opacity"]||1,.5],y=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["circle-color"],"#CCCCCC"];e.map.map.setPaintProperty(r,"circle-color",y),e.map.map.setPaintProperty(r,"circle-opacity",d)}else if("fill-extrusion"===t.type){var m=e.map.map.getLayer(r),g=m.source,D=m.sourceLayer,v=m.filter,M=[];try{var b=e.map.map.getSource(g);b&&"vector"===b.type&&D?M=e.map.map.querySourceFeatures(g,{sourceLayer:D,filter:v}):b&&"geojson"===b.type&&(M=b._data.features||[])}catch(t){console.error("❌ Error getting features before layer removal:",t)}e.originalPaintProperties[r]={"fill-extrusion-color":e.map.map.getPaintProperty(r,"fill-extrusion-color"),"fill-extrusion-height":e.map.map.getPaintProperty(r,"fill-extrusion-height"),"fill-extrusion-opacity":e.map.map.getPaintProperty(r,"fill-extrusion-opacity"),source:g,"source-layer":D,filter:v,features:M},e.map.map.removeLayer(r),e.pendingExtrusionFeatures||(e.pendingExtrusionFeatures=[]),e.pendingExtrusionFeatures.push({layerId:r,features:M})}}}))}},{key:"processPendingSymbolFeatures",value:function(){var t=this;this.pendingSymbolFeatures&&0!==this.pendingSymbolFeatures.length&&(this.pendingSymbolFeatures.forEach((function(e){var n=e.layerId,r=e.features;t.addSymbolFeaturesToBookedLabels(r,n)})),this.pendingSymbolFeatures=[])}},{key:"addSymbolFeaturesToBookedLabels",value:function(t,e){if(0!==t.length)try{var n=this.map.map.getSource("booked-labels");if(!n)return void console.error("❌ booked-labels source not found");var r=n._data.features||[],i=t.map((function(t){var e=t.properties.title||t.properties.name||"Untitled";return{type:"Feature",geometry:t.geometry,properties:Jc(Jc({},t.properties),{},{name:e})}})),o=[].concat(Gc(r),Gc(i));n.setData({type:"FeatureCollection",features:o}),this.map.map.getSource("booked-labels")._data.features}catch(t){console.error("❌ Error adding symbol features to booked-labels:",t)}}},{key:"addFeaturesToBookedContent",value:function(t,e){if(0!==t.length)try{var n=this.map.map.getSource("booked-content");if(!n)return void console.error("❌ booked-content source not found");var r=n._data.features||[],i=[].concat(Gc(r),Gc(t));n.setData({type:"FeatureCollection",features:i}),this.map.map.getSource("booked-content")._data.features}catch(t){console.error("❌ Error adding features to booked-content:",t)}}},{key:"processPendingExtrusionFeatures",value:function(){var t=this;this.pendingExtrusionFeatures&&0!==this.pendingExtrusionFeatures.length&&(this.pendingExtrusionFeatures.forEach((function(e){var n=e.layerId,r=e.features;t.addFeaturesToBookedContent(r,n)})),this.pendingExtrusionFeatures=[])}},{key:"getHighPrecisionFeatures",value:function(t,e){var n=this.originalPaintProperties[e];if(!n)return console.warn("⚠️ No layer info found, using original features"),t;var r=n.source,i=n["source-layer"],o=n.filter;try{if(!this.map.map.getSource(r))return console.error("❌ Source not found:",r),t;var a=this.map.map.querySourceFeatures(r,{sourceLayer:i,filter:o});return a.length>=t.length?a:t}catch(e){return console.error("❌ Error getting high-precision features:",e),t}}},{key:"removeGreyFillLayers",value:function(){var t=this;this.greyFillLayers&&(this.greyFillLayers.forEach((function(e){t.map.map.getLayer(e)&&t.map.map.removeLayer(e)})),this.greyFillLayers=[])}},{key:"applySelectableHoverEffects",value:function(){var t=this;this.selectionHoverHandler&&this.map.map.off("mousemove",this.selectionHoverHandler),this.selectionHoverHandler=function(e){if(t.interactionEnabled&&t.selectionCriteria){var n=t.map.map.queryRenderedFeatures(e.point,{layers:["selectable-fill-layer"]});if(t.currentHoveredFeatureId&&t.map.map.setFeatureState({source:"selectable-content",id:t.currentHoveredFeatureId},{hover:!1}),n.length>0){var r=n[0];t.currentHoveredFeatureId=r.properties.feature_id,t.map.map.setFeatureState({source:"selectable-content",id:t.currentHoveredFeatureId},{hover:!0}),t.map.map.getCanvas().style.cursor="pointer"}else t.currentHoveredFeatureId=null,t.map.map.getCanvas().style.cursor="default"}},this.map.map.on("mousemove",this.selectionHoverHandler),this.map.map.setPaintProperty("selectable-fill-layer","fill-color",["case",["boolean",["feature-state","hover"],!1],this.selectionHoverColor,"#FFFFFF"])}},{key:"createSelectionOpacityExpression",value:function(t){var e=.1;e=["case",["==",["get","type"],"floor"],1,e];for(var n=function(){var t=Zc(i[r],2),n=t[0],o=t[1];if(Array.isArray(o)){var a=o.map((function(t){return["==",["get",n],t]})),u=["any"].concat(Gc(a));e=["case",u,1,e]}else e=["case",["==",["get",n],o],1,e]},r=0,i=Object.entries(t);r<i.length;r++)n();return e}},{key:"createSelectionColorOpacityExpression",value:function(t,e){var n=this.map.map.getPaintProperty(e,"fill-extrusion-color");if(!n)return null;for(var r=["case",["==",["get","type"],"floor"],n],i=function(){var t=Zc(a[o],2),e=t[0],i=t[1];if(Array.isArray(i)){var u=i.map((function(t){return["==",["get",e],t]})),s=["any"].concat(Gc(u));r.push(s,n)}else r.push(["==",["get",e],i],n)},o=0,a=Object.entries(t);o<a.length;o++)i();return r.push("#2A2A2A"),r}},{key:"restoreLayerToSelectionMode",value:function(t){var e=this.map.map.getStyle().layers.find((function(e){return e.id===t}));if(e)if("fill"===e.type){var n=this.originalPaintProperties[t]["fill-color"];n&&this.map.map.setPaintProperty(t,"fill-color",n)}else if("fill-extrusion"===e.type){var r=this.selectionModeExpressions[t]||this.originalPaintProperties[t]["fill-extrusion-color"];r&&this.map.map.setPaintProperty(t,"fill-extrusion-color",r)}}},{key:"applyHoverToFeature",value:function(t,e,n){"fill"===n?this.map.map.setPaintProperty(t,"fill-color",["case",["==",["id"],e],this.selectionHoverColor,this.originalPaintProperties[t]["fill-color"]||["get","color"]||0]):"fill-extrusion"===n&&this.map.map.setPaintProperty(t,"fill-extrusion-color",["case",["==",["id"],e],this.selectionHoverColor,this.selectionModeExpressions[t]||this.originalPaintProperties[t]["fill-extrusion-color"]||["get","color"]||0])}},{key:"applySelectionHoverEffects",value:function(t){var e=this;this.selectionHoverHandler=function(t){if(e.interactionEnabled&&e.selectionCriteria){var n=e.map.map.queryRenderedFeatures(t.point).find((function(t){return"fill"===t.layer.type||"fill-extrusion"===t.layer.type}));if(n){var r=n.layer.id,i=n.id;e.currentHoveredLayerId===r&&e.currentHoveredFeatureId===i||(e.currentHoveredLayerId&&e.restoreLayerToSelectionMode(e.currentHoveredLayerId),e.featureMatchesCriteria(n.properties,e.selectionCriteria)?(e.currentHoveredLayerId=r,e.currentHoveredFeatureId=i,e.applyHoverToFeature(r,i,n.layer.type),e.map.map.getCanvas().style.cursor="pointer"):(e.currentHoveredLayerId=null,e.currentHoveredFeatureId=null,e.map.map.getCanvas().style.cursor="default"))}else e.currentHoveredLayerId&&(e.restoreLayerToSelectionMode(e.currentHoveredLayerId),e.currentHoveredLayerId=null,e.currentHoveredFeatureId=null),e.map.map.getCanvas().style.cursor="default"}},this.map.map.on("mousemove",this.selectionHoverHandler)}},{key:"removeSelectionVisuals",value:function(){for(var t=this,e=0,n=Object.entries(this.originalPaintProperties);e<n.length;e++){for(var r=Zc(n[e],2),i=r[0],o=r[1],a=0,u=Object.entries(o);a<u.length;a++){var s=Zc(u[a],2),c=s[0],l=s[1];"source"!==c&&"source-layer"!==c&&"filter"!==c&&"features"!==c&&void 0!==l&&this.map.map.setPaintProperty(i,c,l)}o.source&&this.map.map.setLayoutProperty(i,"visibility","visible")}var h=this.map.map.getStyle().layers,f=this.map.getCurrentFloor();h.forEach((function(e){if("background"!==e.type&&"raster"!==e.type&&"heatmap"!==e.type){var n=e.id;if(n.includes("selectable-"))return;if(t.map.map.getFilter(n)){var r=t.map.originalFilters[n];if(void 0!==r){t.map.map.setFilter(n,r);var i=["==",["get","_floor"],f];if(r){var o=["all",i,r];t.map.map.setFilter(n,o)}else t.map.map.setFilter(n,i)}}else{var a=["==",["get","_floor"],f];t.map.map.setFilter(n,a)}}})),this.originalPaintProperties={},this.selectionModeExpressions={},this.map.removeSelectableContentLayers(),this.removeGreyFillLayers(),this.currentHoveredLayerId=null,this.currentHoveredFeatureId=null,this.selectionHoverHandler&&(this.map.map.off("mousemove",this.selectionHoverHandler),this.selectionHoverHandler=null),this.pendingSymbolFeatures=[],this.pendingExtrusionFeatures=[],this.map.map.getCanvas().style.cursor="default"}},{key:"_handleClick",value:function(t){var e=this;if(this.interactionEnabled)if("selection"===this.map.getCurrentState()){var n=this.map.map.queryRenderedFeatures(t.point,{layers:["confirmed-selection-fill-layer","confirmed-selection-outline-layer","confirmed-selection-icon-layer"]});if(n.length>0){var r=n[0],i=r.properties.feature_id;return this.map.removeConfirmedSelectionFeature(i),this.map.fire("selection:featureDeselected",{feature:r,placementId:r.properties.placement_id||i}),void this.map.fire("selection:changed",{selectedContent:this._getSelectionFeaturesProperties(),selectionCount:this.map.getConfirmedSelectionFeatures().length})}var o=this.map.map.queryRenderedFeatures(t.point,{layers:["selectable-fill-layer"]});if(o.length>0){var a=o[0],u=a.properties.placement_id,s=a.properties.feature_id;if(!this.map.multiSelect){var c=this.map.getConfirmedSelectionFeatures();if(c.length>0){var l=c[0],h=l.properties.feature_id;this.map.fire("selection:featureDeselectedOptimistic",{placementId:l.properties.placement_id||h})}}if(this.map.addConfirmedSelectionFeature(a,!this.map.multiSelect),this.map.fire("selection:featureSelectedOptimistic",{feature:a}),u&&"unknown"!==u&&""!==u)this.map._stateCoordinator.setLoading(!0,"content"),this.map.getContentPlacementDetails(u).then((function(t){e.map.fire("selection:featureSelected",{feature:a,contentPlacement:t}),e.map.fire("selection:changed",{selectedContent:e._getSelectionFeaturesProperties(),selectionCount:e.map.getConfirmedSelectionFeatures().length})})).catch((function(t){console.error("❌ Error fetching content placement details:",t),e.map.removeConfirmedSelectionFeature(s),e.map.fire("selection:featureDeselectedOptimistic",{placementId:u||s})})).finally((function(){e.map._stateCoordinator.setLoading(!1,"content")}));else{var f=Jc({placement_id:s,name:a.properties.name||"Unknown Feature",type:a.properties.type||"unknown"},a.properties);this.map.fire("selection:featureSelected",{feature:a,contentPlacement:f}),this.map.fire("selection:changed",{selectedContent:this._getSelectionFeaturesProperties(),selectionCount:this.map.getConfirmedSelectionFeatures().length})}return}}else{var p=(this.map.map.queryRenderedFeatures(t.point)||[]).filter((function(t){var e;return"symbol"===(null==t||null===(e=t.layer)||void 0===e?void 0:e.type)}));if(p.length>0){var d=p[0].properties.placement_id;d&&"unknown"!==d&&""!==d&&this.map.setToSelectedContentState([d])}}}},{key:"featureMatchesCriteria",value:function(t,e){for(var n=0,r=Object.entries(e);n<r.length;n++){var i=Zc(r[n],2),o=i[0],a=i[1],u=t[o];if(Array.isArray(a)){if(!a.includes(u))return!1}else if(u!==a)return!1}return!0}},{key:"_setupCursorHandling",value:function(){var t=this;this.map.map.on("mouseenter","confirmed-selection-fill-layer",(function(){t.map.map.getCanvas().style.cursor="pointer"})),this.map.map.on("mouseleave","confirmed-selection-fill-layer",(function(){t.map.map.getCanvas().style.cursor=""})),this.map.map.on("mouseenter","confirmed-selection-outline-layer",(function(){t.map.map.getCanvas().style.cursor="pointer"})),this.map.map.on("mouseleave","confirmed-selection-outline-layer",(function(){t.map.map.getCanvas().style.cursor=""})),this.map.map.on("mouseenter","confirmed-selection-icon-layer",(function(){t.map.map.getCanvas().style.cursor="pointer"})),this.map.map.on("mouseleave","confirmed-selection-icon-layer",(function(){t.map.map.getCanvas().style.cursor=""}))}}],r&&$c(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(di);function ll(t){return ll="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},ll(t)}function hl(){hl=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==ll(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(ll(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function fl(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function pl(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){fl(o,r,i,a,u,"next",t)}function u(t){fl(o,r,i,a,u,"throw",t)}a(void 0)}))}}function dl(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,yl(r.key),r)}}function yl(t){var e=function(t){if("object"!=ll(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ll(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ll(e)?e:e+""}function ml(t,e,n){return e=Dl(e),function(t,e){if(e&&("object"==ll(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,gl()?Reflect.construct(e,n||[],Dl(t).constructor):e.apply(t,n))}function gl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(gl=function(){return!!t})()}function Dl(t){return Dl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Dl(t)}function vl(t,e){return vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vl(t,e)}const Ml=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=ml(this,e,[n])).startSearchBox=new li,t.endSearchBox=new li,t.startContentPlacement=null,t.endContentPlacement=null,t.pathData=null,t.fromLocation=!1,t.searchApi=nn.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&&vl(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 i=document.createElement("div");i.className="small-circle";var o=document.createElement("div");return o.className="small-circle",t.appendChild(e),t.appendChild(r),t.appendChild(i),t.appendChild(o),t.appendChild(n),t}},{key:"_render",value:function(){this.element.innerHTML="",this.element.appendChild(this.directionsViewHeader)}},{key:"_setupEventListeners",value:function(){this.startSearchBox.searchBar.on("focus",this._handleStartSearchBarFocus.bind(this)),this.startSearchBox.searchBar.on("blur",this._handleStartSearchBarBlur.bind(this)),this.startSearchBox.on("getSearchBarSuggestions",this._handleGettingStartSearchBarSuggestions.bind(this)),this.endSearchBox.searchBar.on("focus",this._handleEndSearchBarFocus.bind(this)),this.endSearchBox.searchBar.on("blur",this._handleEndSearchBarBlur.bind(this)),this.endSearchBox.on("getSearchBarSuggestions",this._handleGettingEndSearchBarSuggestions.bind(this)),this.startSearchBox.searchBarSuggestionsView.on("selectCell",this._handleStartContentPlacementSelect.bind(this)),this.endSearchBox.searchBarSuggestionsView.on("selectCell",this._handleEndContentPlacementSelect.bind(this))}},{key:"_handleGettingStartSearchBarSuggestions",value:(u=pl(hl().mark((function t(e){var n;return hl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.query,this.fire("getStartSuggestions",{query:n});case 2:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"_handleGettingEndSearchBarSuggestions",value:(a=pl(hl().mark((function t(e){var n;return hl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.query,this.fire("getEndSuggestions",{query:n});case 2:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"_handleStartContentPlacementSelect",value:(o=pl(hl().mark((function t(e){var n,r,i,o;return hl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=e.result)||"gps-current-location"!==n.type){t.next=4;break}return this.fire("selectGpsCurrentLocation"),t.abrupt("return");case 4:return r=n.placement_id,i=n.catalog.content_title_key,this.startSearchBox.searchBar.setText(n.content.data[i]),t.next=9,this.searchApi.fetchContentPlacementDetails(r);case 9:o=t.sent,this.fire("selectedStartContentPlacement",{startContentPlacement:o}),this.updateView(o,this.endContentPlacement);case 12:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"enableGpsStartCell",value:function(){this.startSearchBox.setShowSuggestionsOnEmptyFocus(!0),this.startSearchBox.setPinnedResults([{type:"gps-current-location"}])}},{key:"disableGpsStartCell",value:function(){this.startSearchBox.setShowSuggestionsOnEmptyFocus(!1),this.startSearchBox.clearPinnedResults()}},{key:"focusStartInput",value:function(){var t=this.startSearchBox.searchBar.input;t&&t.focus(),this.startSearchBox.openSuggestionsView()}},{key:"_handleEndContentPlacementSelect",value:(i=pl(hl().mark((function t(e){var n,r,i,o;return hl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.result,r=n.placement_id,i=n.catalog.content_title_key,this.endSearchBox.searchBar.setText(n.content.data[i]),t.next=6,this.searchApi.fetchContentPlacementDetails(r);case 6:o=t.sent,this.fire("selectedEndContentPlacement",{endContentPlacement:o}),this.updateView(this.startContentPlacement,o);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_handleStartSearchBarFocus",value:function(){this.startSearchBox.searchBar.updateRightButtonIcon("search"),this.startSearchBox.searchBar.setPlaceholderText("Choose starting point")}},{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){var n=t.content.data[t.catalog.content_title_key];this.startSearchBox.searchBar.setText(n);var r=e.content.data[e.catalog.content_title_key];this.endSearchBox.searchBar.setText(r),this.fire("initiate:findPath",{startContentPlacementId:t.placement_id,endContentPlacementId:e.placement_id})}else if(t){var i=t.content.data[t.catalog.content_title_key];this.startSearchBox.searchBar.setText(i),this.endSearchBox.searchBar.setText(""),this.endSearchBox.searchBar.input.focus()}else if(e){var o=e.content.data[e.catalog.content_title_key];this.endSearchBox.searchBar.setText(o),this.startSearchBox.searchBar.setText(""),this.fromLocation&&this.fire("initiate:findPathFromLocation",{endContentPlacement:e})}}},{key:"setNewPath",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.fromLocation=e;var n=t.legs[0].steps[0];n.path,n.path,n.path,e&&this.startSearchBox.searchBar.setPlaceholderText("Your location"),this.pathData=t,this._render()}},{key:"getElement",value:function(){return this.element}},{key:"showLoading",value:function(){this.loadingElement&&(this.loadingElement.style.display="flex")}},{key:"hideLoading",value:function(){this.loadingElement&&(this.loadingElement.style.display="none")}}],r&&dl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o,a,u}(Nn);n(975);function bl(t){return bl="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},bl(t)}function wl(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,El(r.key),r)}}function El(t){var e=function(t){if("object"!=bl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=bl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bl(e)?e:e+""}function Cl(t,e,n){return e=Al(e),function(t,e){if(e&&("object"==bl(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,jl()?Reflect.construct(e,n||[],Al(t).constructor):e.apply(t,n))}function jl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(jl=function(){return!!t})()}function Al(t){return Al=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Al(t)}function Nl(t,e){return Nl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Nl(t,e)}const Sl=function(t){function e(){var t,n=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=Cl(this,e,[n])).pathData=null,t.legSelector=null,t.legSelectorContainerName="leg-selector",t.selectedLegIndex=0,t.stepsVisible=!0,t.toggleButton=null,t.floorData=n.floorData||[],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&&Nl(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="steps-view",this._render()}},{key:"_createToggleButton",value:function(){var t=document.createElement("button");return t.className="toggle-steps-button",t.textContent=this.stepsVisible?"Hide Steps":"Show Steps",t.addEventListener("click",this._toggleStepsVisibility.bind(this)),t}},{key:"_toggleStepsVisibility",value:function(){this.stepsVisible=!this.stepsVisible,this._render()}},{key:"_createLegSelector",value:function(t){var e=this,n=[];t.forEach((function(t){var r,i=(null===(r=e.floorData[t.floor])||void 0===r?void 0:r.name)||"Floor ".concat(t.floor);n.push(i)}));var r=new xi(n,{container:this.legSelectorContainerName});return r.on("".concat(this.legSelectorContainerName,":selectNew"),this._handleLegSelectorSelect.bind(this)),r}},{key:"_handleLegSelectorSelect",value:function(t){var e=t.index;e!==this.selectedLegIndex&&(this.selectedLegIndex=e,this.fire("legSelect",t),this._render())}},{key:"_render",value:function(){var t=this;if(this.element.innerHTML="",this.pathData){this.element.style.display="",this.pathData.legs.length>1&&(this.legSelector=this._createLegSelector(this.pathData.legs),this.legSelector.selectButtonAtIndex(this.selectedLegIndex),this.element.appendChild(this.legSelector.getElement()));var e=document.createElement("div");if(e.className="steps-container",this.stepsVisible){var n=document.createElement("ul"),r=this.pathData.legs[this.selectedLegIndex];r.steps.forEach((function(e,i){var o=document.createElement("li");0!==t.selectedLegIndex&&t.pathData.legs.slice(0,t.selectedLegIndex).reduce((function(t,e){return t+e.steps.length}),0);var a=document.createElement("div");a.className="step-container";var u=document.createElement("img");u.className="step-icon","left"===e.instruction?u.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTI2IDRINkM1LjQ2OTU3IDQgNC45NjA4NiA0LjIxMDcxIDQuNTg1NzkgNC41ODU3OUM0LjIxMDcxIDQuOTYwODYgNCA1LjQ2OTU3IDQgNlYyNkM0IDI2LjUzMDQgNC4yMTA3MSAyNy4wMzkxIDQuNTg1NzkgMjcuNDE0MkM0Ljk2MDg2IDI3Ljc4OTMgNS40Njk1NyAyOCA2IDI4SDI2QzI2LjUzMDQgMjggMjcuMDM5MSAyNy43ODkzIDI3LjQxNDIgMjcuNDE0MkMyNy43ODkzIDI3LjAzOTEgMjggMjYuNTMwNCAyOCAyNlY2QzI4IDUuNDY5NTcgMjcuNzg5MyA0Ljk2MDg2IDI3LjQxNDIgNC41ODU3OUMyNy4wMzkxIDQuMjEwNzEgMjYuNTMwNCA0IDI2IDRaTTI2IDI2SDZWNkgyNlYyNlpNMTAuMjkyNSAxNi43MDc1QzEwLjE5OTUgMTYuNjE0NiAxMC4xMjU4IDE2LjUwNDMgMTAuMDc1NCAxNi4zODI5QzEwLjAyNTEgMTYuMjYxNSA5Ljk5OTIxIDE2LjEzMTQ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A3NUMxMi42MTQ2IDE1LjgwMDUgMTIuNTA0MyAxNS44NzQyIDEyLjM4MjkgMTUuOTI0NkMxMi4yNjE1IDE1Ljk3NDkgMTIuMTMxNCAxNi4wMDA4IDEyIDE2LjAwMDhDMTEuODY4NiAxNi4wMDA4IDExLjczODUgMTUuOTc0OSAxMS42MTcxIDE1LjkyNDZDMTEuNDk1NyAxNS44NzQyIDExLjM4NTQgMTUuODAwNSAxMS4yOTI1IDE1LjcwNzVaIiBmaWxsPSIjODA4MDgwIi8+Cjwvc3ZnPgo="),a.appendChild(u);var s=document.createElement("div");s.className="step-details";var c=document.createElement("div");if(c.className="step-instruction",c.textContent=e.text,s.appendChild(c),i!==r.steps.length-1){var l=document.createElement("div");l.className="step-distance";var h=parseFloat(e.distance.toFixed(0));"Feet"===t.pathData.unit?h+=" ft":"Meters"===t.pathData.unit&&(h+=" m"),l.textContent=h,s.appendChild(l)}a.appendChild(s),o.appendChild(a),n.appendChild(o)})),e.appendChild(n),this.element.appendChild(e)}this.toggleButton=this._createToggleButton(),this.element.appendChild(this.toggleButton)}else this.element.style.display="none"}},{key:"clearSteps",value:function(){var t=this.element.querySelector(".steps-view");t&&t.remove()}},{key:"clear",value:function(){this.pathData=null,this._render()}},{key:"setNewPath",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.pathData=t,n&&(this.floorData=n),null!==e&&(this.stepsVisible=e),this.selectedLegIndex=0,this._render()}},{key:"getElement",value:function(){return this.element}}],r&&wl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);var Il=n(583);function Tl(t){return Tl="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},Tl(t)}function Fl(){Fl=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==Tl(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(Tl(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Ol(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function xl(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,kl(r.key),r)}}function kl(t){var e=function(t){if("object"!=Tl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Tl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Tl(e)?e:e+""}function Ll(t,e,n){return e=zl(e),function(t,e){if(e&&("object"==Tl(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,_l()?Reflect.construct(e,n||[],zl(t).constructor):e.apply(t,n))}function _l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_l=function(){return!!t})()}function zl(t){return zl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zl(t)}function Bl(t,e){return Bl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bl(t,e)}const Pl=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=Ll(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&&Bl(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="qr-code-view",this.textElement=document.createElement("p"),this.textElement.className="qr-code-text",this.textElement.innerText="Scan to continue on your phone",this.qrCodeContainer=document.createElement("div"),this.qrCodeContainer.className="qr-code-container",this.qrCodeCanvas=null,this.element.appendChild(this.textElement),this.element.appendChild(this.qrCodeContainer)}},{key:"updateQRCode",value:(i=Fl().mark((function t(e){var n,r=arguments;return Fl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:200,this.qrCodeCanvas&&(this.qrCodeContainer.removeChild(this.qrCodeCanvas),this.qrCodeCanvas=null),t.prev=2,this.qrCodeCanvas=document.createElement("canvas"),this.qrCodeCanvas.className="qr-code-canvas",t.next=7,Il.toCanvas(this.qrCodeCanvas,e,{width:n,margin:2});case 7:this.qrCodeContainer.appendChild(this.qrCodeCanvas),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(2),console.error("Error generating QR code:",t.t0);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})),o=function(){var t=this,e=arguments;return new Promise((function(n,r){var o=i.apply(t,e);function a(t){Ol(o,n,r,a,u,"next",t)}function u(t){Ol(o,n,r,a,u,"throw",t)}a(void 0)}))},function(t){return o.apply(this,arguments)})},{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}}],r&&xl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o}(Nn);function Ul(t){return Ul="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},Ul(t)}function Rl(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,Ql(r.key),r)}}function Ql(t){var e=function(t){if("object"!=Ul(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ul(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ul(e)?e:e+""}function Yl(t,e,n){return e=Hl(e),function(t,e){if(e&&("object"==Ul(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,Vl()?Reflect.construct(e,n||[],Hl(t).constructor):e.apply(t,n))}function Vl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vl=function(){return!!t})()}function Hl(t){return Hl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hl(t)}function Gl(t,e){return Gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gl(t,e)}var Zl={DENIED:{title:"Location access is off",body:"We couldn't use your location. Search for a starting point instead."},TIMEOUT:{title:"Couldn't get your location",body:"We couldn't read your location in time. Search for a starting point instead."},UNAVAILABLE:{title:"Couldn't get your location",body:"Your device didn't share a location. Search for a starting point instead."},NO_NODE:{title:"You're too far from this map",body:"We couldn't find a path near your location. Search for a starting point instead."},TOO_FAR:{title:"You're too far from this map",body:"You're not close enough to this map to start from your location. Search for a starting point instead."}};const Wl=function(t){function e(){var t=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),Yl(this,e,[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&&Gl(t,e)}(e,t),n=e,(r=[{key:"show",value:function(t,e,n){var r=this,i=Zl[e]||Zl.UNAVAILABLE,o=document.createElement("div");o.className="gps-fallback-popup-card";var a=document.createElement("div");a.className="gps-fallback-popup-title",a.textContent=i.title,o.appendChild(a);var u=document.createElement("div");u.className="gps-fallback-popup-body",u.textContent=i.body,o.appendChild(u);var s=document.createElement("button");if(s.className="gps-fallback-popup-ok",s.textContent="OK",s.addEventListener("click",(function(){r._resetModalStyles(t),t.hideModal(),"function"==typeof n&&n()})),o.appendChild(s),t.showModal(o),t.modalContainer){this._previousContainerBg=t.modalContainer.style.backgroundColor,t.modalContainer.style.backgroundColor="rgba(0, 0, 0, 0.35)";var c=t.modalContainer.querySelector(".waygo-map-modal-content");c&&(c.style.backgroundColor="transparent",c.style.width="auto",c.style.height="auto",c.style.maxWidth="none",c.style.maxHeight="none",c.style.boxShadow="none",c.style.display="flex",c.style.alignItems="center",c.style.justifyContent="center")}}},{key:"_resetModalStyles",value:function(t){t.modalContainer&&void 0!==this._previousContainerBg&&(t.modalContainer.style.backgroundColor=this._previousContainerBg,this._previousContainerBg=void 0)}}])&&Rl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function ql(t){return ql="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},ql(t)}function Kl(t,e,n){return(e=nh(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Jl(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 Xl(){Xl=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==ql(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(ql(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function $l(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function th(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){$l(o,r,i,a,u,"next",t)}function u(t){$l(o,r,i,a,u,"throw",t)}a(void 0)}))}}function eh(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,nh(r.key),r)}}function nh(t){var e=function(t){if("object"!=ql(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ql(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ql(e)?e:e+""}function rh(t,e,n){return e=ah(e),function(t,e){if(e&&("object"==ql(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,ih()?Reflect.construct(e,n||[],ah(t).constructor):e.apply(t,n))}function ih(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ih=function(){return!!t})()}function oh(){return oh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ah(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},oh.apply(null,arguments)}function ah(t){return ah=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ah(t)}function uh(t,e){return uh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},uh(t,e)}const sh=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=rh(this,e,[n])).directionsView=null,t.stepsView=null,t.map=null,t.searchApi=nn.getSearchApi(),t.startContentPlacement=null,t.endContentPlacement=null,t.fromLocation=!1,t.qrCodeView=null,t.qrCodeButton=null,t.pathData=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&&uh(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){var e;return this.map=t,this.container=document.createElement("div"),this.container.className="directions-control-container",this.directionsView=new Ml,this.stepsView=new Sl([],{floorData:(null===(e=this.map.mapData)||void 0===e?void 0:e.floors)||[]}),this.qrCodeView=new Pl,this.container.appendChild(this.directionsView.getElement()),this.initializeEventListeners(),this.createDirectionsLineLayer(),this._attachResizeListener(),this._initialize(),this.hide(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=oh(ah(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){var t=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)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("initiate:findPath",this._handleIntiateFindPath.bind(this)),this.map.on("initiate:findPathFromLocation",this._handleInitiateFindPathFromLocation.bind(this)),this.map.on("gps:fallback",this._handleGpsFallback.bind(this)),this.directionsView.on("getStartSuggestions",this._handleGettingStartSearchBarSuggestions.bind(this)),this.directionsView.on("getEndSuggestions",this._handleGettingEndSearchBarSuggestions.bind(this)),this.directionsView.on("initiate:findPath",(function(e){return t.map.initiateFindPath(e.startContentPlacementId,e.endContentPlacementId)})),this.directionsView.on("initiate:findPathFromLocation",(function(e){return t.map.initiateFindPathFromLocation(e.endContentPlacement)})),this.directionsView.on("selectedStartContentPlacement",this._handleStartContentPlacementSelected.bind(this)),this.directionsView.on("selectedEndContentPlacement",this._handleEndContentPlacementSelected.bind(this)),this.directionsView.on("selectGpsCurrentLocation",this._handleSelectGpsCurrentLocation.bind(this)),this.stepsView.on("legSelect",this._handleLegChange.bind(this))}},{key:"_handleEndContentPlacementSelected",value:function(t){var e,n,r=t.endContentPlacement;this.endContentPlacement=r;var i=(null===(e=this.map.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],o=(null===(n=this.map.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30,a=kn(r.location,i,o),u=a.lat,s=[a.lon,u];if(!r.name&&r.catalog&&r.content){var c=r.catalog.content_title_key;if(c){var l=r.content.data[c];r.name=l}}r._floor=r.floor,this.map.addSelectedFeature(s,r)}},{key:"_handleStartContentPlacementSelected",value:function(t){var e,n,r=t.startContentPlacement;this.startContentPlacement=r;var i=(null===(e=this.map.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],o=(null===(n=this.map.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30,a=kn(r.location,i,o),u=a.lat,s=[a.lon,u];if(!r.name&&r.catalog&&r.content){var c=r.catalog.content_title_key;if(c){var l=r.content.data[c];r.name=l}}r._floor=r.floor,this.map.clearHighlightedContentLayer(),this.map.addHighlightedFeature(s,r)}},{key:"_handleLegChange",value:function(t){var e=t.index;this.directionsView&&this.pathData&&this.updateMapForPathLeg(this.pathData.legs[e])}},{key:"_handleGettingStartSearchBarSuggestions",value:(l=th(Xl().mark((function t(e){var n,r,i;return Xl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.directionsView){t.next=2;break}return t.abrupt("return");case 2:if(n=e.query,r=++this.directionsView.startSearchBox.searchCount,""!==n){t.next=7;break}return this.directionsView.startSearchBox.searchBarSuggestionsView.updateResults([]),t.abrupt("return");case 7:if(this.map.mapData){t.next=9;break}return t.abrupt("return");case 9:return t.prev=11,t.next=14,this.searchApi.search(this.map.mapData.map_id,this.map.mapData.map_view_id,n,0,5);case 14:i=t.sent,r===this.directionsView.startSearchBox.searchCount&&this.directionsView.startSearchBox.searchBarSuggestionsView.updateResults(i),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(11),Me.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 21:case"end":return t.stop()}}),t,this,[[11,18]])}))),function(t){return l.apply(this,arguments)})},{key:"_handleGettingEndSearchBarSuggestions",value:(c=th(Xl().mark((function t(e){var n,r,i;return Xl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.directionsView){t.next=2;break}return t.abrupt("return");case 2:if(n=e.query,r=++this.directionsView.endSearchBox.searchCount,""!==n){t.next=7;break}return this.directionsView.endSearchBox.searchBarSuggestionsView.updateResults([]),t.abrupt("return");case 7:if(this.map.mapData){t.next=9;break}return t.abrupt("return");case 9:return t.prev=11,t.next=14,this.searchApi.search(this.map.mapData.map_id,this.map.mapData.map_view_id,n,0,5);case 14:i=t.sent,r===this.directionsView.endSearchBox.searchCount&&this.directionsView.endSearchBox.searchBarSuggestionsView.updateResults(i),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(11),Me.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 21:case"end":return t.stop()}}),t,this,[[11,18]])}))),function(t){return c.apply(this,arguments)})},{key:"_renderDesktopView",value:function(){if(this.directionsView){this.container.innerHTML="";var t=this.directionsView.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view"),this._shouldShowQRCodeButton()?(this.qrCodeButton&&this.qrCodeButton.parentNode||this._createQRCodeButton(),this.container.appendChild(this.qrCodeButton)):this.qrCodeButton&&this.qrCodeButton.parentNode&&this.qrCodeButton.parentNode.removeChild(this.qrCodeButton),this.map.shouldRenderDirectionsSteps()&&this.container.appendChild(this.stepsView.getElement())}else console.warn("⚠️ DirectionsControl: directionsView is null")}},{key:"_renderMobileView",value:function(){if(this.directionsView){this.container.innerHTML="";var t=this.directionsView.getElement();this.container.appendChild(t),this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view"),this._shouldShowQRCodeButton()?(this.qrCodeButton&&this.qrCodeButton.parentNode||this._createQRCodeButton(),this.container.appendChild(this.qrCodeButton)):this.qrCodeButton&&this.qrCodeButton.parentNode&&this.qrCodeButton.parentNode.removeChild(this.qrCodeButton),this.map.shouldRenderDirectionsSteps()&&this.container.appendChild(this.stepsView.getElement())}else console.warn("⚠️ DirectionsControl: directionsView is null")}},{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":"#333333","line-width":8}}),this.map.map.moveLayer("directionsLineLayer","FIRST_ELEVATED_FEATURE")}},{key:"updateMapForPathLeg",value:function(t){var e,n;this.clearLineData();var r=[];t.steps.forEach((function(t,e){r.push.apply(r,function(t){return function(t){if(Array.isArray(t))return Jl(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Jl(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)?Jl(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(0===e?t.path:t.path.slice(1)))}));var i=(null===(e=this.map.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],o=(null===(n=this.map.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30,a=Ln(r,i,o);this._updateMapLineData(a,t.floor),this.map.getCurrentFloor()!==t.floor&&this.map.updateFloor(t.floor,!1)}},{key:"_updateMapLineData",value:function(t,e){this.map.map.getSource("directionsLineSource").setData({type:"Feature",properties:{_floor:e},geometry:{type:"LineString",coordinates:t}});var n=new mapboxgl.LngLatBounds;t.forEach((function(t){n.extend(t)})),this._isDesktopLayout()?this.map.map.fitBounds(n,Kl(Kl(Kl({padding:200},"padding",{top:200,bottom:200,left:500,right:150}),"maxZoom",18),"duration",1e3)):this.map.map.fitBounds(n,{padding:{top:350,bottom:60,left:80,right:100},maxZoom:18,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(),this.clearData()}},{key:"_handleSearchState",value:function(t){t.query,t.results,this.hide(),this.clearData()}},{key:"_handleSelectedContentState",value:function(t){t.contentPlacementIds,t.selectedContentPlacement,this.hide(),this.directionsView.updateView(null,null),this.clearData(),this.map.clearHighlightedContentLayer()}},{key:"_handleSetupState",value:function(){this.hide()}},{key:"clearData",value:function(){this.pathData=null,this.clearLineData(),this.stepsView.clear(),this.qrCodeButton&&this.qrCodeButton.parentNode&&this.qrCodeButton.parentNode.removeChild(this.qrCodeButton)}},{key:"_handleDirectionsState",value:(s=th(Xl().mark((function t(e){var n,r,i,o,a,u,s,c,l,h,f,p,d,y,m,g,D,v,M,b,w,E,C,j,A,N=this;return Xl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.startContentPlacement,o=e.endContentPlacement,a=e.startNodeId,this.clearData(),this._updateContentView(),this.show(),this.startContentPlacement=i,this.endContentPlacement=o,this.directionsView.updateView(i,o),this.map.shouldShowGpsCell&&this.map.shouldShowGpsCell()&&!i&&!a&&o?(this.directionsView.enableGpsStartCell(),setTimeout((function(){return N.directionsView.focusStartInput()}),50)):this.directionsView.disableGpsStartCell(),u=(null===(n=this.map.mapData)||void 0===n?void 0:n.reference_coordinate)||[0,0],s=(null===(r=this.map.mapData)||void 0===r?void 0:r.coordinate_scaling_multiplier)||30,i&&(c=kn(i.location,u,s),l=c.lat,h=c.lon,f=[h,l],i.name||i.catalog&&i.content&&(p=i.catalog.content_title_key)&&(d=i.content.data[p],i.name=d),i._floor=i.floor,this.map.clearHighlightedContentLayer(),this.map.addHighlightedFeature(f,i)),!o){t.next=27;break}if(y=kn(o.location,u,s),m=y.lat,g=y.lon,D=[g,m],o.name||o.catalog&&o.content&&(v=o.catalog.content_title_key)&&(M=o.content.data[v],o.name=M),o._floor=o.floor,this.map.addSelectedFeature(D,o),b=null,null!=a&&""!==a?(b=a,console.log("�� DirectionsControl: Using provided startNodeId:",a)):this.map.location&&!i&&(b=this.map.location,console.log("�� DirectionsControl: Using map.location:",this.map.location)),!b){t.next=27;break}return console.log("�� DirectionsControl: Finding path from node to end placement, nodeId:",b),t.next=24,this.map.findPathFromNodeToPlacement(b,o.placement_id);case 24:this.pathData=t.sent,console.log("�� DirectionsControl: Path data received:",!!this.pathData),this.pathData?(this.fromLocation=!0,this.directionsView.setNewPath(this.pathData,!0),w=this.pathData.legs[0].steps[0].path[0],E=kn(w,u,s),C=E.lat,j=E.lon,A=[j,C],this.map.addHighlightedFeature(A,{_floor:this.pathData.legs[0].floor,name:"Start"}),this.map.shouldRenderDirectionsSteps()&&(this._isMobileLayout()?this.stepsView.setNewPath(this.pathData,!1,this.map.mapData.floors):this.stepsView.setNewPath(this.pathData,!0,this.map.mapData.floors)),this.updateMapForPathLeg(this.pathData.legs[0]),this._updateContentView()):console.warn("⚠️ DirectionsControl: No path data returned");case 27:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"_handleInitiateFindPathFromLocation",value:(u=th(Xl().mark((function t(e){var n;return Xl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log("�� DirectionsControl: _handleInitiateFindPathFromLocation called",e),n=e.endContentPlacement,!this.map.location||!n){t.next=7;break}return t.next=5,this.map.findPathFromNodeToPlacement(this.map.location,n.placement_id);case 5:this.pathData=t.sent,this.pathData&&(this.fromLocation=!0,this.directionsView.setNewPath(this.pathData,!0),this.map.shouldRenderDirectionsSteps()&&(this._isMobileLayout()?this.stepsView.setNewPath(this.pathData,!1,this.map.mapData.floors):this.stepsView.setNewPath(this.pathData,!0,this.map.mapData.floors)),this.updateMapForPathLeg(this.pathData.legs[0]),this._updateContentView());case 7:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"_handleIntiateFindPath",value:(a=th(Xl().mark((function t(e){var n,r;return Xl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.startContentPlacementId,r=e.endContentPlacementId,t.next=3,this.map.findPath(n,r);case 3:this.pathData=t.sent,this.fromLocation=!1,this.directionsView.setNewPath(this.pathData),this.map.shouldRenderDirectionsSteps()&&(this._isMobileLayout()?this.stepsView.setNewPath(this.pathData,!1,this.map.mapData.floors):this.stepsView.setNewPath(this.pathData,!0,this.map.mapData.floors)),this.updateMapForPathLeg(this.pathData.legs[0]),this._updateContentView();case 9:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"_handleSelectDirectionsButton",value:function(t){t.placementId}},{key:"_handleSelectGpsCurrentLocation",value:(o=th(Xl().mark((function t(){return Xl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.endContentPlacement){t.next=3;break}return console.warn("⚠️ DirectionsControl: GPS cell selected but no end placement set"),t.abrupt("return");case 3:return t.next=5,this.map.useCurrentLocation(this.endContentPlacement.placement_id);case 5:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"_handleGpsFallback",value:function(t){var e=this,n=t.reason;this.gpsFallbackPopup||(this.gpsFallbackPopup=new Wl),this.gpsFallbackPopup.show(this.map,n,(function(){e.map.shouldShowGpsCell&&e.map.shouldShowGpsCell()?setTimeout((function(){return e.directionsView.focusStartInput()}),50):e.directionsView.disableGpsStartCell()}))}},{key:"_render",value:function(){}},{key:"_shouldShowQRCodeButton",value:function(){return"kiosk"===this.currentViewType&&!1!==this.map.options.showQRCodeInKioskMode&&!!this.pathData&&!!this.endContentPlacement}},{key:"_createQRCodeButton",value:function(){this.qrCodeButton=document.createElement("button"),this.qrCodeButton.className="qr-code-button";var t=document.createElement("div");t.className="qr-code-button-icon";var e=document.createElement("img");e.src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0ic2l6ZS02Ij4KICA8cGF0aCBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Ik0zLjc1IDQuODc1YzAtLjYyMS41MDQtMS4xMjUgMS4xMjUtMS4xMjVoNC41Yy42MjEgMCAxLjEyNS41MDQgMS4xMjUgMS4xMjV2NC41YzAgLjYyMS0uNTA0IDEuMTI1LTEuMTI1IDEuMTI1aC00LjVBMS4xMjUgMS4xMjUgMCAwIDEgMy43NSA5LjM3NXYtNC41Wk0zLjc1IDE0LjYyNWMwLS42MjEuNTA0LTEuMTI1IDEuMTI1LTEuMTI1aDQuNWMuNjIxIDAgMS4xMjUuNTA0IDEuMTI1IDEuMTI1djQuNWMwIC42MjEtLjUwNCAxLjEyNS0xLjEyNSAxLjEyNWgtNC41YTEuMTI1IDEuMTI1IDAgMCAxLTEuMTI1LTEuMTI1di00LjVaTTEzLjUgNC44NzVjMC0uNjIxLjUwNC0xLjEyNSAxLjEyNS0xLjEyNWg0LjVjLjYyMSAwIDEuMTI1LjUwNCAxLjEyNSAxLjEyNXY0LjVjMCAuNjIxLS41MDQgMS4xMjUtMS4xMjUgMS4xMjVoLTQuNUExLjEyNSAxLjEyNSAwIDAgMSAxMy41IDkuMzc1di00LjVaIiAvPgogIDxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTYuNzUgNi43NWguNzV2Ljc1aC0uNzV2LS43NVpNNi43NSAxNi41aC43NXYuNzVoLS43NXYtLjc1Wk0xNi41IDYuNzVoLjc1di43NWgtLjc1di0uNzVaTTEzLjUgMTMuNWguNzV2Ljc1aC0uNzV2LS43NVpNMTMuNSAxOS41aC43NXYuNzVoLS43NXYtLjc1Wk0xOS41IDEzLjVoLjc1di43NWgtLjc1di0uNzVaTTE5LjUgMTkuNWguNzV2Ljc1aC0uNzV2LS43NVpNMTYuNSAxNi41aC43NXYuNzVoLS43NXYtLjc1WiIgLz4KPC9zdmc+Cg==",e.alt="QR Code",t.appendChild(e);var n=document.createElement("div");n.className="qr-code-button-text",n.textContent="Continue on your phone ->",this.qrCodeButton.appendChild(t),this.qrCodeButton.appendChild(n),this.qrCodeButton.addEventListener("click",this._showQRCodeModal.bind(this))}},{key:"_generateQRCodeURL",value:function(){if(!this.map.mapData||!this.endContentPlacement)return null;var t,e=this.map.mapData.map_id,n=this.map.mapData.map_view_id,r=this.endContentPlacement.placement_id;if(this.fromLocation)t=this.map.location;else{if(!this.startContentPlacement)return null;t=this.startContentPlacement.placement_id}return"https://maps.waygomaps.com/".concat(e,"/").concat(n,"/directions/").concat(t,"/").concat(r)}},{key:"_showQRCodeModal",value:(i=th(Xl().mark((function t(){var e,n,r,i,o,a,u=this;return Xl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this._generateQRCodeURL()){t.next=4;break}return console.warn("⚠️ DirectionsControl: No URL generated for QR code"),t.abrupt("return");case 4:return(r=document.createElement("div")).className="qr-code-modal-card",(i=document.createElement("button")).className="qr-code-modal-close",(o=document.createElement("img")).src=Sr,o.alt="Close",i.appendChild(o),i.addEventListener("click",(function(){u.map.hideModal()})),r.appendChild(i),t.next=16,this.qrCodeView.updateQRCode(n,250);case 16:r.appendChild(this.qrCodeView.getElement()),this.map.showModal(r),(a=null===(e=this.map.modalContainer)||void 0===e?void 0:e.querySelector(".waygo-map-modal-content"))&&(a.style.backgroundColor="transparent",a.style.width="auto",a.style.height="auto",a.style.maxWidth="none",a.style.maxHeight="none");case 20:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})}],r&&eh(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o,a,u,s,c,l}(di);function ch(t){return ch="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},ch(t)}function lh(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,hh(r.key),r)}}function hh(t){var e=function(t){if("object"!=ch(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ch(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ch(e)?e:e+""}function fh(t,e,n){return e=yh(e),function(t,e){if(e&&("object"==ch(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,ph()?Reflect.construct(e,n||[],yh(t).constructor):e.apply(t,n))}function ph(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ph=function(){return!!t})()}function dh(){return dh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=yh(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},dh.apply(null,arguments)}function yh(t){return yh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yh(t)}function mh(t,e){return mh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mh(t,e)}const gh=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=fh(this,e,[n])).floorSelectorContainerName="floor-selector",t.floorSelector=new xi([],{container:"floor-selector",allowsToggle:!1}),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&&mh(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){this.map=t,this.container=document.createElement("div"),this.container.className="floor-selector-control-container";var e=this.floorSelector.getElement();return this.container.appendChild(e),this.initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=dh(yh(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.floorSelector.on("".concat(this.floorSelectorContainerName,":selectNew"),this._handleFloorSelectorSelect.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)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("load",this._handleMapLoad.bind(this)),this.map.on("floorChanged",this._handleFloorChange.bind(this))}},{key:"_handleMapLoad",value:function(t){var e=t.mapData.floors,n=[];e.forEach((function(t){n.push(t.indicator)})),n.length<2||(this.floorSelector.updateItems(n),this.floorSelector.selectButtonAtIndex(this.map.options.floor))}},{key:"_handleFloorChange",value:function(t){var e=t.floorIndex;this.floorSelector.getIndexOfSelectedButton()!==e&&this.floorSelector.selectButtonAtIndex(e)}},{key:"_renderDesktopView",value:function(){var t=this.floorSelector.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view"),this.map.mapContainer.offsetWidth,this.floorSelector.setViewForDesktop()}},{key:"_renderMobileView",value:function(){var t=this.floorSelector.getElement();this.container.appendChild(t),this.map.mapContainer.offsetWidth,this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view"),this.floorSelector.setViewForMobile()}},{key:"_handleDefaultState",value:function(){this.show()}},{key:"_handleSelectedContentState",value:function(t){this._isMobileLayout()?this.hide():this.show()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleFloorSelectorSelect",value:function(t){t.query;var e=t.index;e!==this.map.getCurrentFloor()&&this.map.updateFloor(e)}},{key:"_handleSearchState",value:function(t){t.query,t.results,this.show()}},{key:"_handleSetupState",value:function(){this.show()}}],r&&lh(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(di);function Dh(t){return Dh="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},Dh(t)}function vh(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,Mh(r.key),r)}}function Mh(t){var e=function(t){if("object"!=Dh(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Dh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Dh(e)?e:e+""}function bh(t,e,n){return e=Ch(e),function(t,e){if(e&&("object"==Dh(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,wh()?Reflect.construct(e,n||[],Ch(t).constructor):e.apply(t,n))}function wh(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(wh=function(){return!!t})()}function Eh(){return Eh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ch(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Eh.apply(null,arguments)}function Ch(t){return Ch=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ch(t)}function jh(t,e){return jh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jh(t,e)}const Ah=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=bh(this,e,[n])).stickyPanelView=new wu({stickyPoints:{collapsed:.15,mid:.45,full:.9},initialPoint:"mid",header:{title:"Test Panel",buttons:[{label:"✕",ariaLabel:"Collapse panel",onClick:function(){return t.stickyPanelView.snapTo("collapsed")}}]},content:t._buildTestContent()}),t.stickyPanelView.on("stickypointchange",(function(t){var e=t.stickyPoint,n=t.previousStickyPoint;console.log("🧲 StickyPanel: ".concat(n||"(none)"," → ").concat(e))})),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&&jh(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){return this.map=t,this.container=document.createElement("div"),this.container.className="test-panel-control-container",this._initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.container}},{key:"onRemove",value:function(){var t,n,r;this.stickyPanelView.destroy(),(t=e,n=this,r=Eh(Ch(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"_initializeEventListeners",value:function(){this.map.on("load",this._handleMapLoad.bind(this))}},{key:"_handleMapLoad",value:function(t){var e=t.mapData;null!=e&&e.map_name&&this.stickyPanelView.setTitle(e.map_name)}},{key:"_updateContentView",value:function(){this._clearViews(),this.currentViewType===qn?(this._renderMobileView(),this.show(),this.stickyPanelView.refreshLayout()):this.hide()}},{key:"_renderMobileView",value:function(){this.container.appendChild(this.stickyPanelView.getElement()),this.container.classList.add("mobile-view"),this.container.classList.remove("desktop-view"),this.stickyPanelView.show()}},{key:"_buildTestContent",value:function(){return this._buildLongTestContent()}},{key:"_buildShortTestContent",value:function(){var t=document.createElement("div");return t.className="test-panel-content",t.appendChild(this._makeParagraph("This is the SHORT test content view. It fits entirely inside the panel at the 'full' height, so it must never scroll — dragging it upward past 'full' should rubberband and spring back instead of scrolling.")),t.appendChild(this._makeParagraph("Drag the header or this text to move the panel between its collapsed, mid and full sticky points.")),t.appendChild(this._makeTestButton("Short content button")),t}},{key:"_buildLongTestContent",value:function(){var t=document.createElement("div");t.className="test-panel-content",t.appendChild(this._makeParagraph("This is the LONG test content view. It is far taller than the panel can show at the 'full' height, so dragging it upward first raises the panel to 'full' and then seamlessly continues as content scrolling — all in one gesture. Dragging downward scrolls back to the top first, then pulls the panel down.")),t.appendChild(this._makeTestButton("Long content button"));for(var e=1;e<=12;e++){var n=document.createElement("h4");n.className="test-panel-content-heading",n.textContent="Section ".concat(e),t.appendChild(n);var r=document.createElement("div");r.className="test-panel-content-figure",r.textContent="Figure ".concat(e),t.appendChild(r);for(var i=0;i<3;i++)t.appendChild(this._makeParagraph("Filler paragraph ".concat(i+1," of section ").concat(e,". The content of this text is ")+"irrelevant — it only exists to make this view long enough to need vertical scrolling inside the sticky panel."))}return t.appendChild(this._makeParagraph("THE END — the bottom of the content should stop exactly at the bottom of the map view.")),t}},{key:"_makeParagraph",value:function(t){var e=document.createElement("p");return e.className="test-panel-content-paragraph",e.textContent=t,e}},{key:"_makeTestButton",value:function(t){var e=document.createElement("button");return e.type="button",e.className="test-panel-content-button",e.textContent=t,e.addEventListener("click",(function(){console.log('🔘 StickyPanel test: "'.concat(t,'" clicked'))})),e}}],r&&vh(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(di);"undefined"!=typeof window&&(n.p=window.location.origin+"/");const Nh={MapView:Nr,SearchBox:li,SearchBoxControl:ji,CategoryBarControl:Qi,SearchResultsControl:aa,ContentSearchControl:_u,ContentPlacementControl:sc,ContentDetailsControl:Cc,InteractionControl:cl,SetupControl:Vc,DirectionsControl:sh,FloorSelectorControl:gh,TestPanelControl:Ah,StickyPanelView:wu,VIEW_TYPES:{DESKTOP:Wn,MOBILE:qn,KIOSK:Kn},KIOSK_REACH_BAND_INCHES:Xn,setApiKey:nn.setApiKey.bind(nn)}})(),r.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,(()=>(()=>{var t={526:(t,e)=>{"use strict";e.byteLength=function(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,o=u(t),a=o[0],s=o[1],c=new i(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),l=0,h=s>0?a-4:a;for(n=0;n<h;n+=4)e=r[t.charCodeAt(n)]<<18|r[t.charCodeAt(n+1)]<<12|r[t.charCodeAt(n+2)]<<6|r[t.charCodeAt(n+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===s&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,c[l++]=255&e),1===s&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],a=16383,u=0,c=r-i;u<c;u+=a)o.push(s(t,u,u+a>c?c:u+a));return 1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=o[a],r[o.charCodeAt(a)]=a;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function s(t,e,r){for(var i,o,a=[],u=e;u<r;u+=3)i=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(255&t[u+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},287:(t,e,n)=>{"use strict";const r=n(526),i=n(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=s,e.IS=50;const a=2147483647;function u(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,s.prototype),e}function s(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return c(t,e,n)}function c(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|y(t,e);let r=u(n);const i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(q(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(q(t,ArrayBuffer)||t&&q(t.buffer,ArrayBuffer))return p(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(q(t,SharedArrayBuffer)||t&&q(t.buffer,SharedArrayBuffer)))return p(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return s.from(r,e,n);const i=function(t){if(s.isBuffer(t)){const e=0|d(t.length),n=u(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||K(t.length)?u(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return l(t),u(t<0?0:0|d(t))}function f(t){const e=t.length<0?0:0|d(t.length),n=u(e);for(let r=0;r<e;r+=1)n[r]=255&t[r];return n}function p(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(r,s.prototype),r}function d(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function y(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Z(t).length;default:if(i)return r?-1:G(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,n);case"utf8":case"utf-8":return A(this,e,n);case"ascii":return S(this,e,n);case"latin1":case"binary":return I(this,e,n);case"base64":return j(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function D(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),K(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,i){let o,a=1,u=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,u/=2,s/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let r=-1;for(o=n;o<u;o++)if(c(t,o)===c(e,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===s)return r*a}else-1!==r&&(o-=o-r),r=-1}else for(n+s>u&&(n=u-s),o=n;o>=0;o--){let n=!0;for(let r=0;r<s;r++)if(c(t,o+r)!==c(e,r)){n=!1;break}if(n)return o}return-1}function M(t,e,n,r){n=Number(n)||0;const i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;const o=e.length;let a;for(r>o/2&&(r=o/2),a=0;a<r;++a){const r=parseInt(e.substr(2*a,2),16);if(K(r))return a;t[n+a]=r}return a}function b(t,e,n,r){return W(G(e,t.length-n),t,n,r)}function w(t,e,n,r){return W(function(t){const e=[];for(let n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function E(t,e,n,r){return W(Z(e),t,n,r)}function C(t,e,n,r){return W(function(t,e){let n,r,i;const o=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function j(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function A(t,e,n){n=Math.min(t.length,n);const r=[];let i=e;for(;i<n;){const e=t[i];let o=null,a=e>239?4:e>223?3:e>191?2:1;if(i+a<=n){let n,r,u,s;switch(a){case 1:e<128&&(o=e);break;case 2:n=t[i+1],128==(192&n)&&(s=(31&e)<<6|63&n,s>127&&(o=s));break;case 3:n=t[i+1],r=t[i+2],128==(192&n)&&128==(192&r)&&(s=(15&e)<<12|(63&n)<<6|63&r,s>2047&&(s<55296||s>57343)&&(o=s));break;case 4:n=t[i+1],r=t[i+2],u=t[i+3],128==(192&n)&&128==(192&r)&&128==(192&u)&&(s=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&u,s>65535&&s<1114112&&(o=s))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(t){const e=t.length;if(e<=N)return String.fromCharCode.apply(String,t);let n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=N));return n}(r)}s.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(t,e,n){return c(t,e,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(t,e,n){return function(t,e,n){return l(t),t<=0?u(t):void 0!==e?"string"==typeof n?u(t).fill(e,n):u(t).fill(e):u(t)}(t,e,n)},s.allocUnsafe=function(t){return h(t)},s.allocUnsafeSlow=function(t){return h(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(q(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),q(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,r=e.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);let n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;const r=s.allocUnsafe(e);let i=0;for(n=0;n<t.length;++n){let e=t[n];if(q(e,Uint8Array))i+e.length>r.length?(s.isBuffer(e)||(e=s.from(e)),e.copy(r,i)):Uint8Array.prototype.set.call(r,e,i);else{if(!s.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,i)}i+=e.length}return r},s.byteLength=y,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)g(this,e,e+1);return this},s.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},s.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},s.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?A(this,0,t):m.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){let t="";const n=e.IS;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},o&&(s.prototype[o]=s.prototype.inspect),s.prototype.compare=function(t,e,n,r,i){if(q(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;let o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0);const u=Math.min(o,a),c=this.slice(r,i),l=t.slice(e,n);for(let t=0;t<u;++t)if(c[t]!==l[t]){o=c[t],a=l[t];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},s.prototype.indexOf=function(t,e,n){return D(this,t,e,n,!0)},s.prototype.lastIndexOf=function(t,e,n){return D(this,t,e,n,!1)},s.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return M(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":case"latin1":case"binary":return w(this,t,e,n);case"base64":return E(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const N=4096;function S(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function I(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function T(t,e,n){const r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=e;r<n;++r)i+=J[t[r]];return i}function F(t,e,n){const r=t.slice(e,n);let i="";for(let t=0;t<r.length-1;t+=2)i+=String.fromCharCode(r[t]+256*r[t+1]);return i}function O(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function k(t,e,n,r,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function x(t,e,n,r,i){Q(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,n}function L(t,e,n,r,i){Q(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n+7]=o,o>>=8,t[n+6]=o,o>>=8,t[n+5]=o,o>>=8,t[n+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=a,a>>=8,t[n+2]=a,a>>=8,t[n+1]=a,a>>=8,t[n]=a,n+8}function _(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(t,e,n,r,o){return e=+e,n>>>=0,o||_(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function P(t,e,n,r,o){return e=+e,n>>>=0,o||_(t,0,n,8),i.write(t,e,n,r,52,8),n+8}s.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);const r=this.subarray(t,e);return Object.setPrototypeOf(r,s.prototype),r},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);let r=this[t],i=1,o=0;for(;++o<e&&(i*=256);)r+=this[t+o]*i;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);let r=this[t+--e],i=1;for(;e>0&&(i*=256);)r+=this[t+--e]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=X((function(t){Y(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),s.prototype.readBigUInt64BE=X((function(t){Y(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),s.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);let r=this[t],i=1,o=0;for(;++o<e&&(i*=256);)r+=this[t+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);let r=e,i=1,o=this[t+--r];for(;r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=X((function(t){Y(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),s.prototype.readBigInt64BE=X((function(t){Y(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+n)})),s.prototype.readFloatLE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||k(this,t,e,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||k(this,t,e,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigUInt64LE=X((function(t,e=0){return x(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=X((function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);k(this,t,e,n,r-1,-r)}let i=0,o=1,a=0;for(this[e]=255&t;++i<n&&(o*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);k(this,t,e,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigInt64LE=X((function(t,e=0){return x(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=X((function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(t,e,n){return z(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return z(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return P(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return P(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);const i=r-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e),i},s.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){const e=t.charCodeAt(0);("utf8"===r&&e<128||"latin1"===r)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;let i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{const o=s.isBuffer(t)?t:s.from(t,r),a=o.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<n-e;++i)this[i+e]=o[i%a]}return this};const B={};function U(t,e,n){B[t]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function R(t){let e="",n=t.length;const r="-"===t[0]?1:0;for(;n>=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function Q(t,e,n,r,i,o){if(t>n||t<e){const r="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${e}${r} and <= ${n}${r}`,new B.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,n){Y(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||V(e,t.length-(n+1))}(r,i,o)}function Y(t,e){if("number"!=typeof t)throw new B.ERR_INVALID_ARG_TYPE(e,"number",t)}function V(t,e,n){if(Math.floor(t)!==t)throw Y(t,n),new B.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(t,e,n){let r=`The value of "${t}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=R(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=R(i)),i+="n"),r+=` It must be ${e}. Received ${i}`,r}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function G(t,e){let n;e=e||1/0;const r=t.length;let i=null;const o=[];for(let a=0;a<r;++a){if(n=t.charCodeAt(a),n>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Z(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,n,r){let i;for(i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function K(t){return t!=t}const J=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)e[r+i]=t[n]+t[i]}return e}();function X(t){return"undefined"==typeof BigInt?$:t}function $(){throw new Error("BigInt not supported")}},320:t=>{"use strict";var e={single_source_shortest_paths:function(t,n,r){var i={},o={};o[n]=0;var a,u,s,c,l,h,f,p=e.PriorityQueue.make();for(p.push(n,0);!p.empty();)for(s in u=(a=p.pop()).value,c=a.cost,l=t[u]||{})l.hasOwnProperty(s)&&(h=c+l[s],f=o[s],(void 0===o[s]||f>h)&&(o[s]=h,p.push(s,h),i[s]=u));if(void 0!==r&&void 0===o[r]){var d=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(d)}return i},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,n,r){var i=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,i={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(i[n]=r[n]);return i.queue=[],i.sorter=t.sorter||r.default_sorter,i},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e},251:(t,e)=>{e.read=function(t,e,n,r,i){var o,a,u=8*i-r-1,s=(1<<u)-1,c=s>>1,l=-7,h=n?i-1:0,f=n?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=u;l>0;o=256*o+t[e+h],h+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===s)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=c}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,u,s,c=8*o-i-1,l=(1<<c)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),(e+=a+h>=1?f/s:f*Math.pow(2,1-h))*s>=2&&(a++,s/=2),a+h>=l?(u=0,a=l):a+h>=1?(u=(e*s-1)*Math.pow(2,i),a+=h):(u=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&u,p+=d,u/=256,i-=8);for(a=a<<i|u,c+=i;c>0;t[n+p]=255&a,p+=d,a/=256,c-=8);t[n+p-d]|=128*y}},975:(t,e,n)=>{"use strict";var r=n(606);function i(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function o(t,e){for(var n,r="",i=0,o=-1,a=0,u=0;u<=t.length;++u){if(u<t.length)n=t.charCodeAt(u);else{if(47===n)break;n=47}if(47===n){if(o===u-1||1===a);else if(o!==u-1&&2===a){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var s=r.lastIndexOf("/");if(s!==r.length-1){-1===s?(r="",i=0):i=(r=r.slice(0,s)).length-1-r.lastIndexOf("/"),o=u,a=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=u,a=0;continue}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+t.slice(o+1,u):r=t.slice(o+1,u),i=u-o-1;o=u,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var a={resolve:function(){for(var t,e="",n=!1,a=arguments.length-1;a>=-1&&!n;a--){var u;a>=0?u=arguments[a]:(void 0===t&&(t=r.cwd()),u=t),i(u),0!==u.length&&(e=u+"/"+e,n=47===u.charCodeAt(0))}return e=o(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(i(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=o(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return i(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];i(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":a.normalize(t)},relative:function(t,e){if(i(t),i(e),t===e)return"";if((t=a.resolve(t))===(e=a.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var r=t.length,o=r-n,u=1;u<e.length&&47===e.charCodeAt(u);++u);for(var s=e.length-u,c=o<s?o:s,l=-1,h=0;h<=c;++h){if(h===c){if(s>c){if(47===e.charCodeAt(u+h))return e.slice(u+h+1);if(0===h)return e.slice(u+h)}else o>c&&(47===t.charCodeAt(n+h)?l=h:0===h&&(l=0));break}var f=t.charCodeAt(n+h);if(f!==e.charCodeAt(u+h))break;47===f&&(l=h)}var p="";for(h=n+l+1;h<=r;++h)h!==r&&47!==t.charCodeAt(h)||(0===p.length?p+="..":p+="/..");return p.length>0?p+e.slice(u+l):(u+=l,47===e.charCodeAt(u)&&++u,e.slice(u))},_makeLong:function(t){return t},dirname:function(t){if(i(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,o=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!o){r=a;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"//":t.slice(0,r)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');i(t);var n,r=0,o=-1,a=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var u=e.length-1,s=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!a){r=n+1;break}}else-1===s&&(a=!1,s=n+1),u>=0&&(c===e.charCodeAt(u)?-1==--u&&(o=n):(u=-1,o=s))}return r===o?o=s:-1===o&&(o=t.length),t.slice(r,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){r=n+1;break}}else-1===o&&(a=!1,o=n+1);return-1===o?"":t.slice(r,o)},extname:function(t){i(t);for(var e=-1,n=0,r=-1,o=!0,a=0,u=t.length-1;u>=0;--u){var s=t.charCodeAt(u);if(47!==s)-1===r&&(o=!1,r=u+1),46===s?-1===e?e=u:1!==a&&(a=1):-1!==e&&(a=-1);else if(!o){n=u+1;break}}return-1===e||-1===r||0===a||1===a&&e===r-1&&e===n+1?"":t.slice(e,r)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+"/"+r:r}(0,t)},parse:function(t){i(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,r=t.charCodeAt(0),o=47===r;o?(e.root="/",n=1):n=0;for(var a=-1,u=0,s=-1,c=!0,l=t.length-1,h=0;l>=n;--l)if(47!==(r=t.charCodeAt(l)))-1===s&&(c=!1,s=l+1),46===r?-1===a?a=l:1!==h&&(h=1):-1!==a&&(h=-1);else if(!c){u=l+1;break}return-1===a||-1===s||0===h||1===h&&a===s-1&&a===u+1?-1!==s&&(e.base=e.name=0===u&&o?t.slice(1,s):t.slice(u,s)):(0===u&&o?(e.name=t.slice(1,a),e.base=t.slice(1,s)):(e.name=t.slice(u,a),e.base=t.slice(u,s)),e.ext=t.slice(a,s)),u>0?e.dir=t.slice(0,u-1):o&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,t.exports=a},606:t=>{var e,n,r=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var u,s=[],c=!1,l=-1;function h(){c&&u&&(c=!1,u.length?s=u.concat(s):l=-1,s.length&&f())}function f(){if(!c){var t=a(h);c=!0;for(var e=s.length;e;){for(u=s,s=[];++l<e;)u&&u[l].run();l=-1,e=s.length}u=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{return n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function d(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new p(t,e)),1!==s.length||c||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=d,r.addListener=d,r.once=d,r.off=d,r.removeListener=d,r.removeAllListeners=d,r.emit=d,r.prependListener=d,r.prependOnceListener=d,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},583:(t,e,n)=>{const r=n(333),i=n(157),o=n(280),a=n(375);function u(t,e,n,o,a){const u=[].slice.call(arguments,1),s=u.length,c="function"==typeof u[s-1];if(!c&&!r())throw new Error("Callback required as last argument");if(!c){if(s<1)throw new Error("Too few arguments provided");return 1===s?(n=e,e=o=void 0):2!==s||e.getContext||(o=n,n=e,e=void 0),new Promise((function(r,a){try{const a=i.create(n,o);r(t(a,e,o))}catch(t){a(t)}}))}if(s<2)throw new Error("Too few arguments provided");2===s?(a=n,n=e,e=o=void 0):3===s&&(e.getContext&&void 0===a?(a=o,o=void 0):(a=o,o=n,n=e,e=void 0));try{const r=i.create(n,o);a(null,t(r,e,o))}catch(t){a(t)}}e.create=i.create,e.toCanvas=u.bind(null,o.render),e.toDataURL=u.bind(null,o.renderToDataURL),e.toString=u.bind(null,(function(t,e,n){return a.render(t,n)}))},333:t=>{t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},421:(t,e,n)=>{const r=n(886).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];const e=Math.floor(t/7)+2,n=r(t),i=145===n?26:2*Math.ceil((n-13)/(2*e-2)),o=[n-7];for(let t=1;t<e-1;t++)o[t]=o[t-1]-i;return o.push(6),o.reverse()},e.getPositions=function(t){const n=[],r=e.getRowColCoords(t),i=r.length;for(let t=0;t<i;t++)for(let e=0;e<i;e++)0===t&&0===e||0===t&&e===i-1||t===i-1&&0===e||n.push([r[t],r[e]]);return n}},433:(t,e,n)=>{const r=n(208),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(t){this.mode=r.ALPHANUMERIC,this.data=t}o.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let n=45*i.indexOf(this.data[e]);n+=i.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(i.indexOf(this.data[e]),6)},t.exports=o},899:t=>{function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=e},820:t=>{function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}e.prototype.set=function(t,e,n,r){const i=t*this.size+e;this.data[i]=n,r&&(this.reservedBit[i]=!0)},e.prototype.get=function(t,e){return this.data[t*this.size+e]},e.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},e.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=e},822:(t,e,n)=>{const r=n(208);function i(t){this.mode=r.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}i.getBitsLength=function(t){return 8*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},t.exports=i},518:(t,e,n)=>{const r=n(953),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(t,e){switch(e){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case r.L:return o[4*(t-1)+0];case r.M:return o[4*(t-1)+1];case r.Q:return o[4*(t-1)+2];case r.H:return o[4*(t-1)+3];default:return}}},953:(t,e)=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return n}}},756:(t,e,n)=>{const r=n(886).getSymbolSize;e.getPositions=function(t){const e=r(t);return[[0,0],[e-7,0],[0,e-7]]}},565:(t,e,n)=>{const r=n(886),i=r.getBCHDigit(1335);e.getEncodedBits=function(t,e){const n=t.bit<<3|e;let o=n<<10;for(;r.getBCHDigit(o)-i>=0;)o^=1335<<r.getBCHDigit(o)-i;return 21522^(n<<10|o)}},731:(t,e)=>{const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let t=1;for(let e=0;e<255;e++)n[e]=t,r[t]=e,t<<=1,256&t&&(t^=285);for(let t=255;t<512;t++)n[t]=n[t-255]}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return r[t]},e.exp=function(t){return n[t]},e.mul=function(t,e){return 0===t||0===e?0:n[r[t]+r[e]]}},861:(t,e,n)=>{const r=n(208),i=n(886);function o(t){this.mode=r.KANJI,this.data=t}o.getBitsLength=function(t){return 13*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=i.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},t.exports=o},332:(t,e)=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const e=t.size;let n=0,r=0,i=0,o=null,a=null;for(let u=0;u<e;u++){r=i=0,o=a=null;for(let s=0;s<e;s++){let e=t.get(u,s);e===o?r++:(r>=5&&(n+=r-5+3),o=e,r=1),e=t.get(s,u),e===a?i++:(i>=5&&(n+=i-5+3),a=e,i=1)}r>=5&&(n+=r-5+3),i>=5&&(n+=i-5+3)}return n},e.getPenaltyN2=function(t){const e=t.size;let n=0;for(let r=0;r<e-1;r++)for(let i=0;i<e-1;i++){const e=t.get(r,i)+t.get(r,i+1)+t.get(r+1,i)+t.get(r+1,i+1);4!==e&&0!==e||n++}return 3*n},e.getPenaltyN3=function(t){const e=t.size;let n=0,r=0,i=0;for(let o=0;o<e;o++){r=i=0;for(let a=0;a<e;a++)r=r<<1&2047|t.get(o,a),a>=10&&(1488===r||93===r)&&n++,i=i<<1&2047|t.get(a,o),a>=10&&(1488===i||93===i)&&n++}return 40*n},e.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return 10*Math.abs(Math.ceil(100*e/n/5)-10)},e.applyMask=function(t,e){const r=e.size;for(let i=0;i<r;i++)for(let o=0;o<r;o++)e.isReserved(o,i)||e.xor(o,i,n(t,o,i))},e.getBestMask=function(t,n){const r=Object.keys(e.Patterns).length;let i=0,o=1/0;for(let a=0;a<r;a++){n(a),e.applyMask(a,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(a,t),r<o&&(o=r,i=a)}return i}},208:(t,e,n)=>{const r=n(878),i=n(44);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return i.testNumeric(t)?e.NUMERIC:i.testAlphanumeric(t)?e.ALPHANUMERIC:i.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return n}}},357:(t,e,n)=>{const r=n(208);function i(t){this.mode=r.NUMERIC,this.data=t.toString()}i.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const i=this.data.length-e;i>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*i+1))},t.exports=i},713:(t,e,n)=>{const r=n(731);e.mul=function(t,e){const n=new Uint8Array(t.length+e.length-1);for(let i=0;i<t.length;i++)for(let o=0;o<e.length;o++)n[i+o]^=r.mul(t[i],e[o]);return n},e.mod=function(t,e){let n=new Uint8Array(t);for(;n.length-e.length>=0;){const t=n[0];for(let i=0;i<e.length;i++)n[i]^=r.mul(e[i],t);let i=0;for(;i<n.length&&0===n[i];)i++;n=n.slice(i)}return n},e.generateECPolynomial=function(t){let n=new Uint8Array([1]);for(let i=0;i<t;i++)n=e.mul(n,new Uint8Array([1,r.exp(i)]));return n}},157:(t,e,n)=>{const r=n(886),i=n(953),o=n(899),a=n(820),u=n(421),s=n(756),c=n(332),l=n(518),h=n(764),f=n(427),p=n(565),d=n(208),y=n(801);function m(t,e,n){const r=t.size,i=p.getEncodedBits(e,n);let o,a;for(o=0;o<15;o++)a=1==(i>>o&1),o<6?t.set(o,8,a,!0):o<8?t.set(o+1,8,a,!0):t.set(r-15+o,8,a,!0),o<8?t.set(8,r-o-1,a,!0):o<9?t.set(8,15-o-1+1,a,!0):t.set(8,15-o-1,a,!0);t.set(r-8,8,1,!0)}function g(t,e,n,i){let p;if(Array.isArray(t))p=y.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let r=e;if(!r){const e=y.rawSplit(t);r=f.getBestVersionForData(e,n)}p=y.fromString(t,r||40)}}const g=f.getBestVersionForData(p,n);if(!g)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<g)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+g+".\n")}else e=g;const D=function(t,e,n){const i=new o;n.forEach((function(e){i.put(e.mode.bit,4),i.put(e.getLength(),d.getCharCountIndicator(e.mode,t)),e.write(i)}));const a=8*(r.getSymbolTotalCodewords(t)-l.getTotalCodewordsCount(t,e));for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const u=(a-i.getLengthInBits())/8;for(let t=0;t<u;t++)i.put(t%2?17:236,8);return function(t,e,n){const i=r.getSymbolTotalCodewords(e),o=i-l.getTotalCodewordsCount(e,n),a=l.getBlocksCount(e,n),u=a-i%a,s=Math.floor(i/a),c=Math.floor(o/a),f=c+1,p=s-c,d=new h(p);let y=0;const m=new Array(a),g=new Array(a);let D=0;const v=new Uint8Array(t.buffer);for(let t=0;t<a;t++){const e=t<u?c:f;m[t]=v.slice(y,y+e),g[t]=d.encode(m[t]),y+=e,D=Math.max(D,e)}const M=new Uint8Array(i);let b,w,E=0;for(b=0;b<D;b++)for(w=0;w<a;w++)b<m[w].length&&(M[E++]=m[w][b]);for(b=0;b<p;b++)for(w=0;w<a;w++)M[E++]=g[w][b];return M}(i,t,e)}(e,n,p),v=r.getSymbolSize(e),M=new a(v);return function(t,e){const n=t.size,r=s.getPositions(e);for(let e=0;e<r.length;e++){const i=r[e][0],o=r[e][1];for(let e=-1;e<=7;e++)if(!(i+e<=-1||n<=i+e))for(let r=-1;r<=7;r++)o+r<=-1||n<=o+r||(e>=0&&e<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===e||6===e)||e>=2&&e<=4&&r>=2&&r<=4?t.set(i+e,o+r,!0,!0):t.set(i+e,o+r,!1,!0))}}(M,e),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(M),function(t,e){const n=u.getPositions(e);for(let e=0;e<n.length;e++){const r=n[e][0],i=n[e][1];for(let e=-2;e<=2;e++)for(let n=-2;n<=2;n++)-2===e||2===e||-2===n||2===n||0===e&&0===n?t.set(r+e,i+n,!0,!0):t.set(r+e,i+n,!1,!0)}}(M,e),m(M,n,0),e>=7&&function(t,e){const n=t.size,r=f.getEncodedBits(e);let i,o,a;for(let e=0;e<18;e++)i=Math.floor(e/3),o=e%3+n-8-3,a=1==(r>>e&1),t.set(i,o,a,!0),t.set(o,i,a,!0)}(M,e),function(t,e){const n=t.size;let r=-1,i=n-1,o=7,a=0;for(let u=n-1;u>0;u-=2)for(6===u&&u--;;){for(let n=0;n<2;n++)if(!t.isReserved(i,u-n)){let r=!1;a<e.length&&(r=1==(e[a]>>>o&1)),t.set(i,u-n,r),o--,-1===o&&(a++,o=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}(M,D),isNaN(i)&&(i=c.getBestMask(M,m.bind(null,M,n))),c.applyMask(i,M),m(M,n,i),{modules:M,version:e,errorCorrectionLevel:n,maskPattern:i,segments:p}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");let n,o,a=i.M;return void 0!==e&&(a=i.from(e.errorCorrectionLevel,i.M),n=f.from(e.version),o=c.from(e.maskPattern),e.toSJISFunc&&r.setToSJISFunction(e.toSJISFunc)),g(t,n,a,o)}},764:(t,e,n)=>{const r=n(713);function i(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(t){this.degree=t,this.genPoly=r.generateECPolynomial(this.degree)},i.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(t.length+this.degree);e.set(t);const n=r.mod(e,this.genPoly),i=this.degree-n.length;if(i>0){const t=new Uint8Array(this.degree);return t.set(n,i),t}return n},t.exports=i},44:(t,e)=>{const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";e.KANJI=new RegExp(r,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(i,"g"),e.NUMERIC=new RegExp(n,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const o=new RegExp("^"+r+"$"),a=new RegExp("^"+n+"$"),u=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return o.test(t)},e.testNumeric=function(t){return a.test(t)},e.testAlphanumeric=function(t){return u.test(t)}},801:(t,e,n)=>{const r=n(208),i=n(357),o=n(433),a=n(822),u=n(861),s=n(44),c=n(886),l=n(320);function h(t){return unescape(encodeURIComponent(t)).length}function f(t,e,n){const r=[];let i;for(;null!==(i=t.exec(n));)r.push({data:i[0],index:i.index,mode:e,length:i[0].length});return r}function p(t){const e=f(s.NUMERIC,r.NUMERIC,t),n=f(s.ALPHANUMERIC,r.ALPHANUMERIC,t);let i,o;return c.isKanjiModeEnabled()?(i=f(s.BYTE,r.BYTE,t),o=f(s.KANJI,r.KANJI,t)):(i=f(s.BYTE_KANJI,r.BYTE,t),o=[]),e.concat(n,i,o).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function d(t,e){switch(e){case r.NUMERIC:return i.getBitsLength(t);case r.ALPHANUMERIC:return o.getBitsLength(t);case r.KANJI:return u.getBitsLength(t);case r.BYTE:return a.getBitsLength(t)}}function y(t,e){let n;const s=r.getBestModeForData(t);if(n=r.from(e,s),n!==r.BYTE&&n.bit<s.bit)throw new Error('"'+t+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(s));switch(n!==r.KANJI||c.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new i(t);case r.ALPHANUMERIC:return new o(t);case r.KANJI:return new u(t);case r.BYTE:return new a(t)}}e.fromArray=function(t){return t.reduce((function(t,e){return"string"==typeof e?t.push(y(e,null)):e.data&&t.push(y(e.data,e.mode)),t}),[])},e.fromString=function(t,n){const i=function(t){const e=[];for(let n=0;n<t.length;n++){const i=t[n];switch(i.mode){case r.NUMERIC:e.push([i,{data:i.data,mode:r.ALPHANUMERIC,length:i.length},{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.ALPHANUMERIC:e.push([i,{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.KANJI:e.push([i,{data:i.data,mode:r.BYTE,length:h(i.data)}]);break;case r.BYTE:e.push([{data:i.data,mode:r.BYTE,length:h(i.data)}])}}return e}(p(t,c.isKanjiModeEnabled())),o=function(t,e){const n={},i={start:{}};let o=["start"];for(let a=0;a<t.length;a++){const u=t[a],s=[];for(let t=0;t<u.length;t++){const c=u[t],l=""+a+t;s.push(l),n[l]={node:c,lastCount:0},i[l]={};for(let t=0;t<o.length;t++){const a=o[t];n[a]&&n[a].node.mode===c.mode?(i[a][l]=d(n[a].lastCount+c.length,c.mode)-d(n[a].lastCount,c.mode),n[a].lastCount+=c.length):(n[a]&&(n[a].lastCount=c.length),i[a][l]=d(c.length,c.mode)+4+r.getCharCountIndicator(c.mode,e))}}o=s}for(let t=0;t<o.length;t++)i[o[t]].end=0;return{map:i,table:n}}(i,n),a=l.find_path(o.map,"start","end"),u=[];for(let t=1;t<a.length-1;t++)u.push(o.table[a[t]].node);return e.fromArray(u.reduce((function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[]))},e.rawSplit=function(t){return e.fromArray(p(t,c.isKanjiModeEnabled()))}},886:(t,e)=>{let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return r[t]},e.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},e.isKanjiModeEnabled=function(){return void 0!==n},e.toSJIS=function(t){return n(t)}},878:(t,e)=>{e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},427:(t,e,n)=>{const r=n(886),i=n(518),o=n(953),a=n(208),u=n(878),s=r.getBCHDigit(7973);function c(t,e){return a.getCharCountIndicator(t,e)+4}function l(t,e){let n=0;return t.forEach((function(t){const r=c(t.mode,e);n+=r+t.getBitsLength()})),n}e.from=function(t,e){return u.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,n){if(!u.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);const o=8*(r.getSymbolTotalCodewords(t)-i.getTotalCodewordsCount(t,e));if(n===a.MIXED)return o;const s=o-c(n,t);switch(n){case a.NUMERIC:return Math.floor(s/10*3);case a.ALPHANUMERIC:return Math.floor(s/11*2);case a.KANJI:return Math.floor(s/13);case a.BYTE:default:return Math.floor(s/8)}},e.getBestVersionForData=function(t,n){let r;const i=o.from(n,o.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let r=1;r<=40;r++)if(l(t,r)<=e.getCapacity(r,n,a.MIXED))return r}(t,i);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}(r.mode,r.getLength(),i)},e.getEncodedBits=function(t){if(!u.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;r.getBCHDigit(e)-s>=0;)e^=7973<<r.getBCHDigit(e)-s;return t<<12|e}},280:(t,e,n)=>{const r=n(726);e.render=function(t,e,n){let i=n,o=e;void 0!==i||e&&e.getContext||(i=e,e=void 0),e||(o=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),i=r.getOptions(i);const a=r.getImageWidth(t.modules.size,i),u=o.getContext("2d"),s=u.createImageData(a,a);return r.qrToImageData(s.data,t,i),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(u,o,a),u.putImageData(s,0,0),o},e.renderToDataURL=function(t,n,r){let i=r;void 0!==i||n&&n.getContext||(i=n,n=void 0),i||(i={});const o=e.render(t,n,i),a=i.type||"image/png",u=i.rendererOpts||{};return o.toDataURL(a,u.quality)}},375:(t,e,n)=>{const r=n(726);function i(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function o(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}e.render=function(t,e,n){const a=r.getOptions(e),u=t.modules.size,s=t.modules.data,c=u+2*a.margin,l=a.color.light.a?"<path "+i(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",h="<path "+i(a.color.dark,"stroke")+' d="'+function(t,e,n){let r="",i=0,a=!1,u=0;for(let s=0;s<t.length;s++){const c=Math.floor(s%e),l=Math.floor(s/e);c||a||(a=!0),t[s]?(u++,s>0&&c>0&&t[s-1]||(r+=a?o("M",c+n,.5+l+n):o("m",i,0),i=0,a=!1),c+1<e&&t[s+1]||(r+=o("h",u),u=0)):i++}return r}(s,u,a.margin)+'"/>',f='viewBox="0 0 '+c+" "+c+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+f+' shape-rendering="crispEdges">'+l+h+"</svg>\n";return"function"==typeof n&&n(null,p),p}},726:(t,e)=>{function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});const e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,i=t.scale||4;return{width:r,scale:r?4:i,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){const r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){const i=n.modules.size,o=n.modules.data,a=e.getScale(i,r),u=Math.floor((i+2*r.margin)*a),s=r.margin*a,c=[r.color.light,r.color.dark];for(let e=0;e<u;e++)for(let n=0;n<u;n++){let l=4*(e*u+n),h=r.color.light;e>=s&&n>=s&&e<u-s&&n<u-s&&(h=c[o[Math.floor((e-s)/a)*i+Math.floor((n-s)/a)]?1:0]),t[l++]=h.r,t[l++]=h.g,t[l++]=h.b,t[l]=h.a}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!t||!/^http(s?):/.test(t));)t=r[i--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t})();var r={};return(()=>{"use strict";n.d(r,{default:()=>Nh});var t={};function e(t,e){return function(){return t.apply(e,arguments)}}n.r(t),n.d(t,{hasBrowserEnv:()=>dt,hasStandardBrowserEnv:()=>mt,hasStandardBrowserWebWorkerEnv:()=>gt,navigator:()=>yt,origin:()=>Dt});var i=n(606);const{toString:o}=Object.prototype,{getPrototypeOf:a}=Object,u=(s=Object.create(null),t=>{const e=o.call(t);return s[e]||(s[e]=e.slice(8,-1).toLowerCase())});var s;const c=t=>(t=t.toLowerCase(),e=>u(e)===t),l=t=>e=>typeof e===t,{isArray:h}=Array,f=l("undefined"),p=c("ArrayBuffer"),d=l("string"),y=l("function"),m=l("number"),g=t=>null!==t&&"object"==typeof t,D=t=>{if("object"!==u(t))return!1;const e=a(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},v=c("Date"),M=c("File"),b=c("Blob"),w=c("FileList"),E=c("URLSearchParams"),[C,j,A,N]=["ReadableStream","Request","Response","Headers"].map(c);function S(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,i;if("object"!=typeof t&&(t=[t]),h(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let a;for(r=0;r<o;r++)a=i[r],e.call(null,t[a],a,t)}}function I(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,i=n.length;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}const T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,F=t=>!f(t)&&t!==T,O=(k="undefined"!=typeof Uint8Array&&a(Uint8Array),t=>k&&t instanceof k);var k;const x=c("HTMLFormElement"),L=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),_=c("RegExp"),z=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};S(n,((n,i)=>{let o;!1!==(o=e(n,i,t))&&(r[i]=o||n)})),Object.defineProperties(t,r)},P="abcdefghijklmnopqrstuvwxyz",B="0123456789",U={DIGIT:B,ALPHA:P,ALPHA_DIGIT:P+P.toUpperCase()+B},R=c("AsyncFunction"),Q=(Y="function"==typeof setImmediate,V=y(T.postMessage),Y?setImmediate:V?(H=`axios@${Math.random()}`,G=[],T.addEventListener("message",(({source:t,data:e})=>{t===T&&e===H&&G.length&&G.shift()()}),!1),t=>{G.push(t),T.postMessage(H,"*")}):t=>setTimeout(t));var Y,V,H,G;const Z="undefined"!=typeof queueMicrotask?queueMicrotask.bind(T):void 0!==i&&i.nextTick||Q,W={isArray:h,isArrayBuffer:p,isBuffer:function(t){return null!==t&&!f(t)&&null!==t.constructor&&!f(t.constructor)&&y(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||y(t.append)&&("formdata"===(e=u(t))||"object"===e&&y(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&p(t.buffer),e},isString:d,isNumber:m,isBoolean:t=>!0===t||!1===t,isObject:g,isPlainObject:D,isReadableStream:C,isRequest:j,isResponse:A,isHeaders:N,isUndefined:f,isDate:v,isFile:M,isBlob:b,isRegExp:_,isFunction:y,isStream:t=>g(t)&&y(t.pipe),isURLSearchParams:E,isTypedArray:O,isFileList:w,forEach:S,merge:function t(){const{caseless:e}=F(this)&&this||{},n={},r=(r,i)=>{const o=e&&I(n,i)||i;D(n[o])&&D(r)?n[o]=t(n[o],r):D(r)?n[o]=t({},r):h(r)?n[o]=r.slice():n[o]=r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&S(arguments[t],r);return n},extend:(t,n,r,{allOwnKeys:i}={})=>(S(n,((n,i)=>{r&&y(n)?t[i]=e(n,r):t[i]=n}),{allOwnKeys:i}),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 i,o,u;const s={};if(e=e||{},null==t)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)u=i[o],r&&!r(u,t,e)||s[u]||(e[u]=t[u],s[u]=!0);t=!1!==n&&a(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:u,kindOfTest:c,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(h(t))return t;let e=t.length;if(!m(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:x,hasOwnProperty:L,hasOwnProp:L,reduceDescriptors:z,freezeMethods:t=>{z(t,((e,n)=>{if(y(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];y(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 h(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:I,global:T,isContextDefined:F,ALPHABET:U,generateString:(t=16,e=U.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&y(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(g(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const i=h(t)?[]:{};return S(t,((t,e)=>{const o=n(t,r+1);!f(o)&&(i[e]=o)})),e[r]=void 0,i}}return t};return n(t,0)},isAsyncFn:R,isThenable:t=>t&&(g(t)||y(t))&&y(t.then)&&y(t.catch),setImmediate:Q,asap:Z};function q(t,e,n,r,i){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),i&&(this.response=i,this.status=i.status?i.status:null)}W.inherits(q,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:W.toJSONObject(this.config),code:this.code,status:this.status}}});const K=q.prototype,J={};["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=>{J[t]={value:t}})),Object.defineProperties(q,J),Object.defineProperty(K,"isAxiosError",{value:!0}),q.from=(t,e,n,r,i,o)=>{const a=Object.create(K);return W.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),q.call(a,t.message,e,n,r,i),a.cause=t,a.name=t.name,o&&Object.assign(a,o),a};const X=q;var $=n(287).hp;function tt(t){return W.isPlainObject(t)||W.isArray(t)}function et(t){return W.endsWith(t,"[]")?t.slice(0,-2):t}function nt(t,e,n){return t?t.concat(e).map((function(t,e){return t=et(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const rt=W.toFlatObject(W,{},null,(function(t){return/^is[A-Z]/.test(t)})),it=function(t,e,n){if(!W.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!W.isUndefined(e[t])}))).metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,u=(n.Blob||"undefined"!=typeof Blob&&Blob)&&W.isSpecCompliantForm(e);if(!W.isFunction(i))throw new TypeError("visitor must be a function");function s(t){if(null===t)return"";if(W.isDate(t))return t.toISOString();if(!u&&W.isBlob(t))throw new X("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(t)||W.isTypedArray(t)?u&&"function"==typeof Blob?new Blob([t]):$.from(t):t}function c(t,n,i){let u=t;if(t&&!i&&"object"==typeof t)if(W.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(W.isArray(t)&&function(t){return W.isArray(t)&&!t.some(tt)}(t)||(W.isFileList(t)||W.endsWith(n,"[]"))&&(u=W.toArray(t)))return n=et(n),u.forEach((function(t,r){!W.isUndefined(t)&&null!==t&&e.append(!0===a?nt([n],r,o):null===a?n:n+"[]",s(t))})),!1;return!!tt(t)||(e.append(nt(i,n,o),s(t)),!1)}const l=[],h=Object.assign(rt,{defaultVisitor:c,convertValue:s,isVisitable:tt});if(!W.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!W.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),W.forEach(n,(function(n,o){!0===(!(W.isUndefined(n)||null===n)&&i.call(e,n,W.isString(o)?o.trim():o,r,h))&&t(n,r?r.concat(o):[o])})),l.pop()}}(t),e};function ot(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function at(t,e){this._pairs=[],t&&it(t,this,e)}const ut=at.prototype;ut.append=function(t,e){this._pairs.push([t,e])},ut.toString=function(t){const e=t?function(e){return t.call(this,e,ot)}:ot;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const st=at;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 lt(t,e,n){if(!e)return t;const r=n&&n.encode||ct,i=n&&n.serialize;let o;if(o=i?i(e,n):W.isURLSearchParams(e)?e.toString():new st(e,n).toString(r),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}const ht=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){W.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},ft={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},pt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:st,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},dt="undefined"!=typeof window&&"undefined"!=typeof document,yt="object"==typeof navigator&&navigator||void 0,mt=dt&&(!yt||["ReactNative","NativeScript","NS"].indexOf(yt.product)<0),gt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Dt=dt&&window.location.href||"http://localhost",vt={...t,...pt},Mt=function(t){function e(t,n,r,i){let o=t[i++];if("__proto__"===o)return!0;const a=Number.isFinite(+o),u=i>=t.length;return o=!o&&W.isArray(r)?r.length:o,u?(W.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a):(r[o]&&W.isObject(r[o])||(r[o]=[]),e(t,n,r[o],i)&&W.isArray(r[o])&&(r[o]=function(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}(r[o])),!a)}if(W.isFormData(t)&&W.isFunction(t.entries)){const n={};return W.forEachEntry(t,((t,r)=>{e(function(t){return W.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null},bt={transitional:ft,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,i=W.isObject(t);if(i&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return r?JSON.stringify(Mt(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t)||W.isReadableStream(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return it(t,new vt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return vt.isNode&&W.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=W.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return it(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),function(t){if(W.isString(t))try{return(0,JSON.parse)(t),W.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||bt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(W.isResponse(t)||W.isReadableStream(t))return t;if(t&&W.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 X.from(t,X.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}}};W.forEach(["delete","get","head","post","put","patch"],(t=>{bt.headers[t]={}}));const wt=bt,Et=W.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"]),Ct=Symbol("internals");function jt(t){return t&&String(t).trim().toLowerCase()}function At(t){return!1===t||null==t?t:W.isArray(t)?t.map(At):String(t)}function Nt(t,e,n,r,i){return W.isFunction(r)?r.call(this,e,n):(i&&(e=n),W.isString(e)?W.isString(r)?-1!==e.indexOf(r):W.isRegExp(r)?r.test(e):void 0:void 0)}class St{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function i(t,e,n){const i=jt(e);if(!i)throw new Error("header name must be a non-empty string");const o=W.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||e]=At(t))}const o=(t,e)=>W.forEach(t,((t,n)=>i(t,n,e)));if(W.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(W.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))o((t=>{const e={};let n,r,i;return t&&t.split("\n").forEach((function(t){i=t.indexOf(":"),n=t.substring(0,i).trim().toLowerCase(),r=t.substring(i+1).trim(),!n||e[n]&&Et[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(W.isHeaders(t))for(const[e,r]of t.entries())i(r,e,n);else null!=t&&i(e,t,n);return this}get(t,e){if(t=jt(t)){const n=W.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(W.isFunction(e))return e.call(this,t,n);if(W.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=jt(t)){const n=W.findKey(this,t);return!(!n||void 0===this[n]||e&&!Nt(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function i(t){if(t=jt(t)){const i=W.findKey(n,t);!i||e&&!Nt(0,n[i],i,e)||(delete n[i],r=!0)}}return W.isArray(t)?t.forEach(i):i(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const i=e[n];t&&!Nt(0,this[i],i,t,!0)||(delete this[i],r=!0)}return r}normalize(t){const e=this,n={};return W.forEach(this,((r,i)=>{const o=W.findKey(n,i);if(o)return e[o]=At(r),void delete e[i];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(i):String(i).trim();a!==i&&delete e[i],e[a]=At(r),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return W.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&W.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[Ct]=this[Ct]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=jt(t);e[r]||(function(t,e){const n=W.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,i){return this[r].call(this,e,t,n,i)},configurable:!0})}))}(n,t),e[r]=!0)}return W.isArray(t)?t.forEach(r):r(t),this}}St.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),W.reduceDescriptors(St.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),W.freezeMethods(St);const It=St;function Tt(t,e){const n=this||wt,r=e||n,i=It.from(r.headers);let o=r.data;return W.forEach(t,(function(t){o=t.call(n,o,i.normalize(),e?e.status:void 0)})),i.normalize(),o}function Ft(t){return!(!t||!t.__CANCEL__)}function Ot(t,e,n){X.call(this,null==t?"canceled":t,X.ERR_CANCELED,e,n),this.name="CanceledError"}W.inherits(Ot,X,{__CANCEL__:!0});const kt=Ot;function xt(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new X("Request failed with status code "+n.status,[X.ERR_BAD_REQUEST,X.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}const Lt=(t,e,n=3)=>{let r=0;const i=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i,o=0,a=0;return e=void 0!==e?e:1e3,function(u){const s=Date.now(),c=r[a];i||(i=s),n[o]=u,r[o]=s;let l=a,h=0;for(;l!==o;)h+=n[l++],l%=t;if(o=(o+1)%t,o===a&&(a=(a+1)%t),s-i<e)return;const f=c&&s-c;return f?Math.round(1e3*h/f):void 0}}(50,250);return function(t,e){let n,r,i=0,o=1e3/e;const a=(e,o=Date.now())=>{i=o,n=null,r&&(clearTimeout(r),r=null),t.apply(null,e)};return[(...t)=>{const e=Date.now(),u=e-i;u>=o?a(t,e):(n=t,r||(r=setTimeout((()=>{r=null,a(n)}),o-u)))},()=>n&&a(n)]}((n=>{const o=n.loaded,a=n.lengthComputable?n.total:void 0,u=o-r,s=i(u);r=o,t({loaded:o,total:a,progress:a?o/a:void 0,bytes:u,rate:s||void 0,estimated:s&&a&&o<=a?(a-o)/s:void 0,event:n,lengthComputable:null!=a,[e?"download":"upload"]:!0})}),n)},_t=(t,e)=>{const n=null!=t;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},zt=t=>(...e)=>W.asap((()=>t(...e))),Pt=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=W.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0},Bt=vt.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const a=[t+"="+encodeURIComponent(e)];W.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),W.isString(r)&&a.push("path="+r),W.isString(i)&&a.push("domain="+i),!0===o&&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 Ut(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 Rt=t=>t instanceof It?{...t}:t;function Qt(t,e){e=e||{};const n={};function r(t,e,n){return W.isPlainObject(t)&&W.isPlainObject(e)?W.merge.call({caseless:n},t,e):W.isPlainObject(e)?W.merge({},e):W.isArray(e)?e.slice():e}function i(t,e,n){return W.isUndefined(e)?W.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function o(t,e){if(!W.isUndefined(e))return r(void 0,e)}function a(t,e){return W.isUndefined(e)?W.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function u(n,i,o){return o in e?r(n,i):o in t?r(void 0,n):void 0}const s={url:o,method:o,data:o,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:u,headers:(t,e)=>i(Rt(t),Rt(e),!0)};return W.forEach(Object.keys(Object.assign({},t,e)),(function(r){const o=s[r]||i,a=o(t[r],e[r],r);W.isUndefined(a)&&o!==u||(n[r]=a)})),n}const Yt=t=>{const e=Qt({},t);let n,{data:r,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:a,headers:u,auth:s}=e;if(e.headers=u=It.from(u),e.url=lt(Ut(e.baseURL,e.url),t.params,t.paramsSerializer),s&&u.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),W.isFormData(r))if(vt.hasStandardBrowserEnv||vt.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(!1!==(n=u.getContentType())){const[t,...e]=n?n.split(";").map((t=>t.trim())).filter(Boolean):[];u.setContentType([t||"multipart/form-data",...e].join("; "))}if(vt.hasStandardBrowserEnv&&(i&&W.isFunction(i)&&(i=i(e)),i||!1!==i&&Pt(e.url))){const t=o&&a&&Bt.read(a);t&&u.set(o,t)}return e},Vt="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const r=Yt(t);let i=r.data;const o=It.from(r.headers).normalize();let a,u,s,c,l,{responseType:h,onUploadProgress:f,onDownloadProgress:p}=r;function d(){c&&c(),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=It.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());xt((function(t){e(t),d()}),(function(t){n(t),d()}),{data:h&&"text"!==h&&"json"!==h?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 X("Request aborted",X.ECONNABORTED,t,y)),y=null)},y.onerror=function(){n(new X("Network Error",X.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let e=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||ft;r.timeoutErrorMessage&&(e=r.timeoutErrorMessage),n(new X(e,i.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,t,y)),y=null},void 0===i&&o.setContentType(null),"setRequestHeader"in y&&W.forEach(o.toJSON(),(function(t,e){y.setRequestHeader(e,t)})),W.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),h&&"json"!==h&&(y.responseType=r.responseType),p&&([s,l]=Lt(p,!0),y.addEventListener("progress",s)),f&&y.upload&&([u,c]=Lt(f),y.upload.addEventListener("progress",u),y.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=e=>{y&&(n(!e||e.type?new kt(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 g=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(r.url);g&&-1===vt.protocols.indexOf(g)?n(new X("Unsupported protocol "+g+":",X.ERR_BAD_REQUEST,t)):y.send(i||null)}))},Ht=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,r=new AbortController;const i=function(t){if(!n){n=!0,a();const e=t instanceof Error?t:this.reason;r.abort(e instanceof X?e:new kt(e instanceof Error?e.message:e))}};let o=e&&setTimeout((()=>{o=null,i(new X(`timeout ${e} of ms exceeded`,X.ETIMEDOUT))}),e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(i):t.removeEventListener("abort",i)})),t=null)};t.forEach((t=>t.addEventListener("abort",i)));const{signal:u}=r;return u.unsubscribe=()=>W.asap(a),u}},Gt=function*(t,e){let n=t.byteLength;if(!e||n<e)return void(yield t);let r,i=0;for(;i<n;)r=i+e,yield t.slice(i,r),i=r},Zt=(t,e,n,r)=>{const i=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*Gt(n,e)}(t,e);let o,a=0,u=t=>{o||(o=!0,r&&r(t))};return new ReadableStream({async pull(t){try{const{done:e,value:r}=await i.next();if(e)return u(),void t.close();let o=r.byteLength;if(n){let t=a+=o;n(t)}t.enqueue(new Uint8Array(r))}catch(t){throw u(t),t}},cancel:t=>(u(t),i.return())},{highWaterMark:2})},Wt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,qt=Wt&&"function"==typeof ReadableStream,Kt=Wt&&("function"==typeof TextEncoder?(Jt=new TextEncoder,t=>Jt.encode(t)):async t=>new Uint8Array(await new Response(t).arrayBuffer()));var Jt;const Xt=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},$t=qt&&Xt((()=>{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})),te=qt&&Xt((()=>W.isReadableStream(new Response("").body))),ee={stream:te&&(t=>t.body)};var ne;Wt&&(ne=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!ee[t]&&(ee[t]=W.isFunction(ne[t])?e=>e[t]():(e,n)=>{throw new X(`Response type '${t}' is not supported`,X.ERR_NOT_SUPPORT,n)})})));const re={http:null,xhr:Vt,fetch:Wt&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:u,onUploadProgress:s,responseType:c,headers:l,withCredentials:h="same-origin",fetchOptions:f}=Yt(t);c=c?(c+"").toLowerCase():"text";let p,d=Ht([i,o&&o.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=W.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(W.isBlob(t))return t.size;if(W.isSpecCompliantForm(t)){const e=new Request(vt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return W.isArrayBufferView(t)||W.isArrayBuffer(t)?t.byteLength:(W.isURLSearchParams(t)&&(t+=""),W.isString(t)?(await Kt(t)).byteLength:void 0)})(e):n})(l,r))){let t,n=new Request(e,{method:"POST",body:r,duplex:"half"});if(W.isFormData(r)&&(t=n.headers.get("content-type"))&&l.setContentType(t),n.body){const[t,e]=_t(m,Lt(zt(s)));r=Zt(n.body,65536,t,e)}}W.isString(h)||(h=h?"include":"omit");const i="credentials"in Request.prototype;p=new Request(e,{...f,signal:d,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:i?h:void 0});let o=await fetch(p);const a=te&&("stream"===c||"response"===c);if(te&&(u||a&&y)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=o[e]}));const e=W.toFiniteNumber(o.headers.get("content-length")),[n,r]=u&&_t(e,Lt(zt(u),!0))||[];o=new Response(Zt(o.body,65536,n,(()=>{r&&r(),y&&y()})),t)}c=c||"text";let g=await ee[W.findKey(ee,c)||"text"](o,t);return!a&&y&&y(),await new Promise(((e,n)=>{xt(e,n,{data:g,headers:It.from(o.headers),status:o.status,statusText:o.statusText,config:t,request:p})}))}catch(e){if(y&&y(),e&&"TypeError"===e.name&&/fetch/i.test(e.message))throw Object.assign(new X("Network Error",X.ERR_NETWORK,t,p),{cause:e.cause||e});throw X.from(e,e&&e.code,t,p)}})};W.forEach(re,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const ie=t=>`- ${t}`,oe=t=>W.isFunction(t)||null===t||!1===t,ae=t=>{t=W.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let o=0;o<e;o++){let e;if(n=t[o],r=n,!oe(n)&&(r=re[(e=String(n)).toLowerCase()],void 0===r))throw new X(`Unknown adapter '${e}'`);if(r)break;i[e||"#"+o]=r}if(!r){const t=Object.entries(i).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(ie).join("\n"):" "+ie(t[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function ue(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new kt(null,t)}function se(t){return ue(t),t.headers=It.from(t.headers),t.data=Tt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ae(t.adapter||wt.adapter)(t).then((function(e){return ue(t),e.data=Tt.call(t,t.transformResponse,e),e.headers=It.from(e.headers),e}),(function(e){return Ft(e)||(ue(t),e&&e.response&&(e.response.data=Tt.call(t,t.transformResponse,e.response),e.response.headers=It.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 le={};ce.transitional=function(t,e,n){function r(t,e){return"[Axios v1.7.7] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,i,o)=>{if(!1===t)throw new X(r(i," has been removed"+(e?" in "+e:"")),X.ERR_DEPRECATED);return e&&!le[i]&&(le[i]=!0,console.warn(r(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,i,o)}};const he={assertOptions:function(t,e,n){if("object"!=typeof t)throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],a=e[o];if(a){const e=t[o],n=void 0===e||a(e,o,t);if(!0!==n)throw new X("option "+o+" must be "+n,X.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new X("Unknown option "+o,X.ERR_BAD_OPTION)}},validators:ce},fe=he.validators;class pe{constructor(t){this.defaults=t,this.interceptors={request:new ht,response:new ht}}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=Qt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:i}=e;void 0!==n&&he.assertOptions(n,{silentJSONParsing:fe.transitional(fe.boolean),forcedJSONParsing:fe.transitional(fe.boolean),clarifyTimeoutError:fe.transitional(fe.boolean)},!1),null!=r&&(W.isFunction(r)?e.paramsSerializer={serialize:r}:he.assertOptions(r,{encode:fe.function,serialize:fe.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&W.merge(i.common,i[e.method]);i&&W.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete i[t]})),e.headers=It.concat(o,i);const a=[];let u=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(u=u&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const s=[];let c;this.interceptors.response.forEach((function(t){s.push(t.fulfilled,t.rejected)}));let l,h=0;if(!u){const t=[se.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,s),l=t.length,c=Promise.resolve(e);h<l;)c=c.then(t[h++],t[h++]);return c}l=a.length;let f=e;for(h=0;h<l;){const t=a[h++],e=a[h++];try{f=t(f)}catch(t){e.call(this,t);break}}try{c=se.call(this,f)}catch(t){return Promise.reject(t)}for(h=0,l=s.length;h<l;)c=c.then(s[h++],s[h++]);return c}getUri(t){return lt(Ut((t=Qt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}W.forEach(["delete","get","head","options"],(function(t){pe.prototype[t]=function(e,n){return this.request(Qt(n||{},{method:t,url:e,data:(n||{}).data}))}})),W.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,i){return this.request(Qt(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}pe.prototype[t]=e(),pe.prototype[t+"Form"]=e(!0)}));const de=pe;class ye{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,i){n.reason||(n.reason=new kt(t,r,i),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 ye((function(e){t=e})),cancel:t}}}const me=ye,ge={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(ge).forEach((([t,e])=>{ge[e]=t}));const De=ge,ve=function t(n){const r=new de(n),i=e(de.prototype.request,r);return W.extend(i,de.prototype,r,{allOwnKeys:!0}),W.extend(i,r,null,{allOwnKeys:!0}),i.create=function(e){return t(Qt(n,e))},i}(wt);ve.Axios=de,ve.CanceledError=kt,ve.CancelToken=me,ve.isCancel=Ft,ve.VERSION="1.7.7",ve.toFormData=it,ve.AxiosError=X,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 W.isObject(t)&&!0===t.isAxiosError},ve.mergeConfig=Qt,ve.AxiosHeaders=It,ve.formToJSON=t=>Mt(W.isHTMLForm(t)?new FormData(t):t),ve.getAdapter=ae,ve.HttpStatusCode=De,ve.default=ve;const Me=ve;function be(t){return be="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},be(t)}function we(){we=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==be(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(be(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Ee(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function Ce(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Ee(o,r,i,a,u,"next",t)}function u(t){Ee(o,r,i,a,u,"throw",t)}a(void 0)}))}}function je(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,Ae(r.key),r)}}function Ae(t){var e=function(t){if("object"!=be(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==be(e)?e:e+""}var Ne=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=Me.create({baseURL:e}),this.client.interceptors.request.use((function(t){var e=nn.getApiKey(),n=nn.getAccountId();return e?(t.headers["Waygo-API-Key"]=e,n&&(t.headers["Waygo-Account"]=n),["post","put"].includes(t.method)?t.headers["Content-Type"]="application/json":delete t.headers["Content-Type"],t):(console.error("Must include API key using waygomaps.setApiKey('YOUR-API-KEY'):"),Promise.reject(new Error("API key is missing")))}))},e=[{key:"get",value:function(){var t=Ce(we().mark((function t(e){var n,r,i=arguments;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=i.length>1&&void 0!==i[1]?i[1]:{},t.prev=1,t.next=4,this.client.get(e,{params:n});case 4:return r=t.sent,t.abrupt("return",r.data);case 8:throw t.prev=8,t.t0=t.catch(1),new Error("GET ".concat(e," failed: ").concat(t.t0.message));case 11:case"end":return t.stop()}}),t,this,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()},{key:"post",value:(i=Ce(we().mark((function t(e,n){var r,i,o=arguments;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=o.length>2&&void 0!==o[2]?o[2]:{},t.prev=1,t.next=4,this.client.post(e,n,{params:r});case 4:return i=t.sent,t.abrupt("return",i.data);case 8:throw t.prev=8,t.t0=t.catch(1),new Error("POST ".concat(e," failed: ").concat(t.t0.message));case 11:case"end":return t.stop()}}),t,this,[[1,8]])}))),function(t,e){return i.apply(this,arguments)})},{key:"put",value:(r=Ce(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=Ce(we().mark((function t(e){var n,r,i=arguments;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=i.length>1&&void 0!==i[1]?i[1]:{},t.prev=1,t.next=4,this.client.delete(e,{params:n});case 4:return r=t.sent,t.abrupt("return",r.data);case 8:throw t.prev=8,t.t0=t.catch(1),new Error("DELETE ".concat(e," failed: ").concat(t.t0.message));case 11:case"end":return t.stop()}}),t,this,[[1,8]])}))),function(t){return n.apply(this,arguments)})}],e&&je(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,i}();const Se=Ne;function Ie(t){return Ie="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},Ie(t)}function Te(){Te=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==Ie(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(Ie(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Fe(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function Oe(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Fe(o,r,i,a,u,"next",t)}function u(t){Fe(o,r,i,a,u,"throw",t)}a(void 0)}))}}function ke(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,xe(r.key),r)}}function xe(t){var e=function(t){if("object"!=Ie(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ie(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ie(e)?e:e+""}var Le=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:"loadMapView",value:(r=Oe(Te().mark((function t(e){var n,r,i,o=arguments;return Te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:null,t.prev=1,r="/map-views/v1/".concat(e,"/load"),i=n?{map_view_id:n}:{},t.next=6,this.apiManager.get(r,i);case 6:return t.abrupt("return",t.sent);case 9:return t.prev=9,t.t0=t.catch(1),console.error("Error fetching map data:",t.t0),t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,this,[[1,9]])}))),function(t){return r.apply(this,arguments)})},{key:"loadMapViewSelectionState",value:(n=Oe(Te().mark((function t(e){var n,r,i,o,a,u=arguments;return Te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:null,r=u.length>2&&void 0!==u[2]?u[2]:null,i=u.length>3&&void 0!==u[3]?u[3]:null,t.prev=3,o="/map-views/v1/".concat(e,"/load/selection-state"),a={},n&&(a.map_view_id=n),null!==i&&(a.floor=i),t.next=10,this.apiManager.post(o,r,a);case 10:return t.abrupt("return",t.sent);case 13:return t.prev=13,t.t0=t.catch(3),console.error("Error loading map view selection state:",t.t0),t.abrupt("return",null);case 17:case"end":return t.stop()}}),t,this,[[3,13]])}))),function(t){return n.apply(this,arguments)})}],e&&ke(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}();const _e=Le;function ze(t){return ze="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},ze(t)}function Pe(){Pe=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==ze(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(ze(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Be(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function Ue(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Be(o,r,i,a,u,"next",t)}function u(t){Be(o,r,i,a,u,"throw",t)}a(void 0)}))}}function Re(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"!=ze(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ze(e)?e:e+""}var Ye=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=Ue(Pe().mark((function t(e,n,r){var i,o,a,u,s,c=arguments;return Pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=c.length>3&&void 0!==c[3]?c[3]:0,o=c.length>4&&void 0!==c[4]?c[4]:30,a=c.length>5&&void 0!==c[5]?c[5]:null,t.prev=4,u={q:r,skip:i,limit:o},console.log("params:",u),null!==a&&(u.floor=a),t.next=10,this.apiManager.get("/search/v1/".concat(e,"/").concat(n),u);case 10:return s=t.sent,t.abrupt("return",s);case 14:return t.prev=14,t.t0=t.catch(4),console.error("Error searching query:",t.t0),t.abrupt("return",null);case 18:case"end":return t.stop()}}),t,this,[[4,14]])}))),function(t,e,n){return r.apply(this,arguments)})},{key:"fetchContentPlacementDetails",value:(n=Ue(Pe().mark((function t(e){var n;return Pe().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));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&&Re(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}();const Ve=Ye;function He(t){return He="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},He(t)}function Ge(){Ge=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==He(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(He(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Ze(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function We(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Ze(o,r,i,a,u,"next",t)}function u(t){Ze(o,r,i,a,u,"throw",t)}a(void 0)}))}}function qe(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,Ke(r.key),r)}}function Ke(t){var e=function(t){if("object"!=He(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=He(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==He(e)?e:e+""}var Je=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:"findPath",value:(i=We(Ge().mark((function t(e,n,r){var i;return Ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i={start_placement_id:n,end_placement_id:r,map_id:e},t.next=4,this.apiManager.post("/routes/v1/path",i);case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error fetching path data:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e,n){return i.apply(this,arguments)})},{key:"findPathFromNodeToPlacement",value:(r=We(Ge().mark((function t(e,n,r){var i;return Ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i={start_node_id:n,end_placement_id:r,map_id:e},t.next=4,this.apiManager.post("/routes/v1/path/node_to_placement",i);case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error fetching path data:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e,n){return r.apply(this,arguments)})},{key:"findClosestNode",value:(n=We(Ge().mark((function t(e,n,r){var i;return Ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i={map_id:e,coordinate:n,floor_num:r},t.next=4,this.apiManager.post("/routes/v1/closest",i);case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(0),console.error("Error fetching node data:",t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e,r){return n.apply(this,arguments)})}],e&&qe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,i}();const Xe=Je;function $e(t){return $e="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},$e(t)}function tn(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,en(r.key),r)}}function en(t){var e=function(t){if("object"!=$e(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=$e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$e(e)?e:e+""}const nn=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.accountId=null,this.apiManager=new Se("https://api.waygomaps.com"),this.mapViewApi=new _e(this.apiManager),this.SearchApi=new Ve(this.apiManager),this.RoutesApi=new Xe(this.apiManager)},(e=[{key:"setApiKey",value:function(t){this.apiKey=t}},{key:"getApiKey",value:function(){return this.apiKey}},{key:"setAccountId",value:function(t){this.accountId=t}},{key:"getAccountId",value:function(){return this.accountId}},{key:"getMapViewApi",value:function(){return this.mapViewApi}},{key:"getSearchApi",value:function(){return this.SearchApi}},{key:"getRotuesApi",value:function(){return this.RoutesApi}}])&&tn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());function rn(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 on(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 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 un(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 sn(t,e,n){return(e=ln(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cn(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,ln(r.key),r)}}function ln(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 hn=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]:{};if(!this._listeners[t])return this;var n=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?un(Object(n),!0).forEach((function(e){sn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):un(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e);return n.hasOwnProperty("type")||(n.type=t),this._listeners[t].forEach((function(e,r){try{e(n)}catch(e){console.error(" ❌ Events: Error in listener ".concat(r+1," for event '").concat(t,"':"),e)}})),this}}],e&&cn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function fn(t){return fn="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},fn(t)}function pn(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,dn(r.key),r)}}function dn(t){var e=function(t){if("object"!=fn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=fn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fn(e)?e:e+""}function yn(t,e,n){return e=gn(e),function(t,e){if(e&&("object"==fn(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,mn()?Reflect.construct(e,n||[],gn(t).constructor):e.apply(t,n))}function mn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(mn=function(){return!!t})()}function gn(t){return gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},gn(t)}function Dn(t,e){return Dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Dn(t,e)}const vn=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),yn(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&&Dn(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&&pn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(hn));function Mn(t){return Mn="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},Mn(t)}function bn(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,wn(r.key),r)}}function wn(t){var e=function(t){if("object"!=Mn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Mn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Mn(e)?e:e+""}function En(t,e,n){return e=jn(e),function(t,e){if(e&&("object"==Mn(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,Cn()?Reflect.construct(e,n||[],jn(t).constructor):e.apply(t,n))}function Cn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Cn=function(){return!!t})()}function jn(t){return jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jn(t)}function An(t,e){return An=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},An(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=En(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&&An(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),vn.on(t,e)}},{key:"removeGlobalHandler",value:function(t,e){this.globalHandlers[t]&&(this.globalHandlers[t]=this.globalHandlers[t].filter((function(t){return t!==e})),vn.off(t,e))}},{key:"removeAllGlobalHandlers",value:function(){var t=this,e=function(e){t.globalHandlers[e].forEach((function(t){return vn.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=[]}}])&&bn(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(hn);function Sn(t){return Sn="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},Sn(t)}function In(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"!=Sn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Sn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Sn(e)?e:e+""}const Fn=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"],this.isLoading=!1,this.loadingType=null},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),this.mapView.fire("state:".concat(t),e)}},{key:"setLoading",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=(this.isLoading,this.loadingType);this.isLoading=t,this.loadingType=e,t?this.mapView.fire("loading:start",{type:e}):this.mapView.fire("loading:end",{type:e||n})}},{key:"getLoadingState",value:function(){return{isLoading:this.isLoading,loadingType:this.loadingType}}}],e&&In(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();var On=["outdoor-cities-demo","johnson-controls-roadshow-2026"];function kn(t){var e=t*Math.PI/180,n=6378137,r=(Math.pow(n,.5)-Math.pow(6356752.314,.5))/Math.pow(n,.5);return{meterToLat:1/(111132.954-559.822*Math.cos(2*e)+1.175*Math.cos(4*e)),meterToLon:1/(Math.PI*n*Math.cos(e)/(180*Math.pow(1-Math.pow(r,2)*Math.pow(Math.sin(e),2),.5)))}}function xn(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]);var r=t[0],i=t[1],o=e[0],a=e[1],u=kn(a);return{lat:a+i*n*u.meterToLat,lon:o+r*n*u.meterToLon}}function Ln(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]);var r=[];return t.forEach((function(t){var i=xn(t,e,n),o=i.lat,a=i.lon;r.push([a,o])})),r}function _n(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]);var r=e[0],i=e[1],o=t[0],a=t[1],u=kn(i),s=u.meterToLat,c=u.meterToLon,l=(a-i)/n/s;return[Number(((o-r)/n/c).toFixed(2)),Number(l.toFixed(2))]}function zn(t){return zn="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},zn(t)}function Pn(){Pn=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==zn(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(zn(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Bn(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}var Un=null;function Rn(){return"undefined"!=typeof navigator&&void 0!==navigator.geolocation&&"function"==typeof navigator.geolocation.getCurrentPosition}function Qn(){return Yn.apply(this,arguments)}function Yn(){var t;return t=Pn().mark((function t(){var e;return Pn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Rn()){t.next=2;break}return t.abrupt("return","unsupported");case 2:if(void 0!==navigator.permissions&&"function"==typeof navigator.permissions.query){t.next=4;break}return t.abrupt("return","prompt");case 4:return t.prev=4,t.next=7,navigator.permissions.query({name:"geolocation"});case 7:return e=t.sent,t.abrupt("return",e.state);case 11:return t.prev=11,t.t0=t.catch(4),t.abrupt("return","prompt");case 14:case"end":return t.stop()}}),t,null,[[4,11]])})),Yn=function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Bn(o,r,i,a,u,"next",t)}function u(t){Bn(o,r,i,a,u,"throw",t)}a(void 0)}))},Yn.apply(this,arguments)}function Vn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.enableHighAccuracy,n=void 0===e||e,r=t.timeout,i=void 0===r?1e4:r,o=t.maximumAge,a=void 0===o?3e4:o;return new Promise((function(t,e){if(Rn()){var r=Un?Date.now()-Un.timestamp>3e4?(Un=null,null):Un:null;r?t(r):navigator.geolocation.getCurrentPosition((function(e){var n={coordinate:[e.coords.longitude,e.coords.latitude],accuracy:e.coords.accuracy,timestamp:Date.now()};Un=n,t(n)}),(function(t){var n;switch(t.code){case 1:n="DENIED";break;case 2:default:n="UNAVAILABLE";break;case 3:n="TIMEOUT"}e({code:n,message:t.message})}),{enableHighAccuracy:n,timeout:i,maximumAge:a})}else e({code:"UNAVAILABLE",message:"Geolocation is not supported by this browser."})}))}function Hn(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 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)}var Zn,Wn="desktop",qn="mobile",Kn="kiosk",Jn=[Wn,qn,Kn],Xn={min:15,max:48},$n=["bottomEdgeHeightInches","screenHeightInches","screenWidthInches","pixelsPerInch"];function tr(t){return"number"==typeof t&&Number.isFinite(t)&&t>0}function er(t){return"string"==typeof t&&""!==t.trim()}function nr(t){return null!==t&&"object"===Gn(t)&&!Array.isArray(t)}function rr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],n=null!=t.viewType?t.viewType:null,r=null!=t.viewTypeData?t.viewTypeData:null,i=null;null!=t.location&&(er(t.location)?i=t.location:e.push("`location` must be a non-empty string; ignoring it."));var o=null;if(null!==n){var a="string"==typeof n?n.trim().toLowerCase():null;a&&Jn.includes(a)?o=a:e.push('Invalid viewType "'.concat(n,'". Expected one of: ').concat(Jn.join(", "),". Falling back to automatic desktop/mobile detection."))}var u=null;null!==r&&(nr(r)?u=r:e.push("viewTypeData must be an object; ignoring it."));var s=!1;null===o&&null!==i&&(o=Kn,s=!0,e.push("`location` was set without a viewType — enabling kiosk mode for backwards compatibility. Prefer viewType: 'kiosk' with viewTypeData: { location } going forward.")),null===o&&null!==u&&(e.push("viewTypeData was provided without a viewType (and no legacy `location`); ignoring it and detecting desktop/mobile from the map width."),u=null);var c,l=i,h=null;if(o===Kn){var f=null;u&&null!=u.location&&(er(u.location)?f=u.location:e.push("viewTypeData.location must be a non-empty string; ignoring it.")),null!==f&&null!==i&&f!==i&&e.push("Both viewTypeData.location and the legacy `location` option were set; using viewTypeData.location."),l=null!==f?f:i;var p=function(t){var e=[];if(null==t)return{mount:null,warnings:e};if(!nr(t))return e.push("viewTypeData.mount must be an object; ignoring it."),{mount:null,warnings:e};var n={bottomEdgeHeightInches:null,screenHeightInches:null,screenWidthInches:null,pixelsPerInch:null};$n.forEach((function(r){null!=t[r]&&(tr(t[r])?n[r]=t[r]:e.push("viewTypeData.mount.".concat(r," must be a positive, finite number; ignoring it.")))}));var r=Object.keys(t).filter((function(t){return!$n.includes(t)}));return r.length>0&&e.push("viewTypeData.mount has unrecognized properties (".concat(r.join(", "),"); expected ").concat($n.join(", "),".")),$n.some((function(t){return null!==n[t]}))?((null===n.bottomEdgeHeightInches||null===n.screenHeightInches&&null===n.pixelsPerInch)&&e.push('Kiosk mount data needs bottomEdgeHeightInches plus screenHeightInches (or pixelsPerInch) to place the 15–48" reach band; the conservative default layout will be used until both are provided.'),{mount:n,warnings:e}):(e.push("viewTypeData.mount contained no usable measurements; ignoring it."),{mount:null,warnings:e})}(u?u.mount:null),d=p.mount,y=p.warnings;e.push.apply(e,function(t){if(Array.isArray(t))return Hn(t)}(c=y)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(c)||function(t,e){if(t){if("string"==typeof t)return Hn(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)?Hn(t,e):void 0}}(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),null===l&&e.push('Kiosk view type enabled without a `location` node id — "directions from here" and the QR hand-off need a fixed kiosk position.'),u&&null!=u.mount||e.push('Kiosk view type enabled without mount data (viewTypeData.mount) — the 15–48" reach band cannot be computed, so the conservative default layout will be used. Provide it for accessibility-compliant installs.'),h={location:l,mount:d}}else null!==o&&(null!==i&&e.push("viewType '".concat(o,"' was explicitly set, so the legacy `location` option no longer enables kiosk mode; it is kept only as the fixed directions start point.")),null!==u&&e.push("viewType '".concat(o,"' does not take any viewTypeData today; it is stored but unused.")));return{viewType:o,viewTypeData:u,location:l,kioskConfig:h,legacyKiosk:s,warnings:e}}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 or(t,e){if(t){if("string"==typeof t)return ar(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)?ar(t,e):void 0}}function ar(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 ur(){ur=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==ir(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(ir(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function sr(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function cr(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){sr(o,r,i,a,u,"next",t)}function u(t){sr(o,r,i,a,u,"throw",t)}a(void 0)}))}}function lr(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 hr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?lr(Object(n),!0).forEach((function(e){gr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function fr(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,Dr(r.key),r)}}function pr(t,e,n){return e=yr(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,dr()?Reflect.construct(e,n||[],yr(t).constructor):e.apply(t,n))}function dr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(dr=function(){return!!t})()}function yr(t){return yr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yr(t)}function mr(t,e){return mr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mr(t,e)}function gr(t,e,n){return(e=Dr(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Dr(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+""}var vr={default:"3.5.1","johnson-controls-roadshow-2026":"3.17.0","usbank-del-coronado-2026":"3.17.0","toronto-fifa-world-cup-26":"3.17.0"},Mr={"johnson-controls-roadshow-2026":{text:"Find out more",key:"Registration"}},br=["johnson-controls-roadshow-2026"],wr=["johnson-controls-roadshow-2026"],Er=["usbank-del-coronado-2026","toronto-fifa-world-cup-26"],Cr=["usbank-del-coronado-2026"];function jr(t){var e=vr[t]||vr.default;return{css:"https://api.mapbox.com/mapbox-gl-js/v".concat(e,"/mapbox-gl.css"),js:"https://api.mapbox.com/mapbox-gl-js/v".concat(e,"/mapbox-gl.js")}}var Ar=(gr(gr(gr(gr(gr(gr(gr(gr(gr(gr(Zn={container:"map",sourceId:"2024.2xw_YUXYS8GoDTB2AQgN3A",center:[0,0],floor:0,zoom:13,bearing:0,pitch:22},"bearing",0),"minPitch",0),"maxPitch",60),"minZoom",0),"maxZoom",19.5),"bounds",null),"doubleClickZoom",!0),"dragPan",!0),"dragRotate",!0),"scrollZoom",!0),gr(gr(gr(gr(gr(gr(gr(gr(gr(gr(Zn,"touchPitch",!0),"touchZoomRotate",!0),"interactive",!0),"trackResize",!0),"keyboard",!0),"defaultControls",!1),"setup",!1),"selectionCriteria",null),"initialState","default"),"initialStateData",null),gr(gr(gr(gr(Zn,"viewType",null),"viewTypeData",null),"location",null),"showQRCodeInKioskMode",!0)),Nr=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=pr(this,e,[hr(hr({},Ar),n)])).mapViewApi=nn.getMapViewApi(),t.searchApi=nn.getSearchApi(),t.routesApi=nn.getRotuesApi(),t.mapContainer=document.createElement("div"),t.mapContainer.className="inner-map-container waygo-maps-root",t._userProvidedCenter=Object.prototype.hasOwnProperty.call(n,"center"),t._userProvidedFloor=Object.prototype.hasOwnProperty.call(n,"floor"),t.initialState=n.initialState||"default",t.initialStateData=n.initialStateData||null,t._applyViewTypeConfig(rr({viewType:t.options.viewType,viewTypeData:t.options.viewTypeData,location:t.options.location})),"selection"===t.initialState&&(t._createSelectionLoadingOverlay(),t._showSelectionLoadingOverlay()),t._currentFloorIndex=t.options.floor,t._defaultFloorIndex=t.options.floor||0,t._defaultZoom=t.options.zoom||13,t._defaultBearing=t.options.bearing||0,t._defaultPitch=t.options.pitch||0,t.ready=t._initialize(n),t.initialLoad=!1,t.originalFilters={},t.mapData=null,t._stateCoordinator=new Fn(t),t.defaultControls=n.defaultControls,t.setupControl=null,t.modalContainer=null,t.selectionCriteria=n.selectionCriteria||null,t.multiSelect=!0,t.confirmedSelection=null,t.kioskResetTimer=null,t.kioskCountdownInterval=null,t._kioskResetListenersAttached=!1,t.gpsEnabled=!1,t.gpsPermissionState="prompt",t._mobileScrollLockCount=0,t.viewType===Kn?t._initializeKioskReset():console.log("📍 Not in kiosk mode - no auto-reset timer"),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&&mr(t,e)}(e,t),n=e,r=[{key:"_applyViewTypeConfig",value:function(t){t.warnings.forEach((function(t){return console.warn("⚠️ MapView: ".concat(t))})),this.viewType=t.viewType,this.viewTypeData=t.viewTypeData,this.location=t.location,this.kioskConfig=t.kioskConfig}},{key:"getViewType",value:function(){return this.viewType}},{key:"isKioskMode",get:function(){return this.viewType===Kn}},{key:"setViewType",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n="string"==typeof t?t.trim().toLowerCase():null;if(!Jn.includes(n))return console.warn("⚠️ MapView: setViewType expects one of: ".concat(Jn.join(", "),' — received "').concat(t,'". View type unchanged.')),!1;var r=this.viewType;return this._applyViewTypeConfig(rr({viewType:n,viewTypeData:e,location:this.location})),this.viewType===Kn?this._initializeKioskReset():this._destroyKioskTimer(),this._initializeGps(),this.fire("viewTypeChanged",{viewType:this.viewType,previousViewType:r,viewTypeData:this.viewTypeData}),!0}},{key:"getKioskReachBand",value:function(){if(this.viewType!==Kn||!this.kioskConfig||!this.kioskConfig.mount)return null;var t=this.mapContainer?this.mapContainer.offsetHeight:0;return function(t,e){if(!nr(t)||!tr(e))return null;var n=t.bottomEdgeHeightInches,r=t.screenHeightInches,i=t.pixelsPerInch;if(!tr(n))return null;var o=tr(i)?i:tr(r)?e/r:null;if(!tr(o))return null;var a=n+(tr(r)?r:e/o),u=function(t){return(a-t)*o},s=function(t){return Math.min(Math.max(t,0),e)},c=s(u(Xn.max)),l=s(u(Xn.min));return{topPx:c,bottomPx:l,heightPx:Math.max(0,l-c),pixelsPerInch:o,isOnScreen:l>c}}(this.kioskConfig.mount,t)}},{key:"showModal",value:function(t){var e=this;this.modalContainer||(this.modalContainer=document.createElement("div"),this.modalContainer.className="waygo-map-modal-container",this.mapContainer.appendChild(this.modalContainer),this.modalContainer.addEventListener("click",(function(t){t.target===e.modalContainer&&e.hideModal()})));var n=document.createElement("div");n.className="waygo-map-modal-content","string"==typeof t?n.innerHTML=t:n.appendChild(t),this.modalContainer.innerHTML="",this.modalContainer.appendChild(n),this.modalContainer.style.display="flex"}},{key:"hideModal",value:function(){this.modalContainer&&(this.modalContainer.style.display="none")}},{key:"_initialize",value:(D=cr(ur().mark((function t(){var e,n,r=this;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e=this.options.sourceId.split(".")[0],t.next=4,this._loadMapLibraries(e);case 4:return mapboxgl.clearStorage(),this.render(),t.next=8,this._initializeMapData();case 8:if(this.mapData){t.next=11;break}return console.error("Error initializing map data."),t.abrupt("return");case 11:this._applyMapDataDefaults(),n=this.mapData.style_id,this.mapData.map_id,"undefined"!=typeof mapboxgl&&n?(mapboxgl.accessToken="pk.eyJ1Ijoid2F5Z28tbWFwcyIsImEiOiJjbGtxYzZ1N3QxdG43M210bXFuYmJ4a3gxIn0.tlbznj_fRJ8La6s2UUMO6A",this.map=new mapboxgl.Map({container:this.mapContainer,style:"mapbox://styles/waygo-maps/".concat(n),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("styledata",(function(){r.initialLoad||(r._initializeOriginalFilters(),r.updateFloor(r.options.floor,!1),r.initialLoad=!0)})),this.map.on("style.load",(function(){console.log(mapboxgl.version)})),this.map.on("load",(function(){r.defaultControls&&(r._addLogoImage(),r._addDefaultControls(),r.updateFloor(r.options.floor,!1)),r._initializeState(),r.fire("load",{mapData:r.mapData})})),this._initializeEventListeners()):console.error("Mapbox GL JS is not loaded."),t.next=20;break;case 17:t.prev=17,t.t0=t.catch(0),console.error("Failed to initialize the map:",t.t0);case 20:case"end":return t.stop()}}),t,this,[[0,17]])}))),function(){return D.apply(this,arguments)})},{key:"_addLogoImage",value:function(){if("johnson-controls-roadshow-2026"!==this.mapData.map_id){var t=document.createElement("div");t.className="logo-image-container";var e=document.createElement("img");e.className="logo-outline-element",e.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAxMCIgaGVpZ2h0PSI5NjQiIHZpZXdCb3g9IjAgMCA0MDEwIDk2NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02NTAuNzI2IDI0My40ODRDNTkzLjUyNyAyMTIuNzQ1IDU3My4wOTIgMjA5LjE4MiA1NjEuNjI3IDIwOS4xNzRDNTQ5LjYxMiAyMDkuMTY2IDUyNy42ODEgMjEzLjA2NiA0NjQuOTU0IDI0Ny4wMkwyMDkuMTkxIDQxOC4wOTNMMjA5LjE5MSA3MDIuMzkx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I3IDM0ODcuNjkgMzcwLjk4OCAzNDg3LjY5IDQ5NS44ODhDMzQ4Ny42OSA2MTkuOTUgMzU4Ni41NCA3MTYuMzQ5IDM3MDguODQgNzE2LjM0OVpNMzcwOC44NCA2MjguMzMyQzM2MzUuMTIgNjI4LjMzMiAzNTc4LjE2IDU3Mi4xNjkgMzU3OC4xNiA0OTUuODg4QzM1NzguMTYgNDE5LjYwNiAzNjM1LjEyIDM2My40NDMgMzcwOC44NCAzNjMuNDQzQzM3ODIuNTYgMzYzLjQ0MyAzODM5LjUzIDQxOS42MDYgMzgzOS41MyA0OTUuODg4QzM4MzkuNTMgNTcyLjE2OSAzNzgyLjU2IDYyOC4zMzIgMzcwOC44NCA2MjguMzMyWiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",n.alt="Clickable image",t.appendChild(n),t.addEventListener("click",(function(){window.open("https://waygomaps.com","_blank")})),this.mapContainer.appendChild(t)}}},{key:"getCurrentFloor",value:function(){return this._currentFloorIndex}},{key:"_addDefaultControls",value:function(){var t=this;("selection"===this._stateCoordinator.state?[new Nh.FloorSelectorControl,new Nh.ContentPlacementControl,new Nh.InteractionControl]:[new Nh.SearchBoxControl,new Nh.FloorSelectorControl,new Nh.CategoryBarControl,new Nh.ContentSearchControl,new Nh.ContentDetailsControl,new Nh.DirectionsControl,new Nh.InteractionControl]).forEach((function(e){return t.addControl(e)}))}},{key:"_initializeOriginalFilters",value:function(){var t=this;this.map.getStyle().layers.forEach((function(e){"background"!==e.type&&"raster"!==e.type&&"heatmap"!==e.type&&(t.originalFilters[e.id]=t.map.getFilter(e.id)||null)}))}},{key:"_initializeEventListeners",value:function(){var t=this,e={passive:!0};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})}),e),this.mapContainer.addEventListener("touchend",(function(e){return t.fire("touchend",{originalEvent:e})}),e),this.mapContainer.addEventListener("touchmove",(function(e){return t.fire("touchmove",{originalEvent:e})}),e),this.mapContainer.addEventListener("touchcancel",(function(e){return t.fire("touchcancel",{originalEvent:e})}),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})}))})),this.on("selection:confirmed",(function(e){t.confirmedSelection=e.feature}))}},{key:"_applyMapDataDefaults",value:function(){if(this.mapData){var t=this.mapData,e=t.reference_coordinate,n=t.default_floor;!this._userProvidedCenter&&function(t){if(!Array.isArray(t)||t.length<2)return!1;var e=Number(t[0]),n=Number(t[1]);return!Number.isNaN(e)&&!Number.isNaN(n)&&!function(t){return!(!Array.isArray(t)||t.length<2)&&0===Number(t[0])&&0===Number(t[1])}(t)}(e)&&(this.options.center=e),this._userProvidedFloor||null==n||(this.options.floor=n,this._currentFloorIndex=n,this._defaultFloorIndex=n)}}},{key:"_initializeMapData",value:(g=cr(ur().mark((function t(){var e,n,r,i;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((e=this.options.sourceId.split(".")).length<1||e.length>2)){t.next=4;break}return console.error('The sourceId format is incorrect. It should be in the format "mapId" or "mapId.mapViewId".'),t.abrupt("return");case 4:return n=e[0],r=e[1],t.prev=6,t.next=9,this.mapViewApi.loadMapView(n,r);case 9:return i=t.sent,this.mapData=i,nn.setAccountId(i.account_id),t.next=14,this._initializeGps();case 14:t.next=19;break;case 16:t.prev=16,t.t0=t.catch(6),console.error("Error fetching map style:",t.t0);case 19:case"end":return t.stop()}}),t,this,[[6,16]])}))),function(){return g.apply(this,arguments)})},{key:"_initializeGps",value:(m=cr(ur().mark((function t(){var e,n,r;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.mapData){t.next=2;break}return t.abrupt("return");case 2:if(e=Er.includes(this.mapData.map_id),n=!!this.options.setup,r=e&&this.viewType!==Kn&&!n&&Rn(),this.gpsEnabled=r,!r){t.next=10;break}return t.next=9,Qn();case 9:this.gpsPermissionState=t.sent;case 10:case"end":return t.stop()}}),t,this)}))),function(){return m.apply(this,arguments)})},{key:"shouldShowGpsCell",value:function(){return this.gpsEnabled&&"denied"!==this.gpsPermissionState&&!this.location}},{key:"shouldRenderDirectionsSteps",value:function(){var t,e=null===(t=this.mapData)||void 0===t?void 0:t.map_id;return!e||!Cr.includes(e)}},{key:"_loadMapLibraries",value:(y=cr(ur().mark((function t(e){var n,r,i;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=jr(e),r=n.css,i=n.js,t.next=3,on(r);case 3:return t.next=5,rn(i);case 5:mapboxgl.clearStorage();case 6:case"end":return t.stop()}}),t)}))),function(t){return y.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:"updateFloor",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.map.getStyle().layers.forEach((function(n){if("background"!==n.type&&"raster"!==n.type&&"heatmap"!==n.type){var r=e.originalFilters[n.id];e.map.setFilter(n.id,r);var i=["==",["get","_floor"],t];if(r){var o=["all",i,r];e.map.setFilter(n.id,o)}else e.map.setFilter(n.id,i)}})),this._currentFloorIndex=t;var o=null!==i?i:this.map.getPitch(),a=null!==r?r:this.map.getBearing();if(n){var u=this.map.getStyle(),s=Object.keys(u.sources),c=[];if(s.forEach((function(n){var r="".concat(t,"-feature"),i=e.map.querySourceFeatures(n,{sourceLayer:r});c=c.concat(i)})),c.length>0){var l=new mapboxgl.LngLatBounds;c.forEach((function(t){var e=t.geometry;"Point"===e.type?l.extend(e.coordinates):"LineString"===e.type?e.coordinates.forEach((function(t){return l.extend(t)})):"Polygon"===e.type&&e.coordinates[0].forEach((function(t){return l.extend(t)}))})),this.map.fitBounds(l,{padding:{top:50,bottom:150,left:50,right:50},duration:1300,maxZoom:15.5,pitch:o,bearing:a})}else this.map.once("moveend",(function(){var n=[];if(s.forEach((function(r){var i="".concat(t,"-feature"),o=e.map.querySourceFeatures(r,{sourceLayer:i});n=n.concat(o)})),n.length>0){var r=new mapboxgl.LngLatBounds;n.forEach((function(t){var e=t.geometry;"Point"===e.type?r.extend(e.coordinates):"LineString"===e.type?e.coordinates.forEach((function(t){return r.extend(t)})):"Polygon"===e.type&&e.coordinates[0].forEach((function(t){return r.extend(t)}))})),e.map.fitBounds(r,{padding:50,duration:1300,maxZoom:15.5,pitch:o,bearing:a})}})),this.map.flyTo({zoom:this.map.getZoom()-3,duration:500,essential:!0})}this.fire("floorChanged",{floorIndex:t})}},{key:"addHighlightedFeature",value:function(t,e){var n=this.map.getSource("highlighted-content"),r=n._data,i={type:"Feature",geometry:{type:"Point",coordinates:t},properties:e};return r.features.push(i),n.setData(r),i}},{key:"addHighlightedDotFeature",value:function(t,e){var n=this.map.getSource("highlighted-content-dots");if(!n)return null;var r=n._data,i={type:"Feature",geometry:{type:"Point",coordinates:t},properties:e};return r.features.push(i),n.setData(r),i}},{key:"addSelectedFeature",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.map.getSource("selected-content"),i=r._data,o={type:"Feature",geometry:{type:"Point",coordinates:t},properties:e};n?i.features.push(o):i.features=[o],r.setData(i)}},{key:"clearSelectedContentLayer",value:function(){this.map.getSource("selected-content").setData({type:"FeatureCollection",features:[]})}},{key:"clearHighlightedContentLayer",value:function(){this.map.getSource("highlighted-content").setData({type:"FeatureCollection",features:[]});var t=this.map.getSource("highlighted-content-dots");t&&t.setData({type:"FeatureCollection",features:[]})}},{key:"_lockMobileScroll",value:function(){this._mobileScrollLockCount+=1,1===this._mobileScrollLockCount&&this.mapContainer&&(this.mapContainer.style.overflow="hidden")}},{key:"_unlockMobileScroll",value:function(){this._mobileScrollLockCount<=0||(this._mobileScrollLockCount-=1,0===this._mobileScrollLockCount&&this.mapContainer&&(this.mapContainer.style.overflow=""))}},{key:"addControl",value:function(t){var e=t.onAdd(this);this.mapContainer.appendChild(e)}},{key:"removeControl",value:function(t){this.map.removeControl(t)}},{key:"getCurrentState",value:function(){return this._stateCoordinator.state}},{key:"setToDefaultState",value:function(){this._stateCoordinator.transitionTo("default")}},{key:"setToSearchState",value:(d=cr(ur().mark((function t(e){var n,r,i,o,a=arguments;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:0,r=a.length>2&&void 0!==a[2]?a[2]:30,i=a.length>3&&void 0!==a[3]?a[3]:null,this._stateCoordinator.setLoading(!0,"search"),t.prev=4,t.next=7,this.search(e,n,r,i);case 7:o=t.sent,this._stateCoordinator.transitionTo("search",{query:e,results:o}),t.next=15;break;case 11:t.prev=11,t.t0=t.catch(4),console.error("❌ MapView: Search error occurred:",t.t0),this._stateCoordinator.setLoading(!1,"search");case 15:return t.prev=15,this._stateCoordinator.setLoading(!1,"search"),t.finish(15);case 18:case"end":return t.stop()}}),t,this,[[4,11,15,18]])}))),function(t){return d.apply(this,arguments)})},{key:"setToSelectedContentState",value:(p=cr(ur().mark((function t(e){var n,r;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._stateCoordinator.setLoading(!0,"content"),t.prev=1,n=e[e.length-1],t.next=5,this.getContentPlacementDetails(n);case 5:r=t.sent,this.updateFloor(r.floor),this._stateCoordinator.transitionTo("selectedContent",{contentPlacementIds:e,selectedContentPlacement:r}),t.next=14;break;case 10:t.prev=10,t.t0=t.catch(1),console.error("❌ MapView: Content loading error occurred:",t.t0),this._stateCoordinator.setLoading(!1,"content");case 14:return t.prev=14,this._stateCoordinator.setLoading(!1,"content"),t.finish(14);case 17:case"end":return t.stop()}}),t,this,[[1,10,14,17]])}))),function(t){return p.apply(this,arguments)})},{key:"setToDirectionsState",value:(f=cr(ur().mark((function t(){var e,n,r,i,o,a,u,s,c=arguments;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=c.length>0&&void 0!==c[0]?c[0]:null,n=c.length>1&&void 0!==c[1]?c[1]:null,r=c.length>2&&void 0!==c[2]?c[2]:{},t.prev=3,o=null,a=null,u=!!r.fromLocation,""!==e&&null!=e||(e=null),!r.startNodeId){t.next=13;break}a=r.startNodeId,console.log("🔵 MapView: Using startNodeId from options: ".concat(a)),t.next=33;break;case 13:if(e||null===(i=this.initialStateData)||void 0===i||!i.startNodeId){t.next=18;break}a=this.initialStateData.startNodeId,console.log("🔵 MapView: Using startNodeId from initialStateData: ".concat(a)),t.next=33;break;case 18:if(!e){t.next=33;break}return console.log("🔵 MapView: Attempting to fetch startContentPlacement for ID: ".concat(e)),t.prev=20,t.next=23,this.getContentPlacementDetails(e);case 23:o=t.sent,console.log("🔵 MapView: getContentPlacementDetails returned:",o),o&&o.placement_id?console.log("🔵 MapView: Successfully fetched startContentPlacement with placement_id: ".concat(o.placement_id)):(console.log("🔵 MapView: startContentPlacementId is a node ID (fetch returned invalid result): ".concat(e)),a=e,o=null),t.next=33;break;case 28:t.prev=28,t.t0=t.catch(20),console.log("🔵 MapView: Error fetching startContentPlacement (likely a node ID): ".concat(e),t.t0),a=e,o=null;case 33:if(s=null,!n){t.next=38;break}return t.next=37,this.getContentPlacementDetails(n);case 37:s=t.sent;case 38:console.log("🔵 MapView: Transitioning to directions state with:",{startContentPlacement:!!o,endContentPlacement:!!s,startNodeId:a}),this._stateCoordinator.transitionTo("directions",{startContentPlacement:o,endContentPlacement:s,startNodeId:a,fromLocation:u}),t.next=45;break;case 42:t.prev=42,t.t1=t.catch(3),console.error("❌ MapView: Directions state error occurred:",t.t1);case 45:case"end":return t.stop()}}),t,this,[[3,42],[20,28]])}))),function(){return f.apply(this,arguments)})},{key:"setToSetupState",value:(h=cr(ur().mark((function t(){return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.map&&this.map.easeTo({pitch:0,bearing:0,duration:0}),this.setupControl||(this.setupControl=new Nh.SetupControl,this.addControl(this.setupControl)),this._stateCoordinator.transitionTo("setup");case 3:case"end":return t.stop()}}),t,this)}))),function(){return h.apply(this,arguments)})},{key:"setToSelectionState",value:(l=cr(ur().mark((function t(e){var n,r,i,o,a,u,s=arguments;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=!(s.length>1&&void 0!==s[1])||s[1],this.selectionCriteria=e,this.multiSelect=n,this._stateCoordinator.setLoading(!0,"selection"),t.prev=4,t.next=7,this.mapViewApi.loadMapViewSelectionState(this.mapData.map_id,this.mapData.map_view_id,e);case 7:a=t.sent,this.selectionGeoJSON=a,console.log("✅ Selection GeoJSON loaded:",{type:null==a?void 0:a.type,featureCount:null==a||null===(r=a.features)||void 0===r?void 0:r.length,firstFeature:null==a||null===(i=a.features)||void 0===i?void 0:i[0],fullData:a}),this._stateCoordinator.transitionTo("selection",{criteria:e,geojson:a,multiSelect:n}),(null==a||null===(o=a.features)||void 0===o?void 0:o.length)>0&&(this.map.easeTo({pitch:0,bearing:0,duration:500}),u=new mapboxgl.LngLatBounds,a&&a.features&&(a.features.forEach((function(t){t.geometry&&t.geometry.coordinates&&("Point"===t.geometry.type?u.extend(t.geometry.coordinates):"LineString"===t.geometry.type?t.geometry.coordinates.forEach((function(t){return u.extend(t)})):"Polygon"===t.geometry.type&&t.geometry.coordinates[0].forEach((function(t){return u.extend(t)})))})),!1===u.isEmpty()&&this.map.fitBounds(u,{padding:80,duration:1e3,maxZoom:16}))),t.next=19;break;case 14:t.prev=14,t.t0=t.catch(4),console.error("❌ Error loading map view selection state:",t.t0),this.selectionGeoJSON=null,this._stateCoordinator.transitionTo("selection",{criteria:e,geojson:null,multiSelect:n});case 19:return t.prev=19,this._stateCoordinator.setLoading(!1,"selection"),t.finish(19);case 22:case"end":return t.stop()}}),t,this,[[4,14,19,22]])}))),function(t){return l.apply(this,arguments)})},{key:"getConfirmedSelection",value:function(){return this.confirmedSelection}},{key:"initiateBack",value:function(){this.fire("initiate:back")}},{key:"initiateSetToSearchState",value:function(){this.fire("initiate:search")}},{key:"initiateFindPath",value:function(t,e){this.fire("initiate:findPath",{startContentPlacementId:t,endContentPlacementId:e})}},{key:"initiateFindPathFromLocation",value:function(t){this.fire("initiate:findPathFromLocation",{location:this.location,endContentPlacement:t})}},{key:"findPath",value:(c=cr(ur().mark((function t(e,n){var r;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._stateCoordinator.setLoading(!0,"directions"),t.prev=1,t.next=4,this.routesApi.findPath(this.mapData.map_id,e,n);case 4:if(!(r=t.sent)){t.next=9;break}return t.abrupt("return",r);case 9:console.error("Failed to find path.");case 10:return t.prev=10,this._stateCoordinator.setLoading(!1,"directions"),t.finish(10);case 13:case"end":return t.stop()}}),t,this,[[1,,10,13]])}))),function(t,e){return c.apply(this,arguments)})},{key:"findPathFromNodeToPlacement",value:(s=cr(ur().mark((function t(e,n){var r;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._stateCoordinator.setLoading(!0,"directions"),t.prev=1,t.next=4,this.routesApi.findPathFromNodeToPlacement(this.mapData.map_id,e,n);case 4:if(!(r=t.sent)){t.next=9;break}return t.abrupt("return",r);case 9:console.error("Failed to find path.");case 10:return t.prev=10,this._stateCoordinator.setLoading(!1,"directions"),t.finish(10);case 13:case"end":return t.stop()}}),t,this,[[1,,10,13]])}))),function(t,e){return s.apply(this,arguments)})},{key:"useCurrentLocation",value:(u=cr(ur().mark((function t(e){var n,r,i,o,a,u,s,c,l;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.location){t.next=2;break}return t.abrupt("return");case 2:if(this.gpsEnabled&&this.mapData){t.next=5;break}return this.fire("gps:fallback",{reason:"UNAVAILABLE"}),t.abrupt("return");case 5:return this._stateCoordinator.setLoading(!0,"directions"),t.prev=6,t.prev=7,t.next=10,Vn();case 10:n=t.sent,this.gpsPermissionState="granted",t.next=19;break;case 14:return t.prev=14,t.t0=t.catch(7),t.t0&&"DENIED"===t.t0.code&&(this.gpsPermissionState="denied"),this.fire("gps:fallback",{reason:t.t0&&t.t0.code||"UNAVAILABLE"}),t.abrupt("return");case 19:return r=this.mapData.reference_coordinate||[0,0],i=this.mapData.coordinate_scaling_multiplier||1,o=_n(n.coordinate,r,i),a=null!=this.mapData.default_floor?this.mapData.default_floor:0,t.next=25,this.routesApi.findClosestNode(this.mapData.map_id,o,a);case 25:if((u=t.sent)&&u.node_id){t.next=29;break}return this.fire("gps:fallback",{reason:"NO_NODE"}),t.abrupt("return");case 29:if(s=u.position_x-o[0],c=u.position_y-o[1],!((l=Math.sqrt(s*s+c*c))>500)){t.next=36;break}return console.log("🔵 MapView: GPS too far from nearest node (".concat(l.toFixed(1),"m > ").concat(500,"m)")),this.fire("gps:fallback",{reason:"TOO_FAR"}),t.abrupt("return");case 36:return t.next=38,this.setToDirectionsState(null,e,{startNodeId:u.node_id,fromLocation:!0});case 38:t.next=44;break;case 40:t.prev=40,t.t1=t.catch(6),console.error("❌ MapView: useCurrentLocation error:",t.t1),this.fire("gps:fallback",{reason:"UNAVAILABLE"});case 44:return t.prev=44,this._stateCoordinator.setLoading(!1,"directions"),t.finish(44);case 47:case"end":return t.stop()}}),t,this,[[6,40,44,47],[7,14]])}))),function(t){return u.apply(this,arguments)})},{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:(a=cr(ur().mark((function t(e){var n,r,i,o,a=arguments;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=a.length>1&&void 0!==a[1]?a[1]:0,r=a.length>2&&void 0!==a[2]?a[2]:30,i=a.length>3&&void 0!==a[3]?a[3]:null,""!==e){t.next=5;break}return t.abrupt("return");case 5:if(this.mapData){t.next=7;break}return t.abrupt("return");case 7:return o="searchable_data_string","johnson-controls-roadshow-2026"===this.mapData.map_id&&(o=null),t.prev=9,t.next=12,this.searchApi.search(this.mapData.map_id,this.mapData.map_view_id,e,n,r,i,o);case 12:return t.abrupt("return",t.sent);case 15:t.prev=15,t.t0=t.catch(9),axios.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 18:case"end":return t.stop()}}),t,this,[[9,15]])}))),function(t){return a.apply(this,arguments)})},{key:"getContentPlacementDetails",value:(o=cr(ur().mark((function t(e){var n;return ur().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 n=t.sent,t.abrupt("return",n);case 7:t.prev=7,t.t0=t.catch(0),axios.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Fetching content placement details error:",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return o.apply(this,arguments)})},{key:"flyTo",value:function(t){this.map.flyTo(t)}},{key:"removeMatchingFeaturesFromExistingLayers",value:function(t){var e=this;this.map.getStyle().layers.forEach((function(n){if("background"!==n.type&&"raster"!==n.type&&"heatmap"!==n.type){var r=n.id;if(r.includes("selectable-")||r.includes("booked-")||r.includes("selected-feature")||r.includes("confirmed-selection"))return;for(var i=e.map.getFilter(r),o=null,a=function(){var t,e=function(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,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||or(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.")}()}(s[u],2),n=e[0],r=e[1];if(Array.isArray(r)){var i=r.map((function(t){return["==",["get",n],t]}));t=["any"].concat(function(t){return function(t){if(Array.isArray(t))return ar(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||or(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i))}else t=["==",["get",n],r];o=null===o?t:["all",o,t]},u=0,s=Object.entries(t);u<s.length;u++)a();var c=["!",o];if(c)if(i){var l=["all",i,c];e.map.setFilter(r,l)}else e.map.setFilter(r,c)}}))}},{key:"_getLabelGeometry",value:function(t){var e,n,r,i=(null===(e=this.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],o=(null===(n=this.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30,a=(null===(r=this.mapData)||void 0===r?void 0:r.map_id)||null;if(On.includes(a))return t.geometry;if(t.properties.label_location){var u=t.properties.label_location;if("string"==typeof u)try{u=JSON.parse(u)}catch(e){return console.warn("Failed to parse label_location JSON:",e),t.geometry}if(u&&u.coordinates&&Array.isArray(u.coordinates)&&u.coordinates.length>=2){var s=u.coordinates;if("number"==typeof s[0]&&"number"==typeof s[1]){var c=Ln([s],i,o);return{type:"Point",coordinates:[Math.round(1e6*c[0][0])/1e6,Math.round(1e6*c[0][1])/1e6]}}}}return t.geometry}},{key:"_findOriginalFeature",value:function(t){return this.selectionGeoJSON&&this.selectionGeoJSON.features?this.selectionGeoJSON.features.find((function(e){return e.properties.feature_id===t})):null}},{key:"createSelectableContentLayers",value:function(){var t=this,e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null)||this.selectionGeoJSON;if(e&&e.features)try{var n,r;this.map.getLayer("selectable-label-layer")&&this.map.removeLayer("selectable-label-layer"),this.map.getLayer("selectable-outline-layer")&&this.map.removeLayer("selectable-outline-layer"),this.map.getLayer("selectable-fill-layer")&&this.map.removeLayer("selectable-fill-layer"),this.map.getLayer("booked-label-layer")&&this.map.removeLayer("booked-label-layer"),this.map.getLayer("booked-fill-layer")&&this.map.removeLayer("booked-fill-layer"),this.map.getSource("selectable-labels")&&this.map.removeSource("selectable-labels"),this.map.getSource("selectable-content")&&this.map.removeSource("selectable-content"),this.map.getSource("booked-labels")&&this.map.removeSource("booked-labels"),this.map.getSource("booked-content")&&this.map.removeSource("booked-content");var i=(null===(n=this.mapData)||void 0===n?void 0:n.reference_coordinate)||[0,0],o=(null===(r=this.mapData)||void 0===r?void 0:r.coordinate_scaling_multiplier)||30,a=e.features,u=a.filter((function(t){return"booked"!==t.properties.booking_status})),s=a.filter((function(t){return"booked"===t.properties.booking_status})),c={type:"FeatureCollection",features:u},l={type:"FeatureCollection",features:s};this.map.addSource("selectable-content",{type:"geojson",data:c,promoteId:"feature_id"}),this.map.addSource("booked-content",{type:"geojson",data:l,promoteId:"feature_id"});var h=u.map((function(t){return{type:"Feature",geometry:t.properties.label_location?{type:"Point",coordinates:Ln([t.properties.label_location.coordinates],i,o)[0]}:t.geometry,properties:t.properties}})),f=s.map((function(t){return{type:"Feature",geometry:t.properties.label_location?{type:"Point",coordinates:Ln([t.properties.label_location.coordinates],i,o)[0]}:t.geometry,properties:t.properties}}));this.map.addSource("selectable-labels",{type:"geojson",data:{type:"FeatureCollection",features:h}}),this.map.addSource("booked-labels",{type:"geojson",data:{type:"FeatureCollection",features:f}});var p=document.createElement("canvas");p.width=48,p.height=48;var d=p.getContext("2d");d.scale(1,1),d.fillStyle="white",d.beginPath(),d.arc(24,24,20,0,2*Math.PI),d.fill(),d.strokeStyle="#00C853",d.lineWidth=3,d.stroke(),d.strokeStyle="#00C853",d.lineWidth=4,d.lineCap="round",d.lineJoin="round",d.beginPath(),d.moveTo(14,24),d.lineTo(20,30),d.lineTo(34,16),d.stroke();var y=p.toDataURL("image/png");this.map.loadImage(y,(function(e,n){e?console.error("❌ Error loading canvas checkmark icon:",e):(t.map.addImage("checkmark-icon",n),t.map.getLayer("confirmed-selection-icon-layer")||t.map.addLayer({id:"confirmed-selection-icon-layer",type:"symbol",source:"confirmed-selection-labels",layout:{"icon-image":"checkmark-icon","icon-size":.6,"icon-anchor":"center","icon-allow-overlap":!0}}))})),this.map.addSource("confirmed-selection-labels",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.addLayer({id:"confirmed-selection-label-layer",type:"symbol",source:"confirmed-selection-labels",layout:{"text-field":["get","name"],"text-font":["Inter Medium","Arial Unicode MS Regular"],"text-size":["interpolate",["exponential",1.99],["zoom"],12,1.5,22,1e3]},paint:{"text-color":"#00C853","text-halo-color":"#ffffff","text-halo-width":1}}),this.map.addSource("confirmed-selection",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.addLayer({id:"booked-fill-layer",type:"fill",source:"booked-content",paint:{"fill-color":"#f2f2f2","fill-opacity":1}}),this.map.addLayer({id:"booked-label-layer",type:"symbol",source:"booked-labels",layout:{"text-field":["get","name"],"text-font":["Inter Medium","Arial Unicode MS Regular"],"text-size":["interpolate",["exponential",1.99],["zoom"],12,1.5,22,1e3]},paint:{"text-color":"#666666","text-halo-color":"#ffffff","text-halo-width":1}}),this.map.addLayer({id:"selectable-fill-layer",type:"fill",source:"selectable-content",paint:{"fill-color":"#FFFFFF","fill-opacity":.8}}),this.map.addLayer({id:"selectable-outline-layer",type:"line",source:"selectable-content",paint:{"line-color":"#1987ff","line-width":2}}),this.map.addLayer({id:"confirmed-selection-fill-layer",type:"fill",source:"confirmed-selection",paint:{"fill-color":"#d1fae2","fill-opacity":["interpolate",["linear"],["zoom"],10,.6,16,.8]}}),this.map.addLayer({id:"confirmed-selection-outline-layer",type:"line",source:"confirmed-selection",paint:{"line-color":"#00C853","line-width":2,"line-opacity":["interpolate",["linear"],["zoom"],10,.7,16,1]}}),this.map.addLayer({id:"selectable-label-layer",type:"symbol",source:"selectable-labels",layout:{"text-field":["get","name"],"text-font":["Inter Medium","Arial Unicode MS Regular"],"text-size":["interpolate",["exponential",1.99],["zoom"],12,1.5,22,1e3]},paint:{"text-color":"#0263ca","text-halo-color":"#ffffff","text-halo-width":1}}),this.map.getStyle().layers.filter((function(t){return t.id.includes("selectable-")||t.id.includes("booked-")||t.id.includes("confirmed-selection")}))}catch(t){console.error("❌ ERROR:",t),console.error("Stack:",t.stack)}else console.error("❌ NO DATA TO CREATE LAYERS")}},{key:"removeSelectableContentLayers",value:function(){var t=this;["selectable-label-layer","selectable-outline-layer","selectable-fill-layer","booked-label-layer","booked-fill-layer","confirmed-selection-fill-layer","confirmed-selection-outline-layer","confirmed-selection-icon-layer","confirmed-selection-label-layer"].forEach((function(e){t.map.getLayer(e)&&t.map.removeLayer(e)})),this.map.getSource("selectable-content")&&this.map.removeSource("selectable-content"),this.map.getSource("selectable-labels")&&this.map.removeSource("selectable-labels"),this.map.getSource("booked-content")&&this.map.removeSource("booked-content"),this.map.getSource("booked-labels")&&this.map.removeSource("booked-labels"),this.map.getSource("confirmed-selection")&&this.map.removeSource("confirmed-selection"),this.map.getSource("confirmed-selection-labels")&&this.map.removeSource("confirmed-selection-labels"),this.map.hasImage("checkmark-icon")&&this.map.removeImage("checkmark-icon")}},{key:"clearSelectionLayers",value:function(){var t=this.map.getSource("confirmed-selection"),e=this.map.getSource("confirmed-selection-labels");t&&t.setData({type:"FeatureCollection",features:[]}),e&&e.setData({type:"FeatureCollection",features:[]})}},{key:"addConfirmedSelectionFeature",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.map.getSource("confirmed-selection"),i=this.map.getSource("confirmed-selection-labels"),o=this.map.getSource("selectable-content"),a=this.map.getSource("selectable-labels");if(r&&i&&o&&a){var u=r._data,s=i._data,c=o._data,l=a._data,h=t.properties.feature_id;if(n&&(u.features.forEach((function(t){var n=t.properties.feature_id,r=e._findOriginalFeature(n);r?(c.features.push(r),l.features.push({type:"Feature",geometry:e._getLabelGeometry(r),properties:r.properties})):(console.warn("⚠️ Original feature not found for feature:",n),c.features.push(t),l.features.push({type:"Feature",geometry:e._getLabelGeometry(t),properties:t.properties}))})),u.features=[],s.features=[]),!u.features.some((function(t){return t.properties.feature_id===h}))){u.features.push(t),r.setData(u);var f={type:"Feature",geometry:this._getLabelGeometry(t),properties:t.properties};s.features.push(f),i.setData(s),c.features=c.features.filter((function(t){return t.properties.feature_id!==h})),o.setData(c),l.features=l.features.filter((function(t){return t.properties.feature_id!==h})),a.setData(l)}}else console.error("❌ Required sources not found for confirmed selection")}},{key:"removeConfirmedSelectionFeature",value:function(t){var e=this.map.getSource("confirmed-selection"),n=this.map.getSource("confirmed-selection-labels"),r=this.map.getSource("selectable-content"),i=this.map.getSource("selectable-labels");if(e&&n&&r&&i){var o=e._data,a=n._data,u=r._data,s=i._data,c=o.features.find((function(e){return e.properties.feature_id===t}));if(c){var l=this._findOriginalFeature(t);if(l){u.features.push(l),r.setData(u);var h={type:"Feature",geometry:this._getLabelGeometry(l),properties:l.properties};s.features.push(h),i.setData(s)}else{console.warn("⚠️ Original feature not found for feature:",t);var f=c;u.features.push(f),r.setData(u);var p={type:"Feature",geometry:this._getLabelGeometry(f),properties:f.properties};s.features.push(p),i.setData(s)}o.features=o.features.filter((function(e){return e.properties.feature_id!==t})),e.setData(o),a.features=a.features.filter((function(e){return e.properties.feature_id!==t})),n.setData(a)}}else console.error("❌ Required sources not found for confirmed selection")}},{key:"getConfirmedSelectionFeatures",value:function(){var t=this.map.getSource("confirmed-selection");return t&&t._data.features||[]}},{key:"isFeatureSelected",value:function(t){return this.getConfirmedSelectionFeatures().some((function(e){return e.properties.placement_id===t||e.properties.feature_id===t}))}},{key:"_initializeState",value:(i=cr(ur().mark((function t(){var e,n;return ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,t.t0=this.initialState,t.next="default"===t.t0?4:"search"===t.t0?6:"selectedContent"===t.t0?13:"directions"===t.t0?20:"selection"===t.t0?23:"setup"===t.t0?32:35;break;case 4:return this._stateCoordinator.transitionTo("default"),t.abrupt("break",38);case 6:if(!this.initialStateData||!this.initialStateData.query){t.next=11;break}return t.next=9,this.setToSearchState(this.initialStateData.query,this.initialStateData.skip||0,this.initialStateData.limit||30,this.initialStateData.floor||null);case 9:t.next=12;break;case 11:console.warn("⚠️ Search state requires initialStateData with query property");case 12:return t.abrupt("break",38);case 13:if(!this.initialStateData||!this.initialStateData.contentPlacementIds){t.next=18;break}return t.next=16,this.setToSelectedContentState(this.initialStateData.contentPlacementIds);case 16:t.next=19;break;case 18:console.warn("⚠️ SelectedContent state requires initialStateData with contentPlacementIds property");case 19:return t.abrupt("break",38);case 20:return t.next=22,this.setToDirectionsState((null===(e=this.initialStateData)||void 0===e?void 0:e.startContentPlacementId)||null,(null===(n=this.initialStateData)||void 0===n?void 0:n.endContentPlacementId)||null);case 22:return t.abrupt("break",38);case 23:if(!this.initialStateData||!this.initialStateData.criteria){t.next=29;break}return t.next=26,this.setToSelectionState(this.initialStateData.criteria,!1!==this.initialStateData.multiSelect);case 26:this._hideSelectionLoadingOverlay(),t.next=31;break;case 29:console.warn("⚠️ Selection state requires initialStateData with criteria property"),this._hideSelectionLoadingOverlay();case 31:return t.abrupt("break",38);case 32:return t.next=34,this.setToSetupState();case 34:return t.abrupt("break",38);case 35:return console.warn("⚠️ Unknown initial state:",this.initialState),this._hideSelectionLoadingOverlay(),t.abrupt("break",38);case 38:t.next=45;break;case 40:t.prev=40,t.t1=t.catch(0),console.error("❌ Error initializing state:",t.t1),this._hideSelectionLoadingOverlay(),this._stateCoordinator.transitionTo("default");case 45:case"end":return t.stop()}}),t,this,[[0,40]])}))),function(){return i.apply(this,arguments)})},{key:"_createSelectionLoadingOverlay",value:function(){this.selectionLoadingOverlay=document.createElement("div"),this.selectionLoadingOverlay.className="selection-loading-overlay";var t=document.createElement("div");t.className="selection-circular-progress";var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("viewBox","0 0 40 40");var n=document.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("class","progress-ring"),n.setAttribute("cx","20"),n.setAttribute("cy","20"),n.setAttribute("r","15");var r=document.createElementNS("http://www.w3.org/2000/svg","circle");r.setAttribute("class","progress-ring-fill"),r.setAttribute("cx","20"),r.setAttribute("cy","20"),r.setAttribute("r","15"),e.appendChild(n),e.appendChild(r),t.appendChild(e),this.selectionLoadingOverlay.appendChild(t);var i=document.getElementById(this.options.container);i?i.appendChild(this.selectionLoadingOverlay):this.mapContainer.appendChild(this.selectionLoadingOverlay)}},{key:"_showSelectionLoadingOverlay",value:function(){if(this.selectionLoadingOverlay){this.selectionLoadingOverlay.style.display="flex";var t=this.selectionLoadingOverlay.querySelector(".progress-ring-fill");t&&(t.classList.remove("animating"),t.style.strokeDashoffset="94.2",setTimeout((function(){t.classList.add("animating")}),50))}}},{key:"_hideSelectionLoadingOverlay",value:function(){if(this.selectionLoadingOverlay){this.selectionLoadingOverlay.classList.add("hidden");var t=this.selectionLoadingOverlay.querySelector(".progress-ring-fill");t&&(t.classList.remove("animating"),t.style.strokeDashoffset="188.4")}}},{key:"_initializeKioskReset",value:function(){var t=this;this._kioskResetListenersAttached||(this._kioskResetListenersAttached=!0,this.on("state:default",(function(){return t._resetKioskTimer()})),this.on("state:search",(function(){return t._resetKioskTimer()})),this.on("state:selectedContent",(function(){return t._resetKioskTimer()})),this.on("state:directions",(function(){return t._resetKioskTimer()})),this.on("state:setup",(function(){return t._resetKioskTimer()})),this.on("state:selection",(function(){return t._resetKioskTimer()})),this.on("moveend",(function(){return t._resetKioskTimer()})),this.on("zoomend",(function(){return t._resetKioskTimer()})),this.on("pitchend",(function(){return t._resetKioskTimer()})),this.on("rotateend",(function(){return t._resetKioskTimer()})),this.on("dragend",(function(){return t._resetKioskTimer()}))),setTimeout((function(){t._startKioskTimer()}),100)}},{key:"_startKioskTimer",value:function(){var t=this;if(this.viewType===Kn){var e=90;this.kioskResetTimer&&clearTimeout(this.kioskResetTimer),this.kioskCountdownInterval&&clearInterval(this.kioskCountdownInterval),this.kioskCountdownInterval=setInterval((function(){--e<=0&&clearInterval(t.kioskCountdownInterval)}),1e3),this.kioskResetTimer=setTimeout((function(){var e=t._stateCoordinator.state,n=(t._currentFloorIndex,t._defaultFloorIndex),r=t._defaultBearing,i=t._defaultPitch;t.hideModal(),t.updateFloor(n,!0,r,i),"default"!==e&&t.setToDefaultState(),t.kioskCountdownInterval&&clearInterval(t.kioskCountdownInterval)}),9e4)}}},{key:"_resetKioskTimer",value:function(){this.viewType===Kn&&(this._stateCoordinator.state,this.kioskResetTimer&&clearTimeout(this.kioskResetTimer),this.kioskCountdownInterval&&clearInterval(this.kioskCountdownInterval),this._startKioskTimer())}},{key:"_destroyKioskTimer",value:function(){this.kioskResetTimer&&(clearTimeout(this.kioskResetTimer),this.kioskResetTimer=null),this.kioskCountdownInterval&&(clearInterval(this.kioskCountdownInterval),this.kioskCountdownInterval=null)}}],r&&fr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o,a,u,s,c,l,h,f,p,d,y,m,g,D}(Nn);const Sr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZX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IiPgo8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==";function Tr(t){return Tr="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},Tr(t)}function Fr(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,Or(r.key),r)}}function Or(t){var e=function(t){if("object"!=Tr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Tr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Tr(e)?e:e+""}function kr(t,e,n){return e=Lr(e),function(t,e){if(e&&("object"==Tr(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||[],Lr(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 Lr(t){return Lr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Lr(t)}function _r(t,e){return _r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_r(t,e)}const zr=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=kr(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&&_r(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="",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.loadingIndicator=document.createElement("div"),this.loadingIndicator.className="search-bar-loading-indicator",this.loadingIndicator.innerHTML='<img src="'.concat(Ir,'" alt="Loading" />'),this.loadingIndicator.style.display="none",this.element.appendChild(this.leftButton),this.element.appendChild(this.input),this.element.appendChild(this.loadingIndicator),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(){var t=this,e=window.innerHeight,n=0,r=function(){var i=window.innerHeight;i===e?n+=1:n=0,e=i,n>=3?t.fire("focus"):requestAnimationFrame(r)};requestAnimationFrame(r)}},{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("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iNyIgc3Ryb2tlPSIjMTcxNzE3IiBzdHJva2Utd2lkdGg9IjIiLz4KPHBhdGggZD0iTTIwIDIwTDE3IDE3IiBzdHJva2U9IiMxNzE3MTciIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+Cjwvc3ZnPgo=",'" alt="Search" />'),this.rightButton.style.display="flex"):"cancel"===t?(this.rightButton.innerHTML='<img src="'.concat(Sr,'" 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("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQ5IiBoZWlnaHQ9IjExNyIgdmlld0JveD0iMCAwIDE0OSAxMTciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0yMC41IDk2LjgwOVY1Mi42ODIxTDYwLjE5NzIgMjYuMTI5NEM2OS45MzMyIDIwLjg1OTIgNzMuMzM3MiAyMC4yNTM5IDc1LjIwMjEgMjAuMjU1MUM3Ny4wMzg2IDIwLjI1NjQgODAuMzU4MSAyMC44NDU0IDg5LjkwMzEgMjYuMDUyOEwxMDEuNSAzNC4wMDg2VjkuNzU1MTJMMTAyLjA5OCAxMC4xNjVMMTAwLjQgOC45OTk5OUM3OS4zMzc2IC0yLjYzOTk3IDcxLjE1OTUgLTIuNjc5NjYgNDkuODMzMyA4Ljk5OTk5TDkuMzgwNTIgMzYuMDU4MkMzLjgzMTI2IDM5Ljc3IDAuNSA0Ni4wMDU5IDAuNSA1Mi42ODIxVjk2LjgwOUMwLjUgMTEwLjY1OCAxNC4yMzU4IDEyMC4zMTYgMjcuMjY3OSAxMTUuNjI5TDY3LjczMiAxMDEuMDc4QzcyLjEwNjkgOTkuNTA0MyA3Ni44OTMxIDk5LjUwNDMgODEuMjY4IDEwMS4wNzhMMTIxLjczMiAxMTUuNjI5QzEzNC43NjQgMTIwLjMxNiAxNDguNSAxMTAuNjU4IDE0OC41IDk2LjgwOVY1Mi41MzE1QzE0OC41IDQ1LjkzODUgMTQ1LjI1MSAzOS43NjkxIDEzOS44MTQgMzYuMDM5NEwxMjguNSAyOC4yNzc1Vjk2LjgwOUw4OC4wMzU5IDgyLjI1NzVDNzkuMjg2MiA3OS4xMTEgNjkuNzEzOCA3OS4xMTEgNjAuOTY0MSA4Mi4yNTc1TDIwLjUgOTYuODA5WiIgZmlsbD0iIzFFMUUxRSIvPgo8L3N2Zz4K",'" 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("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTguNDYwMDIgMTEuMj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gMTEuMjg5NVYxMS4yODk1WiIgZmlsbD0iIzFFMUUxRSIvPgo8L3N2Zz4K",'" 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:"setPlaceholderText",value:function(t){this.input.placeholder=t}},{key:"getText",value:function(){return this.input.value}},{key:"setText",value:function(t){this.input.value=t}},{key:"getElement",value:function(){return this.element}},{key:"setViewForDesktop",value:function(){this.element.classList.remove("mobile-view"),this.input.classList.remove("mobile-view")}},{key:"setViewForMobile",value:function(){this.element.classList.add("mobile-view"),this.input.classList.add("mobile-view")}},{key:"showLoading",value:function(){this.loadingIndicator.style.display="flex"}},{key:"hideLoading",value:function(){this.loadingIndicator.style.display="none",this.rightButton.style.display="flex"}}],r&&Fr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function Pr(t){return Pr="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},Pr(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,Ur(r.key),r)}}function Ur(t){var e=function(t){if("object"!=Pr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pr(e)?e:e+""}function Rr(t,e,n){return e=Yr(e),function(t,e){if(e&&("object"==Pr(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,Qr()?Reflect.construct(e,n||[],Yr(t).constructor):e.apply(t,n))}function Qr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Qr=function(){return!!t})()}function Yr(t){return Yr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Yr(t)}function Vr(t,e){return Vr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vr(t,e)}const Hr=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=Rr(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&&Vr(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.result&&"gps-current-location"===this.result.type&&this.element.classList.add("search-bar-suggestions-view-cell--gps"),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(){if(this.result&&"gps-current-location"===this.result.type)this.element.innerHTML='\n <div class="suggestion-gps-icon" aria-hidden="true">\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <circle cx="12" cy="12" r="3"></circle>\n <line x1="12" y1="2" x2="12" y2="5"></line>\n <line x1="12" y1="19" x2="12" y2="22"></line>\n <line x1="2" y1="12" x2="5" y2="12"></line>\n <line x1="19" y1="12" x2="22" y2="12"></line>\n </svg>\n </div>\n <div class="suggestion-title">Use current location</div>\n ';else{var t=this.result.catalog.content_title_key;this.element.innerHTML='\n <div class="suggestion-title">'.concat(this.result.content.data[t],'</div>\n <div class="suggestion-subtitle">').concat(this.result.contextual_location,"</div>\n ")}}},{key:"getElement",value:function(){return this.element}}])&&Br(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function Gr(t){return Gr="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},Gr(t)}function Zr(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,Wr(r.key),r)}}function Wr(t){var e=function(t){if("object"!=Gr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Gr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Gr(e)?e:e+""}function qr(t,e,n){return e=Jr(e),function(t,e){if(e&&("object"==Gr(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,Kr()?Reflect.construct(e,n||[],Jr(t).constructor):e.apply(t,n))}function Kr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Kr=function(){return!!t})()}function Jr(t){return Jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Jr(t)}function Xr(t,e){return Xr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xr(t,e)}const $r=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]))._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&&Xr(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.results=[],this.pinnedResults=[],this.element=document.createElement("div"),this.element.className="search-bar-suggestions-view"}},{key:"updateResults",value:function(t){this.results=t,this.render()}},{key:"setPinnedResults",value:function(t){this.pinnedResults=t||[],this.render()}},{key:"hasPinnedResults",value:function(){return this.pinnedResults.length>0}},{key:"render",value:function(){var t=this;this.element.innerHTML="",this.pinnedResults.forEach((function(e){var n=new Hr(e);n.on("click",(function(){return t.fire("selectCell",{result:e})})),t.element.appendChild(n.getElement())})),this.results.forEach((function(e){var n=new Hr(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}},{key:"setViewForDesktop",value:function(){}},{key:"setViewForMobile",value:function(){}}])&&Zr(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function ti(t){return ti="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},ti(t)}function ei(){ei=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==ti(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(ti(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function ni(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function ri(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){ni(o,r,i,a,u,"next",t)}function u(t){ni(o,r,i,a,u,"throw",t)}a(void 0)}))}}function ii(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,oi(r.key),r)}}function oi(t){var e=function(t){if("object"!=ti(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ti(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ti(e)?e:e+""}function ai(t,e,n){return e=si(e),function(t,e){if(e&&("object"==ti(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,ui()?Reflect.construct(e,n||[],si(t).constructor):e.apply(t,n))}function ui(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ui=function(){return!!t})()}function si(t){return si=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},si(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=ai(this,e,[n])).element=document.createElement("div"),t.element.className="search-box",t.searchBar=new zr,t.searchBarSuggestionsView=new $r,t.searchCount=0,t.showSuggestionsOnEmptyFocus=!1,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&&ci(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=ri(ei().mark((function t(){var e;return ei().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((e=this.searchBar.getText()).length>2)){t.next=7;break}return t.next=4,this.getSearchBarSuggestions(e);case 4:this.openSuggestionsView(),t.next=8;break;case 7:this.showSuggestionsOnEmptyFocus&&this.searchBarSuggestionsView.hasPinnedResults()&&this.openSuggestionsView();case 8:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"_handleSearchBarBlur",value:function(){this.closeSuggestionsView()}},{key:"_handleSearchBarInput",value:(o=ri(ei().mark((function t(e){var n;return ei().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0===(n=e.query).length){t.next=7;break}return this.openSuggestionsView(),t.next=5,this.getSearchBarSuggestions(n);case 5:t.next=8;break;case 7:this.showSuggestionsOnEmptyFocus&&this.searchBarSuggestionsView.hasPinnedResults()?(this.searchBarSuggestionsView.updateResults([]),this.openSuggestionsView()):this.closeSuggestionsView();case 8:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"_render",value:function(){this.element.appendChild(this.searchBar.getElement()),this.element.appendChild(this.searchBarSuggestionsView.getElement())}},{key:"setViewForDesktop",value:function(){this.searchBar.setViewForDesktop(),this.searchBarSuggestionsView.setViewForDesktop()}},{key:"setViewForMobile",value:function(){this.searchBar.setViewForMobile(),this.searchBarSuggestionsView.setViewForMobile()}},{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:"setPinnedResults",value:function(t){this.searchBarSuggestionsView.setPinnedResults(t)}},{key:"clearPinnedResults",value:function(){this.searchBarSuggestionsView.setPinnedResults([])}},{key:"setShowSuggestionsOnEmptyFocus",value:function(t){this.showSuggestionsOnEmptyFocus=!!t}},{key:"getSearchBarSuggestions",value:(i=ri(ei().mark((function t(e){return ei().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.fire("getSearchBarSuggestions",{query:e});case 1:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})}],r&&ii(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o,a}(Nn);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 fi(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,pi(r.key),r)}}function pi(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+""}const di=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,this.map=null,this.currentViewType=null,this.currentLayoutType=null,this._viewTypeChangeHandler=null},(e=[{key:"onAdd",value:function(t){this.map=t}},{key:"onRemove",value:function(){this._detachViewTypeListener(),this.container&&(this.container.parentNode.removeChild(this.container),this.map=void 0)}},{key:"_attachResizeListener",value:function(){var t=this.map.mapContainer.offsetWidth;this._configureView(t)}},{key:"_initialize",value:function(){if(this.map){this._attachViewTypeListener();var t=this.map.mapContainer.offsetWidth;this._configureView(t)}}},{key:"_attachViewTypeListener",value:function(){var t=this;this._viewTypeChangeHandler||this.map&&"function"==typeof this.map.on&&(this._viewTypeChangeHandler=function(){t.map&&t.container&&t._configureView(t.map.mapContainer.offsetWidth)},this.map.on("viewTypeChanged",this._viewTypeChangeHandler))}},{key:"_detachViewTypeListener",value:function(){this._viewTypeChangeHandler&&(this.map&&"function"==typeof this.map.off&&this.map.off("viewTypeChanged",this._viewTypeChangeHandler),this._viewTypeChangeHandler=null)}},{key:"_configureView",value:function(t){this.currentLayoutType=function(t){return t>767?Wn:qn}(t);var e=this.map&&"function"==typeof this.map.getViewType?this.map.getViewType():null;this.currentViewType=e||this.currentLayoutType,this._updateContentView()}},{key:"_setViewForDesktop",value:function(){this.currentViewType=Wn,this.currentLayoutType=Wn,this._updateContentView()}},{key:"_setViewForMobile",value:function(){this.currentViewType=qn,this.currentLayoutType=qn,this._updateContentView()}},{key:"_updateContentView",value:function(){this._clearViews(),this.currentViewType===Kn?(this.container.classList.add("kiosk-view"),this._renderKioskView()):this.currentViewType===Wn?this._renderDesktopView():this._renderMobileView()}},{key:"_isDesktopLayout",value:function(){return this.currentViewType===Kn?this.currentLayoutType===Wn:this.currentViewType===Wn}},{key:"_isMobileLayout",value:function(){return this.currentViewType===Kn?this.currentLayoutType===qn:this.currentViewType===qn}},{key:"_clearViews",value:function(){for(this.container.classList.remove("kiosk-view");this.container.firstChild;)this.container.removeChild(this.container.firstChild),this.container.classList.remove("mobile-view"),this.container.classList.remove("desktop-view")}},{key:"show",value:function(){this.container&&(this.container.style.display="block",this._isMobileLayout()&&this.map&&"function"==typeof this.map._lockMobileScroll&&(this.map._lockMobileScroll(),this._mobileScrollLocked=!0))}},{key:"hide",value:function(){this.container&&(this.container.style.display="none",this._mobileScrollLocked&&this.map&&"function"==typeof this.map._unlockMobileScroll&&(this.map._unlockMobileScroll(),this._mobileScrollLocked=!1))}},{key:"_renderDesktopView",value:function(){}},{key:"_renderMobileView",value:function(){}},{key:"_renderKioskView",value:function(){this.currentLayoutType===Wn?this._renderDesktopView():this._renderMobileView()}}])&&fi(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();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 mi(){mi=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==yi(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(yi(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function gi(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function Di(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,vi(r.key),r)}}function vi(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 Mi(t,e,n){return e=Ei(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,bi()?Reflect.construct(e,n||[],Ei(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 wi(){return wi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ei(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},wi.apply(null,arguments)}function Ei(t){return Ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ei(t)}function Ci(t,e){return Ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ci(t,e)}const ji=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=Mi(this,e,[n])).searchBox=new li,t.searchApi=nn.getSearchApi(),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){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._initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.show(),this.testLoadingState=this._testLoadingState.bind(this),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=wi(Ei(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.searchBox.on("getSearchBarSuggestions",this._handleGettingSearchBarSuggestions.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)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("state:selection",this._handleSelectionState.bind(this)),this.map.on("load",this._handleMapLoad.bind(this)),this.map.on("loading:start",this._handleLoadingStart.bind(this)),this.map.on("loading:end",this._handleLoadingEnd.bind(this))}},{key:"_handleMapLoad",value:function(t){var e=t.mapData.map_name;e?this.searchBox.searchBar.setPlaceholderText("Search ".concat(e)):this.searchBox.searchBar.setPlaceholderText("Search")}},{key:"_handleGettingSearchBarSuggestions",value:(i=mi().mark((function t(e){var n,r,i;return mi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.query,r=++this.searchBox.searchCount,""!==n){t.next=5;break}return this.searchBox.searchBarSuggestionsView.updateResults([]),t.abrupt("return");case 5:if(this.map.mapData){t.next=7;break}return t.abrupt("return");case 7:return t.prev=9,t.next=12,this.searchApi.search(this.map.mapData.map_id,this.map.mapData.map_view_id,n,0,5);case 12:i=t.sent,r===this.searchBox.searchCount&&this.searchBox.searchBarSuggestionsView.updateResults(i),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(9),Me.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 19:case"end":return t.stop()}}),t,this,[[9,16]])})),o=function(){var t=this,e=arguments;return new Promise((function(n,r){var o=i.apply(t,e);function a(t){gi(o,n,r,a,u,"next",t)}function u(t){gi(o,n,r,a,u,"throw",t)}a(void 0)}))},function(t){return o.apply(this,arguments)})},{key:"_renderDesktopView",value:function(){var t=this.searchBox.getElement();this.container.appendChild(t),this.container.classList.add("desktop-view"),this.container.classList.remove("mobile-view"),t&&this.searchBox.setViewForDesktop()}},{key:"_renderMobileView",value:function(){var t=this.searchBox.getElement();this.container.appendChild(t),this.container.classList.add("mobile-view"),this.container.classList.remove("desktop-view"),t&&this.searchBox.setViewForMobile()}},{key:"bringToFront",value:function(){this.container.style.zIndex="10"}},{key:"bringBack",value:function(){this.container.style.zIndex=""}},{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.updateRightButtonIcon("search"),this.searchBox.searchBar.updateLeftButtonIcon("none"),this.searchBox.searchBar.hideLoading(),this.bringToFront(),this.show()}},{key:"_handleSearchState",value:function(t){var e=t.query;t.results,this.searchBox.searchBar.setText(e),this.searchBox.searchBar.updateRightButtonIcon("cancel"),this.searchBox.searchBar.updateLeftButtonIcon("none"),this.bringToFront(),this.show()}},{key:"_handleSelectedContentState",value:function(t){var e=t.contentPlacementIds,n=t.selectedContentPlacement;this.show(),this.bringToFront();var r=n.catalog.content_title_key,i=n.content.data[r];this.searchBox.searchBar.setText(i),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){this.show(),this.bringBack();var e=this.map._stateCoordinator.stateHistory.length;this.searchBox.searchBar.updateRightButtonIcon("cancel"),e>2?this.searchBox.searchBar.updateLeftButtonIcon("back"):this.searchBox.searchBar.updateLeftButtonIcon("none")}},{key:"_handleSetupState",value:function(){this.hide()}},{key:"_handleSelectionState",value:function(t){this.hide()}},{key:"_handleLoadingStart",value:function(t){this.searchBox.searchBar.showLoading(),this.searchBox.searchBar.updateRightButtonIcon(this.searchBox.searchBar.rightButtonState),this.searchBox.searchBar.updateLeftButtonIcon(this.searchBox.searchBar.leftButtonState)}},{key:"_handleLoadingEnd",value:function(t){this.searchBox.searchBar.hideLoading()}},{key:"_testLoadingState",value:function(){var t=this;this.searchBox.searchBar.showLoading(),setTimeout((function(){t.searchBox.searchBar.hideLoading()}),2e3)}}],r&&Di(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o}(di);function Ai(t){return Ai="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},Ai(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,Si(r.key),r)}}function Si(t){var e=function(t){if("object"!=Ai(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ai(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ai(e)?e:e+""}function Ii(t,e,n){return e=Fi(e),function(t,e){if(e&&("object"==Ai(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,Ti()?Reflect.construct(e,n||[],Fi(t).constructor):e.apply(t,n))}function Ti(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ti=function(){return!!t})()}function Fi(t){return Fi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fi(t)}function Oi(t,e){return Oi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Oi(t,e)}const ki=function(t){function e(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=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=Ii(this,e,[i])).items=r,n.buttonElements=[],n.allowsToggle=null===(t=i.allowsToggle)||void 0===t||t,n.containerClass=i.container,n.element=document.createElement("div"),n.element.className="slider-bar-container ".concat(n.containerClass),n.sliderBar=document.createElement("div"),n.sliderBar.className="slider-bar ".concat(n.containerClass,"-bar"),n.sliderBarViewport=document.createElement("div"),n.sliderBarViewport.className="slider-bar-viewport ".concat(n.containerClass,"-viewport"),n.sliderBarViewport.appendChild(n.sliderBar),n.leftButton=document.createElement("button"),n.leftButton.className="scroll-button left ".concat(n.containerClass,"-scroll-button"),n.leftButton.style.backgroundImage="url(".concat("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTExLjI4OTkgMTEuOTk5N0wxNC44Mjk5IDguNDU5N0MxNS4wMTYyIDguMjcyMzQgMTUuMTIwNyA4LjAxODg5IDE1LjEyMDcgNy43NTQ3QzE1LjEyMDcgNy40OTA1MiAxNS4wMTYyIDcuMjM3MDcgMTQuODI5OSA3LjA0OTdDMTQuNzM3IDYuOTU1OTggMTQuNjI2NCA2Ljg4MTU4IDE0LjUwNDUgNi44MzA4MUMxNC4zODI3IDYuNzgwMDQgMTQuMjUyIDYuNzUzOTEgMTQuMTE5OSA2Ljc1MzkxQzEzLjk4NzkgNi43NTM5MSAxMy44NTcyIDYuNzgwMDQgMTMuNzM1NCA2LjgzMDgxQzEzLjYxMzUgNi44ODE1OCAxMy41MDI5IDYuOTU1OTggMTMuNDA5OSA3LjA0OTdMOS4xNjk5NCAxMS4yODk3QzkuMDc2MjIgMTEuMzgyNyA5LjAwMTgyIDExLjQ5MzMgOC45NTEwNSAxMS42MTUxQzguOTAwMjggMTEuNzM3IDguODc0MTUgMTEuODY3NyA4Ljg3NDE1IDExLjk5OTdDOC44NzQxNSAxMi4xMzE3IDguOTAwMjggMTIuMjYyNCA4Ljk1MTA1IDEyLjM4NDNDOS4wMDE4MiAxMi41MDYxIDkuMDc2MjIgMTIuNjE2NyA5LjE2OTk0IDEyLjcwOTdMMTMuNDA5OSAxNi45OTk3QzEzLjUwMzQgMTcuMDkyNCAxMy42MTQyIDE3LjE2NTcgMTMuNzM2IDE3LjIxNTVDMTMuODU3OSAxNy4yNjUyIDEzLjk4ODMgMTcuMjkwNSAxNC4xMTk5IDE3LjI4OTdDMTQuMjUxNiAxNy4yOTA1IDE0LjM4MiAxNy4yNjUyIDE0LjUwMzggMTcuMjE1NUMxNC42MjU3IDE3LjE2NTcgMTQuNzM2NSAxNy4wOTI0IDE0LjgyOTkgMTYuOTk5N0MxNS4wMTYyIDE2LjgxMjMgMTUuMTIwNyAxNi41NTg5IDE1LjEyMDcgMTYuMjk0N0MxNS4xMjA3IDE2LjAzMDUgMTUuMDE2MiAxNS43NzcxIDE0LjgyOTkgMTUuNTg5N0wxMS4yODk5IDExLjk5OTdaIiBmaWxsPSIjMTcxNzE3Ii8+Cjwvc3ZnPgo=",")"),n.leftButton.addEventListener("click",(function(){return n._scrollSliderBar("left")})),n.rightButton=document.createElement("button"),n.rightButton.className="scroll-button right ".concat(n.containerClass,"-scroll-button"),n.rightButton.style.backgroundImage="url(".concat("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiI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zODQzQzE1LjA5OTYgMTIuMjYyNCAxNS4xMjU3IDEyLjEzMTcgMTUuMTI1NyAxMS45OTk3QzE1LjEyNTcgMTEuODY3NyAxNS4wOTk2IDExLjczNyAxNS4wNDg4IDExLjYxNTFDMTQuOTk4MSAxMS40OTMzIDE0LjkyMzcgMTEuMzgyNyAxNC44Mjk5IDExLjI4OTdaIiBmaWxsPSIjMTcxNzE3Ii8+Cjwvc3ZnPgo=",")"),n.rightButton.addEventListener("click",(function(){return n._scrollSliderBar("right")})),n.buttonElements=[],n.selectedValue=null,n._render(),n.sliderBarViewport.addEventListener("scroll",(function(){return n._updateScrollButtons()})),setTimeout((function(){return n._updateScrollButtons()}),.8),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&&Oi(t,e)}(e,t),n=e,r=[{key:"updateItems",value:function(t){this.items=t,this.sliderBar.innerHTML="",this.buttonElements=[],this._render(),this._updateScrollButtons()}},{key:"_render",value:function(){var t=this;this.items.forEach((function(e){var n=document.createElement("button");n.addEventListener("click",t._handleSliderButtonSelect.bind(t)),n.className="slider-bar-button ".concat(t.containerClass,"-button");var r=document.createElement("span");r.textContent=e,n.appendChild(r),t.buttonElements.push(n),t.sliderBar.appendChild(n)})),this.element.appendChild(this.leftButton),this.element.appendChild(this.sliderBarViewport),this.element.appendChild(this.rightButton)}},{key:"setViewForDesktop",value:function(){this.buttonElements.forEach((function(t){t&&t.classList.remove("mobile-view")}))}},{key:"setViewForMobile",value:function(){this.buttonElements.forEach((function(t){t&&t.classList.add("mobile-view")}))}},{key:"_handleSliderButtonSelect",value:function(t){var e=t.currentTarget,n=e.querySelector("span").textContent,r=this.buttonElements.indexOf(e);if(e.classList.contains("selected"))this.allowsToggle&&(e.classList.remove("selected"),this.fire("".concat(this.containerClass,":deselect")),this.selectedValue=null);else{var i=document.querySelector(".slider-bar-button.".concat(this.containerClass,"-button.selected"));i&&i.classList.remove("selected"),e.classList.add("selected"),this.selectedValue=n,this.fire("".concat(this.containerClass,":selectNew"),{query:n,index:r})}}},{key:"_scrollSliderBar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:275,n=this.sliderBarViewport.scrollWidth-this.sliderBarViewport.clientWidth,r=this.sliderBarViewport.scrollLeft,i=e;if("right"===t){var o=n-r;o<e&&(i=o)}"left"===t?this.sliderBarViewport.scrollBy({left:-e,behavior:"smooth"}):"right"===t&&this.sliderBarViewport.scrollBy({left:i,behavior:"smooth"})}},{key:"_updateScrollButtons",value:function(){var t=this.sliderBarViewport.scrollLeft,e=this.sliderBarViewport.scrollWidth-this.sliderBarViewport.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(){var t=this.sliderBar.querySelectorAll(".slider-bar-button.".concat(this.containerClass,"-button.selected"));t&&t.forEach((function(t){return t.classList.remove("selected")}))}},{key:"deselectAllNotMatchingQuery",value:function(t){var e=this.sliderBar.querySelectorAll(".slider-bar-button.".concat(this.containerClass,"-button.selected"));e&&e.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:"selectButtonAtIndex",value:function(t){var e=this.buttonElements[t];if(e)if(e.classList.contains("selected"))console.log("button is already selected");else{this.deselectAll();var n=e.querySelector("span").textContent;e.classList.add("selected"),this.selectedValue=n,this.fire("".concat(this.containerClass,":selectNew"),{query:n,index:t})}}},{key:"getIndexOfSelectedButton",value:function(){return this.buttonElements.findIndex((function(t){return t.classList.contains("selected")}))}},{key:"refresh",value:function(){var t=this;this.element.innerHTML="",this.sliderBar.innerHTML="",this.buttonElements=[],this._render(),setTimeout((function(){t._updateScrollButtons()}),100)}},{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&&Ni(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function xi(t){return xi="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},xi(t)}function Li(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"!=xi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xi(e)?e:e+""}function zi(t,e,n){return e=Ui(e),function(t,e){if(e&&("object"==xi(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,Pi()?Reflect.construct(e,n||[],Ui(t).constructor):e.apply(t,n))}function Pi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Pi=function(){return!!t})()}function Bi(){return Bi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ui(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Bi.apply(null,arguments)}function Ui(t){return Ui=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ui(t)}function Ri(t,e){return Ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ri(t,e)}const Qi=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=zi(this,e,[n])).categoryBarContainerName="category-bar",t.categoryBar=new ki([],{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&&Ri(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._attachResizeListener(),this._initialize(),this._showIfHasItems(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=Bi(Ui(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.categoryBar.on("".concat(this.categoryBarContainerName,":selectNew"),this._handleNewCategoryButtonSelect.bind(this)),this.categoryBar.on("".concat(this.categoryBarContainerName,":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)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("state:selection",this._handleSelectionState.bind(this)),this.map.on("load",this._handleMapLoad.bind(this))}},{key:"_handleMapLoad",value:function(t){var e=t.mapData.suggested_search_terms;e&&this.categoryBar.updateItems(e);var n=this.map.getCurrentState();"default"!==n&&"search"!==n||this._showIfHasItems()}},{key:"_hasItems",value:function(){return Array.isArray(this.categoryBar.items)&&this.categoryBar.items.length>0}},{key:"_showIfHasItems",value:function(){this._hasItems()?this.show():this.hide()}},{key:"_renderDesktopView",value:function(){var t=this.categoryBar.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view"),this.map.mapContainer.offsetWidth,this.categoryBar.setViewForDesktop()}},{key:"_renderMobileView",value:function(){var t=this.categoryBar.getElement();this.container.appendChild(t),this.map.mapContainer.offsetWidth,this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view"),this.categoryBar.setViewForMobile()}},{key:"_handleDefaultState",value:function(){this.categoryBar.refresh(),this.categoryBar.deselectAll(),this._showIfHasItems()}},{key:"_handleSelectedContentState",value:function(t){this.hide()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleNewCategoryButtonSelect",value:function(t){var e=t.query,n=this.map.getCurrentFloor();this.map.setToSearchState(e,0,30,n)}},{key:"_handleCategoryButtonDeselect",value:function(){this.map.setToDefaultState()}},{key:"_handleSearchState",value:function(t){var e=t.query;t.results,this._showIfHasItems(),this.categoryBar.deselectAllNotMatchingQuery(e)}},{key:"_handleSetupState",value:function(){this.hide()}},{key:"_handleSelectionState",value:function(){this.hide()}}],r&&Li(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(di);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 Vi(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,Hi(r.key),r)}}function Hi(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 Gi(t,e,n){return e=Wi(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,Zi()?Reflect.construct(e,n||[],Wi(t).constructor):e.apply(t,n))}function Zi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zi=function(){return!!t})()}function Wi(t){return Wi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wi(t)}function qi(t,e){return qi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qi(t,e)}const Ki=function(t){function e(t,n){var r,i=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=Gi(this,e,[i])).label=t,r.url=n,r.showIcon=!1!==i.showIcon,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&&qi(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("button"),this.element.type="button",this.element.className="pill-button",this.labelElement=document.createElement("span"),this.labelElement.className="pill-button-label",this.labelElement.textContent=this.label,this.element.appendChild(this.labelElement),this.showIcon&&this.element.insertAdjacentHTML("beforeend",'\n<svg class="pill-button-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">\n <path d="M7 17L17 7"></path>\n <path d="M7 7h10v10"></path>\n</svg>\n'),this.element.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),t.fire("click",{url:t.url})}))}},{key:"getElement",value:function(){return this.element}}])&&Vi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);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 Xi(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"!=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 to(t,e,n){return e=no(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,eo()?Reflect.construct(e,n||[],no(t).constructor):e.apply(t,n))}function eo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(eo=function(){return!!t})()}function no(t){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},no(t)}function ro(t,e){return ro=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ro(t,e)}function io(t){if("string"!=typeof t)return null;var e=t.trim();return""===e?null:/^https?:\/\//i.test(e)?e:"https://".concat(e)}function oo(t){var e=io(t);if(!e)return!1;try{var n=new URL(e);if("http:"!==n.protocol&&"https:"!==n.protocol)return!1;var r=n.hostname;return!(!r||!r.includes(".")&&"localhost"!==r)}catch(t){return!1}}const ao=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=to(this,e,[n]))._kioskTimer=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&&ro(t,e)}(e,t),n=e,r=[{key:"show",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.isKioskMode,o=void 0!==i&&i,a=r.onConfirm,u=void 0===a?null:a,s=r.onCancel,c=void 0===s?null:s,l=io(e);if(l)if(o)this._showKioskTransient(t);else{var h=document.createElement("div");h.className="url-confirmation-popup-card";var f=document.createElement("div");f.className="url-confirmation-popup-title",f.textContent="Open external link?",h.appendChild(f);var p=document.createElement("div");p.className="url-confirmation-popup-body",p.textContent="This will open in your browser:",h.appendChild(p);var d=document.createElement("div");d.className="url-confirmation-popup-url",d.textContent=l,h.appendChild(d);var y=document.createElement("div");y.className="url-confirmation-popup-actions";var m=document.createElement("button");m.className="url-confirmation-popup-cancel",m.textContent="Cancel",m.addEventListener("click",(function(){n._dismiss(t),"function"==typeof c&&c()})),y.appendChild(m);var g=document.createElement("button");g.className="url-confirmation-popup-confirm",g.textContent="Open Link",g.addEventListener("click",(function(){n._dismiss(t),window.open(l,"_blank","noopener,noreferrer"),"function"==typeof u&&u()})),y.appendChild(g),h.appendChild(y),this._presentCard(t,h)}else console.warn("⚠️ UrlConfirmationPopup: invalid URL",e)}},{key:"_showKioskTransient",value:function(t){var e=this,n=document.createElement("div");n.className="url-confirmation-popup-card url-confirmation-popup-card--kiosk";var r=document.createElement("div");r.className="url-confirmation-popup-title",r.textContent="Links are disabled",n.appendChild(r);var i=document.createElement("div");i.className="url-confirmation-popup-body",i.textContent="External links can't be opened on this kiosk.",n.appendChild(i),this._presentCard(t,n),this._kioskTimer&&clearTimeout(this._kioskTimer),this._kioskTimer=setTimeout((function(){e._kioskTimer=null,e._dismiss(t)}),2500)}},{key:"_presentCard",value:function(t,e){if(t.showModal(e),t.modalContainer){this._previousContainerBg=t.modalContainer.style.backgroundColor,t.modalContainer.style.backgroundColor="rgba(0, 0, 0, 0.35)";var n=t.modalContainer.querySelector(".waygo-map-modal-content");n&&(n.style.backgroundColor="transparent",n.style.width="auto",n.style.height="auto",n.style.maxWidth="none",n.style.maxHeight="none",n.style.boxShadow="none",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center")}}},{key:"_dismiss",value:function(t){this._kioskTimer&&(clearTimeout(this._kioskTimer),this._kioskTimer=null),this._resetModalStyles(t),t.hideModal()}},{key:"_resetModalStyles",value:function(t){t.modalContainer&&void 0!==this._previousContainerBg&&(t.modalContainer.style.backgroundColor=this._previousContainerBg,this._previousContainerBg=void 0)}}],r&&Xi(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function uo(t){return uo="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},uo(t)}function so(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,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||go(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 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,lo(r.key),r)}}function lo(t){var e=function(t){if("object"!=uo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=uo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==uo(e)?e:e+""}function ho(t,e,n){return e=po(e),function(t,e){if(e&&("object"==uo(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||[],po(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 po(t){return po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},po(t)}function yo(t,e){return yo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},yo(t,e)}function mo(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=go(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function go(t,e){if(t){if("string"==typeof t)return Do(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)?Do(t,e):void 0}}function Do(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}var vo=new Set(["the","of","and","&"]),Mo=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\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uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])|(?:[0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDF50-\uDF59\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD839[\uDCF0-\uDCF9]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9])/;function bo(t){return t.replace(/^(?:[\0-\/:-@\[-`\{-\xA9\xAB-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u065F\u066A-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07BF\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0965\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\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1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u1368\u137D-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u17DF\u17EA-\u17EF\u17FA-\u180F\u181A-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19FF\u1A17-\u1A1F\u1A55-\u1A7F\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B4F\u1B5A-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BFF\u1C24-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u206F\u2072\u2073\u207A-\u207E\u208A-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A-\u245F\u249C-\u24E9\u2500-\u2775\u2794-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFC\u2CFE\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3008-\u3020\u302A-\u3030\u3036\u3037\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u3191\u3196-\u319F\u31C0-\u31EF\u3200-\u321F\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6F0-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA82F\uA836-\uA83F\uA874-\uA881\uA8B4-\uA8CF\uA8DA-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9DA-\uA9DF\uA9E5\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\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?:[\0-\/:-@\[-`\{-\xA9\xAB-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u065F\u066A-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07BF\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0965\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09E5\u09F2\u09F3\u09FA\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A65\u0A70\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AE5\u0AF0-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B65\u0B70\u0B78-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0BE5\u0BF3-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C65\u0C70-\u0C77\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CE5\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57\u0D62-\u0D65\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DE5\u0DF0-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F1F\u0F34-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u104A-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u1368\u137D-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u17DF\u17EA-\u17EF\u17FA-\u180F\u181A-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19FF\u1A17-\u1A1F\u1A55-\u1A7F\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B4F\u1B5A-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BFF\u1C24-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u206F\u2072\u2073\u207A-\u207E\u208A-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A-\u245F\u249C-\u24E9\u2500-\u2775\u2794-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFC\u2CFE\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3008-\u3020\u302A-\u3030\u3036\u3037\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u3191\u3196-\u319F\u31C0-\u31EF\u3200-\u321F\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6F0-\uA716\uA720\uA721\uA789\uA78A\uA7C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uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+$/g,"")}function wo(t){var e,n=mo(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(Mo.test(r))return r}}catch(t){n.e(t)}finally{n.f()}return null}const Eo=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=ho(this,e,[r])).childPlacement=t,n.maxValueLength=50,n.maxEntriesToShow=3,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&&yo(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="content-details-child-view",this.element.setAttribute("role","button"),this.element.tabIndex=0,this.bodyElement=document.createElement("div"),this.bodyElement.className="content-details-child-view-body",this.titleElement=document.createElement("div"),this.titleElement.className="content-details-child-view-title";var t=this.childPlacement.catalog.content_title_key,e=this.childPlacement.content.data[t];this.titleElement.textContent="".concat(e),this._render()}},{key:"_getDisplayImageUrl",value:function(){var t,e,n=null===(t=this.childPlacement.catalog)||void 0===t?void 0:t.content_display_img_key;if(!n)return null;var r=null===(e=this.childPlacement.content)||void 0===e||null===(e=e.data)||void 0===e?void 0:e[n];if(null==r)return null;if("string"==typeof r){var i=r.trim();return""===i?null:i}return r}},{key:"_getTitleInitials",value:function(t){if(null==t)return null;var e=String(t).trim();if(""===e||!Mo.test(e))return null;var n=e.split(/[\s&]+/).filter((function(t){return t.length>0})).map(bo).filter((function(t){return t.length>0&&!vo.has(t.toLowerCase())}));if(n.length>=2){var r=wo(n[0]),i=wo(n[1]);if(r&&i)return(r+i).toLocaleUpperCase()}var o=function(t){var e,n=[],r=mo(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(Mo.test(i)&&(n.push(i),2===n.length))break}}catch(t){r.e(t)}finally{r.f()}return n}(e);return 0===o.length?null:o.join("").toLocaleUpperCase()}},{key:"_truncateText",value:function(t,e){return t.length>e?t.slice(0,e-3)+"...":t}},{key:"findViableDataEntriesInSchemaOrder",value:function(t){for(var e=t.content.data||{},n=t.catalog.data_schema||{},r=t.catalog.content_title_key,i=t.catalog.content_display_img_key,o=t.excluded_child_fields||[],a=[],u=0,s=Object.entries(n);u<s.length;u++){var c=so(s[u],2),l=c[0],h=c[1];if(!l.startsWith("_")&&"image"!==h&&"url"!==h&&l!==r&&l!==i&&!o.includes(l)){var f=e[l];f&&"string"==typeof f&&""!==f.trim()&&a.push([l,f.trim()])}}return a}},{key:"findViableUrlEntriesInSchemaOrder",value:function(t){for(var e=t.catalog.data_schema||{},n=[],r=0,i=Object.entries(e);r<i.length;r++){var o,a=so(i[r],2),u=a[0],s=a[1];if(!u.startsWith("_")&&"url"===s){var c=null===(o=t.content.data)||void 0===o?void 0:o[u];oo(c)&&n.push([u,io(c)])}}return n}},{key:"_renderUrlPills",value:function(){var t=this,e=this.findViableUrlEntriesInSchemaOrder(this.childPlacement);if(0!==e.length){var n=document.createElement("div");n.className="content-details-child-view-pills",e.forEach((function(e){var r=so(e,2),i=r[0],o=r[1],a=new Ki(i,o);a.on("click",(function(e){var n=e.url;t.fire("selectUrlButton",{url:n,source:"list-pill"})})),n.appendChild(a.getElement())})),this.bodyElement.appendChild(n)}}},{key:"_renderImageFallback",value:function(t,e){t.classList.add("content-details-child-view-image--placeholder");var n=this._getTitleInitials(e);if(null===n){var r=document.createElement("img");return r.className="content-details-child-view-image-fallback-icon",r.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHZpZXdCb3g9IjAgMCAzNCAzNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTciIGN5PSIxNyIgcj0iMTMuNzUiIHN0cm9rZT0iI0UxRTFFMSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KPHBhdGggZD0iTTEyLjc1IDE1LjgzMzNDMTMuNjcwNSAxNS44MzMzIDE0LjQxNjYgMTUuMDg3MSAxNC40MTY2IDE0LjE2NjdDMTQuNDE2NiAxMy4yNDYyIDEzLjY3MDUgMTIuNSAxMi43NSAxMi41QzExLjgyOTUgMTIuNSAxMS4wODMzIDEzLjI0NjIgMTEuMDgzMyAxNC4xNjY3QzExLjA4MzMgMTUuMDg3MSAxMS44Mjk1IDE1LjgzMzMgMTIuNzUgMTUuODMzM1oiIGZpbGw9IiNFMUUxRTEiIHN0cm9rZT0iI0UxRTFFMSIgc3Ryb2tlLXdpZHRoPSIwLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8cGF0aCBkPSJNMjEuMjUgMTUuODMzM0MyMi4xNzA1IDE1LjgzMzMgMjIuOTE2NiAxNS4wODcxIDIyLjkxNjYgMTQuMTY2N0MyMi45MTY2IDEzLjI0NjIgMjIuMTcwNSAxMi41IDIxLjI1IDEyLjVDMjAuMzI5NSAxMi41IDE5LjU4MzMgMTMuMjQ2MiAxOS41ODMzIDE0LjE2NjdDMTkuNTgzMyAxNS4wODcxIDIwLjMyOTUgMTUuODMzMyAyMS4yNSAxNS44MzMzWiIgZmlsbD0iI0UxRTFFMSIgc3Ryb2tlPSIjRTFFMUUxIiBzdHJva2Utd2lkdGg9IjAuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTEuOTc5MSAyMS4yNUMxMS43MDA2IDIxLjI1IDExLjU2MTMgMjEuMjUgMTEuNDg2NCAyMS4zNTEyQzExLjQxMTQgMjEuNDUyNCAxMS40NDkgMjEuNTc1OCAxMS41MjQzIDIxLjgyMjdDMTIuMTY5NiAyMy45NDAyIDE0LjM3NjYgMjUuNSAxNyAyNS41QzE5LjYyMzMgMjUuNSAyMS44MzAzIDIzLjk0MDIgMjIuNDc1NyAyMS44MjI3QzIyLjU1MSAyMS41NzU4IDIyLjU4ODYgMjEuNDUyNCAyMi41MTM2IDIxLjM1MTJDMjIuNDM4NyAyMS4yNSAyMi4yOTk0IDIxLjI1IDIyLjAyMDkgMjEuMjVIMTEuOTc5MVoiIGZpbGw9IiNFMUUxRTEiLz4KPC9zdmc+Cg==",r.alt="",void t.appendChild(r)}var i=document.createElement("span");i.className="content-details-child-view-image-initials",i.textContent=n,t.appendChild(i)}},{key:"_renderImageView",value:function(t){var e=this;this.element.classList.add("content-details-child-view--with-image");var n=document.createElement("div");n.className="content-details-child-view-image";var r=this._getDisplayImageUrl();if(r){var i=document.createElement("img");i.className="content-details-child-view-image-src",i.src=r,i.alt="",i.addEventListener("error",(function(){i.remove(),e._renderImageFallback(n,t)})),n.appendChild(i)}else this._renderImageFallback(n,t);this.element.appendChild(n)}},{key:"_render",value:function(){var t,e=this,n=this.childPlacement.catalog.content_title_key,r=this.childPlacement.content.data[n];this._renderImageView(r);var i=null===(t=this.childPlacement.catalog)||void 0===t?void 0:t.title;if(i&&""!==String(i).trim()){var o=document.createElement("div");o.className="content-details-child-view-catalog-title",o.textContent=String(i).trim(),this.bodyElement.appendChild(o)}this.bodyElement.appendChild(this.titleElement);var a=this.findViableDataEntriesInSchemaOrder(this.childPlacement),u=a.slice(0,this.maxEntriesToShow);if(0===a.length)this.element.classList.add("content-details-child-view--title-only");else{var s=document.createElement("div");s.className="content-details-child-view-details",u.forEach((function(t){var n=so(t,2),r=n[0],i=n[1],o=document.createElement("div");o.className="content-details-child-view-data-row";var a=document.createElement("div");a.className="content-details-child-view-data-key",a.textContent=r;var u=document.createElement("div");u.className="content-details-child-view-data-value",u.textContent=e._truncateText(String(i),e.maxValueLength),o.appendChild(a),o.appendChild(u),s.appendChild(o)})),this.bodyElement.appendChild(s)}this._renderUrlPills(),this.element.appendChild(this.bodyElement)}},{key:"getElement",value:function(){return this.element}}])&&co(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function Co(t){return Co="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},Co(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,Ao(r.key),r)}}function Ao(t){var e=function(t){if("object"!=Co(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Co(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Co(e)?e:e+""}function No(t,e,n){return e=Io(e),function(t,e){if(e&&("object"==Co(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||[],Io(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 Io(t){return Io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Io(t)}function To(t,e){return To=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},To(t,e)}const Fo=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=No(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&&To(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){var t=this;this._cell=new Eo(this.result),this.element=this._cell.getElement(),this._cell.on("selectUrlButton",(function(e){return t.fire("selectUrlButton",e)})),this._setupEventListeners()}},{key:"_setupEventListeners",value:function(){var t=this;this.element.addEventListener("click",(function(){return t.fire("click",{result:t.result})})),this.element.addEventListener("mouseover",(function(){return t.fire("hover",{result:t.result})})),this.element.addEventListener("mouseout",(function(){return t.fire("hoverOut",{result:t.result})}))}},{key:"getElement",value:function(){return this.element}}])&&jo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);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 ko(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"!=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 Lo(t,e,n){return e=zo(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,_o()?Reflect.construct(e,n||[],zo(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 zo(t){return zo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zo(t)}function Po(t,e){return Po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Po(t,e)}const Bo=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=Lo(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&&Po(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="loading-cell",this.render()}},{key:"render",value:function(){this.element.innerHTML='\n <div class="loading-spinner"></div>\n '}},{key:"getElement",value:function(){return this.element}}])&&ko(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function Uo(t){return Uo="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},Uo(t)}function Ro(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 Qo(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"!=Uo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Uo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Uo(e)?e:e+""}function Vo(t,e,n){return e=Go(e),function(t,e){if(e&&("object"==Uo(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,Ho()?Reflect.construct(e,n||[],Go(t).constructor):e.apply(t,n))}function Ho(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ho=function(){return!!t})()}function Go(t){return Go=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Go(t)}function Zo(t,e){return Zo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zo(t,e)}const Wo=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=Vo(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&&Zo(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.results=[],this.loading=!1,this.element=document.createElement("div"),this.element.className="search-results-view",this.scrollBody=document.createElement("div"),this.scrollBody.className="search-results-view-scroll",this.titleElement=document.createElement("h3"),this.titleElement.className="search-results-title",this.scrollBody.appendChild(this.titleElement),this.element.appendChild(this.scrollBody)}},{key:"showLoadingCell",value:function(){if(!this.loading){var t=new Bo;this.loading=!0,this.scrollBody.appendChild(t.getElement())}}},{key:"hideLoadingCell",value:function(){var t=this.element.querySelector(".loading-cell");t&&t.parentNode&&t.parentNode.removeChild(t),this.loading=!1}},{key:"updateView",value:function(t,e){this.results=t,t.length>0&&this.setTitle("Results for '".concat(e,"'")),0===t.length&&this.setTitle("No matching results for '".concat(e,"'")),this.scrollToTop(),this.render()}},{key:"scrollToTop",value:function(){this.scrollBody.scrollTop=0}},{key:"updateResults",value:function(t){this.results=t,this.render()}},{key:"extendResults",value:function(t){var e;(e=this.results).push.apply(e,function(t){return function(t){if(Array.isArray(t))return Ro(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ro(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)?Ro(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)),this.render()}},{key:"render",value:function(){for(var t=this;this.scrollBody.children.length>1;)this.scrollBody.removeChild(this.scrollBody.lastChild);var e=document.createElement("div");e.className="content-details-children-list-view",this.results.forEach((function(n){var r=new Fo(n);r.on("click",(function(){return t.fire("selectCell",{result:n})})),r.on("hover",(function(){return t.fire("hoverCell",{result:n})})),r.on("hoverOut",(function(){return t.fire("hoverOutCell",{result:n})})),r.on("selectUrlButton",(function(e){return t.fire("selectUrlButton",e)})),e.appendChild(r.getElement())})),this.scrollBody.appendChild(e)}},{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}},{key:"getScrollElement",value:function(){return this.scrollBody}}])&&Qo(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function qo(t){return qo="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},qo(t)}function Ko(){Ko=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==qo(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(qo(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Jo(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function Xo(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Jo(o,r,i,a,u,"next",t)}function u(t){Jo(o,r,i,a,u,"throw",t)}a(void 0)}))}}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,ta(r.key),r)}}function ta(t){var e=function(t){if("object"!=qo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=qo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qo(e)?e:e+""}function ea(t,e,n){return e=ia(e),function(t,e){if(e&&("object"==qo(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,na()?Reflect.construct(e,n||[],ia(t).constructor):e.apply(t,n))}function na(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(na=function(){return!!t})()}function ra(){return ra="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ia(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},ra.apply(null,arguments)}function ia(t){return ia=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ia(t)}function oa(t,e){return oa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},oa(t,e)}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=ea(this,e,[n])).searchResultsView=new Wo,t.searchApi=nn.getSearchApi(),t.searchedQuery=null,t.map=null,t.lastSearchLength=0,t.skip=0,t.limit=30,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&&oa(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.hide(),this._initializeEventListeners(),this._attachResizeListener(),this._attachScrollListener(),this._initialize(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=ra(ia(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"show",value:function(){this.container&&(this.container.style.display="flex",this._isMobileLayout()&&this.map&&"function"==typeof this.map._lockMobileScroll&&(this.map._lockMobileScroll(),this._mobileScrollLocked=!0))}},{key:"hide",value:function(){this.container&&(this.container.style.display="none",this._mobileScrollLocked&&this.map&&"function"==typeof this.map._unlockMobileScroll&&(this.map._unlockMobileScroll(),this._mobileScrollLocked=!1))}},{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.map.on("state:setup",this._handleSetupState.bind(this)),this.searchResultsView.on("closeView",this._handleCloseSearchResultsView.bind(this)),this.searchResultsView.on("selectCell",this._handleSearchResultSelect.bind(this)),this.searchResultsView.on("selectUrlButton",this._handleSelectUrlButton.bind(this)),this.searchResultsView.on("hoverCell",this._handleCellHover.bind(this)),this.searchResultsView.on("hoverOutCell",this._handleCellHoverOut.bind(this))}},{key:"_handleCellHover",value:function(t){var e=t.result;this.map.fire("hoverSearchResult",{result:e})}},{key:"_handleCellHoverOut",value:function(t){var e=t.result;this.map.fire("hoverEndSearchResult",{result:e})}},{key:"_attachScrollListener",value:function(){this.searchResultsView.getScrollElement().addEventListener("scroll",this._handleScroll.bind(this))}},{key:"_renderDesktopView",value:function(){var t=this.searchResultsView.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view")}},{key:"_renderMobileView",value:function(){var t=this.searchResultsView.getElement();this.container.appendChild(t),this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view")}},{key:"_handleScroll",value:(o=Xo(Ko().mark((function t(){var e,n,r,i,o;return Ko().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.searchResultsView.getScrollElement(),n=e.scrollTop,r=e.scrollHeight,i=e.clientHeight,!(r-n-i+0<10)||this.searchResultsView.loading||this.lastSearchLength!==this.limit){t.next=17;break}return this.searchResultsView.showLoadingCell(),t.next=8,this._getAdditionalSearchResults();case 8:if(o=t.sent){t.next=12;break}return this.searchResultsView.hideLoadingCell(),t.abrupt("return");case 12:this.lastSearchLength=o.length,this.searchResultsView.extendResults(o),this.skip+=this.limit,this.map.fire("additionalSearchResults",{results:o}),this.searchResultsView.hideLoadingCell();case 17:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"_getAdditionalSearchResults",value:(i=Xo(Ko().mark((function t(){var e,n,r;return Ko().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.searchedQuery,n=this.map.getCurrentFloor(),""!==e){t.next=5;break}return this.searchBox.searchBarSuggestionsView.updateResults([]),t.abrupt("return");case 5:if(this.map.mapData){t.next=7;break}return t.abrupt("return");case 7:return t.prev=7,t.next=10,this.searchApi.search(this.map.mapData.map_id,this.map.mapData.map_view_id,e,this.skip,this.limit,n);case 10:return r=t.sent,t.abrupt("return",r);case 14:t.prev=14,t.t0=t.catch(7),axios.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 17:case"end":return t.stop()}}),t,this,[[7,14]])}))),function(){return i.apply(this,arguments)})},{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:"_handleSelectUrlButton",value:function(t){var e=t.url;e&&(this.urlConfirmationPopup||(this.urlConfirmationPopup=new ao),this.urlConfirmationPopup.show(this.map,e,{isKioskMode:"kiosk"===this.currentViewType}))}},{key:"_handleCloseSearchResultsView",value:function(){this.map.setToDefaultState()}},{key:"_handleDefaultState",value:function(){this.searchedQuery=null,this.searchResultsView.updateResults([]),this.searchResultsView.scrollToTop(),this.hide()}},{key:"_handleSearchState",value:function(t){var e=t.query,n=t.results;this.searchedQuery=e,this.lastSearchLength=n.length,this.skip=this.limit,this.searchResultsView.updateView(n,e),this.show()}},{key:"_handleSelectedContentState",value:function(t){this.searchResultsView.updateResults([]),this.hide()}},{key:"_handleDirectionsState",value:function(t){}},{key:"_handleSetupState",value:function(){this.hide()}}],r&&$o(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o}(di);function ua(t){return ua="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},ua(t)}function sa(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,ca(r.key),r)}}function ca(t){var e=function(t){if("object"!=ua(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ua(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ua(e)?e:e+""}function la(t,e,n){return e=fa(e),function(t,e){if(e&&("object"==ua(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||[],fa(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 fa(t){return fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fa(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=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=la(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&&pa(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("div"),this.element.className="sticky-panel-header",this.handleElement=document.createElement("div"),this.handleElement.className="sticky-panel-handle",this.handleElement.setAttribute("aria-hidden","true"),this.element.appendChild(this.handleElement),this.rowElement=null,this.titleElement=null,this.buttonsElement=null,this.customSlotElement=null,null!=this.options.title&&this.setTitle(this.options.title),Array.isArray(this.options.buttons)&&this.options.buttons.forEach((function(e){return t.addButton(e)})),null!=this.options.customElement&&this.setCustomElement(this.options.customElement)}},{key:"_ensureRow",value:function(){this.rowElement||(this.rowElement=document.createElement("div"),this.rowElement.className="sticky-panel-header-row",this.customSlotElement?this.element.insertBefore(this.rowElement,this.customSlotElement):this.element.appendChild(this.rowElement))}},{key:"_ensureTitle",value:function(){this.titleElement||(this._ensureRow(),this.titleElement=document.createElement("h3"),this.titleElement.className="sticky-panel-title",this.rowElement.insertBefore(this.titleElement,this.rowElement.firstChild))}},{key:"_ensureButtons",value:function(){this.buttonsElement||(this._ensureRow(),this.buttonsElement=document.createElement("div"),this.buttonsElement.className="sticky-panel-header-buttons",this.rowElement.appendChild(this.buttonsElement))}},{key:"setTitle",value:function(t){this._ensureTitle(),this.titleElement.textContent=null!=t?String(t):""}},{key:"addButton",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.label,n=t.onClick,r=t.ariaLabel,i=t.className;this._ensureButtons();var o=document.createElement("button");return o.type="button",o.className="sticky-panel-header-button".concat(i?" ".concat(i):""),o.textContent=null!=e?String(e):"",r&&o.setAttribute("aria-label",r),"function"==typeof n&&o.addEventListener("click",n),this.buttonsElement.appendChild(o),o}},{key:"setCustomElement",value:function(t){for(this.customSlotElement||(this.customSlotElement=document.createElement("div"),this.customSlotElement.className="sticky-panel-header-custom",this.element.appendChild(this.customSlotElement));this.customSlotElement.firstChild;)this.customSlotElement.removeChild(this.customSlotElement.firstChild);if(null!=t){var e="function"==typeof t.getElement?t.getElement():t;this.customSlotElement.appendChild(e)}}},{key:"getElement",value:function(){return this.element}}],r&&sa(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function ya(t){return ya="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},ya(t)}function ma(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,ga(r.key),r)}}function ga(t){var e=function(t){if("object"!=ya(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ya(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ya(e)?e:e+""}function Da(t,e,n){return e=ba(e),function(t,e){if(e&&("object"==ya(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,va()?Reflect.construct(e,n||[],ba(t).constructor):e.apply(t,n))}function va(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(va=function(){return!!t})()}function Ma(){return Ma="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ba(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Ma.apply(null,arguments)}function ba(t){return ba=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ba(t)}function wa(t,e){return wa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wa(t,e)}const Ea=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=Da(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&&wa(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("div"),this.element.className="sticky-panel-content",this.innerElement=document.createElement("div"),this.innerElement.className="sticky-panel-content-inner",this.element.appendChild(this.innerElement),this._onNativeScroll=function(){t.element.scrollTop=0,t.element.scrollLeft=0},this.element.addEventListener("scroll",this._onNativeScroll)}},{key:"setContent",value:function(t){for(;this.innerElement.firstChild;)this.innerElement.removeChild(this.innerElement.firstChild);if(null!=t){var e="function"==typeof t.getElement?t.getElement():t;this.innerElement.appendChild(e)}}},{key:"setScrollTop",value:function(t){this.innerElement.style.transform=t>0?"translate3d(0, ".concat(-t,"px, 0)"):""}},{key:"getContentHeight",value:function(){return this.innerElement.offsetHeight}},{key:"getElement",value:function(){return this.element}},{key:"getInnerElement",value:function(){return this.innerElement}},{key:"destroy",value:function(){var t,n,r;this.element.removeEventListener("scroll",this._onNativeScroll),(t=e,n=this,r=Ma(ba(1&3?t.prototype:t),"destroy",n),function(t){return r.apply(n,t)})([])}}],r&&ma(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);var Ca=.55;function ja(t,e){return e>0&&t>0?(1-1/(t*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ca)/e+1))*e:0}function Aa(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ca;if(!(e>0&&t>0))return 0;var r=Math.min(t,e*(1-1e-9));return r*e/(n*(e-r))}function Na(t){return Na="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},Na(t)}var Sa=["collapsed","mid","full"],Ia=Object.freeze({collapsed:.2,mid:.5,full:.9});function Ta(t){if(null==t)return Ia;var e=[];return"object"!==Na(t)||Array.isArray(t)?e.push("stickyPoints must be an object like { collapsed, mid, full }"):(Sa.forEach((function(n){var r;"number"==typeof(r=t[n])&&Number.isFinite(r)&&r>0&&r<=1||e.push("stickyPoints.".concat(n," must be a number in (0, 1] — received ").concat(JSON.stringify(t[n])))})),0!==e.length||t.collapsed<t.mid&&t.mid<t.full||e.push("stickyPoints must satisfy collapsed < mid < full — received ".concat(t.collapsed," / ").concat(t.mid," / ").concat(t.full))),e.length>0?(console.warn("⚠️ StickyPanelView: invalid stickyPoints (".concat(e.join("; "),"). Falling back to defaults ").concat(Ia.collapsed,"/").concat(Ia.mid,"/").concat(Ia.full,".")),Ia):Object.freeze({collapsed:t.collapsed,mid:t.mid,full:t.full})}function Fa(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mid";return Sa.includes(t)?t:(null!=t&&console.warn('⚠️ StickyPanelView: unknown sticky point "'.concat(t,'" — expected one of ').concat(Sa.join(", "),". Using '").concat(e,"'.")),e)}var Oa=1e-6;const ka={schedule:function(t){return requestAnimationFrame(t)},cancel:function(t){cancelAnimationFrame(t)},now:function(){return performance.now()}};function xa(t){return xa="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},xa(t)}function La(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,_a(r.key),r)}}function _a(t){var e=function(t){if("object"!=xa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xa(e)?e:e+""}const za=function(){return t=function t(e){var n=e.from,r=e.to,i=e.velocity,o=void 0===i?0:i,a=e.stiffness,u=void 0===a?420:a,s=e.damping,c=void 0===s?38:s,l=e.mass,h=void 0===l?1:l,f=e.restDelta,p=void 0===f?.3:f,d=e.restSpeed,y=void 0===d?10:d,m=e.onUpdate,g=e.onComplete,D=e.scheduler,v=void 0===D?ka:D;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.to=r,this.stiffness=u,this.damping=c,this.mass=h,this.restDelta=p,this.restSpeed=y,this.onUpdate=m,this.onComplete=g,this.scheduler=v,this._value=n,this._velocity=1e3*o,this._running=!1,this._frameId=null,this._lastTime=0},(e=[{key:"start",value:function(){var t=this;return this._running||(this._running=!0,this._lastTime=this.scheduler.now(),this._frameId=this.scheduler.schedule((function(){return t._tick()}))),this}},{key:"stop",value:function(){return this._running?(this._running=!1,null!==this._frameId&&(this.scheduler.cancel(this._frameId),this._frameId=null),this):this}},{key:"isRunning",get:function(){return this._running}},{key:"getVelocity",value:function(){return this._velocity/1e3}},{key:"getValue",value:function(){return this._value}},{key:"_tick",value:function(){var t=this;if(this._running){var e=this.scheduler.now(),n=Math.min(e-this._lastTime,64);for(this._lastTime=e;n>0;){var r=Math.min(n,8)/1e3;n-=8;var i=(-this.stiffness*(this._value-this.to)-this.damping*this._velocity)/this.mass;this._velocity+=i*r,this._value+=this._velocity*r}if(Math.abs(this._velocity)<this.restSpeed&&Math.abs(this._value-this.to)<this.restDelta)return this._value=this.to,this._velocity=0,this._running=!1,this._frameId=null,this.onUpdate(this._value),void(this.onComplete&&this.onComplete());this.onUpdate(this._value),this._frameId=this.scheduler.schedule((function(){return t._tick()}))}}}])&&La(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Pa(t){return Pa="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},Pa(t)}function Ba(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,Ua(r.key),r)}}function Ua(t){var e=function(t){if("object"!=Pa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pa(e)?e:e+""}const Ra=function(){return t=function t(e){var n=e.from,r=e.velocity,i=e.min,o=e.max,a=e.decayRate,u=void 0===a?.998:a,s=e.restSpeed,c=void 0===s?.02:s,l=e.onUpdate,h=e.onComplete,f=e.scheduler,p=void 0===f?ka:f;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.min=i,this.max=o,this.decayRate=u,this.restSpeed=c,this.onUpdate=l,this.onComplete=h,this.scheduler=p,this._value=n,this._velocity=r,this._running=!1,this._frameId=null,this._lastTime=0},(e=[{key:"start",value:function(){var t=this;return this._running||(this._running=!0,this._lastTime=this.scheduler.now(),this._frameId=this.scheduler.schedule((function(){return t._tick()}))),this}},{key:"stop",value:function(){return this._running?(this._running=!1,null!==this._frameId&&(this.scheduler.cancel(this._frameId),this._frameId=null),this):this}},{key:"isRunning",get:function(){return this._running}},{key:"getVelocity",value:function(){return this._velocity}},{key:"getValue",value:function(){return this._value}},{key:"_finish",value:function(t){var e=this._velocity;this._running=!1,this._frameId=null,this._velocity=0,this.onUpdate(this._value),this.onComplete&&this.onComplete(this._value,e,t)}},{key:"_tick",value:function(){var t=this;if(this._running){var e=this.scheduler.now(),n=Math.min(e-this._lastTime,64);for(this._lastTime=e;n>0;){var r=Math.min(n,8);if(n-=8,this._value+=this._velocity*r,this._velocity*=Math.pow(this.decayRate,r),this._value<=this.min)return this._value=this.min,void this._finish("min");if(this._value>=this.max)return this._value=this.max,void this._finish("max")}Math.abs(this._velocity)<this.restSpeed?this._finish(null):(this.onUpdate(this._value),this._frameId=this.scheduler.schedule((function(){return t._tick()})))}}}])&&Ba(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Qa(t){return Qa="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},Qa(t)}function Ya(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 Va(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ya(Object(n),!0).forEach((function(e){Ha(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ha(t,e,n){return(e=Za(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ga(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,Za(r.key),r)}}function Za(t){var e=function(t){if("object"!=Qa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Qa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qa(e)?e:e+""}var Wa=1e-6,qa=1e-4,Ka=Object.freeze({snapVelocityThresholdPxPerMs:.25,flingVelocityThresholdPxPerMs:.05,maxVelocityPxPerMs:6,rubberbandCoefficient:Ca,panelSpring:Object.freeze({stiffness:420,damping:38}),scrollReturnSpring:Object.freeze({stiffness:600,damping:50}),scrollDecayRate:.998}),Ja=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.points,r=e.initialPoint,i=void 0===r?"mid":r,o=e.metrics,a=e.callbacks,u=void 0===a?{}:a,s=e.scheduler,c=void 0===s?ka:s,l=e.config,h=void 0===l?{}:l;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.points=Ta(n),this.initialPoint=Fa(i),this.metrics=o,this.callbacks=u,this.scheduler=c,this.config=Va(Va({},Ka),h),this.position=0,this.scrollTop=0,this.stickyPoint=null,this._drag=null,this._panelAnimation=null,this._panelAnimationTargetKey=null,this._dismissFinish=null,this._scrollDecay=null,this._scrollReturn=null,this._initialized=!1,this._destroyed=!1},e=[{key:"getPosition",value:function(){return this.position}},{key:"getScrollTop",value:function(){return this.scrollTop}},{key:"getStickyPoint",value:function(){return this.stickyPoint}},{key:"isDragging",value:function(){return null!==this._drag}},{key:"initializePosition",value:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).animate,e=void 0===t||t;this._destroyed||this._initialized||(this._initialized=!0,this.snapTo(this.initialPoint,{animate:e}))}},{key:"refreshMetrics",value:function(){if(!this._destroyed){if(this._panelAnimation&&this._panelAnimation.isRunning){var t=this._panelAnimationTargetKey,e=this._dismissFinish;this._stopPanelAnimation(),e?(this._setPosition(0),e()):t&&(this._setPosition(this.points[t]),this._settle(t))}var n=this._maxScroll();this.scrollTop>n&&(this._stopScrollAnimations(),this._setScroll(n)),this.renderCurrent()}}},{key:"renderCurrent",value:function(){this._destroyed||(this._emitPanelPosition(),this._emitScroll())}},{key:"destroy",value:function(){this._stopAllAnimations(),this._drag=null,this._destroyed=!0}},{key:"dragStart",value:function(t){this._destroyed||this._height()<=0||(this._stopAllAnimations(),this._drag={region:"header"===t?"header":"content",rawPosition:this._displayToRaw(this.position)},this._emitDragging(!0))}},{key:"dragMove",value:function(t){if(!this._destroyed&&this._drag){var e=this._height();if(!(e<=0)&&Number.isFinite(t)&&0!==t){var n=-t/e;"header"===this._drag.region?this._drag.rawPosition+=n:this._contentDragBy(n,e),this._setPosition(this._rawToDisplay(this._drag.rawPosition))}}}},{key:"dragEnd",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(!this._destroyed&&this._drag){var e=this._drag,n=e.region,r=e.rawPosition;this._drag=null,this._emitDragging(!1);var i=this.config.maxVelocityPxPerMs,o=Number.isFinite(t)?t:0,a=Math.max(-i,Math.min(i,-o));if("content"===n&&Math.abs(r-this.points.full)<qa){var u=this._maxScroll();if(u>Wa&&(this.scrollTop>Wa||a>0))return this._settle("full"),void(Math.abs(a)>=this.config.flingVelocityThresholdPxPerMs&&this._startScrollDecay(a,u))}var s=function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Ca,a=0,u=0;if(t>n)a=t-n,u=i-n;else{if(!(t<e))return 1;a=e-t,u=e-r}if(!(u>0))return 0;var s=a*o/u+1;return o/(s*s)}(r,this.points.collapsed,this.points.full,0,1,this.config.rubberbandCoefficient);this._snapFrom(a*s)}}},{key:"dragCancel",value:function(){this.dragEnd(0)}},{key:"snapTo",value:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).animate,n=void 0===e||e;if(this._destroyed)return!1;if(!Sa.includes(t))return console.warn("⚠️ StickyPanelView: snapTo expects one of ".concat(Sa.join(", "),' — received "').concat(t,'".')),!1;if(this._drag)return!1;this._stopPanelAnimation();var r=this.points[t];return!n||this._height()<=0?(this._setPosition(r),this._settle(t),!0):(this._animatePanelTo(t,0),!0)}},{key:"presentAt",value:function(t){return!(this._destroyed||this._drag||this._height()<=0||!Number.isFinite(t)||(this._stopAllAnimations(),this._setPosition(Math.max(0,Math.min(1,t))),0))}},{key:"beginPresentation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.startPosition,n=void 0===e?null:e,r=t.snapTo,i=void 0===r?this.initialPoint:r,o=t.animate,a=void 0===o||o;if(!this._destroyed){this._drag&&(this._drag=null,this._emitDragging(!1)),this._stopAllAnimations(),this._initialized=!0;var u=this._maxScroll();this.scrollTop>u&&this._setScroll(u),this._height()>0&&null!=n&&Number.isFinite(n)?this._setPosition(Math.max(0,Math.min(1,n))):this.renderCurrent(),this.snapTo(i,{animate:a})}}},{key:"dismiss",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.animate,r=void 0===n||n,i=e.onComplete;if(!this._destroyed){this._drag&&(this._drag=null,this._emitDragging(!1)),this._stopAllAnimations(),this.stickyPoint=null;var o=function(){t._dismissFinish=null,t._stopScrollAnimations(),t._setScroll(0),i&&i()},a=this._height();if(!r||a<=0||this.position<=Wa)return this._setPosition(0),void o();this._dismissFinish=o,this._panelAnimation=new za({from:this.position*a,to:0,velocity:0,stiffness:this.config.panelSpring.stiffness,damping:this.config.panelSpring.damping,scheduler:this.scheduler,onUpdate:function(e){return t._setPosition(Math.max(0,Math.min(1,e/a)))},onComplete:function(){t._panelAnimation=null,t._setPosition(0),o()}}).start()}}},{key:"scrollToTop",value:function(){this._destroyed||(this._stopScrollAnimations(),this._setScroll(0))}},{key:"stepUp",value:function(){var t=this;if(this._destroyed||this._drag||this._height()<=0)return!1;var e=Sa.map((function(e){return{key:e,value:t.points[e]}})).filter((function(e){return e.value>t.position+qa}));if(0===e.length)return!1;var n=e.reduce((function(t,e){return e.value<t.value?e:t}));return this._stopPanelAnimation(),this._animatePanelTo(n.key,0),!0}},{key:"setStickyPoints",value:function(t){this._destroyed||(this.points=Ta(t),!this._drag&&this.stickyPoint&&this.snapTo(this.stickyPoint,{animate:!0}))}},{key:"_contentDragBy",value:function(t,e){var n=this._drag,r=this.points.full;if(t>0){var i=t;if(n.rawPosition<r-Wa){var o=Math.min(i,r-n.rawPosition);n.rawPosition+=o,i-=o}if(i>Wa&&n.rawPosition<=r+Wa){var a=this._maxScroll();if(a>Wa&&this.scrollTop<a-Wa){var u=Math.min(i*e,a-this.scrollTop);this._setScroll(this.scrollTop+u),i-=u/e,n.rawPosition=r}}i>Wa&&(n.rawPosition+=i)}else{var s=-t;if(n.rawPosition>r+Wa){var c=Math.min(s,n.rawPosition-r);n.rawPosition-=c,s-=c}if(s>Wa&&this.scrollTop>Wa){var l=Math.min(s*e,this.scrollTop);this._setScroll(this.scrollTop-l),s-=l/e}s>Wa&&(n.rawPosition-=s)}}},{key:"_snapFrom",value:function(t){var e=this._height();if(!(e<=0)){var n=t/e,r=this.config.snapVelocityThresholdPxPerMs/e,i=function(t,e,n,r){var i=Sa.map((function(t){return{key:t,value:n[t]}}));if(Math.abs(e)>=r){if(e>0){var o=i.filter((function(e){return e.value>t+Oa}));return o.length>0?o.reduce((function(t,e){return e.value<t.value?e:t})):i[i.length-1]}var a=i.filter((function(e){return e.value<t-Oa}));return a.length>0?a.reduce((function(t,e){return e.value>t.value?e:t})):i[0]}return i.reduce((function(e,n){return Math.abs(n.value-t)<Math.abs(e.value-t)?n:e}))}(this.position,n,this.points,r);this._animatePanelTo(i.key,t)}}},{key:"_animatePanelTo",value:function(t,e){var n=this,r=this._height(),i=this.points[t];this._stopPanelAnimation(),this._panelAnimationTargetKey=t,this._panelAnimation=new za({from:this.position*r,to:i*r,velocity:e,stiffness:this.config.panelSpring.stiffness,damping:this.config.panelSpring.damping,scheduler:this.scheduler,onUpdate:function(t){n._setPosition(Math.max(0,Math.min(1,t/r)))},onComplete:function(){n._panelAnimation=null,n._panelAnimationTargetKey=null,n._setPosition(i),n._settle(t)}}).start()}},{key:"_startScrollDecay",value:function(t,e){var n=this;this._stopScrollAnimations(),this._scrollDecay=new Ra({from:this.scrollTop,velocity:t,min:0,max:e,decayRate:this.config.scrollDecayRate,scheduler:this.scheduler,onUpdate:function(t){return n._setScroll(t)},onComplete:function(t,e,r){n._scrollDecay=null,n._setScroll(t),"min"===r&&e<-n.config.flingVelocityThresholdPxPerMs&&n._snapFrom(e)}}).start()}},{key:"_ensureScrollInvariant",value:function(){var t=this;this.scrollTop<=Wa||this.position>=this.points.full-qa||this._scrollReturn&&this._scrollReturn.isRunning||this._drag&&"content"===this._drag.region||(this._scrollDecay&&(this._scrollDecay.stop(),this._scrollDecay=null),this._scrollReturn=new za({from:this.scrollTop,to:0,velocity:0,stiffness:this.config.scrollReturnSpring.stiffness,damping:this.config.scrollReturnSpring.damping,scheduler:this.scheduler,onUpdate:function(e){return t._setScroll(Math.max(0,e))},onComplete:function(){t._scrollReturn=null,t._setScroll(0)}}).start())}},{key:"_height",value:function(){var t=this.metrics&&"function"==typeof this.metrics.getMapHeight?this.metrics.getMapHeight():0;return Number.isFinite(t)&&t>0?t:0}},{key:"_maxScroll",value:function(){var t=this.metrics&&"function"==typeof this.metrics.getMaxScroll?this.metrics.getMaxScroll():0;return Number.isFinite(t)&&t>0?t:0}},{key:"_displayToRaw",value:function(t){return function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Ca;return t>n?n+Aa(t-n,i-n,o):t<e?e-Aa(e-t,e-r,o):t}(t,this.points.collapsed,this.points.full,0,1,this.config.rubberbandCoefficient)}},{key:"_rawToDisplay",value:function(t){return function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Ca;return t>n?n+ja(t-n,i-n,o):t<e?e-ja(e-t,e-r,o):t}(t,this.points.collapsed,this.points.full,0,1,this.config.rubberbandCoefficient)}},{key:"_setPosition",value:function(t){this.position=Math.max(0,Math.min(1,t)),this._emitPanelPosition(),this._ensureScrollInvariant()}},{key:"_setScroll",value:function(t){this.scrollTop=Math.max(0,t),this._emitScroll()}},{key:"_settle",value:function(t){var e=this.stickyPoint;this.stickyPoint=t,this._ensureScrollInvariant(),e!==t&&this.callbacks.onStickyPointChange&&this.callbacks.onStickyPointChange({stickyPoint:t,previousStickyPoint:e})}},{key:"_emitPanelPosition",value:function(){this.callbacks.onPanelPositionChange&&this.callbacks.onPanelPositionChange(this.position)}},{key:"_emitScroll",value:function(){this.callbacks.onScrollChange&&this.callbacks.onScrollChange(this.scrollTop)}},{key:"_emitDragging",value:function(t){this.callbacks.onDraggingChange&&this.callbacks.onDraggingChange(t)}},{key:"_stopPanelAnimation",value:function(){this._panelAnimation&&(this._panelAnimation.stop(),this._panelAnimation=null,this._panelAnimationTargetKey=null),this._dismissFinish=null}},{key:"_stopScrollAnimations",value:function(){this._scrollDecay&&(this._scrollDecay.stop(),this._scrollDecay=null),this._scrollReturn&&(this._scrollReturn.stop(),this._scrollReturn=null)}},{key:"_stopAllAnimations",value:function(){this._stopPanelAnimation(),this._stopScrollAnimations()}}],e&&Ga(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();const Xa=Ja;function $a(t){return $a="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},$a(t)}function tu(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,eu(r.key),r)}}function eu(t){var e=function(t){if("object"!=$a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=$a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$a(e)?e:e+""}const nu=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.windowMs,r=void 0===n?100:n,i=e.maxIdleMs,o=void 0===i?80:i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.windowMs=r,this.maxIdleMs=o,this._samples=[]},(e=[{key:"reset",value:function(){this._samples=[]}},{key:"addSample",value:function(t,e){this._samples.push({value:t,time:e}),this._prune(e)}},{key:"_prune",value:function(t){for(var e=t-this.windowMs;this._samples.length>2&&this._samples[0].time<e;)this._samples.shift()}},{key:"getVelocity",value:function(t){if(this._samples.length<2)return 0;var e=this._samples[this._samples.length-1];if(t-e.time>this.maxIdleMs)return 0;for(var n=e.time-this.windowMs,r=this._samples[0],i=0;i<this._samples.length-1;i++)if(this._samples[i].time>=n){r=this._samples[i];break}var o=e.time-r.time;return o<1e-6?0:(e.value-r.value)/o}}])&&tu(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function ru(t){return ru="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},ru(t)}function iu(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,ou(r.key),r)}}function ou(t){var e=function(t){if("object"!=ru(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ru(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ru(e)?e:e+""}const au=function(){return t=function t(e){var n=e.element,r=e.isHeaderTarget,i=e.onDragStart,o=e.onDragMove,a=e.onDragEnd,u=e.onDragCancel,s=e.onTap,c=e.now;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.element=n,this.isHeaderTarget=r,this.onDragStart=i,this.onDragMove=o,this.onDragEnd=a,this.onDragCancel=u||function(){return a(0)},this.onTap=s||null,this.now=c||function(){return performance.now()},this._tracker=new nu,this._pointerId=null,this._startY=0,this._lastY=0,this._moved=!1,this._region=null,this._downTarget=null,this._suppressClick=!1,this._suppressClickUntil=0,this._onPointerDown=this._onPointerDown.bind(this),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onPointerCancel=this._onPointerCancel.bind(this),this._onClickCapture=this._onClickCapture.bind(this),this._onNativeDragStart=this._onNativeDragStart.bind(this),this._onSelectStart=this._onSelectStart.bind(this),this.element.addEventListener("pointerdown",this._onPointerDown),this.element.addEventListener("click",this._onClickCapture,!0),this.element.addEventListener("dragstart",this._onNativeDragStart),document.addEventListener("selectstart",this._onSelectStart)},(e=[{key:"isActive",value:function(){return null!==this._pointerId}},{key:"destroy",value:function(){this._removeWindowListeners(),this.element.removeEventListener("pointerdown",this._onPointerDown),this.element.removeEventListener("click",this._onClickCapture,!0),this.element.removeEventListener("dragstart",this._onNativeDragStart),document.removeEventListener("selectstart",this._onSelectStart),this._pointerId=null}},{key:"_onPointerDown",value:function(t){null===this._pointerId&&("mouse"===t.pointerType&&0!==t.button||("mouse"!==t.pointerType||!t.cancelable||t.target instanceof Element&&t.target.closest("input, textarea, select, [contenteditable]")||t.preventDefault(),this._pointerId=t.pointerId,this._startY=t.clientY,this._lastY=t.clientY,this._moved=!1,this._region=this.isHeaderTarget(t.target)?"header":"content",this._downTarget=t.target,this._suppressClick=!1,this._suppressClickUntil=0,this._tracker.reset(),this._tracker.addSample(t.clientY,this.now()),window.addEventListener("pointermove",this._onPointerMove,{passive:!1}),window.addEventListener("pointerup",this._onPointerUp),window.addEventListener("pointercancel",this._onPointerCancel),this.onDragStart(this._region)))}},{key:"_onPointerMove",value:function(t){if(t.pointerId===this._pointerId){var e=t.clientY-this._lastY;if(this._lastY=t.clientY,this._tracker.addSample(t.clientY,this.now()),!this._moved&&Math.abs(t.clientY-this._startY)>4){this._moved=!0;try{this.element.setPointerCapture(t.pointerId)}catch(t){}}this._moved&&t.cancelable&&t.preventDefault(),0!==e&&this.onDragMove(e)}}},{key:"_onPointerUp",value:function(t){if(t.pointerId===this._pointerId){var e=this._tracker.getVelocity(this.now()),n=!this._moved,r=this._region,i=this._downTarget;this._suppressClick=this._moved,this._suppressClickUntil=this.now()+500,this._teardownGesture(),this.onDragEnd(e),n&&this.onTap&&this.onTap(r,i)}}},{key:"_onPointerCancel",value:function(t){t.pointerId===this._pointerId&&(this._teardownGesture(),this.onDragCancel())}},{key:"_teardownGesture",value:function(){if(this._removeWindowListeners(),null!==this._pointerId)try{this.element.releasePointerCapture(this._pointerId)}catch(t){}this._pointerId=null,this._moved=!1,this._region=null,this._downTarget=null}},{key:"_removeWindowListeners",value:function(){window.removeEventListener("pointermove",this._onPointerMove),window.removeEventListener("pointerup",this._onPointerUp),window.removeEventListener("pointercancel",this._onPointerCancel)}},{key:"_onClickCapture",value:function(t){this._suppressClick&&(this._suppressClick=!1,this.now()>this._suppressClickUntil||(t.preventDefault(),t.stopPropagation()))}},{key:"_onNativeDragStart",value:function(t){t.preventDefault()}},{key:"_onSelectStart",value:function(t){null!==this._pointerId&&this._moved&&t.preventDefault()}}])&&iu(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function uu(t){return uu="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},uu(t)}function su(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,cu(r.key),r)}}function cu(t){var e=function(t){if("object"!=uu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=uu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==uu(e)?e:e+""}const lu=function(){return t=function t(e){var n=e.element,r=e.onDragStart,i=e.onDragMove,o=e.onDragEnd,a=e.isEnabled,u=e.idleMs,s=void 0===u?150:u,c=e.now;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.element=n,this.onDragStart=r,this.onDragMove=i,this.onDragEnd=o,this.isEnabled=a||function(){return!0},this.idleMs=s,this.now=c||function(){return performance.now()},this._tracker=new nu,this._active=!1,this._syntheticY=0,this._lastVelocity=0,this._idleTimer=null,this._onWheel=this._onWheel.bind(this),this.element.addEventListener("wheel",this._onWheel,{passive:!1})},(e=[{key:"isActive",value:function(){return this._active}},{key:"cancel",value:function(){null!==this._idleTimer&&(clearTimeout(this._idleTimer),this._idleTimer=null),this._active=!1,this._lastVelocity=0}},{key:"destroy",value:function(){this.element.removeEventListener("wheel",this._onWheel),this.cancel()}},{key:"_onWheel",value:function(t){if(!t.ctrlKey&&this.isEnabled()){t.preventDefault();var e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=16:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this.element.clientHeight||800),0!==(e=Math.max(-160,Math.min(160,e)))){var n=this.now();this._active||(this._active=!0,this._syntheticY=0,this._tracker.reset(),this._tracker.addSample(0,n),this.onDragStart("content"));var r=-e;this._syntheticY+=r,this._tracker.addSample(this._syntheticY,n),this._lastVelocity=this._tracker.getVelocity(n),this.onDragMove(r),this._restartIdleTimer()}}}},{key:"_restartIdleTimer",value:function(){var t=this;null!==this._idleTimer&&clearTimeout(this._idleTimer),this._idleTimer=setTimeout((function(){t._idleTimer=null,t._active=!1,t.onDragEnd(t._lastVelocity)}),this.idleMs)}}])&&su(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function hu(t){return hu="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},hu(t)}var fu=new WeakMap;function pu(t){return null!==t&&("object"===hu(t)||"function"==typeof t)}function du(t){return du="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},du(t)}function yu(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,mu(r.key),r)}}function mu(t){var e=function(t){if("object"!=du(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=du(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==du(e)?e:e+""}function gu(t,e,n){return e=Mu(e),function(t,e){if(e&&("object"==du(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,Du()?Reflect.construct(e,n||[],Mu(t).constructor):e.apply(t,n))}function Du(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Du=function(){return!!t})()}function vu(){return vu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Mu(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},vu.apply(null,arguments)}function Mu(t){return Mu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Mu(t)}function bu(t,e){return bu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bu(t,e)}const wu=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=gu(this,e,[n])).points=Ta(n.stickyPoints),t.initialPoint=Fa(n.initialPoint),t._mapHeight=0,t._headerHeight=0,t._contentHeight=0,t._laidOut=!1,t._handoffHost=null,t._presented=!1,t._mapCollapseTarget=null,t._initialize(),null!=n.content&&t.setContentView(n.content),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&&bu(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("div"),this.element.className="sticky-panel",this.sheetElement=document.createElement("div"),this.sheetElement.className="sticky-panel-sheet",this.sheetElement.setAttribute("role","region"),this.options.header&&null!=this.options.header.title&&this.sheetElement.setAttribute("aria-label",String(this.options.header.title)),this.element.appendChild(this.sheetElement),this.header=new da(this.options.header||{}),this.content=new Ea,this.sheetElement.appendChild(this.header.getElement()),this.sheetElement.appendChild(this.content.getElement()),this.controller=new Xa({points:this.points,initialPoint:this.initialPoint,metrics:{getMapHeight:function(){return t._mapHeight},getMaxScroll:function(){return t._computeMaxScroll()}},callbacks:{onPanelPositionChange:function(e){return t._applyPanelPosition(e)},onScrollChange:function(e){return t._applyScroll(e)},onStickyPointChange:function(e){return t.fire("stickypointchange",e)},onDraggingChange:function(e){return t._applyDragState(e)}},config:this.options.physics||{}}),this.recognizer=new au({element:this.sheetElement,isHeaderTarget:function(e){return e instanceof Node&&t.header.getElement().contains(e)},onDragStart:function(e){t.wheelAdapter.cancel(),t.controller.dragStart(e)},onDragMove:function(e){return t.controller.dragMove(e)},onDragEnd:function(e){return t.controller.dragEnd(e)},onDragCancel:function(){return t.controller.dragCancel()},onTap:function(e,n){return t._handleTap(e,n)}}),this.wheelAdapter=new lu({element:this.sheetElement,isEnabled:function(){return!t.recognizer.isActive()},onDragStart:function(e){return t.controller.dragStart(e)},onDragMove:function(e){return t.controller.dragMove(e)},onDragEnd:function(e){return t.controller.dragEnd(e)}}),this._observeSizes()}},{key:"_observeSizes",value:function(){var t=this;this._onWindowResize=null,"undefined"!=typeof ResizeObserver?(this._resizeObserver=new ResizeObserver((function(){return t._handleResize()})),this._resizeObserver.observe(this.element),this._resizeObserver.observe(this.header.getElement()),this._resizeObserver.observe(this.content.getInnerElement())):(this._resizeObserver=null,this._onWindowResize=function(){return t._handleResize()},window.addEventListener("resize",this._onWindowResize))}},{key:"_measure",value:function(){this._mapHeight=this.element.clientHeight,this._headerHeight=this.header.getElement().offsetHeight,this._contentHeight=this.content.getContentHeight()}},{key:"_computeMaxScroll",value:function(){if(this._mapHeight<=0)return 0;var t=this.points.full*this._mapHeight-this._headerHeight;return Math.max(0,this._contentHeight-Math.max(t,0))}},{key:"_handleResize",value:function(){this._measure(),this._mapHeight<=0||(this._laidOut?this.controller.refreshMetrics():(this._laidOut=!0,this.controller.initializePosition({animate:!0})))}},{key:"refreshLayout",value:function(){this._handleResize()}},{key:"_handleTap",value:function(t,e){"header"===t&&(e instanceof Element&&e.closest('button, a, input, select, textarea, [role="button"]')||this.controller.stepUp())}},{key:"_applyPanelPosition",value:function(t){this.sheetElement.style.transform="translate3d(0, ".concat(-t*this._mapHeight,"px, 0)"),this._presented&&this._handoffHost&&this._mapHeight>0&&function(t,e,n){var r=n.position,i=n.stickyPoint,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Date.now();pu(t)&&e&&fu.set(t,{owner:e,position:r,stickyPoint:i,active:!0,updatedAt:o})}(this._handoffHost,this,{position:t,stickyPoint:this.controller.getStickyPoint()}),this.fire("positionchange",{position:t})}},{key:"_applyScroll",value:function(t){this.content.setScrollTop(t),this.fire("scrollchange",{scrollTop:t})}},{key:"_applyDragState",value:function(t){this.sheetElement.classList.toggle("sticky-panel-sheet--dragging",t),this.fire("dragstatechange",{isDragging:t})}},{key:"setContentView",value:function(t){this.content.setContent(t),this.controller.scrollToTop(),this._measure(),this.controller.refreshMetrics()}},{key:"setTitle",value:function(t){this.header.setTitle(t),this.sheetElement.setAttribute("aria-label",null!=t?String(t):"")}},{key:"addHeaderButton",value:function(t){return this.header.addButton(t)}},{key:"setHeaderCustomElement",value:function(t){this.header.setCustomElement(t)}},{key:"snapTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.controller.snapTo(t,e)}},{key:"getStickyPoints",value:function(){return this.points}},{key:"setStickyPoints",value:function(t){this.points=Ta(t),this.controller.setStickyPoints(this.points)}},{key:"getPosition",value:function(){return this.controller.getPosition()}},{key:"getStickyPoint",value:function(){return this.controller.getStickyPoint()}},{key:"getScrollTop",value:function(){return this.controller.getScrollTop()}},{key:"getMaxScroll",value:function(){return this._computeMaxScroll()}},{key:"isDragging",value:function(){return this.controller.isDragging()}},{key:"setHandoffHost",value:function(t){this._handoffHost=t}},{key:"present",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.snapTo,n=void 0===e?this.initialPoint:e,r=t.animate,i=void 0===r||r,o=this._handoffHost?function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();if(!pu(t))return null;var n=fu.get(t);return n?!n.active&&e-n.updatedAt>600?null:{position:n.position,stickyPoint:n.stickyPoint}:null}(this._handoffHost):null;this._presented=!0,this.element.classList.remove("sticky-panel--hidden"),this.sheetElement.classList.remove("sticky-panel-sheet--dismissing"),this._measure(),this._mapHeight>0&&(this._laidOut=!0),this.controller.beginPresentation({startPosition:o&&this._mapHeight>0?o.position:null,snapTo:n,animate:i})}},{key:"dismiss",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.animate,r=void 0===n||n,i=e.onHidden;this._presented?(this._handoffHost&&function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.position,i=n.stickyPoint,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Date.now();if(pu(t)&&e){var a=fu.get(t);a&&a.owner===e&&fu.set(t,{owner:e,position:null!=r?r:a.position,stickyPoint:void 0!==i?i:a.stickyPoint,active:!1,updatedAt:o})}}(this._handoffHost,this,{position:this.controller.getPosition(),stickyPoint:this.controller.getStickyPoint()}),this._presented=!1,this.sheetElement.classList.add("sticky-panel-sheet--dismissing"),this.controller.dismiss({animate:r,onComplete:function(){t._presented||(t.element.classList.add("sticky-panel--hidden"),t.sheetElement.classList.remove("sticky-panel-sheet--dismissing"),i&&i())}})):i&&i()}},{key:"isPresented",value:function(){return this._presented}},{key:"enableCollapseOnMapInteraction",value:function(t){var e=this;if(t&&this._mapCollapseTarget!==t){this._mapCollapseTarget=t;var n=function(t){return e._handleMapFocus(t)},r=function(){var e=t.map;return!(!e||"function"!=typeof e.on||(e.on("mousedown",n),e.on("touchstart",n),0))};r()||"function"!=typeof t.on||t.on("load",r)}}},{key:"_handleMapFocus",value:function(t){if(this._presented&&!(this._mapHeight<=0)&&t&&t.point){var e=this._mapCollapseTarget;if(e&&e.map){var n=[];try{n=e.map.queryRenderedFeatures(t.point)||[]}catch(t){return}0===n.filter((function(t){var e;return"symbol"===(null==t||null===(e=t.layer)||void 0===e?void 0:e.type)})).length&&this.controller.snapTo("collapsed")}}}},{key:"show",value:function(){this.element.classList.remove("sticky-panel--hidden"),this.refreshLayout()}},{key:"hide",value:function(){this.element.classList.add("sticky-panel--hidden")}},{key:"getElement",value:function(){return this.element}},{key:"destroy",value:function(){var t,n,r;this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),this._onWindowResize&&(window.removeEventListener("resize",this._onWindowResize),this._onWindowResize=null),this.recognizer.destroy(),this.wheelAdapter.destroy(),this.controller.destroy(),this.content.destroy(),this.element.parentNode&&this.element.parentNode.removeChild(this.element),(t=e,n=this,r=vu(Mu(1&3?t.prototype:t),"destroy",n),function(t){return r.apply(n,t)})([])}}],r&&yu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function Eu(t){return Eu="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},Eu(t)}function Cu(){Cu=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==Eu(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(Eu(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function ju(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function Au(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){ju(o,r,i,a,u,"next",t)}function u(t){ju(o,r,i,a,u,"throw",t)}a(void 0)}))}}function Nu(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,Su(r.key),r)}}function Su(t){var e=function(t){if("object"!=Eu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Eu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Eu(e)?e:e+""}function Iu(t,e,n){return e=Ou(e),function(t,e){if(e&&("object"==Eu(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,Tu()?Reflect.construct(e,n||[],Ou(t).constructor):e.apply(t,n))}function Tu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tu=function(){return!!t})()}function Fu(){return Fu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ou(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Fu.apply(null,arguments)}function Ou(t){return Ou=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ou(t)}function ku(t,e){return ku=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ku(t,e)}var xu={collapsed:.2,mid:.6,full:.97},Lu="search-results-view--panel-hosted";const _u=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=Iu(this,e,[n])).searchResultsView=new Wo,t.searchApi=nn.getSearchApi(),t.searchedQuery=null,t.map=null,t.lastSearchLength=0,t.skip=0,t.limit=30,t._presentation=null,t.stickyPanelView=new wu({stickyPoints:xu,initialPoint:"mid",header:{buttons:[{label:"✕",ariaLabel:"Close search results",onClick:function(){t.map&&t.map.setToDefaultState()}}]}}),t.stickyPanelView.on("scrollchange",(function(e){var n=e.scrollTop;t._maybeLoadMoreFromPanel(n)})),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&&ku(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-search-control-container",this.hide(),this._initializeEventListeners(),this._attachResizeListener(),this._attachScrollListener(),this._initialize(),this.stickyPanelView.setHandoffHost(t),this.stickyPanelView.enableCollapseOnMapInteraction(t),this.container}},{key:"onRemove",value:function(){var t,n,r;this.stickyPanelView.destroy(),(t=e,n=this,r=Fu(Ou(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"show",value:function(){this.container&&(this.container.style.display="flex",this._isMobileLayout()&&this.map&&"function"==typeof this.map._lockMobileScroll&&(this.map._lockMobileScroll(),this._mobileScrollLocked=!0))}},{key:"hide",value:function(){this.container&&(this.container.style.display="none",this._mobileScrollLocked&&this.map&&"function"==typeof this.map._unlockMobileScroll&&(this.map._unlockMobileScroll(),this._mobileScrollLocked=!1))}},{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.map.on("state:setup",this._handleSetupState.bind(this)),this.searchResultsView.on("closeView",this._handleCloseSearchResultsView.bind(this)),this.searchResultsView.on("selectCell",this._handleSearchResultSelect.bind(this)),this.searchResultsView.on("selectUrlButton",this._handleSelectUrlButton.bind(this)),this.searchResultsView.on("hoverCell",this._handleCellHover.bind(this)),this.searchResultsView.on("hoverOutCell",this._handleCellHoverOut.bind(this))}},{key:"_renderDesktopView",value:function(){this._presentation="desktop",this.stickyPanelView.dismiss({animate:!1});var t=this.searchResultsView.getElement();t.classList.remove(Lu),this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view")}},{key:"_renderMobileView",value:function(){this._presentation="panel";var t=this.searchResultsView.getElement();t.classList.add(Lu),this.stickyPanelView.setContentView(t),this.container.appendChild(this.stickyPanelView.getElement()),this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view"),this.stickyPanelView.refreshLayout(),this.map&&"function"==typeof this.map.getCurrentState&&"search"===this.map.getCurrentState()&&null!=this.searchedQuery&&this.stickyPanelView.present({snapTo:"mid"})}},{key:"_attachScrollListener",value:function(){this.searchResultsView.getScrollElement().addEventListener("scroll",this._handleScroll.bind(this))}},{key:"_handleScroll",value:(a=Au(Cu().mark((function t(){var e,n,r,i;return Cu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("desktop"===this._presentation){t.next=2;break}return t.abrupt("return");case 2:if(e=this.searchResultsView.getScrollElement(),n=e.scrollTop,r=e.scrollHeight,i=e.clientHeight,!(r-n-i<10)){t.next=6;break}return t.next=6,this._loadMoreResults();case 6:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"_maybeLoadMoreFromPanel",value:function(t){if("panel"===this._presentation){var e=this.stickyPanelView.getMaxScroll();e<=0||e-t<10&&this._loadMoreResults()}}},{key:"_loadMoreResults",value:(o=Au(Cu().mark((function t(){var e;return Cu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.searchResultsView.loading&&this.lastSearchLength===this.limit){t.next=2;break}return t.abrupt("return");case 2:return this.searchResultsView.showLoadingCell(),t.next=5,this._getAdditionalSearchResults();case 5:if(e=t.sent){t.next=9;break}return this.searchResultsView.hideLoadingCell(),t.abrupt("return");case 9:this.lastSearchLength=e.length,this.searchResultsView.extendResults(e),this.skip+=this.limit,this.map.fire("additionalSearchResults",{results:e}),this.searchResultsView.hideLoadingCell();case 14:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"_getAdditionalSearchResults",value:(i=Au(Cu().mark((function t(){var e,n,r;return Cu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=this.searchedQuery)&&this.map&&this.map.mapData){t.next=3;break}return t.abrupt("return",null);case 3:return n=this.map.getCurrentFloor(),t.prev=4,t.next=7,this.searchApi.search(this.map.mapData.map_id,this.map.mapData.map_view_id,e,this.skip,this.limit,n);case 7:return r=t.sent,t.abrupt("return",r);case 11:return t.prev=11,t.t0=t.catch(4),Me.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0),t.abrupt("return",null);case 15:case"end":return t.stop()}}),t,this,[[4,11]])}))),function(){return i.apply(this,arguments)})},{key:"_handleCellHover",value:function(t){var e=t.result;this.map.fire("hoverSearchResult",{result:e})}},{key:"_handleCellHoverOut",value:function(t){var e=t.result;this.map.fire("hoverEndSearchResult",{result:e})}},{key:"_handleSearchResultSelect",value:function(t){var e=t.result.placement_id;this.map.setToSelectedContentState([e])}},{key:"_handleSelectUrlButton",value:function(t){var e=t.url;e&&(this.urlConfirmationPopup||(this.urlConfirmationPopup=new ao),this.urlConfirmationPopup.show(this.map,e,{isKioskMode:"kiosk"===this.currentViewType}))}},{key:"_handleCloseSearchResultsView",value:function(){this.map.setToDefaultState()}},{key:"_handleInitiateSearchState",value:function(){this.map.setToSearchState(this.searchedQuery)}},{key:"_handleDefaultState",value:function(){var t=this;this.searchedQuery=null;var e=function(){t.searchResultsView.updateResults([]),t.searchResultsView.scrollToTop()};"panel"===this._presentation?this.stickyPanelView.dismiss({onHidden:function(){t.hide(),e()}}):(this.hide(),e())}},{key:"_handleSearchState",value:function(t){var e=t.query,n=t.results;this.searchedQuery=e,this.lastSearchLength=n.length,this.skip=this.limit,this.searchResultsView.updateView(n,e),this.searchResultsView.getElement().classList.toggle("search-results-view--empty",0===n.length),this.show(),"panel"===this._presentation&&(this.stickyPanelView.setTitle(e),this.stickyPanelView.present({snapTo:"mid"}))}},{key:"_handleSelectedContentState",value:function(t){this.stickyPanelView.dismiss({animate:!1}),this.hide(),this.searchResultsView.updateResults([])}},{key:"_handleDirectionsState",value:function(t){}},{key:"_handleSetupState",value:function(){this.stickyPanelView.dismiss({animate:!1}),this.hide()}}],r&&Nu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o,a}(di);function zu(t){return zu="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},zu(t)}function Pu(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,Bu(r.key),r)}}function Bu(t){var e=function(t){if("object"!=zu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=zu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zu(e)?e:e+""}function Uu(t,e,n){return e=Qu(e),function(t,e){if(e&&("object"==zu(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,Ru()?Reflect.construct(e,n||[],Qu(t).constructor):e.apply(t,n))}function Ru(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ru=function(){return!!t})()}function Qu(t){return Qu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qu(t)}function Yu(t,e){return Yu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yu(t,e)}const Vu=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=Uu(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&&Yu(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.textContainer.style.paddingLeft="10px",this.nameElement=document.createElement("div"),this.nameElement.className="header-content-name";var e=this.contentPlacement.catalog.content_title_key,n=t.data[e];this.nameElement.textContent=n,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);var r=this.contentPlacement.catalog.content_display_img_key,i=t.data[r];if(i){this.imageViewElement=document.createElement("div"),this.imageViewElement.className="header-image-view";var o=document.createElement("img");o.className="header-image",o.src=i,o.style.width="100%",o.style.height="100%",o.style.objectFit="contain",o.style.background="white",this.imageViewElement.appendChild(o),this.element.appendChild(this.imageViewElement)}this.element.appendChild(this.textContainer)}},{key:"getElement",value:function(){return this.element}}])&&Pu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function Hu(t){return Hu="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},Hu(t)}function Gu(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,Zu(r.key),r)}}function Zu(t){var e=function(t){if("object"!=Hu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Hu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hu(e)?e:e+""}function Wu(t,e,n){return e=Ku(e),function(t,e){if(e&&("object"==Hu(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,qu()?Reflect.construct(e,n||[],Ku(t).constructor):e.apply(t,n))}function qu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(qu=function(){return!!t})()}function Ku(t){return Ku=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ku(t)}function Ju(t,e){return Ju=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ju(t,e)}const Xu=function(t){function e(t,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=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),(r=Wu(this,e,[o])).icon=t,r.text=n,r.link=i,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&&Ju(t,e)}(e,t),n=e,(r=[{key:"_formatUrl",value:function(t){return t?(t=t.trim(),/^https?:\/\//i.test(t)||(t="https://"+t),t):t}},{key:"_initialize",value:function(){this.link?(this.element=document.createElement("a"),this.element.href=this._formatUrl(this.link),this.element.target="_blank",this.element.rel="noopener noreferrer",this.element.style.textDecoration="none"):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}}])&&Gu(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function $u(t){return $u="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},$u(t)}function ts(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,es(r.key),r)}}function es(t){var e=function(t){if("object"!=$u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=$u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$u(e)?e:e+""}function ns(t,e,n){return e=is(e),function(t,e){if(e&&("object"==$u(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,rs()?Reflect.construct(e,n||[],is(t).constructor):e.apply(t,n))}function rs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(rs=function(){return!!t})()}function is(t){return is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},is(t)}function os(t,e){return os=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},os(t,e)}const as=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=ns(this,e,[r])).data=t,n.showTitle=!1!==r.showTitle,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&&os(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",Object.keys(this.data).forEach((function(e,n){var r=t.data[e],i=document.createElement("div");i.className="details-view-item";var o=document.createElement("div");o.className="details-view-key",o.textContent=e;var a=document.createElement("span");a.className="details-view-value",a.textContent=r,i.appendChild(o),i.appendChild(a),t.element.appendChild(i)}))}},{key:"getElement",value:function(){return this.element}}])&&ts(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function us(t){return us="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},us(t)}function ss(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,cs(r.key),r)}}function cs(t){var e=function(t){if("object"!=us(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=us(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==us(e)?e:e+""}function ls(t,e,n){return e=fs(e),function(t,e){if(e&&("object"==us(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,hs()?Reflect.construct(e,n||[],fs(t).constructor):e.apply(t,n))}function hs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(hs=function(){return!!t})()}function fs(t){return fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fs(t)}function ps(t,e){return ps=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ps(t,e)}const ds=function(t){function e(t,n){var r,i=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=ls(this,e,[i])).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&&ps(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-children-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 Eo(e);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.on("selectUrlButton",(function(e){return t.fire("selectUrlButton",e)})),e.getElement().addEventListener("click",(function(n){return t._handleChildSelect(n,e)}))}))}},{key:"_handleChildSelect",value:function(t,e){this.fire("selectChildContentPlacement",{placementId:e.childPlacement.placement_id})}},{key:"getElement",value:function(){return this.element}}],r&&ss(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn),ys="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIxLjQxIDguNjQwMTNDMjEuNDEgOC42NDAxMyAyMS40MSA4LjY0MDEzIDIxLjQxIDguNTkwMTNDMjAuNzA1MyA2LjY2NjM1IDE5LjQyNjkgNS4wMDU0MSAxNy43NDc0IDMuODMxOTlDMTYuMDY4IDIuNjU4NTcgMTQuMDY4NyAyLjAyOTMgMTIuMDIgMi4wMjkzQzkuOTcxMiAyLjAyOTMgNy45NzE4OSAyLjY1ODU3IDYuMjkyNDYgMy44MzE5OUM0LjYxMzA0IDUuMDA1NDEgMy4zMzQ1NSA2LjY2NjM1IDIuNjI5OTUgOC41OTAxM0MyLjYyOTk1IDguNTkwMTMgMi42Mjk5NSA4LjU5MDEzIDIuNjI5OTUgOC42NDAxM0MxLjg0MzA4IDEwLjgxMSAxLjg0MzA4IDEzLjE4OTIgMi42Mjk5NSAxNS4zNjAxQzIuNjI5OTUgMTUuMzYwMSAyLjYyOTk1IDE1LjM2MDEgMi42Mjk5NSAxNS40MTAxQzMuMzM0NTUgMTcuMzMzOSA0LjYxMzA0IDE4Ljk5NDggNi4yOTI0NiAyMC4xNjgzQzcuOTcxODkgMjEuMzQxNyA5Ljk3MTIgMjEuOTcxIDEyLjAyIDIxLjk3MUMxNC4wNjg3IDIxLjk3MSAxNi4wNjggMjEuMzQxNyAxNy43NDc0IDIwLjE2ODNDMTkuNDI2OSAxOC45OTQ4IDIwLjcwNTMgMTcuMzMzOSAyMS40MSAxNS40MTAxQzIxLjQxIDE1LjQxMDEgMjEuNDEgMTUuNDEwMSAyMS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IDE1LjA5MDggNi41MTQ4OSAxNS40MyA4LjAwMDEzSDEzVjQuMzAwMTNaTTEzIDE5LjcwMDFWMTYuMDAwMUgxNS40M0MxNS4wOTA4IDE3LjQ4NTQgMTQuMjI4MiAxOC43OTg4IDEzIDE5LjcwMDFaTTE1Ljg2IDE0LjAwMDFIMTNWMTAuMDAwMUgxNS44NkMxNi4wNDY2IDExLjMyNjkgMTYuMDQ2NiAxMi42NzMzIDE1Ljg2IDE0LjAwMDFaTTE2LjU1IDE4LjU3MDFDMTYuOTc5NyAxNy43NTQyIDE3LjMxNTIgMTYuODkyIDE3LjU1IDE2LjAwMDFIMTguOTVDMTguMzUwNSAxNy4wMjQyIDE3LjUzMDcgMTcuOTAyMSAxNi41NSAxOC41NzAxWk0xOS43NCAxNC4wMDAxSDE3Ljg4QzE3Ljk2MTMgMTMuMzM2NiAxOC4wMDE0IDEyLjY2ODYgMTggMTIuMDAwMUMxOC4wMDExIDExLjMzMTYgMTcuOTYxIDEwLjY2MzcgMTcuODggMTAuMDAwMUgxOS43NEMyMC4wODY3IDExLjMxMDkgMjAuMDg2NyAxMi42ODkzIDE5Ljc0IDE0LjAwMDFaIiBmaWxsPSIjMTcxNzE3Ii8+Cjwvc3ZnPgo=";function ms(t){return ms="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},ms(t)}function gs(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 Ds(t,e,n){return(e=Cs(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vs(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=bs(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function Ms(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,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||bs(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 bs(t,e){if(t){if("string"==typeof t)return ws(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)?ws(t,e):void 0}}function ws(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 Es(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,Cs(r.key),r)}}function Cs(t){var e=function(t){if("object"!=ms(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ms(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ms(e)?e:e+""}function js(t,e,n){return e=Ns(e),function(t,e){if(e&&("object"==ms(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,As()?Reflect.construct(e,n||[],Ns(t).constructor):e.apply(t,n))}function As(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(As=function(){return!!t})()}function Ns(t){return Ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ns(t)}function Ss(t,e){return Ss=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ss(t,e)}const Is=function(t){function e(){var t,n=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,e),(t=js(this,e,[n])).contentPlacement=null,t.isSelectionMode=!1,t.isKioskMode=n.isKioskMode||!1,t.mapId=n.mapId||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.ctaButton=document.createElement("button"),t.ctaButton.className="content-details-primary-button content-details-cta-button",t.ctaButtonUrl=null,t.directionsButton=document.createElement("button"),t.directionsButton.className="content-details-primary-button",t.directionsButton.textContent="Directions",t.confirmButton=document.createElement("button"),t.confirmButton.className="content-details-primary-button",t.confirmButton.textContent="Confirm Selection",t.shareButton=document.createElement("button"),t.shareButton.className="content-details-share-button",t.shareButton.textContent="Share";var r=document.createElement("img");return r.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1IDcuM1Y3LjNDMTUgNi4wODU0IDE1IDUuNDc4MTEgMTQuNzQ1IDUuMDIyNzZDMTQuNTY0OCA0LjcwMDk0IDE0LjI5OTEgNC40MzUyMyAxMy45NzcyIDQuMjU1MDFDMTMuNTIxOSA0IDEyLjkxNDYgNCAxMS43IDRIOEM2LjExNDM4IDQgNS4xNzE1NyA0IDQuNTg1NzkgNC41ODU3OUM0IDUuMTcxNTcgNCA2LjExNDM4IDQgOFYxMS43QzQgMTIuOTE0NiA0IDEzLjUyMTkgNC4yNTUwMSAxMy45NzcyQzQuNDM1MjMgMTQuMjk5MSA0LjcwMDk0IDE0LjU2NDggNS4wMjI3NiAxNC43NDVDNS40NzgxMSAxNSA2LjA4NTQgMTUgNy4zIDE1VjE1IiBzdHJva2U9IiMxQjFCMUIiIHN0cm9rZS13aWR0aD0iMS41Ii8+CjxyZWN0IHg9IjkiIHk9IjkiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxMSIgcng9IjIiIHN0cm9rZT0iIzFCMUIxQiIgc3Ryb2tlLXdpZHRoPSIxLjUiLz4KPC9zdmc+Cg==",r.className="copy-icon",t.shareButton.appendChild(r),t.locationButton=null,t.websiteButtons=[],t.detailsView=null,t.childrenComponents=[],t.imageContainer=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&&Ss(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)),e.on("selectUrlButton",(function(e){return t.fire("selectUrlButton",e)}))})),this.directionsButton.addEventListener("click",this._handleDirectionsButtonSelect.bind(this)),this.confirmButton.addEventListener("click",this._handleConfirmButtonSelect.bind(this)),this.shareButton.addEventListener("click",this._handleShareButtonSelect.bind(this)),this.ctaButton.addEventListener("click",this._handleCtaButtonSelect.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.replaceChildren(),this.ctaButtonUrl&&this.actionButtons.appendChild(this.ctaButton),this.isSelectionMode?this.actionButtons.appendChild(this.confirmButton):On.includes(this.mapId)||this.actionButtons.appendChild(this.directionsButton),this.isKioskMode||wr.includes(this.mapId)||this.actionButtons.appendChild(this.shareButton),this.actionButtons.childElementCount>0&&this.header.appendChild(this.actionButtons),this.locationButton&&this.actionsView.appendChild(this.locationButton.getElement()),this.websiteButtons.forEach((function(e){t.actionsView.appendChild(e.getElement())})),this.imageContainer&&this.actionsView.appendChild(this.imageContainer),this.header.appendChild(this.actionsView),this.detailsView&&this.header.appendChild(this.detailsView.getElement()),this.element.appendChild(this.header),this.childrenComponents.forEach((function(e){t.element.appendChild(e.getElement())}))}},{key:"_handleShareButtonSelect",value:function(){this.fire("selectShareButton",{placementId:this.contentPlacement.placement_id})}},{key:"showCopyPopup",value:function(){var t=document.createElement("div");t.className="copy-popup",t.textContent="Copied to clipboard";var e=this.shareButton.getBoundingClientRect();t.style.position="absolute",t.style.left="".concat(e.left+e.width/2-60,"px"),t.style.top="".concat(e.bottom+window.scrollY,"px"),t.style.zIndex="9999",document.body.appendChild(t),setTimeout((function(){t.style.opacity="0",t.style.transition="opacity 0.5s",setTimeout((function(){t.remove()}),500)}),1500)}},{key:"_handleDirectionsButtonSelect",value:function(){this.fire("selectDirectionsButton",{placementId:this.contentPlacement.placement_id})}},{key:"_handleConfirmButtonSelect",value:function(){this.fire("selectConfirmButton",{placementId:this.contentPlacement.placement_id})}},{key:"_handleCtaButtonSelect",value:function(){this.ctaButtonUrl&&this.fire("selectUrlButton",{url:this.ctaButtonUrl,source:"cta"})}},{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){for(var e=t.catalog.data_schema,n=t.catalog.content_title_key,r=t.excluded_child_fields||[],i={},o=0,a=Object.entries(e);o<a.length;o++){var u=Ms(a[o],2),s=u[0],c=u[1];if(!s.startsWith("_")&&"image"!==c&&"url"!==c&&s!==n&&!r.includes(s)){var l=t.content.data[s];if(l&&""!==l.trim()){var h=l.trim();i[s]=h}}}return i}},{key:"updateView",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.contentPlacement=t,this.isSelectionMode=n,this.isKioskMode=r,this.mapId=i,this.contentPlacementHeader=new Vu(t);var o=t.catalog.data_schema,a=Object.entries(o).filter((function(t){return!Ms(t,1)[0].startsWith("_")}));this.locationButton=new Xu("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDJDOS44NzgyNyAyIDcuODQzNDQgMi44NDI4NSA2LjM0MzE1IDQuMzQzMTVDNC44NDI4NSA1Ljg0MzQ0IDQgNy44NzgyNyA0IDEwQzQgMTUuNCAxMS4wNSAyMS41IDExLjM1IDIxLjc2QzExLjUzMTEgMjEuOTE0OSAxMS43NjE2IDIyLjAwMDEgMTIgMjIuMDAwMUMxMi4yMzg0IDIyLjAwMDEgMTIuNDY4OSAyMS45MTQ5IDEyLjY1IDIxLjc2QzEzIDIxLjUgMjAgMTUuNCAyMCAxMEMyMCA3Ljg3ODI3IDE5LjE1NzEgNS44NDM0NCAxNy42NTY5IDQuMzQzMTVDMTYuMTU2NiAyLjg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OCAxMC4wMzg0IDkuNjA5ODJDMTAuMTE1NiA5LjIyMTg2IDEwLjMwNjEgOC44NjU0OSAxMC41ODU4IDguNTg1NzlDMTAuODY1NSA4LjMwNjA4IDExLjIyMTkgOC4xMTU2IDExLjYwOTggOC4wMzg0M0MxMS45OTc4IDcuOTYxMjYgMTIuMzk5OSA4LjAwMDg3IDEyLjc2NTQgOC4xNTIyNEMxMy4xMzA4IDguMzAzNjIgMTMuNDQzMiA4LjU1OTk2IDEzLjY2MjkgOC44ODg4NkMxMy44ODI3IDkuMjE3NzYgMTQgOS42MDQ0NCAxNCAxMEMxNCAxMC41MzA0IDEzLjc4OTMgMTEuMDM5MSAxMy40MTQyIDExLjQxNDJDMTMuMDM5MSAxMS43ODkzIDEyLjUzMDQgMTIgMTIgMTJaIiBmaWxsPSIjMTcxNzE3Ii8+Cjwvc3ZnPgo=",t.contextual_location),this.websiteButtons=[];var u,s=vs(a);try{var c=function(){var n=Ms(u.value,2),r=n[0];if("url"===n[1]){var i=t.content.data[r];if(oo(i)){var o=new Xu(ys,i,i);o.getElement().addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),e.fire("selectUrlButton",{url:i,source:"website"})})),e.websiteButtons.push(o)}}};for(s.s();!(u=s.n()).done;)c()}catch(t){s.e(t)}finally{s.f()}this.ctaButtonUrl=null;var l=this.mapId?Mr[this.mapId]:null;if(l){var h,f=null===(h=t.content.data)||void 0===h?void 0:h[l.key];oo(f)&&(this.ctaButtonUrl=io(f),this.ctaButton.textContent=l.text)}var p,d=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?gs(Object(n),!0).forEach((function(e){Ds(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gs(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t.content.data),y=[],m=t.catalog.content_display_img_key,g=vs(a);try{for(g.s();!(p=g.n()).done;){var D=Ms(p.value,2),v=D[0];if("image"===D[1]&&v!==m){var M=t.content.data[v];M&&y.push(M),delete d[v]}}}catch(t){g.e(t)}finally{g.f()}var b=this.findViableAdditionalData(t),w=Object.keys(b);this.detailsView=w.length>0?new as(b):null,this.childrenComponents=[];for(var E=0,C=Object.entries(t.children);E<C.length;E++){var j=Ms(C[E],2),A=j[0],N=j[1],S=new ds(A,N);this.childrenComponents.push(S)}if(y.length>0){this.imageContainer=document.createElement("div"),this.imageContainer.className="content-details-image-container";var I=document.createElement("img");I.src=y[0],I.className="content-details-preview-image";var T=document.createElement("div");T.className="image-hover-popup",T.textContent="See photos",this.imageContainer.appendChild(I),this.imageContainer.appendChild(T),this.imageContainer.addEventListener("click",(function(){e.fire("selectPhotos",{placementId:e.contentPlacement.placement_id,images:y})}))}else this.imageContainer=null;this._setupEventListeners(),this._render()}},{key:"getElement",value:function(){return this.element}}],r&&Es(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function Ts(t){return Ts="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},Ts(t)}function Fs(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,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Os(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)?Os(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 Os(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 ks(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,xs(r.key),r)}}function xs(t){var e=function(t){if("object"!=Ts(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ts(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ts(e)?e:e+""}function Ls(t,e,n){return e=zs(e),function(t,e){if(e&&("object"==Ts(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,_s()?Reflect.construct(e,n||[],zs(t).constructor):e.apply(t,n))}function _s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_s=function(){return!!t})()}function zs(t){return zs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zs(t)}function Ps(t,e){return Ps=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ps(t,e)}const Bs=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=Ls(this,e,[r])).contentPlacement=t,n.isOptimistic=t.isOptimistic||!1,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&&Ps(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="selection-content-item",this._render()}},{key:"_render",value:function(){var t=this;this.element.innerHTML="";var e=document.createElement("div");e.className="selection-item-selected-indicator";var n=document.createElement("canvas"),r=window.devicePixelRatio||1;n.width=24*r,n.height=24*r,n.style.width="24px",n.style.height="24px";var i=n.getContext("2d");i.scale(r,r),i.fillStyle="white",i.beginPath(),i.arc(12,12,10,0,2*Math.PI),i.fill(),i.strokeStyle="#00C853",i.lineWidth=2,i.stroke(),i.strokeStyle="#00C853",i.lineWidth=2,i.lineCap="round",i.lineJoin="round",i.beginPath(),i.moveTo(7,12),i.lineTo(10,15),i.lineTo(17,8),i.stroke(),e.appendChild(n),this.element.appendChild(e);var o=document.createElement("div");o.className="selection-item-content",this.isOptimistic?this._renderOptimisticContent(o):this._renderFullContent(o),this.element.appendChild(o);var a=document.createElement("div");a.className="selection-item-delete-button";var u=document.createElement("img");u.src=Sr,u.alt="Remove selection",u.className="selection-item-delete-icon",a.appendChild(u),a.addEventListener("click",(function(e){e.stopPropagation(),t._handleDeselect()})),o.appendChild(a)}},{key:"_renderOptimisticContent",value:function(t){var e,n,r=document.createElement("div");r.className="content-placement-header";var i=document.createElement("div");i.className="header-text-container",i.style.paddingLeft="10px",i.style.display="flex",i.style.flexDirection="column",i.style.alignItems="flex-start",i.style.justifyContent="center";var o=document.createElement("div");o.className="header-content-name";var a=(null===(e=this.contentPlacement.catalog)||void 0===e?void 0:e.content_title_key)||"name",u=(null===(n=this.contentPlacement.content)||void 0===n||null===(n=n.data)||void 0===n?void 0:n[a])||this.contentPlacement.name||"Unknown Feature";o.textContent=u,i.appendChild(o),r.appendChild(i),t.appendChild(r);var s=document.createElement("div");s.style.display="flex",s.style.justifyContent="center",s.style.alignItems="center",s.style.marginTop="12px",s.style.marginBottom="8px";var c=document.createElement("img");c.src=Ir,c.alt="Loading",c.style.width="20px",c.style.height="20px",c.style.animation="smoothSpin 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) infinite",s.appendChild(c),t.appendChild(s)}},{key:"_renderFullContent",value:function(t){var e,n=this.findViableAdditionalData(this.contentPlacement),r=Object.keys(n).length>0;if(this.contentPlacement.catalog){var i=new Vu(this.contentPlacement).getElement();r?i.classList.add("has-additional-details"):i.classList.add("no-additional-details"),t.appendChild(i)}else{var o=document.createElement("div");o.className="content-placement-header";var a=document.createElement("div");a.className="header-text-container",a.style.paddingLeft="10px";var u=document.createElement("div");u.className="header-content-name",u.textContent=this.contentPlacement.name||"Unknown Feature",a.appendChild(u),o.appendChild(a),t.appendChild(o)}if(null!==(e=this.contentPlacement.catalog)&&void 0!==e&&e.data_schema)for(var s=this.contentPlacement.catalog.data_schema,c=0,l=Object.entries(s);c<l.length;c++){var h=Fs(l[c],2),f=h[0];if("url"===h[1]){var p,d=null===(p=this.contentPlacement.content)||void 0===p||null===(p=p.data)||void 0===p?void 0:p[f];if(d&&""!==d.trim()){var y=new ContextualLocationView(ys,d,d);t.appendChild(y.getElement())}}}if(r){var m=new as(n,{showTitle:!1});t.appendChild(m.getElement())}var g=this._getAdditionalImages();if(g.length>0){var D=this._createImageContainer(g);t.appendChild(D)}}},{key:"updateWithFullContent",value:function(t){this.contentPlacement=t,this.isOptimistic=!1,this._render()}},{key:"findViableAdditionalData",value:function(t){if(!t.catalog||!t.catalog.data_schema)return{};for(var e=t.catalog.data_schema,n=t.catalog.content_title_key,r=t.excluded_child_fields||[],i={},o=0,a=Object.entries(e);o<a.length;o++){var u=Fs(a[o],2),s=u[0],c=u[1];if("image"!==c&&"url"!==c&&s!==n&&!r.includes(s)){var l,h=null===(l=t.content)||void 0===l||null===(l=l.data)||void 0===l?void 0:l[s];if(h&&""!==h.trim()){var f=h.trim();i[s]=f}}}return i}},{key:"_getAdditionalImages",value:function(){var t=[];if(!this.contentPlacement.catalog||!this.contentPlacement.catalog.data_schema)return t;for(var e=this.contentPlacement.catalog.data_schema,n=this.contentPlacement.catalog.content_display_img_key,r=0,i=Object.entries(e);r<i.length;r++){var o=Fs(i[r],2),a=o[0];if("image"===o[1]&&a!==n){var u,s=null===(u=this.contentPlacement.content)||void 0===u||null===(u=u.data)||void 0===u?void 0:u[a];s&&t.push(s)}}return t}},{key:"_createImageContainer",value:function(t){var e=this,n=document.createElement("div");n.className="selection-item-image-container";var r=document.createElement("img");r.src=t[0],r.className="selection-item-preview-image";var i=document.createElement("div");return i.className="image-hover-popup",i.textContent="See photos",n.appendChild(r),n.appendChild(i),n.addEventListener("click",(function(n){n.stopPropagation(),e.fire("selectPhotos",{placementId:e.contentPlacement.placement_id,images:t})})),n}},{key:"_handleDeselect",value:function(){this.fire("deselect:feature",{placementId:this.contentPlacement.placement_id||this.contentPlacement.feature_id})}},{key:"getElement",value:function(){return this.element}}],r&&ks(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function Us(t){return Us="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},Us(t)}function Rs(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,Qs(r.key),r)}}function Qs(t){var e=function(t){if("object"!=Us(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Us(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Us(e)?e:e+""}function Ys(t,e,n){return e=Hs(e),function(t,e){if(e&&("object"==Us(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,Vs()?Reflect.construct(e,n||[],Hs(t).constructor):e.apply(t,n))}function Vs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vs=function(){return!!t})()}function Hs(t){return Hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hs(t)}function Gs(t,e){return Gs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gs(t,e)}const Zs=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=Ys(this,e,[n])).selectedPlacements=[],t.contentItems=[],t.optimisticItems=new Map,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&&Gs(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="selection-content-view",this._render()}},{key:"_render",value:function(){this.element.innerHTML="";var t=document.createElement("div");t.className="selection-view-header",t.textContent="Selected content",this.element.appendChild(t);var e=document.createElement("div");if(e.className="selection-items-list",this.contentItems.length>0||this.optimisticItems.size>0)this.contentItems.forEach((function(t){e.appendChild(t.getElement())})),this.optimisticItems.forEach((function(t){e.appendChild(t.getElement())}));else{var n=document.createElement("div");n.className="selection-empty-state",n.textContent="Click features on the map to select them",e.appendChild(n)}this.element.appendChild(e)}},{key:"updateSelections",value:function(t){var e=this;this.selectedPlacements=t,this.contentItems=[],this.selectedPlacements.forEach((function(t){var n=new Bs(t);n.on("deselect:feature",e._handleDeselectFeature.bind(e)),n.on("selectPhotos",e._handleSelectPhotos.bind(e)),e.contentItems.push(n)})),this._render()}},{key:"addSelection",value:function(t){this.selectedPlacements.some((function(e){return e.placement_id===t.placement_id}))||(this.selectedPlacements.push(t),this.updateSelections(this.selectedPlacements))}},{key:"removeSelection",value:function(t){this.selectedPlacements=this.selectedPlacements.filter((function(e){return e.placement_id!==t})),this.updateSelections(this.selectedPlacements)}},{key:"_handleDeselectFeature",value:function(t){var e=t.placementId;this.fire("deselect:feature",{placementId:e})}},{key:"_handleSelectPhotos",value:function(t){this.fire("selectPhotos",t)}},{key:"clearSelections",value:function(){this.selectedPlacements=[],this.contentItems=[],this._render()}},{key:"getElement",value:function(){return this.element}},{key:"addOptimisticItem",value:function(t){var e=t.properties.placement_id||t.properties.feature_id,n=t.properties.name||"Unknown Feature",r={placement_id:e,name:n,content:{data:{name:n}},catalog:{content_title_key:"name",title:t.properties.type||"Feature",data_schema:{name:"text"}},isOptimistic:!0},i=new Bs(r);i.on("deselect:feature",this._handleDeselectFeature.bind(this)),i.on("selectPhotos",this._handleSelectPhotos.bind(this)),this.contentItems.push(i),this._render()}},{key:"updateOptimisticItem",value:function(t,e){var n=this.contentItems.find((function(e){return e.contentPlacement.placement_id===t&&e.isOptimistic}));n&&(n.updateWithFullContent(e),this._render())}},{key:"removeOptimisticItem",value:function(t){var e=this.contentItems.findIndex((function(e){return e.contentPlacement.placement_id===t&&e.isOptimistic}));-1!==e&&(this.contentItems.splice(e,1),this._render())}}])&&Rs(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function Ws(t){return Ws="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},Ws(t)}function qs(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 Ks(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?qs(Object(n),!0).forEach((function(e){Js(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qs(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Js(t,e,n){return(e=nc(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Xs(){Xs=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==Ws(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(Ws(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function $s(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function tc(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){$s(o,r,i,a,u,"next",t)}function u(t){$s(o,r,i,a,u,"throw",t)}a(void 0)}))}}function ec(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,nc(r.key),r)}}function nc(t){var e=function(t){if("object"!=Ws(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ws(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ws(e)?e:e+""}function rc(t,e,n){return e=ac(e),function(t,e){if(e&&("object"==Ws(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,ic()?Reflect.construct(e,n||[],ac(t).constructor):e.apply(t,n))}function ic(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ic=function(){return!!t})()}function oc(){return oc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ac(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},oc.apply(null,arguments)}function ac(t){return ac=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ac(t)}function uc(t,e){return uc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},uc(t,e)}const sc=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=rc(this,e,[n])).map=null,t.contentPlacementIds=[],t.currentContentPlacement=null,t.contentPlacementView=null,t.selectionContentView=null,t.selectedPlacements=[],t.urlConfirmationPopup=null,t.currentTop=0,t.startingY=0,t.scrollConfiguration={initialHeight:.5,minDistFromBottom:110},t.isDragging=!1,t.isAtTop=!1,t.velocity=0,t.decelerationFactor=.95,t.minVelocity=.1,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&&uc(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._attachResizeListener(),this._initialize(),this.hide(),this.container}},{key:"onRemove",value:function(){var t,n,r;this._documentTouchMoveHandler&&document.removeEventListener("touchmove",this._documentTouchMoveHandler,{capture:!0}),this._documentWheelHandler&&document.removeEventListener("wheel",this._documentWheelHandler,{capture:!0}),(t=e,n=this,r=oc(ac(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){var t=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)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("state:selection",this._handleSelectionState.bind(this)),this.map.on("selection:featureSelected",this._handleSelectionFeatureSelected.bind(this)),this.map.on("selection:featureDeselected",this._handleSelectionFeatureDeselected.bind(this)),this.map.on("selection:featureSelectedOptimistic",this._handleSelectionFeatureSelectedOptimistic.bind(this)),this.map.on("selection:changed",this._handleSelectionChanged.bind(this)),this.map.on("initiate:back",this._handleMapInitiateBack.bind(this)),this.map.map.on("mousedown",this._handleMapFocus.bind(this)),this.map.map.on("touchstart",this._handleMapFocus.bind(this)),this.container.addEventListener("mousedown",(function(t){return t.stopPropagation()})),this.container.addEventListener("click",(function(t){return t.stopPropagation()})),this.container.addEventListener("dblclick",(function(t){return t.stopPropagation()})),this.container.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!1}),this.container.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!1}),this.container.addEventListener("touchend",this.handleTouchEnd.bind(this)),this.container.addEventListener("wheel",this.handleWheelScroll.bind(this),{passive:!1}),this._documentTouchMoveHandler=function(e){t._isMobileLayout()&&"none"!==t.container.style.display&&t.container.contains(e.target)&&e.preventDefault()},document.addEventListener("touchmove",this._documentTouchMoveHandler,{passive:!1,capture:!0}),this._documentWheelHandler=function(e){t._isMobileLayout()&&"none"!==t.container.style.display&&t.container.contains(e.target)&&e.preventDefault()},document.addEventListener("wheel",this._documentWheelHandler,{passive:!1,capture:!0})}},{key:"_handleSelectionFeatureSelectedOptimistic",value:function(t){var e=t.feature;e.properties.placement_id,this.map.multiSelect||(this.selectedPlacements=[],this.selectionContentView&&(this.selectionContentView.contentItems=[],this.selectionContentView._render())),this.selectionContentView&&this.selectionContentView.addOptimisticItem(e),this.show()}},{key:"_handleMapFocus",value:function(t){if(!this._isDesktopLayout()&&t&&t.point){var e=[];try{e=this.map.map.queryRenderedFeatures(t.point)||[]}catch(t){return}0===e.filter((function(t){var e;return"symbol"===(null==t||null===(e=t.layer)||void 0===e?void 0:e.type)})).length&&this.scrollToMin(!0)}}},{key:"handleTouchStart",value:function(t){t.stopPropagation(),this.startingY=t.touches[0].clientY,this.isDragging=!0,this.velocity=0}},{key:"_getMapHeight",value:function(){var t,e;return null!==(t=null===(e=this.map)||void 0===e||null===(e=e.mapContainer)||void 0===e?void 0:e.clientHeight)&&void 0!==t?t:0}},{key:"_applyPanelPosition",value:function(t){var e=this._getMapHeight();this.currentTop=t,this.container.style.top="".concat(t,"px"),this.container.style.height="".concat(Math.max(0,e-t),"px")}},{key:"handleScrolling",value:function(t){var e=this.contentPlacementView.getElement().offsetHeight,n=this._getMapHeight(),r=null;t<=0?r=Math.max(n-e,this.currentTop+t):t>0&&(r=Math.min(n-this.scrollConfiguration.minDistFromBottom,this.currentTop+t)),this.scrollTo(r)}},{key:"handleTouchMove",value:function(t){if(!this._isDesktopLayout()&&this.isDragging){t.preventDefault();var e=t.touches[0].clientY,n=-1*(this.startingY-e);this.velocity=n,this.handleScrolling(n),this.startingY=e}}},{key:"handleTouchEnd",value:function(){this.isDragging=!1,this._applyInertia()}},{key:"_applyInertia",value:function(){var t=this,e=this._getMapHeight(),n=e-this.contentPlacementView.getElement().offsetHeight,r=e-this.scrollConfiguration.minDistFromBottom,i=this.velocity,o=performance.now(),a=function(){var e=performance.now()-o;if(e>=400||Math.abs(t.velocity)<t.minVelocity)t.velocity=0;else{var u=e/400,s=1-Math.pow(1-u,2);t.velocity=i*(1-s);var c=t.currentTop+t.velocity;if(c<=n)return t.scrollTo(n),void(t.velocity=0);if(c>=r)return t.scrollTo(r),void(t.velocity=0);t.scrollTo(c),requestAnimationFrame(a)}};a()}},{key:"handleWheelScroll",value:function(t){if(!this._isDesktopLayout()){t.preventDefault();var e=-t.deltaY;this.handleScrolling(e)}}},{key:"_renderDesktopView",value:function(){if(this.contentPlacementView){var t=this.contentPlacementView.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view")}}},{key:"_renderMobileView",value:function(){if(this.contentPlacementView){var t=this.contentPlacementView.getElement();this.container.appendChild(t),this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view")}}},{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?this.map.setToSelectedContentState(this.contentPlacementIds):"selection"===t&&(this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews())}},{key:"_handleSelectChildContentPlacement",value:function(t){var e=t.placementId;this.contentPlacementIds.push(e),this.map.setToSelectedContentState(this.contentPlacementIds)}},{key:"_handleDefaultState",value:(a=tc(Xs().mark((function t(){return Xs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.container.classList.remove("selection-mode"),!this._isMobileLayout()){t.next=4;break}return t.next=4,this._scrollToBottom(!0,{duration:50});case 4:this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews();case 8:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"_handleSearchState",value:function(t){this.hide(),this.contentPlacementIds=[],this.currentContentPlacement=null,this._clearViews(),this._isMobileLayout()&&this._scrollToBottom()}},{key:"_handleSelectedContentState",value:function(t){var e=t.contentPlacementIds,n=t.selectedContentPlacement;this.contentPlacementIds=e,this.currentContentPlacement=n,this._updateContentViews(),this.show()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleSetupState",value:function(){this.hide()}},{key:"_handleSelectionState",value:function(t){this.selectedPlacements=[],this._clearViews(),this.map.clearSelectionLayers(),this._updateSelectionView(),this.show()}},{key:"_handleSelectionFeatureSelected",value:function(t){var e=t.feature,n=t.contentPlacement;if(!this.selectedPlacements.some((function(t){return t.placement_id===n.placement_id}))){var r=!this.map.multiSelect;this.map.addConfirmedSelectionFeature(e,r),this.map.multiSelect||(this.selectedPlacements=[]),this.selectedPlacements.push(n),this.selectionContentView&&this.selectionContentView.updateOptimisticItem(n.placement_id,n)}this._updateSelectionView(),this.show()}},{key:"_handleSelectionFeatureDeselected",value:function(t){t.feature;var e=t.placementId;this.map.removeConfirmedSelectionFeature(e),this.selectedPlacements=this.selectedPlacements.filter((function(t){return t.placement_id!==e})),this._updateSelectionView()}},{key:"_updateSelectionView",value:function(){var t=this;this.container.innerHTML="",this._isDesktopLayout()?(this.container.classList.add("desktop-view"),this.container.classList.remove("mobile-view")):(this.container.classList.add("mobile-view"),this.container.classList.remove("desktop-view")),this.container.classList.toggle("kiosk-view","kiosk"===this.currentViewType),this.selectionContentView||(this.selectionContentView=new Zs,this.selectionContentView.on("deselect:feature",(function(e){t._handleDeselectFeature(e)})),this.selectionContentView.on("selectPhotos",(function(e){t._handleSelectPhotos(e)}))),this.selectionContentView.updateSelections(this.selectedPlacements),this.container.appendChild(this.selectionContentView.getElement())}},{key:"_handleDeselectFeature",value:function(t){var e=t.placementId,n=this.map.getConfirmedSelectionFeatures().find((function(t){return t.properties.placement_id===e||t.properties.feature_id===e}));if(n){var r=n.properties.feature_id;this.map.removeConfirmedSelectionFeature(r),this.map.fire("selection:featureDeselected",{feature:n,placementId:n.properties.placement_id||r}),this.selectedPlacements=this.selectedPlacements.filter((function(t){return t.placement_id!==e})),this._updateSelectionView(),this.map.fire("selection:changed",{selectedContent:this.map.getConfirmedSelectionFeatures().map((function(t){return t.properties})),selectionCount:this.map.getConfirmedSelectionFeatures().length})}else console.warn("⚠️ Feature not found in confirmed selection for deselection:",e)}},{key:"_handleSelectionChanged",value:function(t){t.selectedContent,t.selectionCount}},{key:"_handleSelectDirectionsButton",value:(o=tc(Xs().mark((function t(e){var n;return Xs().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)}))),function(t){return o.apply(this,arguments)})},{key:"_handleSelectShareButton",value:(i=tc(Xs().mark((function t(e){var n,r,i,o,a,u,s,c,l,h,f,p=this;return Xs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.placementId,r=this.map.getCurrentFloor(),this.map.mapData.account_id,i=this.map.mapData.map_id,o=this.map.mapData.map_view_id,a=this.map.map.getCenter(),u=a.lng.toFixed(6),s=a.lat.toFixed(6),c=this.map.map.getPitch().toFixed(2),l=this.map.map.getBearing().toFixed(2),h=this.map.map.getZoom().toFixed(2),f="https://maps.waygomaps.com/".concat(i,"/").concat(o,"/selected-content/").concat(n,"/f").concat(r,"@").concat(u,",").concat(s,",").concat(h,",").concat(c,",").concat(l),navigator.clipboard.writeText(f).then((function(){p.contentPlacementView.showCopyPopup()})).catch((function(t){return console.error("Failed to copy text:",t)}));case 13:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_handleSelectUrlButton",value:function(t){var e=t.url;e&&(this.urlConfirmationPopup||(this.urlConfirmationPopup=new ao),this.urlConfirmationPopup.show(this.map,e,{isKioskMode:"kiosk"===this.currentViewType}))}},{key:"_handleSelectPhotos",value:function(t){var e=this,n=(t.placementId,t.images),r=0,i=n.length;this._isDesktopLayout()||this._isMobileLayout()?(this.map.showModal('\n <div class="waygo-map-modal-content photo-modal">\n <button class="modal-close-button">\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />\n </svg>\n </button>\n \n <div class="modal-counter">\n <span id="imageCounter">'.concat(r+1," / ").concat(i,'</span>\n </div>\n \n <div class="modal-image-container">\n <button id="prevButton" class="modal-nav-button prev">\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5L8.25 12l7.5-7.5" />\n </svg>\n </button>\n \n <div class="modal-image-wrapper">\n <img id="modalImage" src="').concat(n[r],'" class="modal-image">\n </div>\n \n <button id="nextButton" class="modal-nav-button next">\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />\n </svg>\n </button>\n </div>\n </div>\n ')),document.querySelector(".modal-close-button").addEventListener("click",(function(){return e.map.hideModal()}))):this.map.showModal('\n <div class="waygo-map-modal-content photo-modal">\n <img src="'.concat(n[r],'" class="modal-image">\n </div>\n '));var o=document.getElementById("modalImage"),a=document.getElementById("prevButton"),u=document.getElementById("nextButton"),s=document.getElementById("imageCounter");a.onclick=function(){r=(r-1+n.length)%n.length,o.src=n[r],s.textContent="".concat(r+1," / ").concat(i)},u.onclick=function(){r=(r+1)%n.length,o.src=n[r],s.textContent="".concat(r+1," / ").concat(i)}}},{key:"_updateContentViews",value:function(){this._clearViews(),this._render()}},{key:"hide",value:function(){this.container.scrollTop=0,this.container&&(this.container.style.display="none",this._mobileScrollLocked&&this.map&&"function"==typeof this.map._unlockMobileScroll&&(this.map._unlockMobileScroll(),this._mobileScrollLocked=!1))}},{key:"scrollTo",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=Ks(Ks({},{duration:150,easing:"easeInOut"}),r),o=this.currentTop,a=t-o,u=null,s={linear:function(t){return t},easeInOut:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeIn:function(t){return t*t},easeOut:function(t){return t*(2-t)}},c=s[i.easing]||s.easeInOut,l=i.duration;return new Promise((function(r){if(!n)return e._applyPanelPosition(t),void r();var i=function(t){null===u&&(u=t);var n=t-u,s=Math.min(n/l,1),h=c(s),f=o+h*a;e._applyPanelPosition(f),s<1?requestAnimationFrame(i):r()};requestAnimationFrame(i)}))}},{key:"_resetScroll",value:function(){var t=this,e=this._getMapHeight();this.currentTop<0&&this.scrollTo(e);var n=this.contentPlacementView.findViableAdditionalData(this.currentContentPlacement),r=Object.keys(n).length,i=Object.keys(this.currentContentPlacement.children).length,o=e*(1-this.scrollConfiguration.initialHeight);0===r&&0===i?setTimeout((function(){if(t.contentPlacementView&&t.contentPlacementView.contentPlacementHeader){var n=t.contentPlacementView.header.offsetHeight;o=e-n-20}t.scrollTo(o,!0)}),50):this.scrollTo(o,!0)}},{key:"_scrollToBottom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._getMapHeight();return this.scrollTo(n,t,e)}},{key:"scrollToMin",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._getMapHeight();this.scrollTo(e-this.scrollConfiguration.minDistFromBottom,t)}},{key:"_render",value:function(){var t;if(0!==this.contentPlacementIds.length&&null!==this.currentContentPlacement){this.contentPlacementView=new Is;var e="selection"===this.map.getCurrentState(),n="kiosk"===this.currentViewType,r=(null===(t=this.map.mapData)||void 0===t?void 0:t.map_id)||null;this.contentPlacementView.updateView(this.currentContentPlacement,e,n,r),this.contentPlacementView.on("selectChildContentPlacement",this._handleSelectChildContentPlacement.bind(this)),this.contentPlacementView.on("selectDirectionsButton",this._handleSelectDirectionsButton.bind(this)),this.contentPlacementView.on("selectShareButton",this._handleSelectShareButton.bind(this)),this.contentPlacementView.on("selectPhotos",this._handleSelectPhotos.bind(this)),this.contentPlacementView.on("selectUrlButton",this._handleSelectUrlButton.bind(this)),this._initialize(),this._isMobileLayout()&&this._resetScroll()}}},{key:"_handleSelectionFeatureDeselectedOptimistic",value:function(t){var e=t.placementId;this.selectionContentView&&this.selectionContentView.removeOptimisticItem(e)}}],r&&ec(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o,a}(di);function cc(t){return cc="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},cc(t)}function lc(){lc=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==cc(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(cc(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function hc(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function fc(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){hc(o,r,i,a,u,"next",t)}function u(t){hc(o,r,i,a,u,"throw",t)}a(void 0)}))}}function pc(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,dc(r.key),r)}}function dc(t){var e=function(t){if("object"!=cc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=cc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==cc(e)?e:e+""}function yc(t,e,n){return e=Dc(e),function(t,e){if(e&&("object"==cc(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,mc()?Reflect.construct(e,n||[],Dc(t).constructor):e.apply(t,n))}function mc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(mc=function(){return!!t})()}function gc(){return gc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Dc(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},gc.apply(null,arguments)}function Dc(t){return Dc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Dc(t)}function vc(t,e){return vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vc(t,e)}var Mc={collapsed:.2,mid:.5,full:.97},bc="content-details--consolidated",wc="content-details--card",Ec="content-details--panel-hosted";const Cc=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=yc(this,e,[n])).map=null,t.contentPlacementIds=[],t.currentContentPlacement=null,t.contentDetailsView=null,t.urlConfirmationPopup=null,t._presentation=null,t.stickyPanelView=new wu({stickyPoints:Mc,initialPoint:"mid",header:{buttons:[{label:"✕",ariaLabel:"Close details",onClick:function(){t.map&&t.map.setToDefaultState()}}]}}),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&&vc(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-panel-control-container",this.hide(),this._initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.stickyPanelView.setHandoffHost(t),this.stickyPanelView.enableCollapseOnMapInteraction(t),this.container}},{key:"onRemove",value:function(){var t,n,r;this.stickyPanelView.destroy(),(t=e,n=this,r=gc(Dc(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"show",value:function(){this.container&&(this.container.style.display="flex",this._isMobileLayout()&&this.map&&"function"==typeof this.map._lockMobileScroll&&(this.map._lockMobileScroll(),this._mobileScrollLocked=!0))}},{key:"hide",value:function(){this.container&&(this.container.style.display="none",this._mobileScrollLocked&&this.map&&"function"==typeof this.map._unlockMobileScroll&&(this.map._unlockMobileScroll(),this._mobileScrollLocked=!1))}},{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("state:setup",this._handleSetupState.bind(this)),this.map.on("state:selection",this._handleSelectionState.bind(this)),this.map.on("initiate:back",this._handleMapInitiateBack.bind(this))}},{key:"_renderDesktopView",value:function(){if(this._presentation="desktop",this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view"),this.contentDetailsView){var t=this.contentDetailsView.getElement();t.classList.add(bc,wc),t.classList.remove(Ec),this.container.appendChild(t)}}},{key:"_renderMobileView",value:function(){if(this._presentation="panel",this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view"),this.contentDetailsView){var t=this.contentDetailsView.getElement();t.classList.add(bc,Ec),t.classList.remove(wc),this.stickyPanelView.setContentView(t)}this.container.appendChild(this.stickyPanelView.getElement()),this.stickyPanelView.refreshLayout(),this.map&&"function"==typeof this.map.getCurrentState&&"selectedContent"===this.map.getCurrentState()&&this.contentDetailsView&&this.stickyPanelView.present({snapTo:"mid"})}},{key:"_handleSelectedContentState",value:function(t){var e=t||{},n=e.contentPlacementIds,r=void 0===n?[]:n,i=e.selectedContentPlacement,o=void 0===i?null:i;if(!Array.isArray(r)||0===r.length||!o)return this.stickyPanelView.dismiss({animate:!1}),this.hide(),void this._clearContent();this.contentPlacementIds=r,this.currentContentPlacement=o,this._buildContentDetailsView(),this._updateContentView(),this.show(),"panel"===this._presentation&&this.stickyPanelView.present({snapTo:"mid"})}},{key:"_handleDefaultState",value:function(){var t=this,e=function(){return t._clearContent()};"panel"===this._presentation?this.stickyPanelView.dismiss({onHidden:function(){t.hide(),e()}}):(this.hide(),e())}},{key:"_handleSearchState",value:function(t){this.stickyPanelView.dismiss({animate:!1}),this.hide(),this._clearContent()}},{key:"_handleDirectionsState",value:function(t){this.stickyPanelView.dismiss({animate:!1}),this.hide()}},{key:"_handleSetupState",value:function(){this.stickyPanelView.dismiss({animate:!1}),this.hide()}},{key:"_handleSelectionState",value:function(t){this.stickyPanelView.dismiss({animate:!1}),this.hide(),this._clearContent()}},{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&&this.map.setToSelectedContentState(this.contentPlacementIds)}},{key:"_buildContentDetailsView",value:function(){var t;if(0!==this.contentPlacementIds.length&&null!==this.currentContentPlacement){this.contentDetailsView=new Is;var e="kiosk"===this.currentViewType,n=(null===(t=this.map.mapData)||void 0===t?void 0:t.map_id)||null;this.contentDetailsView.updateView(this.currentContentPlacement,!1,e,n),this.contentDetailsView.on("selectChildContentPlacement",this._handleSelectChildContentPlacement.bind(this)),this.contentDetailsView.on("selectDirectionsButton",this._handleSelectDirectionsButton.bind(this)),this.contentDetailsView.on("selectShareButton",this._handleSelectShareButton.bind(this)),this.contentDetailsView.on("selectPhotos",this._handleSelectPhotos.bind(this)),this.contentDetailsView.on("selectUrlButton",this._handleSelectUrlButton.bind(this))}else this.contentDetailsView=null}},{key:"_clearContent",value:function(){this.contentPlacementIds=[],this.currentContentPlacement=null,this.contentDetailsView=null,this.stickyPanelView.setContentView(null),this._clearViews()}},{key:"_handleSelectChildContentPlacement",value:function(t){var e=t.placementId;this.contentPlacementIds.push(e),this.map.setToSelectedContentState(this.contentPlacementIds)}},{key:"_handleSelectDirectionsButton",value:(o=fc(lc().mark((function t(e){var n;return lc().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)}))),function(t){return o.apply(this,arguments)})},{key:"_handleSelectShareButton",value:(i=fc(lc().mark((function t(e){var n,r,i,o,a,u,s,c,l,h,f,p=this;return lc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.placementId,r=this.map.getCurrentFloor(),i=this.map.mapData.map_id,o=this.map.mapData.map_view_id,a=this.map.map.getCenter(),u=a.lng.toFixed(6),s=a.lat.toFixed(6),c=this.map.map.getPitch().toFixed(2),l=this.map.map.getBearing().toFixed(2),h=this.map.map.getZoom().toFixed(2),f="https://maps.waygomaps.com/".concat(i,"/").concat(o,"/selected-content/").concat(n,"/f").concat(r,"@").concat(u,",").concat(s,",").concat(h,",").concat(c,",").concat(l),navigator.clipboard.writeText(f).then((function(){p.contentDetailsView&&p.contentDetailsView.showCopyPopup()})).catch((function(t){return console.error("Failed to copy text:",t)}));case 12:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_handleSelectUrlButton",value:function(t){var e=t.url;e&&(this.urlConfirmationPopup||(this.urlConfirmationPopup=new ao),this.urlConfirmationPopup.show(this.map,e,{isKioskMode:"kiosk"===this.currentViewType}))}},{key:"_handleSelectPhotos",value:function(t){var e=t.images;!function(t,e){if(t&&Array.isArray(e)&&0!==e.length){var n=0,r=e.length;t.showModal('\n <div class="waygo-map-modal-content photo-modal">\n <button class="modal-close-button">\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />\n </svg>\n </button>\n\n <div class="modal-counter">\n <span id="imageCounter">'.concat(n+1," / ").concat(r,'</span>\n </div>\n\n <div class="modal-image-container">\n <button id="prevButton" class="modal-nav-button prev">\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5L8.25 12l7.5-7.5" />\n </svg>\n </button>\n\n <div class="modal-image-wrapper">\n <img id="modalImage" src="').concat(e[n],'" class="modal-image">\n </div>\n\n <button id="nextButton" class="modal-nav-button next">\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">\n <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />\n </svg>\n </button>\n </div>\n </div>\n '));var i=document.querySelector(".modal-close-button");i&&i.addEventListener("click",(function(){return t.hideModal()}));var o=document.getElementById("modalImage"),a=document.getElementById("prevButton"),u=document.getElementById("nextButton"),s=document.getElementById("imageCounter");if(o&&a&&u&&s){var c=function(t){n=(t+r)%r,o.src=e[n],s.textContent="".concat(n+1," / ").concat(r)};a.onclick=function(){return c(n-1)},u.onclick=function(){return c(n+1)}}}}(this.map,e)}}],r&&pc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o}(di);function jc(t){return jc="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},jc(t)}function Ac(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,Nc(r.key),r)}}function Nc(t){var e=function(t){if("object"!=jc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=jc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jc(e)?e:e+""}function Sc(t,e,n){return e=Tc(e),function(t,e){if(e&&("object"==jc(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,Ic()?Reflect.construct(e,n||[],Tc(t).constructor):e.apply(t,n))}function Ic(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ic=function(){return!!t})()}function Tc(t){return Tc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Tc(t)}function Fc(t,e){return Fc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Fc(t,e)}const Oc=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=Sc(this,e,[n]))._initialize(),t.node=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&&Fc(t,e)}(e,t),n=e,(r=[{key:"_initialize",value:function(){var t=this;this.element=document.createElement("div"),this.element.className="setup-view",this.titleElement=document.createElement("h3"),this.titleElement.className="setup-title",this.setTitle("Kiosk setup");var e=document.createElement("div");e.className="setup-instructions";var n=document.createElement("p");n.innerHTML='In kiosk mode, navigation paths are set to start from the kiosk position, by default.<br><br><b>Drag the red point on the map to set your kiosk position.</b><br><br>Once you are done, click "Configure Map" to load the configured map in kiosk mode, or "Exit" to exit kiosk mode. <br><br>The kiosk URL displayed below can be copied to load this configuration at a later time.',e.appendChild(n),this.codeContainer=document.createElement("div"),this.codeContainer.className="setup-code-container",this.codeSnippet=document.createElement("pre"),this.codeSnippet.className="setup-code-snippet",this.map&&(this.codeSnippet.innerHTML="waygomaps.com/".concat(this.map.mapData.map_id,"?location=").concat(this.node.node_id)),this.copyButton=document.createElement("button"),this.copyButton.className="setup-copy-button",this.copyButton.innerText="Copy",this.copyButton.addEventListener("click",(function(){navigator.clipboard.writeText(t.codeSnippet.innerText),t.copyButton.innerText="Copied!",setTimeout((function(){copyButton.innerText="Copy"}),2e3)})),this.codeContainer.appendChild(this.codeSnippet),this.codeContainer.appendChild(this.copyButton);var r=document.createElement("div");r.className="setup-buttons-container";var i=document.createElement("button");i.className="setup-button exit",i.innerText="Exit",i.addEventListener("click",(function(){t.fire("exit")}));var o=document.createElement("button");o.className="setup-button configure",o.innerText="Configure Map",o.addEventListener("click",(function(){t.fire("configure")})),r.appendChild(i),r.appendChild(o),this.element.appendChild(this.titleElement),this.element.appendChild(e),this.element.appendChild(this.codeContainer),this.element.appendChild(r)}},{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}}])&&Ac(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function kc(t){return kc="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},kc(t)}function xc(){xc=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==kc(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(kc(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Lc(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function _c(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Lc(o,r,i,a,u,"next",t)}function u(t){Lc(o,r,i,a,u,"throw",t)}a(void 0)}))}}function zc(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,Pc(r.key),r)}}function Pc(t){var e=function(t){if("object"!=kc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=kc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kc(e)?e:e+""}function Bc(t,e,n){return e=Qc(e),function(t,e){if(e&&("object"==kc(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,Uc()?Reflect.construct(e,n||[],Qc(t).constructor):e.apply(t,n))}function Uc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Uc=function(){return!!t})()}function Rc(){return Rc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Qc(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Rc.apply(null,arguments)}function Qc(t){return Qc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qc(t)}function Yc(t,e){return Yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yc(t,e)}const Vc=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=Bc(this,e,[n])).setupView=new Oc,t.routesApi=nn.getRotuesApi(),t.node=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&&Yc(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){return this.map=t,this.container=document.createElement("div"),this.container.className="setup-control-container",this._initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.show(),this.container}},{key:"onRemove",value:function(){var t,n,r;this.removeDraggablePoint(),(t=e,n=this,r=Rc(Qc(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"removeDraggablePoint",value:function(){this.map&&this.map.map&&(this.map.map.getLayer("point")&&this.map.map.removeLayer("point"),this.map.map.getLayer("point-border")&&this.map.map.removeLayer("point-border"),this.map.map.getSource("point")&&this.map.map.removeSource("point"))}},{key:"initializeDraggablePoint",value:function(){var t,e=this,n=this.map.map.getCanvas(),r=(null===(t=this.map.mapData)||void 0===t?void 0:t.reference_coordinate)||[0,0],i={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[r[0],r[1]]},properties:{_floor:this.map.getCurrentFloor()}}]},o=function(t){var n=t.lngLat;i.features[0].geometry.coordinates=[n.lng,n.lat];var r=e.map.map.getSource("point");r&&r.setData(i)},a=function(){var t=_c(xc().mark((function t(r){var a,u,s,c,l,h,f;return xc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=r.lngLat,n.style.cursor="",c=(null===(a=e.map.mapData)||void 0===a?void 0:a.reference_coordinate)||[0,0],l=(null===(u=e.map.mapData)||void 0===u?void 0:u.coordinate_scaling_multiplier)||30,h=_n([s.lng,s.lat],c,l),f=i.features[0].properties._floor,t.next=8,e.getClosestNode(h,f);case 8:e.map.map.off("mousemove",o),e.map.map.off("touchmove",o);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();this.map.on("floorChanged",(function(t){var n=t.floorIndex;i.features[0].properties._floor=n;var r=e.map.map.getSource("point");r&&r.setData(i)})),this.map.map.addSource("point",{type:"geojson",data:i}),this.map.map.addLayer({id:"point-border",type:"circle",source:"point",paint:{"circle-radius":18,"circle-color":"#FFFFFF"}}),this.map.map.addLayer({id:"point",type:"circle",source:"point",paint:{"circle-radius":15,"circle-color":"#F84C4C"}}),this.map.map.on("mouseenter","point",(function(){e.map.map.setPaintProperty("point","circle-color","#FF8080"),n.style.cursor="pointer"})),this.map.map.on("mouseleave","point",(function(){e.map.map.setPaintProperty("point","circle-color","#F84C4C"),n.style.cursor="default"})),this.map.map.on("mousedown","point",(function(t){t.preventDefault(),n.style.cursor="grabbing",e.map.map.on("mousemove",o),e.map.map.once("mouseup",a)})),this.map.map.on("touchstart","point",(function(t){1===t.points.length&&(t.preventDefault(),e.map.map.on("touchmove",o),e.map.map.once("touchend",a))}))}},{key:"getVertex",value:function(){var t,e,n=this.map.map.querySourceFeatures("point"),r=(null===(t=this.map.mapData)||void 0===t?void 0:t.reference_coordinate)||[0,0],i=(null===(e=this.map.mapData)||void 0===e?void 0:e.coordinate_scaling_multiplier)||30;return n.length>0?_n(n[0].geometry.coordinates,r,i):null}},{key:"getClosestNode",value:(o=_c(xc().mark((function t(e,n){var r;return xc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.routesApi.findClosestNode(this.map.mapData.map_id,e,n);case 2:r=t.sent,this.node=r,this.map.location=r.node_id,this.setupView.codeSnippet.innerHTML="https://maps.waygomaps.com/".concat(this.map.mapData.map_id,"?location=").concat(r.node_id);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return o.apply(this,arguments)})},{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("state:setup",this._handleSetupState.bind(this)),this.map.on("load",this._handleMapLoad.bind(this)),this.map.on("floorChanged",this._handleFloorChange.bind(this)),this.setupView.on("exit",this._handleSetupViewExitState.bind(this)),this.setupView.on("configure",this._handleSetupViewConfigureState.bind(this))}},{key:"_handleMapLoad",value:function(t){}},{key:"_renderDesktopView",value:function(){this.container.classList.add("desktop-view"),this.container.classList.remove("mobile-view")}},{key:"_renderMobileView",value:function(){this.container.classList.add("mobile-view"),this.container.classList.remove("desktop-view")}},{key:"bringToFront",value:function(){this.container.style.zIndex="1"}},{key:"bringBack",value:function(){this.container.style.zIndex=""}},{key:"_handleDefaultState",value:function(){this.hide()}},{key:"_handleSearchState",value:function(t){this.hide()}},{key:"_handleSelectedContentState",value:function(t){this.hide()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleSetupState",value:(i=_c(xc().mark((function t(){var e=this;return xc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.initializeDraggablePoint(),this.show(),setTimeout(_c(xc().mark((function t(){var n,r,i;return xc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.getVertex(),r=e.map.getCurrentFloor(),null===n||null===r){t.next=5;break}return t.next=5,e.getClosestNode(n,r);case 5:i=e.setupView.getElement(),e.container.appendChild(i);case 7:case"end":return t.stop()}}),t)}))),200);case 3:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"_handleFloorChange",value:function(t){var e=t.floorIndex,n=this.getVertex();"setup"===this.map.getCurrentState()&&this.getClosestNode(n,e)}},{key:"_handleSetupViewExitState",value:function(){this.removeDraggablePoint(),this.map.setToDefaultState()}},{key:"_handleSetupViewConfigureState",value:function(){this.removeDraggablePoint(),this.node&&this.node.node_id&&this.map.setViewType("kiosk",{location:this.node.node_id}),this.map.setToDefaultState()}}],r&&zc(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o}(di);function Hc(t){return Hc="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},Hc(t)}function Gc(t){return function(t){if(Array.isArray(t))return qc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Wc(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zc(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,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||Wc(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 Wc(t,e){if(t){if("string"==typeof t)return qc(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)?qc(t,e):void 0}}function qc(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 Kc(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 Jc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Kc(Object(n),!0).forEach((function(e){Xc(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kc(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Xc(t,e,n){return(e=tl(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $c(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,tl(r.key),r)}}function tl(t){var e=function(t){if("object"!=Hc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Hc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hc(e)?e:e+""}function el(t,e,n){return e=il(e),function(t,e){if(e&&("object"==Hc(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,nl()?Reflect.construct(e,n||[],il(t).constructor):e.apply(t,n))}function nl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(nl=function(){return!!t})()}function rl(){return rl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=il(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},rl.apply(null,arguments)}function il(t){return il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},il(t)}function ol(t,e){return ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ol(t,e)}var al=["text-opacity","icon-opacity"],ul=["text-halo-color","icon-halo-color"],sl={"text-opacity":1,"icon-opacity":1};const cl=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=el(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.selectedTextColor="#BE2E28",t.interactionEnabled=!0,t.selectionCriteria=null,t.originalPaintProperties={},t.selectionModeExpressions={},t.selectionHoverColor="#4A90E2",t.currentHoveredLayerId=null,t.currentHoveredFeatureId=null,t.selectionHoverHandler=null,t.searchSymbolOpacityBackup={},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&&ol(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.createHighlightedContentDotLayer(),this.createSelectedContentLayer(),this.storeTextColorReferences(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=rl(il(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{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)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("state:selection",this._handleSelectionState.bind(this)),this.map.on("additionalSearchResults",this._handleAdditionalSearch.bind(this)),this.map.on("hoverSearchResult",this._handleHoverSearchResult.bind(this)),this.map.on("hoverEndSearchResult",this._handleHoverEndSearchResult.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:"_getSelectedContentLayerPaint",value:function(){var t,e=null===(t=this.map)||void 0===t||null===(t=t.mapData)||void 0===t?void 0:t.map_id;return{"text-color":e&&br.includes(e)?"#ff6661":"#BE2E28","text-halo-color":e&&br.includes(e)?"#1c1c1c":"#ffffff","text-halo-width":e&&br.includes(e)?2:1}}},{key:"_getHighlightedContentLayerPaint",value:function(){var t,e=null===(t=this.map)||void 0===t||null===(t=t.mapData)||void 0===t?void 0:t.map_id;return{"text-color":e&&br.includes(e)?"#ffffff":"#1E1E1E","text-halo-color":e&&br.includes(e)?"#1c1c1c":"#ffffff","text-halo-width":e&&br.includes(e)?2:1}}},{key:"_getTextSize",value:function(){var t,e=null===(t=this.map)||void 0===t||null===(t=t.mapData)||void 0===t?void 0:t.map_id;return e&&br.includes(e)?16:14}},{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","name"],"text-font":["Inter Medium"],"text-size":this._getTextSize(),"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:this._getSelectedContentLayerPaint()})}},{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","name"],"text-font":["Inter Medium"],"text-size":this._getTextSize(),"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":2,"icon-padding":1},paint:this._getHighlightedContentLayerPaint()})}},{key:"createHighlightedContentDotLayer",value:function(){this.map.map.addSource("highlighted-content-dots",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.map.addLayer({id:"highlighted-content-dot-layer",type:"symbol",source:"highlighted-content-dots",layout:{"icon-image":"highlightedDot","icon-size":.24,"icon-offset":[0,-5],"icon-anchor":"bottom","symbol-z-elevate":!0,"icon-padding":1},paint:this._getHighlightedContentLayerPaint()},"highlighted-content-layer")}},{key:"_handleDefaultState",value:function(){this.interactionEnabled=!0,this.removeSelectionVisuals(),this.selectionCriteria=null,this.applyHoverEffectToAllSymbolLayers(),this.map.clearHighlightedContentLayer(),this.map.clearSelectedContentLayer(),this.showSymbolLayers()}},{key:"_handleSearchState",value:function(t){t.query;var e=t.results;this.interactionEnabled=!0,this.applyHoverEffectToAllSymbolLayers(),this.hideSymbolLayers(),this.map.clearSelectedContentLayer();var n=e.reduce((function(t,e){return t[e.floor]=(t[e.floor]||0)+1,t}),{}),r=Object.entries(n).reduce((function(t,e){return e[1]>t[1]?e:t}),[0,0])[0],i=this.map.getCurrentFloor(),o=e.some((function(t){return t.floor===i})),a=i;o||(a=r,this.map.updateFloor(parseInt(a))),a=parseInt(a),this.updateLabelsForSearchResults(e,!0,a)}},{key:"_handleAdditionalSearch",value:function(t){var e=t.results;this.updateLabelsForSearchResults(e,!0)}},{key:"_handleHoverSearchResult",value:function(t){var e=t.result;this.updateLabelForSelectedContentPlacement(e,!1)}},{key:"_handleHoverEndSearchResult",value:function(){"search"===this.map.getCurrentState()&&this.map.clearSelectedContentLayer()}},{key:"_handleSelectedContentState",value:function(t){t.contentPlacementIds;var e=t.selectedContentPlacement;this.interactionEnabled=!0,this.applyHoverEffectToAllSymbolLayers(),this.showSymbolLayers(),this.updateLabelForSelectedContentPlacement(e)}},{key:"_handleDirectionsState",value:function(t){t.endContentPlacement,this.interactionEnabled=!1,this.removeHoverEffects(),this.showSymbolLayers()}},{key:"_handleSetupState",value:function(){this.interactionEnabled=!1,this.removeHoverEffects()}},{key:"_handleSelectionState",value:function(t){var e=t.criteria,n=t.geojson;this.selectionCriteria=e,this.interactionEnabled=!0,this.applySelectionModeVisuals(e),this.map.removeMatchingFeaturesFromExistingLayers(e),this.map.createSelectableContentLayers(n),this.processPendingExtrusionFeatures(),this.processPendingSymbolFeatures(),this.applySelectableHoverEffects()}},{key:"_isProtectedSymbolLayer",value:function(t){return"selected-content-layer"===t||"highlighted-content-layer"===t||"highlighted-content-dot-layer"===t||t.startsWith("IMAGE")}},{key:"_scaleOpacityForDimming",value:function(t,e){return void 0===t?e:Array.isArray(t)?["*",t,e]:t*e}},{key:"_parseLiteralColorToRgba",value:function(t){if("string"!=typeof t)return null;var e=t.trim().toLowerCase(),n={white:{r:255,g:255,b:255,a:1},black:{r:0,g:0,b:0,a:1}};if(n[e])return Jc({},n[e]);if(e.startsWith("#")){var r=e.slice(1);if(3===r.length&&(r=r.split("").map((function(t){return t+t})).join("")),6===r.length||8===r.length)return{r:parseInt(r.slice(0,2),16),g:parseInt(r.slice(2,4),16),b:parseInt(r.slice(4,6),16),a:8===r.length?parseInt(r.slice(6,8),16)/255:1}}var i=e.match(/^rgba?\(([^)]+)\)$/);if(i){var o,a=i[1].split(",").map((function(t){return parseFloat(t.trim())}));if(a.length>=3)return{r:a[0],g:a[1],b:a[2],a:null!==(o=a[3])&&void 0!==o?o:1}}return null}},{key:"_dimHaloColorForDimming",value:function(t,e){if(void 0!==t){if(Array.isArray(t)){if("rgba"===t[0]&&t.length>=5){var n=t[4],r=Array.isArray(n)?["*",n,e]:n*e;return["rgba",t[1],t[2],t[3],r]}return t}var i=this._parseLiteralColorToRgba(t);return i?(i.a*=e,"rgba(".concat(i.r,", ").concat(i.g,", ").concat(i.b,", ").concat(i.a,")")):t}}},{key:"_getSafePaintProperty",value:function(t,e){try{return this.map.map.getPaintProperty(t,e)}catch(n){return void console.warn('Unable to read paint property "'.concat(e,'" on layer "').concat(t,'":'),n)}}},{key:"_setSafePaintProperty",value:function(t,e,n){try{this.map.map.setPaintProperty(t,e,n)}catch(n){console.warn('Unable to set paint property "'.concat(e,'" on layer "').concat(t,'":'),n)}}},{key:"_restoreDimmedPaintProperty",value:function(t,e,n){var r=void 0===n?sl[e]:n;void 0!==r&&this._setSafePaintProperty(t,e,r)}},{key:"hideSymbolLayers",value:function(){var t=this;this.map.map.getStyle().layers.forEach((function(e){if("symbol"===e.type&&!t._isProtectedSymbolLayer(e.id)){var n=e.id;if(!t.searchSymbolOpacityBackup[n]){var r={};al.forEach((function(e){var i=t._getSafePaintProperty(n,e);r[e]=i,t._setSafePaintProperty(n,e,t._scaleOpacityForDimming(i,.5))})),ul.forEach((function(e){var i=t._getSafePaintProperty(n,e);if(void 0!==i){var o=t._dimHaloColorForDimming(i,.5);r[e]=i,o!==i&&t._setSafePaintProperty(n,e,o)}})),Object.keys(r).length>0&&(t.searchSymbolOpacityBackup[n]=r)}}}))}},{key:"showSymbolLayers",value:function(){var t=this;Object.entries(this.searchSymbolOpacityBackup).forEach((function(e){var n=Zc(e,2),r=n[0],i=n[1];Object.entries(i).forEach((function(e){var n=Zc(e,2),i=n[0],o=n[1];t._restoreDimmedPaintProperty(r,i,o)}))})),this.searchSymbolOpacityBackup={}}},{key:"updateLabelsForSearchResults",value:function(t){var e,n,r=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;null===o&&(o=this.map.getCurrentFloor());var a=(null===(e=this.map.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],u=(null===(n=this.map.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30;this.map.clearHighlightedContentLayer();var s=[],c=[],l=t.length;if(t.forEach((function(t){var e,n;t._floor=t.floor,n="outdoor-cities-demo"===((null===(e=r.map.mapData)||void 0===e?void 0:e.map_id)||null)?t.location:Ln([t.location],a,u)[0];var i=t.catalog.content_title_key;t.name=t.content.data[i];var l=r.map.addHighlightedFeature(n,t);r.map.addHighlightedDotFeature(n,t),s.push(l),t.floor===o&&c.push(l)})),c.length&&i){var h,f,p,d,y=new mapboxgl.LngLatBounds,m=null===(h=this.map)||void 0===h||null===(h=h.mapData)||void 0===h?void 0:h.map_id;d=1===l&&this._isDesktopLayout()?15:1===l&&this._isMobileLayout()?16:15,"usbank-del-coronado-2026"===m&&(d=18),c.forEach((function(t){y.extend(t.geometry.coordinates)}));var g=null!==(f=this.map.options.pitch)&&void 0!==f?f:0,D=null!==(p=this.map.options.bearing)&&void 0!==p?p:0;if(this._isDesktopLayout())this.map.map.fitBounds(y,{padding:{top:100,bottom:100,left:500,right:100},maxZoom:d,pitch:g,bearing:D,duration:1e3});else if(this._isMobileLayout()){var v;v=1===l?0:100;var M=.6*this.map.mapContainer.offsetHeight,b=.08*this.map.mapContainer.offsetWidth;this.map.map.fitBounds(y,{padding:{top:160,bottom:M,left:b,right:b+v},maxZoom:d,pitch:g,bearing:D,duration:1e3})}}}},{key:"_getSelectionFeaturesProperties",value:function(){return this.map.getConfirmedSelectionFeatures().map((function(t){return t.properties}))}},{key:"updateLabelForSelectedContentPlacement",value:function(t){var e,n,r,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.map.clearSelectedContentLayer();var o,a=(null===(e=this.map.mapData)||void 0===e?void 0:e.map_id)||null;console.log("🔵 InteractionControl: mapId:",a);var u=(null===(n=this.map.mapData)||void 0===n?void 0:n.reference_coordinate)||[0,0],s=(null===(r=this.map.mapData)||void 0===r?void 0:r.coordinate_scaling_multiplier)||30;if(o="outdoor-cities-demo"===a?t.location:Ln([t.location],u,s)[0],t._floor=t.floor,!t.name&&t.content&&t.catalog){var c=t.catalog.content_title_key,l=t.content.data[c];t.name=l}if(this.map.addSelectedFeature(o,t),i)if(this._isDesktopLayout())this.map.map.easeTo({center:o,padding:{top:0,bottom:0,left:330,right:0},duration:1e3});else if(this._isMobileLayout()){var h=.5*this.map.mapContainer.offsetHeight;this.map.map.easeTo({center:o,padding:{top:100,bottom:h,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 i=e.features[0],o=i.properties.placement_id;if(t.previouslySelectedFeature&&t.previouslySelectedFeature.layer.id===i.layer.id){t.originalTextColor=t.previouslySelectedTextColor;var a=t.previouslySelectedFeature.properties.placement_id;t.map.map.setPaintProperty(n,"text-color",["case",["==",["get","placement_id"],o],"#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"],o],"#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:"removeHoverEffects",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.setPaintProperty(n,"text-color",r),t.map.map.off("mouseenter",n),t.map.map.off("mouseleave",n)}})),this.map.map.getCanvas().style.cursor="default"}},{key:"applySelectionModeVisuals",value:function(t){var e=this,n=this.map.map.getStyle().layers;this.originalPaintProperties={},n.forEach((function(t){if("background"===t.type){var n=t.id;return e.originalPaintProperties[n]||(e.originalPaintProperties[n]={}),e.originalPaintProperties[n]["background-color"]=e.map.map.getPaintProperty(n,"background-color"),void e.map.map.setPaintProperty(n,"background-color","#f5f5f5")}if("raster"!==t.type&&"heatmap"!==t.type){var r=t.id;if(r.includes("selectable-"))return;if(e.originalPaintProperties[r]||(e.originalPaintProperties[r]={}),"symbol"===t.type){if(r.includes("selectable-")||r.includes("booked-")||r.includes("confirmed-selection"))return;var i=e.map.map.getLayer(r),o=i.source,a=i.sourceLayer,u=i.filter,s=[];try{var c=e.map.map.getSource(o);c&&"vector"===c.type&&a?s=e.map.map.querySourceFeatures(o,{sourceLayer:a,filter:u}):c&&"geojson"===c.type&&(s=c._data.features||[])}catch(t){console.error("❌ Error getting symbol features before layer hiding:",t)}e.originalPaintProperties[r]={"text-opacity":e.map.map.getPaintProperty(r,"text-opacity"),"icon-opacity":e.map.map.getPaintProperty(r,"icon-opacity"),"text-color":e.map.map.getPaintProperty(r,"text-color"),source:o,"source-layer":a,filter:u,features:s},e.map.map.setLayoutProperty(r,"visibility","none"),e.pendingSymbolFeatures||(e.pendingSymbolFeatures=[]),e.pendingSymbolFeatures.push({layerId:r,features:s})}else if("fill"===t.type){e.originalPaintProperties[r]["fill-opacity"]=e.map.map.getPaintProperty(r,"fill-opacity"),e.originalPaintProperties[r]["fill-color"]=e.map.map.getPaintProperty(r,"fill-color");var l=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["fill-opacity"],.5],h=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["fill-color"],"#f7f7f8"];e.map.map.setPaintProperty(r,"fill-color",h),e.map.map.setPaintProperty(r,"fill-opacity",l)}else if("line"===t.type){e.originalPaintProperties[r]["line-opacity"]=e.map.map.getPaintProperty(r,"line-opacity"),e.originalPaintProperties[r]["line-color"]=e.map.map.getPaintProperty(r,"line-color");var f=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["line-opacity"],.6],p=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["line-color"],"#AAAAAA"];e.map.map.setPaintProperty(r,"line-color",p),e.map.map.setPaintProperty(r,"line-opacity",f)}else if("circle"===t.type){e.originalPaintProperties[r]["circle-opacity"]=e.map.map.getPaintProperty(r,"circle-opacity"),e.originalPaintProperties[r]["circle-color"]=e.map.map.getPaintProperty(r,"circle-color");var d=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["circle-opacity"]||1,.5],y=["case",["==",["get","type"],"floor"],e.originalPaintProperties[r]["circle-color"],"#CCCCCC"];e.map.map.setPaintProperty(r,"circle-color",y),e.map.map.setPaintProperty(r,"circle-opacity",d)}else if("fill-extrusion"===t.type){var m=e.map.map.getLayer(r),g=m.source,D=m.sourceLayer,v=m.filter,M=[];try{var b=e.map.map.getSource(g);b&&"vector"===b.type&&D?M=e.map.map.querySourceFeatures(g,{sourceLayer:D,filter:v}):b&&"geojson"===b.type&&(M=b._data.features||[])}catch(t){console.error("❌ Error getting features before layer removal:",t)}e.originalPaintProperties[r]={"fill-extrusion-color":e.map.map.getPaintProperty(r,"fill-extrusion-color"),"fill-extrusion-height":e.map.map.getPaintProperty(r,"fill-extrusion-height"),"fill-extrusion-opacity":e.map.map.getPaintProperty(r,"fill-extrusion-opacity"),source:g,"source-layer":D,filter:v,features:M},e.map.map.removeLayer(r),e.pendingExtrusionFeatures||(e.pendingExtrusionFeatures=[]),e.pendingExtrusionFeatures.push({layerId:r,features:M})}}}))}},{key:"processPendingSymbolFeatures",value:function(){var t=this;this.pendingSymbolFeatures&&0!==this.pendingSymbolFeatures.length&&(this.pendingSymbolFeatures.forEach((function(e){var n=e.layerId,r=e.features;t.addSymbolFeaturesToBookedLabels(r,n)})),this.pendingSymbolFeatures=[])}},{key:"addSymbolFeaturesToBookedLabels",value:function(t,e){if(0!==t.length)try{var n=this.map.map.getSource("booked-labels");if(!n)return void console.error("❌ booked-labels source not found");var r=n._data.features||[],i=t.map((function(t){var e=t.properties.title||t.properties.name||"Untitled";return{type:"Feature",geometry:t.geometry,properties:Jc(Jc({},t.properties),{},{name:e})}})),o=[].concat(Gc(r),Gc(i));n.setData({type:"FeatureCollection",features:o}),this.map.map.getSource("booked-labels")._data.features}catch(t){console.error("❌ Error adding symbol features to booked-labels:",t)}}},{key:"addFeaturesToBookedContent",value:function(t,e){if(0!==t.length)try{var n=this.map.map.getSource("booked-content");if(!n)return void console.error("❌ booked-content source not found");var r=n._data.features||[],i=[].concat(Gc(r),Gc(t));n.setData({type:"FeatureCollection",features:i}),this.map.map.getSource("booked-content")._data.features}catch(t){console.error("❌ Error adding features to booked-content:",t)}}},{key:"processPendingExtrusionFeatures",value:function(){var t=this;this.pendingExtrusionFeatures&&0!==this.pendingExtrusionFeatures.length&&(this.pendingExtrusionFeatures.forEach((function(e){var n=e.layerId,r=e.features;t.addFeaturesToBookedContent(r,n)})),this.pendingExtrusionFeatures=[])}},{key:"getHighPrecisionFeatures",value:function(t,e){var n=this.originalPaintProperties[e];if(!n)return console.warn("⚠️ No layer info found, using original features"),t;var r=n.source,i=n["source-layer"],o=n.filter;try{if(!this.map.map.getSource(r))return console.error("❌ Source not found:",r),t;var a=this.map.map.querySourceFeatures(r,{sourceLayer:i,filter:o});return a.length>=t.length?a:t}catch(e){return console.error("❌ Error getting high-precision features:",e),t}}},{key:"removeGreyFillLayers",value:function(){var t=this;this.greyFillLayers&&(this.greyFillLayers.forEach((function(e){t.map.map.getLayer(e)&&t.map.map.removeLayer(e)})),this.greyFillLayers=[])}},{key:"applySelectableHoverEffects",value:function(){var t=this;this.selectionHoverHandler&&this.map.map.off("mousemove",this.selectionHoverHandler),this.selectionHoverHandler=function(e){if(t.interactionEnabled&&t.selectionCriteria){var n=t.map.map.queryRenderedFeatures(e.point,{layers:["selectable-fill-layer"]});if(t.currentHoveredFeatureId&&t.map.map.setFeatureState({source:"selectable-content",id:t.currentHoveredFeatureId},{hover:!1}),n.length>0){var r=n[0];t.currentHoveredFeatureId=r.properties.feature_id,t.map.map.setFeatureState({source:"selectable-content",id:t.currentHoveredFeatureId},{hover:!0}),t.map.map.getCanvas().style.cursor="pointer"}else t.currentHoveredFeatureId=null,t.map.map.getCanvas().style.cursor="default"}},this.map.map.on("mousemove",this.selectionHoverHandler),this.map.map.setPaintProperty("selectable-fill-layer","fill-color",["case",["boolean",["feature-state","hover"],!1],this.selectionHoverColor,"#FFFFFF"])}},{key:"createSelectionOpacityExpression",value:function(t){var e=.1;e=["case",["==",["get","type"],"floor"],1,e];for(var n=function(){var t=Zc(i[r],2),n=t[0],o=t[1];if(Array.isArray(o)){var a=o.map((function(t){return["==",["get",n],t]})),u=["any"].concat(Gc(a));e=["case",u,1,e]}else e=["case",["==",["get",n],o],1,e]},r=0,i=Object.entries(t);r<i.length;r++)n();return e}},{key:"createSelectionColorOpacityExpression",value:function(t,e){var n=this.map.map.getPaintProperty(e,"fill-extrusion-color");if(!n)return null;for(var r=["case",["==",["get","type"],"floor"],n],i=function(){var t=Zc(a[o],2),e=t[0],i=t[1];if(Array.isArray(i)){var u=i.map((function(t){return["==",["get",e],t]})),s=["any"].concat(Gc(u));r.push(s,n)}else r.push(["==",["get",e],i],n)},o=0,a=Object.entries(t);o<a.length;o++)i();return r.push("#2A2A2A"),r}},{key:"restoreLayerToSelectionMode",value:function(t){var e=this.map.map.getStyle().layers.find((function(e){return e.id===t}));if(e)if("fill"===e.type){var n=this.originalPaintProperties[t]["fill-color"];n&&this.map.map.setPaintProperty(t,"fill-color",n)}else if("fill-extrusion"===e.type){var r=this.selectionModeExpressions[t]||this.originalPaintProperties[t]["fill-extrusion-color"];r&&this.map.map.setPaintProperty(t,"fill-extrusion-color",r)}}},{key:"applyHoverToFeature",value:function(t,e,n){"fill"===n?this.map.map.setPaintProperty(t,"fill-color",["case",["==",["id"],e],this.selectionHoverColor,this.originalPaintProperties[t]["fill-color"]||["get","color"]||0]):"fill-extrusion"===n&&this.map.map.setPaintProperty(t,"fill-extrusion-color",["case",["==",["id"],e],this.selectionHoverColor,this.selectionModeExpressions[t]||this.originalPaintProperties[t]["fill-extrusion-color"]||["get","color"]||0])}},{key:"applySelectionHoverEffects",value:function(t){var e=this;this.selectionHoverHandler=function(t){if(e.interactionEnabled&&e.selectionCriteria){var n=e.map.map.queryRenderedFeatures(t.point).find((function(t){return"fill"===t.layer.type||"fill-extrusion"===t.layer.type}));if(n){var r=n.layer.id,i=n.id;e.currentHoveredLayerId===r&&e.currentHoveredFeatureId===i||(e.currentHoveredLayerId&&e.restoreLayerToSelectionMode(e.currentHoveredLayerId),e.featureMatchesCriteria(n.properties,e.selectionCriteria)?(e.currentHoveredLayerId=r,e.currentHoveredFeatureId=i,e.applyHoverToFeature(r,i,n.layer.type),e.map.map.getCanvas().style.cursor="pointer"):(e.currentHoveredLayerId=null,e.currentHoveredFeatureId=null,e.map.map.getCanvas().style.cursor="default"))}else e.currentHoveredLayerId&&(e.restoreLayerToSelectionMode(e.currentHoveredLayerId),e.currentHoveredLayerId=null,e.currentHoveredFeatureId=null),e.map.map.getCanvas().style.cursor="default"}},this.map.map.on("mousemove",this.selectionHoverHandler)}},{key:"removeSelectionVisuals",value:function(){for(var t=this,e=0,n=Object.entries(this.originalPaintProperties);e<n.length;e++){for(var r=Zc(n[e],2),i=r[0],o=r[1],a=0,u=Object.entries(o);a<u.length;a++){var s=Zc(u[a],2),c=s[0],l=s[1];"source"!==c&&"source-layer"!==c&&"filter"!==c&&"features"!==c&&void 0!==l&&this.map.map.setPaintProperty(i,c,l)}o.source&&this.map.map.setLayoutProperty(i,"visibility","visible")}var h=this.map.map.getStyle().layers,f=this.map.getCurrentFloor();h.forEach((function(e){if("background"!==e.type&&"raster"!==e.type&&"heatmap"!==e.type){var n=e.id;if(n.includes("selectable-"))return;if(t.map.map.getFilter(n)){var r=t.map.originalFilters[n];if(void 0!==r){t.map.map.setFilter(n,r);var i=["==",["get","_floor"],f];if(r){var o=["all",i,r];t.map.map.setFilter(n,o)}else t.map.map.setFilter(n,i)}}else{var a=["==",["get","_floor"],f];t.map.map.setFilter(n,a)}}})),this.originalPaintProperties={},this.selectionModeExpressions={},this.map.removeSelectableContentLayers(),this.removeGreyFillLayers(),this.currentHoveredLayerId=null,this.currentHoveredFeatureId=null,this.selectionHoverHandler&&(this.map.map.off("mousemove",this.selectionHoverHandler),this.selectionHoverHandler=null),this.pendingSymbolFeatures=[],this.pendingExtrusionFeatures=[],this.map.map.getCanvas().style.cursor="default"}},{key:"_handleClick",value:function(t){var e=this;if(this.interactionEnabled)if("selection"===this.map.getCurrentState()){var n=this.map.map.queryRenderedFeatures(t.point,{layers:["confirmed-selection-fill-layer","confirmed-selection-outline-layer","confirmed-selection-icon-layer"]});if(n.length>0){var r=n[0],i=r.properties.feature_id;return this.map.removeConfirmedSelectionFeature(i),this.map.fire("selection:featureDeselected",{feature:r,placementId:r.properties.placement_id||i}),void this.map.fire("selection:changed",{selectedContent:this._getSelectionFeaturesProperties(),selectionCount:this.map.getConfirmedSelectionFeatures().length})}var o=this.map.map.queryRenderedFeatures(t.point,{layers:["selectable-fill-layer"]});if(o.length>0){var a=o[0],u=a.properties.placement_id,s=a.properties.feature_id;if(!this.map.multiSelect){var c=this.map.getConfirmedSelectionFeatures();if(c.length>0){var l=c[0],h=l.properties.feature_id;this.map.fire("selection:featureDeselectedOptimistic",{placementId:l.properties.placement_id||h})}}if(this.map.addConfirmedSelectionFeature(a,!this.map.multiSelect),this.map.fire("selection:featureSelectedOptimistic",{feature:a}),u&&"unknown"!==u&&""!==u)this.map._stateCoordinator.setLoading(!0,"content"),this.map.getContentPlacementDetails(u).then((function(t){e.map.fire("selection:featureSelected",{feature:a,contentPlacement:t}),e.map.fire("selection:changed",{selectedContent:e._getSelectionFeaturesProperties(),selectionCount:e.map.getConfirmedSelectionFeatures().length})})).catch((function(t){console.error("❌ Error fetching content placement details:",t),e.map.removeConfirmedSelectionFeature(s),e.map.fire("selection:featureDeselectedOptimistic",{placementId:u||s})})).finally((function(){e.map._stateCoordinator.setLoading(!1,"content")}));else{var f=Jc({placement_id:s,name:a.properties.name||"Unknown Feature",type:a.properties.type||"unknown"},a.properties);this.map.fire("selection:featureSelected",{feature:a,contentPlacement:f}),this.map.fire("selection:changed",{selectedContent:this._getSelectionFeaturesProperties(),selectionCount:this.map.getConfirmedSelectionFeatures().length})}return}}else{var p=(this.map.map.queryRenderedFeatures(t.point)||[]).filter((function(t){var e;return"symbol"===(null==t||null===(e=t.layer)||void 0===e?void 0:e.type)}));if(p.length>0){var d=p[0].properties.placement_id;d&&"unknown"!==d&&""!==d&&this.map.setToSelectedContentState([d])}}}},{key:"featureMatchesCriteria",value:function(t,e){for(var n=0,r=Object.entries(e);n<r.length;n++){var i=Zc(r[n],2),o=i[0],a=i[1],u=t[o];if(Array.isArray(a)){if(!a.includes(u))return!1}else if(u!==a)return!1}return!0}},{key:"_setupCursorHandling",value:function(){var t=this;this.map.map.on("mouseenter","confirmed-selection-fill-layer",(function(){t.map.map.getCanvas().style.cursor="pointer"})),this.map.map.on("mouseleave","confirmed-selection-fill-layer",(function(){t.map.map.getCanvas().style.cursor=""})),this.map.map.on("mouseenter","confirmed-selection-outline-layer",(function(){t.map.map.getCanvas().style.cursor="pointer"})),this.map.map.on("mouseleave","confirmed-selection-outline-layer",(function(){t.map.map.getCanvas().style.cursor=""})),this.map.map.on("mouseenter","confirmed-selection-icon-layer",(function(){t.map.map.getCanvas().style.cursor="pointer"})),this.map.map.on("mouseleave","confirmed-selection-icon-layer",(function(){t.map.map.getCanvas().style.cursor=""}))}}],r&&$c(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(di);function ll(t){return ll="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},ll(t)}function hl(){hl=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==ll(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(ll(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function fl(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function pl(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){fl(o,r,i,a,u,"next",t)}function u(t){fl(o,r,i,a,u,"throw",t)}a(void 0)}))}}function dl(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,yl(r.key),r)}}function yl(t){var e=function(t){if("object"!=ll(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ll(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ll(e)?e:e+""}function ml(t,e,n){return e=Dl(e),function(t,e){if(e&&("object"==ll(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,gl()?Reflect.construct(e,n||[],Dl(t).constructor):e.apply(t,n))}function gl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(gl=function(){return!!t})()}function Dl(t){return Dl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Dl(t)}function vl(t,e){return vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vl(t,e)}const Ml=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=ml(this,e,[n])).startSearchBox=new li,t.endSearchBox=new li,t.startContentPlacement=null,t.endContentPlacement=null,t.pathData=null,t.fromLocation=!1,t.searchApi=nn.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&&vl(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 i=document.createElement("div");i.className="small-circle";var o=document.createElement("div");return o.className="small-circle",t.appendChild(e),t.appendChild(r),t.appendChild(i),t.appendChild(o),t.appendChild(n),t}},{key:"_render",value:function(){this.element.innerHTML="",this.element.appendChild(this.directionsViewHeader)}},{key:"_setupEventListeners",value:function(){this.startSearchBox.searchBar.on("focus",this._handleStartSearchBarFocus.bind(this)),this.startSearchBox.searchBar.on("blur",this._handleStartSearchBarBlur.bind(this)),this.startSearchBox.on("getSearchBarSuggestions",this._handleGettingStartSearchBarSuggestions.bind(this)),this.endSearchBox.searchBar.on("focus",this._handleEndSearchBarFocus.bind(this)),this.endSearchBox.searchBar.on("blur",this._handleEndSearchBarBlur.bind(this)),this.endSearchBox.on("getSearchBarSuggestions",this._handleGettingEndSearchBarSuggestions.bind(this)),this.startSearchBox.searchBarSuggestionsView.on("selectCell",this._handleStartContentPlacementSelect.bind(this)),this.endSearchBox.searchBarSuggestionsView.on("selectCell",this._handleEndContentPlacementSelect.bind(this))}},{key:"_handleGettingStartSearchBarSuggestions",value:(u=pl(hl().mark((function t(e){var n;return hl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.query,this.fire("getStartSuggestions",{query:n});case 2:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"_handleGettingEndSearchBarSuggestions",value:(a=pl(hl().mark((function t(e){var n;return hl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.query,this.fire("getEndSuggestions",{query:n});case 2:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"_handleStartContentPlacementSelect",value:(o=pl(hl().mark((function t(e){var n,r,i,o;return hl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=e.result)||"gps-current-location"!==n.type){t.next=4;break}return this.fire("selectGpsCurrentLocation"),t.abrupt("return");case 4:return r=n.placement_id,i=n.catalog.content_title_key,this.startSearchBox.searchBar.setText(n.content.data[i]),t.next=9,this.searchApi.fetchContentPlacementDetails(r);case 9:o=t.sent,this.fire("selectedStartContentPlacement",{startContentPlacement:o}),this.updateView(o,this.endContentPlacement);case 12:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"enableGpsStartCell",value:function(){this.startSearchBox.setShowSuggestionsOnEmptyFocus(!0),this.startSearchBox.setPinnedResults([{type:"gps-current-location"}])}},{key:"disableGpsStartCell",value:function(){this.startSearchBox.setShowSuggestionsOnEmptyFocus(!1),this.startSearchBox.clearPinnedResults()}},{key:"focusStartInput",value:function(){var t=this.startSearchBox.searchBar.input;t&&t.focus(),this.startSearchBox.openSuggestionsView()}},{key:"_handleEndContentPlacementSelect",value:(i=pl(hl().mark((function t(e){var n,r,i,o;return hl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.result,r=n.placement_id,i=n.catalog.content_title_key,this.endSearchBox.searchBar.setText(n.content.data[i]),t.next=6,this.searchApi.fetchContentPlacementDetails(r);case 6:o=t.sent,this.fire("selectedEndContentPlacement",{endContentPlacement:o}),this.updateView(this.startContentPlacement,o);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_handleStartSearchBarFocus",value:function(){this.startSearchBox.searchBar.updateRightButtonIcon("search"),this.startSearchBox.searchBar.setPlaceholderText("Choose starting point")}},{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){var n=t.content.data[t.catalog.content_title_key];this.startSearchBox.searchBar.setText(n);var r=e.content.data[e.catalog.content_title_key];this.endSearchBox.searchBar.setText(r),this.fire("initiate:findPath",{startContentPlacementId:t.placement_id,endContentPlacementId:e.placement_id})}else if(t){var i=t.content.data[t.catalog.content_title_key];this.startSearchBox.searchBar.setText(i),this.endSearchBox.searchBar.setText(""),this.endSearchBox.searchBar.input.focus()}else if(e){var o=e.content.data[e.catalog.content_title_key];this.endSearchBox.searchBar.setText(o),this.startSearchBox.searchBar.setText(""),this.fromLocation&&this.fire("initiate:findPathFromLocation",{endContentPlacement:e})}}},{key:"setNewPath",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.fromLocation=e;var n=t.legs[0].steps[0];n.path,n.path,n.path,e&&this.startSearchBox.searchBar.setPlaceholderText("Your location"),this.pathData=t,this._render()}},{key:"getElement",value:function(){return this.element}},{key:"showLoading",value:function(){this.loadingElement&&(this.loadingElement.style.display="flex")}},{key:"hideLoading",value:function(){this.loadingElement&&(this.loadingElement.style.display="none")}}],r&&dl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o,a,u}(Nn);n(975);function bl(t){return bl="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},bl(t)}function wl(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,El(r.key),r)}}function El(t){var e=function(t){if("object"!=bl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=bl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bl(e)?e:e+""}function Cl(t,e,n){return e=Al(e),function(t,e){if(e&&("object"==bl(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,jl()?Reflect.construct(e,n||[],Al(t).constructor):e.apply(t,n))}function jl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(jl=function(){return!!t})()}function Al(t){return Al=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Al(t)}function Nl(t,e){return Nl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Nl(t,e)}const Sl=function(t){function e(){var t,n=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=Cl(this,e,[n])).pathData=null,t.legSelector=null,t.legSelectorContainerName="leg-selector",t.selectedLegIndex=0,t.stepsVisible=!0,t.toggleButton=null,t.floorData=n.floorData||[],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&&Nl(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="steps-view",this._render()}},{key:"_createToggleButton",value:function(){var t=document.createElement("button");return t.className="toggle-steps-button",t.textContent=this.stepsVisible?"Hide Steps":"Show Steps",t.addEventListener("click",this._toggleStepsVisibility.bind(this)),t}},{key:"_toggleStepsVisibility",value:function(){this.stepsVisible=!this.stepsVisible,this._render()}},{key:"_createLegSelector",value:function(t){var e=this,n=[];t.forEach((function(t){var r,i=(null===(r=e.floorData[t.floor])||void 0===r?void 0:r.name)||"Floor ".concat(t.floor);n.push(i)}));var r=new ki(n,{container:this.legSelectorContainerName});return r.on("".concat(this.legSelectorContainerName,":selectNew"),this._handleLegSelectorSelect.bind(this)),r}},{key:"_handleLegSelectorSelect",value:function(t){var e=t.index;e!==this.selectedLegIndex&&(this.selectedLegIndex=e,this.fire("legSelect",t),this._render())}},{key:"_render",value:function(){var t=this;if(this.element.innerHTML="",this.pathData){this.element.style.display="",this.pathData.legs.length>1&&(this.legSelector=this._createLegSelector(this.pathData.legs),this.legSelector.selectButtonAtIndex(this.selectedLegIndex),this.element.appendChild(this.legSelector.getElement()));var e=document.createElement("div");if(e.className="steps-container",this.stepsVisible){var n=document.createElement("ul"),r=this.pathData.legs[this.selectedLegIndex];r.steps.forEach((function(e,i){var o=document.createElement("li");0!==t.selectedLegIndex&&t.pathData.legs.slice(0,t.selectedLegIndex).reduce((function(t,e){return t+e.steps.length}),0);var a=document.createElement("div");a.className="step-container";var u=document.createElement("img");u.className="step-icon","left"===e.instruction?u.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTI2IDRINkM1LjQ2OTU3IDQgNC45NjA4NiA0LjIxMDcxIDQuNTg1NzkgNC41ODU3OUM0LjIxMDcxIDQuOTYwODYgNCA1LjQ2OTU3IDQgNlYyNkM0IDI2LjUzMDQgNC4yMTA3MSAyNy4wMzkxIDQuNTg1NzkgMjcuNDE0MkM0Ljk2MDg2IDI3Ljc4OTMgNS40Njk1NyAyOCA2IDI4SDI2QzI2LjUzMDQgMjggMjcuMDM5MSAyNy43ODkzIDI3LjQxNDIgMjcuNDE0MkMyNy43ODkzIDI3LjAzOTEgMjggMjYuNTMwNCAyOCAyNlY2QzI4IDUuNDY5NTcgMjcuNzg5MyA0Ljk2MDg2IDI3LjQxNDIgNC41ODU3OUMyNy4wMzkxIDQuMjEwNzEgMjYuNTMwNCA0IDI2IDRaTTI2IDI2SDZWNkgyNlYyNlpNMTAuMjkyNSAxNi43MDc1QzEwLjE5OTUgMTYuNjE0NiAxMC4xMjU4IDE2LjUwNDMgMTAuMDc1NCAxNi4zODI5QzEwLjAyNTEgMTYuMjYxNSA5Ljk5OTIxIDE2LjEzMTQgOS45OTkyMSAxNkM5Ljk5OTIxIDE1Ljg2ODYgMTAuMDI1MSAxNS43Mzg1IDEwLjA3NTQgMTUuNjE3MUMxMC4xMjU4IDE1LjQ5NTcgMTAuMTk5NSAx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DE2LjAwMDhDMTEuODY4NiAxNi4wMDA4IDExLjczODUgMTUuOTc0OSAxMS42MTcxIDE1LjkyNDZDMTEuNDk1NyAxNS44NzQyIDExLjM4NTQgMTUuODAwNSAxMS4yOTI1IDE1LjcwNzVaIiBmaWxsPSIjODA4MDgwIi8+Cjwvc3ZnPgo="),a.appendChild(u);var s=document.createElement("div");s.className="step-details";var c=document.createElement("div");if(c.className="step-instruction",c.textContent=e.text,s.appendChild(c),i!==r.steps.length-1){var l=document.createElement("div");l.className="step-distance";var h=parseFloat(e.distance.toFixed(0));"Feet"===t.pathData.unit?h+=" ft":"Meters"===t.pathData.unit&&(h+=" m"),l.textContent=h,s.appendChild(l)}a.appendChild(s),o.appendChild(a),n.appendChild(o)})),e.appendChild(n),this.element.appendChild(e)}this.toggleButton=this._createToggleButton(),this.element.appendChild(this.toggleButton)}else this.element.style.display="none"}},{key:"clearSteps",value:function(){var t=this.element.querySelector(".steps-view");t&&t.remove()}},{key:"clear",value:function(){this.pathData=null,this._render()}},{key:"setNewPath",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.pathData=t,n&&(this.floorData=n),null!==e&&(this.stepsVisible=e),this.selectedLegIndex=0,this._render()}},{key:"getElement",value:function(){return this.element}}],r&&wl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);var Il=n(583);function Tl(t){return Tl="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},Tl(t)}function Fl(){Fl=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==Tl(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(Tl(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Ol(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function kl(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,xl(r.key),r)}}function xl(t){var e=function(t){if("object"!=Tl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Tl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Tl(e)?e:e+""}function Ll(t,e,n){return e=zl(e),function(t,e){if(e&&("object"==Tl(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,_l()?Reflect.construct(e,n||[],zl(t).constructor):e.apply(t,n))}function _l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_l=function(){return!!t})()}function zl(t){return zl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zl(t)}function Pl(t,e){return Pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Pl(t,e)}const Bl=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=Ll(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&&Pl(t,e)}(e,t),n=e,r=[{key:"_initialize",value:function(){this.element=document.createElement("div"),this.element.className="qr-code-view",this.textElement=document.createElement("p"),this.textElement.className="qr-code-text",this.textElement.innerText="Scan to continue on your phone",this.qrCodeContainer=document.createElement("div"),this.qrCodeContainer.className="qr-code-container",this.qrCodeCanvas=null,this.element.appendChild(this.textElement),this.element.appendChild(this.qrCodeContainer)}},{key:"updateQRCode",value:(i=Fl().mark((function t(e){var n,r=arguments;return Fl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:200,this.qrCodeCanvas&&(this.qrCodeContainer.removeChild(this.qrCodeCanvas),this.qrCodeCanvas=null),t.prev=2,this.qrCodeCanvas=document.createElement("canvas"),this.qrCodeCanvas.className="qr-code-canvas",t.next=7,Il.toCanvas(this.qrCodeCanvas,e,{width:n,margin:2});case 7:this.qrCodeContainer.appendChild(this.qrCodeCanvas),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(2),console.error("Error generating QR code:",t.t0);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})),o=function(){var t=this,e=arguments;return new Promise((function(n,r){var o=i.apply(t,e);function a(t){Ol(o,n,r,a,u,"next",t)}function u(t){Ol(o,n,r,a,u,"throw",t)}a(void 0)}))},function(t){return o.apply(this,arguments)})},{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}}],r&&kl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o}(Nn);function Ul(t){return Ul="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},Ul(t)}function Rl(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,Ql(r.key),r)}}function Ql(t){var e=function(t){if("object"!=Ul(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ul(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ul(e)?e:e+""}function Yl(t,e,n){return e=Hl(e),function(t,e){if(e&&("object"==Ul(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,Vl()?Reflect.construct(e,n||[],Hl(t).constructor):e.apply(t,n))}function Vl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vl=function(){return!!t})()}function Hl(t){return Hl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hl(t)}function Gl(t,e){return Gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gl(t,e)}var Zl={DENIED:{title:"Location access is off",body:"We couldn't use your location. Search for a starting point instead."},TIMEOUT:{title:"Couldn't get your location",body:"We couldn't read your location in time. Search for a starting point instead."},UNAVAILABLE:{title:"Couldn't get your location",body:"Your device didn't share a location. Search for a starting point instead."},NO_NODE:{title:"You're too far from this map",body:"We couldn't find a path near your location. Search for a starting point instead."},TOO_FAR:{title:"You're too far from this map",body:"You're not close enough to this map to start from your location. Search for a starting point instead."}};const Wl=function(t){function e(){var t=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),Yl(this,e,[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&&Gl(t,e)}(e,t),n=e,(r=[{key:"show",value:function(t,e,n){var r=this,i=Zl[e]||Zl.UNAVAILABLE,o=document.createElement("div");o.className="gps-fallback-popup-card";var a=document.createElement("div");a.className="gps-fallback-popup-title",a.textContent=i.title,o.appendChild(a);var u=document.createElement("div");u.className="gps-fallback-popup-body",u.textContent=i.body,o.appendChild(u);var s=document.createElement("button");if(s.className="gps-fallback-popup-ok",s.textContent="OK",s.addEventListener("click",(function(){r._resetModalStyles(t),t.hideModal(),"function"==typeof n&&n()})),o.appendChild(s),t.showModal(o),t.modalContainer){this._previousContainerBg=t.modalContainer.style.backgroundColor,t.modalContainer.style.backgroundColor="rgba(0, 0, 0, 0.35)";var c=t.modalContainer.querySelector(".waygo-map-modal-content");c&&(c.style.backgroundColor="transparent",c.style.width="auto",c.style.height="auto",c.style.maxWidth="none",c.style.maxHeight="none",c.style.boxShadow="none",c.style.display="flex",c.style.alignItems="center",c.style.justifyContent="center")}}},{key:"_resetModalStyles",value:function(t){t.modalContainer&&void 0!==this._previousContainerBg&&(t.modalContainer.style.backgroundColor=this._previousContainerBg,this._previousContainerBg=void 0)}}])&&Rl(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(Nn);function ql(t){return ql="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},ql(t)}function Kl(t,e,n){return(e=nh(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Jl(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 Xl(){Xl=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new T(r||[]);return i(a,"_invoke",{value:A(t,n,u)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",m={};function g(){}function D(){}function v(){}var M={};c(M,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==n&&r.call(w,a)&&(M=w);var E=v.prototype=g.prototype=Object.create(M);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(i,o,a,u){var s=h(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==ql(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,n,r){var i=f;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,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(i===f)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=h(e,n,r);if("normal"===c.type){if(i=r.done?y:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=y,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.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 S(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function F(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 i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(ql(e)+" is not iterable")}return D.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:D,configurable:!0}),D.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(j.prototype),c(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new j(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),c(E,s,"Generator"),c(E,a,(function(){return this})),c(E,"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=F,T.prototype={constructor:T,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(I),!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 i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.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),I(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 i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:F(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function $l(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function th(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){$l(o,r,i,a,u,"next",t)}function u(t){$l(o,r,i,a,u,"throw",t)}a(void 0)}))}}function eh(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,nh(r.key),r)}}function nh(t){var e=function(t){if("object"!=ql(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ql(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ql(e)?e:e+""}function rh(t,e,n){return e=ah(e),function(t,e){if(e&&("object"==ql(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,ih()?Reflect.construct(e,n||[],ah(t).constructor):e.apply(t,n))}function ih(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ih=function(){return!!t})()}function oh(){return oh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ah(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},oh.apply(null,arguments)}function ah(t){return ah=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ah(t)}function uh(t,e){return uh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},uh(t,e)}const sh=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=rh(this,e,[n])).directionsView=null,t.stepsView=null,t.map=null,t.searchApi=nn.getSearchApi(),t.startContentPlacement=null,t.endContentPlacement=null,t.fromLocation=!1,t.qrCodeView=null,t.qrCodeButton=null,t.pathData=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&&uh(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){var e;return this.map=t,this.container=document.createElement("div"),this.container.className="directions-control-container",this.directionsView=new Ml,this.stepsView=new Sl([],{floorData:(null===(e=this.map.mapData)||void 0===e?void 0:e.floors)||[]}),this.qrCodeView=new Bl,this.container.appendChild(this.directionsView.getElement()),this.initializeEventListeners(),this.createDirectionsLineLayer(),this._attachResizeListener(),this._initialize(),this.hide(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=oh(ah(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){var t=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)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("initiate:findPath",this._handleIntiateFindPath.bind(this)),this.map.on("initiate:findPathFromLocation",this._handleInitiateFindPathFromLocation.bind(this)),this.map.on("gps:fallback",this._handleGpsFallback.bind(this)),this.directionsView.on("getStartSuggestions",this._handleGettingStartSearchBarSuggestions.bind(this)),this.directionsView.on("getEndSuggestions",this._handleGettingEndSearchBarSuggestions.bind(this)),this.directionsView.on("initiate:findPath",(function(e){return t.map.initiateFindPath(e.startContentPlacementId,e.endContentPlacementId)})),this.directionsView.on("initiate:findPathFromLocation",(function(e){return t.map.initiateFindPathFromLocation(e.endContentPlacement)})),this.directionsView.on("selectedStartContentPlacement",this._handleStartContentPlacementSelected.bind(this)),this.directionsView.on("selectedEndContentPlacement",this._handleEndContentPlacementSelected.bind(this)),this.directionsView.on("selectGpsCurrentLocation",this._handleSelectGpsCurrentLocation.bind(this)),this.stepsView.on("legSelect",this._handleLegChange.bind(this))}},{key:"_handleEndContentPlacementSelected",value:function(t){var e,n,r=t.endContentPlacement;this.endContentPlacement=r;var i=(null===(e=this.map.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],o=(null===(n=this.map.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30,a=xn(r.location,i,o),u=a.lat,s=[a.lon,u];if(!r.name&&r.catalog&&r.content){var c=r.catalog.content_title_key;if(c){var l=r.content.data[c];r.name=l}}r._floor=r.floor,this.map.addSelectedFeature(s,r)}},{key:"_handleStartContentPlacementSelected",value:function(t){var e,n,r=t.startContentPlacement;this.startContentPlacement=r;var i=(null===(e=this.map.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],o=(null===(n=this.map.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30,a=xn(r.location,i,o),u=a.lat,s=[a.lon,u];if(!r.name&&r.catalog&&r.content){var c=r.catalog.content_title_key;if(c){var l=r.content.data[c];r.name=l}}r._floor=r.floor,this.map.clearHighlightedContentLayer(),this.map.addHighlightedFeature(s,r)}},{key:"_handleLegChange",value:function(t){var e=t.index;this.directionsView&&this.pathData&&this.updateMapForPathLeg(this.pathData.legs[e])}},{key:"_handleGettingStartSearchBarSuggestions",value:(l=th(Xl().mark((function t(e){var n,r,i;return Xl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.directionsView){t.next=2;break}return t.abrupt("return");case 2:if(n=e.query,r=++this.directionsView.startSearchBox.searchCount,""!==n){t.next=7;break}return this.directionsView.startSearchBox.searchBarSuggestionsView.updateResults([]),t.abrupt("return");case 7:if(this.map.mapData){t.next=9;break}return t.abrupt("return");case 9:return t.prev=11,t.next=14,this.searchApi.search(this.map.mapData.map_id,this.map.mapData.map_view_id,n,0,5);case 14:i=t.sent,r===this.directionsView.startSearchBox.searchCount&&this.directionsView.startSearchBox.searchBarSuggestionsView.updateResults(i),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(11),Me.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 21:case"end":return t.stop()}}),t,this,[[11,18]])}))),function(t){return l.apply(this,arguments)})},{key:"_handleGettingEndSearchBarSuggestions",value:(c=th(Xl().mark((function t(e){var n,r,i;return Xl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.directionsView){t.next=2;break}return t.abrupt("return");case 2:if(n=e.query,r=++this.directionsView.endSearchBox.searchCount,""!==n){t.next=7;break}return this.directionsView.endSearchBox.searchBarSuggestionsView.updateResults([]),t.abrupt("return");case 7:if(this.map.mapData){t.next=9;break}return t.abrupt("return");case 9:return t.prev=11,t.next=14,this.searchApi.search(this.map.mapData.map_id,this.map.mapData.map_view_id,n,0,5);case 14:i=t.sent,r===this.directionsView.endSearchBox.searchCount&&this.directionsView.endSearchBox.searchBarSuggestionsView.updateResults(i),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(11),Me.isCancel(t.t0)?console.error("Request canceled:",t.t0.message):console.error("Search error:",t.t0);case 21:case"end":return t.stop()}}),t,this,[[11,18]])}))),function(t){return c.apply(this,arguments)})},{key:"_renderDesktopView",value:function(){if(this.directionsView){this.container.innerHTML="";var t=this.directionsView.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view"),this._shouldShowQRCodeButton()?(this.qrCodeButton&&this.qrCodeButton.parentNode||this._createQRCodeButton(),this.container.appendChild(this.qrCodeButton)):this.qrCodeButton&&this.qrCodeButton.parentNode&&this.qrCodeButton.parentNode.removeChild(this.qrCodeButton),this.map.shouldRenderDirectionsSteps()&&this.container.appendChild(this.stepsView.getElement())}else console.warn("⚠️ DirectionsControl: directionsView is null")}},{key:"_renderMobileView",value:function(){if(this.directionsView){this.container.innerHTML="";var t=this.directionsView.getElement();this.container.appendChild(t),this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view"),this._shouldShowQRCodeButton()?(this.qrCodeButton&&this.qrCodeButton.parentNode||this._createQRCodeButton(),this.container.appendChild(this.qrCodeButton)):this.qrCodeButton&&this.qrCodeButton.parentNode&&this.qrCodeButton.parentNode.removeChild(this.qrCodeButton),this.map.shouldRenderDirectionsSteps()&&this.container.appendChild(this.stepsView.getElement())}else console.warn("⚠️ DirectionsControl: directionsView is null")}},{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":"#333333","line-width":8}}),this.map.map.moveLayer("directionsLineLayer","FIRST_ELEVATED_FEATURE")}},{key:"updateMapForPathLeg",value:function(t){var e,n;this.clearLineData();var r=[];t.steps.forEach((function(t,e){r.push.apply(r,function(t){return function(t){if(Array.isArray(t))return Jl(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Jl(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)?Jl(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(0===e?t.path:t.path.slice(1)))}));var i=(null===(e=this.map.mapData)||void 0===e?void 0:e.reference_coordinate)||[0,0],o=(null===(n=this.map.mapData)||void 0===n?void 0:n.coordinate_scaling_multiplier)||30,a=Ln(r,i,o);this._updateMapLineData(a,t.floor),this.map.getCurrentFloor()!==t.floor&&this.map.updateFloor(t.floor,!1)}},{key:"_updateMapLineData",value:function(t,e){this.map.map.getSource("directionsLineSource").setData({type:"Feature",properties:{_floor:e},geometry:{type:"LineString",coordinates:t}});var n=new mapboxgl.LngLatBounds;t.forEach((function(t){n.extend(t)})),this._isDesktopLayout()?this.map.map.fitBounds(n,Kl(Kl(Kl({padding:200},"padding",{top:200,bottom:200,left:500,right:150}),"maxZoom",18),"duration",1e3)):this.map.map.fitBounds(n,{padding:{top:350,bottom:60,left:80,right:100},maxZoom:18,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(),this.clearData()}},{key:"_handleSearchState",value:function(t){t.query,t.results,this.hide(),this.clearData()}},{key:"_handleSelectedContentState",value:function(t){t.contentPlacementIds,t.selectedContentPlacement,this.hide(),this.directionsView.updateView(null,null),this.clearData(),this.map.clearHighlightedContentLayer()}},{key:"_handleSetupState",value:function(){this.hide()}},{key:"clearData",value:function(){this.pathData=null,this.clearLineData(),this.stepsView.clear(),this.qrCodeButton&&this.qrCodeButton.parentNode&&this.qrCodeButton.parentNode.removeChild(this.qrCodeButton)}},{key:"_handleDirectionsState",value:(s=th(Xl().mark((function t(e){var n,r,i,o,a,u,s,c,l,h,f,p,d,y,m,g,D,v,M,b,w,E,C,j,A,N=this;return Xl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.startContentPlacement,o=e.endContentPlacement,a=e.startNodeId,this.clearData(),this._updateContentView(),this.show(),this.startContentPlacement=i,this.endContentPlacement=o,this.directionsView.updateView(i,o),this.map.shouldShowGpsCell&&this.map.shouldShowGpsCell()&&!i&&!a&&o?(this.directionsView.enableGpsStartCell(),setTimeout((function(){return N.directionsView.focusStartInput()}),50)):this.directionsView.disableGpsStartCell(),u=(null===(n=this.map.mapData)||void 0===n?void 0:n.reference_coordinate)||[0,0],s=(null===(r=this.map.mapData)||void 0===r?void 0:r.coordinate_scaling_multiplier)||30,i&&(c=xn(i.location,u,s),l=c.lat,h=c.lon,f=[h,l],i.name||i.catalog&&i.content&&(p=i.catalog.content_title_key)&&(d=i.content.data[p],i.name=d),i._floor=i.floor,this.map.clearHighlightedContentLayer(),this.map.addHighlightedFeature(f,i)),!o){t.next=27;break}if(y=xn(o.location,u,s),m=y.lat,g=y.lon,D=[g,m],o.name||o.catalog&&o.content&&(v=o.catalog.content_title_key)&&(M=o.content.data[v],o.name=M),o._floor=o.floor,this.map.addSelectedFeature(D,o),b=null,null!=a&&""!==a?(b=a,console.log("�� DirectionsControl: Using provided startNodeId:",a)):this.map.location&&!i&&(b=this.map.location,console.log("�� DirectionsControl: Using map.location:",this.map.location)),!b){t.next=27;break}return console.log("�� DirectionsControl: Finding path from node to end placement, nodeId:",b),t.next=24,this.map.findPathFromNodeToPlacement(b,o.placement_id);case 24:this.pathData=t.sent,console.log("�� DirectionsControl: Path data received:",!!this.pathData),this.pathData?(this.fromLocation=!0,this.directionsView.setNewPath(this.pathData,!0),w=this.pathData.legs[0].steps[0].path[0],E=xn(w,u,s),C=E.lat,j=E.lon,A=[j,C],this.map.addHighlightedFeature(A,{_floor:this.pathData.legs[0].floor,name:"Start"}),this.map.shouldRenderDirectionsSteps()&&(this._isMobileLayout()?this.stepsView.setNewPath(this.pathData,!1,this.map.mapData.floors):this.stepsView.setNewPath(this.pathData,!0,this.map.mapData.floors)),this.updateMapForPathLeg(this.pathData.legs[0]),this._updateContentView()):console.warn("⚠️ DirectionsControl: No path data returned");case 27:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"_handleInitiateFindPathFromLocation",value:(u=th(Xl().mark((function t(e){var n;return Xl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log("�� DirectionsControl: _handleInitiateFindPathFromLocation called",e),n=e.endContentPlacement,!this.map.location||!n){t.next=7;break}return t.next=5,this.map.findPathFromNodeToPlacement(this.map.location,n.placement_id);case 5:this.pathData=t.sent,this.pathData&&(this.fromLocation=!0,this.directionsView.setNewPath(this.pathData,!0),this.map.shouldRenderDirectionsSteps()&&(this._isMobileLayout()?this.stepsView.setNewPath(this.pathData,!1,this.map.mapData.floors):this.stepsView.setNewPath(this.pathData,!0,this.map.mapData.floors)),this.updateMapForPathLeg(this.pathData.legs[0]),this._updateContentView());case 7:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"_handleIntiateFindPath",value:(a=th(Xl().mark((function t(e){var n,r;return Xl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.startContentPlacementId,r=e.endContentPlacementId,t.next=3,this.map.findPath(n,r);case 3:this.pathData=t.sent,this.fromLocation=!1,this.directionsView.setNewPath(this.pathData),this.map.shouldRenderDirectionsSteps()&&(this._isMobileLayout()?this.stepsView.setNewPath(this.pathData,!1,this.map.mapData.floors):this.stepsView.setNewPath(this.pathData,!0,this.map.mapData.floors)),this.updateMapForPathLeg(this.pathData.legs[0]),this._updateContentView();case 9:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"_handleSelectDirectionsButton",value:function(t){t.placementId}},{key:"_handleSelectGpsCurrentLocation",value:(o=th(Xl().mark((function t(){return Xl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.endContentPlacement){t.next=3;break}return console.warn("⚠️ DirectionsControl: GPS cell selected but no end placement set"),t.abrupt("return");case 3:return t.next=5,this.map.useCurrentLocation(this.endContentPlacement.placement_id);case 5:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"_handleGpsFallback",value:function(t){var e=this,n=t.reason;this.gpsFallbackPopup||(this.gpsFallbackPopup=new Wl),this.gpsFallbackPopup.show(this.map,n,(function(){e.map.shouldShowGpsCell&&e.map.shouldShowGpsCell()?setTimeout((function(){return e.directionsView.focusStartInput()}),50):e.directionsView.disableGpsStartCell()}))}},{key:"_render",value:function(){}},{key:"_shouldShowQRCodeButton",value:function(){return"kiosk"===this.currentViewType&&!1!==this.map.options.showQRCodeInKioskMode&&!!this.pathData&&!!this.endContentPlacement}},{key:"_createQRCodeButton",value:function(){this.qrCodeButton=document.createElement("button"),this.qrCodeButton.className="qr-code-button";var t=document.createElement("div");t.className="qr-code-button-icon";var e=document.createElement("img");e.src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0ic2l6ZS02Ij4KICA8cGF0aCBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Ik0zLjc1IDQuODc1YzAtLjYyMS41MDQtMS4xMjUgMS4xMjUtMS4xMjVoNC41Yy42MjEgMCAxLjEyNS41MDQgMS4xMjUgMS4xMjV2NC41YzAgLjYyMS0uNTA0IDEuMTI1LTEuMTI1IDEuMTI1aC00LjVBMS4xMjUgMS4xMjUgMCAwIDEgMy43NSA5LjM3NXYtNC41Wk0zLjc1IDE0LjYyNWMwLS42MjEuNTA0LTEuMTI1IDEuMTI1LTEuMTI1aDQuNWMuNjIxIDAgMS4xMjUuNTA0IDEuMTI1IDEuMTI1djQuNWMwIC42MjEtLjUwNCAxLjEyNS0xLjEyNSAxLjEyNWgtNC41YTEuMTI1IDEuMTI1IDAgMCAxLTEuMTI1LTEuMTI1di00LjVaTTEzLjUgNC44NzVjMC0uNjIxLjUwNC0xLjEyNSAxLjEyNS0xLjEyNWg0LjVjLjYyMSAwIDEuMTI1LjUwNCAxLjEyNSAxLjEyNXY0LjVjMCAuNjIxLS41MDQgMS4xMjUtMS4xMjUgMS4xMjVoLTQuNUExLjEyNSAxLjEyNSAwIDAgMSAxMy41IDkuMzc1di00LjVaIiAvPgogIDxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTYuNzUgNi43NWguNzV2Ljc1aC0uNzV2LS43NVpNNi43NSAxNi41aC43NXYuNzVoLS43NXYtLjc1Wk0xNi41IDYuNzVoLjc1di43NWgtLjc1di0uNzVaTTEzLjUgMTMuNWguNzV2Ljc1aC0uNzV2LS43NVpNMTMuNSAxOS41aC43NXYuNzVoLS43NXYtLjc1Wk0xOS41IDEzLjVoLjc1di43NWgtLjc1di0uNzVaTTE5LjUgMTkuNWguNzV2Ljc1aC0uNzV2LS43NVpNMTYuNSAxNi41aC43NXYuNzVoLS43NXYtLjc1WiIgLz4KPC9zdmc+Cg==",e.alt="QR Code",t.appendChild(e);var n=document.createElement("div");n.className="qr-code-button-text",n.textContent="Continue on your phone ->",this.qrCodeButton.appendChild(t),this.qrCodeButton.appendChild(n),this.qrCodeButton.addEventListener("click",this._showQRCodeModal.bind(this))}},{key:"_generateQRCodeURL",value:function(){if(!this.map.mapData||!this.endContentPlacement)return null;var t,e=this.map.mapData.map_id,n=this.map.mapData.map_view_id,r=this.endContentPlacement.placement_id;if(this.fromLocation)t=this.map.location;else{if(!this.startContentPlacement)return null;t=this.startContentPlacement.placement_id}return"https://maps.waygomaps.com/".concat(e,"/").concat(n,"/directions/").concat(t,"/").concat(r)}},{key:"_showQRCodeModal",value:(i=th(Xl().mark((function t(){var e,n,r,i,o,a,u=this;return Xl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this._generateQRCodeURL()){t.next=4;break}return console.warn("⚠️ DirectionsControl: No URL generated for QR code"),t.abrupt("return");case 4:return(r=document.createElement("div")).className="qr-code-modal-card",(i=document.createElement("button")).className="qr-code-modal-close",(o=document.createElement("img")).src=Sr,o.alt="Close",i.appendChild(o),i.addEventListener("click",(function(){u.map.hideModal()})),r.appendChild(i),t.next=16,this.qrCodeView.updateQRCode(n,250);case 16:r.appendChild(this.qrCodeView.getElement()),this.map.showModal(r),(a=null===(e=this.map.modalContainer)||void 0===e?void 0:e.querySelector(".waygo-map-modal-content"))&&(a.style.backgroundColor="transparent",a.style.width="auto",a.style.height="auto",a.style.maxWidth="none",a.style.maxHeight="none");case 20:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})}],r&&eh(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,o,a,u,s,c,l}(di);function ch(t){return ch="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},ch(t)}function lh(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,hh(r.key),r)}}function hh(t){var e=function(t){if("object"!=ch(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ch(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ch(e)?e:e+""}function fh(t,e,n){return e=yh(e),function(t,e){if(e&&("object"==ch(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,ph()?Reflect.construct(e,n||[],yh(t).constructor):e.apply(t,n))}function ph(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ph=function(){return!!t})()}function dh(){return dh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=yh(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},dh.apply(null,arguments)}function yh(t){return yh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yh(t)}function mh(t,e){return mh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mh(t,e)}const gh=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=fh(this,e,[n])).floorSelectorContainerName="floor-selector",t.floorSelector=new ki([],{container:"floor-selector",allowsToggle:!1}),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&&mh(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){this.map=t,this.container=document.createElement("div"),this.container.className="floor-selector-control-container";var e=this.floorSelector.getElement();return this.container.appendChild(e),this.initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.container}},{key:"onRemove",value:function(){var t,n,r;(t=e,n=this,r=dh(yh(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"initializeEventListeners",value:function(){this.floorSelector.on("".concat(this.floorSelectorContainerName,":selectNew"),this._handleFloorSelectorSelect.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)),this.map.on("state:setup",this._handleSetupState.bind(this)),this.map.on("load",this._handleMapLoad.bind(this)),this.map.on("floorChanged",this._handleFloorChange.bind(this))}},{key:"_handleMapLoad",value:function(t){var e=t.mapData.floors,n=[];e.forEach((function(t){n.push(t.indicator)})),n.length<2||(this.floorSelector.updateItems(n),this.floorSelector.selectButtonAtIndex(this.map.options.floor))}},{key:"_handleFloorChange",value:function(t){var e=t.floorIndex;this.floorSelector.getIndexOfSelectedButton()!==e&&this.floorSelector.selectButtonAtIndex(e)}},{key:"_renderDesktopView",value:function(){var t=this.floorSelector.getElement();this.container.appendChild(t),this.container.classList.remove("mobile-view"),this.container.classList.add("desktop-view"),this.map.mapContainer.offsetWidth,this.floorSelector.setViewForDesktop()}},{key:"_renderMobileView",value:function(){var t=this.floorSelector.getElement();this.container.appendChild(t),this.map.mapContainer.offsetWidth,this.container.classList.remove("desktop-view"),this.container.classList.add("mobile-view"),this.floorSelector.setViewForMobile()}},{key:"_handleDefaultState",value:function(){this.show()}},{key:"_handleSelectedContentState",value:function(t){this._isMobileLayout()?this.hide():this.show()}},{key:"_handleDirectionsState",value:function(t){this.hide()}},{key:"_handleFloorSelectorSelect",value:function(t){t.query;var e=t.index;e!==this.map.getCurrentFloor()&&this.map.updateFloor(e)}},{key:"_handleSearchState",value:function(t){t.query,t.results,this._isMobileLayout()?this.hide():this.show()}},{key:"_handleSetupState",value:function(){this.show()}}],r&&lh(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(di);function Dh(t){return Dh="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},Dh(t)}function vh(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,Mh(r.key),r)}}function Mh(t){var e=function(t){if("object"!=Dh(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Dh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Dh(e)?e:e+""}function bh(t,e,n){return e=Ch(e),function(t,e){if(e&&("object"==Dh(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,wh()?Reflect.construct(e,n||[],Ch(t).constructor):e.apply(t,n))}function wh(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(wh=function(){return!!t})()}function Eh(){return Eh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ch(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Eh.apply(null,arguments)}function Ch(t){return Ch=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ch(t)}function jh(t,e){return jh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jh(t,e)}const Ah=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=bh(this,e,[n])).stickyPanelView=new wu({stickyPoints:{collapsed:.15,mid:.45,full:.9},initialPoint:"mid",header:{title:"Test Panel",buttons:[{label:"✕",ariaLabel:"Collapse panel",onClick:function(){return t.stickyPanelView.snapTo("collapsed")}}]},content:t._buildTestContent()}),t.stickyPanelView.on("stickypointchange",(function(t){var e=t.stickyPoint,n=t.previousStickyPoint;console.log("🧲 StickyPanel: ".concat(n||"(none)"," → ").concat(e))})),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&&jh(t,e)}(e,t),n=e,r=[{key:"onAdd",value:function(t){return this.map=t,this.container=document.createElement("div"),this.container.className="test-panel-control-container",this._initializeEventListeners(),this._attachResizeListener(),this._initialize(),this.container}},{key:"onRemove",value:function(){var t,n,r;this.stickyPanelView.destroy(),(t=e,n=this,r=Eh(Ch(1&3?t.prototype:t),"onRemove",n),function(t){return r.apply(n,t)})([])}},{key:"_initializeEventListeners",value:function(){this.map.on("load",this._handleMapLoad.bind(this))}},{key:"_handleMapLoad",value:function(t){var e=t.mapData;null!=e&&e.map_name&&this.stickyPanelView.setTitle(e.map_name)}},{key:"_updateContentView",value:function(){this._clearViews(),this.currentViewType===qn?(this._renderMobileView(),this.show(),this.stickyPanelView.refreshLayout()):this.hide()}},{key:"_renderMobileView",value:function(){this.container.appendChild(this.stickyPanelView.getElement()),this.container.classList.add("mobile-view"),this.container.classList.remove("desktop-view"),this.stickyPanelView.show()}},{key:"_buildTestContent",value:function(){return this._buildLongTestContent()}},{key:"_buildShortTestContent",value:function(){var t=document.createElement("div");return t.className="test-panel-content",t.appendChild(this._makeParagraph("This is the SHORT test content view. It fits entirely inside the panel at the 'full' height, so it must never scroll — dragging it upward past 'full' should rubberband and spring back instead of scrolling.")),t.appendChild(this._makeParagraph("Drag the header or this text to move the panel between its collapsed, mid and full sticky points.")),t.appendChild(this._makeTestButton("Short content button")),t}},{key:"_buildLongTestContent",value:function(){var t=document.createElement("div");t.className="test-panel-content",t.appendChild(this._makeParagraph("This is the LONG test content view. It is far taller than the panel can show at the 'full' height, so dragging it upward first raises the panel to 'full' and then seamlessly continues as content scrolling — all in one gesture. Dragging downward scrolls back to the top first, then pulls the panel down.")),t.appendChild(this._makeTestButton("Long content button"));for(var e=1;e<=12;e++){var n=document.createElement("h4");n.className="test-panel-content-heading",n.textContent="Section ".concat(e),t.appendChild(n);var r=document.createElement("div");r.className="test-panel-content-figure",r.textContent="Figure ".concat(e),t.appendChild(r);for(var i=0;i<3;i++)t.appendChild(this._makeParagraph("Filler paragraph ".concat(i+1," of section ").concat(e,". The content of this text is ")+"irrelevant — it only exists to make this view long enough to need vertical scrolling inside the sticky panel."))}return t.appendChild(this._makeParagraph("THE END — the bottom of the content should stop exactly at the bottom of the map view.")),t}},{key:"_makeParagraph",value:function(t){var e=document.createElement("p");return e.className="test-panel-content-paragraph",e.textContent=t,e}},{key:"_makeTestButton",value:function(t){var e=document.createElement("button");return e.type="button",e.className="test-panel-content-button",e.textContent=t,e.addEventListener("click",(function(){console.log('🔘 StickyPanel test: "'.concat(t,'" clicked'))})),e}}],r&&vh(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(di);"undefined"!=typeof window&&(n.p=window.location.origin+"/");const Nh={MapView:Nr,SearchBox:li,SearchBoxControl:ji,CategoryBarControl:Qi,SearchResultsControl:aa,ContentSearchControl:_u,ContentPlacementControl:sc,ContentDetailsControl:Cc,InteractionControl:cl,SetupControl:Vc,DirectionsControl:sh,FloorSelectorControl:gh,TestPanelControl:Ah,StickyPanelView:wu,VIEW_TYPES:{DESKTOP:Wn,MOBILE:qn,KIOSK:Kn},KIOSK_REACH_BAND_INCHES:Xn,setApiKey:nn.setApiKey.bind(nn)}})(),r.default})()));
|
|
3
3
|
//# sourceMappingURL=bundle.js.map
|