@mappedin/mappedin-js 5.46.0 → 5.48.0
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/lib/esm/get-venue/index.d.ts +60 -16
- package/lib/esm/get-venue/index.js +1 -1
- package/lib/esm/navigator/index.js +1 -1
- package/lib/esm/renderer/{GLTFExporter-ZIVMDRVT.js → GLTFExporter-M3KQRS3Q.js} +1 -1
- package/lib/esm/renderer/{PerformanceController-FJ64CU6R.js → PerformanceController-OCUUPNZR.js} +1 -1
- package/lib/esm/renderer/{browser-TIFUT37G.js → browser-4SFL4UGN.js} +1 -1
- package/lib/esm/renderer/chunk-JIMJW33G.js +1 -0
- package/lib/esm/renderer/{chunk-2O6EIHBA.js → chunk-TUEPC7VC.js} +1 -1
- package/lib/esm/renderer/index.d.ts +64 -20
- package/lib/esm/renderer/index.js +1 -1
- package/lib/esm/renderer/{outdoor-context-C2FY52YJ.js → outdoor-context-7RAGMYX2.js} +1 -1
- package/lib/mappedin.js +1 -1
- package/lib/node/index.js +1 -1
- package/package.json +2 -2
- package/lib/esm/renderer/chunk-USVGQCUT.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var E,hw=Object.create,Pi=Object.defineProperty,mw=Object.getOwnPropertyDescriptor,gw=Object.getOwnPropertyNames,vw=Object.getPrototypeOf,yw=Object.prototype.hasOwnProperty,bw=(e,t,n)=>t in e?Pi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,s=(e,t)=>Pi(e,"name",{value:t,configurable:!0}),wm=(e,t)=>()=>(e&&(t=e(e=0)),t),Y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ww=(e,t)=>{for(var n in t)Pi(e,n,{get:t[n],enumerable:!0})},kw=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of gw(t))!yw.call(e,i)&&i!==n&&Pi(e,i,{get:()=>t[i],enumerable:!(r=mw(t,i))||r.enumerable});return e},Rt=(e,t,n)=>(n=null!=e?hw(vw(e)):{},kw(!t&&e&&e.__esModule?n:Pi(n,"default",{value:e,enumerable:!0}),e)),g=(e,t,n)=>(bw(e,"symbol"!=typeof t?t+"":t,n),n),ul=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},b=(e,t,n)=>(ul(e,t,"read from private field"),n?n.call(e):t.get(e)),S=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},L=(e,t,n,r)=>(ul(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ll=(e,t,n,r)=>({set _(r){L(e,t,r,n)},get _(){return b(e,t,r)}}),ge=(e,t,n)=>(ul(e,t,"access private method"),n),v=wm((()=>{E={env:{NODE_ENV:"production",npm_package_version:"5.46.0"}}})),km=Y(((e,t)=>{v(),function(n){var r="object"==typeof e&&e,i="object"==typeof t&&t&&t.exports==r&&t,o="object"==typeof global&&global;(o.global===o||o.window===o)&&(n=o);var a=s((function(e){this.message=e}),"InvalidCharacterError");a.prototype=new Error,a.prototype.name="InvalidCharacterError";var l=s((function(e){throw new a(e)}),"error"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,h=s((function(e){var t=(e=String(e).replace(c,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&l("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,i=0,o="",s=-1;++s<t;)r=u.indexOf(e.charAt(s)),n=i%4?64*n+r:r,i++%4&&(o+=String.fromCharCode(255&n>>(-2*i&6)));return o}),"decode"),d={encode:s((function(e){e=String(e),/[^\0-\xFF]/.test(e)&&l("The string to be encoded contains characters outside of the Latin1 range.");for(var t,n,r,i,o=e.length%3,s="",a=-1,c=e.length-o;++a<c;)t=e.charCodeAt(a)<<16,n=e.charCodeAt(++a)<<8,r=e.charCodeAt(++a),s+=u.charAt((i=t+n+r)>>18&63)+u.charAt(i>>12&63)+u.charAt(i>>6&63)+u.charAt(63&i);return 2==o?(t=e.charCodeAt(a)<<8,n=e.charCodeAt(++a),s+=u.charAt((i=t+n)>>10)+u.charAt(i>>4&63)+u.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(a),s+=u.charAt(i>>2)+u.charAt(i<<4&63)+"=="),s}),"encode"),decode:h,version:"1.0.0"};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define((function(){return d}));else if(r&&!r.nodeType)if(i)i.exports=d;else for(var p in d)d.hasOwnProperty(p)&&(r[p]=d[p]);else n.base64=d}(e)})),Be=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.areaConversion=e.timeConversion=e.distanceConversion=e.altitudeKeys=e.latitudeKeys=e.longitudeKeys=e.MAXLON=e.MINLON=e.MAXLAT=e.MINLAT=e.earthRadius=e.sexagesimalPattern=void 0;e.sexagesimalPattern=/^([0-9]{1,3})°\s*([0-9]{1,3}(?:\.(?:[0-9]{1,}))?)['′]\s*(([0-9]{1,3}(\.([0-9]{1,}))?)["″]\s*)?([NEOSW]?)$/;e.earthRadius=6378137;e.MINLAT=-90;e.MAXLAT=90;e.MINLON=-180;e.MAXLON=180;e.longitudeKeys=["lng","lon","longitude",0];e.latitudeKeys=["lat","latitude",1];e.altitudeKeys=["alt","altitude","elevation","elev",2];e.distanceConversion={m:1,km:.001,cm:100,mm:1e3,mi:1/1609.344,sm:1/1852.216,ft:100/30.48,in:100/2.54,yd:1/.9144};e.timeConversion={m:60,h:3600,d:86400};var t={m2:1,km2:1e-6,ha:1e-4,a:.01,ft2:10.763911,yd2:1.19599,in2:1550.0031};e.areaConversion=t,t.sqm=t.m2,t.sqkm=t.km2,t.sqft=t.ft2,t.sqyd=t.yd2,t.sqin=t.in2})),Oi=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e,t){return t.reduce((function(t,n){if(typeof e>"u"||null===e)throw new Error("'".concat(e,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(e,n)&&typeof n<"u"&&typeof t>"u"?(t=n,n):t}),void 0)}),"getCoordinateKey");e.default=t})),Si=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){var t=e.toString().trim();return!isNaN(parseFloat(t))&&parseFloat(t)===Number(t)}),"isDecimal");e.default=t})),Ai=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Be(),n=s((function(e){return t.sexagesimalPattern.test(e.toString().trim())}),"isSexagesimal");e.default=n})),Ci=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Be(),n=s((function(e){var n=new RegExp(t.sexagesimalPattern).exec(e);if(typeof n>"u"||null===n)throw new Error("Given value is not in sexagesimal format");var r=Number(n[2])/60||0,i=Number(n[4])/3600||0,o=parseFloat(n[1])+r+i;return["S","W"].includes(n[7])?-o:o}),"sexagesimalToDecimal");e.default=n})),Ro=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Be(),n=r(Oi());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}s(r,"_interopRequireDefault"),s(i,"ownKeys"),s(o,"_objectSpread"),s(a,"_defineProperty");var l=s((function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{longitude:t.longitudeKeys,latitude:t.latitudeKeys,altitude:t.altitudeKeys},i=(0,n.default)(e,r.longitude),s=(0,n.default)(e,r.latitude),a=(0,n.default)(e,r.altitude);return o({latitude:s,longitude:i},a?{altitude:a}:{})}),"getCoordinateKeys");e.default=l})),fl=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Si()),n=o(Ai()),r=o(Ci()),i=Be();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function e(o){return(0,t.default)(o)?!(parseFloat(o)>i.MAXLAT||o<i.MINLAT):!!(0,n.default)(o)&&e((0,r.default)(o))}),"isValidLatitude");e.default=a})),ml=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Si()),n=o(Ai()),r=o(Ci()),i=Be();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function e(o){return(0,t.default)(o)?!(parseFloat(o)>i.MAXLON||o<i.MINLON):!!(0,n.default)(o)&&e((0,r.default)(o))}),"isValidLongitude");e.default=a})),vl=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=i(Ro()),n=i(fl()),r=i(ml());function i(e){return e&&e.__esModule?e:{default:e}}s(i,"_interopRequireDefault");var o=s((function(e){var i=(0,t.default)(e),o=i.latitude,s=i.longitude;if(Array.isArray(e)&&e.length>=2)return(0,r.default)(e[0])&&(0,n.default)(e[1]);if(typeof o>"u"||typeof s>"u")return!1;var a=e[s],l=e[o];return!(typeof l>"u"||typeof a>"u"||!1===(0,n.default)(l)||!1===(0,r.default)(a))}),"isValidCoordinate");e.default=o})),Go=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(Si()),n=a(Ai()),r=a(Ci()),i=a(vl()),o=a(Ro());function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}s(a,"_interopRequireDefault"),s(l,"ownKeys"),s(u,"_objectSpread"),s(c,"_defineProperty");var h=s((function e(s){if((0,t.default)(s))return Number(s);if((0,n.default)(s))return(0,r.default)(s);if((0,i.default)(s)){var a=(0,o.default)(s);return Array.isArray(s)?s.map((function(t,n){return[0,1].includes(n)?e(t):t})):u(u(u({},s),a.latitude&&c({},a.latitude,e(s[a.latitude]))),a.longitude&&c({},a.longitude,e(s[a.longitude])))}return Array.isArray(s)?s.map((function(t){return(0,i.default)(t)?e(t):t})):s}),"toDecimal");e.default=h})),pt=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Be(),n=i(Oi()),r=i(Go());function i(e){return e&&e.__esModule?e:{default:e}}s(i,"_interopRequireDefault");var o=s((function(e,i){var o=(0,n.default)(e,t.latitudeKeys);if(!(typeof o>"u"||null===o)){var s=e[o];return!0===i?s:(0,r.default)(s)}}),"getLatitude");e.default=o})),ft=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Be(),n=i(Oi()),r=i(Go());function i(e){return e&&e.__esModule?e:{default:e}}s(i,"_interopRequireDefault");var o=s((function(e,i){var o=(0,n.default)(e,t.longitudeKeys);if(!(typeof o>"u"||null===o)){var s=e[o];return!0===i?s:(0,r.default)(s)}}),"getLongitude");e.default=o})),zt=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return e*Math.PI/180}),"toRad");e.default=t})),er=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return 180*e/Math.PI}),"toDeg");e.default=t})),Cm=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(pt()),n=a(ft()),r=a(zt()),i=a(er()),o=Be();function a(e){return e&&e.__esModule?e:{default:e}}s(a,"_interopRequireDefault");var l=s((function(e,s,a){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6371e3,u=(0,t.default)(e),c=(0,n.default)(e),h=s/l,d=(0,r.default)(a),p=(0,r.default)(u),f=(0,r.default)(c),g=Math.asin(Math.sin(p)*Math.cos(h)+Math.cos(p)*Math.sin(h)*Math.cos(d)),v=f+Math.atan2(Math.sin(d)*Math.sin(h)*Math.cos(p),Math.cos(h)-Math.sin(p)*Math.sin(g)),y=(0,i.default)(v);return(y<o.MINLON||y>o.MAXLON)&&(v=(v+3*Math.PI)%(2*Math.PI)-Math.PI,y=(0,i.default)(v)),{latitude:(0,i.default)(g),longitude:y}}),"computeDestinationPoint");e.default=l})),Lm=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Be(),n=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=t.areaConversion[n];if(r)return e*r;throw new Error("Invalid unit used for area conversion.")}),"convertArea");e.default=n})),jm=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Be(),n=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=t.distanceConversion[n];if(r)return e*r;throw new Error("Invalid unit used for distance conversion.")}),"convertDistance");e.default=n})),Nm=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Be(),n=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kmh";switch(n){case"kmh":return e*t.timeConversion.h*t.distanceConversion.km;case"mph":return e*t.timeConversion.h*t.distanceConversion.mi;default:return e}}),"convertSpeed");e.default=n})),Rm=Y((e=>{"use strict";function t(e,t){return a(e)||o(e,t)||r(e,t)||n()}function n(){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 r(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&null!=a.return&&a.return()}finally{if(i)throw o}}return n}}function a(e){if(Array.isArray(e))return e}v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,s(t,"_slicedToArray"),s(n,"_nonIterableRest"),s(r,"_unsupportedIterableToArray"),s(i,"_arrayLikeToArray"),s(o,"_iterableToArrayLimit"),s(a,"_arrayWithHoles");var l=s((function(e){var t=Math.pow(10,12);return Math.round(e*t)/t}),"imprecise"),u=s((function(e){var n=t(e.toString().split("."),2),r=n[0],i=n[1],o=Math.abs(Number(r)),s=l(60*+("0."+(i||0))),a=Math.floor(s),u=l(60*(s%a||0));return o+"° "+Number(a.toFixed(6)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+"' "+Number(u.toFixed(4)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+'"'}),"decimal2sexagesimal");e.default=u})),_l=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return e>1?1:e<-1?-1:e}),"robustAcos");e.default=t})),Sn=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(pt()),n=a(ft()),r=a(zt()),i=a(_l()),o=Be();function a(e){return e&&e.__esModule?e:{default:e}}s(a,"_interopRequireDefault");var l=s((function(e,s){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;a=typeof a<"u"&&!isNaN(a)?a:1;var l=(0,t.default)(e),u=(0,n.default)(e),c=(0,t.default)(s),h=(0,n.default)(s),d=Math.acos((0,i.default)(Math.sin((0,r.default)(c))*Math.sin((0,r.default)(l))+Math.cos((0,r.default)(c))*Math.cos((0,r.default)(l))*Math.cos((0,r.default)(u)-(0,r.default)(h))))*o.earthRadius;return Math.round(d/a)*a}),"getDistance");e.default=l})),Ml=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Sn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.default;return r="function"==typeof r?r:t.default,n.slice().sort((function(t,n){return r(e,t)-r(e,n)}))}),"orderByDistance");e.default=r})),qm=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Ml());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){return(0,t.default)(e,n)[0]}),"findNearest");e.default=r})),Ym=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(zt()),n=o(pt()),r=o(ft()),i=Be();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e){var o=0;if(e.length>2){for(var s,a,l,u=0;u<e.length;u++){u===e.length-2?(s=e.length-2,a=e.length-1,l=0):u===e.length-1?(s=e.length-1,a=0,l=1):(s=u,a=u+1,l=u+2);var c=(0,r.default)(e[s]),h=(0,n.default)(e[a]),d=(0,r.default)(e[l]);o+=((0,t.default)(d)-(0,t.default)(c))*Math.sin((0,t.default)(h))}o=o*i.earthRadius*i.earthRadius/2}return Math.abs(o)}),"getAreaOfPolygon");e.default=a})),Tl=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(pt()),n=r(ft());function r(e){return e&&e.__esModule?e:{default:e}}s(r,"_interopRequireDefault");var i=s((function(e){if(!1===Array.isArray(e)||0===e.length)throw new Error("No points were given.");return e.reduce((function(e,r){var i=(0,t.default)(r),o=(0,n.default)(r);return{maxLat:Math.max(i,e.maxLat),minLat:Math.min(i,e.minLat),maxLng:Math.max(o,e.maxLng),minLng:Math.min(o,e.minLng)}}),{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})}),"getBounds");e.default=i})),$m=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(pt()),n=a(ft()),r=a(zt()),i=a(er()),o=Be();function a(e){return e&&e.__esModule?e:{default:e}}s(a,"_interopRequireDefault");var l=s((function(e,s){var a,l,u=(0,t.default)(e),c=(0,n.default)(e),h=(0,r.default)(u),d=(0,r.default)(c),p=s/o.earthRadius,f=h-p,g=h+p,v=(0,r.default)(o.MAXLAT),y=(0,r.default)(o.MINLAT),m=(0,r.default)(o.MAXLON),b=(0,r.default)(o.MINLON);if(f>y&&g<v){var w=Math.asin(Math.sin(p)/Math.cos(h));(a=d-w)<b&&(a+=2*Math.PI),(l=d+w)>m&&(l-=2*Math.PI)}else f=Math.max(f,y),g=Math.min(g,v),a=b,l=m;return[{latitude:(0,i.default)(f),longitude:(0,i.default)(a)},{latitude:(0,i.default)(g),longitude:(0,i.default)(l)}]}),"getBoundsOfDistance");e.default=l})),Km=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(pt()),n=o(ft()),r=o(zt()),i=o(er());function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e){if(!1===Array.isArray(e)||0===e.length)return!1;var o=e.length,s=e.reduce((function(e,i){var o=(0,r.default)((0,t.default)(i)),s=(0,r.default)((0,n.default)(i));return{X:e.X+Math.cos(o)*Math.cos(s),Y:e.Y+Math.cos(o)*Math.sin(s),Z:e.Z+Math.sin(o)}}),{X:0,Y:0,Z:0}),a=s.X/o,l=s.Y/o,u=s.Z/o;return{longitude:(0,i.default)(Math.atan2(l,a)),latitude:(0,i.default)(Math.atan2(u,Math.sqrt(a*a+l*l)))}}),"getCenter");e.default=a})),Jm=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Tl());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e){var n=(0,t.default)(e),r=n.minLat+(n.maxLat-n.minLat)/2,i=n.minLng+(n.maxLng-n.minLng)/2;return{latitude:parseFloat(r.toFixed(6)),longitude:parseFloat(i.toFixed(6))}}),"getCenterOfBounds");e.default=r})),Pl=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(pt()),n=o(ft()),r=o(zt()),i=o(er());function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e,o){var s=(0,r.default)((0,n.default)(o))-(0,r.default)((0,n.default)(e)),a=Math.log(Math.tan((0,r.default)((0,t.default)(o))/2+Math.PI/4)/Math.tan((0,r.default)((0,t.default)(e))/2+Math.PI/4));return Math.abs(s)>Math.PI&&(s=s>0?-1*(2*Math.PI-s):2*Math.PI+s),((0,i.default)(Math.atan2(s,a))+360)%360}),"getRhumbLineBearing");e.default=a})),tg=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Pl());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.default,i="function"==typeof r?r(e,n):(0,t.default)(e,n);if(isNaN(i))throw new Error("Could not calculate bearing for given points. Check your bearing function");switch(Math.round(i/22.5)){case 1:return"NNE";case 2:return"NE";case 3:return"ENE";case 4:return"E";case 5:return"ESE";case 6:return"SE";case 7:return"SSE";case 8:return"S";case 9:return"SSW";case 10:return"SW";case 11:return"WSW";case 12:return"W";case 13:return"WNW";case 14:return"NW";case 15:return"NNW";default:return"N"}}),"getCompassDirection");e.default=r})),Ol=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(Sn()),n=r(_l());function r(e){return e&&e.__esModule?e:{default:e}}s(r,"_interopRequireDefault");var i=s((function(e,r,i){var o=(0,t.default)(r,e),s=(0,t.default)(e,i),a=(0,t.default)(r,i),l=Math.acos((0,n.default)((o*o+a*a-s*s)/(2*o*a))),u=Math.acos((0,n.default)((s*s+a*a-o*o)/(2*s*a)));return l>Math.PI/2?o:u>Math.PI/2?s:Math.sin(l)*o}),"getDistanceFromLine");e.default=i})),og=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(pt()),n=o(ft()),r=o(zt()),i=o(er());function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e,o){var s=(0,t.default)(o),a=(0,n.default)(o),l=(0,t.default)(e),u=(0,n.default)(e);return((0,i.default)(Math.atan2(Math.sin((0,r.default)(a)-(0,r.default)(u))*Math.cos((0,r.default)(s)),Math.cos((0,r.default)(l))*Math.sin((0,r.default)(s))-Math.sin((0,r.default)(l))*Math.cos((0,r.default)(s))*Math.cos((0,r.default)(a)-(0,r.default)(u))))+360)%360}),"getGreatCircleBearing");e.default=a})),sg=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Sn());function n(e){return e&&e.__esModule?e:{default:e}}function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?s((function(e){return typeof e}),"_typeof"):s((function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}),"_typeof"))(e)}s(n,"_interopRequireDefault"),s(r,"_typeof");var i=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.default;return e.reduce((function(e,t){return"object"===r(e)&&null!==e.last&&(e.distance+=n(t,e.last)),e.last=t,e}),{last:null,distance:0}).distance}),"getPathLength");e.default=i})),dg=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(pt()),n=o(ft()),r=o(zt()),i=Be();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e,o){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;s=typeof s<"u"&&!isNaN(s)?s:1;var a,l,u,c,h,d,p,f=(0,t.default)(e),g=(0,n.default)(e),v=(0,t.default)(o),y=(0,n.default)(o),m=6356752.314245,b=1/298.257223563,w=(0,r.default)(y-g),_=Math.atan((1-b)*Math.tan((0,r.default)(parseFloat(f)))),M=Math.atan((1-b)*Math.tan((0,r.default)(parseFloat(v)))),x=Math.sin(_),I=Math.cos(_),S=Math.sin(M),k=Math.cos(M),O=w,E=100;do{var P=Math.sin(O),A=Math.cos(O);if(0===(d=Math.sqrt(k*P*(k*P)+(I*S-x*k*A)*(I*S-x*k*A))))return 0;a=x*S+I*k*A,l=Math.atan2(d,a),h=a-2*x*S/(c=1-(u=I*k*P/d)*u),isNaN(h)&&(h=0);var C=b/16*c*(4+b*(4-3*c));p=O,O=w+(1-C)*b*u*(l+C*d*(h+C*a*(2*h*h-1)))}while(Math.abs(O-p)>1e-12&&--E>0);if(0===E)return NaN;var F=c*(i.earthRadius*i.earthRadius-m*m)/(m*m),T=1+F/16384*(4096+F*(F*(320-175*F)-768)),L=F/1024*(256+F*(F*(74-47*F)-128)),N=L*d*(h+L/4*(a*(2*h*h-1)-L/6*h*(4*d*d-3)*(4*h*h-3))),j=m*T*(l-N);return Math.round(j/s)*s}),"getDistance");e.default=a})),pg=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return/^NNE|NE|NNW|N$/.test(e)?"N":/^ENE|E|ESE|SE$/.test(e)?"E":/^SSE|S|SSW|SW$/.test(e)?"S":/^WSW|W|WNW|NW$/.test(e)?"W":void 0}),"getRoughCompassDirection");e.default=t})),fg=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Sn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.default,i=r(e,n),o=Number(n.time)-Number(e.time),s=i/o*1e3;return s}),"getSpeed");e.default=r})),hg=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Sn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n,r){return(0,t.default)(n,e)+(0,t.default)(e,r)===(0,t.default)(n,r)}),"isPointInLine");e.default=r})),gg=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(pt()),n=r(ft());function r(e){return e&&e.__esModule?e:{default:e}}s(r,"_interopRequireDefault");var i=s((function(e,r){for(var i=!1,o=r.length,s=-1,a=o-1;++s<o;a=s)((0,n.default)(r[s])<=(0,n.default)(e)&&(0,n.default)(e)<(0,n.default)(r[a])||(0,n.default)(r[a])<=(0,n.default)(e)&&(0,n.default)(e)<(0,n.default)(r[s]))&&(0,t.default)(e)<((0,t.default)(r[a])-(0,t.default)(r[s]))*((0,n.default)(e)-(0,n.default)(r[s]))/((0,n.default)(r[a])-(0,n.default)(r[s]))+(0,t.default)(r[s])&&(i=!i);return i}),"isPointInPolygon");e.default=i})),vg=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Ol());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n,r,i){return(0,t.default)(e,n,r)<i}),"isPointNearLine");e.default=r})),yg=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Sn());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n,r){return(0,t.default)(e,n)<r}),"isPointWithinRadius");e.default=r})),wg=Y((e=>{"use strict";function t(e,t){return a(e)||o(e,t)||r(e,t)||n()}function n(){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 r(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&null!=a.return&&a.return()}finally{if(i)throw o}}return n}}function a(e){if(Array.isArray(e))return e}v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,s(t,"_slicedToArray"),s(n,"_nonIterableRest"),s(r,"_unsupportedIterableToArray"),s(i,"_arrayLikeToArray"),s(o,"_iterableToArrayLimit"),s(a,"_arrayWithHoles");var l=s((function(e){if(!e.startsWith("POLYGON"))throw new Error("Invalid wkt.");return e.slice(e.indexOf("(")+2,e.indexOf(")")).split(", ").map((function(e){var n=t(e.split(" "),2),r=n[0],i=n[1];return{longitude:parseFloat(r),latitude:parseFloat(i)}}))}),"wktToPolygon");e.default=l})),_g=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0});var t={computeDestinationPoint:!0,convertArea:!0,convertDistance:!0,convertSpeed:!0,decimalToSexagesimal:!0,findNearest:!0,getAreaOfPolygon:!0,getBounds:!0,getBoundsOfDistance:!0,getCenter:!0,getCenterOfBounds:!0,getCompassDirection:!0,getCoordinateKey:!0,getCoordinateKeys:!0,getDistance:!0,getDistanceFromLine:!0,getGreatCircleBearing:!0,getLatitude:!0,getLongitude:!0,getPathLength:!0,getPreciseDistance:!0,getRhumbLineBearing:!0,getRoughCompassDirection:!0,getSpeed:!0,isDecimal:!0,isPointInLine:!0,isPointInPolygon:!0,isPointNearLine:!0,isPointWithinRadius:!0,isSexagesimal:!0,isValidCoordinate:!0,isValidLatitude:!0,isValidLongitude:!0,orderByDistance:!0,sexagesimalToDecimal:!0,toDecimal:!0,toRad:!0,toDeg:!0,wktToPolygon:!0};Object.defineProperty(e,"computeDestinationPoint",{enumerable:!0,get:s((function(){return n.default}),"get")}),Object.defineProperty(e,"convertArea",{enumerable:!0,get:s((function(){return r.default}),"get")}),Object.defineProperty(e,"convertDistance",{enumerable:!0,get:s((function(){return i.default}),"get")}),Object.defineProperty(e,"convertSpeed",{enumerable:!0,get:s((function(){return o.default}),"get")}),Object.defineProperty(e,"decimalToSexagesimal",{enumerable:!0,get:s((function(){return a.default}),"get")}),Object.defineProperty(e,"findNearest",{enumerable:!0,get:s((function(){return l.default}),"get")}),Object.defineProperty(e,"getAreaOfPolygon",{enumerable:!0,get:s((function(){return u.default}),"get")}),Object.defineProperty(e,"getBounds",{enumerable:!0,get:s((function(){return c.default}),"get")}),Object.defineProperty(e,"getBoundsOfDistance",{enumerable:!0,get:s((function(){return h.default}),"get")}),Object.defineProperty(e,"getCenter",{enumerable:!0,get:s((function(){return d.default}),"get")}),Object.defineProperty(e,"getCenterOfBounds",{enumerable:!0,get:s((function(){return p.default}),"get")}),Object.defineProperty(e,"getCompassDirection",{enumerable:!0,get:s((function(){return f.default}),"get")}),Object.defineProperty(e,"getCoordinateKey",{enumerable:!0,get:s((function(){return g.default}),"get")}),Object.defineProperty(e,"getCoordinateKeys",{enumerable:!0,get:s((function(){return y.default}),"get")}),Object.defineProperty(e,"getDistance",{enumerable:!0,get:s((function(){return m.default}),"get")}),Object.defineProperty(e,"getDistanceFromLine",{enumerable:!0,get:s((function(){return b.default}),"get")}),Object.defineProperty(e,"getGreatCircleBearing",{enumerable:!0,get:s((function(){return w.default}),"get")}),Object.defineProperty(e,"getLatitude",{enumerable:!0,get:s((function(){return _.default}),"get")}),Object.defineProperty(e,"getLongitude",{enumerable:!0,get:s((function(){return M.default}),"get")}),Object.defineProperty(e,"getPathLength",{enumerable:!0,get:s((function(){return x.default}),"get")}),Object.defineProperty(e,"getPreciseDistance",{enumerable:!0,get:s((function(){return I.default}),"get")}),Object.defineProperty(e,"getRhumbLineBearing",{enumerable:!0,get:s((function(){return S.default}),"get")}),Object.defineProperty(e,"getRoughCompassDirection",{enumerable:!0,get:s((function(){return k.default}),"get")}),Object.defineProperty(e,"getSpeed",{enumerable:!0,get:s((function(){return O.default}),"get")}),Object.defineProperty(e,"isDecimal",{enumerable:!0,get:s((function(){return E.default}),"get")}),Object.defineProperty(e,"isPointInLine",{enumerable:!0,get:s((function(){return P.default}),"get")}),Object.defineProperty(e,"isPointInPolygon",{enumerable:!0,get:s((function(){return A.default}),"get")}),Object.defineProperty(e,"isPointNearLine",{enumerable:!0,get:s((function(){return C.default}),"get")}),Object.defineProperty(e,"isPointWithinRadius",{enumerable:!0,get:s((function(){return F.default}),"get")}),Object.defineProperty(e,"isSexagesimal",{enumerable:!0,get:s((function(){return T.default}),"get")}),Object.defineProperty(e,"isValidCoordinate",{enumerable:!0,get:s((function(){return L.default}),"get")}),Object.defineProperty(e,"isValidLatitude",{enumerable:!0,get:s((function(){return N.default}),"get")}),Object.defineProperty(e,"isValidLongitude",{enumerable:!0,get:s((function(){return j.default}),"get")}),Object.defineProperty(e,"orderByDistance",{enumerable:!0,get:s((function(){return R.default}),"get")}),Object.defineProperty(e,"sexagesimalToDecimal",{enumerable:!0,get:s((function(){return B.default}),"get")}),Object.defineProperty(e,"toDecimal",{enumerable:!0,get:s((function(){return D.default}),"get")}),Object.defineProperty(e,"toRad",{enumerable:!0,get:s((function(){return z.default}),"get")}),Object.defineProperty(e,"toDeg",{enumerable:!0,get:s((function(){return U.default}),"get")}),Object.defineProperty(e,"wktToPolygon",{enumerable:!0,get:s((function(){return W.default}),"get")});var n=q(Cm()),r=q(Lm()),i=q(jm()),o=q(Nm()),a=q(Rm()),l=q(qm()),u=q(Ym()),c=q(Tl()),h=q($m()),d=q(Km()),p=q(Jm()),f=q(tg()),g=q(Oi()),y=q(Ro()),m=q(Sn()),b=q(Ol()),w=q(og()),_=q(pt()),M=q(ft()),x=q(sg()),I=q(dg()),S=q(Pl()),k=q(pg()),O=q(fg()),E=q(Si()),P=q(hg()),A=q(gg()),C=q(vg()),F=q(yg()),T=q(Ai()),L=q(vl()),N=q(fl()),j=q(ml()),R=q(Ml()),B=q(Ci()),D=q(Go()),z=q(zt()),U=q(er()),W=q(wg()),V=Be();function q(e){return e&&e.__esModule?e:{default:e}}Object.keys(V).forEach((function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(e,n,{enumerable:!0,get:s((function(){return V[n]}),"get")})})),s(q,"_interopRequireDefault")})),Gs=Y(((e,t)=>{v(),function(n,r){"use strict";var i="function",o="undefined",a="object",l="string",u="model",c="name",h="type",d="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",b="wearable",w="embedded",_="Amazon",M="Apple",x="ASUS",I="BlackBerry",S="Browser",k="Chrome",O="Firefox",E="Google",P="Huawei",A="LG",C="Microsoft",F="Motorola",T="Opera",L="Samsung",N="Sony",j="Xiaomi",R="Zebra",B="Facebook",D=s((function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}),"extend"),z=s((function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}),"enumerize"),U=s((function(e,t){return typeof e===l&&-1!==W(t).indexOf(W(e))}),"has"),W=s((function(e){return e.toLowerCase()}),"lowerize"),V=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:r}),"majorize"),q=s((function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof t===o?e:e.substring(0,275)}),"trim"),G=s((function(e,t){for(var n,o,s,l,u,c,h=0;h<t.length&&!u;){var d=t[h],p=t[h+1];for(n=o=0;n<d.length&&!u;)if(u=d[n++].exec(e))for(s=0;s<p.length;s++)c=u[++o],typeof(l=p[s])===a&&l.length>0?2===l.length?typeof l[1]==i?this[l[0]]=l[1].call(this,c):this[l[0]]=l[1]:3===l.length?typeof l[1]!==i||l[1].exec&&l[1].test?this[l[0]]=c?c.replace(l[1],l[2]):r:this[l[0]]=c?l[1].call(this,c,l[2]):r:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):r):this[l]=c||r;h+=2}}),"rgxMapper"),Y=s((function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(U(t[n][i],e))return"?"===n?r:n}else if(U(t[n],e))return"?"===n?r:n;return e}),"strMapper"),J={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},X={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,p],[/opios[\/ ]+([\w\.]+)/i],[p,[c,T+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,T]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[c,"UC"+S]],[/\bqbcore\/([\w\.]+)/i],[p,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[p,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[c,"IE"]],[/yabrowser\/([\w\.]+)/i],[p,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+S],p],[/\bfocus\/([\w\.]+)/i],[p,[c,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,T+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,T+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[p,[c,O]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+S]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+S],p],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,p],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,B],p],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[c,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[c,k+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,k+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+S]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,p],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[p,[c,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[p,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[p,Y,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[c,O+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,p]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[f,"amd64"]],[/(ia32(?=;))/i],[[f,W]],[/((?:i[346]|x)86)[;\)]/i],[[f,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[f,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[f,"armhf"]],[/windows (ce|mobile); ppc;/i],[[f,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[f,/ower/,"",W]],[/(sun4\w)[;\)]/i],[[f,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[f,W]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[d,L],[h,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[d,L],[h,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[d,M],[h,v]],[/(ipad\d+,\d+)/i],[u,[d,M],[h,y]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[d,M],[h,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[d,M],[h,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[d,P],[h,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[d,P],[h,v]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[d,j],[h,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[d,j],[h,y]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[d,"OPPO"],[h,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[d,"Vivo"],[h,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[d,"Realme"],[h,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[d,F],[h,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[d,F],[h,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[d,A],[h,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[d,A],[h,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[d,"Lenovo"],[h,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[d,"Nokia"],[h,v]],[/(pixel c)\b/i],[u,[d,E],[h,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[d,E],[h,v]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[d,N],[h,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[d,N],[h,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[d,"OnePlus"],[h,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[d,_],[h,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[d,_],[h,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,d,[h,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[d,I],[h,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[d,x],[h,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[d,x],[h,v]],[/(nexus 9)/i],[u,[d,"HTC"],[h,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[u,/_/g," "],[h,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[d,"Acer"],[h,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[d,"Meizu"],[h,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[d,"Sharp"],[h,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,u,[h,v]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d,u,[h,y]],[/(surface duo)/i],[u,[d,C],[h,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[d,"Fairphone"],[h,v]],[/(u304aa)/i],[u,[d,"AT&T"],[h,v]],[/\bsie-(\w*)/i],[u,[d,"Siemens"],[h,v]],[/\b(rct\w+) b/i],[u,[d,"RCA"],[h,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[d,"Dell"],[h,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[d,"Verizon"],[h,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[d,"Barnes & Noble"],[h,y]],[/\b(tm\d{3}\w+) b/i],[u,[d,"NuVision"],[h,y]],[/\b(k88) b/i],[u,[d,"ZTE"],[h,y]],[/\b(nx\d{3}j) b/i],[u,[d,"ZTE"],[h,v]],[/\b(gen\d{3}) b.+49h/i],[u,[d,"Swiss"],[h,v]],[/\b(zur\d{3}) b/i],[u,[d,"Swiss"],[h,y]],[/\b((zeki)?tb.*\b) b/i],[u,[d,"Zeki"],[h,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],u,[h,y]],[/\b(ns-?\w{0,9}) b/i],[u,[d,"Insignia"],[h,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[d,"NextBook"],[h,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],u,[h,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],u,[h,v]],[/\b(ph-1) /i],[u,[d,"Essential"],[h,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[d,"Envizen"],[h,y]],[/\b(trio[-\w\. ]+) b/i],[u,[d,"MachSpeed"],[h,y]],[/\btu_(1491) b/i],[u,[d,"Rotor"],[h,y]],[/(shield[\w ]+) b/i],[u,[d,"Nvidia"],[h,y]],[/(sprint) (\w+)/i],[d,u,[h,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,C],[h,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[d,R],[h,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[d,R],[h,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,u,[h,g]],[/droid.+; (shield) bui/i],[u,[d,"Nvidia"],[h,g]],[/(playstation [345portablevi]+)/i],[u,[d,N],[h,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[d,C],[h,g]],[/smart-tv.+(samsung)/i],[d,[h,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,L],[h,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,A],[h,m]],[/(apple) ?tv/i],[d,[u,M+" TV"],[h,m]],[/crkey/i],[[u,k+"cast"],[d,E],[h,m]],[/droid.+aft(\w)( bui|\))/i],[u,[d,_],[h,m]],[/\(dtv[\);].+(aquos)/i],[u,[d,"Sharp"],[h,m]],[/(bravia[\w- ]+) bui/i],[u,[d,N],[h,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[d,q],[u,q],[h,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,m]],[/((pebble))app/i],[d,u,[h,b]],[/droid.+; (glass) \d/i],[u,[d,E],[h,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[d,R],[h,b]],[/(quest( 2)?)/i],[u,[d,B],[h,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[h,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[h,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[h,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,y]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[h,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[c,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,p],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c,[p,Y,J]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,Y,J]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,"Mac OS"],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[p,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,p],[/\(bb(10);/i],[p,[c,I]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,O+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,k+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[c,"Chromium OS"],p],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,p],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[c,p]]},H=s((function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof H))return new H(e,t).getResult();var i=e||(typeof n!==o&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),s=t?D(X,t):X;return this.getBrowser=function(){var e={};return e[c]=r,e[p]=r,G.call(e,i,s.browser),e.major=V(e.version),e},this.getCPU=function(){var e={};return e[f]=r,G.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[d]=r,e[u]=r,e[h]=r,G.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=r,e[p]=r,G.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=r,e[p]=r,G.call(e,i,s.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return i},this.setUA=function(e){return i=typeof e===l&&e.length>275?q(e,275):e,this},this.setUA(i),this}),"UAParser");H.VERSION="0.7.31",H.BROWSER=z([c,p,"major"]),H.CPU=z([f]),H.DEVICE=z([u,d,h,g,v,m,y,b,w]),H.ENGINE=H.OS=z([c,p]),typeof e!==o?(typeof t!==o&&t.exports&&(e=t.exports=H),e.UAParser=H):typeof define===i&&define.amd?define((function(){return H})):typeof n!==o&&(n.UAParser=H);var K=typeof n!==o&&(n.jQuery||n.Zepto);if(K&&!K.ua){var $=new H;K.ua=$.getResult(),K.ua.get=function(){return $.getUA()},K.ua.set=function(e){$.setUA(e);var t=$.getResult();for(var n in t)K.ua[n]=t[n]}}}("object"==typeof window?window:e)})),Xv=Y(((e,t)=>{v();var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Array]",a="[object Boolean]",l="[object Date]",u="[object Error]",c="[object Function]",h="[object Map]",d="[object Number]",p="[object Object]",f="[object Promise]",g="[object RegExp]",y="[object Set]",m="[object String]",b="[object WeakMap]",w="[object ArrayBuffer]",_="[object DataView]",M=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,I={};I["[object Float32Array]"]=I["[object Float64Array]"]=I["[object Int8Array]"]=I["[object Int16Array]"]=I["[object Int32Array]"]=I["[object Uint8Array]"]=I["[object Uint8ClampedArray]"]=I["[object Uint16Array]"]=I["[object Uint32Array]"]=!0,I[i]=I[o]=I[w]=I[a]=I[_]=I[l]=I[u]=I[c]=I[h]=I[d]=I[p]=I[g]=I[y]=I[m]=I[b]=!1;var S="object"==typeof global&&global&&global.Object===Object&&global,k="object"==typeof self&&self&&self.Object===Object&&self,O=S||k||Function("return this")(),E="object"==typeof e&&e&&!e.nodeType&&e,P=E&&"object"==typeof t&&t&&!t.nodeType&&t,A=P&&P.exports===E,C=A&&S.process,F=function(){try{return C&&C.binding&&C.binding("util")}catch{}}(),T=F&&F.isTypedArray;function L(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function N(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function j(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function R(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function B(e){return function(t){return e(t)}}function D(e,t){return e.has(t)}function z(e,t){return null==e?void 0:e[t]}function U(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function W(e,t){return function(n){return e(t(n))}}function V(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}s(L,"arrayFilter"),s(N,"arrayPush"),s(j,"arraySome"),s(R,"baseTimes"),s(B,"baseUnary"),s(D,"cacheHas"),s(z,"getValue"),s(U,"mapToArray"),s(W,"overArg"),s(V,"setToArray");var q,G=Array.prototype,Y=Function.prototype,J=Object.prototype,X=O["__core-js_shared__"],H=Y.toString,K=J.hasOwnProperty,$=(q=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+q:"",Z=J.toString,Q=RegExp("^"+H.call(K).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=A?O.Buffer:void 0,te=O.Symbol,ne=O.Uint8Array,re=J.propertyIsEnumerable,ie=G.splice,oe=te?te.toStringTag:void 0,se=Object.getOwnPropertySymbols,ae=ee?ee.isBuffer:void 0,le=W(Object.keys,Object),ue=ct(O,"DataView"),ce=ct(O,"Map"),he=ct(O,"Promise"),de=ct(O,"Set"),pe=ct(O,"WeakMap"),fe=ct(Object,"create"),ge=bt(ue),ve=bt(ce),ye=bt(he),me=bt(de),be=bt(pe),we=te?te.prototype:void 0,_e=we?we.valueOf:void 0;function Me(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(){this.__data__=fe?fe(null):{},this.size=0}function Ie(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Se(e){var t=this.__data__;if(fe){var r=t[e];return r===n?void 0:r}return K.call(t,e)?t[e]:void 0}function ke(e){var t=this.__data__;return fe?void 0!==t[e]:K.call(t,e)}function Oe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=fe&&void 0===t?n:t,this}function Ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pe(){this.__data__=[],this.size=0}function Ae(e){var t=this.__data__,n=Ke(t,e);return!(n<0)&&(n==t.length-1?t.pop():ie.call(t,n,1),--this.size,!0)}function Ce(e){var t=this.__data__,n=Ke(t,e);return n<0?void 0:t[n][1]}function Fe(e){return Ke(this.__data__,e)>-1}function Te(e,t){var n=this.__data__,r=Ke(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Le(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(){this.size=0,this.__data__={hash:new Me,map:new(ce||Ee),string:new Me}}function je(e){var t=ut(this,e).delete(e);return this.size-=t?1:0,t}function Re(e){return ut(this,e).get(e)}function Be(e){return ut(this,e).has(e)}function De(e,t){var n=ut(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ze(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Le;++t<n;)this.add(e[t])}function Ue(e){return this.__data__.set(e,n),this}function We(e){return this.__data__.has(e)}function Ve(e){var t=this.__data__=new Ee(e);this.size=t.size}function qe(){this.__data__=new Ee,this.size=0}function Ge(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Ye(e){return this.__data__.get(e)}function Je(e){return this.__data__.has(e)}function Xe(e,t){var n=this.__data__;if(n instanceof Ee){var r=n.__data__;if(!ce||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Le(r)}return n.set(e,t),this.size=n.size,this}function He(e,t){var n=Mt(e),r=!n&&_t(e),i=!n&&!r&&It(e),o=!n&&!r&&!i&&At(e),s=n||r||i||o,a=s?R(e.length,String):[],l=a.length;for(var u in e)(t||K.call(e,u))&&(!s||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ft(u,l)))&&a.push(u);return a}function Ke(e,t){for(var n=e.length;n--;)if(wt(e[n][0],t))return n;return-1}function $e(e,t,n){var r=t(e);return Mt(e)?r:N(r,n(e))}function Ze(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":oe&&oe in Object(e)?ht(e):mt(e)}function Qe(e){return Pt(e)&&Ze(e)==i}function et(e,t,n,r,i){return e===t||(null==e||null==t||!Pt(e)&&!Pt(t)?e!=e&&t!=t:tt(e,t,n,r,et,i))}function tt(e,t,n,r,s,a){var l=Mt(e),u=Mt(t),c=l?o:pt(e),h=u?o:pt(t),d=(c=c==i?p:c)==p,f=(h=h==i?p:h)==p,g=c==h;if(g&&It(e)){if(!It(t))return!1;l=!0,d=!1}if(g&&!d)return a||(a=new Ve),l||At(e)?ot(e,t,n,r,s,a):st(e,t,c,n,r,s,a);if(!(1&n)){var v=d&&K.call(e,"__wrapped__"),y=f&&K.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,b=y?t.value():t;return a||(a=new Ve),s(m,b,n,r,a)}}return!!g&&(a||(a=new Ve),at(e,t,n,r,s,a))}function nt(e){return!(!Et(e)||vt(e))&&(kt(e)?Q:M).test(bt(e))}function rt(e){return Pt(e)&&Ot(e.length)&&!!I[Ze(e)]}function it(e){if(!yt(e))return le(e);var t=[];for(var n in Object(e))K.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ot(e,t,n,r,i,o){var s=1&n,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,h=!0,d=2&n?new ze:void 0;for(o.set(e,t),o.set(t,e);++c<a;){var p=e[c],f=t[c];if(r)var g=s?r(f,p,c,t,e,o):r(p,f,c,e,t,o);if(void 0!==g){if(g)continue;h=!1;break}if(d){if(!j(t,(function(e,t){if(!D(d,t)&&(p===e||i(p,e,n,r,o)))return d.push(t)}))){h=!1;break}}else if(p!==f&&!i(p,f,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h}function st(e,t,n,r,i,o,s){switch(n){case _:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case w:return!(e.byteLength!=t.byteLength||!o(new ne(e),new ne(t)));case a:case l:case d:return wt(+e,+t);case u:return e.name==t.name&&e.message==t.message;case g:case m:return e==t+"";case h:var c=U;case y:var p=1&r;if(c||(c=V),e.size!=t.size&&!p)return!1;var f=s.get(e);if(f)return f==t;r|=2,s.set(e,t);var v=ot(c(e),c(t),r,i,o,s);return s.delete(e),v;case"[object Symbol]":if(_e)return _e.call(e)==_e.call(t)}return!1}function at(e,t,n,r,i,o){var s=1&n,a=lt(e),l=a.length;if(l!=lt(t).length&&!s)return!1;for(var u=l;u--;){var c=a[u];if(!(s?c in t:K.call(t,c)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var d=!0;o.set(e,t),o.set(t,e);for(var p=s;++u<l;){var f=e[c=a[u]],g=t[c];if(r)var v=s?r(g,f,c,t,e,o):r(f,g,c,e,t,o);if(!(void 0===v?f===g||i(f,g,n,r,o):v)){d=!1;break}p||(p="constructor"==c)}if(d&&!p){var y=e.constructor,m=t.constructor;y!=m&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof m&&m instanceof m)&&(d=!1)}return o.delete(e),o.delete(t),d}function lt(e){return $e(e,Ct,dt)}function ut(e,t){var n=e.__data__;return gt(t)?n["string"==typeof t?"string":"hash"]:n.map}function ct(e,t){var n=z(e,t);return nt(n)?n:void 0}function ht(e){var t=K.call(e,oe),n=e[oe];try{e[oe]=void 0;var r=!0}catch{}var i=Z.call(e);return r&&(t?e[oe]=n:delete e[oe]),i}s(Me,"Hash"),s(xe,"hashClear"),s(Ie,"hashDelete"),s(Se,"hashGet"),s(ke,"hashHas"),s(Oe,"hashSet"),Me.prototype.clear=xe,Me.prototype.delete=Ie,Me.prototype.get=Se,Me.prototype.has=ke,Me.prototype.set=Oe,s(Ee,"ListCache"),s(Pe,"listCacheClear"),s(Ae,"listCacheDelete"),s(Ce,"listCacheGet"),s(Fe,"listCacheHas"),s(Te,"listCacheSet"),Ee.prototype.clear=Pe,Ee.prototype.delete=Ae,Ee.prototype.get=Ce,Ee.prototype.has=Fe,Ee.prototype.set=Te,s(Le,"MapCache"),s(Ne,"mapCacheClear"),s(je,"mapCacheDelete"),s(Re,"mapCacheGet"),s(Be,"mapCacheHas"),s(De,"mapCacheSet"),Le.prototype.clear=Ne,Le.prototype.delete=je,Le.prototype.get=Re,Le.prototype.has=Be,Le.prototype.set=De,s(ze,"SetCache"),s(Ue,"setCacheAdd"),s(We,"setCacheHas"),ze.prototype.add=ze.prototype.push=Ue,ze.prototype.has=We,s(Ve,"Stack"),s(qe,"stackClear"),s(Ge,"stackDelete"),s(Ye,"stackGet"),s(Je,"stackHas"),s(Xe,"stackSet"),Ve.prototype.clear=qe,Ve.prototype.delete=Ge,Ve.prototype.get=Ye,Ve.prototype.has=Je,Ve.prototype.set=Xe,s(He,"arrayLikeKeys"),s(Ke,"assocIndexOf"),s($e,"baseGetAllKeys"),s(Ze,"baseGetTag"),s(Qe,"baseIsArguments"),s(et,"baseIsEqual"),s(tt,"baseIsEqualDeep"),s(nt,"baseIsNative"),s(rt,"baseIsTypedArray"),s(it,"baseKeys"),s(ot,"equalArrays"),s(st,"equalByTag"),s(at,"equalObjects"),s(lt,"getAllKeys"),s(ut,"getMapData"),s(ct,"getNative"),s(ht,"getRawTag");var dt=se?function(e){return null==e?[]:(e=Object(e),L(se(e),(function(t){return re.call(e,t)})))}:Ft,pt=Ze;function ft(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||x.test(e))&&e>-1&&e%1==0&&e<t}function gt(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function vt(e){return!!$&&$ in e}function yt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||J)}function mt(e){return Z.call(e)}function bt(e){if(null!=e){try{return H.call(e)}catch{}try{return e+""}catch{}}return""}function wt(e,t){return e===t||e!=e&&t!=t}(ue&&pt(new ue(new ArrayBuffer(1)))!=_||ce&&pt(new ce)!=h||he&&pt(he.resolve())!=f||de&&pt(new de)!=y||pe&&pt(new pe)!=b)&&(pt=s((function(e){var t=Ze(e),n=t==p?e.constructor:void 0,r=n?bt(n):"";if(r)switch(r){case ge:return _;case ve:return h;case ye:return f;case me:return y;case be:return b}return t}),"getTag")),s(ft,"isIndex"),s(gt,"isKeyable"),s(vt,"isMasked"),s(yt,"isPrototype"),s(mt,"objectToString"),s(bt,"toSource"),s(wt,"eq");var _t=Qe(function(){return arguments}())?Qe:function(e){return Pt(e)&&K.call(e,"callee")&&!re.call(e,"callee")},Mt=Array.isArray;function xt(e){return null!=e&&Ot(e.length)&&!kt(e)}s(xt,"isArrayLike");var It=ae||Tt;function St(e,t){return et(e,t)}function kt(e){if(!Et(e))return!1;var t=Ze(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ot(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Et(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Pt(e){return null!=e&&"object"==typeof e}s(St,"isEqual"),s(kt,"isFunction"),s(Ot,"isLength"),s(Et,"isObject"),s(Pt,"isObjectLike");var At=T?B(T):rt;function Ct(e){return xt(e)?He(e):it(e)}function Ft(){return[]}function Tt(){return!1}s(Ct,"keys"),s(Ft,"stubArray"),s(Tt,"stubFalse"),t.exports=St})),xy=Y(((e,t)=>{v();var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Function]",a="[object Object]",l=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c[o]=c["[object Map]"]=c["[object Number]"]=c[a]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var h="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,p=h||d||Function("return this")(),f="object"==typeof e&&e&&!e.nodeType&&e,g=f&&"object"==typeof t&&t&&!t.nodeType&&t,y=g&&g.exports===f,m=y&&h.process,b=function(){try{return g&&g.require&&g.require("util").types||m&&m.binding&&m.binding("util")}catch{}}(),w=b&&b.isTypedArray;function _(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function M(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function x(e){return function(t){return e(t)}}function I(e,t){return null==e?void 0:e[t]}function S(e,t){return function(n){return e(t(n))}}s(_,"apply"),s(M,"baseTimes"),s(x,"baseUnary"),s(I,"getValue"),s(S,"overArg");var k,O=Array.prototype,E=Function.prototype,P=Object.prototype,A=p["__core-js_shared__"],C=E.toString,F=P.hasOwnProperty,T=(k=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+k:"",L=P.toString,N=C.call(Object),j=RegExp("^"+C.call(F).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=y?p.Buffer:void 0,B=p.Symbol,D=p.Uint8Array,z=R?R.allocUnsafe:void 0,U=S(Object.getPrototypeOf,Object),W=Object.create,V=P.propertyIsEnumerable,q=O.splice,G=B?B.toStringTag:void 0,Y=function(){try{var e=Ye(Object,"defineProperty");return e({},"",{}),e}catch{}}(),J=R?R.isBuffer:void 0,X=Math.max,H=Date.now,K=Ye(p,"Map"),$=Ye(Object,"create"),Z=function(){function e(){}return s(e,"object"),function(t){if(!gt(t))return{};if(W)return W(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Q(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ee(){this.__data__=$?$(null):{},this.size=0}function te(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function ne(e){var t=this.__data__;if($){var r=t[e];return r===n?void 0:r}return F.call(t,e)?t[e]:void 0}function re(e){var t=this.__data__;return $?void 0!==t[e]:F.call(t,e)}function ie(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=$&&void 0===t?n:t,this}function oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function se(){this.__data__=[],this.size=0}function ae(e){var t=this.__data__,n=ke(t,e);return!(n<0)&&(n==t.length-1?t.pop():q.call(t,n,1),--this.size,!0)}function le(e){var t=this.__data__,n=ke(t,e);return n<0?void 0:t[n][1]}function ue(e){return ke(this.__data__,e)>-1}function ce(e,t){var n=this.__data__,r=ke(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function he(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function de(){this.size=0,this.__data__={hash:new Q,map:new(K||oe),string:new Q}}function pe(e){var t=Ge(this,e).delete(e);return this.size-=t?1:0,t}function fe(e){return Ge(this,e).get(e)}function ge(e){return Ge(this,e).has(e)}function ve(e,t){var n=Ge(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ye(e){var t=this.__data__=new oe(e);this.size=t.size}function me(){this.__data__=new oe,this.size=0}function be(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function we(e){return this.__data__.get(e)}function _e(e){return this.__data__.has(e)}function Me(e,t){var n=this.__data__;if(n instanceof oe){var r=n.__data__;if(!K||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new he(r)}return n.set(e,t),this.size=n.size,this}function xe(e,t){var n=ut(e),r=!n&<(e),i=!n&&!r&&dt(e),o=!n&&!r&&!i&&mt(e),s=n||r||i||o,a=s?M(e.length,String):[],l=a.length;for(var u in e)(t||F.call(e,u))&&(!s||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||He(u,l)))&&a.push(u);return a}function Ie(e,t,n){(void 0!==n&&!at(e[t],n)||void 0===n&&!(t in e))&&Oe(e,t,n)}function Se(e,t,n){var r=e[t];(!F.call(e,t)||!at(r,n)||void 0===n&&!(t in e))&&Oe(e,t,n)}function ke(e,t){for(var n=e.length;n--;)if(at(e[n][0],t))return n;return-1}function Oe(e,t,n){"__proto__"==t&&Y?Y(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}s(Q,"Hash"),s(ee,"hashClear"),s(te,"hashDelete"),s(ne,"hashGet"),s(re,"hashHas"),s(ie,"hashSet"),Q.prototype.clear=ee,Q.prototype.delete=te,Q.prototype.get=ne,Q.prototype.has=re,Q.prototype.set=ie,s(oe,"ListCache"),s(se,"listCacheClear"),s(ae,"listCacheDelete"),s(le,"listCacheGet"),s(ue,"listCacheHas"),s(ce,"listCacheSet"),oe.prototype.clear=se,oe.prototype.delete=ae,oe.prototype.get=le,oe.prototype.has=ue,oe.prototype.set=ce,s(he,"MapCache"),s(de,"mapCacheClear"),s(pe,"mapCacheDelete"),s(fe,"mapCacheGet"),s(ge,"mapCacheHas"),s(ve,"mapCacheSet"),he.prototype.clear=de,he.prototype.delete=pe,he.prototype.get=fe,he.prototype.has=ge,he.prototype.set=ve,s(ye,"Stack"),s(me,"stackClear"),s(be,"stackDelete"),s(we,"stackGet"),s(_e,"stackHas"),s(Me,"stackSet"),ye.prototype.clear=me,ye.prototype.delete=be,ye.prototype.get=we,ye.prototype.has=_e,ye.prototype.set=Me,s(xe,"arrayLikeKeys"),s(Ie,"assignMergeValue"),s(Se,"assignValue"),s(ke,"assocIndexOf"),s(Oe,"baseAssignValue");var Ee=qe();function Pe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":G&&G in Object(e)?Je(e):tt(e)}function Ae(e){return vt(e)&&Pe(e)==i}function Ce(e){return!(!gt(e)||Ze(e))&&(pt(e)?j:l).test(st(e))}function Fe(e){return vt(e)&&ft(e.length)&&!!c[Pe(e)]}function Te(e){if(!gt(e))return et(e);var t=Qe(e),n=[];for(var r in e)"constructor"==r&&(t||!F.call(e,r))||n.push(r);return n}function Le(e,t,n,r,i){e!==t&&Ee(t,(function(o,s){if(i||(i=new ye),gt(o))Ne(e,t,s,n,Le,r,i);else{var a=r?r(rt(e,s),o,s+"",e,t,i):void 0;void 0===a&&(a=o),Ie(e,s,a)}}),wt)}function Ne(e,t,n,r,i,o,s){var a=rt(e,n),l=rt(t,n),u=s.get(l);if(u)Ie(e,n,u);else{var c=o?o(a,l,n+"",e,t,s):void 0,h=void 0===c;if(h){var d=ut(l),p=!d&&dt(l),f=!d&&!p&&mt(l);c=l,d||p||f?ut(a)?c=a:ht(a)?c=Ue(a):p?(h=!1,c=Be(l,!0)):f?(h=!1,c=ze(l,!0)):c=[]:yt(l)||lt(l)?(c=a,lt(a)?c=bt(a):(!gt(a)||pt(a))&&(c=Xe(l))):h=!1}h&&(s.set(l,c),i(c,l,r,o,s),s.delete(l)),Ie(e,n,c)}}function je(e,t){return it(nt(e,t,xt),e+"")}s(Pe,"baseGetTag"),s(Ae,"baseIsArguments"),s(Ce,"baseIsNative"),s(Fe,"baseIsTypedArray"),s(Te,"baseKeysIn"),s(Le,"baseMerge"),s(Ne,"baseMergeDeep"),s(je,"baseRest");var Re=Y?function(e,t){return Y(e,"toString",{configurable:!0,enumerable:!1,value:Mt(t),writable:!0})}:xt;function Be(e,t){if(t)return e.slice();var n=e.length,r=z?z(n):new e.constructor(n);return e.copy(r),r}function De(e){var t=new e.constructor(e.byteLength);return new D(t).set(new D(e)),t}function ze(e,t){var n=t?De(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ue(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function We(e,t,n,r){var i=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var a=t[o],l=r?r(n[a],e[a],a,n,e):void 0;void 0===l&&(l=e[a]),i?Oe(n,a,l):Se(n,a,l)}return n}function Ve(e){return je((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,s&&Ke(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,o)}return t}))}function qe(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===n(o[l],l,o))break}return t}}function Ge(e,t){var n=e.__data__;return $e(t)?n["string"==typeof t?"string":"hash"]:n.map}function Ye(e,t){var n=I(e,t);return Ce(n)?n:void 0}function Je(e){var t=F.call(e,G),n=e[G];try{e[G]=void 0;var r=!0}catch{}var i=L.call(e);return r&&(t?e[G]=n:delete e[G]),i}function Xe(e){return"function"!=typeof e.constructor||Qe(e)?{}:Z(U(e))}function He(e,t){var n=typeof e;return!!(t=null==t?r:t)&&("number"==n||"symbol"!=n&&u.test(e))&&e>-1&&e%1==0&&e<t}function Ke(e,t,n){if(!gt(n))return!1;var r=typeof t;return!!("number"==r?ct(n)&&He(t,n.length):"string"==r&&t in n)&&at(n[t],e)}function $e(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Ze(e){return!!T&&T in e}function Qe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||P)}function et(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}function tt(e){return L.call(e)}function nt(e,t,n){return t=X(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=X(r.length-t,0),s=Array(o);++i<o;)s[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(s),_(e,this,a)}}function rt(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}s(Be,"cloneBuffer"),s(De,"cloneArrayBuffer"),s(ze,"cloneTypedArray"),s(Ue,"copyArray"),s(We,"copyObject"),s(Ve,"createAssigner"),s(qe,"createBaseFor"),s(Ge,"getMapData"),s(Ye,"getNative"),s(Je,"getRawTag"),s(Xe,"initCloneObject"),s(He,"isIndex"),s(Ke,"isIterateeCall"),s($e,"isKeyable"),s(Ze,"isMasked"),s(Qe,"isPrototype"),s(et,"nativeKeysIn"),s(tt,"objectToString"),s(nt,"overRest"),s(rt,"safeGet");var it=ot(Re);function ot(e){var t=0,n=0;return function(){var r=H(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function st(e){if(null!=e){try{return C.call(e)}catch{}try{return e+""}catch{}}return""}function at(e,t){return e===t||e!=e&&t!=t}s(ot,"shortOut"),s(st,"toSource"),s(at,"eq");var lt=Ae(function(){return arguments}())?Ae:function(e){return vt(e)&&F.call(e,"callee")&&!V.call(e,"callee")},ut=Array.isArray;function ct(e){return null!=e&&ft(e.length)&&!pt(e)}function ht(e){return vt(e)&&ct(e)}s(ct,"isArrayLike"),s(ht,"isArrayLikeObject");var dt=J||It;function pt(e){if(!gt(e))return!1;var t=Pe(e);return t==o||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ft(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function gt(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function vt(e){return null!=e&&"object"==typeof e}function yt(e){if(!vt(e)||Pe(e)!=a)return!1;var t=U(e);if(null===t)return!0;var n=F.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&C.call(n)==N}s(pt,"isFunction"),s(ft,"isLength"),s(gt,"isObject"),s(vt,"isObjectLike"),s(yt,"isPlainObject");var mt=w?x(w):Fe;function bt(e){return We(e,wt(e))}function wt(e){return ct(e)?xe(e,!0):Te(e)}s(bt,"toPlainObject"),s(wt,"keysIn");var _t=Ve((function(e,t,n){Le(e,t,n)}));function Mt(e){return function(){return e}}function xt(e){return e}function It(){return!1}s(Mt,"constant"),s(xt,"identity"),s(It,"stubFalse"),t.exports=_t})),qy=Y(((e,t)=>{"use strict";v(),t.exports=s((function(e){if(!Array.isArray(e))throw new TypeError("array-unique expects an array.");for(var t=e.length,n=-1;n++<t;)for(var r=n+1;r<e.length;++r)e[n]===e[r]&&e.splice(r--,1);return e}),"unique"),t.exports.immutable=s((function(e){if(!Array.isArray(e))throw new TypeError("array-unique expects an array.");for(var n=e.length,r=new Array(n),i=0;i<n;i++)r[i]=e[i];return t.exports(r)}),"uniqueImmutable")})),ub=Y(((e,t)=>{var n,r;v(),n=e,r=function(){"use strict";function e(e,r,i,o,a){s((function e(n,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,l=r-i+1,u=Math.log(a),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1);e(n,r,Math.max(i,Math.floor(r-l*c/a+h)),Math.min(o,Math.floor(r+(a-l)*c/a+h)),s)}var d=n[r],p=i,f=o;for(t(n,i,r),s(n[o],d)>0&&t(n,i,o);p<f;){for(t(n,p,f),p++,f--;s(n[p],d)<0;)p++;for(;s(n[f],d)>0;)f--}0===s(n[i],d)?t(n,i,f):t(n,++f,o),f<=r&&(i=f+1),r<=f&&(o=f-1)}}),"t")(e,r,i||0,o||e.length-1,a||n)}function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return e<t?-1:e>t?1:0}s(e,"t"),s(t,"i"),s(n,"n");var r=s((function(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}),"r");function i(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r<t.length;r++)if(n(e,t[r]))return r;return-1}function o(e,t){a(e,0,e.children.length,t,e)}function a(e,t,n,r,i){i||(i=g(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=t;o<n;o++){var s=e.children[o];l(i,e.leaf?r(s):s)}return i}function l(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function u(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function h(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function d(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function f(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function g(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,n,r,i,o){for(var s=[n,r];s.length;)if(!((r=s.pop())-(n=s.pop())<=i)){var a=n+Math.ceil((r-n)/i/2)*i;e(t,a,n,r,o),s.push(n,a,a,r)}}return s(i,"e"),s(o,"a"),s(a,"h"),s(l,"o"),s(u,"s"),s(c,"l"),s(h,"f"),s(d,"u"),s(p,"m"),s(f,"c"),s(g,"p"),s(v,"d"),r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(e){var t=this.data,n=[];if(!f(e,t))return n;for(var r=this.toBBox,i=[];t;){for(var o=0;o<t.children.length;o++){var s=t.children[o],a=t.leaf?r(s):s;f(e,a)&&(t.leaf?n.push(s):p(e,a)?this._all(s,n):i.push(s))}t=i.pop()}return n},r.prototype.collides=function(e){var t=this.data;if(!f(e,t))return!1;for(var n=[];t;){for(var r=0;r<t.children.length;r++){var i=t.children[r],o=t.leaf?this.toBBox(i):i;if(f(e,o)){if(t.leaf||p(e,o))return!0;n.push(i)}}t=n.pop()}return!1},r.prototype.load=function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0;t<e.length;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(e){return e&&this._insert(e,this.data.height-1),this},r.prototype.clear=function(){return this.data=g([]),this},r.prototype.remove=function(e,t){if(!e)return this;for(var n,r,o,s=this.data,a=this.toBBox(e),l=[],u=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=u.pop(),o=!0),s.leaf){var c=i(e,s.children,t);if(-1!==c)return s.children.splice(c,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?r?(n++,s=r.children[n],o=!1):s=null:(l.push(s),u.push(n),n=0,r=s,s=s.children[0])}return this},r.prototype.toBBox=function(e){return e},r.prototype.compareMinX=function(e,t){return e.minX-t.minX},r.prototype.compareMinY=function(e,t){return e.minY-t.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(e){return this.data=e,this},r.prototype._all=function(e,t){for(var n=[];e;)e.leaf?t.push.apply(t,e.children):n.push.apply(n,e.children),e=n.pop();return t},r.prototype._build=function(e,t,n,r){var i,s=n-t+1,a=this._maxEntries;if(s<=a)return o(i=g(e.slice(t,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,r-1))),(i=g([])).leaf=!1,i.height=r;var l=Math.ceil(s/a),u=l*Math.ceil(Math.sqrt(a));v(e,t,n,u,this.compareMinX);for(var c=t;c<=n;c+=u){var h=Math.min(c+u-1,n);v(e,c,h,l,this.compareMinY);for(var d=c;d<=h;d+=l){var p=Math.min(d+l-1,h);i.children.push(this._build(e,d,p,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(e,t,n,r){for(;r.push(t),!t.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,s=void 0,a=0;a<t.children.length;a++){var l=t.children[a],u=h(l),c=(d=e,p=l,(Math.max(p.maxX,d.maxX)-Math.min(p.minX,d.minX))*(Math.max(p.maxY,d.maxY)-Math.min(p.minY,d.minY))-u);c<o?(o=c,i=u<i?u:i,s=l):c===o&&u<i&&(i=u,s=l)}t=s||t.children[0]}var d,p;return t},r.prototype._insert=function(e,t,n){var r=n?e:this.toBBox(e),i=[],o=this._chooseSubtree(r,this.data,t,i);for(o.children.push(e),l(o,r);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(r,i,t)},r.prototype._split=function(e,t){var n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var s=this._chooseSplitIndex(n,i,r),a=g(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(n,a)},r.prototype._splitRoot=function(e,t){this.data=g([e,t]),this.data.height=e.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(e,t,n){for(var r,i,o,s,l,u,c,d=1/0,p=1/0,f=t;f<=n-t;f++){var g=a(e,0,f,this.toBBox),v=a(e,f,n,this.toBBox),y=(i=g,o=v,s=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),u=Math.min(i.maxX,o.maxX),c=Math.min(i.maxY,o.maxY),Math.max(0,u-s)*Math.max(0,c-l)),m=h(g)+h(v);y<d?(d=y,r=f,p=m<p?m:p):y===d&&m<p&&(p=m,r=f)}return r||n-t},r.prototype._chooseSplitAxis=function(e,t,n){var r=e.leaf?this.compareMinX:u,i=e.leaf?this.compareMinY:c;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)},r.prototype._allDistMargin=function(e,t,n,r){e.children.sort(r);for(var i=this.toBBox,o=a(e,0,t,i),s=a(e,n-t,n,i),u=d(o)+d(s),c=t;c<n-t;c++){var h=e.children[c];l(o,e.leaf?i(h):h),u+=d(o)}for(var p=n-t-1;p>=t;p--){var f=e.children[p];l(s,e.leaf?i(f):f),u+=d(s)}return u},r.prototype._adjustParentBBoxes=function(e,t,n){for(var r=n;r>=0;r--)l(t[r],e)},r.prototype._condense=function(e){for(var t=e.length-1,n=void 0;t>=0;t--)0===e[t].children.length?t>0?(n=e[t-1].children).splice(n.indexOf(e[t]),1):this.clear():o(e[t],this.toBBox)},r},"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(n=n||self).RBush=r()})),ah=Y((e=>{"use strict";function t(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function n(e,t,n){switch(void 0===n&&(n={}),e){case"Point":return r(t).geometry;case"LineString":return l(t).geometry;case"Polygon":return o(t).geometry;case"MultiPoint":return d(t).geometry;case"MultiLineString":return h(t).geometry;case"MultiPolygon":return p(t).geometry;default:throw new Error(e+" is invalid")}}function r(e,n,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!S(e[0])||!S(e[1]))throw new Error("coordinates must contain numbers");return t({type:"Point",coordinates:e},n,r)}function i(e,t,n){return void 0===n&&(n={}),c(e.map((function(e){return r(e,t)})),n)}function o(e,n,r){void 0===r&&(r={});for(var i=0,o=e;i<o.length;i++){var s=o[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}return t({type:"Polygon",coordinates:e},n,r)}function a(e,t,n){return void 0===n&&(n={}),c(e.map((function(e){return o(e,t)})),n)}function l(e,n,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return t({type:"LineString",coordinates:e},n,r)}function u(e,t,n){return void 0===n&&(n={}),c(e.map((function(e){return l(e,t)})),n)}function c(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function h(e,n,r){return void 0===r&&(r={}),t({type:"MultiLineString",coordinates:e},n,r)}function d(e,n,r){return void 0===r&&(r={}),t({type:"MultiPoint",coordinates:e},n,r)}function p(e,n,r){return void 0===r&&(r={}),t({type:"MultiPolygon",coordinates:e},n,r)}function f(e,n,r){return void 0===r&&(r={}),t({type:"GeometryCollection",geometries:e},n,r)}function g(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n}function y(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t*r}function m(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t/r}function b(e,t){return _(m(e,t))}function w(e){var t=e%360;return t<0&&(t+=360),t}function _(e){return 180*(e%(2*Math.PI))/Math.PI}function M(e){return e%360*Math.PI/180}function x(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return y(m(e,t),n)}function I(t,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[n];if(!i)throw new Error("invalid original units");var o=e.areaFactors[r];if(!o)throw new Error("invalid final units");return t/i*o}function S(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function k(e){return!!e&&e.constructor===Object}function O(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!S(e))throw new Error("bbox must only contain numbers")}))}function E(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}v(),Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},s(t,"feature"),e.feature=t,s(n,"geometry"),e.geometry=n,s(r,"point"),e.point=r,s(i,"points"),e.points=i,s(o,"polygon"),e.polygon=o,s(a,"polygons"),e.polygons=a,s(l,"lineString"),e.lineString=l,s(u,"lineStrings"),e.lineStrings=u,s(c,"featureCollection"),e.featureCollection=c,s(h,"multiLineString"),e.multiLineString=h,s(d,"multiPoint"),e.multiPoint=d,s(p,"multiPolygon"),e.multiPolygon=p,s(f,"geometryCollection"),e.geometryCollection=f,s(g,"round"),e.round=g,s(y,"radiansToLength"),e.radiansToLength=y,s(m,"lengthToRadians"),e.lengthToRadians=m,s(b,"lengthToDegrees"),e.lengthToDegrees=b,s(w,"bearingToAzimuth"),e.bearingToAzimuth=w,s(_,"radiansToDegrees"),e.radiansToDegrees=_,s(M,"degreesToRadians"),e.degreesToRadians=M,s(x,"convertLength"),e.convertLength=x,s(I,"convertArea"),e.convertArea=I,s(S,"isNumber"),e.isNumber=S,s(k,"isObject"),e.isObject=k,s(O,"validateBBox"),e.validateBBox=O,s(E,"validateId"),e.validateId=E})),sh=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0});var t=ah();function n(e,t,r){if(null!==e)for(var i,o,s,a,l,u,c,h,d=0,p=0,f=e.type,g="FeatureCollection"===f,v="Feature"===f,y=g?e.features.length:1,m=0;m<y;m++){l=(h=!!(c=g?e.features[m].geometry:v?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var b=0;b<l;b++){var w=0,_=0;if(null!==(a=h?c.geometries[b]:c)){u=a.coordinates;var M=a.type;switch(d=!r||"Polygon"!==M&&"MultiPolygon"!==M?0:1,M){case null:break;case"Point":if(!1===t(u,p,m,w,_))return!1;p++,w++;break;case"LineString":case"MultiPoint":for(i=0;i<u.length;i++){if(!1===t(u[i],p,m,w,_))return!1;p++,"MultiPoint"===M&&w++}"LineString"===M&&w++;break;case"Polygon":case"MultiLineString":for(i=0;i<u.length;i++){for(o=0;o<u[i].length-d;o++){if(!1===t(u[i][o],p,m,w,_))return!1;p++}"MultiLineString"===M&&w++,"Polygon"===M&&_++}"Polygon"===M&&w++;break;case"MultiPolygon":for(i=0;i<u.length;i++){for(_=0,o=0;o<u[i].length;o++){for(s=0;s<u[i][o].length-d;s++){if(!1===t(u[i][o][s],p,m,w,_))return!1;p++}_++}w++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(!1===n(a.geometries[i],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function r(e,t,r,i){var o=r;return n(e,(function(e,n,i,s,a){o=0===n&&void 0===r?e:t(o,e,n,i,s,a)}),i),o}function i(e,t){var n;switch(e.type){case"FeatureCollection":for(n=0;n<e.features.length&&!1!==t(e.features[n].properties,n);n++);break;case"Feature":t(e.properties,0)}}function o(e,t,n){var r=n;return i(e,(function(e,i){r=0===i&&void 0===n?e:t(r,e,i)})),r}function a(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function l(e,t,n){var r=n;return a(e,(function(e,i){r=0===i&&void 0===n?e:t(r,e,i)})),r}function u(e){var t=[];return n(e,(function(e){t.push(e)})),t}function c(e,t){var n,r,i,o,s,a,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(n=0;n<g;n++){for(a=p?e.features[n].geometry:f?e.geometry:e,u=p?e.features[n].properties:f?e.properties:{},c=p?e.features[n].bbox:f?e.bbox:void 0,h=p?e.features[n].id:f?e.id:void 0,s=(l=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=l?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,d,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],d,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,u,c,h))return!1;d++}}function h(e,t,n){var r=n;return c(e,(function(e,i,o,s,a){r=0===i&&void 0===n?e:t(r,e,i,o,s,a)})),r}function d(e,n){c(e,(function(e,r,i,o,s){var a,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==n(t.feature(e,i,{bbox:o,id:s}),r,0)&&void 0}switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var u=0;u<e.coordinates.length;u++){var c={type:a,coordinates:e.coordinates[u]};if(!1===n(t.feature(c,i),r,u))return!1}}))}function p(e,t,n){var r=n;return d(e,(function(e,i,o){r=0===i&&0===o&&void 0===n?e:t(r,e,i,o)})),r}function f(e,r){d(e,(function(e,i,o){var s=0;if(e.geometry){var a=e.geometry.type;if("Point"!==a&&"MultiPoint"!==a){var l,u=0,c=0,h=0;if(!1===n(e,(function(n,a,d,p,f){if(void 0===l||i>u||p>c||f>h)return l=n,u=i,c=p,h=f,void(s=0);var g=t.lineString([l,n],e.properties);if(!1===r(g,i,o,f,s))return!1;s++,l=n})))return!1}}}))}function g(e,t,n){var r=n,i=!1;return f(e,(function(e,o,s,a,l){r=!1===i&&void 0===n?e:t(r,e,o,s,a,l),i=!0})),r}function y(e,n){if(!e)throw new Error("geojson is required");d(e,(function(e,r,i){if(null!==e.geometry){var o=e.geometry.type,s=e.geometry.coordinates;switch(o){case"LineString":if(!1===n(e,r,i,0,0))return!1;break;case"Polygon":for(var a=0;a<s.length;a++)if(!1===n(t.lineString(s[a],e.properties),r,i,a))return!1}}}))}function m(e,t,n){var r=n;return y(e,(function(e,i,o,s){r=0===i&&void 0===n?e:t(r,e,i,o,s)})),r}function b(e,n){if(n=n||{},!t.isObject(n))throw new Error("options is invalid");var r,i=n.featureIndex||0,o=n.multiFeatureIndex||0,s=n.geometryIndex||0,a=n.segmentIndex||0,l=n.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,r=e.features[i].geometry;break;case"Feature":l=l||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=u.length+a-1),t.lineString([u[a],u[a+1]],l,n);case"Polygon":return s<0&&(s=u.length+s),a<0&&(a=u[s].length+a-1),t.lineString([u[s][a],u[s][a+1]],l,n);case"MultiLineString":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a-1),t.lineString([u[o][a],u[o][a+1]],l,n);case"MultiPolygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),a<0&&(a=u[o][s].length-a-1),t.lineString([u[o][s][a],u[o][s][a+1]],l,n)}throw new Error("geojson is invalid")}function w(e,n){if(n=n||{},!t.isObject(n))throw new Error("options is invalid");var r,i=n.featureIndex||0,o=n.multiFeatureIndex||0,s=n.geometryIndex||0,a=n.coordIndex||0,l=n.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,r=e.features[i].geometry;break;case"Feature":l=l||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":return t.point(u,l,n);case"MultiPoint":return o<0&&(o=u.length+o),t.point(u[o],l,n);case"LineString":return a<0&&(a=u.length+a),t.point(u[a],l,n);case"Polygon":return s<0&&(s=u.length+s),a<0&&(a=u[s].length+a),t.point(u[s][a],l,n);case"MultiLineString":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a),t.point(u[o][a],l,n);case"MultiPolygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),a<0&&(a=u[o][s].length-a),t.point(u[o][s][a],l,n)}throw new Error("geojson is invalid")}s(n,"coordEach"),s(r,"coordReduce"),s(i,"propEach"),s(o,"propReduce"),s(a,"featureEach"),s(l,"featureReduce"),s(u,"coordAll"),s(c,"geomEach"),s(h,"geomReduce"),s(d,"flattenEach"),s(p,"flattenReduce"),s(f,"segmentEach"),s(g,"segmentReduce"),s(y,"lineEach"),s(m,"lineReduce"),s(b,"findSegment"),s(w,"findPoint"),e.coordAll=u,e.coordEach=n,e.coordReduce=r,e.featureEach=a,e.featureReduce=l,e.findPoint=w,e.findSegment=b,e.flattenEach=d,e.flattenReduce=p,e.geomEach=c,e.geomReduce=h,e.lineEach=y,e.lineReduce=m,e.propEach=i,e.propReduce=o,e.segmentEach=f,e.segmentReduce=g})),yb=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0});var t=sh();function n(e){var n=[1/0,1/0,-1/0,-1/0];return t.coordEach(e,(function(e){n[0]>e[0]&&(n[0]=e[0]),n[1]>e[1]&&(n[1]=e[1]),n[2]<e[0]&&(n[2]=e[0]),n[3]<e[1]&&(n[3]=e[1])})),n}s(n,"bbox"),n.default=n,e.default=n})),Mb=Y(((e,t)=>{v();var n=ub(),r=ah(),i=sh(),o=yb().default,a=i.featureEach,l=(i.coordEach,r.polygon,r.featureCollection);function u(e){var t=new n(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:o(e),n.prototype.insert.call(this,e)},t.load=function(e){var t=[];return Array.isArray(e)?e.forEach((function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:o(e),t.push(e)})):a(e,(function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:o(e),t.push(e)})),n.prototype.load.call(this,t)},t.remove=function(e,t){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:o(e),n.prototype.remove.call(this,e,t)},t.clear=function(){return n.prototype.clear.call(this)},t.search=function(e){var t=n.prototype.search.call(this,this.toBBox(e));return l(t)},t.collides=function(e){return n.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=n.prototype.all.call(this);return l(e)},t.toJSON=function(){return n.prototype.toJSON.call(this)},t.fromJSON=function(e){return n.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var t;if(e.bbox)t=e.bbox;else if(Array.isArray(e)&&4===e.length)t=e;else if(Array.isArray(e)&&6===e.length)t=[e[0],e[1],e[3],e[4]];else if("Feature"===e.type)t=o(e);else{if("FeatureCollection"!==e.type)throw new Error("invalid geojson");t=o(e)}return{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},t}s(u,"geojsonRbush"),t.exports=u,t.exports.default=u})),Nh={};function Oh(e,t){return!t&&"function"==typeof e&&(t=e,e={}),this.ondata=t,e}function n0(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),li(e,t,[ui],(function(e){return Hn(po(e.data[0],e.data[1]))}),0,n)}function po(e,t){return kr(e,t||{},0,0)}function Ah(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),li(e,t,[si],(function(e){return Hn(di(e.data[0],xh(e.data[1])))}),1,n)}function di(e,t){return lo(e,t)}function eI(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),li(e,t,[ui,Xb,function(){return[yh]}],(function(e){return Hn(yh(e.data[0],e.data[1]))}),2,n)}function yh(e,t){t||(t={});var n=oi(),r=e.length;n.p(e);var i=kr(e,t,Ph(t),8),o=i.length;return Eh(i,t),ue(i,o-8,n.d()),ue(i,o-4,r),i}function i0(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),li(e,t,[si,Kb,function(){return[Gu]}],(function(e){return Hn(Gu(e.data[0]))}),3,n)}function Gu(e,t){return lo(e.subarray(Th(e),-8),t||new ee(Qb(e)))}function nI(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),li(e,t,[ui,Jb,function(){return[wh]}],(function(e){return Hn(wh(e.data[0],e.data[1]))}),4,n)}function wh(e,t){t||(t={});var n=Mh();n.p(e);var r=kr(e,t,2,4);return Ih(r,t),ue(r,r.length-4,n.d()),r}function o0(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),li(e,t,[si,Zb,function(){return[Yu]}],(function(e){return Hn(Yu(e.data[0],xh(e.data[1])))}),5,n)}function Yu(e,t){return lo((e0(e),e.subarray(2,-4)),t)}function iI(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),31==e[0]&&139==e[1]&&8==e[2]?i0(e,t,n):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?Ah(e,t,n):o0(e,t,n)}function aI(e,t){return 31==e[0]&&139==e[1]&&8==e[2]?Gu(e,t):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?di(e,t):Yu(e,t)}function $n(e,t){if(t){for(var n=new ee(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}if(Nb)return Nb.encode(e);var i=e.length,o=new ee(e.length+(e.length>>1)),a=0,l=s((function(e){o[a++]=e}),"w");for(r=0;r<i;++r){if(a+5>o.length){var u=new ee(a+8+(i-r<<1));u.set(o),o=u}var c=e.charCodeAt(r);c<128||t?l(c):c<2048?(l(192|c>>6),l(128|63&c)):c>55295&&c<57344?(l(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++r))>>18),l(128|c>>12&63),l(128|c>>6&63),l(128|63&c)):(l(224|c>>12),l(128|c>>6&63),l(128|63&c))}return Mt(o,0,a)}function Lh(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(kh)return kh.decode(e);var i=l0(e),o=i[0];return i[1].length&&W(8),o}function dI(e,t,n){n||(n=t,t={}),"function"!=typeof n&&W(7);var r={};Ch(e,"",r,t);var i=Object.keys(r),o=i.length,a=0,l=0,u=o,c=new Array(o),h=[],d=s((function(){for(var e=0;e<h.length;++e)h[e]()}),"tAll"),p=s((function(e,t){Wu((function(){n(e,t)}))}),"cbd");Wu((function(){p=n}));var f=s((function(){var e=new ee(l+22),t=a,n=l-a;l=0;for(var r=0;r<u;++r){var i=c[r];try{var o=i.c.length;ni(e,l,i,i.f,i.u,o);var s=30+i.f.length+Wn(i.extra),h=l+s;e.set(i.c,h),ni(e,a,i,i.f,i.u,o,l,i.m),a+=16+s+(i.m?i.m.length:0),l=h+o}catch(e){return p(e,null)}}jh(e,a,c.length,n,t),p(null,e)}),"cbf");o||f();for(var g=s((function(e){var t=i[e],n=r[t],u=n[0],g=n[1],v=oi(),y=u.length;v.p(u);var m=$n(t),b=m.length,w=g.comment,_=w&&$n(w),M=_&&_.length,x=Wn(g.extra),I=0==g.level?0:8,S=s((function(n,r){if(n)d(),p(n,null);else{var i=r.length;c[e]=co(g,{size:y,crc:v.d(),c:r,f:m,m:_,u:b!=t.length||_&&w.length!=M,compression:I}),a+=30+b+x+i,l+=76+2*(b+x)+(M||0)+i,--o||f()}}),"cbl");if(b>65535&&S(W(11,0,1),null),I)if(y<16e4)try{S(null,po(u,g))}catch(e){S(e,null)}else h.push(n0(u,g,S));else S(null,u)}),"_loop_1"),v=0;v<u;++v)g(v);return d}function pI(e,t){t||(t={});var n={},r=[];Ch(e,"",n,t);var i=0,o=0;for(var s in n){var a=n[s],l=a[0],u=a[1],c=0==u.level?0:8,h=(x=$n(s)).length,d=u.comment,p=d&&$n(d),f=p&&p.length,g=Wn(u.extra);h>65535&&W(11);var v=c?po(l,u):l,y=v.length,m=oi();m.p(l),r.push(co(u,{size:l.length,crc:m.d(),c:v,f:x,m:p,u:h!=s.length||p&&d.length!=f,o:i,compression:c})),i+=30+h+g+y,o+=76+2*(h+g)+(f||0)+y}for(var b=new ee(o+22),w=i,_=o-i,M=0;M<r.length;++M){var x=r[M];ni(b,x.o,x,x.f,x.u,x.c.length);var I=30+x.f.length+Wn(x.extra);b.set(x.c,x.o+I),ni(b,i,x,x.f,x.u,x.c.length,x.o,x.m),i+=16+I+(x.m?x.m.length:0)}return jh(b,i,r.length,_,w),b}function gI(e,t,n){n||(n=t,t={}),"function"!=typeof n&&W(7);var r=[],i=s((function(){for(var e=0;e<r.length;++e)r[e]()}),"tAll"),o={},a=s((function(e,t){Wu((function(){n(e,t)}))}),"cbd");Wu((function(){a=n}));for(var l=e.length-22;101010256!=Ae(e,l);--l)if(!l||e.length-l>65558)return a(W(13,0,1),null),i;var u=nt(e,l+8);if(u){var c=u,h=Ae(e,l+16),d=4294967295==h;if(d){if(l=Ae(e,l-12),101075792!=Ae(e,l))return a(W(13,0,1),null),i;c=u=Ae(e,l+32),h=Ae(e,l+48)}for(var p=t&&t.filter,f=s((function(t){var n=p0(e,h,d),l=n[0],c=n[1],f=n[2],g=n[3],v=n[4],y=n[5],m=d0(e,y);h=v;var b=s((function(e,t){e?(i(),a(e,null)):(t&&(o[g]=t),--u||a(null,o))}),"cbl");if(!p||p({name:g,size:c,originalSize:f,compression:l}))if(l)if(8==l){var w=e.subarray(m,m+c);if(c<32e4)try{b(null,di(w,new ee(f)))}catch(e){b(e,null)}else r.push(Ah(w,{size:f},b))}else b(W(14,"unknown compression type "+l,1),null);else b(null,Mt(e,m,m+c));else b(null,null)}),"_loop_3"),g=0;g<c;++g)f(g)}else a(null,{});return i}function vI(e,t){for(var n={},r=e.length-22;101010256!=Ae(e,r);--r)(!r||e.length-r>65558)&&W(13);var i=nt(e,r+8);if(!i)return{};var o=Ae(e,r+16),s=4294967295==o;s&&(r=Ae(e,r-12),101075792!=Ae(e,r)&&W(13),i=Ae(e,r+32),o=Ae(e,r+48));for(var a=t&&t.filter,l=0;l<i;++l){var u=p0(e,o,s),c=u[0],h=u[1],d=u[2],p=u[3],f=u[4],g=u[5],v=d0(e,g);o=f,(!a||a({name:p,size:h,originalSize:d,compression:c}))&&(c?8==c?n[p]=di(e.subarray(v,v+h),new ee(d)):W(14,"unknown compression type "+c):n[p]=Mt(e,v,v+h))}return n}ww(Nh,{AsyncCompress:()=>QP,AsyncDecompress:()=>rI,AsyncDeflate:()=>t0,AsyncGunzip:()=>r0,AsyncGzip:()=>QP,AsyncInflate:()=>Sh,AsyncUnzipInflate:()=>hI,AsyncUnzlib:()=>a0,AsyncZipDeflate:()=>lI,AsyncZlib:()=>tI,Compress:()=>vh,DecodeUTF8:()=>oI,Decompress:()=>s0,Deflate:()=>nn,EncodeUTF8:()=>sI,FlateErrorCode:()=>JP,Gunzip:()=>qu,Gzip:()=>vh,Inflate:()=>ot,Unzip:()=>mI,UnzipInflate:()=>fI,UnzipPassThrough:()=>h0,Unzlib:()=>Uu,Zip:()=>cI,ZipDeflate:()=>uI,ZipPassThrough:()=>so,Zlib:()=>bh,compress:()=>eI,compressSync:()=>yh,decompress:()=>iI,decompressSync:()=>aI,deflate:()=>n0,deflateSync:()=>po,gunzip:()=>i0,gunzipSync:()=>Gu,gzip:()=>eI,gzipSync:()=>yh,inflate:()=>Ah,inflateSync:()=>di,strFromU8:()=>Lh,strToU8:()=>$n,unzip:()=>gI,unzipSync:()=>vI,unzlib:()=>o0,unzlibSync:()=>Yu,zip:()=>dI,zipSync:()=>pI,zlib:()=>nI,zlibSync:()=>wh});var Lb,KP,ee,$e,ri,ii,ai,ao,Fb,Db,_h,zu,Rb,zb,hh,oo,kn,_t,Mn,ti,se,Bb,Vb,qb,Gb,Fu,kt,Du,uo,Mt,JP,Ub,W,lo,tn,Qr,Ru,Bu,mh,ei,Vu,gh,Yb,_n,Wb,$b,oi,Mh,kr,co,jb,Nu,ZP,Hb,si,ui,Xb,Kb,Jb,Zb,Hn,xh,li,xt,ci,nt,Ae,fh,ue,Eh,Th,Qb,Ph,Ih,e0,nn,t0,ot,Sh,vh,QP,qu,r0,bh,tI,Uu,a0,s0,rI,Ch,Nb,kh,u0,l0,oI,sI,c0,d0,p0,f0,Wn,ni,jh,so,uI,lI,cI,h0,fI,hI,mI,Wu,Fh=wm((()=>{for(v(),Lb={},KP=s((function(e,t,n,r,i){var o=new Worker(Lb[t]||(Lb[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],i(r,null)}else i(null,t)},o.postMessage(n,r),o}),"wk"),ee=Uint8Array,$e=Uint16Array,ri=Uint32Array,ii=new ee([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ai=new ee([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ao=new ee([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Fb=s((function(e,t){for(var n=new $e(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new ri(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return[n,i]}),"freb"),Db=Fb(ii,2),_h=Db[0],zu=Db[1],_h[28]=258,zu[258]=28,Rb=Fb(ai,0),zb=Rb[0],hh=Rb[1],oo=new $e(32768),se=0;se<32768;++se)kn=(61680&(kn=(52428&(kn=(43690&se)>>>1|(21845&se)<<1))>>>2|(13107&kn)<<2))>>>4|(3855&kn)<<4,oo[se]=((65280&kn)>>>8|(255&kn)<<8)>>>1;for(_t=s((function(e,t,n){for(var r=e.length,i=0,o=new $e(t);i<r;++i)e[i]&&++o[e[i]-1];var s,a=new $e(t);for(i=0;i<t;++i)a[i]=a[i-1]+o[i-1]<<1;if(n){s=new $e(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var u=i<<4|e[i],c=t-e[i],h=a[e[i]-1]++<<c,d=h|(1<<c)-1;h<=d;++h)s[oo[h]>>>l]=u}else for(s=new $e(r),i=0;i<r;++i)e[i]&&(s[i]=oo[a[e[i]-1]++]>>>15-e[i]);return s}),"hMap"),Mn=new ee(288),se=0;se<144;++se)Mn[se]=8;for(se=144;se<256;++se)Mn[se]=9;for(se=256;se<280;++se)Mn[se]=7;for(se=280;se<288;++se)Mn[se]=8;for(ti=new ee(32),se=0;se<32;++se)ti[se]=5;Bb=_t(Mn,9,0),Vb=_t(Mn,9,1),qb=_t(ti,5,0),Gb=_t(ti,5,1),Fu=s((function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t}),"max"),kt=s((function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n}),"bits"),Du=s((function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)}),"bits16"),uo=s((function(e){return(e+7)/8|0}),"shft"),Mt=s((function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(2==e.BYTES_PER_ELEMENT?$e:4==e.BYTES_PER_ELEMENT?ri:ee)(n-t);return r.set(e.subarray(t,n)),r}),"slc"),JP={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Ub=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],W=s((function(e,t,n){var r=new Error(t||Ub[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,W),!n)throw r;return r}),"err"),lo=s((function(e,t,n){var r=e.length;if(!r||n&&n.f&&!n.l)return t||new ee(0);var i=!t||n,o=!n||n.i;n||(n={}),t||(t=new ee(3*r));var a=s((function(e){var n=t.length;if(e>n){var r=new ee(Math.max(2*n,e));r.set(t),t=r}}),"cbuf"),l=n.f||0,u=n.p||0,c=n.b||0,h=n.l,d=n.d,p=n.m,f=n.n,g=8*r;do{if(!h){l=kt(e,u,1);var v=kt(e,u+1,3);if(u+=3,!v){var y=e[(E=uo(u)+4)-4]|e[E-3]<<8,m=E+y;if(m>r){o&&W(0);break}i&&a(c+y),t.set(e.subarray(E,m),c),n.b=c+=y,n.p=u=8*m,n.f=l;continue}if(1==v)h=Vb,d=Gb,p=9,f=5;else if(2==v){var b=kt(e,u,31)+257,w=kt(e,u+10,15)+4,_=b+kt(e,u+5,31)+1;u+=14;for(var M=new ee(_),x=new ee(19),I=0;I<w;++I)x[ao[I]]=kt(e,u+3*I,7);u+=3*w;var S=Fu(x),k=(1<<S)-1,O=_t(x,S,1);for(I=0;I<_;){var E,P=O[kt(e,u,k)];if(u+=15&P,(E=P>>>4)<16)M[I++]=E;else{var A=0,C=0;for(16==E?(C=3+kt(e,u,3),u+=2,A=M[I-1]):17==E?(C=3+kt(e,u,7),u+=3):18==E&&(C=11+kt(e,u,127),u+=7);C--;)M[I++]=A}}var F=M.subarray(0,b),T=M.subarray(b);p=Fu(F),f=Fu(T),h=_t(F,p,1),d=_t(T,f,1)}else W(1);if(u>g){o&&W(0);break}}i&&a(c+131072);for(var L=(1<<p)-1,N=(1<<f)-1,j=u;;j=u){var R=(A=h[Du(e,u)&L])>>>4;if((u+=15&A)>g){o&&W(0);break}if(A||W(2),R<256)t[c++]=R;else{if(256==R){j=u,h=null;break}var B=R-254;if(R>264){var D=ii[I=R-257];B=kt(e,u,(1<<D)-1)+_h[I],u+=D}var z=d[Du(e,u)&N],U=z>>>4;z||W(3),u+=15&z;T=zb[U];if(U>3){D=ai[U];T+=Du(e,u)&(1<<D)-1,u+=D}if(u>g){o&&W(0);break}i&&a(c+131072);for(var V=c+B;c<V;c+=4)t[c]=t[c-T],t[c+1]=t[c+1-T],t[c+2]=t[c+2-T],t[c+3]=t[c+3-T];c=V}}n.l=h,n.p=j,n.b=c,n.f=l,h&&(l=1,n.m=p,n.d=d,n.n=f)}while(!l);return c==t.length?t:Mt(t,0,c)}),"inflt"),tn=s((function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8}),"wbits"),Qr=s((function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16}),"wbits16"),Ru=s((function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[_n,0];if(1==i){var s=new ee(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var a=n[0],l=n[1],u=0,c=1,h=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=n[n[u].f<n[h].f?u++:h++],l=n[u!=c&&n[u].f<n[h].f?u++:h++],n[c++]={s:-1,f:a.f+l.f,l:a,r:l};var d=o[0].s;for(r=1;r<i;++r)o[r].s>d&&(d=o[r].s);var p=new $e(d+1),f=Bu(n[c-1],p,0);if(f>t){r=0;var g=0,v=f-t,y=1<<v;for(o.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));r<i;++r){var m=o[r].s;if(!(p[m]>t))break;g+=y-(1<<f-p[m]),p[m]=t}for(g>>>=v;g>0;){var b=o[r].s;p[b]<t?g-=1<<t-p[b]++-1:++r}for(;r>=0&&g;--r){var w=o[r].s;p[w]==t&&(--p[w],++g)}f=t}return[new ee(p),f]}),"hTree"),Bu=s((function(e,t,n){return-1==e.s?Math.max(Bu(e.l,t,n+1),Bu(e.r,t,n+1)):t[e.s]=n}),"ln"),mh=s((function(e){for(var t=e.length;t&&!e[--t];);for(var n=new $e(++t),r=0,i=e[0],o=1,a=s((function(e){n[r++]=e}),"w"),l=1;l<=t;++l)if(e[l]==i&&l!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(i),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(i);o=1,i=e[l]}return[n.subarray(0,r),t]}),"lc"),ei=s((function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n}),"clen"),Vu=s((function(e,t,n){var r=n.length,i=uo(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)}),"wfblk"),gh=s((function(e,t,n,r,i,o,s,a,l,u,c){tn(t,c++,n),++i[256];for(var h=Ru(i,15),d=h[0],p=h[1],f=Ru(o,15),g=f[0],v=f[1],y=mh(d),m=y[0],b=y[1],w=mh(g),_=w[0],M=w[1],x=new $e(19),I=0;I<m.length;++I)x[31&m[I]]++;for(I=0;I<_.length;++I)x[31&_[I]]++;for(var S=Ru(x,7),k=S[0],O=S[1],E=19;E>4&&!k[ao[E-1]];--E);var P,A,C,F,T=u+5<<3,L=ei(i,Mn)+ei(o,ti)+s,N=ei(i,d)+ei(o,g)+s+14+3*E+ei(x,k)+(2*x[16]+3*x[17]+7*x[18]);if(T<=L&&T<=N)return Vu(t,c,e.subarray(l,l+u));if(tn(t,c,1+(N<L)),c+=2,N<L){P=_t(d,p,0),A=d,C=_t(g,v,0),F=g;var j=_t(k,O,0);tn(t,c,b-257),tn(t,c+5,M-1),tn(t,c+10,E-4),c+=14;for(I=0;I<E;++I)tn(t,c+3*I,k[ao[I]]);c+=3*E;for(var R=[m,_],B=0;B<2;++B){var D=R[B];for(I=0;I<D.length;++I){var z=31&D[I];tn(t,c,j[z]),c+=k[z],z>15&&(tn(t,c,D[I]>>>5&127),c+=D[I]>>>12)}}}else P=Bb,A=Mn,C=qb,F=ti;for(I=0;I<a;++I)if(r[I]>255){z=r[I]>>>18&31;Qr(t,c,P[z+257]),c+=A[z+257],z>7&&(tn(t,c,r[I]>>>23&31),c+=ii[z]);var U=31&r[I];Qr(t,c,C[U]),c+=F[U],U>3&&(Qr(t,c,r[I]>>>5&8191),c+=ai[U])}else Qr(t,c,P[r[I]]),c+=A[r[I]];return Qr(t,c,P[256]),c+A[256]}),"wblk"),Yb=new ri([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),_n=new ee(0),Wb=s((function(e,t,n,r,i,o){var a=e.length,l=new ee(r+a+5*(1+Math.ceil(a/7e3))+i),u=l.subarray(r,l.length-i),c=0;if(!t||a<8)for(var h=0;h<=a;h+=65535){var d=h+65535;d>=a&&(u[c>>3]=o),c=Vu(u,c+1,e.subarray(h,d))}else{for(var p=Yb[t-1],f=p>>>13,g=8191&p,v=(1<<n)-1,y=new $e(32768),m=new $e(v+1),b=Math.ceil(n/3),w=2*b,_=s((function(t){return(e[t]^e[t+1]<<b^e[t+2]<<w)&v}),"hsh"),M=new ri(25e3),x=new $e(288),I=new $e(32),S=0,k=0,O=(h=0,0),E=0,P=0;h<a;++h){var A=_(h),C=32767&h,F=m[A];if(y[C]=F,m[A]=C,E<=h){var T=a-h;if((S>7e3||O>24576)&&T>423){c=gh(e,u,0,M,x,I,k,O,P,h-P,c),O=S=k=0,P=h;for(var L=0;L<286;++L)x[L]=0;for(L=0;L<30;++L)I[L]=0}var N=2,j=0,R=g,B=C-F&32767;if(T>2&&A==_(h-B))for(var D=Math.min(f,T)-1,z=Math.min(32767,h),U=Math.min(258,T);B<=z&&--R&&C!=F;){if(e[h+N]==e[h+N-B]){for(var W=0;W<U&&e[h+W]==e[h+W-B];++W);if(W>N){if(N=W,j=B,W>D)break;var V=Math.min(B,W-2),q=0;for(L=0;L<V;++L){var G=h-B+L+32768&32767,Y=G-y[G]+32768&32767;Y>q&&(q=Y,F=G)}}}B+=(C=F)-(F=y[C])+32768&32767}if(j){M[O++]=268435456|zu[N]<<18|hh[j];var J=31&zu[N],X=31&hh[j];k+=ii[J]+ai[X],++x[257+J],++I[X],E=h+N,++S}else M[O++]=e[h],++x[e[h]]}}c=gh(e,u,o,M,x,I,k,O,P,h-P,c),!o&&7&c&&(c=Vu(u,c+1,_n))}return Mt(l,0,r+uo(c)+i)}),"dflt"),$b=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),oi=s((function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=$b[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}}),"crc"),Mh=s((function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=0|n.length,s=0;s!=o;){for(var a=Math.min(s+2655,o);s<a;++s)i+=r+=n[s];r=(65535&r)+15*(r>>16),i=(65535&i)+15*(i>>16)}e=r,t=i},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}),"adler"),kr=s((function(e,t,n,r,i){return Wb(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!i)}),"dopt"),co=s((function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}),"mrg"),jb=s((function(e,t,n){for(var r=e(),i=e.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),s=0;s<r.length;++s){var a=r[s],l=o[s];if("function"==typeof a){t+=";"+l+"=";var u=a.toString();if(a.prototype)if(-1!=u.indexOf("[native code]")){var c=u.indexOf(" ",8)+1;t+=u.slice(c,u.indexOf("(",c))}else for(var h in t+=u,a.prototype)t+=";"+l+".prototype."+h+"="+a.prototype[h].toString();else t+=u}else n[l]=a}return[t,n]}),"wcln"),Nu=[],ZP=s((function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}),"cbfs"),Hb=s((function(e,t,n,r){var i;if(!Nu[n]){for(var o="",s={},a=e.length-1,l=0;l<a;++l)o=(i=jb(e[l],o,s))[0],s=i[1];Nu[n]=jb(e[a],o,s)}var u=co({},Nu[n][1]);return KP(Nu[n][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,u,ZP(u),r)}),"wrkr"),si=s((function(){return[ee,$e,ri,ii,ai,ao,_h,zb,Vb,Gb,oo,Ub,_t,Fu,kt,Du,uo,Mt,W,lo,di,Hn,xh]}),"bInflt"),ui=s((function(){return[ee,$e,ri,ii,ai,ao,zu,hh,Bb,Mn,qb,ti,oo,Yb,_n,_t,tn,Qr,Ru,Bu,mh,ei,Vu,gh,uo,Mt,Wb,kr,po,Hn]}),"bDflt"),Xb=s((function(){return[Eh,Ph,ue,oi,$b]}),"gze"),Kb=s((function(){return[Th,Qb]}),"guze"),Jb=s((function(){return[Ih,ue,Mh]}),"zle"),Zb=s((function(){return[e0]}),"zule"),Hn=s((function(e){return postMessage(e,[e.buffer])}),"pbf"),xh=s((function(e){return e&&e.size&&new ee(e.size)}),"gu8"),li=s((function(e,t,n,r,i,o){var s=Hb(n,r,i,(function(e,t){s.terminate(),o(e,t)}));return s.postMessage([e,t],t.consume?[e.buffer]:[]),function(){s.terminate()}}),"cbify"),xt=s((function(e){return e.ondata=function(e,t){return postMessage([e,t],[e.buffer])},function(t){return e.push(t.data[0],t.data[1])}}),"astrm"),ci=s((function(e,t,n,r,i){var o,s=Hb(e,r,i,(function(e,n){e?(s.terminate(),t.ondata.call(t,e)):(n[1]&&s.terminate(),t.ondata.call(t,e,n[0],n[1]))}));s.postMessage(n),t.push=function(e,n){t.ondata||W(5),o&&t.ondata(W(4,0,1),null,!!n),s.postMessage([e,o=n],[e.buffer])},t.terminate=function(){s.terminate()}}),"astrmify"),nt=s((function(e,t){return e[t]|e[t+1]<<8}),"b2"),Ae=s((function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}),"b4"),fh=s((function(e,t){return Ae(e,t)+4294967296*Ae(e,t+4)}),"b8"),ue=s((function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}),"wbytes"),Eh=s((function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&ue(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}}),"gzh"),Th=s((function(e){(31!=e[0]||139!=e[1]||8!=e[2])&&W(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=e[10]|2+(e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)}),"gzs"),Qb=s((function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}),"gzl"),Ph=s((function(e){return 10+(e.filename&&e.filename.length+1||0)}),"gzhl"),Ih=s((function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=r<<6|(r?32-2*r:1)}),"zlh"),e0=s((function(e){(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)&&W(6,"invalid zlib data"),32&e[1]&&W(6,"invalid zlib data: preset dictionaries not supported")}),"zlv"),s(Oh,"AsyncCmpStrm"),nn=function(){function e(e,t){!t&&"function"==typeof e&&(t=e,e={}),this.ondata=t,this.o=e||{}}return s(e,"Deflate"),e.prototype.p=function(e,t){this.ondata(kr(e,this.o,0,0,!t),t)},e.prototype.push=function(e,t){this.ondata||W(5),this.d&&W(4),this.d=t,this.p(e,t||!1)},e}(),t0=function(){function e(e,t){ci([ui,function(){return[xt,nn]}],this,Oh.call(this,e,t),(function(e){var t=new nn(e.data);onmessage=xt(t)}),6)}return s(e,"AsyncDeflate"),e}(),s(n0,"deflate"),s(po,"deflateSync"),ot=function(){function e(e){this.s={},this.p=new ee(0),this.ondata=e}return s(e,"Inflate"),e.prototype.e=function(e){this.ondata||W(5),this.d&&W(4);var t=this.p.length,n=new ee(t+e.length);n.set(this.p),n.set(e,t),this.p=n},e.prototype.c=function(e){this.d=this.s.i=e||!1;var t=this.s.b,n=lo(this.p,this.o,this.s);this.ondata(Mt(n,t,this.s.b),this.d),this.o=Mt(n,this.s.b-32768),this.s.b=this.o.length,this.p=Mt(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}(),Sh=function(){function e(e){this.ondata=e,ci([si,function(){return[xt,ot]}],this,0,(function(){var e=new ot;onmessage=xt(e)}),7)}return s(e,"AsyncInflate"),e}(),s(Ah,"inflate"),s(di,"inflateSync"),vh=function(){function e(e,t){this.c=oi(),this.l=0,this.v=1,nn.call(this,e,t)}return s(e,"Gzip"),e.prototype.push=function(e,t){nn.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e),this.l+=e.length;var n=kr(e,this.o,this.v&&Ph(this.o),t&&8,!t);this.v&&(Eh(n,this.o),this.v=0),t&&(ue(n,n.length-8,this.c.d()),ue(n,n.length-4,this.l)),this.ondata(n,t)},e}(),QP=function(){function e(e,t){ci([ui,Xb,function(){return[xt,nn,vh]}],this,Oh.call(this,e,t),(function(e){var t=new vh(e.data);onmessage=xt(t)}),8)}return s(e,"AsyncGzip"),e}(),s(eI,"gzip"),s(yh,"gzipSync"),qu=function(){function e(e){this.v=1,ot.call(this,e)}return s(e,"Gunzip"),e.prototype.push=function(e,t){if(ot.prototype.e.call(this,e),this.v){var n=this.p.length>3?Th(this.p):4;if(n>=this.p.length&&!t)return;this.p=this.p.subarray(n),this.v=0}t&&(this.p.length<8&&W(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),ot.prototype.c.call(this,t)},e}(),r0=function(){function e(e){this.ondata=e,ci([si,Kb,function(){return[xt,ot,qu]}],this,0,(function(){var e=new qu;onmessage=xt(e)}),9)}return s(e,"AsyncGunzip"),e}(),s(i0,"gunzip"),s(Gu,"gunzipSync"),bh=function(){function e(e,t){this.c=Mh(),this.v=1,nn.call(this,e,t)}return s(e,"Zlib"),e.prototype.push=function(e,t){nn.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e);var n=kr(e,this.o,this.v&&2,t&&4,!t);this.v&&(Ih(n,this.o),this.v=0),t&&ue(n,n.length-4,this.c.d()),this.ondata(n,t)},e}(),tI=function(){function e(e,t){ci([ui,Jb,function(){return[xt,nn,bh]}],this,Oh.call(this,e,t),(function(e){var t=new bh(e.data);onmessage=xt(t)}),10)}return s(e,"AsyncZlib"),e}(),s(nI,"zlib"),s(wh,"zlibSync"),Uu=function(){function e(e){this.v=1,ot.call(this,e)}return s(e,"Unzlib"),e.prototype.push=function(e,t){if(ot.prototype.e.call(this,e),this.v){if(this.p.length<2&&!t)return;this.p=this.p.subarray(2),this.v=0}t&&(this.p.length<4&&W(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),ot.prototype.c.call(this,t)},e}(),a0=function(){function e(e){this.ondata=e,ci([si,Zb,function(){return[xt,ot,Uu]}],this,0,(function(){var e=new Uu;onmessage=xt(e)}),11)}return s(e,"AsyncUnzlib"),e}(),s(o0,"unzlib"),s(Yu,"unzlibSync"),s0=function(){function e(e){this.G=qu,this.I=ot,this.Z=Uu,this.ondata=e}return s(e,"Decompress"),e.prototype.push=function(e,t){if(this.ondata||W(5),this.s)this.s.push(e,t);else{if(this.p&&this.p.length){var n=new ee(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length)}else this.p=e;if(this.p.length>2){var r=this,i=s((function(){r.ondata.apply(r,arguments)}),"cb");this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(i):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(i):new this.Z(i),this.s.push(this.p,t),this.p=null}}},e}(),rI=function(){function e(e){this.G=r0,this.I=Sh,this.Z=a0,this.ondata=e}return s(e,"AsyncDecompress"),e.prototype.push=function(e,t){s0.prototype.push.call(this,e,t)},e}(),s(iI,"decompress"),s(aI,"decompressSync"),Ch=s((function(e,t,n,r){for(var i in e){var o=e[i],s=t+i,a=r;Array.isArray(o)&&(a=co(r,o[1]),o=o[0]),o instanceof ee?n[s]=[o,a]:(n[s+="/"]=[new ee(0),a],Ch(o,s,n,r))}}),"fltn"),Nb=typeof TextEncoder<"u"&&new TextEncoder,kh=typeof TextDecoder<"u"&&new TextDecoder,u0=0;try{kh.decode(_n,{stream:!0}),u0=1}catch{}l0=s((function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return[t,Mt(e,n-1)];i?3==i?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&i?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}}),"dutf8"),oI=function(){function e(e){this.ondata=e,u0?this.t=new TextDecoder:this.p=_n}return s(e,"DecodeUTF8"),e.prototype.push=function(e,t){if(this.ondata||W(5),t=!!t,this.t)return this.ondata(this.t.decode(e,{stream:!0}),t),void(t&&(this.t.decode().length&&W(8),this.t=null));this.p||W(4);var n=new ee(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length);var r=l0(n),i=r[0],o=r[1];t?(o.length&&W(8),this.p=null):this.p=o,this.ondata(i,t)},e}(),sI=function(){function e(e){this.ondata=e}return s(e,"EncodeUTF8"),e.prototype.push=function(e,t){this.ondata||W(5),this.d&&W(4),this.ondata($n(e),this.d=t||!1)},e}(),s($n,"strToU8"),s(Lh,"strFromU8"),c0=s((function(e){return 1==e?3:e<6?2:9==e?1:0}),"dbf"),d0=s((function(e,t){return t+30+nt(e,t+26)+nt(e,t+28)}),"slzh"),p0=s((function(e,t,n){var r=nt(e,t+28),i=Lh(e.subarray(t+46,t+46+r),!(2048&nt(e,t+8))),o=t+46+r,s=Ae(e,t+20),a=n&&4294967295==s?f0(e,o):[s,Ae(e,t+24),Ae(e,t+42)],l=a[0],u=a[1],c=a[2];return[nt(e,t+10),l,u,i,o+nt(e,t+30)+nt(e,t+32),c]}),"zh"),f0=s((function(e,t){for(;1!=nt(e,t);t+=4+nt(e,t+2));return[fh(e,t+12),fh(e,t+4),fh(e,t+20)]}),"z64e"),Wn=s((function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&W(9),t+=r+4}return t}),"exfl"),ni=s((function(e,t,n,r,i,o,s,a){var l=r.length,u=n.extra,c=a&&a.length,h=Wn(u);ue(e,t,null!=s?33639248:67324752),t+=4,null!=s&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(null==o&&8),e[t++]=i&&8,e[t++]=255&n.compression,e[t++]=n.compression>>8;var d=new Date(null==n.mtime?Date.now():n.mtime),p=d.getFullYear()-1980;if((p<0||p>119)&&W(10),ue(e,t,p<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>>1),t+=4,null!=o&&(ue(e,t,n.crc),ue(e,t+4,o),ue(e,t+8,n.size)),ue(e,t+12,l),ue(e,t+14,h),t+=16,null!=s&&(ue(e,t,c),ue(e,t+6,n.attrs),ue(e,t+10,s),t+=14),e.set(r,t),t+=l,h)for(var f in u){var g=u[f],v=g.length;ue(e,t,+f),ue(e,t+2,v),e.set(g,t+4),t+=4+v}return c&&(e.set(a,t),t+=c),t}),"wzh"),jh=s((function(e,t,n,r,i){ue(e,t,101010256),ue(e,t+8,n),ue(e,t+10,n),ue(e,t+12,r),ue(e,t+16,i)}),"wzf"),so=function(){function e(e){this.filename=e,this.c=oi(),this.size=0,this.compression=0}return s(e,"ZipPassThrough"),e.prototype.process=function(e,t){this.ondata(null,e,t)},e.prototype.push=function(e,t){this.ondata||W(5),this.c.p(e),this.size+=e.length,t&&(this.crc=this.c.d()),this.process(e,t||!1)},e}(),uI=function(){function e(e,t){var n=this;t||(t={}),so.call(this,e),this.d=new nn(t,(function(e,t){n.ondata(null,e,t)})),this.compression=8,this.flag=c0(t.level)}return s(e,"ZipDeflate"),e.prototype.process=function(e,t){try{this.d.push(e,t)}catch(e){this.ondata(e,null,t)}},e.prototype.push=function(e,t){so.prototype.push.call(this,e,t)},e}(),lI=function(){function e(e,t){var n=this;t||(t={}),so.call(this,e),this.d=new t0(t,(function(e,t,r){n.ondata(e,t,r)})),this.compression=8,this.flag=c0(t.level),this.terminate=this.d.terminate}return s(e,"AsyncZipDeflate"),e.prototype.process=function(e,t){this.d.push(e,t)},e.prototype.push=function(e,t){so.prototype.push.call(this,e,t)},e}(),cI=function(){function e(e){this.ondata=e,this.u=[],this.d=1}return s(e,"Zip"),e.prototype.add=function(e){var t=this;if(this.ondata||W(5),2&this.d)this.ondata(W(4+8*(1&this.d),0,1),null,!1);else{var n=$n(e.filename),r=n.length,i=e.comment,o=i&&$n(i),a=r!=e.filename.length||o&&i.length!=o.length,l=r+Wn(e.extra)+30;r>65535&&this.ondata(W(11,0,1),null,!1);var u=new ee(l);ni(u,0,e,n,a);var c=[u],h=s((function(){for(var e=0,n=c;e<n.length;e++){var r=n[e];t.ondata(null,r,!1)}c=[]}),"pAll_1"),d=this.d;this.d=0;var p=this.u.length,f=co(e,{f:n,u:a,o:o,t:function(){e.terminate&&e.terminate()},r:function(){if(h(),d){var e=t.u[p+1];e?e.r():t.d=1}d=1}}),g=0;e.ondata=function(n,r,i){if(n)t.ondata(n,r,i),t.terminate();else if(g+=r.length,c.push(r),i){var o=new ee(16);ue(o,0,134695760),ue(o,4,e.crc),ue(o,8,g),ue(o,12,e.size),c.push(o),f.c=g,f.b=l+g+16,f.crc=e.crc,f.size=e.size,d&&f.r(),d=1}else d&&h()},this.u.push(f)}},e.prototype.end=function(){var e=this;2&this.d?this.ondata(W(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&e.d&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3)},e.prototype.e=function(){for(var e=0,t=0,n=0,r=0,i=this.u;r<i.length;r++){n+=46+(l=i[r]).f.length+Wn(l.extra)+(l.o?l.o.length:0)}for(var o=new ee(n+22),s=0,a=this.u;s<a.length;s++){var l=a[s];ni(o,e,l,l.f,l.u,l.c,t,l.o),e+=46+l.f.length+Wn(l.extra)+(l.o?l.o.length:0),t+=l.b}jh(o,e,this.u.length,n,t),this.ondata(null,o,!0),this.d=2},e.prototype.terminate=function(){for(var e=0,t=this.u;e<t.length;e++){t[e].t()}this.d=2},e}(),s(dI,"zip"),s(pI,"zipSync"),h0=function(){function e(){}return s(e,"UnzipPassThrough"),e.prototype.push=function(e,t){this.ondata(null,e,t)},e.compression=0,e}(),fI=function(){function e(){var e=this;this.i=new ot((function(t,n){e.ondata(null,t,n)}))}return s(e,"UnzipInflate"),e.prototype.push=function(e,t){try{this.i.push(e,t)}catch(e){this.ondata(e,null,t)}},e.compression=8,e}(),hI=function(){function e(e,t){var n=this;t<32e4?this.i=new ot((function(e,t){n.ondata(null,e,t)})):(this.i=new Sh((function(e,t,r){n.ondata(e,t,r)})),this.terminate=this.i.terminate)}return s(e,"AsyncUnzipInflate"),e.prototype.push=function(e,t){this.i.terminate&&(e=Mt(e,0)),this.i.push(e,t)},e.compression=8,e}(),mI=function(){function e(e){this.onfile=e,this.k=[],this.o={0:h0},this.p=_n}return s(e,"Unzip"),e.prototype.push=function(e,t){var n=this;if(this.onfile||W(5),this.p||W(4),this.c>0){var r=Math.min(this.c,e.length),i=e.subarray(0,r);if(this.c-=r,this.d?this.d.push(i,!this.c):this.k[0].push(i),(e=e.subarray(r)).length)return this.push(e,t)}else{var o=0,a=0,l=void 0,u=void 0;this.p.length?e.length?((u=new ee(this.p.length+e.length)).set(this.p),u.set(e,this.p.length)):u=this.p:u=e;for(var c=u.length,h=this.c,d=h&&this.d,p=s((function(){var e,t=Ae(u,a);if(67324752==t){o=1,l=a,f.d=null,f.c=0;var r=nt(u,a+6),i=nt(u,a+8),s=2048&r,d=8&r,p=nt(u,a+26),g=nt(u,a+28);if(c>a+30+p+g){var v=[];f.k.unshift(v),o=2;var y=Ae(u,a+18),m=Ae(u,a+22),b=Lh(u.subarray(a+30,a+=30+p),!s);4294967295==y?(e=d?[-2]:f0(u,a),y=e[0],m=e[1]):d&&(y=-1),a+=g,f.c=y;var w,_={name:b,compression:i,start:function(){if(_.ondata||W(5),y){var e=n.o[i];e||_.ondata(W(14,"unknown compression type "+i,1),null,!1),(w=y<0?new e(b):new e(b,y,m)).ondata=function(e,t,n){_.ondata(e,t,n)};for(var t=0,r=v;t<r.length;t++){var o=r[t];w.push(o,!1)}n.k[0]==v&&n.c?n.d=w:w.push(_n,!0)}else _.ondata(null,_n,!0)},terminate:function(){w&&w.terminate&&w.terminate()}};y>=0&&(_.size=y,_.originalSize=m),f.onfile(_)}return"break"}if(h){if(134695760==t)return l=a+=12+(-2==h&&8),o=3,f.c=0,"break";if(33639248==t)return l=a-=4,o=3,f.c=0,"break"}}),"_loop_2"),f=this;a<c-4;++a){if("break"===p())break}if(this.p=_n,h<0){var g=o?u.subarray(0,l-12-(-2==h&&8)-(134695760==Ae(u,l-16)&&4)):u.subarray(0,a);d?d.push(g,!!o):this.k[+(2==o)].push(g)}if(2&o)return this.push(u.subarray(a),t);this.p=u.subarray(a)}t&&(this.c&&W(13),this.p=null)},e.prototype.register=function(e){this.o[e.compression]=e},e}(),Wu="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()},s(gI,"unzip"),s(vI,"unzipSync")})),I0=Y(((e,t)=>{"use strict";v(),t.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())))})),L0=Y(((e,t)=>{"use strict";v();var n="%[a-f0-9]{2}",r=new RegExp("("+n+")|([^%]+?)","gi"),i=new RegExp("("+n+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function a(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(r)||[],n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(r)||[];return e}}function l(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=i.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{var r=a(n[0]);r!==n[0]&&(t[n[0]]=r)}n=i.exec(e)}t["%C2"]="�";for(var o=Object.keys(t),s=0;s<o.length;s++){var l=o[s];e=e.replace(new RegExp(l,"g"),t[l])}return e}s(o,"decodeComponents"),s(a,"decode"),s(l,"customDecodeURIComponent"),t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return l(e)}}})),N0=Y(((e,t)=>{"use strict";v(),t.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];let n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}})),D0=Y(((e,t)=>{"use strict";v(),t.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var s=r[o],a=e[s];(i?-1!==t.indexOf(s):t(s,a,e))&&(n[s]=a)}return n}})),Y0=Y((e=>{"use strict";v();var t=I0(),n=L0(),r=N0(),i=D0(),o=s((e=>null==e),"isNullOrUndefined"),a=Symbol("encodeFragmentIdentifier");function l(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{let i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[h(t,e),"[",i,"]"].join("")]:[...n,[h(t,e),"[",h(i,e),"]=",h(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[h(t,e),"[]"].join("")]:[...n,[h(t,e),"[]=",h(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[h(n,e),t,h(i,e)].join("")]:[[r,h(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,h(t,e)]:[...n,[h(t,e),"=",h(r,e)].join("")]}}function u(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{let i="string"==typeof n&&n.includes(e.arrayFormatSeparator),o="string"==typeof n&&!i&&d(n,e).includes(e.arrayFormatSeparator);n=o?d(n,e):n;let s=i||o?n.split(e.arrayFormatSeparator).map((t=>d(t,e))):null===n?n:d(n,e);r[t]=s};case"bracket-separator":return(t,n,r)=>{let i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n&&d(n,e));let o=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>d(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],o):r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function h(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function d(e,t){return t.decode?n(e):e}function p(e){return Array.isArray(e)?e.sort():"object"==typeof e?p(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function f(e){let t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function g(e){let t="",n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}function y(e){let t=(e=f(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function m(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())&&(e="true"===e.toLowerCase()),e}function b(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);let n=u(t),i=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return i;for(let o of e.split("&")){if(""===o)continue;let[e,s]=r(t.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:d(s,t),n(d(e,t),s,i)}for(let e of Object.keys(i)){let n=i[e];if("object"==typeof n&&null!==n)for(let e of Object.keys(n))n[e]=m(n[e],t);else i[e]=m(n,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{let n=i[t];return n&&"object"==typeof n&&!Array.isArray(n)?e[t]=p(n):e[t]=n,e}),Object.create(null))}s(l,"encoderForArrayFormat"),s(u,"parserForArrayFormat"),s(c,"validateArrayFormatSeparator"),s(h,"encode"),s(d,"decode"),s(p,"keysSorter"),s(f,"removeHash"),s(g,"getHash"),s(y,"extract"),s(m,"parseValue"),s(b,"parse"),e.extract=y,e.parse=b,e.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let n=s((n=>t.skipNull&&o(e[n])||t.skipEmptyString&&""===e[n]),"shouldFilter"),r=l(t),i={};for(let t of Object.keys(e))n(t)||(i[t]=e[t]);let a=Object.keys(i);return!1!==t.sort&&a.sort(t.sort),a.map((n=>{let i=e[n];return void 0===i?"":null===i?h(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?h(n,t)+"[]":i.reduce(r(n),[]).join("&"):h(n,t)+"="+h(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[n,i]=r(e,"#");return Object.assign({url:n.split("?")[0]||"",query:b(y(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:d(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[a]:!0},n);let r=f(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),s=Object.assign(o,t.query),l=e.stringify(s,n);l&&(l="?".concat(l));let u=g(t.url);return t.fragmentIdentifier&&(u="#".concat(n[a]?h(t.fragmentIdentifier,n):t.fragmentIdentifier)),"".concat(r).concat(l).concat(u)},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[a]:!1},r);let{url:o,query:s,fragmentIdentifier:l}=e.parseUrl(t,r);return e.stringifyUrl({url:o,query:i(s,n),fragmentIdentifier:l},r)},e.exclude=(t,n,r)=>{let i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return e.pick(t,i,r)}}));v();var pw=Rt(km());v(),v(),v();var xg=Rt(_g());v();var jl=class{constructor({origin:e,destination:t,vortex:n,elevationDelta:r=0,distance:i=0,angle:o=0,pathWeight:s=0}){let a,l;if(g(this,"origin"),g(this,"destination"),g(this,"vortex"),g(this,"distance"),g(this,"angle"),g(this,"weight"),this.origin=e,this.destination=t,this.vortex=n,this.distance=i,this.angle=o,n)this.distance=0,this.angle=0,a=void 0!==n.weight&&n.weight>0?n.weight:"elevator"===n.type?2e3:1e3,l=n.multiplier&&n.multiplier>=1?n.multiplier:1,this.weight=r*l+a;else{let e=s||t.weight;a=e&&e>=0?e:0,l=t.multiplier&&t.multiplier>=1?t.multiplier:1,this.weight=this.distance*l+a}if(isNaN(this.angle))throw new Error("nan angle")}};s(jl,"Edge");var Ll=jl,tr=Ll;v();var Mg="mi-debug",ex={logState:"test"===E.env.NODE_ENV?3:0,log(...e){this.logState<=0&&console.log("[MappedInJS]",...e)},warn(...e){this.logState<=1&&console.warn("[MappedInJS]",...e)},error(...e){this.logState<=2&&console.error("[MappedInJS]",...e)},assert(...e){console.assert(...e)},time(e){console.time(e)},timeEnd(e){console.timeEnd(e)}},R=ex;function tx(e){if(e.scale||e.x_scale)return 1/(e.scale||e.x_scale||1);try{if(!e.georeference)throw new Error("map ".concat(e.name||e.shortName||e.id," does not have a georeference field"));if(e.georeference.length<3)throw new Error("map ".concat(e.name||e.shortName||e.id," has less than 3 georeference points, we require at least 3 for proper map scaling"));let t=e.georeference[0],n=e.georeference[2],r=(0,xg.getDistance)({latitude:t.target.x,longitude:t.target.y},{latitude:n.target.x,longitude:n.target.y}),i=t.control.x-n.control.x,o=t.control.y-n.control.y;return Math.sqrt(i*i+o*o)/r}catch(e){return R.error(e),1}}function Cs(e,t){let n=e.x-t.x,r=e.y-t.y;return(Math.atan2(r,n)+2.5*Math.PI)%(2*Math.PI)}s(tx,"getMapScale"),s(Cs,"getAngle");var Dl=class{constructor({nodes:e,vortexes:t,maps:n,showVortexNames:r=!1}){g(this,"edges"),g(this,"nodesById"),g(this,"mapsById"),this.edges={},this.mapsById=n.map((e=>({...e,_scale:tx(e)}))).reduce(((e,t)=>(e[t.id]=t,e)),{});let i=e.filter((e=>!!this.mapsById[e.map])).map((e=>({...e,paths:e.paths?e.paths.filter((({map:t})=>t===e.map)):[]})));this.nodesById=i.reduce(((e,t)=>(e[t.id]=t,e)),{});for(let e in this.nodesById)this.nodesById.hasOwnProperty(e)&&(this.nodesById[e].paths=this.nodesById[e].paths.filter((({node:e})=>!!this.nodesById[e])));let o=t.map((e=>({...e,name:r?e.name:e.type,nodes:e.nodes?e.nodes.filter((e=>!!this.nodesById[e])):[]})));i.forEach((e=>{this.edges[e.id]=e.paths.map((({node:t,weight:n})=>{let r=this.nodesById[t];return new tr({angle:Cs(e,r),destination:r,distance:this.getDistance(e,r),origin:e,pathWeight:n})}))})),o.forEach((e=>{if(null==e.nodes||0===e.nodes.length)return;let t=0;for(;t<e.nodes.length-1;){let n=this.nodesById[e.nodes[t]];if(t++,null==n)continue;let r=t;for(;r<e.nodes.length;){let t=this.nodesById[e.nodes[r]];if(r++,null==t)continue;let i=this.mapsById[n.map].elevation||0,o=this.mapsById[t.map].elevation||0,s=Math.abs(i-o);this.edges[n.id].push(new tr({destination:t,elevationDelta:s,origin:n,vortex:e})),this.edges[t.id].push(new tr({destination:n,elevationDelta:s,origin:t,vortex:e}))}}}))}aStar({originIds:e,destinationNodeIds:t,accessible:n,includedVortexIds:r,excludedVortexIds:i,excludedNodeIds:o}){let s=e.map((e=>this.nodesById[e])).filter((e=>e&&(!o||!o.has(e.id)))),a=t.map((e=>this.nodesById[e])).filter((e=>e&&(!o||!o.has(e.id))));if(0===s.length||0===a.length)return[];let l=[],u={},c={};for(s.forEach((e=>{let t=this.getShortestEuclideanDistance(e,a);l.push({origin:e,priority:t}),u[e.id]=null,c[e.id]=0})),l.sort(((e,t)=>e.priority-t.priority));l.length>0;){let e=l[0];if(a.includes(e.origin)){let t=[],n=u[e.origin.id];for(;null!=n;){t.push(n);let e=u[n.origin.id];n=null!=e?e:null}return t.reverse()}for(let t of this.edges[e.origin.id]){let s=t.vortex&&!1===t.vortex.accessible||!1===t.origin.accessible||!1===t.destination.accessible,h=t.vortex&&(r&&!r.has(t.vortex.id)||i&&i.has(t.vortex.id)),d=o&&o.has(t.destination.id);if(n&&s||h||d)continue;let p=c[e.origin.id]+t.weight;if(null==c[t.destination.id]||p<c[t.destination.id]){c[t.destination.id]=p;let e=p+this.getShortestEuclideanDistance(t.destination,a);l.push({origin:t.destination,priority:e}),u[t.destination.id]=t}}l.splice(0,1),l.sort(((e,t)=>e.priority-t.priority))}return[]}getDistance(e,t){let n,r=e.x-t.x,i=e.y-t.y,o=r*r+i*i;return n=null==this.mapsById[e.map]?1:this.mapsById[e.map]._scale,Math.sqrt(o)/n}getShortestEuclideanDistance(e,t){return t.reduce(((t,n)=>{let r=this.getDistance(e,n);return Math.min(t,r)}),Number.MAX_VALUE)}};s(Dl,"NavigationGraph");var Nl=Dl,Fl=Nl;function nx(e){switch(e){case"down":case"up":return"".concat(e," ");default:return""}}v(),v(),s(nx,"vortexDirectionTest");var zl=class{constructor({origin:e,action:t,distance:n,atLocation:r,instruction:i}){g(this,"node"),g(this,"instruction"),g(this,"action"),g(this,"atLocation"),g(this,"type"),g(this,"distance",0),this.node=e,this.action=t,this.distance=n||0,this.atLocation=r,this.instruction="",i?this.instruction=i:(null!=t&&"Departure"===t.type?this.instruction=null!=r?"Depart from ".concat(r.name):"Depart from current location":null!=t&&"Arrival"===t.type?this.instruction=null!=r?"Arrive at ".concat(r.name):"Arrive at destination":null!=t&&"TakeVortex"===t.type?this.instruction="Take ".concat(r&&r.name," ").concat(nx(t.direction),"to ").concat(t.toMap.name):null!=t&&"ExitVortex"===t.type?this.instruction="Exit ".concat(r&&r.name," at ").concat(t.toMap.name):null!=t&&"bearing"in t&&"Right"===t.bearing?this.instruction="Turn right":null!=t&&"bearing"in t&&"SlightRight"===t.bearing?this.instruction="Turn slightly right":null!=t&&"bearing"in t&&"Straight"===t.bearing?this.instruction="Head straight":null!=t&&"bearing"in t&&"SlightLeft"===t.bearing?this.instruction="Turn slightly left":null!=t&&"bearing"in t&&"Left"===t.bearing&&(this.instruction="Turn left"),null!=t&&"Turn"===t.type&&r&&(this.instruction+=" at ".concat(r.name)))}};s(zl,"Directive");var Rl=zl,An=Rl;function Bl(e,t,n,r){if(!(e&&t&&n&&r))return null;let i=e.x,o=e.y,s=t.x,a=t.y,l=n.x,u=n.y,c=r.x,h=r.y;if(i===s&&o===a||l===c&&u===h)return null;let d=(h-u)*(s-i)-(c-l)*(a-o);if(0===d)return null;let p=((c-l)*(o-u)-(h-u)*(i-l))/d,f=((s-i)*(o-u)-(a-o)*(i-l))/d;return p<0||p>1||f<0||f>1?null:{x:i+p*(s-i),y:o+p*(a-o)}}function Eg(e,t,n){if(e.x===t.x)return[{x:e.x+n,y:e.y},{x:t.x+n,y:t.y}];if(e.y===t.y)return[{x:e.x,y:e.y+n},{x:t.x,y:t.y+n}];let r=-1/((t.y-e.y)/(t.x-e.x)),i=n*Math.sqrt(1/(1+r*r)),o=r*i;return[{x:e.x+i,y:e.y+o},{x:t.x+i,y:t.y+o}]}function Tg(e,t,n=[],r=0){let i=!0;return n.forEach((n=>{if(r>0){let o=Eg(e,t,-r),s=Eg(e,t,r);if(Bl(o[0],o[1],n[0],n[1])||Bl(s[0],s[1],n[0],n[1]))return void(i=!1)}else if(Bl(e,t,n[0],n[1]))return void(i=!1)})),i}v(),s(Bl,"getLineIntersection"),s(Eg,"getOffsetLine"),s(Tg,"hasLineOfSight");var Ls=.1*Math.PI;function js(e,t){return((t-e+Math.PI)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)-Math.PI}s(js,"differenceBetweenAngles");var Gl=class{constructor({locations:e,nodes:t,vortexes:n,maps:r,polygons:i,showVortexNames:o}){g(this,"graph"),g(this,"locationsByNodeId"),g(this,"geometryEdgesByMapId",new Map),this.graph=new Fl({maps:r,nodes:t,showVortexNames:o,vortexes:n}),this.locationsByNodeId=e.reduce(((e,t)=>(t.nodes&&t.nodes.forEach((n=>{e[n.node]=t})),t.polygons&&t.polygons.forEach((n=>{n.entrances&&n.entrances.forEach((n=>{e[n]=t}))})),e)),{}),i&&i.forEach((e=>{if(this.geometryEdgesByMapId.has(e.map)||this.geometryEdgesByMapId.set(e.map,[]),!0===e.isLineStringSegment)for(let t of e.vertexes)for(let n=0;n<t.length;n++)t[n+1]&&this.geometryEdgesByMapId.get(e.map).push([t[n],t[n+1]]);else e.vertexes.forEach(((t,n)=>{e.vertexes[n+1]?this.geometryEdgesByMapId.get(e.map).push([t,e.vertexes[n+1]]):this.geometryEdgesByMapId.get(e.map).push([t,e.vertexes[0]])}))}))}getClosestLocationInRay(e,t=.5*Math.PI,n=10){let r=0,i=0,o=e;for(;Math.abs(r)<t&&i<n;){let e=this.graph.edges[o.destination.id],s=null,a=0;for(let t of e)if(t.distance>0)if(null!=s){let e=-js(o.angle,t.angle);Math.abs(e)<Math.abs(a)&&(s=t,a=e)}else s=t,a=-js(o.angle,t.angle);if(null==s)return null;{if(Math.abs(a)>=t||(r+=a,i+=s.distance,Math.abs(r)>=t||i>n))return null;let e=this.locationsByNodeId[s.destination.id];if(null!=e)return e;o=s}}return null}getDirections({originIds:e,destinationNodeIds:t,accessible:n,departFrom:r,arriveAt:i,includedVortexIds:o,excludedVortexIds:s,excludedNodeIds:a,simplify:l}){var u,c,h;let d=this.graph.aStar({originIds:e,destinationNodeIds:t,accessible:n,includedVortexIds:o,excludedVortexIds:s,excludedNodeIds:a});if(0===d.length)return{distance:0,instructions:[new An({distance:0,instruction:"No Valid Path Available"})],path:[]};let p=0,f=[],g=[];if(null!=l&&l.enabled){let e=null!=(u=null==l?void 0:l.bufferRadius)?u:1.8,t=[d[0]];for(let n=1;n<d.length;n++){if(d[n].origin.map!==d[n-1].origin.map){let r=null!=(c=this.geometryEdgesByMapId.get(d[n-1].origin.map))?c:[];g.push(...this.simplifySteps(t,r,e)),t=[d[n]]}t.push(d[n])}let n=d[d.length-1],r=null!=(h=this.geometryEdgesByMapId.get(n.origin.map))?h:[];g.push(...this.simplifySteps(t,r,e)),d=g}for(let e=0;e<d.length;e++)f.push(d[e].origin);f.push(d[d.length-1].destination);let v=[],y=null,m=null,b=0,w=0;for(let e=0;e<d.length;e++){let t=d[e],n=t.origin,o=t.destination;if(p+=t.distance,b+=(null==m?void 0:m.distance)||0,0===e&&v.push(new An({action:{type:"Departure"},atLocation:r,distance:0,origin:n})),null!=t.vortex){let e=this.graph.mapsById[n.map],r=this.graph.mapsById[o.map],i="none";if(null!=e.elevation&&null!=r.elevation){let t=e.elevation-r.elevation;t>0?i="down":t<0&&(i="up")}v.push(new An({action:{direction:i,fromMap:e,toMap:r,type:"TakeVortex"},atLocation:t.vortex,distance:b,origin:n})),w+=b,b=0}else if(null!=y&&null!=m)if(null!=m.vortex){let e=this.graph.mapsById[y.map],t=this.graph.mapsById[m.destination.map];v.push(new An({action:{fromMap:e,toMap:t,type:"ExitVortex"},atLocation:m.vortex,distance:b,origin:n})),w+=b,b=0}else{let e=this.graph.edges[n.id].filter((e=>e.destination!==y&&e.destination!==t.destination));if(e.length>0){let r=-js(m.angle,t.angle),i=e.reduce(((e,n)=>{let r=-js(t.angle,n.angle);return Math.min(e,Math.abs(r))}),Math.PI);if(Math.abs(r)>=Ls||Math.abs(i)<=Ls){let e;e=r<=-Math.PI/4?"Right":r<=-Ls?"SlightRight":r<=Ls?"Straight":r<=Math.PI/4?"SlightLeft":"Left";let t=this.locationsByNodeId[n.id];if(t||(t=this.getClosestLocationInRay(m,.5*Math.PI,10)),null!=t){let r=new An({action:{bearing:e,referencePosition:"At",type:"Turn"},atLocation:t,distance:b,origin:n});r.type=e,v.push(r)}else v.push(new An({action:{bearing:e,referencePosition:"At",type:"Turn"},distance:b,origin:n}));w+=b,b=0}}}e===d.length-1&&(v.push(new An({action:{type:"Arrival"},atLocation:i,distance:p-w<0?0:p-w,origin:t.destination})),w+=b,b=0),y=n,m=t}let _=[],M=null;for(let e=v.length-1;e>=0;e--){let t=v[e],{action:n}=t;n&&"TakeVortex"===n.type?(M=t.node,_.unshift(t)):n&&"Turn"===n.type&&null!=M?this.graph.getDistance(t.node,M)>5?_.unshift(t):_[0].distance+=t.distance:_.unshift(t)}return{distance:p,instructions:_,path:f}}simplifySteps(e,t,n){if(e.length<3)return e;let r=[e[0]],i=1;for(let o=i+2;o<e.length;o++)if(!Tg(e[i].origin,e[o].origin,t,n)){let t=o-1;r.push(new tr({...e[i],destination:e[t].origin,distance:this.graph.getDistance(e[i].origin,e[t].origin),angle:Cs(e[i].origin,e[t].origin)})),i=t}return r.push(new tr({...e[i],destination:e[e.length-1].origin,distance:this.graph.getDistance(e[i].origin,e[e.length-1].origin),angle:Cs(e[i].origin,e[e.length-1].origin)}),e[e.length-1]),r}};s(Gl,"Navigator");var Vl=Gl,ql=Vl;v(),v();var Bt,Fi,Ul,Di,Yl,Ns,Ig,Wl=class{constructor(e){S(this,Fi),S(this,Di),S(this,Ns),S(this,Bt,void 0),L(this,Bt,e)}directionsTo(e,t){let n=b(this,Bt).analytics;return e instanceof mt?0===e.destinations.length?[]:(n.getDirections(this,e.destinations[e.destinations.length-1]),ge(this,Ns,Ig).call(this,e,t)):(n.getDirections(this,e),ge(this,Di,Yl).call(this,e,t))}distanceTo(e,t){let n=ge(this,Di,Yl).call(this,e,t);return(null==n?void 0:n.distance)||0}};Bt=new WeakMap,Fi=new WeakSet,Ul=s((function(){var e;return null!=(e=b(this,Bt).venue.renderOptions)&&e.simplifyDirections?{enabled:!0}:void 0}),"#venueHasSimplifyRenderOption"),Di=new WeakSet,Yl=s((function(e,t){let n=Ni(this),r=Ni(e),i=b(this,Bt).navigator.getDirections({originIds:n,destinationNodeIds:r,accessible:(null==t?void 0:t.accessible)||!1,includedVortexIds:null!=t&&t.includedVortexIds?new Set(t.includedVortexIds):void 0,excludedVortexIds:null!=t&&t.excludedVortexIds?new Set(t.excludedVortexIds):void 0,excludedNodeIds:null!=t&&t.excludedNodeIds?new Set(t.excludedNodeIds):void 0,simplify:(null==t?void 0:t.simplify)||b(this,Fi,Ul)});return new nr(b(this,Bt),i)}),"#directionsToSingleDestination"),Ns=new WeakSet,Ig=s((function(e,t){let n,r=[],i=Ni(this);for(let o=0;o<e.destinations.length;o++){n=Ni(e.destinations[o]);let s=b(this,Bt).navigator.getDirections({originIds:i,destinationNodeIds:n,includedVortexIds:null!=t&&t.includedVortexIds?new Set(t.includedVortexIds):void 0,excludedVortexIds:null!=t&&t.excludedVortexIds?new Set(t.excludedVortexIds):void 0,accessible:(null==t?void 0:t.accessible)||!1,simplify:(null==t?void 0:t.simplify)||b(this,Fi,Ul)}),a=new nr(b(this,Bt),s);r.push(a),i=0===a.path.length?n:[a.path[a.path.length-1].id]}return r}),"#directionsToDestinationSet"),s(Wl,"MappedinNavigatable");var Vt=Wl;v(),v(),v(),v(),v();var $l=s((function(e,t){return($l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)}),"extendStatics");function qt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}$l(e,t),s(n,"__"),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}s(qt,"__extends");var Cn,Re,un,Ln,He,rt,ve,Or,B=s((function(){return B=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),B.apply(this,arguments)}),"__assign");function Ri(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function q(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return s(i,"adopt"),new(n||(n=Promise))((function(n,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function l(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((r=r.apply(e,t||[])).next())}))}function G(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function gt(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function je(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function Pt(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)(r||!(i in t))&&(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}s(Ri,"__rest"),s(q,"__awaiter"),s(G,"__generator"),s(gt,"__values"),s(je,"__read"),s(Pt,"__spreadArray"),v(),v(),v(),v(),v(),function(e){e.US="US",e.EU="EU"}(Cn||(Cn={})),v(),function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(Re||(Re={})),function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE="$revenue"}(un||(un={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(Ln||(Ln={})),v(),function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}(He||(He={})),v(),function(e){e.BEFORE="before",e.ENRICHMENT="enrichment",e.DESTINATION="destination"}(rt||(rt={})),v(),function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(ve||(ve={})),v(),function(e){e.XHR="xhr",e.SendBeacon="beacon",e.Fetch="fetch"}(Or||(Or={})),v(),v();var Hl="-",zi="AMP",Og="".concat(zi,"_unsent"),Xl="https://api2.amplitude.com/2/httpapi",Sg="https://api.eu.amplitude.com/2/httpapi",Ag="https://api2.amplitude.com/batch",Cg="https://api.eu.amplitude.com/batch";v();var ix=1e3,Fs=s((function(e){if(Object.keys(e).length>ix)return!1;for(var t in e){var n=e[t];if(!Kl(t,n))return!1}return!0}),"isValidObject"),Kl=s((function(e,t){var n,r;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=gt(t),s=o.next();!s.done;s=o.next()){var a=s.value;if(Array.isArray(a))return!1;if("object"==typeof a)i=i&&Fs(a);else if(!["number","string"].includes(typeof a))return!1;if(!i)return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}else{if(null==t)return!1;if("object"==typeof t)return Fs(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0}),"isValidProperties"),It=function(){function e(){this._propertySet=new Set,this._properties={}}return s(e,"Identify"),e.prototype.getUserProperties=function(){return B({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(Re.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(Re.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(Re.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(Re.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(Re.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(Re.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(Re.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(Re.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(Re.UNSET,e,Hl),this},e.prototype.clearAll=function(){return this._properties={},this._properties[Re.CLEAR_ALL]=Hl,this},e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var r=this._properties[e];return void 0===r&&(r={},this._properties[e]=r),r[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return void 0===this._properties[Re.CLEAR_ALL]&&!this._propertySet.has(t)&&(e===Re.ADD?"number"==typeof n:e===Re.UNSET||e===Re.REMOVE||Kl(t,n))},e}(),Lg=s((function(e,t,n){return B(B(B({},"string"==typeof e?{event_type:e}:e),n),t&&{event_properties:t})}),"createTrackEvent"),Bi=s((function(e,t){return B(B({},t),{event_type:Ln.IDENTIFY,user_properties:e.getUserProperties()})}),"createIdentifyEvent"),jg=s((function(e,t,n,r){var i;return B(B({},r),{event_type:Ln.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(i={},i[e]=t,i)})}),"createGroupIdentifyEvent"),Ng=s((function(e,t,n){var r,i=new It;return i.set(e,t),B(B({},n),{event_type:Ln.IDENTIFY,user_properties:i.getUserProperties(),groups:(r={},r[e]=t,r)})}),"createGroupEvent"),Fg=s((function(e,t){return B(B({},t),{event_type:Ln.REVENUE,event_properties:e.getEventProperties()})}),"createRevenueEvent");v(),v();var jn=s((function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=ve.Unknown),{event:e,code:t,message:n}}),"buildResult"),Dg=function(){function e(){this.queue=[],this.applying=!1,this.plugins=[]}return s(e,"Timeline"),e.prototype.register=function(e,t){return q(this,void 0,void 0,(function(){return G(this,(function(n){switch(n.label){case 0:return[4,e.setup(t)];case 1:return n.sent(),this.plugins.push(e),[2]}}))}))},e.prototype.deregister=function(e){return this.plugins.splice(this.plugins.findIndex((function(t){return t.name===e})),1),Promise.resolve()},e.prototype.reset=function(){this.applying=!1,this.plugins=[]},e.prototype.push=function(e){var t=this;return new Promise((function(n){t.queue.push([e,n]),t.scheduleApply(0)}))},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout((function(){t.apply(t.queue.shift()).then((function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)}))}),e))},e.prototype.apply=function(e){return q(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,l,u,c,h,d,p,f,g,v,y,m;return G(this,(function(b){switch(b.label){case 0:if(!e)return[2];t=je(e,1),n=t[0],r=je(e,2),i=r[1],o=this.plugins.filter((function(e){return e.type===rt.BEFORE})),b.label=1;case 1:b.trys.push([1,6,7,8]),s=gt(o),a=s.next(),b.label=2;case 2:return a.done?[3,5]:[4,a.value.execute(B({},n))];case 3:n=b.sent(),b.label=4;case 4:return a=s.next(),[3,2];case 5:return[3,8];case 6:return l=b.sent(),g={error:l},[3,8];case 7:try{a&&!a.done&&(v=s.return)&&v.call(s)}finally{if(g)throw g.error}return[7];case 8:u=this.plugins.filter((function(e){return e.type===rt.ENRICHMENT})),b.label=9;case 9:b.trys.push([9,14,15,16]),c=gt(u),h=c.next(),b.label=10;case 10:return h.done?[3,13]:[4,h.value.execute(B({},n))];case 11:n=b.sent(),b.label=12;case 12:return h=c.next(),[3,10];case 13:return[3,16];case 14:return d=b.sent(),y={error:d},[3,16];case 15:try{h&&!h.done&&(m=c.return)&&m.call(c)}finally{if(y)throw y.error}return[7];case 16:return p=this.plugins.filter((function(e){return e.type===rt.DESTINATION})),f=p.map((function(e){var t=B({},n);return e.execute(t).catch((function(e){return jn(t,0,String(e))}))})),Promise.all(f).then((function(e){var t=je(e,1)[0];i(t)})),[2]}}))}))},e.prototype.flush=function(){return q(this,void 0,void 0,(function(){var e,t,n,r=this;return G(this,(function(i){switch(i.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map((function(e){return r.apply(e)})))];case 1:return i.sent(),t=this.plugins.filter((function(e){return e.type===rt.DESTINATION})),n=t.map((function(e){return e.flush&&e.flush()})),[4,Promise.all(n)];case 2:return i.sent(),[2]}}))}))},e}();v();var Rg="Event tracked successfully",zg="Unexpected error occurred",Bg="Event rejected due to exceeded retry count",Vg="Event skipped due to optOut config",qg="Event rejected due to missing API key",Gg="Invalid API key",Ug="Client not initialized",Jl=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new Dg,this.name=e}return s(e,"AmplitudeCore"),e.prototype._init=function(e){return q(this,void 0,void 0,(function(){return G(this,(function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(),[4,this.runQueuedFunctions("q")];case 1:return t.sent(),[2]}}))}))},e.prototype.runQueuedFunctions=function(e){return q(this,void 0,void 0,(function(){var t,n,r,i,o,s;return G(this,(function(a){switch(a.label){case 0:t=this[e],this[e]=[],a.label=1;case 1:a.trys.push([1,6,7,8]),n=gt(t),r=n.next(),a.label=2;case 2:return r.done?[3,5]:[4,(0,r.value)()];case 3:a.sent(),a.label=4;case 4:return r=n.next(),[3,2];case 5:return[3,8];case 6:return i=a.sent(),o={error:i},[3,8];case 7:try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(o)throw o.error}return[7];case 8:return[2]}}))}))},e.prototype.track=function(e,t,n){var r=Lg(e,t,n);return this.dispatch(r)},e.prototype.identify=function(e,t){var n=Bi(e,t);return this.dispatch(n)},e.prototype.groupIdentify=function(e,t,n,r){var i=jg(e,t,n,r);return this.dispatch(i)},e.prototype.setGroup=function(e,t,n){var r=Ng(e,t,n);return this.dispatch(r)},e.prototype.revenue=function(e,t){var n=Fg(e,t);return this.dispatch(n)},e.prototype.add=function(e){return q(this,void 0,void 0,(function(){return G(this,(function(t){return this.config?[2,this.timeline.register(e,this.config)]:(this.q.push(this.add.bind(this,e)),[2])}))}))},e.prototype.remove=function(e){return q(this,void 0,void 0,(function(){return G(this,(function(t){return this.config?[2,this.timeline.deregister(e)]:(this.q.push(this.remove.bind(this,e)),[2])}))}))},e.prototype.dispatchWithCallback=function(e,t){if(!this.config)return t(jn(e,0,Ug));this.process(e).then(t)},e.prototype.dispatch=function(e){return q(this,void 0,void 0,(function(){var t=this;return G(this,(function(n){return this.config?[2,this.process(e)]:[2,new Promise((function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))}))]}))}))},e.prototype.process=function(e){return q(this,void 0,void 0,(function(){var t,n,r;return G(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),this.config.optOut?[2,jn(e,0,Vg)]:[4,this.timeline.push(e)];case 1:return 200===(r=i.sent()).code?this.config.loggerProvider.log(r.message):this.config.loggerProvider.error(r.message),[2,r];case 2:return t=i.sent(),n=String(t),this.config.loggerProvider.error(n),[2,r=jn(e,0,n)];case 3:return[2]}}))}))},e.prototype.setOptOut=function(e){this.config?this.config.optOut=!!e:this.q.push(this.setOptOut.bind(this,!!e))},e.prototype.flush=function(){return this.timeline.flush()},e}();v();var Ds=function(){function e(){this.productId="",this.quantity=1,this.price=0}return s(e,"Revenue"),e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setEventProperties=function(e){return Fs(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?B({},this.properties):{};return e[un.REVENUE_PRODUCT_ID]=this.productId,e[un.REVENUE_QUANTITY]=this.quantity,e[un.REVENUE_PRICE]=this.price,e[un.REVENUE_TYPE]=this.revenueType,e[un.REVENUE]=this.revenue,e},e}();v(),v();var Yg=s((function(e,t){var n=Math.max(t,1);return e.reduce((function(e,t,r){var i=Math.floor(r/n);return e[i]||(e[i]=[]),e[i].push(t),e}),[])}),"chunk");v(),v();var Rs="Amplitude Logger ",Wg=function(){function e(){this.logLevel=He.None}return s(e,"Logger"),e.prototype.disable=function(){this.logLevel=He.None},e.prototype.enable=function(e){void 0===e&&(e=He.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<He.Verbose||console.log("".concat(Rs,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<He.Warn||console.warn("".concat(Rs,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<He.Error||console.error("".concat(Rs,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<He.Debug||console.log("".concat(Rs,"[Debug]: ").concat(e.join(" ")))},e}(),zs=s((function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,logLevel:He.Warn,loggerProvider:new Wg,optOut:!1,serverUrl:Xl,serverZone:Cn.US,useBatch:!1}}),"getDefaultConfig"),Zl=function(){function e(e){var t,n,r;this._optOut=!1;var i=zs();this.apiKey=e.apiKey,this.flushIntervalMillis=e.flushIntervalMillis||i.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||i.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||i.flushQueueSize,this.loggerProvider=e.loggerProvider||i.loggerProvider,this.logLevel=null!==(t=e.logLevel)&&void 0!==t?t:i.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.optOut=null!==(n=e.optOut)&&void 0!==n?n:i.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||i.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(r=e.useBatch)&&void 0!==r?r:i.useBatch,this.loggerProvider.enable(this.logLevel);var o=Ql(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=o.serverZone,this.serverUrl=o.serverUrl}return s(e,"Config"),Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),ax=s((function(e,t){return e===Cn.EU?t?Cg:Sg:t?Ag:Xl}),"getServerUrl"),Ql=s((function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=zs().serverZone),void 0===n&&(n=zs().useBatch),e)return{serverUrl:e,serverZone:void 0};var r=[Cn.US,Cn.EU].includes(t)?t:zs().serverZone;return{serverZone:r,serverUrl:ax(r,n)}}),"createServerConfig"),ec=function(){function e(){this.name="amplitude",this.type=rt.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return s(e,"Destination"),e.prototype.setup=function(e){var t;return q(this,void 0,void 0,(function(){var n,r=this;return G(this,(function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(Og,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(t=this.config.storageProvider)||void 0===t?void 0:t.get(this.storageKey)];case 1:return n=i.sent(),this.saveEvents(),n&&n.length>0&&Promise.all(n.map((function(e){return r.execute(e)}))).catch(),[2,Promise.resolve(void 0)]}}))}))},e.prototype.execute=function(e){var t=this;return new Promise((function(n){var r={event:e,attempts:0,callback:function(e){return n(e)},timeout:0};t.addToQueue(r)}))},e.prototype.addToQueue=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.filter((function(t){return t.attempts<e.config.flushMaxRetries?(t.attempts+=1,!0):(e.fulfillRequest([t],500,Bg),!1)}));r.forEach((function(t){e.queue=e.queue.concat(t),0!==t.timeout?setTimeout((function(){t.timeout=0,e.schedule(0)}),t.timeout):e.schedule(e.config.flushIntervalMillis)})),this.saveEvents()},e.prototype.schedule=function(e){var t=this;this.scheduled||(this.scheduled=setTimeout((function(){t.flush(!0).then((function(){t.queue.length>0&&t.schedule(e)}))}),e))},e.prototype.flush=function(e){return void 0===e&&(e=!1),q(this,void 0,void 0,(function(){var t,n,r,i=this;return G(this,(function(o){switch(o.label){case 0:return t=[],n=[],this.queue.forEach((function(e){return 0===e.timeout?t.push(e):n.push(e)})),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),r=Yg(t,this.config.flushQueueSize),[4,Promise.all(r.map((function(t){return i.send(t,e)})))];case 1:return o.sent(),[2]}}))}))},e.prototype.send=function(e,t){return void 0===t&&(t=!0),q(this,void 0,void 0,(function(){var n,r,i,o,s;return G(this,(function(a){switch(a.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,qg)];n={api_key:this.config.apiKey,events:e.map((function(e){var t=e.event;t.extra;return Ri(t,["extra"])})),options:{min_id_length:this.config.minIdLength}},a.label=1;case 1:return a.trys.push([1,3,,4]),r=Ql(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(r,n)];case 2:if(null===(i=a.sent()))return this.fulfillRequest(e,0,zg),[2];if(!t){if("body"in i){o="";try{o=JSON.stringify(i.body,null,2)}catch{}this.fulfillRequest(e,i.statusCode,"".concat(i.status,": ").concat(o))}else this.fulfillRequest(e,i.statusCode,i.status);return[2]}return this.handleReponse(i,e),[3,4];case 3:return s=a.sent(),this.fulfillRequest(e,0,String(s)),[3,4];case 4:return[2]}}))}))},e.prototype.handleReponse=function(e,t){switch(e.status){case ve.Success:this.handleSuccessResponse(e,t);break;case ve.Invalid:this.handleInvalidResponse(e,t);break;case ve.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case ve.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.handleOtherReponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,Rg)},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith(Gg))this.fulfillRequest(t,e.statusCode,e.body.error);else{var r=Pt(Pt(Pt(Pt([],je(Object.values(e.body.eventsWithInvalidFields)),!1),je(Object.values(e.body.eventsWithMissingFields)),!1),je(Object.values(e.body.eventsWithInvalidIdLengths)),!1),je(e.body.silencedEvents),!1).flat(),i=new Set(r),o=t.filter((function(t,r){if(!i.has(r))return!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,Pt([],je(o),!1))}},e.prototype.handlePayloadTooLargeResponse=function(e,t){1!==t.length?(this.config.flushQueueSize/=2,this.addToQueue.apply(this,Pt([],je(t),!1))):this.fulfillRequest(t,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,s=new Set(r),a=new Set(i),l=new Set(o),u=t.filter((function(t,r){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&a.has(t.event.device_id)))return l.has(r)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,Pt([],je(u),!1))},e.prototype.handleOtherReponse=function(e){var t=this;this.addToQueue.apply(this,Pt([],je(e.map((function(e){return e.timeout=e.attempts*t.retryTimeout,e}))),!1))},e.prototype.fulfillRequest=function(e,t,n){this.saveEvents(),e.forEach((function(e){return e.callback(jn(e.event,t,n))}))},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=Array.from(this.queue.map((function(e){return e.event})));this.config.storageProvider.set(this.storageKey,e)}},e}();v();var vt=s((function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return{promise:e.apply(void 0,Pt([],je(t),!1))}}}),"returnWrapper");v();var ox=s((function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map((function(e){return e.trim()}))}),"getStacktrace"),Pe=s((function(e){return function(){var t=B({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}}),"getClientLogConfig"),sx=s((function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=gt(t.split(".")),o=i.next();!o.done;o=i.next()){var s=o.value;if(!(s in e))return;e=e[s]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e}),"getValueByStringPath"),Ie=s((function(e,t){return function(){var n,r,i={};try{for(var o=gt(t),s=o.next();!s.done;s=o.next()){var a=s.value;i[a]=sx(e,a)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}}),"getClientStates"),Oe=s((function(e,t,n,r,i){return void 0===i&&(i=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=n(),l=a.logger,u=a.logLevel;if(u&&u<He.Debug||!u||!l)return e.apply(i,o);var c={type:"invoke public method",name:t,args:o,stacktrace:ox(1),time:{start:(new Date).toISOString()},states:{}};r&&c.states&&(c.states.before=r());var h=e.apply(i,o);return h&&h.promise?h.promise.then((function(){r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=(new Date).toISOString()),l.debug(JSON.stringify(c,null,2))})):(r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=(new Date).toISOString()),l.debug(JSON.stringify(c,null,2))),h}}),"debugWrapper");v();var Nn=s((function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,Nn)}),"UUID");v();var Vi=function(){function e(){this.memoryStorage=new Map}return s(e,"MemoryStorage"),e.prototype.isEnabled=function(){return q(this,void 0,void 0,(function(){return G(this,(function(e){return[2,!0]}))}))},e.prototype.get=function(e){return q(this,void 0,void 0,(function(){return G(this,(function(t){return[2,this.memoryStorage.get(e)]}))}))},e.prototype.getRaw=function(e){return q(this,void 0,void 0,(function(){var t;return G(this,(function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return[2,(t=n.sent())?JSON.stringify(t):void 0]}}))}))},e.prototype.set=function(e,t){return q(this,void 0,void 0,(function(){return G(this,(function(n){return this.memoryStorage.set(e,t),[2]}))}))},e.prototype.remove=function(e){return q(this,void 0,void 0,(function(){return G(this,(function(t){return this.memoryStorage.delete(e),[2]}))}))},e.prototype.reset=function(){return q(this,void 0,void 0,(function(){return G(this,(function(e){return this.memoryStorage.clear(),[2]}))}))},e}();v();var rr=function(){function e(){}return s(e,"BaseTransport"),e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,n,r,i,o,s,a,l,u,c,h,d,p,f,g,v,y,m,b,w,_,M;if("object"!=typeof e)return null;var x=e.code||0,I=this.buildStatus(x);switch(I){case ve.Success:return{status:I,statusCode:x,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(n=e.payload_size_bytes)&&void 0!==n?n:0,serverUploadTime:null!==(r=e.server_upload_time)&&void 0!==r?r:0}};case ve.Invalid:return{status:I,statusCode:x,body:{error:null!==(i=e.error)&&void 0!==i?i:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(s=e.events_with_invalid_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(a=e.events_with_missing_fields)&&void 0!==a?a:{},eventsWithInvalidIdLengths:null!==(l=e.events_with_invalid_id_lengths)&&void 0!==l?l:{},epsThreshold:null!==(u=e.eps_threshold)&&void 0!==u?u:0,exceededDailyQuotaDevices:null!==(c=e.exceeded_daily_quota_devices)&&void 0!==c?c:{},silencedDevices:null!==(h=e.silenced_devices)&&void 0!==h?h:[],silencedEvents:null!==(d=e.silenced_events)&&void 0!==d?d:[],throttledDevices:null!==(p=e.throttled_devices)&&void 0!==p?p:{},throttledEvents:null!==(f=e.throttled_events)&&void 0!==f?f:[]}};case ve.PayloadTooLarge:return{status:I,statusCode:x,body:{error:null!==(g=e.error)&&void 0!==g?g:""}};case ve.RateLimit:return{status:I,statusCode:x,body:{error:null!==(v=e.error)&&void 0!==v?v:"",epsThreshold:null!==(y=e.eps_threshold)&&void 0!==y?y:0,throttledDevices:null!==(m=e.throttled_devices)&&void 0!==m?m:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(w=e.exceeded_daily_quota_devices)&&void 0!==w?w:{},exceededDailyQuotaUsers:null!==(_=e.exceeded_daily_quota_users)&&void 0!==_?_:{},throttledEvents:null!==(M=e.throttled_events)&&void 0!==M?M:[]}};case ve.Timeout:default:return{status:I,statusCode:x}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?ve.Success:429===e?ve.RateLimit:413===e?ve.PayloadTooLarge:408===e?ve.Timeout:e>=400&&e<500?ve.Invalid:e>=500?ve.Failed:ve.Unknown},e}();v(),v(),v(),v();var Xe=s((function(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:void 0}),"getGlobalScope"),Sr=s((function(){var e,t=Xe();return null!==(e=null==t?void 0:t.location)&&void 0!==e&&e.search?t.location.search.substring(1).split("&").filter(Boolean).reduce((function(e,t){var n=t.split("=",2),r=$g(n[0]),i=$g(n[1]);return i&&(e[r]=i),e}),{}):{}}),"getQueryParams"),$g=s((function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch{return""}}),"tryDecodeURIComponent");v();var Hg="utm_campaign",Xg="utm_content",Kg="utm_id",Jg="utm_medium",Zg="utm_source",Qg="utm_term",tc="dclid",nc="fbclid",rc="gbraid",ic="gclid",ac="ko_click_id",oc="msclkid",sc="ttclid",uc="twclid",lc="wbraid",ev="EMPTY",Bs={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,msclkid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},tv="MKTG",nv=function(){function e(){}return s(e,"CampaignParser"),e.prototype.parse=function(){return q(this,void 0,void 0,(function(){return G(this,(function(e){return[2,B(B(B(B({},Bs),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},e.prototype.getUtmParam=function(){var e=Sr();return{utm_campaign:e[Hg],utm_content:e[Xg],utm_id:e[Kg],utm_medium:e[Jg],utm_source:e[Zg],utm_term:e[Qg]}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!==(t=null===(e=n.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch{}return n},e.prototype.getClickIds=function(){var e,t=Sr();return(e={})[tc]=t[tc],e[nc]=t[nc],e[rc]=t[rc],e[ic]=t[ic],e[ac]=t[ac],e[oc]=t[oc],e[sc]=t[sc],e[uc]=t[uc],e[lc]=t[lc],e},e}();v(),v();var ir=s((function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[zi,t,e.substring(0,n)].filter(Boolean).join("_")}),"getCookieName"),cc=s((function(e){return"".concat(zi.toLowerCase(),"_").concat(e.substring(0,6))}),"getOldCookieName"),dc=function(){function e(e,t){var n,r;this.storage=t.storage,this.storageKey=ir(e,tv),this.parser=new nv,this.track=t.track,this.onNewCampaign=t.onNewCampaign,this.disabled=!!t.disabled,this.trackNewCampaigns=!!t.trackNewCampaigns,this.trackPageViews=!!t.trackPageViews,this.excludeReferrers=null!==(n=t.excludeReferrers)&&void 0!==n?n:[],typeof location<"u"&&this.excludeReferrers.unshift(location.hostname),this.initialEmptyValue=null!==(r=t.initialEmptyValue)&&void 0!==r?r:ev}return s(e,"CampaignTracker"),e.prototype.isNewCampaign=function(e,t,n){void 0===n&&(n=!1);e.referrer;var r=e.referring_domain,i=Ri(e,["referrer","referring_domain"]),o=t||{},s=(o.referrer,o.referring_domain),a=Ri(o,["referrer","referring_domain"]);if(e.referring_domain&&this.excludeReferrers.includes(e.referring_domain))return!1;var l=JSON.stringify(i)!==JSON.stringify(a),u=n?rv(r||"")!==rv(s||""):r!==s;return!t||l||u},e.prototype.saveCampaignToStorage=function(e){return q(this,void 0,void 0,(function(){return G(this,(function(t){switch(t.label){case 0:return[4,this.storage.set(this.storageKey,e)];case 1:return t.sent(),[2]}}))}))},e.prototype.getCampaignFromStorage=function(){return q(this,void 0,void 0,(function(){return G(this,(function(e){switch(e.label){case 0:return[4,this.storage.get(this.storageKey)];case 1:return[2,e.sent()]}}))}))},e.prototype.createCampaignEvent=function(e){var t=this,n=B(B({},Bs),e),r=Object.entries(n).reduce((function(e,n){var r=je(n,2),i=r[0],o=r[1];return e.setOnce("initial_".concat(i),o||t.initialEmptyValue),o?e.set(i,o):e.unset(i)}),new It),i={event_type:"Page View",event_properties:{page_title:typeof document<"u"&&document.title||"",page_location:typeof location<"u"&&location.href||"",page_path:typeof location<"u"&&location.pathname||""}};return B(B({},Bi(r)),this.trackPageViews&&i)},e.prototype.send=function(e){return q(this,void 0,void 0,(function(){var t,n;return G(this,(function(r){switch(r.label){case 0:return this.disabled?[2]:[4,this.parser.parse()];case 1:return t=r.sent(),[4,this.getCampaignFromStorage()];case 2:if(n=r.sent(),!e){if(!this.trackNewCampaigns||!this.isNewCampaign(t,n))return[2];this.onNewCampaign(t)}return[4,this.track(this.createCampaignEvent(t))];case 3:return r.sent(),[4,this.saveCampaignToStorage(t)];case 4:return r.sent(),[2]}}))}))},e}(),rv=s((function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")}),"domainWithoutSubdomain");v();var ar=function(){function e(e){this.options=B({},e)}return s(e,"CookieStorage"),e.prototype.isEnabled=function(){return q(this,void 0,void 0,(function(){var t,n,r;return G(this,(function(i){switch(i.label){case 0:if(!Xe())return[2,!1];t=String(Date.now()),n=new e(this.options),r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return q(this,void 0,void 0,(function(){var t;return G(this,(function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:if(!(t=n.sent()))return[2,void 0];try{try{t=decodeURIComponent(atob(t))}catch{}return[2,JSON.parse(t)]}catch{return[2,void 0]}return[2]}}))}))},e.prototype.getRaw=function(e){var t;return q(this,void 0,void 0,(function(){var n,r,i;return G(this,(function(o){return n=Xe(),r=null!==(t=null==n?void 0:n.document.cookie.split("; "))&&void 0!==t?t:[],(i=r.find((function(t){return 0===t.indexOf(e+"=")})))?[2,i.substring(e.length+1)]:[2,void 0]}))}))},e.prototype.set=function(e,t){var n;return q(this,void 0,void 0,(function(){var r,i,o,s,a,l;return G(this,(function(u){try{r=null!==(n=this.options.expirationDays)&&void 0!==n?n:0,o=void 0,(i=null!==t?r:-1)&&((s=new Date).setTime(s.getTime()+24*i*60*60*1e3),o=s),a="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t)))),o&&(a+="; expires=".concat(o.toUTCString())),a+="; path=/",this.options.domain&&(a+="; domain=".concat(this.options.domain)),this.options.secure&&(a+="; Secure"),this.options.sameSite&&(a+="; SameSite=".concat(this.options.sameSite)),(l=Xe())&&(l.document.cookie=a)}catch{}return[2]}))}))},e.prototype.remove=function(e){return q(this,void 0,void 0,(function(){return G(this,(function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}}))}))},e.prototype.reset=function(){return q(this,void 0,void 0,(function(){return G(this,(function(e){return[2]}))}))},e}();v();var Vs=function(){function e(e,t){this.storage=e,this.storageKey=ir(t),this.cache={optOut:!1}}return s(e,"SessionManager"),e.prototype.load=function(){var e;return q(this,void 0,void 0,(function(){var t;return G(this,(function(n){switch(n.label){case 0:return t=this,[4,this.storage.get(this.storageKey)];case 1:return t.cache=null!==(e=n.sent())&&void 0!==e?e:{optOut:!1},[2,this]}}))}))},e.prototype.setSession=function(e){this.cache=B(B({},this.cache),e),this.storage.set(this.storageKey,this.cache)},e.prototype.getSessionId=function(){return this.cache.sessionId},e.prototype.setSessionId=function(e){this.setSession({sessionId:e})},e.prototype.getDeviceId=function(){return this.cache.deviceId},e.prototype.setDeviceId=function(e){this.setSession({deviceId:e})},e.prototype.getUserId=function(){return this.cache.userId},e.prototype.setUserId=function(e){this.setSession({userId:e})},e.prototype.getLastEventTime=function(){return this.cache.lastEventTime},e.prototype.setLastEventTime=function(e){this.setSession({lastEventTime:e})},e.prototype.getOptOut=function(){return this.cache.optOut},e.prototype.setOptOut=function(e){this.setSession({optOut:e})},e.prototype.getLastEventId=function(){return this.cache.lastEventId},e.prototype.setLastEventId=function(e){this.setSession({lastEventId:e})},e}();v();var pc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return qt(t,e),s(t,"FetchTransport"),t.prototype.send=function(e,t){return q(this,void 0,void 0,(function(){var n,r;return G(this,(function(i){switch(i.label){case 0:if(typeof fetch>"u")throw new Error("FetchTransport is not supported");return n={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"},[4,fetch(e,n)];case 1:return[4,i.sent().json()];case 2:return r=i.sent(),[2,this.buildResponse(r)]}}))}))},t}(rr);v(),v();var iv=Rt(Gs()),ux=function(){function e(){this.ua=new iv.UAParser(typeof navigator<"u"?navigator.userAgent:null).getResult()}return s(e,"ApplicationContextProviderImpl"),e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:dx(),platform:"Web",os:lx(this.ua),deviceModel:cx(this.ua)}},e}(),lx=s((function(e){var t,n;return[null===(t=e.browser)||void 0===t?void 0:t.name,null===(n=e.browser)||void 0===n?void 0:n.major].filter((function(e){return null!=e})).join(" ")}),"getOs"),cx=s((function(e){var t;return null===(t=e.os)||void 0===t?void 0:t.name}),"getDeviceModel"),dx=s((function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""}),"getLanguage"),px=function(){function e(){this.queue=[]}return s(e,"EventBridgeImpl"),e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach((function(t){e(t)})),this.queue=[])},e}(),Fn=s((function(){return Fn=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),Fn.apply(this,arguments)}),"__assign"),Us=s((function(e,t){var n=typeof e;if(n!==typeof t)return!1;for(var r=0,i=["string","number","boolean","undefined"];r<i.length;r++){if(i[r]===n)return e===t}if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)return!1;var o=Array.isArray(e),s=Array.isArray(t);if(o!==s)return!1;if(!o||!s){var a=Object.keys(e).sort(),l=Object.keys(t).sort();if(!Us(a,l))return!1;var u=!0;return Object.keys(e).forEach((function(n){Us(e[n],t[n])||(u=!1)})),u}for(var c=0;c<e.length;c++)if(!Us(e[c],t[c]))return!1;return!0}),"isEqual"),fx="$set",hx="$unset",mx="$clearAll";Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var gx=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return s(e,"IdentityStoreImpl"),e.prototype.editIdentity=function(){var e=this,t=Fn({},this.identity.userProperties),n=Fn(Fn({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},updateUserProperties:function(e){for(var t=n.userProperties||{},r=0,i=Object.entries(e);r<i.length;r++){var o=i[r],s=o[0],a=o[1];switch(s){case fx:for(var l=0,u=Object.entries(a);l<u.length;l++){var c=u[l],h=c[0],d=c[1];t[h]=d}break;case hx:for(var p=0,f=Object.keys(a);p<f.length;p++){delete t[h=f[p]]}break;case mx:t={}}}return n.userProperties=t,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return Fn({},this.identity)},e.prototype.setIdentity=function(e){var t=Fn({},this.identity);this.identity=Fn({},e),Us(t,this.identity)||this.listeners.forEach((function(t){t(e)}))},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),Gi=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,av=function(){function e(){this.identityStore=new gx,this.eventBridge=new px,this.applicationContextProvider=new ux}return s(e,"AnalyticsConnector"),e.getInstance=function(t){return Gi.analyticsConnectorInstances||(Gi.analyticsConnectorInstances={}),Gi.analyticsConnectorInstances[t]||(Gi.analyticsConnectorInstances[t]=new e),Gi.analyticsConnectorInstances[t]},e}(),Ui=s((function(){return av.getInstance("$default_instance")}),"getAnalyticsConnector");v();var fc=function(){function e(){this.name="identity",this.type=rt.BEFORE,this.identityStore=Ui().identityStore}return s(e,"IdentityEventSender"),e.prototype.execute=function(e){return q(this,void 0,void 0,(function(){var t;return G(this,(function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]}))}))},e.prototype.setup=function(e){return Promise.resolve(void 0)},e}();v();var hc=s((function(){var e,t,n,r;if(typeof navigator>"u")return"";var i=navigator.userLanguage;return null!==(r=null!==(n=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==n?n:i)&&void 0!==r?r:""}),"getLanguage");v();var Ys=s((function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,s=r.resolve,a=e&&e[i];if("function"==typeof a){var l=a.apply(e,o);"function"==typeof s&&s(null==l?void 0:l.promise)}}return e}),"convertProxyObjectToRealObject"),Ws=s((function(e){return e&&void 0!==e._q}),"isInstanceProxy");v();var sv=Rt(Gs());v();var ov="1.6.8",vx="Web",yx="$remote",uv=function(){function e(){var e;this.name="context",this.type=rt.BEFORE,this.eventId=0,this.library="amplitude-ts/".concat(ov),typeof navigator<"u"&&(e=navigator.userAgent),this.uaResult=new sv.default(e).getResult()}return s(e,"Context"),e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){return q(this,void 0,void 0,(function(){var t,n,r,i,o;return G(this,(function(s){return this.isSessionValid()||(this.config.sessionId=Date.now()),this.config.lastEventTime=Date.now(),t=(new Date).getTime(),n=this.uaResult.browser.name,r=this.uaResult.browser.version,i=this.uaResult.device.model||this.uaResult.os.name,o=this.uaResult.device.vendor,[2,B(B(B(B(B(B(B(B(B(B(B(B({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:t},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:vx}),this.config.trackingOptions.osName&&{os_name:n}),this.config.trackingOptions.osVersion&&{os_version:r}),this.config.trackingOptions.deviceManufacturer&&{device_manufacturer:o}),this.config.trackingOptions.deviceModel&&{device_model:i}),this.config.trackingOptions.language&&{language:hc()}),this.config.trackingOptions.ipAddress&&{ip:yx}),{insert_id:Nn(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:this.eventId++,library:this.library})]}))}))},e.prototype.isSessionValid=function(){var e=this.config.lastEventTime||Date.now();return Date.now()-e<this.config.sessionTimeout},e}();v(),v();var Yi=function(){function e(){}return s(e,"LocalStorage"),e.prototype.isEnabled=function(){return q(this,void 0,void 0,(function(){var t,n,r;return G(this,(function(i){switch(i.label){case 0:if(!Xe())return[2,!1];t=String(Date.now()),n=new e,r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return q(this,void 0,void 0,(function(){var t;return G(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(t=n.sent())?[2,JSON.parse(t)]:[2,void 0];case 2:return n.sent(),[2,void 0];case 3:return[2]}}))}))},e.prototype.getRaw=function(e){var t;return q(this,void 0,void 0,(function(){return G(this,(function(n){return[2,(null===(t=Xe())||void 0===t?void 0:t.localStorage.getItem(e))||void 0]}))}))},e.prototype.set=function(e,t){var n;return q(this,void 0,void 0,(function(){return G(this,(function(r){try{null===(n=Xe())||void 0===n||n.localStorage.setItem(e,JSON.stringify(t))}catch{}return[2]}))}))},e.prototype.remove=function(e){var t;return q(this,void 0,void 0,(function(){return G(this,(function(n){try{null===(t=Xe())||void 0===t||t.localStorage.removeItem(e)}catch{}return[2]}))}))},e.prototype.reset=function(){var e;return q(this,void 0,void 0,(function(){return G(this,(function(t){try{null===(e=Xe())||void 0===e||e.localStorage.clear()}catch{}return[2]}))}))},e}();v();var lv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return qt(t,e),s(t,"XHRTransport"),t.prototype.send=function(e,t){return q(this,void 0,void 0,(function(){var n=this;return G(this,(function(r){return[2,new Promise((function(r,i){typeof XMLHttpRequest>"u"&&i(new Error("XHRTransport is not supported."));var o=new XMLHttpRequest;o.open("POST",e,!0),o.onreadystatechange=function(){if(o.readyState===n.state.done)try{var e=o.responseText,t=JSON.parse(e),s=n.buildResponse(t);r(s)}catch(e){i(e)}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(t))}))]}))}))},t}(rr);v();var cv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return qt(t,e),s(t,"SendBeaconTransport"),t.prototype.send=function(e,t){return q(this,void 0,void 0,(function(){var n=this;return G(this,(function(r){return[2,new Promise((function(r,i){var o=Xe();if(null==o||!o.navigator.sendBeacon)throw new Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(t);return r(o.navigator.sendBeacon(e,JSON.stringify(t))?n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}):n.buildResponse({code:500}))}catch(e){i(e)}}))]}))}))},t}(rr),$s=s((function(){var e=new Vi;return{cookieExpiration:365,cookieSameSite:"Lax",cookieSecure:!1,cookieStorage:e,disableCookies:!1,domain:"",sessionManager:new Vs(e,""),sessionTimeout:18e5,storageProvider:new Vi,trackingOptions:{deviceManufacturer:!0,deviceModel:!0,ipAddress:!0,language:!0,osName:!0,osVersion:!0,platform:!0},transportProvider:new pc}}),"getDefaultConfig"),dv=function(e){function t(t,n,r){var i,o,s,a,l,u,c,h,d,p,f,g,v=this,y=$s();return(v=e.call(this,B(B({flushIntervalMillis:1e3,flushMaxRetries:5,flushQueueSize:30},r),{apiKey:t,storageProvider:null!==(i=null==r?void 0:r.storageProvider)&&void 0!==i?i:y.storageProvider,transportProvider:null!==(o=null==r?void 0:r.transportProvider)&&void 0!==o?o:y.transportProvider}))||this).cookieStorage=null!==(s=null==r?void 0:r.cookieStorage)&&void 0!==s?s:y.cookieStorage,v.sessionManager=null!==(a=null==r?void 0:r.sessionManager)&&void 0!==a?a:y.sessionManager,v.sessionTimeout=null!==(l=null==r?void 0:r.sessionTimeout)&&void 0!==l?l:y.sessionTimeout,v.appVersion=null==r?void 0:r.appVersion,v.attribution=null==r?void 0:r.attribution,v.cookieExpiration=null!==(u=null==r?void 0:r.cookieExpiration)&&void 0!==u?u:y.cookieExpiration,v.cookieSameSite=null!==(c=null==r?void 0:r.cookieSameSite)&&void 0!==c?c:y.cookieSameSite,v.cookieSecure=null!==(h=null==r?void 0:r.cookieSecure)&&void 0!==h?h:y.cookieSecure,v.deviceId=null==r?void 0:r.deviceId,v.disableCookies=null!==(d=null==r?void 0:r.disableCookies)&&void 0!==d?d:y.disableCookies,v.domain=null!==(p=null==r?void 0:r.domain)&&void 0!==p?p:y.domain,v.lastEventTime=null!==(f=v.lastEventTime)&&void 0!==f?f:null==r?void 0:r.lastEventTime,v.optOut=!(null==r||!r.optOut),v.partnerId=null==r?void 0:r.partnerId,v.sessionId=null==r?void 0:r.sessionId,v.trackingOptions=null!==(g=null==r?void 0:r.trackingOptions)&&void 0!==g?g:y.trackingOptions,v.userId=n,v}return qt(t,e),s(t,"BrowserConfig"),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this.sessionManager.getDeviceId()},set:function(e){this.sessionManager.setDeviceId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this.sessionManager.getUserId()},set:function(e){this.sessionManager.setUserId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this.sessionManager.getSessionId()},set:function(e){this.sessionManager.setSessionId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this.sessionManager.getOptOut()},set:function(e){var t;null===(t=this.sessionManager)||void 0===t||t.setOptOut(!!e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this.sessionManager.getLastEventTime()},set:function(e){this.sessionManager.setLastEventTime(e)},enumerable:!1,configurable:!0}),t}(Zl),pv=s((function(e,t,n){return q(void 0,void 0,void 0,(function(){var r,i,o,s,a,l,u,c,h,d,p,f,g,v,y,m,b;return G(this,(function(w){switch(w.label){case 0:return r=$s(),null!==(g=null==n?void 0:n.domain)&&void 0!==g?(o=g,[3,3]):[3,1];case 1:return[4,_x()];case 2:o=w.sent(),w.label=3;case 3:return i=o,[4,bx(B(B({},n),{domain:i}))];case 4:return s=w.sent(),a=ir(e),[4,s.get(a)];case 5:return l=w.sent(),u=Sr(),[4,new Vs(s,e).load()];case 6:return c=w.sent(),h=dv.bind,d=[void 0,e,null!=t?t:null==l?void 0:l.userId],p=[B({},n)],f={cookieStorage:s,sessionManager:c,deviceId:kx(null==l?void 0:l.deviceId,null==n?void 0:n.deviceId,u.deviceId),domain:i,optOut:null!==(v=null==n?void 0:n.optOut)&&void 0!==v?v:!(null==l||!l.optOut)},[4,s.get(a)];case 7:return f.sessionId=null!==(m=null===(y=w.sent())||void 0===y?void 0:y.sessionId)&&void 0!==m?m:null==n?void 0:n.sessionId,[4,wx(n)];case 8:return[2,new(h.apply(dv,d.concat([B.apply(void 0,p.concat([(f.storageProvider=w.sent(),f.trackingOptions=B(B({},r.trackingOptions),null==n?void 0:n.trackingOptions),f.transportProvider=null!==(b=null==n?void 0:n.transportProvider)&&void 0!==b?b:gc(null==n?void 0:n.transport),f)]))])))]}}))}))}),"useBrowserConfig"),bx=s((function(e,t){return void 0===t&&(t=$s()),q(void 0,void 0,void 0,(function(){var n,r,i;return G(this,(function(o){switch(o.label){case 0:return n=B(B({},t),e),r=null==e?void 0:e.cookieStorage,(i=!r)?[3,2]:[4,r.isEnabled()];case 1:i=!o.sent(),o.label=2;case 2:return i?[2,mc(n)]:[2,r]}}))}))}),"createCookieStorage"),mc=s((function(e){return q(void 0,void 0,void 0,(function(){var t,n;return G(this,(function(r){switch(r.label){case 0:return t=new ar({domain:e.domain,expirationDays:e.cookieExpiration,sameSite:e.cookieSameSite,secure:e.cookieSecure}),(n=e.disableCookies)?[3,2]:[4,t.isEnabled()];case 1:n=!r.sent(),r.label=2;case 2:return n?[4,(t=new Yi).isEnabled()]:[3,4];case 3:r.sent()||(t=new Vi),r.label=4;case 4:return[2,t]}}))}))}),"createFlexibleStorage"),wx=s((function(e){return q(void 0,void 0,void 0,(function(){var t,n,r,i,o,s,a;return G(this,(function(l){switch(l.label){case 0:if(e&&Object.prototype.hasOwnProperty.call(e,"storageProvider")&&!e.storageProvider)return[3,9];l.label=1;case 1:l.trys.push([1,7,8,9]),t=gt([null==e?void 0:e.storageProvider,new Yi]),n=t.next(),l.label=2;case 2:return n.done?[3,6]:(r=n.value,(i=r)?[4,r.isEnabled()]:[3,4]);case 3:i=l.sent(),l.label=4;case 4:if(i)return[2,r];l.label=5;case 5:return n=t.next(),[3,2];case 6:return[3,9];case 7:return o=l.sent(),s={error:o},[3,9];case 8:try{n&&!n.done&&(a=t.return)&&a.call(t)}finally{if(s)throw s.error}return[7];case 9:return[2,void 0]}}))}))}),"createEventsStorage"),kx=s((function(e,t,n){return t||n||e||Nn()}),"createDeviceId"),gc=s((function(e){return e===Or.XHR?new lv:e===Or.SendBeacon?new cv:$s().transportProvider}),"createTransport"),_x=s((function(e){return q(void 0,void 0,void 0,(function(){var t,n,r,i,o,s,a;return G(this,(function(l){switch(l.label){case 0:return[4,(new ar).isEnabled()];case 1:if(!l.sent()||!e&&typeof location>"u")return[2,""];for(t=null!=e?e:location.hostname,n=t.split("."),r=[],i="AMP_TLDTEST",o=n.length-2;o>=0;--o)r.push(n.slice(o).join("."));o=0,l.label=2;case 2:return o<r.length?(s=r[o],[4,(a=new ar({domain:"."+s})).set(i,1)]):[3,7];case 3:return l.sent(),[4,a.get(i)];case 4:return l.sent()?[4,a.remove(i)]:[3,6];case 5:return l.sent(),[2,"."+s];case 6:return o++,[3,2];case 7:return[2,""]}}))}))}),"getTopLevelDomain");v();var hv=s((function(e,t){return q(void 0,void 0,void 0,(function(){var n,r,i,o,s,a,l,u,c;return G(this,(function(h){switch(h.label){case 0:return[4,(n=new ar).isEnabled()];case 1:return(!h.sent()||null!=t&&t.disableCookies)&&(n=new Yi),[4,n.isEnabled()];case 2:return h.sent()?(r=cc(e),[4,n.getRaw(r)]):[2,{optOut:!1}];case 3:return(i=h.sent())?[4,n.remove(r)]:[2,{optOut:!1}];case 4:return h.sent(),o=je(i.split("."),5),s=o[0],a=o[1],l=o[2],u=o[3],c=o[4],[2,{deviceId:s,userId:Mx(a),sessionId:fv(u),lastEventTime:fv(c),optOut:!!l}]}}))}))}),"parseOldCookies"),fv=s((function(e){var t=parseInt(e,32);if(!isNaN(t))return t}),"parseTime"),Mx=s((function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch{return}}),"decode"),xx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return qt(t,e),s(t,"AmplitudeBrowser"),t.prototype.init=function(t,n,r){var i,o,s;return void 0===t&&(t=""),q(this,void 0,void 0,(function(){var a,l,u,c,h=this;return G(this,(function(d){switch(d.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,hv(t,r)]);case 1:return a=d.sent(),[4,pv(t,n||a.userId,B(B({},r),{deviceId:null!==(i=a.deviceId)&&void 0!==i?i:null==r?void 0:r.deviceId,sessionId:null!==(o=a.sessionId)&&void 0!==o?o:null==r?void 0:r.sessionId,optOut:null!==(s=null==r?void 0:r.optOut)&&void 0!==s?s:a.optOut,lastEventTime:a.lastEventTime}))];case 2:return l=d.sent(),[4,e.prototype._init.call(this,l)];case 3:return d.sent(),u=!this.config.lastEventTime,(!this.config.sessionId||this.config.lastEventTime&&Date.now()-this.config.lastEventTime>this.config.sessionTimeout)&&(this.setSessionId(Date.now()),u=!0),(c=Ui()).eventBridge.setEventReceiver((function(e){h.track(e.eventType,e.eventProperties)})),c.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),[4,this.add(new uv)];case 4:return d.sent(),[4,this.add(new fc)];case 5:return d.sent(),[4,this.add(new ec)];case 6:return d.sent(),this.initializing=!1,[4,this.runAttributionStrategy(l.attribution,u)];case 7:return d.sent(),[4,this.runQueuedFunctions("dispatchQ")];case 8:return d.sent(),[2]}}))}))},t.prototype.runAttributionStrategy=function(e,t){return void 0===t&&(t=!1),q(this,void 0,void 0,(function(){var n,r,i;return G(this,(function(o){switch(o.label){case 0:return n=this.track.bind(this),r=this.setSessionId.bind(this,Date.now()),[4,mc(this.config)];case 1:return i=o.sent(),[4,new dc(this.config.apiKey,B(B({},e),{storage:i,track:n,onNewCampaign:r})).send(t)];case 2:return o.sent(),[2]}}))}))},t.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},t.prototype.setUserId=function(e){this.config?this.config.userId=e:this.q.push(this.setUserId.bind(this,e))},t.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},t.prototype.setDeviceId=function(e){this.config?this.config.deviceId=e:this.q.push(this.setDeviceId.bind(this,e))},t.prototype.reset=function(){this.setUserId(void 0),this.setDeviceId(Nn())},t.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},t.prototype.setSessionId=function(e){this.config?(this.config.sessionId=e,this.config.lastEventTime=void 0):this.q.push(this.setSessionId.bind(this,e))},t.prototype.setTransport=function(e){this.config?this.config.transportProvider=gc(e):this.q.push(this.setTransport.bind(this,e))},t.prototype.identify=function(t,n){if(Ws(t)){var r=t._q;t._q=[],t=Ys(new It,r)}return null!=n&&n.user_id&&this.setUserId(n.user_id),null!=n&&n.device_id&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},t.prototype.groupIdentify=function(t,n,r,i){if(Ws(r)){var o=r._q;r._q=[],r=Ys(new It,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(Ws(t)){var r=t._q;t._q=[],t=Ys(new Ds,r)}return e.prototype.revenue.call(this,t,n)},t}(Jl),Hs=s((function(){var e=new xx;return{init:Oe(vt(e.init.bind(e)),"init",Pe(e),Ie(e,["config"])),add:Oe(vt(e.add.bind(e)),"add",Pe(e),Ie(e,["config.apiKey","timeline.plugins"])),remove:Oe(vt(e.remove.bind(e)),"remove",Pe(e),Ie(e,["config.apiKey","timeline.plugins"])),track:Oe(vt(e.track.bind(e)),"track",Pe(e),Ie(e,["config.apiKey","timeline.queue.length"])),logEvent:Oe(vt(e.logEvent.bind(e)),"logEvent",Pe(e),Ie(e,["config.apiKey","timeline.queue.length"])),identify:Oe(vt(e.identify.bind(e)),"identify",Pe(e),Ie(e,["config.apiKey","timeline.queue.length"])),groupIdentify:Oe(vt(e.groupIdentify.bind(e)),"groupIdentify",Pe(e),Ie(e,["config.apiKey","timeline.queue.length"])),setGroup:Oe(vt(e.setGroup.bind(e)),"setGroup",Pe(e),Ie(e,["config.apiKey","timeline.queue.length"])),revenue:Oe(vt(e.revenue.bind(e)),"revenue",Pe(e),Ie(e,["config.apiKey","timeline.queue.length"])),flush:Oe(vt(e.flush.bind(e)),"flush",Pe(e),Ie(e,["config.apiKey","timeline.queue.length"])),getUserId:Oe(e.getUserId.bind(e),"getUserId",Pe(e),Ie(e,["config","config.userId"])),setUserId:Oe(e.setUserId.bind(e),"setUserId",Pe(e),Ie(e,["config","config.userId"])),getDeviceId:Oe(e.getDeviceId.bind(e),"getDeviceId",Pe(e),Ie(e,["config","config.deviceId"])),setDeviceId:Oe(e.setDeviceId.bind(e),"setDeviceId",Pe(e),Ie(e,["config","config.deviceId"])),reset:Oe(e.reset.bind(e),"reset",Pe(e),Ie(e,["config","config.userId","config.deviceId"])),getSessionId:Oe(e.getSessionId.bind(e),"getSessionId",Pe(e),Ie(e,["config"])),setSessionId:Oe(e.setSessionId.bind(e),"setSessionId",Pe(e),Ie(e,["config"])),setOptOut:Oe(e.setOptOut.bind(e),"setOptOut",Pe(e),Ie(e,["config"])),setTransport:Oe(e.setTransport.bind(e),"setTransport",Pe(e),Ie(e,["config"]))}}),"createInstance"),Ce=Hs(),y2=Ce.add,b2=Ce.flush,w2=Ce.getDeviceId,k2=Ce.getSessionId,_2=Ce.getUserId,M2=Ce.groupIdentify,x2=Ce.identify,E2=Ce.init,T2=Ce.logEvent,P2=Ce.remove,I2=Ce.reset,O2=Ce.revenue,S2=Ce.setDeviceId,A2=Ce.setGroup,C2=Ce.setOptOut,L2=Ce.setSessionId,j2=Ce.setTransport,N2=Ce.setUserId,F2=Ce.track,Id={production:"40ead723d18886045e302513245edb27",development:""},Ar={plan:{version:"22",branch:"main",source:"websdk",versionId:"197467d1-8926-452d-a088-b3817cbac89f"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"}},Od=class{constructor(e){this.event_properties=e,g(this,"event_type","Analytics:categorySelected-call"),this.event_properties=e}};s(Od,"AnalyticsCategorySelectedCall");var Wi=Od,Sd=class{constructor(e){this.event_properties=e,g(this,"event_type","Analytics:locationSelected-call"),this.event_properties=e}};s(Sd,"AnalyticsLocationSelectedCall");var $i=Sd,Ad=class{constructor(e){this.event_properties=e,g(this,"event_type","BlueDot:disable-call"),this.event_properties=e}};s(Ad,"BlueDotDisableCall");var vc=Ad,Cd=class{constructor(e){this.event_properties=e,g(this,"event_type","BlueDot:enable-call"),this.event_properties=e}};s(Cd,"BlueDotEnableCall");var yc=Cd,Ld=class{constructor(e){this.event_properties=e,g(this,"event_type","BlueDot:off-call"),this.event_properties=e}};s(Ld,"BlueDotOffCall");var bc=Ld,jd=class{constructor(e){this.event_properties=e,g(this,"event_type","BlueDot:on-call"),this.event_properties=e}};s(jd,"BlueDotOnCall");var wc=jd,Nd=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:animate-call"),this.event_properties=e}};s(Nd,"CameraAnimateCall");var kc=Nd,Fd=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:cancelAnimation-call"),this.event_properties=e}};s(Fd,"CameraCancelAnimationCall");var _c=Fd,Dd=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:focusOn-call"),this.event_properties=e}};s(Dd,"CameraFocusOnCall");var Mc=Dd,Rd=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:getSafeAreaInsets-call"),this.event_properties=e}};s(Rd,"CameraGetSafeAreaInsetsCall");var xc=Rd,zd=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:interaction.disable-call"),this.event_properties=e}};s(zd,"CameraInteractionDisableCall");var Ec=zd,Bd=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:interaction.enable-call"),this.event_properties=e}};s(Bd,"CameraInteractionEnableCall");var Tc=Bd,Vd=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:set-call"),this.event_properties=e}};s(Vd,"CameraSetCall");var Pc=Vd,qd=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:setSafeAreaInsets-call"),this.event_properties=e}};s(qd,"CameraSetSafeAreaInsetsCall");var Ic=qd,Gd=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:translate-call"),this.event_properties=e}};s(Gd,"CameraTranslateCall");var Oc=Gd,Ud=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:add-call"),this.event_properties=e}};s(Ud,"FlatLabelsAddCall");var Sc=Ud,Yd=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:labelAllLocations-call"),this.event_properties=e}};s(Yd,"FlatLabelsLabelAllLocationsCall");var Ac=Yd,Wd=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:remove-call"),this.event_properties=e}};s(Wd,"FlatLabelsRemoveCall");var Cc=Wd,$d=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:removeAll-call"),this.event_properties=e}};s($d,"FlatLabelsRemoveAllCall");var Lc=$d,Hd=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:setAppearance-call"),this.event_properties=e}};s(Hd,"FlatLabelsSetAppearanceCall");var jc=Hd,Xd=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:add-call"),this.event_properties=e}};s(Xd,"FloatingLabelsAddCall");var Nc=Xd,Kd=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:labelAllLocations-call"),this.event_properties=e}};s(Kd,"FloatingLabelsLabelAllLocationsCall");var Fc=Kd,Jd=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:remove-call"),this.event_properties=e}};s(Jd,"FloatingLabelsRemoveCall");var Dc=Jd,Zd=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:removeAll-call"),this.event_properties=e}};s(Zd,"FloatingLabelsRemoveAllCall");var Rc=Zd,Qd=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:resetPriority-call"),this.event_properties=e}};s(Qd,"FloatingLabelsResetPriorityCall");var zc=Qd,ep=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:setAppearance-call"),this.event_properties=e}};s(ep,"FloatingLabelsSetAppearanceCall");var Bc=ep,tp=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:setPriority-call"),this.event_properties=e}};s(tp,"FloatingLabelsSetPriorityCall");var Vc=tp,np=class{constructor(e){this.event_properties=e,g(this,"event_type","global:getVenue-call"),this.event_properties=e}};s(np,"GlobalGetVenueCall");var Hi=np,rp=class{constructor(e){this.event_properties=e,g(this,"event_type","global:getVenueMVF-call"),this.event_properties=e}};s(rp,"GlobalGetVenueMvfCall");var Xi=rp,ip=class{constructor(e){this.event_properties=e,g(this,"event_type","global:showVenue-call"),this.event_properties=e}};s(ip,"GlobalShowVenueCall");var qc=ip,ap=class{constructor(e){this.event_properties=e,g(this,"event_type","Journey:clear-call"),this.event_properties=e}};s(ap,"JourneyClearCall");var Gc=ap,op=class{constructor(e){this.event_properties=e,g(this,"event_type","Journey:draw-call"),this.event_properties=e}};s(op,"JourneyDrawCall");var Uc=op,sp=class{constructor(e){this.event_properties=e,g(this,"event_type","Journey:setStep-call"),this.event_properties=e}};s(sp,"JourneySetStepCall");var Yc=sp,up=class{constructor(e){this.event_properties=e,g(this,"event_type","Mappedin:getCollectionItemById-call"),this.event_properties=e}};s(up,"MappedinGetCollectionItemByIdCall");var Wc=up,lp=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinCoordinate:absoluteDistanceTo-call"),this.event_properties=e}};s(lp,"MappedinCoordinateAbsoluteDistanceToCall");var $c=lp,cp=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinCoordinate:nearestNode-call"),this.event_properties=e}};s(cp,"MappedinCoordinateNearestNodeCall");var Hc=cp,dp=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinLocation:clone-call"),this.event_properties=e}};s(dp,"MappedinLocationCloneCall");var Ki=dp,pp=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinLocation:directionsTo-call"),this.event_properties=e}};s(pp,"MappedinLocationDirectionsToCall");var Ji=pp,fp=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinLocation:distanceTo-call"),this.event_properties=e}};s(fp,"MappedinLocationDistanceToCall");var Zi=fp,hp=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinMap:createCoordinate-call"),this.event_properties=e}};s(hp,"MappedinMapCreateCoordinateCall");var Xc=hp,mp=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinMap:createCoordinateByXY-call"),this.event_properties=e}};s(mp,"MappedinMapCreateCoordinateByXyCall");var Kc=mp,gp=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinMap:getNorth-call"),this.event_properties=e}};s(gp,"MappedinMapGetNorthCall");var Jc=gp,vp=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinNode:directionsTo-call"),this.event_properties=e}};s(vp,"MappedinNodeDirectionsToCall");var Qi=vp,yp=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinNode:distanceTo-call"),this.event_properties=e}};s(yp,"MappedinNodeDistanceToCall");var ea=yp,bp=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinPolygon:directionsTo-call"),this.event_properties=e}};s(bp,"MappedinPolygonDirectionsToCall");var ta=bp,wp=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinPolygon:distanceTo-call"),this.event_properties=e}};s(wp,"MappedinPolygonDistanceToCall");var na=wp,kp=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinVenue:metadata-read"),this.event_properties=e}};s(kp,"MappedinVenueMetadataRead");var ra=kp,_p=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:addInteractivePolygon-call"),this.event_properties=e}};s(_p,"MapViewAddInteractivePolygonCall");var Zc=_p,Mp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:addInteractivePolygonsForAllLocations-call"),this.event_properties=e}};s(Mp,"MapViewAddInteractivePolygonsForAllLocationsCall");var Qc=Mp,xp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:clearPolygonColor-call"),this.event_properties=e}};s(xp,"MapViewClearPolygonColorCall");var ed=xp,Ep=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:createCustomTooltip-call"),this.event_properties=e}};s(Ep,"MapViewCreateCustomTooltipCall");var td=Ep,Tp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:createMarker-call"),this.event_properties=e}};s(Tp,"MapViewCreateMarkerCall");var nd=Tp,Pp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:createTooltip-call"),this.event_properties=e}};s(Pp,"MapViewCreateTooltipCall");var rd=Pp,Ip=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:destroy-call"),this.event_properties=e}};s(Ip,"MapViewDestroyCall");var id=Ip,Op=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:disableImageFlippingForAllPolygons-call"),this.event_properties=e}};s(Op,"MapViewDisableImageFlippingForAllPolygonsCall");var ad=Op,Sp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:drawPath-call"),this.event_properties=e}};s(Sp,"MapViewDrawPathCall");var od=Sp,Ap=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:enableImageFlippingForAllLocations-call"),this.event_properties=e}};s(Ap,"MapViewEnableImageFlippingForAllLocationsCall");var sd=Ap,Cp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:enableImageFlippingForPolygon-call"),this.event_properties=e}};s(Cp,"MapViewEnableImageFlippingForPolygonCall");var ud=Cp,Lp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:getNearestNodeByScreenCoordinates-call"),this.event_properties=e}};s(Lp,"MapViewGetNearestNodeByScreenCoordinatesCall");var ld=Lp,jp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:getPolygonAtCoordinate-call"),this.event_properties=e}};s(jp,"MapViewGetPolygonAtCoordinateCall");var cd=jp,Np=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:getPrimaryLocationForPolygon-call"),this.event_properties=e}};s(Np,"MapViewGetPrimaryLocationForPolygonCall");var dd=Np,Fp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:labelAllLocations-call"),this.event_properties=e}};s(Fp,"MapViewLabelAllLocationsCall");var pd=Fp,Dp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeAllInteractivePolygons-call"),this.event_properties=e}};s(Dp,"MapViewRemoveAllInteractivePolygonsCall");var fd=Dp,Rp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeAllMarkers-call"),this.event_properties=e}};s(Rp,"MapViewRemoveAllMarkersCall");var hd=Rp,zp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeAllPaths-call"),this.event_properties=e}};s(zp,"MapViewRemoveAllPathsCall");var md=zp,Bp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeAllTooltips-call"),this.event_properties=e}};s(Bp,"MapViewRemoveAllTooltipsCall");var gd=Bp,Vp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeInteractivePolygon-call"),this.event_properties=e}};s(Vp,"MapViewRemoveInteractivePolygonCall");var vd=Vp,qp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeMarker-call"),this.event_properties=e}};s(qp,"MapViewRemoveMarkerCall");var yd=qp,Gp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removePath-call"),this.event_properties=e}};s(Gp,"MapViewRemovePathCall");var bd=Gp,Up=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeTooltip-call"),this.event_properties=e}};s(Up,"MapViewRemoveTooltipCall");var wd=Up,Yp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setBackgroundColor-call"),this.event_properties=e}};s(Yp,"MapViewSetBackgroundColorCall");var kd=Yp,Wp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setHoverColor-call"),this.event_properties=e}};s(Wp,"MapViewSetHoverColorCall");var _d=Wp,$p=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setMap-call"),this.event_properties=e}};s($p,"MapViewSetMapCall");var Md=$p,Hp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setPolygonColor-call"),this.event_properties=e}};s(Hp,"MapViewSetPolygonColorCall");var xd=Hp,Xp=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setState-call"),this.event_properties=e}};s(Xp,"MapViewSetStateCall");var Ed=Xp,Kp=class{constructor(e){this.event_properties=e,g(this,"event_type","metrics:mapLoad-event"),this.event_properties=e}};s(Kp,"MetricsMapLoadEvent");var Td=Kp,Jp=class{constructor(e){this.event_properties=e,g(this,"event_type","OfflineSearch:addQuery-call"),this.event_properties=e}};s(Jp,"OfflineSearchAddQueryCall");var ia=Jp,Zp=class{constructor(e){this.event_properties=e,g(this,"event_type","OfflineSearch:constructor-call"),this.event_properties=e}};s(Zp,"OfflineSearchConstructorCall");var aa=Zp,Qp=class{constructor(e){this.event_properties=e,g(this,"event_type","OfflineSearch:search-call"),this.event_properties=e}};s(Qp,"OfflineSearchSearchCall");var oa=Qp,ef=class{constructor(e){this.event_properties=e,g(this,"event_type","OfflineSearch:suggest-call"),this.event_properties=e}};s(ef,"OfflineSearchSuggestCall");var sa=ef,Xs=s((()=>({promise:Promise.resolve()})),"getVoidPromiseResult"),tf=class{constructor(){g(this,"disabled",!1),g(this,"amplitude")}get client(){return this.isInitializedAndEnabled(),this.amplitude}get isLoaded(){return null!=this.amplitude}isInitializedAndEnabled(){return this.amplitude?!this.disabled:(console.error("ERROR: Ampli is not yet initialized. Have you called ampli.load() on app start?"),!1)}load(e){var t,n;if(this.disabled=null!=(t=e.disabled)&&t,this.amplitude)return console.warn("WARNING: Ampli is already intialized. Ampli.load() should be called once at application startup."),Xs();let r=null;if(e.client&&"apiKey"in e.client?r=e.client.apiKey:"environment"in e&&(r=Id[e.environment]),e.client&&"instance"in e.client)this.amplitude=e.client.instance;else{if(r)return this.amplitude=Hs(),this.amplitude.init(r,void 0,{...Ar,...null!=(null==e?void 0:e.client)&&"configuration"in e.client?null==(n=e.client)?void 0:n.configuration:{}});console.error("ERROR: ampli.load() requires 'environment', 'client.apiKey', or 'client.instance'")}return Xs()}identify(e,t,n){if(!this.isInitializedAndEnabled())return Xs();e&&(n={...n,user_id:e});let r=new It,i=t;if(null!=i)for(let[e,t]of Object.entries(i))r.set(e,t);return this.amplitude.identify(r,n)}track(e,t){return this.isInitializedAndEnabled()?this.amplitude.track(e,void 0,t):Xs()}analyticsCategorySelectedCall(e,t){return this.track(new Wi(e),t)}analyticsLocationSelectedCall(e,t){return this.track(new $i(e),t)}blueDotDisableCall(e,t){return this.track(new vc(e),t)}blueDotEnableCall(e,t){return this.track(new yc(e),t)}blueDotOffCall(e,t){return this.track(new bc(e),t)}blueDotOnCall(e,t){return this.track(new wc(e),t)}cameraAnimateCall(e,t){return this.track(new kc(e),t)}cameraCancelAnimationCall(e,t){return this.track(new _c(e),t)}cameraFocusOnCall(e,t){return this.track(new Mc(e),t)}cameraGetSafeAreaInsetsCall(e,t){return this.track(new xc(e),t)}cameraInteractionDisableCall(e,t){return this.track(new Ec(e),t)}cameraInteractionEnableCall(e,t){return this.track(new Tc(e),t)}cameraSetCall(e,t){return this.track(new Pc(e),t)}cameraSetSafeAreaInsetsCall(e,t){return this.track(new Ic(e),t)}cameraTranslateCall(e,t){return this.track(new Oc(e),t)}flatLabelsAddCall(e,t){return this.track(new Sc(e),t)}flatLabelsLabelAllLocationsCall(e,t){return this.track(new Ac(e),t)}flatLabelsRemoveCall(e,t){return this.track(new Cc(e),t)}flatLabelsRemoveAllCall(e,t){return this.track(new Lc(e),t)}flatLabelsSetAppearanceCall(e,t){return this.track(new jc(e),t)}floatingLabelsAddCall(e,t){return this.track(new Nc(e),t)}floatingLabelsLabelAllLocationsCall(e,t){return this.track(new Fc(e),t)}floatingLabelsRemoveCall(e,t){return this.track(new Dc(e),t)}floatingLabelsRemoveAllCall(e,t){return this.track(new Rc(e),t)}floatingLabelsResetPriorityCall(e,t){return this.track(new zc(e),t)}floatingLabelsSetAppearanceCall(e,t){return this.track(new Bc(e),t)}floatingLabelsSetPriorityCall(e,t){return this.track(new Vc(e),t)}globalGetVenueCall(e,t){return this.track(new Hi(e),t)}globalGetVenueMvfCall(e,t){return this.track(new Xi(e),t)}globalShowVenueCall(e,t){return this.track(new qc(e),t)}journeyClearCall(e,t){return this.track(new Gc(e),t)}journeyDrawCall(e,t){return this.track(new Uc(e),t)}journeySetStepCall(e,t){return this.track(new Yc(e),t)}mappedinGetCollectionItemByIdCall(e,t){return this.track(new Wc(e),t)}mappedinCoordinateAbsoluteDistanceToCall(e,t){return this.track(new $c(e),t)}mappedinCoordinateNearestNodeCall(e,t){return this.track(new Hc(e),t)}mappedinLocationCloneCall(e,t){return this.track(new Ki(e),t)}mappedinLocationDirectionsToCall(e,t){return this.track(new Ji(e),t)}mappedinLocationDistanceToCall(e,t){return this.track(new Zi(e),t)}mappedinMapCreateCoordinateCall(e,t){return this.track(new Xc(e),t)}mappedinMapCreateCoordinateByXyCall(e,t){return this.track(new Kc(e),t)}mappedinMapGetNorthCall(e,t){return this.track(new Jc(e),t)}mappedinNodeDirectionsToCall(e,t){return this.track(new Qi(e),t)}mappedinNodeDistanceToCall(e,t){return this.track(new ea(e),t)}mappedinPolygonDirectionsToCall(e,t){return this.track(new ta(e),t)}mappedinPolygonDistanceToCall(e,t){return this.track(new na(e),t)}mappedinVenueMetadataRead(e,t){return this.track(new ra(e),t)}mapViewAddInteractivePolygonCall(e,t){return this.track(new Zc(e),t)}mapViewAddInteractivePolygonsForAllLocationsCall(e,t){return this.track(new Qc(e),t)}mapViewClearPolygonColorCall(e,t){return this.track(new ed(e),t)}mapViewCreateCustomTooltipCall(e,t){return this.track(new td(e),t)}mapViewCreateMarkerCall(e,t){return this.track(new nd(e),t)}mapViewCreateTooltipCall(e,t){return this.track(new rd(e),t)}mapViewDestroyCall(e,t){return this.track(new id(e),t)}mapViewDisableImageFlippingForAllPolygonsCall(e,t){return this.track(new ad(e),t)}mapViewDrawPathCall(e,t){return this.track(new od(e),t)}mapViewEnableImageFlippingForAllLocationsCall(e,t){return this.track(new sd(e),t)}mapViewEnableImageFlippingForPolygonCall(e,t){return this.track(new ud(e),t)}mapViewGetNearestNodeByScreenCoordinatesCall(e,t){return this.track(new ld(e),t)}mapViewGetPolygonAtCoordinateCall(e,t){return this.track(new cd(e),t)}mapViewGetPrimaryLocationForPolygonCall(e,t){return this.track(new dd(e),t)}mapViewLabelAllLocationsCall(e,t){return this.track(new pd(e),t)}mapViewRemoveAllInteractivePolygonsCall(e,t){return this.track(new fd(e),t)}mapViewRemoveAllMarkersCall(e,t){return this.track(new hd(e),t)}mapViewRemoveAllPathsCall(e,t){return this.track(new md(e),t)}mapViewRemoveAllTooltipsCall(e,t){return this.track(new gd(e),t)}mapViewRemoveInteractivePolygonCall(e,t){return this.track(new vd(e),t)}mapViewRemoveMarkerCall(e,t){return this.track(new yd(e),t)}mapViewRemovePathCall(e,t){return this.track(new bd(e),t)}mapViewRemoveTooltipCall(e,t){return this.track(new wd(e),t)}mapViewSetBackgroundColorCall(e,t){return this.track(new kd(e),t)}mapViewSetHoverColorCall(e,t){return this.track(new _d(e),t)}mapViewSetMapCall(e,t){return this.track(new Md(e),t)}mapViewSetPolygonColorCall(e,t){return this.track(new xd(e),t)}mapViewSetStateCall(e,t){return this.track(new Ed(e),t)}metricsMapLoadEvent(e,t){return this.track(new Td(e),t)}offlineSearchAddQueryCall(e,t){return this.track(new ia(e),t)}offlineSearchConstructorCall(e,t){return this.track(new aa(e),t)}offlineSearchSearchCall(e,t){return this.track(new oa(e),t)}offlineSearchSuggestCall(e,t){return this.track(new sa(e),t)}};s(tf,"Ampli");var Pd=tf,ua=new Pd;v();var fn,fr,Ot,Rr,Ut,mu,Oy,gu,Sy,ba,Tf,wa,Pf,St,Ty=Rt(Xv()),Py=Rt(xy()),Iy=Rt(Gs()),Ey="5.46.0",X1="https://api2.amplitude.com/2/httpapi",K1="https://api2.amplitude.com/batch",J1="__unspecified__",xf={branch:"main",version:"0",source:"websdk"},Ke=class e{constructor(){S(this,mu),S(this,gu),S(this,ba),S(this,wa),S(this,Ot,{}),S(this,Rr,!1),S(this,Ut,void 0),S(this,St,s((async e=>{Q1(e.type)&&(window.removeEventListener("visibilitychange",b(this,St)),window.removeEventListener("pagehide",b(this,St)),window.removeEventListener("beforeunload",b(this,St)),window.removeEventListener("unload",b(this,St)),await this.sendAllPendingEvents())}),"#handlePageUnload")),null==b(e,fr)&&L(e,fr,Ey),typeof navigator<"u"&&null!=navigator.userAgent&&L(this,Ut,new Iy.UAParser(navigator.userAgent).getResult())}static setContext(t){L(e,fn,t)}static setVersion(t){L(e,fr,t)}addPendingEvent(t){var n;if(null==b(e,fn))return;let r=t.event_type;if(!ge(this,gu,Sy).call(this,t))return;null==t.event_properties&&(t.event_properties={});let i=b(this,Ot)[r];(0,Py.default)(t.event_properties,null!=(n=null==i?void 0:i.event_properties)?n:{}),b(this,Ot)[r]=t}async sendAllPendingEvents(){if(null==b(e,fn)||Object.keys(b(this,Ot)).length<1)return;if(b(this,Rr))return void R.warn("The current batch of analytics is already sending. Wait until this finishes before trying to send again.");let t=[];for(let e in b(this,Ot)){let n=b(this,Ot)[e],r=ge(this,ba,Tf).call(this,n);null!=r&&t.push(r)}if(!(t.length<1))try{L(this,Rr,!0),200===(await ge(this,wa,Pf).call(this,K1,t)).status&&L(this,Ot,{})}catch(e){R.warn("Error sending batch product analytics!",e)}finally{L(this,Rr,!1)}}async load(){if(!ua.isLoaded){let{promise:e}=ua.load({environment:"production",client:{configuration:{trackingOptions:{osName:!0}}}});e.then((()=>{window.addEventListener("pagehide",b(this,St)),window.addEventListener("beforeunload",b(this,St)),window.addEventListener("unload",b(this,St)),window.addEventListener("visibilitychange",b(this,St))}))}}async sendEventNow(t){if(null==b(e,fn))return;let n=ge(this,ba,Tf).call(this,t);if(null!=n)try{await ge(this,wa,Pf).call(this,X1,[n])}catch(e){R.warn("Error sending single product analytics event!",e)}}};fn=new WeakMap,fr=new WeakMap,Ot=new WeakMap,Rr=new WeakMap,Ut=new WeakMap,mu=new WeakSet,Oy=s((function(e){let t=e.event_type;return null!=b(this,Ot)[t]}),"#isEventTypePending"),gu=new WeakSet,Sy=s((function(e){if(!ge(this,mu,Oy).call(this,e))return!0;let t=e.event_type,n=b(this,Ot)[t];return!(0,Ty.default)(n.event_properties,e.event_properties)}),"#didEventPropertiesChange"),ba=new WeakSet,Tf=s((function(e){var t,n,r,i,o,s,a,l,u,c,h,d,p,f,g,v,y;if(null!=b(Ke,fn))return null==(null==(t=e.event_properties)?void 0:t.venue)&&R.warn("Error processing product analytics event! Unspecified venue slug",e),null==Ar.plan&&R.warn("Error processing product analytics event! Unknown coinfiguration plan",e),{event_type:e.event_type,session_id:null!=(n=ua.client.getSessionId())?n:yu(),device_id:null!=(r=ua.client.getDeviceId())?r:vu(),plan:{branch:null!=(o=null==(i=Ar.plan)?void 0:i.branch)?o:xf.branch,version:null!=(a=null==(s=Ar.plan)?void 0:s.version)?a:xf.version,source:null!=(u=null==(l=Ar.plan)?void 0:l.source)?u:xf.source},os_name:null==(c=b(this,Ut))?void 0:c.browser.name,os_version:null==(h=b(this,Ut))?void 0:h.browser.version,device_manufacturer:null==(d=b(this,Ut))?void 0:d.device.vendor,device_model:null==(p=b(this,Ut))?void 0:p.device.model,event_properties:{...e.event_properties,context:b(Ke,fn),sdk_version:b(Ke,fr),browser_name:null==(f=b(this,Ut))?void 0:f.browser.name,browser_version:null==(g=b(this,Ut))?void 0:g.browser.version,venue:null!=(y=null==(v=e.event_properties)?void 0:v.venue)?y:J1},time:e.time}}),"#makeBatchFormattedEvent"),wa=new WeakSet,Pf=s((async function(e,t){return await it()(e,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify({api_key:Id.production,events:t})})}),"#batchSend"),St=new WeakMap,s(Ke,"ProductAnalytics"),S(Ke,fn,void 0),S(Ke,fr,void 0);var Ef=Ke,Z1=new Ef,ye=Z1;function Q1(e){return"beforeunload"===e||"pagehide"===e||"unload"===e||"hidden"===document.visibilityState}s(Q1,"areWeLeavingThePage");var yt,zr,Ve,_a,zn=class e extends Vt{constructor(t,n){super(t),g(this,"__type",e.__type),S(this,yt,void 0),S(this,zr,void 0),S(this,Ve,{}),g(this,"id",""),g(this,"x",0),g(this,"y",0),g(this,"operationHours"),g(this,"externalId"),S(this,_a,void 0),L(this,yt,t),L(this,zr,n);let r=Object.assign({},n);delete r.map,Object.assign(this,r)}static is(t){return t.__type===e.__type}get map(){let e=b(this,Ve).map;if(typeof e<"u")return e;let t=b(this,yt).getCollectionItemById("maps",b(this,zr).map);return b(this,Ve).map=t,t}get lat(){var e;let t=b(this,Ve).cachedLatLon;if(null!=t)return t.lat;let n=null==(e=b(this,yt)._mapsById)?void 0:e[this.map.id];if(null==n)throw new Error("Map not found");return b(this,Ve).cachedLatLon=n.createCoordinateByXY(this.x,this.y),b(this,Ve).cachedLatLon.lat}get lon(){var e;let t=b(this,Ve).cachedLatLon;if(null!=t)return t.lon;let n=null==(e=b(this,yt)._mapsById)?void 0:e[this.map.id];if(null==n)throw new Error("Map not found");return b(this,Ve).cachedLatLon=n.createCoordinateByXY(this.x,this.y),b(this,Ve).cachedLatLon.lon}get paths(){let e=b(this,Ve).paths;if(typeof e<"u")return e;let t=[],n=b(this,yt)._nodesById,r=b(this,_a);if(Array.isArray(r))for(let e=0,i=r.length;e<i;++e){let i=n[r[e].node];null!=i&&t.push(i)}return b(this,Ve).paths=t,t}set paths(e){L(this,_a,e)}get locations(){var e,t,n;let r=b(this,Ve).locations;if(typeof r<"u")return r;let i=[],o=null!=(n=null==(t=null==(e=qe.instances.get(b(this,yt)))?void 0:e.locationsByMapId)?void 0:t.get(this.map.id))?n:[],s=this.id;for(let e=0,t=o.length;e<t;++e){let t=o[e],n=t.nodes;if(Array.isArray(n))for(let e=0,r=n.length;e<r;++e)if(n[e].id===s){i.push(t);break}}return b(this,Ve).locations=i,i}get polygon(){var e,t,n,r;let i=b(this,Ve).polygon;if(typeof i<"u")return i;let o,s=null!=(r=null==(n=null==(e=qe.instances.get(b(this,yt)))?void 0:e.polygonsByMapId)?void 0:n.get(null==(t=null==this?void 0:this.map)?void 0:t.id))?r:[],a=this.id;for(let e=0,t=s.length;e<t;++e){let t=s[e];t.entrances.map((e=>e.id)).includes(a)&&(o=t)}return b(this,Ve).polygon=o,o}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){let n=t.options.things.nodes.slice();t.options.things.maps&&_e(n,"map"),["weight","multiplier","accessible"].forEach((function(e){_e(n,e)}));let r={fields:n,venue:t.options.venue};try{return(await Me(t.options,"node",r)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Nodes:",e),[]}}directionsTo(e,t){let n=e instanceof mt,r=b(this,yt).venue.slug,i=new Qi({with_destination_set:n||void 0,venue:r});return ye.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=b(this,yt).venue.slug;return ye.addPendingEvent(new ea({venue:n})),super.distanceTo(e,t)}toJSON(){return b(this,zr)}};yt=new WeakMap,zr=new WeakMap,Ve=new WeakMap,_a=new WeakMap,s(zn,"MappedinNode"),g(zn,"__type","MappedinNode");var ka=zn;v();var Yt,Br,bt,xa,Bn=class e extends Vt{constructor(t,n){super(t),g(this,"__type",e.__type),S(this,Yt,void 0),S(this,Br,void 0),S(this,bt,{}),g(this,"geometry"),g(this,"perspectives"),g(this,"image"),g(this,"holes"),g(this,"textures"),g(this,"material"),g(this,"label"),g(this,"id",""),g(this,"layer"),g(this,"layerId"),g(this,"name"),g(this,"externalId"),g(this,"vertexes"),g(this,"center"),g(this,"canvasBounds"),g(this,"categoryRank"),S(this,xa,void 0),g(this,"boundingBox",null),L(this,Yt,t),L(this,Br,n);let r=Object.assign({},n);delete r.map,Object.assign(this,r)}static is(t){return t.__type===e.__type}get map(){let e=b(this,bt).map;if(typeof e<"u")return e;let t=b(this,Yt).getCollectionItemById("maps",b(this,Br).map);return b(this,bt).map=t,t}get locations(){var e,t;let n=b(this,bt).locations;if(typeof n<"u")return n;let r=[],i=null!=(t=null==(e=qe.instances.get(b(this,Yt)))?void 0:e.locationsByMapId.get(this.map.id))?t:[],{id:o}=this;for(let e=0,t=i.length;e<t;++e){let t=i[e],n=t.polygons;if(Array.isArray(n))for(let e=0,i=n.length;e<i;++e)if(n[e].id===o){r.push(t);break}}return b(this,bt).locations=r,r}get entrances(){let e=b(this,bt).entrances;if(typeof e<"u")return e;let t=[],n=b(this,xa),r=b(this,Yt)._nodesById;if(Array.isArray(n)){for(let e=0,i=n.length;e<i;++e){let i=r[n[e].id];null!=i&&t.push(i)}return b(this,bt).entrances=t,t}return[]}set entrances(e){L(this,xa,e)}get rank(){let e=b(this,bt).rank;if(typeof e<"u")return e;let{rankings:t}=b(this,Yt);if(!t||!t.polygons)return null;let n=t.polygons.find((e=>e.polygonId===this.id));return n?(b(this,bt).rank={score:n.score,node:n.entranceNodeId},{score:n.score,node:n.entranceNodeId}):(b(this,bt).rank=null,null)}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){let n=t.options.things.polygons.slice();t.options.things.maps&&_e(n,"map"),t.options.things.nodes&&_e(n,"entrances");let r={fields:n,venue:t.options.venue};try{return(await Me(t.options,"polygon",r)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Polygons:",e),[]}}directionsTo(e,t){let n=e instanceof mt,r=b(this,Yt).venue.slug,i=new ta({with_destination_set:n||void 0,venue:r});return ye.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=b(this,Yt).venue.slug;return ye.addPendingEvent(new na({venue:n})),super.distanceTo(e,t)}containsCoordinate(e){let t=e;e.map!==this.map&&(t=this.map.createCoordinate(e.lat,e.lon));let{x:n,y:r}=t,{vertexes:i}=this;if(!i)return!1;if(null==this.boundingBox){let e=Math.min(...i.map((e=>e.x))),t=Math.max(...i.map((e=>e.x))),n=Math.min(...i.map((e=>e.y))),r=Math.max(...i.map((e=>e.y)));this.boundingBox={minX:e,minY:n,maxX:t,maxY:r}}if(n<this.boundingBox.minX||n>this.boundingBox.maxX||r<this.boundingBox.minY||r>this.boundingBox.maxY)return!1;let o=!1;for(let e=0,t=i.length-1;e<i.length;t=e++){let s=i[e].x,a=i[e].y,l=i[t].x,u=i[t].y;a>r!=u>r&&n<(l-s)*(r-a)/(u-a)+s&&(o=!o)}return o}toJSON(){return b(this,Br)}};Yt=new WeakMap,Br=new WeakMap,bt=new WeakMap,xa=new WeakMap,s(Bn,"MappedinPolygon"),g(Bn,"__type","MappedinPolygon");var hr=Bn;v();var eP=0,tP="9999-12-31T00:00:00.000Z";function nP(e,t,n=new Date){if(!e.states)return;let r=n||new Date,i=e.states.find((e=>{let t=new Date(e.start||eP),n=new Date(e.end||tP);return t<r&&n>r}));return i?t.find((e=>e.value===i.type)):void 0}s(nP,"getCurrentLocationState");var Ne,Ye,Je,Ea,Ta,Pa,Ay=["name","description","shortName","tags"],wt=class e extends Vt{constructor(t,n){super(t),g(this,"__type",e.__type),S(this,Ne,void 0),S(this,Ye,void 0),S(this,Je,{}),g(this,"states"),g(this,"id",""),g(this,"name",""),g(this,"type",""),g(this,"description"),g(this,"sortOrder"),g(this,"logo"),g(this,"phone"),g(this,"social"),g(this,"color"),g(this,"shortName"),g(this,"detailsUrl"),g(this,"tags"),g(this,"toMap"),g(this,"externalId"),g(this,"showLabelWhenImagePresent"),g(this,"showSmartLabelWhenImagePresent"),g(this,"picture"),g(this,"operationHours"),g(this,"siblingGroups"),g(this,"gallery"),g(this,"amenity"),g(this,"filterFlags"),S(this,Ea,void 0),S(this,Ta,[]),S(this,Pa,void 0),L(this,Ne,t),L(this,Ye,n);let r=Object.assign({},n);delete r.categories,Object.assign(this,r)}static is(t){return t.__type===e.__type}get polygons(){let e=b(this,Je).polygons;if(typeof e<"u")return e;let t=[],n=b(this,Ea),r=b(this,Ne)._polygonsById;if(Array.isArray(n))for(let e=0,i=n.length;e<i;++e){let i=r[n[e].id];null!=i&&t.push(i)}return b(this,Je).polygons=t,t}set polygons(e){L(this,Ea,e)}get nodes(){let e=b(this,Je).nodes;if(typeof e<"u")return e;let t=[],n=b(this,Ta),r=b(this,Ne)._nodesById;if(n&&n.length)for(let e=0,i=n.length;e<i;++e){let i=r[n[e].node];null!=i&&t.push(i)}return b(this,Je).nodes=t,t}set nodes(e){L(this,Ta,e)}get parent(){let e=b(this,Je).parent;if(typeof e<"u")return e;let t,n=b(this,Ne)._locationsById,r=b(this,Pa);return void 0!==r&&(t=n[r]),b(this,Je).parent=t,t}set parent(e){L(this,Pa,e)}get instances(){let t=b(this,Je).instances;if(typeof t<"u")return t;let n=[];for(let t of b(this,Ye).polygons)if(Object.keys(t).length>2){let{id:r,map:i,...o}=t,s=b(this,Ne).getCollectionItemById("polygons",r),a=null!=s&&Array.isArray(null==s?void 0:s.entrances)&&s.entrances.length>0?s.entrances.map((e=>({node:e.id,map:e.map}))):[];n.push(new e(b(this,Ne),{...b(this,Ye),...o,parent:this.id,nodes:a,polygons:[t]}))}for(let t of b(this,Ye).nodes)if(Object.keys(t).length>2){let{node:r,map:i,...o}=t,s=b(this,Ne).getCollectionItemById("nodes",r),a=null!=s&&s.polygon?[{id:s.polygon.id,map:s.polygon.map}]:[];n.push(new e(b(this,Ne),{...b(this,Ye),...o,parent:this.id,nodes:[{node:r,map:i}],polygons:a}))}return b(this,Je).instances=n,n}get categories(){let e=b(this,Je).categories;if(typeof e<"u")return e;let t=[];return b(this,Ye).categories.forEach((e=>{let n=b(this,Ne).getCollectionItemById("categories",e);n&&t.push(n)})),b(this,Je).categories=t,t}get state(){return nP(this,b(this,Ne).locationStates)}clone(){let t=b(this,Ne).venue.slug;return ye.addPendingEvent(new Ki({venue:t})),new e(b(this,Ne),b(this,Ye))}get nodeOperationHours(){let e=b(this,Je).nodeOperationHours;if(typeof e<"u")return e;if(null==this.nodes)return{};let t=b(this,Ye).nodes.reduce(((e,t)=>(null!=t.operationHours&&(e[t.node]=t.operationHours),e)),{});return b(this,Je).nodeOperationHours=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r,i=n||await e.fetch(t);for(let e=0;e<i.length;e++){r=t.locations[e];for(let t of Ay)r[t]=i[e][t]}}static async fetch(t){let n=t.options.things.locations.slice();t.options.things.categories&&_e(n,"categories"),t.options.things.nodes&&_e(n,"nodes"),t.options.things.polygons&&_e(n,"polygons"),t.options.things.locationStates&&_e(n,"states");let r={fields:n,venue:t.options.venue};try{let n=await Me(t.options,"location",r);return t.options.includeHidden||(n=n.filter((e=>!e.hidden))),n.map((n=>new e(t,n)))}catch(e){return R.error("Fetch Locations:",e),[]}}directionsTo(e,t){let n=e instanceof mt,r=b(this,Ne).venue.slug,i=new Ji({with_destination_set:n||void 0,venue:r});return ye.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=b(this,Ne).venue.slug;return ye.addPendingEvent(new Zi({venue:n})),super.distanceTo(e,t)}toJSON(){let e={...b(this,Ye)};for(let t of Ay)e[t]=this[t];delete e.color;let t=[],n=[];if(b(this,Ye).polygons)for(let e of b(this,Ye).polygons)if(e&&Object.keys(e).some((e=>"id"!==e&&"map"!==e))){let{id:t,map:r}=e,i=b(this,Ne).getCollectionItemById("polygons",t),o=null!=i&&Array.isArray(null==i?void 0:i.entrances)&&i.entrances.length>0?i.entrances.map((e=>({node:e.id,map:e.map.id}))):[];n.push({type:"polygon",mapId:r,nodeOrPolygonId:t,nodes:o,polygons:[{id:t,type:"polygon"}],description:null==e?void 0:e.description,externalId:null==e?void 0:e.externalId,operationalHours:null==e?void 0:e.operationHours,siblingGroup:null==e?void 0:e.siblingGroup})}if(n.length>0&&(e.polygonInstances=n),b(this,Ye).nodes)for(let e of b(this,Ye).nodes)if(e&&Object.keys(e).some((e=>"node"!==e&&"map"!==e))){let{node:n,map:r}=e,i=b(this,Ne).getCollectionItemById("nodes",n),o=null!=i&&i.polygon?{id:i.polygon.id,map:i.polygon.map.id}:void 0;t.push({type:"node",mapId:r,nodeOrPolygonId:n,nodes:[{node:n,map:r}],...(null==o?void 0:o.id)&&{polygons:[{id:o.id,type:"polygon"}]},description:null==e?void 0:e.description,externalId:null==e?void 0:e.externalId,operationalHours:null==e?void 0:e.operationHours,siblingGroup:null==e?void 0:e.siblingGroup})}return t.length>0&&(e.nodeInstances=t),e}};Ne=new WeakMap,Ye=new WeakMap,Je=new WeakMap,Ea=new WeakMap,Ta=new WeakMap,Pa=new WeakMap,s(wt,"MappedinLocation"),g(wt,"__type","MappedinLocation");var hn=wt;v();var Vr,mr,Ia,Cy=["name"],mn=class e{constructor(t,n){g(this,"__type",e.__type),S(this,Vr,void 0),S(this,mr,{}),S(this,Ia,void 0),g(this,"name"),g(this,"externalId"),g(this,"parents"),g(this,"id"),g(this,"icon"),g(this,"iconFromDefaultList"),g(this,"sortOrder"),this.id=n.id,L(this,Ia,n),L(this,Vr,t),Object.assign(this,n)}static is(t){return t.__type===e.__type}get locations(){var e;let t=b(this,mr).locations;if(typeof t<"u")return t;let n=[],{locations:r}=b(this,Vr),{id:i}=this;for(let t=0,o=r.length;t<o;++t){let o=r[t],s=o.categories;if(Array.isArray(s))for(let t=0,r=s.length;t<r;++t)if((null==(e=s[t])?void 0:e.id)===i){n.push(o);break}}return b(this,mr).locations=n,n}get children(){var e;let t=b(this,mr).children;if(typeof t<"u")return t;let{categories:n}=b(this,Vr),{id:r}=this,i=[];for(let t=0;t<n.length;t++)r&&null!=(e=n[t].parents)&&e.includes(r)&&i.push(n[t]);return b(this,mr).children=i,i}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Cy)t.categories[e][n]=r[e][n]}static async fetch(t){let n={fields:t.options.things.categories,venue:t.options.venue};try{return(await Me(t.options,"category",n)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Categories:",e),[]}}toJSON(){let e={...b(this,Ia)};for(let t of Cy)e[t]=this[t];return e}};Vr=new WeakMap,mr=new WeakMap,Ia=new WeakMap,s(mn,"MappedinCategory"),g(mn,"__type","MappedinCategory");var gr=mn;v();var Oa,gn,If=class{constructor(e,t){S(this,Oa,void 0),S(this,gn,void 0),g(this,"distance",0),g(this,"path",[]),g(this,"instructions",[]),L(this,gn,e),L(this,Oa,t),this.distance=t.distance,this.instructions=t.instructions.map((e=>{var t,n,r,i,o,s,a,l,u,c,h,d;let p={...e,action:{...e.action},atLocation:null!=(t=e.atLocation)&&t.id?null==(r=null==(n=b(this,gn))?void 0:n._vortexesById)?void 0:r[e.atLocation.id]:void 0,node:null!=(i=e.node)&&i.id?null==(s=null==(o=b(this,gn))?void 0:o._nodesById)?void 0:s[e.node.id]:void 0};if("TakeVortex"===(null==(a=p.action)?void 0:a.type)||"ExitVortex"===(null==(l=p.action)?void 0:l.type)){let e=null==(c=b(this,gn)._mapsById)?void 0:c[null==(u=p.action)?void 0:u.fromMap.id],t=null==(d=b(this,gn)._mapsById)?void 0:d[null==(h=p.action)?void 0:h.toMap.id];e&&t&&(p.action.fromMap=e,p.action.toMap=t)}return p})),this.path=t.path.reduce(((e,{id:t})=>{var n,r;let i=null==(r=null==(n=b(this,gn))?void 0:n._nodesById)?void 0:r[t];return i&&e.push(i),e}),[])}toJSON(){return b(this,Oa)}};Oa=new WeakMap,gn=new WeakMap,s(If,"MappedinDirections");var nr=If;v();var Of=class{constructor(e){g(this,"destinations",[]),this.destinations=e}};s(Of,"MappedinDestinationSet");var mt=Of;v();var Aa,Vn=class e{constructor(t){g(this,"__type",e.__type),g(this,"id",""),S(this,Aa,void 0),g(this,"accessible"),g(this,"name"),g(this,"type"),g(this,"weight"),g(this,"multiplier"),g(this,"nodes"),g(this,"filterFlags"),L(this,Aa,t),Object.assign(this,t)}static is(t){return t.__type===e.__type}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let n=t.options.things.vortexes.slice();["name","type","accessible","weight","multiplier","nodes"].forEach((function(e){_e(n,e)}));let r={fields:n,venue:t.options.venue};try{return(await Me(t.options,"vortex",r)).map((t=>new e(t)))}catch(e){return R.error("Fetch Vortexes:",e),[]}}toJSON(){return b(this,Aa)}};Aa=new WeakMap,s(Vn,"MappedinVortex"),g(Vn,"__type","MappedinVortex");var Sa=Vn;v();var La,ja,Na,qr,Ca=class e{constructor(e,t){S(this,La,void 0),S(this,ja,void 0),S(this,Na,void 0),S(this,qr,{}),g(this,"defaultMap",""),g(this,"address",""),g(this,"city",""),g(this,"countrycode",""),g(this,"externalId",""),g(this,"id",""),g(this,"latitude"),g(this,"logo"),g(this,"longitude"),g(this,"name",""),g(this,"operationHours"),g(this,"postal",""),g(this,"slug",""),g(this,"state",""),g(this,"telephone",""),g(this,"tzid",""),g(this,"tzidOverride",""),g(this,"utcOffset",""),g(this,"website",""),g(this,"secureContentStorage",!1),g(this,"defaultLanguage"),g(this,"languages",[]),g(this,"topLocations",[]),g(this,"renderOptions",{useLivePolygons:!1,simplifyDirections:!1}),L(this,ja,e),L(this,La,t),Object.assign(this,t)}get metadata(){return ye.addPendingEvent(new ra({venue:this.slug})),b(this,Na)}set metadata(e){L(this,Na,e)}static hydrate(t,n){return new e(n,t)}static async fetch(t){let n={fields:t.options.things.venue,slug:t.options.venue,limit:1};try{let r=await Me(t.options,"venue",n);return new e(t,Array.isArray(r)?r[0]:r)}catch(e){return R.error("Fetch Venue:",e),{}}}get isMultiBuilding(){if(null==b(this,qr).isMultiBuilding){let e=b(this,ja).maps,t=e.reduce(((e,t)=>e.add(t.elevation)),new Set),n=e.length!==t.size;b(this,qr).isMultiBuilding=n}return b(this,qr).isMultiBuilding}toJSON(){return b(this,La)}};La=new WeakMap,ja=new WeakMap,Na=new WeakMap,qr=new WeakMap,s(Ca,"MappedinVenue");var vr=Ca;v();var Da,Fa=class e{constructor(e){g(this,"id",""),S(this,Da,void 0),L(this,Da,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let n={fields:t.options.things.themes.slice(),venue:t.options.venue};try{return(await Me(t.options,"apollo-theme",n)).map((t=>new e(t)))}catch(e){return R.error("Fetch Theme:",e),[]}}toJSON(){return b(this,Da)}};Da=new WeakMap,s(Fa,"MappedinTheme");var bu=Fa;v();var Ba,Ra=class e{constructor(e){S(this,Ba,void 0),g(this,"polygons",[]),L(this,Ba,e),Object.assign(this,e)}static hydrate(t){return new e(t)}static async fetch(t){try{let n=await Gr({...t.options,secure:!1},"smart-labels/polygon-label-ranking",{venue:t.options.venue},!0);return new e(n)}catch(e){return R.error("Fetch Rankings:",e),null}}toJSON(){return b(this,Ba)}};Ba=new WeakMap,s(Ra,"MappedinRankings");var za=Ra;v(),v();var qa,Yr,Ga,Ly=["name","description"],Ur=class e{constructor(e,t){S(this,qa,void 0),S(this,Yr,void 0),S(this,Ga,{}),g(this,"id",""),g(this,"type",""),g(this,"name",""),g(this,"description"),g(this,"image"),g(this,"startDate"),g(this,"endDate"),g(this,"showDate"),L(this,Yr,t),L(this,qa,e),Object.assign(this,t)}location(){let e=b(this,Ga).location;if(typeof e<"u")return e;let t,n=b(this,qa)._locationsById,r=b(this,Yr).location;if(null!=r){let e=n[r];null!=e&&(t=e)}return b(this,Ga).location=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Ly)t.events[e][n]=r[e][n]}static async fetch(t){let n=t.options.things.events.slice();t.options.things.locations&&_e(n,"location");let r={fields:n,venue:t.options.venue,activeAtOrAfter:Date.now()};try{return(await Me(t.options,"event",r)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Events:",e),[]}}toJSON(){let e={...b(this,Yr)};for(let t of Ly)e[t]=this[t];return e}};qa=new WeakMap,Yr=new WeakMap,Ga=new WeakMap,s(Ur,"MappedinEvent");var Va=Ur;v();var Ya,jy=["name"],Wr=class e{constructor(e){S(this,Ya,void 0),g(this,"id",""),g(this,"name",""),g(this,"value",""),L(this,Ya,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of jy)t.locationStates[e][n]=r[e][n]}static async fetch(t){let n={fields:t.options.things.locationStates.slice(),venue:t.options.venue};try{return(await Me(t.options,"location-state",n)).map((t=>new e(t)))}catch(e){return R.error("Fetch Location States:",e),[]}}toJSON(){let e={...b(this,Ya)};for(let t of jy)e[t]=this[t];return e}};Ya=new WeakMap,s(Wr,"MappedinLocationState");var Ua=Wr;v(),v(),v();var Ny=" ",Ze=class e{static get separator(){return Ny}static set separator(e){Ny=e}static parse(e){if(!isNaN(parseFloat(e))&&isFinite(e))return Number(e);let t=String(e).trim().replace(/^-/,"").replace(/[NSEW]$/i,"").split(/[^0-9.,]+/);if(""==t[t.length-1]&&t.splice(t.length-1),""==t)return NaN;let n=null;switch(t.length){case 3:n=t[0]/1+t[1]/60+t[2]/3600;break;case 2:n=t[0]/1+t[1]/60;break;case 1:n=t[0];break;default:return NaN}return/^-|[WS]$/i.test(e.trim())&&(n=-n),Number(n)}static toDms(t,n="d",r){if(isNaN(t)||"string"==typeof t&&""==t.trim()||"boolean"==typeof t||t==1/0||null==t)return null;if(void 0===r)switch(n){case"d":case"deg":r=4;break;case"dm":case"deg+min":r=2;break;case"dms":case"deg+min+sec":r=0;break;default:n="d",r=4}t=Math.abs(t);let i=null,o=null,s=null,a=null;switch(n){default:case"d":case"deg":o=t.toFixed(r),o<100&&(o="0"+o),o<10&&(o="0"+o),i=o+"°";break;case"dm":case"deg+min":o=Math.floor(t),s=(60*t%60).toFixed(r),60==s&&(s=(0).toFixed(r),o++),o=("000"+o).slice(-3),s<10&&(s="0"+s),i=o+"°"+e.separator+s+"′";break;case"dms":case"deg+min+sec":o=Math.floor(t),s=Math.floor(3600*t/60)%60,a=(3600*t%60).toFixed(r),60==a&&(a=(0).toFixed(r),s++),60==s&&(s=0,o++),o=("000"+o).slice(-3),s=("00"+s).slice(-2),a<10&&(a="0"+a),i=o+"°"+e.separator+s+"′"+e.separator+a+"″"}return i}static toLat(t,n,r){let i=e.toDms(e.wrap90(t),n,r);return null===i?"–":i.slice(1)+e.separator+(t<0?"S":"N")}static toLon(t,n,r){let i=e.toDms(e.wrap180(t),n,r);return null===i?"–":i+e.separator+(t<0?"W":"E")}static toBrng(t,n,r){let i=e.toDms(e.wrap360(t),n,r);return null===i?"–":i.replace("360","0")}static fromLocale(e){let t=123456.789.toLocaleString(),n={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(n.thousands,"⁜").replace(n.decimal,".").replace("⁜",",")}static toLocale(e){let t=123456.789.toLocaleString(),n={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(/,([0-9])/,"⁜$1").replace(".",n.decimal).replace("⁜",n.thousands)}static compassPoint(t,n=3){if(![1,2,3].includes(Number(n)))throw new RangeError("invalid precision ‘".concat(n,"’"));t=e.wrap360(t);let r=4*2**(n-1);return["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.round(t*r/360)%r*16/r]}static wrap360(e){return 0<=e&&e<360?e:(e%360+360)%360}static wrap180(e){return-180<e&&e<=180?e:(e+540)%360-180}static wrap90(e){return-90<=e&&e<=90?e:Math.abs((e%360+270)%360-180)-90}};s(Ze,"Dms");var Sf=Ze;Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};var Z=Sf,be=Math.PI,K=class e{constructor(e,t){if(isNaN(e))throw new TypeError("invalid lat ‘".concat(e,"’"));if(isNaN(t))throw new TypeError("invalid lon ‘".concat(t,"’"));this._lat=Z.wrap90(Number(e)),this._lon=Z.wrap180(Number(t))}get lat(){return this._lat}get latitude(){return this._lat}set lat(e){if(this._lat=isNaN(e)?Z.wrap90(Z.parse(e)):Z.wrap90(Number(e)),isNaN(this._lat))throw new TypeError("invalid lat ‘".concat(e,"’"))}set latitude(e){if(this._lat=isNaN(e)?Z.wrap90(Z.parse(e)):Z.wrap90(Number(e)),isNaN(this._lat))throw new TypeError("invalid latitude ‘".concat(e,"’"))}get lon(){return this._lon}get lng(){return this._lon}get longitude(){return this._lon}set lon(e){if(this._lon=isNaN(e)?Z.wrap180(Z.parse(e)):Z.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lon ‘".concat(e,"’"))}set lng(e){if(this._lon=isNaN(e)?Z.wrap180(Z.parse(e)):Z.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lng ‘".concat(e,"’"))}set longitude(e){if(this._lon=isNaN(e)?Z.wrap180(Z.parse(e)):Z.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid longitude ‘".concat(e,"’"))}static get metresToKm(){return.001}static get metresToMiles(){return 1/1609.344}static get metresToNauticalMiles(){return 1/1852}static parse(...t){if(0==t.length)throw new TypeError("invalid (empty) point");if(null===t[0]||null===t[1])throw new TypeError("invalid (null) point");let n,r;if(2==t.length&&([n,r]=t,n=Z.wrap90(Z.parse(n)),r=Z.wrap180(Z.parse(r)),isNaN(n)||isNaN(r)))throw new TypeError("invalid point ‘".concat(t.toString(),"’"));if(1==t.length&&"string"==typeof t[0]&&([n,r]=t[0].split(","),n=Z.wrap90(Z.parse(n)),r=Z.wrap180(Z.parse(r)),isNaN(n)||isNaN(r)))throw new TypeError("invalid point ‘".concat(t[0],"’"));if(1==t.length&&"object"==typeof t[0]){let e=t[0];if("Point"==e.type&&Array.isArray(e.coordinates)?[r,n]=e.coordinates:(null!=e.latitude&&(n=e.latitude),null!=e.lat&&(n=e.lat),null!=e.longitude&&(r=e.longitude),null!=e.lng&&(r=e.lng),null!=e.lon&&(r=e.lon),n=Z.wrap90(Z.parse(n)),r=Z.wrap180(Z.parse(r))),isNaN(n)||isNaN(r))throw new TypeError("invalid point ‘".concat(JSON.stringify(t[0]),"’"))}if(isNaN(n)||isNaN(r))throw new TypeError("invalid point ‘".concat(t.toString(),"’"));return new e(n,r)}distanceTo(t,n=6371e3){if(t instanceof e||(t=e.parse(t)),isNaN(n))throw new TypeError("invalid radius ‘".concat(n,"’"));let r=n,i=this.lat.toRadians(),o=this.lon.toRadians(),s=t.lat.toRadians(),a=s-i,l=t.lon.toRadians()-o,u=Math.sin(a/2)*Math.sin(a/2)+Math.cos(i)*Math.cos(s)*Math.sin(l/2)*Math.sin(l/2);return r*(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)))}initialBearingTo(t){if(t instanceof e||(t=e.parse(t)),this.equals(t))return NaN;let n=this.lat.toRadians(),r=t.lat.toRadians(),i=(t.lon-this.lon).toRadians(),o=Math.cos(n)*Math.sin(r)-Math.sin(n)*Math.cos(r)*Math.cos(i),s=Math.sin(i)*Math.cos(r),a=Math.atan2(s,o).toDegrees();return Z.wrap360(a)}finalBearingTo(t){t instanceof e||(t=e.parse(t));let n=t.initialBearingTo(this)+180;return Z.wrap360(n)}midpointTo(t){t instanceof e||(t=e.parse(t));let n=this.lat.toRadians(),r=this.lon.toRadians(),i=t.lat.toRadians(),o=(t.lon-this.lon).toRadians(),s=Math.cos(n),a=0,l=Math.sin(n),u={x:s+Math.cos(i)*Math.cos(o),y:a+Math.cos(i)*Math.sin(o),z:l+Math.sin(i)},c=Math.atan2(u.z,Math.sqrt(u.x*u.x+u.y*u.y)),h=r+Math.atan2(u.y,u.x),d=c.toDegrees(),p=h.toDegrees();return new e(d,p)}intermediatePointTo(t,n){if(t instanceof e||(t=e.parse(t)),this.equals(t))return new e(this.lat,this.lon);let r=this.lat.toRadians(),i=this.lon.toRadians(),o=t.lat.toRadians(),s=t.lon.toRadians(),a=o-r,l=s-i,u=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r)*Math.cos(o)*Math.sin(l/2)*Math.sin(l/2),c=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),h=Math.sin((1-n)*c)/Math.sin(c),d=Math.sin(n*c)/Math.sin(c),p=h*Math.cos(r)*Math.cos(i)+d*Math.cos(o)*Math.cos(s),f=h*Math.cos(r)*Math.sin(i)+d*Math.cos(o)*Math.sin(s),g=h*Math.sin(r)+d*Math.sin(o),v=Math.atan2(g,Math.sqrt(p*p+f*f)),y=Math.atan2(f,p),m=v.toDegrees(),b=y.toDegrees();return new e(m,b)}destinationPoint(t,n,r=6371e3){let i=t/r,o=Number(n).toRadians(),s=this.lat.toRadians(),a=this.lon.toRadians(),l=Math.sin(s)*Math.cos(i)+Math.cos(s)*Math.sin(i)*Math.cos(o),u=Math.asin(l),c=Math.sin(o)*Math.sin(i)*Math.cos(s),h=Math.cos(i)-Math.sin(s)*l,d=a+Math.atan2(c,h),p=u.toDegrees(),f=d.toDegrees();return new e(p,f)}static intersection(t,n,r,i){if(t instanceof e||(t=e.parse(t)),r instanceof e||(r=e.parse(r)),isNaN(n))throw new TypeError("invalid brng1 ‘".concat(n,"’"));if(isNaN(i))throw new TypeError("invalid brng2 ‘".concat(i,"’"));let o=t.lat.toRadians(),s=t.lon.toRadians(),a=r.lat.toRadians(),l=r.lon.toRadians(),u=Number(n).toRadians(),c=Number(i).toRadians(),h=a-o,d=l-s,p=2*Math.asin(Math.sqrt(Math.sin(h/2)*Math.sin(h/2)+Math.cos(o)*Math.cos(a)*Math.sin(d/2)*Math.sin(d/2)));if(Math.abs(p)<Number.EPSILON)return new e(t.lat,t.lon);let f=(Math.sin(a)-Math.sin(o)*Math.cos(p))/(Math.sin(p)*Math.cos(o)),g=(Math.sin(o)-Math.sin(a)*Math.cos(p))/(Math.sin(p)*Math.cos(a)),v=Math.acos(Math.min(Math.max(f,-1),1)),y=Math.acos(Math.min(Math.max(g,-1),1)),m=u-(Math.sin(l-s)>0?v:2*be-v),b=(Math.sin(l-s)>0?2*be-y:y)-c;if(0==Math.sin(m)&&0==Math.sin(b)||Math.sin(m)*Math.sin(b)<0)return null;let w=-Math.cos(m)*Math.cos(b)+Math.sin(m)*Math.sin(b)*Math.cos(p),_=Math.atan2(Math.sin(p)*Math.sin(m)*Math.sin(b),Math.cos(b)+Math.cos(m)*w),M=Math.asin(Math.min(Math.max(Math.sin(o)*Math.cos(_)+Math.cos(o)*Math.sin(_)*Math.cos(u),-1),1)),x=s+Math.atan2(Math.sin(u)*Math.sin(_)*Math.cos(o),Math.cos(_)-Math.sin(o)*Math.sin(M)),I=M.toDegrees(),S=x.toDegrees();return new e(I,S)}crossTrackDistanceTo(t,n,r=6371e3){t instanceof e||(t=e.parse(t)),n instanceof e||(n=e.parse(n));let i=r;if(this.equals(t))return 0;let o=t.distanceTo(this,i)/i,s=t.initialBearingTo(this).toRadians(),a=t.initialBearingTo(n).toRadians();return Math.asin(Math.sin(o)*Math.sin(s-a))*i}alongTrackDistanceTo(t,n,r=6371e3){t instanceof e||(t=e.parse(t)),n instanceof e||(n=e.parse(n));let i=r;if(this.equals(t))return 0;let o=t.distanceTo(this,i)/i,s=t.initialBearingTo(this).toRadians(),a=t.initialBearingTo(n).toRadians(),l=Math.asin(Math.sin(o)*Math.sin(s-a));return Math.acos(Math.cos(o)/Math.abs(Math.cos(l)))*Math.sign(Math.cos(a-s))*i}maxLatitude(e){let t=Number(e).toRadians(),n=this.lat.toRadians();return Math.acos(Math.abs(Math.sin(t)*Math.cos(n))).toDegrees()}static crossingParallels(e,t,n){if(e.equals(t))return null;let r=Number(n).toRadians(),i=e.lat.toRadians(),o=e.lon.toRadians(),s=t.lat.toRadians(),a=t.lon.toRadians()-o,l=Math.sin(i)*Math.cos(s)*Math.cos(r)*Math.sin(a),u=Math.sin(i)*Math.cos(s)*Math.cos(r)*Math.cos(a)-Math.cos(i)*Math.sin(s)*Math.cos(r),c=Math.cos(i)*Math.cos(s)*Math.sin(r)*Math.sin(a);if(c*c>l*l+u*u)return null;let h=Math.atan2(-u,l),d=Math.acos(c/Math.sqrt(l*l+u*u)),p=o+h+d,f=(o+h-d).toDegrees(),g=p.toDegrees();return{lon1:Z.wrap180(f),lon2:Z.wrap180(g)}}rhumbDistanceTo(t,n=6371e3){t instanceof e||(t=e.parse(t));let r=n,i=this.lat.toRadians(),o=t.lat.toRadians(),s=o-i,a=Math.abs(t.lon-this.lon).toRadians();Math.abs(a)>be&&(a=a>0?-(2*be-a):2*be+a);let l=Math.log(Math.tan(o/2+be/4)/Math.tan(i/2+be/4)),u=Math.abs(l)>1e-11?s/l:Math.cos(i);return Math.sqrt(s*s+u*u*a*a)*r}rhumbBearingTo(t){if(t instanceof e||(t=e.parse(t)),this.equals(t))return NaN;let n=this.lat.toRadians(),r=t.lat.toRadians(),i=(t.lon-this.lon).toRadians();Math.abs(i)>be&&(i=i>0?-(2*be-i):2*be+i);let o=Math.log(Math.tan(r/2+be/4)/Math.tan(n/2+be/4)),s=Math.atan2(i,o).toDegrees();return Z.wrap360(s)}rhumbDestinationPoint(t,n,r=6371e3){let i=this.lat.toRadians(),o=this.lon.toRadians(),s=Number(n).toRadians(),a=t/r,l=a*Math.cos(s),u=i+l;Math.abs(u)>be/2&&(u=u>0?be-u:-be-u);let c=Math.log(Math.tan(u/2+be/4)/Math.tan(i/2+be/4)),h=Math.abs(c)>1e-11?l/c:Math.cos(i),d=o+a*Math.sin(s)/h,p=u.toDegrees(),f=d.toDegrees();return new e(p,f)}rhumbMidpointTo(t){t instanceof e||(t=e.parse(t));let n=this.lat.toRadians(),r=this.lon.toRadians(),i=t.lat.toRadians(),o=t.lon.toRadians();Math.abs(o-r)>be&&(r+=2*be);let s=(n+i)/2,a=Math.tan(be/4+n/2),l=Math.tan(be/4+i/2),u=Math.tan(be/4+s/2),c=((o-r)*Math.log(u)+r*Math.log(l)-o*Math.log(a))/Math.log(l/a);isFinite(c)||(c=(r+o)/2);let h=s.toDegrees(),d=c.toDegrees();return new e(h,d)}static areaOf(e,t=6371e3){let n=t,r=e[0].equals(e[e.length-1]);r||e.push(e[0]);let i=e.length-1,o=0;for(let t=0;t<i;t++){let n=e[t].lat.toRadians(),r=e[t+1].lat.toRadians(),i=(e[t+1].lon-e[t].lon).toRadians();o+=2*Math.atan2(Math.tan(i/2)*(Math.tan(n/2)+Math.tan(r/2)),1+Math.tan(n/2)*Math.tan(r/2))}a(e)&&(o=Math.abs(o)-2*be);let s=Math.abs(o*n*n);return r||e.pop(),s;function a(e){let t=0,n=e[0].initialBearingTo(e[1]);for(let r=0;r<e.length-1;r++){let i=e[r].initialBearingTo(e[r+1]),o=e[r].finalBearingTo(e[r+1]);t+=(i-n+540)%360-180,t+=(o-i+540)%360-180,n=o}return t+=(e[0].initialBearingTo(e[1])-n+540)%360-180,Math.abs(t)<90}}equals(t){return t instanceof e||(t=e.parse(t)),!(Math.abs(this.lat-t.lat)>Number.EPSILON||Math.abs(this.lon-t.lon)>Number.EPSILON)}toGeoJSON(){return{type:"Point",coordinates:[this.lon,this.lat]}}toString(e="d",t){if(!["d","dm","dms","n"].includes(e))throw new RangeError("invalid format ‘".concat(e,"’"));if("n"==e)return null==t&&(t=4),"".concat(this.lat.toFixed(t),",").concat(this.lon.toFixed(t));let n=Z.toLat(this.lat,e,t),r=Z.toLon(this.lon,e,t);return"".concat(n,", ").concat(r)}};s(K,"LatLonSpherical");var Wt,qn,$a,Se=K,Fy=["name","shortName","subtitle"],vn=class e{constructor(t,n){g(this,"__type",e.__type),S(this,Wt,void 0),S(this,qn,{}),S(this,$a,void 0),g(this,"id",""),g(this,"group",""),g(this,"name",""),g(this,"shortName",""),g(this,"elevation",0),g(this,"subtitle"),g(this,"scale",0),g(this,"layers"),g(this,"x_scale"),g(this,"perspectiveId"),g(this,"scene"),g(this,"width",0),g(this,"height",0),g(this,"georeference",[]),g(this,"_scale",0),L(this,Wt,t),L(this,$a,n),Object.assign(this,n),this._scale=Dy(this),this.scale=this.x_scale||1/this._scale}static is(t){return t.__type===e.__type}get polygons(){var e,t,n;return null!=(n=null==(t=null==(e=qe.instances.get(b(this,Wt)))?void 0:e.polygonsByMapId)?void 0:t.get(this.id))?n:[]}get locations(){var e,t,n;return null!=(n=null==(t=null==(e=qe.instances.get(b(this,Wt)))?void 0:e.locationsByMapId)?void 0:t.get(this.id))?n:[]}get nodes(){var e,t,n;return null!=(n=null==(t=null==(e=qe.instances.get(b(this,Wt)))?void 0:e.nodesByMapId)?void 0:t.get(this.id))?n:[]}get mapGroup(){let e=b(this,qn).mapGroup;if(typeof e<"u")return e;let t=this.group,n=t&&b(this,Wt)._mapGroupsById[t]||null;return b(this,qn).mapGroup=n,n}createCoordinateByXY(e,t){return new yr({x:e,y:t,map:this,mappedin:b(this,Wt)})}createCoordinate(e,t){return new yr({lat:e,lon:t,map:this,mappedin:b(this,Wt)})}getNorth(){let e;try{let t=this.georeference[0],n=this.georeference[2],r=new Se(t.target.x,t.target.y),i=new Se(n.target.x,n.target.y);e=-((r.finalBearingTo(i)+0)*Math.PI/180-Math.atan2(n.control.y-t.control.y,n.control.x-t.control.x)-Math.PI/2)}catch(t){e=0,R.warn(t),R.warn("Couldn't georeference ".concat(this.name||this.shortName||this.id,". Probably not enough geocoordinates."))}return e}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Fy)t.maps[e][n]=r[e][n]}static async fetch(t){var n;let r=t.options.things.maps.slice();t.options.perspective&&_e(r,"perspectives"),t.options.things.mapGroups&&_e(r,"group"),_e(r,"elevation"),_e(r,"x_scale"),_e(r,"scale"),_e(r,"georeference");let i={fields:r,perspective:t.options.perspective,venue:t.options.venue};try{let a=await Me(t.options,"map",i),l=s((e=>{let t=o.layers.find((t=>t.id===e));t?t.visible=!0:o.layers.push({id:e,visible:!0})}),"setVisibleLayer");for(let i=0,s=a.length;i<s;++i){var o=a[i];if(o){let e=o.perspective;null!=e&&(o.perspectiveId=e.id,r.indexOf("scene")>-1&&(o.scene=e.scene),e.layers?(o.layers.forEach((e=>{e.visible=!1})),e.layers.forEach(l)):o.layers.forEach((e=>{e.visible=!0}))),delete o.perspective}if(t.options.preloadMapGeometry&&null!=(n=o.scene)&&n.polygons&&"string"==typeof o.scene.polygons){let e=await it()(o.scene.polygons);o.scene.polygons=await e.json()}a[i]=new e(t,o)}return a}catch(e){return R.error("Fetch Maps:",e),[]}}get center(){if(b(this,qn).center)return b(this,qn).center;let[e,t]=[this.georeference[0].control.x,this.georeference[0].control.y],[n,r]=[this.georeference[2].control.x,this.georeference[2].control.y],{lat:i,lon:o}=this.createCoordinateByXY(e,t),{lat:s,lon:a}=this.createCoordinateByXY(n,r),l=new Se(i,o),u=new Se(s,a),c=l.midpointTo(u),h=this.createCoordinate(c.lat,c.lon);return b(this,qn).center=h,h}toJSON(){let e={...b(this,$a)};for(let t of Fy)e[t]=this[t];return e}};Wt=new WeakMap,qn=new WeakMap,$a=new WeakMap,s(vn,"MappedinMap"),g(vn,"__type","MappedinMap");var Wa=vn;v();var Ha,Af,Xa,Cf,At,Hr,wu,Ry,ku,zy,$t,Ht,Xt,Kt,$r=class e{constructor(t){S(this,Ha),S(this,Xa),S(this,wu),S(this,ku),g(this,"__type",e.__type),g(this,"map"),S(this,At,{}),S(this,Hr,void 0),S(this,$t,void 0),S(this,Ht,void 0),S(this,Xt,void 0),S(this,Kt,void 0);let{map:n,mappedin:r}=t;null!=t.lat&&null!=t.lon&&(L(this,$t,t.lat),L(this,Ht,t.lon)),null!=t.x&&null!=t.y&&(L(this,Xt,t.x),L(this,Kt,t.y)),this.map=n,L(this,Hr,r)}static is(t){return t.__type===e.__type}get x(){return ge(this,Xa,Cf).call(this,"x")}get y(){return ge(this,Xa,Cf).call(this,"y")}get lat(){return ge(this,Ha,Af).call(this,"lat")}get lon(){return ge(this,Ha,Af).call(this,"lon")}absoluteDistanceTo(e){return By([e.lat,e.lon],[this.lat,this.lon])}get nearestNode(){let e=b(this,At).nearestNode;if(typeof e<"u")return e;let t=qe.instances.get(b(this,Hr)).findNearestNodeOnMap(this.map.id,this);return b(this,At).nearestNode=t,t}nodesInRadius(e){if(e<=0)return R.error("Radius must be greater than 0."),[];let t=b(this,At).radius,n=b(this,At).nodesInRadius;if(t&&n&&b(this,At).radius===e)return b(this,At).nodesInRadius;let r=qe.instances.get(b(this,Hr)).findNodeWithinRadiusOnMap(this.map.id,this,e*this.map._scale);return b(this,At).radius=e,b(this,At).nodesInRadius=r,r}toJSON(){return{x:this.x,y:this.y,map:this.map,lat:this.lat,lon:this.lon}}};Ha=new WeakSet,Af=s((function(e){if(typeof b(this,$t)<"u"&&typeof b(this,Ht)<"u")return b(this,"lat"===e?$t:Ht);if(typeof b(this,Xt)<"u"&&typeof b(this,Kt)<"u"){let[t,n]=ge(this,ku,zy).call(this,b(this,Xt),b(this,Kt));return L(this,$t,t),L(this,Ht,n),b(this,"lat"===e?$t:Ht)}throw Error("MappedinCoordinate is missing x and y")}),"#getLatLon"),Xa=new WeakSet,Cf=s((function(e){if(b(this,Xt)&&b(this,Kt))return b(this,"x"===e?Xt:Kt);if(null!=b(this,$t)&&null!=b(this,Ht)){let[t,n]=ge(this,wu,Ry).call(this,b(this,$t),b(this,Ht));return L(this,Xt,t),L(this,Kt,n),b(this,"x"===e?Xt:Kt)}throw Error("MappedinCoordinate is missing lat and lon")}),"#getXY"),At=new WeakMap,Hr=new WeakMap,wu=new WeakSet,Ry=s((function(e,t){let n=this.map.georeference[0],r=new Se(n.target.x,n.target.y),i=new Se(e,t),o=r.distanceTo(i),s=(r.finalBearingTo(i)+360)%360*Math.PI/180||0,a=o*(1/this.map.scale),l=s+this.map.getNorth(),u=Math.sin(l)*a,c=Math.cos(l)*a;return[n.control.x+u,n.control.y-c]}),"#latLonToXY"),ku=new WeakSet,zy=s((function(e,t){let n,r=this.map.georeference[0],i=new Se(r.target.x,r.target.y),o=e-r.control.x,s=r.control.y-t,a=Math.atan2(o,s);n=0===o&&0===s?0:0===o?s/Math.cos(a):o/Math.sin(a);let l=a-this.map.getNorth(),u=n/this.map._scale,c=i.destinationPoint(u,180*l/Math.PI);return[c.lat,c.lon]}),"#xyToLatLon"),$t=new WeakMap,Ht=new WeakMap,Xt=new WeakMap,Kt=new WeakMap,s($r,"MappedinCoordinate"),g($r,"__type","MappedinCoordinate");var yr=$r;v();var Ja,Xr,Za,Vy=["name"],yn=class e{constructor(t,n){g(this,"__type",e.__type),S(this,Ja,void 0),S(this,Xr,void 0),S(this,Za,{}),g(this,"id",""),g(this,"name",""),L(this,Xr,n),L(this,Ja,t),Object.assign(this,n)}static is(t){return t.__type===e.__type}get maps(){let e=b(this,Za).maps;if(typeof e<"u")return e;let t=[],{maps:n}=b(this,Ja),{id:r}=b(this,Xr);for(let e=0,i=n.length;e<i;++e){let i=n[e];i.group===r&&t.push(i)}return b(this,Za).maps=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Vy)t.mapGroups[e][n]=r[e][n]}static async fetch(t){let n={fields:t.options.things.mapGroups.slice(),venue:t.options.venue};try{return(await Me(t.options,"map-group",n)).map((n=>new e(t,n)))}catch(e){return R.error("Fetch Map Groups:",e),[]}}toJSON(){let e={...b(this,Xr)};for(let t of Vy)e[t]=this[t];return e}};Ja=new WeakMap,Xr=new WeakMap,Za=new WeakMap,s(yn,"MappedinMapGroup"),g(yn,"__type","MappedinMapGroup");var Ka=yn;v();var Wy=Rt(qy());v(),v();var br,Ct,Lt,Lf=[0,4,6,8,10],bn=s((()=>{let e=new Array(16).fill(0),t=4294967296*Math.random();for(let n=0;n<e.length;n++)n>0&&!(3&n)&&(t=4294967296*Math.random()),e[n]=t>>>((3&n)<<3)&255;let n=e.map((e=>e.toString(16).padStart(2,"0")));return n[6]="4"+n[6][1],n[8]=["8","9","a","b"].includes(n[7][0])?n[7]:"a"+n[7][1],Lf.map(((e,t)=>n.slice(e,t===Lf.length-1?void 0:Lf[t+1]).join(""))).join("-")}),"randomId"),Gy="mi-session-data",Uy="mi-local-data",Qa=class e{constructor(){S(this,Ct,void 0),S(this,Lt,void 0);try{let e=sessionStorage.getItem(Gy);L(this,Ct,e?JSON.parse(e):{id:bn()})}catch{L(this,Ct,{id:bn()})}try{let e=localStorage.getItem(Uy);L(this,Lt,e?JSON.parse(e):{deviceId:bn()})}catch{L(this,Lt,{deviceId:bn()})}b(this,Ct).id||(b(this,Ct).id=bn()),b(this,Lt).deviceId||(b(this,Lt).deviceId=bn())}static getInstance(){return b(this,br)||L(this,br,new e),b(this,br)}static ___clearInstance(){L(this,br,void 0)}saveSessionData(e,t){b(this,Ct)[e]=t;try{return sessionStorage.setItem(Gy,JSON.stringify(b(this,Ct))),!0}catch{return!1}}loadSessionData(e){let t=b(this,Ct)[e];if(null!=t)return t}saveLocalData(e,t){b(this,Lt)[e]=t;try{return localStorage.setItem(Uy,JSON.stringify(b(this,Lt))),!0}catch{return!1}}loadLocalData(e){let t=b(this,Lt)[e];if(null!=t)return t}};br=new WeakMap,Ct=new WeakMap,Lt=new WeakMap,s(Qa,"SafeStorage"),S(Qa,br,void 0);var eo=Qa;v();var jf={venue:["slug","name","defaultMap","metadata","countrycode","tzid","logo","externalId","secureContentStorage","languages","topLocations","defaultLanguage","renderOptions"],nodes:["externalId","x","y","paths","accessible","operationHours"],vortexes:["externalId","nodes","types","accessible","filterFlags"],polygons:["vertexes","geometry","canvasBounds","layer","externalId","entrances","material"],locations:["externalId","name","type","picture","description","icon","logo","sortOrder","phone","operationHours","social","color","toMap","tags","shortName","detailsUrl","locationState","metadata","siblingGroups","gallery","showSmartLabelWhenImagePresent","amenity","filterFlags"],categories:["name","color","sortOrder","parents","icon","iconFromDefaultList"],maps:["name","subtitle","elevation","height","width","layers","shortName","scene","group","x_scale"],mapGroups:["name"],themes:["name","themeData"],rankings:["polygons"]};function Mu(e){return/^[\da-f]{24}$/i.test(e)}function Yy(e,t=!1){let n="";if(null!=e){let r="?",i=t?Object.keys(e).filter((e=>!["slug","venue"].includes(e))):Object.keys(e);for(let t=0,o=i.length;t<o;++t){let o=i[t],s=e[o];null!=s&&(n+="".concat(r+encodeURIComponent(o),"=").concat(encodeURIComponent(s)),r="&")}}return n}function rP(e,t,n,r=!1){var i,o;return r?"".concat(e.supplementaryUrl).concat(t,"?venue=").concat(n.venue||n.slug):null!=(i=e.baseUrl)&&i.includes("gateway")?"".concat(e.baseUrl).concat(t,"/").concat(n.venue||n.slug).concat(Yy(n,null==(o=e.baseUrl)?void 0:o.includes("gateway"))):e.baseUrl+t+Yy(n)}async function Me(e,t,n,r=!1){return Gr(e,t,n,r,!0)}async function Gr(e,t,n,r=!1,i=!1){let o=rP(e,t,n,r),s=await xu(e,o,r);if(!i&&Array.isArray(s)){if(1===s.length)return s[0];throw new Error("Invalid response object")}return s}function iP(e,t,n=!1){let r={language:e.language,clientId:e.clientId,clientSecret:e.clientSecret};n&&delete r.language,r.language&&(t+="&lang=".concat(encodeURIComponent(r.language)));let{headers:i}=e;i["Content-Type"]=i["Content-Type"]||"text/json",e.accessToken?i.Authorization="Bearer ".concat(e.accessToken):e.noAuth||e.clientId&&e.clientSecret&&(i["x-mappedin-key"]=btoa(e.clientId),i["x-mappedin-secret"]=btoa(e.clientSecret)),r.language&&(i["Accept-Language"]=r.language);let o={method:"GET",headers:i};return e.secure&&(t+="&withcdntoken"),{req:o,url:t}}async function xu(e,t,n=!1){let r=iP(e,t,n),i=await it()(r.url,r.req);if(!i.ok)throw new Error("".concat(i.status," ").concat(i.statusText));return i.json()}function _e(e,t){e.indexOf(t)<0&&e.push(t)}function By([e,t],[n,r]){let i=new Se(e,t),o=new Se(n,r);return i.distanceTo(o)}function Dy(e){if(e.scale||e.x_scale)return 1/(e.scale||e.x_scale);let t;try{let n=e.georeference[0],r=e.georeference[2],i=new Se(n.target.x,n.target.y),o=new Se(r.target.x,r.target.y),s=i.distanceTo(o),a=n.control.x-r.control.x,l=n.control.y-r.control.y;t=Math.sqrt(a*a+l*l)/s}catch(n){t=1,R.warn(n),R.warn("Couldn't georeference ".concat(e.name||e.shortName||e.id,". Probably not enough geocoordinates."))}return t}function Ni(e){var t;return e instanceof hr?e.entrances.map((e=>e.id)):e instanceof hn?(null==(t=e.nodes)?void 0:t.map((e=>e.id)))||[]:[e.id]}async function $y(e){let t={},{maps:n,images:r,scenes:i,polygons:o}=e;if(null!=r)try{let e=Object.keys(r).map((e=>fetch("data:image/png;base64,".concat(r[e])).then((e=>e.blob())).then((n=>{t[e]=n})).catch((e=>{R.error(e)}))));await Promise.all(e)}catch(e){R.error(e)}return n.forEach((e=>{var n;(null!=(n=e.scene)&&n.polygons||i&&i[e.id])&&(null!=i&&i[e.id]&&(e.scene||(e.scene={}),Object.defineProperty(e.scene,"polygons",{get:()=>i[e.id]})),null!=r&&(e.scene.images=e.scene.images.map((({filename:e})=>({filename:e,url:t[e]}))),e.scene.polygons.forEach((e=>{var n,r;if(null!=(n=null==e?void 0:e.image)&&n.url&&null!=(r=null==e?void 0:e.image)&&r.url){let n=e.image.url.split("/"),r=t[n[n.length-1]];r&&(e.image.url=r)}}))))})),null!=r&&o.forEach((e=>{var n;if(null!=(n=null==e?void 0:e.image)&&n.url){let n=e.image.url.split("/"),r=t[n[n.length-1]];r&&(e.image.url=r)}})),null!=e.images&&delete e.images,null!=e.scenes&&delete e.scenes,e}function Kr(e,t,n){let r;return function(...i){let o=this,a=s((function(){r=null,n||e.apply(o,i)}),"later"),l=n&&!r;clearTimeout(r),r=setTimeout(a,t),l&&e.apply(o,i)}}function Hy(e,t,n,r=0){if(!e||e<=0)return 0;let i=0;r>=0&&r<=1&&(i=r/10);let o=1e-5,s=1+(n-e)/(n-t)+i;return Math.max(1+o,Math.min(2-o,s))}function vu(){return eo.getInstance().loadLocalData("deviceId")}function yu(){return eo.getInstance().loadSessionData("id")}s(Mu,"isGatewayKey"),s(Yy,"stringifyQuery"),s(rP,"buildUrl"),s(Me,"getArray"),s(Gr,"getObject"),s(iP,"constructParamsForRequest"),s(xu,"generateAPIRequest"),s(_e,"addToSet"),s(By,"getDistanceBetweenLatLon"),s(Dy,"getMapScale"),s(Ni,"getNodesForNavigatable"),s($y,"populateBundledImagesAsBlobs"),s(Kr,"debounce"),s(Hy,"normalizeCategoryRank"),s(vu,"getDeviceIDFromStorage"),s(yu,"getSessionIDFromStorage");var Xy=s(((e,t)=>{if("string"==typeof e){if(void 0===t||!Array.isArray(t.polygons))return null;e=t.polygons.find((function(t){return t.id===e}))}let n=null;if(null!=e&&void 0!==e.locations&&e.locations.length>0){n=e.locations[0];for(let t=0,r=e.locations.length;t<r;t++){let r=e.locations[t];for(;void 0!==r.parent;)r=r.parent,r.polygons.includes(e)&&(n=r);if(void 0===r.parent&&r.polygons.includes(e))return r}}return n}),"getPrimaryLocationForPolygon");function Ky(e){var t;let n={...e};for(let[e,r]of Object.entries(jf))n[e]=(0,Wy.default)(r.concat(null!=(t=n[e])?t:[]));return n}function Nf(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return Jy(this.cover(t,n),t,n,e)}function Jy(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o,s,a,l,u,c,h,d,p=e._root,f={data:r},g=e._x0,v=e._y0,y=e._x1,m=e._y1;if(!p)return e._root=f,e;for(;p.length;)if((u=t>=(o=(g+y)/2))?g=o:y=o,(c=n>=(s=(v+m)/2))?v=s:m=s,i=p,!(p=p[h=c<<1|u]))return i[h]=f,e;if(a=+e._x.call(null,p.data),l=+e._y.call(null,p.data),t===a&&n===l)return f.next=p,i?i[h]=f:e._root=f,e;do{i=i?i[h]=new Array(4):e._root=new Array(4),(u=t>=(o=(g+y)/2))?g=o:y=o,(c=n>=(s=(v+m)/2))?v=s:m=s}while((h=c<<1|u)==(d=(l>=s)<<1|a>=o));return i[d]=p,i[h]=f,e}function Zy(e){var t,n,r,i,o=e.length,s=new Array(o),a=new Array(o),l=1/0,u=1/0,c=-1/0,h=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,t=e[n]))||isNaN(i=+this._y.call(null,t))||(s[n]=r,a[n]=i,r<l&&(l=r),r>c&&(c=r),i<u&&(u=i),i>h&&(h=i));if(l>c||u>h)return this;for(this.cover(l,u).cover(c,h),n=0;n<o;++n)Jy(this,s[n],a[n],e[n]);return this}function Ff(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var s,a,l=i-n||1,u=this._root;n>e||e>=i||r>t||t>=o;)switch(a=(t<r)<<1|e<n,s=new Array(4),s[a]=u,u=s,l*=2,a){case 0:i=n+l,o=r+l;break;case 1:n=i-l,o=r+l;break;case 2:i=n+l,r=o-l;break;case 3:n=i-l,r=o-l}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function Df(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e}function Rf(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Fe(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function zf(e,t,n){var r,i,o,s,a,l,u,c=this._x0,h=this._y0,d=this._x1,p=this._y1,f=[],g=this._root;for(g&&f.push(new Fe(g,c,h,d,p)),null==n?n=1/0:(c=e-n,h=t-n,d=e+n,p=t+n,n*=n);l=f.pop();)if(!(!(g=l.node)||(i=l.x0)>d||(o=l.y0)>p||(s=l.x1)<c||(a=l.y1)<h))if(g.length){var v=(i+s)/2,y=(o+a)/2;f.push(new Fe(g[3],v,y,s,a),new Fe(g[2],i,y,v,a),new Fe(g[1],v,o,s,y),new Fe(g[0],i,o,v,y)),(u=(t>=y)<<1|e>=v)&&(l=f[f.length-1],f[f.length-1]=f[f.length-1-u],f[f.length-1-u]=l)}else{var m=e-+this._x.call(null,g.data),b=t-+this._y.call(null,g.data),w=m*m+b*b;if(w<n){var _=Math.sqrt(n=w);c=e-_,h=t-_,d=e+_,p=t+_,r=g.data}}return r}function Bf(e){if(isNaN(o=+this._x.call(null,e))||isNaN(s=+this._y.call(null,e)))return this;var t,n,r,i,o,s,a,l,u,c,h,d,p=this._root,f=this._x0,g=this._y0,v=this._x1,y=this._y1;if(!p)return this;if(p.length)for(;;){if((u=o>=(a=(f+v)/2))?f=a:v=a,(c=s>=(l=(g+y)/2))?g=l:y=l,t=p,!(p=p[h=c<<1|u]))return this;if(!p.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(n=t,d=h)}for(;p.data!==e;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):t?(i?t[h]=i:delete t[h],(p=t[0]||t[1]||t[2]||t[3])&&p===(t[3]||t[2]||t[1]||t[0])&&!p.length&&(n?n[d]=p:this._root=p),this):(this._root=i,this)}function Qy(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function Vf(){return this._root}function qf(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e}function Gf(e){var t,n,r,i,o,s,a=[],l=this._root;for(l&&a.push(new Fe(l,this._x0,this._y0,this._x1,this._y1));t=a.pop();)if(!e(l=t.node,r=t.x0,i=t.y0,o=t.x1,s=t.y1)&&l.length){var u=(r+o)/2,c=(i+s)/2;(n=l[3])&&a.push(new Fe(n,u,c,o,s)),(n=l[2])&&a.push(new Fe(n,r,c,u,s)),(n=l[1])&&a.push(new Fe(n,u,i,o,c)),(n=l[0])&&a.push(new Fe(n,r,i,u,c))}return this}function Uf(e){var t,n=[],r=[];for(this._root&&n.push(new Fe(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var i=t.node;if(i.length){var o,s=t.x0,a=t.y0,l=t.x1,u=t.y1,c=(s+l)/2,h=(a+u)/2;(o=i[0])&&n.push(new Fe(o,s,a,c,h)),(o=i[1])&&n.push(new Fe(o,c,a,l,h)),(o=i[2])&&n.push(new Fe(o,s,h,c,u)),(o=i[3])&&n.push(new Fe(o,c,h,l,u))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this}function eb(e){return e[0]}function Yf(e){return arguments.length?(this._x=e,this):this._x}function tb(e){return e[1]}function Wf(e){return arguments.length?(this._y=e,this):this._y}function Jr(e,t,n){var r=new $f(null==t?eb:t,null==n?tb:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function $f(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function nb(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}s(Ky,"mergeThings"),v(),v(),v(),v(),s(Nf,"default"),s(Jy,"add"),s(Zy,"addAll"),v(),s(Ff,"default"),v(),s(Df,"default"),v(),s(Rf,"default"),v(),v(),s(Fe,"default"),s(zf,"default"),v(),s(Bf,"default"),s(Qy,"removeAll"),v(),s(Vf,"default"),v(),s(qf,"default"),v(),s(Gf,"default"),v(),s(Uf,"default"),v(),s(eb,"defaultX"),s(Yf,"default"),v(),s(tb,"defaultY"),s(Wf,"default"),s(Jr,"quadtree"),s($f,"Quadtree"),s(nb,"leaf_copy");var Qe=Jr.prototype=$f.prototype;Qe.copy=function(){var e,t,n=new $f(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=nb(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=nb(t));return n},Qe.add=Nf,Qe.addAll=Zy,Qe.cover=Ff,Qe.data=Df,Qe.extent=Rf,Qe.find=zf,Qe.remove=Bf,Qe.removeAll=Qy,Qe.root=Vf,Qe.size=qf,Qe.visit=Gf,Qe.visitAfter=Uf,Qe.x=Yf,Qe.y=Wf;var Zt,me,Jt=class e{constructor(e){S(this,Zt,void 0),g(this,"categories"),g(this,"locations"),g(this,"vortexes"),g(this,"maps"),g(this,"nodes"),g(this,"polygons"),g(this,"events"),g(this,"mapGroups"),g(this,"locationStates"),g(this,"rankings"),g(this,"languages",{}),S(this,me,{}),L(this,Zt,e)}get polygonsByMapId(){if(b(this,me).polygonsByMapId)return b(this,me).polygonsByMapId;let e,t={};for(let n=0,r=b(this,Zt).polygons.length;n<r;++n)e=b(this,Zt).polygons[n],t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e);let n=Object.entries(t).reduce(((e,[t,n])=>(e.set(t,n),e)),new Map);return b(this,me).polygonsByMapId=n,b(this,me).polygonsByMapId}get nodesByMapId(){if(b(this,me).nodesByMapId)return b(this,me).nodesByMapId;let e,t={};for(let n=0,r=b(this,Zt).nodes.length;n<r;++n)e=b(this,Zt).nodes[n],e.map&&(t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e));let n=Object.entries(t).reduce(((e,[t,n])=>(e.set(t,n),e)),new Map);return b(this,me).nodesByMapId=n,b(this,me).nodesByMapId}findNearestNodeOnMap(e,t){var n;if(b(this,me).nodeTreesByMap||(b(this,me).nodeTreesByMap=new Map),!b(this,me).nodeTreesByMap.has(e)){let t=null!=(n=this.nodesByMapId.get(e))?n:[],r=Jr();r.x((e=>e.x)),r.y((e=>e.y)),r.addAll(t),b(this,me).nodeTreesByMap.set(e,r)}return b(this,me).nodeTreesByMap.get(e).find(t.x,t.y)}findNodeWithinRadiusOnMap(e,t,n){var r;if(b(this,me).nodeTreesByMap||(b(this,me).nodeTreesByMap=new Map),!b(this,me).nodeTreesByMap.has(e)){let t=null!=(r=this.nodesByMapId.get(e))?r:[],n=Jr();n.x((e=>e.x)),n.y((e=>e.y)),n.addAll(t),b(this,me).nodeTreesByMap.set(e,n)}let i=b(this,me).nodeTreesByMap.get(e),o=[],s=t.x,a=t.y;return i.visit(((e,t,r,i,l)=>{if(e&&!e.length)do{let t=e.data;Math.sqrt((t.x-s)**2+(t.y-a)**2)<=n&&o.push(t)}while(e=e.next);let u=s-Math.max(t,Math.min(i,s)),c=a-Math.max(r,Math.min(l,a));return u*u+c*c>=n*n})),o}get locationsByMapId(){if(b(this,me).locationsByMapId)return b(this,me).locationsByMapId;let e,t={};for(let n=0,r=b(this,Zt).locations.length;n<r;++n){e=b(this,Zt).locations[n];for(let n=0,r=e.polygons.length;n<r;++n)t[e.polygons[n].map.id]||(t[e.polygons[n].map.id]=[]),-1===t[e.polygons[n].map.id].indexOf(e)&&t[e.polygons[n].map.id].push(e);for(let n=0,r=e.nodes.length;n<r;++n){let r=e.nodes[n];t[r.map.id]||(t[r.map.id]=[]),-1===t[r.map.id].indexOf(e)&&t[r.map.id].push(e)}}let n=Object.entries(t).reduce(((e,[t,n])=>(e.set(t,n),e)),new Map);return b(this,me).locationsByMapId=n,b(this,me).locationsByMapId}static create(t){return e.instances.has(t)||e.instances.set(t,new e(t)),e.instances.get(t)}static clearInstance(t){e.instances.has(t)&&e.instances.delete(t)}};Zt=new WeakMap,me=new WeakMap,s(Jt,"MappedinCache"),g(Jt,"instances",new WeakMap);var Hf=Jt,qe=Hf,Ma=(e=>(e.CATEGORY="categories",e.EVENT="events",e.LOCATION="locations",e.MAPGROUP="mapGroups",e.MAP="maps",e.NODE="nodes",e.POLYGON="polygons",e.VORTEX="vortexes",e))(Ma||{}),Eu={categories:gr,locations:hn,vortexes:Sa,maps:Wa,nodes:ka,polygons:hr,venue:vr,events:Va,mapGroups:Ka,themes:bu,locationStates:Ua,rankings:za},Tu=(e=>(e[e.LANGUAGE_CHANGED=0]="LANGUAGE_CHANGED",e))(Tu||{});v(),v(),v(),v();var et=6371008.8,rb={centimeters:100*et,centimetres:100*et,degrees:et/111325,feet:3.28084*et,inches:39.37*et,kilometers:et/1e3,kilometres:et/1e3,meters:et,metres:et,miles:et/1609.344,millimeters:1e3*et,millimetres:1e3*et,nauticalmiles:et/1852,radians:1,yards:1.0936*et},d3={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/et,yards:1.0936133};function Gn(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function tt(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Xf(e[0])||!Xf(e[1]))throw new Error("coordinates must contain numbers");return Gn({type:"Point",coordinates:e},t,n)}function wn(e,t,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return Gn({type:"LineString",coordinates:e},t,n)}function wr(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function ib(e,t){void 0===t&&(t="kilometers");var n=rb[t];if(!n)throw new Error(t+" units is invalid");return e*n}function ab(e,t){void 0===t&&(t="kilometers");var n=rb[t];if(!n)throw new Error(t+" units is invalid");return e/n}function to(e){return 180*(e%(2*Math.PI))/Math.PI}function at(e){return e%360*Math.PI/180}function Xf(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Pu(e,t,n){if(null!==e)for(var r,i,o,s,a,l,u,c,h=0,d=0,p=e.type,f="FeatureCollection"===p,g="Feature"===p,v=f?e.features.length:1,y=0;y<v;y++){a=(c=!!(u=f?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var m=0;m<a;m++){var b=0,w=0;if(null!==(s=c?u.geometries[m]:u)){l=s.coordinates;var _=s.type;switch(h=!n||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===t(l,d,y,b,w))return!1;d++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===t(l[r],d,y,b,w))return!1;d++,"MultiPoint"===_&&b++}"LineString"===_&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-h;i++){if(!1===t(l[r][i],d,y,b,w))return!1;d++}"MultiLineString"===_&&b++,"Polygon"===_&&w++}"Polygon"===_&&b++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(w=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-h;o++){if(!1===t(l[r][i][o],d,y,b,w))return!1;d++}w++}b++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===Pu(s.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Kf(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function aP(e,t){var n,r,i,o,s,a,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(n=0;n<g;n++){for(a=p?e.features[n].geometry:f?e.geometry:e,u=p?e.features[n].properties:f?e.properties:{},c=p?e.features[n].bbox:f?e.bbox:void 0,h=p?e.features[n].id:f?e.id:void 0,s=(l=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=l?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,d,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],d,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,u,c,h))return!1;d++}}function no(e,t){aP(e,(function(e,n,r,i,o){var s,a=null===e?null:e.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return!1!==t(Gn(e,r,{bbox:i,id:o}),n,0)&&void 0}switch(a){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u=e.coordinates[l];if(!1===t(Gn({type:s,coordinates:u},r),n,l))return!1}}))}function oP(e,t){no(e,(function(e,n,r){var i=0;if(e.geometry){var o=e.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var s,a=0,l=0,u=0;if(!1===Pu(e,(function(o,c,h,d,p){if(void 0===s||n>a||d>l||p>u)return s=o,a=n,l=d,u=p,void(i=0);var f=wn([s,o],e.properties);if(!1===t(f,n,r,p,i))return!1;i++,s=o})))return!1}}}))}function ob(e,t,n){var r=n,i=!1;return oP(e,(function(e,o,s,a,l){r=!1===i&&void 0===n?e:t(r,e,o,s,a,l),i=!0})),r}function Jf(e){var t=[1/0,1/0,-1/0,-1/0];return Pu(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}s(Gn,"feature"),s(tt,"point"),s(wn,"lineString"),s(wr,"featureCollection"),s(ib,"radiansToLength"),s(ab,"lengthToRadians"),s(to,"radiansToDegrees"),s(at,"degreesToRadians"),s(Xf,"isNumber"),s(Pu,"coordEach"),s(Kf,"featureEach"),s(aP,"geomEach"),s(no,"flattenEach"),s(oP,"segmentEach"),s(ob,"segmentReduce"),s(Jf,"bbox"),Jf.default=Jf;var Iu=Jf;function Qt(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function dt(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function sb(e,t){return"FeatureCollection"===e.type?"FeatureCollection":"GeometryCollection"===e.type?"GeometryCollection":"Feature"===e.type&&null!==e.geometry?e.geometry.type:e.type}function sP(e,t,n){void 0===n&&(n={});var r=Qt(e),i=Qt(t),o=at(i[1]-r[1]),s=at(i[0]-r[0]),a=at(r[1]),l=at(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(s/2),2)*Math.cos(a)*Math.cos(l);return ib(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),n.units)}v(),v(),v(),v(),s(Qt,"getCoord"),s(dt,"getCoords"),s(sb,"getType"),s(sP,"distance");var Un=sP;function Ou(e,t){return void 0===t&&(t={}),ob(e,(function(e,n){var r=n.geometry.coordinates;return e+Un(r[0],r[1],t)}),0)}function Su(e,t,n){if(void 0===n&&(n={}),!0===n.final)return uP(e,t);var r=Qt(e),i=Qt(t),o=at(r[0]),s=at(i[0]),a=at(r[1]),l=at(i[1]),u=Math.sin(s-o)*Math.cos(l),c=Math.cos(a)*Math.sin(l)-Math.sin(a)*Math.cos(l)*Math.cos(s-o);return to(Math.atan2(u,c))}function uP(e,t){var n=Su(t,e);return n=(n+180)%360}function Au(e,t,n,r){void 0===r&&(r={});var i=Qt(e),o=at(i[0]),s=at(i[1]),a=at(n),l=ab(t,r.units),u=Math.asin(Math.sin(s)*Math.cos(l)+Math.cos(s)*Math.sin(l)*Math.cos(a));return tt([to(o+Math.atan2(Math.sin(a)*Math.sin(l)*Math.cos(s),Math.cos(l)-Math.sin(s)*Math.sin(u))),to(u)],r.properties)}function lP(e){if(!e)throw new Error("geojson is required");var t=[];return no(e,(function(e){cP(e,t)})),wr(t)}function cP(e,t){var n=[],r=e.geometry;if(null!==r){switch(r.type){case"Polygon":n=dt(r);break;case"LineString":n=[dt(r)]}n.forEach((function(n){dP(n,e.properties).forEach((function(e){e.id=t.length,t.push(e)}))}))}}function dP(e,t){var n=[];return e.reduce((function(e,r){var i=wn([e,r],t);return i.bbox=pP(e,r),n.push(i),r})),n}function pP(e,t){var n=e[0],r=e[1],i=t[0],o=t[1];return[n<i?n:i,r<o?r:o,n>i?n:i,r>o?r:o]}s(Ou,"length"),v(),v(),v(),s(Su,"bearing"),s(uP,"calculateFinalBearing"),v(),s(Au,"destination"),v(),v(),s(lP,"lineSegment"),s(cP,"lineSegmentFeature"),s(dP,"createSegments"),s(pP,"bbox");var Zf=lP,Eb=Rt(Mb(),1);function zP(e,t){var n={},r=[];if("LineString"===e.type&&(e=Gn(e)),"LineString"===t.type&&(t=Gn(t)),"Feature"===e.type&&"Feature"===t.type&&null!==e.geometry&&null!==t.geometry&&"LineString"===e.geometry.type&&"LineString"===t.geometry.type&&2===e.geometry.coordinates.length&&2===t.geometry.coordinates.length){var i=xb(e,t);return i&&r.push(i),wr(r)}var o=(0,Eb.default)();return o.load(Zf(t)),Kf(Zf(e),(function(e){Kf(o.search(e),(function(t){var i=xb(e,t);if(i){var o=dt(i).join(",");n[o]||(n[o]=!0,r.push(i))}}))})),wr(r)}function xb(e,t){var n=dt(e),r=dt(t);if(2!==n.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==r.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=n[0][0],o=n[0][1],s=n[1][0],a=n[1][1],l=r[0][0],u=r[0][1],c=r[1][0],h=r[1][1],d=(h-u)*(s-i)-(c-l)*(a-o);if(0===d)return null;var p=((c-l)*(o-u)-(h-u)*(i-l))/d,f=((s-i)*(o-u)-(a-o)*(i-l))/d;return p>=0&&p<=1&&f>=0&&f<=1?tt([i+p*(s-i),o+p*(a-o)]):null}s(zP,"lineIntersect"),s(xb,"intersects");var Tb=zP;function BP(e,t,n){void 0===n&&(n={});var r=tt([1/0,1/0],{dist:1/0}),i=0;return no(e,(function(e){for(var o=dt(e),s=0;s<o.length-1;s++){var a=tt(o[s]);a.properties.dist=Un(t,a,n);var l=tt(o[s+1]);l.properties.dist=Un(t,l,n);var u=Un(a,l,n),c=Math.max(a.properties.dist,l.properties.dist),h=Su(a,l),d=Au(t,c,h+90,n),p=Au(t,c,h-90,n),f=Tb(wn([d.geometry.coordinates,p.geometry.coordinates]),wn([a.geometry.coordinates,l.geometry.coordinates])),g=null;f.features.length>0&&((g=f.features[0]).properties.dist=Un(t,g,n),g.properties.location=i+Un(a,g,n)),a.properties.dist<r.properties.dist&&((r=a).properties.index=s,r.properties.location=i),l.properties.dist<r.properties.dist&&((r=l).properties.index=s+1,r.properties.location=i+u),g&&g.properties.dist<r.properties.dist&&((r=g).properties.index=s),i+=u}})),r}s(BP,"nearestPointOnLine");var io=BP;function VP(e,t,n){var r=dt(n);if("LineString"!==sb(n))throw new Error("line must be a LineString");for(var i,o=io(n,e),s=io(n,t),a=[(i=o.properties.index<=s.properties.index?[o,s]:[s,o])[0].geometry.coordinates],l=i[0].properties.index+1;l<i[1].properties.index+1;l++)a.push(r[l]);return a.push(i[1].geometry.coordinates),wn(a,n.properties)}s(VP,"lineSlice");var dh=VP;function qP(e,t){void 0===t&&(t={});var n=Iu(e);return tt([(n[0]+n[2])/2,(n[1]+n[3])/2],t.properties,t)}v(),s(qP,"center");var Pb=qP;function GP(e,t,n){void 0===n&&(n={});for(var r=Qt(e),i=dt(t),o=0;o<i.length-1;o++){var s=!1;if(n.ignoreEndVertices&&(0===o&&(s="start"),o===i.length-2&&(s="end"),0===o&&o+1===i.length-1&&(s="both")),UP(i[o],i[o+1],r,s,typeof n.epsilon>"u"?null:n.epsilon))return!0}return!1}function UP(e,t,n,r,i){var o=n[0],s=n[1],a=e[0],l=e[1],u=t[0],c=t[1],h=u-a,d=c-l,p=(n[0]-a)*d-(n[1]-l)*h;if(null!==i){if(Math.abs(p)>i)return!1}else if(0!==p)return!1;return r?"start"===r?Math.abs(h)>=Math.abs(d)?h>0?a<o&&o<=u:u<=o&&o<a:d>0?l<s&&s<=c:c<=s&&s<l:"end"===r?Math.abs(h)>=Math.abs(d)?h>0?a<=o&&o<u:u<o&&o<=a:d>0?l<=s&&s<c:c<s&&s<=l:"both"===r&&(Math.abs(h)>=Math.abs(d)?h>0?a<o&&o<u:u<o&&o<a:d>0?l<s&&s<c:c<s&&s<l):Math.abs(h)>=Math.abs(d)?h>0?a<=o&&o<=u:u<=o&&o<=a:d>0?l<=s&&s<=c:c<=s&&s<=l}v(),s(GP,"booleanPointOnLine"),s(UP,"isPointOnLineSegment");var Ib=GP,YP=1e-7,Ob=.005,Sb=["connection.json","manifest.geojson","map.geojson","node.geojson","styles.json","mapstack.geojson"];function ph(e,t){let n=XP(t);return wr(e.features.reduce(((e,t)=>{let r=[t],{properties:i}=t,o=(i.entrances||[]).reduce(((e,t)=>(n.has(t)&&e.push(n.get(t)),e)),[]);return o.length&&(r=WP(t,o)),e.push(...r),e}),[]))}function WP(e,t){return t.reduce(((e,t)=>{let n={epsilon:YP},r=e.findIndex((e=>Ib(Pb(t),e,n))),i=e[r];if(i){let[n,o]=HP(i,t);e.splice(r,1,n,o)}return e}),[e])}function $P(e){return null!=e&&(null!=e.polygons||null!=e.lineStrings)}function HP(e,t){let{coordinates:n}=t.geometry,{coordinates:r}=e.geometry,i=n.map((t=>io(e,tt(t))));return r.reduce(((t,n)=>{let r=dh(tt(n),i[0],e),o=dh(tt(n),i[1],e),s=Ou(r)<Ou(o)?r:o;return s.properties={...e.properties,entrances:[]},t.concat([s])}),[])}function Ab(e){let t=new Map;for(let n in e){let r=e[n];if(!$P(r))continue;let{altitude:i,color:o,width:s,height:a,opacity:l}=r,u={altitude:i,color:o,width:s,height:a,opacity:l,type:n};(r.polygons||r.lineStrings).forEach((e=>{t.set(e,u)}))}return t}function XP(e){return new Map(e.features.map((e=>{let{properties:t}=e,{id:n}=t;return[n,e]})))}function Cb(e){if(0===e.length)return;let t;for(let n of e)if("number"==typeof n.elevation){if(!t){t=n;continue}"number"==typeof t.elevation&&(t=Math.abs(n.elevation)===Math.abs(t.elevation)?n.elevation>t.elevation?n:t:Math.abs(n.elevation)<Math.abs(t.elevation)?n:t)}return t}function yI(e){if(null==e||"object"!=typeof e)return!1;for(let t of Sb)if("Uint8Array"!==e[t][Symbol.toStringTag])return!1;return!0}function bI(e){var t;if(null==e||"object"!=typeof e)return!1;let n=["building.geojson","category.geojson","location.geojson","manifest.geojson"];for(let r of n)if("Uint8Array"!==(null==(t=null==e?void 0:e[r])?void 0:t[Symbol.toStringTag]))return!1;return!0}async function v0(e){return new Promise((async(t,n)=>{try{if(null==e||"object"!=typeof e)throw new Error("Error parsing data! Unzipping failed.");if("Uint8Array"!==e[Symbol.toStringTag])throw new Error("Unexpected file type! Unzipping failed.");let n=(await Promise.resolve().then((()=>(Fh(),Nh)))).unzipSync(e);if(!bI(n))throw new Error("MVF is missing some expect static files. Unzipping failed.");let r={"building.geojson":n["building.geojson"],"category.geojson":n["category.geojson"],"location.geojson":n["location.geojson"],"manifest.geojson":n["manifest.geojson"],space:{},obstruction:{},node:{},level:{},connection:{}},i=Object.keys(n);for(let e of i){if(0===n[e].length)continue;let t=e.split("/");if(t.length<0)throw new Error("Encounted a file with no name! Unzipping failed.");if(t.length>2)throw new Error("Encountered unexpected nesting in MVF! Unzipping failed.");if(1!==t.length){if("image"===t[0]){R.warn("MVF unzipping encountered an image. Ignoring as this case has not been implemented.");continue}null==r[t[0]]&&(r[t[0]]={}),r[t[0]][t[1]]=n[e]}}t(r)}catch(e){n(e)}}))}async function Rh(e){return new Promise((async(t,n)=>{try{if(null==e||"object"!=typeof e)throw new Error("Error parsing data! Unzipping failed.");if("Uint8Array"!==e[Symbol.toStringTag])throw new Error("Unexpected file type! Unzipping failed.");let n=(await Promise.resolve().then((()=>(Fh(),Nh)))).unzipSync(e);if(!yI(n))throw new Error("MVF is missing some expect static files. Unzipping failed.");let r={"connection.json":n["connection.json"],"manifest.geojson":n["manifest.geojson"],"node.geojson":n["node.geojson"],"map.geojson":n["map.geojson"],"mapstack.geojson":n["mapstack.geojson"],"styles.json":n["styles.json"],space:{},obstruction:{},entrance:{}},i=Object.keys(n);for(let e of i){if(0===n[e].length)continue;let t=e.split("/");if(t.length<0)throw new Error("Encounted a file with no name! Unzipping failed.");if(t.length>2)throw new Error("Encountered unexpected nesting in MVF! Unzipping failed.");if(1!==t.length){if("image"===t[0]){R.warn("MVF unzipping encountered an image. Ignoring as this case has not been implemented.");continue}null==r[t[0]]&&(r[t[0]]={}),r[t[0]][t[1]]=n[e]}}t(r)}catch(e){n(e)}}))}function y0(e){let[t,n,r,i]=Iu(e);return{minLat:n,minLong:t,maxLat:i,maxLong:r}}function wI(e,t,n){let r=n.createGeoreferences(),i=new Set;t.forEach((e=>{e.layer&&i.add(e.layer)}));let o=e.id||"",s=e.externalId||o||"",a=e.elevation||0,l=[...i].map((e=>({id:e,visible:!0}))),u=1/n.mapScale;return{id:o,georeference:r,name:s,shortName:s,scene:{polygons:t},elevation:a,scale:u,x_scale:u,layers:l,width:n.widthInMapUnits,height:n.heightInMapUnits}}s(ph,"processObstructions"),s(WP,"splitObstructionByAllEntrances"),s($P,"isPolygonStyle"),s(HP,"splitObstructionByEntrance"),s(Ab,"getStylesMap"),s(XP,"getEntranceMap"),v(),v(),s(Cb,"findMapWithElevationClosestToZero"),v(),s(yI,"validateStaticMVFFiles"),s(bI,"validateStaticMVFv1Files"),s(v0,"unzipMVFv1"),s(Rh,"unzipMVF"),s(y0,"getMapExtent"),s(wI,"convertMap");var Bh=class{constructor(e){g(this,"mapExtent"),g(this,"stretchRatio"),g(this,"midLat"),g(this,"midLong"),g(this,"mapUnitRatio",1e6),g(this,"latDistance"),g(this,"longDistance"),g(this,"mapScale"),g(this,"widthInMapUnits"),g(this,"heightInMapUnits"),this.mapExtent=e;let{minLat:t,minLong:n,maxLat:r,maxLong:i}=e,o=(t+r)/2,s=(n+i)/2,a=new Se(o,i),l=new Se(o,n),u=new Se(t,s),c=new Se(r,s);this.latDistance=u.distanceTo(c),this.longDistance=a.distanceTo(l);let h=this.latDistance/this.longDistance,d=(r-t)/(i-n);this.stretchRatio=h/d,this.midLat=o,this.midLong=s,this.widthInMapUnits=(i-n)*this.mapUnitRatio,this.heightInMapUnits=(r-t)*this.mapUnitRatio*this.stretchRatio,this.mapScale=this.widthInMapUnits/this.longDistance}convert(e){let t=e[1],n=(e[0]-this.midLong)*this.mapUnitRatio,r=(this.midLat-t)*this.mapUnitRatio*this.stretchRatio;return{x:n+this.widthInMapUnits/2,y:r+this.heightInMapUnits/2}}createGeoreferences(){let{minLat:e,minLong:t,maxLat:n,maxLong:r}=this.mapExtent;return[[e,t],[e,r],[n,r],[n,t]].map((e=>({target:{x:e[0],y:e[1]},control:this.convert([e[1],e[0]])})))}};s(Bh,"CoordinateConverter");var $u=Bh;function kI(e,t){let n=[];return e.forEach(((r,i)=>{let o=r.properties.map||"",s=t.get(o);if(s){let t=s.convert(r.geometry.coordinates),a=r.properties.externalId||"",l=[];r.properties.neighbors.forEach((t=>{var n;let r=null!=(n=t.weight)?n:0,i=e.get(t.id);i&&i.properties.map===o&&l.push({node:i.properties.id,map:i.properties.map,weight:r})})),n.push({id:i,map:o,externalId:a,paths:l,...t})}})),n}function _I(e,t,n){let r=[];return e.features.forEach((e=>{let i=n.convert(e.geometry.coordinates);r.push({id:e.properties.id,x:i.x,y:i.y,map:t,paths:e.properties.neighbors.map((e=>({node:e,map:t})))})})),r}s(kI,"convertNodes"),s(_I,"convertNodes_MVFv1");var m0=s(((e,t,n,r,i,o)=>{var s,a,l;let u,c=[],h=Math.max(o.widthInMapUnits,o.heightInMapUnits)/1e3,d=i.Walls,p=null!=(s=i.ExteriorWalls)?s:d,f={map:e,id:"walls"+e,externalId:"walls"+e,layer:"Wall",isLineStringSegment:!0,geometry:{visible:!0,position:{x:0,y:0,z:((null==d?void 0:d.altitude)||0)*o.mapScale/h},scale:{x:1,y:1,z:((null==d?void 0:d.height)||1)*o.mapScale/h},width:null==d?void 0:d.width},material:{color:(null==d?void 0:d.color)||"#000000"},vertexes:[]},g={map:e,id:"externalWalls"+e,externalId:"externalWalls"+e,layer:"ExternalWall",isLineStringSegment:!0,geometry:{visible:!0,position:{x:0,y:0,z:((null==p?void 0:p.altitude)||0)*o.mapScale/h},scale:{x:1,y:1,z:((null==p?void 0:p.height)||1)*o.mapScale/h},width:null==p?void 0:p.width},material:{color:(null==p?void 0:p.color)||"#000000"},vertexes:[]};for(let i=0;i<t.features.length;i++){let s=t.features[i];if("Point"===s.geometry.type)continue;let d="desk-entrance"===(null==(a=s.properties.kind)?void 0:a.toLowerCase()),p=(d?s.properties.externalId:s.properties.id)||"",v=s.properties.externalId||"",y=n.get(p)||[];if("destinationNodes"in s.properties&&s.properties.destinationNodes.forEach((t=>{y.push({map:e,id:t})})),d)n.set(v,y);else{let n=r.get(s.properties.id),a=s.properties.center?o.convert(s.properties.center):void 0,d=s.geometry.coordinates.slice(1).map((e=>e.map((e=>o.convert(e))))),m=s.properties.kind||"",b="void"===m.toLowerCase(),w=1-(i+1)/t.features.length*Ob;"LineString"===s.geometry.type&&"wall"===(null==(l=s.properties.kind)?void 0:l.toLowerCase())?(u=s.geometry.coordinates.map((e=>o.convert(e))),s.properties.footprintComponent?g.vertexes.push(u):f.vertexes.push(u)):(u=s.geometry.coordinates[0].map((e=>o.convert(e))),c.push({entrances:y,map:e,id:p,externalId:v,layer:m,geometry:{visible:!b,position:{x:0,y:0,z:((null==n?void 0:n.altitude)||0)*o.mapScale/h},scale:{x:1,y:1,z:((null==n?void 0:n.height)||1)*o.mapScale/h*w},width:null==n?void 0:n.width},material:{color:(null==n?void 0:n.color)||"#000000"},vertexes:u,center:a,holes:d}))}}return f.vertexes.length>0&&c.push(f),g.vertexes.length>0&&c.push(g),c}),"generateMappedinPolygons"),g0=s(((e,t,n)=>{let r=[];return t.features.forEach((t=>{if(!t.geometry.coordinates[0].forEach)return;let i=t.properties,o=t.geometry.coordinates[0].map((e=>n.convert(e))),s=t.geometry.coordinates.slice(1).map((e=>e.map((e=>n.convert(e))))),a=Math.max(n.widthInMapUnits,n.heightInMapUnits)/1e3,l=[];"entrances"in t.properties&&t.properties.entrances.forEach((e=>l.push({id:"n_"+e.id,map:e.level}))),r.push({entrances:null!=l?l:[],map:e,id:t.properties.id||"",externalId:t.properties.externalId||"",layer:t.properties.layer||"Polygon",geometry:{visible:!0,position:{x:0,y:0,z:((null==i?void 0:i.altitude)||0)*n.mapScale/a},scale:{x:1,y:1,z:((null==i?void 0:i.height)||1)*n.mapScale/a}},material:{color:(null==i?void 0:i.color)||"#000000"},vertexes:o,holes:s})})),r}),"generateMappedinPolygons_MVFv1");function MI(e,t,n,r,i,o,s){let a=m0(e,n,r,i,o,s),l=m0(e,t,r,i,o,s);return a.concat(l)}function xI(e,t){let n=[];return e.forEach((e=>{var r;let i;for(let n of e.nodes){let r=t.get(n);if(r)for(let t of r.properties.neighbors)if(e.nodes.includes(t.id)&&t.weight){i=t.weight;break}if(i)break}n.push({id:e.id||"",name:e.externalId||"",type:e.type||"",weight:null!=i?i:1e3,multiplier:1,nodes:e.nodes||[],accessible:null!=(r=e.accessible)&&r})})),n}function EI(e){let t=new Map;return e.features.forEach((e=>{var n,r,i,o,s,a,l;let u="",c=["n_".concat(e.properties.id)];e.properties.destinations.forEach((e=>{let t=e.split("-");u=t[0],c.push("n_".concat(t[1]))}));let h=null!=(r=null==(n=t.get(u))?void 0:n.nodes)?r:[],d=new Set([...h,...c]);t.set(u,{id:u,name:null!=(i=e.properties.name)?i:"",type:null!=(o=e.properties.type)?o:"",weight:null!=(s=e.properties.weight)?s:1e3,multiplier:null!=(a=e.properties.multiplier)?a:1,nodes:Array.from(d),accessible:null!=(l=e.properties.accessible)&&l})})),Array.from(t.values())}function b0(e,t){if(t)for(let n in t)t.hasOwnProperty(n)&&Object.assign(e[n],t[n]);return e}function zh(e){let t=new TextDecoder,n=t.decode.bind(t);try{let t={"connection.json":JSON.parse(n(e["connection.json"])),"manifest.geojson":JSON.parse(n(e["manifest.geojson"])),"styles.json":JSON.parse(n(e["styles.json"])),"map.geojson":JSON.parse(n(e["map.geojson"])),"mapstack.geojson":JSON.parse(n(e["mapstack.geojson"])),"node.geojson":JSON.parse(n(e["node.geojson"])),obstruction:{},space:{},entrance:{},annotation:{}};if(null!=e.annotation){let r=Object.keys(e.annotation);for(let i of r){let r=i.replace(/\.json|\.geojson/g,"");t.annotation[r]=JSON.parse(n(e.annotation[i]))}}let r=Object.keys(e.space);for(let i of r){let r=i.replace(/\.json|\.geojson/g,"");t.space[r]=JSON.parse(n(e.space[i]))}let i=Object.keys(e.obstruction);for(let r of i){let i=r.replace(/\.json|\.geojson/g,"");t.obstruction[i]=JSON.parse(n(e.obstruction[r]))}let o=Object.keys(e.entrance);for(let r of o){let i=r.replace(/\.json|\.geojson/g,"");t.entrance[i]=JSON.parse(n(e.entrance[r]))}return t}catch(e){throw R.error(e),new Error("MVF parsing failed! Probably encountered a bad file.")}}function w0(e){let t=new TextDecoder,n=t.decode.bind(t);try{let t={"manifest.geojson":JSON.parse(n(e["manifest.geojson"])),"building.geojson":JSON.parse(n(e["building.geojson"])),"category.geojson":JSON.parse(n(e["category.geojson"])),"location.geojson":JSON.parse(n(e["location.geojson"])),obstruction:{},space:{},level:{},node:{},connection:{}},r=Object.keys(e.space);for(let i of r){let r=i.replace(/\.json|\.geojson/g,"");t.space[r]=JSON.parse(n(e.space[i]))}let i=Object.keys(e.obstruction);for(let r of i){let i=r.replace(/\.json|\.geojson/g,"");t.obstruction[i]=JSON.parse(n(e.obstruction[r]))}let o=Object.keys(e.node);for(let r of o){let i=r.replace(/\.json|\.geojson/g,"");t.node[i]=JSON.parse(n(e.node[r]))}let s=Object.keys(e.level);for(let r of s){let i=r.replace(/\.json|\.geojson/g,"");t.level[i]=JSON.parse(n(e.level[r]))}let a=Object.keys(e.connection);for(let r of a){let i=r.replace(/\.json|\.geojson/g,"");t.connection[i]=JSON.parse(n(e.connection[r]))}return t}catch(e){throw R.error(e),new Error("MVF parsing failed! Probably encountered a bad file.")}}function k0(e,t){var n;let r=null!=(n=t.properties.externalId)?n:"";return 0===r.length&&(r=t.properties.id),"location-".concat(e,"-").concat(r.toLowerCase().replace(" ","-"))}function _0(e,t){var n;let r=new Set;if("entrance"===e)r.add("Entrance");else if("obstruction"===e){let e=t.properties.kind;null!=e&&e.length>0&&r.add(e),t.properties.footprintComponent&&r.add("Exterior")}else if("space"===e){let e=t.properties.kind;null!=e&&e.length>0&&r.add("default"===e?"Room":e);let i=null!=(n=t.properties.tags)?n:[];if(i.length>0)for(let e of i)r.add(e)}return Array.from(r).filter((e=>e.length>0))}function M0(e){return"category-".concat(e.toLowerCase().replace(" ","-"))}function Dh(e,t,n){let r=_0(e,t);for(let e of r){let t=M0(e);null==n[t]&&(n[t]={id:t,name:e})}}function x0(e){var t,n,r;return null!=(r=null==(n=null==(t=null==e?void 0:e.properties)?void 0:t.kind)?void 0:n.startsWith("connection"))&&r}function TI(e){var t;let n=null!=(t=e.properties.externalId)?t:"";return x0(e)&&0===n.length&&(n="unnamed-connection-"+e.properties.id),n}function fo(e,t,n,r){var i;if((null==t.properties.externalId||0===t.properties.externalId.length)&&!x0(t)||"obstruction"===e&&"desks"!==(null==(i=t.properties.kind)?void 0:i.toLowerCase()))return;let o=TI(t),s=k0(e,t);if(null==r[s]){let e={id:s,type:"",name:o,nodes:[],polygons:[],categories:[]};r[s]=e}if("space"===e||"obstruction"===e){let e={map:n.id,id:t.properties.id};r[s].polygons.push(e)}if("destinationNodes"in t.properties&&t.properties.destinationNodes.forEach((e=>{let t={map:n.id,node:e};r[s].nodes.push(t)})),"node"in t.properties&&t.properties.node){let e={map:n.id,node:t.properties.node};r[s].nodes.push(e)}let a=_0(e,t);for(let e of a){let t=M0(e);r[s].categories.push(t)}}function PI(e,t=new Map){var n,r,i,o,s,a,l,u,c;let h={},d={},{space:p,"map.geojson":f,entrance:g,obstruction:v}=e;for(let e of f){let f=null!=(r=null==(n=p[e.id])?void 0:n.features)?r:[],y=null!=(o=null==(i=g[e.id])?void 0:i.features)?o:[],m=null!=(a=null==(s=v[e.id])?void 0:s.features)?a:[];for(let t of f)["Polygon","Point"].includes(t.geometry.type)&&"hallway"!==(null==(l=t.properties.kind)?void 0:l.toLowerCase())&&(Dh("space",t,d),fo("space",t,e,h));let b=new Map;for(let t of y)b.set(t.properties.id,t),t.properties.externalId&&(Dh("entrance",t,d),fo("entrance",t,e,h));let w={type:"Feature",geometry:{type:"LineString",coordinates:[]},properties:{id:"footprintComponent",externalId:"footprintComponent",node:void 0,metadata:void 0}};fo("entrance",w,e,h);for(let n of m){if(Dh("obstruction",n,d),fo("obstruction",n,e,h),n.properties.footprintComponent){let t=n.properties.entrances;for(let n of t){let t=b.get(n);t&&fo("entrance",{...t,properties:{...t.properties,externalId:w.properties.externalId}},e,h)}}if("desks"===(null==(u=n.properties.kind)?void 0:u.toLowerCase())&&n.properties.externalId.length>0){let e=null!=(c=t.get(n.properties.id))?c:[];for(let t of e){let e=k0("obstruction",n);null!=h[e]&&h[e].nodes.push({map:t.map,node:t.id})}}}}return{locations:Object.values(h),categories:Object.values(d)}}function E0(e){var t,n,r,i,o,s,a,l,u,c;let h=null!=(t=e.obstruction)?t:[],d=null!=(n=e.space)?n:[],p=null!=(r=e.entrance)?r:[],f=null!=(i=e["mapstack.geojson"])?i:[],g=null!=(o=e["map.geojson"])?o:[],v=null!=(s=e["styles.json"])?s:{},y=null!=(a=e["manifest.geojson"])?a:{},m=null!=(l=e["node.geojson"])?l:{},b=null!=(u=e["connection.json"])?u:[],w={},_=new Map,M=[],x=Ab(v),I=new Map,S=new Map;g.forEach((e=>{let t=e.id;t&&!S.has(t)&&S.set(t,e)})),f.forEach((({maps:e})=>{e.forEach((e=>{if(!S.has(e))return;let t=ph(h[e],p[e]);if(t.features.length){let n=y0(t),r=new $u(n);_.set(e,r),w[e]=MI(e,t,d[e],I,x,v,r),M.push(wI(S.get(e),w[e],r))}}))})),M.sort(((e,t)=>"number"==typeof e.elevation&&"number"==typeof t.elevation?e.elevation-t.elevation:0));let k=new Map;"features"in m&&m.features.forEach((e=>{let t=e.properties.id;t&&!k.has(t)&&k.set(t,e)}));let O=Object.values(w).flat(),E=xI(b,k),P=kI(k,_),A=y.features[0],C=A.properties.name,F=A.geometry.coordinates[0],T=A.geometry.coordinates[1],L=(null==(c=Cb(M))?void 0:c.id)||"",{locations:N,categories:j}=PI(e,I);return{polygons:O,venue:{name:C,latitude:T,longitude:F,defaultMap:L},maps:M,vortexes:E,nodes:P,locations:N,mapGroups:[],locationStates:[],categories:j,themes:[],imageBinaries:new Map}}function T0(e){var t,n,r,i,o,s,a;let l=null!=(t=e.obstruction)?t:{},u=null!=(n=e.space)?n:{},c=null!=(r=e.node)?r:{},h=null!=(i=e.level)?i:{},d=null!=(o=e["manifest.geojson"])?o:{},p=null!=(s=e.connection)?s:{},f={},g=new Map,v=[],y=[],m=[];Object.keys(h).forEach((e=>{let t=ph(l[e],{type:"FeatureCollection",features:[]});if(t.features.length){let n=y0(t),r=new $u(n);g.set(e,r);let i=g0(e,u[e],r),o=g0(e,t,r);f[e]=i.concat(o),y=y.concat(_I(c[e],e,r)),v.push(II(h[e],f[e],r))}m=m.concat(EI(p[e]))}));let b=Object.values(f).flat(),w=d.features[0],_=w.properties.name,M=w.geometry.coordinates[0],x=w.geometry.coordinates[1],I=(null==(a=v[0])?void 0:a.id)||"",S=new Map;b.forEach((e=>S.set(e.id,e)));let k=[],O=e["location.geojson"].features.map((e=>{if(e.properties.spaces){let t=e.properties.spaces.map((e=>e.id)).map((e=>S.get(e))).filter((e=>e));if(t){let e=[];t.forEach((t=>{e.push(...t.entrances.map((e=>({node:e.id,map:e.level}))))})),k=e}}return{...e.properties,nodes:k,polygons:e.properties.spaces}})),E=e["category.geojson"].features.map((e=>e.properties));return{polygons:b,venue:{name:_,latitude:x,longitude:M,defaultMap:I},maps:v,vortexes:m,nodes:y,locations:O,mapGroups:[],locationStates:[],categories:E,themes:[],imageBinaries:new Map}}function II(e,t,n){let r=n.createGeoreferences(),i=new Set,o=e.features[0].properties;t.forEach((e=>{e.layer&&i.add(e.layer)}));let s=[...i].map((e=>({id:e,visible:!0}))),a=1/n.mapScale;return{id:o.id,georeference:r,name:o.name,shortName:o.abbreviation||o.name,scene:{polygons:t},elevation:o.elevation,scale:a,x_scale:a,layers:s,width:n.widthInMapUnits,height:n.heightInMapUnits}}s(MI,"convertPolygons"),s(xI,"convertVortexes"),s(EI,"convertVortexes_MVFv1"),s(b0,"overrideMVF"),s(zh,"parseMVF"),s(w0,"parseMVFv1"),s(k0,"getLocationId"),s(_0,"getFeatureCategories"),s(M0,"getCategoryIdFromName"),s(Dh,"mutateCategoriesWithNewFeature"),s(x0,"isFeatureConnection"),s(TI,"getLocationLabel"),s(fo,"mutateLocationsWithNewFeature"),s(PI,"createMetaDataFromMVF"),s(E0,"convertMVFToMappedin"),s(T0,"convertMVFv1ToMappedin"),s(II,"convertMap_MVFv1"),v();var $0,Uh,W0,ho,pi,fi,mo,go,vo,hi,Xn,mi,gi,vi,yo,yi,_r,H0=Rt(Y0()),RI=null==($0=null==E?void 0:E.env)?void 0:$0.npm_package_version,Hu=["websdk","web","webv2","kiosk-v2","mobile","iossdk","androidsdk","reactnativesdk","gen7","bespoke"],Gh=Hu[0],zI=!1,jt=class e{constructor(e){var t;S(this,ho,void 0),S(this,pi,void 0),S(this,fi,void 0),S(this,mo,void 0),S(this,go,void 0),S(this,vo,void 0),S(this,hi,void 0),S(this,Xn,void 0),S(this,mi,void 0),S(this,gi,void 0),S(this,vi,void 0),S(this,yo,void 0),S(this,yi,void 0),S(this,_r,void 0),L(this,Xn,e.clientId),L(this,mi,e.clientSecret),L(this,gi,e.accessToken),L(this,hi,e.noAuth||!1);let n="https://api-gateway.mappedin.com/track-analytics/a/";!b(this,hi)&&b(this,Xn)&&!Mu(b(this,Xn))&&(n="https://web-proxy.mappedin.com/a/"),L(this,fi,n),L(this,fi,b(this,fi)+(e.venue+"/")),L(this,yi,e.venue),L(this,pi,!1),L(this,ho,"boolean"==typeof e.testMode?e.testMode:"true"===(null==(t=e.testMode)?void 0:t.toLowerCase())),L(this,mo,Hu.find((t=>t===e.context))||Hu[0]),L(this,go,vu()),L(this,vo,yu()),L(this,vi,new Set),L(this,yo,e.platformString||""),this.locationSelected=this.locationSelected.bind(this),this.categorySelected=this.categorySelected.bind(this),this.getDirections=Kr(this.getDirections.bind(this),2500)}static create(t){return e.instance||(e.instance=new e(t)),e.instance}track(e,t){let n={...t,g:b(this,pi)};b(this,_r)&&(n={...n,...b(this,_r)});let r=b(this,fi)+e+"?"+H0.default.stringify(n,{skipEmptyString:!0,skipNull:!0}),i={"mi-context":Gh||b(this,mo),"mi-session":this.getSessionID(),"mi-device":this.getDeviceID(),"mappedin-sdk-version":RI,"mappedin-platform-version":b(this,yo)};zI&&R.log("Analytics.track",r,i),!b(this,ho)&&(b(this,gi)?i.Authorization="Bearer ".concat(b(this,gi)):b(this,hi)||b(this,mi)&&b(this,Xn)&&(i["x-mappedin-key"]=btoa(b(this,Xn)),i["x-mappedin-secret"]=btoa(b(this,mi))),it()(r,{method:"GET",mode:"cors",headers:i}))}updateAnalyticsUserPosition(e){L(this,_r,e?{...e,bluedotTimestamp:Date.now()}:void 0)}locationSelected(e){let t=e.id||e;ye.addPendingEvent(new $i({venue:b(this,yi)})),this.track("select-location",{id:t})}categorySelected(e){let t=e.id||e;ye.addPendingEvent(new Wi({venue:b(this,yi)})),this.track("select-category",{id:t})}mapViewLoaded(e,t,n,r){this.track("load-mapview",{type:e,force:t,benchmark:n||-1,reason:r||"success"})}getDirections(e,t){let n={start:e.id,end:t.id,type:"location_to_location"};this.track("query-directions",n)}getSessionID(){return Uh||b(this,vo)}static setSessionID(e){Uh=e}static setDeviceID(e){W0=e}static clearSessionID(){Uh=void 0}getDeviceID(){return W0||b(this,go)}setGeolocationMode(e){L(this,pi,e)}trackBlueDotEvent(t){t&&Object.values(e.BLUEDOT_EVENT).includes(t)&&!b(this,vi).has(t)&&(this.track(t),b(this,vi).add(t))}trackSearch(e){null!=e&&this.track("query-search",e)}trackSearchSuggest(e){null!=e&&this.track("query-suggest",e)}static setContext(e){let t=Hu.find((t=>t===e));t&&(Gh=t)}static clearContext(){Gh=void 0}static destroy(){e.instance=null}};ho=new WeakMap,pi=new WeakMap,fi=new WeakMap,mo=new WeakMap,go=new WeakMap,vo=new WeakMap,hi=new WeakMap,Xn=new WeakMap,mi=new WeakMap,gi=new WeakMap,vi=new WeakMap,yo=new WeakMap,yi=new WeakMap,_r=new WeakMap,s(jt,"Analytics"),g(jt,"instance",null),g(jt,"BLUEDOT_EVENT",{ATTEMPT_BLUEDOT:"attempt-bluedot",FOUND_POSITION:"found-position",FOUND_FLOOR:"found-floor"});var Yh=jt,bo=Yh;v();var Wh=class{constructor(){g(this,"_subscribers",{})}publish(e,t){!this._subscribers||!this._subscribers[e]||this._subscribers[e].forEach((function(e){"function"==typeof e&&e(t)}))}on(e,t){this._subscribers||(this._subscribers={}),this._subscribers[e]=this._subscribers[e]||[],this._subscribers[e].push(t)}off(e,t){if(!this._subscribers||null==this._subscribers[e])return;let n=this._subscribers[e].indexOf(t);-1!==n&&this._subscribers[e].splice(n,1)}destroy(){this._subscribers={}}};s(Wh,"PubSub");var Xu=Wh,Hh={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",venue:""};globalThis.MappedinDebug||(globalThis.MappedinDebug={enable(){globalThis.sessionStorage.setItem(Mg,"true")}});var En,Mr,bi,wo,$h,Ku,X0,Xh=class extends Xu{constructor(e){super(),S(this,wo),S(this,Ku),g(this,"perspective"),g(this,"things"),g(this,"options"),S(this,En,void 0),g(this,"updatedAt"),g(this,"categories",[]),g(this,"locations",[]),g(this,"vortexes",[]),g(this,"maps",[]),g(this,"nodes",[]),g(this,"polygons",[]),g(this,"venue",{}),g(this,"events",[]),g(this,"mapGroups",[]),g(this,"themes",[]),g(this,"locationStates",[]),g(this,"rankings"),g(this,"currentLanguage"),S(this,Mr,{}),g(this,"_categoriesById"),g(this,"_locationsById"),g(this,"_vortexesById"),g(this,"_mapsById"),g(this,"_nodesById"),g(this,"_polygonsById"),g(this,"_eventsById"),g(this,"_mapGroupsById"),g(this,"_locationStatesById"),g(this,"_locationRankingsById"),g(this,"_rankingsById"),g(this,"_categoriesByExternalId"),g(this,"_locationsByExternalId"),g(this,"_vortexesByExternalId"),g(this,"_mapsByExternalId"),g(this,"_nodesByExternalId"),g(this,"_polygonsByExternalId"),g(this,"_eventsByExternalId"),g(this,"_mapGroupsByExternalId"),g(this,"_locationStatesByExternalId"),g(this,"_locationRankingsByExternalId"),g(this,"_rankingsByExternalId"),S(this,bi,void 0),g(this,"changeLanguage",s((async(e,t=!0)=>{var n;let r=e.toLowerCase();if(this.currentLanguage.code.toLowerCase()===r)return Promise.resolve();if(null==(n=this.venue.languages)||!n.find((e=>e.code.toLowerCase()===r)))return R.error("Language ".concat(r," not found in venue ").concat(this.venue.slug)),Promise.reject("Language ".concat(r," not found in venue ").concat(this.venue.slug));if(t&&!b(this,Mr)[this.currentLanguage.code]&&(b(this,Mr)[this.currentLanguage.code]=JSON.stringify(this.toJSON())),this.currentLanguage=this.venue.languages.find((e=>e.code.toLowerCase()===r)),null!=b(this,Mr)[r]){let e=JSON.parse(b(this,Mr)[r]);await this.hydrate(e,!1,!0)}else this.options.language=this.currentLanguage.code,await this.fetch(!0);this.publish(0,this.currentLanguage)}),"changeLanguage")),g(this,"hydrate",s((async(e,t=!1,n=!1)=>{var r;let i;if("string"==typeof e)try{i=JSON.parse(e)}catch(e){return void R.error("Unable to parse JSON",e)}else i=e;let o=Object.keys(i);for(let e=0,t=o.length;e<t;++e){let t=o[e],r=i[t],s=Eu[t];null!=s&&"function"==typeof s.hydrate&&(n?"updateInPlace"in s&&"function"==typeof s.updateInPlace&&s.updateInPlace(this,r):this[t]=s.hydrate(r,this))}t&&await $y(i);let{images:s,scenes:a,imageBinaries:l,options:u}=i;u&&(this.options=u),this.images=s,this.scenes=a,this.imageBinaries=l,n||(qe.clearInstance(this),L(this,En,qe.create(this)),this.generateGetters(o)),this.currentLanguage=this.currentLanguage||(null==(r=this.venue.languages)?void 0:r.find((e=>e.code===this.options.language)))||this.venue.defaultLanguage,ge(this,wo,$h).call(this),this.initNavigator()}),"hydrate")),g(this,"images"),g(this,"imageBinaries"),g(this,"scenes"),g(this,"analytics"),g(this,"navigator"),g(this,"toJSON",s(((e=!1)=>{var t;let n={};for(let e in Eu)Array.isArray(this[e])&&(n[e]=this[e].map((e=>e.toJSON())));let r={...n,venue:this.venue.toJSON()};return e&&(r.options=this.options),null!=this.rankings&&(r.rankings=null==(t=this.rankings)?void 0:t.toJSON()),delete r.locationRankings,r}),"toJSON")),g(this,"toString",s(((e=!1)=>JSON.stringify(this.toJSON(e))),"toString")),this.options=e,L(this,En,qe.create(this));let t=bo.create({...e,testMode:!(null!=e&&e.emitAnalyticsEvents)});this.analytics={locationSelected:t.locationSelected,categorySelected:t.categorySelected,getDirections:t.getDirections}}generateGetters(e){try{for(let t=0,n=e.length;t<n;++t){let n=e[t];Array.isArray(this[n])&&(Object.defineProperty(this,"_".concat(n,"ByExternalId"),{configurable:!0,get(){let e=b(this,En)[n];if(null!=e)return e;let t={};return this[n].forEach((e=>t[e.externalId]=e)),b(this,En)[n]=t,t}}),Object.defineProperty(this,"_".concat(n,"ById"),{configurable:!0,get(){let e=b(this,En)[n];if(null!=e)return e;let t={};return this[n].forEach((e=>t[e.id]=e)),b(this,En)[n]=t,t}}))}return this}catch(e){throw new Error("Unable to generate getters, "+e)}}getCollectionItemById(e,t){let n="_".concat(e,"ById"),r="_".concat(e,"ByExternalId"),i=this[n];return null!=i&&null!=i[t]||(i=this[r],null!=i&&null!=i[t])?i[t]:null}async hydrateFromMVF(e){let t=E0(e);return this.hydrate(t)}async hydrateFromMVFv1(e){let t=T0(e);return this.hydrate(t)}async fetch(e=!1){"vortexes"in this.options.things||(this.options.things.vortexes=["name","type","accessible","weight","multiplier","nodes"]),"locationStates"in this.options.things||(this.options.things.locationStates=["name","id","value"]),Mu(this.options.clientId)||this.options.things.rankings&&delete this.options.things.rankings;let{things:t}=this.options,n=[],r=Object.keys(t);for(let t=0,i=r.length;t<i;++t){let i=r[t],o=Eu[i];if(o){let t;e?"updateInPlace"in o&&"function"==typeof o.updateInPlace&&(t=o.updateInPlace(this)):t=o.fetch(this).then((e=>(this[i]=e,Promise.resolve()))),n.push(t)}}return n.push(Gr(this.options,"cdn-access-token",{venue:this.options.venue},!1).then((e=>L(this,bi,e.token)),(()=>Promise.resolve()))),e||this.generateGetters(r),Promise.all(n).then((()=>{var e;this.currentLanguage=this.currentLanguage||(null==(e=this.venue.languages)?void 0:e.find((e=>e.code===this.options.language)))||this.venue.defaultLanguage,ge(this,wo,$h).call(this),this.initNavigator()}))}initNavigator(){this.navigator=new ql({locations:this.locations.map((e=>e.toJSON())),nodes:this.nodes.map((e=>e.toJSON())),vortexes:this.vortexes.map((e=>e.toJSON())),maps:this.maps.map((e=>e.toJSON())),polygons:this.polygons.map((e=>e.toJSON()))})}};En=new WeakMap,Mr=new WeakMap,bi=new WeakMap,wo=new WeakSet,$h=s((function(){b(this,bi)&&this.maps.forEach((e=>{var t;null!=(t=e.scene)&&t.polygons&&(e.scene.polygons+="?".concat(b(this,bi)))})),ge(this,Ku,X0).call(this)}),"#transformData"),Ku=new WeakSet,X0=s((function(){let e=this.categories.filter((e=>e.sortOrder)).map((e=>e.sortOrder));if(e.length<=0)return;let t=Math.min(...e),n=Math.max(...e);this.polygons.forEach((e=>{var r,i;let o=Xy(e,this);if(o){let s=o.categories.filter((e=>e.sortOrder)).map((e=>e.sortOrder));if(s.length>0){let o=Math.min(...s);e.categoryRank=Hy(o,t,n,null!=(i=null==(r=e.rank)?void 0:r.score)?i:0)}}}))}),"#applyCategoryRankToPolygons"),s(Xh,"Mappedin");var ct=Xh;v(),v();var Le=s((function(){return Le=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),Le.apply(this,arguments)}),"__assign");function oe(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ge(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}s(oe,"__values"),s(Ge,"__read");var ko,BI="ENTRIES",nw="KEYS",rw="VALUES",Ue="",Kh=function(){function e(e,t){var n=e._tree,r=Array.from(n.keys());this.set=e,this._type=t,this._path=r.length>0?[{node:n,keys:r}]:[]}return s(e,"TreeIterator"),e.prototype.next=function(){var e=this.dive();return this.backtrack(),e},e.prototype.dive=function(){if(0===this._path.length)return{done:!0,value:void 0};var e=wi(this._path),t=e.node,n=e.keys;if(wi(n)===Ue)return{done:!1,value:this.result()};var r=t.get(wi(n));return this._path.push({node:r,keys:Array.from(r.keys())}),this.dive()},e.prototype.backtrack=function(){if(0!==this._path.length){var e=wi(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}},e.prototype.key=function(){return this.set._prefix+this._path.map((function(e){var t=e.keys;return wi(t)})).filter((function(e){return e!==Ue})).join("")},e.prototype.value=function(){return wi(this._path).node.get(Ue)},e.prototype.result=function(){switch(this._type){case rw:return this.value();case nw:return this.key();default:return[this.key(),this.value()]}},e.prototype[Symbol.iterator]=function(){return this},e}(),wi=s((function(e){return e[e.length-1]}),"last$1"),VI=s((function(e,t,n){var r=new Map;if(void 0===t)return r;for(var i=t.length+1,o=i+n,s=new Uint8Array(o*i).fill(n+1),a=0;a<i;++a)s[a]=a;for(var l=1;l<o;++l)s[l*i]=l;return iw(e,t,n,r,s,1,i,""),r}),"fuzzySearch"),iw=s((function(e,t,n,r,i,o,s,a){var l,u,c=o*s;try{e:for(var h=oe(e.keys()),d=h.next();!d.done;d=h.next()){var p=d.value;if(p===Ue){var f=i[c-1];f<=n&&r.set(a,[e.get(p),f])}else{for(var g=o,v=0;v<p.length;++v,++g){for(var y=p[v],m=s*g,b=m-s,w=i[m],_=Math.max(0,g-n-1),M=Math.min(s-1,g+n),x=_;x<M;++x){var I=y!==t[x],S=i[b+x]+ +I,k=i[b+x+1]+1,O=i[m+x]+1,E=i[m+x+1]=Math.min(S,k,O);E<w&&(w=E)}if(w>n)continue e}iw(e.get(p),t,n,r,i,g,s,a+p)}}}catch(e){l={error:e}}finally{try{d&&!d.done&&(u=h.return)&&u.call(h)}finally{if(l)throw l.error}}}),"recurse"),Jh=function(){function e(e,t){void 0===e&&(e=new Map),void 0===t&&(t=""),this._size=void 0,this._tree=e,this._prefix=t}return s(e,"SearchableMap"),e.prototype.atPrefix=function(t){var n,r;if(!t.startsWith(this._prefix))throw new Error("Mismatched prefix");var i=Ge(Zu(this._tree,t.slice(this._prefix.length)),2),o=i[0],s=i[1];if(void 0===o){var a=Ge(nm(s),2),l=a[0],u=a[1];try{for(var c=oe(l.keys()),h=c.next();!h.done;h=c.next()){var d=h.value;if(d!==Ue&&d.startsWith(u)){var p=new Map;return p.set(d.slice(u.length),l.get(d)),new e(p,t)}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}return new e(o,t)},e.prototype.clear=function(){this._size=void 0,this._tree.clear()},e.prototype.delete=function(e){return this._size=void 0,qI(this._tree,e)},e.prototype.entries=function(){return new Kh(this,BI)},e.prototype.forEach=function(e){var t,n;try{for(var r=oe(this),i=r.next();!i.done;i=r.next()){var o=Ge(i.value,2);e(o[0],o[1],this)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.fuzzyGet=function(e,t){return VI(this._tree,e,t)},e.prototype.get=function(e){var t=tm(this._tree,e);return void 0!==t?t.get(Ue):void 0},e.prototype.has=function(e){var t=tm(this._tree,e);return void 0!==t&&t.has(Ue)},e.prototype.keys=function(){return new Kh(this,nw)},e.prototype.set=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");return this._size=void 0,Zh(this._tree,e).set(Ue,t),this},Object.defineProperty(e.prototype,"size",{get:function(){if(this._size)return this._size;this._size=0;for(var e=this.entries();!e.next().done;)this._size+=1;return this._size},enumerable:!1,configurable:!0}),e.prototype.update=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;var n=Zh(this._tree,e);return n.set(Ue,t(n.get(Ue))),this},e.prototype.fetch=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;var n=Zh(this._tree,e),r=n.get(Ue);return void 0===r&&n.set(Ue,r=t()),r},e.prototype.values=function(){return new Kh(this,rw)},e.prototype[Symbol.iterator]=function(){return this.entries()},e.from=function(t){var n,r,i=new e;try{for(var o=oe(t),s=o.next();!s.done;s=o.next()){var a=Ge(s.value,2),l=a[0],u=a[1];i.set(l,u)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},e.fromObject=function(t){return e.from(Object.entries(t))},e}(),Zu=s((function(e,t,n){var r,i;if(void 0===n&&(n=[]),0===t.length||null==e)return[e,n];try{for(var o=oe(e.keys()),s=o.next();!s.done;s=o.next()){var a=s.value;if(a!==Ue&&t.startsWith(a))return n.push([e,a]),Zu(e.get(a),t.slice(a.length),n)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return n.push([e,t]),Zu(void 0,"",n)}),"trackDown"),tm=s((function(e,t){var n,r;if(0===t.length||null==e)return e;try{for(var i=oe(e.keys()),o=i.next();!o.done;o=i.next()){var s=o.value;if(s!==Ue&&t.startsWith(s))return tm(e.get(s),t.slice(s.length))}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}),"lookup"),Zh=s((function(e,t){var n,r,i=t.length;e:for(var o=0;e&&o<i;){try{for(var s=(n=void 0,oe(e.keys())),a=s.next();!a.done;a=s.next()){var l=a.value;if(l!==Ue&&t[o]===l[0]){for(var u=Math.min(i-o,l.length),c=1;c<u&&t[o+c]===l[c];)++c;var h=e.get(l);if(c===l.length)e=h;else{var d=new Map;d.set(l.slice(c),h),e.set(t.slice(o,o+c),d),e.delete(l),e=d}o+=c;continue e}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}var p=new Map;return e.set(t.slice(o),p),p}return e}),"createPath"),qI=s((function(e,t){var n=Ge(Zu(e,t),2),r=n[0],i=n[1];if(void 0!==r)if(r.delete(Ue),0===r.size)aw(i);else if(1===r.size){var o=Ge(r.entries().next().value,2),s=o[0],a=o[1];ow(i,s,a)}}),"remove"),aw=s((function(e){if(0!==e.length){var t=Ge(nm(e),2),n=t[0],r=t[1];if(n.delete(r),0===n.size)aw(e.slice(0,-1));else if(1===n.size){var i=Ge(n.entries().next().value,2),o=i[0],s=i[1];o!==Ue&&ow(e.slice(0,-1),o,s)}}}),"cleanup"),ow=s((function(e,t,n){if(0!==e.length){var r=Ge(nm(e),2),i=r[0],o=r[1];i.set(o+t,n),i.delete(o)}}),"merge"),nm=s((function(e){return e[e.length-1]}),"last"),rm="or",GI="and",UI="and_not",xr=function(){function e(e){if(null==(null==e?void 0:e.fields))throw new Error('MiniSearch: option "fields" must be provided');this._options=Le(Le(Le({},em),e),{searchOptions:Le(Le({},Z0),e.searchOptions||{})}),this._index=new Jh,this._documentCount=0,this._documentIds=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this.addFields(this._options.fields)}return s(e,"MiniSearch"),e.prototype.add=function(e){var t,n,r,i,o=this._options,s=o.extractField,a=o.tokenize,l=o.processTerm,u=o.fields,c=o.idField,h=s(e,c);if(null==h)throw new Error('MiniSearch: document does not have ID field "'.concat(c,'"'));var d=this.addDocumentId(h);this.saveStoredFields(d,e);try{for(var p=oe(u),f=p.next();!f.done;f=p.next()){var g=f.value,v=s(e,g);if(null!=v){var y=a(v.toString(),g),m=this._fieldIds[g],b=new Set(y).size;this.addFieldLength(d,m,this._documentCount-1,b);try{for(var w=(r=void 0,oe(y)),_=w.next();!_.done;_=w.next()){var M=l(_.value,g);M&&this.addTerm(m,d,M)}}catch(e){r={error:e}}finally{try{_&&!_.done&&(i=w.return)&&i.call(w)}finally{if(r)throw r.error}}}}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}},e.prototype.addAll=function(e){var t,n;try{for(var r=oe(e),i=r.next();!i.done;i=r.next()){var o=i.value;this.add(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.addAllAsync=function(e,t){var n=this;void 0===t&&(t={});var r=t.chunkSize,i=void 0===r?10:r,o={chunk:[],promise:Promise.resolve()},s=e.reduce((function(e,t,r){var o=e.chunk,s=e.promise;return o.push(t),(r+1)%i==0?{chunk:[],promise:s.then((function(){return new Promise((function(e){return setTimeout(e,0)}))})).then((function(){return n.addAll(o)}))}:{chunk:o,promise:s}}),o),a=s.chunk;return s.promise.then((function(){return n.addAll(a)}))},e.prototype.remove=function(e){var t,n,r,i,o,s,a=this._options,l=a.tokenize,u=a.processTerm,c=a.extractField,h=a.fields,d=a.idField,p=c(e,d);if(null==p)throw new Error('MiniSearch: document does not have ID field "'.concat(d,'"'));try{for(var f=oe(this._documentIds),g=f.next();!g.done;g=f.next()){var v=Ge(g.value,2),y=v[0];if(p===v[1]){try{for(var m=(r=void 0,oe(h)),b=m.next();!b.done;b=m.next()){var w=b.value,_=c(e,w);if(null!=_){var M=l(_.toString(),w),x=this._fieldIds[w],I=new Set(M).size;this.removeFieldLength(y,x,this._documentCount,I);try{for(var S=(o=void 0,oe(M)),k=S.next();!k.done;k=S.next()){var O=u(k.value,w);O&&this.removeTerm(x,y,O)}}catch(e){o={error:e}}finally{try{k&&!k.done&&(s=S.return)&&s.call(S)}finally{if(o)throw o.error}}}}}catch(e){r={error:e}}finally{try{b&&!b.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}return this._storedFields.delete(y),this._documentIds.delete(y),this._fieldLength.delete(y),void(this._documentCount-=1)}}}catch(e){t={error:e}}finally{try{g&&!g.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}throw new Error("MiniSearch: cannot remove document with ID ".concat(p,": it is not in the index"))},e.prototype.removeAll=function(e){var t,n;if(e)try{for(var r=oe(e),i=r.next();!i.done;i=r.next()){var o=i.value;this.remove(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new Jh,this._documentCount=0,this._documentIds=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},e.prototype.search=function(e,t){var n,r;void 0===t&&(t={});var i=this.executeQuery(e,t),o=[];try{for(var s=oe(i),a=s.next();!a.done;a=s.next()){var l=Ge(a.value,2),u=l[0],c=l[1],h=c.score,d=c.terms,p=c.match,f=d.length,g={id:this._documentIds.get(u),score:h*f,terms:Object.keys(p),match:p};Object.assign(g,this._storedFields.get(u)),(null==t.filter||t.filter(g))&&o.push(g)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o.sort(ew),o},e.prototype.autoSuggest=function(e,t){var n,r,i,o;void 0===t&&(t={}),t=Le(Le({},XI),t);var s=new Map;try{for(var a=oe(this.search(e,t)),l=a.next();!l.done;l=a.next()){var u=l.value,c=u.score,h=(m=u.terms).join(" ");null!=(v=s.get(h))?(v.score+=c,v.count+=1):s.set(h,{score:c,terms:m,count:1})}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}var d=[];try{for(var p=oe(s),f=p.next();!f.done;f=p.next()){var g=Ge(f.value,2),v=g[0],y=g[1],m=(c=y.score,y.terms),b=y.count;d.push({suggestion:v,terms:m,score:c/b})}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}return d.sort(ew),d},Object.defineProperty(e.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),e.loadJSON=function(t,n){if(null==n)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return e.loadJS(JSON.parse(t),n)},e.getDefault=function(e){if(em.hasOwnProperty(e))return Qh(em,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))},e.loadJS=function(t,n){var r,i,o,s,a=t.index,l=t.documentCount,u=t.nextId,c=t.documentIds,h=t.fieldIds,d=t.fieldLength,p=t.averageFieldLength,f=t.storedFields,g=t.serializationVersion;if(1!==g&&2!==g)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var v=new e(n);v._documentCount=l,v._nextId=u,v._documentIds=Ju(c),v._fieldIds=h,v._fieldLength=Ju(d),v._avgFieldLength=p,v._storedFields=Ju(f),v._index=new Jh;try{for(var y=oe(a),m=y.next();!m.done;m=y.next()){var b=Ge(m.value,2),w=b[0],_=b[1],M=new Map;try{for(var x=(o=void 0,oe(Object.keys(_))),I=x.next();!I.done;I=x.next()){var S=I.value,k=_[S];1===g&&(k=k.ds),M.set(parseInt(S,10),Ju(k))}}catch(e){o={error:e}}finally{try{I&&!I.done&&(s=x.return)&&s.call(x)}finally{if(o)throw o.error}}v._index.set(w,M)}}catch(e){r={error:e}}finally{try{m&&!m.done&&(i=y.return)&&i.call(y)}finally{if(r)throw r.error}}return v},e.prototype.executeQuery=function(e,t){var n=this;if(void 0===t&&(t={}),"string"!=typeof e){var r=Le(Le(Le({},t),e),{queries:void 0}),i=e.queries.map((function(e){return n.executeQuery(e,r)}));return this.combineResults(i,e.combineWith)}var o=this._options,s=o.tokenize,a=o.processTerm,l=o.searchOptions,u=Le(Le({tokenize:s,processTerm:a},l),t),c=u.tokenize,h=u.processTerm,d=c(e).map((function(e){return h(e)})).filter((function(e){return!!e})).map(HI(u)).map((function(e){return n.executeQuerySpec(e,u)}));return this.combineResults(d,u.combineWith)},e.prototype.executeQuerySpec=function(e,t){var n,r,i,o,s,a,l=Le(Le({},this._options.searchOptions),t),u=(l.fields||this._options.fields).reduce((function(e,t){var n;return Le(Le({},e),((n={})[t]=Qh(e,t)||1,n))}),l.boost||{}),c=l.boostDocument,h=l.weights,d=l.maxFuzzy,p=Le(Le({},Z0.weights),h),f=p.fuzzy,g=p.prefix,v=this._index.get(e.term),y=this.termResults(e.term,e.term,1,v,u,c);if(e.prefix&&(s=this._index.atPrefix(e.term)),e.fuzzy){var m=!0===e.fuzzy?.2:e.fuzzy,b=m<1?Math.min(d,Math.round(e.term.length*m)):m;b&&(a=this._index.fuzzyGet(e.term,b))}if(s)try{for(var w=oe(s),_=w.next();!_.done;_=w.next()){var M=Ge(_.value,2),x=M[0],I=M[1];if(E=x.length-e.term.length){null==a||a.delete(x);var S=g*x.length/(x.length+.3*E);this.termResults(e.term,x,S,I,u,c,y)}}}catch(e){n={error:e}}finally{try{_&&!_.done&&(r=w.return)&&r.call(w)}finally{if(n)throw n.error}}if(a)try{for(var k=oe(a.keys()),O=k.next();!O.done;O=k.next()){x=O.value;var E,P=Ge(a.get(x),2),A=P[0];if(E=P[1]){S=f*x.length/(x.length+E);this.termResults(e.term,x,S,A,u,c,y)}}}catch(e){i={error:e}}finally{try{O&&!O.done&&(o=k.return)&&o.call(k)}finally{if(i)throw i.error}}return y},e.prototype.combineResults=function(e,t){if(void 0===t&&(t=rm),0===e.length)return new Map;var n=t.toLowerCase();return e.reduce(YI[n])||new Map},e.prototype.toJSON=function(){var e,t,n,r,i=[];try{for(var o=oe(this._index),s=o.next();!s.done;s=o.next()){var a=Ge(s.value,2),l=a[0],u=a[1],c={};try{for(var h=(n=void 0,oe(u)),d=h.next();!d.done;d=h.next()){var p=Ge(d.value,2),f=p[0],g=p[1];c[f]=Object.fromEntries(g)}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}i.push([l,c])}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),index:i,serializationVersion:2}},e.prototype.termResults=function(e,t,n,r,i,o,s){var a,l,u,c,h;if(void 0===s&&(s=new Map),null==r)return s;try{for(var d=oe(Object.keys(i)),p=d.next();!p.done;p=d.next()){var f=p.value,g=i[f],v=this._fieldIds[f],y=r.get(v);if(null!=y){var m=y.size,b=this._avgFieldLength[v];try{for(var w=(u=void 0,oe(y.keys())),_=w.next();!_.done;_=w.next()){var M=_.value,x=o?o(this._documentIds.get(M),t):1;if(x){var I=y.get(M),S=this._fieldLength.get(M)[v],k=n*g*x*$I(I,m,this._documentCount,S,b),O=s.get(M);if(O){O.score+=k,KI(O.terms,e);var E=Qh(O.match,t);E?E.push(f):O.match[t]=[f]}else s.set(M,{score:k,terms:[e],match:(h={},h[t]=[f],h)})}}}catch(e){u={error:e}}finally{try{_&&!_.done&&(c=w.return)&&c.call(w)}finally{if(u)throw u.error}}}}}catch(e){a={error:e}}finally{try{p&&!p.done&&(l=d.return)&&l.call(d)}finally{if(a)throw a.error}}return s},e.prototype.addTerm=function(e,t,n){var r=this._index.fetch(n,tw),i=r.get(e);if(null==i)(i=new Map).set(t,1),r.set(e,i);else{var o=i.get(t);i.set(t,(o||0)+1)}},e.prototype.removeTerm=function(e,t,n){if(this._index.has(n)){var r=this._index.fetch(n,tw),i=r.get(e);null==i||null==i.get(t)?this.warnDocumentChanged(t,e,n):i.get(t)<=1?i.size<=1?r.delete(e):i.delete(t):i.set(t,i.get(t)-1),0===this._index.get(n).size&&this._index.delete(n)}else this.warnDocumentChanged(t,e,n)},e.prototype.warnDocumentChanged=function(e,t,n){var r,i;if(null!=console&&null!=console.warn)try{for(var o=oe(Object.keys(this._fieldIds)),s=o.next();!s.done;s=o.next()){var a=s.value;if(this._fieldIds[a]===t)return void console.warn("MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(n,'" was not present in field "').concat(a,'". Removing a document after it has changed can corrupt the index!'))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.addDocumentId=function(e){var t=this._nextId;return this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t},e.prototype.addFields=function(e){for(var t=0;t<e.length;t++)this._fieldIds[e[t]]=t},e.prototype.addFieldLength=function(e,t,n,r){var i=this._fieldLength.get(e);null==i&&this._fieldLength.set(e,i=[]),i[t]=r;var o=(this._avgFieldLength[t]||0)*n+r;this._avgFieldLength[t]=o/(n+1)},e.prototype.removeFieldLength=function(e,t,n,r){var i=this._avgFieldLength[t]*n-r;this._avgFieldLength[t]=i/(n-1)},e.prototype.saveStoredFields=function(e,t){var n,r,i=this._options,o=i.storeFields,s=i.extractField;if(null!=o&&0!==o.length){var a=this._storedFields.get(e);null==a&&this._storedFields.set(e,a={});try{for(var l=oe(o),u=l.next();!u.done;u=l.next()){var c=u.value,h=s(t,c);void 0!==h&&(a[c]=h)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}},e}(),Qh=s((function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}),"getOwnProperty"),YI=((ko={})[rm]=function(e,t){var n,r;try{for(var i=oe(t.keys()),o=i.next();!o.done;o=i.next()){var s=o.value,a=e.get(s);if(null==a)e.set(s,t.get(s));else{var l=t.get(s),u=l.score,c=l.terms,h=l.match;a.score=a.score+u,a.match=Object.assign(a.match,h),Q0(a.terms,c)}}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},ko[GI]=function(e,t){var n,r,i=new Map;try{for(var o=oe(t.keys()),s=o.next();!s.done;s=o.next()){var a=s.value,l=e.get(a);if(null!=l){var u=t.get(a),c=u.score,h=u.terms,d=u.match;Q0(l.terms,h),i.set(a,{score:l.score+c,terms:l.terms,match:Object.assign(l.match,d)})}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},ko[UI]=function(e,t){var n,r;try{for(var i=oe(t.keys()),o=i.next();!o.done;o=i.next()){var s=o.value;e.delete(s)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},ko),K0=1.2,J0=.7,WI=.5,$I=s((function(e,t,n,r,i){return Math.log(1+(n-t+.5)/(t+.5))*(WI+e*(K0+1)/(e+K0*(1-J0+J0*r/i)))}),"calcBM25Score"),HI=s((function(e){return function(t,n,r){return{term:t,fuzzy:"function"==typeof e.fuzzy?e.fuzzy(t,n,r):e.fuzzy||!1,prefix:"function"==typeof e.prefix?e.prefix(t,n,r):!0===e.prefix}}}),"termToQuerySpec"),em={idField:"id",extractField:function(e,t){return e[t]},tokenize:function(e,t){return e.split(JI)},processTerm:function(e,t){return e.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[]},Z0={combineWith:rm,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375}},XI={prefix:function(e,t,n){return t===n.length-1}},KI=s((function(e,t){e.includes(t)||e.push(t)}),"assignUniqueTerm"),Q0=s((function(e,t){var n,r;try{for(var i=oe(t),o=i.next();!o.done;o=i.next()){var s=o.value;e.includes(s)||e.push(s)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}),"assignUniqueTerms"),ew=s((function(e,t){var n=e.score;return t.score-n}),"byScore"),tw=s((function(){return new Map}),"createMap"),Ju=s((function(e){var t,n,r=new Map;try{for(var i=oe(Object.keys(e)),o=i.next();!o.done;o=i.next()){var s=o.value;r.set(parseInt(s,10),e[s])}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}),"objectToNumericMap"),JI=/[\n\r -#%-*,-/:;?@[-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+/u;v();var ZI=["0","1","2","3","4","5","6","7","8","9"],QI=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],eO=["0","1","2","3","4","5","6","7","8","9"],tO=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],d4=[...ZI,...QI,...eO,...tO],sw=["about","after","all","also","am","an","and","another","any","are","as","at","be","because","been","before","being","between","both","but","by","came","can","come","could","did","do","each","for","from","get","got","has","had","he","have","her","here","him","himself","his","how","if","in","into","is","it","like","make","many","me","might","more","most","much","must","my","never","now","of","on","only","or","other","our","out","over","said","same","should","since","some","still","such","take","than","that","the","their","them","then","there","these","they","this","those","through","to","too","under","up","very","was","way","we","well","were","what","where","which","while","who","with","would","you","your","a","i"];v();var nO=32,ut=!1,rO=120,im=0,om=class{constructor(e){g(this,"_callback"),g(this,"_frameCount"),g(this,"_ordering"),g(this,"_supersededBy"),g(this,"name"),g(this,"_remainingFrameCount"),g(this,"_lastFrameTime"),g(this,"userdata"),this._callback=e.callback,this._frameCount=null!=e.frameCount?e.frameCount:1,this._ordering=null!=e.ordering?e.ordering:0,this._supersededBy=null!=e.supersededBy?new Set(e.supersededBy):new Set,this.name=e.name,this.userdata=e.userdata,this._remainingFrameCount=this._frameCount,this._lastFrameTime=0,ut&&R.log("update instantiated",this.name)}getLastFrameTime(){return this._lastFrameTime}};s(om,"FrameUpdate");var Qu=om,sm=class{constructor(e){if(g(this,"_postponed"),g(this,"userdata"),g(this,"_priority"),g(this,"_group"),g(this,"name"),g(this,"_lastFrameTime"),g(this,"_callback"),g(this,"_complete"),g(this,"_scheduled"),g(this,"_cancelled"),null!=e.group&&null!=e.priority)throw new Error("cannot specify task priority individually within group");if(null!=e.group&&null!=e.postponeOnAdd)throw new Error("cannot specify task postpone individually within group");this._callback=e.callback,this._group=null!=e.group?e.group:null,this._priority=null!=e.priority?e.priority:0,this._postponed=null!=e.postponeOnAdd&&e.postponeOnAdd,this.name=e.name,this.userdata=e.userdata||{},this._complete=!1,this._scheduled=!1,this._cancelled=!1,this._lastFrameTime=0,ut&&R.log("task instantiated",this.name)}isComplete(){return this._complete}getLastFrameTime(){return this._lastFrameTime}};s(sm,"FrameTask");var Tn=sm,um=class{constructor(e){g(this,"_postponed"),g(this,"_onComplete"),g(this,"_priority"),g(this,"userdata"),g(this,"name"),g(this,"_tasks"),g(this,"_scheduledTasks"),g(this,"_scheduled"),g(this,"_cancelled"),this._onComplete=null!=e.onComplete?e.onComplete:()=>{},this._priority=null!=e.priority?e.priority:0,this._postponed=null!=e.postponeOnAdd&&e.postponeOnAdd,this.name=e.name,this.userdata=e.userdata,this._tasks=new Set,this._scheduledTasks=new Set,this._scheduled=!1,this._cancelled=!1,ut&&R.log("task group instantiated",this.name)}isComplete(){return 0===this._scheduledTasks.size}getTasks(){return Array.from(this._tasks.values())}clear(){this._tasks.clear(),this._scheduledTasks.clear()}_popTask(){for(let e of this._scheduledTasks)return this._scheduledTasks.delete(e),e}};s(um,"FrameTaskGroup");var el=um,lm=class{constructor(e){g(this,"_maxMillisecondsPerFrame"),g(this,"_time"),this._maxMillisecondsPerFrame=null!=(null==e?void 0:e.maxMillisecondsPerFrame)?e.maxMillisecondsPerFrame:nO,this._time=0}beginFrame(){this._time=performance.now()+this._maxMillisecondsPerFrame}hasTimeRemaining(){return performance.now()<=this._time}};s(lm,"RealTimeTimer");var am=lm,cm=class{constructor(e){var t;g(this,"_raf"),g(this,"options"),g(this,"_timer"),g(this,"_performance"),g(this,"_scheduledUpdatesByOrdering"),g(this,"_scheduledTasksByPriority"),g(this,"_postponedTasks"),g(this,"_requestAnimationFrameHandle"),g(this,"_updatesToRunThisFrame"),g(this,"_lastFrameTime",0),g(this,"_updatesRunLastFrame"),this.options=e,this._timer=null!=(null==e?void 0:e.timer)?e.timer:new am,this._performance=null!=(null==e?void 0:e.performance)&&e.performance,this._scheduledUpdatesByOrdering=new ki,this._scheduledTasksByPriority=new ki,this._postponedTasks=new Set,this._requestAnimationFrameHandle=null,this._updatesToRunThisFrame=[],this._lastFrameTime=0,this._updatesRunLastFrame=new Set,this.update=this.update.bind(this),ut&&R.log("task scheduler instantiated"),null!=(t=globalThis.MappedinDebug)&&t.TEST_IOS&&(this._raf=e=>setTimeout(e,16))}clear(){for(let e of this._scheduledTasksByPriority.values())e._cancelled=!0;for(let e of this._postponedTasks.values())e._cancelled=!0;this._scheduledUpdatesByOrdering=new ki,this._scheduledTasksByPriority=new ki,this._postponedTasks=new Set,this._lastFrameTime=0,this._updatesRunLastFrame.clear(),ut&&R.log("task scheduler cleared")}destroy(){this.clear()}requestAnimationFrame(){null==this._requestAnimationFrameHandle&&(this._requestAnimationFrameHandle="function"==typeof this._raf?this._raf(this.update):requestAnimationFrame(this.update))}update(e){var t;let n;this._timer.beginFrame(),this._performance&&(n=performance.now());let r=!1;ut&&(0===im&&(r=!0),++im,im%=rO);let i=this._scheduledUpdatesByOrdering.keys();for(let e=i.length-1;e>=0;--e){let t=i[e];for(let e of this._scheduledUpdatesByOrdering.get(t).values())this._updatesToRunThisFrame.push(e),r&&R.log("update scheduled to run this frame",e.name)}for(let e of this._updatesToRunThisFrame){--e._remainingFrameCount,e._remainingFrameCount<=0&&this._scheduledUpdatesByOrdering.delete(e._ordering,e),e._superseded=!1;for(let t of this._updatesToRunThisFrame)e._supersededBy.has(t)&&(e._superseded=!0,r&&R.log("update superseded",e.name,t.name))}for(let e=0;e<this._updatesToRunThisFrame.length;++e)this._updatesToRunThisFrame[e]._superseded&&(this._updatesToRunThisFrame.splice(e,1),--e);for(let t of this._updatesToRunThisFrame){let n;this._performance&&(n=performance.now()),t._callback(e),this._performance&&(t._lastFrameTime=performance.now()-n),r&&R.log("update completed",t.name)}this._updatesRunLastFrame.clear();for(let e of this._updatesToRunThisFrame)this._updatesRunLastFrame.add(e);if(this._updatesToRunThisFrame.splice(0,this._updatesToRunThisFrame.length),this._scheduledTasksByPriority.size>0)do{this._executeOneTask(e)}while(this._timer.hasTimeRemaining()&&this._scheduledTasksByPriority.size>0);this._performance&&(this._lastFrameTime=performance.now()-n),this._requestAnimationFrameHandle=null,(this._scheduledUpdatesByOrdering.size>0||this._scheduledTasksByPriority.size>0)&&this.requestAnimationFrame(),null!=(t=this.options)&&t.onUpdateEnd&&this.options.onUpdateEnd()}flushTasks(){for(;this._scheduledTasksByPriority.size>0;)this._executeOneTask(performance.now())}getLastFrameTime(){return this._lastFrameTime}getUpdatesRunLastFrame(){return this._updatesRunLastFrame}_executeOneTask(e){let t,n=this._scheduledTasksByPriority.popFromMaxKey(),r=null;R.assert(void 0!==n),Object.getPrototypeOf(n)===el.prototype&&(r=n,n=r._popTask()),R.assert(void 0!==n),R.assert(Object.getPrototypeOf(n)===Tn.prototype),this._performance&&(t=performance.now()),n._callback(e),n._complete=!0,this._performance&&(n._lastFrameTime=performance.now()-t),ut&&R.log("task completed",n.name),null!=r&&(r.isComplete()?(r.clear(),r._onComplete(),ut&&R.log("group completed",r.name)):this._scheduledTasksByPriority.insert(r._priority,r))}scheduleUpdate(e){e._remainingFrameCount=e._frameCount,this._scheduledUpdatesByOrdering.insert(e._ordering,e),this.requestAnimationFrame()}scheduleTask(e){if(Object.getPrototypeOf(e)===el)throw new Error("frame task groups are automatically scheduled when a task is added to them and cannot be manually scheduled: "+e.name);if(e._scheduled)throw new Error("cannot schedule already scheduled task: "+e.name);if(e._cancelled)throw new Error("cannot schedule cancelled task: "+e.name);let t=e;"_group"in e&&null!=e._group&&(e._group._tasks.add(e),e._group._scheduledTasks.add(e),t=e._group),t._postponed?this._postponedTasks.add(t):this._scheduledTasksByPriority.insert(t._priority,t),e._scheduled=!0,t._scheduled=!0,ut&&R.log("task scheduled",e.name),this.requestAnimationFrame()}cancelUpdate(e){this._scheduledUpdatesByOrdering.delete(e._ordering,e),ut&&R.log("update cancelled",e.name)}cancelTask(e){if(!e._scheduled)throw new Error("cannot cancel task that has not been scheduled: "+e.name);if(e._cancelled)throw new Error("cannot cancel task that has already been cancelled: "+e.name);if("_group"in e&&null!=e._group){let t=e._group.isComplete();e._group._tasks.delete(e),e._group._scheduledTasks.delete(e),e._group.isComplete()&&(this._scheduledTasksByPriority.delete(e._group._priority,e._group),t||e._group._onComplete())}else this._scheduledTasksByPriority.delete(e._priority,e),this._postponedTasks.delete(e);Object.getPrototypeOf(e)===Tn.prototype?e._cancelled=!0:"clear"in e&&e.clear(),ut&&R.log("task cancelled",e.name)}postponeTask(e){if("_group"in e&&null!=e._group)throw new Error("cannot postpone individual tasks in group: "+e.name);if(e._cancelled)throw new Error("cannot postpone cancelled task: "+e.name);if(!e._postponed){if(Object.getPrototypeOf(e)===Tn.prototype){if("_complete"in e)return;if(!e._scheduled)throw new Error("cannot postpone task that has not been scheduled: "+e.name)}this._scheduledTasksByPriority.delete(e._priority,e),(Object.getPrototypeOf(e)===Tn.prototype||!e.isComplete())&&this._postponedTasks.add(e),e._postponed=!0,ut&&R.log("task postponed",e.name)}}resumeTask(e){if("_group"in e&&null!=e._group)throw new Error("cannot resume individual tasks in groups");if(e._cancelled)throw new Error("cannot resume cancelled task");if(e._postponed){if(Object.getPrototypeOf(e)===Tn.prototype){if("_complete"in e&&e._complete)return;if(!e._scheduled)throw new Error("cannot resume unscheduled task")}this._postponedTasks.delete(e),(Object.getPrototypeOf(e)===Tn.prototype||!e.isComplete())&&this._scheduledTasksByPriority.insert(e._priority,e),e._postponed=!1,this.requestAnimationFrame(),ut&&R.log("task resumed",e.name)}}setTaskPriority(e,t){if(Object.getPrototypeOf(e)===Tn.prototype&&!e._scheduled)throw new Error("task must be scheduled to be reprioritized");this._scheduledTasksByPriority.has(e._priority,e)&&(this._scheduledTasksByPriority.delete(e._priority,e),this._scheduledTasksByPriority.insert(t,e)),e._priority=t,ut&&R.log("task priority changed",e.name,t)}};s(cm,"TaskScheduler");var tl=cm,dm=class{constructor(){g(this,"_map"),g(this,"_size"),g(this,"_sortedKeys"),this._map=new Map,this._size=0,this._sortedKeys=[]}has(e,t){return null!=this._map.get(e)&&this._map.get(e).has(t)}get(e){return this._map.get(e)}insert(e,t){if(R.assert("number"==typeof e&&Number.isFinite(e)),null==this._map.get(e)){this._map.set(e,new Set);for(let t=0;t<=this._sortedKeys.length;++t)if(t===this._sortedKeys.length||e<this._sortedKeys[t]){this._sortedKeys.splice(t,0,e);break}}this._map.get(e).has(t)||(this._map.get(e).add(t),++this._size)}delete(e,t){null!=this._map.get(e)&&this._map.get(e).has(t)&&(this._map.get(e).delete(t),--this._size,0===this._map.get(e).size&&(this._map.delete(e),this._sortedKeys.splice(this._sortedKeys.indexOf(e),1)))}pop(e){if(null!=this._map.get(e)){let t;for(t of this._map.get(e).values()){this._map.get(e).delete(t),--this._size;break}return 0===this._map.get(e).size&&(this._map.delete(e),this._sortedKeys.splice(this._sortedKeys.indexOf(e),1)),t}}popFromMaxKey(){if(this._sortedKeys.length>0)return this.pop(this._sortedKeys[this._sortedKeys.length-1])}values(){let e=this._map.keys(),t=null,n={[Symbol.iterator]:()=>n,next:()=>{if(null==t){let n=e.next();if(n.done)return n;t=this._map.get(n.value).values()}let n=t.next();for(;n.done;){let r=e.next();if(r.done)return r;t=this._map.get(r.value).values(),n=t.next()}return n}};return n}keys(){return this._sortedKeys}get size(){let e=0;for(let t of this._map.values())e+=t.size;return R.assert(e===this._size),e}};s(dm,"Multimap");var ki=dm,Pn=s((e=>e.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()),"removeAccents"),iO=/([!-/:-@])|(?:[\n\r [-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+)/u;function aO(e){return e.split(iO).filter(Boolean)}s(aO,"tokenizeAndCaptureDelimiters");var rn,Et,Kn,an,xe,_o,Mo,Mi,xo,Eo,To,Po,xi,In,nl,rl,Jn,Io,il,al,ol,lw,_i="",oO=.09,sO=1,uO=.025,lO=.5,cO=5e-4,dO=5e-4,pO=.01,fO=.05,uw=1,hO=.01,mO=.2,gO={MappedinCategory:"categories",MappedinLocation:"locations"},vO={searchDescriptions:!0,searchTags:!0,searchTagsInCategories:!1,searchDescriptionsInCategories:!1,stopWords:sw,jsonIndex:void 0,useLocationRank:!0,emitAnalyticsEvents:"production"===E.env.NODE_ENV,constants:{PRIMARY_INDEX_FUZZYNESS:oO,PRIMARY_INDEX_WEIGHT:sO,SECONDARY_INDEX_WEIGHT:uO,CATEGORY_NAME_WEIGHT:lO,LOCATION_NAME_WEIGHT:uw,CATEGORY_LOCATION_DESCRIPTION_WEIGHT:cO,CATEGORY_LOCATION_TAGS_WEIGHT:dO,CATEGORY_LOCATION_NAME_WEIGHT:pO,PRIMARY_INDEX_TAGS_NAME_WEIGHT:fO,LOCATION_DEFAULT_RANK:uw,RATIO_OF_FUZZY_TO_EXACT:hO,RATIO_OF_PREFIX_TO_EXACT:mO}},fm=class{constructor(e,t){var n;S(this,ol),S(this,rn,void 0),S(this,Et,void 0),S(this,Kn,void 0),S(this,an,void 0),S(this,xe,void 0),S(this,_o,new tl({performance:!0})),S(this,Mo,void 0),S(this,Mi,void 0),S(this,xo,new Map),S(this,Eo,void 0),S(this,To,void 0),S(this,Po,void 0),g(this,"buildIndices",s((()=>{var e,t;L(this,Jn,new Promise((e=>{L(this,Io,e)})));let{PRIMARY_INDEX_FUZZYNESS:n,PRIMARY_INDEX_WEIGHT:r,CATEGORY_NAME_WEIGHT:i,RATIO_OF_FUZZY_TO_EXACT:o,RATIO_OF_PREFIX_TO_EXACT:s,PRIMARY_INDEX_TAGS_NAME_WEIGHT:a}=b(this,xe).constants,l=["object","query","weight","tag","rank"],u={fields:["query","name","tag"],storeFields:l,searchOptions:{combineWith:"OR",prefix:!0,fuzzy:n},boost:{name:r,query:r,tag:a},weights:{fuzzy:o,prefix:s},boostDocument:e=>e.includes("MappedinLocation")?r:e.includes("MappedinCategory")?i:r,tokenize:aO},c={fields:["description"],storeFields:l,searchOptions:{combineWith:"AND",prefix:!0,fuzzy:.1},processTerm:(e,t)=>{var n;return null!=(n=b(this,Mo))&&n.has(e.toLowerCase())?null:e.toLowerCase()}},h={fields:["category.locations.description","category.locations.tags","category.locations.name"],storeFields:[...l,"ref","category.locations.tags","category.locations.name","category.locations.description"],searchOptions:{combineWith:"AND",prefix:!0,fuzzy:!1}};if(null!=(e=b(this,xe))&&e.jsonIndex){let{primary:e,secondary:n,extra:r}=JSON.parse(null==(t=b(this,xe))?void 0:t.jsonIndex);L(this,Et,xr.loadJS(e,u)),L(this,Kn,xr.loadJS(n,c)),L(this,an,xr.loadJS(r,h))}else L(this,Et,new xr(u)),L(this,Kn,new xr(c)),L(this,an,new xr(h)),b(this,rn).locations.forEach(b(this,nl)),b(this,rn).categories.forEach(b(this,rl));b(this,_o).update(performance.now())}),"buildIndices")),S(this,xi,0),S(this,In,s((e=>{ll(this,xi)._++,b(this,_o).scheduleUpdate(new Qu({name:"updateIndex",ordering:0,frameCount:1,callback:()=>{try{e()}catch(e){R.warn("faild updating index due to",e)}ll(this,xi)._--,0===b(this,xi)&&b(this,Io).call(this)}}))}),"#addTask")),S(this,nl,s((e=>{var t,n,r;let{SECONDARY_INDEX_WEIGHT:i,LOCATION_DEFAULT_RANK:o,PRIMARY_INDEX_TAGS_NAME_WEIGHT:s}=b(this,xe).constants,a=o;null!=(t=b(this,xe))&&t.useLocationRank&&(a=Array.isArray(e.polygons)?Math.max(...e.polygons.map((e=>{var t,n;return null!=(t=e.rank)&&t.score?null==(n=e.rank)?void 0:n.score:o})),o):o),b(this,In).call(this,(()=>{b(this,Et).add({name:Pn(e.name),tags:"",id:"MappedinLocation#"+e.id,weight:o,rank:a})})),null!=(n=b(this,xe))&&n.searchTags&&Array.isArray(e.tags)&&e.tags.forEach((t=>{b(this,Et).add({name:"",tag:Pn(t),id:"MappedinLocation#"+e.id,weight:s,rank:a})})),null!=(r=b(this,xe))&&r.searchDescriptions&&b(this,In).call(this,(()=>b(this,Kn).add({description:Pn(e.description||""),id:"MappedinLocation#"+e.id,weight:i,rank:a})))}),"#processLocation")),S(this,rl,s((e=>{var t,n;let{CATEGORY_LOCATION_DESCRIPTION_WEIGHT:r,CATEGORY_LOCATION_TAGS_WEIGHT:i,CATEGORY_LOCATION_NAME_WEIGHT:o,CATEGORY_NAME_WEIGHT:s}=b(this,xe).constants;b(this,In).call(this,(()=>b(this,Et).add({name:Pn(e.name||""),description:"",id:"MappedinCategory#"+e.id,weight:s})));let a=e.locations.reduce(((e,t)=>e+" ".concat(_i," ")+t.name),"")+" ".concat(_i);if(null!=(t=b(this,xe))&&t.searchDescriptionsInCategories&&e.locations.forEach((t=>{null!=t.description&&b(this,In).call(this,(()=>b(this,an).add({id:"MappedinCategory#"+e.id,"category.locations.description":Pn(t.description),ref:t.name,weight:r})))})),null!=(n=b(this,xe))&&n.searchTagsInCategories){let t=e.locations.reduce(((e,t)=>{var n;return e+(null==(n=t.tags)?void 0:n.reduce(((e,t)=>e+" ".concat(_i," ")+t),""))+" ".concat(_i)}),"");b(this,In).call(this,(()=>b(this,an).add({"category.locations.tags":Pn(t),id:"MappedinCategory#"+e.id,weight:i})))}b(this,In).call(this,(()=>b(this,an).add({"category.locations.name":Pn(a),id:"MappedinCategory#"+e.id,weight:o})))}),"#processCategory")),S(this,Jn,void 0),S(this,Io,void 0),S(this,il,s((e=>{var t;let n=e.score,{object:r,id:i,weight:o,rank:s}=e,[a,l]=i.split("#"),u=r||b(this,rn).getCollectionItemById(gO[a],l);return s&&null!=(t=b(this,xe))&&t.useLocationRank&&(n+=s),o&&(n*=o),{score:n,type:a,object:u}}),"#processSearchResult")),S(this,al,s(((e,t)=>{for(let n in e.match)e.match[n].forEach((r=>{let i=e.ref||e[r]||t.object[r];if("category.locations.tags"===r||"category.locations.name"===r){let t=new RegExp("[^".concat(_i,"]* ")+n+" [^".concat(_i,"]*"),"ig").exec(e[r]);null!=t&&(i=t[0].slice(1,-1))}t.matches.push({term:n,weight:e.weight,matchesOn:r,value:i})}))}),"#addMatches")),L(this,Mi,bo.create({...e.options,testMode:!1===(null==t?void 0:t.emitAnalyticsEvents)})),L(this,xe,{...vO,...t}),L(this,rn,e),L(this,Mo,new Set(null==(n=b(this,xe))?void 0:n.stopWords));let r=b(this,rn).venue.slug;b(this,rn).on(0,this.buildIndices),this.buildIndices(),L(this,Eo,Kr((e=>{b(this,Mi).trackSearchSuggest({query:e}),ye.addPendingEvent(new sa({venue:r}))}),2e3)),L(this,To,Kr((e=>{b(this,Mi).trackSearch({query:e}),ye.addPendingEvent(new oa({venue:r}))}),2e3)),L(this,Po,Kr((()=>{ye.addPendingEvent(new ia({venue:r}))}),2e3)),ye.addPendingEvent(new aa({search_descriptions:b(this,xe).searchDescriptions,search_tags:b(this,xe).searchTags,search_descriptions_in_categories:b(this,xe).searchDescriptionsInCategories,search_tags_in_categories:b(this,xe).searchTagsInCategories,use_location_rank:b(this,xe).useLocationRank,venue:r}))}async suggest(e){await b(this,Jn);let{PRIMARY_INDEX_FUZZYNESS:t,PRIMARY_INDEX_WEIGHT:n,PRIMARY_INDEX_TAGS_NAME_WEIGHT:r,RATIO_OF_FUZZY_TO_EXACT:i,RATIO_OF_PREFIX_TO_EXACT:o}=b(this,xe).constants,s=b(this,Et).autoSuggest(e,{fields:["name","tag","query"],combineWith:"AND",prefix:!0,fuzzy:t,boost:{name:n,query:n,tag:r},weights:{fuzzy:i,prefix:o}});return b(this,Eo).call(this,e),{total:s.length,hits:s.map((e=>({text:e.suggestion})))}}async search(e){await b(this,Jn);let t=ge(this,ol,lw).call(this,e);return b(this,To).call(this,e),t}async toJSON(){return await b(this,Jn),JSON.stringify({primary:b(this,Et),secondary:b(this,Kn),extra:b(this,an)})}async addQuery(e){let t,n,{query:r,object:i,weight:o=1}=e;await b(this,Jn),t=hn.is(i)?"MappedinLocation":gr.is(i)?"MappedinCategory":"Custom","MappedinLocation"===t||"MappedinCategory"===t?n=t+"#"+i.id:"string"==typeof i.id?n="Custom#"+i.id:(n=b(this,xo).get(i),n||(n="Custom#"+bn(),b(this,xo).set(i,n))),b(this,Et).add({id:n,weight:o,object:i,query:Pn(r)}),b(this,Po).call(this)}destroy(){b(this,rn).off(0,this.buildIndices)}};rn=new WeakMap,Et=new WeakMap,Kn=new WeakMap,an=new WeakMap,xe=new WeakMap,_o=new WeakMap,Mo=new WeakMap,Mi=new WeakMap,xo=new WeakMap,Eo=new WeakMap,To=new WeakMap,Po=new WeakMap,xi=new WeakMap,In=new WeakMap,nl=new WeakMap,rl=new WeakMap,Jn=new WeakMap,Io=new WeakMap,il=new WeakMap,al=new WeakMap,ol=new WeakSet,lw=s((function(e){let t=[],n=Pn(e);t=[...b(this,Et).search(n),...b(this,Kn).search(n),...b(this,an).search(n)].sort(((e,t)=>t.score-e.score));let r={};for(let e of t){let t=b(this,il).call(this,e);r[e.id]?r[e.id].score+=t.score:r[e.id]={...t,matches:[]},b(this,al).call(this,e,r[e.id])}return Object.keys(r).map((e=>({...r[e],matches:r[e].matches.sort(((e,t)=>t.weight-e.weight))}))).sort(((e,t)=>t.score-e.score))}),"#doSearch"),s(fm,"OfflineSearch");var pm=fm;v();var cw=(e=>(e.MULTI_GEOMETRY="MULTI_GEOMETRY",e.SINGLE_GEOMETRY="SINGLE_GEOMETRY",e))(cw||{}),hm=globalThis.fetch;function it(){if(null==hm)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return hm}function z4(e){hm=e}s(it,"isomorphicFetch"),s(z4,"setFetchFn");var dw,yO=null==(dw=null==E?void 0:E.env)?void 0:dw.npm_package_version;globalThis.btoa||(globalThis.btoa=pw.encode);var bO=["ar"];function Zn(e){var t;let n={...Hh,...e};return n.headers={...n.headers,"mappedin-sdk-version":yO},n.things=Ky("things"in e?e.things:void 0),"platformString"in e&&(n.headers={...n.headers,"mappedin-platform-version":e.platformString}),n.noAuth||(n.accessToken?n.authorization="Bearer ".concat(n.accessToken):n.clientId&&n.clientSecret&&(n.authorization="Basic ".concat(globalThis.btoa("".concat(n.clientId,":").concat(n.clientSecret))))),n.language=null==(t=n.language)?void 0:t.toLowerCase(),n}function fw(e){return e.endsWith("/")?e:"".concat(e,"/")}async function Y4(e){let t={emitAnalyticsEvents:!0,version:"2.0.0",...e},n=Zn(t),r=new ct(n),i=await MO(n);if("1.0.0"===n.version){let e=w0(await v0(i));return r.hydrateFromMVFv1(e),r}let o=b0(zh(await Rh(i)),n.override);return"function"==typeof t.onMVFParsed&&t.onMVFParsed(o),await r.hydrateFromMVF(o),ye.addPendingEvent(new Xi({venue:n.venue})),r}async function W4(e){e.key||R.error('"key" is required.'),e.secret||R.error('"secret" is required.'),e.mapId||R.error('"mapId" is required.');let{access_token:t}=await xO(e),n={emitAnalyticsEvents:!0,clientId:e.key,clientSecret:e.secret,venue:e.mapId,accessToken:t,...e},r=Zn({...n}),i=new ct(r),o=await TO(r,t),s=zh(await Rh(o));return"function"==typeof n.onMVFParsed&&n.onMVFParsed(s),i.hydrateFromMVF(s),i}async function wO(e){let t={emitAnalyticsEvents:!0,secure:!0,...e},n=Zn({baseUrl:"https://api-gateway.mappedin.com/",...t}),r="public/1/".concat(n.useDraftData?"draft/":""),i=new ct({...n,baseUrl:n.baseUrl+r});return await i.fetch(),t.emitAnalyticsEvents,ye.addPendingEvent(new Hi({venue:n.venue})),i}async function $4(e){let t=Zn({baseUrl:"https://api-gateway.mappedin.com/",...{emitAnalyticsEvents:!0,secure:!0,...e}}),n="public/1/".concat(t.useDraftData?"draft/":""),r=new ct({...t,baseUrl:t.baseUrl+n}),i=await vr.fetch(r);return{hasSecureAssets:i.secureContentStorage,languages:i.languages}}function H4(e){wO=e}s(Zn,"parseOptions"),s(fw,"normalizeUrl"),s(Y4,"getVenueMVF"),s(W4,"getVenueMaker"),s(wO,"getVenue"),s($4,"getVenueMetadata"),s(H4,"__setGetVenueMock");var mm={shouldPopulateBundledImagesAsBlobs:!(typeof globalThis.navigator<"u"&&"ReactNative"==globalThis.navigator.product)};async function X4(e){let t=Zn({baseUrl:"https://api-gateway.mappedin.com/",...mm,...e}),{url:n,updated_at:r}=await kO(e),i=await it()(n,{mode:"cors"}),{data:o,format:s="jsonstring"}=await i.json();if("jsonstring"!==s)throw new Error("Unrecognized format ".concat(s));let a=new ct(t);return await a.hydrate(o,t.shouldPopulateBundledImagesAsBlobs),a.updatedAt=r,a}async function kO(e){let t=Zn({baseUrl:"https://api-gateway.mappedin.com/",...mm,...e}),{version:n,venue:r}=e,i="".concat(e.bundleBaseUri||t.baseUrl+"exports/legacy".concat(null!=t.language&&bO.includes(t.language)?"-"+t.language:"","/1/bundle"),"?venue=").concat(r,"&version=1.0.0");return t.language=void 0,await xu(t,i)}async function K4(e,{url:t,updated_at:n}){let r=Zn({baseUrl:"https://api-gateway.mappedin.com/",...mm,...e}),i=await it()(t,{mode:"cors"}),{data:o,format:s="jsonstring"}=await i.json();if("jsonstring"!==s)throw new Error("Unrecognized format".concat(s));let a=new ct(r);return await a.hydrate(o,r.shouldPopulateBundledImagesAsBlobs),a.updatedAt=n,a}async function _O(e){var t;let n=Zn({baseUrl:"https://api-gateway.mappedin.com/",...Hh,...e}),r="".concat(n.bundleBaseUri||n.baseUrl+"exports/mvf/1/bundle","?venue=").concat(n.venue,"&version=").concat(null!=(t=n.version)?t:"2.0.0");return n.headers["Content-Type"]="application/zip",await xu(n,r)}async function MO(e){return new Promise((async(t,n)=>{try{let{url:n}=await _O(e),r=await it()(n).then((e=>e.arrayBuffer()));t(new Uint8Array(r))}catch(e){n(e)}}))}async function xO(e){let t="".concat(e.authBaseUri?fw(e.authBaseUri):"https://auth-maker.mappedin.com/","api-key/token"),n=await it()(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e.key,secret:e.secret})});if(!n.ok)throw new Error("".concat(n.status," ").concat(n.statusText));return n.json()}async function EO(e,t){let n="".concat(e.bundleBaseUri?fw(e.bundleBaseUri):"https://app.mappedin.com/","api/venue/").concat(e.mapId,"/mvf"),r=await it()(n,{headers:{Authorization:"Bearer ".concat(t)}});if(!r.ok)throw new Error("".concat(r.status," ").concat(r.statusText));return r.json()}async function TO(e,t){return new Promise((async(n,r)=>{try{let{url:r}=await EO(e,t),i=await it()(r).then((e=>e.arrayBuffer()));n(new Uint8Array(i))}catch(e){r(e)}}))}async function J4(e,t=!0){let n=new ct({venue:""});return await n.hydrate(e,t),n}async function Z4(e){let t=new ct({venue:""});return await t.hydrateFromMVF(e),t}s(X4,"getVenueBundle"),s(kO,"getVenueBundleURL"),s(K4,"downloadBundle"),s(_O,"getVenueMVFURL"),s(MO,"downloadVenueBundleMVF"),s(xO,"getMakerAccessToken"),s(EO,"getMakerBundleURL"),s(TO,"downloadMVF"),s(J4,"hydrateVenue"),s(Z4,"hydrateVenueMVF");export{bo as CustomerAnalytics,Tu as GET_VENUE_EVENT,cw as MAP_RENDER_MODE,ct as Mappedin,gr as MappedinCategory,Ma as MappedinCollectionType,yr as MappedinCoordinate,mt as MappedinDestinationSet,nr as MappedinDirections,Va as MappedinEvent,hn as MappedinLocation,Ua as MappedinLocationState,Wa as MappedinMap,Ka as MappedinMapGroup,Vt as MappedinNavigatable,ka as MappedinNode,hr as MappedinPolygon,za as MappedinRankings,vr as MappedinVenue,Sa as MappedinVortex,pm as OfflineSearch,H4 as __setGetVenueMock,jf as defaultThings,K4 as downloadBundle,TO as downloadMVF,MO as downloadVenueBundleMVF,xO as getMakerAccessToken,EO as getMakerBundleURL,wO as getVenue,X4 as getVenueBundle,kO as getVenueBundleURL,Y4 as getVenueMVF,_O as getVenueMVFURL,W4 as getVenueMaker,$4 as getVenueMetadata,J4 as hydrateVenue,Z4 as hydrateVenueMVF,it as isomorphicFetch,Zn as parseOptions,z4 as setFetchFn};
|
|
1
|
+
var E,gw=Object.create,Pi=Object.defineProperty,mw=Object.getOwnPropertyDescriptor,vw=Object.getOwnPropertyNames,yw=Object.getPrototypeOf,bw=Object.prototype.hasOwnProperty,ww=(e,t,n)=>t in e?Pi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,s=(e,t)=>Pi(e,"name",{value:t,configurable:!0}),kg=(e,t)=>()=>(e&&(t=e(e=0)),t),Y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),kw=(e,t)=>{for(var n in t)Pi(e,n,{get:t[n],enumerable:!0})},_w=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of vw(t))!bw.call(e,i)&&i!==n&&Pi(e,i,{get:()=>t[i],enumerable:!(r=mw(t,i))||r.enumerable});return e},Rt=(e,t,n)=>(n=null!=e?gw(yw(e)):{},_w(!t&&e&&e.__esModule?n:Pi(n,"default",{value:e,enumerable:!0}),e)),m=(e,t,n)=>(ww(e,"symbol"!=typeof t?t+"":t,n),n),ll=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},b=(e,t,n)=>(ll(e,t,"read from private field"),n?n.call(e):t.get(e)),A=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},L=(e,t,n,r)=>(ll(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),cl=(e,t,n,r)=>({set _(r){L(e,t,r,n)},get _(){return b(e,t,r)}}),me=(e,t,n)=>(ll(e,t,"access private method"),n),v=kg((()=>{E={env:{NODE_ENV:"production",npm_package_version:"5.48.0"}}})),_g=Y(((e,t)=>{v(),function(n){var r="object"==typeof e&&e,i="object"==typeof t&&t&&t.exports==r&&t,o="object"==typeof global&&global;(o.global===o||o.window===o)&&(n=o);var a=s((function(e){this.message=e}),"InvalidCharacterError");a.prototype=new Error,a.prototype.name="InvalidCharacterError";var l=s((function(e){throw new a(e)}),"error"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,h=s((function(e){var t=(e=String(e).replace(c,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&l("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,i=0,o="",s=-1;++s<t;)r=u.indexOf(e.charAt(s)),n=i%4?64*n+r:r,i++%4&&(o+=String.fromCharCode(255&n>>(-2*i&6)));return o}),"decode"),d={encode:s((function(e){e=String(e),/[^\0-\xFF]/.test(e)&&l("The string to be encoded contains characters outside of the Latin1 range.");for(var t,n,r,i,o=e.length%3,s="",a=-1,c=e.length-o;++a<c;)t=e.charCodeAt(a)<<16,n=e.charCodeAt(++a)<<8,r=e.charCodeAt(++a),s+=u.charAt((i=t+n+r)>>18&63)+u.charAt(i>>12&63)+u.charAt(i>>6&63)+u.charAt(63&i);return 2==o?(t=e.charCodeAt(a)<<8,n=e.charCodeAt(++a),s+=u.charAt((i=t+n)>>10)+u.charAt(i>>4&63)+u.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(a),s+=u.charAt(i>>2)+u.charAt(i<<4&63)+"=="),s}),"encode"),decode:h,version:"1.0.0"};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define((function(){return d}));else if(r&&!r.nodeType)if(i)i.exports=d;else for(var p in d)d.hasOwnProperty(p)&&(r[p]=d[p]);else n.base64=d}(e)})),Be=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.areaConversion=e.timeConversion=e.distanceConversion=e.altitudeKeys=e.latitudeKeys=e.longitudeKeys=e.MAXLON=e.MINLON=e.MAXLAT=e.MINLAT=e.earthRadius=e.sexagesimalPattern=void 0;e.sexagesimalPattern=/^([0-9]{1,3})°\s*([0-9]{1,3}(?:\.(?:[0-9]{1,}))?)['′]\s*(([0-9]{1,3}(\.([0-9]{1,}))?)["″]\s*)?([NEOSW]?)$/;e.earthRadius=6378137;e.MINLAT=-90;e.MAXLAT=90;e.MINLON=-180;e.MAXLON=180;e.longitudeKeys=["lng","lon","longitude",0];e.latitudeKeys=["lat","latitude",1];e.altitudeKeys=["alt","altitude","elevation","elev",2];e.distanceConversion={m:1,km:.001,cm:100,mm:1e3,mi:1/1609.344,sm:1/1852.216,ft:100/30.48,in:100/2.54,yd:1/.9144};e.timeConversion={m:60,h:3600,d:86400};var t={m2:1,km2:1e-6,ha:1e-4,a:.01,ft2:10.763911,yd2:1.19599,in2:1550.0031};e.areaConversion=t,t.sqm=t.m2,t.sqkm=t.km2,t.sqft=t.ft2,t.sqyd=t.yd2,t.sqin=t.in2})),Oi=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e,t){return t.reduce((function(t,n){if(typeof e>"u"||null===e)throw new Error("'".concat(e,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(e,n)&&typeof n<"u"&&typeof t>"u"?(t=n,n):t}),void 0)}),"getCoordinateKey");e.default=t})),Ai=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){var t=e.toString().trim();return!isNaN(parseFloat(t))&&parseFloat(t)===Number(t)}),"isDecimal");e.default=t})),Si=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Be(),n=s((function(e){return t.sexagesimalPattern.test(e.toString().trim())}),"isSexagesimal");e.default=n})),Ci=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Be(),n=s((function(e){var n=new RegExp(t.sexagesimalPattern).exec(e);if(typeof n>"u"||null===n)throw new Error("Given value is not in sexagesimal format");var r=Number(n[2])/60||0,i=Number(n[4])/3600||0,o=parseFloat(n[1])+r+i;return["S","W"].includes(n[7])?-o:o}),"sexagesimalToDecimal");e.default=n})),zo=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Be(),n=r(Oi());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}s(r,"_interopRequireDefault"),s(i,"ownKeys"),s(o,"_objectSpread"),s(a,"_defineProperty");var l=s((function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{longitude:t.longitudeKeys,latitude:t.latitudeKeys,altitude:t.altitudeKeys},i=(0,n.default)(e,r.longitude),s=(0,n.default)(e,r.latitude),a=(0,n.default)(e,r.altitude);return o({latitude:s,longitude:i},a?{altitude:a}:{})}),"getCoordinateKeys");e.default=l})),hl=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Ai()),n=o(Si()),r=o(Ci()),i=Be();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function e(o){return(0,t.default)(o)?!(parseFloat(o)>i.MAXLAT||o<i.MINLAT):!!(0,n.default)(o)&&e((0,r.default)(o))}),"isValidLatitude");e.default=a})),ml=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(Ai()),n=o(Si()),r=o(Ci()),i=Be();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function e(o){return(0,t.default)(o)?!(parseFloat(o)>i.MAXLON||o<i.MINLON):!!(0,n.default)(o)&&e((0,r.default)(o))}),"isValidLongitude");e.default=a})),yl=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=i(zo()),n=i(hl()),r=i(ml());function i(e){return e&&e.__esModule?e:{default:e}}s(i,"_interopRequireDefault");var o=s((function(e){var i=(0,t.default)(e),o=i.latitude,s=i.longitude;if(Array.isArray(e)&&e.length>=2)return(0,r.default)(e[0])&&(0,n.default)(e[1]);if(typeof o>"u"||typeof s>"u")return!1;var a=e[s],l=e[o];return!(typeof l>"u"||typeof a>"u"||!1===(0,n.default)(l)||!1===(0,r.default)(a))}),"isValidCoordinate");e.default=o})),Uo=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(Ai()),n=a(Si()),r=a(Ci()),i=a(yl()),o=a(zo());function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}s(a,"_interopRequireDefault"),s(l,"ownKeys"),s(u,"_objectSpread"),s(c,"_defineProperty");var h=s((function e(s){if((0,t.default)(s))return Number(s);if((0,n.default)(s))return(0,r.default)(s);if((0,i.default)(s)){var a=(0,o.default)(s);return Array.isArray(s)?s.map((function(t,n){return[0,1].includes(n)?e(t):t})):u(u(u({},s),a.latitude&&c({},a.latitude,e(s[a.latitude]))),a.longitude&&c({},a.longitude,e(s[a.longitude])))}return Array.isArray(s)?s.map((function(t){return(0,i.default)(t)?e(t):t})):s}),"toDecimal");e.default=h})),pt=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Be(),n=i(Oi()),r=i(Uo());function i(e){return e&&e.__esModule?e:{default:e}}s(i,"_interopRequireDefault");var o=s((function(e,i){var o=(0,n.default)(e,t.latitudeKeys);if(!(typeof o>"u"||null===o)){var s=e[o];return!0===i?s:(0,r.default)(s)}}),"getLatitude");e.default=o})),ft=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Be(),n=i(Oi()),r=i(Uo());function i(e){return e&&e.__esModule?e:{default:e}}s(i,"_interopRequireDefault");var o=s((function(e,i){var o=(0,n.default)(e,t.longitudeKeys);if(!(typeof o>"u"||null===o)){var s=e[o];return!0===i?s:(0,r.default)(s)}}),"getLongitude");e.default=o})),zt=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return e*Math.PI/180}),"toRad");e.default=t})),er=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return 180*e/Math.PI}),"toDeg");e.default=t})),Lg=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(pt()),n=a(ft()),r=a(zt()),i=a(er()),o=Be();function a(e){return e&&e.__esModule?e:{default:e}}s(a,"_interopRequireDefault");var l=s((function(e,s,a){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6371e3,u=(0,t.default)(e),c=(0,n.default)(e),h=s/l,d=(0,r.default)(a),p=(0,r.default)(u),f=(0,r.default)(c),v=Math.asin(Math.sin(p)*Math.cos(h)+Math.cos(p)*Math.sin(h)*Math.cos(d)),g=f+Math.atan2(Math.sin(d)*Math.sin(h)*Math.cos(p),Math.cos(h)-Math.sin(p)*Math.sin(v)),m=(0,i.default)(g);return(m<o.MINLON||m>o.MAXLON)&&(g=(g+3*Math.PI)%(2*Math.PI)-Math.PI,m=(0,i.default)(g)),{latitude:(0,i.default)(v),longitude:m}}),"computeDestinationPoint");e.default=l})),jg=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Be(),n=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=t.areaConversion[n];if(r)return e*r;throw new Error("Invalid unit used for area conversion.")}),"convertArea");e.default=n})),Ng=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Be(),n=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=t.distanceConversion[n];if(r)return e*r;throw new Error("Invalid unit used for distance conversion.")}),"convertDistance");e.default=n})),Fg=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Be(),n=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kmh";switch(n){case"kmh":return e*t.timeConversion.h*t.distanceConversion.km;case"mph":return e*t.timeConversion.h*t.distanceConversion.mi;default:return e}}),"convertSpeed");e.default=n})),zg=Y((e=>{"use strict";function t(e,t){return a(e)||o(e,t)||r(e,t)||n()}function n(){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 r(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&null!=a.return&&a.return()}finally{if(i)throw o}}return n}}function a(e){if(Array.isArray(e))return e}v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,s(t,"_slicedToArray"),s(n,"_nonIterableRest"),s(r,"_unsupportedIterableToArray"),s(i,"_arrayLikeToArray"),s(o,"_iterableToArrayLimit"),s(a,"_arrayWithHoles");var l=s((function(e){var t=Math.pow(10,12);return Math.round(e*t)/t}),"imprecise"),u=s((function(e){var n=t(e.toString().split("."),2),r=n[0],i=n[1],o=Math.abs(Number(r)),s=l(60*+("0."+(i||0))),a=Math.floor(s),u=l(60*(s%a||0));return o+"° "+Number(a.toFixed(6)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+"' "+Number(u.toFixed(4)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+'"'}),"decimal2sexagesimal");e.default=u})),Ml=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return e>1?1:e<-1?-1:e}),"robustAcos");e.default=t})),An=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(pt()),n=a(ft()),r=a(zt()),i=a(Ml()),o=Be();function a(e){return e&&e.__esModule?e:{default:e}}s(a,"_interopRequireDefault");var l=s((function(e,s){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;a=typeof a<"u"&&!isNaN(a)?a:1;var l=(0,t.default)(e),u=(0,n.default)(e),c=(0,t.default)(s),h=(0,n.default)(s),d=Math.acos((0,i.default)(Math.sin((0,r.default)(c))*Math.sin((0,r.default)(l))+Math.cos((0,r.default)(c))*Math.cos((0,r.default)(l))*Math.cos((0,r.default)(u)-(0,r.default)(h))))*o.earthRadius;return Math.round(d/a)*a}),"getDistance");e.default=l})),xl=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(An());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.default;return r="function"==typeof r?r:t.default,n.slice().sort((function(t,n){return r(e,t)-r(e,n)}))}),"orderByDistance");e.default=r})),Gg=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(xl());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){return(0,t.default)(e,n)[0]}),"findNearest");e.default=r})),Wg=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(zt()),n=o(pt()),r=o(ft()),i=Be();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e){var o=0;if(e.length>2){for(var s,a,l,u=0;u<e.length;u++){u===e.length-2?(s=e.length-2,a=e.length-1,l=0):u===e.length-1?(s=e.length-1,a=0,l=1):(s=u,a=u+1,l=u+2);var c=(0,r.default)(e[s]),h=(0,n.default)(e[a]),d=(0,r.default)(e[l]);o+=((0,t.default)(d)-(0,t.default)(c))*Math.sin((0,t.default)(h))}o=o*i.earthRadius*i.earthRadius/2}return Math.abs(o)}),"getAreaOfPolygon");e.default=a})),Pl=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(pt()),n=r(ft());function r(e){return e&&e.__esModule?e:{default:e}}s(r,"_interopRequireDefault");var i=s((function(e){if(!1===Array.isArray(e)||0===e.length)throw new Error("No points were given.");return e.reduce((function(e,r){var i=(0,t.default)(r),o=(0,n.default)(r);return{maxLat:Math.max(i,e.maxLat),minLat:Math.min(i,e.minLat),maxLng:Math.max(o,e.maxLng),minLng:Math.min(o,e.minLng)}}),{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})}),"getBounds");e.default=i})),Hg=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(pt()),n=a(ft()),r=a(zt()),i=a(er()),o=Be();function a(e){return e&&e.__esModule?e:{default:e}}s(a,"_interopRequireDefault");var l=s((function(e,s){var a,l,u=(0,t.default)(e),c=(0,n.default)(e),h=(0,r.default)(u),d=(0,r.default)(c),p=s/o.earthRadius,f=h-p,v=h+p,g=(0,r.default)(o.MAXLAT),m=(0,r.default)(o.MINLAT),y=(0,r.default)(o.MAXLON),b=(0,r.default)(o.MINLON);if(f>m&&v<g){var w=Math.asin(Math.sin(p)/Math.cos(h));(a=d-w)<b&&(a+=2*Math.PI),(l=d+w)>y&&(l-=2*Math.PI)}else f=Math.max(f,m),v=Math.min(v,g),a=b,l=y;return[{latitude:(0,i.default)(f),longitude:(0,i.default)(a)},{latitude:(0,i.default)(v),longitude:(0,i.default)(l)}]}),"getBoundsOfDistance");e.default=l})),Jg=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(pt()),n=o(ft()),r=o(zt()),i=o(er());function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e){if(!1===Array.isArray(e)||0===e.length)return!1;var o=e.length,s=e.reduce((function(e,i){var o=(0,r.default)((0,t.default)(i)),s=(0,r.default)((0,n.default)(i));return{X:e.X+Math.cos(o)*Math.cos(s),Y:e.Y+Math.cos(o)*Math.sin(s),Z:e.Z+Math.sin(o)}}),{X:0,Y:0,Z:0}),a=s.X/o,l=s.Y/o,u=s.Z/o;return{longitude:(0,i.default)(Math.atan2(l,a)),latitude:(0,i.default)(Math.atan2(u,Math.sqrt(a*a+l*l)))}}),"getCenter");e.default=a})),Zg=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Pl());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e){var n=(0,t.default)(e),r=n.minLat+(n.maxLat-n.minLat)/2,i=n.minLng+(n.maxLng-n.minLng)/2;return{latitude:parseFloat(r.toFixed(6)),longitude:parseFloat(i.toFixed(6))}}),"getCenterOfBounds");e.default=r})),Il=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(pt()),n=o(ft()),r=o(zt()),i=o(er());function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e,o){var s=(0,r.default)((0,n.default)(o))-(0,r.default)((0,n.default)(e)),a=Math.log(Math.tan((0,r.default)((0,t.default)(o))/2+Math.PI/4)/Math.tan((0,r.default)((0,t.default)(e))/2+Math.PI/4));return Math.abs(s)>Math.PI&&(s=s>0?-1*(2*Math.PI-s):2*Math.PI+s),((0,i.default)(Math.atan2(s,a))+360)%360}),"getRhumbLineBearing");e.default=a})),nm=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Il());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.default,i="function"==typeof r?r(e,n):(0,t.default)(e,n);if(isNaN(i))throw new Error("Could not calculate bearing for given points. Check your bearing function");switch(Math.round(i/22.5)){case 1:return"NNE";case 2:return"NE";case 3:return"ENE";case 4:return"E";case 5:return"ESE";case 6:return"SE";case 7:return"SSE";case 8:return"S";case 9:return"SSW";case 10:return"SW";case 11:return"WSW";case 12:return"W";case 13:return"WNW";case 14:return"NW";case 15:return"NNW";default:return"N"}}),"getCompassDirection");e.default=r})),Al=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(An()),n=r(Ml());function r(e){return e&&e.__esModule?e:{default:e}}s(r,"_interopRequireDefault");var i=s((function(e,r,i){var o=(0,t.default)(r,e),s=(0,t.default)(e,i),a=(0,t.default)(r,i),l=Math.acos((0,n.default)((o*o+a*a-s*s)/(2*o*a))),u=Math.acos((0,n.default)((s*s+a*a-o*o)/(2*s*a)));return l>Math.PI/2?o:u>Math.PI/2?s:Math.sin(l)*o}),"getDistanceFromLine");e.default=i})),sm=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(pt()),n=o(ft()),r=o(zt()),i=o(er());function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e,o){var s=(0,t.default)(o),a=(0,n.default)(o),l=(0,t.default)(e),u=(0,n.default)(e);return((0,i.default)(Math.atan2(Math.sin((0,r.default)(a)-(0,r.default)(u))*Math.cos((0,r.default)(s)),Math.cos((0,r.default)(l))*Math.sin((0,r.default)(s))-Math.sin((0,r.default)(l))*Math.cos((0,r.default)(s))*Math.cos((0,r.default)(a)-(0,r.default)(u))))+360)%360}),"getGreatCircleBearing");e.default=a})),um=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(An());function n(e){return e&&e.__esModule?e:{default:e}}function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?s((function(e){return typeof e}),"_typeof"):s((function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}),"_typeof"))(e)}s(n,"_interopRequireDefault"),s(r,"_typeof");var i=s((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.default;return e.reduce((function(e,t){return"object"===r(e)&&null!==e.last&&(e.distance+=n(t,e.last)),e.last=t,e}),{last:null,distance:0}).distance}),"getPathLength");e.default=i})),pm=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(pt()),n=o(ft()),r=o(zt()),i=Be();function o(e){return e&&e.__esModule?e:{default:e}}s(o,"_interopRequireDefault");var a=s((function(e,o){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;s=typeof s<"u"&&!isNaN(s)?s:1;var a,l,u,c,h,d,p,f=(0,t.default)(e),v=(0,n.default)(e),g=(0,t.default)(o),m=(0,n.default)(o),y=6356752.314245,b=1/298.257223563,w=(0,r.default)(m-v),_=Math.atan((1-b)*Math.tan((0,r.default)(parseFloat(f)))),M=Math.atan((1-b)*Math.tan((0,r.default)(parseFloat(g)))),x=Math.sin(_),I=Math.cos(_),k=Math.sin(M),S=Math.cos(M),E=w,O=100;do{var A=Math.sin(E),P=Math.cos(E);if(0===(d=Math.sqrt(S*A*(S*A)+(I*k-x*S*P)*(I*k-x*S*P))))return 0;a=x*k+I*S*P,l=Math.atan2(d,a),h=a-2*x*k/(c=1-(u=I*S*A/d)*u),isNaN(h)&&(h=0);var C=b/16*c*(4+b*(4-3*c));p=E,E=w+(1-C)*b*u*(l+C*d*(h+C*a*(2*h*h-1)))}while(Math.abs(E-p)>1e-12&&--O>0);if(0===O)return NaN;var F=c*(i.earthRadius*i.earthRadius-y*y)/(y*y),T=1+F/16384*(4096+F*(F*(320-175*F)-768)),L=F/1024*(256+F*(F*(74-47*F)-128)),N=L*d*(h+L/4*(a*(2*h*h-1)-L/6*h*(4*d*d-3)*(4*h*h-3))),j=y*T*(l-N);return Math.round(j/s)*s}),"getDistance");e.default=a})),fm=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=s((function(e){return/^NNE|NE|NNW|N$/.test(e)?"N":/^ENE|E|ESE|SE$/.test(e)?"E":/^SSE|S|SSW|SW$/.test(e)?"S":/^WSW|W|WNW|NW$/.test(e)?"W":void 0}),"getRoughCompassDirection");e.default=t})),hm=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(An());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.default,i=r(e,n),o=Number(n.time)-Number(e.time),s=i/o*1e3;return s}),"getSpeed");e.default=r})),gm=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(An());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n,r){return(0,t.default)(n,e)+(0,t.default)(e,r)===(0,t.default)(n,r)}),"isPointInLine");e.default=r})),vm=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(pt()),n=r(ft());function r(e){return e&&e.__esModule?e:{default:e}}s(r,"_interopRequireDefault");var i=s((function(e,r){for(var i=!1,o=r.length,s=-1,a=o-1;++s<o;a=s)((0,n.default)(r[s])<=(0,n.default)(e)&&(0,n.default)(e)<(0,n.default)(r[a])||(0,n.default)(r[a])<=(0,n.default)(e)&&(0,n.default)(e)<(0,n.default)(r[s]))&&(0,t.default)(e)<((0,t.default)(r[a])-(0,t.default)(r[s]))*((0,n.default)(e)-(0,n.default)(r[s]))/((0,n.default)(r[a])-(0,n.default)(r[s]))+(0,t.default)(r[s])&&(i=!i);return i}),"isPointInPolygon");e.default=i})),ym=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Al());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n,r,i){return(0,t.default)(e,n,r)<i}),"isPointNearLine");e.default=r})),bm=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(An());function n(e){return e&&e.__esModule?e:{default:e}}s(n,"_interopRequireDefault");var r=s((function(e,n,r){return(0,t.default)(e,n)<r}),"isPointWithinRadius");e.default=r})),km=Y((e=>{"use strict";function t(e,t){return a(e)||o(e,t)||r(e,t)||n()}function n(){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 r(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&null!=a.return&&a.return()}finally{if(i)throw o}}return n}}function a(e){if(Array.isArray(e))return e}v(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,s(t,"_slicedToArray"),s(n,"_nonIterableRest"),s(r,"_unsupportedIterableToArray"),s(i,"_arrayLikeToArray"),s(o,"_iterableToArrayLimit"),s(a,"_arrayWithHoles");var l=s((function(e){if(!e.startsWith("POLYGON"))throw new Error("Invalid wkt.");return e.slice(e.indexOf("(")+2,e.indexOf(")")).split(", ").map((function(e){var n=t(e.split(" "),2),r=n[0],i=n[1];return{longitude:parseFloat(r),latitude:parseFloat(i)}}))}),"wktToPolygon");e.default=l})),Mm=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0});var t={computeDestinationPoint:!0,convertArea:!0,convertDistance:!0,convertSpeed:!0,decimalToSexagesimal:!0,findNearest:!0,getAreaOfPolygon:!0,getBounds:!0,getBoundsOfDistance:!0,getCenter:!0,getCenterOfBounds:!0,getCompassDirection:!0,getCoordinateKey:!0,getCoordinateKeys:!0,getDistance:!0,getDistanceFromLine:!0,getGreatCircleBearing:!0,getLatitude:!0,getLongitude:!0,getPathLength:!0,getPreciseDistance:!0,getRhumbLineBearing:!0,getRoughCompassDirection:!0,getSpeed:!0,isDecimal:!0,isPointInLine:!0,isPointInPolygon:!0,isPointNearLine:!0,isPointWithinRadius:!0,isSexagesimal:!0,isValidCoordinate:!0,isValidLatitude:!0,isValidLongitude:!0,orderByDistance:!0,sexagesimalToDecimal:!0,toDecimal:!0,toRad:!0,toDeg:!0,wktToPolygon:!0};Object.defineProperty(e,"computeDestinationPoint",{enumerable:!0,get:s((function(){return n.default}),"get")}),Object.defineProperty(e,"convertArea",{enumerable:!0,get:s((function(){return r.default}),"get")}),Object.defineProperty(e,"convertDistance",{enumerable:!0,get:s((function(){return i.default}),"get")}),Object.defineProperty(e,"convertSpeed",{enumerable:!0,get:s((function(){return o.default}),"get")}),Object.defineProperty(e,"decimalToSexagesimal",{enumerable:!0,get:s((function(){return a.default}),"get")}),Object.defineProperty(e,"findNearest",{enumerable:!0,get:s((function(){return l.default}),"get")}),Object.defineProperty(e,"getAreaOfPolygon",{enumerable:!0,get:s((function(){return u.default}),"get")}),Object.defineProperty(e,"getBounds",{enumerable:!0,get:s((function(){return c.default}),"get")}),Object.defineProperty(e,"getBoundsOfDistance",{enumerable:!0,get:s((function(){return h.default}),"get")}),Object.defineProperty(e,"getCenter",{enumerable:!0,get:s((function(){return d.default}),"get")}),Object.defineProperty(e,"getCenterOfBounds",{enumerable:!0,get:s((function(){return p.default}),"get")}),Object.defineProperty(e,"getCompassDirection",{enumerable:!0,get:s((function(){return f.default}),"get")}),Object.defineProperty(e,"getCoordinateKey",{enumerable:!0,get:s((function(){return g.default}),"get")}),Object.defineProperty(e,"getCoordinateKeys",{enumerable:!0,get:s((function(){return m.default}),"get")}),Object.defineProperty(e,"getDistance",{enumerable:!0,get:s((function(){return y.default}),"get")}),Object.defineProperty(e,"getDistanceFromLine",{enumerable:!0,get:s((function(){return b.default}),"get")}),Object.defineProperty(e,"getGreatCircleBearing",{enumerable:!0,get:s((function(){return w.default}),"get")}),Object.defineProperty(e,"getLatitude",{enumerable:!0,get:s((function(){return _.default}),"get")}),Object.defineProperty(e,"getLongitude",{enumerable:!0,get:s((function(){return M.default}),"get")}),Object.defineProperty(e,"getPathLength",{enumerable:!0,get:s((function(){return x.default}),"get")}),Object.defineProperty(e,"getPreciseDistance",{enumerable:!0,get:s((function(){return I.default}),"get")}),Object.defineProperty(e,"getRhumbLineBearing",{enumerable:!0,get:s((function(){return k.default}),"get")}),Object.defineProperty(e,"getRoughCompassDirection",{enumerable:!0,get:s((function(){return S.default}),"get")}),Object.defineProperty(e,"getSpeed",{enumerable:!0,get:s((function(){return E.default}),"get")}),Object.defineProperty(e,"isDecimal",{enumerable:!0,get:s((function(){return O.default}),"get")}),Object.defineProperty(e,"isPointInLine",{enumerable:!0,get:s((function(){return A.default}),"get")}),Object.defineProperty(e,"isPointInPolygon",{enumerable:!0,get:s((function(){return P.default}),"get")}),Object.defineProperty(e,"isPointNearLine",{enumerable:!0,get:s((function(){return C.default}),"get")}),Object.defineProperty(e,"isPointWithinRadius",{enumerable:!0,get:s((function(){return F.default}),"get")}),Object.defineProperty(e,"isSexagesimal",{enumerable:!0,get:s((function(){return T.default}),"get")}),Object.defineProperty(e,"isValidCoordinate",{enumerable:!0,get:s((function(){return L.default}),"get")}),Object.defineProperty(e,"isValidLatitude",{enumerable:!0,get:s((function(){return N.default}),"get")}),Object.defineProperty(e,"isValidLongitude",{enumerable:!0,get:s((function(){return j.default}),"get")}),Object.defineProperty(e,"orderByDistance",{enumerable:!0,get:s((function(){return D.default}),"get")}),Object.defineProperty(e,"sexagesimalToDecimal",{enumerable:!0,get:s((function(){return B.default}),"get")}),Object.defineProperty(e,"toDecimal",{enumerable:!0,get:s((function(){return R.default}),"get")}),Object.defineProperty(e,"toRad",{enumerable:!0,get:s((function(){return z.default}),"get")}),Object.defineProperty(e,"toDeg",{enumerable:!0,get:s((function(){return U.default}),"get")}),Object.defineProperty(e,"wktToPolygon",{enumerable:!0,get:s((function(){return V.default}),"get")});var n=q(Lg()),r=q(jg()),i=q(Ng()),o=q(Fg()),a=q(zg()),l=q(Gg()),u=q(Wg()),c=q(Pl()),h=q(Hg()),d=q(Jg()),p=q(Zg()),f=q(nm()),g=q(Oi()),m=q(zo()),y=q(An()),b=q(Al()),w=q(sm()),_=q(pt()),M=q(ft()),x=q(um()),I=q(pm()),k=q(Il()),S=q(fm()),E=q(hm()),O=q(Ai()),A=q(gm()),P=q(vm()),C=q(ym()),F=q(bm()),T=q(Si()),L=q(yl()),N=q(hl()),j=q(ml()),D=q(xl()),B=q(Ci()),R=q(Uo()),z=q(zt()),U=q(er()),V=q(km()),W=Be();function q(e){return e&&e.__esModule?e:{default:e}}Object.keys(W).forEach((function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(e,n,{enumerable:!0,get:s((function(){return W[n]}),"get")})})),s(q,"_interopRequireDefault")})),Us=Y(((e,t)=>{v(),function(n,r){"use strict";var i="function",o="undefined",a="object",l="string",u="model",c="name",h="type",d="vendor",p="version",f="architecture",v="console",g="mobile",m="tablet",y="smarttv",b="wearable",w="embedded",_="Amazon",M="Apple",x="ASUS",I="BlackBerry",k="Browser",S="Chrome",E="Firefox",O="Google",A="Huawei",P="LG",C="Microsoft",F="Motorola",T="Opera",L="Samsung",N="Sony",j="Xiaomi",D="Zebra",B="Facebook",R=s((function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}),"extend"),z=s((function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}),"enumerize"),U=s((function(e,t){return typeof e===l&&-1!==V(t).indexOf(V(e))}),"has"),V=s((function(e){return e.toLowerCase()}),"lowerize"),W=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:r}),"majorize"),q=s((function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof t===o?e:e.substring(0,275)}),"trim"),G=s((function(e,t){for(var n,o,s,l,u,c,h=0;h<t.length&&!u;){var d=t[h],p=t[h+1];for(n=o=0;n<d.length&&!u;)if(u=d[n++].exec(e))for(s=0;s<p.length;s++)c=u[++o],typeof(l=p[s])===a&&l.length>0?2===l.length?typeof l[1]==i?this[l[0]]=l[1].call(this,c):this[l[0]]=l[1]:3===l.length?typeof l[1]!==i||l[1].exec&&l[1].test?this[l[0]]=c?c.replace(l[1],l[2]):r:this[l[0]]=c?l[1].call(this,c,l[2]):r:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):r):this[l]=c||r;h+=2}}),"rgxMapper"),Y=s((function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(U(t[n][i],e))return"?"===n?r:n}else if(U(t[n],e))return"?"===n?r:n;return e}),"strMapper"),J={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},X={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,p],[/opios[\/ ]+([\w\.]+)/i],[p,[c,T+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,T]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[c,"UC"+k]],[/\bqbcore\/([\w\.]+)/i],[p,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[p,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[c,"IE"]],[/yabrowser\/([\w\.]+)/i],[p,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+k],p],[/\bfocus\/([\w\.]+)/i],[p,[c,E+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,T+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,T+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[p,[c,E]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+k]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+k],p],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,p],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,B],p],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[c,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[c,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,S+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[c,"Android "+k]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,p],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[p,[c,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[p,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[p,Y,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[c,E+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,p]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[f,"amd64"]],[/(ia32(?=;))/i],[[f,V]],[/((?:i[346]|x)86)[;\)]/i],[[f,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[f,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[f,"armhf"]],[/windows (ce|mobile); ppc;/i],[[f,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[f,/ower/,"",V]],[/(sun4\w)[;\)]/i],[[f,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[f,V]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[d,L],[h,m]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[d,L],[h,g]],[/((ipod|iphone)\d+,\d+)/i],[u,[d,M],[h,g]],[/(ipad\d+,\d+)/i],[u,[d,M],[h,m]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[d,M],[h,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[d,M],[h,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[d,A],[h,m]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[d,A],[h,g]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[d,j],[h,g]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[d,j],[h,m]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[d,"OPPO"],[h,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[d,"Vivo"],[h,g]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[d,"Realme"],[h,g]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[d,F],[h,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[d,F],[h,m]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[d,P],[h,m]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[d,P],[h,g]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[d,"Lenovo"],[h,m]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[d,"Nokia"],[h,g]],[/(pixel c)\b/i],[u,[d,O],[h,m]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[d,O],[h,g]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[d,N],[h,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[d,N],[h,m]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[d,"OnePlus"],[h,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[d,_],[h,m]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[d,_],[h,g]],[/(playbook);[-\w\),; ]+(rim)/i],[u,d,[h,m]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[d,I],[h,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[d,x],[h,m]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[d,x],[h,g]],[/(nexus 9)/i],[u,[d,"HTC"],[h,m]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[u,/_/g," "],[h,g]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[d,"Acer"],[h,m]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[d,"Meizu"],[h,g]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[d,"Sharp"],[h,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,u,[h,g]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d,u,[h,m]],[/(surface duo)/i],[u,[d,C],[h,m]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[d,"Fairphone"],[h,g]],[/(u304aa)/i],[u,[d,"AT&T"],[h,g]],[/\bsie-(\w*)/i],[u,[d,"Siemens"],[h,g]],[/\b(rct\w+) b/i],[u,[d,"RCA"],[h,m]],[/\b(venue[\d ]{2,7}) b/i],[u,[d,"Dell"],[h,m]],[/\b(q(?:mv|ta)\w+) b/i],[u,[d,"Verizon"],[h,m]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[d,"Barnes & Noble"],[h,m]],[/\b(tm\d{3}\w+) b/i],[u,[d,"NuVision"],[h,m]],[/\b(k88) b/i],[u,[d,"ZTE"],[h,m]],[/\b(nx\d{3}j) b/i],[u,[d,"ZTE"],[h,g]],[/\b(gen\d{3}) b.+49h/i],[u,[d,"Swiss"],[h,g]],[/\b(zur\d{3}) b/i],[u,[d,"Swiss"],[h,m]],[/\b((zeki)?tb.*\b) b/i],[u,[d,"Zeki"],[h,m]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],u,[h,m]],[/\b(ns-?\w{0,9}) b/i],[u,[d,"Insignia"],[h,m]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[d,"NextBook"],[h,m]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],u,[h,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],u,[h,g]],[/\b(ph-1) /i],[u,[d,"Essential"],[h,g]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[d,"Envizen"],[h,m]],[/\b(trio[-\w\. ]+) b/i],[u,[d,"MachSpeed"],[h,m]],[/\btu_(1491) b/i],[u,[d,"Rotor"],[h,m]],[/(shield[\w ]+) b/i],[u,[d,"Nvidia"],[h,m]],[/(sprint) (\w+)/i],[d,u,[h,g]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,C],[h,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[d,D],[h,m]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[d,D],[h,g]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,u,[h,v]],[/droid.+; (shield) bui/i],[u,[d,"Nvidia"],[h,v]],[/(playstation [345portablevi]+)/i],[u,[d,N],[h,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[d,C],[h,v]],[/smart-tv.+(samsung)/i],[d,[h,y]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,L],[h,y]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,P],[h,y]],[/(apple) ?tv/i],[d,[u,M+" TV"],[h,y]],[/crkey/i],[[u,S+"cast"],[d,O],[h,y]],[/droid.+aft(\w)( bui|\))/i],[u,[d,_],[h,y]],[/\(dtv[\);].+(aquos)/i],[u,[d,"Sharp"],[h,y]],[/(bravia[\w- ]+) bui/i],[u,[d,N],[h,y]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[d,q],[u,q],[h,y]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,y]],[/((pebble))app/i],[d,u,[h,b]],[/droid.+; (glass) \d/i],[u,[d,O],[h,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[d,D],[h,b]],[/(quest( 2)?)/i],[u,[d,B],[h,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[h,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[h,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[h,m]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,m]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[h,g]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[c,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,p],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c,[p,Y,J]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,Y,J]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,"Mac OS"],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[p,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,p],[/\(bb(10);/i],[p,[c,I]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,E+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,S+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[c,"Chromium OS"],p],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,p],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[c,p]]},H=s((function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof H))return new H(e,t).getResult();var i=e||(typeof n!==o&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),s=t?R(X,t):X;return this.getBrowser=function(){var e={};return e[c]=r,e[p]=r,G.call(e,i,s.browser),e.major=W(e.version),e},this.getCPU=function(){var e={};return e[f]=r,G.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[d]=r,e[u]=r,e[h]=r,G.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=r,e[p]=r,G.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=r,e[p]=r,G.call(e,i,s.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return i},this.setUA=function(e){return i=typeof e===l&&e.length>275?q(e,275):e,this},this.setUA(i),this}),"UAParser");H.VERSION="0.7.31",H.BROWSER=z([c,p,"major"]),H.CPU=z([f]),H.DEVICE=z([u,d,h,v,g,y,m,b,w]),H.ENGINE=H.OS=z([c,p]),typeof e!==o?(typeof t!==o&&t.exports&&(e=t.exports=H),e.UAParser=H):typeof define===i&&define.amd?define((function(){return H})):typeof n!==o&&(n.UAParser=H);var Z=typeof n!==o&&(n.jQuery||n.Zepto);if(Z&&!Z.ua){var K=new H;Z.ua=K.getResult(),Z.ua.get=function(){return K.getUA()},Z.ua.set=function(e){K.setUA(e);var t=K.getResult();for(var n in t)Z.ua[n]=t[n]}}}("object"==typeof window?window:e)})),Kv=Y(((e,t)=>{v();var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Array]",a="[object Boolean]",l="[object Date]",u="[object Error]",c="[object Function]",h="[object Map]",d="[object Number]",p="[object Object]",f="[object Promise]",g="[object RegExp]",m="[object Set]",y="[object String]",b="[object WeakMap]",w="[object ArrayBuffer]",_="[object DataView]",M=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,I={};I["[object Float32Array]"]=I["[object Float64Array]"]=I["[object Int8Array]"]=I["[object Int16Array]"]=I["[object Int32Array]"]=I["[object Uint8Array]"]=I["[object Uint8ClampedArray]"]=I["[object Uint16Array]"]=I["[object Uint32Array]"]=!0,I[i]=I[o]=I[w]=I[a]=I[_]=I[l]=I[u]=I[c]=I[h]=I[d]=I[p]=I[g]=I[m]=I[y]=I[b]=!1;var k="object"==typeof global&&global&&global.Object===Object&&global,S="object"==typeof self&&self&&self.Object===Object&&self,E=k||S||Function("return this")(),O="object"==typeof e&&e&&!e.nodeType&&e,A=O&&"object"==typeof t&&t&&!t.nodeType&&t,P=A&&A.exports===O,C=P&&k.process,F=function(){try{return C&&C.binding&&C.binding("util")}catch{}}(),T=F&&F.isTypedArray;function L(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function N(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function j(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function D(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function B(e){return function(t){return e(t)}}function R(e,t){return e.has(t)}function z(e,t){return null==e?void 0:e[t]}function U(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function V(e,t){return function(n){return e(t(n))}}function W(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}s(L,"arrayFilter"),s(N,"arrayPush"),s(j,"arraySome"),s(D,"baseTimes"),s(B,"baseUnary"),s(R,"cacheHas"),s(z,"getValue"),s(U,"mapToArray"),s(V,"overArg"),s(W,"setToArray");var q,G=Array.prototype,Y=Function.prototype,J=Object.prototype,X=E["__core-js_shared__"],H=Y.toString,Z=J.hasOwnProperty,K=(q=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+q:"",$=J.toString,Q=RegExp("^"+H.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=P?E.Buffer:void 0,te=E.Symbol,ne=E.Uint8Array,re=J.propertyIsEnumerable,ie=G.splice,oe=te?te.toStringTag:void 0,se=Object.getOwnPropertySymbols,ae=ee?ee.isBuffer:void 0,le=V(Object.keys,Object),ue=ct(E,"DataView"),ce=ct(E,"Map"),he=ct(E,"Promise"),de=ct(E,"Set"),pe=ct(E,"WeakMap"),fe=ct(Object,"create"),ve=bt(ue),ge=bt(ce),me=bt(he),ye=bt(de),be=bt(pe),we=te?te.prototype:void 0,_e=we?we.valueOf:void 0;function Me(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(){this.__data__=fe?fe(null):{},this.size=0}function Ie(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function ke(e){var t=this.__data__;if(fe){var r=t[e];return r===n?void 0:r}return Z.call(t,e)?t[e]:void 0}function Se(e){var t=this.__data__;return fe?void 0!==t[e]:Z.call(t,e)}function Ee(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=fe&&void 0===t?n:t,this}function Oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ae(){this.__data__=[],this.size=0}function Pe(e){var t=this.__data__,n=Ze(t,e);return!(n<0)&&(n==t.length-1?t.pop():ie.call(t,n,1),--this.size,!0)}function Ce(e){var t=this.__data__,n=Ze(t,e);return n<0?void 0:t[n][1]}function Fe(e){return Ze(this.__data__,e)>-1}function Te(e,t){var n=this.__data__,r=Ze(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Le(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(){this.size=0,this.__data__={hash:new Me,map:new(ce||Oe),string:new Me}}function je(e){var t=ut(this,e).delete(e);return this.size-=t?1:0,t}function De(e){return ut(this,e).get(e)}function Be(e){return ut(this,e).has(e)}function Re(e,t){var n=ut(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ze(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Le;++t<n;)this.add(e[t])}function Ue(e){return this.__data__.set(e,n),this}function Ve(e){return this.__data__.has(e)}function We(e){var t=this.__data__=new Oe(e);this.size=t.size}function qe(){this.__data__=new Oe,this.size=0}function Ge(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Ye(e){return this.__data__.get(e)}function Je(e){return this.__data__.has(e)}function Xe(e,t){var n=this.__data__;if(n instanceof Oe){var r=n.__data__;if(!ce||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Le(r)}return n.set(e,t),this.size=n.size,this}function He(e,t){var n=Mt(e),r=!n&&_t(e),i=!n&&!r&&It(e),o=!n&&!r&&!i&&Pt(e),s=n||r||i||o,a=s?D(e.length,String):[],l=a.length;for(var u in e)(t||Z.call(e,u))&&(!s||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ft(u,l)))&&a.push(u);return a}function Ze(e,t){for(var n=e.length;n--;)if(wt(e[n][0],t))return n;return-1}function Ke(e,t,n){var r=t(e);return Mt(e)?r:N(r,n(e))}function $e(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":oe&&oe in Object(e)?ht(e):yt(e)}function Qe(e){return At(e)&&$e(e)==i}function et(e,t,n,r,i){return e===t||(null==e||null==t||!At(e)&&!At(t)?e!=e&&t!=t:tt(e,t,n,r,et,i))}function tt(e,t,n,r,s,a){var l=Mt(e),u=Mt(t),c=l?o:pt(e),h=u?o:pt(t),d=(c=c==i?p:c)==p,f=(h=h==i?p:h)==p,v=c==h;if(v&&It(e)){if(!It(t))return!1;l=!0,d=!1}if(v&&!d)return a||(a=new We),l||Pt(e)?ot(e,t,n,r,s,a):st(e,t,c,n,r,s,a);if(!(1&n)){var g=d&&Z.call(e,"__wrapped__"),m=f&&Z.call(t,"__wrapped__");if(g||m){var y=g?e.value():e,b=m?t.value():t;return a||(a=new We),s(y,b,n,r,a)}}return!!v&&(a||(a=new We),at(e,t,n,r,s,a))}function nt(e){return!(!Ot(e)||gt(e))&&(St(e)?Q:M).test(bt(e))}function rt(e){return At(e)&&Et(e.length)&&!!I[$e(e)]}function it(e){if(!mt(e))return le(e);var t=[];for(var n in Object(e))Z.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ot(e,t,n,r,i,o){var s=1&n,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,h=!0,d=2&n?new ze:void 0;for(o.set(e,t),o.set(t,e);++c<a;){var p=e[c],f=t[c];if(r)var v=s?r(f,p,c,t,e,o):r(p,f,c,e,t,o);if(void 0!==v){if(v)continue;h=!1;break}if(d){if(!j(t,(function(e,t){if(!R(d,t)&&(p===e||i(p,e,n,r,o)))return d.push(t)}))){h=!1;break}}else if(p!==f&&!i(p,f,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h}function st(e,t,n,r,i,o,s){switch(n){case _:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case w:return!(e.byteLength!=t.byteLength||!o(new ne(e),new ne(t)));case a:case l:case d:return wt(+e,+t);case u:return e.name==t.name&&e.message==t.message;case g:case y:return e==t+"";case h:var c=U;case m:var p=1&r;if(c||(c=W),e.size!=t.size&&!p)return!1;var f=s.get(e);if(f)return f==t;r|=2,s.set(e,t);var v=ot(c(e),c(t),r,i,o,s);return s.delete(e),v;case"[object Symbol]":if(_e)return _e.call(e)==_e.call(t)}return!1}function at(e,t,n,r,i,o){var s=1&n,a=lt(e),l=a.length;if(l!=lt(t).length&&!s)return!1;for(var u=l;u--;){var c=a[u];if(!(s?c in t:Z.call(t,c)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var d=!0;o.set(e,t),o.set(t,e);for(var p=s;++u<l;){var f=e[c=a[u]],v=t[c];if(r)var g=s?r(v,f,c,t,e,o):r(f,v,c,e,t,o);if(!(void 0===g?f===v||i(f,v,n,r,o):g)){d=!1;break}p||(p="constructor"==c)}if(d&&!p){var m=e.constructor,y=t.constructor;m!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y)&&(d=!1)}return o.delete(e),o.delete(t),d}function lt(e){return Ke(e,Ct,dt)}function ut(e,t){var n=e.__data__;return vt(t)?n["string"==typeof t?"string":"hash"]:n.map}function ct(e,t){var n=z(e,t);return nt(n)?n:void 0}function ht(e){var t=Z.call(e,oe),n=e[oe];try{e[oe]=void 0;var r=!0}catch{}var i=$.call(e);return r&&(t?e[oe]=n:delete e[oe]),i}s(Me,"Hash"),s(xe,"hashClear"),s(Ie,"hashDelete"),s(ke,"hashGet"),s(Se,"hashHas"),s(Ee,"hashSet"),Me.prototype.clear=xe,Me.prototype.delete=Ie,Me.prototype.get=ke,Me.prototype.has=Se,Me.prototype.set=Ee,s(Oe,"ListCache"),s(Ae,"listCacheClear"),s(Pe,"listCacheDelete"),s(Ce,"listCacheGet"),s(Fe,"listCacheHas"),s(Te,"listCacheSet"),Oe.prototype.clear=Ae,Oe.prototype.delete=Pe,Oe.prototype.get=Ce,Oe.prototype.has=Fe,Oe.prototype.set=Te,s(Le,"MapCache"),s(Ne,"mapCacheClear"),s(je,"mapCacheDelete"),s(De,"mapCacheGet"),s(Be,"mapCacheHas"),s(Re,"mapCacheSet"),Le.prototype.clear=Ne,Le.prototype.delete=je,Le.prototype.get=De,Le.prototype.has=Be,Le.prototype.set=Re,s(ze,"SetCache"),s(Ue,"setCacheAdd"),s(Ve,"setCacheHas"),ze.prototype.add=ze.prototype.push=Ue,ze.prototype.has=Ve,s(We,"Stack"),s(qe,"stackClear"),s(Ge,"stackDelete"),s(Ye,"stackGet"),s(Je,"stackHas"),s(Xe,"stackSet"),We.prototype.clear=qe,We.prototype.delete=Ge,We.prototype.get=Ye,We.prototype.has=Je,We.prototype.set=Xe,s(He,"arrayLikeKeys"),s(Ze,"assocIndexOf"),s(Ke,"baseGetAllKeys"),s($e,"baseGetTag"),s(Qe,"baseIsArguments"),s(et,"baseIsEqual"),s(tt,"baseIsEqualDeep"),s(nt,"baseIsNative"),s(rt,"baseIsTypedArray"),s(it,"baseKeys"),s(ot,"equalArrays"),s(st,"equalByTag"),s(at,"equalObjects"),s(lt,"getAllKeys"),s(ut,"getMapData"),s(ct,"getNative"),s(ht,"getRawTag");var dt=se?function(e){return null==e?[]:(e=Object(e),L(se(e),(function(t){return re.call(e,t)})))}:Ft,pt=$e;function ft(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||x.test(e))&&e>-1&&e%1==0&&e<t}function vt(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function gt(e){return!!K&&K in e}function mt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||J)}function yt(e){return $.call(e)}function bt(e){if(null!=e){try{return H.call(e)}catch{}try{return e+""}catch{}}return""}function wt(e,t){return e===t||e!=e&&t!=t}(ue&&pt(new ue(new ArrayBuffer(1)))!=_||ce&&pt(new ce)!=h||he&&pt(he.resolve())!=f||de&&pt(new de)!=m||pe&&pt(new pe)!=b)&&(pt=s((function(e){var t=$e(e),n=t==p?e.constructor:void 0,r=n?bt(n):"";if(r)switch(r){case ve:return _;case ge:return h;case me:return f;case ye:return m;case be:return b}return t}),"getTag")),s(ft,"isIndex"),s(vt,"isKeyable"),s(gt,"isMasked"),s(mt,"isPrototype"),s(yt,"objectToString"),s(bt,"toSource"),s(wt,"eq");var _t=Qe(function(){return arguments}())?Qe:function(e){return At(e)&&Z.call(e,"callee")&&!re.call(e,"callee")},Mt=Array.isArray;function xt(e){return null!=e&&Et(e.length)&&!St(e)}s(xt,"isArrayLike");var It=ae||Tt;function kt(e,t){return et(e,t)}function St(e){if(!Ot(e))return!1;var t=$e(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Et(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Ot(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function At(e){return null!=e&&"object"==typeof e}s(kt,"isEqual"),s(St,"isFunction"),s(Et,"isLength"),s(Ot,"isObject"),s(At,"isObjectLike");var Pt=T?B(T):rt;function Ct(e){return xt(e)?He(e):it(e)}function Ft(){return[]}function Tt(){return!1}s(Ct,"keys"),s(Ft,"stubArray"),s(Tt,"stubFalse"),t.exports=kt})),Ey=Y(((e,t)=>{v();var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Function]",a="[object Object]",l=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c[o]=c["[object Map]"]=c["[object Number]"]=c[a]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var h="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,p=h||d||Function("return this")(),f="object"==typeof e&&e&&!e.nodeType&&e,g=f&&"object"==typeof t&&t&&!t.nodeType&&t,m=g&&g.exports===f,y=m&&h.process,b=function(){try{return g&&g.require&&g.require("util").types||y&&y.binding&&y.binding("util")}catch{}}(),w=b&&b.isTypedArray;function _(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function M(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function x(e){return function(t){return e(t)}}function I(e,t){return null==e?void 0:e[t]}function k(e,t){return function(n){return e(t(n))}}s(_,"apply"),s(M,"baseTimes"),s(x,"baseUnary"),s(I,"getValue"),s(k,"overArg");var S,E=Array.prototype,O=Function.prototype,A=Object.prototype,P=p["__core-js_shared__"],C=O.toString,F=A.hasOwnProperty,T=(S=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",L=A.toString,N=C.call(Object),j=RegExp("^"+C.call(F).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=m?p.Buffer:void 0,B=p.Symbol,R=p.Uint8Array,z=D?D.allocUnsafe:void 0,U=k(Object.getPrototypeOf,Object),V=Object.create,W=A.propertyIsEnumerable,q=E.splice,G=B?B.toStringTag:void 0,Y=function(){try{var e=Ye(Object,"defineProperty");return e({},"",{}),e}catch{}}(),J=D?D.isBuffer:void 0,X=Math.max,H=Date.now,Z=Ye(p,"Map"),K=Ye(Object,"create"),$=function(){function e(){}return s(e,"object"),function(t){if(!vt(t))return{};if(V)return V(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Q(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ee(){this.__data__=K?K(null):{},this.size=0}function te(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function ne(e){var t=this.__data__;if(K){var r=t[e];return r===n?void 0:r}return F.call(t,e)?t[e]:void 0}function re(e){var t=this.__data__;return K?void 0!==t[e]:F.call(t,e)}function ie(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=K&&void 0===t?n:t,this}function oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function se(){this.__data__=[],this.size=0}function ae(e){var t=this.__data__,n=Se(t,e);return!(n<0)&&(n==t.length-1?t.pop():q.call(t,n,1),--this.size,!0)}function le(e){var t=this.__data__,n=Se(t,e);return n<0?void 0:t[n][1]}function ue(e){return Se(this.__data__,e)>-1}function ce(e,t){var n=this.__data__,r=Se(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function he(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function de(){this.size=0,this.__data__={hash:new Q,map:new(Z||oe),string:new Q}}function pe(e){var t=Ge(this,e).delete(e);return this.size-=t?1:0,t}function fe(e){return Ge(this,e).get(e)}function ve(e){return Ge(this,e).has(e)}function ge(e,t){var n=Ge(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function me(e){var t=this.__data__=new oe(e);this.size=t.size}function ye(){this.__data__=new oe,this.size=0}function be(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function we(e){return this.__data__.get(e)}function _e(e){return this.__data__.has(e)}function Me(e,t){var n=this.__data__;if(n instanceof oe){var r=n.__data__;if(!Z||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new he(r)}return n.set(e,t),this.size=n.size,this}function xe(e,t){var n=ut(e),r=!n&<(e),i=!n&&!r&&dt(e),o=!n&&!r&&!i&&yt(e),s=n||r||i||o,a=s?M(e.length,String):[],l=a.length;for(var u in e)(t||F.call(e,u))&&(!s||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||He(u,l)))&&a.push(u);return a}function Ie(e,t,n){(void 0!==n&&!at(e[t],n)||void 0===n&&!(t in e))&&Ee(e,t,n)}function ke(e,t,n){var r=e[t];(!F.call(e,t)||!at(r,n)||void 0===n&&!(t in e))&&Ee(e,t,n)}function Se(e,t){for(var n=e.length;n--;)if(at(e[n][0],t))return n;return-1}function Ee(e,t,n){"__proto__"==t&&Y?Y(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}s(Q,"Hash"),s(ee,"hashClear"),s(te,"hashDelete"),s(ne,"hashGet"),s(re,"hashHas"),s(ie,"hashSet"),Q.prototype.clear=ee,Q.prototype.delete=te,Q.prototype.get=ne,Q.prototype.has=re,Q.prototype.set=ie,s(oe,"ListCache"),s(se,"listCacheClear"),s(ae,"listCacheDelete"),s(le,"listCacheGet"),s(ue,"listCacheHas"),s(ce,"listCacheSet"),oe.prototype.clear=se,oe.prototype.delete=ae,oe.prototype.get=le,oe.prototype.has=ue,oe.prototype.set=ce,s(he,"MapCache"),s(de,"mapCacheClear"),s(pe,"mapCacheDelete"),s(fe,"mapCacheGet"),s(ve,"mapCacheHas"),s(ge,"mapCacheSet"),he.prototype.clear=de,he.prototype.delete=pe,he.prototype.get=fe,he.prototype.has=ve,he.prototype.set=ge,s(me,"Stack"),s(ye,"stackClear"),s(be,"stackDelete"),s(we,"stackGet"),s(_e,"stackHas"),s(Me,"stackSet"),me.prototype.clear=ye,me.prototype.delete=be,me.prototype.get=we,me.prototype.has=_e,me.prototype.set=Me,s(xe,"arrayLikeKeys"),s(Ie,"assignMergeValue"),s(ke,"assignValue"),s(Se,"assocIndexOf"),s(Ee,"baseAssignValue");var Oe=qe();function Ae(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":G&&G in Object(e)?Je(e):tt(e)}function Pe(e){return gt(e)&&Ae(e)==i}function Ce(e){return!(!vt(e)||$e(e))&&(pt(e)?j:l).test(st(e))}function Fe(e){return gt(e)&&ft(e.length)&&!!c[Ae(e)]}function Te(e){if(!vt(e))return et(e);var t=Qe(e),n=[];for(var r in e)"constructor"==r&&(t||!F.call(e,r))||n.push(r);return n}function Le(e,t,n,r,i){e!==t&&Oe(t,(function(o,s){if(i||(i=new me),vt(o))Ne(e,t,s,n,Le,r,i);else{var a=r?r(rt(e,s),o,s+"",e,t,i):void 0;void 0===a&&(a=o),Ie(e,s,a)}}),wt)}function Ne(e,t,n,r,i,o,s){var a=rt(e,n),l=rt(t,n),u=s.get(l);if(u)Ie(e,n,u);else{var c=o?o(a,l,n+"",e,t,s):void 0,h=void 0===c;if(h){var d=ut(l),p=!d&&dt(l),f=!d&&!p&&yt(l);c=l,d||p||f?ut(a)?c=a:ht(a)?c=Ue(a):p?(h=!1,c=Be(l,!0)):f?(h=!1,c=ze(l,!0)):c=[]:mt(l)||lt(l)?(c=a,lt(a)?c=bt(a):(!vt(a)||pt(a))&&(c=Xe(l))):h=!1}h&&(s.set(l,c),i(c,l,r,o,s),s.delete(l)),Ie(e,n,c)}}function je(e,t){return it(nt(e,t,xt),e+"")}s(Ae,"baseGetTag"),s(Pe,"baseIsArguments"),s(Ce,"baseIsNative"),s(Fe,"baseIsTypedArray"),s(Te,"baseKeysIn"),s(Le,"baseMerge"),s(Ne,"baseMergeDeep"),s(je,"baseRest");var De=Y?function(e,t){return Y(e,"toString",{configurable:!0,enumerable:!1,value:Mt(t),writable:!0})}:xt;function Be(e,t){if(t)return e.slice();var n=e.length,r=z?z(n):new e.constructor(n);return e.copy(r),r}function Re(e){var t=new e.constructor(e.byteLength);return new R(t).set(new R(e)),t}function ze(e,t){var n=t?Re(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ue(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Ve(e,t,n,r){var i=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var a=t[o],l=r?r(n[a],e[a],a,n,e):void 0;void 0===l&&(l=e[a]),i?Ee(n,a,l):ke(n,a,l)}return n}function We(e){return je((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,s&&Ze(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,o)}return t}))}function qe(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===n(o[l],l,o))break}return t}}function Ge(e,t){var n=e.__data__;return Ke(t)?n["string"==typeof t?"string":"hash"]:n.map}function Ye(e,t){var n=I(e,t);return Ce(n)?n:void 0}function Je(e){var t=F.call(e,G),n=e[G];try{e[G]=void 0;var r=!0}catch{}var i=L.call(e);return r&&(t?e[G]=n:delete e[G]),i}function Xe(e){return"function"!=typeof e.constructor||Qe(e)?{}:$(U(e))}function He(e,t){var n=typeof e;return!!(t=null==t?r:t)&&("number"==n||"symbol"!=n&&u.test(e))&&e>-1&&e%1==0&&e<t}function Ze(e,t,n){if(!vt(n))return!1;var r=typeof t;return!!("number"==r?ct(n)&&He(t,n.length):"string"==r&&t in n)&&at(n[t],e)}function Ke(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function $e(e){return!!T&&T in e}function Qe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||A)}function et(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}function tt(e){return L.call(e)}function nt(e,t,n){return t=X(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=X(r.length-t,0),s=Array(o);++i<o;)s[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(s),_(e,this,a)}}function rt(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}s(Be,"cloneBuffer"),s(Re,"cloneArrayBuffer"),s(ze,"cloneTypedArray"),s(Ue,"copyArray"),s(Ve,"copyObject"),s(We,"createAssigner"),s(qe,"createBaseFor"),s(Ge,"getMapData"),s(Ye,"getNative"),s(Je,"getRawTag"),s(Xe,"initCloneObject"),s(He,"isIndex"),s(Ze,"isIterateeCall"),s(Ke,"isKeyable"),s($e,"isMasked"),s(Qe,"isPrototype"),s(et,"nativeKeysIn"),s(tt,"objectToString"),s(nt,"overRest"),s(rt,"safeGet");var it=ot(De);function ot(e){var t=0,n=0;return function(){var r=H(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function st(e){if(null!=e){try{return C.call(e)}catch{}try{return e+""}catch{}}return""}function at(e,t){return e===t||e!=e&&t!=t}s(ot,"shortOut"),s(st,"toSource"),s(at,"eq");var lt=Pe(function(){return arguments}())?Pe:function(e){return gt(e)&&F.call(e,"callee")&&!W.call(e,"callee")},ut=Array.isArray;function ct(e){return null!=e&&ft(e.length)&&!pt(e)}function ht(e){return gt(e)&&ct(e)}s(ct,"isArrayLike"),s(ht,"isArrayLikeObject");var dt=J||It;function pt(e){if(!vt(e))return!1;var t=Ae(e);return t==o||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ft(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function vt(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function gt(e){return null!=e&&"object"==typeof e}function mt(e){if(!gt(e)||Ae(e)!=a)return!1;var t=U(e);if(null===t)return!0;var n=F.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&C.call(n)==N}s(pt,"isFunction"),s(ft,"isLength"),s(vt,"isObject"),s(gt,"isObjectLike"),s(mt,"isPlainObject");var yt=w?x(w):Fe;function bt(e){return Ve(e,wt(e))}function wt(e){return ct(e)?xe(e,!0):Te(e)}s(bt,"toPlainObject"),s(wt,"keysIn");var _t=We((function(e,t,n){Le(e,t,n)}));function Mt(e){return function(){return e}}function xt(e){return e}function It(){return!1}s(Mt,"constant"),s(xt,"identity"),s(It,"stubFalse"),t.exports=_t})),Gy=Y(((e,t)=>{"use strict";v(),t.exports=s((function(e){if(!Array.isArray(e))throw new TypeError("array-unique expects an array.");for(var t=e.length,n=-1;n++<t;)for(var r=n+1;r<e.length;++r)e[n]===e[r]&&e.splice(r--,1);return e}),"unique"),t.exports.immutable=s((function(e){if(!Array.isArray(e))throw new TypeError("array-unique expects an array.");for(var n=e.length,r=new Array(n),i=0;i<n;i++)r[i]=e[i];return t.exports(r)}),"uniqueImmutable")})),lb=Y(((e,t)=>{var n,r;v(),n=e,r=function(){"use strict";function e(e,r,i,o,a){s((function e(n,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,l=r-i+1,u=Math.log(a),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1);e(n,r,Math.max(i,Math.floor(r-l*c/a+h)),Math.min(o,Math.floor(r+(a-l)*c/a+h)),s)}var d=n[r],p=i,f=o;for(t(n,i,r),s(n[o],d)>0&&t(n,i,o);p<f;){for(t(n,p,f),p++,f--;s(n[p],d)<0;)p++;for(;s(n[f],d)>0;)f--}0===s(n[i],d)?t(n,i,f):t(n,++f,o),f<=r&&(i=f+1),r<=f&&(o=f-1)}}),"t")(e,r,i||0,o||e.length-1,a||n)}function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return e<t?-1:e>t?1:0}s(e,"t"),s(t,"i"),s(n,"n");var r=s((function(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}),"r");function i(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r<t.length;r++)if(n(e,t[r]))return r;return-1}function o(e,t){a(e,0,e.children.length,t,e)}function a(e,t,n,r,i){i||(i=v(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=t;o<n;o++){var s=e.children[o];l(i,e.leaf?r(s):s)}return i}function l(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function u(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function h(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function d(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function f(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,n,r,i,o){for(var s=[n,r];s.length;)if(!((r=s.pop())-(n=s.pop())<=i)){var a=n+Math.ceil((r-n)/i/2)*i;e(t,a,n,r,o),s.push(n,a,a,r)}}return s(i,"e"),s(o,"a"),s(a,"h"),s(l,"o"),s(u,"s"),s(c,"l"),s(h,"f"),s(d,"u"),s(p,"m"),s(f,"c"),s(v,"p"),s(g,"d"),r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(e){var t=this.data,n=[];if(!f(e,t))return n;for(var r=this.toBBox,i=[];t;){for(var o=0;o<t.children.length;o++){var s=t.children[o],a=t.leaf?r(s):s;f(e,a)&&(t.leaf?n.push(s):p(e,a)?this._all(s,n):i.push(s))}t=i.pop()}return n},r.prototype.collides=function(e){var t=this.data;if(!f(e,t))return!1;for(var n=[];t;){for(var r=0;r<t.children.length;r++){var i=t.children[r],o=t.leaf?this.toBBox(i):i;if(f(e,o)){if(t.leaf||p(e,o))return!0;n.push(i)}}t=n.pop()}return!1},r.prototype.load=function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0;t<e.length;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(e){return e&&this._insert(e,this.data.height-1),this},r.prototype.clear=function(){return this.data=v([]),this},r.prototype.remove=function(e,t){if(!e)return this;for(var n,r,o,s=this.data,a=this.toBBox(e),l=[],u=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=u.pop(),o=!0),s.leaf){var c=i(e,s.children,t);if(-1!==c)return s.children.splice(c,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?r?(n++,s=r.children[n],o=!1):s=null:(l.push(s),u.push(n),n=0,r=s,s=s.children[0])}return this},r.prototype.toBBox=function(e){return e},r.prototype.compareMinX=function(e,t){return e.minX-t.minX},r.prototype.compareMinY=function(e,t){return e.minY-t.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(e){return this.data=e,this},r.prototype._all=function(e,t){for(var n=[];e;)e.leaf?t.push.apply(t,e.children):n.push.apply(n,e.children),e=n.pop();return t},r.prototype._build=function(e,t,n,r){var i,s=n-t+1,a=this._maxEntries;if(s<=a)return o(i=v(e.slice(t,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,r-1))),(i=v([])).leaf=!1,i.height=r;var l=Math.ceil(s/a),u=l*Math.ceil(Math.sqrt(a));g(e,t,n,u,this.compareMinX);for(var c=t;c<=n;c+=u){var h=Math.min(c+u-1,n);g(e,c,h,l,this.compareMinY);for(var d=c;d<=h;d+=l){var p=Math.min(d+l-1,h);i.children.push(this._build(e,d,p,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(e,t,n,r){for(;r.push(t),!t.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,s=void 0,a=0;a<t.children.length;a++){var l=t.children[a],u=h(l),c=(d=e,p=l,(Math.max(p.maxX,d.maxX)-Math.min(p.minX,d.minX))*(Math.max(p.maxY,d.maxY)-Math.min(p.minY,d.minY))-u);c<o?(o=c,i=u<i?u:i,s=l):c===o&&u<i&&(i=u,s=l)}t=s||t.children[0]}var d,p;return t},r.prototype._insert=function(e,t,n){var r=n?e:this.toBBox(e),i=[],o=this._chooseSubtree(r,this.data,t,i);for(o.children.push(e),l(o,r);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(r,i,t)},r.prototype._split=function(e,t){var n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var s=this._chooseSplitIndex(n,i,r),a=v(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(n,a)},r.prototype._splitRoot=function(e,t){this.data=v([e,t]),this.data.height=e.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(e,t,n){for(var r,i,o,s,l,u,c,d=1/0,p=1/0,f=t;f<=n-t;f++){var v=a(e,0,f,this.toBBox),g=a(e,f,n,this.toBBox),m=(i=v,o=g,s=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),u=Math.min(i.maxX,o.maxX),c=Math.min(i.maxY,o.maxY),Math.max(0,u-s)*Math.max(0,c-l)),y=h(v)+h(g);m<d?(d=m,r=f,p=y<p?y:p):m===d&&y<p&&(p=y,r=f)}return r||n-t},r.prototype._chooseSplitAxis=function(e,t,n){var r=e.leaf?this.compareMinX:u,i=e.leaf?this.compareMinY:c;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)},r.prototype._allDistMargin=function(e,t,n,r){e.children.sort(r);for(var i=this.toBBox,o=a(e,0,t,i),s=a(e,n-t,n,i),u=d(o)+d(s),c=t;c<n-t;c++){var h=e.children[c];l(o,e.leaf?i(h):h),u+=d(o)}for(var p=n-t-1;p>=t;p--){var f=e.children[p];l(s,e.leaf?i(f):f),u+=d(s)}return u},r.prototype._adjustParentBBoxes=function(e,t,n){for(var r=n;r>=0;r--)l(t[r],e)},r.prototype._condense=function(e){for(var t=e.length-1,n=void 0;t>=0;t--)0===e[t].children.length?t>0?(n=e[t-1].children).splice(n.indexOf(e[t]),1):this.clear():o(e[t],this.toBBox)},r},"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(n=n||self).RBush=r()})),oh=Y((e=>{"use strict";function t(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function n(e,t,n){switch(void 0===n&&(n={}),e){case"Point":return r(t).geometry;case"LineString":return l(t).geometry;case"Polygon":return o(t).geometry;case"MultiPoint":return d(t).geometry;case"MultiLineString":return h(t).geometry;case"MultiPolygon":return p(t).geometry;default:throw new Error(e+" is invalid")}}function r(e,n,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!k(e[0])||!k(e[1]))throw new Error("coordinates must contain numbers");return t({type:"Point",coordinates:e},n,r)}function i(e,t,n){return void 0===n&&(n={}),c(e.map((function(e){return r(e,t)})),n)}function o(e,n,r){void 0===r&&(r={});for(var i=0,o=e;i<o.length;i++){var s=o[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}return t({type:"Polygon",coordinates:e},n,r)}function a(e,t,n){return void 0===n&&(n={}),c(e.map((function(e){return o(e,t)})),n)}function l(e,n,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return t({type:"LineString",coordinates:e},n,r)}function u(e,t,n){return void 0===n&&(n={}),c(e.map((function(e){return l(e,t)})),n)}function c(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function h(e,n,r){return void 0===r&&(r={}),t({type:"MultiLineString",coordinates:e},n,r)}function d(e,n,r){return void 0===r&&(r={}),t({type:"MultiPoint",coordinates:e},n,r)}function p(e,n,r){return void 0===r&&(r={}),t({type:"MultiPolygon",coordinates:e},n,r)}function f(e,n,r){return void 0===r&&(r={}),t({type:"GeometryCollection",geometries:e},n,r)}function g(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n}function m(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t*r}function y(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t/r}function b(e,t){return _(y(e,t))}function w(e){var t=e%360;return t<0&&(t+=360),t}function _(e){return 180*(e%(2*Math.PI))/Math.PI}function M(e){return e%360*Math.PI/180}function x(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return m(y(e,t),n)}function I(t,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[n];if(!i)throw new Error("invalid original units");var o=e.areaFactors[r];if(!o)throw new Error("invalid final units");return t/i*o}function k(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function S(e){return!!e&&e.constructor===Object}function E(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!k(e))throw new Error("bbox must only contain numbers")}))}function O(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}v(),Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},s(t,"feature"),e.feature=t,s(n,"geometry"),e.geometry=n,s(r,"point"),e.point=r,s(i,"points"),e.points=i,s(o,"polygon"),e.polygon=o,s(a,"polygons"),e.polygons=a,s(l,"lineString"),e.lineString=l,s(u,"lineStrings"),e.lineStrings=u,s(c,"featureCollection"),e.featureCollection=c,s(h,"multiLineString"),e.multiLineString=h,s(d,"multiPoint"),e.multiPoint=d,s(p,"multiPolygon"),e.multiPolygon=p,s(f,"geometryCollection"),e.geometryCollection=f,s(g,"round"),e.round=g,s(m,"radiansToLength"),e.radiansToLength=m,s(y,"lengthToRadians"),e.lengthToRadians=y,s(b,"lengthToDegrees"),e.lengthToDegrees=b,s(w,"bearingToAzimuth"),e.bearingToAzimuth=w,s(_,"radiansToDegrees"),e.radiansToDegrees=_,s(M,"degreesToRadians"),e.degreesToRadians=M,s(x,"convertLength"),e.convertLength=x,s(I,"convertArea"),e.convertArea=I,s(k,"isNumber"),e.isNumber=k,s(S,"isObject"),e.isObject=S,s(E,"validateBBox"),e.validateBBox=E,s(O,"validateId"),e.validateId=O})),uh=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0});var t=oh();function n(e,t,r){if(null!==e)for(var i,o,s,a,l,u,c,h,d=0,p=0,f=e.type,v="FeatureCollection"===f,g="Feature"===f,m=v?e.features.length:1,y=0;y<m;y++){l=(h=!!(c=v?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var b=0;b<l;b++){var w=0,_=0;if(null!==(a=h?c.geometries[b]:c)){u=a.coordinates;var M=a.type;switch(d=!r||"Polygon"!==M&&"MultiPolygon"!==M?0:1,M){case null:break;case"Point":if(!1===t(u,p,y,w,_))return!1;p++,w++;break;case"LineString":case"MultiPoint":for(i=0;i<u.length;i++){if(!1===t(u[i],p,y,w,_))return!1;p++,"MultiPoint"===M&&w++}"LineString"===M&&w++;break;case"Polygon":case"MultiLineString":for(i=0;i<u.length;i++){for(o=0;o<u[i].length-d;o++){if(!1===t(u[i][o],p,y,w,_))return!1;p++}"MultiLineString"===M&&w++,"Polygon"===M&&_++}"Polygon"===M&&w++;break;case"MultiPolygon":for(i=0;i<u.length;i++){for(_=0,o=0;o<u[i].length;o++){for(s=0;s<u[i][o].length-d;s++){if(!1===t(u[i][o][s],p,y,w,_))return!1;p++}_++}w++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(!1===n(a.geometries[i],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function r(e,t,r,i){var o=r;return n(e,(function(e,n,i,s,a){o=0===n&&void 0===r?e:t(o,e,n,i,s,a)}),i),o}function i(e,t){var n;switch(e.type){case"FeatureCollection":for(n=0;n<e.features.length&&!1!==t(e.features[n].properties,n);n++);break;case"Feature":t(e.properties,0)}}function o(e,t,n){var r=n;return i(e,(function(e,i){r=0===i&&void 0===n?e:t(r,e,i)})),r}function a(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function l(e,t,n){var r=n;return a(e,(function(e,i){r=0===i&&void 0===n?e:t(r,e,i)})),r}function u(e){var t=[];return n(e,(function(e){t.push(e)})),t}function c(e,t){var n,r,i,o,s,a,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,v=p?e.features.length:1;for(n=0;n<v;n++){for(a=p?e.features[n].geometry:f?e.geometry:e,u=p?e.features[n].properties:f?e.properties:{},c=p?e.features[n].bbox:f?e.bbox:void 0,h=p?e.features[n].id:f?e.id:void 0,s=(l=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=l?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,d,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],d,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,u,c,h))return!1;d++}}function h(e,t,n){var r=n;return c(e,(function(e,i,o,s,a){r=0===i&&void 0===n?e:t(r,e,i,o,s,a)})),r}function d(e,n){c(e,(function(e,r,i,o,s){var a,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==n(t.feature(e,i,{bbox:o,id:s}),r,0)&&void 0}switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var u=0;u<e.coordinates.length;u++){var c={type:a,coordinates:e.coordinates[u]};if(!1===n(t.feature(c,i),r,u))return!1}}))}function p(e,t,n){var r=n;return d(e,(function(e,i,o){r=0===i&&0===o&&void 0===n?e:t(r,e,i,o)})),r}function f(e,r){d(e,(function(e,i,o){var s=0;if(e.geometry){var a=e.geometry.type;if("Point"!==a&&"MultiPoint"!==a){var l,u=0,c=0,h=0;if(!1===n(e,(function(n,a,d,p,f){if(void 0===l||i>u||p>c||f>h)return l=n,u=i,c=p,h=f,void(s=0);var v=t.lineString([l,n],e.properties);if(!1===r(v,i,o,f,s))return!1;s++,l=n})))return!1}}}))}function g(e,t,n){var r=n,i=!1;return f(e,(function(e,o,s,a,l){r=!1===i&&void 0===n?e:t(r,e,o,s,a,l),i=!0})),r}function m(e,n){if(!e)throw new Error("geojson is required");d(e,(function(e,r,i){if(null!==e.geometry){var o=e.geometry.type,s=e.geometry.coordinates;switch(o){case"LineString":if(!1===n(e,r,i,0,0))return!1;break;case"Polygon":for(var a=0;a<s.length;a++)if(!1===n(t.lineString(s[a],e.properties),r,i,a))return!1}}}))}function y(e,t,n){var r=n;return m(e,(function(e,i,o,s){r=0===i&&void 0===n?e:t(r,e,i,o,s)})),r}function b(e,n){if(n=n||{},!t.isObject(n))throw new Error("options is invalid");var r,i=n.featureIndex||0,o=n.multiFeatureIndex||0,s=n.geometryIndex||0,a=n.segmentIndex||0,l=n.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,r=e.features[i].geometry;break;case"Feature":l=l||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=u.length+a-1),t.lineString([u[a],u[a+1]],l,n);case"Polygon":return s<0&&(s=u.length+s),a<0&&(a=u[s].length+a-1),t.lineString([u[s][a],u[s][a+1]],l,n);case"MultiLineString":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a-1),t.lineString([u[o][a],u[o][a+1]],l,n);case"MultiPolygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),a<0&&(a=u[o][s].length-a-1),t.lineString([u[o][s][a],u[o][s][a+1]],l,n)}throw new Error("geojson is invalid")}function w(e,n){if(n=n||{},!t.isObject(n))throw new Error("options is invalid");var r,i=n.featureIndex||0,o=n.multiFeatureIndex||0,s=n.geometryIndex||0,a=n.coordIndex||0,l=n.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,r=e.features[i].geometry;break;case"Feature":l=l||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":return t.point(u,l,n);case"MultiPoint":return o<0&&(o=u.length+o),t.point(u[o],l,n);case"LineString":return a<0&&(a=u.length+a),t.point(u[a],l,n);case"Polygon":return s<0&&(s=u.length+s),a<0&&(a=u[s].length+a),t.point(u[s][a],l,n);case"MultiLineString":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a),t.point(u[o][a],l,n);case"MultiPolygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),a<0&&(a=u[o][s].length-a),t.point(u[o][s][a],l,n)}throw new Error("geojson is invalid")}s(n,"coordEach"),s(r,"coordReduce"),s(i,"propEach"),s(o,"propReduce"),s(a,"featureEach"),s(l,"featureReduce"),s(u,"coordAll"),s(c,"geomEach"),s(h,"geomReduce"),s(d,"flattenEach"),s(p,"flattenReduce"),s(f,"segmentEach"),s(g,"segmentReduce"),s(m,"lineEach"),s(y,"lineReduce"),s(b,"findSegment"),s(w,"findPoint"),e.coordAll=u,e.coordEach=n,e.coordReduce=r,e.featureEach=a,e.featureReduce=l,e.findPoint=w,e.findSegment=b,e.flattenEach=d,e.flattenReduce=p,e.geomEach=c,e.geomReduce=h,e.lineEach=m,e.lineReduce=y,e.propEach=i,e.propReduce=o,e.segmentEach=f,e.segmentReduce=g})),bb=Y((e=>{"use strict";v(),Object.defineProperty(e,"__esModule",{value:!0});var t=uh();function n(e){var n=[1/0,1/0,-1/0,-1/0];return t.coordEach(e,(function(e){n[0]>e[0]&&(n[0]=e[0]),n[1]>e[1]&&(n[1]=e[1]),n[2]<e[0]&&(n[2]=e[0]),n[3]<e[1]&&(n[3]=e[1])})),n}s(n,"bbox"),n.default=n,e.default=n})),xb=Y(((e,t)=>{v();var n=lb(),r=oh(),i=uh(),o=bb().default,a=i.featureEach,l=(i.coordEach,r.polygon,r.featureCollection);function u(e){var t=new n(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:o(e),n.prototype.insert.call(this,e)},t.load=function(e){var t=[];return Array.isArray(e)?e.forEach((function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:o(e),t.push(e)})):a(e,(function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:o(e),t.push(e)})),n.prototype.load.call(this,t)},t.remove=function(e,t){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:o(e),n.prototype.remove.call(this,e,t)},t.clear=function(){return n.prototype.clear.call(this)},t.search=function(e){var t=n.prototype.search.call(this,this.toBBox(e));return l(t)},t.collides=function(e){return n.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=n.prototype.all.call(this);return l(e)},t.toJSON=function(){return n.prototype.toJSON.call(this)},t.fromJSON=function(e){return n.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var t;if(e.bbox)t=e.bbox;else if(Array.isArray(e)&&4===e.length)t=e;else if(Array.isArray(e)&&6===e.length)t=[e[0],e[1],e[3],e[4]];else if("Feature"===e.type)t=o(e);else{if("FeatureCollection"!==e.type)throw new Error("invalid geojson");t=o(e)}return{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},t}s(u,"geojsonRbush"),t.exports=u,t.exports.default=u})),Fh={};function Ah(e,t){return!t&&"function"==typeof e&&(t=e,e={}),this.ondata=t,e}function r0(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),li(e,t,[ui],(function(e){return Hn(fo(e.data[0],e.data[1]))}),0,n)}function fo(e,t){return kr(e,t||{},0,0)}function Ch(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),li(e,t,[si],(function(e){return Hn(di(e.data[0],Eh(e.data[1])))}),1,n)}function di(e,t){return co(e,t)}function tI(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),li(e,t,[ui,Kb,function(){return[bh]}],(function(e){return Hn(bh(e.data[0],e.data[1]))}),2,n)}function bh(e,t){t||(t={});var n=oi(),r=e.length;n.p(e);var i=kr(e,t,Ih(t),8),o=i.length;return Th(i,t),ue(i,o-8,n.d()),ue(i,o-4,r),i}function a0(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),li(e,t,[si,Jb,function(){return[Uu]}],(function(e){return Hn(Uu(e.data[0]))}),3,n)}function Uu(e,t){return co(e.subarray(Ph(e),-8),t||new ee(e0(e)))}function rI(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),li(e,t,[ui,Zb,function(){return[kh]}],(function(e){return Hn(kh(e.data[0],e.data[1]))}),4,n)}function kh(e,t){t||(t={});var n=xh();n.p(e);var r=kr(e,t,2,4);return Oh(r,t),ue(r,r.length-4,n.d()),r}function s0(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),li(e,t,[si,Qb,function(){return[Wu]}],(function(e){return Hn(Wu(e.data[0],Eh(e.data[1])))}),5,n)}function Wu(e,t){return co((t0(e),e.subarray(2,-4)),t)}function aI(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&W(7),31==e[0]&&139==e[1]&&8==e[2]?a0(e,t,n):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?Ch(e,t,n):s0(e,t,n)}function oI(e,t){return 31==e[0]&&139==e[1]&&8==e[2]?Uu(e,t):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?di(e,t):Wu(e,t)}function $n(e,t){if(t){for(var n=new ee(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}if(Fb)return Fb.encode(e);var i=e.length,o=new ee(e.length+(e.length>>1)),a=0,l=s((function(e){o[a++]=e}),"w");for(r=0;r<i;++r){if(a+5>o.length){var u=new ee(a+8+(i-r<<1));u.set(o),o=u}var c=e.charCodeAt(r);c<128||t?l(c):c<2048?(l(192|c>>6),l(128|63&c)):c>55295&&c<57344?(l(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++r))>>18),l(128|c>>12&63),l(128|c>>6&63),l(128|63&c)):(l(224|c>>12),l(128|c>>6&63),l(128|63&c))}return Mt(o,0,a)}function jh(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(_h)return _h.decode(e);var i=c0(e),o=i[0];return i[1].length&&W(8),o}function pI(e,t,n){n||(n=t,t={}),"function"!=typeof n&&W(7);var r={};Lh(e,"",r,t);var i=Object.keys(r),o=i.length,a=0,l=0,u=o,c=new Array(o),h=[],d=s((function(){for(var e=0;e<h.length;++e)h[e]()}),"tAll"),p=s((function(e,t){$u((function(){n(e,t)}))}),"cbd");$u((function(){p=n}));var f=s((function(){var e=new ee(l+22),t=a,n=l-a;l=0;for(var r=0;r<u;++r){var i=c[r];try{var o=i.c.length;ni(e,l,i,i.f,i.u,o);var s=30+i.f.length+Wn(i.extra),h=l+s;e.set(i.c,h),ni(e,a,i,i.f,i.u,o,l,i.m),a+=16+s+(i.m?i.m.length:0),l=h+o}catch(e){return p(e,null)}}Nh(e,a,c.length,n,t),p(null,e)}),"cbf");o||f();for(var v=s((function(e){var t=i[e],n=r[t],u=n[0],v=n[1],g=oi(),m=u.length;g.p(u);var y=$n(t),b=y.length,w=v.comment,_=w&&$n(w),M=_&&_.length,x=Wn(v.extra),I=0==v.level?0:8,k=s((function(n,r){if(n)d(),p(n,null);else{var i=r.length;c[e]=po(v,{size:m,crc:g.d(),c:r,f:y,m:_,u:b!=t.length||_&&w.length!=M,compression:I}),a+=30+b+x+i,l+=76+2*(b+x)+(M||0)+i,--o||f()}}),"cbl");if(b>65535&&k(W(11,0,1),null),I)if(m<16e4)try{k(null,fo(u,v))}catch(e){k(e,null)}else h.push(r0(u,v,k));else k(null,u)}),"_loop_1"),g=0;g<u;++g)v(g);return d}function fI(e,t){t||(t={});var n={},r=[];Lh(e,"",n,t);var i=0,o=0;for(var s in n){var a=n[s],l=a[0],u=a[1],c=0==u.level?0:8,h=(x=$n(s)).length,d=u.comment,p=d&&$n(d),f=p&&p.length,v=Wn(u.extra);h>65535&&W(11);var g=c?fo(l,u):l,m=g.length,y=oi();y.p(l),r.push(po(u,{size:l.length,crc:y.d(),c:g,f:x,m:p,u:h!=s.length||p&&d.length!=f,o:i,compression:c})),i+=30+h+v+m,o+=76+2*(h+v)+(f||0)+m}for(var b=new ee(o+22),w=i,_=o-i,M=0;M<r.length;++M){var x=r[M];ni(b,x.o,x,x.f,x.u,x.c.length);var I=30+x.f.length+Wn(x.extra);b.set(x.c,x.o+I),ni(b,i,x,x.f,x.u,x.c.length,x.o,x.m),i+=16+I+(x.m?x.m.length:0)}return Nh(b,i,r.length,_,w),b}function vI(e,t,n){n||(n=t,t={}),"function"!=typeof n&&W(7);var r=[],i=s((function(){for(var e=0;e<r.length;++e)r[e]()}),"tAll"),o={},a=s((function(e,t){$u((function(){n(e,t)}))}),"cbd");$u((function(){a=n}));for(var l=e.length-22;101010256!=Se(e,l);--l)if(!l||e.length-l>65558)return a(W(13,0,1),null),i;var u=nt(e,l+8);if(u){var c=u,h=Se(e,l+16),d=4294967295==h;if(d){if(l=Se(e,l-12),101075792!=Se(e,l))return a(W(13,0,1),null),i;c=u=Se(e,l+32),h=Se(e,l+48)}for(var p=t&&t.filter,f=s((function(t){var n=f0(e,h,d),l=n[0],c=n[1],f=n[2],v=n[3],g=n[4],m=n[5],y=p0(e,m);h=g;var b=s((function(e,t){e?(i(),a(e,null)):(t&&(o[v]=t),--u||a(null,o))}),"cbl");if(!p||p({name:v,size:c,originalSize:f,compression:l}))if(l)if(8==l){var w=e.subarray(y,y+c);if(c<32e4)try{b(null,di(w,new ee(f)))}catch(e){b(e,null)}else r.push(Ch(w,{size:f},b))}else b(W(14,"unknown compression type "+l,1),null);else b(null,Mt(e,y,y+c));else b(null,null)}),"_loop_3"),v=0;v<c;++v)f(v)}else a(null,{});return i}function yI(e,t){for(var n={},r=e.length-22;101010256!=Se(e,r);--r)(!r||e.length-r>65558)&&W(13);var i=nt(e,r+8);if(!i)return{};var o=Se(e,r+16),s=4294967295==o;s&&(r=Se(e,r-12),101075792!=Se(e,r)&&W(13),i=Se(e,r+32),o=Se(e,r+48));for(var a=t&&t.filter,l=0;l<i;++l){var u=f0(e,o,s),c=u[0],h=u[1],d=u[2],p=u[3],f=u[4],v=u[5],g=p0(e,v);o=f,(!a||a({name:p,size:h,originalSize:d,compression:c}))&&(c?8==c?n[p]=di(e.subarray(g,g+h),new ee(d)):W(14,"unknown compression type "+c):n[p]=Mt(e,g,g+h))}return n}kw(Fh,{AsyncCompress:()=>eI,AsyncDecompress:()=>iI,AsyncDeflate:()=>n0,AsyncGunzip:()=>i0,AsyncGzip:()=>eI,AsyncInflate:()=>Sh,AsyncUnzipInflate:()=>gI,AsyncUnzlib:()=>o0,AsyncZipDeflate:()=>cI,AsyncZlib:()=>nI,Compress:()=>yh,DecodeUTF8:()=>sI,Decompress:()=>u0,Deflate:()=>nn,EncodeUTF8:()=>uI,FlateErrorCode:()=>ZP,Gunzip:()=>Gu,Gzip:()=>yh,Inflate:()=>ot,Unzip:()=>mI,UnzipInflate:()=>hI,UnzipPassThrough:()=>g0,Unzlib:()=>Yu,Zip:()=>dI,ZipDeflate:()=>lI,ZipPassThrough:()=>uo,Zlib:()=>wh,compress:()=>tI,compressSync:()=>bh,decompress:()=>aI,decompressSync:()=>oI,deflate:()=>r0,deflateSync:()=>fo,gunzip:()=>a0,gunzipSync:()=>Uu,gzip:()=>tI,gzipSync:()=>bh,inflate:()=>Ch,inflateSync:()=>di,strFromU8:()=>jh,strToU8:()=>$n,unzip:()=>vI,unzipSync:()=>yI,unzlib:()=>s0,unzlibSync:()=>Wu,zip:()=>pI,zipSync:()=>fI,zlib:()=>rI,zlibSync:()=>kh});var jb,JP,ee,$e,ri,ii,ai,oo,Db,Rb,Mh,Bu,zb,Bb,gh,so,kn,_t,Mn,ti,se,Vb,qb,Gb,Ub,Du,kt,Ru,lo,Mt,ZP,Yb,W,co,tn,Qr,zu,Vu,mh,ei,qu,vh,Wb,_n,$b,Hb,oi,xh,kr,po,Nb,Fu,QP,Xb,si,ui,Kb,Jb,Zb,Qb,Hn,Eh,li,xt,ci,nt,Se,hh,ue,Th,Ph,e0,Ih,Oh,t0,nn,n0,ot,Sh,yh,eI,Gu,i0,wh,nI,Yu,o0,u0,iI,Lh,Fb,_h,l0,c0,sI,uI,d0,p0,f0,h0,Wn,ni,Nh,uo,lI,cI,dI,g0,hI,gI,mI,$u,Dh=kg((()=>{for(v(),jb={},JP=s((function(e,t,n,r,i){var o=new Worker(jb[t]||(jb[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],i(r,null)}else i(null,t)},o.postMessage(n,r),o}),"wk"),ee=Uint8Array,$e=Uint16Array,ri=Uint32Array,ii=new ee([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ai=new ee([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),oo=new ee([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Db=s((function(e,t){for(var n=new $e(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new ri(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return[n,i]}),"freb"),Rb=Db(ii,2),Mh=Rb[0],Bu=Rb[1],Mh[28]=258,Bu[258]=28,zb=Db(ai,0),Bb=zb[0],gh=zb[1],so=new $e(32768),se=0;se<32768;++se)kn=(61680&(kn=(52428&(kn=(43690&se)>>>1|(21845&se)<<1))>>>2|(13107&kn)<<2))>>>4|(3855&kn)<<4,so[se]=((65280&kn)>>>8|(255&kn)<<8)>>>1;for(_t=s((function(e,t,n){for(var r=e.length,i=0,o=new $e(t);i<r;++i)e[i]&&++o[e[i]-1];var s,a=new $e(t);for(i=0;i<t;++i)a[i]=a[i-1]+o[i-1]<<1;if(n){s=new $e(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var u=i<<4|e[i],c=t-e[i],h=a[e[i]-1]++<<c,d=h|(1<<c)-1;h<=d;++h)s[so[h]>>>l]=u}else for(s=new $e(r),i=0;i<r;++i)e[i]&&(s[i]=so[a[e[i]-1]++]>>>15-e[i]);return s}),"hMap"),Mn=new ee(288),se=0;se<144;++se)Mn[se]=8;for(se=144;se<256;++se)Mn[se]=9;for(se=256;se<280;++se)Mn[se]=7;for(se=280;se<288;++se)Mn[se]=8;for(ti=new ee(32),se=0;se<32;++se)ti[se]=5;Vb=_t(Mn,9,0),qb=_t(Mn,9,1),Gb=_t(ti,5,0),Ub=_t(ti,5,1),Du=s((function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t}),"max"),kt=s((function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n}),"bits"),Ru=s((function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)}),"bits16"),lo=s((function(e){return(e+7)/8|0}),"shft"),Mt=s((function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(2==e.BYTES_PER_ELEMENT?$e:4==e.BYTES_PER_ELEMENT?ri:ee)(n-t);return r.set(e.subarray(t,n)),r}),"slc"),ZP={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Yb=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],W=s((function(e,t,n){var r=new Error(t||Yb[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,W),!n)throw r;return r}),"err"),co=s((function(e,t,n){var r=e.length;if(!r||n&&n.f&&!n.l)return t||new ee(0);var i=!t||n,o=!n||n.i;n||(n={}),t||(t=new ee(3*r));var a=s((function(e){var n=t.length;if(e>n){var r=new ee(Math.max(2*n,e));r.set(t),t=r}}),"cbuf"),l=n.f||0,u=n.p||0,c=n.b||0,h=n.l,d=n.d,p=n.m,f=n.n,v=8*r;do{if(!h){l=kt(e,u,1);var g=kt(e,u+1,3);if(u+=3,!g){var m=e[(O=lo(u)+4)-4]|e[O-3]<<8,y=O+m;if(y>r){o&&W(0);break}i&&a(c+m),t.set(e.subarray(O,y),c),n.b=c+=m,n.p=u=8*y,n.f=l;continue}if(1==g)h=qb,d=Ub,p=9,f=5;else if(2==g){var b=kt(e,u,31)+257,w=kt(e,u+10,15)+4,_=b+kt(e,u+5,31)+1;u+=14;for(var M=new ee(_),x=new ee(19),I=0;I<w;++I)x[oo[I]]=kt(e,u+3*I,7);u+=3*w;var k=Du(x),S=(1<<k)-1,E=_t(x,k,1);for(I=0;I<_;){var O,A=E[kt(e,u,S)];if(u+=15&A,(O=A>>>4)<16)M[I++]=O;else{var P=0,C=0;for(16==O?(C=3+kt(e,u,3),u+=2,P=M[I-1]):17==O?(C=3+kt(e,u,7),u+=3):18==O&&(C=11+kt(e,u,127),u+=7);C--;)M[I++]=P}}var F=M.subarray(0,b),T=M.subarray(b);p=Du(F),f=Du(T),h=_t(F,p,1),d=_t(T,f,1)}else W(1);if(u>v){o&&W(0);break}}i&&a(c+131072);for(var L=(1<<p)-1,N=(1<<f)-1,j=u;;j=u){var D=(P=h[Ru(e,u)&L])>>>4;if((u+=15&P)>v){o&&W(0);break}if(P||W(2),D<256)t[c++]=D;else{if(256==D){j=u,h=null;break}var B=D-254;if(D>264){var R=ii[I=D-257];B=kt(e,u,(1<<R)-1)+Mh[I],u+=R}var z=d[Ru(e,u)&N],U=z>>>4;z||W(3),u+=15&z;T=Bb[U];if(U>3){R=ai[U];T+=Ru(e,u)&(1<<R)-1,u+=R}if(u>v){o&&W(0);break}i&&a(c+131072);for(var V=c+B;c<V;c+=4)t[c]=t[c-T],t[c+1]=t[c+1-T],t[c+2]=t[c+2-T],t[c+3]=t[c+3-T];c=V}}n.l=h,n.p=j,n.b=c,n.f=l,h&&(l=1,n.m=p,n.d=d,n.n=f)}while(!l);return c==t.length?t:Mt(t,0,c)}),"inflt"),tn=s((function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8}),"wbits"),Qr=s((function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16}),"wbits16"),zu=s((function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[_n,0];if(1==i){var s=new ee(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var a=n[0],l=n[1],u=0,c=1,h=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=n[n[u].f<n[h].f?u++:h++],l=n[u!=c&&n[u].f<n[h].f?u++:h++],n[c++]={s:-1,f:a.f+l.f,l:a,r:l};var d=o[0].s;for(r=1;r<i;++r)o[r].s>d&&(d=o[r].s);var p=new $e(d+1),f=Vu(n[c-1],p,0);if(f>t){r=0;var v=0,g=f-t,m=1<<g;for(o.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));r<i;++r){var y=o[r].s;if(!(p[y]>t))break;v+=m-(1<<f-p[y]),p[y]=t}for(v>>>=g;v>0;){var b=o[r].s;p[b]<t?v-=1<<t-p[b]++-1:++r}for(;r>=0&&v;--r){var w=o[r].s;p[w]==t&&(--p[w],++v)}f=t}return[new ee(p),f]}),"hTree"),Vu=s((function(e,t,n){return-1==e.s?Math.max(Vu(e.l,t,n+1),Vu(e.r,t,n+1)):t[e.s]=n}),"ln"),mh=s((function(e){for(var t=e.length;t&&!e[--t];);for(var n=new $e(++t),r=0,i=e[0],o=1,a=s((function(e){n[r++]=e}),"w"),l=1;l<=t;++l)if(e[l]==i&&l!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(i),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(i);o=1,i=e[l]}return[n.subarray(0,r),t]}),"lc"),ei=s((function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n}),"clen"),qu=s((function(e,t,n){var r=n.length,i=lo(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)}),"wfblk"),vh=s((function(e,t,n,r,i,o,s,a,l,u,c){tn(t,c++,n),++i[256];for(var h=zu(i,15),d=h[0],p=h[1],f=zu(o,15),v=f[0],g=f[1],m=mh(d),y=m[0],b=m[1],w=mh(v),_=w[0],M=w[1],x=new $e(19),I=0;I<y.length;++I)x[31&y[I]]++;for(I=0;I<_.length;++I)x[31&_[I]]++;for(var k=zu(x,7),S=k[0],E=k[1],O=19;O>4&&!S[oo[O-1]];--O);var A,P,C,F,T=u+5<<3,L=ei(i,Mn)+ei(o,ti)+s,N=ei(i,d)+ei(o,v)+s+14+3*O+ei(x,S)+(2*x[16]+3*x[17]+7*x[18]);if(T<=L&&T<=N)return qu(t,c,e.subarray(l,l+u));if(tn(t,c,1+(N<L)),c+=2,N<L){A=_t(d,p,0),P=d,C=_t(v,g,0),F=v;var j=_t(S,E,0);tn(t,c,b-257),tn(t,c+5,M-1),tn(t,c+10,O-4),c+=14;for(I=0;I<O;++I)tn(t,c+3*I,S[oo[I]]);c+=3*O;for(var D=[y,_],B=0;B<2;++B){var R=D[B];for(I=0;I<R.length;++I){var z=31&R[I];tn(t,c,j[z]),c+=S[z],z>15&&(tn(t,c,R[I]>>>5&127),c+=R[I]>>>12)}}}else A=Vb,P=Mn,C=Gb,F=ti;for(I=0;I<a;++I)if(r[I]>255){z=r[I]>>>18&31;Qr(t,c,A[z+257]),c+=P[z+257],z>7&&(tn(t,c,r[I]>>>23&31),c+=ii[z]);var U=31&r[I];Qr(t,c,C[U]),c+=F[U],U>3&&(Qr(t,c,r[I]>>>5&8191),c+=ai[U])}else Qr(t,c,A[r[I]]),c+=P[r[I]];return Qr(t,c,A[256]),c+P[256]}),"wblk"),Wb=new ri([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),_n=new ee(0),$b=s((function(e,t,n,r,i,o){var a=e.length,l=new ee(r+a+5*(1+Math.ceil(a/7e3))+i),u=l.subarray(r,l.length-i),c=0;if(!t||a<8)for(var h=0;h<=a;h+=65535){var d=h+65535;d>=a&&(u[c>>3]=o),c=qu(u,c+1,e.subarray(h,d))}else{for(var p=Wb[t-1],f=p>>>13,v=8191&p,g=(1<<n)-1,m=new $e(32768),y=new $e(g+1),b=Math.ceil(n/3),w=2*b,_=s((function(t){return(e[t]^e[t+1]<<b^e[t+2]<<w)&g}),"hsh"),M=new ri(25e3),x=new $e(288),I=new $e(32),k=0,S=0,E=(h=0,0),O=0,A=0;h<a;++h){var P=_(h),C=32767&h,F=y[P];if(m[C]=F,y[P]=C,O<=h){var T=a-h;if((k>7e3||E>24576)&&T>423){c=vh(e,u,0,M,x,I,S,E,A,h-A,c),E=k=S=0,A=h;for(var L=0;L<286;++L)x[L]=0;for(L=0;L<30;++L)I[L]=0}var N=2,j=0,D=v,B=C-F&32767;if(T>2&&P==_(h-B))for(var R=Math.min(f,T)-1,z=Math.min(32767,h),U=Math.min(258,T);B<=z&&--D&&C!=F;){if(e[h+N]==e[h+N-B]){for(var V=0;V<U&&e[h+V]==e[h+V-B];++V);if(V>N){if(N=V,j=B,V>R)break;var W=Math.min(B,V-2),q=0;for(L=0;L<W;++L){var G=h-B+L+32768&32767,Y=G-m[G]+32768&32767;Y>q&&(q=Y,F=G)}}}B+=(C=F)-(F=m[C])+32768&32767}if(j){M[E++]=268435456|Bu[N]<<18|gh[j];var J=31&Bu[N],X=31&gh[j];S+=ii[J]+ai[X],++x[257+J],++I[X],O=h+N,++k}else M[E++]=e[h],++x[e[h]]}}c=vh(e,u,o,M,x,I,S,E,A,h-A,c),!o&&7&c&&(c=qu(u,c+1,_n))}return Mt(l,0,r+lo(c)+i)}),"dflt"),Hb=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),oi=s((function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=Hb[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}}),"crc"),xh=s((function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=0|n.length,s=0;s!=o;){for(var a=Math.min(s+2655,o);s<a;++s)i+=r+=n[s];r=(65535&r)+15*(r>>16),i=(65535&i)+15*(i>>16)}e=r,t=i},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}),"adler"),kr=s((function(e,t,n,r,i){return $b(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!i)}),"dopt"),po=s((function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}),"mrg"),Nb=s((function(e,t,n){for(var r=e(),i=e.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),s=0;s<r.length;++s){var a=r[s],l=o[s];if("function"==typeof a){t+=";"+l+"=";var u=a.toString();if(a.prototype)if(-1!=u.indexOf("[native code]")){var c=u.indexOf(" ",8)+1;t+=u.slice(c,u.indexOf("(",c))}else for(var h in t+=u,a.prototype)t+=";"+l+".prototype."+h+"="+a.prototype[h].toString();else t+=u}else n[l]=a}return[t,n]}),"wcln"),Fu=[],QP=s((function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}),"cbfs"),Xb=s((function(e,t,n,r){var i;if(!Fu[n]){for(var o="",s={},a=e.length-1,l=0;l<a;++l)o=(i=Nb(e[l],o,s))[0],s=i[1];Fu[n]=Nb(e[a],o,s)}var u=po({},Fu[n][1]);return JP(Fu[n][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,u,QP(u),r)}),"wrkr"),si=s((function(){return[ee,$e,ri,ii,ai,oo,Mh,Bb,qb,Ub,so,Yb,_t,Du,kt,Ru,lo,Mt,W,co,di,Hn,Eh]}),"bInflt"),ui=s((function(){return[ee,$e,ri,ii,ai,oo,Bu,gh,Vb,Mn,Gb,ti,so,Wb,_n,_t,tn,Qr,zu,Vu,mh,ei,qu,vh,lo,Mt,$b,kr,fo,Hn]}),"bDflt"),Kb=s((function(){return[Th,Ih,ue,oi,Hb]}),"gze"),Jb=s((function(){return[Ph,e0]}),"guze"),Zb=s((function(){return[Oh,ue,xh]}),"zle"),Qb=s((function(){return[t0]}),"zule"),Hn=s((function(e){return postMessage(e,[e.buffer])}),"pbf"),Eh=s((function(e){return e&&e.size&&new ee(e.size)}),"gu8"),li=s((function(e,t,n,r,i,o){var s=Xb(n,r,i,(function(e,t){s.terminate(),o(e,t)}));return s.postMessage([e,t],t.consume?[e.buffer]:[]),function(){s.terminate()}}),"cbify"),xt=s((function(e){return e.ondata=function(e,t){return postMessage([e,t],[e.buffer])},function(t){return e.push(t.data[0],t.data[1])}}),"astrm"),ci=s((function(e,t,n,r,i){var o,s=Xb(e,r,i,(function(e,n){e?(s.terminate(),t.ondata.call(t,e)):(n[1]&&s.terminate(),t.ondata.call(t,e,n[0],n[1]))}));s.postMessage(n),t.push=function(e,n){t.ondata||W(5),o&&t.ondata(W(4,0,1),null,!!n),s.postMessage([e,o=n],[e.buffer])},t.terminate=function(){s.terminate()}}),"astrmify"),nt=s((function(e,t){return e[t]|e[t+1]<<8}),"b2"),Se=s((function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}),"b4"),hh=s((function(e,t){return Se(e,t)+4294967296*Se(e,t+4)}),"b8"),ue=s((function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}),"wbytes"),Th=s((function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&ue(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}}),"gzh"),Ph=s((function(e){(31!=e[0]||139!=e[1]||8!=e[2])&&W(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=e[10]|2+(e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)}),"gzs"),e0=s((function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}),"gzl"),Ih=s((function(e){return 10+(e.filename&&e.filename.length+1||0)}),"gzhl"),Oh=s((function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=r<<6|(r?32-2*r:1)}),"zlh"),t0=s((function(e){(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)&&W(6,"invalid zlib data"),32&e[1]&&W(6,"invalid zlib data: preset dictionaries not supported")}),"zlv"),s(Ah,"AsyncCmpStrm"),nn=function(){function e(e,t){!t&&"function"==typeof e&&(t=e,e={}),this.ondata=t,this.o=e||{}}return s(e,"Deflate"),e.prototype.p=function(e,t){this.ondata(kr(e,this.o,0,0,!t),t)},e.prototype.push=function(e,t){this.ondata||W(5),this.d&&W(4),this.d=t,this.p(e,t||!1)},e}(),n0=function(){function e(e,t){ci([ui,function(){return[xt,nn]}],this,Ah.call(this,e,t),(function(e){var t=new nn(e.data);onmessage=xt(t)}),6)}return s(e,"AsyncDeflate"),e}(),s(r0,"deflate"),s(fo,"deflateSync"),ot=function(){function e(e){this.s={},this.p=new ee(0),this.ondata=e}return s(e,"Inflate"),e.prototype.e=function(e){this.ondata||W(5),this.d&&W(4);var t=this.p.length,n=new ee(t+e.length);n.set(this.p),n.set(e,t),this.p=n},e.prototype.c=function(e){this.d=this.s.i=e||!1;var t=this.s.b,n=co(this.p,this.o,this.s);this.ondata(Mt(n,t,this.s.b),this.d),this.o=Mt(n,this.s.b-32768),this.s.b=this.o.length,this.p=Mt(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}(),Sh=function(){function e(e){this.ondata=e,ci([si,function(){return[xt,ot]}],this,0,(function(){var e=new ot;onmessage=xt(e)}),7)}return s(e,"AsyncInflate"),e}(),s(Ch,"inflate"),s(di,"inflateSync"),yh=function(){function e(e,t){this.c=oi(),this.l=0,this.v=1,nn.call(this,e,t)}return s(e,"Gzip"),e.prototype.push=function(e,t){nn.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e),this.l+=e.length;var n=kr(e,this.o,this.v&&Ih(this.o),t&&8,!t);this.v&&(Th(n,this.o),this.v=0),t&&(ue(n,n.length-8,this.c.d()),ue(n,n.length-4,this.l)),this.ondata(n,t)},e}(),eI=function(){function e(e,t){ci([ui,Kb,function(){return[xt,nn,yh]}],this,Ah.call(this,e,t),(function(e){var t=new yh(e.data);onmessage=xt(t)}),8)}return s(e,"AsyncGzip"),e}(),s(tI,"gzip"),s(bh,"gzipSync"),Gu=function(){function e(e){this.v=1,ot.call(this,e)}return s(e,"Gunzip"),e.prototype.push=function(e,t){if(ot.prototype.e.call(this,e),this.v){var n=this.p.length>3?Ph(this.p):4;if(n>=this.p.length&&!t)return;this.p=this.p.subarray(n),this.v=0}t&&(this.p.length<8&&W(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),ot.prototype.c.call(this,t)},e}(),i0=function(){function e(e){this.ondata=e,ci([si,Jb,function(){return[xt,ot,Gu]}],this,0,(function(){var e=new Gu;onmessage=xt(e)}),9)}return s(e,"AsyncGunzip"),e}(),s(a0,"gunzip"),s(Uu,"gunzipSync"),wh=function(){function e(e,t){this.c=xh(),this.v=1,nn.call(this,e,t)}return s(e,"Zlib"),e.prototype.push=function(e,t){nn.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e);var n=kr(e,this.o,this.v&&2,t&&4,!t);this.v&&(Oh(n,this.o),this.v=0),t&&ue(n,n.length-4,this.c.d()),this.ondata(n,t)},e}(),nI=function(){function e(e,t){ci([ui,Zb,function(){return[xt,nn,wh]}],this,Ah.call(this,e,t),(function(e){var t=new wh(e.data);onmessage=xt(t)}),10)}return s(e,"AsyncZlib"),e}(),s(rI,"zlib"),s(kh,"zlibSync"),Yu=function(){function e(e){this.v=1,ot.call(this,e)}return s(e,"Unzlib"),e.prototype.push=function(e,t){if(ot.prototype.e.call(this,e),this.v){if(this.p.length<2&&!t)return;this.p=this.p.subarray(2),this.v=0}t&&(this.p.length<4&&W(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),ot.prototype.c.call(this,t)},e}(),o0=function(){function e(e){this.ondata=e,ci([si,Qb,function(){return[xt,ot,Yu]}],this,0,(function(){var e=new Yu;onmessage=xt(e)}),11)}return s(e,"AsyncUnzlib"),e}(),s(s0,"unzlib"),s(Wu,"unzlibSync"),u0=function(){function e(e){this.G=Gu,this.I=ot,this.Z=Yu,this.ondata=e}return s(e,"Decompress"),e.prototype.push=function(e,t){if(this.ondata||W(5),this.s)this.s.push(e,t);else{if(this.p&&this.p.length){var n=new ee(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length)}else this.p=e;if(this.p.length>2){var r=this,i=s((function(){r.ondata.apply(r,arguments)}),"cb");this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(i):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(i):new this.Z(i),this.s.push(this.p,t),this.p=null}}},e}(),iI=function(){function e(e){this.G=i0,this.I=Sh,this.Z=o0,this.ondata=e}return s(e,"AsyncDecompress"),e.prototype.push=function(e,t){u0.prototype.push.call(this,e,t)},e}(),s(aI,"decompress"),s(oI,"decompressSync"),Lh=s((function(e,t,n,r){for(var i in e){var o=e[i],s=t+i,a=r;Array.isArray(o)&&(a=po(r,o[1]),o=o[0]),o instanceof ee?n[s]=[o,a]:(n[s+="/"]=[new ee(0),a],Lh(o,s,n,r))}}),"fltn"),Fb=typeof TextEncoder<"u"&&new TextEncoder,_h=typeof TextDecoder<"u"&&new TextDecoder,l0=0;try{_h.decode(_n,{stream:!0}),l0=1}catch{}c0=s((function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return[t,Mt(e,n-1)];i?3==i?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&i?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}}),"dutf8"),sI=function(){function e(e){this.ondata=e,l0?this.t=new TextDecoder:this.p=_n}return s(e,"DecodeUTF8"),e.prototype.push=function(e,t){if(this.ondata||W(5),t=!!t,this.t)return this.ondata(this.t.decode(e,{stream:!0}),t),void(t&&(this.t.decode().length&&W(8),this.t=null));this.p||W(4);var n=new ee(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length);var r=c0(n),i=r[0],o=r[1];t?(o.length&&W(8),this.p=null):this.p=o,this.ondata(i,t)},e}(),uI=function(){function e(e){this.ondata=e}return s(e,"EncodeUTF8"),e.prototype.push=function(e,t){this.ondata||W(5),this.d&&W(4),this.ondata($n(e),this.d=t||!1)},e}(),s($n,"strToU8"),s(jh,"strFromU8"),d0=s((function(e){return 1==e?3:e<6?2:9==e?1:0}),"dbf"),p0=s((function(e,t){return t+30+nt(e,t+26)+nt(e,t+28)}),"slzh"),f0=s((function(e,t,n){var r=nt(e,t+28),i=jh(e.subarray(t+46,t+46+r),!(2048&nt(e,t+8))),o=t+46+r,s=Se(e,t+20),a=n&&4294967295==s?h0(e,o):[s,Se(e,t+24),Se(e,t+42)],l=a[0],u=a[1],c=a[2];return[nt(e,t+10),l,u,i,o+nt(e,t+30)+nt(e,t+32),c]}),"zh"),h0=s((function(e,t){for(;1!=nt(e,t);t+=4+nt(e,t+2));return[hh(e,t+12),hh(e,t+4),hh(e,t+20)]}),"z64e"),Wn=s((function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&W(9),t+=r+4}return t}),"exfl"),ni=s((function(e,t,n,r,i,o,s,a){var l=r.length,u=n.extra,c=a&&a.length,h=Wn(u);ue(e,t,null!=s?33639248:67324752),t+=4,null!=s&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(null==o&&8),e[t++]=i&&8,e[t++]=255&n.compression,e[t++]=n.compression>>8;var d=new Date(null==n.mtime?Date.now():n.mtime),p=d.getFullYear()-1980;if((p<0||p>119)&&W(10),ue(e,t,p<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>>1),t+=4,null!=o&&(ue(e,t,n.crc),ue(e,t+4,o),ue(e,t+8,n.size)),ue(e,t+12,l),ue(e,t+14,h),t+=16,null!=s&&(ue(e,t,c),ue(e,t+6,n.attrs),ue(e,t+10,s),t+=14),e.set(r,t),t+=l,h)for(var f in u){var v=u[f],g=v.length;ue(e,t,+f),ue(e,t+2,g),e.set(v,t+4),t+=4+g}return c&&(e.set(a,t),t+=c),t}),"wzh"),Nh=s((function(e,t,n,r,i){ue(e,t,101010256),ue(e,t+8,n),ue(e,t+10,n),ue(e,t+12,r),ue(e,t+16,i)}),"wzf"),uo=function(){function e(e){this.filename=e,this.c=oi(),this.size=0,this.compression=0}return s(e,"ZipPassThrough"),e.prototype.process=function(e,t){this.ondata(null,e,t)},e.prototype.push=function(e,t){this.ondata||W(5),this.c.p(e),this.size+=e.length,t&&(this.crc=this.c.d()),this.process(e,t||!1)},e}(),lI=function(){function e(e,t){var n=this;t||(t={}),uo.call(this,e),this.d=new nn(t,(function(e,t){n.ondata(null,e,t)})),this.compression=8,this.flag=d0(t.level)}return s(e,"ZipDeflate"),e.prototype.process=function(e,t){try{this.d.push(e,t)}catch(e){this.ondata(e,null,t)}},e.prototype.push=function(e,t){uo.prototype.push.call(this,e,t)},e}(),cI=function(){function e(e,t){var n=this;t||(t={}),uo.call(this,e),this.d=new n0(t,(function(e,t,r){n.ondata(e,t,r)})),this.compression=8,this.flag=d0(t.level),this.terminate=this.d.terminate}return s(e,"AsyncZipDeflate"),e.prototype.process=function(e,t){this.d.push(e,t)},e.prototype.push=function(e,t){uo.prototype.push.call(this,e,t)},e}(),dI=function(){function e(e){this.ondata=e,this.u=[],this.d=1}return s(e,"Zip"),e.prototype.add=function(e){var t=this;if(this.ondata||W(5),2&this.d)this.ondata(W(4+8*(1&this.d),0,1),null,!1);else{var n=$n(e.filename),r=n.length,i=e.comment,o=i&&$n(i),a=r!=e.filename.length||o&&i.length!=o.length,l=r+Wn(e.extra)+30;r>65535&&this.ondata(W(11,0,1),null,!1);var u=new ee(l);ni(u,0,e,n,a);var c=[u],h=s((function(){for(var e=0,n=c;e<n.length;e++){var r=n[e];t.ondata(null,r,!1)}c=[]}),"pAll_1"),d=this.d;this.d=0;var p=this.u.length,f=po(e,{f:n,u:a,o:o,t:function(){e.terminate&&e.terminate()},r:function(){if(h(),d){var e=t.u[p+1];e?e.r():t.d=1}d=1}}),v=0;e.ondata=function(n,r,i){if(n)t.ondata(n,r,i),t.terminate();else if(v+=r.length,c.push(r),i){var o=new ee(16);ue(o,0,134695760),ue(o,4,e.crc),ue(o,8,v),ue(o,12,e.size),c.push(o),f.c=v,f.b=l+v+16,f.crc=e.crc,f.size=e.size,d&&f.r(),d=1}else d&&h()},this.u.push(f)}},e.prototype.end=function(){var e=this;2&this.d?this.ondata(W(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&e.d&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3)},e.prototype.e=function(){for(var e=0,t=0,n=0,r=0,i=this.u;r<i.length;r++){n+=46+(l=i[r]).f.length+Wn(l.extra)+(l.o?l.o.length:0)}for(var o=new ee(n+22),s=0,a=this.u;s<a.length;s++){var l=a[s];ni(o,e,l,l.f,l.u,l.c,t,l.o),e+=46+l.f.length+Wn(l.extra)+(l.o?l.o.length:0),t+=l.b}Nh(o,e,this.u.length,n,t),this.ondata(null,o,!0),this.d=2},e.prototype.terminate=function(){for(var e=0,t=this.u;e<t.length;e++){t[e].t()}this.d=2},e}(),s(pI,"zip"),s(fI,"zipSync"),g0=function(){function e(){}return s(e,"UnzipPassThrough"),e.prototype.push=function(e,t){this.ondata(null,e,t)},e.compression=0,e}(),hI=function(){function e(){var e=this;this.i=new ot((function(t,n){e.ondata(null,t,n)}))}return s(e,"UnzipInflate"),e.prototype.push=function(e,t){try{this.i.push(e,t)}catch(e){this.ondata(e,null,t)}},e.compression=8,e}(),gI=function(){function e(e,t){var n=this;t<32e4?this.i=new ot((function(e,t){n.ondata(null,e,t)})):(this.i=new Sh((function(e,t,r){n.ondata(e,t,r)})),this.terminate=this.i.terminate)}return s(e,"AsyncUnzipInflate"),e.prototype.push=function(e,t){this.i.terminate&&(e=Mt(e,0)),this.i.push(e,t)},e.compression=8,e}(),mI=function(){function e(e){this.onfile=e,this.k=[],this.o={0:g0},this.p=_n}return s(e,"Unzip"),e.prototype.push=function(e,t){var n=this;if(this.onfile||W(5),this.p||W(4),this.c>0){var r=Math.min(this.c,e.length),i=e.subarray(0,r);if(this.c-=r,this.d?this.d.push(i,!this.c):this.k[0].push(i),(e=e.subarray(r)).length)return this.push(e,t)}else{var o=0,a=0,l=void 0,u=void 0;this.p.length?e.length?((u=new ee(this.p.length+e.length)).set(this.p),u.set(e,this.p.length)):u=this.p:u=e;for(var c=u.length,h=this.c,d=h&&this.d,p=s((function(){var e,t=Se(u,a);if(67324752==t){o=1,l=a,f.d=null,f.c=0;var r=nt(u,a+6),i=nt(u,a+8),s=2048&r,d=8&r,p=nt(u,a+26),v=nt(u,a+28);if(c>a+30+p+v){var g=[];f.k.unshift(g),o=2;var m=Se(u,a+18),y=Se(u,a+22),b=jh(u.subarray(a+30,a+=30+p),!s);4294967295==m?(e=d?[-2]:h0(u,a),m=e[0],y=e[1]):d&&(m=-1),a+=v,f.c=m;var w,_={name:b,compression:i,start:function(){if(_.ondata||W(5),m){var e=n.o[i];e||_.ondata(W(14,"unknown compression type "+i,1),null,!1),(w=m<0?new e(b):new e(b,m,y)).ondata=function(e,t,n){_.ondata(e,t,n)};for(var t=0,r=g;t<r.length;t++){var o=r[t];w.push(o,!1)}n.k[0]==g&&n.c?n.d=w:w.push(_n,!0)}else _.ondata(null,_n,!0)},terminate:function(){w&&w.terminate&&w.terminate()}};m>=0&&(_.size=m,_.originalSize=y),f.onfile(_)}return"break"}if(h){if(134695760==t)return l=a+=12+(-2==h&&8),o=3,f.c=0,"break";if(33639248==t)return l=a-=4,o=3,f.c=0,"break"}}),"_loop_2"),f=this;a<c-4;++a){if("break"===p())break}if(this.p=_n,h<0){var v=o?u.subarray(0,l-12-(-2==h&&8)-(134695760==Se(u,l-16)&&4)):u.subarray(0,a);d?d.push(v,!!o):this.k[+(2==o)].push(v)}if(2&o)return this.push(u.subarray(a),t);this.p=u.subarray(a)}t&&(this.c&&W(13),this.p=null)},e.prototype.register=function(e){this.o[e.compression]=e},e}(),$u="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()},s(vI,"unzip"),s(yI,"unzipSync")})),O0=Y(((e,t)=>{"use strict";v(),t.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())))})),j0=Y(((e,t)=>{"use strict";v();var n="%[a-f0-9]{2}",r=new RegExp("("+n+")|([^%]+?)","gi"),i=new RegExp("("+n+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function a(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(r)||[],n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(r)||[];return e}}function l(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=i.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{var r=a(n[0]);r!==n[0]&&(t[n[0]]=r)}n=i.exec(e)}t["%C2"]="�";for(var o=Object.keys(t),s=0;s<o.length;s++){var l=o[s];e=e.replace(new RegExp(l,"g"),t[l])}return e}s(o,"decodeComponents"),s(a,"decode"),s(l,"customDecodeURIComponent"),t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return l(e)}}})),F0=Y(((e,t)=>{"use strict";v(),t.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];let n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}})),R0=Y(((e,t)=>{"use strict";v(),t.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var s=r[o],a=e[s];(i?-1!==t.indexOf(s):t(s,a,e))&&(n[s]=a)}return n}})),W0=Y((e=>{"use strict";v();var t=O0(),n=j0(),r=F0(),i=R0(),o=s((e=>null==e),"isNullOrUndefined"),a=Symbol("encodeFragmentIdentifier");function l(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{let i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[h(t,e),"[",i,"]"].join("")]:[...n,[h(t,e),"[",h(i,e),"]=",h(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[h(t,e),"[]"].join("")]:[...n,[h(t,e),"[]=",h(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[h(n,e),t,h(i,e)].join("")]:[[r,h(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,h(t,e)]:[...n,[h(t,e),"=",h(r,e)].join("")]}}function u(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{let i="string"==typeof n&&n.includes(e.arrayFormatSeparator),o="string"==typeof n&&!i&&d(n,e).includes(e.arrayFormatSeparator);n=o?d(n,e):n;let s=i||o?n.split(e.arrayFormatSeparator).map((t=>d(t,e))):null===n?n:d(n,e);r[t]=s};case"bracket-separator":return(t,n,r)=>{let i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n&&d(n,e));let o=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>d(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],o):r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function h(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function d(e,t){return t.decode?n(e):e}function p(e){return Array.isArray(e)?e.sort():"object"==typeof e?p(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function f(e){let t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function g(e){let t="",n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}function m(e){let t=(e=f(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function y(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())&&(e="true"===e.toLowerCase()),e}function b(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);let n=u(t),i=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return i;for(let o of e.split("&")){if(""===o)continue;let[e,s]=r(t.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:d(s,t),n(d(e,t),s,i)}for(let e of Object.keys(i)){let n=i[e];if("object"==typeof n&&null!==n)for(let e of Object.keys(n))n[e]=y(n[e],t);else i[e]=y(n,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{let n=i[t];return n&&"object"==typeof n&&!Array.isArray(n)?e[t]=p(n):e[t]=n,e}),Object.create(null))}s(l,"encoderForArrayFormat"),s(u,"parserForArrayFormat"),s(c,"validateArrayFormatSeparator"),s(h,"encode"),s(d,"decode"),s(p,"keysSorter"),s(f,"removeHash"),s(g,"getHash"),s(m,"extract"),s(y,"parseValue"),s(b,"parse"),e.extract=m,e.parse=b,e.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let n=s((n=>t.skipNull&&o(e[n])||t.skipEmptyString&&""===e[n]),"shouldFilter"),r=l(t),i={};for(let t of Object.keys(e))n(t)||(i[t]=e[t]);let a=Object.keys(i);return!1!==t.sort&&a.sort(t.sort),a.map((n=>{let i=e[n];return void 0===i?"":null===i?h(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?h(n,t)+"[]":i.reduce(r(n),[]).join("&"):h(n,t)+"="+h(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[n,i]=r(e,"#");return Object.assign({url:n.split("?")[0]||"",query:b(m(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:d(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[a]:!0},n);let r=f(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),s=Object.assign(o,t.query),l=e.stringify(s,n);l&&(l="?".concat(l));let u=g(t.url);return t.fragmentIdentifier&&(u="#".concat(n[a]?h(t.fragmentIdentifier,n):t.fragmentIdentifier)),"".concat(r).concat(l).concat(u)},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[a]:!1},r);let{url:o,query:s,fragmentIdentifier:l}=e.parseUrl(t,r);return e.stringifyUrl({url:o,query:i(s,n),fragmentIdentifier:l},r)},e.exclude=(t,n,r)=>{let i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return e.pick(t,i,r)}}));v();var fw=Rt(_g());v(),v(),v();var Em=Rt(Mm());v();var Nl=class{constructor({origin:e,destination:t,vortex:n,elevationDelta:r=0,distance:i=0,angle:o=0,pathWeight:s=0}){let a,l;if(m(this,"origin"),m(this,"destination"),m(this,"vortex"),m(this,"distance"),m(this,"angle"),m(this,"weight"),this.origin=e,this.destination=t,this.vortex=n,this.distance=i,this.angle=o,n)this.distance=0,this.angle=0,a=void 0!==n.weight&&n.weight>0?n.weight:"elevator"===n.type?2e3:1e3,l=n.multiplier&&n.multiplier>=1?n.multiplier:1,this.weight=r*l+a;else{let e=s||t.weight;a=e&&e>=0?e:0,l=t.multiplier&&t.multiplier>=1?t.multiplier:1,this.weight=this.distance*l+a}if(isNaN(this.angle))throw new Error("nan angle")}};s(Nl,"Edge");var jl=Nl,tr=jl;v();var xm="mi-debug",tx={logState:"test"===E.env.NODE_ENV?3:0,log(...e){this.logState<=0&&console.log("[MappedInJS]",...e)},warn(...e){this.logState<=1&&console.warn("[MappedInJS]",...e)},error(...e){this.logState<=2&&console.error("[MappedInJS]",...e)},assert(...e){console.assert(...e)},time(e){console.time(e)},timeEnd(e){console.timeEnd(e)}},D=tx;function nx(e){if(e.scale||e.x_scale)return 1/(e.scale||e.x_scale||1);try{if(!e.georeference)throw new Error("map ".concat(e.name||e.shortName||e.id," does not have a georeference field"));if(e.georeference.length<3)throw new Error("map ".concat(e.name||e.shortName||e.id," has less than 3 georeference points, we require at least 3 for proper map scaling"));let t=e.georeference[0],n=e.georeference[2],r=(0,Em.getDistance)({latitude:t.target.x,longitude:t.target.y},{latitude:n.target.x,longitude:n.target.y}),i=t.control.x-n.control.x,o=t.control.y-n.control.y;return Math.sqrt(i*i+o*o)/r}catch(e){return D.error(e),1}}function Ls(e,t){let n=e.x-t.x,r=e.y-t.y;return(Math.atan2(r,n)+2.5*Math.PI)%(2*Math.PI)}s(nx,"getMapScale"),s(Ls,"getAngle");var Rl=class{constructor({nodes:e,vortexes:t,maps:n,showVortexNames:r=!1}){m(this,"edges"),m(this,"nodesById"),m(this,"mapsById"),this.edges={},this.mapsById=n.map((e=>({...e,_scale:nx(e)}))).reduce(((e,t)=>(e[t.id]=t,e)),{});let i=e.filter((e=>!!this.mapsById[e.map])).map((e=>({...e,paths:e.paths?e.paths.filter((({map:t})=>t===e.map)):[]})));this.nodesById=i.reduce(((e,t)=>(e[t.id]=t,e)),{});for(let e in this.nodesById)this.nodesById.hasOwnProperty(e)&&(this.nodesById[e].paths=this.nodesById[e].paths.filter((({node:e})=>!!this.nodesById[e])));let o=t.map((e=>({...e,name:r?e.name:e.type,nodes:e.nodes?e.nodes.filter((e=>!!this.nodesById[e])):[]})));i.forEach((e=>{this.edges[e.id]=e.paths.map((({node:t,weight:n})=>{let r=this.nodesById[t];return new tr({angle:Ls(e,r),destination:r,distance:this.getDistance(e,r),origin:e,pathWeight:n})}))})),o.forEach((e=>{if(null==e.nodes||0===e.nodes.length)return;let t=0;for(;t<e.nodes.length-1;){let n=this.nodesById[e.nodes[t]];if(t++,null==n)continue;let r=t;for(;r<e.nodes.length;){let t=this.nodesById[e.nodes[r]];if(r++,null==t)continue;let i=this.mapsById[n.map].elevation||0,o=this.mapsById[t.map].elevation||0,s=Math.abs(i-o);this.edges[n.id].push(new tr({destination:t,elevationDelta:s,origin:n,vortex:e})),this.edges[t.id].push(new tr({destination:n,elevationDelta:s,origin:t,vortex:e}))}}}))}aStar({originIds:e,destinationNodeIds:t,accessible:n,includedVortexIds:r,excludedVortexIds:i,excludedNodeIds:o}){let s=e.map((e=>this.nodesById[e])).filter((e=>e&&(!o||!o.has(e.id)))),a=t.map((e=>this.nodesById[e])).filter((e=>e&&(!o||!o.has(e.id))));if(0===s.length||0===a.length)return[];let l=[],u={},c={};for(s.forEach((e=>{let t=this.getShortestEuclideanDistance(e,a);l.push({origin:e,priority:t}),u[e.id]=null,c[e.id]=0})),l.sort(((e,t)=>e.priority-t.priority));l.length>0;){let e=l[0];if(a.includes(e.origin)){let t=[],n=u[e.origin.id];for(;null!=n;){t.push(n);let e=u[n.origin.id];n=null!=e?e:null}return t.reverse()}for(let t of this.edges[e.origin.id]){let s=t.vortex&&!1===t.vortex.accessible||!1===t.origin.accessible||!1===t.destination.accessible,h=t.vortex&&(r&&!r.has(t.vortex.id)||i&&i.has(t.vortex.id)),d=o&&o.has(t.destination.id);if(n&&s||h||d)continue;let p=c[e.origin.id]+t.weight;if(null==c[t.destination.id]||p<c[t.destination.id]){c[t.destination.id]=p;let e=p+this.getShortestEuclideanDistance(t.destination,a);l.push({origin:t.destination,priority:e}),u[t.destination.id]=t}}l.splice(0,1),l.sort(((e,t)=>e.priority-t.priority))}return[]}getDistance(e,t){let n,r=e.x-t.x,i=e.y-t.y,o=r*r+i*i;return n=null==this.mapsById[e.map]?1:this.mapsById[e.map]._scale,Math.sqrt(o)/n}getShortestEuclideanDistance(e,t){return t.reduce(((t,n)=>{let r=this.getDistance(e,n);return Math.min(t,r)}),Number.MAX_VALUE)}};s(Rl,"NavigationGraph");var Fl=Rl,Dl=Fl;function rx(e){switch(e){case"down":case"up":return"".concat(e," ");default:return""}}v(),v(),s(rx,"vortexDirectionTest");var Bl=class{constructor({origin:e,action:t,distance:n,atLocation:r,instruction:i}){m(this,"node"),m(this,"instruction"),m(this,"action"),m(this,"atLocation"),m(this,"type"),m(this,"distance",0),this.node=e,this.action=t,this.distance=n||0,this.atLocation=r,this.instruction="",i?this.instruction=i:(null!=t&&"Departure"===t.type?this.instruction=null!=r?"Depart from ".concat(r.name):"Depart from current location":null!=t&&"Arrival"===t.type?this.instruction=null!=r?"Arrive at ".concat(r.name):"Arrive at destination":null!=t&&"TakeVortex"===t.type?this.instruction="Take ".concat(r&&r.name," ").concat(rx(t.direction),"to ").concat(t.toMap.name):null!=t&&"ExitVortex"===t.type?this.instruction="Exit ".concat(r&&r.name," at ").concat(t.toMap.name):null!=t&&"bearing"in t&&"Right"===t.bearing?this.instruction="Turn right":null!=t&&"bearing"in t&&"SlightRight"===t.bearing?this.instruction="Turn slightly right":null!=t&&"bearing"in t&&"Straight"===t.bearing?this.instruction="Head straight":null!=t&&"bearing"in t&&"SlightLeft"===t.bearing?this.instruction="Turn slightly left":null!=t&&"bearing"in t&&"Left"===t.bearing&&(this.instruction="Turn left"),null!=t&&"Turn"===t.type&&r&&(this.instruction+=" at ".concat(r.name)))}};s(Bl,"Directive");var zl=Bl,Sn=zl;function Vl(e,t,n,r){if(!(e&&t&&n&&r))return null;let i=e.x,o=e.y,s=t.x,a=t.y,l=n.x,u=n.y,c=r.x,h=r.y;if(i===s&&o===a||l===c&&u===h)return null;let d=(h-u)*(s-i)-(c-l)*(a-o);if(0===d)return null;let p=((c-l)*(o-u)-(h-u)*(i-l))/d,f=((s-i)*(o-u)-(a-o)*(i-l))/d;return p<0||p>1||f<0||f>1?null:{x:i+p*(s-i),y:o+p*(a-o)}}function Tm(e,t,n){if(e.x===t.x)return[{x:e.x+n,y:e.y},{x:t.x+n,y:t.y}];if(e.y===t.y)return[{x:e.x,y:e.y+n},{x:t.x,y:t.y+n}];let r=-1/((t.y-e.y)/(t.x-e.x)),i=n*Math.sqrt(1/(1+r*r)),o=r*i;return[{x:e.x+i,y:e.y+o},{x:t.x+i,y:t.y+o}]}function Pm(e,t,n=[],r=0){let i=!0;return n.forEach((n=>{if(r>0){let o=Tm(e,t,-r),s=Tm(e,t,r);if(Vl(o[0],o[1],n[0],n[1])||Vl(s[0],s[1],n[0],n[1]))return void(i=!1)}else if(Vl(e,t,n[0],n[1]))return void(i=!1)})),i}v(),s(Vl,"getLineIntersection"),s(Tm,"getOffsetLine"),s(Pm,"hasLineOfSight");var js=.1*Math.PI;function Ns(e,t){return((t-e+Math.PI)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)-Math.PI}s(Ns,"differenceBetweenAngles");var Ul=class{constructor({locations:e,nodes:t,vortexes:n,maps:r,polygons:i,showVortexNames:o}){m(this,"graph"),m(this,"locationsByNodeId"),m(this,"geometryEdgesByMapId",new Map),this.graph=new Dl({maps:r,nodes:t,showVortexNames:o,vortexes:n}),this.locationsByNodeId=e.reduce(((e,t)=>(t.nodes&&t.nodes.forEach((n=>{e[n.node]=t})),t.polygons&&t.polygons.forEach((n=>{n.entrances&&n.entrances.forEach((n=>{e[n]=t}))})),e)),{}),i&&i.forEach((e=>{if(this.geometryEdgesByMapId.has(e.map)||this.geometryEdgesByMapId.set(e.map,[]),!0===e.isLineStringSegment)for(let t of e.vertexes)for(let n=0;n<t.length;n++)t[n+1]&&this.geometryEdgesByMapId.get(e.map).push([t[n],t[n+1]]);else e.vertexes.forEach(((t,n)=>{e.vertexes[n+1]?this.geometryEdgesByMapId.get(e.map).push([t,e.vertexes[n+1]]):this.geometryEdgesByMapId.get(e.map).push([t,e.vertexes[0]])}))}))}getClosestLocationInRay(e,t=.5*Math.PI,n=10){let r=0,i=0,o=e;for(;Math.abs(r)<t&&i<n;){let e=this.graph.edges[o.destination.id],s=null,a=0;for(let t of e)if(t.distance>0)if(null!=s){let e=-Ns(o.angle,t.angle);Math.abs(e)<Math.abs(a)&&(s=t,a=e)}else s=t,a=-Ns(o.angle,t.angle);if(null==s)return null;{if(Math.abs(a)>=t||(r+=a,i+=s.distance,Math.abs(r)>=t||i>n))return null;let e=this.locationsByNodeId[s.destination.id];if(null!=e)return e;o=s}}return null}getDirections({originIds:e,destinationNodeIds:t,accessible:n,departFrom:r,arriveAt:i,includedVortexIds:o,excludedVortexIds:s,excludedNodeIds:a,simplify:l}){var u,c,h;let d=this.graph.aStar({originIds:e,destinationNodeIds:t,accessible:n,includedVortexIds:o,excludedVortexIds:s,excludedNodeIds:a});if(0===d.length)return{distance:0,instructions:[new Sn({distance:0,instruction:"No Valid Path Available"})],path:[]};let p=0,f=[],v=[];if(null!=l&&l.enabled){let e=null!=(u=null==l?void 0:l.bufferRadius)?u:1.8,t=[d[0]];for(let n=1;n<d.length;n++){if(d[n].origin.map!==d[n-1].origin.map){let r=null!=(c=this.geometryEdgesByMapId.get(d[n-1].origin.map))?c:[];v.push(...this.simplifySteps(t,r,e)),t=[d[n]]}t.push(d[n])}let n=d[d.length-1],r=null!=(h=this.geometryEdgesByMapId.get(n.origin.map))?h:[];v.push(...this.simplifySteps(t,r,e)),d=v}for(let e=0;e<d.length;e++)f.push(d[e].origin);f.push(d[d.length-1].destination);let g=[],m=null,y=null,b=0,w=0;for(let e=0;e<d.length;e++){let t=d[e],n=t.origin,o=t.destination;if(p+=t.distance,b+=(null==y?void 0:y.distance)||0,0===e&&g.push(new Sn({action:{type:"Departure"},atLocation:r,distance:0,origin:n})),null!=t.vortex){let e=this.graph.mapsById[n.map],r=this.graph.mapsById[o.map],i="none";if(null!=e.elevation&&null!=r.elevation){let t=e.elevation-r.elevation;t>0?i="down":t<0&&(i="up")}g.push(new Sn({action:{direction:i,fromMap:e,toMap:r,type:"TakeVortex"},atLocation:t.vortex,distance:b,origin:n})),w+=b,b=0}else if(null!=m&&null!=y)if(null!=y.vortex){let e=this.graph.mapsById[m.map],t=this.graph.mapsById[y.destination.map];g.push(new Sn({action:{fromMap:e,toMap:t,type:"ExitVortex"},atLocation:y.vortex,distance:b,origin:n})),w+=b,b=0}else{let e=this.graph.edges[n.id].filter((e=>e.destination!==m&&e.destination!==t.destination));if(e.length>0){let r=-Ns(y.angle,t.angle),i=e.reduce(((e,n)=>{let r=-Ns(t.angle,n.angle);return Math.min(e,Math.abs(r))}),Math.PI);if(Math.abs(r)>=js||Math.abs(i)<=js){let e;e=r<=-Math.PI/4?"Right":r<=-js?"SlightRight":r<=js?"Straight":r<=Math.PI/4?"SlightLeft":"Left";let t=this.locationsByNodeId[n.id];if(t||(t=this.getClosestLocationInRay(y,.5*Math.PI,10)),null!=t){let r=new Sn({action:{bearing:e,referencePosition:"At",type:"Turn"},atLocation:t,distance:b,origin:n});r.type=e,g.push(r)}else g.push(new Sn({action:{bearing:e,referencePosition:"At",type:"Turn"},distance:b,origin:n}));w+=b,b=0}}}e===d.length-1&&(g.push(new Sn({action:{type:"Arrival"},atLocation:i,distance:p-w<0?0:p-w,origin:t.destination})),w+=b,b=0),m=n,y=t}let _=[],M=null;for(let e=g.length-1;e>=0;e--){let t=g[e],{action:n}=t;n&&"TakeVortex"===n.type?(M=t.node,_.unshift(t)):n&&"Turn"===n.type&&null!=M?this.graph.getDistance(t.node,M)>5?_.unshift(t):_[0].distance+=t.distance:_.unshift(t)}return{distance:p,instructions:_,path:f}}simplifySteps(e,t,n){if(e.length<3)return e;let r=[e[0]],i=1;for(let o=i+2;o<e.length;o++)if(!Pm(e[i].origin,e[o].origin,t,n)){let t=o-1;r.push(new tr({...e[i],destination:e[t].origin,distance:this.graph.getDistance(e[i].origin,e[t].origin),angle:Ls(e[i].origin,e[t].origin)})),i=t}return r.push(new tr({...e[i],destination:e[e.length-1].origin,distance:this.graph.getDistance(e[i].origin,e[e.length-1].origin),angle:Ls(e[i].origin,e[e.length-1].origin)}),e[e.length-1]),r}};s(Ul,"Navigator");var ql=Ul,Gl=ql;v(),v();var Bt,Fi,Yl,Di,Wl,Fs,Om,$l=class{constructor(e){A(this,Fi),A(this,Di),A(this,Fs),A(this,Bt,void 0),L(this,Bt,e)}directionsTo(e,t){let n=b(this,Bt).analytics;return e instanceof gt?0===e.destinations.length?[]:(n.getDirections(this,e.destinations[e.destinations.length-1]),me(this,Fs,Om).call(this,e,t)):(n.getDirections(this,e),me(this,Di,Wl).call(this,e,t))}distanceTo(e,t){let n=me(this,Di,Wl).call(this,e,t);return(null==n?void 0:n.distance)||0}};Bt=new WeakMap,Fi=new WeakSet,Yl=s((function(){var e;return null!=(e=b(this,Bt).venue.renderOptions)&&e.simplifyDirections?{enabled:!0}:void 0}),"#venueHasSimplifyRenderOption"),Di=new WeakSet,Wl=s((function(e,t){let n=Ni(this),r=Ni(e),i=b(this,Bt).navigator.getDirections({originIds:n,destinationNodeIds:r,accessible:(null==t?void 0:t.accessible)||!1,includedVortexIds:null!=t&&t.includedVortexIds?new Set(t.includedVortexIds):void 0,excludedVortexIds:null!=t&&t.excludedVortexIds?new Set(t.excludedVortexIds):void 0,excludedNodeIds:null!=t&&t.excludedNodeIds?new Set(t.excludedNodeIds):void 0,simplify:(null==t?void 0:t.simplify)||b(this,Fi,Yl)});return new nr(b(this,Bt),i)}),"#directionsToSingleDestination"),Fs=new WeakSet,Om=s((function(e,t){let n,r=[],i=Ni(this);for(let o=0;o<e.destinations.length;o++){n=Ni(e.destinations[o]);let s=b(this,Bt).navigator.getDirections({originIds:i,destinationNodeIds:n,includedVortexIds:null!=t&&t.includedVortexIds?new Set(t.includedVortexIds):void 0,excludedVortexIds:null!=t&&t.excludedVortexIds?new Set(t.excludedVortexIds):void 0,accessible:(null==t?void 0:t.accessible)||!1,simplify:(null==t?void 0:t.simplify)||b(this,Fi,Yl)}),a=new nr(b(this,Bt),s);r.push(a),i=0===a.path.length?n:[a.path[a.path.length-1].id]}return r}),"#directionsToDestinationSet"),s($l,"MappedinNavigatable");var Vt=$l;v(),v(),v(),v(),v();var Hl=s((function(e,t){return(Hl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)}),"extendStatics");function qt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Hl(e,t),s(n,"__"),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}s(qt,"__extends");var Cn,Re,un,Ln,He,rt,ve,Or,B=s((function(){return B=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),B.apply(this,arguments)}),"__assign");function Ri(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function q(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return s(i,"adopt"),new(n||(n=Promise))((function(n,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function l(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((r=r.apply(e,t||[])).next())}))}function G(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function mt(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function je(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function Pt(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)(r||!(i in t))&&(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}s(Ri,"__rest"),s(q,"__awaiter"),s(G,"__generator"),s(mt,"__values"),s(je,"__read"),s(Pt,"__spreadArray"),v(),v(),v(),v(),v(),function(e){e.US="US",e.EU="EU"}(Cn||(Cn={})),v(),function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(Re||(Re={})),function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE="$revenue"}(un||(un={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(Ln||(Ln={})),v(),function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}(He||(He={})),v(),function(e){e.BEFORE="before",e.ENRICHMENT="enrichment",e.DESTINATION="destination"}(rt||(rt={})),v(),function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(ve||(ve={})),v(),function(e){e.XHR="xhr",e.SendBeacon="beacon",e.Fetch="fetch"}(Or||(Or={})),v(),v();var Xl="-",zi="AMP",Am="".concat(zi,"_unsent"),Kl="https://api2.amplitude.com/2/httpapi",Sm="https://api.eu.amplitude.com/2/httpapi",Cm="https://api2.amplitude.com/batch",Lm="https://api.eu.amplitude.com/batch";v();var ax=1e3,Ds=s((function(e){if(Object.keys(e).length>ax)return!1;for(var t in e){var n=e[t];if(!Jl(t,n))return!1}return!0}),"isValidObject"),Jl=s((function(e,t){var n,r;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=mt(t),s=o.next();!s.done;s=o.next()){var a=s.value;if(Array.isArray(a))return!1;if("object"==typeof a)i=i&&Ds(a);else if(!["number","string"].includes(typeof a))return!1;if(!i)return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}else{if(null==t)return!1;if("object"==typeof t)return Ds(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0}),"isValidProperties"),It=function(){function e(){this._propertySet=new Set,this._properties={}}return s(e,"Identify"),e.prototype.getUserProperties=function(){return B({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(Re.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(Re.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(Re.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(Re.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(Re.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(Re.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(Re.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(Re.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(Re.UNSET,e,Xl),this},e.prototype.clearAll=function(){return this._properties={},this._properties[Re.CLEAR_ALL]=Xl,this},e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var r=this._properties[e];return void 0===r&&(r={},this._properties[e]=r),r[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return void 0===this._properties[Re.CLEAR_ALL]&&!this._propertySet.has(t)&&(e===Re.ADD?"number"==typeof n:e===Re.UNSET||e===Re.REMOVE||Jl(t,n))},e}(),jm=s((function(e,t,n){return B(B(B({},"string"==typeof e?{event_type:e}:e),n),t&&{event_properties:t})}),"createTrackEvent"),Bi=s((function(e,t){return B(B({},t),{event_type:Ln.IDENTIFY,user_properties:e.getUserProperties()})}),"createIdentifyEvent"),Nm=s((function(e,t,n,r){var i;return B(B({},r),{event_type:Ln.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(i={},i[e]=t,i)})}),"createGroupIdentifyEvent"),Fm=s((function(e,t,n){var r,i=new It;return i.set(e,t),B(B({},n),{event_type:Ln.IDENTIFY,user_properties:i.getUserProperties(),groups:(r={},r[e]=t,r)})}),"createGroupEvent"),Dm=s((function(e,t){return B(B({},t),{event_type:Ln.REVENUE,event_properties:e.getEventProperties()})}),"createRevenueEvent");v(),v();var jn=s((function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=ve.Unknown),{event:e,code:t,message:n}}),"buildResult"),Rm=function(){function e(){this.queue=[],this.applying=!1,this.plugins=[]}return s(e,"Timeline"),e.prototype.register=function(e,t){return q(this,void 0,void 0,(function(){return G(this,(function(n){switch(n.label){case 0:return[4,e.setup(t)];case 1:return n.sent(),this.plugins.push(e),[2]}}))}))},e.prototype.deregister=function(e){return this.plugins.splice(this.plugins.findIndex((function(t){return t.name===e})),1),Promise.resolve()},e.prototype.reset=function(){this.applying=!1,this.plugins=[]},e.prototype.push=function(e){var t=this;return new Promise((function(n){t.queue.push([e,n]),t.scheduleApply(0)}))},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout((function(){t.apply(t.queue.shift()).then((function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)}))}),e))},e.prototype.apply=function(e){return q(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,l,u,c,h,d,p,f,v,g,m,y;return G(this,(function(b){switch(b.label){case 0:if(!e)return[2];t=je(e,1),n=t[0],r=je(e,2),i=r[1],o=this.plugins.filter((function(e){return e.type===rt.BEFORE})),b.label=1;case 1:b.trys.push([1,6,7,8]),s=mt(o),a=s.next(),b.label=2;case 2:return a.done?[3,5]:[4,a.value.execute(B({},n))];case 3:n=b.sent(),b.label=4;case 4:return a=s.next(),[3,2];case 5:return[3,8];case 6:return l=b.sent(),v={error:l},[3,8];case 7:try{a&&!a.done&&(g=s.return)&&g.call(s)}finally{if(v)throw v.error}return[7];case 8:u=this.plugins.filter((function(e){return e.type===rt.ENRICHMENT})),b.label=9;case 9:b.trys.push([9,14,15,16]),c=mt(u),h=c.next(),b.label=10;case 10:return h.done?[3,13]:[4,h.value.execute(B({},n))];case 11:n=b.sent(),b.label=12;case 12:return h=c.next(),[3,10];case 13:return[3,16];case 14:return d=b.sent(),m={error:d},[3,16];case 15:try{h&&!h.done&&(y=c.return)&&y.call(c)}finally{if(m)throw m.error}return[7];case 16:return p=this.plugins.filter((function(e){return e.type===rt.DESTINATION})),f=p.map((function(e){var t=B({},n);return e.execute(t).catch((function(e){return jn(t,0,String(e))}))})),Promise.all(f).then((function(e){var t=je(e,1)[0];i(t)})),[2]}}))}))},e.prototype.flush=function(){return q(this,void 0,void 0,(function(){var e,t,n,r=this;return G(this,(function(i){switch(i.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map((function(e){return r.apply(e)})))];case 1:return i.sent(),t=this.plugins.filter((function(e){return e.type===rt.DESTINATION})),n=t.map((function(e){return e.flush&&e.flush()})),[4,Promise.all(n)];case 2:return i.sent(),[2]}}))}))},e}();v();var zm="Event tracked successfully",Bm="Unexpected error occurred",Vm="Event rejected due to exceeded retry count",qm="Event skipped due to optOut config",Gm="Event rejected due to missing API key",Um="Invalid API key",Ym="Client not initialized",Zl=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new Rm,this.name=e}return s(e,"AmplitudeCore"),e.prototype._init=function(e){return q(this,void 0,void 0,(function(){return G(this,(function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(),[4,this.runQueuedFunctions("q")];case 1:return t.sent(),[2]}}))}))},e.prototype.runQueuedFunctions=function(e){return q(this,void 0,void 0,(function(){var t,n,r,i,o,s;return G(this,(function(a){switch(a.label){case 0:t=this[e],this[e]=[],a.label=1;case 1:a.trys.push([1,6,7,8]),n=mt(t),r=n.next(),a.label=2;case 2:return r.done?[3,5]:[4,(0,r.value)()];case 3:a.sent(),a.label=4;case 4:return r=n.next(),[3,2];case 5:return[3,8];case 6:return i=a.sent(),o={error:i},[3,8];case 7:try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(o)throw o.error}return[7];case 8:return[2]}}))}))},e.prototype.track=function(e,t,n){var r=jm(e,t,n);return this.dispatch(r)},e.prototype.identify=function(e,t){var n=Bi(e,t);return this.dispatch(n)},e.prototype.groupIdentify=function(e,t,n,r){var i=Nm(e,t,n,r);return this.dispatch(i)},e.prototype.setGroup=function(e,t,n){var r=Fm(e,t,n);return this.dispatch(r)},e.prototype.revenue=function(e,t){var n=Dm(e,t);return this.dispatch(n)},e.prototype.add=function(e){return q(this,void 0,void 0,(function(){return G(this,(function(t){return this.config?[2,this.timeline.register(e,this.config)]:(this.q.push(this.add.bind(this,e)),[2])}))}))},e.prototype.remove=function(e){return q(this,void 0,void 0,(function(){return G(this,(function(t){return this.config?[2,this.timeline.deregister(e)]:(this.q.push(this.remove.bind(this,e)),[2])}))}))},e.prototype.dispatchWithCallback=function(e,t){if(!this.config)return t(jn(e,0,Ym));this.process(e).then(t)},e.prototype.dispatch=function(e){return q(this,void 0,void 0,(function(){var t=this;return G(this,(function(n){return this.config?[2,this.process(e)]:[2,new Promise((function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))}))]}))}))},e.prototype.process=function(e){return q(this,void 0,void 0,(function(){var t,n,r;return G(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),this.config.optOut?[2,jn(e,0,qm)]:[4,this.timeline.push(e)];case 1:return 200===(r=i.sent()).code?this.config.loggerProvider.log(r.message):this.config.loggerProvider.error(r.message),[2,r];case 2:return t=i.sent(),n=String(t),this.config.loggerProvider.error(n),[2,r=jn(e,0,n)];case 3:return[2]}}))}))},e.prototype.setOptOut=function(e){this.config?this.config.optOut=!!e:this.q.push(this.setOptOut.bind(this,!!e))},e.prototype.flush=function(){return this.timeline.flush()},e}();v();var Rs=function(){function e(){this.productId="",this.quantity=1,this.price=0}return s(e,"Revenue"),e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setEventProperties=function(e){return Ds(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?B({},this.properties):{};return e[un.REVENUE_PRODUCT_ID]=this.productId,e[un.REVENUE_QUANTITY]=this.quantity,e[un.REVENUE_PRICE]=this.price,e[un.REVENUE_TYPE]=this.revenueType,e[un.REVENUE]=this.revenue,e},e}();v(),v();var Wm=s((function(e,t){var n=Math.max(t,1);return e.reduce((function(e,t,r){var i=Math.floor(r/n);return e[i]||(e[i]=[]),e[i].push(t),e}),[])}),"chunk");v(),v();var zs="Amplitude Logger ",$m=function(){function e(){this.logLevel=He.None}return s(e,"Logger"),e.prototype.disable=function(){this.logLevel=He.None},e.prototype.enable=function(e){void 0===e&&(e=He.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<He.Verbose||console.log("".concat(zs,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<He.Warn||console.warn("".concat(zs,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<He.Error||console.error("".concat(zs,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<He.Debug||console.log("".concat(zs,"[Debug]: ").concat(e.join(" ")))},e}(),Bs=s((function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,logLevel:He.Warn,loggerProvider:new $m,optOut:!1,serverUrl:Kl,serverZone:Cn.US,useBatch:!1}}),"getDefaultConfig"),Ql=function(){function e(e){var t,n,r;this._optOut=!1;var i=Bs();this.apiKey=e.apiKey,this.flushIntervalMillis=e.flushIntervalMillis||i.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||i.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||i.flushQueueSize,this.loggerProvider=e.loggerProvider||i.loggerProvider,this.logLevel=null!==(t=e.logLevel)&&void 0!==t?t:i.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.optOut=null!==(n=e.optOut)&&void 0!==n?n:i.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||i.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(r=e.useBatch)&&void 0!==r?r:i.useBatch,this.loggerProvider.enable(this.logLevel);var o=ec(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=o.serverZone,this.serverUrl=o.serverUrl}return s(e,"Config"),Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),ox=s((function(e,t){return e===Cn.EU?t?Lm:Sm:t?Cm:Kl}),"getServerUrl"),ec=s((function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=Bs().serverZone),void 0===n&&(n=Bs().useBatch),e)return{serverUrl:e,serverZone:void 0};var r=[Cn.US,Cn.EU].includes(t)?t:Bs().serverZone;return{serverZone:r,serverUrl:ox(r,n)}}),"createServerConfig"),tc=function(){function e(){this.name="amplitude",this.type=rt.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return s(e,"Destination"),e.prototype.setup=function(e){var t;return q(this,void 0,void 0,(function(){var n,r=this;return G(this,(function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(Am,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(t=this.config.storageProvider)||void 0===t?void 0:t.get(this.storageKey)];case 1:return n=i.sent(),this.saveEvents(),n&&n.length>0&&Promise.all(n.map((function(e){return r.execute(e)}))).catch(),[2,Promise.resolve(void 0)]}}))}))},e.prototype.execute=function(e){var t=this;return new Promise((function(n){var r={event:e,attempts:0,callback:function(e){return n(e)},timeout:0};t.addToQueue(r)}))},e.prototype.addToQueue=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.filter((function(t){return t.attempts<e.config.flushMaxRetries?(t.attempts+=1,!0):(e.fulfillRequest([t],500,Vm),!1)}));r.forEach((function(t){e.queue=e.queue.concat(t),0!==t.timeout?setTimeout((function(){t.timeout=0,e.schedule(0)}),t.timeout):e.schedule(e.config.flushIntervalMillis)})),this.saveEvents()},e.prototype.schedule=function(e){var t=this;this.scheduled||(this.scheduled=setTimeout((function(){t.flush(!0).then((function(){t.queue.length>0&&t.schedule(e)}))}),e))},e.prototype.flush=function(e){return void 0===e&&(e=!1),q(this,void 0,void 0,(function(){var t,n,r,i=this;return G(this,(function(o){switch(o.label){case 0:return t=[],n=[],this.queue.forEach((function(e){return 0===e.timeout?t.push(e):n.push(e)})),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),r=Wm(t,this.config.flushQueueSize),[4,Promise.all(r.map((function(t){return i.send(t,e)})))];case 1:return o.sent(),[2]}}))}))},e.prototype.send=function(e,t){return void 0===t&&(t=!0),q(this,void 0,void 0,(function(){var n,r,i,o,s;return G(this,(function(a){switch(a.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,Gm)];n={api_key:this.config.apiKey,events:e.map((function(e){var t=e.event;t.extra;return Ri(t,["extra"])})),options:{min_id_length:this.config.minIdLength}},a.label=1;case 1:return a.trys.push([1,3,,4]),r=ec(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(r,n)];case 2:if(null===(i=a.sent()))return this.fulfillRequest(e,0,Bm),[2];if(!t){if("body"in i){o="";try{o=JSON.stringify(i.body,null,2)}catch{}this.fulfillRequest(e,i.statusCode,"".concat(i.status,": ").concat(o))}else this.fulfillRequest(e,i.statusCode,i.status);return[2]}return this.handleReponse(i,e),[3,4];case 3:return s=a.sent(),this.fulfillRequest(e,0,String(s)),[3,4];case 4:return[2]}}))}))},e.prototype.handleReponse=function(e,t){switch(e.status){case ve.Success:this.handleSuccessResponse(e,t);break;case ve.Invalid:this.handleInvalidResponse(e,t);break;case ve.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case ve.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.handleOtherReponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,zm)},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith(Um))this.fulfillRequest(t,e.statusCode,e.body.error);else{var r=Pt(Pt(Pt(Pt([],je(Object.values(e.body.eventsWithInvalidFields)),!1),je(Object.values(e.body.eventsWithMissingFields)),!1),je(Object.values(e.body.eventsWithInvalidIdLengths)),!1),je(e.body.silencedEvents),!1).flat(),i=new Set(r),o=t.filter((function(t,r){if(!i.has(r))return!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,Pt([],je(o),!1))}},e.prototype.handlePayloadTooLargeResponse=function(e,t){1!==t.length?(this.config.flushQueueSize/=2,this.addToQueue.apply(this,Pt([],je(t),!1))):this.fulfillRequest(t,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,s=new Set(r),a=new Set(i),l=new Set(o),u=t.filter((function(t,r){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&a.has(t.event.device_id)))return l.has(r)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,Pt([],je(u),!1))},e.prototype.handleOtherReponse=function(e){var t=this;this.addToQueue.apply(this,Pt([],je(e.map((function(e){return e.timeout=e.attempts*t.retryTimeout,e}))),!1))},e.prototype.fulfillRequest=function(e,t,n){this.saveEvents(),e.forEach((function(e){return e.callback(jn(e.event,t,n))}))},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=Array.from(this.queue.map((function(e){return e.event})));this.config.storageProvider.set(this.storageKey,e)}},e}();v();var vt=s((function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return{promise:e.apply(void 0,Pt([],je(t),!1))}}}),"returnWrapper");v();var sx=s((function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map((function(e){return e.trim()}))}),"getStacktrace"),Pe=s((function(e){return function(){var t=B({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}}),"getClientLogConfig"),ux=s((function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=mt(t.split(".")),o=i.next();!o.done;o=i.next()){var s=o.value;if(!(s in e))return;e=e[s]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e}),"getValueByStringPath"),Ie=s((function(e,t){return function(){var n,r,i={};try{for(var o=mt(t),s=o.next();!s.done;s=o.next()){var a=s.value;i[a]=ux(e,a)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}}),"getClientStates"),Oe=s((function(e,t,n,r,i){return void 0===i&&(i=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=n(),l=a.logger,u=a.logLevel;if(u&&u<He.Debug||!u||!l)return e.apply(i,o);var c={type:"invoke public method",name:t,args:o,stacktrace:sx(1),time:{start:(new Date).toISOString()},states:{}};r&&c.states&&(c.states.before=r());var h=e.apply(i,o);return h&&h.promise?h.promise.then((function(){r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=(new Date).toISOString()),l.debug(JSON.stringify(c,null,2))})):(r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=(new Date).toISOString()),l.debug(JSON.stringify(c,null,2))),h}}),"debugWrapper");v();var Nn=s((function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,Nn)}),"UUID");v();var Vi=function(){function e(){this.memoryStorage=new Map}return s(e,"MemoryStorage"),e.prototype.isEnabled=function(){return q(this,void 0,void 0,(function(){return G(this,(function(e){return[2,!0]}))}))},e.prototype.get=function(e){return q(this,void 0,void 0,(function(){return G(this,(function(t){return[2,this.memoryStorage.get(e)]}))}))},e.prototype.getRaw=function(e){return q(this,void 0,void 0,(function(){var t;return G(this,(function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return[2,(t=n.sent())?JSON.stringify(t):void 0]}}))}))},e.prototype.set=function(e,t){return q(this,void 0,void 0,(function(){return G(this,(function(n){return this.memoryStorage.set(e,t),[2]}))}))},e.prototype.remove=function(e){return q(this,void 0,void 0,(function(){return G(this,(function(t){return this.memoryStorage.delete(e),[2]}))}))},e.prototype.reset=function(){return q(this,void 0,void 0,(function(){return G(this,(function(e){return this.memoryStorage.clear(),[2]}))}))},e}();v();var rr=function(){function e(){}return s(e,"BaseTransport"),e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,n,r,i,o,s,a,l,u,c,h,d,p,f,v,g,m,y,b,w,_,M;if("object"!=typeof e)return null;var x=e.code||0,I=this.buildStatus(x);switch(I){case ve.Success:return{status:I,statusCode:x,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(n=e.payload_size_bytes)&&void 0!==n?n:0,serverUploadTime:null!==(r=e.server_upload_time)&&void 0!==r?r:0}};case ve.Invalid:return{status:I,statusCode:x,body:{error:null!==(i=e.error)&&void 0!==i?i:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(s=e.events_with_invalid_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(a=e.events_with_missing_fields)&&void 0!==a?a:{},eventsWithInvalidIdLengths:null!==(l=e.events_with_invalid_id_lengths)&&void 0!==l?l:{},epsThreshold:null!==(u=e.eps_threshold)&&void 0!==u?u:0,exceededDailyQuotaDevices:null!==(c=e.exceeded_daily_quota_devices)&&void 0!==c?c:{},silencedDevices:null!==(h=e.silenced_devices)&&void 0!==h?h:[],silencedEvents:null!==(d=e.silenced_events)&&void 0!==d?d:[],throttledDevices:null!==(p=e.throttled_devices)&&void 0!==p?p:{},throttledEvents:null!==(f=e.throttled_events)&&void 0!==f?f:[]}};case ve.PayloadTooLarge:return{status:I,statusCode:x,body:{error:null!==(v=e.error)&&void 0!==v?v:""}};case ve.RateLimit:return{status:I,statusCode:x,body:{error:null!==(g=e.error)&&void 0!==g?g:"",epsThreshold:null!==(m=e.eps_threshold)&&void 0!==m?m:0,throttledDevices:null!==(y=e.throttled_devices)&&void 0!==y?y:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(w=e.exceeded_daily_quota_devices)&&void 0!==w?w:{},exceededDailyQuotaUsers:null!==(_=e.exceeded_daily_quota_users)&&void 0!==_?_:{},throttledEvents:null!==(M=e.throttled_events)&&void 0!==M?M:[]}};case ve.Timeout:default:return{status:I,statusCode:x}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?ve.Success:429===e?ve.RateLimit:413===e?ve.PayloadTooLarge:408===e?ve.Timeout:e>=400&&e<500?ve.Invalid:e>=500?ve.Failed:ve.Unknown},e}();v(),v(),v(),v();var Xe=s((function(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:void 0}),"getGlobalScope"),Ar=s((function(){var e,t=Xe();return null!==(e=null==t?void 0:t.location)&&void 0!==e&&e.search?t.location.search.substring(1).split("&").filter(Boolean).reduce((function(e,t){var n=t.split("=",2),r=Hm(n[0]),i=Hm(n[1]);return i&&(e[r]=i),e}),{}):{}}),"getQueryParams"),Hm=s((function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch{return""}}),"tryDecodeURIComponent");v();var Xm="utm_campaign",Km="utm_content",Jm="utm_id",Zm="utm_medium",Qm="utm_source",ev="utm_term",nc="dclid",rc="fbclid",ic="gbraid",ac="gclid",oc="ko_click_id",sc="msclkid",uc="ttclid",lc="twclid",cc="wbraid",tv="EMPTY",Vs={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,msclkid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},nv="MKTG",rv=function(){function e(){}return s(e,"CampaignParser"),e.prototype.parse=function(){return q(this,void 0,void 0,(function(){return G(this,(function(e){return[2,B(B(B(B({},Vs),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},e.prototype.getUtmParam=function(){var e=Ar();return{utm_campaign:e[Xm],utm_content:e[Km],utm_id:e[Jm],utm_medium:e[Zm],utm_source:e[Qm],utm_term:e[ev]}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!==(t=null===(e=n.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch{}return n},e.prototype.getClickIds=function(){var e,t=Ar();return(e={})[nc]=t[nc],e[rc]=t[rc],e[ic]=t[ic],e[ac]=t[ac],e[oc]=t[oc],e[sc]=t[sc],e[uc]=t[uc],e[lc]=t[lc],e[cc]=t[cc],e},e}();v(),v();var ir=s((function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[zi,t,e.substring(0,n)].filter(Boolean).join("_")}),"getCookieName"),dc=s((function(e){return"".concat(zi.toLowerCase(),"_").concat(e.substring(0,6))}),"getOldCookieName"),pc=function(){function e(e,t){var n,r;this.storage=t.storage,this.storageKey=ir(e,nv),this.parser=new rv,this.track=t.track,this.onNewCampaign=t.onNewCampaign,this.disabled=!!t.disabled,this.trackNewCampaigns=!!t.trackNewCampaigns,this.trackPageViews=!!t.trackPageViews,this.excludeReferrers=null!==(n=t.excludeReferrers)&&void 0!==n?n:[],typeof location<"u"&&this.excludeReferrers.unshift(location.hostname),this.initialEmptyValue=null!==(r=t.initialEmptyValue)&&void 0!==r?r:tv}return s(e,"CampaignTracker"),e.prototype.isNewCampaign=function(e,t,n){void 0===n&&(n=!1);e.referrer;var r=e.referring_domain,i=Ri(e,["referrer","referring_domain"]),o=t||{},s=(o.referrer,o.referring_domain),a=Ri(o,["referrer","referring_domain"]);if(e.referring_domain&&this.excludeReferrers.includes(e.referring_domain))return!1;var l=JSON.stringify(i)!==JSON.stringify(a),u=n?iv(r||"")!==iv(s||""):r!==s;return!t||l||u},e.prototype.saveCampaignToStorage=function(e){return q(this,void 0,void 0,(function(){return G(this,(function(t){switch(t.label){case 0:return[4,this.storage.set(this.storageKey,e)];case 1:return t.sent(),[2]}}))}))},e.prototype.getCampaignFromStorage=function(){return q(this,void 0,void 0,(function(){return G(this,(function(e){switch(e.label){case 0:return[4,this.storage.get(this.storageKey)];case 1:return[2,e.sent()]}}))}))},e.prototype.createCampaignEvent=function(e){var t=this,n=B(B({},Vs),e),r=Object.entries(n).reduce((function(e,n){var r=je(n,2),i=r[0],o=r[1];return e.setOnce("initial_".concat(i),o||t.initialEmptyValue),o?e.set(i,o):e.unset(i)}),new It),i={event_type:"Page View",event_properties:{page_title:typeof document<"u"&&document.title||"",page_location:typeof location<"u"&&location.href||"",page_path:typeof location<"u"&&location.pathname||""}};return B(B({},Bi(r)),this.trackPageViews&&i)},e.prototype.send=function(e){return q(this,void 0,void 0,(function(){var t,n;return G(this,(function(r){switch(r.label){case 0:return this.disabled?[2]:[4,this.parser.parse()];case 1:return t=r.sent(),[4,this.getCampaignFromStorage()];case 2:if(n=r.sent(),!e){if(!this.trackNewCampaigns||!this.isNewCampaign(t,n))return[2];this.onNewCampaign(t)}return[4,this.track(this.createCampaignEvent(t))];case 3:return r.sent(),[4,this.saveCampaignToStorage(t)];case 4:return r.sent(),[2]}}))}))},e}(),iv=s((function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")}),"domainWithoutSubdomain");v();var ar=function(){function e(e){this.options=B({},e)}return s(e,"CookieStorage"),e.prototype.isEnabled=function(){return q(this,void 0,void 0,(function(){var t,n,r;return G(this,(function(i){switch(i.label){case 0:if(!Xe())return[2,!1];t=String(Date.now()),n=new e(this.options),r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return q(this,void 0,void 0,(function(){var t;return G(this,(function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:if(!(t=n.sent()))return[2,void 0];try{try{t=decodeURIComponent(atob(t))}catch{}return[2,JSON.parse(t)]}catch{return[2,void 0]}return[2]}}))}))},e.prototype.getRaw=function(e){var t;return q(this,void 0,void 0,(function(){var n,r,i;return G(this,(function(o){return n=Xe(),r=null!==(t=null==n?void 0:n.document.cookie.split("; "))&&void 0!==t?t:[],(i=r.find((function(t){return 0===t.indexOf(e+"=")})))?[2,i.substring(e.length+1)]:[2,void 0]}))}))},e.prototype.set=function(e,t){var n;return q(this,void 0,void 0,(function(){var r,i,o,s,a,l;return G(this,(function(u){try{r=null!==(n=this.options.expirationDays)&&void 0!==n?n:0,o=void 0,(i=null!==t?r:-1)&&((s=new Date).setTime(s.getTime()+24*i*60*60*1e3),o=s),a="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t)))),o&&(a+="; expires=".concat(o.toUTCString())),a+="; path=/",this.options.domain&&(a+="; domain=".concat(this.options.domain)),this.options.secure&&(a+="; Secure"),this.options.sameSite&&(a+="; SameSite=".concat(this.options.sameSite)),(l=Xe())&&(l.document.cookie=a)}catch{}return[2]}))}))},e.prototype.remove=function(e){return q(this,void 0,void 0,(function(){return G(this,(function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}}))}))},e.prototype.reset=function(){return q(this,void 0,void 0,(function(){return G(this,(function(e){return[2]}))}))},e}();v();var qs=function(){function e(e,t){this.storage=e,this.storageKey=ir(t),this.cache={optOut:!1}}return s(e,"SessionManager"),e.prototype.load=function(){var e;return q(this,void 0,void 0,(function(){var t;return G(this,(function(n){switch(n.label){case 0:return t=this,[4,this.storage.get(this.storageKey)];case 1:return t.cache=null!==(e=n.sent())&&void 0!==e?e:{optOut:!1},[2,this]}}))}))},e.prototype.setSession=function(e){this.cache=B(B({},this.cache),e),this.storage.set(this.storageKey,this.cache)},e.prototype.getSessionId=function(){return this.cache.sessionId},e.prototype.setSessionId=function(e){this.setSession({sessionId:e})},e.prototype.getDeviceId=function(){return this.cache.deviceId},e.prototype.setDeviceId=function(e){this.setSession({deviceId:e})},e.prototype.getUserId=function(){return this.cache.userId},e.prototype.setUserId=function(e){this.setSession({userId:e})},e.prototype.getLastEventTime=function(){return this.cache.lastEventTime},e.prototype.setLastEventTime=function(e){this.setSession({lastEventTime:e})},e.prototype.getOptOut=function(){return this.cache.optOut},e.prototype.setOptOut=function(e){this.setSession({optOut:e})},e.prototype.getLastEventId=function(){return this.cache.lastEventId},e.prototype.setLastEventId=function(e){this.setSession({lastEventId:e})},e}();v();var fc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return qt(t,e),s(t,"FetchTransport"),t.prototype.send=function(e,t){return q(this,void 0,void 0,(function(){var n,r;return G(this,(function(i){switch(i.label){case 0:if(typeof fetch>"u")throw new Error("FetchTransport is not supported");return n={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"},[4,fetch(e,n)];case 1:return[4,i.sent().json()];case 2:return r=i.sent(),[2,this.buildResponse(r)]}}))}))},t}(rr);v(),v();var av=Rt(Us()),lx=function(){function e(){this.ua=new av.UAParser(typeof navigator<"u"?navigator.userAgent:null).getResult()}return s(e,"ApplicationContextProviderImpl"),e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:px(),platform:"Web",os:cx(this.ua),deviceModel:dx(this.ua)}},e}(),cx=s((function(e){var t,n;return[null===(t=e.browser)||void 0===t?void 0:t.name,null===(n=e.browser)||void 0===n?void 0:n.major].filter((function(e){return null!=e})).join(" ")}),"getOs"),dx=s((function(e){var t;return null===(t=e.os)||void 0===t?void 0:t.name}),"getDeviceModel"),px=s((function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""}),"getLanguage"),fx=function(){function e(){this.queue=[]}return s(e,"EventBridgeImpl"),e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach((function(t){e(t)})),this.queue=[])},e}(),Fn=s((function(){return Fn=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),Fn.apply(this,arguments)}),"__assign"),Ys=s((function(e,t){var n=typeof e;if(n!==typeof t)return!1;for(var r=0,i=["string","number","boolean","undefined"];r<i.length;r++){if(i[r]===n)return e===t}if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)return!1;var o=Array.isArray(e),s=Array.isArray(t);if(o!==s)return!1;if(!o||!s){var a=Object.keys(e).sort(),l=Object.keys(t).sort();if(!Ys(a,l))return!1;var u=!0;return Object.keys(e).forEach((function(n){Ys(e[n],t[n])||(u=!1)})),u}for(var c=0;c<e.length;c++)if(!Ys(e[c],t[c]))return!1;return!0}),"isEqual"),hx="$set",gx="$unset",mx="$clearAll";Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var vx=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return s(e,"IdentityStoreImpl"),e.prototype.editIdentity=function(){var e=this,t=Fn({},this.identity.userProperties),n=Fn(Fn({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},updateUserProperties:function(e){for(var t=n.userProperties||{},r=0,i=Object.entries(e);r<i.length;r++){var o=i[r],s=o[0],a=o[1];switch(s){case hx:for(var l=0,u=Object.entries(a);l<u.length;l++){var c=u[l],h=c[0],d=c[1];t[h]=d}break;case gx:for(var p=0,f=Object.keys(a);p<f.length;p++){delete t[h=f[p]]}break;case mx:t={}}}return n.userProperties=t,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return Fn({},this.identity)},e.prototype.setIdentity=function(e){var t=Fn({},this.identity);this.identity=Fn({},e),Ys(t,this.identity)||this.listeners.forEach((function(t){t(e)}))},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),Gi=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,ov=function(){function e(){this.identityStore=new vx,this.eventBridge=new fx,this.applicationContextProvider=new lx}return s(e,"AnalyticsConnector"),e.getInstance=function(t){return Gi.analyticsConnectorInstances||(Gi.analyticsConnectorInstances={}),Gi.analyticsConnectorInstances[t]||(Gi.analyticsConnectorInstances[t]=new e),Gi.analyticsConnectorInstances[t]},e}(),Ui=s((function(){return ov.getInstance("$default_instance")}),"getAnalyticsConnector");v();var hc=function(){function e(){this.name="identity",this.type=rt.BEFORE,this.identityStore=Ui().identityStore}return s(e,"IdentityEventSender"),e.prototype.execute=function(e){return q(this,void 0,void 0,(function(){var t;return G(this,(function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]}))}))},e.prototype.setup=function(e){return Promise.resolve(void 0)},e}();v();var gc=s((function(){var e,t,n,r;if(typeof navigator>"u")return"";var i=navigator.userLanguage;return null!==(r=null!==(n=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==n?n:i)&&void 0!==r?r:""}),"getLanguage");v();var Ws=s((function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,s=r.resolve,a=e&&e[i];if("function"==typeof a){var l=a.apply(e,o);"function"==typeof s&&s(null==l?void 0:l.promise)}}return e}),"convertProxyObjectToRealObject"),$s=s((function(e){return e&&void 0!==e._q}),"isInstanceProxy");v();var uv=Rt(Us());v();var sv="1.6.8",yx="Web",bx="$remote",lv=function(){function e(){var e;this.name="context",this.type=rt.BEFORE,this.eventId=0,this.library="amplitude-ts/".concat(sv),typeof navigator<"u"&&(e=navigator.userAgent),this.uaResult=new uv.default(e).getResult()}return s(e,"Context"),e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){return q(this,void 0,void 0,(function(){var t,n,r,i,o;return G(this,(function(s){return this.isSessionValid()||(this.config.sessionId=Date.now()),this.config.lastEventTime=Date.now(),t=(new Date).getTime(),n=this.uaResult.browser.name,r=this.uaResult.browser.version,i=this.uaResult.device.model||this.uaResult.os.name,o=this.uaResult.device.vendor,[2,B(B(B(B(B(B(B(B(B(B(B(B({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:t},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:yx}),this.config.trackingOptions.osName&&{os_name:n}),this.config.trackingOptions.osVersion&&{os_version:r}),this.config.trackingOptions.deviceManufacturer&&{device_manufacturer:o}),this.config.trackingOptions.deviceModel&&{device_model:i}),this.config.trackingOptions.language&&{language:gc()}),this.config.trackingOptions.ipAddress&&{ip:bx}),{insert_id:Nn(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:this.eventId++,library:this.library})]}))}))},e.prototype.isSessionValid=function(){var e=this.config.lastEventTime||Date.now();return Date.now()-e<this.config.sessionTimeout},e}();v(),v();var Yi=function(){function e(){}return s(e,"LocalStorage"),e.prototype.isEnabled=function(){return q(this,void 0,void 0,(function(){var t,n,r;return G(this,(function(i){switch(i.label){case 0:if(!Xe())return[2,!1];t=String(Date.now()),n=new e,r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return q(this,void 0,void 0,(function(){var t;return G(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(t=n.sent())?[2,JSON.parse(t)]:[2,void 0];case 2:return n.sent(),[2,void 0];case 3:return[2]}}))}))},e.prototype.getRaw=function(e){var t;return q(this,void 0,void 0,(function(){return G(this,(function(n){return[2,(null===(t=Xe())||void 0===t?void 0:t.localStorage.getItem(e))||void 0]}))}))},e.prototype.set=function(e,t){var n;return q(this,void 0,void 0,(function(){return G(this,(function(r){try{null===(n=Xe())||void 0===n||n.localStorage.setItem(e,JSON.stringify(t))}catch{}return[2]}))}))},e.prototype.remove=function(e){var t;return q(this,void 0,void 0,(function(){return G(this,(function(n){try{null===(t=Xe())||void 0===t||t.localStorage.removeItem(e)}catch{}return[2]}))}))},e.prototype.reset=function(){var e;return q(this,void 0,void 0,(function(){return G(this,(function(t){try{null===(e=Xe())||void 0===e||e.localStorage.clear()}catch{}return[2]}))}))},e}();v();var cv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return qt(t,e),s(t,"XHRTransport"),t.prototype.send=function(e,t){return q(this,void 0,void 0,(function(){var n=this;return G(this,(function(r){return[2,new Promise((function(r,i){typeof XMLHttpRequest>"u"&&i(new Error("XHRTransport is not supported."));var o=new XMLHttpRequest;o.open("POST",e,!0),o.onreadystatechange=function(){if(o.readyState===n.state.done)try{var e=o.responseText,t=JSON.parse(e),s=n.buildResponse(t);r(s)}catch(e){i(e)}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(t))}))]}))}))},t}(rr);v();var dv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return qt(t,e),s(t,"SendBeaconTransport"),t.prototype.send=function(e,t){return q(this,void 0,void 0,(function(){var n=this;return G(this,(function(r){return[2,new Promise((function(r,i){var o=Xe();if(null==o||!o.navigator.sendBeacon)throw new Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(t);return r(o.navigator.sendBeacon(e,JSON.stringify(t))?n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}):n.buildResponse({code:500}))}catch(e){i(e)}}))]}))}))},t}(rr),Hs=s((function(){var e=new Vi;return{cookieExpiration:365,cookieSameSite:"Lax",cookieSecure:!1,cookieStorage:e,disableCookies:!1,domain:"",sessionManager:new qs(e,""),sessionTimeout:18e5,storageProvider:new Vi,trackingOptions:{deviceManufacturer:!0,deviceModel:!0,ipAddress:!0,language:!0,osName:!0,osVersion:!0,platform:!0},transportProvider:new fc}}),"getDefaultConfig"),pv=function(e){function t(t,n,r){var i,o,s,a,l,u,c,h,d,p,f,v,g=this,m=Hs();return(g=e.call(this,B(B({flushIntervalMillis:1e3,flushMaxRetries:5,flushQueueSize:30},r),{apiKey:t,storageProvider:null!==(i=null==r?void 0:r.storageProvider)&&void 0!==i?i:m.storageProvider,transportProvider:null!==(o=null==r?void 0:r.transportProvider)&&void 0!==o?o:m.transportProvider}))||this).cookieStorage=null!==(s=null==r?void 0:r.cookieStorage)&&void 0!==s?s:m.cookieStorage,g.sessionManager=null!==(a=null==r?void 0:r.sessionManager)&&void 0!==a?a:m.sessionManager,g.sessionTimeout=null!==(l=null==r?void 0:r.sessionTimeout)&&void 0!==l?l:m.sessionTimeout,g.appVersion=null==r?void 0:r.appVersion,g.attribution=null==r?void 0:r.attribution,g.cookieExpiration=null!==(u=null==r?void 0:r.cookieExpiration)&&void 0!==u?u:m.cookieExpiration,g.cookieSameSite=null!==(c=null==r?void 0:r.cookieSameSite)&&void 0!==c?c:m.cookieSameSite,g.cookieSecure=null!==(h=null==r?void 0:r.cookieSecure)&&void 0!==h?h:m.cookieSecure,g.deviceId=null==r?void 0:r.deviceId,g.disableCookies=null!==(d=null==r?void 0:r.disableCookies)&&void 0!==d?d:m.disableCookies,g.domain=null!==(p=null==r?void 0:r.domain)&&void 0!==p?p:m.domain,g.lastEventTime=null!==(f=g.lastEventTime)&&void 0!==f?f:null==r?void 0:r.lastEventTime,g.optOut=!(null==r||!r.optOut),g.partnerId=null==r?void 0:r.partnerId,g.sessionId=null==r?void 0:r.sessionId,g.trackingOptions=null!==(v=null==r?void 0:r.trackingOptions)&&void 0!==v?v:m.trackingOptions,g.userId=n,g}return qt(t,e),s(t,"BrowserConfig"),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this.sessionManager.getDeviceId()},set:function(e){this.sessionManager.setDeviceId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this.sessionManager.getUserId()},set:function(e){this.sessionManager.setUserId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this.sessionManager.getSessionId()},set:function(e){this.sessionManager.setSessionId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this.sessionManager.getOptOut()},set:function(e){var t;null===(t=this.sessionManager)||void 0===t||t.setOptOut(!!e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this.sessionManager.getLastEventTime()},set:function(e){this.sessionManager.setLastEventTime(e)},enumerable:!1,configurable:!0}),t}(Ql),fv=s((function(e,t,n){return q(void 0,void 0,void 0,(function(){var r,i,o,s,a,l,u,c,h,d,p,f,v,g,m,y,b;return G(this,(function(w){switch(w.label){case 0:return r=Hs(),null!==(v=null==n?void 0:n.domain)&&void 0!==v?(o=v,[3,3]):[3,1];case 1:return[4,Mx()];case 2:o=w.sent(),w.label=3;case 3:return i=o,[4,wx(B(B({},n),{domain:i}))];case 4:return s=w.sent(),a=ir(e),[4,s.get(a)];case 5:return l=w.sent(),u=Ar(),[4,new qs(s,e).load()];case 6:return c=w.sent(),h=pv.bind,d=[void 0,e,null!=t?t:null==l?void 0:l.userId],p=[B({},n)],f={cookieStorage:s,sessionManager:c,deviceId:_x(null==l?void 0:l.deviceId,null==n?void 0:n.deviceId,u.deviceId),domain:i,optOut:null!==(g=null==n?void 0:n.optOut)&&void 0!==g?g:!(null==l||!l.optOut)},[4,s.get(a)];case 7:return f.sessionId=null!==(y=null===(m=w.sent())||void 0===m?void 0:m.sessionId)&&void 0!==y?y:null==n?void 0:n.sessionId,[4,kx(n)];case 8:return[2,new(h.apply(pv,d.concat([B.apply(void 0,p.concat([(f.storageProvider=w.sent(),f.trackingOptions=B(B({},r.trackingOptions),null==n?void 0:n.trackingOptions),f.transportProvider=null!==(b=null==n?void 0:n.transportProvider)&&void 0!==b?b:vc(null==n?void 0:n.transport),f)]))])))]}}))}))}),"useBrowserConfig"),wx=s((function(e,t){return void 0===t&&(t=Hs()),q(void 0,void 0,void 0,(function(){var n,r,i;return G(this,(function(o){switch(o.label){case 0:return n=B(B({},t),e),r=null==e?void 0:e.cookieStorage,(i=!r)?[3,2]:[4,r.isEnabled()];case 1:i=!o.sent(),o.label=2;case 2:return i?[2,mc(n)]:[2,r]}}))}))}),"createCookieStorage"),mc=s((function(e){return q(void 0,void 0,void 0,(function(){var t,n;return G(this,(function(r){switch(r.label){case 0:return t=new ar({domain:e.domain,expirationDays:e.cookieExpiration,sameSite:e.cookieSameSite,secure:e.cookieSecure}),(n=e.disableCookies)?[3,2]:[4,t.isEnabled()];case 1:n=!r.sent(),r.label=2;case 2:return n?[4,(t=new Yi).isEnabled()]:[3,4];case 3:r.sent()||(t=new Vi),r.label=4;case 4:return[2,t]}}))}))}),"createFlexibleStorage"),kx=s((function(e){return q(void 0,void 0,void 0,(function(){var t,n,r,i,o,s,a;return G(this,(function(l){switch(l.label){case 0:if(e&&Object.prototype.hasOwnProperty.call(e,"storageProvider")&&!e.storageProvider)return[3,9];l.label=1;case 1:l.trys.push([1,7,8,9]),t=mt([null==e?void 0:e.storageProvider,new Yi]),n=t.next(),l.label=2;case 2:return n.done?[3,6]:(r=n.value,(i=r)?[4,r.isEnabled()]:[3,4]);case 3:i=l.sent(),l.label=4;case 4:if(i)return[2,r];l.label=5;case 5:return n=t.next(),[3,2];case 6:return[3,9];case 7:return o=l.sent(),s={error:o},[3,9];case 8:try{n&&!n.done&&(a=t.return)&&a.call(t)}finally{if(s)throw s.error}return[7];case 9:return[2,void 0]}}))}))}),"createEventsStorage"),_x=s((function(e,t,n){return t||n||e||Nn()}),"createDeviceId"),vc=s((function(e){return e===Or.XHR?new cv:e===Or.SendBeacon?new dv:Hs().transportProvider}),"createTransport"),Mx=s((function(e){return q(void 0,void 0,void 0,(function(){var t,n,r,i,o,s,a;return G(this,(function(l){switch(l.label){case 0:return[4,(new ar).isEnabled()];case 1:if(!l.sent()||!e&&typeof location>"u")return[2,""];for(t=null!=e?e:location.hostname,n=t.split("."),r=[],i="AMP_TLDTEST",o=n.length-2;o>=0;--o)r.push(n.slice(o).join("."));o=0,l.label=2;case 2:return o<r.length?(s=r[o],[4,(a=new ar({domain:"."+s})).set(i,1)]):[3,7];case 3:return l.sent(),[4,a.get(i)];case 4:return l.sent()?[4,a.remove(i)]:[3,6];case 5:return l.sent(),[2,"."+s];case 6:return o++,[3,2];case 7:return[2,""]}}))}))}),"getTopLevelDomain");v();var gv=s((function(e,t){return q(void 0,void 0,void 0,(function(){var n,r,i,o,s,a,l,u,c;return G(this,(function(h){switch(h.label){case 0:return[4,(n=new ar).isEnabled()];case 1:return(!h.sent()||null!=t&&t.disableCookies)&&(n=new Yi),[4,n.isEnabled()];case 2:return h.sent()?(r=dc(e),[4,n.getRaw(r)]):[2,{optOut:!1}];case 3:return(i=h.sent())?[4,n.remove(r)]:[2,{optOut:!1}];case 4:return h.sent(),o=je(i.split("."),5),s=o[0],a=o[1],l=o[2],u=o[3],c=o[4],[2,{deviceId:s,userId:xx(a),sessionId:hv(u),lastEventTime:hv(c),optOut:!!l}]}}))}))}),"parseOldCookies"),hv=s((function(e){var t=parseInt(e,32);if(!isNaN(t))return t}),"parseTime"),xx=s((function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch{return}}),"decode"),Ex=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return qt(t,e),s(t,"AmplitudeBrowser"),t.prototype.init=function(t,n,r){var i,o,s;return void 0===t&&(t=""),q(this,void 0,void 0,(function(){var a,l,u,c,h=this;return G(this,(function(d){switch(d.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,gv(t,r)]);case 1:return a=d.sent(),[4,fv(t,n||a.userId,B(B({},r),{deviceId:null!==(i=a.deviceId)&&void 0!==i?i:null==r?void 0:r.deviceId,sessionId:null!==(o=a.sessionId)&&void 0!==o?o:null==r?void 0:r.sessionId,optOut:null!==(s=null==r?void 0:r.optOut)&&void 0!==s?s:a.optOut,lastEventTime:a.lastEventTime}))];case 2:return l=d.sent(),[4,e.prototype._init.call(this,l)];case 3:return d.sent(),u=!this.config.lastEventTime,(!this.config.sessionId||this.config.lastEventTime&&Date.now()-this.config.lastEventTime>this.config.sessionTimeout)&&(this.setSessionId(Date.now()),u=!0),(c=Ui()).eventBridge.setEventReceiver((function(e){h.track(e.eventType,e.eventProperties)})),c.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),[4,this.add(new lv)];case 4:return d.sent(),[4,this.add(new hc)];case 5:return d.sent(),[4,this.add(new tc)];case 6:return d.sent(),this.initializing=!1,[4,this.runAttributionStrategy(l.attribution,u)];case 7:return d.sent(),[4,this.runQueuedFunctions("dispatchQ")];case 8:return d.sent(),[2]}}))}))},t.prototype.runAttributionStrategy=function(e,t){return void 0===t&&(t=!1),q(this,void 0,void 0,(function(){var n,r,i;return G(this,(function(o){switch(o.label){case 0:return n=this.track.bind(this),r=this.setSessionId.bind(this,Date.now()),[4,mc(this.config)];case 1:return i=o.sent(),[4,new pc(this.config.apiKey,B(B({},e),{storage:i,track:n,onNewCampaign:r})).send(t)];case 2:return o.sent(),[2]}}))}))},t.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},t.prototype.setUserId=function(e){this.config?this.config.userId=e:this.q.push(this.setUserId.bind(this,e))},t.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},t.prototype.setDeviceId=function(e){this.config?this.config.deviceId=e:this.q.push(this.setDeviceId.bind(this,e))},t.prototype.reset=function(){this.setUserId(void 0),this.setDeviceId(Nn())},t.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},t.prototype.setSessionId=function(e){this.config?(this.config.sessionId=e,this.config.lastEventTime=void 0):this.q.push(this.setSessionId.bind(this,e))},t.prototype.setTransport=function(e){this.config?this.config.transportProvider=vc(e):this.q.push(this.setTransport.bind(this,e))},t.prototype.identify=function(t,n){if($s(t)){var r=t._q;t._q=[],t=Ws(new It,r)}return null!=n&&n.user_id&&this.setUserId(n.user_id),null!=n&&n.device_id&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},t.prototype.groupIdentify=function(t,n,r,i){if($s(r)){var o=r._q;r._q=[],r=Ws(new It,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if($s(t)){var r=t._q;t._q=[],t=Ws(new Rs,r)}return e.prototype.revenue.call(this,t,n)},t}(Zl),Xs=s((function(){var e=new Ex;return{init:Oe(vt(e.init.bind(e)),"init",Pe(e),Ie(e,["config"])),add:Oe(vt(e.add.bind(e)),"add",Pe(e),Ie(e,["config.apiKey","timeline.plugins"])),remove:Oe(vt(e.remove.bind(e)),"remove",Pe(e),Ie(e,["config.apiKey","timeline.plugins"])),track:Oe(vt(e.track.bind(e)),"track",Pe(e),Ie(e,["config.apiKey","timeline.queue.length"])),logEvent:Oe(vt(e.logEvent.bind(e)),"logEvent",Pe(e),Ie(e,["config.apiKey","timeline.queue.length"])),identify:Oe(vt(e.identify.bind(e)),"identify",Pe(e),Ie(e,["config.apiKey","timeline.queue.length"])),groupIdentify:Oe(vt(e.groupIdentify.bind(e)),"groupIdentify",Pe(e),Ie(e,["config.apiKey","timeline.queue.length"])),setGroup:Oe(vt(e.setGroup.bind(e)),"setGroup",Pe(e),Ie(e,["config.apiKey","timeline.queue.length"])),revenue:Oe(vt(e.revenue.bind(e)),"revenue",Pe(e),Ie(e,["config.apiKey","timeline.queue.length"])),flush:Oe(vt(e.flush.bind(e)),"flush",Pe(e),Ie(e,["config.apiKey","timeline.queue.length"])),getUserId:Oe(e.getUserId.bind(e),"getUserId",Pe(e),Ie(e,["config","config.userId"])),setUserId:Oe(e.setUserId.bind(e),"setUserId",Pe(e),Ie(e,["config","config.userId"])),getDeviceId:Oe(e.getDeviceId.bind(e),"getDeviceId",Pe(e),Ie(e,["config","config.deviceId"])),setDeviceId:Oe(e.setDeviceId.bind(e),"setDeviceId",Pe(e),Ie(e,["config","config.deviceId"])),reset:Oe(e.reset.bind(e),"reset",Pe(e),Ie(e,["config","config.userId","config.deviceId"])),getSessionId:Oe(e.getSessionId.bind(e),"getSessionId",Pe(e),Ie(e,["config"])),setSessionId:Oe(e.setSessionId.bind(e),"setSessionId",Pe(e),Ie(e,["config"])),setOptOut:Oe(e.setOptOut.bind(e),"setOptOut",Pe(e),Ie(e,["config"])),setTransport:Oe(e.setTransport.bind(e),"setTransport",Pe(e),Ie(e,["config"]))}}),"createInstance"),Ce=Xs(),w2=Ce.add,k2=Ce.flush,_2=Ce.getDeviceId,M2=Ce.getSessionId,x2=Ce.getUserId,E2=Ce.groupIdentify,T2=Ce.identify,P2=Ce.init,I2=Ce.logEvent,O2=Ce.remove,A2=Ce.reset,S2=Ce.revenue,C2=Ce.setDeviceId,L2=Ce.setGroup,j2=Ce.setOptOut,N2=Ce.setSessionId,F2=Ce.setTransport,D2=Ce.setUserId,R2=Ce.track,Od={production:"40ead723d18886045e302513245edb27",development:""},Sr={plan:{version:"22",branch:"main",source:"websdk",versionId:"197467d1-8926-452d-a088-b3817cbac89f"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"}},Ad=class{constructor(e){this.event_properties=e,m(this,"event_type","Analytics:categorySelected-call"),this.event_properties=e}};s(Ad,"AnalyticsCategorySelectedCall");var Wi=Ad,Sd=class{constructor(e){this.event_properties=e,m(this,"event_type","Analytics:locationSelected-call"),this.event_properties=e}};s(Sd,"AnalyticsLocationSelectedCall");var $i=Sd,Cd=class{constructor(e){this.event_properties=e,m(this,"event_type","BlueDot:disable-call"),this.event_properties=e}};s(Cd,"BlueDotDisableCall");var yc=Cd,Ld=class{constructor(e){this.event_properties=e,m(this,"event_type","BlueDot:enable-call"),this.event_properties=e}};s(Ld,"BlueDotEnableCall");var bc=Ld,jd=class{constructor(e){this.event_properties=e,m(this,"event_type","BlueDot:off-call"),this.event_properties=e}};s(jd,"BlueDotOffCall");var wc=jd,Nd=class{constructor(e){this.event_properties=e,m(this,"event_type","BlueDot:on-call"),this.event_properties=e}};s(Nd,"BlueDotOnCall");var kc=Nd,Fd=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:animate-call"),this.event_properties=e}};s(Fd,"CameraAnimateCall");var _c=Fd,Dd=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:cancelAnimation-call"),this.event_properties=e}};s(Dd,"CameraCancelAnimationCall");var Mc=Dd,Rd=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:focusOn-call"),this.event_properties=e}};s(Rd,"CameraFocusOnCall");var xc=Rd,zd=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:getSafeAreaInsets-call"),this.event_properties=e}};s(zd,"CameraGetSafeAreaInsetsCall");var Ec=zd,Bd=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:interaction.disable-call"),this.event_properties=e}};s(Bd,"CameraInteractionDisableCall");var Tc=Bd,Vd=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:interaction.enable-call"),this.event_properties=e}};s(Vd,"CameraInteractionEnableCall");var Pc=Vd,qd=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:set-call"),this.event_properties=e}};s(qd,"CameraSetCall");var Ic=qd,Gd=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:setSafeAreaInsets-call"),this.event_properties=e}};s(Gd,"CameraSetSafeAreaInsetsCall");var Oc=Gd,Ud=class{constructor(e){this.event_properties=e,m(this,"event_type","Camera:translate-call"),this.event_properties=e}};s(Ud,"CameraTranslateCall");var Ac=Ud,Yd=class{constructor(e){this.event_properties=e,m(this,"event_type","FlatLabels:add-call"),this.event_properties=e}};s(Yd,"FlatLabelsAddCall");var Sc=Yd,Wd=class{constructor(e){this.event_properties=e,m(this,"event_type","FlatLabels:labelAllLocations-call"),this.event_properties=e}};s(Wd,"FlatLabelsLabelAllLocationsCall");var Cc=Wd,$d=class{constructor(e){this.event_properties=e,m(this,"event_type","FlatLabels:remove-call"),this.event_properties=e}};s($d,"FlatLabelsRemoveCall");var Lc=$d,Hd=class{constructor(e){this.event_properties=e,m(this,"event_type","FlatLabels:removeAll-call"),this.event_properties=e}};s(Hd,"FlatLabelsRemoveAllCall");var jc=Hd,Xd=class{constructor(e){this.event_properties=e,m(this,"event_type","FlatLabels:setAppearance-call"),this.event_properties=e}};s(Xd,"FlatLabelsSetAppearanceCall");var Nc=Xd,Kd=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:add-call"),this.event_properties=e}};s(Kd,"FloatingLabelsAddCall");var Fc=Kd,Jd=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:labelAllLocations-call"),this.event_properties=e}};s(Jd,"FloatingLabelsLabelAllLocationsCall");var Dc=Jd,Zd=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:remove-call"),this.event_properties=e}};s(Zd,"FloatingLabelsRemoveCall");var Rc=Zd,Qd=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:removeAll-call"),this.event_properties=e}};s(Qd,"FloatingLabelsRemoveAllCall");var zc=Qd,ep=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:resetPriority-call"),this.event_properties=e}};s(ep,"FloatingLabelsResetPriorityCall");var Bc=ep,tp=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:setAppearance-call"),this.event_properties=e}};s(tp,"FloatingLabelsSetAppearanceCall");var Vc=tp,np=class{constructor(e){this.event_properties=e,m(this,"event_type","FloatingLabels:setPriority-call"),this.event_properties=e}};s(np,"FloatingLabelsSetPriorityCall");var qc=np,rp=class{constructor(e){this.event_properties=e,m(this,"event_type","global:getVenue-call"),this.event_properties=e}};s(rp,"GlobalGetVenueCall");var Hi=rp,ip=class{constructor(e){this.event_properties=e,m(this,"event_type","global:getVenueMVF-call"),this.event_properties=e}};s(ip,"GlobalGetVenueMvfCall");var Xi=ip,ap=class{constructor(e){this.event_properties=e,m(this,"event_type","global:showVenue-call"),this.event_properties=e}};s(ap,"GlobalShowVenueCall");var Gc=ap,op=class{constructor(e){this.event_properties=e,m(this,"event_type","Journey:clear-call"),this.event_properties=e}};s(op,"JourneyClearCall");var Uc=op,sp=class{constructor(e){this.event_properties=e,m(this,"event_type","Journey:draw-call"),this.event_properties=e}};s(sp,"JourneyDrawCall");var Yc=sp,up=class{constructor(e){this.event_properties=e,m(this,"event_type","Journey:setStep-call"),this.event_properties=e}};s(up,"JourneySetStepCall");var Wc=up,lp=class{constructor(e){this.event_properties=e,m(this,"event_type","Mappedin:getCollectionItemById-call"),this.event_properties=e}};s(lp,"MappedinGetCollectionItemByIdCall");var $c=lp,cp=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinCoordinate:absoluteDistanceTo-call"),this.event_properties=e}};s(cp,"MappedinCoordinateAbsoluteDistanceToCall");var Hc=cp,dp=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinCoordinate:nearestNode-call"),this.event_properties=e}};s(dp,"MappedinCoordinateNearestNodeCall");var Xc=dp,pp=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinLocation:clone-call"),this.event_properties=e}};s(pp,"MappedinLocationCloneCall");var Ki=pp,fp=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinLocation:directionsTo-call"),this.event_properties=e}};s(fp,"MappedinLocationDirectionsToCall");var Ji=fp,hp=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinLocation:distanceTo-call"),this.event_properties=e}};s(hp,"MappedinLocationDistanceToCall");var Zi=hp,gp=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinMap:createCoordinate-call"),this.event_properties=e}};s(gp,"MappedinMapCreateCoordinateCall");var Kc=gp,mp=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinMap:createCoordinateByXY-call"),this.event_properties=e}};s(mp,"MappedinMapCreateCoordinateByXyCall");var Jc=mp,vp=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinMap:getNorth-call"),this.event_properties=e}};s(vp,"MappedinMapGetNorthCall");var Zc=vp,yp=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinNode:directionsTo-call"),this.event_properties=e}};s(yp,"MappedinNodeDirectionsToCall");var Qi=yp,bp=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinNode:distanceTo-call"),this.event_properties=e}};s(bp,"MappedinNodeDistanceToCall");var ea=bp,wp=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinPolygon:directionsTo-call"),this.event_properties=e}};s(wp,"MappedinPolygonDirectionsToCall");var ta=wp,kp=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinPolygon:distanceTo-call"),this.event_properties=e}};s(kp,"MappedinPolygonDistanceToCall");var na=kp,_p=class{constructor(e){this.event_properties=e,m(this,"event_type","MappedinVenue:metadata-read"),this.event_properties=e}};s(_p,"MappedinVenueMetadataRead");var ra=_p,Mp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:addInteractivePolygon-call"),this.event_properties=e}};s(Mp,"MapViewAddInteractivePolygonCall");var Qc=Mp,xp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:addInteractivePolygonsForAllLocations-call"),this.event_properties=e}};s(xp,"MapViewAddInteractivePolygonsForAllLocationsCall");var ed=xp,Ep=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:clearPolygonColor-call"),this.event_properties=e}};s(Ep,"MapViewClearPolygonColorCall");var td=Ep,Tp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:createCustomTooltip-call"),this.event_properties=e}};s(Tp,"MapViewCreateCustomTooltipCall");var nd=Tp,Pp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:createMarker-call"),this.event_properties=e}};s(Pp,"MapViewCreateMarkerCall");var rd=Pp,Ip=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:createTooltip-call"),this.event_properties=e}};s(Ip,"MapViewCreateTooltipCall");var id=Ip,Op=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:destroy-call"),this.event_properties=e}};s(Op,"MapViewDestroyCall");var ad=Op,Ap=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:disableImageFlippingForAllPolygons-call"),this.event_properties=e}};s(Ap,"MapViewDisableImageFlippingForAllPolygonsCall");var od=Ap,Sp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:drawPath-call"),this.event_properties=e}};s(Sp,"MapViewDrawPathCall");var sd=Sp,Cp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:enableImageFlippingForAllLocations-call"),this.event_properties=e}};s(Cp,"MapViewEnableImageFlippingForAllLocationsCall");var ud=Cp,Lp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:enableImageFlippingForPolygon-call"),this.event_properties=e}};s(Lp,"MapViewEnableImageFlippingForPolygonCall");var ld=Lp,jp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:getNearestNodeByScreenCoordinates-call"),this.event_properties=e}};s(jp,"MapViewGetNearestNodeByScreenCoordinatesCall");var cd=jp,Np=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:getPolygonAtCoordinate-call"),this.event_properties=e}};s(Np,"MapViewGetPolygonAtCoordinateCall");var dd=Np,Fp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:getPrimaryLocationForPolygon-call"),this.event_properties=e}};s(Fp,"MapViewGetPrimaryLocationForPolygonCall");var pd=Fp,Dp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:labelAllLocations-call"),this.event_properties=e}};s(Dp,"MapViewLabelAllLocationsCall");var fd=Dp,Rp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeAllInteractivePolygons-call"),this.event_properties=e}};s(Rp,"MapViewRemoveAllInteractivePolygonsCall");var hd=Rp,zp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeAllMarkers-call"),this.event_properties=e}};s(zp,"MapViewRemoveAllMarkersCall");var gd=zp,Bp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeAllPaths-call"),this.event_properties=e}};s(Bp,"MapViewRemoveAllPathsCall");var md=Bp,Vp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeAllTooltips-call"),this.event_properties=e}};s(Vp,"MapViewRemoveAllTooltipsCall");var vd=Vp,qp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeInteractivePolygon-call"),this.event_properties=e}};s(qp,"MapViewRemoveInteractivePolygonCall");var yd=qp,Gp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeMarker-call"),this.event_properties=e}};s(Gp,"MapViewRemoveMarkerCall");var bd=Gp,Up=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removePath-call"),this.event_properties=e}};s(Up,"MapViewRemovePathCall");var wd=Up,Yp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:removeTooltip-call"),this.event_properties=e}};s(Yp,"MapViewRemoveTooltipCall");var kd=Yp,Wp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:setBackgroundColor-call"),this.event_properties=e}};s(Wp,"MapViewSetBackgroundColorCall");var _d=Wp,$p=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:setHoverColor-call"),this.event_properties=e}};s($p,"MapViewSetHoverColorCall");var Md=$p,Hp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:setMap-call"),this.event_properties=e}};s(Hp,"MapViewSetMapCall");var xd=Hp,Xp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:setPolygonColor-call"),this.event_properties=e}};s(Xp,"MapViewSetPolygonColorCall");var Ed=Xp,Kp=class{constructor(e){this.event_properties=e,m(this,"event_type","MapView:setState-call"),this.event_properties=e}};s(Kp,"MapViewSetStateCall");var Td=Kp,Jp=class{constructor(e){this.event_properties=e,m(this,"event_type","metrics:mapLoad-event"),this.event_properties=e}};s(Jp,"MetricsMapLoadEvent");var Pd=Jp,Zp=class{constructor(e){this.event_properties=e,m(this,"event_type","OfflineSearch:addQuery-call"),this.event_properties=e}};s(Zp,"OfflineSearchAddQueryCall");var ia=Zp,Qp=class{constructor(e){this.event_properties=e,m(this,"event_type","OfflineSearch:constructor-call"),this.event_properties=e}};s(Qp,"OfflineSearchConstructorCall");var aa=Qp,ef=class{constructor(e){this.event_properties=e,m(this,"event_type","OfflineSearch:search-call"),this.event_properties=e}};s(ef,"OfflineSearchSearchCall");var oa=ef,tf=class{constructor(e){this.event_properties=e,m(this,"event_type","OfflineSearch:suggest-call"),this.event_properties=e}};s(tf,"OfflineSearchSuggestCall");var sa=tf,Ks=s((()=>({promise:Promise.resolve()})),"getVoidPromiseResult"),nf=class{constructor(){m(this,"disabled",!1),m(this,"amplitude")}get client(){return this.isInitializedAndEnabled(),this.amplitude}get isLoaded(){return null!=this.amplitude}isInitializedAndEnabled(){return this.amplitude?!this.disabled:(console.error("ERROR: Ampli is not yet initialized. Have you called ampli.load() on app start?"),!1)}load(e){var t,n;if(this.disabled=null!=(t=e.disabled)&&t,this.amplitude)return console.warn("WARNING: Ampli is already intialized. Ampli.load() should be called once at application startup."),Ks();let r=null;if(e.client&&"apiKey"in e.client?r=e.client.apiKey:"environment"in e&&(r=Od[e.environment]),e.client&&"instance"in e.client)this.amplitude=e.client.instance;else{if(r)return this.amplitude=Xs(),this.amplitude.init(r,void 0,{...Sr,...null!=(null==e?void 0:e.client)&&"configuration"in e.client?null==(n=e.client)?void 0:n.configuration:{}});console.error("ERROR: ampli.load() requires 'environment', 'client.apiKey', or 'client.instance'")}return Ks()}identify(e,t,n){if(!this.isInitializedAndEnabled())return Ks();e&&(n={...n,user_id:e});let r=new It,i=t;if(null!=i)for(let[e,t]of Object.entries(i))r.set(e,t);return this.amplitude.identify(r,n)}track(e,t){return this.isInitializedAndEnabled()?this.amplitude.track(e,void 0,t):Ks()}analyticsCategorySelectedCall(e,t){return this.track(new Wi(e),t)}analyticsLocationSelectedCall(e,t){return this.track(new $i(e),t)}blueDotDisableCall(e,t){return this.track(new yc(e),t)}blueDotEnableCall(e,t){return this.track(new bc(e),t)}blueDotOffCall(e,t){return this.track(new wc(e),t)}blueDotOnCall(e,t){return this.track(new kc(e),t)}cameraAnimateCall(e,t){return this.track(new _c(e),t)}cameraCancelAnimationCall(e,t){return this.track(new Mc(e),t)}cameraFocusOnCall(e,t){return this.track(new xc(e),t)}cameraGetSafeAreaInsetsCall(e,t){return this.track(new Ec(e),t)}cameraInteractionDisableCall(e,t){return this.track(new Tc(e),t)}cameraInteractionEnableCall(e,t){return this.track(new Pc(e),t)}cameraSetCall(e,t){return this.track(new Ic(e),t)}cameraSetSafeAreaInsetsCall(e,t){return this.track(new Oc(e),t)}cameraTranslateCall(e,t){return this.track(new Ac(e),t)}flatLabelsAddCall(e,t){return this.track(new Sc(e),t)}flatLabelsLabelAllLocationsCall(e,t){return this.track(new Cc(e),t)}flatLabelsRemoveCall(e,t){return this.track(new Lc(e),t)}flatLabelsRemoveAllCall(e,t){return this.track(new jc(e),t)}flatLabelsSetAppearanceCall(e,t){return this.track(new Nc(e),t)}floatingLabelsAddCall(e,t){return this.track(new Fc(e),t)}floatingLabelsLabelAllLocationsCall(e,t){return this.track(new Dc(e),t)}floatingLabelsRemoveCall(e,t){return this.track(new Rc(e),t)}floatingLabelsRemoveAllCall(e,t){return this.track(new zc(e),t)}floatingLabelsResetPriorityCall(e,t){return this.track(new Bc(e),t)}floatingLabelsSetAppearanceCall(e,t){return this.track(new Vc(e),t)}floatingLabelsSetPriorityCall(e,t){return this.track(new qc(e),t)}globalGetVenueCall(e,t){return this.track(new Hi(e),t)}globalGetVenueMvfCall(e,t){return this.track(new Xi(e),t)}globalShowVenueCall(e,t){return this.track(new Gc(e),t)}journeyClearCall(e,t){return this.track(new Uc(e),t)}journeyDrawCall(e,t){return this.track(new Yc(e),t)}journeySetStepCall(e,t){return this.track(new Wc(e),t)}mappedinGetCollectionItemByIdCall(e,t){return this.track(new $c(e),t)}mappedinCoordinateAbsoluteDistanceToCall(e,t){return this.track(new Hc(e),t)}mappedinCoordinateNearestNodeCall(e,t){return this.track(new Xc(e),t)}mappedinLocationCloneCall(e,t){return this.track(new Ki(e),t)}mappedinLocationDirectionsToCall(e,t){return this.track(new Ji(e),t)}mappedinLocationDistanceToCall(e,t){return this.track(new Zi(e),t)}mappedinMapCreateCoordinateCall(e,t){return this.track(new Kc(e),t)}mappedinMapCreateCoordinateByXyCall(e,t){return this.track(new Jc(e),t)}mappedinMapGetNorthCall(e,t){return this.track(new Zc(e),t)}mappedinNodeDirectionsToCall(e,t){return this.track(new Qi(e),t)}mappedinNodeDistanceToCall(e,t){return this.track(new ea(e),t)}mappedinPolygonDirectionsToCall(e,t){return this.track(new ta(e),t)}mappedinPolygonDistanceToCall(e,t){return this.track(new na(e),t)}mappedinVenueMetadataRead(e,t){return this.track(new ra(e),t)}mapViewAddInteractivePolygonCall(e,t){return this.track(new Qc(e),t)}mapViewAddInteractivePolygonsForAllLocationsCall(e,t){return this.track(new ed(e),t)}mapViewClearPolygonColorCall(e,t){return this.track(new td(e),t)}mapViewCreateCustomTooltipCall(e,t){return this.track(new nd(e),t)}mapViewCreateMarkerCall(e,t){return this.track(new rd(e),t)}mapViewCreateTooltipCall(e,t){return this.track(new id(e),t)}mapViewDestroyCall(e,t){return this.track(new ad(e),t)}mapViewDisableImageFlippingForAllPolygonsCall(e,t){return this.track(new od(e),t)}mapViewDrawPathCall(e,t){return this.track(new sd(e),t)}mapViewEnableImageFlippingForAllLocationsCall(e,t){return this.track(new ud(e),t)}mapViewEnableImageFlippingForPolygonCall(e,t){return this.track(new ld(e),t)}mapViewGetNearestNodeByScreenCoordinatesCall(e,t){return this.track(new cd(e),t)}mapViewGetPolygonAtCoordinateCall(e,t){return this.track(new dd(e),t)}mapViewGetPrimaryLocationForPolygonCall(e,t){return this.track(new pd(e),t)}mapViewLabelAllLocationsCall(e,t){return this.track(new fd(e),t)}mapViewRemoveAllInteractivePolygonsCall(e,t){return this.track(new hd(e),t)}mapViewRemoveAllMarkersCall(e,t){return this.track(new gd(e),t)}mapViewRemoveAllPathsCall(e,t){return this.track(new md(e),t)}mapViewRemoveAllTooltipsCall(e,t){return this.track(new vd(e),t)}mapViewRemoveInteractivePolygonCall(e,t){return this.track(new yd(e),t)}mapViewRemoveMarkerCall(e,t){return this.track(new bd(e),t)}mapViewRemovePathCall(e,t){return this.track(new wd(e),t)}mapViewRemoveTooltipCall(e,t){return this.track(new kd(e),t)}mapViewSetBackgroundColorCall(e,t){return this.track(new _d(e),t)}mapViewSetHoverColorCall(e,t){return this.track(new Md(e),t)}mapViewSetMapCall(e,t){return this.track(new xd(e),t)}mapViewSetPolygonColorCall(e,t){return this.track(new Ed(e),t)}mapViewSetStateCall(e,t){return this.track(new Td(e),t)}metricsMapLoadEvent(e,t){return this.track(new Pd(e),t)}offlineSearchAddQueryCall(e,t){return this.track(new ia(e),t)}offlineSearchConstructorCall(e,t){return this.track(new aa(e),t)}offlineSearchSearchCall(e,t){return this.track(new oa(e),t)}offlineSearchSuggestCall(e,t){return this.track(new sa(e),t)}};s(nf,"Ampli");var Id=nf,ua=new Id;v();var fn,fr,Ot,Rr,Ut,mu,Ay,vu,Sy,ba,Pf,wa,If,At,Py=Rt(Kv()),Iy=Rt(Ey()),Oy=Rt(Us()),Ty="5.48.0",K1="https://api2.amplitude.com/2/httpapi",J1="https://api2.amplitude.com/batch",Z1="__unspecified__",Ef={branch:"main",version:"0",source:"websdk"},Ke=class e{constructor(){A(this,mu),A(this,vu),A(this,ba),A(this,wa),A(this,Ot,{}),A(this,Rr,!1),A(this,Ut,void 0),A(this,At,s((async e=>{eP(e.type)&&(window.removeEventListener("visibilitychange",b(this,At)),window.removeEventListener("pagehide",b(this,At)),window.removeEventListener("beforeunload",b(this,At)),window.removeEventListener("unload",b(this,At)),await this.sendAllPendingEvents())}),"#handlePageUnload")),null==b(e,fr)&&L(e,fr,Ty),typeof navigator<"u"&&null!=navigator.userAgent&&L(this,Ut,new Oy.UAParser(navigator.userAgent).getResult())}static setContext(t){L(e,fn,t)}static setVersion(t){L(e,fr,t)}addPendingEvent(t){var n;if(null==b(e,fn))return;let r=t.event_type;if(!me(this,vu,Sy).call(this,t))return;null==t.event_properties&&(t.event_properties={});let i=b(this,Ot)[r];(0,Iy.default)(t.event_properties,null!=(n=null==i?void 0:i.event_properties)?n:{}),b(this,Ot)[r]=t}async sendAllPendingEvents(){if(null==b(e,fn)||Object.keys(b(this,Ot)).length<1)return;if(b(this,Rr))return void D.warn("The current batch of analytics is already sending. Wait until this finishes before trying to send again.");let t=[];for(let e in b(this,Ot)){let n=b(this,Ot)[e],r=me(this,ba,Pf).call(this,n);null!=r&&t.push(r)}if(!(t.length<1))try{L(this,Rr,!0),200===(await me(this,wa,If).call(this,J1,t)).status&&L(this,Ot,{})}catch(e){D.warn("Error sending batch product analytics!",e)}finally{L(this,Rr,!1)}}async load(){if(!ua.isLoaded){let{promise:e}=ua.load({environment:"production",client:{configuration:{trackingOptions:{osName:!0}}}});e.then((()=>{window.addEventListener("pagehide",b(this,At)),window.addEventListener("beforeunload",b(this,At)),window.addEventListener("unload",b(this,At)),window.addEventListener("visibilitychange",b(this,At))}))}}async sendEventNow(t){if(null==b(e,fn))return;let n=me(this,ba,Pf).call(this,t);if(null!=n)try{await me(this,wa,If).call(this,K1,[n])}catch(e){D.warn("Error sending single product analytics event!",e)}}};fn=new WeakMap,fr=new WeakMap,Ot=new WeakMap,Rr=new WeakMap,Ut=new WeakMap,mu=new WeakSet,Ay=s((function(e){let t=e.event_type;return null!=b(this,Ot)[t]}),"#isEventTypePending"),vu=new WeakSet,Sy=s((function(e){if(!me(this,mu,Ay).call(this,e))return!0;let t=e.event_type,n=b(this,Ot)[t];return!(0,Py.default)(n.event_properties,e.event_properties)}),"#didEventPropertiesChange"),ba=new WeakSet,Pf=s((function(e){var t,n,r,i,o,s,a,l,u,c,h,d,p,f,v,g,m;if(null!=b(Ke,fn))return null==(null==(t=e.event_properties)?void 0:t.venue)&&D.warn("Error processing product analytics event! Unspecified venue slug",e),null==Sr.plan&&D.warn("Error processing product analytics event! Unknown coinfiguration plan",e),{event_type:e.event_type,session_id:null!=(n=ua.client.getSessionId())?n:bu(),device_id:null!=(r=ua.client.getDeviceId())?r:yu(),plan:{branch:null!=(o=null==(i=Sr.plan)?void 0:i.branch)?o:Ef.branch,version:null!=(a=null==(s=Sr.plan)?void 0:s.version)?a:Ef.version,source:null!=(u=null==(l=Sr.plan)?void 0:l.source)?u:Ef.source},os_name:null==(c=b(this,Ut))?void 0:c.browser.name,os_version:null==(h=b(this,Ut))?void 0:h.browser.version,device_manufacturer:null==(d=b(this,Ut))?void 0:d.device.vendor,device_model:null==(p=b(this,Ut))?void 0:p.device.model,event_properties:{...e.event_properties,context:b(Ke,fn),sdk_version:b(Ke,fr),browser_name:null==(f=b(this,Ut))?void 0:f.browser.name,browser_version:null==(v=b(this,Ut))?void 0:v.browser.version,venue:null!=(m=null==(g=e.event_properties)?void 0:g.venue)?m:Z1},time:e.time}}),"#makeBatchFormattedEvent"),wa=new WeakSet,If=s((async function(e,t){return await it()(e,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify({api_key:Od.production,events:t})})}),"#batchSend"),At=new WeakMap,s(Ke,"ProductAnalytics"),A(Ke,fn,void 0),A(Ke,fr,void 0);var Tf=Ke,Q1=new Tf,ye=Q1;function eP(e){return"beforeunload"===e||"pagehide"===e||"unload"===e||"hidden"===document.visibilityState}s(eP,"areWeLeavingThePage");var yt,zr,Ve,_a,zn=class e extends Vt{constructor(t,n){super(t),m(this,"__type",e.__type),A(this,yt,void 0),A(this,zr,void 0),A(this,Ve,{}),m(this,"id",""),m(this,"x",0),m(this,"y",0),m(this,"operationHours"),m(this,"externalId"),A(this,_a,void 0),L(this,yt,t),L(this,zr,n);let r=Object.assign({},n);delete r.map,Object.assign(this,r)}static is(t){return t.__type===e.__type}get map(){let e=b(this,Ve).map;if(typeof e<"u")return e;let t=b(this,yt).getCollectionItemById("maps",b(this,zr).map);return b(this,Ve).map=t,t}get lat(){var e;let t=b(this,Ve).cachedLatLon;if(null!=t)return t.lat;let n=null==(e=b(this,yt)._mapsById)?void 0:e[this.map.id];if(null==n)throw new Error("Map not found");return b(this,Ve).cachedLatLon=n.createCoordinateByXY(this.x,this.y),b(this,Ve).cachedLatLon.lat}get lon(){var e;let t=b(this,Ve).cachedLatLon;if(null!=t)return t.lon;let n=null==(e=b(this,yt)._mapsById)?void 0:e[this.map.id];if(null==n)throw new Error("Map not found");return b(this,Ve).cachedLatLon=n.createCoordinateByXY(this.x,this.y),b(this,Ve).cachedLatLon.lon}get paths(){let e=b(this,Ve).paths;if(typeof e<"u")return e;let t=[],n=b(this,yt)._nodesById,r=b(this,_a);if(Array.isArray(r))for(let e=0,i=r.length;e<i;++e){let i=n[r[e].node];null!=i&&t.push(i)}return b(this,Ve).paths=t,t}set paths(e){L(this,_a,e)}get locations(){var e,t,n;let r=b(this,Ve).locations;if(typeof r<"u")return r;let i=[],o=null!=(n=null==(t=null==(e=qe.instances.get(b(this,yt)))?void 0:e.locationsByMapId)?void 0:t.get(this.map.id))?n:[],s=this.id;for(let e=0,t=o.length;e<t;++e){let t=o[e],n=t.nodes;if(Array.isArray(n))for(let e=0,r=n.length;e<r;++e)if(n[e].id===s){i.push(t);break}}return b(this,Ve).locations=i,i}get polygon(){var e,t,n,r;let i=b(this,Ve).polygon;if(typeof i<"u")return i;let o,s=null!=(r=null==(n=null==(e=qe.instances.get(b(this,yt)))?void 0:e.polygonsByMapId)?void 0:n.get(null==(t=null==this?void 0:this.map)?void 0:t.id))?r:[],a=this.id;for(let e=0,t=s.length;e<t;++e){let t=s[e];t.entrances.map((e=>e.id)).includes(a)&&(o=t)}return b(this,Ve).polygon=o,o}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){var n,r;let i=null==(n=t.options.things)?void 0:n.nodes.slice();null!=(r=t.options.things)&&r.maps&&_e(i,"map"),["weight","multiplier","accessible"].forEach((function(e){_e(i,e)}));let o={fields:i,venue:t.options.venue};try{return(await Me(t.options,"node",o)).map((n=>new e(t,n)))}catch(e){return D.error("Fetch Nodes:",e),[]}}directionsTo(e,t){let n=e instanceof gt,r=b(this,yt).venue.slug,i=new Qi({with_destination_set:n||void 0,venue:r});return ye.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=b(this,yt).venue.slug;return ye.addPendingEvent(new ea({venue:n})),super.distanceTo(e,t)}toJSON(){return b(this,zr)}};yt=new WeakMap,zr=new WeakMap,Ve=new WeakMap,_a=new WeakMap,s(zn,"MappedinNode"),m(zn,"__type","MappedinNode");var ka=zn;v();var Yt,Br,bt,xa,Bn=class e extends Vt{constructor(t,n){super(t),m(this,"__type",e.__type),A(this,Yt,void 0),A(this,Br,void 0),A(this,bt,{}),m(this,"geometry"),m(this,"perspectives"),m(this,"image"),m(this,"holes"),m(this,"textures"),m(this,"material"),m(this,"label"),m(this,"id",""),m(this,"layer"),m(this,"layerId"),m(this,"name"),m(this,"externalId"),m(this,"vertexes"),m(this,"center"),m(this,"canvasBounds"),m(this,"categoryRank"),A(this,xa,void 0),m(this,"boundingBox",null),L(this,Yt,t),L(this,Br,n);let r=Object.assign({},n);delete r.map,Object.assign(this,r)}static is(t){return t.__type===e.__type}get map(){let e=b(this,bt).map;if(typeof e<"u")return e;let t=b(this,Yt).getCollectionItemById("maps",b(this,Br).map);return b(this,bt).map=t,t}get locations(){var e,t;let n=b(this,bt).locations;if(typeof n<"u")return n;let r=[],i=null!=(t=null==(e=qe.instances.get(b(this,Yt)))?void 0:e.locationsByMapId.get(this.map.id))?t:[],{id:o}=this;for(let e=0,t=i.length;e<t;++e){let t=i[e],n=t.polygons;if(Array.isArray(n))for(let e=0,i=n.length;e<i;++e)if(n[e].id===o){r.push(t);break}}return b(this,bt).locations=r,r}get entrances(){let e=b(this,bt).entrances;if(typeof e<"u")return e;let t=[],n=b(this,xa),r=b(this,Yt)._nodesById;if(Array.isArray(n)){for(let e=0,i=n.length;e<i;++e){let i=r[n[e].id];null!=i&&t.push(i)}return b(this,bt).entrances=t,t}return[]}set entrances(e){L(this,xa,e)}get rank(){let e=b(this,bt).rank;if(typeof e<"u")return e;let{rankings:t}=b(this,Yt);if(!t||!t.polygons)return null;let n=t.polygons.find((e=>e.polygonId===this.id));return n?(b(this,bt).rank={score:n.score,node:n.entranceNodeId},{score:n.score,node:n.entranceNodeId}):(b(this,bt).rank=null,null)}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async fetch(t){var n,r,i;let o=null==(n=t.options.things)?void 0:n.polygons.slice();null!=(r=t.options.things)&&r.maps&&_e(o,"map"),null!=(i=t.options.things)&&i.nodes&&_e(o,"entrances");let s={fields:o,venue:t.options.venue};try{return(await Me(t.options,"polygon",s)).map((n=>new e(t,n)))}catch(e){return D.error("Fetch Polygons:",e),[]}}directionsTo(e,t){let n=e instanceof gt,r=b(this,Yt).venue.slug,i=new ta({with_destination_set:n||void 0,venue:r});return ye.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=b(this,Yt).venue.slug;return ye.addPendingEvent(new na({venue:n})),super.distanceTo(e,t)}containsCoordinate(e){let t=e;e.map!==this.map&&(t=this.map.createCoordinate(e.lat,e.lon));let{x:n,y:r}=t,{vertexes:i}=this;if(!i)return!1;if(null==this.boundingBox){let e=Math.min(...i.map((e=>e.x))),t=Math.max(...i.map((e=>e.x))),n=Math.min(...i.map((e=>e.y))),r=Math.max(...i.map((e=>e.y)));this.boundingBox={minX:e,minY:n,maxX:t,maxY:r}}if(n<this.boundingBox.minX||n>this.boundingBox.maxX||r<this.boundingBox.minY||r>this.boundingBox.maxY)return!1;let o=!1;for(let e=0,t=i.length-1;e<i.length;t=e++){let s=i[e].x,a=i[e].y,l=i[t].x,u=i[t].y;a>r!=u>r&&n<(l-s)*(r-a)/(u-a)+s&&(o=!o)}return o}toJSON(){return b(this,Br)}};Yt=new WeakMap,Br=new WeakMap,bt=new WeakMap,xa=new WeakMap,s(Bn,"MappedinPolygon"),m(Bn,"__type","MappedinPolygon");var hr=Bn;v();var tP=0,nP="9999-12-31T00:00:00.000Z";function rP(e,t,n=new Date){if(!e.states)return;let r=n||new Date,i=e.states.find((e=>{let t=new Date(e.start||tP),n=new Date(e.end||nP);return t<r&&n>r}));return i?t.find((e=>e.value===i.type)):void 0}s(rP,"getCurrentLocationState");var Ne,Ye,Je,Ea,Ta,Pa,Cy=["name","description","shortName","tags"],wt=class e extends Vt{constructor(t,n){super(t),m(this,"__type",e.__type),A(this,Ne,void 0),A(this,Ye,void 0),A(this,Je,{}),m(this,"states"),m(this,"id",""),m(this,"name",""),m(this,"type",""),m(this,"description"),m(this,"sortOrder"),m(this,"logo"),m(this,"phone"),m(this,"social"),m(this,"color"),m(this,"shortName"),m(this,"detailsUrl"),m(this,"tags"),m(this,"toMap"),m(this,"externalId"),m(this,"showLabelWhenImagePresent"),m(this,"showSmartLabelWhenImagePresent"),m(this,"picture"),m(this,"operationHours"),m(this,"siblingGroups"),m(this,"gallery"),m(this,"amenity"),m(this,"filterFlags"),A(this,Ea,void 0),A(this,Ta,[]),A(this,Pa,void 0),L(this,Ne,t),L(this,Ye,n);let r=Object.assign({},n);delete r.categories,Object.assign(this,r)}static is(t){return t.__type===e.__type}get polygons(){let e=b(this,Je).polygons;if(typeof e<"u")return e;let t=[],n=b(this,Ea),r=b(this,Ne)._polygonsById;if(Array.isArray(n))for(let e=0,i=n.length;e<i;++e){let i=r[n[e].id];null!=i&&t.push(i)}return b(this,Je).polygons=t,t}set polygons(e){L(this,Ea,e)}get nodes(){let e=b(this,Je).nodes;if(typeof e<"u")return e;let t=[],n=b(this,Ta),r=b(this,Ne)._nodesById;if(n&&n.length)for(let e=0,i=n.length;e<i;++e){let i=r[n[e].node];null!=i&&t.push(i)}return b(this,Je).nodes=t,t}set nodes(e){L(this,Ta,e)}get parent(){let e=b(this,Je).parent;if(typeof e<"u")return e;let t,n=b(this,Ne)._locationsById,r=b(this,Pa);return void 0!==r&&(t=n[r]),b(this,Je).parent=t,t}set parent(e){L(this,Pa,e)}get instances(){let t=b(this,Je).instances;if(typeof t<"u")return t;let n=[];for(let t of b(this,Ye).polygons)if(Object.keys(t).length>2){let{id:r,map:i,...o}=t,s=b(this,Ne).getCollectionItemById("polygons",r),a=null!=s&&Array.isArray(null==s?void 0:s.entrances)&&s.entrances.length>0?s.entrances.map((e=>({node:e.id,map:e.map}))):[];n.push(new e(b(this,Ne),{...b(this,Ye),...o,parent:this.id,nodes:a,polygons:[t]}))}for(let t of b(this,Ye).nodes)if(Object.keys(t).length>2){let{node:r,map:i,...o}=t,s=b(this,Ne).getCollectionItemById("nodes",r),a=null!=s&&s.polygon?[{id:s.polygon.id,map:s.polygon.map}]:[];n.push(new e(b(this,Ne),{...b(this,Ye),...o,parent:this.id,nodes:[{node:r,map:i}],polygons:a}))}return b(this,Je).instances=n,n}get categories(){let e=b(this,Je).categories;if(typeof e<"u")return e;let t=[];return b(this,Ye).categories.forEach((e=>{let n=b(this,Ne).getCollectionItemById("categories",e);n&&t.push(n)})),b(this,Je).categories=t,t}get state(){return rP(this,b(this,Ne).locationStates)}clone(){let t=b(this,Ne).venue.slug;return ye.addPendingEvent(new Ki({venue:t})),new e(b(this,Ne),b(this,Ye))}get nodeOperationHours(){let e=b(this,Je).nodeOperationHours;if(typeof e<"u")return e;if(null==this.nodes)return{};let t=b(this,Ye).nodes.reduce(((e,t)=>(null!=t.operationHours&&(e[t.node]=t.operationHours),e)),{});return b(this,Je).nodeOperationHours=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r,i=n||await e.fetch(t);for(let e=0;e<i.length;e++){r=t.locations[e];for(let t of Cy)r[t]=i[e][t]}}static async fetch(t){var n,r,i,o,s;let a=null==(n=t.options.things)?void 0:n.locations.slice();null!=(r=t.options.things)&&r.categories&&_e(a,"categories"),null!=(i=t.options.things)&&i.nodes&&_e(a,"nodes"),null!=(o=t.options.things)&&o.polygons&&_e(a,"polygons"),null!=(s=t.options.things)&&s.locationStates&&_e(a,"states");let l={fields:a,venue:t.options.venue};try{let n=await Me(t.options,"location",l);return t.options.includeHidden||(n=n.filter((e=>!e.hidden))),n.map((n=>new e(t,n)))}catch(e){return D.error("Fetch Locations:",e),[]}}directionsTo(e,t){let n=e instanceof gt,r=b(this,Ne).venue.slug,i=new Ji({with_destination_set:n||void 0,venue:r});return ye.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let n=b(this,Ne).venue.slug;return ye.addPendingEvent(new Zi({venue:n})),super.distanceTo(e,t)}toJSON(){let e={...b(this,Ye)};for(let t of Cy)e[t]=this[t];delete e.color;let t=[],n=[];if(b(this,Ye).polygons)for(let e of b(this,Ye).polygons)if(e&&Object.keys(e).some((e=>"id"!==e&&"map"!==e))){let{id:t,map:r}=e,i=b(this,Ne).getCollectionItemById("polygons",t),o=null!=i&&Array.isArray(null==i?void 0:i.entrances)&&i.entrances.length>0?i.entrances.map((e=>({node:e.id,map:e.map.id}))):[];n.push({type:"polygon",mapId:r,nodeOrPolygonId:t,nodes:o,polygons:[{id:t,type:"polygon"}],description:null==e?void 0:e.description,externalId:null==e?void 0:e.externalId,operationalHours:null==e?void 0:e.operationHours,siblingGroup:null==e?void 0:e.siblingGroup})}if(n.length>0&&(e.polygonInstances=n),b(this,Ye).nodes)for(let e of b(this,Ye).nodes)if(e&&Object.keys(e).some((e=>"node"!==e&&"map"!==e))){let{node:n,map:r}=e,i=b(this,Ne).getCollectionItemById("nodes",n),o=null!=i&&i.polygon?{id:i.polygon.id,map:i.polygon.map.id}:void 0;t.push({type:"node",mapId:r,nodeOrPolygonId:n,nodes:[{node:n,map:r}],...(null==o?void 0:o.id)&&{polygons:[{id:o.id,type:"polygon"}]},description:null==e?void 0:e.description,externalId:null==e?void 0:e.externalId,operationalHours:null==e?void 0:e.operationHours,siblingGroup:null==e?void 0:e.siblingGroup})}return t.length>0&&(e.nodeInstances=t),e}};Ne=new WeakMap,Ye=new WeakMap,Je=new WeakMap,Ea=new WeakMap,Ta=new WeakMap,Pa=new WeakMap,s(wt,"MappedinLocation"),m(wt,"__type","MappedinLocation");var hn=wt;v();var Vr,gr,Ia,Ly=["name"],gn=class e{constructor(t,n){m(this,"__type",e.__type),A(this,Vr,void 0),A(this,gr,{}),A(this,Ia,void 0),m(this,"name"),m(this,"externalId"),m(this,"parents"),m(this,"id"),m(this,"icon"),m(this,"iconFromDefaultList"),m(this,"sortOrder"),this.id=n.id,L(this,Ia,n),L(this,Vr,t),Object.assign(this,n)}static is(t){return t.__type===e.__type}get locations(){var e;let t=b(this,gr).locations;if(typeof t<"u")return t;let n=[],{locations:r}=b(this,Vr),{id:i}=this;for(let t=0,o=r.length;t<o;++t){let o=r[t],s=o.categories;if(Array.isArray(s))for(let t=0,r=s.length;t<r;++t)if((null==(e=s[t])?void 0:e.id)===i){n.push(o);break}}return b(this,gr).locations=n,n}get children(){var e;let t=b(this,gr).children;if(typeof t<"u")return t;let{categories:n}=b(this,Vr),{id:r}=this,i=[];for(let t=0;t<n.length;t++)r&&null!=(e=n[t].parents)&&e.includes(r)&&i.push(n[t]);return b(this,gr).children=i,i}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Ly)t.categories[e][n]=r[e][n]}static async fetch(t){var n;let r={fields:null==(n=t.options.things)?void 0:n.categories,venue:t.options.venue};try{return(await Me(t.options,"category",r)).map((n=>new e(t,n)))}catch(e){return D.error("Fetch Categories:",e),[]}}toJSON(){let e={...b(this,Ia)};for(let t of Ly)e[t]=this[t];return e}};Vr=new WeakMap,gr=new WeakMap,Ia=new WeakMap,s(gn,"MappedinCategory"),m(gn,"__type","MappedinCategory");var mr=gn;v();var Oa,mn,Of=class{constructor(e,t){A(this,Oa,void 0),A(this,mn,void 0),m(this,"distance",0),m(this,"path",[]),m(this,"instructions",[]),L(this,mn,e),L(this,Oa,t),this.distance=t.distance,this.instructions=t.instructions.map((e=>{var t,n,r,i,o,s,a,l,u,c,h,d;let p={...e,action:{...e.action},atLocation:null!=(t=e.atLocation)&&t.id?null==(r=null==(n=b(this,mn))?void 0:n._vortexesById)?void 0:r[e.atLocation.id]:void 0,node:null!=(i=e.node)&&i.id?null==(s=null==(o=b(this,mn))?void 0:o._nodesById)?void 0:s[e.node.id]:void 0};if("TakeVortex"===(null==(a=p.action)?void 0:a.type)||"ExitVortex"===(null==(l=p.action)?void 0:l.type)){let e=null==(c=b(this,mn)._mapsById)?void 0:c[null==(u=p.action)?void 0:u.fromMap.id],t=null==(d=b(this,mn)._mapsById)?void 0:d[null==(h=p.action)?void 0:h.toMap.id];e&&t&&(p.action.fromMap=e,p.action.toMap=t)}return p})),this.path=t.path.reduce(((e,{id:t})=>{var n,r;let i=null==(r=null==(n=b(this,mn))?void 0:n._nodesById)?void 0:r[t];return i&&e.push(i),e}),[])}toJSON(){return b(this,Oa)}};Oa=new WeakMap,mn=new WeakMap,s(Of,"MappedinDirections");var nr=Of;v();var Af=class{constructor(e){m(this,"destinations",[]),this.destinations=e}};s(Af,"MappedinDestinationSet");var gt=Af;v();var Sa,Vn=class e{constructor(t){m(this,"__type",e.__type),m(this,"id",""),A(this,Sa,void 0),m(this,"accessible"),m(this,"name"),m(this,"type"),m(this,"weight"),m(this,"multiplier"),m(this,"nodes"),m(this,"filterFlags"),L(this,Sa,t),Object.assign(this,t)}static is(t){return t.__type===e.__type}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){var n;let r=null==(n=t.options.things)?void 0:n.vortexes.slice();["name","type","accessible","weight","multiplier","nodes"].forEach((function(e){_e(r,e)}));let i={fields:r,venue:t.options.venue};try{return(await Me(t.options,"vortex",i)).map((t=>new e(t)))}catch(e){return D.error("Fetch Vortexes:",e),[]}}toJSON(){return b(this,Sa)}};Sa=new WeakMap,s(Vn,"MappedinVortex"),m(Vn,"__type","MappedinVortex");var Aa=Vn;v();var La,ja,Na,qr,Ca=class e{constructor(e,t){A(this,La,void 0),A(this,ja,void 0),A(this,Na,void 0),A(this,qr,{}),m(this,"defaultMap",""),m(this,"address",""),m(this,"city",""),m(this,"countrycode",""),m(this,"externalId",""),m(this,"id",""),m(this,"latitude"),m(this,"logo"),m(this,"longitude"),m(this,"name",""),m(this,"operationHours"),m(this,"postal",""),m(this,"slug",""),m(this,"state",""),m(this,"telephone",""),m(this,"tzid",""),m(this,"tzidOverride",""),m(this,"utcOffset",""),m(this,"website",""),m(this,"secureContentStorage",!1),m(this,"defaultLanguage"),m(this,"languages",[]),m(this,"topLocations",[]),m(this,"renderOptions",{useLivePolygons:!1,simplifyDirections:!1}),L(this,ja,e),L(this,La,t),Object.assign(this,t)}get metadata(){return ye.addPendingEvent(new ra({venue:this.slug})),b(this,Na)}set metadata(e){L(this,Na,e)}static hydrate(t,n){return new e(n,t)}static async fetch(t){var n;let r={fields:null==(n=t.options.things)?void 0:n.venue,slug:t.options.venue,limit:1};try{let n=await Me(t.options,"venue",r);return new e(t,Array.isArray(n)?n[0]:n)}catch(e){return D.error("Fetch Venue:",e),{}}}get isMultiBuilding(){if(null==b(this,qr).isMultiBuilding){let e=b(this,ja).maps,t=e.reduce(((e,t)=>e.add(t.elevation)),new Set),n=e.length!==t.size;b(this,qr).isMultiBuilding=n}return b(this,qr).isMultiBuilding}toJSON(){return b(this,La)}};La=new WeakMap,ja=new WeakMap,Na=new WeakMap,qr=new WeakMap,s(Ca,"MappedinVenue");var vr=Ca;v();var Da,Fa=class e{constructor(e){m(this,"id",""),A(this,Da,void 0),L(this,Da,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){var n;let r={fields:null==(n=t.options.things)?void 0:n.themes.slice(),venue:t.options.venue};try{return(await Me(t.options,"apollo-theme",r)).map((t=>new e(t)))}catch(e){return D.error("Fetch Theme:",e),[]}}toJSON(){return b(this,Da)}};Da=new WeakMap,s(Fa,"MappedinTheme");var wu=Fa;v();var Ba,Ra=class e{constructor(e){A(this,Ba,void 0),m(this,"polygons",[]),L(this,Ba,e),Object.assign(this,e)}static hydrate(t){return new e(t)}static async fetch(t){try{let n=await Gr({...t.options,secure:!1},"smart-labels/polygon-label-ranking",{venue:t.options.venue},!0);return new e(n)}catch(e){return D.error("Fetch Rankings:",e),null}}toJSON(){return b(this,Ba)}};Ba=new WeakMap,s(Ra,"MappedinRankings");var za=Ra;v(),v();var qa,Yr,Ga,jy=["name","description"],Ur=class e{constructor(e,t){A(this,qa,void 0),A(this,Yr,void 0),A(this,Ga,{}),m(this,"id",""),m(this,"type",""),m(this,"name",""),m(this,"description"),m(this,"image"),m(this,"startDate"),m(this,"endDate"),m(this,"showDate"),L(this,Yr,t),L(this,qa,e),Object.assign(this,t)}location(){let e=b(this,Ga).location;if(typeof e<"u")return e;let t,n=b(this,qa)._locationsById,r=b(this,Yr).location;if(null!=r){let e=n[r];null!=e&&(t=e)}return b(this,Ga).location=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of jy)t.events[e][n]=r[e][n]}static async fetch(t){var n,r;let i=null==(n=t.options.things)?void 0:n.events.slice();null!=(r=t.options.things)&&r.locations&&_e(i,"location");let o={fields:i,venue:t.options.venue,activeAtOrAfter:Date.now()};try{return(await Me(t.options,"event",o)).map((n=>new e(t,n)))}catch(e){return D.error("Fetch Events:",e),[]}}toJSON(){let e={...b(this,Yr)};for(let t of jy)e[t]=this[t];return e}};qa=new WeakMap,Yr=new WeakMap,Ga=new WeakMap,s(Ur,"MappedinEvent");var Va=Ur;v();var Ya,Ny=["name"],Wr=class e{constructor(e){A(this,Ya,void 0),m(this,"id",""),m(this,"name",""),m(this,"value",""),L(this,Ya,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Ny)t.locationStates[e][n]=r[e][n]}static async fetch(t){var n;let r={fields:null==(n=t.options.things)?void 0:n.locationStates.slice(),venue:t.options.venue};try{return(await Me(t.options,"location-state",r)).map((t=>new e(t)))}catch(e){return D.error("Fetch Location States:",e),[]}}toJSON(){let e={...b(this,Ya)};for(let t of Ny)e[t]=this[t];return e}};Ya=new WeakMap,s(Wr,"MappedinLocationState");var Ua=Wr;v(),v(),v();var Fy=" ",Ze=class e{static get separator(){return Fy}static set separator(e){Fy=e}static parse(e){if(!isNaN(parseFloat(e))&&isFinite(e))return Number(e);let t=String(e).trim().replace(/^-/,"").replace(/[NSEW]$/i,"").split(/[^0-9.,]+/);if(""==t[t.length-1]&&t.splice(t.length-1),""==t)return NaN;let n=null;switch(t.length){case 3:n=t[0]/1+t[1]/60+t[2]/3600;break;case 2:n=t[0]/1+t[1]/60;break;case 1:n=t[0];break;default:return NaN}return/^-|[WS]$/i.test(e.trim())&&(n=-n),Number(n)}static toDms(t,n="d",r){if(isNaN(t)||"string"==typeof t&&""==t.trim()||"boolean"==typeof t||t==1/0||null==t)return null;if(void 0===r)switch(n){case"d":case"deg":r=4;break;case"dm":case"deg+min":r=2;break;case"dms":case"deg+min+sec":r=0;break;default:n="d",r=4}t=Math.abs(t);let i=null,o=null,s=null,a=null;switch(n){default:case"d":case"deg":o=t.toFixed(r),o<100&&(o="0"+o),o<10&&(o="0"+o),i=o+"°";break;case"dm":case"deg+min":o=Math.floor(t),s=(60*t%60).toFixed(r),60==s&&(s=(0).toFixed(r),o++),o=("000"+o).slice(-3),s<10&&(s="0"+s),i=o+"°"+e.separator+s+"′";break;case"dms":case"deg+min+sec":o=Math.floor(t),s=Math.floor(3600*t/60)%60,a=(3600*t%60).toFixed(r),60==a&&(a=(0).toFixed(r),s++),60==s&&(s=0,o++),o=("000"+o).slice(-3),s=("00"+s).slice(-2),a<10&&(a="0"+a),i=o+"°"+e.separator+s+"′"+e.separator+a+"″"}return i}static toLat(t,n,r){let i=e.toDms(e.wrap90(t),n,r);return null===i?"–":i.slice(1)+e.separator+(t<0?"S":"N")}static toLon(t,n,r){let i=e.toDms(e.wrap180(t),n,r);return null===i?"–":i+e.separator+(t<0?"W":"E")}static toBrng(t,n,r){let i=e.toDms(e.wrap360(t),n,r);return null===i?"–":i.replace("360","0")}static fromLocale(e){let t=123456.789.toLocaleString(),n={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(n.thousands,"⁜").replace(n.decimal,".").replace("⁜",",")}static toLocale(e){let t=123456.789.toLocaleString(),n={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(/,([0-9])/,"⁜$1").replace(".",n.decimal).replace("⁜",n.thousands)}static compassPoint(t,n=3){if(![1,2,3].includes(Number(n)))throw new RangeError("invalid precision ‘".concat(n,"’"));t=e.wrap360(t);let r=4*2**(n-1);return["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.round(t*r/360)%r*16/r]}static wrap360(e){return 0<=e&&e<360?e:(e%360+360)%360}static wrap180(e){return-180<e&&e<=180?e:(e+540)%360-180}static wrap90(e){return-90<=e&&e<=90?e:Math.abs((e%360+270)%360-180)-90}};s(Ze,"Dms");var Sf=Ze;Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};var Z=Sf,be=Math.PI,K=class e{constructor(e,t){if(isNaN(e))throw new TypeError("invalid lat ‘".concat(e,"’"));if(isNaN(t))throw new TypeError("invalid lon ‘".concat(t,"’"));this._lat=Z.wrap90(Number(e)),this._lon=Z.wrap180(Number(t))}get lat(){return this._lat}get latitude(){return this._lat}set lat(e){if(this._lat=isNaN(e)?Z.wrap90(Z.parse(e)):Z.wrap90(Number(e)),isNaN(this._lat))throw new TypeError("invalid lat ‘".concat(e,"’"))}set latitude(e){if(this._lat=isNaN(e)?Z.wrap90(Z.parse(e)):Z.wrap90(Number(e)),isNaN(this._lat))throw new TypeError("invalid latitude ‘".concat(e,"’"))}get lon(){return this._lon}get lng(){return this._lon}get longitude(){return this._lon}set lon(e){if(this._lon=isNaN(e)?Z.wrap180(Z.parse(e)):Z.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lon ‘".concat(e,"’"))}set lng(e){if(this._lon=isNaN(e)?Z.wrap180(Z.parse(e)):Z.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lng ‘".concat(e,"’"))}set longitude(e){if(this._lon=isNaN(e)?Z.wrap180(Z.parse(e)):Z.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid longitude ‘".concat(e,"’"))}static get metresToKm(){return.001}static get metresToMiles(){return 1/1609.344}static get metresToNauticalMiles(){return 1/1852}static parse(...t){if(0==t.length)throw new TypeError("invalid (empty) point");if(null===t[0]||null===t[1])throw new TypeError("invalid (null) point");let n,r;if(2==t.length&&([n,r]=t,n=Z.wrap90(Z.parse(n)),r=Z.wrap180(Z.parse(r)),isNaN(n)||isNaN(r)))throw new TypeError("invalid point ‘".concat(t.toString(),"’"));if(1==t.length&&"string"==typeof t[0]&&([n,r]=t[0].split(","),n=Z.wrap90(Z.parse(n)),r=Z.wrap180(Z.parse(r)),isNaN(n)||isNaN(r)))throw new TypeError("invalid point ‘".concat(t[0],"’"));if(1==t.length&&"object"==typeof t[0]){let e=t[0];if("Point"==e.type&&Array.isArray(e.coordinates)?[r,n]=e.coordinates:(null!=e.latitude&&(n=e.latitude),null!=e.lat&&(n=e.lat),null!=e.longitude&&(r=e.longitude),null!=e.lng&&(r=e.lng),null!=e.lon&&(r=e.lon),n=Z.wrap90(Z.parse(n)),r=Z.wrap180(Z.parse(r))),isNaN(n)||isNaN(r))throw new TypeError("invalid point ‘".concat(JSON.stringify(t[0]),"’"))}if(isNaN(n)||isNaN(r))throw new TypeError("invalid point ‘".concat(t.toString(),"’"));return new e(n,r)}distanceTo(t,n=6371e3){if(t instanceof e||(t=e.parse(t)),isNaN(n))throw new TypeError("invalid radius ‘".concat(n,"’"));let r=n,i=this.lat.toRadians(),o=this.lon.toRadians(),s=t.lat.toRadians(),a=s-i,l=t.lon.toRadians()-o,u=Math.sin(a/2)*Math.sin(a/2)+Math.cos(i)*Math.cos(s)*Math.sin(l/2)*Math.sin(l/2);return r*(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)))}initialBearingTo(t){if(t instanceof e||(t=e.parse(t)),this.equals(t))return NaN;let n=this.lat.toRadians(),r=t.lat.toRadians(),i=(t.lon-this.lon).toRadians(),o=Math.cos(n)*Math.sin(r)-Math.sin(n)*Math.cos(r)*Math.cos(i),s=Math.sin(i)*Math.cos(r),a=Math.atan2(s,o).toDegrees();return Z.wrap360(a)}finalBearingTo(t){t instanceof e||(t=e.parse(t));let n=t.initialBearingTo(this)+180;return Z.wrap360(n)}midpointTo(t){t instanceof e||(t=e.parse(t));let n=this.lat.toRadians(),r=this.lon.toRadians(),i=t.lat.toRadians(),o=(t.lon-this.lon).toRadians(),s=Math.cos(n),a=0,l=Math.sin(n),u={x:s+Math.cos(i)*Math.cos(o),y:a+Math.cos(i)*Math.sin(o),z:l+Math.sin(i)},c=Math.atan2(u.z,Math.sqrt(u.x*u.x+u.y*u.y)),h=r+Math.atan2(u.y,u.x),d=c.toDegrees(),p=h.toDegrees();return new e(d,p)}intermediatePointTo(t,n){if(t instanceof e||(t=e.parse(t)),this.equals(t))return new e(this.lat,this.lon);let r=this.lat.toRadians(),i=this.lon.toRadians(),o=t.lat.toRadians(),s=t.lon.toRadians(),a=o-r,l=s-i,u=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r)*Math.cos(o)*Math.sin(l/2)*Math.sin(l/2),c=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),h=Math.sin((1-n)*c)/Math.sin(c),d=Math.sin(n*c)/Math.sin(c),p=h*Math.cos(r)*Math.cos(i)+d*Math.cos(o)*Math.cos(s),f=h*Math.cos(r)*Math.sin(i)+d*Math.cos(o)*Math.sin(s),v=h*Math.sin(r)+d*Math.sin(o),g=Math.atan2(v,Math.sqrt(p*p+f*f)),m=Math.atan2(f,p),y=g.toDegrees(),b=m.toDegrees();return new e(y,b)}destinationPoint(t,n,r=6371e3){let i=t/r,o=Number(n).toRadians(),s=this.lat.toRadians(),a=this.lon.toRadians(),l=Math.sin(s)*Math.cos(i)+Math.cos(s)*Math.sin(i)*Math.cos(o),u=Math.asin(l),c=Math.sin(o)*Math.sin(i)*Math.cos(s),h=Math.cos(i)-Math.sin(s)*l,d=a+Math.atan2(c,h),p=u.toDegrees(),f=d.toDegrees();return new e(p,f)}static intersection(t,n,r,i){if(t instanceof e||(t=e.parse(t)),r instanceof e||(r=e.parse(r)),isNaN(n))throw new TypeError("invalid brng1 ‘".concat(n,"’"));if(isNaN(i))throw new TypeError("invalid brng2 ‘".concat(i,"’"));let o=t.lat.toRadians(),s=t.lon.toRadians(),a=r.lat.toRadians(),l=r.lon.toRadians(),u=Number(n).toRadians(),c=Number(i).toRadians(),h=a-o,d=l-s,p=2*Math.asin(Math.sqrt(Math.sin(h/2)*Math.sin(h/2)+Math.cos(o)*Math.cos(a)*Math.sin(d/2)*Math.sin(d/2)));if(Math.abs(p)<Number.EPSILON)return new e(t.lat,t.lon);let f=(Math.sin(a)-Math.sin(o)*Math.cos(p))/(Math.sin(p)*Math.cos(o)),v=(Math.sin(o)-Math.sin(a)*Math.cos(p))/(Math.sin(p)*Math.cos(a)),g=Math.acos(Math.min(Math.max(f,-1),1)),m=Math.acos(Math.min(Math.max(v,-1),1)),y=u-(Math.sin(l-s)>0?g:2*be-g),b=(Math.sin(l-s)>0?2*be-m:m)-c;if(0==Math.sin(y)&&0==Math.sin(b)||Math.sin(y)*Math.sin(b)<0)return null;let w=-Math.cos(y)*Math.cos(b)+Math.sin(y)*Math.sin(b)*Math.cos(p),_=Math.atan2(Math.sin(p)*Math.sin(y)*Math.sin(b),Math.cos(b)+Math.cos(y)*w),M=Math.asin(Math.min(Math.max(Math.sin(o)*Math.cos(_)+Math.cos(o)*Math.sin(_)*Math.cos(u),-1),1)),x=s+Math.atan2(Math.sin(u)*Math.sin(_)*Math.cos(o),Math.cos(_)-Math.sin(o)*Math.sin(M)),I=M.toDegrees(),k=x.toDegrees();return new e(I,k)}crossTrackDistanceTo(t,n,r=6371e3){t instanceof e||(t=e.parse(t)),n instanceof e||(n=e.parse(n));let i=r;if(this.equals(t))return 0;let o=t.distanceTo(this,i)/i,s=t.initialBearingTo(this).toRadians(),a=t.initialBearingTo(n).toRadians();return Math.asin(Math.sin(o)*Math.sin(s-a))*i}alongTrackDistanceTo(t,n,r=6371e3){t instanceof e||(t=e.parse(t)),n instanceof e||(n=e.parse(n));let i=r;if(this.equals(t))return 0;let o=t.distanceTo(this,i)/i,s=t.initialBearingTo(this).toRadians(),a=t.initialBearingTo(n).toRadians(),l=Math.asin(Math.sin(o)*Math.sin(s-a));return Math.acos(Math.cos(o)/Math.abs(Math.cos(l)))*Math.sign(Math.cos(a-s))*i}maxLatitude(e){let t=Number(e).toRadians(),n=this.lat.toRadians();return Math.acos(Math.abs(Math.sin(t)*Math.cos(n))).toDegrees()}static crossingParallels(e,t,n){if(e.equals(t))return null;let r=Number(n).toRadians(),i=e.lat.toRadians(),o=e.lon.toRadians(),s=t.lat.toRadians(),a=t.lon.toRadians()-o,l=Math.sin(i)*Math.cos(s)*Math.cos(r)*Math.sin(a),u=Math.sin(i)*Math.cos(s)*Math.cos(r)*Math.cos(a)-Math.cos(i)*Math.sin(s)*Math.cos(r),c=Math.cos(i)*Math.cos(s)*Math.sin(r)*Math.sin(a);if(c*c>l*l+u*u)return null;let h=Math.atan2(-u,l),d=Math.acos(c/Math.sqrt(l*l+u*u)),p=o+h+d,f=(o+h-d).toDegrees(),v=p.toDegrees();return{lon1:Z.wrap180(f),lon2:Z.wrap180(v)}}rhumbDistanceTo(t,n=6371e3){t instanceof e||(t=e.parse(t));let r=n,i=this.lat.toRadians(),o=t.lat.toRadians(),s=o-i,a=Math.abs(t.lon-this.lon).toRadians();Math.abs(a)>be&&(a=a>0?-(2*be-a):2*be+a);let l=Math.log(Math.tan(o/2+be/4)/Math.tan(i/2+be/4)),u=Math.abs(l)>1e-11?s/l:Math.cos(i);return Math.sqrt(s*s+u*u*a*a)*r}rhumbBearingTo(t){if(t instanceof e||(t=e.parse(t)),this.equals(t))return NaN;let n=this.lat.toRadians(),r=t.lat.toRadians(),i=(t.lon-this.lon).toRadians();Math.abs(i)>be&&(i=i>0?-(2*be-i):2*be+i);let o=Math.log(Math.tan(r/2+be/4)/Math.tan(n/2+be/4)),s=Math.atan2(i,o).toDegrees();return Z.wrap360(s)}rhumbDestinationPoint(t,n,r=6371e3){let i=this.lat.toRadians(),o=this.lon.toRadians(),s=Number(n).toRadians(),a=t/r,l=a*Math.cos(s),u=i+l;Math.abs(u)>be/2&&(u=u>0?be-u:-be-u);let c=Math.log(Math.tan(u/2+be/4)/Math.tan(i/2+be/4)),h=Math.abs(c)>1e-11?l/c:Math.cos(i),d=o+a*Math.sin(s)/h,p=u.toDegrees(),f=d.toDegrees();return new e(p,f)}rhumbMidpointTo(t){t instanceof e||(t=e.parse(t));let n=this.lat.toRadians(),r=this.lon.toRadians(),i=t.lat.toRadians(),o=t.lon.toRadians();Math.abs(o-r)>be&&(r+=2*be);let s=(n+i)/2,a=Math.tan(be/4+n/2),l=Math.tan(be/4+i/2),u=Math.tan(be/4+s/2),c=((o-r)*Math.log(u)+r*Math.log(l)-o*Math.log(a))/Math.log(l/a);isFinite(c)||(c=(r+o)/2);let h=s.toDegrees(),d=c.toDegrees();return new e(h,d)}static areaOf(e,t=6371e3){let n=t,r=e[0].equals(e[e.length-1]);r||e.push(e[0]);let i=e.length-1,o=0;for(let t=0;t<i;t++){let n=e[t].lat.toRadians(),r=e[t+1].lat.toRadians(),i=(e[t+1].lon-e[t].lon).toRadians();o+=2*Math.atan2(Math.tan(i/2)*(Math.tan(n/2)+Math.tan(r/2)),1+Math.tan(n/2)*Math.tan(r/2))}a(e)&&(o=Math.abs(o)-2*be);let s=Math.abs(o*n*n);return r||e.pop(),s;function a(e){let t=0,n=e[0].initialBearingTo(e[1]);for(let r=0;r<e.length-1;r++){let i=e[r].initialBearingTo(e[r+1]),o=e[r].finalBearingTo(e[r+1]);t+=(i-n+540)%360-180,t+=(o-i+540)%360-180,n=o}return t+=(e[0].initialBearingTo(e[1])-n+540)%360-180,Math.abs(t)<90}}equals(t){return t instanceof e||(t=e.parse(t)),!(Math.abs(this.lat-t.lat)>Number.EPSILON||Math.abs(this.lon-t.lon)>Number.EPSILON)}toGeoJSON(){return{type:"Point",coordinates:[this.lon,this.lat]}}toString(e="d",t){if(!["d","dm","dms","n"].includes(e))throw new RangeError("invalid format ‘".concat(e,"’"));if("n"==e)return null==t&&(t=4),"".concat(this.lat.toFixed(t),",").concat(this.lon.toFixed(t));let n=Z.toLat(this.lat,e,t),r=Z.toLon(this.lon,e,t);return"".concat(n,", ").concat(r)}};s(K,"LatLonSpherical");var Wt,qn,$a,Ae=K,Dy=["name","shortName","subtitle"],vn=class e{constructor(t,n){m(this,"__type",e.__type),A(this,Wt,void 0),A(this,qn,{}),A(this,$a,void 0),m(this,"id",""),m(this,"group",""),m(this,"name",""),m(this,"shortName",""),m(this,"elevation",0),m(this,"subtitle"),m(this,"scale",0),m(this,"layers"),m(this,"x_scale"),m(this,"perspectiveId"),m(this,"scene"),m(this,"width",0),m(this,"height",0),m(this,"georeference",[]),m(this,"_scale",0),L(this,Wt,t),L(this,$a,n),Object.assign(this,n),this._scale=Ry(this),this.scale=this.x_scale||1/this._scale}static is(t){return t.__type===e.__type}get polygons(){var e,t,n;return null!=(n=null==(t=null==(e=qe.instances.get(b(this,Wt)))?void 0:e.polygonsByMapId)?void 0:t.get(this.id))?n:[]}get locations(){var e,t,n;return null!=(n=null==(t=null==(e=qe.instances.get(b(this,Wt)))?void 0:e.locationsByMapId)?void 0:t.get(this.id))?n:[]}get nodes(){var e,t,n;return null!=(n=null==(t=null==(e=qe.instances.get(b(this,Wt)))?void 0:e.nodesByMapId)?void 0:t.get(this.id))?n:[]}get mapGroup(){let e=b(this,qn).mapGroup;if(typeof e<"u")return e;let t=this.group,n=t&&b(this,Wt)._mapGroupsById[t]||null;return b(this,qn).mapGroup=n,n}createCoordinateByXY(e,t){return new yr({x:e,y:t,map:this,mappedin:b(this,Wt)})}createCoordinate(e,t){return new yr({lat:e,lon:t,map:this,mappedin:b(this,Wt)})}getNorth(){let e;try{let t=this.georeference[0],n=this.georeference[2],r=new Ae(t.target.x,t.target.y),i=new Ae(n.target.x,n.target.y);e=-((r.finalBearingTo(i)+0)*Math.PI/180-Math.atan2(n.control.y-t.control.y,n.control.x-t.control.x)-Math.PI/2)}catch(t){e=0,D.warn(t),D.warn("Couldn't georeference ".concat(this.name||this.shortName||this.id,". Probably not enough geocoordinates."))}return e}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of Dy)t.maps[e][n]=r[e][n]}static async fetch(t){var n,r,i;let o=null==(n=t.options.things)?void 0:n.maps.slice();t.options.perspective&&_e(o,"perspectives"),null!=(r=t.options.things)&&r.mapGroups&&_e(o,"group"),_e(o,"elevation"),_e(o,"x_scale"),_e(o,"scale"),_e(o,"georeference");let a={fields:o,perspective:t.options.perspective,venue:t.options.venue};try{let n=await Me(t.options,"map",a),r=s((e=>{let t=l.layers.find((t=>t.id===e));t?t.visible=!0:l.layers.push({id:e,visible:!0})}),"setVisibleLayer");for(let s=0,a=n.length;s<a;++s){var l=n[s];if(l){let e=l.perspective;null!=e&&(l.perspectiveId=e.id,o.indexOf("scene")>-1&&(l.scene=e.scene),e.layers?(l.layers.forEach((e=>{e.visible=!1})),e.layers.forEach(r)):l.layers.forEach((e=>{e.visible=!0}))),delete l.perspective}if(t.options.preloadMapGeometry&&null!=(i=l.scene)&&i.polygons&&"string"==typeof l.scene.polygons){let e=await it()(l.scene.polygons);l.scene.polygons=await e.json()}n[s]=new e(t,l)}return n}catch(e){return D.error("Fetch Maps:",e),[]}}get center(){if(b(this,qn).center)return b(this,qn).center;let[e,t]=[this.georeference[0].control.x,this.georeference[0].control.y],[n,r]=[this.georeference[2].control.x,this.georeference[2].control.y],{lat:i,lon:o}=this.createCoordinateByXY(e,t),{lat:s,lon:a}=this.createCoordinateByXY(n,r),l=new Ae(i,o),u=new Ae(s,a),c=l.midpointTo(u),h=this.createCoordinate(c.lat,c.lon);return b(this,qn).center=h,h}toJSON(){let e={...b(this,$a)};for(let t of Dy)e[t]=this[t];return e}};Wt=new WeakMap,qn=new WeakMap,$a=new WeakMap,s(vn,"MappedinMap"),m(vn,"__type","MappedinMap");var Wa=vn;v();var Ha,Cf,Xa,Lf,St,Hr,ku,zy,_u,By,$t,Ht,Xt,Kt,$r=class e{constructor(t){A(this,Ha),A(this,Xa),A(this,ku),A(this,_u),m(this,"__type",e.__type),m(this,"map"),A(this,St,{}),A(this,Hr,void 0),A(this,$t,void 0),A(this,Ht,void 0),A(this,Xt,void 0),A(this,Kt,void 0);let{map:n,mappedin:r}=t;null!=t.lat&&null!=t.lon&&(L(this,$t,t.lat),L(this,Ht,t.lon)),null!=t.x&&null!=t.y&&(L(this,Xt,t.x),L(this,Kt,t.y)),this.map=n,L(this,Hr,r)}static is(t){return t.__type===e.__type}get x(){return me(this,Xa,Lf).call(this,"x")}get y(){return me(this,Xa,Lf).call(this,"y")}get lat(){return me(this,Ha,Cf).call(this,"lat")}get lon(){return me(this,Ha,Cf).call(this,"lon")}absoluteDistanceTo(e){return Vy([e.lat,e.lon],[this.lat,this.lon])}get nearestNode(){let e=b(this,St).nearestNode;if(typeof e<"u")return e;let t=qe.instances.get(b(this,Hr)).findNearestNodeOnMap(this.map.id,this);return b(this,St).nearestNode=t,t}nodesInRadius(e){if(e<=0)return D.error("Radius must be greater than 0."),[];let t=b(this,St).radius,n=b(this,St).nodesInRadius;if(t&&n&&b(this,St).radius===e)return b(this,St).nodesInRadius;let r=qe.instances.get(b(this,Hr)).findNodeWithinRadiusOnMap(this.map.id,this,e*this.map._scale);return b(this,St).radius=e,b(this,St).nodesInRadius=r,r}toJSON(){return{x:this.x,y:this.y,map:this.map,lat:this.lat,lon:this.lon}}};Ha=new WeakSet,Cf=s((function(e){if(typeof b(this,$t)<"u"&&typeof b(this,Ht)<"u")return b(this,"lat"===e?$t:Ht);if(typeof b(this,Xt)<"u"&&typeof b(this,Kt)<"u"){let[t,n]=me(this,_u,By).call(this,b(this,Xt),b(this,Kt));return L(this,$t,t),L(this,Ht,n),b(this,"lat"===e?$t:Ht)}throw Error("MappedinCoordinate is missing x and y")}),"#getLatLon"),Xa=new WeakSet,Lf=s((function(e){if(b(this,Xt)&&b(this,Kt))return b(this,"x"===e?Xt:Kt);if(null!=b(this,$t)&&null!=b(this,Ht)){let[t,n]=me(this,ku,zy).call(this,b(this,$t),b(this,Ht));return L(this,Xt,t),L(this,Kt,n),b(this,"x"===e?Xt:Kt)}throw Error("MappedinCoordinate is missing lat and lon")}),"#getXY"),St=new WeakMap,Hr=new WeakMap,ku=new WeakSet,zy=s((function(e,t){let n=this.map.georeference[0],r=new Ae(n.target.x,n.target.y),i=new Ae(e,t),o=r.distanceTo(i),s=(r.finalBearingTo(i)+360)%360*Math.PI/180||0,a=o*(1/this.map.scale),l=s+this.map.getNorth(),u=Math.sin(l)*a,c=Math.cos(l)*a;return[n.control.x+u,n.control.y-c]}),"#latLonToXY"),_u=new WeakSet,By=s((function(e,t){let n,r=this.map.georeference[0],i=new Ae(r.target.x,r.target.y),o=e-r.control.x,s=r.control.y-t,a=Math.atan2(o,s);n=0===o&&0===s?0:0===o?s/Math.cos(a):o/Math.sin(a);let l=a-this.map.getNorth(),u=n/this.map._scale,c=i.destinationPoint(u,180*l/Math.PI);return[c.lat,c.lon]}),"#xyToLatLon"),$t=new WeakMap,Ht=new WeakMap,Xt=new WeakMap,Kt=new WeakMap,s($r,"MappedinCoordinate"),m($r,"__type","MappedinCoordinate");var yr=$r;v();var Ja,Xr,Za,qy=["name"],yn=class e{constructor(t,n){m(this,"__type",e.__type),A(this,Ja,void 0),A(this,Xr,void 0),A(this,Za,{}),m(this,"id",""),m(this,"name",""),L(this,Xr,n),L(this,Ja,t),Object.assign(this,n)}static is(t){return t.__type===e.__type}get maps(){let e=b(this,Za).maps;if(typeof e<"u")return e;let t=[],{maps:n}=b(this,Ja),{id:r}=b(this,Xr);for(let e=0,i=n.length;e<i;++e){let i=n[e];i.group===r&&t.push(i)}return b(this,Za).maps=t,t}static hydrate(t,n){return t.map((t=>new e(n,t)))}static async updateInPlace(t,n){let r=n||await e.fetch(t);for(let e=0;e<r.length;e++)for(let n of qy)t.mapGroups[e][n]=r[e][n]}static async fetch(t){var n;let r={fields:null==(n=t.options.things)?void 0:n.mapGroups.slice(),venue:t.options.venue};try{return(await Me(t.options,"map-group",r)).map((n=>new e(t,n)))}catch(e){return D.error("Fetch Map Groups:",e),[]}}toJSON(){let e={...b(this,Xr)};for(let t of qy)e[t]=this[t];return e}};Ja=new WeakMap,Xr=new WeakMap,Za=new WeakMap,s(yn,"MappedinMapGroup"),m(yn,"__type","MappedinMapGroup");var Ka=yn;v();var $y=Rt(Gy());v(),v();var br,Ct,Lt,jf=[0,4,6,8,10],bn=s((()=>{let e=new Array(16).fill(0),t=4294967296*Math.random();for(let n=0;n<e.length;n++)n>0&&!(3&n)&&(t=4294967296*Math.random()),e[n]=t>>>((3&n)<<3)&255;let n=e.map((e=>e.toString(16).padStart(2,"0")));return n[6]="4"+n[6][1],n[8]=["8","9","a","b"].includes(n[7][0])?n[7]:"a"+n[7][1],jf.map(((e,t)=>n.slice(e,t===jf.length-1?void 0:jf[t+1]).join(""))).join("-")}),"randomId"),Uy="mi-session-data",Yy="mi-local-data",Qa=class e{constructor(){A(this,Ct,void 0),A(this,Lt,void 0);try{let e=sessionStorage.getItem(Uy);L(this,Ct,e?JSON.parse(e):{id:bn()})}catch{L(this,Ct,{id:bn()})}try{let e=localStorage.getItem(Yy);L(this,Lt,e?JSON.parse(e):{deviceId:bn()})}catch{L(this,Lt,{deviceId:bn()})}b(this,Ct).id||(b(this,Ct).id=bn()),b(this,Lt).deviceId||(b(this,Lt).deviceId=bn())}static getInstance(){return b(this,br)||L(this,br,new e),b(this,br)}static ___clearInstance(){L(this,br,void 0)}saveSessionData(e,t){b(this,Ct)[e]=t;try{return sessionStorage.setItem(Uy,JSON.stringify(b(this,Ct))),!0}catch{return!1}}loadSessionData(e){let t=b(this,Ct)[e];if(null!=t)return t}saveLocalData(e,t){b(this,Lt)[e]=t;try{return localStorage.setItem(Yy,JSON.stringify(b(this,Lt))),!0}catch{return!1}}loadLocalData(e){let t=b(this,Lt)[e];if(null!=t)return t}};br=new WeakMap,Ct=new WeakMap,Lt=new WeakMap,s(Qa,"SafeStorage"),A(Qa,br,void 0);var eo=Qa;v();var Nf={venue:["slug","name","defaultMap","metadata","countrycode","tzid","logo","externalId","secureContentStorage","languages","topLocations","defaultLanguage","renderOptions"],nodes:["externalId","x","y","paths","accessible","operationHours"],vortexes:["externalId","nodes","types","accessible","filterFlags"],polygons:["vertexes","geometry","canvasBounds","layer","externalId","entrances","material"],locations:["externalId","name","type","picture","description","icon","logo","sortOrder","phone","operationHours","social","color","toMap","tags","shortName","detailsUrl","locationState","metadata","siblingGroups","gallery","showSmartLabelWhenImagePresent","amenity","filterFlags"],categories:["name","color","sortOrder","parents","icon","iconFromDefaultList"],maps:["name","subtitle","elevation","height","width","layers","shortName","scene","group","x_scale"],mapGroups:["name"],themes:["name","themeData"],rankings:["polygons"]};function xu(e){return/^[\da-f]{24}$/i.test(e)}function Wy(e,t=!1){let n="";if(null!=e){let r="?",i=t?Object.keys(e).filter((e=>!["slug","venue"].includes(e))):Object.keys(e);for(let t=0,o=i.length;t<o;++t){let o=i[t],s=e[o];null!=s&&(n+="".concat(r+encodeURIComponent(o),"=").concat(encodeURIComponent(s)),r="&")}}return n}function iP(e,t,n,r=!1){var i,o;return r?"".concat(e.supplementaryUrl).concat(t,"?venue=").concat(n.venue||n.slug):null!=(i=e.baseUrl)&&i.includes("gateway")?"".concat(e.baseUrl).concat(t,"/").concat(n.venue||n.slug).concat(Wy(n,null==(o=e.baseUrl)?void 0:o.includes("gateway"))):e.baseUrl+t+Wy(n)}async function Me(e,t,n,r=!1){return Gr(e,t,n,r,!0)}async function Gr(e,t,n,r=!1,i=!1){let o=iP(e,t,n,r),s=await Eu(e,o,r);if(!i&&Array.isArray(s)){if(1===s.length)return s[0];throw new Error("Invalid response object")}return s}function aP(e,t,n=!1){let r={language:e.language,clientId:e.clientId,clientSecret:e.clientSecret};n&&delete r.language,r.language&&(t+="&lang=".concat(encodeURIComponent(r.language)));let{headers:i}=e;i["Content-Type"]=i["Content-Type"]||"text/json",e.accessToken?i.Authorization="Bearer ".concat(e.accessToken):e.noAuth||e.clientId&&e.clientSecret&&(i["x-mappedin-key"]=btoa(e.clientId),i["x-mappedin-secret"]=btoa(e.clientSecret)),r.language&&(i["Accept-Language"]=r.language);let o={method:"GET",headers:i};return e.secure&&(t+="&withcdntoken"),{req:o,url:t}}async function Eu(e,t,n=!1){let r=aP(e,t,n),i=await it()(r.url,r.req);if(!i.ok)throw new Error("".concat(i.status," ").concat(i.statusText));return i.json()}function _e(e,t){e.indexOf(t)<0&&e.push(t)}function Vy([e,t],[n,r]){let i=new Ae(e,t),o=new Ae(n,r);return i.distanceTo(o)}function Ry(e){if(e.scale||e.x_scale)return 1/(e.scale||e.x_scale);let t;try{let n=e.georeference[0],r=e.georeference[2],i=new Ae(n.target.x,n.target.y),o=new Ae(r.target.x,r.target.y),s=i.distanceTo(o),a=n.control.x-r.control.x,l=n.control.y-r.control.y;t=Math.sqrt(a*a+l*l)/s}catch(n){t=1,D.warn(n),D.warn("Couldn't georeference ".concat(e.name||e.shortName||e.id,". Probably not enough geocoordinates."))}return t}function Ni(e){var t;return e instanceof hr?e.entrances.map((e=>e.id)):e instanceof hn?(null==(t=e.nodes)?void 0:t.map((e=>e.id)))||[]:[e.id]}async function Hy(e){let t={},{maps:n,images:r,scenes:i,polygons:o}=e;if(null!=r)try{let e=Object.keys(r).map((e=>fetch("data:image/png;base64,".concat(r[e])).then((e=>e.blob())).then((n=>{t[e]=n})).catch((e=>{D.error(e)}))));await Promise.all(e)}catch(e){D.error(e)}return n.forEach((e=>{var n;(null!=(n=e.scene)&&n.polygons||i&&i[e.id])&&(null!=i&&i[e.id]&&(e.scene||(e.scene={}),Object.defineProperty(e.scene,"polygons",{get:()=>i[e.id]})),null!=r&&(e.scene.images=e.scene.images.map((({filename:e})=>({filename:e,url:t[e]}))),e.scene.polygons.forEach((e=>{var n,r;if(null!=(n=null==e?void 0:e.image)&&n.url&&null!=(r=null==e?void 0:e.image)&&r.url){let n=e.image.url.split("/"),r=t[n[n.length-1]];r&&(e.image.url=r)}}))))})),null!=r&&o.forEach((e=>{var n;if(null!=(n=null==e?void 0:e.image)&&n.url){let n=e.image.url.split("/"),r=t[n[n.length-1]];r&&(e.image.url=r)}})),null!=e.images&&delete e.images,null!=e.scenes&&delete e.scenes,e}function Kr(e,t,n){let r;return function(...i){let o=this,a=s((function(){r=null,n||e.apply(o,i)}),"later"),l=n&&!r;clearTimeout(r),r=setTimeout(a,t),l&&e.apply(o,i)}}function Xy(e,t,n,r=0){if(!e||e<=0)return 0;let i=0;r>=0&&r<=1&&(i=r/10);let o=1e-5,s=1+(n-e)/(n-t)+i;return Math.max(1+o,Math.min(2-o,s))}function yu(){return eo.getInstance().loadLocalData("deviceId")}function bu(){return eo.getInstance().loadSessionData("id")}s(xu,"isGatewayKey"),s(Wy,"stringifyQuery"),s(iP,"buildUrl"),s(Me,"getArray"),s(Gr,"getObject"),s(aP,"constructParamsForRequest"),s(Eu,"generateAPIRequest"),s(_e,"addToSet"),s(Vy,"getDistanceBetweenLatLon"),s(Ry,"getMapScale"),s(Ni,"getNodesForNavigatable"),s(Hy,"populateBundledImagesAsBlobs"),s(Kr,"debounce"),s(Xy,"normalizeCategoryRank"),s(yu,"getDeviceIDFromStorage"),s(bu,"getSessionIDFromStorage");var Ky=s(((e,t)=>{if("string"==typeof e){if(void 0===t||!Array.isArray(t.polygons))return null;e=t.polygons.find((function(t){return t.id===e}))}let n=null;if(null!=e&&void 0!==e.locations&&e.locations.length>0){n=e.locations[0];for(let t=0,r=e.locations.length;t<r;t++){let r=e.locations[t];for(;void 0!==r.parent;)r=r.parent,r.polygons.includes(e)&&(n=r);if(void 0===r.parent&&r.polygons.includes(e))return r}}return n}),"getPrimaryLocationForPolygon");function Jy(e){var t;let n={...e};for(let[e,r]of Object.entries(Nf))n[e]=(0,$y.default)(r.concat(null!=(t=n[e])?t:[]));return n}function Ff(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return Zy(this.cover(t,n),t,n,e)}function Zy(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o,s,a,l,u,c,h,d,p=e._root,f={data:r},v=e._x0,g=e._y0,m=e._x1,y=e._y1;if(!p)return e._root=f,e;for(;p.length;)if((u=t>=(o=(v+m)/2))?v=o:m=o,(c=n>=(s=(g+y)/2))?g=s:y=s,i=p,!(p=p[h=c<<1|u]))return i[h]=f,e;if(a=+e._x.call(null,p.data),l=+e._y.call(null,p.data),t===a&&n===l)return f.next=p,i?i[h]=f:e._root=f,e;do{i=i?i[h]=new Array(4):e._root=new Array(4),(u=t>=(o=(v+m)/2))?v=o:m=o,(c=n>=(s=(g+y)/2))?g=s:y=s}while((h=c<<1|u)==(d=(l>=s)<<1|a>=o));return i[d]=p,i[h]=f,e}function Qy(e){var t,n,r,i,o=e.length,s=new Array(o),a=new Array(o),l=1/0,u=1/0,c=-1/0,h=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,t=e[n]))||isNaN(i=+this._y.call(null,t))||(s[n]=r,a[n]=i,r<l&&(l=r),r>c&&(c=r),i<u&&(u=i),i>h&&(h=i));if(l>c||u>h)return this;for(this.cover(l,u).cover(c,h),n=0;n<o;++n)Zy(this,s[n],a[n],e[n]);return this}function Df(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var s,a,l=i-n||1,u=this._root;n>e||e>=i||r>t||t>=o;)switch(a=(t<r)<<1|e<n,s=new Array(4),s[a]=u,u=s,l*=2,a){case 0:i=n+l,o=r+l;break;case 1:n=i-l,o=r+l;break;case 2:i=n+l,r=o-l;break;case 3:n=i-l,r=o-l}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function Rf(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e}function zf(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Fe(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function Bf(e,t,n){var r,i,o,s,a,l,u,c=this._x0,h=this._y0,d=this._x1,p=this._y1,f=[],v=this._root;for(v&&f.push(new Fe(v,c,h,d,p)),null==n?n=1/0:(c=e-n,h=t-n,d=e+n,p=t+n,n*=n);l=f.pop();)if(!(!(v=l.node)||(i=l.x0)>d||(o=l.y0)>p||(s=l.x1)<c||(a=l.y1)<h))if(v.length){var g=(i+s)/2,m=(o+a)/2;f.push(new Fe(v[3],g,m,s,a),new Fe(v[2],i,m,g,a),new Fe(v[1],g,o,s,m),new Fe(v[0],i,o,g,m)),(u=(t>=m)<<1|e>=g)&&(l=f[f.length-1],f[f.length-1]=f[f.length-1-u],f[f.length-1-u]=l)}else{var y=e-+this._x.call(null,v.data),b=t-+this._y.call(null,v.data),w=y*y+b*b;if(w<n){var _=Math.sqrt(n=w);c=e-_,h=t-_,d=e+_,p=t+_,r=v.data}}return r}function Vf(e){if(isNaN(o=+this._x.call(null,e))||isNaN(s=+this._y.call(null,e)))return this;var t,n,r,i,o,s,a,l,u,c,h,d,p=this._root,f=this._x0,v=this._y0,g=this._x1,m=this._y1;if(!p)return this;if(p.length)for(;;){if((u=o>=(a=(f+g)/2))?f=a:g=a,(c=s>=(l=(v+m)/2))?v=l:m=l,t=p,!(p=p[h=c<<1|u]))return this;if(!p.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(n=t,d=h)}for(;p.data!==e;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):t?(i?t[h]=i:delete t[h],(p=t[0]||t[1]||t[2]||t[3])&&p===(t[3]||t[2]||t[1]||t[0])&&!p.length&&(n?n[d]=p:this._root=p),this):(this._root=i,this)}function eb(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function qf(){return this._root}function Gf(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e}function Uf(e){var t,n,r,i,o,s,a=[],l=this._root;for(l&&a.push(new Fe(l,this._x0,this._y0,this._x1,this._y1));t=a.pop();)if(!e(l=t.node,r=t.x0,i=t.y0,o=t.x1,s=t.y1)&&l.length){var u=(r+o)/2,c=(i+s)/2;(n=l[3])&&a.push(new Fe(n,u,c,o,s)),(n=l[2])&&a.push(new Fe(n,r,c,u,s)),(n=l[1])&&a.push(new Fe(n,u,i,o,c)),(n=l[0])&&a.push(new Fe(n,r,i,u,c))}return this}function Yf(e){var t,n=[],r=[];for(this._root&&n.push(new Fe(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var i=t.node;if(i.length){var o,s=t.x0,a=t.y0,l=t.x1,u=t.y1,c=(s+l)/2,h=(a+u)/2;(o=i[0])&&n.push(new Fe(o,s,a,c,h)),(o=i[1])&&n.push(new Fe(o,c,a,l,h)),(o=i[2])&&n.push(new Fe(o,s,h,c,u)),(o=i[3])&&n.push(new Fe(o,c,h,l,u))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this}function tb(e){return e[0]}function Wf(e){return arguments.length?(this._x=e,this):this._x}function nb(e){return e[1]}function $f(e){return arguments.length?(this._y=e,this):this._y}function Jr(e,t,n){var r=new Hf(null==t?tb:t,null==n?nb:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function Hf(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function rb(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}s(Jy,"mergeThings"),v(),v(),v(),v(),s(Ff,"default"),s(Zy,"add"),s(Qy,"addAll"),v(),s(Df,"default"),v(),s(Rf,"default"),v(),s(zf,"default"),v(),v(),s(Fe,"default"),s(Bf,"default"),v(),s(Vf,"default"),s(eb,"removeAll"),v(),s(qf,"default"),v(),s(Gf,"default"),v(),s(Uf,"default"),v(),s(Yf,"default"),v(),s(tb,"defaultX"),s(Wf,"default"),v(),s(nb,"defaultY"),s($f,"default"),s(Jr,"quadtree"),s(Hf,"Quadtree"),s(rb,"leaf_copy");var Qe=Jr.prototype=Hf.prototype;Qe.copy=function(){var e,t,n=new Hf(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=rb(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=rb(t));return n},Qe.add=Ff,Qe.addAll=Qy,Qe.cover=Df,Qe.data=Rf,Qe.extent=zf,Qe.find=Bf,Qe.remove=Vf,Qe.removeAll=eb,Qe.root=qf,Qe.size=Gf,Qe.visit=Uf,Qe.visitAfter=Yf,Qe.x=Wf,Qe.y=$f;var Zt,ge,Jt=class e{constructor(e){A(this,Zt,void 0),m(this,"categories"),m(this,"categoriesByExternalId"),m(this,"locations"),m(this,"locationsByExternalId"),m(this,"vortexes"),m(this,"vortexesByExternalId"),m(this,"maps"),m(this,"mapsByExternalId"),m(this,"nodes"),m(this,"nodesByExternalId"),m(this,"polygons"),m(this,"polygonsByExternalId"),m(this,"events"),m(this,"eventsByExternalId"),m(this,"mapGroups"),m(this,"mapGroupsByExternalId"),m(this,"locationStates"),m(this,"rankings"),m(this,"languages",{}),A(this,ge,{}),L(this,Zt,e)}get polygonsByMapId(){if(b(this,ge).polygonsByMapId)return b(this,ge).polygonsByMapId;let e,t={};for(let n=0,r=b(this,Zt).polygons.length;n<r;++n)e=b(this,Zt).polygons[n],t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e);let n=Object.entries(t).reduce(((e,[t,n])=>(e.set(t,n),e)),new Map);return b(this,ge).polygonsByMapId=n,b(this,ge).polygonsByMapId}get nodesByMapId(){if(b(this,ge).nodesByMapId)return b(this,ge).nodesByMapId;let e,t={};for(let n=0,r=b(this,Zt).nodes.length;n<r;++n)e=b(this,Zt).nodes[n],e.map&&(t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e));let n=Object.entries(t).reduce(((e,[t,n])=>(e.set(t,n),e)),new Map);return b(this,ge).nodesByMapId=n,b(this,ge).nodesByMapId}findNearestNodeOnMap(e,t){var n;if(b(this,ge).nodeTreesByMap||(b(this,ge).nodeTreesByMap=new Map),!b(this,ge).nodeTreesByMap.has(e)){let t=null!=(n=this.nodesByMapId.get(e))?n:[],r=Jr();r.x((e=>e.x)),r.y((e=>e.y)),r.addAll(t),b(this,ge).nodeTreesByMap.set(e,r)}return b(this,ge).nodeTreesByMap.get(e).find(t.x,t.y)}findNodeWithinRadiusOnMap(e,t,n){var r;if(b(this,ge).nodeTreesByMap||(b(this,ge).nodeTreesByMap=new Map),!b(this,ge).nodeTreesByMap.has(e)){let t=null!=(r=this.nodesByMapId.get(e))?r:[],n=Jr();n.x((e=>e.x)),n.y((e=>e.y)),n.addAll(t),b(this,ge).nodeTreesByMap.set(e,n)}let i=b(this,ge).nodeTreesByMap.get(e),o=[],s=t.x,a=t.y;return i.visit(((e,t,r,i,l)=>{if(e&&!e.length)do{let t=e.data;Math.sqrt((t.x-s)**2+(t.y-a)**2)<=n&&o.push(t)}while(e=e.next);let u=s-Math.max(t,Math.min(i,s)),c=a-Math.max(r,Math.min(l,a));return u*u+c*c>=n*n})),o}get locationsByMapId(){if(b(this,ge).locationsByMapId)return b(this,ge).locationsByMapId;let e,t={};for(let n=0,r=b(this,Zt).locations.length;n<r;++n){e=b(this,Zt).locations[n];for(let n=0,r=e.polygons.length;n<r;++n)t[e.polygons[n].map.id]||(t[e.polygons[n].map.id]=[]),-1===t[e.polygons[n].map.id].indexOf(e)&&t[e.polygons[n].map.id].push(e);for(let n=0,r=e.nodes.length;n<r;++n){let r=e.nodes[n];t[r.map.id]||(t[r.map.id]=[]),-1===t[r.map.id].indexOf(e)&&t[r.map.id].push(e)}}let n=Object.entries(t).reduce(((e,[t,n])=>(e.set(t,n),e)),new Map);return b(this,ge).locationsByMapId=n,b(this,ge).locationsByMapId}static create(t){return e.instances.has(t)||e.instances.set(t,new e(t)),e.instances.get(t)}static clearInstance(t){e.instances.has(t)&&e.instances.delete(t)}};Zt=new WeakMap,ge=new WeakMap,s(Jt,"MappedinCache"),m(Jt,"instances",new WeakMap);var Xf=Jt,qe=Xf,Ma=(e=>(e.CATEGORY="categories",e.EVENT="events",e.LOCATION="locations",e.MAPGROUP="mapGroups",e.MAP="maps",e.NODE="nodes",e.POLYGON="polygons",e.VORTEX="vortexes",e))(Ma||{}),to={categories:mr,locations:hn,vortexes:Aa,maps:Wa,nodes:ka,polygons:hr,venue:vr,events:Va,mapGroups:Ka,themes:wu,locationStates:Ua,rankings:za},Tu=(e=>(e[e.LANGUAGE_CHANGED=0]="LANGUAGE_CHANGED",e))(Tu||{});v(),v(),v(),v();var et=6371008.8,ib={centimeters:100*et,centimetres:100*et,degrees:et/111325,feet:3.28084*et,inches:39.37*et,kilometers:et/1e3,kilometres:et/1e3,meters:et,metres:et,miles:et/1609.344,millimeters:1e3*et,millimetres:1e3*et,nauticalmiles:et/1852,radians:1,yards:1.0936*et},c3={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/et,yards:1.0936133};function Gn(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function tt(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Kf(e[0])||!Kf(e[1]))throw new Error("coordinates must contain numbers");return Gn({type:"Point",coordinates:e},t,n)}function wn(e,t,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return Gn({type:"LineString",coordinates:e},t,n)}function wr(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function ab(e,t){void 0===t&&(t="kilometers");var n=ib[t];if(!n)throw new Error(t+" units is invalid");return e*n}function ob(e,t){void 0===t&&(t="kilometers");var n=ib[t];if(!n)throw new Error(t+" units is invalid");return e/n}function no(e){return 180*(e%(2*Math.PI))/Math.PI}function at(e){return e%360*Math.PI/180}function Kf(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Iu(e,t,n){if(null!==e)for(var r,i,o,s,a,l,u,c,h=0,d=0,p=e.type,f="FeatureCollection"===p,v="Feature"===p,g=f?e.features.length:1,m=0;m<g;m++){a=(c=!!(u=f?e.features[m].geometry:v?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var y=0;y<a;y++){var b=0,w=0;if(null!==(s=c?u.geometries[y]:u)){l=s.coordinates;var _=s.type;switch(h=!n||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===t(l,d,m,b,w))return!1;d++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===t(l[r],d,m,b,w))return!1;d++,"MultiPoint"===_&&b++}"LineString"===_&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-h;i++){if(!1===t(l[r][i],d,m,b,w))return!1;d++}"MultiLineString"===_&&b++,"Polygon"===_&&w++}"Polygon"===_&&b++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(w=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-h;o++){if(!1===t(l[r][i][o],d,m,b,w))return!1;d++}w++}b++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===Iu(s.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Jf(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function oP(e,t){var n,r,i,o,s,a,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,v=p?e.features.length:1;for(n=0;n<v;n++){for(a=p?e.features[n].geometry:f?e.geometry:e,u=p?e.features[n].properties:f?e.properties:{},c=p?e.features[n].bbox:f?e.bbox:void 0,h=p?e.features[n].id:f?e.id:void 0,s=(l=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=l?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,d,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],d,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,u,c,h))return!1;d++}}function ro(e,t){oP(e,(function(e,n,r,i,o){var s,a=null===e?null:e.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return!1!==t(Gn(e,r,{bbox:i,id:o}),n,0)&&void 0}switch(a){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u=e.coordinates[l];if(!1===t(Gn({type:s,coordinates:u},r),n,l))return!1}}))}function sP(e,t){ro(e,(function(e,n,r){var i=0;if(e.geometry){var o=e.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var s,a=0,l=0,u=0;if(!1===Iu(e,(function(o,c,h,d,p){if(void 0===s||n>a||d>l||p>u)return s=o,a=n,l=d,u=p,void(i=0);var f=wn([s,o],e.properties);if(!1===t(f,n,r,p,i))return!1;i++,s=o})))return!1}}}))}function sb(e,t,n){var r=n,i=!1;return sP(e,(function(e,o,s,a,l){r=!1===i&&void 0===n?e:t(r,e,o,s,a,l),i=!0})),r}function Zf(e){var t=[1/0,1/0,-1/0,-1/0];return Iu(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}s(Gn,"feature"),s(tt,"point"),s(wn,"lineString"),s(wr,"featureCollection"),s(ab,"radiansToLength"),s(ob,"lengthToRadians"),s(no,"radiansToDegrees"),s(at,"degreesToRadians"),s(Kf,"isNumber"),s(Iu,"coordEach"),s(Jf,"featureEach"),s(oP,"geomEach"),s(ro,"flattenEach"),s(sP,"segmentEach"),s(sb,"segmentReduce"),s(Zf,"bbox"),Zf.default=Zf;var Ou=Zf;function Qt(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function dt(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function ub(e,t){return"FeatureCollection"===e.type?"FeatureCollection":"GeometryCollection"===e.type?"GeometryCollection":"Feature"===e.type&&null!==e.geometry?e.geometry.type:e.type}function uP(e,t,n){void 0===n&&(n={});var r=Qt(e),i=Qt(t),o=at(i[1]-r[1]),s=at(i[0]-r[0]),a=at(r[1]),l=at(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(s/2),2)*Math.cos(a)*Math.cos(l);return ab(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),n.units)}v(),v(),v(),v(),s(Qt,"getCoord"),s(dt,"getCoords"),s(ub,"getType"),s(uP,"distance");var Un=uP;function Au(e,t){return void 0===t&&(t={}),sb(e,(function(e,n){var r=n.geometry.coordinates;return e+Un(r[0],r[1],t)}),0)}function Su(e,t,n){if(void 0===n&&(n={}),!0===n.final)return lP(e,t);var r=Qt(e),i=Qt(t),o=at(r[0]),s=at(i[0]),a=at(r[1]),l=at(i[1]),u=Math.sin(s-o)*Math.cos(l),c=Math.cos(a)*Math.sin(l)-Math.sin(a)*Math.cos(l)*Math.cos(s-o);return no(Math.atan2(u,c))}function lP(e,t){var n=Su(t,e);return n=(n+180)%360}function Cu(e,t,n,r){void 0===r&&(r={});var i=Qt(e),o=at(i[0]),s=at(i[1]),a=at(n),l=ob(t,r.units),u=Math.asin(Math.sin(s)*Math.cos(l)+Math.cos(s)*Math.sin(l)*Math.cos(a));return tt([no(o+Math.atan2(Math.sin(a)*Math.sin(l)*Math.cos(s),Math.cos(l)-Math.sin(s)*Math.sin(u))),no(u)],r.properties)}function cP(e){if(!e)throw new Error("geojson is required");var t=[];return ro(e,(function(e){dP(e,t)})),wr(t)}function dP(e,t){var n=[],r=e.geometry;if(null!==r){switch(r.type){case"Polygon":n=dt(r);break;case"LineString":n=[dt(r)]}n.forEach((function(n){pP(n,e.properties).forEach((function(e){e.id=t.length,t.push(e)}))}))}}function pP(e,t){var n=[];return e.reduce((function(e,r){var i=wn([e,r],t);return i.bbox=fP(e,r),n.push(i),r})),n}function fP(e,t){var n=e[0],r=e[1],i=t[0],o=t[1];return[n<i?n:i,r<o?r:o,n>i?n:i,r>o?r:o]}s(Au,"length"),v(),v(),v(),s(Su,"bearing"),s(lP,"calculateFinalBearing"),v(),s(Cu,"destination"),v(),v(),s(cP,"lineSegment"),s(dP,"lineSegmentFeature"),s(pP,"createSegments"),s(fP,"bbox");var Qf=cP,Tb=Rt(xb(),1);function BP(e,t){var n={},r=[];if("LineString"===e.type&&(e=Gn(e)),"LineString"===t.type&&(t=Gn(t)),"Feature"===e.type&&"Feature"===t.type&&null!==e.geometry&&null!==t.geometry&&"LineString"===e.geometry.type&&"LineString"===t.geometry.type&&2===e.geometry.coordinates.length&&2===t.geometry.coordinates.length){var i=Eb(e,t);return i&&r.push(i),wr(r)}var o=(0,Tb.default)();return o.load(Qf(t)),Jf(Qf(e),(function(e){Jf(o.search(e),(function(t){var i=Eb(e,t);if(i){var o=dt(i).join(",");n[o]||(n[o]=!0,r.push(i))}}))})),wr(r)}function Eb(e,t){var n=dt(e),r=dt(t);if(2!==n.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==r.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=n[0][0],o=n[0][1],s=n[1][0],a=n[1][1],l=r[0][0],u=r[0][1],c=r[1][0],h=r[1][1],d=(h-u)*(s-i)-(c-l)*(a-o);if(0===d)return null;var p=((c-l)*(o-u)-(h-u)*(i-l))/d,f=((s-i)*(o-u)-(a-o)*(i-l))/d;return p>=0&&p<=1&&f>=0&&f<=1?tt([i+p*(s-i),o+p*(a-o)]):null}s(BP,"lineIntersect"),s(Eb,"intersects");var Pb=BP;function VP(e,t,n){void 0===n&&(n={});var r=tt([1/0,1/0],{dist:1/0}),i=0;return ro(e,(function(e){for(var o=dt(e),s=0;s<o.length-1;s++){var a=tt(o[s]);a.properties.dist=Un(t,a,n);var l=tt(o[s+1]);l.properties.dist=Un(t,l,n);var u=Un(a,l,n),c=Math.max(a.properties.dist,l.properties.dist),h=Su(a,l),d=Cu(t,c,h+90,n),p=Cu(t,c,h-90,n),f=Pb(wn([d.geometry.coordinates,p.geometry.coordinates]),wn([a.geometry.coordinates,l.geometry.coordinates])),v=null;f.features.length>0&&((v=f.features[0]).properties.dist=Un(t,v,n),v.properties.location=i+Un(a,v,n)),a.properties.dist<r.properties.dist&&((r=a).properties.index=s,r.properties.location=i),l.properties.dist<r.properties.dist&&((r=l).properties.index=s+1,r.properties.location=i+u),v&&v.properties.dist<r.properties.dist&&((r=v).properties.index=s),i+=u}})),r}s(VP,"nearestPointOnLine");var ao=VP;function qP(e,t,n){var r=dt(n);if("LineString"!==ub(n))throw new Error("line must be a LineString");for(var i,o=ao(n,e),s=ao(n,t),a=[(i=o.properties.index<=s.properties.index?[o,s]:[s,o])[0].geometry.coordinates],l=i[0].properties.index+1;l<i[1].properties.index+1;l++)a.push(r[l]);return a.push(i[1].geometry.coordinates),wn(a,n.properties)}s(qP,"lineSlice");var ph=qP;function GP(e,t){void 0===t&&(t={});var n=Ou(e);return tt([(n[0]+n[2])/2,(n[1]+n[3])/2],t.properties,t)}v(),s(GP,"center");var Ib=GP;function UP(e,t,n){void 0===n&&(n={});for(var r=Qt(e),i=dt(t),o=0;o<i.length-1;o++){var s=!1;if(n.ignoreEndVertices&&(0===o&&(s="start"),o===i.length-2&&(s="end"),0===o&&o+1===i.length-1&&(s="both")),YP(i[o],i[o+1],r,s,typeof n.epsilon>"u"?null:n.epsilon))return!0}return!1}function YP(e,t,n,r,i){var o=n[0],s=n[1],a=e[0],l=e[1],u=t[0],c=t[1],h=u-a,d=c-l,p=(n[0]-a)*d-(n[1]-l)*h;if(null!==i){if(Math.abs(p)>i)return!1}else if(0!==p)return!1;return r?"start"===r?Math.abs(h)>=Math.abs(d)?h>0?a<o&&o<=u:u<=o&&o<a:d>0?l<s&&s<=c:c<=s&&s<l:"end"===r?Math.abs(h)>=Math.abs(d)?h>0?a<=o&&o<u:u<o&&o<=a:d>0?l<=s&&s<c:c<s&&s<=l:"both"===r&&(Math.abs(h)>=Math.abs(d)?h>0?a<o&&o<u:u<o&&o<a:d>0?l<s&&s<c:c<s&&s<l):Math.abs(h)>=Math.abs(d)?h>0?a<=o&&o<=u:u<=o&&o<=a:d>0?l<=s&&s<=c:c<=s&&s<=l}v(),s(UP,"booleanPointOnLine"),s(YP,"isPointOnLineSegment");var Ob=UP,WP=1e-7,Ab=.005,Sb=["connection.json","manifest.geojson","map.geojson","node.geojson","styles.json","mapstack.geojson"];function fh(e,t){let n=KP(t);return wr(e.features.reduce(((e,t)=>{let r=[t],{properties:i}=t,o=(i.entrances||[]).reduce(((e,t)=>(n.has(t)&&e.push(n.get(t)),e)),[]);return o.length&&(r=$P(t,o)),e.push(...r),e}),[]))}function $P(e,t){return t.reduce(((e,t)=>{let n={epsilon:WP},r=e.findIndex((e=>Ob(Ib(t),e,n))),i=e[r];if(i){let[n,o]=XP(i,t);e.splice(r,1,n,o)}return e}),[e])}function HP(e){return null!=e&&(null!=e.polygons||null!=e.lineStrings)}function XP(e,t){let{coordinates:n}=t.geometry,{coordinates:r}=e.geometry,i=n.map((t=>ao(e,tt(t))));return r.reduce(((t,n)=>{let r=ph(tt(n),i[0],e),o=ph(tt(n),i[1],e),s=Au(r)<Au(o)?r:o;return s.properties={...e.properties,entrances:[]},t.concat([s])}),[])}function Cb(e){let t=new Map;for(let n in e){let r=e[n];if(!HP(r))continue;let{altitude:i,color:o,width:s,height:a,opacity:l}=r,u={altitude:i,color:o,width:s,height:a,opacity:l,type:n};(r.polygons||r.lineStrings).forEach((e=>{t.set(e,u)}))}return t}function KP(e){return new Map(e.features.map((e=>{let{properties:t}=e,{id:n}=t;return[n,e]})))}function Lb(e){if(0===e.length)return;let t;for(let n of e)if("number"==typeof n.elevation){if(!t){t=n;continue}"number"==typeof t.elevation&&(t=Math.abs(n.elevation)===Math.abs(t.elevation)?n.elevation>t.elevation?n:t:Math.abs(n.elevation)<Math.abs(t.elevation)?n:t)}return t}function bI(e){if(null==e||"object"!=typeof e)return!1;for(let t of Sb)if("Uint8Array"!==e[t][Symbol.toStringTag])return!1;return!0}function wI(e){var t;if(null==e||"object"!=typeof e)return!1;let n=["building.geojson","category.geojson","location.geojson","manifest.geojson"];for(let r of n)if("Uint8Array"!==(null==(t=null==e?void 0:e[r])?void 0:t[Symbol.toStringTag]))return!1;return!0}async function y0(e){return new Promise((async(t,n)=>{try{if(null==e||"object"!=typeof e)throw new Error("Error parsing data! Unzipping failed.");if("Uint8Array"!==e[Symbol.toStringTag])throw new Error("Unexpected file type! Unzipping failed.");let n=(await Promise.resolve().then((()=>(Dh(),Fh)))).unzipSync(e);if(!wI(n))throw new Error("MVF is missing some expect static files. Unzipping failed.");let r={"building.geojson":n["building.geojson"],"category.geojson":n["category.geojson"],"location.geojson":n["location.geojson"],"manifest.geojson":n["manifest.geojson"],space:{},obstruction:{},node:{},level:{},connection:{}},i=Object.keys(n);for(let e of i){if(0===n[e].length)continue;let t=e.split("/");if(t.length<0)throw new Error("Encounted a file with no name! Unzipping failed.");if(t.length>2)throw new Error("Encountered unexpected nesting in MVF! Unzipping failed.");if(1!==t.length){if("image"===t[0]){D.warn("MVF unzipping encountered an image. Ignoring as this case has not been implemented.");continue}null==r[t[0]]&&(r[t[0]]={}),r[t[0]][t[1]]=n[e]}}t(r)}catch(e){n(e)}}))}async function zh(e){return new Promise((async(t,n)=>{try{if(null==e||"object"!=typeof e)throw new Error("Error parsing data! Unzipping failed.");if("Uint8Array"!==e[Symbol.toStringTag])throw new Error("Unexpected file type! Unzipping failed.");let n=(await Promise.resolve().then((()=>(Dh(),Fh)))).unzipSync(e);if(!bI(n))throw new Error("MVF is missing some expect static files. Unzipping failed.");let r={"connection.json":n["connection.json"],"manifest.geojson":n["manifest.geojson"],"node.geojson":n["node.geojson"],"map.geojson":n["map.geojson"],"mapstack.geojson":n["mapstack.geojson"],"styles.json":n["styles.json"],space:{},obstruction:{},entrance:{}},i=Object.keys(n);for(let e of i){if(0===n[e].length)continue;let t=e.split("/");if(t.length<0)throw new Error("Encounted a file with no name! Unzipping failed.");if(t.length>2)throw new Error("Encountered unexpected nesting in MVF! Unzipping failed.");if(1!==t.length){if("image"===t[0]){D.warn("MVF unzipping encountered an image. Ignoring as this case has not been implemented.");continue}null==r[t[0]]&&(r[t[0]]={}),r[t[0]][t[1]]=n[e]}}t(r)}catch(e){n(e)}}))}function b0(e){let[t,n,r,i]=Ou(e);return{minLat:n,minLong:t,maxLat:i,maxLong:r}}function kI(e,t,n){let r=n.createGeoreferences(),i=new Set;t.forEach((e=>{e.layer&&i.add(e.layer)}));let o=e.id||"",s=e.externalId||o||"",a=e.elevation||0,l=[...i].map((e=>({id:e,visible:!0}))),u=1/n.mapScale;return{id:o,georeference:r,name:s,shortName:s,scene:{polygons:t},elevation:a,scale:u,x_scale:u,layers:l,width:n.widthInMapUnits,height:n.heightInMapUnits}}s(fh,"processObstructions"),s($P,"splitObstructionByAllEntrances"),s(HP,"isPolygonStyle"),s(XP,"splitObstructionByEntrance"),s(Cb,"getStylesMap"),s(KP,"getEntranceMap"),v(),v(),s(Lb,"findMapWithElevationClosestToZero"),v(),s(bI,"validateStaticMVFFiles"),s(wI,"validateStaticMVFv1Files"),s(y0,"unzipMVFv1"),s(zh,"unzipMVF"),s(b0,"getMapExtent"),s(kI,"convertMap");var Vh=class{constructor(e){m(this,"mapExtent"),m(this,"stretchRatio"),m(this,"midLat"),m(this,"midLong"),m(this,"mapUnitRatio",1e6),m(this,"latDistance"),m(this,"longDistance"),m(this,"mapScale"),m(this,"widthInMapUnits"),m(this,"heightInMapUnits"),this.mapExtent=e;let{minLat:t,minLong:n,maxLat:r,maxLong:i}=e,o=(t+r)/2,s=(n+i)/2,a=new Ae(o,i),l=new Ae(o,n),u=new Ae(t,s),c=new Ae(r,s);this.latDistance=u.distanceTo(c),this.longDistance=a.distanceTo(l);let h=this.latDistance/this.longDistance,d=(r-t)/(i-n);this.stretchRatio=h/d,this.midLat=o,this.midLong=s,this.widthInMapUnits=(i-n)*this.mapUnitRatio,this.heightInMapUnits=(r-t)*this.mapUnitRatio*this.stretchRatio,this.mapScale=this.widthInMapUnits/this.longDistance}convert(e){let t=e[1],n=(e[0]-this.midLong)*this.mapUnitRatio,r=(this.midLat-t)*this.mapUnitRatio*this.stretchRatio;return{x:n+this.widthInMapUnits/2,y:r+this.heightInMapUnits/2}}createGeoreferences(){let{minLat:e,minLong:t,maxLat:n,maxLong:r}=this.mapExtent;return[[e,t],[e,r],[n,r],[n,t]].map((e=>({target:{x:e[0],y:e[1]},control:this.convert([e[1],e[0]])})))}};s(Vh,"CoordinateConverter");var Hu=Vh;function _I(e,t){let n=[];return e.forEach(((r,i)=>{let o=r.properties.map||"",s=t.get(o);if(s){let t=s.convert(r.geometry.coordinates),a=r.properties.externalId||"",l=[];r.properties.neighbors.forEach((t=>{var n;let r=null!=(n=t.weight)?n:0,i=e.get(t.id);i&&i.properties.map===o&&l.push({node:i.properties.id,map:i.properties.map,weight:r})})),n.push({id:i,map:o,externalId:a,paths:l,...t})}})),n}function MI(e,t,n){let r=[];return e.features.forEach((e=>{let i=n.convert(e.geometry.coordinates);r.push({id:e.properties.id,x:i.x,y:i.y,map:t,paths:e.properties.neighbors.map((e=>({node:e,map:t})))})})),r}s(_I,"convertNodes"),s(MI,"convertNodes_MVFv1");var m0=s(((e,t,n,r,i,o)=>{var s,a,l;let u,c=[],h=Math.max(o.widthInMapUnits,o.heightInMapUnits)/1e3,d=i.Walls,p=null!=(s=i.ExteriorWalls)?s:d,f={map:e,id:"walls"+e,externalId:"walls"+e,layer:"Wall",isLineStringSegment:!0,geometry:{visible:!0,position:{x:0,y:0,z:((null==d?void 0:d.altitude)||0)*o.mapScale/h},scale:{x:1,y:1,z:((null==d?void 0:d.height)||1)*o.mapScale/h},width:null==d?void 0:d.width},material:{color:(null==d?void 0:d.color)||"#000000"},vertexes:[]},v={map:e,id:"externalWalls"+e,externalId:"externalWalls"+e,layer:"ExternalWall",isLineStringSegment:!0,geometry:{visible:!0,position:{x:0,y:0,z:((null==p?void 0:p.altitude)||0)*o.mapScale/h},scale:{x:1,y:1,z:((null==p?void 0:p.height)||1)*o.mapScale/h},width:null==p?void 0:p.width},material:{color:(null==p?void 0:p.color)||"#000000"},vertexes:[]};for(let i=0;i<t.features.length;i++){let s=t.features[i];if("Point"===s.geometry.type)continue;let d="desk-entrance"===(null==(a=s.properties.kind)?void 0:a.toLowerCase()),p=(d?s.properties.externalId:s.properties.id)||"",g=s.properties.externalId||"",m=n.get(p)||[];if("destinationNodes"in s.properties&&s.properties.destinationNodes.forEach((t=>{m.push({map:e,id:t})})),d)n.set(g,m);else{let n=r.get(s.properties.id),a=s.properties.center?o.convert(s.properties.center):void 0,d=s.geometry.coordinates.slice(1).map((e=>e.map((e=>o.convert(e))))),y=s.properties.kind||"",b="void"===y.toLowerCase(),w=1-(i+1)/t.features.length*Ab;"LineString"===s.geometry.type&&"wall"===(null==(l=s.properties.kind)?void 0:l.toLowerCase())?(u=s.geometry.coordinates.map((e=>o.convert(e))),s.properties.footprintComponent?v.vertexes.push(u):f.vertexes.push(u)):(u=s.geometry.coordinates[0].map((e=>o.convert(e))),c.push({entrances:m,map:e,id:p,externalId:g,layer:y,geometry:{visible:!b,position:{x:0,y:0,z:((null==n?void 0:n.altitude)||0)*o.mapScale/h},scale:{x:1,y:1,z:((null==n?void 0:n.height)||1)*o.mapScale/h*w},width:null==n?void 0:n.width},material:{color:(null==n?void 0:n.color)||"#000000"},vertexes:u,center:a,holes:d}))}}return f.vertexes.length>0&&c.push(f),v.vertexes.length>0&&c.push(v),c}),"generateMappedinPolygons"),v0=s(((e,t,n)=>{let r=[];return t.features.forEach((t=>{if(!t.geometry.coordinates[0].forEach)return;let i=t.properties,o=t.geometry.coordinates[0].map((e=>n.convert(e))),s=t.geometry.coordinates.slice(1).map((e=>e.map((e=>n.convert(e))))),a=Math.max(n.widthInMapUnits,n.heightInMapUnits)/1e3,l=[];"entrances"in t.properties&&t.properties.entrances.forEach((e=>l.push({id:"n_"+e.id,map:e.level}))),r.push({entrances:null!=l?l:[],map:e,id:t.properties.id||"",externalId:t.properties.externalId||"",layer:t.properties.layer||"Polygon",geometry:{visible:!0,position:{x:0,y:0,z:((null==i?void 0:i.altitude)||0)*n.mapScale/a},scale:{x:1,y:1,z:((null==i?void 0:i.height)||1)*n.mapScale/a}},material:{color:(null==i?void 0:i.color)||"#000000"},vertexes:o,holes:s})})),r}),"generateMappedinPolygons_MVFv1");function xI(e,t,n,r,i,o,s){let a=m0(e,n,r,i,o,s),l=m0(e,t,r,i,o,s);return a.concat(l)}function EI(e,t){let n=[];return e.forEach((e=>{var r;let i;for(let n of e.nodes){let r=t.get(n);if(r)for(let t of r.properties.neighbors)if(e.nodes.includes(t.id)&&t.weight){i=t.weight;break}if(i)break}n.push({id:e.id||"",name:e.externalId||"",type:e.type||"",weight:null!=i?i:1e3,multiplier:1,nodes:e.nodes||[],accessible:null!=(r=e.accessible)&&r})})),n}function TI(e){let t=new Map;return e.features.forEach((e=>{var n,r,i,o,s,a,l;let u="",c=["n_".concat(e.properties.id)];e.properties.destinations.forEach((e=>{let t=e.split("-");u=t[0],c.push("n_".concat(t[1]))}));let h=null!=(r=null==(n=t.get(u))?void 0:n.nodes)?r:[],d=new Set([...h,...c]);t.set(u,{id:u,name:null!=(i=e.properties.name)?i:"",type:null!=(o=e.properties.type)?o:"",weight:null!=(s=e.properties.weight)?s:1e3,multiplier:null!=(a=e.properties.multiplier)?a:1,nodes:Array.from(d),accessible:null!=(l=e.properties.accessible)&&l})})),Array.from(t.values())}function w0(e,t){if(t)for(let n in t)t.hasOwnProperty(n)&&Object.assign(e[n],t[n]);return e}function Bh(e){let t=new TextDecoder,n=t.decode.bind(t);try{let t={"connection.json":JSON.parse(n(e["connection.json"])),"manifest.geojson":JSON.parse(n(e["manifest.geojson"])),"styles.json":JSON.parse(n(e["styles.json"])),"map.geojson":JSON.parse(n(e["map.geojson"])),"mapstack.geojson":JSON.parse(n(e["mapstack.geojson"])),"node.geojson":JSON.parse(n(e["node.geojson"])),obstruction:{},space:{},entrance:{},annotation:{}};if(null!=e.annotation){let r=Object.keys(e.annotation);for(let i of r){let r=i.replace(/\.json|\.geojson/g,"");t.annotation[r]=JSON.parse(n(e.annotation[i]))}}let r=Object.keys(e.space);for(let i of r){let r=i.replace(/\.json|\.geojson/g,"");t.space[r]=JSON.parse(n(e.space[i]))}let i=Object.keys(e.obstruction);for(let r of i){let i=r.replace(/\.json|\.geojson/g,"");t.obstruction[i]=JSON.parse(n(e.obstruction[r]))}let o=Object.keys(e.entrance);for(let r of o){let i=r.replace(/\.json|\.geojson/g,"");t.entrance[i]=JSON.parse(n(e.entrance[r]))}return t}catch(e){throw D.error(e),new Error("MVF parsing failed! Probably encountered a bad file.")}}function k0(e){let t=new TextDecoder,n=t.decode.bind(t);try{let t={"manifest.geojson":JSON.parse(n(e["manifest.geojson"])),"building.geojson":JSON.parse(n(e["building.geojson"])),"category.geojson":JSON.parse(n(e["category.geojson"])),"location.geojson":JSON.parse(n(e["location.geojson"])),obstruction:{},space:{},level:{},node:{},connection:{}},r=Object.keys(e.space);for(let i of r){let r=i.replace(/\.json|\.geojson/g,"");t.space[r]=JSON.parse(n(e.space[i]))}let i=Object.keys(e.obstruction);for(let r of i){let i=r.replace(/\.json|\.geojson/g,"");t.obstruction[i]=JSON.parse(n(e.obstruction[r]))}let o=Object.keys(e.node);for(let r of o){let i=r.replace(/\.json|\.geojson/g,"");t.node[i]=JSON.parse(n(e.node[r]))}let s=Object.keys(e.level);for(let r of s){let i=r.replace(/\.json|\.geojson/g,"");t.level[i]=JSON.parse(n(e.level[r]))}let a=Object.keys(e.connection);for(let r of a){let i=r.replace(/\.json|\.geojson/g,"");t.connection[i]=JSON.parse(n(e.connection[r]))}return t}catch(e){throw D.error(e),new Error("MVF parsing failed! Probably encountered a bad file.")}}function _0(e,t){var n;let r=null!=(n=t.properties.externalId)?n:"";return 0===r.length&&(r=t.properties.id),"location-".concat(e,"-").concat(r.toLowerCase().replace(" ","-"))}function M0(e,t){var n;let r=new Set;if("entrance"===e)r.add("Entrance");else if("obstruction"===e){let e=t.properties.kind;null!=e&&e.length>0&&r.add(e),t.properties.footprintComponent&&r.add("Exterior")}else if("space"===e){let e=t.properties.kind;null!=e&&e.length>0&&r.add("default"===e?"Room":e);let i=null!=(n=t.properties.tags)?n:[];if(i.length>0)for(let e of i)r.add(e)}return Array.from(r).filter((e=>e.length>0))}function x0(e){return"category-".concat(e.toLowerCase().replace(" ","-"))}function Rh(e,t,n){let r=M0(e,t);for(let e of r){let t=x0(e);null==n[t]&&(n[t]={id:t,name:e})}}function E0(e){var t,n,r;return null!=(r=null==(n=null==(t=null==e?void 0:e.properties)?void 0:t.kind)?void 0:n.startsWith("connection"))&&r}function PI(e){var t;let n=null!=(t=e.properties.externalId)?t:"";return E0(e)&&0===n.length&&(n="unnamed-connection-"+e.properties.id),n}function ho(e,t,n,r){var i;if((null==t.properties.externalId||0===t.properties.externalId.length)&&!E0(t)||"obstruction"===e&&"desks"!==(null==(i=t.properties.kind)?void 0:i.toLowerCase()))return;let o=PI(t),s=_0(e,t);if(null==r[s]){let e={id:s,type:"",name:o,nodes:[],polygons:[],categories:[]};r[s]=e}if("space"===e||"obstruction"===e){let e={map:n.id,id:t.properties.id};r[s].polygons.push(e)}if("destinationNodes"in t.properties&&t.properties.destinationNodes.forEach((e=>{let t={map:n.id,node:e};r[s].nodes.push(t)})),"node"in t.properties&&t.properties.node){let e={map:n.id,node:t.properties.node};r[s].nodes.push(e)}let a=M0(e,t);for(let e of a){let t=x0(e);r[s].categories.push(t)}}function II(e,t=new Map){var n,r,i,o,s,a,l,u,c;let h={},d={},{space:p,"map.geojson":f,entrance:v,obstruction:g}=e;for(let e of f){let f=null!=(r=null==(n=p[e.id])?void 0:n.features)?r:[],m=null!=(o=null==(i=v[e.id])?void 0:i.features)?o:[],y=null!=(a=null==(s=g[e.id])?void 0:s.features)?a:[];for(let t of f)["Polygon","Point"].includes(t.geometry.type)&&"hallway"!==(null==(l=t.properties.kind)?void 0:l.toLowerCase())&&(Rh("space",t,d),ho("space",t,e,h));let b=new Map;for(let t of m)b.set(t.properties.id,t),t.properties.externalId&&(Rh("entrance",t,d),ho("entrance",t,e,h));let w={type:"Feature",geometry:{type:"LineString",coordinates:[]},properties:{id:"footprintComponent",externalId:"footprintComponent",node:void 0,metadata:void 0}};ho("entrance",w,e,h);for(let n of y){if(Rh("obstruction",n,d),ho("obstruction",n,e,h),n.properties.footprintComponent){let t=n.properties.entrances;for(let n of t){let t=b.get(n);t&&ho("entrance",{...t,properties:{...t.properties,externalId:w.properties.externalId}},e,h)}}if("desks"===(null==(u=n.properties.kind)?void 0:u.toLowerCase())&&n.properties.externalId.length>0){let e=null!=(c=t.get(n.properties.id))?c:[];for(let t of e){let e=_0("obstruction",n);null!=h[e]&&h[e].nodes.push({map:t.map,node:t.id})}}}}return{locations:Object.values(h),categories:Object.values(d)}}function T0(e){var t,n,r,i,o,s,a,l,u,c;let h=null!=(t=e.obstruction)?t:[],d=null!=(n=e.space)?n:[],p=null!=(r=e.entrance)?r:[],f=null!=(i=e["mapstack.geojson"])?i:[],v=null!=(o=e["map.geojson"])?o:[],g=null!=(s=e["styles.json"])?s:{},m=null!=(a=e["manifest.geojson"])?a:{},y=null!=(l=e["node.geojson"])?l:{},b=null!=(u=e["connection.json"])?u:[],w={},_=new Map,M=[],x=Cb(g),I=new Map,k=new Map;v.forEach((e=>{let t=e.id;t&&!k.has(t)&&k.set(t,e)})),f.forEach((({maps:e})=>{e.forEach((e=>{if(!k.has(e))return;let t=fh(h[e],p[e]);if(t.features.length){let n=b0(t),r=new Hu(n);_.set(e,r),w[e]=xI(e,t,d[e],I,x,g,r),M.push(kI(k.get(e),w[e],r))}}))})),M.sort(((e,t)=>"number"==typeof e.elevation&&"number"==typeof t.elevation?e.elevation-t.elevation:0));let S=new Map;"features"in y&&y.features.forEach((e=>{let t=e.properties.id;t&&!S.has(t)&&S.set(t,e)}));let E=Object.values(w).flat(),O=EI(b,S),A=_I(S,_),P=m.features[0],C=P.properties.name,F=P.geometry.coordinates[0],T=P.geometry.coordinates[1],L=(null==(c=Lb(M))?void 0:c.id)||"",{locations:N,categories:j}=II(e,I);return{polygons:E,venue:{name:C,latitude:T,longitude:F,defaultMap:L},maps:M,vortexes:O,nodes:A,locations:N,mapGroups:[],locationStates:[],categories:j,themes:[],imageBinaries:new Map}}function P0(e){var t,n,r,i,o,s,a;let l=null!=(t=e.obstruction)?t:{},u=null!=(n=e.space)?n:{},c=null!=(r=e.node)?r:{},h=null!=(i=e.level)?i:{},d=null!=(o=e["manifest.geojson"])?o:{},p=null!=(s=e.connection)?s:{},f={},v=new Map,g=[],m=[],y=[];Object.keys(h).forEach((e=>{let t=fh(l[e],{type:"FeatureCollection",features:[]});if(t.features.length){let n=b0(t),r=new Hu(n);v.set(e,r);let i=v0(e,u[e],r),o=v0(e,t,r);f[e]=i.concat(o),m=m.concat(MI(c[e],e,r)),g.push(OI(h[e],f[e],r))}y=y.concat(TI(p[e]))}));let b=Object.values(f).flat(),w=d.features[0],_=w.properties.name,M=w.geometry.coordinates[0],x=w.geometry.coordinates[1],I=(null==(a=g[0])?void 0:a.id)||"",k=new Map;b.forEach((e=>k.set(e.id,e)));let S=[],E=e["location.geojson"].features.map((e=>{if(e.properties.spaces){let t=e.properties.spaces.map((e=>e.id)).map((e=>k.get(e))).filter((e=>e));if(t){let e=[];t.forEach((t=>{e.push(...t.entrances.map((e=>({node:e.id,map:e.level}))))})),S=e}}return{...e.properties,nodes:S,polygons:e.properties.spaces}})),O=e["category.geojson"].features.map((e=>e.properties));return{polygons:b,venue:{name:_,latitude:x,longitude:M,defaultMap:I},maps:g,vortexes:y,nodes:m,locations:E,mapGroups:[],locationStates:[],categories:O,themes:[],imageBinaries:new Map}}function OI(e,t,n){let r=n.createGeoreferences(),i=new Set,o=e.features[0].properties;t.forEach((e=>{e.layer&&i.add(e.layer)}));let s=[...i].map((e=>({id:e,visible:!0}))),a=1/n.mapScale;return{id:o.id,georeference:r,name:o.name,shortName:o.abbreviation||o.name,scene:{polygons:t},elevation:o.elevation,scale:a,x_scale:a,layers:s,width:n.widthInMapUnits,height:n.heightInMapUnits}}s(xI,"convertPolygons"),s(EI,"convertVortexes"),s(TI,"convertVortexes_MVFv1"),s(w0,"overrideMVF"),s(Bh,"parseMVF"),s(k0,"parseMVFv1"),s(_0,"getLocationId"),s(M0,"getFeatureCategories"),s(x0,"getCategoryIdFromName"),s(Rh,"mutateCategoriesWithNewFeature"),s(E0,"isFeatureConnection"),s(PI,"getLocationLabel"),s(ho,"mutateLocationsWithNewFeature"),s(II,"createMetaDataFromMVF"),s(T0,"convertMVFToMappedin"),s(P0,"convertMVFv1ToMappedin"),s(OI,"convertMap_MVFv1"),v();var H0,Yh,$0,go,pi,fi,mo,vo,yo,hi,Xn,gi,mi,vi,bo,yi,_r,X0=Rt(W0()),zI=null==(H0=null==E?void 0:E.env)?void 0:H0.npm_package_version,Xu=["websdk","web","webv2","kiosk-v2","mobile","iossdk","androidsdk","reactnativesdk","gen7","bespoke"],Uh=Xu[0],BI=!1,jt=class e{constructor(e){var t;A(this,go,void 0),A(this,pi,void 0),A(this,fi,void 0),A(this,mo,void 0),A(this,vo,void 0),A(this,yo,void 0),A(this,hi,void 0),A(this,Xn,void 0),A(this,gi,void 0),A(this,mi,void 0),A(this,vi,void 0),A(this,bo,void 0),A(this,yi,void 0),A(this,_r,void 0),L(this,Xn,e.clientId),L(this,gi,e.clientSecret),L(this,mi,e.accessToken),L(this,hi,e.noAuth||!1);let n="https://api-gateway.mappedin.com/track-analytics/a/";!b(this,hi)&&b(this,Xn)&&!xu(b(this,Xn))&&(n="https://web-proxy.mappedin.com/a/"),L(this,fi,n),L(this,fi,b(this,fi)+(e.venue+"/")),L(this,yi,e.venue),L(this,pi,!1),L(this,go,"boolean"==typeof e.testMode?e.testMode:"true"===(null==(t=e.testMode)?void 0:t.toLowerCase())),L(this,mo,Xu.find((t=>t===e.context))||Xu[0]),L(this,vo,yu()),L(this,yo,bu()),L(this,vi,new Set),L(this,bo,e.platformString||""),this.locationSelected=this.locationSelected.bind(this),this.categorySelected=this.categorySelected.bind(this),this.getDirections=Kr(this.getDirections.bind(this),2500)}static create(t){return e.instance||(e.instance=new e(t)),e.instance}track(e,t){let n={...t,g:b(this,pi)};b(this,_r)&&(n={...n,...b(this,_r)});let r=b(this,fi)+e+"?"+X0.default.stringify(n,{skipEmptyString:!0,skipNull:!0}),i={"mi-context":Uh||b(this,mo),"mi-session":this.getSessionID(),"mi-device":this.getDeviceID(),"mappedin-sdk-version":zI,"mappedin-platform-version":b(this,bo)};BI&&D.log("Analytics.track",r,i),!b(this,go)&&(b(this,mi)?i.Authorization="Bearer ".concat(b(this,mi)):b(this,hi)||b(this,gi)&&b(this,Xn)&&(i["x-mappedin-key"]=btoa(b(this,Xn)),i["x-mappedin-secret"]=btoa(b(this,gi))),it()(r,{method:"GET",mode:"cors",headers:i}))}updateAnalyticsUserPosition(e){L(this,_r,e?{...e,bluedotTimestamp:Date.now()}:void 0)}locationSelected(e){let t=e.id||e;ye.addPendingEvent(new $i({venue:b(this,yi)})),this.track("select-location",{id:t})}categorySelected(e){let t=e.id||e;ye.addPendingEvent(new Wi({venue:b(this,yi)})),this.track("select-category",{id:t})}mapViewLoaded(e,t,n,r){this.track("load-mapview",{type:e,force:t,benchmark:n||-1,reason:r||"success"})}getDirections(e,t){let n={start:e.id,end:t.id,type:"location_to_location"};this.track("query-directions",n)}getSessionID(){return Yh||b(this,yo)}static setSessionID(e){Yh=e}static setDeviceID(e){$0=e}static clearSessionID(){Yh=void 0}getDeviceID(){return $0||b(this,vo)}setGeolocationMode(e){L(this,pi,e)}trackBlueDotEvent(t){t&&Object.values(e.BLUEDOT_EVENT).includes(t)&&!b(this,vi).has(t)&&(this.track(t),b(this,vi).add(t))}trackSearch(e){null!=e&&this.track("query-search",e)}trackSearchSuggest(e){null!=e&&this.track("query-suggest",e)}static setContext(e){let t=Xu.find((t=>t===e));t&&(Uh=t)}static clearContext(){Uh=void 0}static destroy(){e.instance=null}};go=new WeakMap,pi=new WeakMap,fi=new WeakMap,mo=new WeakMap,vo=new WeakMap,yo=new WeakMap,hi=new WeakMap,Xn=new WeakMap,gi=new WeakMap,mi=new WeakMap,vi=new WeakMap,bo=new WeakMap,yi=new WeakMap,_r=new WeakMap,s(jt,"Analytics"),m(jt,"instance",null),m(jt,"BLUEDOT_EVENT",{ATTEMPT_BLUEDOT:"attempt-bluedot",FOUND_POSITION:"found-position",FOUND_FLOOR:"found-floor"});var Wh=jt,wo=Wh;v();var $h=class{constructor(){m(this,"_subscribers",{})}publish(e,t){!this._subscribers||!this._subscribers[e]||this._subscribers[e].forEach((function(e){"function"==typeof e&&e(t)}))}on(e,t){this._subscribers||(this._subscribers={}),this._subscribers[e]=this._subscribers[e]||[],this._subscribers[e].push(t)}off(e,t){if(!this._subscribers||null==this._subscribers[e])return;let n=this._subscribers[e].indexOf(t);-1!==n&&this._subscribers[e].splice(n,1)}destroy(){this._subscribers={}}};s($h,"PubSub");var Ku=$h,Xh={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",venue:""};globalThis.MappedinDebug||(globalThis.MappedinDebug={enable(){globalThis.sessionStorage.setItem(xm,"true")}});var En,Mr,bi,ko,Hh,Ju,K0,Kh=class extends Ku{constructor(e){super(),A(this,ko),A(this,Ju),m(this,"perspective"),m(this,"things"),m(this,"options"),A(this,En,void 0),m(this,"updatedAt"),m(this,"categories",[]),m(this,"locations",[]),m(this,"vortexes",[]),m(this,"maps",[]),m(this,"nodes",[]),m(this,"polygons",[]),m(this,"venue",{}),m(this,"events",[]),m(this,"mapGroups",[]),m(this,"themes",[]),m(this,"locationStates",[]),m(this,"rankings"),m(this,"currentLanguage"),A(this,Mr,{}),m(this,"_categoriesById"),m(this,"_locationsById"),m(this,"_vortexesById"),m(this,"_mapsById"),m(this,"_nodesById"),m(this,"_polygonsById"),m(this,"_eventsById"),m(this,"_mapGroupsById"),m(this,"_locationStatesById"),m(this,"_locationRankingsById"),m(this,"_rankingsById"),m(this,"_categoriesByExternalId"),m(this,"_locationsByExternalId"),m(this,"_vortexesByExternalId"),m(this,"_mapsByExternalId"),m(this,"_nodesByExternalId"),m(this,"_polygonsByExternalId"),m(this,"_eventsByExternalId"),m(this,"_mapGroupsByExternalId"),m(this,"_locationStatesByExternalId"),m(this,"_locationRankingsByExternalId"),m(this,"_rankingsByExternalId"),A(this,bi,void 0),m(this,"changeLanguage",s((async(e,t=!0)=>{var n,r,i,o,s;let a=e.toLowerCase();if((null==(n=this.currentLanguage)?void 0:n.code.toLowerCase())===a)return Promise.resolve();if(null==(r=this.venue.languages)||!r.find((e=>e.code.toLowerCase()===a)))return D.error("Language ".concat(a," not found in venue ").concat(this.venue.slug)),Promise.reject("Language ".concat(a," not found in venue ").concat(this.venue.slug));if(t&&null!=(i=this.currentLanguage)&&i.code&&!b(this,Mr)[null==(o=this.currentLanguage)?void 0:o.code]&&(b(this,Mr)[null==(s=this.currentLanguage)?void 0:s.code]=JSON.stringify(this.toJSON())),this.currentLanguage=this.venue.languages.find((e=>e.code.toLowerCase()===a)),this.options.language=this.currentLanguage.code,null!=b(this,Mr)[a]){let e=JSON.parse(b(this,Mr)[a]);await this.hydrate(e,!1,!0)}else this.options.language=this.currentLanguage.code,await this.fetch(!0);this.publish(0,this.currentLanguage)}),"changeLanguage")),m(this,"hydrate",s((async(e,t=!1,n=!1)=>{var r,i;let o;if("string"==typeof e)try{o=JSON.parse(e)}catch(e){return void D.error("Unable to parse JSON",e)}else o=e;let s=Object.keys(o);for(let e=0,t=s.length;e<t;++e){let t=s[e],r=o[t],i=to[t];null!=i&&"function"==typeof i.hydrate&&(n?"updateInPlace"in i&&"function"==typeof i.updateInPlace&&i.updateInPlace(this,r):this[t]=i.hydrate(r,this))}t&&await Hy(o);let{images:a,scenes:l,imageBinaries:u,options:c}=o;c&&(this.options=c),this.images=a,this.scenes=l,this.imageBinaries=u,n||(qe.clearInstance(this),L(this,En,qe.create(this)),this.generateGetters(s)),this.currentLanguage=null!=(r=this.currentLanguage)?r:Pu(this.venue,this.options),this.options.language=null==(i=this.currentLanguage)?void 0:i.code,me(this,ko,Hh).call(this),this.initNavigator()}),"hydrate")),m(this,"images"),m(this,"imageBinaries"),m(this,"scenes"),m(this,"analytics"),m(this,"navigator"),m(this,"toJSON",s(((e=!1)=>{var t;let n={};for(let e in to)Array.isArray(this[e])&&(n[e]=this[e].map((e=>e.toJSON())));let r={...n,venue:this.venue.toJSON()};return e&&(r.options=this.options),null!=this.rankings&&(r.rankings=null==(t=this.rankings)?void 0:t.toJSON()),delete r.locationRankings,r}),"toJSON")),m(this,"toString",s(((e=!1)=>JSON.stringify(this.toJSON(e))),"toString")),this.options=e,L(this,En,qe.create(this));let t=wo.create({...e,testMode:!(null!=e&&e.emitAnalyticsEvents)});this.analytics={locationSelected:t.locationSelected,categorySelected:t.categorySelected,getDirections:t.getDirections}}generateGetters(e){try{for(let t=0,n=e.length;t<n;++t){let n=e[t];Array.isArray(this[n])&&(Object.defineProperty(this,"_".concat(n,"ByExternalId"),{configurable:!0,get(){let e="".concat(n,"ByExternalId"),t=b(this,En)[e];if(null!=t)return t;let r={};return this[n].forEach((e=>r[e.externalId]=e)),b(this,En)[e]=r,r}}),Object.defineProperty(this,"_".concat(n,"ById"),{configurable:!0,get(){let e=b(this,En)[n];if(null!=e)return e;let t={};return this[n].forEach((e=>t[e.id]=e)),b(this,En)[n]=t,t}}))}return this}catch(e){throw new Error("Unable to generate getters, "+e)}}getCollectionItemById(e,t){let n="_".concat(e,"ById"),r="_".concat(e,"ByExternalId"),i=this[n];return null!=i&&null!=i[t]||(i=this[r],null!=i&&null!=i[t])?i[t]:null}async hydrateFromMVF(e){let t=T0(e);return this.hydrate(t)}async hydrateFromMVFv1(e){let t=P0(e);return this.hydrate(t)}async fetch(e=!1){"vortexes"in this.options.things||(this.options.things.vortexes=["name","type","accessible","weight","multiplier","nodes"]),"locationStates"in this.options.things||(this.options.things.locationStates=["name","id","value"]),xu(this.options.clientId)||this.options.things.rankings&&delete this.options.things.rankings;let{things:t}=this.options,n=[],r=Object.keys(t);if(r.includes("venue")){let t=to.venue,n=Promise.resolve();e?"updateInPlace"in t&&"function"==typeof t.updateInPlace&&(n=t.updateInPlace(this)):n=t.fetch(this).then((e=>{var t;this.venue=e;let n=Pu(e,this.options);return n&&(this.currentLanguage=n,this.options.language=null==(t=this.currentLanguage)?void 0:t.code),Promise.resolve()})),n&&await n,r.splice(r.indexOf("venue"),1)}for(let t=0,i=r.length;t<i;++t){let i=r[t],o=to[i];if(o){let t;e?"updateInPlace"in o&&"function"==typeof o.updateInPlace&&(t=o.updateInPlace(this)):t=o.fetch(this).then((e=>(this[i]=e,Promise.resolve()))),n.push(t)}}return n.push(Gr(this.options,"cdn-access-token",{venue:this.options.venue},!1).then((e=>L(this,bi,e.token)),(()=>Promise.resolve()))),e||this.generateGetters(r),Promise.all(n).then((()=>{me(this,ko,Hh).call(this),this.initNavigator()}))}initNavigator(){this.navigator=new Gl({locations:this.locations.map((e=>e.toJSON())),nodes:this.nodes.map((e=>e.toJSON())),vortexes:this.vortexes.map((e=>e.toJSON())),maps:this.maps.map((e=>e.toJSON())),polygons:this.polygons.map((e=>e.toJSON()))})}};En=new WeakMap,Mr=new WeakMap,bi=new WeakMap,ko=new WeakSet,Hh=s((function(){b(this,bi)&&this.maps.forEach((e=>{var t;null!=(t=e.scene)&&t.polygons&&(e.scene.polygons+="?".concat(b(this,bi)))})),me(this,Ju,K0).call(this)}),"#transformData"),Ju=new WeakSet,K0=s((function(){let e=this.categories.filter((e=>e.sortOrder)).map((e=>e.sortOrder));if(e.length<=0)return;let t=Math.min(...e),n=Math.max(...e);this.polygons.forEach((e=>{var r,i;let o=Ky(e,this);if(o){let s=o.categories.filter((e=>e.sortOrder)).map((e=>e.sortOrder));if(s.length>0){let o=Math.min(...s);e.categoryRank=Xy(o,t,n,null!=(i=null==(r=e.rank)?void 0:r.score)?i:0)}}}))}),"#applyCategoryRankToPolygons"),s(Kh,"Mappedin");var ct=Kh;function VI(e){var t;if(e.languages)for(let n=0;n<navigator.languages.length;n++){let r=null==(t=e.languages)?void 0:t.find((e=>e.code.toLowerCase()===navigator.languages[n].toLowerCase()));if(r)return r}}function Pu(e,t){var n,r;let i,o=null==(n=e.languages)?void 0:n.find((e=>e.code.toLowerCase()===t.language));if(o)i=o;else{if(null==(r=t.fallbackToNavigatorLanguages)||r)if(window.navigator.languages&&window.navigator.languages.length>0){let t=VI(e);t&&(i=t)}else D.warn("fallbackToNavigatorLanguage is set however navigator.languages is empty");!i&&e.languages&&(i=e.languages.find((t=>t.code===e.defaultLanguage.code)))}return i}s(VI,"findPreferredLangaugeFromNavigator"),s(Pu,"findPreferredLanguage"),v(),v();var Le=s((function(){return Le=Object.assign||s((function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),Le.apply(this,arguments)}),"__assign");function oe(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ge(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}s(oe,"__values"),s(Ge,"__read");var _o,qI="ENTRIES",rw="KEYS",iw="VALUES",Ue="",Jh=function(){function e(e,t){var n=e._tree,r=Array.from(n.keys());this.set=e,this._type=t,this._path=r.length>0?[{node:n,keys:r}]:[]}return s(e,"TreeIterator"),e.prototype.next=function(){var e=this.dive();return this.backtrack(),e},e.prototype.dive=function(){if(0===this._path.length)return{done:!0,value:void 0};var e=wi(this._path),t=e.node,n=e.keys;if(wi(n)===Ue)return{done:!1,value:this.result()};var r=t.get(wi(n));return this._path.push({node:r,keys:Array.from(r.keys())}),this.dive()},e.prototype.backtrack=function(){if(0!==this._path.length){var e=wi(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}},e.prototype.key=function(){return this.set._prefix+this._path.map((function(e){var t=e.keys;return wi(t)})).filter((function(e){return e!==Ue})).join("")},e.prototype.value=function(){return wi(this._path).node.get(Ue)},e.prototype.result=function(){switch(this._type){case iw:return this.value();case rw:return this.key();default:return[this.key(),this.value()]}},e.prototype[Symbol.iterator]=function(){return this},e}(),wi=s((function(e){return e[e.length-1]}),"last$1"),GI=s((function(e,t,n){var r=new Map;if(void 0===t)return r;for(var i=t.length+1,o=i+n,s=new Uint8Array(o*i).fill(n+1),a=0;a<i;++a)s[a]=a;for(var l=1;l<o;++l)s[l*i]=l;return aw(e,t,n,r,s,1,i,""),r}),"fuzzySearch"),aw=s((function(e,t,n,r,i,o,s,a){var l,u,c=o*s;try{e:for(var h=oe(e.keys()),d=h.next();!d.done;d=h.next()){var p=d.value;if(p===Ue){var f=i[c-1];f<=n&&r.set(a,[e.get(p),f])}else{for(var v=o,g=0;g<p.length;++g,++v){for(var m=p[g],y=s*v,b=y-s,w=i[y],_=Math.max(0,v-n-1),M=Math.min(s-1,v+n),x=_;x<M;++x){var I=m!==t[x],k=i[b+x]+ +I,S=i[b+x+1]+1,E=i[y+x]+1,O=i[y+x+1]=Math.min(k,S,E);O<w&&(w=O)}if(w>n)continue e}aw(e.get(p),t,n,r,i,v,s,a+p)}}}catch(e){l={error:e}}finally{try{d&&!d.done&&(u=h.return)&&u.call(h)}finally{if(l)throw l.error}}}),"recurse"),Zh=function(){function e(e,t){void 0===e&&(e=new Map),void 0===t&&(t=""),this._size=void 0,this._tree=e,this._prefix=t}return s(e,"SearchableMap"),e.prototype.atPrefix=function(t){var n,r;if(!t.startsWith(this._prefix))throw new Error("Mismatched prefix");var i=Ge(Qu(this._tree,t.slice(this._prefix.length)),2),o=i[0],s=i[1];if(void 0===o){var a=Ge(rg(s),2),l=a[0],u=a[1];try{for(var c=oe(l.keys()),h=c.next();!h.done;h=c.next()){var d=h.value;if(d!==Ue&&d.startsWith(u)){var p=new Map;return p.set(d.slice(u.length),l.get(d)),new e(p,t)}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}return new e(o,t)},e.prototype.clear=function(){this._size=void 0,this._tree.clear()},e.prototype.delete=function(e){return this._size=void 0,UI(this._tree,e)},e.prototype.entries=function(){return new Jh(this,qI)},e.prototype.forEach=function(e){var t,n;try{for(var r=oe(this),i=r.next();!i.done;i=r.next()){var o=Ge(i.value,2);e(o[0],o[1],this)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.fuzzyGet=function(e,t){return GI(this._tree,e,t)},e.prototype.get=function(e){var t=ng(this._tree,e);return void 0!==t?t.get(Ue):void 0},e.prototype.has=function(e){var t=ng(this._tree,e);return void 0!==t&&t.has(Ue)},e.prototype.keys=function(){return new Jh(this,rw)},e.prototype.set=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");return this._size=void 0,Qh(this._tree,e).set(Ue,t),this},Object.defineProperty(e.prototype,"size",{get:function(){if(this._size)return this._size;this._size=0;for(var e=this.entries();!e.next().done;)this._size+=1;return this._size},enumerable:!1,configurable:!0}),e.prototype.update=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;var n=Qh(this._tree,e);return n.set(Ue,t(n.get(Ue))),this},e.prototype.fetch=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;var n=Qh(this._tree,e),r=n.get(Ue);return void 0===r&&n.set(Ue,r=t()),r},e.prototype.values=function(){return new Jh(this,iw)},e.prototype[Symbol.iterator]=function(){return this.entries()},e.from=function(t){var n,r,i=new e;try{for(var o=oe(t),s=o.next();!s.done;s=o.next()){var a=Ge(s.value,2),l=a[0],u=a[1];i.set(l,u)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},e.fromObject=function(t){return e.from(Object.entries(t))},e}(),Qu=s((function(e,t,n){var r,i;if(void 0===n&&(n=[]),0===t.length||null==e)return[e,n];try{for(var o=oe(e.keys()),s=o.next();!s.done;s=o.next()){var a=s.value;if(a!==Ue&&t.startsWith(a))return n.push([e,a]),Qu(e.get(a),t.slice(a.length),n)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return n.push([e,t]),Qu(void 0,"",n)}),"trackDown"),ng=s((function(e,t){var n,r;if(0===t.length||null==e)return e;try{for(var i=oe(e.keys()),o=i.next();!o.done;o=i.next()){var s=o.value;if(s!==Ue&&t.startsWith(s))return ng(e.get(s),t.slice(s.length))}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}),"lookup"),Qh=s((function(e,t){var n,r,i=t.length;e:for(var o=0;e&&o<i;){try{for(var s=(n=void 0,oe(e.keys())),a=s.next();!a.done;a=s.next()){var l=a.value;if(l!==Ue&&t[o]===l[0]){for(var u=Math.min(i-o,l.length),c=1;c<u&&t[o+c]===l[c];)++c;var h=e.get(l);if(c===l.length)e=h;else{var d=new Map;d.set(l.slice(c),h),e.set(t.slice(o,o+c),d),e.delete(l),e=d}o+=c;continue e}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}var p=new Map;return e.set(t.slice(o),p),p}return e}),"createPath"),UI=s((function(e,t){var n=Ge(Qu(e,t),2),r=n[0],i=n[1];if(void 0!==r)if(r.delete(Ue),0===r.size)ow(i);else if(1===r.size){var o=Ge(r.entries().next().value,2),s=o[0],a=o[1];sw(i,s,a)}}),"remove"),ow=s((function(e){if(0!==e.length){var t=Ge(rg(e),2),n=t[0],r=t[1];if(n.delete(r),0===n.size)ow(e.slice(0,-1));else if(1===n.size){var i=Ge(n.entries().next().value,2),o=i[0],s=i[1];o!==Ue&&sw(e.slice(0,-1),o,s)}}}),"cleanup"),sw=s((function(e,t,n){if(0!==e.length){var r=Ge(rg(e),2),i=r[0],o=r[1];i.set(o+t,n),i.delete(o)}}),"merge"),rg=s((function(e){return e[e.length-1]}),"last"),ig="or",YI="and",WI="and_not",xr=function(){function e(e){if(null==(null==e?void 0:e.fields))throw new Error('MiniSearch: option "fields" must be provided');this._options=Le(Le(Le({},tg),e),{searchOptions:Le(Le({},Q0),e.searchOptions||{})}),this._index=new Zh,this._documentCount=0,this._documentIds=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this.addFields(this._options.fields)}return s(e,"MiniSearch"),e.prototype.add=function(e){var t,n,r,i,o=this._options,s=o.extractField,a=o.tokenize,l=o.processTerm,u=o.fields,c=o.idField,h=s(e,c);if(null==h)throw new Error('MiniSearch: document does not have ID field "'.concat(c,'"'));var d=this.addDocumentId(h);this.saveStoredFields(d,e);try{for(var p=oe(u),f=p.next();!f.done;f=p.next()){var v=f.value,g=s(e,v);if(null!=g){var m=a(g.toString(),v),y=this._fieldIds[v],b=new Set(m).size;this.addFieldLength(d,y,this._documentCount-1,b);try{for(var w=(r=void 0,oe(m)),_=w.next();!_.done;_=w.next()){var M=l(_.value,v);M&&this.addTerm(y,d,M)}}catch(e){r={error:e}}finally{try{_&&!_.done&&(i=w.return)&&i.call(w)}finally{if(r)throw r.error}}}}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}},e.prototype.addAll=function(e){var t,n;try{for(var r=oe(e),i=r.next();!i.done;i=r.next()){var o=i.value;this.add(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.addAllAsync=function(e,t){var n=this;void 0===t&&(t={});var r=t.chunkSize,i=void 0===r?10:r,o={chunk:[],promise:Promise.resolve()},s=e.reduce((function(e,t,r){var o=e.chunk,s=e.promise;return o.push(t),(r+1)%i==0?{chunk:[],promise:s.then((function(){return new Promise((function(e){return setTimeout(e,0)}))})).then((function(){return n.addAll(o)}))}:{chunk:o,promise:s}}),o),a=s.chunk;return s.promise.then((function(){return n.addAll(a)}))},e.prototype.remove=function(e){var t,n,r,i,o,s,a=this._options,l=a.tokenize,u=a.processTerm,c=a.extractField,h=a.fields,d=a.idField,p=c(e,d);if(null==p)throw new Error('MiniSearch: document does not have ID field "'.concat(d,'"'));try{for(var f=oe(this._documentIds),v=f.next();!v.done;v=f.next()){var g=Ge(v.value,2),m=g[0];if(p===g[1]){try{for(var y=(r=void 0,oe(h)),b=y.next();!b.done;b=y.next()){var w=b.value,_=c(e,w);if(null!=_){var M=l(_.toString(),w),x=this._fieldIds[w],I=new Set(M).size;this.removeFieldLength(m,x,this._documentCount,I);try{for(var k=(o=void 0,oe(M)),S=k.next();!S.done;S=k.next()){var E=u(S.value,w);E&&this.removeTerm(x,m,E)}}catch(e){o={error:e}}finally{try{S&&!S.done&&(s=k.return)&&s.call(k)}finally{if(o)throw o.error}}}}}catch(e){r={error:e}}finally{try{b&&!b.done&&(i=y.return)&&i.call(y)}finally{if(r)throw r.error}}return this._storedFields.delete(m),this._documentIds.delete(m),this._fieldLength.delete(m),void(this._documentCount-=1)}}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}throw new Error("MiniSearch: cannot remove document with ID ".concat(p,": it is not in the index"))},e.prototype.removeAll=function(e){var t,n;if(e)try{for(var r=oe(e),i=r.next();!i.done;i=r.next()){var o=i.value;this.remove(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new Zh,this._documentCount=0,this._documentIds=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},e.prototype.search=function(e,t){var n,r;void 0===t&&(t={});var i=this.executeQuery(e,t),o=[];try{for(var s=oe(i),a=s.next();!a.done;a=s.next()){var l=Ge(a.value,2),u=l[0],c=l[1],h=c.score,d=c.terms,p=c.match,f=d.length,v={id:this._documentIds.get(u),score:h*f,terms:Object.keys(p),match:p};Object.assign(v,this._storedFields.get(u)),(null==t.filter||t.filter(v))&&o.push(v)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o.sort(tw),o},e.prototype.autoSuggest=function(e,t){var n,r,i,o;void 0===t&&(t={}),t=Le(Le({},JI),t);var s=new Map;try{for(var a=oe(this.search(e,t)),l=a.next();!l.done;l=a.next()){var u=l.value,c=u.score,h=(y=u.terms).join(" ");null!=(g=s.get(h))?(g.score+=c,g.count+=1):s.set(h,{score:c,terms:y,count:1})}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}var d=[];try{for(var p=oe(s),f=p.next();!f.done;f=p.next()){var v=Ge(f.value,2),g=v[0],m=v[1],y=(c=m.score,m.terms),b=m.count;d.push({suggestion:g,terms:y,score:c/b})}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}return d.sort(tw),d},Object.defineProperty(e.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),e.loadJSON=function(t,n){if(null==n)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return e.loadJS(JSON.parse(t),n)},e.getDefault=function(e){if(tg.hasOwnProperty(e))return eg(tg,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))},e.loadJS=function(t,n){var r,i,o,s,a=t.index,l=t.documentCount,u=t.nextId,c=t.documentIds,h=t.fieldIds,d=t.fieldLength,p=t.averageFieldLength,f=t.storedFields,v=t.serializationVersion;if(1!==v&&2!==v)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var g=new e(n);g._documentCount=l,g._nextId=u,g._documentIds=Zu(c),g._fieldIds=h,g._fieldLength=Zu(d),g._avgFieldLength=p,g._storedFields=Zu(f),g._index=new Zh;try{for(var m=oe(a),y=m.next();!y.done;y=m.next()){var b=Ge(y.value,2),w=b[0],_=b[1],M=new Map;try{for(var x=(o=void 0,oe(Object.keys(_))),I=x.next();!I.done;I=x.next()){var k=I.value,S=_[k];1===v&&(S=S.ds),M.set(parseInt(k,10),Zu(S))}}catch(e){o={error:e}}finally{try{I&&!I.done&&(s=x.return)&&s.call(x)}finally{if(o)throw o.error}}g._index.set(w,M)}}catch(e){r={error:e}}finally{try{y&&!y.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}return g},e.prototype.executeQuery=function(e,t){var n=this;if(void 0===t&&(t={}),"string"!=typeof e){var r=Le(Le(Le({},t),e),{queries:void 0}),i=e.queries.map((function(e){return n.executeQuery(e,r)}));return this.combineResults(i,e.combineWith)}var o=this._options,s=o.tokenize,a=o.processTerm,l=o.searchOptions,u=Le(Le({tokenize:s,processTerm:a},l),t),c=u.tokenize,h=u.processTerm,d=c(e).map((function(e){return h(e)})).filter((function(e){return!!e})).map(KI(u)).map((function(e){return n.executeQuerySpec(e,u)}));return this.combineResults(d,u.combineWith)},e.prototype.executeQuerySpec=function(e,t){var n,r,i,o,s,a,l=Le(Le({},this._options.searchOptions),t),u=(l.fields||this._options.fields).reduce((function(e,t){var n;return Le(Le({},e),((n={})[t]=eg(e,t)||1,n))}),l.boost||{}),c=l.boostDocument,h=l.weights,d=l.maxFuzzy,p=Le(Le({},Q0.weights),h),f=p.fuzzy,v=p.prefix,g=this._index.get(e.term),m=this.termResults(e.term,e.term,1,g,u,c);if(e.prefix&&(s=this._index.atPrefix(e.term)),e.fuzzy){var y=!0===e.fuzzy?.2:e.fuzzy,b=y<1?Math.min(d,Math.round(e.term.length*y)):y;b&&(a=this._index.fuzzyGet(e.term,b))}if(s)try{for(var w=oe(s),_=w.next();!_.done;_=w.next()){var M=Ge(_.value,2),x=M[0],I=M[1];if(O=x.length-e.term.length){null==a||a.delete(x);var k=v*x.length/(x.length+.3*O);this.termResults(e.term,x,k,I,u,c,m)}}}catch(e){n={error:e}}finally{try{_&&!_.done&&(r=w.return)&&r.call(w)}finally{if(n)throw n.error}}if(a)try{for(var S=oe(a.keys()),E=S.next();!E.done;E=S.next()){x=E.value;var O,A=Ge(a.get(x),2),P=A[0];if(O=A[1]){k=f*x.length/(x.length+O);this.termResults(e.term,x,k,P,u,c,m)}}}catch(e){i={error:e}}finally{try{E&&!E.done&&(o=S.return)&&o.call(S)}finally{if(i)throw i.error}}return m},e.prototype.combineResults=function(e,t){if(void 0===t&&(t=ig),0===e.length)return new Map;var n=t.toLowerCase();return e.reduce($I[n])||new Map},e.prototype.toJSON=function(){var e,t,n,r,i=[];try{for(var o=oe(this._index),s=o.next();!s.done;s=o.next()){var a=Ge(s.value,2),l=a[0],u=a[1],c={};try{for(var h=(n=void 0,oe(u)),d=h.next();!d.done;d=h.next()){var p=Ge(d.value,2),f=p[0],v=p[1];c[f]=Object.fromEntries(v)}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}i.push([l,c])}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),index:i,serializationVersion:2}},e.prototype.termResults=function(e,t,n,r,i,o,s){var a,l,u,c,h;if(void 0===s&&(s=new Map),null==r)return s;try{for(var d=oe(Object.keys(i)),p=d.next();!p.done;p=d.next()){var f=p.value,v=i[f],g=this._fieldIds[f],m=r.get(g);if(null!=m){var y=m.size,b=this._avgFieldLength[g];try{for(var w=(u=void 0,oe(m.keys())),_=w.next();!_.done;_=w.next()){var M=_.value,x=o?o(this._documentIds.get(M),t):1;if(x){var I=m.get(M),k=this._fieldLength.get(M)[g],S=n*v*x*XI(I,y,this._documentCount,k,b),E=s.get(M);if(E){E.score+=S,ZI(E.terms,e);var O=eg(E.match,t);O?O.push(f):E.match[t]=[f]}else s.set(M,{score:S,terms:[e],match:(h={},h[t]=[f],h)})}}}catch(e){u={error:e}}finally{try{_&&!_.done&&(c=w.return)&&c.call(w)}finally{if(u)throw u.error}}}}}catch(e){a={error:e}}finally{try{p&&!p.done&&(l=d.return)&&l.call(d)}finally{if(a)throw a.error}}return s},e.prototype.addTerm=function(e,t,n){var r=this._index.fetch(n,nw),i=r.get(e);if(null==i)(i=new Map).set(t,1),r.set(e,i);else{var o=i.get(t);i.set(t,(o||0)+1)}},e.prototype.removeTerm=function(e,t,n){if(this._index.has(n)){var r=this._index.fetch(n,nw),i=r.get(e);null==i||null==i.get(t)?this.warnDocumentChanged(t,e,n):i.get(t)<=1?i.size<=1?r.delete(e):i.delete(t):i.set(t,i.get(t)-1),0===this._index.get(n).size&&this._index.delete(n)}else this.warnDocumentChanged(t,e,n)},e.prototype.warnDocumentChanged=function(e,t,n){var r,i;if(null!=console&&null!=console.warn)try{for(var o=oe(Object.keys(this._fieldIds)),s=o.next();!s.done;s=o.next()){var a=s.value;if(this._fieldIds[a]===t)return void console.warn("MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(n,'" was not present in field "').concat(a,'". Removing a document after it has changed can corrupt the index!'))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.addDocumentId=function(e){var t=this._nextId;return this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t},e.prototype.addFields=function(e){for(var t=0;t<e.length;t++)this._fieldIds[e[t]]=t},e.prototype.addFieldLength=function(e,t,n,r){var i=this._fieldLength.get(e);null==i&&this._fieldLength.set(e,i=[]),i[t]=r;var o=(this._avgFieldLength[t]||0)*n+r;this._avgFieldLength[t]=o/(n+1)},e.prototype.removeFieldLength=function(e,t,n,r){var i=this._avgFieldLength[t]*n-r;this._avgFieldLength[t]=i/(n-1)},e.prototype.saveStoredFields=function(e,t){var n,r,i=this._options,o=i.storeFields,s=i.extractField;if(null!=o&&0!==o.length){var a=this._storedFields.get(e);null==a&&this._storedFields.set(e,a={});try{for(var l=oe(o),u=l.next();!u.done;u=l.next()){var c=u.value,h=s(t,c);void 0!==h&&(a[c]=h)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}},e}(),eg=s((function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}),"getOwnProperty"),$I=((_o={})[ig]=function(e,t){var n,r;try{for(var i=oe(t.keys()),o=i.next();!o.done;o=i.next()){var s=o.value,a=e.get(s);if(null==a)e.set(s,t.get(s));else{var l=t.get(s),u=l.score,c=l.terms,h=l.match;a.score=a.score+u,a.match=Object.assign(a.match,h),ew(a.terms,c)}}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},_o[YI]=function(e,t){var n,r,i=new Map;try{for(var o=oe(t.keys()),s=o.next();!s.done;s=o.next()){var a=s.value,l=e.get(a);if(null!=l){var u=t.get(a),c=u.score,h=u.terms,d=u.match;ew(l.terms,h),i.set(a,{score:l.score+c,terms:l.terms,match:Object.assign(l.match,d)})}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},_o[WI]=function(e,t){var n,r;try{for(var i=oe(t.keys()),o=i.next();!o.done;o=i.next()){var s=o.value;e.delete(s)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},_o),J0=1.2,Z0=.7,HI=.5,XI=s((function(e,t,n,r,i){return Math.log(1+(n-t+.5)/(t+.5))*(HI+e*(J0+1)/(e+J0*(1-Z0+Z0*r/i)))}),"calcBM25Score"),KI=s((function(e){return function(t,n,r){return{term:t,fuzzy:"function"==typeof e.fuzzy?e.fuzzy(t,n,r):e.fuzzy||!1,prefix:"function"==typeof e.prefix?e.prefix(t,n,r):!0===e.prefix}}}),"termToQuerySpec"),tg={idField:"id",extractField:function(e,t){return e[t]},tokenize:function(e,t){return e.split(QI)},processTerm:function(e,t){return e.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[]},Q0={combineWith:ig,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375}},JI={prefix:function(e,t,n){return t===n.length-1}},ZI=s((function(e,t){e.includes(t)||e.push(t)}),"assignUniqueTerm"),ew=s((function(e,t){var n,r;try{for(var i=oe(t),o=i.next();!o.done;o=i.next()){var s=o.value;e.includes(s)||e.push(s)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}),"assignUniqueTerms"),tw=s((function(e,t){var n=e.score;return t.score-n}),"byScore"),nw=s((function(){return new Map}),"createMap"),Zu=s((function(e){var t,n,r=new Map;try{for(var i=oe(Object.keys(e)),o=i.next();!o.done;o=i.next()){var s=o.value;r.set(parseInt(s,10),e[s])}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}),"objectToNumericMap"),QI=/[\n\r -#%-*,-/:;?@[-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+/u;v();var eO=["0","1","2","3","4","5","6","7","8","9"],tO=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],nO=["0","1","2","3","4","5","6","7","8","9"],rO=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],s4=[...eO,...tO,...nO,...rO],uw=["about","after","all","also","am","an","and","another","any","are","as","at","be","because","been","before","being","between","both","but","by","came","can","come","could","did","do","each","for","from","get","got","has","had","he","have","her","here","him","himself","his","how","if","in","into","is","it","like","make","many","me","might","more","most","much","must","my","never","now","of","on","only","or","other","our","out","over","said","same","should","since","some","still","such","take","than","that","the","their","them","then","there","these","they","this","those","through","to","too","under","up","very","was","way","we","well","were","what","where","which","while","who","with","would","you","your","a","i"];v();var iO=32,ut=!1,aO=120,ag=0,sg=class{constructor(e){m(this,"_callback"),m(this,"_frameCount"),m(this,"_ordering"),m(this,"_supersededBy"),m(this,"name"),m(this,"_remainingFrameCount"),m(this,"_lastFrameTime"),m(this,"userdata"),this._callback=e.callback,this._frameCount=null!=e.frameCount?e.frameCount:1,this._ordering=null!=e.ordering?e.ordering:0,this._supersededBy=null!=e.supersededBy?new Set(e.supersededBy):new Set,this.name=e.name,this.userdata=e.userdata,this._remainingFrameCount=this._frameCount,this._lastFrameTime=0,ut&&D.log("update instantiated",this.name)}getLastFrameTime(){return this._lastFrameTime}};s(sg,"FrameUpdate");var el=sg,ug=class{constructor(e){if(m(this,"_postponed"),m(this,"userdata"),m(this,"_priority"),m(this,"_group"),m(this,"name"),m(this,"_lastFrameTime"),m(this,"_callback"),m(this,"_complete"),m(this,"_scheduled"),m(this,"_cancelled"),null!=e.group&&null!=e.priority)throw new Error("cannot specify task priority individually within group");if(null!=e.group&&null!=e.postponeOnAdd)throw new Error("cannot specify task postpone individually within group");this._callback=e.callback,this._group=null!=e.group?e.group:null,this._priority=null!=e.priority?e.priority:0,this._postponed=null!=e.postponeOnAdd&&e.postponeOnAdd,this.name=e.name,this.userdata=e.userdata||{},this._complete=!1,this._scheduled=!1,this._cancelled=!1,this._lastFrameTime=0,ut&&D.log("task instantiated",this.name)}isComplete(){return this._complete}getLastFrameTime(){return this._lastFrameTime}};s(ug,"FrameTask");var Tn=ug,lg=class{constructor(e){m(this,"_postponed"),m(this,"_onComplete"),m(this,"_priority"),m(this,"userdata"),m(this,"name"),m(this,"_tasks"),m(this,"_scheduledTasks"),m(this,"_scheduled"),m(this,"_cancelled"),this._onComplete=null!=e.onComplete?e.onComplete:()=>{},this._priority=null!=e.priority?e.priority:0,this._postponed=null!=e.postponeOnAdd&&e.postponeOnAdd,this.name=e.name,this.userdata=e.userdata,this._tasks=new Set,this._scheduledTasks=new Set,this._scheduled=!1,this._cancelled=!1,ut&&D.log("task group instantiated",this.name)}isComplete(){return 0===this._scheduledTasks.size}getTasks(){return Array.from(this._tasks.values())}clear(){this._tasks.clear(),this._scheduledTasks.clear()}_popTask(){for(let e of this._scheduledTasks)return this._scheduledTasks.delete(e),e}};s(lg,"FrameTaskGroup");var tl=lg,cg=class{constructor(e){m(this,"_maxMillisecondsPerFrame"),m(this,"_time"),this._maxMillisecondsPerFrame=null!=(null==e?void 0:e.maxMillisecondsPerFrame)?e.maxMillisecondsPerFrame:iO,this._time=0}beginFrame(){this._time=performance.now()+this._maxMillisecondsPerFrame}hasTimeRemaining(){return performance.now()<=this._time}};s(cg,"RealTimeTimer");var og=cg,dg=class{constructor(e){var t;m(this,"_raf"),m(this,"options"),m(this,"_timer"),m(this,"_performance"),m(this,"_scheduledUpdatesByOrdering"),m(this,"_scheduledTasksByPriority"),m(this,"_postponedTasks"),m(this,"_requestAnimationFrameHandle"),m(this,"_updatesToRunThisFrame"),m(this,"_lastFrameTime",0),m(this,"_updatesRunLastFrame"),this.options=e,this._timer=null!=(null==e?void 0:e.timer)?e.timer:new og,this._performance=null!=(null==e?void 0:e.performance)&&e.performance,this._scheduledUpdatesByOrdering=new ki,this._scheduledTasksByPriority=new ki,this._postponedTasks=new Set,this._requestAnimationFrameHandle=null,this._updatesToRunThisFrame=[],this._lastFrameTime=0,this._updatesRunLastFrame=new Set,this.update=this.update.bind(this),ut&&D.log("task scheduler instantiated"),null!=(t=globalThis.MappedinDebug)&&t.TEST_IOS&&(this._raf=e=>setTimeout(e,16))}clear(){for(let e of this._scheduledTasksByPriority.values())e._cancelled=!0;for(let e of this._postponedTasks.values())e._cancelled=!0;this._scheduledUpdatesByOrdering=new ki,this._scheduledTasksByPriority=new ki,this._postponedTasks=new Set,this._lastFrameTime=0,this._updatesRunLastFrame.clear(),ut&&D.log("task scheduler cleared")}destroy(){this.clear()}requestAnimationFrame(){null==this._requestAnimationFrameHandle&&(this._requestAnimationFrameHandle="function"==typeof this._raf?this._raf(this.update):requestAnimationFrame(this.update))}update(e){var t;let n;this._timer.beginFrame(),this._performance&&(n=performance.now());let r=!1;ut&&(0===ag&&(r=!0),++ag,ag%=aO);let i=this._scheduledUpdatesByOrdering.keys();for(let e=i.length-1;e>=0;--e){let t=i[e];for(let e of this._scheduledUpdatesByOrdering.get(t).values())this._updatesToRunThisFrame.push(e),r&&D.log("update scheduled to run this frame",e.name)}for(let e of this._updatesToRunThisFrame){--e._remainingFrameCount,e._remainingFrameCount<=0&&this._scheduledUpdatesByOrdering.delete(e._ordering,e),e._superseded=!1;for(let t of this._updatesToRunThisFrame)e._supersededBy.has(t)&&(e._superseded=!0,r&&D.log("update superseded",e.name,t.name))}for(let e=0;e<this._updatesToRunThisFrame.length;++e)this._updatesToRunThisFrame[e]._superseded&&(this._updatesToRunThisFrame.splice(e,1),--e);for(let t of this._updatesToRunThisFrame){let n;this._performance&&(n=performance.now()),t._callback(e),this._performance&&(t._lastFrameTime=performance.now()-n),r&&D.log("update completed",t.name)}this._updatesRunLastFrame.clear();for(let e of this._updatesToRunThisFrame)this._updatesRunLastFrame.add(e);if(this._updatesToRunThisFrame.splice(0,this._updatesToRunThisFrame.length),this._scheduledTasksByPriority.size>0)do{this._executeOneTask(e)}while(this._timer.hasTimeRemaining()&&this._scheduledTasksByPriority.size>0);this._performance&&(this._lastFrameTime=performance.now()-n),this._requestAnimationFrameHandle=null,(this._scheduledUpdatesByOrdering.size>0||this._scheduledTasksByPriority.size>0)&&this.requestAnimationFrame(),null!=(t=this.options)&&t.onUpdateEnd&&this.options.onUpdateEnd()}flushTasks(){for(;this._scheduledTasksByPriority.size>0;)this._executeOneTask(performance.now())}getLastFrameTime(){return this._lastFrameTime}getUpdatesRunLastFrame(){return this._updatesRunLastFrame}_executeOneTask(e){let t,n=this._scheduledTasksByPriority.popFromMaxKey(),r=null;D.assert(void 0!==n),Object.getPrototypeOf(n)===tl.prototype&&(r=n,n=r._popTask()),D.assert(void 0!==n),D.assert(Object.getPrototypeOf(n)===Tn.prototype),this._performance&&(t=performance.now()),n._callback(e),n._complete=!0,this._performance&&(n._lastFrameTime=performance.now()-t),ut&&D.log("task completed",n.name),null!=r&&(r.isComplete()?(r.clear(),r._onComplete(),ut&&D.log("group completed",r.name)):this._scheduledTasksByPriority.insert(r._priority,r))}scheduleUpdate(e){e._remainingFrameCount=e._frameCount,this._scheduledUpdatesByOrdering.insert(e._ordering,e),this.requestAnimationFrame()}scheduleTask(e){if(Object.getPrototypeOf(e)===tl)throw new Error("frame task groups are automatically scheduled when a task is added to them and cannot be manually scheduled: "+e.name);if(e._scheduled)throw new Error("cannot schedule already scheduled task: "+e.name);if(e._cancelled)throw new Error("cannot schedule cancelled task: "+e.name);let t=e;"_group"in e&&null!=e._group&&(e._group._tasks.add(e),e._group._scheduledTasks.add(e),t=e._group),t._postponed?this._postponedTasks.add(t):this._scheduledTasksByPriority.insert(t._priority,t),e._scheduled=!0,t._scheduled=!0,ut&&D.log("task scheduled",e.name),this.requestAnimationFrame()}cancelUpdate(e){this._scheduledUpdatesByOrdering.delete(e._ordering,e),ut&&D.log("update cancelled",e.name)}cancelTask(e){if(!e._scheduled)throw new Error("cannot cancel task that has not been scheduled: "+e.name);if(e._cancelled)throw new Error("cannot cancel task that has already been cancelled: "+e.name);if("_group"in e&&null!=e._group){let t=e._group.isComplete();e._group._tasks.delete(e),e._group._scheduledTasks.delete(e),e._group.isComplete()&&(this._scheduledTasksByPriority.delete(e._group._priority,e._group),t||e._group._onComplete())}else this._scheduledTasksByPriority.delete(e._priority,e),this._postponedTasks.delete(e);Object.getPrototypeOf(e)===Tn.prototype?e._cancelled=!0:"clear"in e&&e.clear(),ut&&D.log("task cancelled",e.name)}postponeTask(e){if("_group"in e&&null!=e._group)throw new Error("cannot postpone individual tasks in group: "+e.name);if(e._cancelled)throw new Error("cannot postpone cancelled task: "+e.name);if(!e._postponed){if(Object.getPrototypeOf(e)===Tn.prototype){if("_complete"in e)return;if(!e._scheduled)throw new Error("cannot postpone task that has not been scheduled: "+e.name)}this._scheduledTasksByPriority.delete(e._priority,e),(Object.getPrototypeOf(e)===Tn.prototype||!e.isComplete())&&this._postponedTasks.add(e),e._postponed=!0,ut&&D.log("task postponed",e.name)}}resumeTask(e){if("_group"in e&&null!=e._group)throw new Error("cannot resume individual tasks in groups");if(e._cancelled)throw new Error("cannot resume cancelled task");if(e._postponed){if(Object.getPrototypeOf(e)===Tn.prototype){if("_complete"in e&&e._complete)return;if(!e._scheduled)throw new Error("cannot resume unscheduled task")}this._postponedTasks.delete(e),(Object.getPrototypeOf(e)===Tn.prototype||!e.isComplete())&&this._scheduledTasksByPriority.insert(e._priority,e),e._postponed=!1,this.requestAnimationFrame(),ut&&D.log("task resumed",e.name)}}setTaskPriority(e,t){if(Object.getPrototypeOf(e)===Tn.prototype&&!e._scheduled)throw new Error("task must be scheduled to be reprioritized");this._scheduledTasksByPriority.has(e._priority,e)&&(this._scheduledTasksByPriority.delete(e._priority,e),this._scheduledTasksByPriority.insert(t,e)),e._priority=t,ut&&D.log("task priority changed",e.name,t)}};s(dg,"TaskScheduler");var nl=dg,pg=class{constructor(){m(this,"_map"),m(this,"_size"),m(this,"_sortedKeys"),this._map=new Map,this._size=0,this._sortedKeys=[]}has(e,t){return null!=this._map.get(e)&&this._map.get(e).has(t)}get(e){return this._map.get(e)}insert(e,t){if(D.assert("number"==typeof e&&Number.isFinite(e)),null==this._map.get(e)){this._map.set(e,new Set);for(let t=0;t<=this._sortedKeys.length;++t)if(t===this._sortedKeys.length||e<this._sortedKeys[t]){this._sortedKeys.splice(t,0,e);break}}this._map.get(e).has(t)||(this._map.get(e).add(t),++this._size)}delete(e,t){null!=this._map.get(e)&&this._map.get(e).has(t)&&(this._map.get(e).delete(t),--this._size,0===this._map.get(e).size&&(this._map.delete(e),this._sortedKeys.splice(this._sortedKeys.indexOf(e),1)))}pop(e){if(null!=this._map.get(e)){let t;for(t of this._map.get(e).values()){this._map.get(e).delete(t),--this._size;break}return 0===this._map.get(e).size&&(this._map.delete(e),this._sortedKeys.splice(this._sortedKeys.indexOf(e),1)),t}}popFromMaxKey(){if(this._sortedKeys.length>0)return this.pop(this._sortedKeys[this._sortedKeys.length-1])}values(){let e=this._map.keys(),t=null,n={[Symbol.iterator]:()=>n,next:()=>{if(null==t){let n=e.next();if(n.done)return n;t=this._map.get(n.value).values()}let n=t.next();for(;n.done;){let r=e.next();if(r.done)return r;t=this._map.get(r.value).values(),n=t.next()}return n}};return n}keys(){return this._sortedKeys}get size(){let e=0;for(let t of this._map.values())e+=t.size;return D.assert(e===this._size),e}};s(pg,"Multimap");var ki=pg,Pn=s((e=>e.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()),"removeAccents"),oO=/([!-/:-@])|(?:[\n\r [-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+)/u;function sO(e){return e.split(oO).filter(Boolean)}s(sO,"tokenizeAndCaptureDelimiters");var rn,Et,Kn,an,xe,Mo,xo,Mi,Eo,To,Po,Io,xi,In,rl,il,Jn,Oo,al,ol,sl,cw,_i="",uO=.09,lO=1,cO=.025,dO=.5,pO=5e-4,fO=5e-4,hO=.01,gO=.05,lw=1,mO=.01,vO=.2,yO={MappedinCategory:"categories",MappedinLocation:"locations"},bO={searchDescriptions:!0,searchTags:!0,searchTagsInCategories:!1,searchDescriptionsInCategories:!1,stopWords:uw,jsonIndex:void 0,useLocationRank:!0,emitAnalyticsEvents:"production"===E.env.NODE_ENV,constants:{PRIMARY_INDEX_FUZZYNESS:uO,PRIMARY_INDEX_WEIGHT:lO,SECONDARY_INDEX_WEIGHT:cO,CATEGORY_NAME_WEIGHT:dO,LOCATION_NAME_WEIGHT:lw,CATEGORY_LOCATION_DESCRIPTION_WEIGHT:pO,CATEGORY_LOCATION_TAGS_WEIGHT:fO,CATEGORY_LOCATION_NAME_WEIGHT:hO,PRIMARY_INDEX_TAGS_NAME_WEIGHT:gO,LOCATION_DEFAULT_RANK:lw,RATIO_OF_FUZZY_TO_EXACT:mO,RATIO_OF_PREFIX_TO_EXACT:vO}},hg=class{constructor(e,t){var n;A(this,sl),A(this,rn,void 0),A(this,Et,void 0),A(this,Kn,void 0),A(this,an,void 0),A(this,xe,void 0),A(this,Mo,new nl({performance:!0})),A(this,xo,void 0),A(this,Mi,void 0),A(this,Eo,new Map),A(this,To,void 0),A(this,Po,void 0),A(this,Io,void 0),m(this,"buildIndices",s((()=>{var e,t;L(this,Jn,new Promise((e=>{L(this,Oo,e)})));let{PRIMARY_INDEX_FUZZYNESS:n,PRIMARY_INDEX_WEIGHT:r,CATEGORY_NAME_WEIGHT:i,RATIO_OF_FUZZY_TO_EXACT:o,RATIO_OF_PREFIX_TO_EXACT:s,PRIMARY_INDEX_TAGS_NAME_WEIGHT:a}=b(this,xe).constants,l=["object","query","weight","tag","rank"],u={fields:["query","name","tag"],storeFields:l,searchOptions:{combineWith:"OR",prefix:!0,fuzzy:n},boost:{name:r,query:r,tag:a},weights:{fuzzy:o,prefix:s},boostDocument:e=>e.includes("MappedinLocation")?r:e.includes("MappedinCategory")?i:r,tokenize:sO},c={fields:["description"],storeFields:l,searchOptions:{combineWith:"AND",prefix:!0,fuzzy:.1},processTerm:(e,t)=>{var n;return null!=(n=b(this,xo))&&n.has(e.toLowerCase())?null:e.toLowerCase()}},h={fields:["category.locations.description","category.locations.tags","category.locations.name"],storeFields:[...l,"ref","category.locations.tags","category.locations.name","category.locations.description"],searchOptions:{combineWith:"AND",prefix:!0,fuzzy:!1}};if(null!=(e=b(this,xe))&&e.jsonIndex){let{primary:e,secondary:n,extra:r}=JSON.parse(null==(t=b(this,xe))?void 0:t.jsonIndex);L(this,Et,xr.loadJS(e,u)),L(this,Kn,xr.loadJS(n,c)),L(this,an,xr.loadJS(r,h))}else L(this,Et,new xr(u)),L(this,Kn,new xr(c)),L(this,an,new xr(h)),b(this,rn).locations.forEach(b(this,rl)),b(this,rn).categories.forEach(b(this,il));b(this,Mo).update(performance.now())}),"buildIndices")),A(this,xi,0),A(this,In,s((e=>{cl(this,xi)._++,b(this,Mo).scheduleUpdate(new el({name:"updateIndex",ordering:0,frameCount:1,callback:()=>{try{e()}catch(e){D.warn("faild updating index due to",e)}cl(this,xi)._--,0===b(this,xi)&&b(this,Oo).call(this)}}))}),"#addTask")),A(this,rl,s((e=>{var t,n,r;let{SECONDARY_INDEX_WEIGHT:i,LOCATION_DEFAULT_RANK:o,PRIMARY_INDEX_TAGS_NAME_WEIGHT:s}=b(this,xe).constants,a=o;null!=(t=b(this,xe))&&t.useLocationRank&&(a=Array.isArray(e.polygons)?Math.max(...e.polygons.map((e=>{var t,n;return null!=(t=e.rank)&&t.score?null==(n=e.rank)?void 0:n.score:o})),o):o),b(this,In).call(this,(()=>{b(this,Et).add({name:Pn(e.name),tags:"",id:"MappedinLocation#"+e.id,weight:o,rank:a})})),null!=(n=b(this,xe))&&n.searchTags&&Array.isArray(e.tags)&&e.tags.forEach((t=>{b(this,Et).add({name:"",tag:Pn(t),id:"MappedinLocation#"+e.id,weight:s,rank:a})})),null!=(r=b(this,xe))&&r.searchDescriptions&&b(this,In).call(this,(()=>b(this,Kn).add({description:Pn(e.description||""),id:"MappedinLocation#"+e.id,weight:i,rank:a})))}),"#processLocation")),A(this,il,s((e=>{var t,n;let{CATEGORY_LOCATION_DESCRIPTION_WEIGHT:r,CATEGORY_LOCATION_TAGS_WEIGHT:i,CATEGORY_LOCATION_NAME_WEIGHT:o,CATEGORY_NAME_WEIGHT:s}=b(this,xe).constants;b(this,In).call(this,(()=>b(this,Et).add({name:Pn(e.name||""),description:"",id:"MappedinCategory#"+e.id,weight:s})));let a=e.locations.reduce(((e,t)=>e+" ".concat(_i," ")+t.name),"")+" ".concat(_i);if(null!=(t=b(this,xe))&&t.searchDescriptionsInCategories&&e.locations.forEach((t=>{null!=t.description&&b(this,In).call(this,(()=>b(this,an).add({id:"MappedinCategory#"+e.id,"category.locations.description":Pn(t.description),ref:t.name,weight:r})))})),null!=(n=b(this,xe))&&n.searchTagsInCategories){let t=e.locations.reduce(((e,t)=>{var n;return e+(null==(n=t.tags)?void 0:n.reduce(((e,t)=>e+" ".concat(_i," ")+t),""))+" ".concat(_i)}),"");b(this,In).call(this,(()=>b(this,an).add({"category.locations.tags":Pn(t),id:"MappedinCategory#"+e.id,weight:i})))}b(this,In).call(this,(()=>b(this,an).add({"category.locations.name":Pn(a),id:"MappedinCategory#"+e.id,weight:o})))}),"#processCategory")),A(this,Jn,void 0),A(this,Oo,void 0),A(this,al,s((e=>{var t;let n=e.score,{object:r,id:i,weight:o,rank:s}=e,[a,l]=i.split("#"),u=r||b(this,rn).getCollectionItemById(yO[a],l);return s&&null!=(t=b(this,xe))&&t.useLocationRank&&(n+=s),o&&(n*=o),{score:n,type:a,object:u}}),"#processSearchResult")),A(this,ol,s(((e,t)=>{for(let n in e.match)e.match[n].forEach((r=>{let i=e.ref||e[r]||t.object[r];if("category.locations.tags"===r||"category.locations.name"===r){let t=new RegExp("[^".concat(_i,"]* ")+n+" [^".concat(_i,"]*"),"ig").exec(e[r]);null!=t&&(i=t[0].slice(1,-1))}t.matches.push({term:n,weight:e.weight,matchesOn:r,value:i})}))}),"#addMatches")),L(this,Mi,wo.create({...e.options,testMode:!1===(null==t?void 0:t.emitAnalyticsEvents)})),L(this,xe,{...bO,...t}),L(this,rn,e),L(this,xo,new Set(null==(n=b(this,xe))?void 0:n.stopWords));let r=b(this,rn).venue.slug;b(this,rn).on(0,this.buildIndices),this.buildIndices(),L(this,To,Kr((e=>{b(this,Mi).trackSearchSuggest({query:e}),ye.addPendingEvent(new sa({venue:r}))}),2e3)),L(this,Po,Kr((e=>{b(this,Mi).trackSearch({query:e}),ye.addPendingEvent(new oa({venue:r}))}),2e3)),L(this,Io,Kr((()=>{ye.addPendingEvent(new ia({venue:r}))}),2e3)),ye.addPendingEvent(new aa({search_descriptions:b(this,xe).searchDescriptions,search_tags:b(this,xe).searchTags,search_descriptions_in_categories:b(this,xe).searchDescriptionsInCategories,search_tags_in_categories:b(this,xe).searchTagsInCategories,use_location_rank:b(this,xe).useLocationRank,venue:r}))}async suggest(e){await b(this,Jn);let{PRIMARY_INDEX_FUZZYNESS:t,PRIMARY_INDEX_WEIGHT:n,PRIMARY_INDEX_TAGS_NAME_WEIGHT:r,RATIO_OF_FUZZY_TO_EXACT:i,RATIO_OF_PREFIX_TO_EXACT:o}=b(this,xe).constants,s=b(this,Et).autoSuggest(e,{fields:["name","tag","query"],combineWith:"AND",prefix:!0,fuzzy:t,boost:{name:n,query:n,tag:r},weights:{fuzzy:i,prefix:o}});return b(this,To).call(this,e),{total:s.length,hits:s.map((e=>({text:e.suggestion})))}}async search(e){await b(this,Jn);let t=me(this,sl,cw).call(this,e);return b(this,Po).call(this,e),t}async toJSON(){return await b(this,Jn),JSON.stringify({primary:b(this,Et),secondary:b(this,Kn),extra:b(this,an)})}async addQuery(e){let t,n,{query:r,object:i,weight:o=1}=e;await b(this,Jn),t=hn.is(i)?"MappedinLocation":mr.is(i)?"MappedinCategory":"Custom","MappedinLocation"===t||"MappedinCategory"===t?n=t+"#"+i.id:"string"==typeof i.id?n="Custom#"+i.id:(n=b(this,Eo).get(i),n||(n="Custom#"+bn(),b(this,Eo).set(i,n))),b(this,Et).add({id:n,weight:o,object:i,query:Pn(r)}),b(this,Io).call(this)}destroy(){b(this,rn).off(0,this.buildIndices)}};rn=new WeakMap,Et=new WeakMap,Kn=new WeakMap,an=new WeakMap,xe=new WeakMap,Mo=new WeakMap,xo=new WeakMap,Mi=new WeakMap,Eo=new WeakMap,To=new WeakMap,Po=new WeakMap,Io=new WeakMap,xi=new WeakMap,In=new WeakMap,rl=new WeakMap,il=new WeakMap,Jn=new WeakMap,Oo=new WeakMap,al=new WeakMap,ol=new WeakMap,sl=new WeakSet,cw=s((function(e){let t=[],n=Pn(e);t=[...b(this,Et).search(n),...b(this,Kn).search(n),...b(this,an).search(n)].sort(((e,t)=>t.score-e.score));let r={};for(let e of t){let t=b(this,al).call(this,e);r[e.id]?r[e.id].score+=t.score:r[e.id]={...t,matches:[]},b(this,ol).call(this,e,r[e.id])}return Object.keys(r).map((e=>({...r[e],matches:r[e].matches.sort(((e,t)=>t.weight-e.weight))}))).sort(((e,t)=>t.score-e.score))}),"#doSearch"),s(hg,"OfflineSearch");var fg=hg;v();var dw=(e=>(e.MULTI_GEOMETRY="MULTI_GEOMETRY",e.SINGLE_GEOMETRY="SINGLE_GEOMETRY",e))(dw||{}),gg=globalThis.fetch;function it(){if(null==gg)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return gg}function N4(e){gg=e}s(it,"isomorphicFetch"),s(N4,"setFetchFn");var pw,wO=null==(pw=null==E?void 0:E.env)?void 0:pw.npm_package_version;globalThis.btoa||(globalThis.btoa=fw.encode);var kO=["ar"];function Zn(e){var t;let n={...Xh,...e};return n.headers={...n.headers,"mappedin-sdk-version":wO},n.things=Jy("things"in e?e.things:void 0),"platformString"in e&&(n.headers={...n.headers,"mappedin-platform-version":e.platformString}),n.noAuth||(n.accessToken?n.authorization="Bearer ".concat(n.accessToken):n.clientId&&n.clientSecret&&(n.authorization="Basic ".concat(globalThis.btoa("".concat(n.clientId,":").concat(n.clientSecret))))),n.language=null==(t=n.language)?void 0:t.toLowerCase(),n}function hw(e){return e.endsWith("/")?e:"".concat(e,"/")}async function V4(e){let t={emitAnalyticsEvents:!0,version:"2.0.0",...e},n=Zn(t),r=new ct(n),i=await EO(n);if("1.0.0"===n.version){let e=k0(await y0(i));return r.hydrateFromMVFv1(e),r}let o=w0(Bh(await zh(i)),n.override);return"function"==typeof t.onMVFParsed&&t.onMVFParsed(o),await r.hydrateFromMVF(o),ye.addPendingEvent(new Xi({venue:n.venue})),r}async function q4(e){e.key||D.error('"key" is required.'),e.secret||D.error('"secret" is required.'),e.mapId||D.error('"mapId" is required.');let{access_token:t}=await TO(e),n={emitAnalyticsEvents:!0,clientId:e.key,clientSecret:e.secret,venue:e.mapId,accessToken:t,...e},r=Zn({...n}),i=new ct(r),o=await IO(r,t),s=Bh(await zh(o));return"function"==typeof n.onMVFParsed&&n.onMVFParsed(s),i.hydrateFromMVF(s),i}async function _O(e){let t={emitAnalyticsEvents:!0,secure:!0,...e},n=Zn({baseUrl:"https://api-gateway.mappedin.com/",...t}),r="public/1/".concat(n.useDraftData?"draft/":""),i=new ct({...n,baseUrl:n.baseUrl+r});return await i.fetch(),t.emitAnalyticsEvents,ye.addPendingEvent(new Hi({venue:n.venue})),i}async function G4(e){let t=Zn({baseUrl:"https://api-gateway.mappedin.com/",...{emitAnalyticsEvents:!0,secure:!0,...e}}),n="public/1/".concat(t.useDraftData?"draft/":""),r=new ct({...t,baseUrl:t.baseUrl+n}),i=await vr.fetch(r);return{hasSecureAssets:i.secureContentStorage,languages:i.languages}}function U4(e){_O=e}s(Zn,"parseOptions"),s(hw,"normalizeUrl"),s(V4,"getVenueMVF"),s(q4,"getVenueMaker"),s(_O,"getVenue"),s(G4,"getVenueMetadata"),s(U4,"__setGetVenueMock");var mg={shouldPopulateBundledImagesAsBlobs:!(typeof globalThis.navigator<"u"&&"ReactNative"==globalThis.navigator.product)};async function Y4(e){let t=Zn({baseUrl:"https://api-gateway.mappedin.com/",...mg,...e}),{url:n,updated_at:r}=await MO(e),i=await it()(n,{mode:"cors"}),{data:o,format:s="jsonstring"}=await i.json();if("jsonstring"!==s)throw new Error("Unrecognized format ".concat(s));let a=new ct(t);return await a.hydrate(o,t.shouldPopulateBundledImagesAsBlobs),a.updatedAt=r,a}async function MO(e){let t=Zn({baseUrl:"https://api-gateway.mappedin.com/",...mg,...e}),{version:n,venue:r}=e,i="".concat(e.bundleBaseUri||t.baseUrl+"exports/legacy".concat(null!=t.language&&kO.includes(t.language)?"-"+t.language:"","/1/bundle"),"?venue=").concat(r,"&version=1.0.0");return t.language=void 0,await Eu(t,i)}async function W4(e,{url:t,updated_at:n}){let r=Zn({baseUrl:"https://api-gateway.mappedin.com/",...mg,...e}),i=await it()(t,{mode:"cors"}),{data:o,format:s="jsonstring"}=await i.json();if("jsonstring"!==s)throw new Error("Unrecognized format".concat(s));let a=new ct(r);return await a.hydrate(o,r.shouldPopulateBundledImagesAsBlobs),a.updatedAt=n,a}async function xO(e){var t;let n=Zn({baseUrl:"https://api-gateway.mappedin.com/",...Xh,...e}),r="".concat(n.bundleBaseUri||n.baseUrl+"exports/mvf/1/bundle","?venue=").concat(n.venue,"&version=").concat(null!=(t=n.version)?t:"2.0.0");return n.headers["Content-Type"]="application/zip",await Eu(n,r)}async function EO(e){return new Promise((async(t,n)=>{try{let{url:n}=await xO(e),r=await it()(n).then((e=>e.arrayBuffer()));t(new Uint8Array(r))}catch(e){n(e)}}))}async function TO(e){let t="".concat(e.authBaseUri?hw(e.authBaseUri):"https://auth-maker.mappedin.com/","api-key/token"),n=await it()(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e.key,secret:e.secret})});if(!n.ok)throw new Error("".concat(n.status," ").concat(n.statusText));return n.json()}async function PO(e,t){let n="".concat(e.bundleBaseUri?hw(e.bundleBaseUri):"https://app.mappedin.com/","api/venue/").concat(e.mapId,"/mvf"),r=await it()(n,{headers:{Authorization:"Bearer ".concat(t)}});if(!r.ok)throw new Error("".concat(r.status," ").concat(r.statusText));return r.json()}async function IO(e,t){return new Promise((async(n,r)=>{try{let{url:r}=await PO(e,t),i=await it()(r).then((e=>e.arrayBuffer()));n(new Uint8Array(i))}catch(e){r(e)}}))}async function $4(e,t=!0){let n=new ct({venue:""});return await n.hydrate(e,t),n}async function H4(e){let t=new ct({venue:""});return await t.hydrateFromMVF(e),t}s(Y4,"getVenueBundle"),s(MO,"getVenueBundleURL"),s(W4,"downloadBundle"),s(xO,"getVenueMVFURL"),s(EO,"downloadVenueBundleMVF"),s(TO,"getMakerAccessToken"),s(PO,"getMakerBundleURL"),s(IO,"downloadMVF"),s($4,"hydrateVenue"),s(H4,"hydrateVenueMVF");export{wo as CustomerAnalytics,Tu as GET_VENUE_EVENT,dw as MAP_RENDER_MODE,ct as Mappedin,mr as MappedinCategory,Ma as MappedinCollectionType,yr as MappedinCoordinate,gt as MappedinDestinationSet,nr as MappedinDirections,Va as MappedinEvent,hn as MappedinLocation,Ua as MappedinLocationState,Wa as MappedinMap,Ka as MappedinMapGroup,Vt as MappedinNavigatable,ka as MappedinNode,hr as MappedinPolygon,za as MappedinRankings,vr as MappedinVenue,Aa as MappedinVortex,fg as OfflineSearch,U4 as __setGetVenueMock,Nf as defaultThings,W4 as downloadBundle,IO as downloadMVF,EO as downloadVenueBundleMVF,Pu as findPreferredLanguage,TO as getMakerAccessToken,PO as getMakerBundleURL,_O as getVenue,Y4 as getVenueBundle,MO as getVenueBundleURL,V4 as getVenueMVF,xO as getVenueMVFURL,q4 as getVenueMaker,G4 as getVenueMetadata,$4 as hydrateVenue,H4 as hydrateVenueMVF,it as isomorphicFetch,Zn as parseOptions,N4 as setFetchFn};
|