@mappedin/mappedin-js 5.35.0 → 5.37.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/node/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var R,ey=Object.create,Ar=Object.defineProperty,ty=Object.getOwnPropertyDescriptor,ny=Object.getOwnPropertyNames,ry=Object.getPrototypeOf,iy=Object.prototype.hasOwnProperty,ay=(e,t,r)=>t in e?Ar(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,s=(e,t)=>Ar(e,"name",{value:t,configurable:!0}),To=(e,t)=>()=>(e&&(t=e(e=0)),t),pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),So=(e,t)=>{for(var r in t)Ar(e,r,{get:t[r],enumerable:!0})},Vf=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of ny(t))!iy.call(e,i)&&i!==r&&Ar(e,i,{get:()=>t[i],enumerable:!(n=ty(t,i))||n.enumerable});return e},an=(e,t,r)=>(r=null!=e?ey(ry(e)):{},Vf(!t&&e&&e.__esModule?r:Ar(r,"default",{value:e,enumerable:!0}),e)),We=e=>Vf(Ar({},"__esModule",{value:!0}),e),g=(e,t,r)=>(ay(e,"symbol"!=typeof t?t+"":t,r),r),vu=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},m=(e,t,r)=>(vu(e,t,"read from private field"),r?r.call(e):t.get(e)),G=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},H=(e,t,r,n)=>(vu(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),yu=(e,t,r,n)=>({set _(n){H(e,t,n,r)},get _(){return m(e,t,n)}}),Ke=(e,t,r)=>(vu(e,t,"access private method"),r),y=To((()=>{R={env:{NODE_ENV:"production",npm_package_version:"5.35.0"}}})),qf=pe(((e,t)=>{y(),function(r){var n="object"==typeof e&&e,i="object"==typeof t&&t&&t.exports==n&&t,o="object"==typeof global&&global;(o.global===o||o.window===o)&&(r=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,d=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 r,n,i=0,o="",a=-1;++a<t;)n=u.indexOf(e.charAt(a)),r=i%4?64*r+n:n,i++%4&&(o+=String.fromCharCode(255&r>>(-2*i&6)));return o}),"decode"),h={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,r,n,i,o=e.length%3,a="",s=-1,c=e.length-o;++s<c;)t=e.charCodeAt(s)<<16,r=e.charCodeAt(++s)<<8,n=e.charCodeAt(++s),a+=u.charAt((i=t+r+n)>>18&63)+u.charAt(i>>12&63)+u.charAt(i>>6&63)+u.charAt(63&i);return 2==o?(t=e.charCodeAt(s)<<8,r=e.charCodeAt(++s),a+=u.charAt((i=t+r)>>10)+u.charAt(i>>4&63)+u.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(s),a+=u.charAt(i>>2)+u.charAt(i<<4&63)+"=="),a}),"encode"),decode:d,version:"1.0.0"};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define((function(){return h}));else if(n&&!n.nodeType)if(i)i.exports=h;else for(var p in h)h.hasOwnProperty(p)&&(n[p]=h[p]);else r.base64=h}(e)})),Uf=pe(((e,t)=>{var r,n;y(),r=typeof self<"u"?self:e,n=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return s(r,"r"),r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){r.r(t),r.d(t,"computeDestinationPoint",(function(){return L})),r.d(t,"convertArea",(function(){return N})),r.d(t,"convertDistance",(function(){return D})),r.d(t,"convertSpeed",(function(){return R})),r.d(t,"decimalToSexagesimal",(function(){return W})),r.d(t,"findNearest",(function(){return H})),r.d(t,"getAreaOfPolygon",(function(){return X})),r.d(t,"getBounds",(function(){return Y})),r.d(t,"getBoundsOfDistance",(function(){return K})),r.d(t,"getCenter",(function(){return $})),r.d(t,"getCenterOfBounds",(function(){return J})),r.d(t,"getCompassDirection",(function(){return Q})),r.d(t,"getCoordinateKey",(function(){return v})),r.d(t,"getCoordinateKeys",(function(){return x})),r.d(t,"getDistance",(function(){return z})),r.d(t,"getDistanceFromLine",(function(){return ee})),r.d(t,"getGreatCircleBearing",(function(){return te})),r.d(t,"getLatitude",(function(){return A})),r.d(t,"getLongitude",(function(){return P})),r.d(t,"getPathLength",(function(){return ne})),r.d(t,"getPreciseDistance",(function(){return ie})),r.d(t,"getRhumbLineBearing",(function(){return Z})),r.d(t,"getRoughCompassDirection",(function(){return oe})),r.d(t,"getSpeed",(function(){return ae})),r.d(t,"isDecimal",(function(){return y})),r.d(t,"isPointInLine",(function(){return se})),r.d(t,"isPointInPolygon",(function(){return le})),r.d(t,"isPointNearLine",(function(){return ue})),r.d(t,"isPointWithinRadius",(function(){return ce})),r.d(t,"isSexagesimal",(function(){return m})),r.d(t,"isValidCoordinate",(function(){return I})),r.d(t,"isValidLatitude",(function(){return E})),r.d(t,"isValidLongitude",(function(){return S})),r.d(t,"orderByDistance",(function(){return q})),r.d(t,"sexagesimalToDecimal",(function(){return b})),r.d(t,"toDecimal",(function(){return T})),r.d(t,"toRad",(function(){return F})),r.d(t,"toDeg",(function(){return j})),r.d(t,"wktToPolygon",(function(){return pe})),r.d(t,"sexagesimalPattern",(function(){return n})),r.d(t,"earthRadius",(function(){return i})),r.d(t,"MINLAT",(function(){return o})),r.d(t,"MAXLAT",(function(){return a})),r.d(t,"MINLON",(function(){return l})),r.d(t,"MAXLON",(function(){return u})),r.d(t,"longitudeKeys",(function(){return c})),r.d(t,"latitudeKeys",(function(){return d})),r.d(t,"altitudeKeys",(function(){return h})),r.d(t,"distanceConversion",(function(){return p})),r.d(t,"timeConversion",(function(){return f})),r.d(t,"areaConversion",(function(){return g}));var n=/^([0-9]{1,3})°\s*([0-9]{1,3}(?:\.(?:[0-9]{1,}))?)['′]\s*(([0-9]{1,3}(\.([0-9]{1,}))?)["″]\s*)?([NEOSW]?)$/,i=6378137,o=-90,a=90,l=-180,u=180,c=["lng","lon","longitude",0],d=["lat","latitude",1],h=["alt","altitude","elevation","elev",2],p={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},f={m:60,h:3600,d:86400},g={m2:1,km2:1e-6,ha:1e-4,a:.01,ft2:10.763911,yd2:1.19599,in2:1550.0031};g.sqm=g.m2,g.sqkm=g.km2,g.sqft=g.ft2,g.sqyd=g.yd2,g.sqin=g.in2;var v=s((function(e,t){return t.reduce((function(t,r){if(null==e)throw new Error("'".concat(e,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(e,r)&&void 0!==r&&void 0===t?(t=r,r):t}),void 0)}),"m"),y=s((function(e){var t=e.toString().trim();return!isNaN(parseFloat(t))&&parseFloat(t)===Number(t)}),"v"),m=s((function(e){return n.test(e.toString().trim())}),"p"),b=s((function(e){var t=new RegExp(n).exec(e);if(null==t)throw new Error("Given value is not in sexagesimal format");var r=Number(t[2])/60||0,i=Number(t[4])/3600||0,o=parseFloat(t[1])+r+i;return["S","W"].includes(t[7])?-o:o}),"y");function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){M(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function M(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}s(_,"b"),s(w,"M"),s(M,"O");var x=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{longitude:c,latitude:d,altitude:h},r=v(e,t.longitude),n=v(e,t.latitude),i=v(e,t.altitude);return w({latitude:n,longitude:r},i?{altitude:i}:{})}),"S"),E=s((function e(t){return y(t)?!(parseFloat(t)>a||t<o):!!m(t)&&e(b(t))}),"t"),S=s((function e(t){return y(t)?!(parseFloat(t)>u||t<l):!!m(t)&&e(b(t))}),"t"),I=s((function(e){var t=x(e),r=t.latitude,n=t.longitude;if(Array.isArray(e)&&e.length>=2)return S(e[0])&&E(e[1]);if(void 0===r||void 0===n)return!1;var i=e[n],o=e[r];return void 0!==o&&void 0!==i&&!1!==E(o)&&!1!==S(i)}),"j");function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}s(k,"w"),s(C,"x"),s(O,"E");var T=s((function e(t){if(y(t))return Number(t);if(m(t))return b(t);if(I(t)){var r=x(t);return Array.isArray(t)?t.map((function(t,r){return[0,1].includes(r)?e(t):t})):C(C(C({},t),r.latitude&&O({},r.latitude,e(t[r.latitude]))),r.longitude&&O({},r.longitude,e(t[r.longitude])))}return Array.isArray(t)?t.map((function(t){return I(t)?e(t):t})):t}),"t"),A=s((function(e,t){var r=v(e,d);if(null!=r){var n=e[r];return!0===t?n:T(n)}}),"A"),P=s((function(e,t){var r=v(e,c);if(null!=r){var n=e[r];return!0===t?n:T(n)}}),"I"),F=s((function(e){return e*Math.PI/180}),"W"),j=s((function(e){return 180*e/Math.PI}),"D"),L=s((function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6371e3,i=A(e),o=P(e),a=t/n,s=F(r),c=F(i),d=F(o),h=Math.asin(Math.sin(c)*Math.cos(a)+Math.cos(c)*Math.sin(a)*Math.cos(s)),p=d+Math.atan2(Math.sin(s)*Math.sin(a)*Math.cos(c),Math.cos(a)-Math.sin(c)*Math.sin(h)),f=j(p);return(f<l||f>u)&&(p=(p+3*Math.PI)%(2*Math.PI)-Math.PI,f=j(p)),{latitude:j(h),longitude:f}}),"F"),N=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=g[t];if(r)return e*r;throw new Error("Invalid unit used for area conversion.")}),"C"),D=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=p[t];if(r)return e*r;throw new Error("Invalid unit used for distance conversion.")}),"k"),R=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kmh";switch(t){case"kmh":return e*f.h*p.km;case"mph":return e*f.h*p.mi;default:return e}}),"T");function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return U(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return U(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}s(B,"q"),s(U,"$");var G=s((function(e){var t=Math.pow(10,12);return Math.round(e*t)/t}),"B"),W=s((function(e){var t=B(e.toString().split("."),2),r=t[0],n=t[1],i=Math.abs(Number(r)),o=G(60*+("0."+(n||0))),a=Math.floor(o),s=G(60*(o%a||0));return i+"° "+Number(a.toFixed(6)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+"' "+Number(s.toFixed(4)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+'"'}),"R"),V=s((function(e){return e>1?1:e<-1?-1:e}),"X"),z=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;r=void 0===r||isNaN(r)?1:r;var n=A(e),o=P(e),a=A(t),s=P(t),l=Math.acos(V(Math.sin(F(a))*Math.sin(F(n))+Math.cos(F(a))*Math.cos(F(n))*Math.cos(F(o)-F(s))))*i;return Math.round(l/r)*r}),"_"),q=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:z;return r="function"==typeof r?r:z,t.slice().sort((function(t,n){return r(e,t)-r(e,n)}))}),"K"),H=s((function(e,t){return q(e,t)[0]}),"Y"),X=s((function(e){var t=0;if(e.length>2){for(var r,n,o,a=0;a<e.length;a++){a===e.length-2?(r=e.length-2,n=e.length-1,o=0):a===e.length-1?(r=e.length-1,n=0,o=1):(r=a,n=a+1,o=a+2);var s=P(e[r]),l=A(e[n]),u=P(e[o]);t+=(F(u)-F(s))*Math.sin(F(l))}t=t*i*i/2}return Math.abs(t)}),"Z"),Y=s((function(e){if(!1===Array.isArray(e)||0===e.length)throw new Error("No points were given.");return e.reduce((function(e,t){var r=A(t),n=P(t);return{maxLat:Math.max(r,e.maxLat),minLat:Math.min(r,e.minLat),maxLng:Math.max(n,e.maxLng),minLng:Math.min(n,e.minLng)}}),{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})}),"G"),K=s((function(e,t){var r,n,s=A(e),c=P(e),d=F(s),h=F(c),p=t/i,f=d-p,g=d+p,v=F(a),y=F(o),m=F(u),b=F(l);if(f>y&&g<v){var _=Math.asin(Math.sin(p)/Math.cos(d));(r=h-_)<b&&(r+=2*Math.PI),(n=h+_)>m&&(n-=2*Math.PI)}else f=Math.max(f,y),g=Math.min(g,v),r=b,n=m;return[{latitude:j(f),longitude:j(r)},{latitude:j(g),longitude:j(n)}]}),"V"),$=s((function(e){if(!1===Array.isArray(e)||0===e.length)return!1;var t=e.length,r=e.reduce((function(e,t){var r=F(A(t)),n=F(P(t));return{X:e.X+Math.cos(r)*Math.cos(n),Y:e.Y+Math.cos(r)*Math.sin(n),Z:e.Z+Math.sin(r)}}),{X:0,Y:0,Z:0}),n=r.X/t,i=r.Y/t,o=r.Z/t;return{longitude:j(Math.atan2(i,n)),latitude:j(Math.atan2(o,Math.sqrt(n*n+i*i)))}}),"U"),J=s((function(e){var t=Y(e),r=t.minLat+(t.maxLat-t.minLat)/2,n=t.minLng+(t.maxLng-t.minLng)/2;return{latitude:parseFloat(r.toFixed(6)),longitude:parseFloat(n.toFixed(6))}}),"z"),Z=s((function(e,t){var r=F(P(t))-F(P(e)),n=Math.log(Math.tan(F(A(t))/2+Math.PI/4)/Math.tan(F(A(e))/2+Math.PI/4));return Math.abs(r)>Math.PI&&(r=r>0?-1*(2*Math.PI-r):2*Math.PI+r),(j(Math.atan2(r,n))+360)%360}),"H"),Q=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Z,n="function"==typeof r?r(e,t):Z(e,t);if(isNaN(n))throw new Error("Could not calculate bearing for given points. Check your bearing function");switch(Math.round(n/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"}}),"J"),ee=s((function(e,t,r){var n=z(t,e),i=z(e,r),o=z(t,r),a=Math.acos(V((n*n+o*o-i*i)/(2*n*o))),s=Math.acos(V((i*i+o*o-n*n)/(2*i*o)));return a>Math.PI/2?n:s>Math.PI/2?i:Math.sin(a)*n}),"Q"),te=s((function(e,t){var r=A(t),n=P(t),i=A(e),o=P(e);return(j(Math.atan2(Math.sin(F(n)-F(o))*Math.cos(F(r)),Math.cos(F(i))*Math.sin(F(r))-Math.sin(F(i))*Math.cos(F(r))*Math.cos(F(n)-F(o))))+360)%360}),"tt");function re(e){return(re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}s(re,"nt");var ne=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z;return e.reduce((function(e,r){return"object"===re(e)&&null!==e.last&&(e.distance+=t(r,e.last)),e.last=r,e}),{last:null,distance:0}).distance}),"rt"),ie=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;r=void 0===r||isNaN(r)?1:r;var n,o,a,s,l,u,c,d=A(e),h=P(e),p=A(t),f=P(t),g=6356752.314245,v=1/298.257223563,y=F(f-h),m=Math.atan((1-v)*Math.tan(F(parseFloat(d)))),b=Math.atan((1-v)*Math.tan(F(parseFloat(p)))),_=Math.sin(m),w=Math.cos(m),M=Math.sin(b),x=Math.cos(b),E=y,S=100;do{var I=Math.sin(E),k=Math.cos(E);if(0===(u=Math.sqrt(x*I*(x*I)+(w*M-_*x*k)*(w*M-_*x*k))))return 0;n=_*M+w*x*k,o=Math.atan2(u,n),l=n-2*_*M/(s=1-(a=w*x*I/u)*a),isNaN(l)&&(l=0);var C=v/16*s*(4+v*(4-3*s));c=E,E=y+(1-C)*v*a*(o+C*u*(l+C*n*(2*l*l-1)))}while(Math.abs(E-c)>1e-12&&--S>0);if(0===S)return NaN;var O=s*(i*i-g*g)/(g*g),T=1+O/16384*(4096+O*(O*(320-175*O)-768)),j=O/1024*(256+O*(O*(74-47*O)-128)),L=j*u*(l+j/4*(n*(2*l*l-1)-j/6*l*(4*u*u-3)*(4*l*l-3))),N=g*T*(o-L);return Math.round(N/r)*r}),"et"),oe=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}),"it"),ae=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:z,n=r(e,t),i=Number(t.time)-Number(e.time),o=n/i*1e3;return o}),"ot"),se=s((function(e,t,r){return z(t,e)+z(e,r)===z(t,r)}),"ut"),le=s((function(e,t){for(var r=!1,n=t.length,i=-1,o=n-1;++i<n;o=i)(P(t[i])<=P(e)&&P(e)<P(t[o])||P(t[o])<=P(e)&&P(e)<P(t[i]))&&A(e)<(A(t[o])-A(t[i]))*(P(e)-P(t[i]))/(P(t[o])-P(t[i]))+A(t[i])&&(r=!r);return r}),"at"),ue=s((function(e,t,r,n){return ee(e,t,r)<n}),"ct"),ce=s((function(e,t,r){return z(e,t)<r}),"ft");function de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return he(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return he(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}s(de,"st"),s(he,"lt");var pe=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 t=de(e.split(" "),2),r=t[0],n=t[1];return{longitude:parseFloat(r),latitude:parseFloat(n)}}))}),"dt")}])},"object"==typeof e&&"object"==typeof t?t.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof e?e.geolib=n():r.geolib=n()})),_n={};function dy(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Nu(e,t),s(r,"__"),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function py(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function fy(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function hy(e,t){return function(r,n){t(r,n,e)}}function gy(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function my(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return s(i,"adopt"),new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function l(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((n=n.apply(e,t||[])).next())}))}function vy(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function yy(e,t){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(t,r)&&Ru(t,e,r)}function Fu(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Kf(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function by(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Kf(arguments[t]));return e}function wy(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}function _y(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function Oi(e){return this instanceof Oi?(this.v=e,this):new Oi(e)}function ky(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof Oi?Promise.resolve(e.value.v).then(l,u):c(o[0][2],e)}(i[e](t))}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function My(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:Oi(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function xy(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof Fu?Fu(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function Ey(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Sy(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Ru(t,e,r);return Ty(t,e),t}function Oy(e){return e&&e.__esModule?e:{default:e}}function Py(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function Iy(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function Ay(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}So(_n,{__assign:()=>Lu,__asyncDelegator:()=>My,__asyncGenerator:()=>ky,__asyncValues:()=>xy,__await:()=>Oi,__awaiter:()=>my,__classPrivateFieldGet:()=>Py,__classPrivateFieldIn:()=>Ay,__classPrivateFieldSet:()=>Iy,__createBinding:()=>Ru,__decorate:()=>fy,__exportStar:()=>yy,__extends:()=>dy,__generator:()=>vy,__importDefault:()=>Oy,__importStar:()=>Sy,__makeTemplateObject:()=>Ey,__metadata:()=>gy,__param:()=>hy,__read:()=>Kf,__rest:()=>py,__spread:()=>by,__spreadArray:()=>_y,__spreadArrays:()=>wy,__values:()=>Fu});var Nu,Lu,Ru,Ty,kn=To((()=>{y(),Nu=s((function(e,t){return(Nu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)}),"extendStatics"),s(dy,"__extends"),Lu=s((function(){return Lu=Object.assign||s((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),Lu.apply(this,arguments)}),"__assign"),s(py,"__rest"),s(fy,"__decorate"),s(hy,"__param"),s(gy,"__metadata"),s(my,"__awaiter"),s(vy,"__generator"),Ru=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},s(yy,"__exportStar"),s(Fu,"__values"),s(Kf,"__read"),s(by,"__spread"),s(wy,"__spreadArrays"),s(_y,"__spreadArray"),s(Oi,"__await"),s(ky,"__asyncGenerator"),s(My,"__asyncDelegator"),s(xy,"__asyncValues"),s(Ey,"__makeTemplateObject"),Ty=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},s(Sy,"__importStar"),s(Oy,"__importDefault"),s(Py,"__classPrivateFieldGet"),s(Iy,"__classPrivateFieldSet"),s(Ay,"__classPrivateFieldIn")})),Ht={};function Cy(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Du(e,t),s(r,"__"),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function jy(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function Ny(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function Ly(e,t){return function(r,n){t(r,n,e)}}function Fy(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function Ry(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return s(i,"adopt"),new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function l(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((n=n.apply(e,t||[])).next())}))}function Dy(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function zy(e,t){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(t,r)&&Vu(t,e,r)}function Bu(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Jf(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function By(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Jf(arguments[t]));return e}function Vy(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}function qy(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function Pi(e){return this instanceof Pi?(this.v=e,this):new Pi(e)}function Uy(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof Pi?Promise.resolve(e.value.v).then(l,u):c(o[0][2],e)}(i[e](t))}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function Gy(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:Pi(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function Wy(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof Bu?Bu(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function Yy(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Xy(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Vu(t,e,r);return Hy(t,e),t}function $y(e){return e&&e.__esModule?e:{default:e}}function Ky(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function Jy(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function Qy(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}So(Ht,{__assign:()=>zu,__asyncDelegator:()=>Gy,__asyncGenerator:()=>Uy,__asyncValues:()=>Wy,__await:()=>Pi,__awaiter:()=>Ry,__classPrivateFieldGet:()=>Ky,__classPrivateFieldIn:()=>Qy,__classPrivateFieldSet:()=>Jy,__createBinding:()=>Vu,__decorate:()=>Ny,__exportStar:()=>zy,__extends:()=>Cy,__generator:()=>Dy,__importDefault:()=>$y,__importStar:()=>Xy,__makeTemplateObject:()=>Yy,__metadata:()=>Fy,__param:()=>Ly,__read:()=>Jf,__rest:()=>jy,__spread:()=>By,__spreadArray:()=>qy,__spreadArrays:()=>Vy,__values:()=>Bu});var Du,zu,Vu,Hy,Xt=To((()=>{y(),Du=s((function(e,t){return(Du=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)}),"extendStatics"),s(Cy,"__extends"),zu=s((function(){return zu=Object.assign||s((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),zu.apply(this,arguments)}),"__assign"),s(jy,"__rest"),s(Ny,"__decorate"),s(Ly,"__param"),s(Fy,"__metadata"),s(Ry,"__awaiter"),s(Dy,"__generator"),Vu=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},s(zy,"__exportStar"),s(Bu,"__values"),s(Jf,"__read"),s(By,"__spread"),s(Vy,"__spreadArrays"),s(qy,"__spreadArray"),s(Pi,"__await"),s(Uy,"__asyncGenerator"),s(Gy,"__asyncDelegator"),s(Wy,"__asyncValues"),s(Yy,"__makeTemplateObject"),Hy=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},s(Xy,"__importStar"),s($y,"__importDefault"),s(Ky,"__classPrivateFieldGet"),s(Jy,"__classPrivateFieldSet"),s(Qy,"__classPrivateFieldIn")})),Qf=pe((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.ServerZone=void 0,(t=e.ServerZone||(e.ServerZone={})).US="US",t.EU="EU"})),Zf=pe((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.SpecialEventType=e.RevenueProperty=e.IdentifyOperation=void 0,(t=e.IdentifyOperation||(e.IdentifyOperation={})).SET="$set",t.SET_ONCE="$setOnce",t.ADD="$add",t.APPEND="$append",t.PREPEND="$prepend",t.REMOVE="$remove",t.PREINSERT="$preInsert",t.POSTINSERT="$postInsert",t.UNSET="$unset",t.CLEAR_ALL="$clearAll",function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE="$revenue"}(e.RevenueProperty||(e.RevenueProperty={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(e.SpecialEventType||(e.SpecialEventType={}))})),eh=pe((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.LogLevel=void 0,(t=e.LogLevel||(e.LogLevel={}))[t.None=0]="None",t[t.Error=1]="Error",t[t.Warn=2]="Warn",t[t.Verbose=3]="Verbose",t[t.Debug=4]="Debug"})),th=pe((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.PluginType=void 0,(t=e.PluginType||(e.PluginType={})).BEFORE="before",t.ENRICHMENT="enrichment",t.DESTINATION="destination"})),nh=pe((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Status=void 0,(t=e.Status||(e.Status={})).Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.PayloadTooLarge="payload_too_large",t.Invalid="invalid",t.Failed="failed",t.Timeout="Timeout",t.SystemError="SystemError"})),rh=pe((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.TransportType=void 0,(t=e.TransportType||(e.TransportType={})).XHR="xhr",t.SendBeacon="beacon",t.Fetch="fetch"})),mt=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.TransportType=e.Status=e.PluginType=e.LogLevel=e.RevenueProperty=e.IdentifyOperation=e.SpecialEventType=e.ServerZone=void 0;var t=Qf();Object.defineProperty(e,"ServerZone",{enumerable:!0,get:function(){return t.ServerZone}});var r=Zf();Object.defineProperty(e,"SpecialEventType",{enumerable:!0,get:function(){return r.SpecialEventType}}),Object.defineProperty(e,"IdentifyOperation",{enumerable:!0,get:function(){return r.IdentifyOperation}}),Object.defineProperty(e,"RevenueProperty",{enumerable:!0,get:function(){return r.RevenueProperty}});var n=eh();Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return n.LogLevel}});var i=th();Object.defineProperty(e,"PluginType",{enumerable:!0,get:function(){return i.PluginType}});var o=nh();Object.defineProperty(e,"Status",{enumerable:!0,get:function(){return o.Status}});var a=rh();Object.defineProperty(e,"TransportType",{enumerable:!0,get:function(){return a.TransportType}})})),Li=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.EU_AMPLITUDE_BATCH_SERVER_URL=e.AMPLITUDE_BATCH_SERVER_URL=e.EU_AMPLITUDE_SERVER_URL=e.AMPLITUDE_SERVER_URL=e.STORAGE_PREFIX=e.AMPLITUDE_PREFIX=e.UNSET_VALUE=void 0,e.UNSET_VALUE="-",e.AMPLITUDE_PREFIX="AMP",e.STORAGE_PREFIX="".concat(e.AMPLITUDE_PREFIX,"_unsent"),e.AMPLITUDE_SERVER_URL="https://api2.amplitude.com/2/httpapi",e.EU_AMPLITUDE_SERVER_URL="https://api.eu.amplitude.com/2/httpapi",e.AMPLITUDE_BATCH_SERVER_URL="https://api2.amplitude.com/batch",e.EU_AMPLITUDE_BATCH_SERVER_URL="https://api.eu.amplitude.com/batch"})),Uu=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.isValidProperties=e.isValidObject=void 0;var t=(Xt(),We(Ht)),r=s((function(t){if(Object.keys(t).length>1e3)return!1;for(var r in t){var n=t[r];if(!(0,e.isValidProperties)(r,n))return!1}return!0}),"isValidObject");e.isValidObject=r;var n=s((function(r,n){var i,o;if("string"!=typeof r)return!1;if(Array.isArray(n)){var a=!0;try{for(var s=t.__values(n),l=s.next();!l.done;l=s.next()){var u=l.value;if(Array.isArray(u))return!1;if("object"==typeof u)a=a&&(0,e.isValidObject)(u);else if(!["number","string"].includes(typeof u))return!1;if(!a)return!1}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}}else{if(null==n)return!1;if("object"==typeof n)return(0,e.isValidObject)(n);if(!["number","string","boolean"].includes(typeof n))return!1}return!0}),"isValidProperties");e.isValidProperties=n})),Gu=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Identify=void 0;var t=(Xt(),We(Ht)),r=mt(),n=Li(),i=Uu(),o=function(){function e(){this._propertySet=new Set,this._properties={}}return s(e,"Identify"),e.prototype.getUserProperties=function(){return t.__assign({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(r.IdentifyOperation.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(r.IdentifyOperation.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(r.IdentifyOperation.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(r.IdentifyOperation.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(r.IdentifyOperation.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(r.IdentifyOperation.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(r.IdentifyOperation.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(r.IdentifyOperation.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(r.IdentifyOperation.UNSET,e,n.UNSET_VALUE),this},e.prototype.clearAll=function(){return this._properties={},this._properties[r.IdentifyOperation.CLEAR_ALL]=n.UNSET_VALUE,this},e.prototype._safeSet=function(e,t,r){if(this._validate(e,t,r)){var n=this._properties[e];return void 0===n&&(n={},this._properties[e]=n),n[t]=r,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return void 0===this._properties[r.IdentifyOperation.CLEAR_ALL]&&!this._propertySet.has(t)&&(e===r.IdentifyOperation.ADD?"number"==typeof n:e===r.IdentifyOperation.UNSET||e===r.IdentifyOperation.REMOVE||(0,i.isValidProperties)(t,n))},e}();e.Identify=o})),Wu=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createRevenueEvent=e.createGroupEvent=e.createGroupIdentifyEvent=e.createIdentifyEvent=e.createTrackEvent=void 0;var t=(Xt(),We(Ht)),r=mt(),n=Gu(),i=s((function(e,r,n){var i="string"==typeof e?{event_type:e}:e;return t.__assign(t.__assign(t.__assign({},i),n),r&&{event_properties:r})}),"createTrackEvent");e.createTrackEvent=i;var o=s((function(e,n){return t.__assign(t.__assign({},n),{event_type:r.SpecialEventType.IDENTIFY,user_properties:e.getUserProperties()})}),"createIdentifyEvent");e.createIdentifyEvent=o;var a=s((function(e,n,i,o){var a;return t.__assign(t.__assign({},o),{event_type:r.SpecialEventType.GROUP_IDENTIFY,group_properties:i.getUserProperties(),groups:(a={},a[e]=n,a)})}),"createGroupIdentifyEvent");e.createGroupIdentifyEvent=a;var l=s((function(e,i,o){var a,s=new n.Identify;return s.set(e,i),t.__assign(t.__assign({},o),{event_type:r.SpecialEventType.IDENTIFY,user_properties:s.getUserProperties(),groups:(a={},a[e]=i,a)})}),"createGroupEvent");e.createGroupEvent=l;var u=s((function(e,n){return t.__assign(t.__assign({},n),{event_type:r.SpecialEventType.REVENUE,event_properties:e.getEventProperties()})}),"createRevenueEvent");e.createRevenueEvent=u})),Fo=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.buildResult=void 0;var t=mt(),r=s((function(e,r,n){return void 0===r&&(r=0),void 0===n&&(n=t.Status.Unknown),{event:e,code:r,message:n}}),"buildResult");e.buildResult=r})),ah=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Timeline=void 0;var t=(Xt(),We(Ht)),r=mt(),n=Fo(),i=function(){function e(){this.queue=[],this.applying=!1,this.plugins=[]}return s(e,"Timeline"),e.prototype.register=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){switch(t.label){case 0:return[4,e.setup(r)];case 1:return t.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(r){t.queue.push([e,r]),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 t.__awaiter(this,void 0,void 0,(function(){var i,o,a,s,l,u,c,d,h,p,f,g,v,y,m,b,_,w;return t.__generator(this,(function(M){switch(M.label){case 0:if(!e)return[2];i=t.__read(e,1),o=i[0],a=t.__read(e,2),s=a[1],l=this.plugins.filter((function(e){return e.type===r.PluginType.BEFORE})),M.label=1;case 1:M.trys.push([1,6,7,8]),u=t.__values(l),c=u.next(),M.label=2;case 2:return c.done?[3,5]:[4,c.value.execute(t.__assign({},o))];case 3:o=M.sent(),M.label=4;case 4:return c=u.next(),[3,2];case 5:return[3,8];case 6:return d=M.sent(),m={error:d},[3,8];case 7:try{c&&!c.done&&(b=u.return)&&b.call(u)}finally{if(m)throw m.error}return[7];case 8:h=this.plugins.filter((function(e){return e.type===r.PluginType.ENRICHMENT})),M.label=9;case 9:M.trys.push([9,14,15,16]),p=t.__values(h),f=p.next(),M.label=10;case 10:return f.done?[3,13]:[4,f.value.execute(t.__assign({},o))];case 11:o=M.sent(),M.label=12;case 12:return f=p.next(),[3,10];case 13:return[3,16];case 14:return g=M.sent(),_={error:g},[3,16];case 15:try{f&&!f.done&&(w=p.return)&&w.call(p)}finally{if(_)throw _.error}return[7];case 16:return v=this.plugins.filter((function(e){return e.type===r.PluginType.DESTINATION})),y=v.map((function(e){var r=t.__assign({},o);return e.execute(r).catch((function(e){return(0,n.buildResult)(r,0,String(e))}))})),Promise.all(y).then((function(e){var r=t.__read(e,1)[0];s(r)})),[2]}}))}))},e.prototype.flush=function(){return t.__awaiter(this,void 0,void 0,(function(){var e,n,i,o=this;return t.__generator(this,(function(t){switch(t.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map((function(e){return o.apply(e)})))];case 1:return t.sent(),n=this.plugins.filter((function(e){return e.type===r.PluginType.DESTINATION})),i=n.map((function(e){return e.flush&&e.flush()})),[4,Promise.all(i)];case 2:return t.sent(),[2]}}))}))},e}();e.Timeline=i})),Yu=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CLIENT_NOT_INITIALIZED=e.INVALID_API_KEY=e.MISSING_API_KEY_MESSAGE=e.OPT_OUT_MESSAGE=e.MAX_RETRIES_EXCEEDED_MESSAGE=e.UNEXPECTED_ERROR_MESSAGE=e.SUCCESS_MESSAGE=void 0,e.SUCCESS_MESSAGE="Event tracked successfully",e.UNEXPECTED_ERROR_MESSAGE="Unexpected error occurred",e.MAX_RETRIES_EXCEEDED_MESSAGE="Event rejected due to exceeded retry count",e.OPT_OUT_MESSAGE="Event skipped due to optOut config",e.MISSING_API_KEY_MESSAGE="Event rejected due to missing API key",e.INVALID_API_KEY="Invalid API key",e.CLIENT_NOT_INITIALIZED="Client not initialized"})),sh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.AmplitudeCore=void 0;var t=(Xt(),We(Ht)),r=Wu(),n=ah(),i=Fo(),o=Yu(),a=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 n.Timeline,this.name=e}return s(e,"AmplitudeCore"),e.prototype._init=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 t.__awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s;return t.__generator(this,(function(l){switch(l.label){case 0:r=this[e],this[e]=[],l.label=1;case 1:l.trys.push([1,6,7,8]),n=t.__values(r),i=n.next(),l.label=2;case 2:return i.done?[3,5]:[4,(0,i.value)()];case 3:l.sent(),l.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return o=l.sent(),a={error:o},[3,8];case 7:try{i&&!i.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}return[7];case 8:return[2]}}))}))},e.prototype.track=function(e,t,n){var i=(0,r.createTrackEvent)(e,t,n);return this.dispatch(i)},e.prototype.identify=function(e,t){var n=(0,r.createIdentifyEvent)(e,t);return this.dispatch(n)},e.prototype.groupIdentify=function(e,t,n,i){var o=(0,r.createGroupIdentifyEvent)(e,t,n,i);return this.dispatch(o)},e.prototype.setGroup=function(e,t,n){var i=(0,r.createGroupEvent)(e,t,n);return this.dispatch(i)},e.prototype.revenue=function(e,t){var n=(0,r.createRevenueEvent)(e,t);return this.dispatch(n)},e.prototype.add=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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((0,i.buildResult)(e,0,o.CLIENT_NOT_INITIALIZED));this.process(e).then(t)},e.prototype.dispatch=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r=this;return t.__generator(this,(function(t){return this.config?[2,this.process(e)]:[2,new Promise((function(t){r.dispatchQ.push(r.dispatchWithCallback.bind(r,e,t))}))]}))}))},e.prototype.process=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r,n,a;return t.__generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),this.config.optOut?[2,(0,i.buildResult)(e,0,o.OPT_OUT_MESSAGE)]:[4,this.timeline.push(e)];case 1:return 200===(a=t.sent()).code?this.config.loggerProvider.log(a.message):this.config.loggerProvider.error(a.message),[2,a];case 2:return r=t.sent(),n=String(r),this.config.loggerProvider.error(n),[2,a=(0,i.buildResult)(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}();e.AmplitudeCore=a})),uh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Revenue=void 0;var t=(Xt(),We(Ht)),r=mt(),n=Uu(),i=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(0,n.isValidObject)(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?t.__assign({},this.properties):{};return e[r.RevenueProperty.REVENUE_PRODUCT_ID]=this.productId,e[r.RevenueProperty.REVENUE_QUANTITY]=this.quantity,e[r.RevenueProperty.REVENUE_PRICE]=this.price,e[r.RevenueProperty.REVENUE_TYPE]=this.revenueType,e[r.RevenueProperty.REVENUE]=this.revenue,e},e}();e.Revenue=i})),lh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.chunk=void 0;var t=s((function(e,t){var r=Math.max(t,1);return e.reduce((function(e,t,n){var i=Math.floor(n/r);return e[i]||(e[i]=[]),e[i].push(t),e}),[])}),"chunk");e.chunk=t})),Xu=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Logger=void 0;var t=mt(),r="Amplitude Logger ",n=function(){function e(){this.logLevel=t.LogLevel.None}return s(e,"Logger"),e.prototype.disable=function(){this.logLevel=t.LogLevel.None},e.prototype.enable=function(e){void 0===e&&(e=t.LogLevel.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Verbose||console.log("".concat(r,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Warn||console.warn("".concat(r,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Error||console.error("".concat(r,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Debug||console.log("".concat(r,"[Debug]: ").concat(e.join(" ")))},e}();e.Logger=n})),$u=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createServerConfig=e.getServerUrl=e.Config=e.getDefaultConfig=void 0;var t=mt(),r=Li(),n=Xu(),i=s((function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,logLevel:t.LogLevel.Warn,loggerProvider:new n.Logger,optOut:!1,serverUrl:r.AMPLITUDE_SERVER_URL,serverZone:t.ServerZone.US,useBatch:!1}}),"getDefaultConfig");e.getDefaultConfig=i;var o=function(){function t(t){var r,n,i;this._optOut=!1;var o=(0,e.getDefaultConfig)();this.apiKey=t.apiKey,this.flushIntervalMillis=t.flushIntervalMillis||o.flushIntervalMillis,this.flushMaxRetries=t.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=t.flushQueueSize||o.flushQueueSize,this.loggerProvider=t.loggerProvider||o.loggerProvider,this.logLevel=null!==(r=t.logLevel)&&void 0!==r?r:o.logLevel,this.minIdLength=t.minIdLength,this.plan=t.plan,this.ingestionMetadata=t.ingestionMetadata,this.optOut=null!==(n=t.optOut)&&void 0!==n?n:o.optOut,this.serverUrl=t.serverUrl,this.serverZone=t.serverZone||o.serverZone,this.storageProvider=t.storageProvider,this.transportProvider=t.transportProvider,this.useBatch=null!==(i=t.useBatch)&&void 0!==i?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var a=(0,e.createServerConfig)(t.serverUrl,t.serverZone,t.useBatch);this.serverZone=a.serverZone,this.serverUrl=a.serverUrl}return s(t,"Config"),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),t}();e.Config=o;var a=s((function(e,n){return e===t.ServerZone.EU?n?r.EU_AMPLITUDE_BATCH_SERVER_URL:r.EU_AMPLITUDE_SERVER_URL:n?r.AMPLITUDE_BATCH_SERVER_URL:r.AMPLITUDE_SERVER_URL}),"getServerUrl");e.getServerUrl=a;var l=s((function(r,n,i){if(void 0===r&&(r=""),void 0===n&&(n=(0,e.getDefaultConfig)().serverZone),void 0===i&&(i=(0,e.getDefaultConfig)().useBatch),r)return{serverUrl:r,serverZone:void 0};var o=[t.ServerZone.US,t.ServerZone.EU].includes(n)?n:(0,e.getDefaultConfig)().serverZone;return{serverZone:o,serverUrl:(0,e.getServerUrl)(o,i)}}),"createServerConfig");e.createServerConfig=l})),ch=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Destination=void 0;var t=(Xt(),We(Ht)),r=mt(),n=Yu(),i=Li(),o=lh(),a=Fo(),l=$u(),u=function(){function e(){this.name="amplitude",this.type=r.PluginType.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return s(e,"Destination"),e.prototype.setup=function(e){var r;return t.__awaiter(this,void 0,void 0,(function(){var n,o=this;return t.__generator(this,(function(t){switch(t.label){case 0:return this.config=e,this.storageKey="".concat(i.STORAGE_PREFIX,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(r=this.config.storageProvider)||void 0===r?void 0:r.get(this.storageKey)];case 1:return n=t.sent(),this.saveEvents(),n&&n.length>0&&Promise.all(n.map((function(e){return o.execute(e)}))).catch(),[2,Promise.resolve(void 0)]}}))}))},e.prototype.execute=function(e){var t=this;return new Promise((function(r){var n={event:e,attempts:0,callback:function(e){return r(e)},timeout:0};t.addToQueue(n)}))},e.prototype.addToQueue=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t.filter((function(t){return t.attempts<e.config.flushMaxRetries?(t.attempts+=1,!0):(e.fulfillRequest([t],500,n.MAX_RETRIES_EXCEEDED_MESSAGE),!1)}));i.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),t.__awaiter(this,void 0,void 0,(function(){var r,n,i,a=this;return t.__generator(this,(function(t){switch(t.label){case 0:return r=[],n=[],this.queue.forEach((function(e){return 0===e.timeout?r.push(e):n.push(e)})),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),i=(0,o.chunk)(r,this.config.flushQueueSize),[4,Promise.all(i.map((function(t){return a.send(t,e)})))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(e,r){return void 0===r&&(r=!0),t.__awaiter(this,void 0,void 0,(function(){var i,o,a,s,u;return t.__generator(this,(function(c){switch(c.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,n.MISSING_API_KEY_MESSAGE)];i={api_key:this.config.apiKey,events:e.map((function(e){var r=e.event;r.extra;return t.__rest(r,["extra"])})),options:{min_id_length:this.config.minIdLength}},c.label=1;case 1:return c.trys.push([1,3,,4]),o=(0,l.createServerConfig)(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(o,i)];case 2:if(null===(a=c.sent()))return this.fulfillRequest(e,0,n.UNEXPECTED_ERROR_MESSAGE),[2];if(!r){if("body"in a){s="";try{s=JSON.stringify(a.body,null,2)}catch{}this.fulfillRequest(e,a.statusCode,"".concat(a.status,": ").concat(s))}else this.fulfillRequest(e,a.statusCode,a.status);return[2]}return this.handleReponse(a,e),[3,4];case 3:return u=c.sent(),this.fulfillRequest(e,0,String(u)),[3,4];case 4:return[2]}}))}))},e.prototype.handleReponse=function(e,t){switch(e.status){case r.Status.Success:this.handleSuccessResponse(e,t);break;case r.Status.Invalid:this.handleInvalidResponse(e,t);break;case r.Status.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case r.Status.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.handleOtherReponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,n.SUCCESS_MESSAGE)},e.prototype.handleInvalidResponse=function(e,r){var i=this;if(e.body.missingField||e.body.error.startsWith(n.INVALID_API_KEY))this.fulfillRequest(r,e.statusCode,e.body.error);else{var o=t.__spreadArray(t.__spreadArray(t.__spreadArray(t.__spreadArray([],t.__read(Object.values(e.body.eventsWithInvalidFields)),!1),t.__read(Object.values(e.body.eventsWithMissingFields)),!1),t.__read(Object.values(e.body.eventsWithInvalidIdLengths)),!1),t.__read(e.body.silencedEvents),!1).flat(),a=new Set(o),s=r.filter((function(t,r){if(!a.has(r))return!0;i.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,t.__spreadArray([],t.__read(s),!1))}},e.prototype.handlePayloadTooLargeResponse=function(e,r){1!==r.length?(this.config.flushQueueSize/=2,this.addToQueue.apply(this,t.__spreadArray([],t.__read(r),!1))):this.fulfillRequest(r,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,r){var n=this,i=Object.keys(e.body.exceededDailyQuotaUsers),o=Object.keys(e.body.exceededDailyQuotaDevices),a=e.body.throttledEvents,s=new Set(i),l=new Set(o),u=new Set(a),c=r.filter((function(t,r){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&l.has(t.event.device_id)))return u.has(r)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,t.__spreadArray([],t.__read(c),!1))},e.prototype.handleOtherReponse=function(e){var r=this;this.addToQueue.apply(this,t.__spreadArray([],t.__read(e.map((function(e){return e.timeout=e.attempts*r.retryTimeout,e}))),!1))},e.prototype.fulfillRequest=function(e,t,r){this.saveEvents(),e.forEach((function(e){return e.callback((0,a.buildResult)(e.event,t,r))}))},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}();e.Destination=u})),ph=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.returnWrapper=void 0;var t=(Xt(),We(Ht)),r=s((function(e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return{promise:e.apply(void 0,t.__spreadArray([],t.__read(r),!1))}}}),"returnWrapper");e.returnWrapper=r})),fh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.debugWrapper=e.getClientStates=e.getValueByStringPath=e.getClientLogConfig=e.getStacktrace=void 0;var t=(Xt(),We(Ht)),r=mt(),n=s((function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map((function(e){return e.trim()}))}),"getStacktrace");e.getStacktrace=n;var i=s((function(e){return function(){var r=t.__assign({},e.config);return{logger:r.loggerProvider,logLevel:r.logLevel}}}),"getClientLogConfig");e.getClientLogConfig=i;var o=s((function(e,r){var n,i;r=(r=r.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var o=t.__values(r.split(".")),a=o.next();!a.done;a=o.next()){var s=a.value;if(!(s in e))return;e=e[s]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return e}),"getValueByStringPath");e.getValueByStringPath=o;var a=s((function(r,n){return function(){var i,o,a={};try{for(var s=t.__values(n),l=s.next();!l.done;l=s.next()){var u=l.value;a[u]=(0,e.getValueByStringPath)(r,u)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a}}),"getClientStates");e.getClientStates=a;var l=s((function(t,n,i,o,a){return void 0===a&&(a=null),function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var u=i(),c=u.logger,d=u.logLevel;if(d&&d<r.LogLevel.Debug||!d||!c)return t.apply(a,s);var h={type:"invoke public method",name:n,args:s,stacktrace:(0,e.getStacktrace)(1),time:{start:(new Date).toISOString()},states:{}};o&&h.states&&(h.states.before=o());var p=t.apply(a,s);return p&&p.promise?p.promise.then((function(){o&&h.states&&(h.states.after=o()),h.time&&(h.time.end=(new Date).toISOString()),c.debug(JSON.stringify(h,null,2))})):(o&&h.states&&(h.states.after=o()),h.time&&(h.time.end=(new Date).toISOString()),c.debug(JSON.stringify(h,null,2))),p}}),"debugWrapper");e.debugWrapper=l})),hh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.UUID=void 0;var t=s((function(t){return t?(t^16*Math.random()>>t/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,e.UUID)}),"UUID");e.UUID=t})),gh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.MemoryStorage=void 0;var t=(Xt(),We(Ht)),r=function(){function e(){this.memoryStorage=new Map}return s(e,"MemoryStorage"),e.prototype.isEnabled=function(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return[2,!0]}))}))},e.prototype.get=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,this.memoryStorage.get(e)]}))}))},e.prototype.getRaw=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this.get(e)];case 1:return[2,(r=t.sent())?JSON.stringify(r):void 0]}}))}))},e.prototype.set=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return this.memoryStorage.set(e,r),[2]}))}))},e.prototype.remove=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return this.memoryStorage.delete(e),[2]}))}))},e.prototype.reset=function(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return this.memoryStorage.clear(),[2]}))}))},e}();e.MemoryStorage=r})),mh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.BaseTransport=void 0;var t=mt(),r=function(){function e(){}return s(e,"BaseTransport"),e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var r,n,i,o,a,s,l,u,c,d,h,p,f,g,v,y,m,b,_,w,M,x;if("object"!=typeof e)return null;var E=e.code||0,S=this.buildStatus(E);switch(S){case t.Status.Success:return{status:S,statusCode:E,body:{eventsIngested:null!==(r=e.events_ingested)&&void 0!==r?r:0,payloadSizeBytes:null!==(n=e.payload_size_bytes)&&void 0!==n?n:0,serverUploadTime:null!==(i=e.server_upload_time)&&void 0!==i?i:0}};case t.Status.Invalid:return{status:S,statusCode:E,body:{error:null!==(o=e.error)&&void 0!==o?o:"",missingField:null!==(a=e.missing_field)&&void 0!==a?a:"",eventsWithInvalidFields:null!==(s=e.events_with_invalid_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(l=e.events_with_missing_fields)&&void 0!==l?l:{},eventsWithInvalidIdLengths:null!==(u=e.events_with_invalid_id_lengths)&&void 0!==u?u:{},epsThreshold:null!==(c=e.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(d=e.exceeded_daily_quota_devices)&&void 0!==d?d:{},silencedDevices:null!==(h=e.silenced_devices)&&void 0!==h?h:[],silencedEvents:null!==(p=e.silenced_events)&&void 0!==p?p:[],throttledDevices:null!==(f=e.throttled_devices)&&void 0!==f?f:{},throttledEvents:null!==(g=e.throttled_events)&&void 0!==g?g:[]}};case t.Status.PayloadTooLarge:return{status:S,statusCode:E,body:{error:null!==(v=e.error)&&void 0!==v?v:""}};case t.Status.RateLimit:return{status:S,statusCode:E,body:{error:null!==(y=e.error)&&void 0!==y?y:"",epsThreshold:null!==(m=e.eps_threshold)&&void 0!==m?m:0,throttledDevices:null!==(b=e.throttled_devices)&&void 0!==b?b:{},throttledUsers:null!==(_=e.throttled_users)&&void 0!==_?_:{},exceededDailyQuotaDevices:null!==(w=e.exceeded_daily_quota_devices)&&void 0!==w?w:{},exceededDailyQuotaUsers:null!==(M=e.exceeded_daily_quota_users)&&void 0!==M?M:{},throttledEvents:null!==(x=e.throttled_events)&&void 0!==x?x:[]}};case t.Status.Timeout:default:return{status:S,statusCode:E}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?t.Status.Success:429===e?t.Status.RateLimit:413===e?t.Status.PayloadTooLarge:408===e?t.Status.Timeout:e>=400&&e<500?t.Status.Invalid:e>=500?t.Status.Failed:t.Status.Unknown},e}();e.BaseTransport=r})),un=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createIdentifyEvent=e.BaseTransport=e.MemoryStorage=e.UUID=e.getClientStates=e.getClientLogConfig=e.debugWrapper=e.returnWrapper=e.AMPLITUDE_PREFIX=e.Logger=e.Config=e.Destination=e.Revenue=e.Identify=e.AmplitudeCore=void 0;var t=sh();Object.defineProperty(e,"AmplitudeCore",{enumerable:!0,get:function(){return t.AmplitudeCore}});var r=Gu();Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return r.Identify}});var n=uh();Object.defineProperty(e,"Revenue",{enumerable:!0,get:function(){return n.Revenue}});var i=ch();Object.defineProperty(e,"Destination",{enumerable:!0,get:function(){return i.Destination}});var o=$u();Object.defineProperty(e,"Config",{enumerable:!0,get:function(){return o.Config}});var a=Xu();Object.defineProperty(e,"Logger",{enumerable:!0,get:function(){return a.Logger}});var s=Li();Object.defineProperty(e,"AMPLITUDE_PREFIX",{enumerable:!0,get:function(){return s.AMPLITUDE_PREFIX}});var l=ph();Object.defineProperty(e,"returnWrapper",{enumerable:!0,get:function(){return l.returnWrapper}});var u=fh();Object.defineProperty(e,"debugWrapper",{enumerable:!0,get:function(){return u.debugWrapper}}),Object.defineProperty(e,"getClientLogConfig",{enumerable:!0,get:function(){return u.getClientLogConfig}}),Object.defineProperty(e,"getClientStates",{enumerable:!0,get:function(){return u.getClientStates}});var c=hh();Object.defineProperty(e,"UUID",{enumerable:!0,get:function(){return c.UUID}});var d=gh();Object.defineProperty(e,"MemoryStorage",{enumerable:!0,get:function(){return d.MemoryStorage}});var h=mh();Object.defineProperty(e,"BaseTransport",{enumerable:!0,get:function(){return h.BaseTransport}});var p=Wu();Object.defineProperty(e,"createIdentifyEvent",{enumerable:!0,get:function(){return p.createIdentifyEvent}})})),lr={};function hw(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Qu(e,t),s(r,"__"),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function gw(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function mw(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function vw(e,t){return function(r,n){t(r,n,e)}}function yw(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function bw(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return s(i,"adopt"),new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function l(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((n=n.apply(e,t||[])).next())}))}function ww(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function _w(e,t){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(t,r)&&tl(t,e,r)}function el(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function vh(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function kw(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(vh(arguments[t]));return e}function Mw(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}function xw(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function Ui(e){return this instanceof Ui?(this.v=e,this):new Ui(e)}function Ew(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof Ui?Promise.resolve(e.value.v).then(l,u):c(o[0][2],e)}(i[e](t))}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function Tw(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:Ui(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function Sw(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof el?el(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function Ow(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Iw(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&tl(t,e,r);return Pw(t,e),t}function Aw(e){return e&&e.__esModule?e:{default:e}}function Cw(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function jw(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function Nw(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}So(lr,{__assign:()=>Zu,__asyncDelegator:()=>Tw,__asyncGenerator:()=>Ew,__asyncValues:()=>Sw,__await:()=>Ui,__awaiter:()=>bw,__classPrivateFieldGet:()=>Cw,__classPrivateFieldIn:()=>Nw,__classPrivateFieldSet:()=>jw,__createBinding:()=>tl,__decorate:()=>mw,__exportStar:()=>_w,__extends:()=>hw,__generator:()=>ww,__importDefault:()=>Aw,__importStar:()=>Iw,__makeTemplateObject:()=>Ow,__metadata:()=>yw,__param:()=>vw,__read:()=>vh,__rest:()=>gw,__spread:()=>kw,__spreadArray:()=>xw,__spreadArrays:()=>Mw,__values:()=>el});var Qu,Zu,tl,Pw,cr=To((()=>{y(),Qu=s((function(e,t){return(Qu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)}),"extendStatics"),s(hw,"__extends"),Zu=s((function(){return Zu=Object.assign||s((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),Zu.apply(this,arguments)}),"__assign"),s(gw,"__rest"),s(mw,"__decorate"),s(vw,"__param"),s(yw,"__metadata"),s(bw,"__awaiter"),s(ww,"__generator"),tl=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},s(_w,"__exportStar"),s(el,"__values"),s(vh,"__read"),s(kw,"__spread"),s(Mw,"__spreadArrays"),s(xw,"__spreadArray"),s(Ui,"__await"),s(Ew,"__asyncGenerator"),s(Tw,"__asyncDelegator"),s(Sw,"__asyncValues"),s(Ow,"__makeTemplateObject"),Pw=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},s(Iw,"__importStar"),s(Aw,"__importDefault"),s(Cw,"__classPrivateFieldGet"),s(jw,"__classPrivateFieldSet"),s(Nw,"__classPrivateFieldIn")})),$o=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getGlobalScope=void 0;var t=s((function(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:void 0}),"getGlobalScope");e.getGlobalScope=t})),nl=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.tryDecodeURIComponent=e.getQueryParams=void 0;var t=$o(),r=s((function(){var r,n=(0,t.getGlobalScope)();return null!==(r=null==n?void 0:n.location)&&void 0!==r&&r.search?n.location.search.substring(1).split("&").filter(Boolean).reduce((function(t,r){var n=r.split("=",2),i=(0,e.tryDecodeURIComponent)(n[0]),o=(0,e.tryDecodeURIComponent)(n[1]);return o&&(t[i]=o),t}),{}):{}}),"getQueryParams");e.getQueryParams=r;var n=s((function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch{return""}}),"tryDecodeURIComponent");e.tryDecodeURIComponent=n})),Ko=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.MKTG=e.BASE_CAMPAIGN=e.EMPTY_VALUE=e.WBRAID=e.TWCLID=e.TTCLID=e.MSCLKID=e.KO_CLICK_ID=e.GCLID=e.GBRAID=e.FBCLID=e.DCLID=e.UTM_TERM=e.UTM_SOURCE=e.UTM_MEDIUM=e.UTM_ID=e.UTM_CONTENT=e.UTM_CAMPAIGN=void 0,e.UTM_CAMPAIGN="utm_campaign",e.UTM_CONTENT="utm_content",e.UTM_ID="utm_id",e.UTM_MEDIUM="utm_medium",e.UTM_SOURCE="utm_source",e.UTM_TERM="utm_term",e.DCLID="dclid",e.FBCLID="fbclid",e.GBRAID="gbraid",e.GCLID="gclid",e.KO_CLICK_ID="ko_click_id",e.MSCLKID="msclkid",e.TTCLID="ttclid",e.TWCLID="twclid",e.WBRAID="wbraid",e.EMPTY_VALUE="EMPTY",e.BASE_CAMPAIGN={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},e.MKTG="MKTG"})),rl=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CampaignParser=void 0;var t=(cr(),We(lr)),r=nl(),n=Ko(),i=function(){function e(){}return s(e,"CampaignParser"),e.prototype.parse=function(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return[2,t.__assign(t.__assign(t.__assign(t.__assign({},n.BASE_CAMPAIGN),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},e.prototype.getUtmParam=function(){var e=(0,r.getQueryParams)();return{utm_campaign:e[n.UTM_CAMPAIGN],utm_content:e[n.UTM_CONTENT],utm_id:e[n.UTM_ID],utm_medium:e[n.UTM_MEDIUM],utm_source:e[n.UTM_SOURCE],utm_term:e[n.UTM_TERM]}},e.prototype.getReferrer=function(){var e,t,r={referrer:void 0,referring_domain:void 0};try{r.referrer=document.referrer||void 0,r.referring_domain=null!==(t=null===(e=r.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch{}return r},e.prototype.getClickIds=function(){var e,t=(0,r.getQueryParams)();return(e={})[n.DCLID]=t[n.DCLID],e[n.FBCLID]=t[n.FBCLID],e[n.GBRAID]=t[n.GBRAID],e[n.GCLID]=t[n.GCLID],e[n.KO_CLICK_ID]=t[n.KO_CLICK_ID],e[n.MSCLKID]=t[n.MSCLKID],e[n.TTCLID]=t[n.TTCLID],e[n.TWCLID]=t[n.TWCLID],e[n.WBRAID]=t[n.WBRAID],e},e}();e.CampaignParser=i})),Qo=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getOldCookieName=e.getCookieName=void 0;var t=un(),r=s((function(e,r,n){return void 0===r&&(r=""),void 0===n&&(n=10),[t.AMPLITUDE_PREFIX,r,e.substring(0,n)].filter(Boolean).join("_")}),"getCookieName");e.getCookieName=r;var n=s((function(e){return"".concat(t.AMPLITUDE_PREFIX.toLowerCase(),"_").concat(e.substring(0,6))}),"getOldCookieName");e.getOldCookieName=n})),kh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CampaignTracker=void 0;var t=(cr(),We(lr)),r=un(),n=Qo(),i=rl(),o=Ko(),a=function(){function e(e,t){var r,a;this.storage=t.storage,this.storageKey=(0,n.getCookieName)(e,o.MKTG),this.parser=new i.CampaignParser,this.track=t.track,this.onNewCampaign=t.onNewCampaign,this.disabled=!!t.disabled,this.trackNewCampaigns=!!t.trackNewCampaigns,this.trackPageViews=!!t.trackPageViews,this.excludeReferrers=null!==(r=t.excludeReferrers)&&void 0!==r?r:[],typeof location<"u"&&this.excludeReferrers.unshift(location.hostname),this.initialEmptyValue=null!==(a=t.initialEmptyValue)&&void 0!==a?a:o.EMPTY_VALUE}return s(e,"CampaignTracker"),e.prototype.isNewCampaign=function(e,r,n){void 0===n&&(n=!1);e.referrer;var i=e.referring_domain,o=t.__rest(e,["referrer","referring_domain"]),a=r||{},s=(a.referrer,a.referring_domain),u=t.__rest(a,["referrer","referring_domain"]);if(e.referring_domain&&this.excludeReferrers.includes(e.referring_domain))return!1;var c=JSON.stringify(o)!==JSON.stringify(u),d=n?l(i||"")!==l(s||""):i!==s;return!r||c||d},e.prototype.saveCampaignToStorage=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 n=this,i=t.__assign(t.__assign({},o.BASE_CAMPAIGN),e),a=Object.entries(i).reduce((function(e,r){var i=t.__read(r,2),o=i[0],a=i[1];return e.setOnce("initial_".concat(o),a||n.initialEmptyValue),a?e.set(o,a):e.unset(o)}),new r.Identify),s={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 t.__assign(t.__assign({},(0,r.createIdentifyEvent)(a)),this.trackPageViews&&s)},e.prototype.send=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r,n;return t.__generator(this,(function(t){switch(t.label){case 0:return this.disabled?[2]:[4,this.parser.parse()];case 1:return r=t.sent(),[4,this.getCampaignFromStorage()];case 2:if(n=t.sent(),!e){if(!this.trackNewCampaigns||!this.isNewCampaign(r,n))return[2];this.onNewCampaign(r)}return[4,this.track(this.createCampaignEvent(r))];case 3:return t.sent(),[4,this.saveCampaignToStorage(r)];case 4:return t.sent(),[2]}}))}))},e}();e.CampaignTracker=a;var l=s((function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")}),"domainWithoutSubdomain")})),Mh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CookieStorage=void 0;var t=(cr(),We(lr)),r=$o(),n=function(){function e(e){this.options=t.__assign({},e)}return s(e,"CookieStorage"),e.prototype.isEnabled=function(){return t.__awaiter(this,void 0,void 0,(function(){var n,i,o;return t.__generator(this,(function(t){switch(t.label){case 0:if(!(0,r.getGlobalScope)())return[2,!1];n=String(Date.now()),i=new e(this.options),o="AMP_TEST",t.label=1;case 1:return t.trys.push([1,4,5,7]),[4,i.set(o,n)];case 2:return t.sent(),[4,i.get(o)];case 3:return[2,t.sent()===n];case 4:return t.sent(),[2,!1];case 5:return[4,i.remove(o)];case 6:return t.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this.getRaw(e)];case 1:if(!(r=t.sent()))return[2,void 0];try{try{r=decodeURIComponent(atob(r))}catch{}return[2,JSON.parse(r)]}catch{return[2,void 0]}return[2]}}))}))},e.prototype.getRaw=function(e){var n;return t.__awaiter(this,void 0,void 0,(function(){var i,o,a;return t.__generator(this,(function(t){return i=(0,r.getGlobalScope)(),o=null!==(n=null==i?void 0:i.document.cookie.split("; "))&&void 0!==n?n:[],(a=o.find((function(t){return 0===t.indexOf(e+"=")})))?[2,a.substring(e.length+1)]:[2,void 0]}))}))},e.prototype.set=function(e,n){var i;return t.__awaiter(this,void 0,void 0,(function(){var o,a,s,l,u,c;return t.__generator(this,(function(t){try{o=null!==(i=this.options.expirationDays)&&void 0!==i?i:0,s=void 0,(a=null!==n?o:-1)&&((l=new Date).setTime(l.getTime()+24*a*60*60*1e3),s=l),u="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(n)))),s&&(u+="; expires=".concat(s.toUTCString())),u+="; path=/",this.options.domain&&(u+="; domain=".concat(this.options.domain)),this.options.secure&&(u+="; Secure"),this.options.sameSite&&(u+="; SameSite=".concat(this.options.sameSite)),(c=(0,r.getGlobalScope)())&&(c.document.cookie=u)}catch{}return[2]}))}))},e.prototype.remove=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return[2]}))}))},e}();e.CookieStorage=n})),xh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.SessionManager=void 0;var t=(cr(),We(lr)),r=Qo(),n=function(){function e(e,t){this.storage=e,this.storageKey=(0,r.getCookieName)(t),this.cache={optOut:!1}}return s(e,"SessionManager"),e.prototype.load=function(){var e;return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return r=this,[4,this.storage.get(this.storageKey)];case 1:return r.cache=null!==(e=t.sent())&&void 0!==e?e:{optOut:!1},[2,this]}}))}))},e.prototype.setSession=function(e){this.cache=t.__assign(t.__assign({},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}();e.SessionManager=n})),Eh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.FetchTransport=void 0;var t=(cr(),We(lr)),r=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(r,e),s(r,"FetchTransport"),r.prototype.send=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){var n,i;return t.__generator(this,(function(t){switch(t.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(r),method:"POST"},[4,fetch(e,n)];case 1:return[4,t.sent().json()];case 2:return i=t.sent(),[2,this.buildResponse(i)]}}))}))},r}(un().BaseTransport);e.FetchTransport=r})),Sh=pe(((e,t)=>{var r,n;y(),r=e,n=function(e){var t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function r(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return n(null==t&&r.path)}},r.exports),r.exports}function n(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}s(r,"createCommonjsModule"),s(n,"commonjsRequire");var i=r((function(e,r){!function(t,n){var i="function",o="undefined",a="object",l="string",u="model",c="name",d="type",h="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",b="wearable",_="embedded",w="Amazon",M="Apple",x="ASUS",E="BlackBerry",S="Browser",I="Chrome",k="Firefox",C="Google",O="Huawei",T="LG",A="Microsoft",P="Motorola",F="Opera",j="Samsung",L="Sony",N="Xiaomi",D="Zebra",R="Facebook",B=s((function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}),"extend"),U=s((function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t}),"enumerize"),G=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]:n}),"majorize"),z=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"),q=s((function(e,t){for(var r,o,s,l,u,c,d=0;d<t.length&&!u;){var h=t[d],p=t[d+1];for(r=o=0;r<h.length&&!u;)if(u=h[r++].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]):n:this[l[0]]=c?l[1].call(this,c,l[2]):n:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):n):this[l]=c||n;d+=2}}),"rgxMapper"),H=s((function(e,t){for(var r in t)if(typeof t[r]===a&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(G(t[r][i],e))return"?"===r?n:r}else if(G(t[r],e))return"?"===r?n:r;return e}),"strMapper"),X={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"},Y={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,F+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,F]],[/(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,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,F+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,F+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[p,[c,k]],[/\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,R],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,I+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,I+" 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,H,{"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,k+" 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,[h,j],[d,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,j],[d,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[h,M],[d,v]],[/(ipad\d+,\d+)/i],[u,[h,M],[d,y]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[h,M],[d,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,M],[d,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,O],[d,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,O],[d,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," "],[h,N],[d,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,N],[d,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,[h,"OPPO"],[d,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,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,[h,P],[d,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,P],[d,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,T],[d,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,T],[d,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,v]],[/(pixel c)\b/i],[u,[h,C],[d,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,C],[d,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,[h,L],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,L],[d,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,w],[d,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,w],[d,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,E],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,x],[d,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,x],[d,v]],[/(nexus 9)/i],[u,[h,"HTC"],[d,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,"Sharp"],[d,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],[h,u,[d,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],[h,u,[d,y]],[/(surface duo)/i],[u,[h,A],[d,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,v]],[/(u304aa)/i],[u,[h,"AT&T"],[d,v]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,v]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,y]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,y]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,y]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,v]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,v]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,y]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,y]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,v]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,y]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,y]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,y]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,y]],[/(sprint) (\w+)/i],[h,u,[d,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,A],[d,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,D],[d,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,D],[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[u,[h,L],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,A],[d,g]],[/smart-tv.+(samsung)/i],[h,[d,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,j],[d,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,T],[d,m]],[/(apple) ?tv/i],[h,[u,M+" TV"],[d,m]],[/crkey/i],[[u,I+"cast"],[h,C],[d,m]],[/droid.+aft(\w)( bui|\))/i],[u,[h,w],[d,m]],[/\(dtv[\);].+(aquos)/i],[u,[h,"Sharp"],[d,m]],[/(bravia[\w- ]+) bui/i],[u,[h,L],[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,z],[u,z],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/((pebble))app/i],[h,u,[d,b]],[/droid.+; (glass) \d/i],[u,[h,C],[d,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,D],[d,b]],[/(quest( 2)?)/i],[u,[h,R],[d,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[d,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,y]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[d,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"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,H,X]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,H,X]],[/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,E]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,I+"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]]},K=s((function(e,r){if(typeof e===a&&(r=e,e=n),!(this instanceof K))return new K(e,r).getResult();var i=e||(typeof t!==o&&t.navigator&&t.navigator.userAgent?t.navigator.userAgent:""),s=r?B(Y,r):Y;return this.getBrowser=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,s.browser),e.major=V(e.version),e},this.getCPU=function(){var e={};return e[f]=n,q.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,q.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=n,e[p]=n,q.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?z(e,275):e,this},this.setUA(i),this}),"UAParser");K.VERSION="0.7.31",K.BROWSER=U([c,p,"major"]),K.CPU=U([f]),K.DEVICE=U([u,h,d,g,v,m,y,b,_]),K.ENGINE=K.OS=U([c,p]),e.exports&&(r=e.exports=K),r.UAParser=K;var $=typeof t!==o&&(t.jQuery||t.Zepto);if($&&!$.ua){var J=new K;$.ua=J.getResult(),$.ua.get=function(){return J.getUA()},$.ua.set=function(e){J.setUA(e);var t=J.getResult();for(var r in t)$.ua[r]=t[r]}}}("object"==typeof window?window:t)})),o=function(){function e(){this.ua=new i.UAParser(typeof navigator<"u"?navigator.userAgent:null).getResult()}return s(e,"ApplicationContextProviderImpl"),e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:u(),platform:"Web",os:a(this.ua),deviceModel:l(this.ua)}},e}(),a=s((function(e){var t,r;return[null===(t=e.browser)||void 0===t?void 0:t.name,null===(r=e.browser)||void 0===r?void 0:r.major].filter((function(e){return null!=e})).join(" ")}),"getOs"),l=s((function(e){var t;return null===(t=e.os)||void 0===t?void 0:t.name}),"getDeviceModel"),u=s((function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""}),"getLanguage"),c=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}(),d=s((function(){return d=Object.assign||s((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),d.apply(this,arguments)}),"__assign"),h=s((function(e,t){var r=typeof e;if(r!==typeof t)return!1;for(var n=0,i=["string","number","boolean","undefined"];n<i.length;n++)if(i[n]===r)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),a=Array.isArray(t);if(o!==a)return!1;if(!o||!a){var s=Object.keys(e).sort(),l=Object.keys(t).sort();if(!h(s,l))return!1;var u=!0;return Object.keys(e).forEach((function(r){h(e[r],t[r])||(u=!1)})),u}for(var c=0;c<e.length;c++)if(!h(e[c],t[c]))return!1;return!0}),"isEqual");Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n});var p=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return s(e,"IdentityStoreImpl"),e.prototype.editIdentity=function(){var e=this,t=d({},this.identity.userProperties),r=d(d({},this.identity),{userProperties:t});return{setUserId:function(e){return r.userId=e,this},setDeviceId:function(e){return r.deviceId=e,this},setUserProperties:function(e){return r.userProperties=e,this},updateUserProperties:function(e){for(var t=r.userProperties||{},n=0,i=Object.entries(e);n<i.length;n++){var o=i[n],a=o[0],s=o[1];switch(a){case"$set":for(var l=0,u=Object.entries(s);l<u.length;l++){var c=u[l],d=c[0],h=c[1];t[d]=h}break;case"$unset":for(var p=0,f=Object.keys(s);p<f.length;p++)delete t[d=f[p]];break;case"$clearAll":t={}}}return r.userProperties=t,this},commit:function(){return e.setIdentity(r),this}}},e.prototype.getIdentity=function(){return d({},this.identity)},e.prototype.setIdentity=function(e){var t=d({},this.identity);this.identity=d({},e),h(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}(),f=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,g=function(){function e(){this.identityStore=new p,this.eventBridge=new c,this.applicationContextProvider=new o}return s(e,"AnalyticsConnector"),e.getInstance=function(t){return f.analyticsConnectorInstances||(f.analyticsConnectorInstances={}),f.analyticsConnectorInstances[t]||(f.analyticsConnectorInstances[t]=new e),f.analyticsConnectorInstances[t]},e}();e.AnalyticsConnector=g,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&typeof t<"u"?n(e):"function"==typeof define&&define.amd?define(["exports"],n):n((r=typeof globalThis<"u"?globalThis:r||self).Experiment={})})),sl=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getAnalyticsConnector=void 0;var t=Sh(),r=s((function(){return t.AnalyticsConnector.getInstance("$default_instance")}),"getAnalyticsConnector");e.getAnalyticsConnector=r})),Ph=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.IdentityEventSender=void 0;var t=(cr(),We(lr)),r=mt(),n=sl(),i=function(){function e(){this.name="identity",this.type=r.PluginType.BEFORE,this.identityStore=(0,n.getAnalyticsConnector)().identityStore}return s(e,"IdentityEventSender"),e.prototype.execute=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){return(r=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(r).commit(),[2,e]}))}))},e.prototype.setup=function(e){return Promise.resolve(void 0)},e}();e.IdentityEventSender=i})),Ih=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguage=void 0;var t=s((function(){var e,t,r,n;if(typeof navigator>"u")return"";var i=navigator.userLanguage;return null!==(n=null!==(r=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==r?r:i)&&void 0!==n?n:""}),"getLanguage");e.getLanguage=t})),dr=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getGlobalScope=e.BASE_CAMPAIGN=e.getLanguage=e.IdentityEventSender=e.getAnalyticsConnector=e.FetchTransport=e.SessionManager=e.CookieStorage=e.getOldCookieName=e.getCookieName=e.getQueryParams=e.CampaignTracker=e.CampaignParser=void 0;var t=rl();Object.defineProperty(e,"CampaignParser",{enumerable:!0,get:function(){return t.CampaignParser}});var r=kh();Object.defineProperty(e,"CampaignTracker",{enumerable:!0,get:function(){return r.CampaignTracker}});var n=nl();Object.defineProperty(e,"getQueryParams",{enumerable:!0,get:function(){return n.getQueryParams}});var i=Qo();Object.defineProperty(e,"getCookieName",{enumerable:!0,get:function(){return i.getCookieName}}),Object.defineProperty(e,"getOldCookieName",{enumerable:!0,get:function(){return i.getOldCookieName}});var o=Mh();Object.defineProperty(e,"CookieStorage",{enumerable:!0,get:function(){return o.CookieStorage}});var a=xh();Object.defineProperty(e,"SessionManager",{enumerable:!0,get:function(){return a.SessionManager}});var s=Eh();Object.defineProperty(e,"FetchTransport",{enumerable:!0,get:function(){return s.FetchTransport}});var l=sl();Object.defineProperty(e,"getAnalyticsConnector",{enumerable:!0,get:function(){return l.getAnalyticsConnector}});var u=Ph();Object.defineProperty(e,"IdentityEventSender",{enumerable:!0,get:function(){return u.IdentityEventSender}});var c=Ih();Object.defineProperty(e,"getLanguage",{enumerable:!0,get:function(){return c.getLanguage}});var d=Ko();Object.defineProperty(e,"BASE_CAMPAIGN",{enumerable:!0,get:function(){return d.BASE_CAMPAIGN}});var h=$o();Object.defineProperty(e,"getGlobalScope",{enumerable:!0,get:function(){return h.getGlobalScope}})})),ul=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.isInstanceProxy=e.convertProxyObjectToRealObject=e.runQueuedFunctions=void 0;var t=s((function(t,r){(0,e.convertProxyObjectToRealObject)(t,r)}),"runQueuedFunctions");e.runQueuedFunctions=t;var r=s((function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.name,o=n.args,a=n.resolve,s=e&&e[i];if("function"==typeof s){var l=s.apply(e,o);"function"==typeof a&&a(null==l?void 0:l.promise)}}return e}),"convertProxyObjectToRealObject");e.convertProxyObjectToRealObject=r;var n=s((function(e){return e&&void 0!==e._q}),"isInstanceProxy");e.isInstanceProxy=n})),Ch=pe(((e,t)=>{y(),function(r,n){var i="function",o="undefined",a="object",l="string",u="model",c="name",d="type",h="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",b="wearable",_="embedded",w="Amazon",M="Apple",x="ASUS",E="BlackBerry",S="Browser",I="Chrome",k="Firefox",C="Google",O="Huawei",T="LG",A="Microsoft",P="Motorola",F="Opera",j="Samsung",L="Sony",N="Xiaomi",D="Zebra",R="Facebook",B=s((function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}),"extend"),U=s((function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t}),"enumerize"),G=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]:n}),"majorize"),z=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"),q=s((function(e,t){for(var r,o,s,l,u,c,d=0;d<t.length&&!u;){var h=t[d],p=t[d+1];for(r=o=0;r<h.length&&!u;)if(u=h[r++].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]):n:this[l[0]]=c?l[1].call(this,c,l[2]):n:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):n):this[l]=c||n;d+=2}}),"rgxMapper"),H=s((function(e,t){for(var r in t)if(typeof t[r]===a&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(G(t[r][i],e))return"?"===r?n:r}else if(G(t[r],e))return"?"===r?n:r;return e}),"strMapper"),X={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"},Y={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,F+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,F]],[/(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,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,F+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,F+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[p,[c,k]],[/\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,R],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,I+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,I+" 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,H,{"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,k+" 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,[h,j],[d,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,j],[d,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[h,M],[d,v]],[/(ipad\d+,\d+)/i],[u,[h,M],[d,y]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[h,M],[d,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,M],[d,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,O],[d,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,O],[d,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," "],[h,N],[d,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,N],[d,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,[h,"OPPO"],[d,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,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,[h,P],[d,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,P],[d,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,T],[d,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,T],[d,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,v]],[/(pixel c)\b/i],[u,[h,C],[d,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,C],[d,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,[h,L],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,L],[d,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,w],[d,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,w],[d,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,E],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,x],[d,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,x],[d,v]],[/(nexus 9)/i],[u,[h,"HTC"],[d,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,"Sharp"],[d,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],[h,u,[d,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],[h,u,[d,y]],[/(surface duo)/i],[u,[h,A],[d,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,v]],[/(u304aa)/i],[u,[h,"AT&T"],[d,v]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,v]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,y]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,y]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,y]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,v]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,v]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,y]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,y]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,v]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,y]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,y]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,y]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,y]],[/(sprint) (\w+)/i],[h,u,[d,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,A],[d,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,D],[d,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,D],[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[u,[h,L],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,A],[d,g]],[/smart-tv.+(samsung)/i],[h,[d,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,j],[d,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,T],[d,m]],[/(apple) ?tv/i],[h,[u,M+" TV"],[d,m]],[/crkey/i],[[u,I+"cast"],[h,C],[d,m]],[/droid.+aft(\w)( bui|\))/i],[u,[h,w],[d,m]],[/\(dtv[\);].+(aquos)/i],[u,[h,"Sharp"],[d,m]],[/(bravia[\w- ]+) bui/i],[u,[h,L],[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,z],[u,z],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/((pebble))app/i],[h,u,[d,b]],[/droid.+; (glass) \d/i],[u,[h,C],[d,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,D],[d,b]],[/(quest( 2)?)/i],[u,[h,R],[d,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[d,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,y]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[d,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"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,H,X]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,H,X]],[/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,E]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,I+"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]]},K=s((function(e,t){if(typeof e===a&&(t=e,e=n),!(this instanceof K))return new K(e,t).getResult();var i=e||(typeof r!==o&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:""),s=t?B(Y,t):Y;return this.getBrowser=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,s.browser),e.major=V(e.version),e},this.getCPU=function(){var e={};return e[f]=n,q.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,q.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=n,e[p]=n,q.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?z(e,275):e,this},this.setUA(i),this}),"UAParser");K.VERSION="0.7.31",K.BROWSER=U([c,p,"major"]),K.CPU=U([f]),K.DEVICE=U([u,h,d,g,v,m,y,b,_]),K.ENGINE=K.OS=U([c,p]),typeof e!==o?(typeof t!==o&&t.exports&&(e=t.exports=K),e.UAParser=K):typeof define===i&&define.amd?define((function(){return K})):typeof r!==o&&(r.UAParser=K);var $=typeof r!==o&&(r.jQuery||r.Zepto);if($&&!$.ua){var J=new K;$.ua=J.getResult(),$.ua.get=function(){return J.getUA()},$.ua.set=function(e){J.setUA(e);var t=J.getResult();for(var r in t)$.ua[r]=t[r]}}}("object"==typeof window?window:e)})),jh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="1.6.8"})),Nh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var t=(kn(),We(_n)),r=mt(),n=t.__importDefault(Ch()),i=un(),o=dr(),a=jh(),l=function(){function e(){var e;this.name="context",this.type=r.PluginType.BEFORE,this.eventId=0,this.library="amplitude-ts/".concat(a.VERSION),typeof navigator<"u"&&(e=navigator.userAgent),this.uaResult=new n.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 t.__awaiter(this,void 0,void 0,(function(){var r,n,a,s,l;return t.__generator(this,(function(u){return this.isSessionValid()||(this.config.sessionId=Date.now()),this.config.lastEventTime=Date.now(),r=(new Date).getTime(),n=this.uaResult.browser.name,a=this.uaResult.browser.version,s=this.uaResult.device.model||this.uaResult.os.name,l=this.uaResult.device.vendor,[2,t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:r},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.osName&&{os_name:n}),this.config.trackingOptions.osVersion&&{os_version:a}),this.config.trackingOptions.deviceManufacturer&&{device_manufacturer:l}),this.config.trackingOptions.deviceModel&&{device_model:s}),this.config.trackingOptions.language&&{language:(0,o.getLanguage)()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:(0,i.UUID)(),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}();e.Context=l})),ll=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.LocalStorage=void 0;var t=(kn(),We(_n)),r=dr(),n=function(){function e(){}return s(e,"LocalStorage"),e.prototype.isEnabled=function(){return t.__awaiter(this,void 0,void 0,(function(){var n,i,o;return t.__generator(this,(function(t){switch(t.label){case 0:if(!(0,r.getGlobalScope)())return[2,!1];n=String(Date.now()),i=new e,o="AMP_TEST",t.label=1;case 1:return t.trys.push([1,4,5,7]),[4,i.set(o,n)];case 2:return t.sent(),[4,i.get(o)];case 3:return[2,t.sent()===n];case 4:return t.sent(),[2,!1];case 5:return[4,i.remove(o)];case 6:return t.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(r=t.sent())?[2,JSON.parse(r)]:[2,void 0];case 2:return t.sent(),[2,void 0];case 3:return[2]}}))}))},e.prototype.getRaw=function(e){var n;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,(null===(n=(0,r.getGlobalScope)())||void 0===n?void 0:n.localStorage.getItem(e))||void 0]}))}))},e.prototype.set=function(e,n){var i;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(i=(0,r.getGlobalScope)())||void 0===i||i.localStorage.setItem(e,JSON.stringify(n))}catch{}return[2]}))}))},e.prototype.remove=function(e){var n;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(n=(0,r.getGlobalScope)())||void 0===n||n.localStorage.removeItem(e)}catch{}return[2]}))}))},e.prototype.reset=function(){var e;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(e=(0,r.getGlobalScope)())||void 0===e||e.localStorage.clear()}catch{}return[2]}))}))},e}();e.LocalStorage=n})),Lh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.XHRTransport=void 0;var t=(kn(),We(_n)),r=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return t.__extends(r,e),s(r,"XHRTransport"),r.prototype.send=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){var n=this;return t.__generator(this,(function(t){return[2,new Promise((function(t,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,r=JSON.parse(e),a=n.buildResponse(r);t(a)}catch(e){i(e)}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(r))}))]}))}))},r}(un().BaseTransport);e.XHRTransport=r})),Fh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.SendBeaconTransport=void 0;var t=(kn(),We(_n)),r=dr(),n=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),s(n,"SendBeaconTransport"),n.prototype.send=function(e,n){return t.__awaiter(this,void 0,void 0,(function(){var i=this;return t.__generator(this,(function(t){return[2,new Promise((function(t,o){var a=(0,r.getGlobalScope)();if(null==a||!a.navigator.sendBeacon)throw new Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(n);return t(a.navigator.sendBeacon(e,JSON.stringify(n))?i.buildResponse({code:200,events_ingested:n.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}):i.buildResponse({code:500}))}catch(e){o(e)}}))]}))}))},n}(un().BaseTransport);e.SendBeaconTransport=n})),zh=pe((e=>{y();var t=e;Object.defineProperty(e,"__esModule",{value:!0}),e.getTopLevelDomain=e.createTransport=e.createDeviceId=e.createEventsStorage=e.createFlexibleStorage=e.createCookieStorage=e.useBrowserConfig=e.BrowserConfig=e.getDefaultConfig=void 0;var r=(kn(),We(_n)),n=mt(),i=un(),o=dr(),a=ll(),l=Lh(),u=Fh(),c=s((function(){var e=new i.MemoryStorage;return{cookieExpiration:365,cookieSameSite:"Lax",cookieSecure:!1,cookieStorage:e,disableCookies:!1,domain:"",sessionManager:new o.SessionManager(e,""),sessionTimeout:18e5,storageProvider:new i.MemoryStorage,trackingOptions:{deviceManufacturer:!0,deviceModel:!0,ipAddress:!0,language:!0,osName:!0,osVersion:!0,platform:!0},transportProvider:new o.FetchTransport}}),"getDefaultConfig");e.getDefaultConfig=c;var d=function(t){function n(n,i,o){var a,s,l,u,c,d,h,p,f,g,v,y,m=this,b=(0,e.getDefaultConfig)();return(m=t.call(this,r.__assign(r.__assign({flushIntervalMillis:1e3,flushMaxRetries:5,flushQueueSize:30},o),{apiKey:n,storageProvider:null!==(a=null==o?void 0:o.storageProvider)&&void 0!==a?a:b.storageProvider,transportProvider:null!==(s=null==o?void 0:o.transportProvider)&&void 0!==s?s:b.transportProvider}))||this).cookieStorage=null!==(l=null==o?void 0:o.cookieStorage)&&void 0!==l?l:b.cookieStorage,m.sessionManager=null!==(u=null==o?void 0:o.sessionManager)&&void 0!==u?u:b.sessionManager,m.sessionTimeout=null!==(c=null==o?void 0:o.sessionTimeout)&&void 0!==c?c:b.sessionTimeout,m.appVersion=null==o?void 0:o.appVersion,m.attribution=null==o?void 0:o.attribution,m.cookieExpiration=null!==(d=null==o?void 0:o.cookieExpiration)&&void 0!==d?d:b.cookieExpiration,m.cookieSameSite=null!==(h=null==o?void 0:o.cookieSameSite)&&void 0!==h?h:b.cookieSameSite,m.cookieSecure=null!==(p=null==o?void 0:o.cookieSecure)&&void 0!==p?p:b.cookieSecure,m.deviceId=null==o?void 0:o.deviceId,m.disableCookies=null!==(f=null==o?void 0:o.disableCookies)&&void 0!==f?f:b.disableCookies,m.domain=null!==(g=null==o?void 0:o.domain)&&void 0!==g?g:b.domain,m.lastEventTime=null!==(v=m.lastEventTime)&&void 0!==v?v:null==o?void 0:o.lastEventTime,m.optOut=!(null==o||!o.optOut),m.partnerId=null==o?void 0:o.partnerId,m.sessionId=null==o?void 0:o.sessionId,m.trackingOptions=null!==(y=null==o?void 0:o.trackingOptions)&&void 0!==y?y:b.trackingOptions,m.userId=i,m}return r.__extends(n,t),s(n,"BrowserConfig"),Object.defineProperty(n.prototype,"deviceId",{get:function(){return this.sessionManager.getDeviceId()},set:function(e){this.sessionManager.setDeviceId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"userId",{get:function(){return this.sessionManager.getUserId()},set:function(e){this.sessionManager.setUserId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sessionId",{get:function(){return this.sessionManager.getSessionId()},set:function(e){this.sessionManager.setSessionId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.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(n.prototype,"lastEventTime",{get:function(){return this.sessionManager.getLastEventTime()},set:function(e){this.sessionManager.setLastEventTime(e)},enumerable:!1,configurable:!0}),n}(i.Config);e.BrowserConfig=d;var h=s((function(n,i,a){return r.__awaiter(t,void 0,void 0,(function(){var t,s,l,u,c,h,p,f,g,v,y,m,b,_,w,M,x;return r.__generator(this,(function(E){switch(E.label){case 0:return t=(0,e.getDefaultConfig)(),null!==(b=null==a?void 0:a.domain)&&void 0!==b?(l=b,[3,3]):[3,1];case 1:return[4,(0,e.getTopLevelDomain)()];case 2:l=E.sent(),E.label=3;case 3:return s=l,[4,(0,e.createCookieStorage)(r.__assign(r.__assign({},a),{domain:s}))];case 4:return u=E.sent(),c=(0,o.getCookieName)(n),[4,u.get(c)];case 5:return h=E.sent(),p=(0,o.getQueryParams)(),[4,new o.SessionManager(u,n).load()];case 6:return f=E.sent(),g=d.bind,v=[void 0,n,null!=i?i:null==h?void 0:h.userId],y=[r.__assign({},a)],m={cookieStorage:u,sessionManager:f,deviceId:(0,e.createDeviceId)(null==h?void 0:h.deviceId,null==a?void 0:a.deviceId,p.deviceId),domain:s,optOut:null!==(_=null==a?void 0:a.optOut)&&void 0!==_?_:!(null==h||!h.optOut)},[4,u.get(c)];case 7:return m.sessionId=null!==(M=null===(w=E.sent())||void 0===w?void 0:w.sessionId)&&void 0!==M?M:null==a?void 0:a.sessionId,[4,(0,e.createEventsStorage)(a)];case 8:return[2,new(g.apply(d,v.concat([r.__assign.apply(void 0,y.concat([(m.storageProvider=E.sent(),m.trackingOptions=r.__assign(r.__assign({},t.trackingOptions),null==a?void 0:a.trackingOptions),m.transportProvider=null!==(x=null==a?void 0:a.transportProvider)&&void 0!==x?x:(0,e.createTransport)(null==a?void 0:a.transport),m)]))])))]}}))}))}),"useBrowserConfig");e.useBrowserConfig=h;var p=s((function(n,i){return void 0===i&&(i=(0,e.getDefaultConfig)()),r.__awaiter(t,void 0,void 0,(function(){var t,o,a;return r.__generator(this,(function(s){switch(s.label){case 0:return t=r.__assign(r.__assign({},i),n),o=null==n?void 0:n.cookieStorage,(a=!o)?[3,2]:[4,o.isEnabled()];case 1:a=!s.sent(),s.label=2;case 2:return a?[2,(0,e.createFlexibleStorage)(t)]:[2,o]}}))}))}),"createCookieStorage");e.createCookieStorage=p;var f=s((function(e){return r.__awaiter(t,void 0,void 0,(function(){var t,n;return r.__generator(this,(function(r){switch(r.label){case 0:return t=new o.CookieStorage({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 a.LocalStorage).isEnabled()]:[3,4];case 3:r.sent()||(t=new i.MemoryStorage),r.label=4;case 4:return[2,t]}}))}))}),"createFlexibleStorage");e.createFlexibleStorage=f;var g=s((function(e){return r.__awaiter(t,void 0,void 0,(function(){var t,n,i,o,s,l,u;return r.__generator(this,(function(c){switch(c.label){case 0:if(e&&Object.prototype.hasOwnProperty.call(e,"storageProvider")&&!e.storageProvider)return[3,9];c.label=1;case 1:c.trys.push([1,7,8,9]),t=r.__values([null==e?void 0:e.storageProvider,new a.LocalStorage]),n=t.next(),c.label=2;case 2:return n.done?[3,6]:(i=n.value,(o=i)?[4,i.isEnabled()]:[3,4]);case 3:o=c.sent(),c.label=4;case 4:if(o)return[2,i];c.label=5;case 5:return n=t.next(),[3,2];case 6:return[3,9];case 7:return s=c.sent(),l={error:s},[3,9];case 8:try{n&&!n.done&&(u=t.return)&&u.call(t)}finally{if(l)throw l.error}return[7];case 9:return[2,void 0]}}))}))}),"createEventsStorage");e.createEventsStorage=g;var v=s((function(e,t,r){return t||r||e||(0,i.UUID)()}),"createDeviceId");e.createDeviceId=v;var m=s((function(t){return t===n.TransportType.XHR?new l.XHRTransport:t===n.TransportType.SendBeacon?new u.SendBeaconTransport:(0,e.getDefaultConfig)().transportProvider}),"createTransport");e.createTransport=m;var b=s((function(e){return r.__awaiter(t,void 0,void 0,(function(){var t,n,i,a,s,l,u,c;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,(new o.CookieStorage).isEnabled()];case 1:if(!r.sent()||!e&&typeof location>"u")return[2,""];for(t=null!=e?e:location.hostname,n=t.split("."),i=[],a="AMP_TLDTEST",s=n.length-2;s>=0;--s)i.push(n.slice(s).join("."));s=0,r.label=2;case 2:return s<i.length?(l=i[s],u={domain:"."+l},[4,(c=new o.CookieStorage(u)).set(a,1)]):[3,7];case 3:return r.sent(),[4,c.get(a)];case 4:return r.sent()?[4,c.remove(a)]:[3,6];case 5:return r.sent(),[2,"."+l];case 6:return s++,[3,2];case 7:return[2,""]}}))}))}),"getTopLevelDomain");e.getTopLevelDomain=b})),Vh=pe((e=>{y();var t=e;Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.parseTime=e.parseOldCookies=void 0;var r=(kn(),We(_n)),n=dr(),i=ll(),o=s((function(o,a){return r.__awaiter(t,void 0,void 0,(function(){var t,s,l,u,c,d,h,p,f;return r.__generator(this,(function(g){switch(g.label){case 0:return[4,(t=new n.CookieStorage).isEnabled()];case 1:return(!g.sent()||null!=a&&a.disableCookies)&&(t=new i.LocalStorage),[4,t.isEnabled()];case 2:return g.sent()?(s=(0,n.getOldCookieName)(o),[4,t.getRaw(s)]):[2,{optOut:!1}];case 3:return(l=g.sent())?[4,t.remove(s)]:[2,{optOut:!1}];case 4:return g.sent(),u=r.__read(l.split("."),5),c=u[0],d=u[1],h=u[2],p=u[3],f=u[4],[2,{deviceId:c,userId:(0,e.decode)(d),sessionId:(0,e.parseTime)(p),lastEventTime:(0,e.parseTime)(f),optOut:!!h}]}}))}))}),"parseOldCookies");e.parseOldCookies=o;var a=s((function(e){var t=parseInt(e,32);if(!isNaN(t))return t}),"parseTime");e.parseTime=a;var l=s((function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch{return}}),"decode");e.decode=l})),ml=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createInstance=e.AmplitudeBrowser=void 0;var t=(kn(),We(_n)),r=un(),n=dr(),i=ul(),o=Nh(),a=zh(),l=Vh(),u=function(e){function u(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(u,e),s(u,"AmplitudeBrowser"),u.prototype.init=function(i,s,u){var c,d,h;return void 0===i&&(i=""),t.__awaiter(this,void 0,void 0,(function(){var p,f,g,v,y=this;return t.__generator(this,(function(m){switch(m.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,(0,l.parseOldCookies)(i,u)]);case 1:return p=m.sent(),[4,(0,a.useBrowserConfig)(i,s||p.userId,t.__assign(t.__assign({},u),{deviceId:null!==(c=p.deviceId)&&void 0!==c?c:null==u?void 0:u.deviceId,sessionId:null!==(d=p.sessionId)&&void 0!==d?d:null==u?void 0:u.sessionId,optOut:null!==(h=null==u?void 0:u.optOut)&&void 0!==h?h:p.optOut,lastEventTime:p.lastEventTime}))];case 2:return f=m.sent(),[4,e.prototype._init.call(this,f)];case 3:return m.sent(),g=!this.config.lastEventTime,(!this.config.sessionId||this.config.lastEventTime&&Date.now()-this.config.lastEventTime>this.config.sessionTimeout)&&(this.setSessionId(Date.now()),g=!0),(v=(0,n.getAnalyticsConnector)()).eventBridge.setEventReceiver((function(e){y.track(e.eventType,e.eventProperties)})),v.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),[4,this.add(new o.Context)];case 4:return m.sent(),[4,this.add(new n.IdentityEventSender)];case 5:return m.sent(),[4,this.add(new r.Destination)];case 6:return m.sent(),this.initializing=!1,[4,this.runAttributionStrategy(f.attribution,g)];case 7:return m.sent(),[4,this.runQueuedFunctions("dispatchQ")];case 8:return m.sent(),[2]}}))}))},u.prototype.runAttributionStrategy=function(e,r){return void 0===r&&(r=!1),t.__awaiter(this,void 0,void 0,(function(){var i,o,s;return t.__generator(this,(function(l){switch(l.label){case 0:return i=this.track.bind(this),o=this.setSessionId.bind(this,Date.now()),[4,(0,a.createFlexibleStorage)(this.config)];case 1:return s=l.sent(),[4,new n.CampaignTracker(this.config.apiKey,t.__assign(t.__assign({},e),{storage:s,track:i,onNewCampaign:o})).send(r)];case 2:return l.sent(),[2]}}))}))},u.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},u.prototype.setUserId=function(e){this.config?this.config.userId=e:this.q.push(this.setUserId.bind(this,e))},u.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},u.prototype.setDeviceId=function(e){this.config?this.config.deviceId=e:this.q.push(this.setDeviceId.bind(this,e))},u.prototype.reset=function(){this.setUserId(void 0),this.setDeviceId((0,r.UUID)())},u.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},u.prototype.setSessionId=function(e){this.config?(this.config.sessionId=e,this.config.lastEventTime=void 0):this.q.push(this.setSessionId.bind(this,e))},u.prototype.setTransport=function(e){this.config?this.config.transportProvider=(0,a.createTransport)(e):this.q.push(this.setTransport.bind(this,e))},u.prototype.identify=function(t,n){if((0,i.isInstanceProxy)(t)){var o=t._q;t._q=[],t=(0,i.convertProxyObjectToRealObject)(new r.Identify,o)}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)},u.prototype.groupIdentify=function(t,n,o,a){if((0,i.isInstanceProxy)(o)){var s=o._q;o._q=[],o=(0,i.convertProxyObjectToRealObject)(new r.Identify,s)}return e.prototype.groupIdentify.call(this,t,n,o,a)},u.prototype.revenue=function(t,n){if((0,i.isInstanceProxy)(t)){var o=t._q;t._q=[],t=(0,i.convertProxyObjectToRealObject)(new r.Revenue,o)}return e.prototype.revenue.call(this,t,n)},u}(r.AmplitudeCore);e.AmplitudeBrowser=u;var c=s((function(){var e=new u;return{init:(0,r.debugWrapper)((0,r.returnWrapper)(e.init.bind(e)),"init",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),add:(0,r.debugWrapper)((0,r.returnWrapper)(e.add.bind(e)),"add",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.plugins"])),remove:(0,r.debugWrapper)((0,r.returnWrapper)(e.remove.bind(e)),"remove",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.plugins"])),track:(0,r.debugWrapper)((0,r.returnWrapper)(e.track.bind(e)),"track",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),logEvent:(0,r.debugWrapper)((0,r.returnWrapper)(e.logEvent.bind(e)),"logEvent",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),identify:(0,r.debugWrapper)((0,r.returnWrapper)(e.identify.bind(e)),"identify",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),groupIdentify:(0,r.debugWrapper)((0,r.returnWrapper)(e.groupIdentify.bind(e)),"groupIdentify",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),setGroup:(0,r.debugWrapper)((0,r.returnWrapper)(e.setGroup.bind(e)),"setGroup",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),revenue:(0,r.debugWrapper)((0,r.returnWrapper)(e.revenue.bind(e)),"revenue",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),flush:(0,r.debugWrapper)((0,r.returnWrapper)(e.flush.bind(e)),"flush",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),getUserId:(0,r.debugWrapper)(e.getUserId.bind(e),"getUserId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.userId"])),setUserId:(0,r.debugWrapper)(e.setUserId.bind(e),"setUserId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.userId"])),getDeviceId:(0,r.debugWrapper)(e.getDeviceId.bind(e),"getDeviceId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.deviceId"])),setDeviceId:(0,r.debugWrapper)(e.setDeviceId.bind(e),"setDeviceId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.deviceId"])),reset:(0,r.debugWrapper)(e.reset.bind(e),"reset",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.userId","config.deviceId"])),getSessionId:(0,r.debugWrapper)(e.getSessionId.bind(e),"getSessionId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),setSessionId:(0,r.debugWrapper)(e.setSessionId.bind(e),"setSessionId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),setOptOut:(0,r.debugWrapper)(e.setOptOut.bind(e),"setOptOut",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),setTransport:(0,r.debugWrapper)(e.setTransport.bind(e),"setTransport",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"]))}}),"createInstance");e.createInstance=c,e.default=(0,e.createInstance)()})),Wh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Types=e.Identify=e.Revenue=e.runQueuedFunctions=e.track=e.setUserId=e.setTransport=e.setSessionId=e.setOptOut=e.setGroup=e.setDeviceId=e.revenue=e.reset=e.remove=e.logEvent=e.init=e.identify=e.groupIdentify=e.getUserId=e.getSessionId=e.getDeviceId=e.flush=e.add=e.createInstance=void 0;var t=(kn(),We(_n)),r=t.__importDefault(ml()),n=ml();Object.defineProperty(e,"createInstance",{enumerable:!0,get:function(){return n.createInstance}}),e.add=r.default.add,e.flush=r.default.flush,e.getDeviceId=r.default.getDeviceId,e.getSessionId=r.default.getSessionId,e.getUserId=r.default.getUserId,e.groupIdentify=r.default.groupIdentify,e.identify=r.default.identify,e.init=r.default.init,e.logEvent=r.default.logEvent,e.remove=r.default.remove,e.reset=r.default.reset,e.revenue=r.default.revenue,e.setDeviceId=r.default.setDeviceId,e.setGroup=r.default.setGroup,e.setOptOut=r.default.setOptOut,e.setSessionId=r.default.setSessionId,e.setTransport=r.default.setTransport,e.setUserId=r.default.setUserId,e.track=r.default.track;var i=ul();Object.defineProperty(e,"runQueuedFunctions",{enumerable:!0,get:function(){return i.runQueuedFunctions}});var o=un();Object.defineProperty(e,"Revenue",{enumerable:!0,get:function(){return o.Revenue}}),Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}}),e.Types=t.__importStar(mt())})),Tg=pe(((e,t)=>{y();var r="__lodash_hash_undefined__",n=9007199254740991,i="[object Arguments]",o="[object Array]",a="[object Boolean]",l="[object Date]",u="[object Error]",c="[object Function]",d="[object Map]",h="[object Number]",p="[object Object]",f="[object Promise]",g="[object RegExp]",v="[object Set]",m="[object String]",b="[object WeakMap]",_="[object ArrayBuffer]",w="[object DataView]",M=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,E={};E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E[i]=E[o]=E[_]=E[a]=E[w]=E[l]=E[u]=E[c]=E[d]=E[h]=E[p]=E[g]=E[v]=E[m]=E[b]=!1;var S="object"==typeof global&&global&&global.Object===Object&&global,I="object"==typeof self&&self&&self.Object===Object&&self,k=S||I||Function("return this")(),C="object"==typeof e&&e&&!e.nodeType&&e,O=C&&"object"==typeof t&&t&&!t.nodeType&&t,T=O&&O.exports===C,A=T&&S.process,P=function(){try{return A&&A.binding&&A.binding("util")}catch{}}(),F=P&&P.isTypedArray;function j(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function L(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function N(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function D(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function R(e){return function(t){return e(t)}}function B(e,t){return e.has(t)}function U(e,t){return null==e?void 0:e[t]}function G(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function W(e,t){return function(r){return e(t(r))}}function V(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}s(j,"arrayFilter"),s(L,"arrayPush"),s(N,"arraySome"),s(D,"baseTimes"),s(R,"baseUnary"),s(B,"cacheHas"),s(U,"getValue"),s(G,"mapToArray"),s(W,"overArg"),s(V,"setToArray");var z,q=Array.prototype,H=Function.prototype,X=Object.prototype,Y=k["__core-js_shared__"],K=H.toString,$=X.hasOwnProperty,J=(z=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+z:"",Z=X.toString,Q=RegExp("^"+K.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=T?k.Buffer:void 0,te=k.Symbol,re=k.Uint8Array,ne=X.propertyIsEnumerable,ie=q.splice,oe=te?te.toStringTag:void 0,ae=Object.getOwnPropertySymbols,se=ee?ee.isBuffer:void 0,le=W(Object.keys,Object),ue=ct(k,"DataView"),ce=ct(k,"Map"),de=ct(k,"Promise"),he=ct(k,"Set"),pe=ct(k,"WeakMap"),fe=ct(Object,"create"),ge=bt(ue),ve=bt(ce),ye=bt(de),me=bt(he),be=bt(pe),_e=te?te.prototype:void 0,we=_e?_e.valueOf:void 0;function Me(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function xe(){this.__data__=fe?fe(null):{},this.size=0}function Ee(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 n=t[e];return n===r?void 0:n}return $.call(t,e)?t[e]:void 0}function Ie(e){var t=this.__data__;return fe?void 0!==t[e]:$.call(t,e)}function ke(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=fe&&void 0===t?r:t,this}function Ce(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Oe(){this.__data__=[],this.size=0}function Te(e){var t=this.__data__,r=$e(t,e);return!(r<0)&&(r==t.length-1?t.pop():ie.call(t,r,1),--this.size,!0)}function Ae(e){var t=this.__data__,r=$e(t,e);return r<0?void 0:t[r][1]}function Pe(e){return $e(this.__data__,e)>-1}function Fe(e,t){var r=this.__data__,n=$e(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function je(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Le(){this.size=0,this.__data__={hash:new Me,map:new(ce||Ce),string:new Me}}function Ne(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 Re(e){return ut(this,e).has(e)}function Be(e,t){var r=ut(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Ue(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new je;++t<r;)this.add(e[t])}function Ge(e){return this.__data__.set(e,r),this}function We(e){return this.__data__.has(e)}function Ve(e){var t=this.__data__=new Ce(e);this.size=t.size}function ze(){this.__data__=new Ce,this.size=0}function qe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function He(e){return this.__data__.get(e)}function Xe(e){return this.__data__.has(e)}function Ye(e,t){var r=this.__data__;if(r instanceof Ce){var n=r.__data__;if(!ce||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new je(n)}return r.set(e,t),this.size=r.size,this}function Ke(e,t){var r=Mt(e),n=!r&&wt(e),i=!r&&!n&&Et(e),o=!r&&!n&&!i&&Tt(e),a=r||n||i||o,s=a?D(e.length,String):[],l=s.length;for(var u in e)(t||$.call(e,u))&&(!a||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ft(u,l)))&&s.push(u);return s}function $e(e,t){for(var r=e.length;r--;)if(_t(e[r][0],t))return r;return-1}function Je(e,t,r){var n=t(e);return Mt(e)?n:L(n,r(e))}function Ze(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":oe&&oe in Object(e)?dt(e):mt(e)}function Qe(e){return Ot(e)&&Ze(e)==i}function et(e,t,r,n,i){return e===t||(null==e||null==t||!Ot(e)&&!Ot(t)?e!=e&&t!=t:tt(e,t,r,n,et,i))}function tt(e,t,r,n,a,s){var l=Mt(e),u=Mt(t),c=l?o:pt(e),d=u?o:pt(t),h=(c=c==i?p:c)==p,f=(d=d==i?p:d)==p,g=c==d;if(g&&Et(e)){if(!Et(t))return!1;l=!0,h=!1}if(g&&!h)return s||(s=new Ve),l||Tt(e)?ot(e,t,r,n,a,s):at(e,t,c,r,n,a,s);if(!(1&r)){var v=h&&$.call(e,"__wrapped__"),y=f&&$.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,b=y?t.value():t;return s||(s=new Ve),a(m,b,r,n,s)}}return!!g&&(s||(s=new Ve),st(e,t,r,n,a,s))}function rt(e){return!(!Ct(e)||vt(e))&&(It(e)?Q:M).test(bt(e))}function nt(e){return Ot(e)&&kt(e.length)&&!!E[Ze(e)]}function it(e){if(!yt(e))return le(e);var t=[];for(var r in Object(e))$.call(e,r)&&"constructor"!=r&&t.push(r);return t}function ot(e,t,r,n,i,o){var a=1&r,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,d=!0,h=2&r?new Ue:void 0;for(o.set(e,t),o.set(t,e);++c<s;){var p=e[c],f=t[c];if(n)var g=a?n(f,p,c,t,e,o):n(p,f,c,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(h){if(!N(t,(function(e,t){if(!B(h,t)&&(p===e||i(p,e,r,n,o)))return h.push(t)}))){d=!1;break}}else if(p!==f&&!i(p,f,r,n,o)){d=!1;break}}return o.delete(e),o.delete(t),d}function at(e,t,r,n,i,o,s){switch(r){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!o(new re(e),new re(t)));case a:case l:case h:return _t(+e,+t);case u:return e.name==t.name&&e.message==t.message;case g:case m:return e==t+"";case d:var c=G;case v:var p=1&n;if(c||(c=V),e.size!=t.size&&!p)return!1;var f=s.get(e);if(f)return f==t;n|=2,s.set(e,t);var y=ot(c(e),c(t),n,i,o,s);return s.delete(e),y;case"[object Symbol]":if(we)return we.call(e)==we.call(t)}return!1}function st(e,t,r,n,i,o){var a=1&r,s=lt(e),l=s.length;if(l!=lt(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:$.call(t,c)))return!1}var d=o.get(e);if(d&&o.get(t))return d==t;var h=!0;o.set(e,t),o.set(t,e);for(var p=a;++u<l;){var f=e[c=s[u]],g=t[c];if(n)var v=a?n(g,f,c,t,e,o):n(f,g,c,e,t,o);if(!(void 0===v?f===g||i(f,g,r,n,o):v)){h=!1;break}p||(p="constructor"==c)}if(h&&!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)&&(h=!1)}return o.delete(e),o.delete(t),h}function lt(e){return Je(e,At,ht)}function ut(e,t){var r=e.__data__;return gt(t)?r["string"==typeof t?"string":"hash"]:r.map}function ct(e,t){var r=U(e,t);return rt(r)?r:void 0}function dt(e){var t=$.call(e,oe),r=e[oe];try{e[oe]=void 0;var n=!0}catch{}var i=Z.call(e);return n&&(t?e[oe]=r:delete e[oe]),i}s(Me,"Hash"),s(xe,"hashClear"),s(Ee,"hashDelete"),s(Se,"hashGet"),s(Ie,"hashHas"),s(ke,"hashSet"),Me.prototype.clear=xe,Me.prototype.delete=Ee,Me.prototype.get=Se,Me.prototype.has=Ie,Me.prototype.set=ke,s(Ce,"ListCache"),s(Oe,"listCacheClear"),s(Te,"listCacheDelete"),s(Ae,"listCacheGet"),s(Pe,"listCacheHas"),s(Fe,"listCacheSet"),Ce.prototype.clear=Oe,Ce.prototype.delete=Te,Ce.prototype.get=Ae,Ce.prototype.has=Pe,Ce.prototype.set=Fe,s(je,"MapCache"),s(Le,"mapCacheClear"),s(Ne,"mapCacheDelete"),s(De,"mapCacheGet"),s(Re,"mapCacheHas"),s(Be,"mapCacheSet"),je.prototype.clear=Le,je.prototype.delete=Ne,je.prototype.get=De,je.prototype.has=Re,je.prototype.set=Be,s(Ue,"SetCache"),s(Ge,"setCacheAdd"),s(We,"setCacheHas"),Ue.prototype.add=Ue.prototype.push=Ge,Ue.prototype.has=We,s(Ve,"Stack"),s(ze,"stackClear"),s(qe,"stackDelete"),s(He,"stackGet"),s(Xe,"stackHas"),s(Ye,"stackSet"),Ve.prototype.clear=ze,Ve.prototype.delete=qe,Ve.prototype.get=He,Ve.prototype.has=Xe,Ve.prototype.set=Ye,s(Ke,"arrayLikeKeys"),s($e,"assocIndexOf"),s(Je,"baseGetAllKeys"),s(Ze,"baseGetTag"),s(Qe,"baseIsArguments"),s(et,"baseIsEqual"),s(tt,"baseIsEqualDeep"),s(rt,"baseIsNative"),s(nt,"baseIsTypedArray"),s(it,"baseKeys"),s(ot,"equalArrays"),s(at,"equalByTag"),s(st,"equalObjects"),s(lt,"getAllKeys"),s(ut,"getMapData"),s(ct,"getNative"),s(dt,"getRawTag");var ht=ae?function(e){return null==e?[]:(e=Object(e),j(ae(e),(function(t){return ne.call(e,t)})))}:Pt,pt=Ze;function ft(e,t){return!!(t=null==t?n: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!!J&&J in e}function yt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||X)}function mt(e){return Z.call(e)}function bt(e){if(null!=e){try{return K.call(e)}catch{}try{return e+""}catch{}}return""}function _t(e,t){return e===t||e!=e&&t!=t}(ue&&pt(new ue(new ArrayBuffer(1)))!=w||ce&&pt(new ce)!=d||de&&pt(de.resolve())!=f||he&&pt(new he)!=v||pe&&pt(new pe)!=b)&&(pt=s((function(e){var t=Ze(e),r=t==p?e.constructor:void 0,n=r?bt(r):"";if(n)switch(n){case ge:return w;case ve:return d;case ye:return f;case me:return v;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(_t,"eq");var wt=Qe(function(){return arguments}())?Qe:function(e){return Ot(e)&&$.call(e,"callee")&&!ne.call(e,"callee")},Mt=Array.isArray;function xt(e){return null!=e&&kt(e.length)&&!It(e)}s(xt,"isArrayLike");var Et=se||Ft;function St(e,t){return et(e,t)}function It(e){if(!Ct(e))return!1;var t=Ze(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function kt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}function Ct(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ot(e){return null!=e&&"object"==typeof e}s(St,"isEqual"),s(It,"isFunction"),s(kt,"isLength"),s(Ct,"isObject"),s(Ot,"isObjectLike");var Tt=F?R(F):nt;function At(e){return xt(e)?Ke(e):it(e)}function Pt(){return[]}function Ft(){return!1}s(At,"keys"),s(Pt,"stubArray"),s(Ft,"stubFalse"),t.exports=St})),tm=pe(((e,t)=>{y();var r="__lodash_hash_undefined__",n=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 d="object"==typeof global&&global&&global.Object===Object&&global,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")(),f="object"==typeof e&&e&&!e.nodeType&&e,g=f&&"object"==typeof t&&t&&!t.nodeType&&t,v=g&&g.exports===f,m=v&&d.process,b=function(){try{return g&&g.require&&g.require("util").types||m&&m.binding&&m.binding("util")}catch{}}(),_=b&&b.isTypedArray;function w(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function M(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function x(e){return function(t){return e(t)}}function E(e,t){return null==e?void 0:e[t]}function S(e,t){return function(r){return e(t(r))}}s(w,"apply"),s(M,"baseTimes"),s(x,"baseUnary"),s(E,"getValue"),s(S,"overArg");var I,k=Array.prototype,C=Function.prototype,O=Object.prototype,T=p["__core-js_shared__"],A=C.toString,P=O.hasOwnProperty,F=(I=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"",j=O.toString,L=A.call(Object),N=RegExp("^"+A.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=v?p.Buffer:void 0,R=p.Symbol,B=p.Uint8Array,U=D?D.allocUnsafe:void 0,G=S(Object.getPrototypeOf,Object),W=Object.create,V=O.propertyIsEnumerable,z=k.splice,q=R?R.toStringTag:void 0,H=function(){try{var e=He(Object,"defineProperty");return e({},"",{}),e}catch{}}(),X=D?D.isBuffer:void 0,Y=Math.max,K=Date.now,$=He(p,"Map"),J=He(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 r=new e;return e.prototype=void 0,r}}();function Q(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ee(){this.__data__=J?J(null):{},this.size=0}function te(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function re(e){var t=this.__data__;if(J){var n=t[e];return n===r?void 0:n}return P.call(t,e)?t[e]:void 0}function ne(e){var t=this.__data__;return J?void 0!==t[e]:P.call(t,e)}function ie(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=J&&void 0===t?r:t,this}function oe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ae(){this.__data__=[],this.size=0}function se(e){var t=this.__data__,r=Ie(t,e);return!(r<0)&&(r==t.length-1?t.pop():z.call(t,r,1),--this.size,!0)}function le(e){var t=this.__data__,r=Ie(t,e);return r<0?void 0:t[r][1]}function ue(e){return Ie(this.__data__,e)>-1}function ce(e,t){var r=this.__data__,n=Ie(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function de(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function he(){this.size=0,this.__data__={hash:new Q,map:new($||oe),string:new Q}}function pe(e){var t=qe(this,e).delete(e);return this.size-=t?1:0,t}function fe(e){return qe(this,e).get(e)}function ge(e){return qe(this,e).has(e)}function ve(e,t){var r=qe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?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__,r=t.delete(e);return this.size=t.size,r}function _e(e){return this.__data__.get(e)}function we(e){return this.__data__.has(e)}function Me(e,t){var r=this.__data__;if(r instanceof oe){var n=r.__data__;if(!$||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new de(n)}return r.set(e,t),this.size=r.size,this}function xe(e,t){var r=ut(e),n=!r&&lt(e),i=!r&&!n&&ht(e),o=!r&&!n&&!i&&mt(e),a=r||n||i||o,s=a?M(e.length,String):[],l=s.length;for(var u in e)(t||P.call(e,u))&&(!a||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ke(u,l)))&&s.push(u);return s}function Ee(e,t,r){(void 0!==r&&!st(e[t],r)||void 0===r&&!(t in e))&&ke(e,t,r)}function Se(e,t,r){var n=e[t];(!P.call(e,t)||!st(n,r)||void 0===r&&!(t in e))&&ke(e,t,r)}function Ie(e,t){for(var r=e.length;r--;)if(st(e[r][0],t))return r;return-1}function ke(e,t,r){"__proto__"==t&&H?H(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}s(Q,"Hash"),s(ee,"hashClear"),s(te,"hashDelete"),s(re,"hashGet"),s(ne,"hashHas"),s(ie,"hashSet"),Q.prototype.clear=ee,Q.prototype.delete=te,Q.prototype.get=re,Q.prototype.has=ne,Q.prototype.set=ie,s(oe,"ListCache"),s(ae,"listCacheClear"),s(se,"listCacheDelete"),s(le,"listCacheGet"),s(ue,"listCacheHas"),s(ce,"listCacheSet"),oe.prototype.clear=ae,oe.prototype.delete=se,oe.prototype.get=le,oe.prototype.has=ue,oe.prototype.set=ce,s(de,"MapCache"),s(he,"mapCacheClear"),s(pe,"mapCacheDelete"),s(fe,"mapCacheGet"),s(ge,"mapCacheHas"),s(ve,"mapCacheSet"),de.prototype.clear=he,de.prototype.delete=pe,de.prototype.get=fe,de.prototype.has=ge,de.prototype.set=ve,s(ye,"Stack"),s(me,"stackClear"),s(be,"stackDelete"),s(_e,"stackGet"),s(we,"stackHas"),s(Me,"stackSet"),ye.prototype.clear=me,ye.prototype.delete=be,ye.prototype.get=_e,ye.prototype.has=we,ye.prototype.set=Me,s(xe,"arrayLikeKeys"),s(Ee,"assignMergeValue"),s(Se,"assignValue"),s(Ie,"assocIndexOf"),s(ke,"baseAssignValue");var Ce=ze();function Oe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":q&&q in Object(e)?Xe(e):tt(e)}function Te(e){return vt(e)&&Oe(e)==i}function Ae(e){return!(!gt(e)||Ze(e))&&(pt(e)?N:l).test(at(e))}function Pe(e){return vt(e)&&ft(e.length)&&!!c[Oe(e)]}function Fe(e){if(!gt(e))return et(e);var t=Qe(e),r=[];for(var n in e)"constructor"==n&&(t||!P.call(e,n))||r.push(n);return r}function je(e,t,r,n,i){e!==t&&Ce(t,(function(o,a){if(i||(i=new ye),gt(o))Le(e,t,a,r,je,n,i);else{var s=n?n(nt(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),Ee(e,a,s)}}),_t)}function Le(e,t,r,n,i,o,a){var s=nt(e,r),l=nt(t,r),u=a.get(l);if(u)Ee(e,r,u);else{var c=o?o(s,l,r+"",e,t,a):void 0,d=void 0===c;if(d){var h=ut(l),p=!h&&ht(l),f=!h&&!p&&mt(l);c=l,h||p||f?ut(s)?c=s:dt(s)?c=Ge(s):p?(d=!1,c=Re(l,!0)):f?(d=!1,c=Ue(l,!0)):c=[]:yt(l)||lt(l)?(c=s,lt(s)?c=bt(s):(!gt(s)||pt(s))&&(c=Ye(l))):d=!1}d&&(a.set(l,c),i(c,l,n,o,a),a.delete(l)),Ee(e,r,c)}}function Ne(e,t){return it(rt(e,t,xt),e+"")}s(Oe,"baseGetTag"),s(Te,"baseIsArguments"),s(Ae,"baseIsNative"),s(Pe,"baseIsTypedArray"),s(Fe,"baseKeysIn"),s(je,"baseMerge"),s(Le,"baseMergeDeep"),s(Ne,"baseRest");var De=H?function(e,t){return H(e,"toString",{configurable:!0,enumerable:!1,value:Mt(t),writable:!0})}:xt;function Re(e,t){if(t)return e.slice();var r=e.length,n=U?U(r):new e.constructor(r);return e.copy(n),n}function Be(e){var t=new e.constructor(e.byteLength);return new B(t).set(new B(e)),t}function Ue(e,t){var r=t?Be(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ge(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function We(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=n?n(r[s],e[s],s,r,e):void 0;void 0===l&&(l=e[s]),i?ke(r,s,l):Se(r,s,l)}return r}function Ve(e){return Ne((function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&$e(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var s=r[n];s&&e(t,s,n,o)}return t}))}function ze(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===r(o[l],l,o))break}return t}}function qe(e,t){var r=e.__data__;return Je(t)?r["string"==typeof t?"string":"hash"]:r.map}function He(e,t){var r=E(e,t);return Ae(r)?r:void 0}function Xe(e){var t=P.call(e,q),r=e[q];try{e[q]=void 0;var n=!0}catch{}var i=j.call(e);return n&&(t?e[q]=r:delete e[q]),i}function Ye(e){return"function"!=typeof e.constructor||Qe(e)?{}:Z(G(e))}function Ke(e,t){var r=typeof e;return!!(t=null==t?n:t)&&("number"==r||"symbol"!=r&&u.test(e))&&e>-1&&e%1==0&&e<t}function $e(e,t,r){if(!gt(r))return!1;var n=typeof t;return!!("number"==n?ct(r)&&Ke(t,r.length):"string"==n&&t in r)&&st(r[t],e)}function Je(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Ze(e){return!!F&&F in e}function Qe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||O)}function et(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}function tt(e){return j.call(e)}function rt(e,t,r){return t=Y(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Y(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),w(e,this,s)}}function nt(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}s(Re,"cloneBuffer"),s(Be,"cloneArrayBuffer"),s(Ue,"cloneTypedArray"),s(Ge,"copyArray"),s(We,"copyObject"),s(Ve,"createAssigner"),s(ze,"createBaseFor"),s(qe,"getMapData"),s(He,"getNative"),s(Xe,"getRawTag"),s(Ye,"initCloneObject"),s(Ke,"isIndex"),s($e,"isIterateeCall"),s(Je,"isKeyable"),s(Ze,"isMasked"),s(Qe,"isPrototype"),s(et,"nativeKeysIn"),s(tt,"objectToString"),s(rt,"overRest"),s(nt,"safeGet");var it=ot(De);function ot(e){var t=0,r=0;return function(){var n=K(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function at(e){if(null!=e){try{return A.call(e)}catch{}try{return e+""}catch{}}return""}function st(e,t){return e===t||e!=e&&t!=t}s(ot,"shortOut"),s(at,"toSource"),s(st,"eq");var lt=Te(function(){return arguments}())?Te:function(e){return vt(e)&&P.call(e,"callee")&&!V.call(e,"callee")},ut=Array.isArray;function ct(e){return null!=e&&ft(e.length)&&!pt(e)}function dt(e){return vt(e)&&ct(e)}s(ct,"isArrayLike"),s(dt,"isArrayLikeObject");var ht=X||Et;function pt(e){if(!gt(e))return!1;var t=Oe(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<=n}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)||Oe(e)!=a)return!1;var t=G(e);if(null===t)return!0;var r=P.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&A.call(r)==L}s(pt,"isFunction"),s(ft,"isLength"),s(gt,"isObject"),s(vt,"isObjectLike"),s(yt,"isPlainObject");var mt=_?x(_):Pe;function bt(e){return We(e,_t(e))}function _t(e){return ct(e)?xe(e,!0):Fe(e)}s(bt,"toPlainObject"),s(_t,"keysIn");var wt=Ve((function(e,t,r){je(e,t,r)}));function Mt(e){return function(){return e}}function xt(e){return e}function Et(){return!1}s(Mt,"constant"),s(xt,"identity"),s(Et,"stubFalse"),t.exports=wt})),nm=pe(((e,t)=>{y(),function(r,n){var i="function",o="undefined",a="object",l="string",u="model",c="name",d="type",h="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",b="wearable",_="embedded",w="Amazon",M="Apple",x="ASUS",E="BlackBerry",S="Browser",I="Chrome",k="Firefox",C="Google",O="Huawei",T="LG",A="Microsoft",P="Motorola",F="Opera",j="Samsung",L="Sharp",N="Sony",D="Xiaomi",R="Zebra",B="Facebook",U=s((function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}),"extend"),G=s((function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t}),"enumerize"),W=s((function(e,t){return typeof e===l&&-1!==V(t).indexOf(V(e))}),"has"),V=s((function(e){return e.toLowerCase()}),"lowerize"),z=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:n}),"majorize"),q=s((function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,350)}),"trim"),H=s((function(e,t){for(var r,o,s,l,u,c,d=0;d<t.length&&!u;){var h=t[d],p=t[d+1];for(r=o=0;r<h.length&&!u;)if(u=h[r++].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]):n:this[l[0]]=c?l[1].call(this,c,l[2]):n:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):n):this[l]=c||n;d+=2}}),"rgxMapper"),X=s((function(e,t){for(var r in t)if(typeof t[r]===a&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(W(t[r][i],e))return"?"===r?n:r}else if(W(t[r],e))return"?"===r?n:r;return e}),"strMapper"),Y={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"},K={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,F+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,F]],[/(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|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[c,"UC"+S]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/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,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,F+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,F+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[p,[c,k]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+S]],[/(oculus|samsung|sailfish|huawei)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,/\[(linkedin)app\]/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,I+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,I+" 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,X,{"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,k+" 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],[/(cobalt)\/([\w\.]+)/i],[c,[p,/master.|lts./,""]]],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-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[h,j],[d,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,j],[d,v]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[h,M],[d,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,M],[d,y]],[/(macintosh);/i],[u,[h,M]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,O],[d,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,O],[d,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," "],[h,D],[d,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,D],[d,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,[h,"OPPO"],[d,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,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,[h,P],[d,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,P],[d,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,T],[d,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,T],[d,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,v]],[/(pixel c)\b/i],[u,[h,C],[d,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,C],[d,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,[h,N],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,N],[d,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,w],[d,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,w],[d,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,E],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,x],[d,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,x],[d,v]],[/(nexus 9)/i],[u,[h,"HTC"],[d,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,L],[d,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],[h,u,[d,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],[h,u,[d,y]],[/(surface duo)/i],[u,[h,A],[d,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,v]],[/(u304aa)/i],[u,[h,"AT&T"],[d,v]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,v]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,y]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,y]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,y]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,v]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,v]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,y]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,y]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,v]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,y]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,y]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,y]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,y]],[/(sprint) (\w+)/i],[h,u,[d,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,A],[d,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,R],[d,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,R],[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[u,[h,N],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,A],[d,g]],[/smart-tv.+(samsung)/i],[h,[d,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,j],[d,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,T],[d,m]],[/(apple) ?tv/i],[h,[u,M+" TV"],[d,m]],[/crkey/i],[[u,I+"cast"],[h,C],[d,m]],[/droid.+aft(\w)( bui|\))/i],[u,[h,w],[d,m]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[h,L],[d,m]],[/(bravia[\w ]+)( bui|\))/i],[u,[h,N],[d,m]],[/(mitv-\w{5}) bui/i],[u,[h,D],[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,q],[u,q],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/((pebble))app/i],[h,u,[d,b]],[/droid.+; (glass) \d/i],[u,[h,C],[d,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,R],[d,b]],[/(quest( 2)?)/i],[u,[h,B],[d,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[d,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,y]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"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,X,Y]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,X,Y]],[/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|harmonyos)/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,E]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,I+"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]]},$=s((function(e,t){if(typeof e===a&&(t=e,e=n),!(this instanceof $))return new $(e,t).getResult();var i=e||(typeof r!==o&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:""),s=t?U(K,t):K;return this.getBrowser=function(){var e={};return e[c]=n,e[p]=n,H.call(e,i,s.browser),e.major=z(e.version),e},this.getCPU=function(){var e={};return e[f]=n,H.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,H.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=n,e[p]=n,H.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=n,e[p]=n,H.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>350?q(e,350):e,this},this.setUA(i),this}),"UAParser");$.VERSION="0.7.33",$.BROWSER=G([c,p,"major"]),$.CPU=G([f]),$.DEVICE=G([u,h,d,g,v,m,y,b,_]),$.ENGINE=$.OS=G([c,p]),typeof e!==o?(typeof t!==o&&t.exports&&(e=t.exports=$),e.UAParser=$):typeof define===i&&define.amd?define((function(){return $})):typeof r!==o&&(r.UAParser=$);var J=typeof r!==o&&(r.jQuery||r.Zepto);if(J&&!J.ua){var Z=new $;J.ua=Z.getResult(),J.ua.get=function(){return Z.getUA()},J.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var r in t)J.ua[r]=t[r]}}}("object"==typeof window?window:e)})),wm=pe(((e,t)=>{y(),t.exports=s((function(e){if(!Array.isArray(e))throw new TypeError("array-unique expects an array.");for(var t=e.length,r=-1;r++<t;)for(var n=r+1;n<e.length;++n)e[r]===e[n]&&e.splice(n--,1);return e}),"unique"),t.exports.immutable=s((function(e){if(!Array.isArray(e))throw new TypeError("array-unique expects an array.");for(var r=e.length,n=new Array(r),i=0;i<r;i++)n[i]=e[i];return t.exports(n)}),"uniqueImmutable")})),Bm=pe(((e,t)=>{var r,n;y(),r=e,n=function(){function e(e,r,i,o,a){t(e,r,i||0,o||e.length-1,a||n)}function t(e,n,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,l=n-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);t(e,n,Math.max(i,Math.floor(n-l*c/s+d)),Math.min(o,Math.floor(n+(s-l)*c/s+d)),a)}var h=e[n],p=i,f=o;for(r(e,i,n),a(e[o],h)>0&&r(e,i,o);p<f;){for(r(e,p,f),p++,f--;a(e[p],h)<0;)p++;for(;a(e[f],h)>0;)f--}0===a(e[i],h)?r(e,i,f):r(e,++f,o),f<=n&&(i=f+1),n<=f&&(o=f-1)}}function r(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function n(e,t){return e<t?-1:e>t?1:0}s(e,"quickselect"),s(t,"quickselectStep"),s(r,"swap"),s(n,"defaultCompare");var i=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()}),"RBush");function o(e,t,r){if(!r)return t.indexOf(e);for(var n=0;n<t.length;n++)if(r(e,t[n]))return n;return-1}function a(e,t){l(e,0,e.children.length,t,e)}function l(e,t,r,n,i){i||(i=m(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=t;o<r;o++){var a=e.children[o];u(i,e.leaf?n(a):a)}return i}function u(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 c(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function h(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){var r=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-r)*Math.max(0,o-n)}function v(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function m(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function b(t,r,n,i,o){for(var a=[r,n];a.length;)if(!((n=a.pop())-(r=a.pop())<=i)){var s=r+Math.ceil((n-r)/i/2)*i;e(t,s,r,n,o),a.push(r,s,s,n)}}return i.prototype.all=s((function(){return this._all(this.data,[])}),"all"),i.prototype.search=s((function(e){var t=this.data,r=[];if(!y(e,t))return r;for(var n=this.toBBox,i=[];t;){for(var o=0;o<t.children.length;o++){var a=t.children[o],s=t.leaf?n(a):a;y(e,s)&&(t.leaf?r.push(a):v(e,s)?this._all(a,r):i.push(a))}t=i.pop()}return r}),"search"),i.prototype.collides=s((function(e){var t=this.data;if(!y(e,t))return!1;for(var r=[];t;){for(var n=0;n<t.children.length;n++){var i=t.children[n],o=t.leaf?this.toBBox(i):i;if(y(e,o)){if(t.leaf||v(e,o))return!0;r.push(i)}}t=r.pop()}return!1}),"collides"),i.prototype.load=s((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 r=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var n=this.data;this.data=r,r=n}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this}),"load"),i.prototype.insert=s((function(e){return e&&this._insert(e,this.data.height-1),this}),"insert"),i.prototype.clear=s((function(){return this.data=m([]),this}),"clear"),i.prototype.remove=s((function(e,t){if(!e)return this;for(var r,n,i,a=this.data,s=this.toBBox(e),l=[],u=[];a||l.length;){if(a||(a=l.pop(),n=l[l.length-1],r=u.pop(),i=!0),a.leaf){var c=o(e,a.children,t);if(-1!==c)return a.children.splice(c,1),l.push(a),this._condense(l),this}i||a.leaf||!v(a,s)?n?(r++,a=n.children[r],i=!1):a=null:(l.push(a),u.push(r),r=0,n=a,a=a.children[0])}return this}),"remove"),i.prototype.toBBox=s((function(e){return e}),"toBBox"),i.prototype.compareMinX=s((function(e,t){return e.minX-t.minX}),"compareMinX"),i.prototype.compareMinY=s((function(e,t){return e.minY-t.minY}),"compareMinY"),i.prototype.toJSON=s((function(){return this.data}),"toJSON"),i.prototype.fromJSON=s((function(e){return this.data=e,this}),"fromJSON"),i.prototype._all=s((function(e,t){for(var r=[];e;)e.leaf?t.push.apply(t,e.children):r.push.apply(r,e.children),e=r.pop();return t}),"_all"),i.prototype._build=s((function(e,t,r,n){var i,o=r-t+1,s=this._maxEntries;if(o<=s)return a(i=m(e.slice(t,r+1)),this.toBBox),i;n||(n=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,n-1))),(i=m([])).leaf=!1,i.height=n;var l=Math.ceil(o/s),u=l*Math.ceil(Math.sqrt(s));b(e,t,r,u,this.compareMinX);for(var c=t;c<=r;c+=u){var d=Math.min(c+u-1,r);b(e,c,d,l,this.compareMinY);for(var h=c;h<=d;h+=l){var p=Math.min(h+l-1,d);i.children.push(this._build(e,h,p,n-1))}}return a(i,this.toBBox),i}),"_build"),i.prototype._chooseSubtree=s((function(e,t,r,n){for(;n.push(t),!t.leaf&&n.length-1!==r;){for(var i=1/0,o=1/0,a=void 0,s=0;s<t.children.length;s++){var l=t.children[s],u=h(l),c=f(e,l)-u;c<o?(o=c,i=u<i?u:i,a=l):c===o&&u<i&&(i=u,a=l)}t=a||t.children[0]}return t}),"_chooseSubtree"),i.prototype._insert=s((function(e,t,r){var n=r?e:this.toBBox(e),i=[],o=this._chooseSubtree(n,this.data,t,i);for(o.children.push(e),u(o,n);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(n,i,t)}),"_insert"),i.prototype._split=s((function(e,t){var r=e[t],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);var o=this._chooseSplitIndex(r,i,n),s=m(r.children.splice(o,r.children.length-o));s.height=r.height,s.leaf=r.leaf,a(r,this.toBBox),a(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(r,s)}),"_split"),i.prototype._splitRoot=s((function(e,t){this.data=m([e,t]),this.data.height=e.height+1,this.data.leaf=!1,a(this.data,this.toBBox)}),"_splitRoot"),i.prototype._chooseSplitIndex=s((function(e,t,r){for(var n,i=1/0,o=1/0,a=t;a<=r-t;a++){var s=l(e,0,a,this.toBBox),u=l(e,a,r,this.toBBox),c=g(s,u),d=h(s)+h(u);c<i?(i=c,n=a,o=d<o?d:o):c===i&&d<o&&(o=d,n=a)}return n||r-t}),"_chooseSplitIndex"),i.prototype._chooseSplitAxis=s((function(e,t,r){var n=e.leaf?this.compareMinX:c,i=e.leaf?this.compareMinY:d;this._allDistMargin(e,t,r,n)<this._allDistMargin(e,t,r,i)&&e.children.sort(n)}),"_chooseSplitAxis"),i.prototype._allDistMargin=s((function(e,t,r,n){e.children.sort(n);for(var i=this.toBBox,o=l(e,0,t,i),a=l(e,r-t,r,i),s=p(o)+p(a),c=t;c<r-t;c++){var d=e.children[c];u(o,e.leaf?i(d):d),s+=p(o)}for(var h=r-t-1;h>=t;h--){var f=e.children[h];u(a,e.leaf?i(f):f),s+=p(a)}return s}),"_allDistMargin"),i.prototype._adjustParentBBoxes=s((function(e,t,r){for(var n=r;n>=0;n--)u(t[n],e)}),"_adjustParentBBoxes"),i.prototype._condense=s((function(e){for(var t=e.length-1,r=void 0;t>=0;t--)0===e[t].children.length?t>0?(r=e[t-1].children).splice(r.indexOf(e[t]),1):this.clear():a(e[t],this.toBBox)}),"_condense"),s(o,"findItem"),s(a,"calcBBox"),s(l,"distBBox"),s(u,"extend"),s(c,"compareNodeMinX"),s(d,"compareNodeMinY"),s(h,"bboxArea"),s(p,"bboxMargin"),s(f,"enlargedArea"),s(g,"intersectionArea"),s(v,"contains"),s(y,"intersects"),s(m,"createNode"),s(b,"multiSelect"),i},"object"==typeof e&&typeof t<"u"?t.exports=n():"function"==typeof define&&define.amd?define(n):(r=r||self).RBush=n()})),uf=pe((e=>{function t(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function r(e,t,r){switch(void 0===r&&(r={}),e){case"Point":return n(t).geometry;case"LineString":return l(t).geometry;case"Polygon":return o(t).geometry;case"MultiPoint":return h(t).geometry;case"MultiLineString":return d(t).geometry;case"MultiPolygon":return p(t).geometry;default:throw new Error(e+" is invalid")}}function n(e,r,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(!S(e[0])||!S(e[1]))throw new Error("coordinates must contain numbers");return t({type:"Point",coordinates:e},r,n)}function i(e,t,r){return void 0===r&&(r={}),c(e.map((function(e){return n(e,t)})),r)}function o(e,r,n){void 0===n&&(n={});for(var i=0,o=e;i<o.length;i++){var a=o[i];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<a[a.length-1].length;s++)if(a[a.length-1][s]!==a[0][s])throw new Error("First and last Position are not equivalent.")}return t({type:"Polygon",coordinates:e},r,n)}function a(e,t,r){return void 0===r&&(r={}),c(e.map((function(e){return o(e,t)})),r)}function l(e,r,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return t({type:"LineString",coordinates:e},r,n)}function u(e,t,r){return void 0===r&&(r={}),c(e.map((function(e){return l(e,t)})),r)}function c(e,t){void 0===t&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function d(e,r,n){return void 0===n&&(n={}),t({type:"MultiLineString",coordinates:e},r,n)}function h(e,r,n){return void 0===n&&(n={}),t({type:"MultiPoint",coordinates:e},r,n)}function p(e,r,n){return void 0===n&&(n={}),t({type:"MultiPolygon",coordinates:e},r,n)}function f(e,r,n){return void 0===n&&(n={}),t({type:"GeometryCollection",geometries:e},r,n)}function g(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r}function v(t,r){void 0===r&&(r="kilometers");var n=e.factors[r];if(!n)throw new Error(r+" units is invalid");return t*n}function m(t,r){void 0===r&&(r="kilometers");var n=e.factors[r];if(!n)throw new Error(r+" units is invalid");return t/n}function b(e,t){return w(m(e,t))}function _(e){var t=e%360;return t<0&&(t+=360),t}function w(e){return 180*(e%(2*Math.PI))/Math.PI}function M(e){return e%360*Math.PI/180}function x(e,t,r){if(void 0===t&&(t="kilometers"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return v(m(e,t),r)}function E(t,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[r];if(!i)throw new Error("invalid original units");var o=e.areaFactors[n];if(!o)throw new Error("invalid final units");return t/i*o}function S(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function I(e){return!!e&&e.constructor===Object}function k(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 C(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")}y(),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(r,"geometry"),e.geometry=r,s(n,"point"),e.point=n,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(d,"multiLineString"),e.multiLineString=d,s(h,"multiPoint"),e.multiPoint=h,s(p,"multiPolygon"),e.multiPolygon=p,s(f,"geometryCollection"),e.geometryCollection=f,s(g,"round"),e.round=g,s(v,"radiansToLength"),e.radiansToLength=v,s(m,"lengthToRadians"),e.lengthToRadians=m,s(b,"lengthToDegrees"),e.lengthToDegrees=b,s(_,"bearingToAzimuth"),e.bearingToAzimuth=_,s(w,"radiansToDegrees"),e.radiansToDegrees=w,s(M,"degreesToRadians"),e.degreesToRadians=M,s(x,"convertLength"),e.convertLength=x,s(E,"convertArea"),e.convertArea=E,s(S,"isNumber"),e.isNumber=S,s(I,"isObject"),e.isObject=I,s(k,"validateBBox"),e.validateBBox=k,s(C,"validateId"),e.validateId=C})),cf=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0});var t=uf();function r(e,t,n){if(null!==e)for(var i,o,a,s,l,u,c,d,h=0,p=0,f=e.type,g="FeatureCollection"===f,v="Feature"===f,y=g?e.features.length:1,m=0;m<y;m++){l=(d=!!(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 _=0,w=0;if(null!==(s=d?c.geometries[b]:c)){u=s.coordinates;var M=s.type;switch(h=!n||"Polygon"!==M&&"MultiPolygon"!==M?0:1,M){case null:break;case"Point":if(!1===t(u,p,m,_,w))return!1;p++,_++;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&&_++}"LineString"===M&&_++;break;case"Polygon":case"MultiLineString":for(i=0;i<u.length;i++){for(o=0;o<u[i].length-h;o++){if(!1===t(u[i][o],p,m,_,w))return!1;p++}"MultiLineString"===M&&_++,"Polygon"===M&&w++}"Polygon"===M&&_++;break;case"MultiPolygon":for(i=0;i<u.length;i++){for(w=0,o=0;o<u[i].length;o++){for(a=0;a<u[i][o].length-h;a++){if(!1===t(u[i][o][a],p,m,_,w))return!1;p++}w++}_++}break;case"GeometryCollection":for(i=0;i<s.geometries.length;i++)if(!1===r(s.geometries[i],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function n(e,t,n,i){var o=n;return r(e,(function(e,r,i,a,s){o=0===r&&void 0===n?e:t(o,e,r,i,a,s)}),i),o}function i(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&!1!==t(e.features[r].properties,r);r++);break;case"Feature":t(e.properties,0)}}function o(e,t,r){var n=r;return i(e,(function(e,i){n=0===i&&void 0===r?e:t(n,e,i)})),n}function a(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var r=0;r<e.features.length&&!1!==t(e.features[r],r);r++);}function l(e,t,r){var n=r;return a(e,(function(e,i){n=0===i&&void 0===r?e:t(n,e,i)})),n}function u(e){var t=[];return r(e,(function(e){t.push(e)})),t}function c(e,t){var r,n,i,o,a,s,l,u,c,d,h=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(r=0;r<g;r++){for(s=p?e.features[r].geometry:f?e.geometry:e,u=p?e.features[r].properties:f?e.properties:{},c=p?e.features[r].bbox:f?e.bbox:void 0,d=p?e.features[r].id:f?e.id:void 0,a=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=l?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,h,u,c,d))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],h,u,c,d))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,h,u,c,d))return!1;h++}}function d(e,t,r){var n=r;return c(e,(function(e,i,o,a,s){n=0===i&&void 0===r?e:t(n,e,i,o,a,s)})),n}function h(e,r){c(e,(function(e,n,i,o,a){var s,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==r(t.feature(e,i,{bbox:o,id:a}),n,0)&&void 0}switch(l){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var u=0;u<e.coordinates.length;u++){var c={type:s,coordinates:e.coordinates[u]};if(!1===r(t.feature(c,i),n,u))return!1}}))}function p(e,t,r){var n=r;return h(e,(function(e,i,o){n=0===i&&0===o&&void 0===r?e:t(n,e,i,o)})),n}function f(e,n){h(e,(function(e,i,o){var a=0;if(e.geometry){var s=e.geometry.type;if("Point"!==s&&"MultiPoint"!==s){var l,u=0,c=0,d=0;if(!1===r(e,(function(r,s,h,p,f){if(void 0===l||i>u||p>c||f>d)return l=r,u=i,c=p,d=f,void(a=0);var g=t.lineString([l,r],e.properties);if(!1===n(g,i,o,f,a))return!1;a++,l=r})))return!1}}}))}function g(e,t,r){var n=r,i=!1;return f(e,(function(e,o,a,s,l){n=!1===i&&void 0===r?e:t(n,e,o,a,s,l),i=!0})),n}function v(e,r){if(!e)throw new Error("geojson is required");h(e,(function(e,n,i){if(null!==e.geometry){var o=e.geometry.type,a=e.geometry.coordinates;switch(o){case"LineString":if(!1===r(e,n,i,0,0))return!1;break;case"Polygon":for(var s=0;s<a.length;s++)if(!1===r(t.lineString(a[s],e.properties),n,i,s))return!1}}}))}function m(e,t,r){var n=r;return v(e,(function(e,i,o,a){n=0===i&&void 0===r?e:t(n,e,i,o,a)})),n}function b(e,r){if(r=r||{},!t.isObject(r))throw new Error("options is invalid");var n,i=r.featureIndex||0,o=r.multiFeatureIndex||0,a=r.geometryIndex||0,s=r.segmentIndex||0,l=r.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,n=e.features[i].geometry;break;case"Feature":l=l||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var u=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=u.length+s-1),t.lineString([u[s],u[s+1]],l,r);case"Polygon":return a<0&&(a=u.length+a),s<0&&(s=u[a].length+s-1),t.lineString([u[a][s],u[a][s+1]],l,r);case"MultiLineString":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s-1),t.lineString([u[o][s],u[o][s+1]],l,r);case"MultiPolygon":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a),s<0&&(s=u[o][a].length-s-1),t.lineString([u[o][a][s],u[o][a][s+1]],l,r)}throw new Error("geojson is invalid")}function _(e,r){if(r=r||{},!t.isObject(r))throw new Error("options is invalid");var n,i=r.featureIndex||0,o=r.multiFeatureIndex||0,a=r.geometryIndex||0,s=r.coordIndex||0,l=r.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,n=e.features[i].geometry;break;case"Feature":l=l||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var u=n.coordinates;switch(n.type){case"Point":return t.point(u,l,r);case"MultiPoint":return o<0&&(o=u.length+o),t.point(u[o],l,r);case"LineString":return s<0&&(s=u.length+s),t.point(u[s],l,r);case"Polygon":return a<0&&(a=u.length+a),s<0&&(s=u[a].length+s),t.point(u[a][s],l,r);case"MultiLineString":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),t.point(u[o][s],l,r);case"MultiPolygon":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a),s<0&&(s=u[o][a].length-s),t.point(u[o][a][s],l,r)}throw new Error("geojson is invalid")}s(r,"coordEach"),s(n,"coordReduce"),s(i,"propEach"),s(o,"propReduce"),s(a,"featureEach"),s(l,"featureReduce"),s(u,"coordAll"),s(c,"geomEach"),s(d,"geomReduce"),s(h,"flattenEach"),s(p,"flattenReduce"),s(f,"segmentEach"),s(g,"segmentReduce"),s(v,"lineEach"),s(m,"lineReduce"),s(b,"findSegment"),s(_,"findPoint"),e.coordAll=u,e.coordEach=r,e.coordReduce=n,e.featureEach=a,e.featureReduce=l,e.findPoint=_,e.findSegment=b,e.flattenEach=h,e.flattenReduce=p,e.geomEach=c,e.geomReduce=d,e.lineEach=v,e.lineReduce=m,e.propEach=i,e.propReduce=o,e.segmentEach=f,e.segmentReduce=g})),Km=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0});var t=cf();function r(e){var r=[1/0,1/0,-1/0,-1/0];return t.coordEach(e,(function(e){r[0]>e[0]&&(r[0]=e[0]),r[1]>e[1]&&(r[1]=e[1]),r[2]<e[0]&&(r[2]=e[0]),r[3]<e[1]&&(r[3]=e[1])})),r}s(r,"bbox"),r.default=r,e.default=r})),tv=pe(((e,t)=>{y();var r=Bm(),n=uf(),i=cf(),o=Km().default,a=i.featureEach,l=(i.coordEach,n.polygon,n.featureCollection);function u(e){var t=new r(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:o(e),r.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)})),r.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),r.prototype.remove.call(this,e,t)},t.clear=function(){return r.prototype.clear.call(this)},t.search=function(e){var t=r.prototype.search.call(this,this.toBBox(e));return l(t)},t.collides=function(e){return r.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=r.prototype.all.call(this);return l(e)},t.toJSON=function(){return r.prototype.toJSON.call(this)},t.fromJSON=function(e){return r.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})),wv=pe(((e,t)=>{y(),t.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())))})),Ev=pe(((e,t)=>{y();var r="%[a-f0-9]{2}",n=new RegExp("("+r+")|([^%]+?)","gi"),i=new RegExp("("+r+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],o(r),o(n))}function a(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(n)||[],r=1;r<t.length;r++)t=(e=o(t,r).join("")).match(n)||[];return e}}function l(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=i.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=a(r[0]);n!==r[0]&&(t[r[0]]=n)}r=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)}}})),Sv=pe(((e,t)=>{y(),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 r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}})),Pv=pe(((e,t)=>{y(),t.exports=function(e,t){for(var r={},n=Object.keys(e),i=Array.isArray(t),o=0;o<n.length;o++){var a=n[o],s=e[a];(i?-1!==t.indexOf(a):t(a,s,e))&&(r[a]=s)}return r}})),Rv=pe((e=>{y();var t=wv(),r=Ev(),n=Sv(),i=Pv(),o=s((e=>null==e),"isNullOrUndefined"),a=Symbol("encodeFragmentIdentifier");function l(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{let i=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[d(t,e),"[",i,"]"].join("")]:[...r,[d(t,e),"[",d(i,e),"]=",d(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[d(t,e),"[]"].join("")]:[...r,[d(t,e),"[]=",d(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:(i=null===i?"":i,0===n.length?[[d(r,e),t,d(i,e)].join("")]:[[n,d(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,d(t,e)]:[...r,[d(t,e),"=",d(n,e)].join("")]}}function u(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{let i="string"==typeof r&&r.includes(e.arrayFormatSeparator),o="string"==typeof r&&!i&&h(r,e).includes(e.arrayFormatSeparator);r=o?h(r,e):r;let a=i||o?r.split(e.arrayFormatSeparator).map((t=>h(t,e))):null===r?r:h(r,e);n[t]=a};case"bracket-separator":return(t,r,n)=>{let i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(n[t]=r&&h(r,e));let o=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>h(t,e)));void 0!==n[t]?n[t]=[].concat(n[t],o):n[t]=o};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function d(e,r){return r.encode?r.strict?t(e):encodeURIComponent(e):e}function h(e,t){return t.decode?r(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="",r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}function v(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 r=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,a]=n(t.decode?o.replace(/\+/g," "):o,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:h(a,t),r(h(e,t),a,i)}for(let e of Object.keys(i)){let r=i[e];if("object"==typeof r&&null!==r)for(let e of Object.keys(r))r[e]=m(r[e],t);else i[e]=m(r,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{let r=i[t];return r&&"object"==typeof r&&!Array.isArray(r)?e[t]=p(r):e[t]=r,e}),Object.create(null))}s(l,"encoderForArrayFormat"),s(u,"parserForArrayFormat"),s(c,"validateArrayFormatSeparator"),s(d,"encode"),s(h,"decode"),s(p,"keysSorter"),s(f,"removeHash"),s(g,"getHash"),s(v,"extract"),s(m,"parseValue"),s(b,"parse"),e.extract=v,e.parse=b,e.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let r=s((r=>t.skipNull&&o(e[r])||t.skipEmptyString&&""===e[r]),"shouldFilter"),n=l(t),i={};for(let t of Object.keys(e))r(t)||(i[t]=e[t]);let a=Object.keys(i);return!1!==t.sort&&a.sort(t.sort),a.map((r=>{let i=e[r];return void 0===i?"":null===i?d(r,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?d(r,t)+"[]":i.reduce(n(r),[]).join("&"):d(r,t)+"="+d(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[r,i]=n(e,"#");return Object.assign({url:r.split("?")[0]||"",query:b(v(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:h(i,t)}:{})},e.stringifyUrl=(t,r)=>{r=Object.assign({encode:!0,strict:!0,[a]:!0},r);let n=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,r);l&&(l="?".concat(l));let u=g(t.url);return t.fragmentIdentifier&&(u="#".concat(r[a]?d(t.fragmentIdentifier,r):t.fragmentIdentifier)),"".concat(n).concat(l).concat(u)},e.pick=(t,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[a]:!1},n);let{url:o,query:s,fragmentIdentifier:l}=e.parseUrl(t,n);return e.stringifyUrl({url:o,query:i(s,r),fragmentIdentifier:l},n)},e.exclude=(t,r,n)=>{let i=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return e.pick(t,i,n)}})),Uv=pe(((e,t)=>{var r,n;y(),r=e,n=function(){var e=s((function(){return e=Object.assign||s((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),e.apply(this,arguments)}),"__assign");function t(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function r(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}s(t,"__values"),s(r,"__read");var n,i="KEYS",o="VALUES",a="",l=function(){function e(e,t){var r=e._tree,n=Array.from(r.keys());this.set=e,this._type=t,this._path=n.length>0?[{node:r,keys:n}]:[]}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=u(this._path),t=e.node,r=e.keys;if(u(r)===a)return{done:!1,value:this.result()};var n=t.get(u(r));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()},e.prototype.backtrack=function(){if(0!==this._path.length){var e=u(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 u(t)})).filter((function(e){return e!==a})).join("")},e.prototype.value=function(){return u(this._path).node.get(a)},e.prototype.result=function(){switch(this._type){case o:return this.value();case i:return this.key();default:return[this.key(),this.value()]}},e.prototype[Symbol.iterator]=function(){return this},e}(),u=s((function(e){return e[e.length-1]}),"last$1"),c=s((function(e,t,r){var n=new Map;if(void 0===t)return n;for(var i=t.length+1,o=i+r,a=new Uint8Array(o*i).fill(r+1),s=0;s<i;++s)a[s]=s;for(var l=1;l<o;++l)a[l*i]=l;return d(e,t,r,n,a,1,i,""),n}),"fuzzySearch"),d=s((function(e,r,n,i,o,s,l,u){var c,h,p=s*l;try{e:for(var f=t(e.keys()),g=f.next();!g.done;g=f.next()){var v=g.value;if(v===a){var y=o[p-1];y<=n&&i.set(u,[e.get(v),y])}else{for(var m=s,b=0;b<v.length;++b,++m){for(var _=v[b],w=l*m,M=w-l,x=o[w],E=Math.max(0,m-n-1),S=Math.min(l-1,m+n),I=E;I<S;++I){var k=_!==r[I],C=o[M+I]+ +k,O=o[M+I+1]+1,T=o[w+I]+1,A=o[w+I+1]=Math.min(C,O,T);A<x&&(x=A)}if(x>n)continue e}d(e.get(v),r,n,i,o,m,l,u+v)}}}catch(e){c={error:e}}finally{try{g&&!g.done&&(h=f.return)&&h.call(f)}finally{if(c)throw c.error}}}),"recurse"),h=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(n){var i,o;if(!n.startsWith(this._prefix))throw new Error("Mismatched prefix");var s=r(p(this._tree,n.slice(this._prefix.length)),2),l=s[0],u=s[1];if(void 0===l){var c=r(b(u),2),d=c[0],h=c[1];try{for(var f=t(d.keys()),g=f.next();!g.done;g=f.next()){var v=g.value;if(v!==a&&v.startsWith(h)){var y=new Map;return y.set(v.slice(h.length),d.get(v)),new e(y,n)}}}catch(e){i={error:e}}finally{try{g&&!g.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}}return new e(l,n)},e.prototype.clear=function(){this._size=void 0,this._tree.clear()},e.prototype.delete=function(e){return this._size=void 0,v(this._tree,e)},e.prototype.entries=function(){return new l(this,"ENTRIES")},e.prototype.forEach=function(e){var n,i;try{for(var o=t(this),a=o.next();!a.done;a=o.next()){var s=r(a.value,2);e(s[0],s[1],this)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},e.prototype.fuzzyGet=function(e,t){return c(this._tree,e,t)},e.prototype.get=function(e){var t=f(this._tree,e);return void 0!==t?t.get(a):void 0},e.prototype.has=function(e){var t=f(this._tree,e);return void 0!==t&&t.has(a)},e.prototype.keys=function(){return new l(this,i)},e.prototype.set=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");return this._size=void 0,g(this._tree,e).set(a,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 r=g(this._tree,e);return r.set(a,t(r.get(a))),this},e.prototype.fetch=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;var r=g(this._tree,e),n=r.get(a);return void 0===n&&r.set(a,n=t()),n},e.prototype.values=function(){return new l(this,o)},e.prototype[Symbol.iterator]=function(){return this.entries()},e.from=function(n){var i,o,a=new e;try{for(var s=t(n),l=s.next();!l.done;l=s.next()){var u=r(l.value,2),c=u[0],d=u[1];a.set(c,d)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a},e.fromObject=function(t){return e.from(Object.entries(t))},e}(),p=s((function(e,r,n){var i,o;if(void 0===n&&(n=[]),0===r.length||null==e)return[e,n];try{for(var s=t(e.keys()),l=s.next();!l.done;l=s.next()){var u=l.value;if(u!==a&&r.startsWith(u))return n.push([e,u]),p(e.get(u),r.slice(u.length),n)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return n.push([e,r]),p(void 0,"",n)}),"trackDown"),f=s((function(e,r){var n,i;if(0===r.length||null==e)return e;try{for(var o=t(e.keys()),s=o.next();!s.done;s=o.next()){var l=s.value;if(l!==a&&r.startsWith(l))return f(e.get(l),r.slice(l.length))}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}),"lookup"),g=s((function(e,r){var n,i,o=r.length;e:for(var s=0;e&&s<o;){try{for(var l=(n=void 0,t(e.keys())),u=l.next();!u.done;u=l.next()){var c=u.value;if(c!==a&&r[s]===c[0]){for(var d=Math.min(o-s,c.length),h=1;h<d&&r[s+h]===c[h];)++h;var p=e.get(c);if(h===c.length)e=p;else{var f=new Map;f.set(c.slice(h),p),e.set(r.slice(s,s+h),f),e.delete(c),e=f}s+=h;continue e}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}var g=new Map;return e.set(r.slice(s),g),g}return e}),"createPath"),v=s((function(e,t){var n=r(p(e,t),2),i=n[0],o=n[1];if(void 0!==i)if(i.delete(a),0===i.size)y(o);else if(1===i.size){var s=r(i.entries().next().value,2),l=s[0],u=s[1];m(o,l,u)}}),"remove"),y=s((function(e){if(0!==e.length){var t=r(b(e),2),n=t[0],i=t[1];if(n.delete(i),0===n.size)y(e.slice(0,-1));else if(1===n.size){var o=r(n.entries().next().value,2),s=o[0],l=o[1];s!==a&&m(e.slice(0,-1),s,l)}}}),"cleanup"),m=s((function(e,t,n){if(0!==e.length){var i=r(b(e),2),o=i[0],a=i[1];o.set(a+t,n),o.delete(a)}}),"merge"),b=s((function(e){return e[e.length-1]}),"last"),_="or",w=function(){function n(t){if(null==(null==t?void 0:t.fields))throw new Error('MiniSearch: option "fields" must be provided');this._options=e(e(e({},I),t),{searchOptions:e(e({},k),t.searchOptions||{})}),this._index=new h,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(n,"MiniSearch"),n.prototype.add=function(e){var r,n,i,o,a=this._options,s=a.extractField,l=a.tokenize,u=a.processTerm,c=a.fields,d=a.idField,h=s(e,d);if(null==h)throw new Error('MiniSearch: document does not have ID field "'.concat(d,'"'));var p=this.addDocumentId(h);this.saveStoredFields(p,e);try{for(var f=t(c),g=f.next();!g.done;g=f.next()){var v=g.value,y=s(e,v);if(null!=y){var m=l(y.toString(),v),b=this._fieldIds[v],_=new Set(m).size;this.addFieldLength(p,b,this._documentCount-1,_);try{for(var w=(i=void 0,t(m)),M=w.next();!M.done;M=w.next()){var x=u(M.value,v);x&&this.addTerm(b,p,x)}}catch(e){i={error:e}}finally{try{M&&!M.done&&(o=w.return)&&o.call(w)}finally{if(i)throw i.error}}}}}catch(e){r={error:e}}finally{try{g&&!g.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}},n.prototype.addAll=function(e){var r,n;try{for(var i=t(e),o=i.next();!o.done;o=i.next()){var a=o.value;this.add(a)}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},n.prototype.addAllAsync=function(e,t){var r=this;void 0===t&&(t={});var n=t.chunkSize,i=void 0===n?10:n,o={chunk:[],promise:Promise.resolve()},a=e.reduce((function(e,t,n){var o=e.chunk,a=e.promise;return o.push(t),(n+1)%i==0?{chunk:[],promise:a.then((function(){return new Promise((function(e){return setTimeout(e,0)}))})).then((function(){return r.addAll(o)}))}:{chunk:o,promise:a}}),o),s=a.chunk;return a.promise.then((function(){return r.addAll(s)}))},n.prototype.remove=function(e){var n,i,o,a,s,l,u=this._options,c=u.tokenize,d=u.processTerm,h=u.extractField,p=u.fields,f=u.idField,g=h(e,f);if(null==g)throw new Error('MiniSearch: document does not have ID field "'.concat(f,'"'));try{for(var v=t(this._documentIds),y=v.next();!y.done;y=v.next()){var m=r(y.value,2),b=m[0];if(g===m[1]){try{for(var _=(o=void 0,t(p)),w=_.next();!w.done;w=_.next()){var M=w.value,x=h(e,M);if(null!=x){var E=c(x.toString(),M),S=this._fieldIds[M],I=new Set(E).size;this.removeFieldLength(b,S,this._documentCount,I);try{for(var k=(s=void 0,t(E)),C=k.next();!C.done;C=k.next()){var O=d(C.value,M);O&&this.removeTerm(S,b,O)}}catch(e){s={error:e}}finally{try{C&&!C.done&&(l=k.return)&&l.call(k)}finally{if(s)throw s.error}}}}}catch(e){o={error:e}}finally{try{w&&!w.done&&(a=_.return)&&a.call(_)}finally{if(o)throw o.error}}return this._storedFields.delete(b),this._documentIds.delete(b),this._fieldLength.delete(b),void(this._documentCount-=1)}}}catch(e){n={error:e}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}throw new Error("MiniSearch: cannot remove document with ID ".concat(g,": it is not in the index"))},n.prototype.removeAll=function(e){var r,n;if(e)try{for(var i=t(e),o=i.next();!o.done;o=i.next()){var a=o.value;this.remove(a)}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new h,this._documentCount=0,this._documentIds=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},n.prototype.search=function(e,n){var i,o;void 0===n&&(n={});var a=this.executeQuery(e,n),s=[];try{for(var l=t(a),u=l.next();!u.done;u=l.next()){var c=r(u.value,2),d=c[0],h=c[1],p=h.score,f=h.terms,g=h.match,v=f.length,y={id:this._documentIds.get(d),score:p*v,terms:Object.keys(g),match:g};Object.assign(y,this._storedFields.get(d)),(null==n.filter||n.filter(y))&&s.push(y)}}catch(e){i={error:e}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}return s.sort(A),s},n.prototype.autoSuggest=function(n,i){var o,a,s,l;void 0===i&&(i={}),i=e(e({},C),i);var u=new Map;try{for(var c=t(this.search(n,i)),d=c.next();!d.done;d=c.next()){var h=d.value,p=h.score,f=(w=h.terms).join(" ");null!=(b=u.get(f))?(b.score+=p,b.count+=1):u.set(f,{score:p,terms:w,count:1})}}catch(e){o={error:e}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}var g=[];try{for(var v=t(u),y=v.next();!y.done;y=v.next()){var m=r(y.value,2),b=m[0],_=m[1],w=(p=_.score,_.terms),M=_.count;g.push({suggestion:b,terms:w,score:p/M})}}catch(e){s={error:e}}finally{try{y&&!y.done&&(l=v.return)&&l.call(v)}finally{if(s)throw s.error}}return g.sort(A),g},Object.defineProperty(n.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),n.loadJSON=function(e,t){if(null==t)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return n.loadJS(JSON.parse(e),t)},n.getDefault=function(e){if(I.hasOwnProperty(e))return M(I,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))},n.loadJS=function(e,i){var o,a,s,l,u=e.index,c=e.documentCount,d=e.nextId,p=e.documentIds,f=e.fieldIds,g=e.fieldLength,v=e.averageFieldLength,y=e.storedFields,m=e.serializationVersion;if(1!==m&&2!==m)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var b=new n(i);b._documentCount=c,b._nextId=d,b._documentIds=F(p),b._fieldIds=f,b._fieldLength=F(g),b._avgFieldLength=v,b._storedFields=F(y),b._index=new h;try{for(var _=t(u),w=_.next();!w.done;w=_.next()){var M=r(w.value,2),x=M[0],E=M[1],S=new Map;try{for(var I=(s=void 0,t(Object.keys(E))),k=I.next();!k.done;k=I.next()){var C=k.value,O=E[C];1===m&&(O=O.ds),S.set(parseInt(C,10),F(O))}}catch(e){s={error:e}}finally{try{k&&!k.done&&(l=I.return)&&l.call(I)}finally{if(s)throw s.error}}b._index.set(x,S)}}catch(e){o={error:e}}finally{try{w&&!w.done&&(a=_.return)&&a.call(_)}finally{if(o)throw o.error}}return b},n.prototype.executeQuery=function(t,r){var n=this;if(void 0===r&&(r={}),"string"!=typeof t){var i=e(e(e({},r),t),{queries:void 0}),o=t.queries.map((function(e){return n.executeQuery(e,i)}));return this.combineResults(o,t.combineWith)}var a=this._options,s=a.tokenize,l=a.processTerm,u=a.searchOptions,c=e(e({tokenize:s,processTerm:l},u),r),d=c.tokenize,h=c.processTerm,p=d(t).map((function(e){return h(e)})).filter((function(e){return!!e})).map(S(c)).map((function(e){return n.executeQuerySpec(e,c)}));return this.combineResults(p,c.combineWith)},n.prototype.executeQuerySpec=function(n,i){var o,a,s,l,u,c,d=e(e({},this._options.searchOptions),i),h=(d.fields||this._options.fields).reduce((function(t,r){var n;return e(e({},t),((n={})[r]=M(t,r)||1,n))}),d.boost||{}),p=d.boostDocument,f=d.weights,g=d.maxFuzzy,v=e(e({},k.weights),f),y=v.fuzzy,m=v.prefix,b=this._index.get(n.term),_=this.termResults(n.term,n.term,1,b,h,p);if(n.prefix&&(u=this._index.atPrefix(n.term)),n.fuzzy){var w=!0===n.fuzzy?.2:n.fuzzy,x=w<1?Math.min(g,Math.round(n.term.length*w)):w;x&&(c=this._index.fuzzyGet(n.term,x))}if(u)try{for(var E=t(u),S=E.next();!S.done;S=E.next()){var I=r(S.value,2),C=I[0],O=I[1];if(F=C.length-n.term.length){null==c||c.delete(C);var T=m*C.length/(C.length+.3*F);this.termResults(n.term,C,T,O,h,p,_)}}}catch(e){o={error:e}}finally{try{S&&!S.done&&(a=E.return)&&a.call(E)}finally{if(o)throw o.error}}if(c)try{for(var A=t(c.keys()),P=A.next();!P.done;P=A.next()){C=P.value;var F,j=r(c.get(C),2),L=j[0];(F=j[1])&&(T=y*C.length/(C.length+F),this.termResults(n.term,C,T,L,h,p,_))}}catch(e){s={error:e}}finally{try{P&&!P.done&&(l=A.return)&&l.call(A)}finally{if(s)throw s.error}}return _},n.prototype.combineResults=function(e,t){if(void 0===t&&(t=_),0===e.length)return new Map;var r=t.toLowerCase();return e.reduce(x[r])||new Map},n.prototype.toJSON=function(){var e,n,i,o,a=[];try{for(var s=t(this._index),l=s.next();!l.done;l=s.next()){var u=r(l.value,2),c=u[0],d=u[1],h={};try{for(var p=(i=void 0,t(d)),f=p.next();!f.done;f=p.next()){var g=r(f.value,2),v=g[0],y=g[1];h[v]=Object.fromEntries(y)}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}a.push([c,h])}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}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:a,serializationVersion:2}},n.prototype.termResults=function(e,r,n,i,o,a,s){var l,u,c,d,h;if(void 0===s&&(s=new Map),null==i)return s;try{for(var p=t(Object.keys(o)),f=p.next();!f.done;f=p.next()){var g=f.value,v=o[g],y=this._fieldIds[g],m=i.get(y);if(null!=m){var b=m.size,_=this._avgFieldLength[y];try{for(var w=(c=void 0,t(m.keys())),x=w.next();!x.done;x=w.next()){var S=x.value,I=a?a(this._documentIds.get(S),r):1;if(I){var k=m.get(S),C=this._fieldLength.get(S)[y],T=n*v*I*E(k,b,this._documentCount,C,_),A=s.get(S);if(A){A.score+=T,O(A.terms,e);var P=M(A.match,r);P?P.push(g):A.match[r]=[g]}else s.set(S,{score:T,terms:[e],match:(h={},h[r]=[g],h)})}}}catch(e){c={error:e}}finally{try{x&&!x.done&&(d=w.return)&&d.call(w)}finally{if(c)throw c.error}}}}}catch(e){l={error:e}}finally{try{f&&!f.done&&(u=p.return)&&u.call(p)}finally{if(l)throw l.error}}return s},n.prototype.addTerm=function(e,t,r){var n=this._index.fetch(r,P),i=n.get(e);if(null==i)(i=new Map).set(t,1),n.set(e,i);else{var o=i.get(t);i.set(t,(o||0)+1)}},n.prototype.removeTerm=function(e,t,r){if(this._index.has(r)){var n=this._index.fetch(r,P),i=n.get(e);null==i||null==i.get(t)?this.warnDocumentChanged(t,e,r):i.get(t)<=1?i.size<=1?n.delete(e):i.delete(t):i.set(t,i.get(t)-1),0===this._index.get(r).size&&this._index.delete(r)}else this.warnDocumentChanged(t,e,r)},n.prototype.warnDocumentChanged=function(e,r,n){var i,o;if(null!=console&&null!=console.warn)try{for(var a=t(Object.keys(this._fieldIds)),s=a.next();!s.done;s=a.next()){var l=s.value;if(this._fieldIds[l]===r)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(l,'". Removing a document after it has changed can corrupt the index!'))}}catch(e){i={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},n.prototype.addDocumentId=function(e){var t=this._nextId;return this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t},n.prototype.addFields=function(e){for(var t=0;t<e.length;t++)this._fieldIds[e[t]]=t},n.prototype.addFieldLength=function(e,t,r,n){var i=this._fieldLength.get(e);null==i&&this._fieldLength.set(e,i=[]),i[t]=n;var o=(this._avgFieldLength[t]||0)*r+n;this._avgFieldLength[t]=o/(r+1)},n.prototype.removeFieldLength=function(e,t,r,n){var i=this._avgFieldLength[t]*r-n;this._avgFieldLength[t]=i/(r-1)},n.prototype.saveStoredFields=function(e,r){var n,i,o=this._options,a=o.storeFields,s=o.extractField;if(null!=a&&0!==a.length){var l=this._storedFields.get(e);null==l&&this._storedFields.set(e,l={});try{for(var u=t(a),c=u.next();!c.done;c=u.next()){var d=c.value,h=s(r,d);void 0!==h&&(l[d]=h)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}},n}(),M=s((function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}),"getOwnProperty"),x=((n={}).or=function(e,r){var n,i;try{for(var o=t(r.keys()),a=o.next();!a.done;a=o.next()){var s=a.value,l=e.get(s);if(null==l)e.set(s,r.get(s));else{var u=r.get(s),c=u.score,d=u.terms,h=u.match;l.score=l.score+c,l.match=Object.assign(l.match,h),T(l.terms,d)}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return e},n.and=function(e,r){var n,i,o=new Map;try{for(var a=t(r.keys()),s=a.next();!s.done;s=a.next()){var l=s.value,u=e.get(l);if(null!=u){var c=r.get(l),d=c.score,h=c.terms,p=c.match;T(u.terms,h),o.set(l,{score:u.score+d,terms:u.terms,match:Object.assign(u.match,p)})}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o},n.and_not=function(e,r){var n,i;try{for(var o=t(r.keys()),a=o.next();!a.done;a=o.next()){var s=a.value;e.delete(s)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return e},n),E=s((function(e,t,r,n,i){return Math.log(1+(r-t+.5)/(t+.5))*(.5+2.2*e/(e+1.2*(1-.7+.7*n/i)))}),"calcBM25Score"),S=s((function(e){return function(t,r,n){return{term:t,fuzzy:"function"==typeof e.fuzzy?e.fuzzy(t,r,n):e.fuzzy||!1,prefix:"function"==typeof e.prefix?e.prefix(t,r,n):!0===e.prefix}}}),"termToQuerySpec"),I={idField:"id",extractField:function(e,t){return e[t]},tokenize:function(e,t){return e.split(j)},processTerm:function(e,t){return e.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[]},k={combineWith:_,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375}},C={prefix:function(e,t,r){return t===r.length-1}},O=s((function(e,t){e.includes(t)||e.push(t)}),"assignUniqueTerm"),T=s((function(e,r){var n,i;try{for(var o=t(r),a=o.next();!a.done;a=o.next()){var s=a.value;e.includes(s)||e.push(s)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}),"assignUniqueTerms"),A=s((function(e,t){var r=e.score;return t.score-r}),"byScore"),P=s((function(){return new Map}),"createMap"),F=s((function(e){var r,n,i=new Map;try{for(var o=t(Object.keys(e)),a=o.next();!a.done;a=o.next()){var s=a.value;i.set(parseInt(s,10),e[s])}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}),"objectToNumericMap"),j=/[\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;return w},"object"==typeof e&&typeof t<"u"?t.exports=n():"function"==typeof define&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).MiniSearch=n()})),pT={};So(pT,{Mappedin:()=>Ln,MappedinDestinationSet:()=>xt,OfflineSearch:()=>mo,getVenue:()=>Df,getVenueBundle:()=>zf,initialize:()=>dT,setFetchFn:()=>$v}),module.exports=We(pT),y(),y();var Xv=an(qf());y(),y(),y();var Wf=an(Uf());y();var _u=class{constructor({origin:e,destination:t,vortex:r,elevationDelta:n=0,distance:i=0,angle:o=0,pathWeight:a=0}){let s,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=r,this.distance=i,this.angle=o,r)this.distance=0,this.angle=0,s=void 0!==r.weight&&r.weight>0?r.weight:"elevator"===r.type?2e3:1e3,l=r.multiplier&&r.multiplier>=1?r.multiplier:1,this.weight=n*l+s;else{let e=a||t.weight;s=e&&e>=0?e:0,l=t.multiplier&&t.multiplier>=1?t.multiplier:1,this.weight=this.distance*l+s}if(isNaN(this.angle))throw new Error("nan angle")}};s(_u,"Edge");var wu=_u,or=wu;y();var Gf="mi-debug",sy={logState: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)}},oe=sy;function uy(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],r=e.georeference[2],n=(0,Wf.getDistance)({latitude:t.target.x,longitude:t.target.y},{latitude:r.target.x,longitude:r.target.y}),i=t.control.x-r.control.x,o=t.control.y-r.control.y;return Math.sqrt(i*i+o*o)/n}catch(e){return oe.error(e),1}}function Po(e,t){let r=e.x-t.x,n=e.y-t.y;return(Math.atan2(n,r)+2.5*Math.PI)%(2*Math.PI)}s(uy,"getMapScale"),s(Po,"getAngle");var xu=class{constructor({nodes:e,vortexes:t,maps:r,showVortexNames:n=!1}){g(this,"edges"),g(this,"nodesById"),g(this,"mapsById"),this.edges={},this.mapsById=r.map((e=>({...e,_scale:uy(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:n?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:r})=>{let n=this.nodesById[t];return new or({angle:Po(e,n),destination:n,distance:this.getDistance(e,n),origin:e,pathWeight:r})}))})),o.forEach((e=>{if(null==e.nodes||0===e.nodes.length)return;let t=0;for(;t<e.nodes.length-1;){let r=this.nodesById[e.nodes[t]];if(t++,null==r)continue;let n=t;for(;n<e.nodes.length;){let t=this.nodesById[e.nodes[n]];if(n++,null==t)continue;let i=this.mapsById[r.map].elevation||0,o=this.mapsById[t.map].elevation||0,a=Math.abs(i-o);this.edges[r.id].push(new or({destination:t,elevationDelta:a,origin:r,vortex:e})),this.edges[t.id].push(new or({destination:r,elevationDelta:a,origin:t,vortex:e}))}}}))}aStar({originIds:e,destinationNodeIds:t,accessible:r,includedVortexIds:n,excludedVortexIds:i,excludedNodeIds:o}){let a=e.map((e=>this.nodesById[e])).filter((e=>e&&(!o||!o.has(e.id)))),s=t.map((e=>this.nodesById[e])).filter((e=>e&&(!o||!o.has(e.id))));if(0===a.length||0===s.length)return[];let l=[],u={},c={};for(a.forEach((e=>{let t=this.getShortestEuclideanDistance(e,s);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(s.includes(e.origin)){let t=[],r=u[e.origin.id];for(;null!=r;){t.push(r);let e=u[r.origin.id];r=null!=e?e:null}return t.reverse()}for(let t of this.edges[e.origin.id]){let a=t.vortex&&!1===t.vortex.accessible||!1===t.origin.accessible||!1===t.destination.accessible,d=t.vortex&&(n&&!n.has(t.vortex.id)||i&&i.has(t.vortex.id)),h=o&&o.has(t.destination.id);if(r&&a||d||h)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,s);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 r,n=e.x-t.x,i=e.y-t.y,o=n*n+i*i;return r=null==this.mapsById[e.map]?1:this.mapsById[e.map]._scale,Math.sqrt(o)/r}getShortestEuclideanDistance(e,t){return t.reduce(((t,r)=>{let n=this.getDistance(e,r);return Math.min(t,n)}),Number.MAX_VALUE)}};s(xu,"NavigationGraph");var ku=xu,Mu=ku;function ly(e){switch(e){case"down":case"up":return"".concat(e," ");default:return""}}y(),y(),s(ly,"vortexDirectionTest");var Tu=class{constructor({origin:e,action:t,distance:r,atLocation:n,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=r||0,this.atLocation=n,this.instruction="",i?this.instruction=i:(null!=t&&"Departure"===t.type?this.instruction=null!=n?"Depart from ".concat(n.name):"Depart from current location":null!=t&&"Arrival"===t.type?this.instruction=null!=n?"Arrive at ".concat(n.name):"Arrive at destination":null!=t&&"TakeVortex"===t.type?this.instruction="Take ".concat(n&&n.name," ").concat(ly(t.direction),"to ").concat(t.toMap.name):null!=t&&"ExitVortex"===t.type?this.instruction="Exit ".concat(n&&n.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&&n&&(this.instruction+=" at ".concat(n.name)))}};s(Tu,"Directive");var Eu=Tu,Gn=Eu;function Su(e,t,r,n){if(!(e&&t&&r&&n))return null;let i=e.x,o=e.y,a=t.x,s=t.y,l=r.x,u=r.y,c=n.x,d=n.y;if(i===a&&o===s||l===c&&u===d)return null;let h=(d-u)*(a-i)-(c-l)*(s-o);if(0===h)return null;let p=((c-l)*(o-u)-(d-u)*(i-l))/h,f=((a-i)*(o-u)-(s-o)*(i-l))/h;return p<0||p>1||f<0||f>1?null:{x:i+p*(a-i),y:o+p*(s-o)}}function Yf(e,t,r){if(e.x===t.x)return[{x:e.x+r,y:e.y},{x:t.x+r,y:t.y}];if(e.y===t.y)return[{x:e.x,y:e.y+r},{x:t.x,y:t.y+r}];let n=-1/((t.y-e.y)/(t.x-e.x)),i=r*Math.sqrt(1/(1+n*n)),o=n*i;return[{x:e.x+i,y:e.y+o},{x:t.x+i,y:t.y+o}]}function Hf(e,t,r=[],n=0){let i=!0;return r.forEach((r=>{if(n>0){let o=Yf(e,t,-n),a=Yf(e,t,n);if(Su(o[0],o[1],r[0],r[1])||Su(a[0],a[1],r[0],r[1]))return void(i=!1)}else if(Su(e,t,r[0],r[1]))return void(i=!1)})),i}y(),s(Su,"getLineIntersection"),s(Yf,"getOffsetLine"),s(Hf,"hasLineOfSight");var Io=.1*Math.PI;function Ao(e,t){return((t-e+Math.PI)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)-Math.PI}s(Ao,"differenceBetweenAngles");var Iu=class{constructor({locations:e,nodes:t,vortexes:r,maps:n,polygons:i,showVortexNames:o}){g(this,"graph"),g(this,"locationsByNodeId"),g(this,"geometryEdgesByMapId",new Map),this.graph=new Mu({maps:n,nodes:t,showVortexNames:o,vortexes:r}),this.locationsByNodeId=e.reduce(((e,t)=>(t.nodes&&t.nodes.forEach((r=>{e[r.node]=t})),t.polygons&&t.polygons.forEach((r=>{r.entrances&&r.entrances.forEach((r=>{e[r]=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 r=0;r<t.length;r++)t[r+1]&&this.geometryEdgesByMapId.get(e.map).push([t[r],t[r+1]]);else e.vertexes.forEach(((t,r)=>{e.vertexes[r+1]?this.geometryEdgesByMapId.get(e.map).push([t,e.vertexes[r+1]]):this.geometryEdgesByMapId.get(e.map).push([t,e.vertexes[0]])}))}))}getClosestLocationInRay(e,t=.5*Math.PI,r=10){let n=0,i=0,o=e;for(;Math.abs(n)<t&&i<r;){let e=this.graph.edges[o.destination.id],a=null,s=0;for(let t of e)if(t.distance>0)if(null!=a){let e=-Ao(o.angle,t.angle);Math.abs(e)<Math.abs(s)&&(a=t,s=e)}else a=t,s=-Ao(o.angle,t.angle);if(null==a)return null;{if(Math.abs(s)>=t||(n+=s,i+=a.distance,Math.abs(n)>=t||i>r))return null;let e=this.locationsByNodeId[a.destination.id];if(null!=e)return e;o=a}}return null}getDirections({originIds:e,destinationNodeIds:t,accessible:r,departFrom:n,arriveAt:i,includedVortexIds:o,excludedVortexIds:a,excludedNodeIds:s,simplify:l}){var u,c,d;let h=this.graph.aStar({originIds:e,destinationNodeIds:t,accessible:r,includedVortexIds:o,excludedVortexIds:a,excludedNodeIds:s});if(0===h.length)return{distance:0,instructions:[new Gn({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=[h[0]];for(let r=1;r<h.length;r++){if(h[r].origin.map!==h[r-1].origin.map){let n=null!=(c=this.geometryEdgesByMapId.get(h[r-1].origin.map))?c:[];g.push(...this.simplifySteps(t,n,e)),t=[h[r]]}t.push(h[r])}let r=h[h.length-1],n=null!=(d=this.geometryEdgesByMapId.get(r.origin.map))?d:[];g.push(...this.simplifySteps(t,n,e)),h=g}for(let e=0;e<h.length;e++)f.push(h[e].origin);f.push(h[h.length-1].destination);let v=[],y=null,m=null,b=0,_=0;for(let e=0;e<h.length;e++){let t=h[e],r=t.origin,o=t.destination;if(p+=t.distance,b+=(null==m?void 0:m.distance)||0,0===e&&v.push(new Gn({action:{type:"Departure"},atLocation:n,distance:0,origin:r})),null!=t.vortex){let e=this.graph.mapsById[r.map],n=this.graph.mapsById[o.map],i="none";if(null!=e.elevation&&null!=n.elevation){let t=e.elevation-n.elevation;t>0?i="down":t<0&&(i="up")}v.push(new Gn({action:{direction:i,fromMap:e,toMap:n,type:"TakeVortex"},atLocation:t.vortex,distance:b,origin:r})),_+=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 Gn({action:{fromMap:e,toMap:t,type:"ExitVortex"},atLocation:m.vortex,distance:b,origin:r})),_+=b,b=0}else{let e=this.graph.edges[r.id].filter((e=>e.destination!==y&&e.destination!==t.destination));if(e.length>0){let n=-Ao(m.angle,t.angle),i=e.reduce(((e,r)=>{let n=-Ao(t.angle,r.angle);return Math.min(e,Math.abs(n))}),Math.PI);if(Math.abs(n)>=Io||Math.abs(i)<=Io){let e;e=n<=-Math.PI/4?"Right":n<=-Io?"SlightRight":n<=Io?"Straight":n<=Math.PI/4?"SlightLeft":"Left";let t=this.locationsByNodeId[r.id];if(t||(t=this.getClosestLocationInRay(m,.5*Math.PI,10)),null!=t){let n=new Gn({action:{bearing:e,referencePosition:"At",type:"Turn"},atLocation:t,distance:b,origin:r});n.type=e,v.push(n)}else v.push(new Gn({action:{bearing:e,referencePosition:"At",type:"Turn"},distance:b,origin:r}));_+=b,b=0}}}e===h.length-1&&(v.push(new Gn({action:{type:"Arrival"},atLocation:i,distance:p-_<0?0:p-_,origin:t.destination})),_+=b,b=0),y=r,m=t}let w=[],M=null;for(let e=v.length-1;e>=0;e--){let t=v[e],{action:r}=t;r&&"TakeVortex"===r.type?(M=t.node,w.unshift(t)):r&&"Turn"===r.type&&null!=M?this.graph.getDistance(t.node,M)>5?w.unshift(t):w[0].distance+=t.distance:w.unshift(t)}return{distance:p,instructions:w,path:f}}simplifySteps(e,t,r){if(e.length<3)return e;let n=[e[0]],i=1;for(let o=i+2;o<e.length;o++)if(!Hf(e[i].origin,e[o].origin,t,r)){let t=o-1;n.push(new or({...e[i],destination:e[t].origin,distance:this.graph.getDistance(e[i].origin,e[t].origin),angle:Po(e[i].origin,e[t].origin)})),i=t}return n.push(new or({...e[i],destination:e[e.length-1].origin,distance:this.graph.getDistance(e[i].origin,e[e.length-1].origin),angle:Po(e[i].origin,e[e.length-1].origin)}),e[e.length-1]),n}};s(Iu,"Navigator");var Ou=Iu,Pu=Ou;y(),y();var on,Ti,Au,Si,Cu,Co,$f,ju=class{constructor(e){G(this,Ti),G(this,Si),G(this,Co),G(this,on,void 0),H(this,on,e)}directionsTo(e,t){let r=m(this,on).analytics;return e instanceof xt?0===e.destinations.length?[]:(r.getDirections(this,e.destinations[e.destinations.length-1]),Ke(this,Co,$f).call(this,e,t)):(r.getDirections(this,e),Ke(this,Si,Cu).call(this,e,t))}distanceTo(e,t){let r=Ke(this,Si,Cu).call(this,e,t);return(null==r?void 0:r.distance)||0}};on=new WeakMap,Ti=new WeakSet,Au=s((function(){var e;return null!=(e=m(this,on).venue.renderOptions)&&e.simplifyDirections?{enabled:!0}:void 0}),"#venueHasSimplifyRenderOption"),Si=new WeakSet,Cu=s((function(e,t){let r=Ei(this),n=Ei(e),i=m(this,on).navigator.getDirections({originIds:r,destinationNodeIds:n,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)||m(this,Ti,Au)});return new sr(m(this,on),i)}),"#directionsToSingleDestination"),Co=new WeakSet,$f=s((function(e,t){let r,n=[],i=Ei(this);for(let o=0;o<e.destinations.length;o++){r=Ei(e.destinations[o]);let a=m(this,on).navigator.getDirections({originIds:i,destinationNodeIds:r,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)||m(this,Ti,Au)}),s=new sr(m(this,on),a);n.push(s),i=0===s.path.length?r:[s.path[s.path.length-1].id]}return n}),"#directionsToDestinationSet"),s(ju,"MappedinNavigatable");var sn=ju;y(),y();var ms=an(Wh()),Oc={production:"40ead723d18886045e302513245edb27",development:""},Lr={plan:{version:"22",branch:"main",source:"websdk",versionId:"197467d1-8926-452d-a088-b3817cbac89f"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"}},Pc=class{constructor(e){this.event_properties=e,g(this,"event_type","Analytics:categorySelected-call"),this.event_properties=e}};s(Pc,"AnalyticsCategorySelectedCall");var Xi=Pc,Ic=class{constructor(e){this.event_properties=e,g(this,"event_type","Analytics:locationSelected-call"),this.event_properties=e}};s(Ic,"AnalyticsLocationSelectedCall");var $i=Ic,Ac=class{constructor(e){this.event_properties=e,g(this,"event_type","BlueDot:disable-call"),this.event_properties=e}};s(Ac,"BlueDotDisableCall");var vl=Ac,Cc=class{constructor(e){this.event_properties=e,g(this,"event_type","BlueDot:enable-call"),this.event_properties=e}};s(Cc,"BlueDotEnableCall");var yl=Cc,jc=class{constructor(e){this.event_properties=e,g(this,"event_type","BlueDot:off-call"),this.event_properties=e}};s(jc,"BlueDotOffCall");var bl=jc,Nc=class{constructor(e){this.event_properties=e,g(this,"event_type","BlueDot:on-call"),this.event_properties=e}};s(Nc,"BlueDotOnCall");var wl=Nc,Lc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:animate-call"),this.event_properties=e}};s(Lc,"CameraAnimateCall");var _l=Lc,Fc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:cancelAnimation-call"),this.event_properties=e}};s(Fc,"CameraCancelAnimationCall");var kl=Fc,Rc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:focusOn-call"),this.event_properties=e}};s(Rc,"CameraFocusOnCall");var Ml=Rc,Dc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:getSafeAreaInsets-call"),this.event_properties=e}};s(Dc,"CameraGetSafeAreaInsetsCall");var xl=Dc,zc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:interaction.disable-call"),this.event_properties=e}};s(zc,"CameraInteractionDisableCall");var El=zc,Bc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:interaction.enable-call"),this.event_properties=e}};s(Bc,"CameraInteractionEnableCall");var Tl=Bc,Vc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:set-call"),this.event_properties=e}};s(Vc,"CameraSetCall");var Sl=Vc,qc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:setSafeAreaInsets-call"),this.event_properties=e}};s(qc,"CameraSetSafeAreaInsetsCall");var Ol=qc,Uc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:translate-call"),this.event_properties=e}};s(Uc,"CameraTranslateCall");var Pl=Uc,Gc=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:add-call"),this.event_properties=e}};s(Gc,"FlatLabelsAddCall");var Il=Gc,Wc=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:labelAllLocations-call"),this.event_properties=e}};s(Wc,"FlatLabelsLabelAllLocationsCall");var Al=Wc,Yc=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:remove-call"),this.event_properties=e}};s(Yc,"FlatLabelsRemoveCall");var Cl=Yc,Hc=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:removeAll-call"),this.event_properties=e}};s(Hc,"FlatLabelsRemoveAllCall");var jl=Hc,Xc=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:setAppearance-call"),this.event_properties=e}};s(Xc,"FlatLabelsSetAppearanceCall");var Nl=Xc,$c=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:add-call"),this.event_properties=e}};s($c,"FloatingLabelsAddCall");var Ll=$c,Kc=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:labelAllLocations-call"),this.event_properties=e}};s(Kc,"FloatingLabelsLabelAllLocationsCall");var Fl=Kc,Jc=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:remove-call"),this.event_properties=e}};s(Jc,"FloatingLabelsRemoveCall");var Rl=Jc,Qc=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:removeAll-call"),this.event_properties=e}};s(Qc,"FloatingLabelsRemoveAllCall");var Dl=Qc,Zc=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:resetPriority-call"),this.event_properties=e}};s(Zc,"FloatingLabelsResetPriorityCall");var zl=Zc,ed=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:setAppearance-call"),this.event_properties=e}};s(ed,"FloatingLabelsSetAppearanceCall");var Bl=ed,td=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:setPriority-call"),this.event_properties=e}};s(td,"FloatingLabelsSetPriorityCall");var Vl=td,nd=class{constructor(e){this.event_properties=e,g(this,"event_type","global:getVenue-call"),this.event_properties=e}};s(nd,"GlobalGetVenueCall");var Ki=nd,rd=class{constructor(e){this.event_properties=e,g(this,"event_type","global:getVenueMVF-call"),this.event_properties=e}};s(rd,"GlobalGetVenueMvfCall");var gs=rd,id=class{constructor(e){this.event_properties=e,g(this,"event_type","global:showVenue-call"),this.event_properties=e}};s(id,"GlobalShowVenueCall");var ql=id,ad=class{constructor(e){this.event_properties=e,g(this,"event_type","Journey:clear-call"),this.event_properties=e}};s(ad,"JourneyClearCall");var Ul=ad,od=class{constructor(e){this.event_properties=e,g(this,"event_type","Journey:draw-call"),this.event_properties=e}};s(od,"JourneyDrawCall");var Gl=od,sd=class{constructor(e){this.event_properties=e,g(this,"event_type","Journey:setStep-call"),this.event_properties=e}};s(sd,"JourneySetStepCall");var Wl=sd,ud=class{constructor(e){this.event_properties=e,g(this,"event_type","Mappedin:getCollectionItemById-call"),this.event_properties=e}};s(ud,"MappedinGetCollectionItemByIdCall");var Yl=ud,ld=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinCoordinate:absoluteDistanceTo-call"),this.event_properties=e}};s(ld,"MappedinCoordinateAbsoluteDistanceToCall");var Hl=ld,cd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinCoordinate:nearestNode-call"),this.event_properties=e}};s(cd,"MappedinCoordinateNearestNodeCall");var Xl=cd,dd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinLocation:clone-call"),this.event_properties=e}};s(dd,"MappedinLocationCloneCall");var Ji=dd,pd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinLocation:directionsTo-call"),this.event_properties=e}};s(pd,"MappedinLocationDirectionsToCall");var Qi=pd,fd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinLocation:distanceTo-call"),this.event_properties=e}};s(fd,"MappedinLocationDistanceToCall");var Zi=fd,hd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinMap:createCoordinate-call"),this.event_properties=e}};s(hd,"MappedinMapCreateCoordinateCall");var $l=hd,gd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinMap:createCoordinateByXY-call"),this.event_properties=e}};s(gd,"MappedinMapCreateCoordinateByXyCall");var Kl=gd,md=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinMap:getNorth-call"),this.event_properties=e}};s(md,"MappedinMapGetNorthCall");var Jl=md,vd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinNode:directionsTo-call"),this.event_properties=e}};s(vd,"MappedinNodeDirectionsToCall");var ea=vd,yd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinNode:distanceTo-call"),this.event_properties=e}};s(yd,"MappedinNodeDistanceToCall");var ta=yd,bd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinPolygon:directionsTo-call"),this.event_properties=e}};s(bd,"MappedinPolygonDirectionsToCall");var na=bd,wd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinPolygon:distanceTo-call"),this.event_properties=e}};s(wd,"MappedinPolygonDistanceToCall");var ra=wd,_d=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinVenue:metadata-read"),this.event_properties=e}};s(_d,"MappedinVenueMetadataRead");var ia=_d,kd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:addInteractivePolygon-call"),this.event_properties=e}};s(kd,"MapViewAddInteractivePolygonCall");var Ql=kd,Md=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:addInteractivePolygonsForAllLocations-call"),this.event_properties=e}};s(Md,"MapViewAddInteractivePolygonsForAllLocationsCall");var Zl=Md,xd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:clearPolygonColor-call"),this.event_properties=e}};s(xd,"MapViewClearPolygonColorCall");var ec=xd,Ed=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:createCustomTooltip-call"),this.event_properties=e}};s(Ed,"MapViewCreateCustomTooltipCall");var tc=Ed,Td=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:createMarker-call"),this.event_properties=e}};s(Td,"MapViewCreateMarkerCall");var nc=Td,Sd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:createTooltip-call"),this.event_properties=e}};s(Sd,"MapViewCreateTooltipCall");var rc=Sd,Od=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:destroy-call"),this.event_properties=e}};s(Od,"MapViewDestroyCall");var ic=Od,Pd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:disableImageFlippingForAllPolygons-call"),this.event_properties=e}};s(Pd,"MapViewDisableImageFlippingForAllPolygonsCall");var ac=Pd,Id=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:drawPath-call"),this.event_properties=e}};s(Id,"MapViewDrawPathCall");var oc=Id,Ad=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:enableImageFlippingForAllLocations-call"),this.event_properties=e}};s(Ad,"MapViewEnableImageFlippingForAllLocationsCall");var sc=Ad,Cd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:enableImageFlippingForPolygon-call"),this.event_properties=e}};s(Cd,"MapViewEnableImageFlippingForPolygonCall");var uc=Cd,jd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:getNearestNodeByScreenCoordinates-call"),this.event_properties=e}};s(jd,"MapViewGetNearestNodeByScreenCoordinatesCall");var lc=jd,Nd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:getPolygonAtCoordinate-call"),this.event_properties=e}};s(Nd,"MapViewGetPolygonAtCoordinateCall");var cc=Nd,Ld=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:getPrimaryLocationForPolygon-call"),this.event_properties=e}};s(Ld,"MapViewGetPrimaryLocationForPolygonCall");var dc=Ld,Fd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:labelAllLocations-call"),this.event_properties=e}};s(Fd,"MapViewLabelAllLocationsCall");var pc=Fd,Rd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeAllInteractivePolygons-call"),this.event_properties=e}};s(Rd,"MapViewRemoveAllInteractivePolygonsCall");var fc=Rd,Dd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeAllMarkers-call"),this.event_properties=e}};s(Dd,"MapViewRemoveAllMarkersCall");var hc=Dd,zd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeAllPaths-call"),this.event_properties=e}};s(zd,"MapViewRemoveAllPathsCall");var gc=zd,Bd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeAllTooltips-call"),this.event_properties=e}};s(Bd,"MapViewRemoveAllTooltipsCall");var mc=Bd,Vd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeInteractivePolygon-call"),this.event_properties=e}};s(Vd,"MapViewRemoveInteractivePolygonCall");var vc=Vd,qd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeMarker-call"),this.event_properties=e}};s(qd,"MapViewRemoveMarkerCall");var yc=qd,Ud=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removePath-call"),this.event_properties=e}};s(Ud,"MapViewRemovePathCall");var bc=Ud,Gd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeTooltip-call"),this.event_properties=e}};s(Gd,"MapViewRemoveTooltipCall");var wc=Gd,Wd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setBackgroundColor-call"),this.event_properties=e}};s(Wd,"MapViewSetBackgroundColorCall");var _c=Wd,Yd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setHoverColor-call"),this.event_properties=e}};s(Yd,"MapViewSetHoverColorCall");var kc=Yd,Hd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setMap-call"),this.event_properties=e}};s(Hd,"MapViewSetMapCall");var Mc=Hd,Xd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setPolygonColor-call"),this.event_properties=e}};s(Xd,"MapViewSetPolygonColorCall");var xc=Xd,$d=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setState-call"),this.event_properties=e}};s($d,"MapViewSetStateCall");var Ec=$d,Kd=class{constructor(e){this.event_properties=e,g(this,"event_type","metrics:mapLoad-event"),this.event_properties=e}};s(Kd,"MetricsMapLoadEvent");var Tc=Kd,Jd=class{constructor(e){this.event_properties=e,g(this,"event_type","OfflineSearch:addQuery-call"),this.event_properties=e}};s(Jd,"OfflineSearchAddQueryCall");var aa=Jd,Qd=class{constructor(e){this.event_properties=e,g(this,"event_type","OfflineSearch:constructor-call"),this.event_properties=e}};s(Qd,"OfflineSearchConstructorCall");var oa=Qd,Zd=class{constructor(e){this.event_properties=e,g(this,"event_type","OfflineSearch:search-call"),this.event_properties=e}};s(Zd,"OfflineSearchSearchCall");var sa=Zd,ep=class{constructor(e){this.event_properties=e,g(this,"event_type","OfflineSearch:suggest-call"),this.event_properties=e}};s(ep,"OfflineSearchSuggestCall");var ua=ep,hs=s((()=>({promise:Promise.resolve()})),"getVoidPromiseResult"),tp=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,r;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."),hs();let n=null;if(e.client&&"apiKey"in e.client?n=e.client.apiKey:"environment"in e&&(n=Oc[e.environment]),e.client&&"instance"in e.client)this.amplitude=e.client.instance;else{if(n)return this.amplitude=ms.createInstance(),this.amplitude.init(n,void 0,{...Lr,...null!=(null==e?void 0:e.client)&&"configuration"in e.client?null==(r=e.client)?void 0:r.configuration:{}});console.error("ERROR: ampli.load() requires 'environment', 'client.apiKey', or 'client.instance'")}return hs()}identify(e,t,r){if(!this.isInitializedAndEnabled())return hs();e&&(r={...r,user_id:e});let n=new ms.Identify,i=t;if(null!=i)for(let[e,t]of Object.entries(i))n.set(e,t);return this.amplitude.identify(n,r)}track(e,t){return this.isInitializedAndEnabled()?this.amplitude.track(e,void 0,t):hs()}analyticsCategorySelectedCall(e,t){return this.track(new Xi(e),t)}analyticsLocationSelectedCall(e,t){return this.track(new $i(e),t)}blueDotDisableCall(e,t){return this.track(new vl(e),t)}blueDotEnableCall(e,t){return this.track(new yl(e),t)}blueDotOffCall(e,t){return this.track(new bl(e),t)}blueDotOnCall(e,t){return this.track(new wl(e),t)}cameraAnimateCall(e,t){return this.track(new _l(e),t)}cameraCancelAnimationCall(e,t){return this.track(new kl(e),t)}cameraFocusOnCall(e,t){return this.track(new Ml(e),t)}cameraGetSafeAreaInsetsCall(e,t){return this.track(new xl(e),t)}cameraInteractionDisableCall(e,t){return this.track(new El(e),t)}cameraInteractionEnableCall(e,t){return this.track(new Tl(e),t)}cameraSetCall(e,t){return this.track(new Sl(e),t)}cameraSetSafeAreaInsetsCall(e,t){return this.track(new Ol(e),t)}cameraTranslateCall(e,t){return this.track(new Pl(e),t)}flatLabelsAddCall(e,t){return this.track(new Il(e),t)}flatLabelsLabelAllLocationsCall(e,t){return this.track(new Al(e),t)}flatLabelsRemoveCall(e,t){return this.track(new Cl(e),t)}flatLabelsRemoveAllCall(e,t){return this.track(new jl(e),t)}flatLabelsSetAppearanceCall(e,t){return this.track(new Nl(e),t)}floatingLabelsAddCall(e,t){return this.track(new Ll(e),t)}floatingLabelsLabelAllLocationsCall(e,t){return this.track(new Fl(e),t)}floatingLabelsRemoveCall(e,t){return this.track(new Rl(e),t)}floatingLabelsRemoveAllCall(e,t){return this.track(new Dl(e),t)}floatingLabelsResetPriorityCall(e,t){return this.track(new zl(e),t)}floatingLabelsSetAppearanceCall(e,t){return this.track(new Bl(e),t)}floatingLabelsSetPriorityCall(e,t){return this.track(new Vl(e),t)}globalGetVenueCall(e,t){return this.track(new Ki(e),t)}globalGetVenueMvfCall(e,t){return this.track(new gs(e),t)}globalShowVenueCall(e,t){return this.track(new ql(e),t)}journeyClearCall(e,t){return this.track(new Ul(e),t)}journeyDrawCall(e,t){return this.track(new Gl(e),t)}journeySetStepCall(e,t){return this.track(new Wl(e),t)}mappedinGetCollectionItemByIdCall(e,t){return this.track(new Yl(e),t)}mappedinCoordinateAbsoluteDistanceToCall(e,t){return this.track(new Hl(e),t)}mappedinCoordinateNearestNodeCall(e,t){return this.track(new Xl(e),t)}mappedinLocationCloneCall(e,t){return this.track(new Ji(e),t)}mappedinLocationDirectionsToCall(e,t){return this.track(new Qi(e),t)}mappedinLocationDistanceToCall(e,t){return this.track(new Zi(e),t)}mappedinMapCreateCoordinateCall(e,t){return this.track(new $l(e),t)}mappedinMapCreateCoordinateByXyCall(e,t){return this.track(new Kl(e),t)}mappedinMapGetNorthCall(e,t){return this.track(new Jl(e),t)}mappedinNodeDirectionsToCall(e,t){return this.track(new ea(e),t)}mappedinNodeDistanceToCall(e,t){return this.track(new ta(e),t)}mappedinPolygonDirectionsToCall(e,t){return this.track(new na(e),t)}mappedinPolygonDistanceToCall(e,t){return this.track(new ra(e),t)}mappedinVenueMetadataRead(e,t){return this.track(new ia(e),t)}mapViewAddInteractivePolygonCall(e,t){return this.track(new Ql(e),t)}mapViewAddInteractivePolygonsForAllLocationsCall(e,t){return this.track(new Zl(e),t)}mapViewClearPolygonColorCall(e,t){return this.track(new ec(e),t)}mapViewCreateCustomTooltipCall(e,t){return this.track(new tc(e),t)}mapViewCreateMarkerCall(e,t){return this.track(new nc(e),t)}mapViewCreateTooltipCall(e,t){return this.track(new rc(e),t)}mapViewDestroyCall(e,t){return this.track(new ic(e),t)}mapViewDisableImageFlippingForAllPolygonsCall(e,t){return this.track(new ac(e),t)}mapViewDrawPathCall(e,t){return this.track(new oc(e),t)}mapViewEnableImageFlippingForAllLocationsCall(e,t){return this.track(new sc(e),t)}mapViewEnableImageFlippingForPolygonCall(e,t){return this.track(new uc(e),t)}mapViewGetNearestNodeByScreenCoordinatesCall(e,t){return this.track(new lc(e),t)}mapViewGetPolygonAtCoordinateCall(e,t){return this.track(new cc(e),t)}mapViewGetPrimaryLocationForPolygonCall(e,t){return this.track(new dc(e),t)}mapViewLabelAllLocationsCall(e,t){return this.track(new pc(e),t)}mapViewRemoveAllInteractivePolygonsCall(e,t){return this.track(new fc(e),t)}mapViewRemoveAllMarkersCall(e,t){return this.track(new hc(e),t)}mapViewRemoveAllPathsCall(e,t){return this.track(new gc(e),t)}mapViewRemoveAllTooltipsCall(e,t){return this.track(new mc(e),t)}mapViewRemoveInteractivePolygonCall(e,t){return this.track(new vc(e),t)}mapViewRemoveMarkerCall(e,t){return this.track(new yc(e),t)}mapViewRemovePathCall(e,t){return this.track(new bc(e),t)}mapViewRemoveTooltipCall(e,t){return this.track(new wc(e),t)}mapViewSetBackgroundColorCall(e,t){return this.track(new _c(e),t)}mapViewSetHoverColorCall(e,t){return this.track(new kc(e),t)}mapViewSetMapCall(e,t){return this.track(new Mc(e),t)}mapViewSetPolygonColorCall(e,t){return this.track(new xc(e),t)}mapViewSetStateCall(e,t){return this.track(new Ec(e),t)}metricsMapLoadEvent(e,t){return this.track(new Tc(e),t)}offlineSearchAddQueryCall(e,t){return this.track(new aa(e),t)}offlineSearchConstructorCall(e,t){return this.track(new oa(e),t)}offlineSearchSearchCall(e,t){return this.track(new sa(e),t)}offlineSearchSuggestCall(e,t){return this.track(new ua(e),t)}};s(tp,"Ampli");var Sc=tp,la=new Sc;y();var In,br,Jt,qr,cn,Rs,sm,Ds,um,_a,Ep,ka,Tp,Qt,im=an(Tg()),am=an(tm()),om=an(nm()),rm="5.35.0",bx="https://api2.amplitude.com/2/httpapi",wx="https://api2.amplitude.com/batch",_x="__unspecified__",Mp={branch:"main",version:"0",source:"websdk"},yt=class e{constructor(){G(this,Rs),G(this,Ds),G(this,_a),G(this,ka),G(this,Jt,{}),G(this,qr,!1),G(this,cn,void 0),G(this,Qt,s((async e=>{Mx(e.type)&&(window.removeEventListener("visibilitychange",m(this,Qt)),window.removeEventListener("pagehide",m(this,Qt)),window.removeEventListener("beforeunload",m(this,Qt)),window.removeEventListener("unload",m(this,Qt)),await this.sendAllPendingEvents())}),"#handlePageUnload")),null==m(e,br)&&H(e,br,rm),typeof navigator<"u"&&null!=navigator.userAgent&&H(this,cn,new om.UAParser(navigator.userAgent).getResult())}static setContext(t){H(e,In,t)}static setVersion(t){H(e,br,t)}addPendingEvent(t){var r;if(null==m(e,In))return;let n=t.event_type;if(!Ke(this,Ds,um).call(this,t))return;null==t.event_properties&&(t.event_properties={});let i=m(this,Jt)[n];(0,am.default)(t.event_properties,null!=(r=null==i?void 0:i.event_properties)?r:{}),m(this,Jt)[n]=t}async sendAllPendingEvents(){if(null==m(e,In)||Object.keys(m(this,Jt)).length<1)return;if(m(this,qr))return void oe.warn("The current batch of analytics is already sending. Wait until this finishes before trying to send again.");let t=[];for(let e in m(this,Jt)){let r=m(this,Jt)[e],n=Ke(this,_a,Ep).call(this,r);null!=n&&t.push(n)}if(!(t.length<1))try{H(this,qr,!0),200===(await Ke(this,ka,Tp).call(this,wx,t)).status&&H(this,Jt,{})}catch(e){oe.warn("Error sending batch product analytics!",e)}finally{H(this,qr,!1)}}async load(){if(!la.isLoaded){let{promise:e}=la.load({environment:"production",client:{configuration:{trackingOptions:{osName:!0}}}});e.then((()=>{window.addEventListener("pagehide",m(this,Qt)),window.addEventListener("beforeunload",m(this,Qt)),window.addEventListener("unload",m(this,Qt)),window.addEventListener("visibilitychange",m(this,Qt))}))}}async sendEventNow(t){if(null==m(e,In))return;let r=Ke(this,_a,Ep).call(this,t);if(null!=r)try{await Ke(this,ka,Tp).call(this,bx,[r])}catch(e){oe.warn("Error sending single product analytics event!",e)}}};In=new WeakMap,br=new WeakMap,Jt=new WeakMap,qr=new WeakMap,cn=new WeakMap,Rs=new WeakSet,sm=s((function(e){let t=e.event_type;return null!=m(this,Jt)[t]}),"#isEventTypePending"),Ds=new WeakSet,um=s((function(e){if(!Ke(this,Rs,sm).call(this,e))return!0;let t=e.event_type,r=m(this,Jt)[t];return!(0,im.default)(r.event_properties,e.event_properties)}),"#didEventPropertiesChange"),_a=new WeakSet,Ep=s((function(e){var t,r,n,i,o,a,s,l,u,c,d,h,p,f,g,v,y;if(null!=m(yt,In))return null==(null==(t=e.event_properties)?void 0:t.venue)&&oe.warn("Error processing product analytics event! Unspecified venue slug",e),null==Lr.plan&&oe.warn("Error processing product analytics event! Unknown coinfiguration plan",e),{event_type:e.event_type,session_id:null!=(r=la.client.getSessionId())?r:Bs(),device_id:null!=(n=la.client.getDeviceId())?n:zs(),plan:{branch:null!=(o=null==(i=Lr.plan)?void 0:i.branch)?o:Mp.branch,version:null!=(s=null==(a=Lr.plan)?void 0:a.version)?s:Mp.version,source:null!=(u=null==(l=Lr.plan)?void 0:l.source)?u:Mp.source},os_name:null==(c=m(this,cn))?void 0:c.browser.name,os_version:null==(d=m(this,cn))?void 0:d.browser.version,device_manufacturer:null==(h=m(this,cn))?void 0:h.device.vendor,device_model:null==(p=m(this,cn))?void 0:p.device.model,event_properties:{...e.event_properties,context:m(yt,In),sdk_version:m(yt,br),browser_name:null==(f=m(this,cn))?void 0:f.browser.name,browser_version:null==(g=m(this,cn))?void 0:g.browser.version,venue:null!=(y=null==(v=e.event_properties)?void 0:v.venue)?y:_x},time:e.time}}),"#makeBatchFormattedEvent"),ka=new WeakSet,Tp=s((async function(e,t){return await An()(e,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify({api_key:Oc.production,events:t})})}),"#batchSend"),Qt=new WeakMap,s(yt,"ProductAnalytics"),G(yt,In,void 0),G(yt,br,void 0);var xp=yt,kx=new xp,tt=kx;function Mx(e){return"beforeunload"===e||"pagehide"===e||"unload"===e||"hidden"===document.visibilityState}s(Mx,"areWeLeavingThePage");var Gt,Ur,pt,Ea,Ma=class e extends sn{constructor(e,t){super(e),G(this,Gt,void 0),G(this,Ur,void 0),G(this,pt,{}),g(this,"id",""),g(this,"x",0),g(this,"y",0),g(this,"operationHours"),g(this,"externalId"),G(this,Ea,void 0),H(this,Gt,e),H(this,Ur,t);let r=Object.assign({},t);delete r.map,Object.assign(this,r)}get map(){let e=m(this,pt).map;if(typeof e<"u")return e;let t=m(this,Gt).getCollectionItemById("maps",m(this,Ur).map);return m(this,pt).map=t,t}get lat(){var e;let t=m(this,pt).cachedLatLon;if(null!=t)return t.lat;let r=null==(e=m(this,Gt)._mapsById)?void 0:e[this.map.id];if(null==r)throw new Error("Map not found");return m(this,pt).cachedLatLon=r.createCoordinateByXY(this.x,this.y),m(this,pt).cachedLatLon.lat}get lon(){var e;let t=m(this,pt).cachedLatLon;if(null!=t)return t.lon;let r=null==(e=m(this,Gt)._mapsById)?void 0:e[this.map.id];if(null==r)throw new Error("Map not found");return m(this,pt).cachedLatLon=r.createCoordinateByXY(this.x,this.y),m(this,pt).cachedLatLon.lon}get paths(){let e=m(this,pt).paths;if(typeof e<"u")return e;let t=[],r=m(this,Gt)._nodesById,n=m(this,Ea);if(Array.isArray(n))for(let e=0,i=n.length;e<i;++e){let i=r[n[e].node];null!=i&&t.push(i)}return m(this,pt).paths=t,t}set paths(e){H(this,Ea,e)}get locations(){var e,t,r;let n=m(this,pt).locations;if(typeof n<"u")return n;let i=[],o=null!=(r=null==(t=null==(e=bt.instances.get(m(this,Gt)))?void 0:e.locationsByMapId)?void 0:t.get(this.map.id))?r:[],a=this.id;for(let e=0,t=o.length;e<t;++e){let t=o[e],r=t.nodes;if(Array.isArray(r))for(let e=0,n=r.length;e<n;++e)if(r[e].id===a){i.push(t);break}}return m(this,pt).locations=i,i}get polygon(){var e,t,r,n;let i=m(this,pt).polygon;if(typeof i<"u")return i;let o,a=null!=(n=null==(r=null==(e=bt.instances.get(m(this,Gt)))?void 0:e.polygonsByMapId)?void 0:r.get(null==(t=null==this?void 0:this.map)?void 0:t.id))?n:[],s=this.id;for(let e=0,t=a.length;e<t;++e){let t=a[e];t.entrances.map((e=>e.id)).includes(s)&&(o=t)}return m(this,pt).polygon=o,o}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async fetch(t){let r=t.options.things.nodes.slice();t.options.things.maps&&nt(r,"map"),["weight","multiplier","accessible"].forEach((function(e){nt(r,e)}));let n={fields:r,venue:t.options.venue};try{return(await rt(t.options,"node",n)).map((r=>new e(t,r)))}catch(e){return oe.error("Fetch Nodes:",e),[]}}directionsTo(e,t){let r=e instanceof xt,n=m(this,Gt).venue.slug,i=new ea({with_destination_set:r||void 0,venue:n});return tt.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let r=m(this,Gt).venue.slug;return tt.addPendingEvent(new ta({venue:r})),super.distanceTo(e,t)}toJSON(){return m(this,Ur)}};Gt=new WeakMap,Ur=new WeakMap,pt=new WeakMap,Ea=new WeakMap,s(Ma,"MappedinNode");var xa=Ma;y();var dn,Gr,Wt,Sa,Ta=class e extends sn{constructor(e,t){super(e),G(this,dn,void 0),G(this,Gr,void 0),G(this,Wt,{}),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"),G(this,Sa,void 0),H(this,dn,e),H(this,Gr,t);let r=Object.assign({},t);delete r.map,Object.assign(this,r)}get map(){let e=m(this,Wt).map;if(typeof e<"u")return e;let t=m(this,dn).getCollectionItemById("maps",m(this,Gr).map);return m(this,Wt).map=t,t}get locations(){var e,t;let r=m(this,Wt).locations;if(typeof r<"u")return r;let n=[],i=null!=(t=null==(e=bt.instances.get(m(this,dn)))?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],r=t.polygons;if(Array.isArray(r))for(let e=0,i=r.length;e<i;++e)if(r[e].id===o){n.push(t);break}}return m(this,Wt).locations=n,n}get entrances(){let e=m(this,Wt).entrances;if(typeof e<"u")return e;let t=[],r=m(this,Sa),n=m(this,dn)._nodesById;if(Array.isArray(r)){for(let e=0,i=r.length;e<i;++e){let i=n[r[e].id];null!=i&&t.push(i)}return m(this,Wt).entrances=t,t}return[]}set entrances(e){H(this,Sa,e)}get rank(){let e=m(this,Wt).rank;if(typeof e<"u")return e;let{rankings:t}=m(this,dn);if(!t||!t.polygons)return null;let r=t.polygons.find((e=>e.polygonId===this.id));return r?(m(this,Wt).rank={score:r.score,node:r.entranceNodeId},{score:r.score,node:r.entranceNodeId}):(m(this,Wt).rank=null,null)}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async fetch(t){let r=t.options.things.polygons.slice();t.options.things.maps&&nt(r,"map"),t.options.things.nodes&&nt(r,"entrances");let n={fields:r,venue:t.options.venue};try{return(await rt(t.options,"polygon",n)).map((r=>new e(t,r)))}catch(e){return oe.error("Fetch Polygons:",e),[]}}directionsTo(e,t){let r=e instanceof xt,n=m(this,dn).venue.slug,i=new na({with_destination_set:r||void 0,venue:n});return tt.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let r=m(this,dn).venue.slug;return tt.addPendingEvent(new ra({venue:r})),super.distanceTo(e,t)}toJSON(){return m(this,Gr)}};dn=new WeakMap,Gr=new WeakMap,Wt=new WeakMap,Sa=new WeakMap,s(Ta,"MappedinPolygon");var wr=Ta;y();var xx=0,Ex="9999-12-31T00:00:00.000Z";function Tx(e,t,r=new Date){if(!e.states)return;let n=r||new Date,i=e.states.find((e=>{let t=new Date(e.start||xx),r=new Date(e.end||Ex);return t<n&&r>n}));return i?t.find((e=>e.value===i.type)):void 0}s(Tx,"getCurrentLocationState");var Ft,Kn,Rt,Oa,Pa,Ia,lm=["name","description","shortName","tags"],_r=class e extends sn{constructor(e,t){super(e),G(this,Ft,void 0),G(this,Kn,void 0),G(this,Rt,{}),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"),G(this,Oa,void 0),G(this,Pa,[]),G(this,Ia,void 0),H(this,Ft,e),H(this,Kn,t);let r=Object.assign({},t);delete r.categories,Object.assign(this,r)}get polygons(){let e=m(this,Rt).polygons;if(typeof e<"u")return e;let t=[],r=m(this,Oa),n=m(this,Ft)._polygonsById;if(Array.isArray(r))for(let e=0,i=r.length;e<i;++e){let i=n[r[e].id];null!=i&&t.push(i)}return m(this,Rt).polygons=t,t}set polygons(e){H(this,Oa,e)}get nodes(){let e=m(this,Rt).nodes;if(typeof e<"u")return e;let t=[],r=m(this,Pa),n=m(this,Ft)._nodesById;if(r&&r.length)for(let e=0,i=r.length;e<i;++e){let i=n[r[e].node];null!=i&&t.push(i)}return m(this,Rt).nodes=t,t}set nodes(e){H(this,Pa,e)}get parent(){let e=m(this,Rt).parent;if(typeof e<"u")return e;let t,r=m(this,Ft)._locationsById,n=m(this,Ia);return void 0!==n&&(t=r[n]),m(this,Rt).parent=t,t}set parent(e){H(this,Ia,e)}get categories(){let e=m(this,Rt).categories;if(typeof e<"u")return e;let t=[];return m(this,Kn).categories.forEach((e=>{let r=m(this,Ft).getCollectionItemById("categories",e);r&&t.push(r)})),m(this,Rt).categories=t,t}get state(){return Tx(this,m(this,Ft).locationStates)}clone(){let t=m(this,Ft).venue.slug;return tt.addPendingEvent(new Ji({venue:t})),new e(m(this,Ft),m(this,Kn))}get nodeOperationHours(){let e=m(this,Rt).nodeOperationHours;if(typeof e<"u")return e;if(null==this.nodes)return{};let t=m(this,Kn).nodes.reduce(((e,t)=>(null!=t.operationHours&&(e[t.node]=t.operationHours),e)),{});return m(this,Rt).nodeOperationHours=t,t}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async updateInPlace(t,r){let n,i=r||await e.fetch(t);for(let e=0;e<i.length;e++){n=t.locations[e];for(let t of lm)n[t]=i[e][t]}}static async fetch(t){let r=t.options.things.locations.slice();t.options.things.categories&&nt(r,"categories"),t.options.things.nodes&&nt(r,"nodes"),t.options.things.polygons&&nt(r,"polygons"),t.options.things.locationStates&&nt(r,"states");let n={fields:r,venue:t.options.venue};try{let r=await rt(t.options,"location",n);return t.options.includeHidden||(r=r.filter((e=>!e.hidden))),r.map((r=>new e(t,r)))}catch(e){return oe.error("Fetch Locations:",e),[]}}directionsTo(e,t){let r=e instanceof xt,n=m(this,Ft).venue.slug,i=new Qi({with_destination_set:r||void 0,venue:n});return tt.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let r=m(this,Ft).venue.slug;return tt.addPendingEvent(new Zi({venue:r})),super.distanceTo(e,t)}toJSON(){let e={...m(this,Kn)};for(let t of lm)e[t]=this[t];return delete e.color,e}};Ft=new WeakMap,Kn=new WeakMap,Rt=new WeakMap,Oa=new WeakMap,Pa=new WeakMap,Ia=new WeakMap,s(_r,"MappedinLocation");var Cn=_r;y();var Yr,kr,Aa,cm=["name"],Wr=class e{constructor(e,t){G(this,Yr,void 0),G(this,kr,{}),G(this,Aa,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=t.id,H(this,Aa,t),H(this,Yr,e),Object.assign(this,t)}get locations(){var e;let t=m(this,kr).locations;if(typeof t<"u")return t;let r=[],{locations:n}=m(this,Yr),{id:i}=this;for(let t=0,o=n.length;t<o;++t){let o=n[t],a=o.categories;if(Array.isArray(a))for(let t=0,n=a.length;t<n;++t)if((null==(e=a[t])?void 0:e.id)===i){r.push(o);break}}return m(this,kr).locations=r,r}get children(){var e;let t=m(this,kr).children;if(typeof t<"u")return t;let{categories:r}=m(this,Yr),{id:n}=this,i=[];for(let t=0;t<r.length;t++)n&&null!=(e=r[t].parents)&&e.includes(n)&&i.push(r[t]);return m(this,kr).children=i,i}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async updateInPlace(t,r){let n=r||await e.fetch(t);for(let e=0;e<n.length;e++)for(let r of cm)t.categories[e][r]=n[e][r]}static async fetch(t){let r={fields:t.options.things.categories,venue:t.options.venue};try{return(await rt(t.options,"category",r)).map((r=>new e(t,r)))}catch(e){return oe.error("Fetch Categories:",e),[]}}toJSON(){let e={...m(this,Aa)};for(let t of cm)e[t]=this[t];return e}};Yr=new WeakMap,kr=new WeakMap,Aa=new WeakMap,s(Wr,"MappedinCategory");var Mr=Wr;y();var Ca,jn,Op=class{constructor(e,t){G(this,Ca,void 0),G(this,jn,void 0),g(this,"distance",0),g(this,"path",[]),g(this,"instructions",[]),H(this,jn,e),H(this,Ca,t),this.distance=t.distance,this.instructions=t.instructions.map((e=>{var t,r,n,i,o,a,s,l,u,c,d,h;let p={...e,action:{...e.action},atLocation:null!=(t=e.atLocation)&&t.id?null==(n=null==(r=m(this,jn))?void 0:r._vortexesById)?void 0:n[e.atLocation.id]:void 0,node:null!=(i=e.node)&&i.id?null==(a=null==(o=m(this,jn))?void 0:o._nodesById)?void 0:a[e.node.id]:void 0};if("TakeVortex"===(null==(s=p.action)?void 0:s.type)||"ExitVortex"===(null==(l=p.action)?void 0:l.type)){let e=null==(c=m(this,jn)._mapsById)?void 0:c[null==(u=p.action)?void 0:u.fromMap.id],t=null==(h=m(this,jn)._mapsById)?void 0:h[null==(d=p.action)?void 0:d.toMap.id];e&&t&&(p.action.fromMap=e,p.action.toMap=t)}return p})),this.path=t.path.reduce(((e,{id:t})=>{var r,n;let i=null==(n=null==(r=m(this,jn))?void 0:r._nodesById)?void 0:n[t];return i&&e.push(i),e}),[])}toJSON(){return m(this,Ca)}};Ca=new WeakMap,jn=new WeakMap,s(Op,"MappedinDirections");var sr=Op;y();var Pp=class{constructor(e){g(this,"destinations",[]),this.destinations=e}};s(Pp,"MappedinDestinationSet");var xt=Pp;y();var La,ja=class e{constructor(e){g(this,"id",""),G(this,La,void 0),g(this,"accessible"),g(this,"name"),g(this,"type"),g(this,"weight"),g(this,"multiplier"),g(this,"nodes"),g(this,"filterFlags"),H(this,La,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let r=t.options.things.vortexes.slice();["name","type","accessible","weight","multiplier","nodes"].forEach((function(e){nt(r,e)}));let n={fields:r,venue:t.options.venue};try{return(await rt(t.options,"vortex",n)).map((t=>new e(t)))}catch(e){return oe.error("Fetch Vortexes:",e),[]}}toJSON(){return m(this,La)}};La=new WeakMap,s(ja,"MappedinVortex");var Na=ja;y();var Ra,Da,za,Hr,Fa=class e{constructor(e,t){G(this,Ra,void 0),G(this,Da,void 0),G(this,za,void 0),G(this,Hr,{}),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}),H(this,Da,e),H(this,Ra,t),Object.assign(this,t)}get metadata(){return tt.addPendingEvent(new ia({venue:this.slug})),m(this,za)}set metadata(e){H(this,za,e)}static hydrate(t,r){return new e(r,t)}static async fetch(t){let r={fields:t.options.things.venue,slug:t.options.venue,limit:1};try{let n=await rt(t.options,"venue",r);return new e(t,Array.isArray(n)?n[0]:n)}catch(e){return oe.error("Fetch Venue:",e),{}}}get isMultiBuilding(){if(null==m(this,Hr).isMultiBuilding){let e=m(this,Da).maps,t=e.reduce(((e,t)=>e.add(t.elevation)),new Set),r=e.length!==t.size;m(this,Hr).isMultiBuilding=r}return m(this,Hr).isMultiBuilding}toJSON(){return m(this,Ra)}};Ra=new WeakMap,Da=new WeakMap,za=new WeakMap,Hr=new WeakMap,s(Fa,"MappedinVenue");var Xr=Fa;y();var Va,Ba=class e{constructor(e){g(this,"id",""),G(this,Va,void 0),H(this,Va,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let r={fields:t.options.things.themes.slice(),venue:t.options.venue};try{return(await rt(t.options,"apollo-theme",r)).map((t=>new e(t)))}catch(e){return oe.error("Fetch Theme:",e),[]}}toJSON(){return m(this,Va)}};Va=new WeakMap,s(Ba,"MappedinTheme");var Vs=Ba;y();var Ga,qa=class e{constructor(e){G(this,Ga,void 0),g(this,"polygons",[]),H(this,Ga,e),Object.assign(this,e)}static hydrate(t){return new e(t)}static async fetch(t){try{let r=await $r({...t.options,secure:!1},"smart-labels/polygon-label-ranking",{venue:t.options.venue},!0);return new e(r)}catch(e){return oe.error("Fetch Rankings:",e),null}}toJSON(){return m(this,Ga)}};Ga=new WeakMap,s(qa,"MappedinRankings");var Ua=qa;y(),y();var Ya,Jr,Ha,dm=["name","description"],Kr=class e{constructor(e,t){G(this,Ya,void 0),G(this,Jr,void 0),G(this,Ha,{}),g(this,"id",""),g(this,"type",""),g(this,"name",""),g(this,"description"),g(this,"image"),g(this,"startDate"),g(this,"endDate"),g(this,"showDate"),H(this,Jr,t),H(this,Ya,e),Object.assign(this,t)}location(){let e=m(this,Ha).location;if(typeof e<"u")return e;let t,r=m(this,Ya)._locationsById,n=m(this,Jr).location;if(null!=n){let e=r[n];null!=e&&(t=e)}return m(this,Ha).location=t,t}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async updateInPlace(t,r){let n=r||await e.fetch(t);for(let e=0;e<n.length;e++)for(let r of dm)t.events[e][r]=n[e][r]}static async fetch(t){let r=t.options.things.events.slice();t.options.things.locations&&nt(r,"location");let n={fields:r,venue:t.options.venue,activeAtOrAfter:Date.now()};try{return(await rt(t.options,"event",n)).map((r=>new e(t,r)))}catch(e){return oe.error("Fetch Events:",e),[]}}toJSON(){let e={...m(this,Jr)};for(let t of dm)e[t]=this[t];return e}};Ya=new WeakMap,Jr=new WeakMap,Ha=new WeakMap,s(Kr,"MappedinEvent");var Wa=Kr;y();var $a,pm=["name"],Qr=class e{constructor(e){G(this,$a,void 0),g(this,"id",""),g(this,"name",""),g(this,"value",""),H(this,$a,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async updateInPlace(t,r){let n=r||await e.fetch(t);for(let e=0;e<n.length;e++)for(let r of pm)t.locationStates[e][r]=n[e][r]}static async fetch(t){let r={fields:t.options.things.locationStates.slice(),venue:t.options.venue};try{return(await rt(t.options,"location-state",r)).map((t=>new e(t)))}catch(e){return oe.error("Fetch Location States:",e),[]}}toJSON(){let e={...m(this,$a)};for(let t of pm)e[t]=this[t];return e}};$a=new WeakMap,s(Qr,"MappedinLocationState");var Xa=Qr;y(),y(),y();var fm=" ",wt=class e{static get separator(){return fm}static set separator(e){fm=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 r=null;switch(t.length){case 3:r=t[0]/1+t[1]/60+t[2]/3600;break;case 2:r=t[0]/1+t[1]/60;break;case 1:r=t[0];break;default:return NaN}return/^-|[WS]$/i.test(e.trim())&&(r=-r),Number(r)}static toDms(t,r="d",n){if(isNaN(t)||"string"==typeof t&&""==t.trim()||"boolean"==typeof t||t==1/0||null==t)return null;if(void 0===n)switch(r){case"d":case"deg":n=4;break;case"dm":case"deg+min":n=2;break;case"dms":case"deg+min+sec":n=0;break;default:r="d",n=4}t=Math.abs(t);let i=null,o=null,a=null,s=null;switch(r){default:case"d":case"deg":o=t.toFixed(n),o<100&&(o="0"+o),o<10&&(o="0"+o),i=o+"°";break;case"dm":case"deg+min":o=Math.floor(t),a=(60*t%60).toFixed(n),60==a&&(a=(0).toFixed(n),o++),o=("000"+o).slice(-3),a<10&&(a="0"+a),i=o+"°"+e.separator+a+"′";break;case"dms":case"deg+min+sec":o=Math.floor(t),a=Math.floor(3600*t/60)%60,s=(3600*t%60).toFixed(n),60==s&&(s=(0).toFixed(n),a++),60==a&&(a=0,o++),o=("000"+o).slice(-3),a=("00"+a).slice(-2),s<10&&(s="0"+s),i=o+"°"+e.separator+a+"′"+e.separator+s+"″"}return i}static toLat(t,r,n){let i=e.toDms(e.wrap90(t),r,n);return null===i?"–":i.slice(1)+e.separator+(t<0?"S":"N")}static toLon(t,r,n){let i=e.toDms(e.wrap180(t),r,n);return null===i?"–":i+e.separator+(t<0?"W":"E")}static toBrng(t,r,n){let i=e.toDms(e.wrap360(t),r,n);return null===i?"–":i.replace("360","0")}static fromLocale(e){let t=123456.789.toLocaleString(),r={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(r.thousands,"⁜").replace(r.decimal,".").replace("⁜",",")}static toLocale(e){let t=123456.789.toLocaleString(),r={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(/,([0-9])/,"⁜$1").replace(".",r.decimal).replace("⁜",r.thousands)}static compassPoint(t,r=3){if(![1,2,3].includes(Number(r)))throw new RangeError("invalid precision ‘".concat(r,"’"));t=e.wrap360(t);let n=4*2**(r-1);return["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.round(t*n/360)%n*16/n]}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(wt,"Dms");var Ip=wt;Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};var De=Ip,Ze=Math.PI,Ce=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=De.wrap90(Number(e)),this._lon=De.wrap180(Number(t))}get lat(){return this._lat}get latitude(){return this._lat}set lat(e){if(this._lat=isNaN(e)?De.wrap90(De.parse(e)):De.wrap90(Number(e)),isNaN(this._lat))throw new TypeError("invalid lat ‘".concat(e,"’"))}set latitude(e){if(this._lat=isNaN(e)?De.wrap90(De.parse(e)):De.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)?De.wrap180(De.parse(e)):De.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lon ‘".concat(e,"’"))}set lng(e){if(this._lon=isNaN(e)?De.wrap180(De.parse(e)):De.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lng ‘".concat(e,"’"))}set longitude(e){if(this._lon=isNaN(e)?De.wrap180(De.parse(e)):De.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 r,n;if(2==t.length&&([r,n]=t,r=De.wrap90(De.parse(r)),n=De.wrap180(De.parse(n)),isNaN(r)||isNaN(n)))throw new TypeError("invalid point ‘".concat(t.toString(),"’"));if(1==t.length&&"string"==typeof t[0]&&([r,n]=t[0].split(","),r=De.wrap90(De.parse(r)),n=De.wrap180(De.parse(n)),isNaN(r)||isNaN(n)))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)?[n,r]=e.coordinates:(null!=e.latitude&&(r=e.latitude),null!=e.lat&&(r=e.lat),null!=e.longitude&&(n=e.longitude),null!=e.lng&&(n=e.lng),null!=e.lon&&(n=e.lon),r=De.wrap90(De.parse(r)),n=De.wrap180(De.parse(n))),isNaN(r)||isNaN(n))throw new TypeError("invalid point ‘".concat(JSON.stringify(t[0]),"’"))}if(isNaN(r)||isNaN(n))throw new TypeError("invalid point ‘".concat(t.toString(),"’"));return new e(r,n)}distanceTo(t,r=6371e3){if(t instanceof e||(t=e.parse(t)),isNaN(r))throw new TypeError("invalid radius ‘".concat(r,"’"));let n=r,i=this.lat.toRadians(),o=this.lon.toRadians(),a=t.lat.toRadians(),s=a-i,l=t.lon.toRadians()-o,u=Math.sin(s/2)*Math.sin(s/2)+Math.cos(i)*Math.cos(a)*Math.sin(l/2)*Math.sin(l/2);return n*(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 r=this.lat.toRadians(),n=t.lat.toRadians(),i=(t.lon-this.lon).toRadians(),o=Math.cos(r)*Math.sin(n)-Math.sin(r)*Math.cos(n)*Math.cos(i),a=Math.sin(i)*Math.cos(n),s=Math.atan2(a,o).toDegrees();return De.wrap360(s)}finalBearingTo(t){t instanceof e||(t=e.parse(t));let r=t.initialBearingTo(this)+180;return De.wrap360(r)}midpointTo(t){t instanceof e||(t=e.parse(t));let r=this.lat.toRadians(),n=this.lon.toRadians(),i=t.lat.toRadians(),o=(t.lon-this.lon).toRadians(),a=Math.cos(r),s=0,l=Math.sin(r),u={x:a+Math.cos(i)*Math.cos(o),y:s+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)),d=n+Math.atan2(u.y,u.x),h=c.toDegrees(),p=d.toDegrees();return new e(h,p)}intermediatePointTo(t,r){if(t instanceof e||(t=e.parse(t)),this.equals(t))return new e(this.lat,this.lon);let n=this.lat.toRadians(),i=this.lon.toRadians(),o=t.lat.toRadians(),a=t.lon.toRadians(),s=o-n,l=a-i,u=Math.sin(s/2)*Math.sin(s/2)+Math.cos(n)*Math.cos(o)*Math.sin(l/2)*Math.sin(l/2),c=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),d=Math.sin((1-r)*c)/Math.sin(c),h=Math.sin(r*c)/Math.sin(c),p=d*Math.cos(n)*Math.cos(i)+h*Math.cos(o)*Math.cos(a),f=d*Math.cos(n)*Math.sin(i)+h*Math.cos(o)*Math.sin(a),g=d*Math.sin(n)+h*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,r,n=6371e3){let i=t/n,o=Number(r).toRadians(),a=this.lat.toRadians(),s=this.lon.toRadians(),l=Math.sin(a)*Math.cos(i)+Math.cos(a)*Math.sin(i)*Math.cos(o),u=Math.asin(l),c=Math.sin(o)*Math.sin(i)*Math.cos(a),d=Math.cos(i)-Math.sin(a)*l,h=s+Math.atan2(c,d),p=u.toDegrees(),f=h.toDegrees();return new e(p,f)}static intersection(t,r,n,i){if(t instanceof e||(t=e.parse(t)),n instanceof e||(n=e.parse(n)),isNaN(r))throw new TypeError("invalid brng1 ‘".concat(r,"’"));if(isNaN(i))throw new TypeError("invalid brng2 ‘".concat(i,"’"));let o=t.lat.toRadians(),a=t.lon.toRadians(),s=n.lat.toRadians(),l=n.lon.toRadians(),u=Number(r).toRadians(),c=Number(i).toRadians(),d=s-o,h=l-a,p=2*Math.asin(Math.sqrt(Math.sin(d/2)*Math.sin(d/2)+Math.cos(o)*Math.cos(s)*Math.sin(h/2)*Math.sin(h/2)));if(Math.abs(p)<Number.EPSILON)return new e(t.lat,t.lon);let f=(Math.sin(s)-Math.sin(o)*Math.cos(p))/(Math.sin(p)*Math.cos(o)),g=(Math.sin(o)-Math.sin(s)*Math.cos(p))/(Math.sin(p)*Math.cos(s)),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-a)>0?v:2*Ze-v),b=(Math.sin(l-a)>0?2*Ze-y:y)-c;if(0==Math.sin(m)&&0==Math.sin(b)||Math.sin(m)*Math.sin(b)<0)return null;let _=-Math.cos(m)*Math.cos(b)+Math.sin(m)*Math.sin(b)*Math.cos(p),w=Math.atan2(Math.sin(p)*Math.sin(m)*Math.sin(b),Math.cos(b)+Math.cos(m)*_),M=Math.asin(Math.min(Math.max(Math.sin(o)*Math.cos(w)+Math.cos(o)*Math.sin(w)*Math.cos(u),-1),1)),x=a+Math.atan2(Math.sin(u)*Math.sin(w)*Math.cos(o),Math.cos(w)-Math.sin(o)*Math.sin(M)),E=M.toDegrees(),S=x.toDegrees();return new e(E,S)}crossTrackDistanceTo(t,r,n=6371e3){t instanceof e||(t=e.parse(t)),r instanceof e||(r=e.parse(r));let i=n;if(this.equals(t))return 0;let o=t.distanceTo(this,i)/i,a=t.initialBearingTo(this).toRadians(),s=t.initialBearingTo(r).toRadians();return Math.asin(Math.sin(o)*Math.sin(a-s))*i}alongTrackDistanceTo(t,r,n=6371e3){t instanceof e||(t=e.parse(t)),r instanceof e||(r=e.parse(r));let i=n;if(this.equals(t))return 0;let o=t.distanceTo(this,i)/i,a=t.initialBearingTo(this).toRadians(),s=t.initialBearingTo(r).toRadians(),l=Math.asin(Math.sin(o)*Math.sin(a-s));return Math.acos(Math.cos(o)/Math.abs(Math.cos(l)))*Math.sign(Math.cos(s-a))*i}maxLatitude(e){let t=Number(e).toRadians(),r=this.lat.toRadians();return Math.acos(Math.abs(Math.sin(t)*Math.cos(r))).toDegrees()}static crossingParallels(e,t,r){if(e.equals(t))return null;let n=Number(r).toRadians(),i=e.lat.toRadians(),o=e.lon.toRadians(),a=t.lat.toRadians(),s=t.lon.toRadians()-o,l=Math.sin(i)*Math.cos(a)*Math.cos(n)*Math.sin(s),u=Math.sin(i)*Math.cos(a)*Math.cos(n)*Math.cos(s)-Math.cos(i)*Math.sin(a)*Math.cos(n),c=Math.cos(i)*Math.cos(a)*Math.sin(n)*Math.sin(s);if(c*c>l*l+u*u)return null;let d=Math.atan2(-u,l),h=Math.acos(c/Math.sqrt(l*l+u*u)),p=o+d+h,f=(o+d-h).toDegrees(),g=p.toDegrees();return{lon1:De.wrap180(f),lon2:De.wrap180(g)}}rhumbDistanceTo(t,r=6371e3){t instanceof e||(t=e.parse(t));let n=r,i=this.lat.toRadians(),o=t.lat.toRadians(),a=o-i,s=Math.abs(t.lon-this.lon).toRadians();Math.abs(s)>Ze&&(s=s>0?-(2*Ze-s):2*Ze+s);let l=Math.log(Math.tan(o/2+Ze/4)/Math.tan(i/2+Ze/4)),u=Math.abs(l)>1e-11?a/l:Math.cos(i);return Math.sqrt(a*a+u*u*s*s)*n}rhumbBearingTo(t){if(t instanceof e||(t=e.parse(t)),this.equals(t))return NaN;let r=this.lat.toRadians(),n=t.lat.toRadians(),i=(t.lon-this.lon).toRadians();Math.abs(i)>Ze&&(i=i>0?-(2*Ze-i):2*Ze+i);let o=Math.log(Math.tan(n/2+Ze/4)/Math.tan(r/2+Ze/4)),a=Math.atan2(i,o).toDegrees();return De.wrap360(a)}rhumbDestinationPoint(t,r,n=6371e3){let i=this.lat.toRadians(),o=this.lon.toRadians(),a=Number(r).toRadians(),s=t/n,l=s*Math.cos(a),u=i+l;Math.abs(u)>Ze/2&&(u=u>0?Ze-u:-Ze-u);let c=Math.log(Math.tan(u/2+Ze/4)/Math.tan(i/2+Ze/4)),d=Math.abs(c)>1e-11?l/c:Math.cos(i),h=o+s*Math.sin(a)/d,p=u.toDegrees(),f=h.toDegrees();return new e(p,f)}rhumbMidpointTo(t){t instanceof e||(t=e.parse(t));let r=this.lat.toRadians(),n=this.lon.toRadians(),i=t.lat.toRadians(),o=t.lon.toRadians();Math.abs(o-n)>Ze&&(n+=2*Ze);let a=(r+i)/2,s=Math.tan(Ze/4+r/2),l=Math.tan(Ze/4+i/2),u=Math.tan(Ze/4+a/2),c=((o-n)*Math.log(u)+n*Math.log(l)-o*Math.log(s))/Math.log(l/s);isFinite(c)||(c=(n+o)/2);let d=a.toDegrees(),h=c.toDegrees();return new e(d,h)}static areaOf(e,t=6371e3){let r=t,n=e[0].equals(e[e.length-1]);n||e.push(e[0]);let i=e.length-1,o=0;for(let t=0;t<i;t++){let r=e[t].lat.toRadians(),n=e[t+1].lat.toRadians(),i=(e[t+1].lon-e[t].lon).toRadians();o+=2*Math.atan2(Math.tan(i/2)*(Math.tan(r/2)+Math.tan(n/2)),1+Math.tan(r/2)*Math.tan(n/2))}s(e)&&(o=Math.abs(o)-2*Ze);let a=Math.abs(o*r*r);return n||e.pop(),a;function s(e){let t=0,r=e[0].initialBearingTo(e[1]);for(let n=0;n<e.length-1;n++){let i=e[n].initialBearingTo(e[n+1]),o=e[n].finalBearingTo(e[n+1]);t+=(i-r+540)%360-180,t+=(o-i+540)%360-180,r=o}return t+=(e[0].initialBearingTo(e[1])-r+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 r=De.toLat(this.lat,e,t),n=De.toLon(this.lon,e,t);return"".concat(r,", ").concat(n)}};s(Ce,"LatLonSpherical");var pn,Jn,Ja,at=Ce,hm=["name","shortName"],Zr=class e{constructor(e,t){G(this,pn,void 0),G(this,Jn,{}),G(this,Ja,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),H(this,pn,e),H(this,Ja,t),Object.assign(this,t),this._scale=gm(this),this.scale=this.x_scale||1/this._scale}get polygons(){var e,t,r;return null!=(r=null==(t=null==(e=bt.instances.get(m(this,pn)))?void 0:e.polygonsByMapId)?void 0:t.get(this.id))?r:[]}get locations(){var e,t,r;return null!=(r=null==(t=null==(e=bt.instances.get(m(this,pn)))?void 0:e.locationsByMapId)?void 0:t.get(this.id))?r:[]}get nodes(){var e,t,r;return null!=(r=null==(t=null==(e=bt.instances.get(m(this,pn)))?void 0:e.nodesByMapId)?void 0:t.get(this.id))?r:[]}get mapGroup(){let e=m(this,Jn).mapGroup;if(typeof e<"u")return e;let t=this.group,r=t&&m(this,pn)._mapGroupsById[t]||null;return m(this,Jn).mapGroup=r,r}createCoordinateByXY(e,t){return new xr({x:e,y:t,map:this,mappedin:m(this,pn)})}createCoordinate(e,t){return new xr({lat:e,lon:t,map:this,mappedin:m(this,pn)})}getNorth(){let e;try{let t=this.georeference[0],r=this.georeference[2],n=new at(t.target.x,t.target.y),i=new at(r.target.x,r.target.y);e=-((n.finalBearingTo(i)+0)*Math.PI/180-Math.atan2(r.control.y-t.control.y,r.control.x-t.control.x)-Math.PI/2)}catch(t){e=0,oe.warn(t),oe.warn("Couldn't georeference ".concat(this.name||this.shortName||this.id,". Probably not enough geocoordinates."))}return e}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async updateInPlace(t,r){let n=r||await e.fetch(t);for(let e=0;e<n.length;e++)for(let r of hm)t.maps[e][r]=n[e][r]}static async fetch(t){var r;let n=t.options.things.maps.slice();t.options.perspective&&nt(n,"perspectives"),t.options.things.mapGroups&&nt(n,"group"),nt(n,"elevation"),nt(n,"x_scale"),nt(n,"scale"),nt(n,"georeference");let i={fields:n,perspective:t.options.perspective,venue:t.options.venue};try{let a=await rt(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,n.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!=(r=o.scene)&&r.polygons&&"string"==typeof o.scene.polygons){let e=await An()(o.scene.polygons);o.scene.polygons=await e.json()}a[i]=new e(t,o)}return a}catch(e){return oe.error("Fetch Maps:",e),[]}}get center(){if(m(this,Jn).center)return m(this,Jn).center;let[e,t]=[this.georeference[0].control.x,this.georeference[0].control.y],[r,n]=[this.georeference[2].control.x,this.georeference[2].control.y],{lat:i,lon:o}=this.createCoordinateByXY(e,t),{lat:a,lon:s}=this.createCoordinateByXY(r,n),l=new at(i,o),u=new at(a,s),c=l.midPointTo(u);return m(this,Jn).center=c,c}toJSON(){let e={...m(this,Ja)};for(let t of hm)e[t]=this[t];return e}};pn=new WeakMap,Jn=new WeakMap,Ja=new WeakMap,s(Zr,"MappedinMap");var Ka=Zr;y();var Qa,Ap,Za,Cp,Zt,ei,qs,mm,Us,vm,fn,hn,gn,mn,jp=class{constructor(e){G(this,Qa),G(this,Za),G(this,qs),G(this,Us),g(this,"map"),G(this,Zt,{}),G(this,ei,void 0),G(this,fn,void 0),G(this,hn,void 0),G(this,gn,void 0),G(this,mn,void 0);let{map:t,mappedin:r}=e;null!=e.lat&&null!=e.lon&&(H(this,fn,e.lat),H(this,hn,e.lon)),null!=e.x&&null!=e.y&&(H(this,gn,e.x),H(this,mn,e.y)),this.map=t,H(this,ei,r)}get x(){return Ke(this,Za,Cp).call(this,"x")}get y(){return Ke(this,Za,Cp).call(this,"y")}get lat(){return Ke(this,Qa,Ap).call(this,"lat")}get lon(){return Ke(this,Qa,Ap).call(this,"lon")}absoluteDistanceTo(e){return ym([e.lat,e.lon],[this.lat,this.lon])}get nearestNode(){let e=m(this,Zt).nearestNode;if(typeof e<"u")return e;let t=bt.instances.get(m(this,ei)).findNearestNodeOnMap(this.map.id,this);return m(this,Zt).nearestNode=t,t}nodesInRadius(e){if(e<=0)return oe.error("Radius must be greater than 0."),[];let t=m(this,Zt).radius,r=m(this,Zt).nodesInRadius;if(t&&r&&m(this,Zt).radius===e)return m(this,Zt).nodesInRadius;let n=bt.instances.get(m(this,ei)).findNodeWithinRadiusOnMap(this.map.id,this,e*this.map._scale);return m(this,Zt).radius=e,m(this,Zt).nodesInRadius=n,n}toJSON(){return{x:this.x,y:this.y,map:this.map,lat:this.lat,lon:this.lon}}};Qa=new WeakSet,Ap=s((function(e){if(typeof m(this,fn)<"u"&&typeof m(this,hn)<"u")return m(this,"lat"===e?fn:hn);if(typeof m(this,gn)<"u"&&typeof m(this,mn)<"u"){let[t,r]=Ke(this,Us,vm).call(this,m(this,gn),m(this,mn));return H(this,fn,t),H(this,hn,r),m(this,"lat"===e?fn:hn)}throw Error("MappedinCoordinate is missing x and y")}),"#getLatLon"),Za=new WeakSet,Cp=s((function(e){if(m(this,gn)&&m(this,mn))return m(this,"x"===e?gn:mn);if(null!=m(this,fn)&&null!=m(this,hn)){let[t,r]=Ke(this,qs,mm).call(this,m(this,fn),m(this,hn));return H(this,gn,t),H(this,mn,r),m(this,"x"===e?gn:mn)}throw Error("MappedinCoordinate is missing lat and lon")}),"#getXY"),Zt=new WeakMap,ei=new WeakMap,qs=new WeakSet,mm=s((function(e,t){let r=this.map.georeference[0],n=new at(r.target.x,r.target.y),i=new at(e,t),o=n.distanceTo(i),a=(n.finalBearingTo(i)+360)%360*Math.PI/180||0,s=o*(1/this.map.scale),l=a+this.map.getNorth(),u=Math.sin(l)*s,c=Math.cos(l)*s;return[r.control.x+u,r.control.y-c]}),"#latLonToXY"),Us=new WeakSet,vm=s((function(e,t){let r,n=this.map.georeference[0],i=new at(n.target.x,n.target.y),o=e-n.control.x,a=n.control.y-t,s=Math.atan2(o,a);r=0===o&&0===a?0:0===o?a:o/Math.sin(s);let l=s-this.map.getNorth(),u=r/this.map._scale,c=i.destinationPoint(u,180*l/Math.PI);return[c.lat,c.lon]}),"#xyToLatLon"),fn=new WeakMap,hn=new WeakMap,gn=new WeakMap,mn=new WeakMap,s(jp,"MappedinCoordinate");var xr=jp;y();var to,ni,no,bm=["name"],ti=class e{constructor(e,t){G(this,to,void 0),G(this,ni,void 0),G(this,no,{}),g(this,"id",""),g(this,"name",""),H(this,ni,t),H(this,to,e),Object.assign(this,t)}get maps(){let e=m(this,no).maps;if(typeof e<"u")return e;let t=[],{maps:r}=m(this,to),{id:n}=m(this,ni);for(let e=0,i=r.length;e<i;++e){let i=r[e];i.group===n&&t.push(i)}return m(this,no).maps=t,t}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async updateInPlace(t,r){let n=r||await e.fetch(t);for(let e=0;e<n.length;e++)for(let r of bm)t.mapGroups[e][r]=n[e][r]}static async fetch(t){let r={fields:t.options.things.mapGroups.slice(),venue:t.options.venue};try{return(await rt(t.options,"map-group",r)).map((r=>new e(t,r)))}catch(e){return oe.error("Fetch Map Groups:",e),[]}}toJSON(){let e={...m(this,ni)};for(let t of bm)e[t]=this[t];return e}};to=new WeakMap,ni=new WeakMap,no=new WeakMap,s(ti,"MappedinMapGroup");var eo=ti;y();var xm=an(wm());y(),y();var Er,en,tn,Np=[0,4,6,8,10],Nn=s((()=>{let e=new Array(16).fill(0),t=4294967296*Math.random();for(let r=0;r<e.length;r++)r>0&&!(3&r)&&(t=4294967296*Math.random()),e[r]=t>>>((3&r)<<3)&255;let r=e.map((e=>e.toString(16).padStart(2,"0")));return r[6]="4"+r[6][1],r[8]=["8","9","a","b"].includes(r[7][0])?r[7]:"a"+r[7][1],Np.map(((e,t)=>r.slice(e,t===Np.length-1?void 0:Np[t+1]).join(""))).join("-")}),"randomId"),_m="mi-session-data",km="mi-local-data",ro=class e{constructor(){G(this,en,void 0),G(this,tn,void 0);try{let e=sessionStorage.getItem(_m);H(this,en,e?JSON.parse(e):{id:Nn()})}catch{H(this,en,{id:Nn()})}try{let e=localStorage.getItem(km);H(this,tn,e?JSON.parse(e):{deviceId:Nn()})}catch{H(this,tn,{deviceId:Nn()})}m(this,en).id||(m(this,en).id=Nn()),m(this,tn).deviceId||(m(this,tn).deviceId=Nn())}static getInstance(){return m(this,Er)||H(this,Er,new e),m(this,Er)}static ___clearInstance(){H(this,Er,void 0)}saveSessionData(e,t){m(this,en)[e]=t;try{return sessionStorage.setItem(_m,JSON.stringify(m(this,en))),!0}catch{return!1}}loadSessionData(e){let t=m(this,en)[e];if(null!=t)return t}saveLocalData(e,t){m(this,tn)[e]=t;try{return localStorage.setItem(km,JSON.stringify(m(this,tn))),!0}catch{return!1}}loadLocalData(e){let t=m(this,tn)[e];if(null!=t)return t}};Er=new WeakMap,en=new WeakMap,tn=new WeakMap,s(ro,"SafeStorage"),G(ro,Er,void 0);var io=ro;y();var Lp={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 Ws(e){return/^[\da-f]{24}$/i.test(e)}function Mm(e,t=!1){let r="";if(null!=e){let n="?",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],a=e[o];null!=a&&(r+="".concat(n+encodeURIComponent(o),"=").concat(encodeURIComponent(a)),n="&")}}return r}function Sx(e,t,r,n=!1){var i,o;return n?"".concat(e.supplementaryUrl).concat(t,"?venue=").concat(r.venue||r.slug):null!=(i=e.baseUrl)&&i.includes("gateway")?"".concat(e.baseUrl).concat(t,"/").concat(r.venue||r.slug).concat(Mm(r,null==(o=e.baseUrl)?void 0:o.includes("gateway"))):e.baseUrl+t+Mm(r)}async function rt(e,t,r,n=!1){return $r(e,t,r,n,!0)}async function $r(e,t,r,n=!1,i=!1){let o=Sx(e,t,r,n),a=await Fp(e,o,n);if(!i&&Array.isArray(a)){if(1===a.length)return a[0];throw new Error("Invalid response object")}return a}function Ox(e,t,r=!1){let n={language:e.language,clientId:e.clientId,clientSecret:e.clientSecret};r&&delete n.language,n.language&&(t+="&lang=".concat(encodeURIComponent(n.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)),n.language&&(i["Accept-Language"]=n.language);let o={method:"GET",headers:i};return e.secure&&(t+="&withcdntoken"),{req:o,url:t}}async function Fp(e,t,r=!1){let n=Ox(e,t,r),i=await An()(n.url,n.req);if(!i.ok)throw new Error("".concat(i.status," ").concat(i.statusText));return i.json()}function nt(e,t){e.indexOf(t)<0&&e.push(t)}function ym([e,t],[r,n]){let i=new at(e,t),o=new at(r,n);return i.distanceTo(o)}function gm(e){if(e.scale||e.x_scale)return 1/(e.scale||e.x_scale);let t;try{let r=e.georeference[0],n=e.georeference[2],i=new at(r.target.x,r.target.y),o=new at(n.target.x,n.target.y),a=i.distanceTo(o),s=r.control.x-n.control.x,l=r.control.y-n.control.y;t=Math.sqrt(s*s+l*l)/a}catch(r){t=1,oe.warn(r),oe.warn("Couldn't georeference ".concat(e.name||e.shortName||e.id,". Probably not enough geocoordinates."))}return t}function Ei(e){var t;return e instanceof wr?e.entrances.map((e=>e.id)):e instanceof Cn?(null==(t=e.nodes)?void 0:t.map((e=>e.id)))||[]:[e.id]}async function Em(e){let t={},{maps:r,images:n,scenes:i,polygons:o}=e;if(null!=n)try{let e=Object.keys(n).map((e=>fetch("data:image/png;base64,".concat(n[e])).then((e=>e.blob())).then((r=>{t[e]=r})).catch((e=>{oe.error(e)}))));await Promise.all(e)}catch(e){oe.error(e)}return r.forEach((e=>{var r;(null!=(r=e.scene)&&r.polygons||i&&i[e.id])&&(null!=i&&i[e.id]&&(e.scene||(e.scene={}),Object.defineProperty(e.scene,"polygons",{get:()=>i[e.id]})),null!=n&&(e.scene.images=e.scene.images.map((({filename:e})=>({filename:e,url:t[e]}))),e.scene.polygons.forEach((e=>{var r,n;if(null!=(r=null==e?void 0:e.image)&&r.url&&null!=(n=null==e?void 0:e.image)&&n.url){let r=e.image.url.split("/"),n=t[r[r.length-1]];n&&(e.image.url=n)}}))))})),null!=n&&o.forEach((e=>{var r;if(null!=(r=null==e?void 0:e.image)&&r.url){let r=e.image.url.split("/"),n=t[r[r.length-1]];n&&(e.image.url=n)}})),null!=e.images&&delete e.images,null!=e.scenes&&delete e.scenes,e}function ri(e,t,r){let n;return function(...i){let o=this,a=s((function(){n=null,r||e.apply(o,i)}),"later"),l=r&&!n;clearTimeout(n),n=setTimeout(a,t),l&&e.apply(o,i)}}function Tm(e,t,r,n=0){if(!e||e<=0)return 0;let i=0;n>=0&&n<=1&&(i=n/10);let o=1e-5,a=1+(r-e)/(r-t)+i;return Math.max(1+o,Math.min(2-o,a))}function zs(){return io.getInstance().loadLocalData("deviceId")}function Bs(){return io.getInstance().loadSessionData("id")}s(Ws,"isGatewayKey"),s(Mm,"stringifyQuery"),s(Sx,"buildUrl"),s(rt,"getArray"),s($r,"getObject"),s(Ox,"constructParamsForRequest"),s(Fp,"generateAPIRequest"),s(nt,"addToSet"),s(ym,"getDistanceBetweenLatLon"),s(gm,"getMapScale"),s(Ei,"getNodesForNavigatable"),s(Em,"populateBundledImagesAsBlobs"),s(ri,"debounce"),s(Tm,"normalizeCategoryRank"),s(zs,"getDeviceID"),s(Bs,"getSessionID");var Sm=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 r=null;if(null!=e&&void 0!==e.locations&&e.locations.length>0){r=e.locations[0];for(let t=0,n=e.locations.length;t<n;t++){let n=e.locations[t];for(;void 0!==n.parent;)n=n.parent,n.polygons.includes(e)&&(r=n);if(void 0===n.parent&&n.polygons.includes(e))return n}}return r}),"getPrimaryLocationForPolygon");function Om(e){var t;let r={...e};for(let[e,n]of Object.entries(Lp))r[e]=(0,xm.default)(n.concat(null!=(t=r[e])?t:[]));return r}function Rp(e){let t=+this._x.call(null,e),r=+this._y.call(null,e);return Pm(this.cover(t,r),t,r,e)}function Pm(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var i,o,a,s,l,u,c,d,h,p=e._root,f={data:n},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=r>=(a=(v+m)/2))?v=a:m=a,i=p,!(p=p[d=c<<1|u]))return i[d]=f,e;if(s=+e._x.call(null,p.data),l=+e._y.call(null,p.data),t===s&&r===l)return f.next=p,i?i[d]=f:e._root=f,e;do{i=i?i[d]=new Array(4):e._root=new Array(4),(u=t>=(o=(g+y)/2))?g=o:y=o,(c=r>=(a=(v+m)/2))?v=a:m=a}while((d=c<<1|u)==(h=(l>=a)<<1|s>=o));return i[h]=p,i[d]=f,e}function Im(e){var t,r,n,i,o=e.length,a=new Array(o),s=new Array(o),l=1/0,u=1/0,c=-1/0,d=-1/0;for(r=0;r<o;++r)isNaN(n=+this._x.call(null,t=e[r]))||isNaN(i=+this._y.call(null,t))||(a[r]=n,s[r]=i,n<l&&(l=n),n>c&&(c=n),i<u&&(u=i),i>d&&(d=i));if(l>c||u>d)return this;for(this.cover(l,u).cover(c,d),r=0;r<o;++r)Pm(this,a[r],s[r],e[r]);return this}function Dp(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,i=this._x1,o=this._y1;if(isNaN(r))i=(r=Math.floor(e))+1,o=(n=Math.floor(t))+1;else{for(var a,s,l=i-r||1,u=this._root;r>e||e>=i||n>t||t>=o;)switch(s=(t<n)<<1|e<r,a=new Array(4),a[s]=u,u=a,l*=2,s){case 0:i=r+l,o=n+l;break;case 1:r=i-l,o=n+l;break;case 2:i=r+l,n=o-l;break;case 3:r=i-l,n=o-l}this._root&&this._root.length&&(this._root=u)}return this._x0=r,this._y0=n,this._x1=i,this._y1=o,this}function zp(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e}function Bp(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 st(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}function Vp(e,t,r){var n,i,o,a,s,l,u,c=this._x0,d=this._y0,h=this._x1,p=this._y1,f=[],g=this._root;for(g&&f.push(new st(g,c,d,h,p)),null==r?r=1/0:(c=e-r,d=t-r,h=e+r,p=t+r,r*=r);l=f.pop();)if(!(!(g=l.node)||(i=l.x0)>h||(o=l.y0)>p||(a=l.x1)<c||(s=l.y1)<d))if(g.length){var v=(i+a)/2,y=(o+s)/2;f.push(new st(g[3],v,y,a,s),new st(g[2],i,y,v,s),new st(g[1],v,o,a,y),new st(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),_=m*m+b*b;if(_<r){var w=Math.sqrt(r=_);c=e-w,d=t-w,h=e+w,p=t+w,n=g.data}}return n}function qp(e){if(isNaN(o=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,r,n,i,o,a,s,l,u,c,d,h,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>=(s=(f+v)/2))?f=s:v=s,(c=a>=(l=(g+y)/2))?g=l:y=l,t=p,!(p=p[d=c<<1|u]))return this;if(!p.length)break;(t[d+1&3]||t[d+2&3]||t[d+3&3])&&(r=t,h=d)}for(;p.data!==e;)if(n=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,n?(i?n.next=i:delete n.next,this):t?(i?t[d]=i:delete t[d],(p=t[0]||t[1]||t[2]||t[3])&&p===(t[3]||t[2]||t[1]||t[0])&&!p.length&&(r?r[h]=p:this._root=p),this):(this._root=i,this)}function Am(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}function Up(){return this._root}function Gp(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e}function Wp(e){var t,r,n,i,o,a,s=[],l=this._root;for(l&&s.push(new st(l,this._x0,this._y0,this._x1,this._y1));t=s.pop();)if(!e(l=t.node,n=t.x0,i=t.y0,o=t.x1,a=t.y1)&&l.length){var u=(n+o)/2,c=(i+a)/2;(r=l[3])&&s.push(new st(r,u,c,o,a)),(r=l[2])&&s.push(new st(r,n,c,u,a)),(r=l[1])&&s.push(new st(r,u,i,o,c)),(r=l[0])&&s.push(new st(r,n,i,u,c))}return this}function Yp(e){var t,r=[],n=[];for(this._root&&r.push(new st(this._root,this._x0,this._y0,this._x1,this._y1));t=r.pop();){var i=t.node;if(i.length){var o,a=t.x0,s=t.y0,l=t.x1,u=t.y1,c=(a+l)/2,d=(s+u)/2;(o=i[0])&&r.push(new st(o,a,s,c,d)),(o=i[1])&&r.push(new st(o,c,s,l,d)),(o=i[2])&&r.push(new st(o,a,d,c,u)),(o=i[3])&&r.push(new st(o,c,d,l,u))}n.push(t)}for(;t=n.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this}function Cm(e){return e[0]}function Hp(e){return arguments.length?(this._x=e,this):this._x}function jm(e){return e[1]}function Xp(e){return arguments.length?(this._y=e,this):this._y}function ii(e,t,r){var n=new $p(null==t?Cm:t,null==r?jm:r,NaN,NaN,NaN,NaN);return null==e?n:n.addAll(e)}function $p(e,t,r,n,i,o){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=o,this._root=void 0}function Nm(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}s(Om,"mergeThings"),y(),y(),y(),y(),s(Rp,"default"),s(Pm,"add"),s(Im,"addAll"),y(),s(Dp,"default"),y(),s(zp,"default"),y(),s(Bp,"default"),y(),y(),s(st,"default"),s(Vp,"default"),y(),s(qp,"default"),s(Am,"removeAll"),y(),s(Up,"default"),y(),s(Gp,"default"),y(),s(Wp,"default"),y(),s(Yp,"default"),y(),s(Cm,"defaultX"),s(Hp,"default"),y(),s(jm,"defaultY"),s(Xp,"default"),s(ii,"quadtree"),s($p,"Quadtree"),s(Nm,"leaf_copy");var _t=ii.prototype=$p.prototype;_t.copy=function(){var e,t,r=new $p(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=Nm(n),r;for(e=[{source:n,target:r._root=new Array(4)}];n=e.pop();)for(var i=0;i<4;++i)(t=n.source[i])&&(t.length?e.push({source:t,target:n.target[i]=new Array(4)}):n.target[i]=Nm(t));return r},_t.add=Rp,_t.addAll=Im,_t.cover=Dp,_t.data=zp,_t.extent=Bp,_t.find=Vp,_t.remove=qp,_t.removeAll=Am,_t.root=Up,_t.size=Gp,_t.visit=Wp,_t.visitAfter=Yp,_t.x=Hp,_t.y=Xp;var vn,$e,nn=class e{constructor(e){G(this,vn,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",{}),G(this,$e,{}),H(this,vn,e)}get polygonsByMapId(){if(m(this,$e).polygonsByMapId)return m(this,$e).polygonsByMapId;let e,t={};for(let r=0,n=m(this,vn).polygons.length;r<n;++r)e=m(this,vn).polygons[r],t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e);let r=Object.entries(t).reduce(((e,[t,r])=>(e.set(t,r),e)),new Map);return m(this,$e).polygonsByMapId=r,m(this,$e).polygonsByMapId}get nodesByMapId(){if(m(this,$e).nodesByMapId)return m(this,$e).nodesByMapId;let e,t={};for(let r=0,n=m(this,vn).nodes.length;r<n;++r)e=m(this,vn).nodes[r],t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e);let r=Object.entries(t).reduce(((e,[t,r])=>(e.set(t,r),e)),new Map);return m(this,$e).nodesByMapId=r,m(this,$e).nodesByMapId}findNearestNodeOnMap(e,t){var r;if(m(this,$e).nodeTreesByMap||(m(this,$e).nodeTreesByMap=new Map),!m(this,$e).nodeTreesByMap.has(e)){let t=null!=(r=this.nodesByMapId.get(e))?r:[],n=ii();n.x((e=>e.x)),n.y((e=>e.y)),n.addAll(t),m(this,$e).nodeTreesByMap.set(e,n)}return m(this,$e).nodeTreesByMap.get(e).find(t.x,t.y)}findNodeWithinRadiusOnMap(e,t,r){var n;if(m(this,$e).nodeTreesByMap||(m(this,$e).nodeTreesByMap=new Map),!m(this,$e).nodeTreesByMap.has(e)){let t=null!=(n=this.nodesByMapId.get(e))?n:[],r=ii();r.x((e=>e.x)),r.y((e=>e.y)),r.addAll(t),m(this,$e).nodeTreesByMap.set(e,r)}let i=m(this,$e).nodeTreesByMap.get(e),o=[],a=t.x,s=t.y;return i.visit(((e,t,n,i,l)=>{if(e&&!e.length)do{let t=e.data;Math.sqrt((t.x-a)**2+(t.y-s)**2)<=r&&o.push(t)}while(e=e.next);let u=a-Math.max(t,Math.min(i,a)),c=s-Math.max(n,Math.min(l,s));return u*u+c*c>=r*r})),o}get locationsByMapId(){if(m(this,$e).locationsByMapId)return m(this,$e).locationsByMapId;let e,t={};for(let r=0,n=m(this,vn).locations.length;r<n;++r){e=m(this,vn).locations[r];for(let r=0,n=e.polygons.length;r<n;++r)t[e.polygons[r].map.id]||(t[e.polygons[r].map.id]=[]),-1===t[e.polygons[r].map.id].indexOf(e)&&t[e.polygons[r].map.id].push(e);for(let r=0,n=e.nodes.length;r<n;++r){let n=e.nodes[r];t[n.map.id]||(t[n.map.id]=[]),-1===t[n.map.id].indexOf(e)&&t[n.map.id].push(e)}}let r=Object.entries(t).reduce(((e,[t,r])=>(e.set(t,r),e)),new Map);return m(this,$e).locationsByMapId=r,m(this,$e).locationsByMapId}static create(t){return e.instances.has(t)||e.instances.set(t,new e(t)),e.instances.get(t)}static clear(){e.instances.clear()}static clearInstance(t){e.instances.has(t)&&e.instances.delete(t)}};vn=new WeakMap,$e=new WeakMap,s(nn,"MappedinCache"),g(nn,"instances",new Map);var Kp=nn,bt=Kp,Ys={categories:Mr,locations:Cn,vortexes:Na,maps:Ka,nodes:xa,polygons:wr,venue:Xr,events:Wa,mapGroups:eo,themes:Vs,locationStates:Xa,rankings:Ua};y(),y(),y(),y();var kt=6371008.8,Lm={centimeters:100*kt,centimetres:100*kt,degrees:kt/111325,feet:3.28084*kt,inches:39.37*kt,kilometers:kt/1e3,kilometres:kt/1e3,meters:kt,metres:kt,miles:kt/1609.344,millimeters:1e3*kt,millimetres:1e3*kt,nauticalmiles:kt/1852,radians:1,yards:1.0936*kt},hj={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/kt,yards:1.0936133};function Qn(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function Mt(e,t,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(!Jp(e[0])||!Jp(e[1]))throw new Error("coordinates must contain numbers");return Qn({type:"Point",coordinates:e},t,r)}function Fn(e,t,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return Qn({type:"LineString",coordinates:e},t,r)}function Tr(e,t){void 0===t&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function Fm(e,t){void 0===t&&(t="kilometers");var r=Lm[t];if(!r)throw new Error(t+" units is invalid");return e*r}function Rm(e,t){void 0===t&&(t="kilometers");var r=Lm[t];if(!r)throw new Error(t+" units is invalid");return e/r}function ao(e){return 180*(e%(2*Math.PI))/Math.PI}function Ot(e){return e%360*Math.PI/180}function Jp(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Hs(e,t,r){if(null!==e)for(var n,i,o,a,s,l,u,c,d=0,h=0,p=e.type,f="FeatureCollection"===p,g="Feature"===p,v=f?e.features.length:1,y=0;y<v;y++){s=(c=!!(u=f?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var m=0;m<s;m++){var b=0,_=0;if(null!==(a=c?u.geometries[m]:u)){l=a.coordinates;var w=a.type;switch(d=!r||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===t(l,h,y,b,_))return!1;h++,b++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(!1===t(l[n],h,y,b,_))return!1;h++,"MultiPoint"===w&&b++}"LineString"===w&&b++;break;case"Polygon":case"MultiLineString":for(n=0;n<l.length;n++){for(i=0;i<l[n].length-d;i++){if(!1===t(l[n][i],h,y,b,_))return!1;h++}"MultiLineString"===w&&b++,"Polygon"===w&&_++}"Polygon"===w&&b++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(_=0,i=0;i<l[n].length;i++){for(o=0;o<l[n][i].length-d;o++){if(!1===t(l[n][i][o],h,y,b,_))return!1;h++}_++}b++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===Hs(a.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Qp(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var r=0;r<e.features.length&&!1!==t(e.features[r],r);r++);}function Px(e,t){var r,n,i,o,a,s,l,u,c,d,h=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(r=0;r<g;r++){for(s=p?e.features[r].geometry:f?e.geometry:e,u=p?e.features[r].properties:f?e.properties:{},c=p?e.features[r].bbox:f?e.bbox:void 0,d=p?e.features[r].id:f?e.id:void 0,a=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=l?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,h,u,c,d))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],h,u,c,d))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,h,u,c,d))return!1;h++}}function oo(e,t){Px(e,(function(e,r,n,i,o){var a,s=null===e?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==t(Qn(e,n,{bbox:i,id:o}),r,0)&&void 0}switch(s){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u=e.coordinates[l];if(!1===t(Qn({type:a,coordinates:u},n),r,l))return!1}}))}function Ix(e,t){oo(e,(function(e,r,n){var i=0;if(e.geometry){var o=e.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var a,s=0,l=0,u=0;if(!1===Hs(e,(function(o,c,d,h,p){if(void 0===a||r>s||h>l||p>u)return a=o,s=r,l=h,u=p,void(i=0);var f=Fn([a,o],e.properties);if(!1===t(f,r,n,p,i))return!1;i++,a=o})))return!1}}}))}function Dm(e,t,r){var n=r,i=!1;return Ix(e,(function(e,o,a,s,l){n=!1===i&&void 0===r?e:t(n,e,o,a,s,l),i=!0})),n}function Zp(e){var t=[1/0,1/0,-1/0,-1/0];return Hs(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(Qn,"feature"),s(Mt,"point"),s(Fn,"lineString"),s(Tr,"featureCollection"),s(Fm,"radiansToLength"),s(Rm,"lengthToRadians"),s(ao,"radiansToDegrees"),s(Ot,"degreesToRadians"),s(Jp,"isNumber"),s(Hs,"coordEach"),s(Qp,"featureEach"),s(Px,"geomEach"),s(oo,"flattenEach"),s(Ix,"segmentEach"),s(Dm,"segmentReduce"),s(Zp,"bbox"),Zp.default=Zp;var Xs=Zp;function yn(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 zm(e,t){return"FeatureCollection"===e.type?"FeatureCollection":"GeometryCollection"===e.type?"GeometryCollection":"Feature"===e.type&&null!==e.geometry?e.geometry.type:e.type}function Ax(e,t,r){void 0===r&&(r={});var n=yn(e),i=yn(t),o=Ot(i[1]-n[1]),a=Ot(i[0]-n[0]),s=Ot(n[1]),l=Ot(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(l);return Fm(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),r.units)}y(),y(),y(),y(),s(yn,"getCoord"),s(Dt,"getCoords"),s(zm,"getType"),s(Ax,"distance");var Zn=Ax;function $s(e,t){return void 0===t&&(t={}),Dm(e,(function(e,r){var n=r.geometry.coordinates;return e+Zn(n[0],n[1],t)}),0)}function Ks(e,t,r){if(void 0===r&&(r={}),!0===r.final)return Cx(e,t);var n=yn(e),i=yn(t),o=Ot(n[0]),a=Ot(i[0]),s=Ot(n[1]),l=Ot(i[1]),u=Math.sin(a-o)*Math.cos(l),c=Math.cos(s)*Math.sin(l)-Math.sin(s)*Math.cos(l)*Math.cos(a-o);return ao(Math.atan2(u,c))}function Cx(e,t){var r=Ks(t,e);return r=(r+180)%360}function Js(e,t,r,n){void 0===n&&(n={});var i=yn(e),o=Ot(i[0]),a=Ot(i[1]),s=Ot(r),l=Rm(t,n.units),u=Math.asin(Math.sin(a)*Math.cos(l)+Math.cos(a)*Math.sin(l)*Math.cos(s));return Mt([ao(o+Math.atan2(Math.sin(s)*Math.sin(l)*Math.cos(a),Math.cos(l)-Math.sin(a)*Math.sin(u))),ao(u)],n.properties)}function jx(e){if(!e)throw new Error("geojson is required");var t=[];return oo(e,(function(e){Nx(e,t)})),Tr(t)}function Nx(e,t){var r=[],n=e.geometry;if(null!==n){switch(n.type){case"Polygon":r=Dt(n);break;case"LineString":r=[Dt(n)]}r.forEach((function(r){Lx(r,e.properties).forEach((function(e){e.id=t.length,t.push(e)}))}))}}function Lx(e,t){var r=[];return e.reduce((function(e,n){var i=Fn([e,n],t);return i.bbox=Fx(e,n),r.push(i),n})),r}function Fx(e,t){var r=e[0],n=e[1],i=t[0],o=t[1];return[r<i?r:i,n<o?n:o,r>i?r:i,n>o?n:o]}s($s,"length"),y(),y(),y(),s(Ks,"bearing"),s(Cx,"calculateFinalBearing"),y(),s(Js,"destination"),y(),y(),s(jx,"lineSegment"),s(Nx,"lineSegmentFeature"),s(Lx,"createSegments"),s(Fx,"bbox");var ef=jx,rv=an(tv(),1);function lE(e,t){var r={},n=[];if("LineString"===e.type&&(e=Qn(e)),"LineString"===t.type&&(t=Qn(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=nv(e,t);return i&&n.push(i),Tr(n)}var o=(0,rv.default)();return o.load(ef(t)),Qp(ef(e),(function(e){Qp(o.search(e),(function(t){var i=nv(e,t);if(i){var o=Dt(i).join(",");r[o]||(r[o]=!0,n.push(i))}}))})),Tr(n)}function nv(e,t){var r=Dt(e),n=Dt(t);if(2!==r.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==n.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=r[0][0],o=r[0][1],a=r[1][0],s=r[1][1],l=n[0][0],u=n[0][1],c=n[1][0],d=n[1][1],h=(d-u)*(a-i)-(c-l)*(s-o);if(0===h)return null;var p=((c-l)*(o-u)-(d-u)*(i-l))/h,f=((a-i)*(o-u)-(s-o)*(i-l))/h;return p>=0&&p<=1&&f>=0&&f<=1?Mt([i+p*(a-i),o+p*(s-o)]):null}s(lE,"lineIntersect"),s(nv,"intersects");var iv=lE;function cE(e,t,r){void 0===r&&(r={});var n=Mt([1/0,1/0],{dist:1/0}),i=0;return oo(e,(function(e){for(var o=Dt(e),a=0;a<o.length-1;a++){var s=Mt(o[a]);s.properties.dist=Zn(t,s,r);var l=Mt(o[a+1]);l.properties.dist=Zn(t,l,r);var u=Zn(s,l,r),c=Math.max(s.properties.dist,l.properties.dist),d=Ks(s,l),h=Js(t,c,d+90,r),p=Js(t,c,d-90,r),f=iv(Fn([h.geometry.coordinates,p.geometry.coordinates]),Fn([s.geometry.coordinates,l.geometry.coordinates])),g=null;f.features.length>0&&((g=f.features[0]).properties.dist=Zn(t,g,r),g.properties.location=i+Zn(s,g,r)),s.properties.dist<n.properties.dist&&((n=s).properties.index=a,n.properties.location=i),l.properties.dist<n.properties.dist&&((n=l).properties.index=a+1,n.properties.location=i+u),g&&g.properties.dist<n.properties.dist&&((n=g).properties.index=a),i+=u}})),n}s(cE,"nearestPointOnLine");var uo=cE;function dE(e,t,r){var n=Dt(r);if("LineString"!==zm(r))throw new Error("line must be a LineString");for(var i,o=uo(r,e),a=uo(r,t),s=[(i=o.properties.index<=a.properties.index?[o,a]:[a,o])[0].geometry.coordinates],l=i[0].properties.index+1;l<i[1].properties.index+1;l++)s.push(n[l]);return s.push(i[1].geometry.coordinates),Fn(s,r.properties)}s(dE,"lineSlice");var hf=dE;function pE(e,t){void 0===t&&(t={});var r=Xs(e);return Mt([(r[0]+r[2])/2,(r[1]+r[3])/2],t.properties,t)}y(),s(pE,"center");var av=pE;function fE(e,t,r){void 0===r&&(r={});for(var n=yn(e),i=Dt(t),o=0;o<i.length-1;o++){var a=!1;if(r.ignoreEndVertices&&(0===o&&(a="start"),o===i.length-2&&(a="end"),0===o&&o+1===i.length-1&&(a="both")),hE(i[o],i[o+1],n,a,typeof r.epsilon>"u"?null:r.epsilon))return!0}return!1}function hE(e,t,r,n,i){var o=r[0],a=r[1],s=e[0],l=e[1],u=t[0],c=t[1],d=u-s,h=c-l,p=(r[0]-s)*h-(r[1]-l)*d;if(null!==i){if(Math.abs(p)>i)return!1}else if(0!==p)return!1;return n?"start"===n?Math.abs(d)>=Math.abs(h)?d>0?s<o&&o<=u:u<=o&&o<s:h>0?l<a&&a<=c:c<=a&&a<l:"end"===n?Math.abs(d)>=Math.abs(h)?d>0?s<=o&&o<u:u<o&&o<=s:h>0?l<=a&&a<c:c<a&&a<=l:"both"===n&&(Math.abs(d)>=Math.abs(h)?d>0?s<o&&o<u:u<o&&o<s:h>0?l<a&&a<c:c<a&&a<l):Math.abs(d)>=Math.abs(h)?d>0?s<=o&&o<=u:u<=o&&o<=s:h>0?l<=a&&a<=c:c<=a&&a<=l}y(),s(fE,"booleanPointOnLine"),s(hE,"isPointOnLineSegment");var ov=fE,gE=1e-7,sv=.005;function gf(e,t){let r=bE(t);return Tr(e.features.reduce(((e,t)=>{let n=[t],{properties:i}=t,o=(i.entrances||[]).reduce(((e,t)=>(r.has(t)&&e.push(r.get(t)),e)),[]);return o.length&&(n=mE(t,o)),e.push(...n),e}),[]))}function mE(e,t){return t.reduce(((e,t)=>{let r={epsilon:gE},n=e.findIndex((e=>ov(av(t),e,r))),i=e[n];if(i){let[r,o]=yE(i,t);e.splice(n,1,r,o)}return e}),[e])}function vE(e){return null!=e&&(null!=e.polygons||null!=e.lineStrings)}function yE(e,t){let{coordinates:r}=t.geometry,{coordinates:n}=e.geometry,i=r.map((t=>uo(e,Mt(t))));return n.reduce(((t,r)=>{let n=hf(Mt(r),i[0],e),o=hf(Mt(r),i[1],e),a=$s(n)<$s(o)?n:o;return a.properties={...e.properties,entrances:[]},t.concat([a])}),[])}function uv(e){let t=new Map;for(let r in e){let n=e[r];if(!vE(n))continue;let{altitude:i,color:o,width:a,height:s,opacity:l}=n,u={altitude:i,color:o,width:a,height:s,opacity:l,type:r};(n.polygons||n.lineStrings).forEach((e=>{t.set(e,u)}))}return t}function bE(e){return new Map(e.features.map((e=>{let{properties:t}=e,{id:r}=t;return[r,e]})))}function lv(e){if(0===e.length)return;let t;for(let r of e)if("number"==typeof r.elevation){if(!t){t=r;continue}"number"==typeof t.elevation&&(t=Math.abs(r.elevation)===Math.abs(t.elevation)?r.elevation>t.elevation?r:t:Math.abs(r.elevation)<Math.abs(t.elevation)?r:t)}return t}function pv(e){let[t,r,n,i]=Xs(e);return{minLat:r,minLong:t,maxLat:i,maxLong:n}}function wE(e,t,r){let n=r.createGeoreferences(),i=new Set;t.forEach((e=>{e.layer&&i.add(e.layer)}));let o=e.id||"",a=e.externalId||o||"",s=e.elevation||0,l=[...i].map((e=>({id:e,visible:!0}))),u=1/r.mapScale;return{id:o,georeference:n,name:a,shortName:a,scene:{polygons:t},elevation:s,scale:u,x_scale:u,layers:l,width:r.widthInMapUnits,height:r.heightInMapUnits}}s(gf,"processObstructions"),s(mE,"splitObstructionByAllEntrances"),s(vE,"isPolygonStyle"),s(yE,"splitObstructionByEntrance"),s(uv,"getStylesMap"),s(bE,"getEntranceMap"),y(),y(),s(lv,"findMapWithElevationClosestToZero"),y(),s(pv,"getMapExtent"),s(wE,"convertMap");var vf=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:r,maxLat:n,maxLong:i}=e,o=(t+n)/2,a=(r+i)/2,s=new at(o,i),l=new at(o,r),u=new at(t,a),c=new at(n,a);this.latDistance=u.distanceTo(c),this.longDistance=s.distanceTo(l);let d=this.latDistance/this.longDistance,h=(n-t)/(i-r);this.stretchRatio=d/h,this.midLat=o,this.midLong=a,this.widthInMapUnits=(i-r)*this.mapUnitRatio,this.heightInMapUnits=(n-t)*this.mapUnitRatio*this.stretchRatio,this.mapScale=this.widthInMapUnits/this.longDistance}convert(e){let t=e[1],r=(e[0]-this.midLong)*this.mapUnitRatio,n=(this.midLat-t)*this.mapUnitRatio*this.stretchRatio;return{x:r+this.widthInMapUnits/2,y:n+this.heightInMapUnits/2}}createGeoreferences(){let{minLat:e,minLong:t,maxLat:r,maxLong:n}=this.mapExtent;return[[e,t],[e,n],[r,n],[r,t]].map((e=>({target:{x:e[0],y:e[1]},control:this.convert([e[1],e[0]])})))}};s(vf,"CoordinateConverter");var tu=vf;function _E(e,t){let r=[];return e.forEach(((n,i)=>{let o=n.properties.map||"",a=t.get(o);if(a){let t=a.convert(n.geometry.coordinates),s=n.properties.externalId||"",l=[];n.properties.neighbors.forEach((t=>{var r;let n=null!=(r=t.weight)?r:0,i=e.get(t.id);i&&i.properties.map===o&&l.push({node:i.properties.id,map:i.properties.map,weight:n})})),r.push({id:i,map:o,externalId:s,paths:l,...t})}})),r}function kE(e,t,r){let n=[];return e.features.forEach((e=>{let i=r.convert(e.geometry.coordinates);n.push({id:e.properties.id,x:i.x,y:i.y,map:t,paths:e.properties.neighbors.map((e=>({node:e,map:t})))})})),n}s(_E,"convertNodes"),s(kE,"convertNodes_MVFv1");var cv=s(((e,t,r,n,i,o)=>{var a,s,l;let u,c=[],d=Math.max(o.widthInMapUnits,o.heightInMapUnits)/1e3,h=i.Walls,p=null!=(a=i.ExteriorWalls)?a:h,f={map:e,id:"walls"+e,externalId:"walls"+e,layer:"Wall",isLineStringSegment:!0,geometry:{visible:!0,position:{x:0,y:0,z:((null==h?void 0:h.altitude)||0)*o.mapScale/d},scale:{x:1,y:1,z:((null==h?void 0:h.height)||1)*o.mapScale/d},width:null==h?void 0:h.width},material:{color:(null==h?void 0:h.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/d},scale:{x:1,y:1,z:((null==p?void 0:p.height)||1)*o.mapScale/d},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 a=t.features[i];if("Point"===a.geometry.type)continue;let h="desk-entrance"===(null==(s=a.properties.kind)?void 0:s.toLowerCase()),p=(h?a.properties.externalId:a.properties.id)||"",v=a.properties.externalId||"",y=r.get(p)||[];if("destinationNodes"in a.properties&&a.properties.destinationNodes.forEach((t=>{y.push({map:e,id:t})})),h)r.set(v,y);else{let r=n.get(a.properties.id),s=a.properties.center?o.convert(a.properties.center):void 0,h=a.geometry.coordinates.slice(1).map((e=>e.map((e=>o.convert(e))))),m=a.properties.kind||"",b="void"===m.toLowerCase(),_=1-(i+1)/t.features.length*sv;"LineString"===a.geometry.type&&"wall"===(null==(l=a.properties.kind)?void 0:l.toLowerCase())?(u=a.geometry.coordinates.map((e=>o.convert(e))),a.properties.footprintComponent?g.vertexes.push(u):f.vertexes.push(u)):(u=a.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==r?void 0:r.altitude)||0)*o.mapScale/d},scale:{x:1,y:1,z:((null==r?void 0:r.height)||1)*o.mapScale/d*_},width:null==r?void 0:r.width},material:{color:(null==r?void 0:r.color)||"#000000"},vertexes:u,center:s,holes:h}))}}return f.vertexes.length>0&&c.push(f),g.vertexes.length>0&&c.push(g),c}),"generateMappedinPolygons"),dv=s(((e,t,r)=>{let n=[];return t.features.forEach((t=>{if(!t.geometry.coordinates[0].forEach)return;let i=t.properties,o=t.geometry.coordinates[0].map((e=>r.convert(e))),a=t.geometry.coordinates.slice(1).map((e=>e.map((e=>r.convert(e))))),s=Math.max(r.widthInMapUnits,r.heightInMapUnits)/1e3,l=[];"entrances"in t.properties&&t.properties.entrances.forEach((e=>l.push({id:"n_"+e.id,map:e.level}))),n.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)*r.mapScale/s},scale:{x:1,y:1,z:((null==i?void 0:i.height)||1)*r.mapScale/s}},material:{color:(null==i?void 0:i.color)||"#000000"},vertexes:o,holes:a})})),n}),"generateMappedinPolygons_MVFv1");function ME(e,t,r,n,i,o,a){let s=cv(e,r,n,i,o,a),l=cv(e,t,n,i,o,a);return s.concat(l)}function xE(e,t){let r=[];return e.forEach((e=>{var n;let i;for(let r of e.nodes){let n=t.get(r);if(n)for(let t of n.properties.neighbors)if(e.nodes.includes(t.id)&&t.weight){i=t.weight;break}if(i)break}r.push({id:e.id||"",name:e.externalId||"",type:e.type||"",weight:null!=i?i:1e3,multiplier:1,nodes:e.nodes||[],accessible:null!=(n=e.accessible)&&n})})),r}function EE(e){let t=new Map;return e.features.forEach((e=>{var r,n,i,o,a,s,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 d=null!=(n=null==(r=t.get(u))?void 0:r.nodes)?n:[],h=new Set([...d,...c]);t.set(u,{id:u,name:null!=(i=e.properties.name)?i:"",type:null!=(o=e.properties.type)?o:"",weight:null!=(a=e.properties.weight)?a:1e3,multiplier:null!=(s=e.properties.multiplier)?s:1,nodes:Array.from(h),accessible:null!=(l=e.properties.accessible)&&l})})),Array.from(t.values())}function fv(e,t){var r;let n=null!=(r=t.properties.externalId)?r:"";return 0===n.length&&(n=t.properties.id),"location-".concat(e,"-").concat(n.toLowerCase().replace(" ","-"))}function hv(e,t){var r;let n=new Set;if("entrance"===e)n.add("Entrance");else if("obstruction"===e){let e=t.properties.kind;null!=e&&e.length>0&&n.add(e),t.properties.footprintComponent&&n.add("Exterior")}else if("space"===e){let e=t.properties.kind;null!=e&&e.length>0&&n.add("default"===e?"Room":e);let i=null!=(r=t.properties.tags)?r:[];if(i.length>0)for(let e of i)n.add(e)}return Array.from(n).filter((e=>e.length>0))}function gv(e){return"category-".concat(e.toLowerCase().replace(" ","-"))}function mf(e,t,r){let n=hv(e,t);for(let e of n){let t=gv(e);null==r[t]&&(r[t]={id:t,name:e})}}function mv(e){var t,r,n;return null!=(n=null==(r=null==(t=null==e?void 0:e.properties)?void 0:t.kind)?void 0:r.startsWith("connection"))&&n}function TE(e){var t;let r=null!=(t=e.properties.externalId)?t:"";return mv(e)&&0===r.length&&(r="unnamed-connection-"+e.properties.id),r}function lo(e,t,r,n){var i;if((null==t.properties.externalId||0===t.properties.externalId.length)&&!mv(t)||"obstruction"===e&&"desks"!==(null==(i=t.properties.kind)?void 0:i.toLowerCase()))return;let o=TE(t),a=fv(e,t);if(null==n[a]){let e={id:a,type:"",name:o,nodes:[],polygons:[],categories:[]};n[a]=e}if("space"===e||"obstruction"===e){let e={map:r.id,id:t.properties.id};n[a].polygons.push(e)}if("destinationNodes"in t.properties&&t.properties.destinationNodes.forEach((e=>{let t={map:r.id,node:e};n[a].nodes.push(t)})),"node"in t.properties&&t.properties.node){let e={map:r.id,node:t.properties.node};n[a].nodes.push(e)}let s=hv(e,t);for(let e of s){let t=gv(e);n[a].categories.push(t)}}function SE(e,t=new Map){var r,n,i,o,a,s,l,u,c;let d={},h={},{space:p,"map.geojson":f,entrance:g,obstruction:v}=e;for(let e of f){let f=null!=(n=null==(r=p[e.id])?void 0:r.features)?n:[],y=null!=(o=null==(i=g[e.id])?void 0:i.features)?o:[],m=null!=(s=null==(a=v[e.id])?void 0:a.features)?s:[];for(let t of f)["Polygon","Point"].includes(t.geometry.type)&&"hallway"!==(null==(l=t.properties.kind)?void 0:l.toLowerCase())&&(mf("space",t,h),lo("space",t,e,d));let b=new Map;for(let t of y)b.set(t.properties.id,t),t.properties.externalId&&(mf("entrance",t,h),lo("entrance",t,e,d));let _={type:"Feature",geometry:{type:"LineString",coordinates:[]},properties:{id:"footprintComponent",externalId:"footprintComponent",node:void 0,metadata:void 0}};lo("entrance",_,e,d);for(let r of m){if(mf("obstruction",r,h),lo("obstruction",r,e,d),r.properties.footprintComponent){let t=r.properties.entrances;for(let r of t){let t=b.get(r);t&&lo("entrance",{...t,properties:{...t.properties,externalId:_.properties.externalId}},e,d)}}if("desks"===(null==(u=r.properties.kind)?void 0:u.toLowerCase())&&r.properties.externalId.length>0){let e=null!=(c=t.get(r.properties.id))?c:[];for(let t of e){let e=fv("obstruction",r);null!=d[e]&&d[e].nodes.push({map:t.map,node:t.id})}}}}return{locations:Object.values(d),categories:Object.values(h)}}function vv(e){var t,r,n,i,o,a,s,l,u,c;let d=null!=(t=e.obstruction)?t:[],h=null!=(r=e.space)?r:[],p=null!=(n=e.entrance)?n:[],f=null!=(i=e["mapstack.geojson"])?i:[],g=null!=(o=e["map.geojson"])?o:[],v=null!=(a=e["styles.json"])?a:{},y=null!=(s=e["manifest.geojson"])?s:{},m=null!=(l=e["node.geojson"])?l:{},b=null!=(u=e["connection.json"])?u:[],_={},w=new Map,M=[],x=uv(v),E=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=gf(d[e],p[e]);if(t.features.length){let r=pv(t),n=new tu(r);w.set(e,n),_[e]=ME(e,t,h[e],E,x,v,n),M.push(wE(S.get(e),_[e],n))}}))})),M.sort(((e,t)=>"number"==typeof e.elevation&&"number"==typeof t.elevation?e.elevation-t.elevation:0));let I=new Map;"features"in m&&m.features.forEach((e=>{let t=e.properties.id;t&&!I.has(t)&&I.set(t,e)}));let k=Object.values(_).flat(),C=xE(b,I),O=_E(I,w),T=y.features[0],A=T.properties.name,P=T.geometry.coordinates[0],F=T.geometry.coordinates[1],j=(null==(c=lv(M))?void 0:c.id)||"",{locations:L,categories:N}=SE(e,E);return{polygons:k,venue:{name:A,latitude:F,longitude:P,defaultMap:j},maps:M,vortexes:C,nodes:O,locations:L,mapGroups:[],locationStates:[],categories:N,themes:[],imageBinaries:new Map}}function yv(e){var t,r,n,i,o,a,s;let l=null!=(t=e.obstruction)?t:{},u=null!=(r=e.space)?r:{},c=null!=(n=e.node)?n:{},d=null!=(i=e.level)?i:{},h=null!=(o=e["manifest.geojson"])?o:{},p=null!=(a=e.connection)?a:{},f={},g=new Map,v=[],y=[],m=[];Object.keys(d).forEach((e=>{let t=gf(l[e],{type:"FeatureCollection",features:[]});if(t.features.length){let r=pv(t),n=new tu(r);g.set(e,n);let i=dv(e,u[e],n),o=dv(e,t,n);f[e]=i.concat(o),y=y.concat(kE(c[e],e,n)),v.push(OE(d[e],f[e],n))}m=m.concat(EE(p[e]))}));let b=Object.values(f).flat(),_=h.features[0],w=_.properties.name,M=_.geometry.coordinates[0],x=_.geometry.coordinates[1],E=(null==(s=v[0])?void 0:s.id)||"",S=new Map;b.forEach((e=>S.set(e.id,e)));let I=[],k=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}))))})),I=e}}return{...e.properties,nodes:I,polygons:e.properties.spaces}})),C=e["category.geojson"].features.map((e=>e.properties));return{polygons:b,venue:{name:w,latitude:x,longitude:M,defaultMap:E},maps:v,vortexes:m,nodes:y,locations:k,mapGroups:[],locationStates:[],categories:C,themes:[],imageBinaries:new Map}}function OE(e,t,r){let n=r.createGeoreferences(),i=new Set,o=e.features[0].properties;t.forEach((e=>{e.layer&&i.add(e.layer)}));let a=[...i].map((e=>({id:e,visible:!0}))),s=1/r.mapScale;return{id:o.id,georeference:n,name:o.name,shortName:o.abbreviation||o.name,scene:{polygons:t},elevation:o.elevation,scale:s,x_scale:s,layers:a,width:r.widthInMapUnits,height:r.heightInMapUnits}}s(ME,"convertPolygons"),s(xE,"convertVortexes"),s(EE,"convertVortexes_MVFv1"),s(fv,"getLocationId"),s(hv,"getFeatureCategories"),s(gv,"getCategoryIdFromName"),s(mf,"mutateCategoriesWithNewFeature"),s(mv,"isFeatureConnection"),s(TE,"getLocationLabel"),s(lo,"mutateLocationsWithNewFeature"),s(SE,"createMetaDataFromMVF"),s(vv,"convertMVFToMappedin"),s(yv,"convertMVFv1ToMappedin"),s(OE,"convertMap_MVFv1"),y();var Dv,co,oi,si,po,ui,li,ci,tr,di,pi,fi,fo,hi,Sr,zv=an(Rv()),DE=null==(Dv=null==R?void 0:R.env)?void 0:Dv.npm_package_version,nu=["websdk","web","webv2","kiosk-v2","mobile","iossdk","androidsdk","reactnativesdk"],wf=nu[0],zE=!1,rn=class e{constructor(e){var t;G(this,co,void 0),G(this,oi,void 0),G(this,si,void 0),G(this,po,void 0),G(this,ui,void 0),G(this,li,void 0),G(this,ci,void 0),G(this,tr,void 0),G(this,di,void 0),G(this,pi,void 0),G(this,fi,void 0),G(this,fo,void 0),G(this,hi,void 0),G(this,Sr,void 0),H(this,tr,e.clientId),H(this,di,e.clientSecret),H(this,pi,e.accessToken),H(this,ci,e.noAuth||!1);let r="https://api-gateway.mappedin.com/track-analytics/a/";!m(this,ci)&&m(this,tr)&&!Ws(m(this,tr))&&(r="https://web-proxy.mappedin.com/a/"),H(this,si,r),H(this,si,m(this,si)+(e.venue+"/")),H(this,hi,e.venue),H(this,oi,!1),H(this,co,"boolean"==typeof e.testMode?e.testMode:"true"===(null==(t=e.testMode)?void 0:t.toLowerCase())),H(this,po,nu.find((t=>t===e.context))||nu[0]),H(this,ui,zs()),H(this,li,Bs()),H(this,fi,new Set),H(this,fo,e.platformString||""),this.locationSelected=this.locationSelected.bind(this),this.categorySelected=this.categorySelected.bind(this),this.getDirections=ri(this.getDirections.bind(this),2500)}static create(t){return e.instance||(e.instance=new e(t)),e.instance}track(e,t){let r={...t,g:m(this,oi)};m(this,Sr)&&(r={...r,...m(this,Sr)});let n=m(this,si)+e+"?"+zv.default.stringify(r,{skipEmptyString:!0,skipNull:!0});if(zE&&oe.log("Analytics.track",n),m(this,co))return;let i={"mi-context":wf||m(this,po),"mi-session":m(this,li),"mi-device":m(this,ui),"mappedin-sdk-version":DE,"mappedin-platform-version":m(this,fo)};m(this,pi)?i.Authorization="Bearer ".concat(m(this,pi)):m(this,ci)||m(this,di)&&m(this,tr)&&(i["x-mappedin-key"]=btoa(m(this,tr)),i["x-mappedin-secret"]=btoa(m(this,di))),An()(n,{method:"GET",mode:"cors",headers:i})}updateAnalyticsUserPosition(e){H(this,Sr,e?{...e,bluedotTimestamp:Date.now()}:void 0)}locationSelected(e){let t=e.id||e;tt.addPendingEvent(new $i({venue:m(this,hi)})),this.track("select-location",{id:t})}categorySelected(e){let t=e.id||e;tt.addPendingEvent(new Xi({venue:m(this,hi)})),this.track("select-category",{id:t})}mapViewLoaded(e,t,r,n){this.track("load-mapview",{type:e,force:t,benchmark:r||-1,reason:n||"success"})}getDirections(e,t){let r={start:e.id,end:t.id,type:"location_to_location"};this.track("query-directions",r)}getSessionID(){return m(this,li)}getDeviceID(){return m(this,ui)}setGeolocationMode(e){H(this,oi,e)}trackBlueDotEvent(t){t&&Object.values(e.BLUEDOT_EVENT).includes(t)&&!m(this,fi).has(t)&&(this.track(t),m(this,fi).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=nu.find((t=>t===e));t&&(wf=t)}static clearContext(){wf=void 0}static destroy(){e.instance=null}};co=new WeakMap,oi=new WeakMap,si=new WeakMap,po=new WeakMap,ui=new WeakMap,li=new WeakMap,ci=new WeakMap,tr=new WeakMap,di=new WeakMap,pi=new WeakMap,fi=new WeakMap,fo=new WeakMap,hi=new WeakMap,Sr=new WeakMap,s(rn,"Analytics"),g(rn,"instance",null),g(rn,"BLUEDOT_EVENT",{ATTEMPT_BLUEDOT:"attempt-bluedot",FOUND_POSITION:"found-position",FOUND_FLOOR:"found-floor"});var _f=rn,ho=_f;y();var kf=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 r=this._subscribers[e].indexOf(t);-1!==r&&this._subscribers[e].splice(r,1)}destroy(){this._subscribers={}}};s(kf,"PubSub");var nr,gi,Or,mi,go,Mf,iu,qv,ru=kf,Vv={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",venue:""},xf=class extends ru{constructor(e){super(),G(this,go),G(this,iu),g(this,"perspective"),g(this,"things"),g(this,"options"),G(this,nr,void 0),G(this,gi,""),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"),G(this,Or,{}),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"),G(this,mi,void 0),g(this,"images"),g(this,"imageBinaries"),g(this,"scenes"),g(this,"analytics"),g(this,"navigator"),this.options=e,H(this,nr,bt.create(this));let t=ho.create({...e,testMode:!(null!=e&&e.emitAnalyticsEvents)});this.analytics={locationSelected:t.locationSelected,categorySelected:t.categorySelected,getDirections:t.getDirections},globalThis.MappedinDebug||(globalThis.MappedinDebug={enable(){globalThis.sessionStorage.setItem(Gf,"true")}})}generateGetters(e){try{for(let t=0,r=e.length;t<r;++t){let r=e[t];Array.isArray(this[r])&&(Object.defineProperty(this,"_".concat(r,"ByExternalId"),{configurable:!0,get(){let e=m(this,nr)[r];if(null!=e)return e;let t={};return this[r].forEach((e=>t[e.externalId]=e)),m(this,nr)[r]=t,t}}),Object.defineProperty(this,"_".concat(r,"ById"),{configurable:!0,get(){let e=m(this,nr)[r];if(null!=e)return e;let t={};return this[r].forEach((e=>t[e.id]=e)),m(this,nr)[r]=t,t}}))}return this}catch(e){throw new Error("Unable to generate getters, "+e)}}getCollectionItemById(e,t){let r="_".concat(e,"ById"),n="_".concat(e,"ByExternalId"),i=this[r];return null!=i&&null!=i[t]||(i=this[n],null!=i&&null!=i[t])?i[t]:null}async hydrateFromMVF(e){let t=vv(e);return this.hydrate(t)}async hydrateFromMVFv1(e){let t=yv(e);return this.hydrate(t)}async changeLanguage(e,t=!0){var r;let n=e.toLowerCase();if(this.currentLanguage.code.toLowerCase()!==n){if(null==(r=this.venue.languages)||!r.find((e=>e.code.toLowerCase()===n)))return void oe.error("Language ".concat(n," not found in venue ").concat(this.venue.slug));if(t&&!m(this,Or)[this.currentLanguage.code]&&(m(this,Or)[this.currentLanguage.code]=JSON.stringify(this.toJSON())),this.currentLanguage=this.venue.languages.find((e=>e.code.toLowerCase()===n)),null!=m(this,Or)[n]){let e=JSON.parse(m(this,Or)[n]);await this.hydrate(e,!1,!0)}else this.options.language=this.currentLanguage.code,await this.fetch(!0);this.publish(0,this.currentLanguage)}}async hydrate(e,t=!1,r=!1){let n;if("string"==typeof e)try{H(this,gi,e),n=JSON.parse(e)}catch(e){return void oe.error("Unable to parse JSON",e)}else n=e,H(this,gi,JSON.stringify(n));let i=Object.keys(n);for(let e=0,t=i.length;e<t;++e){let t=i[e],o=n[t],a=Ys[t];null!=a&&"function"==typeof a.hydrate&&(r?"updateInPlace"in a&&"function"==typeof a.updateInPlace&&a.updateInPlace(this,o):this[t]=a.hydrate(o,this))}t&&await Em(n);let{images:o,scenes:a,imageBinaries:s}=n;this.images=o,this.scenes=a,this.imageBinaries=s,r||this.generateGetters(i),Ke(this,go,Mf).call(this),this.initNavigator()}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"]),Ws(this.options.clientId)||this.options.things.rankings&&delete this.options.things.rankings;let{things:t}=this.options,r=[],n=Object.keys(t);for(let t=0,i=n.length;t<i;++t){let i=n[t],o=Ys[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()))),r.push(t)}}return r.push($r(this.options,"cdn-access-token",{venue:this.options.venue},!1).then((e=>H(this,mi,e.token)),(()=>Promise.resolve()))),e||this.generateGetters(n),Promise.all(r).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,Ke(this,go,Mf).call(this),this.initNavigator()}))}initNavigator(){this.navigator=new Pu({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()))})}toJSON(){var e;let t={};for(let e in Ys)Array.isArray(this[e])&&(t[e]=this[e].map((e=>e.toJSON())));let r={...t,venue:this.venue.toJSON()};return null!=this.rankings&&(r.rankings=null==(e=this.rankings)?void 0:e.toJSON()),delete r.locationRankings,r}toString(){return m(this,gi)||JSON.stringify(this.toJSON())}};nr=new WeakMap,gi=new WeakMap,Or=new WeakMap,mi=new WeakMap,go=new WeakSet,Mf=s((function(){m(this,mi)&&this.maps.forEach((e=>{var t;null!=(t=e.scene)&&t.polygons&&(e.scene.polygons+="?".concat(m(this,mi)))})),Ke(this,iu,qv).call(this)}),"#transformData"),iu=new WeakSet,qv=s((function(){let e=this.categories.filter((e=>e.sortOrder)).map((e=>e.sortOrder));if(e.length<=0)return;let t=Math.min(...e),r=Math.max(...e);this.polygons.forEach((e=>{var n,i;let o=Sm(e,this);if(o){let a=o.categories.filter((e=>e.sortOrder)).map((e=>e.sortOrder));if(a.length>0){let o=Math.min(...a);e.categoryRank=Tm(o,t,r,null!=(i=null==(n=e.rank)?void 0:n.score)?i:0)}}}))}),"#applyCategoryRankToPolygons"),s(xf,"Mappedin");var Ln=xf;y();var Pr=an(Uv());y();var BE=["0","1","2","3","4","5","6","7","8","9"],VE=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],qE=["0","1","2","3","4","5","6","7","8","9"],UE=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],gF=[...BE,...VE,...qE,...UE],Gv=["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"];y();var GE=32,It=!1,WE=120,Sf=0,Pf=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,It&&oe.log("update instantiated",this.name)}getLastFrameTime(){return this._lastFrameTime}};s(Pf,"FrameUpdate");var au=Pf,If=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,It&&oe.log("task instantiated",this.name)}isComplete(){return this._complete}getLastFrameTime(){return this._lastFrameTime}};s(If,"FrameTask");var Dn=If,Af=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,It&&oe.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(Af,"FrameTaskGroup");var ou=Af,Cf=class{constructor(e){g(this,"_maxMillisecondsPerFrame"),g(this,"_time"),this._maxMillisecondsPerFrame=null!=(null==e?void 0:e.maxMillisecondsPerFrame)?e.maxMillisecondsPerFrame:GE,this._time=0}beginFrame(){this._time=performance.now()+this._maxMillisecondsPerFrame}hasTimeRemaining(){return performance.now()<=this._time}};s(Cf,"RealTimeTimer");var Of=Cf,jf=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 Of,this._performance=null!=(null==e?void 0:e.performance)&&e.performance,this._scheduledUpdatesByOrdering=new vi,this._scheduledTasksByPriority=new vi,this._postponedTasks=new Set,this._requestAnimationFrameHandle=null,this._updatesToRunThisFrame=[],this._lastFrameTime=0,this._updatesRunLastFrame=new Set,this.update=this.update.bind(this),It&&oe.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 vi,this._scheduledTasksByPriority=new vi,this._postponedTasks=new Set,this._lastFrameTime=0,this._updatesRunLastFrame.clear(),It&&oe.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 r;this._timer.beginFrame(),this._performance&&(r=performance.now());let n=!1;It&&(0===Sf&&(n=!0),++Sf,Sf%=WE);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),n&&oe.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,n&&oe.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 r;this._performance&&(r=performance.now()),t._callback(e),this._performance&&(t._lastFrameTime=performance.now()-r),n&&oe.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()-r),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,r=this._scheduledTasksByPriority.popFromMaxKey(),n=null;oe.assert(void 0!==r),Object.getPrototypeOf(r)===ou.prototype&&(n=r,r=n._popTask()),oe.assert(void 0!==r),oe.assert(Object.getPrototypeOf(r)===Dn.prototype),this._performance&&(t=performance.now()),r._callback(e),r._complete=!0,this._performance&&(r._lastFrameTime=performance.now()-t),It&&oe.log("task completed",r.name),null!=n&&(n.isComplete()?(n.clear(),n._onComplete(),It&&oe.log("group completed",n.name)):this._scheduledTasksByPriority.insert(n._priority,n))}scheduleUpdate(e){e._remainingFrameCount=e._frameCount,this._scheduledUpdatesByOrdering.insert(e._ordering,e),this.requestAnimationFrame()}scheduleTask(e){if(Object.getPrototypeOf(e)===ou)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,It&&oe.log("task scheduled",e.name),this.requestAnimationFrame()}cancelUpdate(e){this._scheduledUpdatesByOrdering.delete(e._ordering,e),It&&oe.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)===Dn.prototype?e._cancelled=!0:"clear"in e&&e.clear(),It&&oe.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)===Dn.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)===Dn.prototype||!e.isComplete())&&this._postponedTasks.add(e),e._postponed=!0,It&&oe.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)===Dn.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)===Dn.prototype||!e.isComplete())&&this._scheduledTasksByPriority.insert(e._priority,e),e._postponed=!1,this.requestAnimationFrame(),It&&oe.log("task resumed",e.name)}}setTaskPriority(e,t){if(Object.getPrototypeOf(e)===Dn.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,It&&oe.log("task priority changed",e.name,t)}};s(jf,"TaskScheduler");var su=jf,Nf=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(oe.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,r={[Symbol.iterator]:()=>r,next:()=>{if(null==t){let r=e.next();if(r.done)return r;t=this._map.get(r.value).values()}let r=t.next();for(;r.done;){let n=e.next();if(n.done)return n;t=this._map.get(n.value).values(),r=t.next()}return r}};return r}keys(){return this._sortedKeys}get size(){let e=0;for(let t of this._map.values())e+=t.size;return oe.assert(e===this._size),e}};s(Nf,"Multimap");var vi=Nf,zn=s((e=>e.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()),"removeAccents"),YE=/([!-/:-@])|(?:[\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 HE(e){return e.split(YE).filter(Boolean)}s(HE,"tokenizeAndCaptureDelimiters");var Bn,Yt,rr,wn,it,vo,yo,bi,bo,wo,_o,ko,wi,Vn,uu,lu,ir,Mo,cu,du,pu,Yv,yi="",XE=.09,$E=1,KE=.025,JE=.5,QE=5e-4,ZE=5e-4,eT=.01,tT=.05,Wv=1,nT=.01,rT=.2,iT={MappedinCategory:"categories",MappedinLocation:"locations"},aT={searchDescriptions:!0,searchTags:!0,searchTagsInCategories:!1,searchDescriptionsInCategories:!1,stopWords:Gv,jsonIndex:void 0,useLocationRank:!0,emitAnalyticsEvents:"production"===R.env.NODE_ENV,constants:{PRIMARY_INDEX_FUZZYNESS:XE,PRIMARY_INDEX_WEIGHT:$E,SECONDARY_INDEX_WEIGHT:KE,CATEGORY_NAME_WEIGHT:JE,LOCATION_NAME_WEIGHT:Wv,CATEGORY_LOCATION_DESCRIPTION_WEIGHT:QE,CATEGORY_LOCATION_TAGS_WEIGHT:ZE,CATEGORY_LOCATION_NAME_WEIGHT:eT,PRIMARY_INDEX_TAGS_NAME_WEIGHT:tT,LOCATION_DEFAULT_RANK:Wv,RATIO_OF_FUZZY_TO_EXACT:nT,RATIO_OF_PREFIX_TO_EXACT:rT}},Lf=class{constructor(e,t){var r;G(this,pu),G(this,Bn,void 0),G(this,Yt,void 0),G(this,rr,void 0),G(this,wn,void 0),G(this,it,void 0),G(this,vo,new su({performance:!0})),G(this,yo,void 0),G(this,bi,void 0),G(this,bo,new Map),G(this,wo,void 0),G(this,_o,void 0),G(this,ko,void 0),g(this,"buildIndices",s((()=>{var e,t;H(this,ir,new Promise((e=>{H(this,Mo,e)})));let{PRIMARY_INDEX_FUZZYNESS:r,PRIMARY_INDEX_WEIGHT:n,CATEGORY_NAME_WEIGHT:i,RATIO_OF_FUZZY_TO_EXACT:o,RATIO_OF_PREFIX_TO_EXACT:a,PRIMARY_INDEX_TAGS_NAME_WEIGHT:s}=m(this,it).constants,l=["object","query","weight","tag","rank"],u={fields:["query","name","tag"],storeFields:l,searchOptions:{combineWith:"OR",prefix:!0,fuzzy:r},boost:{name:n,query:n,tag:s},weights:{fuzzy:o,prefix:a},boostDocument:e=>e.includes("MappedinLocation")?n:e.includes("MappedinCategory")?i:n,tokenize:HE},c={fields:["description"],storeFields:l,searchOptions:{combineWith:"AND",prefix:!0,fuzzy:.1},processTerm:(e,t)=>{var r;return null!=(r=m(this,yo))&&r.has(e.toLowerCase())?null:e.toLowerCase()}},d={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=m(this,it))&&e.jsonIndex){let{primary:e,secondary:r,extra:n}=JSON.parse(null==(t=m(this,it))?void 0:t.jsonIndex);H(this,Yt,Pr.default.loadJS(e,u)),H(this,rr,Pr.default.loadJS(r,c)),H(this,wn,Pr.default.loadJS(n,d))}else H(this,Yt,new Pr.default(u)),H(this,rr,new Pr.default(c)),H(this,wn,new Pr.default(d)),m(this,Bn).locations.forEach(m(this,uu)),m(this,Bn).categories.forEach(m(this,lu));m(this,vo).update(performance.now())}),"buildIndices")),G(this,wi,0),G(this,Vn,s((e=>{yu(this,wi)._++,m(this,vo).scheduleUpdate(new au({name:"updateIndex",ordering:0,frameCount:1,callback:()=>{e(),yu(this,wi)._--,0===m(this,wi)&&m(this,Mo).call(this)}}))}),"#addTask")),G(this,uu,s((e=>{var t,r,n;let{SECONDARY_INDEX_WEIGHT:i,LOCATION_DEFAULT_RANK:o,PRIMARY_INDEX_TAGS_NAME_WEIGHT:a}=m(this,it).constants,s=o;null!=(t=m(this,it))&&t.useLocationRank&&(s=Array.isArray(e.polygons)?Math.max(...e.polygons.map((e=>{var t,r;return null!=(t=e.rank)&&t.score?null==(r=e.rank)?void 0:r.score:o})),o):o),m(this,Vn).call(this,(()=>{m(this,Yt).add({name:zn(e.name),tags:"",id:"MappedinLocation_"+e.id,weight:o,rank:s})})),null!=(r=m(this,it))&&r.searchTags&&Array.isArray(e.tags)&&e.tags.forEach((t=>{m(this,Yt).add({name:"",tag:zn(t),id:"MappedinLocation_"+e.id,weight:a,rank:s})})),null!=(n=m(this,it))&&n.searchDescriptions&&m(this,Vn).call(this,(()=>m(this,rr).add({description:zn(e.description||""),id:"MappedinLocation_"+e.id,weight:i,rank:s})))}),"#processLocation")),G(this,lu,s((e=>{var t,r;let{CATEGORY_LOCATION_DESCRIPTION_WEIGHT:n,CATEGORY_LOCATION_TAGS_WEIGHT:i,CATEGORY_LOCATION_NAME_WEIGHT:o,CATEGORY_NAME_WEIGHT:a}=m(this,it).constants;m(this,Vn).call(this,(()=>m(this,Yt).add({name:zn(e.name||""),description:"",id:"MappedinCategory_"+e.id,weight:a})));let s=e.locations.reduce(((e,t)=>e+" ".concat(yi," ")+t.name),"")+" ".concat(yi);if(null!=(t=m(this,it))&&t.searchDescriptionsInCategories&&e.locations.forEach((t=>{null!=t.description&&m(this,Vn).call(this,(()=>m(this,wn).add({id:"MappedinCategory_"+e.id,"category.locations.description":zn(t.description),ref:t.name,weight:n})))})),null!=(r=m(this,it))&&r.searchTagsInCategories){let t=e.locations.reduce(((e,t)=>{var r;return e+(null==(r=t.tags)?void 0:r.reduce(((e,t)=>e+" ".concat(yi," ")+t),""))+" ".concat(yi)}),"");m(this,Vn).call(this,(()=>m(this,wn).add({"category.locations.tags":zn(t),id:"MappedinCategory_"+e.id,weight:i})))}m(this,Vn).call(this,(()=>m(this,wn).add({"category.locations.name":zn(s),id:"MappedinCategory_"+e.id,weight:o})))}),"#processCategory")),G(this,ir,void 0),G(this,Mo,void 0),G(this,cu,s((e=>{var t;let r=e.score,{object:n,id:i,weight:o,rank:a}=e,[s,l]=i.split("_"),u=n||m(this,Bn).getCollectionItemById(iT[s],l);return a&&null!=(t=m(this,it))&&t.useLocationRank&&(r+=a),o&&(r*=o),{score:r,type:s,object:u}}),"#processSearchResult")),G(this,du,s(((e,t)=>{for(let r in e.match)e.match[r].forEach((n=>{let i=e.ref||e[n]||t.object[n];if("category.locations.tags"===n||"category.locations.name"===n){let t=new RegExp("[^".concat(yi,"]* ")+r+" [^".concat(yi,"]*"),"ig").exec(e[n]);null!=t&&(i=t[0].slice(1,-1))}t.matches.push({term:r,weight:e.weight,matchesOn:n,value:i})}))}),"#addMatches")),H(this,bi,ho.create({...e.options,testMode:!1===(null==t?void 0:t.emitAnalyticsEvents)})),H(this,it,{...aT,...t}),H(this,Bn,e),H(this,yo,new Set(null==(r=m(this,it))?void 0:r.stopWords));let n=m(this,Bn).venue.slug;m(this,Bn).on(0,this.buildIndices),this.buildIndices(),H(this,wo,ri((e=>{m(this,bi).trackSearchSuggest({query:e}),tt.addPendingEvent(new ua({venue:n}))}),300)),H(this,_o,ri((e=>{m(this,bi).trackSearch({query:e}),tt.addPendingEvent(new sa({venue:n}))}),300)),H(this,ko,ri((()=>{tt.addPendingEvent(new aa({venue:n}))}),300)),tt.addPendingEvent(new oa({search_descriptions:m(this,it).searchDescriptions,search_tags:m(this,it).searchTags,search_descriptions_in_categories:m(this,it).searchDescriptionsInCategories,search_tags_in_categories:m(this,it).searchTagsInCategories,use_location_rank:m(this,it).useLocationRank,venue:n}))}async suggest(e){await m(this,ir);let{PRIMARY_INDEX_FUZZYNESS:t,PRIMARY_INDEX_WEIGHT:r,PRIMARY_INDEX_TAGS_NAME_WEIGHT:n,RATIO_OF_FUZZY_TO_EXACT:i,RATIO_OF_PREFIX_TO_EXACT:o}=m(this,it).constants,a=m(this,Yt).autoSuggest(e,{fields:["name","tag","query"],combineWith:"AND",prefix:!0,fuzzy:t,boost:{name:r,query:r,tag:n},weights:{fuzzy:i,prefix:o}});return m(this,wo).call(this,e),{total:a.length,hits:a.map((e=>({text:e.suggestion})))}}async search(e){await m(this,ir);let t=Ke(this,pu,Yv).call(this,e);return m(this,_o).call(this,e),t}async toJSON(){return await m(this,ir),JSON.stringify({primary:m(this,Yt),secondary:m(this,rr),extra:m(this,wn)})}async addQuery(e){let t,r,{query:n,object:i,weight:o=1}=e;await m(this,ir),t=i instanceof Cn?"MappedinLocation":i instanceof Mr?"MappedinCategory":"Custom","MappedinLocation"===t||"MappedinCategory"===t?r=t+"_"+i.id:"string"==typeof i.id?r="Custom_"+i.id:(r=m(this,bo).get(i),r||(r="Custom_"+Nn(),m(this,bo).set(i,r))),m(this,Yt).add({id:r,weight:o,object:i,query:zn(n)}),m(this,ko).call(this)}};Bn=new WeakMap,Yt=new WeakMap,rr=new WeakMap,wn=new WeakMap,it=new WeakMap,vo=new WeakMap,yo=new WeakMap,bi=new WeakMap,bo=new WeakMap,wo=new WeakMap,_o=new WeakMap,ko=new WeakMap,wi=new WeakMap,Vn=new WeakMap,uu=new WeakMap,lu=new WeakMap,ir=new WeakMap,Mo=new WeakMap,cu=new WeakMap,du=new WeakMap,pu=new WeakSet,Yv=s((function(e){let t=[],r=zn(e);t=[...m(this,Yt).search(r),...m(this,rr).search(r),...m(this,wn).search(r)].sort(((e,t)=>t.score-e.score));let n={};for(let e of t){let t=m(this,cu).call(this,e);n[e.id]?n[e.id].score+=t.score:n[e.id]={...t,matches:[]},m(this,du).call(this,e,n[e.id])}return Object.keys(n).map((e=>({...n[e],matches:n[e].matches.sort(((e,t)=>t.weight-e.weight))}))).sort(((e,t)=>t.score-e.score))}),"#doSearch"),s(Lf,"OfflineSearch");var mo=Lf;y();var Ff=globalThis.fetch;function An(){if(null==Ff)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return Ff}function $v(e){Ff=e}s(An,"isomorphicFetch"),s($v,"setFetchFn");var Hv,oT=null==(Hv=null==R?void 0:R.env)?void 0:Hv.npm_package_version;globalThis.btoa||(globalThis.btoa=Xv.encode);var sT=["ar"];function Rf(e){var t;let r={...Vv,...e};return r.headers={...r.headers,"mappedin-sdk-version":oT},r.things=Om("things"in e?e.things:void 0),"platformString"in e&&(r.headers={...r.headers,"mappedin-platform-version":e.platformString}),r.noAuth||(r.accessToken?r.authorization="Bearer ".concat(r.accessToken):r.clientId&&r.clientSecret&&(r.authorization="Basic ".concat(globalThis.btoa("".concat(r.clientId,":").concat(r.clientSecret))))),r.language=null==(t=r.language)?void 0:t.toLowerCase(),r}async function Df(e){let t={emitAnalyticsEvents:!0,secure:!0,...e},r=Rf({baseUrl:"https://api-gateway.mappedin.com/",...t}),n="public/1/".concat(r.useDraftData?"draft/":""),i=new Ln({...r,baseUrl:r.baseUrl+n});return await i.fetch(),t.emitAnalyticsEvents,tt.addPendingEvent(new Ki({venue:r.venue})),i}s(Rf,"parseOptions"),s(Df,"getVenue");var Kv={shouldPopulateBundledImagesAsBlobs:!(typeof globalThis.navigator<"u"&&"ReactNative"==globalThis.navigator.product)};async function zf(e){let t=Rf({baseUrl:"https://api-gateway.mappedin.com/",...Kv,...e}),{url:r,updated_at:n}=await uT(e),i=await An()(r,{mode:"cors"}),{data:o,format:a="jsonstring"}=await i.json();if("jsonstring"!==a)throw new Error("Unrecognized format ".concat(a));let s=new Ln(t);return await s.hydrate(o,t.shouldPopulateBundledImagesAsBlobs),s.updatedAt=n,s}async function uT(e){let t=Rf({baseUrl:"https://api-gateway.mappedin.com/",...Kv,...e}),{version:r,venue:n}=e,i="".concat(e.bundleBaseUri||t.baseUrl+"exports/legacy".concat(null!=t.language&&sT.includes(t.language)?"-"+t.language:"","/1/bundle"),"?venue=").concat(n,"&version=1.0.0");return t.language=void 0,await Fp(t,i)}s(zf,"getVenueBundle"),s(uT,"getVenueBundleURL");var lT=!1;function cT(e){e.things=e.things||{},e.things.venue=e.things.venue||[],e.things.venue.push("slug","defaultMap"),e.things.nodes=e.things.nodes||[],e.things.nodes.push("x","y","paths","map"),e.things.polygons=e.things.polygons||[],e.things.locations=e.things.locations||[],e.things.locations.push("sortOrder","parent","showLabelWhenImagePresent","hidden"),e.things.maps=e.things.maps||[],e.things.maps.push("height","width","georeference"),e.perspective=e.perspective3D||e.perspective||void 0,e.things.maps.push("scene","layers"),e.things.polygons.push("canvasBounds","map","image","perspectives","material","holes","label","geometry"),lT&&e.things.polygons.push("layer","geometry","vertexes")}s(cT,"parseOptions");var dT=s((function(e){return null==e.mapView&&(e.mapView={}),new Promise((function(t,r){function n(n,i){if(n)r(n);else{let n={};try{e.firstMapSelector&&(e.mapView=e.mapView||{},e.mapView.firstMap=e.firstMapSelector(i))}catch(e){oe.error("Failure in firstMapSelector! Loading default map instead."),oe.error(e),r(e)}n.venue=i,t(n)}}s(n,"handleInit"),cT(e.venue),e.venue.useVenueBundle?zf(e.venue).then((e=>n(null,e))).catch((e=>n(e,null))):Df(e.venue).then((e=>n(null,e))).catch((e=>n(e,null)))}))}),"initialize");
1
+ "use strict";var R,ey=Object.create,Ar=Object.defineProperty,ty=Object.getOwnPropertyDescriptor,ny=Object.getOwnPropertyNames,ry=Object.getPrototypeOf,iy=Object.prototype.hasOwnProperty,ay=(e,t,r)=>t in e?Ar(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,s=(e,t)=>Ar(e,"name",{value:t,configurable:!0}),To=(e,t)=>()=>(e&&(t=e(e=0)),t),pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),So=(e,t)=>{for(var r in t)Ar(e,r,{get:t[r],enumerable:!0})},Vf=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of ny(t))!iy.call(e,i)&&i!==r&&Ar(e,i,{get:()=>t[i],enumerable:!(n=ty(t,i))||n.enumerable});return e},an=(e,t,r)=>(r=null!=e?ey(ry(e)):{},Vf(!t&&e&&e.__esModule?r:Ar(r,"default",{value:e,enumerable:!0}),e)),We=e=>Vf(Ar({},"__esModule",{value:!0}),e),g=(e,t,r)=>(ay(e,"symbol"!=typeof t?t+"":t,r),r),vu=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},m=(e,t,r)=>(vu(e,t,"read from private field"),r?r.call(e):t.get(e)),G=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},H=(e,t,r,n)=>(vu(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),yu=(e,t,r,n)=>({set _(n){H(e,t,n,r)},get _(){return m(e,t,n)}}),Ke=(e,t,r)=>(vu(e,t,"access private method"),r),y=To((()=>{R={env:{NODE_ENV:"production",npm_package_version:"5.37.0"}}})),qf=pe(((e,t)=>{y(),function(r){var n="object"==typeof e&&e,i="object"==typeof t&&t&&t.exports==n&&t,o="object"==typeof global&&global;(o.global===o||o.window===o)&&(r=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,d=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 r,n,i=0,o="",a=-1;++a<t;)n=u.indexOf(e.charAt(a)),r=i%4?64*r+n:n,i++%4&&(o+=String.fromCharCode(255&r>>(-2*i&6)));return o}),"decode"),h={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,r,n,i,o=e.length%3,a="",s=-1,c=e.length-o;++s<c;)t=e.charCodeAt(s)<<16,r=e.charCodeAt(++s)<<8,n=e.charCodeAt(++s),a+=u.charAt((i=t+r+n)>>18&63)+u.charAt(i>>12&63)+u.charAt(i>>6&63)+u.charAt(63&i);return 2==o?(t=e.charCodeAt(s)<<8,r=e.charCodeAt(++s),a+=u.charAt((i=t+r)>>10)+u.charAt(i>>4&63)+u.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(s),a+=u.charAt(i>>2)+u.charAt(i<<4&63)+"=="),a}),"encode"),decode:d,version:"1.0.0"};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define((function(){return h}));else if(n&&!n.nodeType)if(i)i.exports=h;else for(var p in h)h.hasOwnProperty(p)&&(n[p]=h[p]);else r.base64=h}(e)})),Uf=pe(((e,t)=>{var r,n;y(),r=typeof self<"u"?self:e,n=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return s(r,"r"),r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){r.r(t),r.d(t,"computeDestinationPoint",(function(){return L})),r.d(t,"convertArea",(function(){return N})),r.d(t,"convertDistance",(function(){return D})),r.d(t,"convertSpeed",(function(){return R})),r.d(t,"decimalToSexagesimal",(function(){return W})),r.d(t,"findNearest",(function(){return H})),r.d(t,"getAreaOfPolygon",(function(){return X})),r.d(t,"getBounds",(function(){return Y})),r.d(t,"getBoundsOfDistance",(function(){return K})),r.d(t,"getCenter",(function(){return $})),r.d(t,"getCenterOfBounds",(function(){return J})),r.d(t,"getCompassDirection",(function(){return Q})),r.d(t,"getCoordinateKey",(function(){return v})),r.d(t,"getCoordinateKeys",(function(){return x})),r.d(t,"getDistance",(function(){return z})),r.d(t,"getDistanceFromLine",(function(){return ee})),r.d(t,"getGreatCircleBearing",(function(){return te})),r.d(t,"getLatitude",(function(){return A})),r.d(t,"getLongitude",(function(){return P})),r.d(t,"getPathLength",(function(){return ne})),r.d(t,"getPreciseDistance",(function(){return ie})),r.d(t,"getRhumbLineBearing",(function(){return Z})),r.d(t,"getRoughCompassDirection",(function(){return oe})),r.d(t,"getSpeed",(function(){return ae})),r.d(t,"isDecimal",(function(){return y})),r.d(t,"isPointInLine",(function(){return se})),r.d(t,"isPointInPolygon",(function(){return le})),r.d(t,"isPointNearLine",(function(){return ue})),r.d(t,"isPointWithinRadius",(function(){return ce})),r.d(t,"isSexagesimal",(function(){return m})),r.d(t,"isValidCoordinate",(function(){return I})),r.d(t,"isValidLatitude",(function(){return E})),r.d(t,"isValidLongitude",(function(){return S})),r.d(t,"orderByDistance",(function(){return q})),r.d(t,"sexagesimalToDecimal",(function(){return b})),r.d(t,"toDecimal",(function(){return T})),r.d(t,"toRad",(function(){return F})),r.d(t,"toDeg",(function(){return j})),r.d(t,"wktToPolygon",(function(){return pe})),r.d(t,"sexagesimalPattern",(function(){return n})),r.d(t,"earthRadius",(function(){return i})),r.d(t,"MINLAT",(function(){return o})),r.d(t,"MAXLAT",(function(){return a})),r.d(t,"MINLON",(function(){return l})),r.d(t,"MAXLON",(function(){return u})),r.d(t,"longitudeKeys",(function(){return c})),r.d(t,"latitudeKeys",(function(){return d})),r.d(t,"altitudeKeys",(function(){return h})),r.d(t,"distanceConversion",(function(){return p})),r.d(t,"timeConversion",(function(){return f})),r.d(t,"areaConversion",(function(){return g}));var n=/^([0-9]{1,3})°\s*([0-9]{1,3}(?:\.(?:[0-9]{1,}))?)['′]\s*(([0-9]{1,3}(\.([0-9]{1,}))?)["″]\s*)?([NEOSW]?)$/,i=6378137,o=-90,a=90,l=-180,u=180,c=["lng","lon","longitude",0],d=["lat","latitude",1],h=["alt","altitude","elevation","elev",2],p={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},f={m:60,h:3600,d:86400},g={m2:1,km2:1e-6,ha:1e-4,a:.01,ft2:10.763911,yd2:1.19599,in2:1550.0031};g.sqm=g.m2,g.sqkm=g.km2,g.sqft=g.ft2,g.sqyd=g.yd2,g.sqin=g.in2;var v=s((function(e,t){return t.reduce((function(t,r){if(null==e)throw new Error("'".concat(e,"' is no valid coordinate."));return Object.prototype.hasOwnProperty.call(e,r)&&void 0!==r&&void 0===t?(t=r,r):t}),void 0)}),"m"),y=s((function(e){var t=e.toString().trim();return!isNaN(parseFloat(t))&&parseFloat(t)===Number(t)}),"v"),m=s((function(e){return n.test(e.toString().trim())}),"p"),b=s((function(e){var t=new RegExp(n).exec(e);if(null==t)throw new Error("Given value is not in sexagesimal format");var r=Number(t[2])/60||0,i=Number(t[4])/3600||0,o=parseFloat(t[1])+r+i;return["S","W"].includes(t[7])?-o:o}),"y");function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){M(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function M(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}s(_,"b"),s(w,"M"),s(M,"O");var x=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{longitude:c,latitude:d,altitude:h},r=v(e,t.longitude),n=v(e,t.latitude),i=v(e,t.altitude);return w({latitude:n,longitude:r},i?{altitude:i}:{})}),"S"),E=s((function e(t){return y(t)?!(parseFloat(t)>a||t<o):!!m(t)&&e(b(t))}),"t"),S=s((function e(t){return y(t)?!(parseFloat(t)>u||t<l):!!m(t)&&e(b(t))}),"t"),I=s((function(e){var t=x(e),r=t.latitude,n=t.longitude;if(Array.isArray(e)&&e.length>=2)return S(e[0])&&E(e[1]);if(void 0===r||void 0===n)return!1;var i=e[n],o=e[r];return void 0!==o&&void 0!==i&&!1!==E(o)&&!1!==S(i)}),"j");function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}s(k,"w"),s(C,"x"),s(O,"E");var T=s((function e(t){if(y(t))return Number(t);if(m(t))return b(t);if(I(t)){var r=x(t);return Array.isArray(t)?t.map((function(t,r){return[0,1].includes(r)?e(t):t})):C(C(C({},t),r.latitude&&O({},r.latitude,e(t[r.latitude]))),r.longitude&&O({},r.longitude,e(t[r.longitude])))}return Array.isArray(t)?t.map((function(t){return I(t)?e(t):t})):t}),"t"),A=s((function(e,t){var r=v(e,d);if(null!=r){var n=e[r];return!0===t?n:T(n)}}),"A"),P=s((function(e,t){var r=v(e,c);if(null!=r){var n=e[r];return!0===t?n:T(n)}}),"I"),F=s((function(e){return e*Math.PI/180}),"W"),j=s((function(e){return 180*e/Math.PI}),"D"),L=s((function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:6371e3,i=A(e),o=P(e),a=t/n,s=F(r),c=F(i),d=F(o),h=Math.asin(Math.sin(c)*Math.cos(a)+Math.cos(c)*Math.sin(a)*Math.cos(s)),p=d+Math.atan2(Math.sin(s)*Math.sin(a)*Math.cos(c),Math.cos(a)-Math.sin(c)*Math.sin(h)),f=j(p);return(f<l||f>u)&&(p=(p+3*Math.PI)%(2*Math.PI)-Math.PI,f=j(p)),{latitude:j(h),longitude:f}}),"F"),N=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=g[t];if(r)return e*r;throw new Error("Invalid unit used for area conversion.")}),"C"),D=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m",r=p[t];if(r)return e*r;throw new Error("Invalid unit used for distance conversion.")}),"k"),R=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kmh";switch(t){case"kmh":return e*f.h*p.km;case"mph":return e*f.h*p.mi;default:return e}}),"T");function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return U(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return U(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}s(B,"q"),s(U,"$");var G=s((function(e){var t=Math.pow(10,12);return Math.round(e*t)/t}),"B"),W=s((function(e){var t=B(e.toString().split("."),2),r=t[0],n=t[1],i=Math.abs(Number(r)),o=G(60*+("0."+(n||0))),a=Math.floor(o),s=G(60*(o%a||0));return i+"° "+Number(a.toFixed(6)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+"' "+Number(s.toFixed(4)).toString().split(".").map((function(e,t){return 0===t?e.padStart(2,"0"):e})).join(".")+'"'}),"R"),V=s((function(e){return e>1?1:e<-1?-1:e}),"X"),z=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;r=void 0===r||isNaN(r)?1:r;var n=A(e),o=P(e),a=A(t),s=P(t),l=Math.acos(V(Math.sin(F(a))*Math.sin(F(n))+Math.cos(F(a))*Math.cos(F(n))*Math.cos(F(o)-F(s))))*i;return Math.round(l/r)*r}),"_"),q=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:z;return r="function"==typeof r?r:z,t.slice().sort((function(t,n){return r(e,t)-r(e,n)}))}),"K"),H=s((function(e,t){return q(e,t)[0]}),"Y"),X=s((function(e){var t=0;if(e.length>2){for(var r,n,o,a=0;a<e.length;a++){a===e.length-2?(r=e.length-2,n=e.length-1,o=0):a===e.length-1?(r=e.length-1,n=0,o=1):(r=a,n=a+1,o=a+2);var s=P(e[r]),l=A(e[n]),u=P(e[o]);t+=(F(u)-F(s))*Math.sin(F(l))}t=t*i*i/2}return Math.abs(t)}),"Z"),Y=s((function(e){if(!1===Array.isArray(e)||0===e.length)throw new Error("No points were given.");return e.reduce((function(e,t){var r=A(t),n=P(t);return{maxLat:Math.max(r,e.maxLat),minLat:Math.min(r,e.minLat),maxLng:Math.max(n,e.maxLng),minLng:Math.min(n,e.minLng)}}),{maxLat:-1/0,minLat:1/0,maxLng:-1/0,minLng:1/0})}),"G"),K=s((function(e,t){var r,n,s=A(e),c=P(e),d=F(s),h=F(c),p=t/i,f=d-p,g=d+p,v=F(a),y=F(o),m=F(u),b=F(l);if(f>y&&g<v){var _=Math.asin(Math.sin(p)/Math.cos(d));(r=h-_)<b&&(r+=2*Math.PI),(n=h+_)>m&&(n-=2*Math.PI)}else f=Math.max(f,y),g=Math.min(g,v),r=b,n=m;return[{latitude:j(f),longitude:j(r)},{latitude:j(g),longitude:j(n)}]}),"V"),$=s((function(e){if(!1===Array.isArray(e)||0===e.length)return!1;var t=e.length,r=e.reduce((function(e,t){var r=F(A(t)),n=F(P(t));return{X:e.X+Math.cos(r)*Math.cos(n),Y:e.Y+Math.cos(r)*Math.sin(n),Z:e.Z+Math.sin(r)}}),{X:0,Y:0,Z:0}),n=r.X/t,i=r.Y/t,o=r.Z/t;return{longitude:j(Math.atan2(i,n)),latitude:j(Math.atan2(o,Math.sqrt(n*n+i*i)))}}),"U"),J=s((function(e){var t=Y(e),r=t.minLat+(t.maxLat-t.minLat)/2,n=t.minLng+(t.maxLng-t.minLng)/2;return{latitude:parseFloat(r.toFixed(6)),longitude:parseFloat(n.toFixed(6))}}),"z"),Z=s((function(e,t){var r=F(P(t))-F(P(e)),n=Math.log(Math.tan(F(A(t))/2+Math.PI/4)/Math.tan(F(A(e))/2+Math.PI/4));return Math.abs(r)>Math.PI&&(r=r>0?-1*(2*Math.PI-r):2*Math.PI+r),(j(Math.atan2(r,n))+360)%360}),"H"),Q=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Z,n="function"==typeof r?r(e,t):Z(e,t);if(isNaN(n))throw new Error("Could not calculate bearing for given points. Check your bearing function");switch(Math.round(n/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"}}),"J"),ee=s((function(e,t,r){var n=z(t,e),i=z(e,r),o=z(t,r),a=Math.acos(V((n*n+o*o-i*i)/(2*n*o))),s=Math.acos(V((i*i+o*o-n*n)/(2*i*o)));return a>Math.PI/2?n:s>Math.PI/2?i:Math.sin(a)*n}),"Q"),te=s((function(e,t){var r=A(t),n=P(t),i=A(e),o=P(e);return(j(Math.atan2(Math.sin(F(n)-F(o))*Math.cos(F(r)),Math.cos(F(i))*Math.sin(F(r))-Math.sin(F(i))*Math.cos(F(r))*Math.cos(F(n)-F(o))))+360)%360}),"tt");function re(e){return(re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}s(re,"nt");var ne=s((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z;return e.reduce((function(e,r){return"object"===re(e)&&null!==e.last&&(e.distance+=t(r,e.last)),e.last=r,e}),{last:null,distance:0}).distance}),"rt"),ie=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;r=void 0===r||isNaN(r)?1:r;var n,o,a,s,l,u,c,d=A(e),h=P(e),p=A(t),f=P(t),g=6356752.314245,v=1/298.257223563,y=F(f-h),m=Math.atan((1-v)*Math.tan(F(parseFloat(d)))),b=Math.atan((1-v)*Math.tan(F(parseFloat(p)))),_=Math.sin(m),w=Math.cos(m),M=Math.sin(b),x=Math.cos(b),E=y,S=100;do{var I=Math.sin(E),k=Math.cos(E);if(0===(u=Math.sqrt(x*I*(x*I)+(w*M-_*x*k)*(w*M-_*x*k))))return 0;n=_*M+w*x*k,o=Math.atan2(u,n),l=n-2*_*M/(s=1-(a=w*x*I/u)*a),isNaN(l)&&(l=0);var C=v/16*s*(4+v*(4-3*s));c=E,E=y+(1-C)*v*a*(o+C*u*(l+C*n*(2*l*l-1)))}while(Math.abs(E-c)>1e-12&&--S>0);if(0===S)return NaN;var O=s*(i*i-g*g)/(g*g),T=1+O/16384*(4096+O*(O*(320-175*O)-768)),j=O/1024*(256+O*(O*(74-47*O)-128)),L=j*u*(l+j/4*(n*(2*l*l-1)-j/6*l*(4*u*u-3)*(4*l*l-3))),N=g*T*(o-L);return Math.round(N/r)*r}),"et"),oe=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}),"it"),ae=s((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:z,n=r(e,t),i=Number(t.time)-Number(e.time),o=n/i*1e3;return o}),"ot"),se=s((function(e,t,r){return z(t,e)+z(e,r)===z(t,r)}),"ut"),le=s((function(e,t){for(var r=!1,n=t.length,i=-1,o=n-1;++i<n;o=i)(P(t[i])<=P(e)&&P(e)<P(t[o])||P(t[o])<=P(e)&&P(e)<P(t[i]))&&A(e)<(A(t[o])-A(t[i]))*(P(e)-P(t[i]))/(P(t[o])-P(t[i]))+A(t[i])&&(r=!r);return r}),"at"),ue=s((function(e,t,r,n){return ee(e,t,r)<n}),"ct"),ce=s((function(e,t,r){return z(e,t)<r}),"ft");function de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return he(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return he(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}s(de,"st"),s(he,"lt");var pe=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 t=de(e.split(" "),2),r=t[0],n=t[1];return{longitude:parseFloat(r),latitude:parseFloat(n)}}))}),"dt")}])},"object"==typeof e&&"object"==typeof t?t.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof e?e.geolib=n():r.geolib=n()})),_n={};function dy(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Nu(e,t),s(r,"__"),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function py(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function fy(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function hy(e,t){return function(r,n){t(r,n,e)}}function gy(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function my(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return s(i,"adopt"),new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function l(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((n=n.apply(e,t||[])).next())}))}function vy(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function yy(e,t){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(t,r)&&Ru(t,e,r)}function Fu(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Kf(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function by(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Kf(arguments[t]));return e}function wy(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}function _y(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function Oi(e){return this instanceof Oi?(this.v=e,this):new Oi(e)}function ky(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof Oi?Promise.resolve(e.value.v).then(l,u):c(o[0][2],e)}(i[e](t))}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function My(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:Oi(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function xy(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof Fu?Fu(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function Ey(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Sy(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Ru(t,e,r);return Ty(t,e),t}function Oy(e){return e&&e.__esModule?e:{default:e}}function Py(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function Iy(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function Ay(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}So(_n,{__assign:()=>Lu,__asyncDelegator:()=>My,__asyncGenerator:()=>ky,__asyncValues:()=>xy,__await:()=>Oi,__awaiter:()=>my,__classPrivateFieldGet:()=>Py,__classPrivateFieldIn:()=>Ay,__classPrivateFieldSet:()=>Iy,__createBinding:()=>Ru,__decorate:()=>fy,__exportStar:()=>yy,__extends:()=>dy,__generator:()=>vy,__importDefault:()=>Oy,__importStar:()=>Sy,__makeTemplateObject:()=>Ey,__metadata:()=>gy,__param:()=>hy,__read:()=>Kf,__rest:()=>py,__spread:()=>by,__spreadArray:()=>_y,__spreadArrays:()=>wy,__values:()=>Fu});var Nu,Lu,Ru,Ty,kn=To((()=>{y(),Nu=s((function(e,t){return(Nu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)}),"extendStatics"),s(dy,"__extends"),Lu=s((function(){return Lu=Object.assign||s((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),Lu.apply(this,arguments)}),"__assign"),s(py,"__rest"),s(fy,"__decorate"),s(hy,"__param"),s(gy,"__metadata"),s(my,"__awaiter"),s(vy,"__generator"),Ru=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},s(yy,"__exportStar"),s(Fu,"__values"),s(Kf,"__read"),s(by,"__spread"),s(wy,"__spreadArrays"),s(_y,"__spreadArray"),s(Oi,"__await"),s(ky,"__asyncGenerator"),s(My,"__asyncDelegator"),s(xy,"__asyncValues"),s(Ey,"__makeTemplateObject"),Ty=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},s(Sy,"__importStar"),s(Oy,"__importDefault"),s(Py,"__classPrivateFieldGet"),s(Iy,"__classPrivateFieldSet"),s(Ay,"__classPrivateFieldIn")})),Ht={};function Cy(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Du(e,t),s(r,"__"),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function jy(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function Ny(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function Ly(e,t){return function(r,n){t(r,n,e)}}function Fy(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function Ry(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return s(i,"adopt"),new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function l(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((n=n.apply(e,t||[])).next())}))}function Dy(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function zy(e,t){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(t,r)&&Vu(t,e,r)}function Bu(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Jf(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function By(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Jf(arguments[t]));return e}function Vy(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}function qy(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function Pi(e){return this instanceof Pi?(this.v=e,this):new Pi(e)}function Uy(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof Pi?Promise.resolve(e.value.v).then(l,u):c(o[0][2],e)}(i[e](t))}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function Gy(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:Pi(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function Wy(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof Bu?Bu(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function Yy(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Xy(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Vu(t,e,r);return Hy(t,e),t}function $y(e){return e&&e.__esModule?e:{default:e}}function Ky(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function Jy(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function Qy(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}So(Ht,{__assign:()=>zu,__asyncDelegator:()=>Gy,__asyncGenerator:()=>Uy,__asyncValues:()=>Wy,__await:()=>Pi,__awaiter:()=>Ry,__classPrivateFieldGet:()=>Ky,__classPrivateFieldIn:()=>Qy,__classPrivateFieldSet:()=>Jy,__createBinding:()=>Vu,__decorate:()=>Ny,__exportStar:()=>zy,__extends:()=>Cy,__generator:()=>Dy,__importDefault:()=>$y,__importStar:()=>Xy,__makeTemplateObject:()=>Yy,__metadata:()=>Fy,__param:()=>Ly,__read:()=>Jf,__rest:()=>jy,__spread:()=>By,__spreadArray:()=>qy,__spreadArrays:()=>Vy,__values:()=>Bu});var Du,zu,Vu,Hy,Xt=To((()=>{y(),Du=s((function(e,t){return(Du=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)}),"extendStatics"),s(Cy,"__extends"),zu=s((function(){return zu=Object.assign||s((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),zu.apply(this,arguments)}),"__assign"),s(jy,"__rest"),s(Ny,"__decorate"),s(Ly,"__param"),s(Fy,"__metadata"),s(Ry,"__awaiter"),s(Dy,"__generator"),Vu=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},s(zy,"__exportStar"),s(Bu,"__values"),s(Jf,"__read"),s(By,"__spread"),s(Vy,"__spreadArrays"),s(qy,"__spreadArray"),s(Pi,"__await"),s(Uy,"__asyncGenerator"),s(Gy,"__asyncDelegator"),s(Wy,"__asyncValues"),s(Yy,"__makeTemplateObject"),Hy=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},s(Xy,"__importStar"),s($y,"__importDefault"),s(Ky,"__classPrivateFieldGet"),s(Jy,"__classPrivateFieldSet"),s(Qy,"__classPrivateFieldIn")})),Qf=pe((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.ServerZone=void 0,(t=e.ServerZone||(e.ServerZone={})).US="US",t.EU="EU"})),Zf=pe((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.SpecialEventType=e.RevenueProperty=e.IdentifyOperation=void 0,(t=e.IdentifyOperation||(e.IdentifyOperation={})).SET="$set",t.SET_ONCE="$setOnce",t.ADD="$add",t.APPEND="$append",t.PREPEND="$prepend",t.REMOVE="$remove",t.PREINSERT="$preInsert",t.POSTINSERT="$postInsert",t.UNSET="$unset",t.CLEAR_ALL="$clearAll",function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE="$revenue"}(e.RevenueProperty||(e.RevenueProperty={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(e.SpecialEventType||(e.SpecialEventType={}))})),eh=pe((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.LogLevel=void 0,(t=e.LogLevel||(e.LogLevel={}))[t.None=0]="None",t[t.Error=1]="Error",t[t.Warn=2]="Warn",t[t.Verbose=3]="Verbose",t[t.Debug=4]="Debug"})),th=pe((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.PluginType=void 0,(t=e.PluginType||(e.PluginType={})).BEFORE="before",t.ENRICHMENT="enrichment",t.DESTINATION="destination"})),nh=pe((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Status=void 0,(t=e.Status||(e.Status={})).Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.PayloadTooLarge="payload_too_large",t.Invalid="invalid",t.Failed="failed",t.Timeout="Timeout",t.SystemError="SystemError"})),rh=pe((e=>{var t;y(),Object.defineProperty(e,"__esModule",{value:!0}),e.TransportType=void 0,(t=e.TransportType||(e.TransportType={})).XHR="xhr",t.SendBeacon="beacon",t.Fetch="fetch"})),mt=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.TransportType=e.Status=e.PluginType=e.LogLevel=e.RevenueProperty=e.IdentifyOperation=e.SpecialEventType=e.ServerZone=void 0;var t=Qf();Object.defineProperty(e,"ServerZone",{enumerable:!0,get:function(){return t.ServerZone}});var r=Zf();Object.defineProperty(e,"SpecialEventType",{enumerable:!0,get:function(){return r.SpecialEventType}}),Object.defineProperty(e,"IdentifyOperation",{enumerable:!0,get:function(){return r.IdentifyOperation}}),Object.defineProperty(e,"RevenueProperty",{enumerable:!0,get:function(){return r.RevenueProperty}});var n=eh();Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return n.LogLevel}});var i=th();Object.defineProperty(e,"PluginType",{enumerable:!0,get:function(){return i.PluginType}});var o=nh();Object.defineProperty(e,"Status",{enumerable:!0,get:function(){return o.Status}});var a=rh();Object.defineProperty(e,"TransportType",{enumerable:!0,get:function(){return a.TransportType}})})),Li=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.EU_AMPLITUDE_BATCH_SERVER_URL=e.AMPLITUDE_BATCH_SERVER_URL=e.EU_AMPLITUDE_SERVER_URL=e.AMPLITUDE_SERVER_URL=e.STORAGE_PREFIX=e.AMPLITUDE_PREFIX=e.UNSET_VALUE=void 0,e.UNSET_VALUE="-",e.AMPLITUDE_PREFIX="AMP",e.STORAGE_PREFIX="".concat(e.AMPLITUDE_PREFIX,"_unsent"),e.AMPLITUDE_SERVER_URL="https://api2.amplitude.com/2/httpapi",e.EU_AMPLITUDE_SERVER_URL="https://api.eu.amplitude.com/2/httpapi",e.AMPLITUDE_BATCH_SERVER_URL="https://api2.amplitude.com/batch",e.EU_AMPLITUDE_BATCH_SERVER_URL="https://api.eu.amplitude.com/batch"})),Uu=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.isValidProperties=e.isValidObject=void 0;var t=(Xt(),We(Ht)),r=s((function(t){if(Object.keys(t).length>1e3)return!1;for(var r in t){var n=t[r];if(!(0,e.isValidProperties)(r,n))return!1}return!0}),"isValidObject");e.isValidObject=r;var n=s((function(r,n){var i,o;if("string"!=typeof r)return!1;if(Array.isArray(n)){var a=!0;try{for(var s=t.__values(n),l=s.next();!l.done;l=s.next()){var u=l.value;if(Array.isArray(u))return!1;if("object"==typeof u)a=a&&(0,e.isValidObject)(u);else if(!["number","string"].includes(typeof u))return!1;if(!a)return!1}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}}else{if(null==n)return!1;if("object"==typeof n)return(0,e.isValidObject)(n);if(!["number","string","boolean"].includes(typeof n))return!1}return!0}),"isValidProperties");e.isValidProperties=n})),Gu=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Identify=void 0;var t=(Xt(),We(Ht)),r=mt(),n=Li(),i=Uu(),o=function(){function e(){this._propertySet=new Set,this._properties={}}return s(e,"Identify"),e.prototype.getUserProperties=function(){return t.__assign({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(r.IdentifyOperation.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(r.IdentifyOperation.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(r.IdentifyOperation.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(r.IdentifyOperation.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(r.IdentifyOperation.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(r.IdentifyOperation.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(r.IdentifyOperation.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(r.IdentifyOperation.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(r.IdentifyOperation.UNSET,e,n.UNSET_VALUE),this},e.prototype.clearAll=function(){return this._properties={},this._properties[r.IdentifyOperation.CLEAR_ALL]=n.UNSET_VALUE,this},e.prototype._safeSet=function(e,t,r){if(this._validate(e,t,r)){var n=this._properties[e];return void 0===n&&(n={},this._properties[e]=n),n[t]=r,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return void 0===this._properties[r.IdentifyOperation.CLEAR_ALL]&&!this._propertySet.has(t)&&(e===r.IdentifyOperation.ADD?"number"==typeof n:e===r.IdentifyOperation.UNSET||e===r.IdentifyOperation.REMOVE||(0,i.isValidProperties)(t,n))},e}();e.Identify=o})),Wu=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createRevenueEvent=e.createGroupEvent=e.createGroupIdentifyEvent=e.createIdentifyEvent=e.createTrackEvent=void 0;var t=(Xt(),We(Ht)),r=mt(),n=Gu(),i=s((function(e,r,n){var i="string"==typeof e?{event_type:e}:e;return t.__assign(t.__assign(t.__assign({},i),n),r&&{event_properties:r})}),"createTrackEvent");e.createTrackEvent=i;var o=s((function(e,n){return t.__assign(t.__assign({},n),{event_type:r.SpecialEventType.IDENTIFY,user_properties:e.getUserProperties()})}),"createIdentifyEvent");e.createIdentifyEvent=o;var a=s((function(e,n,i,o){var a;return t.__assign(t.__assign({},o),{event_type:r.SpecialEventType.GROUP_IDENTIFY,group_properties:i.getUserProperties(),groups:(a={},a[e]=n,a)})}),"createGroupIdentifyEvent");e.createGroupIdentifyEvent=a;var l=s((function(e,i,o){var a,s=new n.Identify;return s.set(e,i),t.__assign(t.__assign({},o),{event_type:r.SpecialEventType.IDENTIFY,user_properties:s.getUserProperties(),groups:(a={},a[e]=i,a)})}),"createGroupEvent");e.createGroupEvent=l;var u=s((function(e,n){return t.__assign(t.__assign({},n),{event_type:r.SpecialEventType.REVENUE,event_properties:e.getEventProperties()})}),"createRevenueEvent");e.createRevenueEvent=u})),Fo=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.buildResult=void 0;var t=mt(),r=s((function(e,r,n){return void 0===r&&(r=0),void 0===n&&(n=t.Status.Unknown),{event:e,code:r,message:n}}),"buildResult");e.buildResult=r})),ah=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Timeline=void 0;var t=(Xt(),We(Ht)),r=mt(),n=Fo(),i=function(){function e(){this.queue=[],this.applying=!1,this.plugins=[]}return s(e,"Timeline"),e.prototype.register=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){switch(t.label){case 0:return[4,e.setup(r)];case 1:return t.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(r){t.queue.push([e,r]),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 t.__awaiter(this,void 0,void 0,(function(){var i,o,a,s,l,u,c,d,h,p,f,g,v,y,m,b,_,w;return t.__generator(this,(function(M){switch(M.label){case 0:if(!e)return[2];i=t.__read(e,1),o=i[0],a=t.__read(e,2),s=a[1],l=this.plugins.filter((function(e){return e.type===r.PluginType.BEFORE})),M.label=1;case 1:M.trys.push([1,6,7,8]),u=t.__values(l),c=u.next(),M.label=2;case 2:return c.done?[3,5]:[4,c.value.execute(t.__assign({},o))];case 3:o=M.sent(),M.label=4;case 4:return c=u.next(),[3,2];case 5:return[3,8];case 6:return d=M.sent(),m={error:d},[3,8];case 7:try{c&&!c.done&&(b=u.return)&&b.call(u)}finally{if(m)throw m.error}return[7];case 8:h=this.plugins.filter((function(e){return e.type===r.PluginType.ENRICHMENT})),M.label=9;case 9:M.trys.push([9,14,15,16]),p=t.__values(h),f=p.next(),M.label=10;case 10:return f.done?[3,13]:[4,f.value.execute(t.__assign({},o))];case 11:o=M.sent(),M.label=12;case 12:return f=p.next(),[3,10];case 13:return[3,16];case 14:return g=M.sent(),_={error:g},[3,16];case 15:try{f&&!f.done&&(w=p.return)&&w.call(p)}finally{if(_)throw _.error}return[7];case 16:return v=this.plugins.filter((function(e){return e.type===r.PluginType.DESTINATION})),y=v.map((function(e){var r=t.__assign({},o);return e.execute(r).catch((function(e){return(0,n.buildResult)(r,0,String(e))}))})),Promise.all(y).then((function(e){var r=t.__read(e,1)[0];s(r)})),[2]}}))}))},e.prototype.flush=function(){return t.__awaiter(this,void 0,void 0,(function(){var e,n,i,o=this;return t.__generator(this,(function(t){switch(t.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map((function(e){return o.apply(e)})))];case 1:return t.sent(),n=this.plugins.filter((function(e){return e.type===r.PluginType.DESTINATION})),i=n.map((function(e){return e.flush&&e.flush()})),[4,Promise.all(i)];case 2:return t.sent(),[2]}}))}))},e}();e.Timeline=i})),Yu=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CLIENT_NOT_INITIALIZED=e.INVALID_API_KEY=e.MISSING_API_KEY_MESSAGE=e.OPT_OUT_MESSAGE=e.MAX_RETRIES_EXCEEDED_MESSAGE=e.UNEXPECTED_ERROR_MESSAGE=e.SUCCESS_MESSAGE=void 0,e.SUCCESS_MESSAGE="Event tracked successfully",e.UNEXPECTED_ERROR_MESSAGE="Unexpected error occurred",e.MAX_RETRIES_EXCEEDED_MESSAGE="Event rejected due to exceeded retry count",e.OPT_OUT_MESSAGE="Event skipped due to optOut config",e.MISSING_API_KEY_MESSAGE="Event rejected due to missing API key",e.INVALID_API_KEY="Invalid API key",e.CLIENT_NOT_INITIALIZED="Client not initialized"})),sh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.AmplitudeCore=void 0;var t=(Xt(),We(Ht)),r=Wu(),n=ah(),i=Fo(),o=Yu(),a=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 n.Timeline,this.name=e}return s(e,"AmplitudeCore"),e.prototype._init=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 t.__awaiter(this,void 0,void 0,(function(){var r,n,i,o,a,s;return t.__generator(this,(function(l){switch(l.label){case 0:r=this[e],this[e]=[],l.label=1;case 1:l.trys.push([1,6,7,8]),n=t.__values(r),i=n.next(),l.label=2;case 2:return i.done?[3,5]:[4,(0,i.value)()];case 3:l.sent(),l.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return o=l.sent(),a={error:o},[3,8];case 7:try{i&&!i.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}return[7];case 8:return[2]}}))}))},e.prototype.track=function(e,t,n){var i=(0,r.createTrackEvent)(e,t,n);return this.dispatch(i)},e.prototype.identify=function(e,t){var n=(0,r.createIdentifyEvent)(e,t);return this.dispatch(n)},e.prototype.groupIdentify=function(e,t,n,i){var o=(0,r.createGroupIdentifyEvent)(e,t,n,i);return this.dispatch(o)},e.prototype.setGroup=function(e,t,n){var i=(0,r.createGroupEvent)(e,t,n);return this.dispatch(i)},e.prototype.revenue=function(e,t){var n=(0,r.createRevenueEvent)(e,t);return this.dispatch(n)},e.prototype.add=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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((0,i.buildResult)(e,0,o.CLIENT_NOT_INITIALIZED));this.process(e).then(t)},e.prototype.dispatch=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r=this;return t.__generator(this,(function(t){return this.config?[2,this.process(e)]:[2,new Promise((function(t){r.dispatchQ.push(r.dispatchWithCallback.bind(r,e,t))}))]}))}))},e.prototype.process=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r,n,a;return t.__generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),this.config.optOut?[2,(0,i.buildResult)(e,0,o.OPT_OUT_MESSAGE)]:[4,this.timeline.push(e)];case 1:return 200===(a=t.sent()).code?this.config.loggerProvider.log(a.message):this.config.loggerProvider.error(a.message),[2,a];case 2:return r=t.sent(),n=String(r),this.config.loggerProvider.error(n),[2,a=(0,i.buildResult)(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}();e.AmplitudeCore=a})),uh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Revenue=void 0;var t=(Xt(),We(Ht)),r=mt(),n=Uu(),i=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(0,n.isValidObject)(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?t.__assign({},this.properties):{};return e[r.RevenueProperty.REVENUE_PRODUCT_ID]=this.productId,e[r.RevenueProperty.REVENUE_QUANTITY]=this.quantity,e[r.RevenueProperty.REVENUE_PRICE]=this.price,e[r.RevenueProperty.REVENUE_TYPE]=this.revenueType,e[r.RevenueProperty.REVENUE]=this.revenue,e},e}();e.Revenue=i})),lh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.chunk=void 0;var t=s((function(e,t){var r=Math.max(t,1);return e.reduce((function(e,t,n){var i=Math.floor(n/r);return e[i]||(e[i]=[]),e[i].push(t),e}),[])}),"chunk");e.chunk=t})),Xu=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Logger=void 0;var t=mt(),r="Amplitude Logger ",n=function(){function e(){this.logLevel=t.LogLevel.None}return s(e,"Logger"),e.prototype.disable=function(){this.logLevel=t.LogLevel.None},e.prototype.enable=function(e){void 0===e&&(e=t.LogLevel.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Verbose||console.log("".concat(r,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Warn||console.warn("".concat(r,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Error||console.error("".concat(r,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.logLevel<t.LogLevel.Debug||console.log("".concat(r,"[Debug]: ").concat(e.join(" ")))},e}();e.Logger=n})),$u=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createServerConfig=e.getServerUrl=e.Config=e.getDefaultConfig=void 0;var t=mt(),r=Li(),n=Xu(),i=s((function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,logLevel:t.LogLevel.Warn,loggerProvider:new n.Logger,optOut:!1,serverUrl:r.AMPLITUDE_SERVER_URL,serverZone:t.ServerZone.US,useBatch:!1}}),"getDefaultConfig");e.getDefaultConfig=i;var o=function(){function t(t){var r,n,i;this._optOut=!1;var o=(0,e.getDefaultConfig)();this.apiKey=t.apiKey,this.flushIntervalMillis=t.flushIntervalMillis||o.flushIntervalMillis,this.flushMaxRetries=t.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=t.flushQueueSize||o.flushQueueSize,this.loggerProvider=t.loggerProvider||o.loggerProvider,this.logLevel=null!==(r=t.logLevel)&&void 0!==r?r:o.logLevel,this.minIdLength=t.minIdLength,this.plan=t.plan,this.ingestionMetadata=t.ingestionMetadata,this.optOut=null!==(n=t.optOut)&&void 0!==n?n:o.optOut,this.serverUrl=t.serverUrl,this.serverZone=t.serverZone||o.serverZone,this.storageProvider=t.storageProvider,this.transportProvider=t.transportProvider,this.useBatch=null!==(i=t.useBatch)&&void 0!==i?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var a=(0,e.createServerConfig)(t.serverUrl,t.serverZone,t.useBatch);this.serverZone=a.serverZone,this.serverUrl=a.serverUrl}return s(t,"Config"),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),t}();e.Config=o;var a=s((function(e,n){return e===t.ServerZone.EU?n?r.EU_AMPLITUDE_BATCH_SERVER_URL:r.EU_AMPLITUDE_SERVER_URL:n?r.AMPLITUDE_BATCH_SERVER_URL:r.AMPLITUDE_SERVER_URL}),"getServerUrl");e.getServerUrl=a;var l=s((function(r,n,i){if(void 0===r&&(r=""),void 0===n&&(n=(0,e.getDefaultConfig)().serverZone),void 0===i&&(i=(0,e.getDefaultConfig)().useBatch),r)return{serverUrl:r,serverZone:void 0};var o=[t.ServerZone.US,t.ServerZone.EU].includes(n)?n:(0,e.getDefaultConfig)().serverZone;return{serverZone:o,serverUrl:(0,e.getServerUrl)(o,i)}}),"createServerConfig");e.createServerConfig=l})),ch=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Destination=void 0;var t=(Xt(),We(Ht)),r=mt(),n=Yu(),i=Li(),o=lh(),a=Fo(),l=$u(),u=function(){function e(){this.name="amplitude",this.type=r.PluginType.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return s(e,"Destination"),e.prototype.setup=function(e){var r;return t.__awaiter(this,void 0,void 0,(function(){var n,o=this;return t.__generator(this,(function(t){switch(t.label){case 0:return this.config=e,this.storageKey="".concat(i.STORAGE_PREFIX,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(r=this.config.storageProvider)||void 0===r?void 0:r.get(this.storageKey)];case 1:return n=t.sent(),this.saveEvents(),n&&n.length>0&&Promise.all(n.map((function(e){return o.execute(e)}))).catch(),[2,Promise.resolve(void 0)]}}))}))},e.prototype.execute=function(e){var t=this;return new Promise((function(r){var n={event:e,attempts:0,callback:function(e){return r(e)},timeout:0};t.addToQueue(n)}))},e.prototype.addToQueue=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t.filter((function(t){return t.attempts<e.config.flushMaxRetries?(t.attempts+=1,!0):(e.fulfillRequest([t],500,n.MAX_RETRIES_EXCEEDED_MESSAGE),!1)}));i.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),t.__awaiter(this,void 0,void 0,(function(){var r,n,i,a=this;return t.__generator(this,(function(t){switch(t.label){case 0:return r=[],n=[],this.queue.forEach((function(e){return 0===e.timeout?r.push(e):n.push(e)})),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),i=(0,o.chunk)(r,this.config.flushQueueSize),[4,Promise.all(i.map((function(t){return a.send(t,e)})))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(e,r){return void 0===r&&(r=!0),t.__awaiter(this,void 0,void 0,(function(){var i,o,a,s,u;return t.__generator(this,(function(c){switch(c.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,n.MISSING_API_KEY_MESSAGE)];i={api_key:this.config.apiKey,events:e.map((function(e){var r=e.event;r.extra;return t.__rest(r,["extra"])})),options:{min_id_length:this.config.minIdLength}},c.label=1;case 1:return c.trys.push([1,3,,4]),o=(0,l.createServerConfig)(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(o,i)];case 2:if(null===(a=c.sent()))return this.fulfillRequest(e,0,n.UNEXPECTED_ERROR_MESSAGE),[2];if(!r){if("body"in a){s="";try{s=JSON.stringify(a.body,null,2)}catch{}this.fulfillRequest(e,a.statusCode,"".concat(a.status,": ").concat(s))}else this.fulfillRequest(e,a.statusCode,a.status);return[2]}return this.handleReponse(a,e),[3,4];case 3:return u=c.sent(),this.fulfillRequest(e,0,String(u)),[3,4];case 4:return[2]}}))}))},e.prototype.handleReponse=function(e,t){switch(e.status){case r.Status.Success:this.handleSuccessResponse(e,t);break;case r.Status.Invalid:this.handleInvalidResponse(e,t);break;case r.Status.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case r.Status.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.handleOtherReponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,n.SUCCESS_MESSAGE)},e.prototype.handleInvalidResponse=function(e,r){var i=this;if(e.body.missingField||e.body.error.startsWith(n.INVALID_API_KEY))this.fulfillRequest(r,e.statusCode,e.body.error);else{var o=t.__spreadArray(t.__spreadArray(t.__spreadArray(t.__spreadArray([],t.__read(Object.values(e.body.eventsWithInvalidFields)),!1),t.__read(Object.values(e.body.eventsWithMissingFields)),!1),t.__read(Object.values(e.body.eventsWithInvalidIdLengths)),!1),t.__read(e.body.silencedEvents),!1).flat(),a=new Set(o),s=r.filter((function(t,r){if(!a.has(r))return!0;i.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,t.__spreadArray([],t.__read(s),!1))}},e.prototype.handlePayloadTooLargeResponse=function(e,r){1!==r.length?(this.config.flushQueueSize/=2,this.addToQueue.apply(this,t.__spreadArray([],t.__read(r),!1))):this.fulfillRequest(r,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,r){var n=this,i=Object.keys(e.body.exceededDailyQuotaUsers),o=Object.keys(e.body.exceededDailyQuotaDevices),a=e.body.throttledEvents,s=new Set(i),l=new Set(o),u=new Set(a),c=r.filter((function(t,r){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&l.has(t.event.device_id)))return u.has(r)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,t.__spreadArray([],t.__read(c),!1))},e.prototype.handleOtherReponse=function(e){var r=this;this.addToQueue.apply(this,t.__spreadArray([],t.__read(e.map((function(e){return e.timeout=e.attempts*r.retryTimeout,e}))),!1))},e.prototype.fulfillRequest=function(e,t,r){this.saveEvents(),e.forEach((function(e){return e.callback((0,a.buildResult)(e.event,t,r))}))},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}();e.Destination=u})),ph=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.returnWrapper=void 0;var t=(Xt(),We(Ht)),r=s((function(e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return{promise:e.apply(void 0,t.__spreadArray([],t.__read(r),!1))}}}),"returnWrapper");e.returnWrapper=r})),fh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.debugWrapper=e.getClientStates=e.getValueByStringPath=e.getClientLogConfig=e.getStacktrace=void 0;var t=(Xt(),We(Ht)),r=mt(),n=s((function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map((function(e){return e.trim()}))}),"getStacktrace");e.getStacktrace=n;var i=s((function(e){return function(){var r=t.__assign({},e.config);return{logger:r.loggerProvider,logLevel:r.logLevel}}}),"getClientLogConfig");e.getClientLogConfig=i;var o=s((function(e,r){var n,i;r=(r=r.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var o=t.__values(r.split(".")),a=o.next();!a.done;a=o.next()){var s=a.value;if(!(s in e))return;e=e[s]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return e}),"getValueByStringPath");e.getValueByStringPath=o;var a=s((function(r,n){return function(){var i,o,a={};try{for(var s=t.__values(n),l=s.next();!l.done;l=s.next()){var u=l.value;a[u]=(0,e.getValueByStringPath)(r,u)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a}}),"getClientStates");e.getClientStates=a;var l=s((function(t,n,i,o,a){return void 0===a&&(a=null),function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var u=i(),c=u.logger,d=u.logLevel;if(d&&d<r.LogLevel.Debug||!d||!c)return t.apply(a,s);var h={type:"invoke public method",name:n,args:s,stacktrace:(0,e.getStacktrace)(1),time:{start:(new Date).toISOString()},states:{}};o&&h.states&&(h.states.before=o());var p=t.apply(a,s);return p&&p.promise?p.promise.then((function(){o&&h.states&&(h.states.after=o()),h.time&&(h.time.end=(new Date).toISOString()),c.debug(JSON.stringify(h,null,2))})):(o&&h.states&&(h.states.after=o()),h.time&&(h.time.end=(new Date).toISOString()),c.debug(JSON.stringify(h,null,2))),p}}),"debugWrapper");e.debugWrapper=l})),hh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.UUID=void 0;var t=s((function(t){return t?(t^16*Math.random()>>t/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,e.UUID)}),"UUID");e.UUID=t})),gh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.MemoryStorage=void 0;var t=(Xt(),We(Ht)),r=function(){function e(){this.memoryStorage=new Map}return s(e,"MemoryStorage"),e.prototype.isEnabled=function(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return[2,!0]}))}))},e.prototype.get=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,this.memoryStorage.get(e)]}))}))},e.prototype.getRaw=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this.get(e)];case 1:return[2,(r=t.sent())?JSON.stringify(r):void 0]}}))}))},e.prototype.set=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return this.memoryStorage.set(e,r),[2]}))}))},e.prototype.remove=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return this.memoryStorage.delete(e),[2]}))}))},e.prototype.reset=function(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return this.memoryStorage.clear(),[2]}))}))},e}();e.MemoryStorage=r})),mh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.BaseTransport=void 0;var t=mt(),r=function(){function e(){}return s(e,"BaseTransport"),e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var r,n,i,o,a,s,l,u,c,d,h,p,f,g,v,y,m,b,_,w,M,x;if("object"!=typeof e)return null;var E=e.code||0,S=this.buildStatus(E);switch(S){case t.Status.Success:return{status:S,statusCode:E,body:{eventsIngested:null!==(r=e.events_ingested)&&void 0!==r?r:0,payloadSizeBytes:null!==(n=e.payload_size_bytes)&&void 0!==n?n:0,serverUploadTime:null!==(i=e.server_upload_time)&&void 0!==i?i:0}};case t.Status.Invalid:return{status:S,statusCode:E,body:{error:null!==(o=e.error)&&void 0!==o?o:"",missingField:null!==(a=e.missing_field)&&void 0!==a?a:"",eventsWithInvalidFields:null!==(s=e.events_with_invalid_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(l=e.events_with_missing_fields)&&void 0!==l?l:{},eventsWithInvalidIdLengths:null!==(u=e.events_with_invalid_id_lengths)&&void 0!==u?u:{},epsThreshold:null!==(c=e.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(d=e.exceeded_daily_quota_devices)&&void 0!==d?d:{},silencedDevices:null!==(h=e.silenced_devices)&&void 0!==h?h:[],silencedEvents:null!==(p=e.silenced_events)&&void 0!==p?p:[],throttledDevices:null!==(f=e.throttled_devices)&&void 0!==f?f:{},throttledEvents:null!==(g=e.throttled_events)&&void 0!==g?g:[]}};case t.Status.PayloadTooLarge:return{status:S,statusCode:E,body:{error:null!==(v=e.error)&&void 0!==v?v:""}};case t.Status.RateLimit:return{status:S,statusCode:E,body:{error:null!==(y=e.error)&&void 0!==y?y:"",epsThreshold:null!==(m=e.eps_threshold)&&void 0!==m?m:0,throttledDevices:null!==(b=e.throttled_devices)&&void 0!==b?b:{},throttledUsers:null!==(_=e.throttled_users)&&void 0!==_?_:{},exceededDailyQuotaDevices:null!==(w=e.exceeded_daily_quota_devices)&&void 0!==w?w:{},exceededDailyQuotaUsers:null!==(M=e.exceeded_daily_quota_users)&&void 0!==M?M:{},throttledEvents:null!==(x=e.throttled_events)&&void 0!==x?x:[]}};case t.Status.Timeout:default:return{status:S,statusCode:E}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?t.Status.Success:429===e?t.Status.RateLimit:413===e?t.Status.PayloadTooLarge:408===e?t.Status.Timeout:e>=400&&e<500?t.Status.Invalid:e>=500?t.Status.Failed:t.Status.Unknown},e}();e.BaseTransport=r})),un=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createIdentifyEvent=e.BaseTransport=e.MemoryStorage=e.UUID=e.getClientStates=e.getClientLogConfig=e.debugWrapper=e.returnWrapper=e.AMPLITUDE_PREFIX=e.Logger=e.Config=e.Destination=e.Revenue=e.Identify=e.AmplitudeCore=void 0;var t=sh();Object.defineProperty(e,"AmplitudeCore",{enumerable:!0,get:function(){return t.AmplitudeCore}});var r=Gu();Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return r.Identify}});var n=uh();Object.defineProperty(e,"Revenue",{enumerable:!0,get:function(){return n.Revenue}});var i=ch();Object.defineProperty(e,"Destination",{enumerable:!0,get:function(){return i.Destination}});var o=$u();Object.defineProperty(e,"Config",{enumerable:!0,get:function(){return o.Config}});var a=Xu();Object.defineProperty(e,"Logger",{enumerable:!0,get:function(){return a.Logger}});var s=Li();Object.defineProperty(e,"AMPLITUDE_PREFIX",{enumerable:!0,get:function(){return s.AMPLITUDE_PREFIX}});var l=ph();Object.defineProperty(e,"returnWrapper",{enumerable:!0,get:function(){return l.returnWrapper}});var u=fh();Object.defineProperty(e,"debugWrapper",{enumerable:!0,get:function(){return u.debugWrapper}}),Object.defineProperty(e,"getClientLogConfig",{enumerable:!0,get:function(){return u.getClientLogConfig}}),Object.defineProperty(e,"getClientStates",{enumerable:!0,get:function(){return u.getClientStates}});var c=hh();Object.defineProperty(e,"UUID",{enumerable:!0,get:function(){return c.UUID}});var d=gh();Object.defineProperty(e,"MemoryStorage",{enumerable:!0,get:function(){return d.MemoryStorage}});var h=mh();Object.defineProperty(e,"BaseTransport",{enumerable:!0,get:function(){return h.BaseTransport}});var p=Wu();Object.defineProperty(e,"createIdentifyEvent",{enumerable:!0,get:function(){return p.createIdentifyEvent}})})),lr={};function hw(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Qu(e,t),s(r,"__"),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function gw(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function mw(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function vw(e,t){return function(r,n){t(r,n,e)}}function yw(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function bw(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return s(i,"adopt"),new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function l(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,l)}s(a,"fulfilled"),s(l,"rejected"),s(u,"step"),u((n=n.apply(e,t||[])).next())}))}function ww(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function _w(e,t){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(t,r)&&tl(t,e,r)}function el(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function vh(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function kw(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(vh(arguments[t]));return e}function Mw(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}function xw(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)(n||!(i in t))&&(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function Ui(e){return this instanceof Ui?(this.v=e,this):new Ui(e)}function Ew(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof Ui?Promise.resolve(e.value.v).then(l,u):c(o[0][2],e)}(i[e](t))}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function Tw(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:Ui(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function Sw(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof el?el(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function Ow(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Iw(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&tl(t,e,r);return Pw(t,e),t}function Aw(e){return e&&e.__esModule?e:{default:e}}function Cw(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function jw(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function Nw(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}So(lr,{__assign:()=>Zu,__asyncDelegator:()=>Tw,__asyncGenerator:()=>Ew,__asyncValues:()=>Sw,__await:()=>Ui,__awaiter:()=>bw,__classPrivateFieldGet:()=>Cw,__classPrivateFieldIn:()=>Nw,__classPrivateFieldSet:()=>jw,__createBinding:()=>tl,__decorate:()=>mw,__exportStar:()=>_w,__extends:()=>hw,__generator:()=>ww,__importDefault:()=>Aw,__importStar:()=>Iw,__makeTemplateObject:()=>Ow,__metadata:()=>yw,__param:()=>vw,__read:()=>vh,__rest:()=>gw,__spread:()=>kw,__spreadArray:()=>xw,__spreadArrays:()=>Mw,__values:()=>el});var Qu,Zu,tl,Pw,cr=To((()=>{y(),Qu=s((function(e,t){return(Qu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)}),"extendStatics"),s(hw,"__extends"),Zu=s((function(){return Zu=Object.assign||s((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),Zu.apply(this,arguments)}),"__assign"),s(gw,"__rest"),s(mw,"__decorate"),s(vw,"__param"),s(yw,"__metadata"),s(bw,"__awaiter"),s(ww,"__generator"),tl=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},s(_w,"__exportStar"),s(el,"__values"),s(vh,"__read"),s(kw,"__spread"),s(Mw,"__spreadArrays"),s(xw,"__spreadArray"),s(Ui,"__await"),s(Ew,"__asyncGenerator"),s(Tw,"__asyncDelegator"),s(Sw,"__asyncValues"),s(Ow,"__makeTemplateObject"),Pw=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},s(Iw,"__importStar"),s(Aw,"__importDefault"),s(Cw,"__classPrivateFieldGet"),s(jw,"__classPrivateFieldSet"),s(Nw,"__classPrivateFieldIn")})),$o=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getGlobalScope=void 0;var t=s((function(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:void 0}),"getGlobalScope");e.getGlobalScope=t})),nl=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.tryDecodeURIComponent=e.getQueryParams=void 0;var t=$o(),r=s((function(){var r,n=(0,t.getGlobalScope)();return null!==(r=null==n?void 0:n.location)&&void 0!==r&&r.search?n.location.search.substring(1).split("&").filter(Boolean).reduce((function(t,r){var n=r.split("=",2),i=(0,e.tryDecodeURIComponent)(n[0]),o=(0,e.tryDecodeURIComponent)(n[1]);return o&&(t[i]=o),t}),{}):{}}),"getQueryParams");e.getQueryParams=r;var n=s((function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch{return""}}),"tryDecodeURIComponent");e.tryDecodeURIComponent=n})),Ko=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.MKTG=e.BASE_CAMPAIGN=e.EMPTY_VALUE=e.WBRAID=e.TWCLID=e.TTCLID=e.MSCLKID=e.KO_CLICK_ID=e.GCLID=e.GBRAID=e.FBCLID=e.DCLID=e.UTM_TERM=e.UTM_SOURCE=e.UTM_MEDIUM=e.UTM_ID=e.UTM_CONTENT=e.UTM_CAMPAIGN=void 0,e.UTM_CAMPAIGN="utm_campaign",e.UTM_CONTENT="utm_content",e.UTM_ID="utm_id",e.UTM_MEDIUM="utm_medium",e.UTM_SOURCE="utm_source",e.UTM_TERM="utm_term",e.DCLID="dclid",e.FBCLID="fbclid",e.GBRAID="gbraid",e.GCLID="gclid",e.KO_CLICK_ID="ko_click_id",e.MSCLKID="msclkid",e.TTCLID="ttclid",e.TWCLID="twclid",e.WBRAID="wbraid",e.EMPTY_VALUE="EMPTY",e.BASE_CAMPAIGN={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},e.MKTG="MKTG"})),rl=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CampaignParser=void 0;var t=(cr(),We(lr)),r=nl(),n=Ko(),i=function(){function e(){}return s(e,"CampaignParser"),e.prototype.parse=function(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return[2,t.__assign(t.__assign(t.__assign(t.__assign({},n.BASE_CAMPAIGN),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},e.prototype.getUtmParam=function(){var e=(0,r.getQueryParams)();return{utm_campaign:e[n.UTM_CAMPAIGN],utm_content:e[n.UTM_CONTENT],utm_id:e[n.UTM_ID],utm_medium:e[n.UTM_MEDIUM],utm_source:e[n.UTM_SOURCE],utm_term:e[n.UTM_TERM]}},e.prototype.getReferrer=function(){var e,t,r={referrer:void 0,referring_domain:void 0};try{r.referrer=document.referrer||void 0,r.referring_domain=null!==(t=null===(e=r.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch{}return r},e.prototype.getClickIds=function(){var e,t=(0,r.getQueryParams)();return(e={})[n.DCLID]=t[n.DCLID],e[n.FBCLID]=t[n.FBCLID],e[n.GBRAID]=t[n.GBRAID],e[n.GCLID]=t[n.GCLID],e[n.KO_CLICK_ID]=t[n.KO_CLICK_ID],e[n.MSCLKID]=t[n.MSCLKID],e[n.TTCLID]=t[n.TTCLID],e[n.TWCLID]=t[n.TWCLID],e[n.WBRAID]=t[n.WBRAID],e},e}();e.CampaignParser=i})),Qo=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getOldCookieName=e.getCookieName=void 0;var t=un(),r=s((function(e,r,n){return void 0===r&&(r=""),void 0===n&&(n=10),[t.AMPLITUDE_PREFIX,r,e.substring(0,n)].filter(Boolean).join("_")}),"getCookieName");e.getCookieName=r;var n=s((function(e){return"".concat(t.AMPLITUDE_PREFIX.toLowerCase(),"_").concat(e.substring(0,6))}),"getOldCookieName");e.getOldCookieName=n})),kh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CampaignTracker=void 0;var t=(cr(),We(lr)),r=un(),n=Qo(),i=rl(),o=Ko(),a=function(){function e(e,t){var r,a;this.storage=t.storage,this.storageKey=(0,n.getCookieName)(e,o.MKTG),this.parser=new i.CampaignParser,this.track=t.track,this.onNewCampaign=t.onNewCampaign,this.disabled=!!t.disabled,this.trackNewCampaigns=!!t.trackNewCampaigns,this.trackPageViews=!!t.trackPageViews,this.excludeReferrers=null!==(r=t.excludeReferrers)&&void 0!==r?r:[],typeof location<"u"&&this.excludeReferrers.unshift(location.hostname),this.initialEmptyValue=null!==(a=t.initialEmptyValue)&&void 0!==a?a:o.EMPTY_VALUE}return s(e,"CampaignTracker"),e.prototype.isNewCampaign=function(e,r,n){void 0===n&&(n=!1);e.referrer;var i=e.referring_domain,o=t.__rest(e,["referrer","referring_domain"]),a=r||{},s=(a.referrer,a.referring_domain),u=t.__rest(a,["referrer","referring_domain"]);if(e.referring_domain&&this.excludeReferrers.includes(e.referring_domain))return!1;var c=JSON.stringify(o)!==JSON.stringify(u),d=n?l(i||"")!==l(s||""):i!==s;return!r||c||d},e.prototype.saveCampaignToStorage=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 n=this,i=t.__assign(t.__assign({},o.BASE_CAMPAIGN),e),a=Object.entries(i).reduce((function(e,r){var i=t.__read(r,2),o=i[0],a=i[1];return e.setOnce("initial_".concat(o),a||n.initialEmptyValue),a?e.set(o,a):e.unset(o)}),new r.Identify),s={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 t.__assign(t.__assign({},(0,r.createIdentifyEvent)(a)),this.trackPageViews&&s)},e.prototype.send=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r,n;return t.__generator(this,(function(t){switch(t.label){case 0:return this.disabled?[2]:[4,this.parser.parse()];case 1:return r=t.sent(),[4,this.getCampaignFromStorage()];case 2:if(n=t.sent(),!e){if(!this.trackNewCampaigns||!this.isNewCampaign(r,n))return[2];this.onNewCampaign(r)}return[4,this.track(this.createCampaignEvent(r))];case 3:return t.sent(),[4,this.saveCampaignToStorage(r)];case 4:return t.sent(),[2]}}))}))},e}();e.CampaignTracker=a;var l=s((function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")}),"domainWithoutSubdomain")})),Mh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.CookieStorage=void 0;var t=(cr(),We(lr)),r=$o(),n=function(){function e(e){this.options=t.__assign({},e)}return s(e,"CookieStorage"),e.prototype.isEnabled=function(){return t.__awaiter(this,void 0,void 0,(function(){var n,i,o;return t.__generator(this,(function(t){switch(t.label){case 0:if(!(0,r.getGlobalScope)())return[2,!1];n=String(Date.now()),i=new e(this.options),o="AMP_TEST",t.label=1;case 1:return t.trys.push([1,4,5,7]),[4,i.set(o,n)];case 2:return t.sent(),[4,i.get(o)];case 3:return[2,t.sent()===n];case 4:return t.sent(),[2,!1];case 5:return[4,i.remove(o)];case 6:return t.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,this.getRaw(e)];case 1:if(!(r=t.sent()))return[2,void 0];try{try{r=decodeURIComponent(atob(r))}catch{}return[2,JSON.parse(r)]}catch{return[2,void 0]}return[2]}}))}))},e.prototype.getRaw=function(e){var n;return t.__awaiter(this,void 0,void 0,(function(){var i,o,a;return t.__generator(this,(function(t){return i=(0,r.getGlobalScope)(),o=null!==(n=null==i?void 0:i.document.cookie.split("; "))&&void 0!==n?n:[],(a=o.find((function(t){return 0===t.indexOf(e+"=")})))?[2,a.substring(e.length+1)]:[2,void 0]}))}))},e.prototype.set=function(e,n){var i;return t.__awaiter(this,void 0,void 0,(function(){var o,a,s,l,u,c;return t.__generator(this,(function(t){try{o=null!==(i=this.options.expirationDays)&&void 0!==i?i:0,s=void 0,(a=null!==n?o:-1)&&((l=new Date).setTime(l.getTime()+24*a*60*60*1e3),s=l),u="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(n)))),s&&(u+="; expires=".concat(s.toUTCString())),u+="; path=/",this.options.domain&&(u+="; domain=".concat(this.options.domain)),this.options.secure&&(u+="; Secure"),this.options.sameSite&&(u+="; SameSite=".concat(this.options.sameSite)),(c=(0,r.getGlobalScope)())&&(c.document.cookie=u)}catch{}return[2]}))}))},e.prototype.remove=function(e){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(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 t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return[2]}))}))},e}();e.CookieStorage=n})),xh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.SessionManager=void 0;var t=(cr(),We(lr)),r=Qo(),n=function(){function e(e,t){this.storage=e,this.storageKey=(0,r.getCookieName)(t),this.cache={optOut:!1}}return s(e,"SessionManager"),e.prototype.load=function(){var e;return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return r=this,[4,this.storage.get(this.storageKey)];case 1:return r.cache=null!==(e=t.sent())&&void 0!==e?e:{optOut:!1},[2,this]}}))}))},e.prototype.setSession=function(e){this.cache=t.__assign(t.__assign({},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}();e.SessionManager=n})),Eh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.FetchTransport=void 0;var t=(cr(),We(lr)),r=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(r,e),s(r,"FetchTransport"),r.prototype.send=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){var n,i;return t.__generator(this,(function(t){switch(t.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(r),method:"POST"},[4,fetch(e,n)];case 1:return[4,t.sent().json()];case 2:return i=t.sent(),[2,this.buildResponse(i)]}}))}))},r}(un().BaseTransport);e.FetchTransport=r})),Sh=pe(((e,t)=>{var r,n;y(),r=e,n=function(e){var t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function r(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return n(null==t&&r.path)}},r.exports),r.exports}function n(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}s(r,"createCommonjsModule"),s(n,"commonjsRequire");var i=r((function(e,r){!function(t,n){var i="function",o="undefined",a="object",l="string",u="model",c="name",d="type",h="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",b="wearable",_="embedded",w="Amazon",M="Apple",x="ASUS",E="BlackBerry",S="Browser",I="Chrome",k="Firefox",C="Google",O="Huawei",T="LG",A="Microsoft",P="Motorola",F="Opera",j="Samsung",L="Sony",N="Xiaomi",D="Zebra",R="Facebook",B=s((function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}),"extend"),U=s((function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t}),"enumerize"),G=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]:n}),"majorize"),z=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"),q=s((function(e,t){for(var r,o,s,l,u,c,d=0;d<t.length&&!u;){var h=t[d],p=t[d+1];for(r=o=0;r<h.length&&!u;)if(u=h[r++].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]):n:this[l[0]]=c?l[1].call(this,c,l[2]):n:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):n):this[l]=c||n;d+=2}}),"rgxMapper"),H=s((function(e,t){for(var r in t)if(typeof t[r]===a&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(G(t[r][i],e))return"?"===r?n:r}else if(G(t[r],e))return"?"===r?n:r;return e}),"strMapper"),X={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"},Y={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,F+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,F]],[/(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,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,F+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,F+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[p,[c,k]],[/\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,R],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,I+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,I+" 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,H,{"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,k+" 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,[h,j],[d,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,j],[d,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[h,M],[d,v]],[/(ipad\d+,\d+)/i],[u,[h,M],[d,y]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[h,M],[d,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,M],[d,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,O],[d,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,O],[d,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," "],[h,N],[d,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,N],[d,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,[h,"OPPO"],[d,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,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,[h,P],[d,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,P],[d,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,T],[d,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,T],[d,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,v]],[/(pixel c)\b/i],[u,[h,C],[d,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,C],[d,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,[h,L],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,L],[d,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,w],[d,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,w],[d,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,E],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,x],[d,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,x],[d,v]],[/(nexus 9)/i],[u,[h,"HTC"],[d,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,"Sharp"],[d,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],[h,u,[d,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],[h,u,[d,y]],[/(surface duo)/i],[u,[h,A],[d,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,v]],[/(u304aa)/i],[u,[h,"AT&T"],[d,v]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,v]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,y]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,y]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,y]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,v]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,v]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,y]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,y]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,v]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,y]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,y]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,y]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,y]],[/(sprint) (\w+)/i],[h,u,[d,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,A],[d,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,D],[d,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,D],[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[u,[h,L],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,A],[d,g]],[/smart-tv.+(samsung)/i],[h,[d,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,j],[d,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,T],[d,m]],[/(apple) ?tv/i],[h,[u,M+" TV"],[d,m]],[/crkey/i],[[u,I+"cast"],[h,C],[d,m]],[/droid.+aft(\w)( bui|\))/i],[u,[h,w],[d,m]],[/\(dtv[\);].+(aquos)/i],[u,[h,"Sharp"],[d,m]],[/(bravia[\w- ]+) bui/i],[u,[h,L],[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,z],[u,z],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/((pebble))app/i],[h,u,[d,b]],[/droid.+; (glass) \d/i],[u,[h,C],[d,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,D],[d,b]],[/(quest( 2)?)/i],[u,[h,R],[d,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[d,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,y]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[d,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"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,H,X]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,H,X]],[/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,E]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,I+"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]]},K=s((function(e,r){if(typeof e===a&&(r=e,e=n),!(this instanceof K))return new K(e,r).getResult();var i=e||(typeof t!==o&&t.navigator&&t.navigator.userAgent?t.navigator.userAgent:""),s=r?B(Y,r):Y;return this.getBrowser=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,s.browser),e.major=V(e.version),e},this.getCPU=function(){var e={};return e[f]=n,q.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,q.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=n,e[p]=n,q.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?z(e,275):e,this},this.setUA(i),this}),"UAParser");K.VERSION="0.7.31",K.BROWSER=U([c,p,"major"]),K.CPU=U([f]),K.DEVICE=U([u,h,d,g,v,m,y,b,_]),K.ENGINE=K.OS=U([c,p]),e.exports&&(r=e.exports=K),r.UAParser=K;var $=typeof t!==o&&(t.jQuery||t.Zepto);if($&&!$.ua){var J=new K;$.ua=J.getResult(),$.ua.get=function(){return J.getUA()},$.ua.set=function(e){J.setUA(e);var t=J.getResult();for(var r in t)$.ua[r]=t[r]}}}("object"==typeof window?window:t)})),o=function(){function e(){this.ua=new i.UAParser(typeof navigator<"u"?navigator.userAgent:null).getResult()}return s(e,"ApplicationContextProviderImpl"),e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:u(),platform:"Web",os:a(this.ua),deviceModel:l(this.ua)}},e}(),a=s((function(e){var t,r;return[null===(t=e.browser)||void 0===t?void 0:t.name,null===(r=e.browser)||void 0===r?void 0:r.major].filter((function(e){return null!=e})).join(" ")}),"getOs"),l=s((function(e){var t;return null===(t=e.os)||void 0===t?void 0:t.name}),"getDeviceModel"),u=s((function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""}),"getLanguage"),c=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}(),d=s((function(){return d=Object.assign||s((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),d.apply(this,arguments)}),"__assign"),h=s((function(e,t){var r=typeof e;if(r!==typeof t)return!1;for(var n=0,i=["string","number","boolean","undefined"];n<i.length;n++)if(i[n]===r)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),a=Array.isArray(t);if(o!==a)return!1;if(!o||!a){var s=Object.keys(e).sort(),l=Object.keys(t).sort();if(!h(s,l))return!1;var u=!0;return Object.keys(e).forEach((function(r){h(e[r],t[r])||(u=!1)})),u}for(var c=0;c<e.length;c++)if(!h(e[c],t[c]))return!1;return!0}),"isEqual");Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n});var p=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return s(e,"IdentityStoreImpl"),e.prototype.editIdentity=function(){var e=this,t=d({},this.identity.userProperties),r=d(d({},this.identity),{userProperties:t});return{setUserId:function(e){return r.userId=e,this},setDeviceId:function(e){return r.deviceId=e,this},setUserProperties:function(e){return r.userProperties=e,this},updateUserProperties:function(e){for(var t=r.userProperties||{},n=0,i=Object.entries(e);n<i.length;n++){var o=i[n],a=o[0],s=o[1];switch(a){case"$set":for(var l=0,u=Object.entries(s);l<u.length;l++){var c=u[l],d=c[0],h=c[1];t[d]=h}break;case"$unset":for(var p=0,f=Object.keys(s);p<f.length;p++)delete t[d=f[p]];break;case"$clearAll":t={}}}return r.userProperties=t,this},commit:function(){return e.setIdentity(r),this}}},e.prototype.getIdentity=function(){return d({},this.identity)},e.prototype.setIdentity=function(e){var t=d({},this.identity);this.identity=d({},e),h(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}(),f=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,g=function(){function e(){this.identityStore=new p,this.eventBridge=new c,this.applicationContextProvider=new o}return s(e,"AnalyticsConnector"),e.getInstance=function(t){return f.analyticsConnectorInstances||(f.analyticsConnectorInstances={}),f.analyticsConnectorInstances[t]||(f.analyticsConnectorInstances[t]=new e),f.analyticsConnectorInstances[t]},e}();e.AnalyticsConnector=g,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&typeof t<"u"?n(e):"function"==typeof define&&define.amd?define(["exports"],n):n((r=typeof globalThis<"u"?globalThis:r||self).Experiment={})})),sl=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getAnalyticsConnector=void 0;var t=Sh(),r=s((function(){return t.AnalyticsConnector.getInstance("$default_instance")}),"getAnalyticsConnector");e.getAnalyticsConnector=r})),Ph=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.IdentityEventSender=void 0;var t=(cr(),We(lr)),r=mt(),n=sl(),i=function(){function e(){this.name="identity",this.type=r.PluginType.BEFORE,this.identityStore=(0,n.getAnalyticsConnector)().identityStore}return s(e,"IdentityEventSender"),e.prototype.execute=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){return(r=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(r).commit(),[2,e]}))}))},e.prototype.setup=function(e){return Promise.resolve(void 0)},e}();e.IdentityEventSender=i})),Ih=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguage=void 0;var t=s((function(){var e,t,r,n;if(typeof navigator>"u")return"";var i=navigator.userLanguage;return null!==(n=null!==(r=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==r?r:i)&&void 0!==n?n:""}),"getLanguage");e.getLanguage=t})),dr=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getGlobalScope=e.BASE_CAMPAIGN=e.getLanguage=e.IdentityEventSender=e.getAnalyticsConnector=e.FetchTransport=e.SessionManager=e.CookieStorage=e.getOldCookieName=e.getCookieName=e.getQueryParams=e.CampaignTracker=e.CampaignParser=void 0;var t=rl();Object.defineProperty(e,"CampaignParser",{enumerable:!0,get:function(){return t.CampaignParser}});var r=kh();Object.defineProperty(e,"CampaignTracker",{enumerable:!0,get:function(){return r.CampaignTracker}});var n=nl();Object.defineProperty(e,"getQueryParams",{enumerable:!0,get:function(){return n.getQueryParams}});var i=Qo();Object.defineProperty(e,"getCookieName",{enumerable:!0,get:function(){return i.getCookieName}}),Object.defineProperty(e,"getOldCookieName",{enumerable:!0,get:function(){return i.getOldCookieName}});var o=Mh();Object.defineProperty(e,"CookieStorage",{enumerable:!0,get:function(){return o.CookieStorage}});var a=xh();Object.defineProperty(e,"SessionManager",{enumerable:!0,get:function(){return a.SessionManager}});var s=Eh();Object.defineProperty(e,"FetchTransport",{enumerable:!0,get:function(){return s.FetchTransport}});var l=sl();Object.defineProperty(e,"getAnalyticsConnector",{enumerable:!0,get:function(){return l.getAnalyticsConnector}});var u=Ph();Object.defineProperty(e,"IdentityEventSender",{enumerable:!0,get:function(){return u.IdentityEventSender}});var c=Ih();Object.defineProperty(e,"getLanguage",{enumerable:!0,get:function(){return c.getLanguage}});var d=Ko();Object.defineProperty(e,"BASE_CAMPAIGN",{enumerable:!0,get:function(){return d.BASE_CAMPAIGN}});var h=$o();Object.defineProperty(e,"getGlobalScope",{enumerable:!0,get:function(){return h.getGlobalScope}})})),ul=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.isInstanceProxy=e.convertProxyObjectToRealObject=e.runQueuedFunctions=void 0;var t=s((function(t,r){(0,e.convertProxyObjectToRealObject)(t,r)}),"runQueuedFunctions");e.runQueuedFunctions=t;var r=s((function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.name,o=n.args,a=n.resolve,s=e&&e[i];if("function"==typeof s){var l=s.apply(e,o);"function"==typeof a&&a(null==l?void 0:l.promise)}}return e}),"convertProxyObjectToRealObject");e.convertProxyObjectToRealObject=r;var n=s((function(e){return e&&void 0!==e._q}),"isInstanceProxy");e.isInstanceProxy=n})),Ch=pe(((e,t)=>{y(),function(r,n){var i="function",o="undefined",a="object",l="string",u="model",c="name",d="type",h="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",b="wearable",_="embedded",w="Amazon",M="Apple",x="ASUS",E="BlackBerry",S="Browser",I="Chrome",k="Firefox",C="Google",O="Huawei",T="LG",A="Microsoft",P="Motorola",F="Opera",j="Samsung",L="Sony",N="Xiaomi",D="Zebra",R="Facebook",B=s((function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}),"extend"),U=s((function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t}),"enumerize"),G=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]:n}),"majorize"),z=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"),q=s((function(e,t){for(var r,o,s,l,u,c,d=0;d<t.length&&!u;){var h=t[d],p=t[d+1];for(r=o=0;r<h.length&&!u;)if(u=h[r++].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]):n:this[l[0]]=c?l[1].call(this,c,l[2]):n:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):n):this[l]=c||n;d+=2}}),"rgxMapper"),H=s((function(e,t){for(var r in t)if(typeof t[r]===a&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(G(t[r][i],e))return"?"===r?n:r}else if(G(t[r],e))return"?"===r?n:r;return e}),"strMapper"),X={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"},Y={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,F+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,F]],[/(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,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,F+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,F+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[p,[c,k]],[/\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,R],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,I+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,I+" 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,H,{"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,k+" 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,[h,j],[d,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,j],[d,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[h,M],[d,v]],[/(ipad\d+,\d+)/i],[u,[h,M],[d,y]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[h,M],[d,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,M],[d,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,O],[d,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,O],[d,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," "],[h,N],[d,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,N],[d,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,[h,"OPPO"],[d,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,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,[h,P],[d,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,P],[d,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,T],[d,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,T],[d,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,v]],[/(pixel c)\b/i],[u,[h,C],[d,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,C],[d,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,[h,L],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,L],[d,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,w],[d,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,w],[d,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,E],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,x],[d,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,x],[d,v]],[/(nexus 9)/i],[u,[h,"HTC"],[d,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,"Sharp"],[d,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],[h,u,[d,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],[h,u,[d,y]],[/(surface duo)/i],[u,[h,A],[d,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,v]],[/(u304aa)/i],[u,[h,"AT&T"],[d,v]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,v]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,y]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,y]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,y]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,v]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,v]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,y]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,y]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,v]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,y]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,y]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,y]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,y]],[/(sprint) (\w+)/i],[h,u,[d,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,A],[d,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,D],[d,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,D],[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[u,[h,L],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,A],[d,g]],[/smart-tv.+(samsung)/i],[h,[d,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,j],[d,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,T],[d,m]],[/(apple) ?tv/i],[h,[u,M+" TV"],[d,m]],[/crkey/i],[[u,I+"cast"],[h,C],[d,m]],[/droid.+aft(\w)( bui|\))/i],[u,[h,w],[d,m]],[/\(dtv[\);].+(aquos)/i],[u,[h,"Sharp"],[d,m]],[/(bravia[\w- ]+) bui/i],[u,[h,L],[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,z],[u,z],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/((pebble))app/i],[h,u,[d,b]],[/droid.+; (glass) \d/i],[u,[h,C],[d,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,D],[d,b]],[/(quest( 2)?)/i],[u,[h,R],[d,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[d,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,y]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[d,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"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,H,X]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,H,X]],[/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,E]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,I+"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]]},K=s((function(e,t){if(typeof e===a&&(t=e,e=n),!(this instanceof K))return new K(e,t).getResult();var i=e||(typeof r!==o&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:""),s=t?B(Y,t):Y;return this.getBrowser=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,s.browser),e.major=V(e.version),e},this.getCPU=function(){var e={};return e[f]=n,q.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,q.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=n,e[p]=n,q.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=n,e[p]=n,q.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?z(e,275):e,this},this.setUA(i),this}),"UAParser");K.VERSION="0.7.31",K.BROWSER=U([c,p,"major"]),K.CPU=U([f]),K.DEVICE=U([u,h,d,g,v,m,y,b,_]),K.ENGINE=K.OS=U([c,p]),typeof e!==o?(typeof t!==o&&t.exports&&(e=t.exports=K),e.UAParser=K):typeof define===i&&define.amd?define((function(){return K})):typeof r!==o&&(r.UAParser=K);var $=typeof r!==o&&(r.jQuery||r.Zepto);if($&&!$.ua){var J=new K;$.ua=J.getResult(),$.ua.get=function(){return J.getUA()},$.ua.set=function(e){J.setUA(e);var t=J.getResult();for(var r in t)$.ua[r]=t[r]}}}("object"==typeof window?window:e)})),jh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="1.6.8"})),Nh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var t=(kn(),We(_n)),r=mt(),n=t.__importDefault(Ch()),i=un(),o=dr(),a=jh(),l=function(){function e(){var e;this.name="context",this.type=r.PluginType.BEFORE,this.eventId=0,this.library="amplitude-ts/".concat(a.VERSION),typeof navigator<"u"&&(e=navigator.userAgent),this.uaResult=new n.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 t.__awaiter(this,void 0,void 0,(function(){var r,n,a,s,l;return t.__generator(this,(function(u){return this.isSessionValid()||(this.config.sessionId=Date.now()),this.config.lastEventTime=Date.now(),r=(new Date).getTime(),n=this.uaResult.browser.name,a=this.uaResult.browser.version,s=this.uaResult.device.model||this.uaResult.os.name,l=this.uaResult.device.vendor,[2,t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign(t.__assign({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:r},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.osName&&{os_name:n}),this.config.trackingOptions.osVersion&&{os_version:a}),this.config.trackingOptions.deviceManufacturer&&{device_manufacturer:l}),this.config.trackingOptions.deviceModel&&{device_model:s}),this.config.trackingOptions.language&&{language:(0,o.getLanguage)()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:(0,i.UUID)(),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}();e.Context=l})),ll=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.LocalStorage=void 0;var t=(kn(),We(_n)),r=dr(),n=function(){function e(){}return s(e,"LocalStorage"),e.prototype.isEnabled=function(){return t.__awaiter(this,void 0,void 0,(function(){var n,i,o;return t.__generator(this,(function(t){switch(t.label){case 0:if(!(0,r.getGlobalScope)())return[2,!1];n=String(Date.now()),i=new e,o="AMP_TEST",t.label=1;case 1:return t.trys.push([1,4,5,7]),[4,i.set(o,n)];case 2:return t.sent(),[4,i.get(o)];case 3:return[2,t.sent()===n];case 4:return t.sent(),[2,!1];case 5:return[4,i.remove(o)];case 6:return t.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return t.__awaiter(this,void 0,void 0,(function(){var r;return t.__generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(r=t.sent())?[2,JSON.parse(r)]:[2,void 0];case 2:return t.sent(),[2,void 0];case 3:return[2]}}))}))},e.prototype.getRaw=function(e){var n;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return[2,(null===(n=(0,r.getGlobalScope)())||void 0===n?void 0:n.localStorage.getItem(e))||void 0]}))}))},e.prototype.set=function(e,n){var i;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(i=(0,r.getGlobalScope)())||void 0===i||i.localStorage.setItem(e,JSON.stringify(n))}catch{}return[2]}))}))},e.prototype.remove=function(e){var n;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(n=(0,r.getGlobalScope)())||void 0===n||n.localStorage.removeItem(e)}catch{}return[2]}))}))},e.prototype.reset=function(){var e;return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){try{null===(e=(0,r.getGlobalScope)())||void 0===e||e.localStorage.clear()}catch{}return[2]}))}))},e}();e.LocalStorage=n})),Lh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.XHRTransport=void 0;var t=(kn(),We(_n)),r=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return t.__extends(r,e),s(r,"XHRTransport"),r.prototype.send=function(e,r){return t.__awaiter(this,void 0,void 0,(function(){var n=this;return t.__generator(this,(function(t){return[2,new Promise((function(t,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,r=JSON.parse(e),a=n.buildResponse(r);t(a)}catch(e){i(e)}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(r))}))]}))}))},r}(un().BaseTransport);e.XHRTransport=r})),Fh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.SendBeaconTransport=void 0;var t=(kn(),We(_n)),r=dr(),n=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),s(n,"SendBeaconTransport"),n.prototype.send=function(e,n){return t.__awaiter(this,void 0,void 0,(function(){var i=this;return t.__generator(this,(function(t){return[2,new Promise((function(t,o){var a=(0,r.getGlobalScope)();if(null==a||!a.navigator.sendBeacon)throw new Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(n);return t(a.navigator.sendBeacon(e,JSON.stringify(n))?i.buildResponse({code:200,events_ingested:n.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}):i.buildResponse({code:500}))}catch(e){o(e)}}))]}))}))},n}(un().BaseTransport);e.SendBeaconTransport=n})),zh=pe((e=>{y();var t=e;Object.defineProperty(e,"__esModule",{value:!0}),e.getTopLevelDomain=e.createTransport=e.createDeviceId=e.createEventsStorage=e.createFlexibleStorage=e.createCookieStorage=e.useBrowserConfig=e.BrowserConfig=e.getDefaultConfig=void 0;var r=(kn(),We(_n)),n=mt(),i=un(),o=dr(),a=ll(),l=Lh(),u=Fh(),c=s((function(){var e=new i.MemoryStorage;return{cookieExpiration:365,cookieSameSite:"Lax",cookieSecure:!1,cookieStorage:e,disableCookies:!1,domain:"",sessionManager:new o.SessionManager(e,""),sessionTimeout:18e5,storageProvider:new i.MemoryStorage,trackingOptions:{deviceManufacturer:!0,deviceModel:!0,ipAddress:!0,language:!0,osName:!0,osVersion:!0,platform:!0},transportProvider:new o.FetchTransport}}),"getDefaultConfig");e.getDefaultConfig=c;var d=function(t){function n(n,i,o){var a,s,l,u,c,d,h,p,f,g,v,y,m=this,b=(0,e.getDefaultConfig)();return(m=t.call(this,r.__assign(r.__assign({flushIntervalMillis:1e3,flushMaxRetries:5,flushQueueSize:30},o),{apiKey:n,storageProvider:null!==(a=null==o?void 0:o.storageProvider)&&void 0!==a?a:b.storageProvider,transportProvider:null!==(s=null==o?void 0:o.transportProvider)&&void 0!==s?s:b.transportProvider}))||this).cookieStorage=null!==(l=null==o?void 0:o.cookieStorage)&&void 0!==l?l:b.cookieStorage,m.sessionManager=null!==(u=null==o?void 0:o.sessionManager)&&void 0!==u?u:b.sessionManager,m.sessionTimeout=null!==(c=null==o?void 0:o.sessionTimeout)&&void 0!==c?c:b.sessionTimeout,m.appVersion=null==o?void 0:o.appVersion,m.attribution=null==o?void 0:o.attribution,m.cookieExpiration=null!==(d=null==o?void 0:o.cookieExpiration)&&void 0!==d?d:b.cookieExpiration,m.cookieSameSite=null!==(h=null==o?void 0:o.cookieSameSite)&&void 0!==h?h:b.cookieSameSite,m.cookieSecure=null!==(p=null==o?void 0:o.cookieSecure)&&void 0!==p?p:b.cookieSecure,m.deviceId=null==o?void 0:o.deviceId,m.disableCookies=null!==(f=null==o?void 0:o.disableCookies)&&void 0!==f?f:b.disableCookies,m.domain=null!==(g=null==o?void 0:o.domain)&&void 0!==g?g:b.domain,m.lastEventTime=null!==(v=m.lastEventTime)&&void 0!==v?v:null==o?void 0:o.lastEventTime,m.optOut=!(null==o||!o.optOut),m.partnerId=null==o?void 0:o.partnerId,m.sessionId=null==o?void 0:o.sessionId,m.trackingOptions=null!==(y=null==o?void 0:o.trackingOptions)&&void 0!==y?y:b.trackingOptions,m.userId=i,m}return r.__extends(n,t),s(n,"BrowserConfig"),Object.defineProperty(n.prototype,"deviceId",{get:function(){return this.sessionManager.getDeviceId()},set:function(e){this.sessionManager.setDeviceId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"userId",{get:function(){return this.sessionManager.getUserId()},set:function(e){this.sessionManager.setUserId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sessionId",{get:function(){return this.sessionManager.getSessionId()},set:function(e){this.sessionManager.setSessionId(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.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(n.prototype,"lastEventTime",{get:function(){return this.sessionManager.getLastEventTime()},set:function(e){this.sessionManager.setLastEventTime(e)},enumerable:!1,configurable:!0}),n}(i.Config);e.BrowserConfig=d;var h=s((function(n,i,a){return r.__awaiter(t,void 0,void 0,(function(){var t,s,l,u,c,h,p,f,g,v,y,m,b,_,w,M,x;return r.__generator(this,(function(E){switch(E.label){case 0:return t=(0,e.getDefaultConfig)(),null!==(b=null==a?void 0:a.domain)&&void 0!==b?(l=b,[3,3]):[3,1];case 1:return[4,(0,e.getTopLevelDomain)()];case 2:l=E.sent(),E.label=3;case 3:return s=l,[4,(0,e.createCookieStorage)(r.__assign(r.__assign({},a),{domain:s}))];case 4:return u=E.sent(),c=(0,o.getCookieName)(n),[4,u.get(c)];case 5:return h=E.sent(),p=(0,o.getQueryParams)(),[4,new o.SessionManager(u,n).load()];case 6:return f=E.sent(),g=d.bind,v=[void 0,n,null!=i?i:null==h?void 0:h.userId],y=[r.__assign({},a)],m={cookieStorage:u,sessionManager:f,deviceId:(0,e.createDeviceId)(null==h?void 0:h.deviceId,null==a?void 0:a.deviceId,p.deviceId),domain:s,optOut:null!==(_=null==a?void 0:a.optOut)&&void 0!==_?_:!(null==h||!h.optOut)},[4,u.get(c)];case 7:return m.sessionId=null!==(M=null===(w=E.sent())||void 0===w?void 0:w.sessionId)&&void 0!==M?M:null==a?void 0:a.sessionId,[4,(0,e.createEventsStorage)(a)];case 8:return[2,new(g.apply(d,v.concat([r.__assign.apply(void 0,y.concat([(m.storageProvider=E.sent(),m.trackingOptions=r.__assign(r.__assign({},t.trackingOptions),null==a?void 0:a.trackingOptions),m.transportProvider=null!==(x=null==a?void 0:a.transportProvider)&&void 0!==x?x:(0,e.createTransport)(null==a?void 0:a.transport),m)]))])))]}}))}))}),"useBrowserConfig");e.useBrowserConfig=h;var p=s((function(n,i){return void 0===i&&(i=(0,e.getDefaultConfig)()),r.__awaiter(t,void 0,void 0,(function(){var t,o,a;return r.__generator(this,(function(s){switch(s.label){case 0:return t=r.__assign(r.__assign({},i),n),o=null==n?void 0:n.cookieStorage,(a=!o)?[3,2]:[4,o.isEnabled()];case 1:a=!s.sent(),s.label=2;case 2:return a?[2,(0,e.createFlexibleStorage)(t)]:[2,o]}}))}))}),"createCookieStorage");e.createCookieStorage=p;var f=s((function(e){return r.__awaiter(t,void 0,void 0,(function(){var t,n;return r.__generator(this,(function(r){switch(r.label){case 0:return t=new o.CookieStorage({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 a.LocalStorage).isEnabled()]:[3,4];case 3:r.sent()||(t=new i.MemoryStorage),r.label=4;case 4:return[2,t]}}))}))}),"createFlexibleStorage");e.createFlexibleStorage=f;var g=s((function(e){return r.__awaiter(t,void 0,void 0,(function(){var t,n,i,o,s,l,u;return r.__generator(this,(function(c){switch(c.label){case 0:if(e&&Object.prototype.hasOwnProperty.call(e,"storageProvider")&&!e.storageProvider)return[3,9];c.label=1;case 1:c.trys.push([1,7,8,9]),t=r.__values([null==e?void 0:e.storageProvider,new a.LocalStorage]),n=t.next(),c.label=2;case 2:return n.done?[3,6]:(i=n.value,(o=i)?[4,i.isEnabled()]:[3,4]);case 3:o=c.sent(),c.label=4;case 4:if(o)return[2,i];c.label=5;case 5:return n=t.next(),[3,2];case 6:return[3,9];case 7:return s=c.sent(),l={error:s},[3,9];case 8:try{n&&!n.done&&(u=t.return)&&u.call(t)}finally{if(l)throw l.error}return[7];case 9:return[2,void 0]}}))}))}),"createEventsStorage");e.createEventsStorage=g;var v=s((function(e,t,r){return t||r||e||(0,i.UUID)()}),"createDeviceId");e.createDeviceId=v;var m=s((function(t){return t===n.TransportType.XHR?new l.XHRTransport:t===n.TransportType.SendBeacon?new u.SendBeaconTransport:(0,e.getDefaultConfig)().transportProvider}),"createTransport");e.createTransport=m;var b=s((function(e){return r.__awaiter(t,void 0,void 0,(function(){var t,n,i,a,s,l,u,c;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,(new o.CookieStorage).isEnabled()];case 1:if(!r.sent()||!e&&typeof location>"u")return[2,""];for(t=null!=e?e:location.hostname,n=t.split("."),i=[],a="AMP_TLDTEST",s=n.length-2;s>=0;--s)i.push(n.slice(s).join("."));s=0,r.label=2;case 2:return s<i.length?(l=i[s],u={domain:"."+l},[4,(c=new o.CookieStorage(u)).set(a,1)]):[3,7];case 3:return r.sent(),[4,c.get(a)];case 4:return r.sent()?[4,c.remove(a)]:[3,6];case 5:return r.sent(),[2,"."+l];case 6:return s++,[3,2];case 7:return[2,""]}}))}))}),"getTopLevelDomain");e.getTopLevelDomain=b})),Vh=pe((e=>{y();var t=e;Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.parseTime=e.parseOldCookies=void 0;var r=(kn(),We(_n)),n=dr(),i=ll(),o=s((function(o,a){return r.__awaiter(t,void 0,void 0,(function(){var t,s,l,u,c,d,h,p,f;return r.__generator(this,(function(g){switch(g.label){case 0:return[4,(t=new n.CookieStorage).isEnabled()];case 1:return(!g.sent()||null!=a&&a.disableCookies)&&(t=new i.LocalStorage),[4,t.isEnabled()];case 2:return g.sent()?(s=(0,n.getOldCookieName)(o),[4,t.getRaw(s)]):[2,{optOut:!1}];case 3:return(l=g.sent())?[4,t.remove(s)]:[2,{optOut:!1}];case 4:return g.sent(),u=r.__read(l.split("."),5),c=u[0],d=u[1],h=u[2],p=u[3],f=u[4],[2,{deviceId:c,userId:(0,e.decode)(d),sessionId:(0,e.parseTime)(p),lastEventTime:(0,e.parseTime)(f),optOut:!!h}]}}))}))}),"parseOldCookies");e.parseOldCookies=o;var a=s((function(e){var t=parseInt(e,32);if(!isNaN(t))return t}),"parseTime");e.parseTime=a;var l=s((function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch{return}}),"decode");e.decode=l})),ml=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createInstance=e.AmplitudeBrowser=void 0;var t=(kn(),We(_n)),r=un(),n=dr(),i=ul(),o=Nh(),a=zh(),l=Vh(),u=function(e){function u(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(u,e),s(u,"AmplitudeBrowser"),u.prototype.init=function(i,s,u){var c,d,h;return void 0===i&&(i=""),t.__awaiter(this,void 0,void 0,(function(){var p,f,g,v,y=this;return t.__generator(this,(function(m){switch(m.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,(0,l.parseOldCookies)(i,u)]);case 1:return p=m.sent(),[4,(0,a.useBrowserConfig)(i,s||p.userId,t.__assign(t.__assign({},u),{deviceId:null!==(c=p.deviceId)&&void 0!==c?c:null==u?void 0:u.deviceId,sessionId:null!==(d=p.sessionId)&&void 0!==d?d:null==u?void 0:u.sessionId,optOut:null!==(h=null==u?void 0:u.optOut)&&void 0!==h?h:p.optOut,lastEventTime:p.lastEventTime}))];case 2:return f=m.sent(),[4,e.prototype._init.call(this,f)];case 3:return m.sent(),g=!this.config.lastEventTime,(!this.config.sessionId||this.config.lastEventTime&&Date.now()-this.config.lastEventTime>this.config.sessionTimeout)&&(this.setSessionId(Date.now()),g=!0),(v=(0,n.getAnalyticsConnector)()).eventBridge.setEventReceiver((function(e){y.track(e.eventType,e.eventProperties)})),v.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),[4,this.add(new o.Context)];case 4:return m.sent(),[4,this.add(new n.IdentityEventSender)];case 5:return m.sent(),[4,this.add(new r.Destination)];case 6:return m.sent(),this.initializing=!1,[4,this.runAttributionStrategy(f.attribution,g)];case 7:return m.sent(),[4,this.runQueuedFunctions("dispatchQ")];case 8:return m.sent(),[2]}}))}))},u.prototype.runAttributionStrategy=function(e,r){return void 0===r&&(r=!1),t.__awaiter(this,void 0,void 0,(function(){var i,o,s;return t.__generator(this,(function(l){switch(l.label){case 0:return i=this.track.bind(this),o=this.setSessionId.bind(this,Date.now()),[4,(0,a.createFlexibleStorage)(this.config)];case 1:return s=l.sent(),[4,new n.CampaignTracker(this.config.apiKey,t.__assign(t.__assign({},e),{storage:s,track:i,onNewCampaign:o})).send(r)];case 2:return l.sent(),[2]}}))}))},u.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},u.prototype.setUserId=function(e){this.config?this.config.userId=e:this.q.push(this.setUserId.bind(this,e))},u.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},u.prototype.setDeviceId=function(e){this.config?this.config.deviceId=e:this.q.push(this.setDeviceId.bind(this,e))},u.prototype.reset=function(){this.setUserId(void 0),this.setDeviceId((0,r.UUID)())},u.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},u.prototype.setSessionId=function(e){this.config?(this.config.sessionId=e,this.config.lastEventTime=void 0):this.q.push(this.setSessionId.bind(this,e))},u.prototype.setTransport=function(e){this.config?this.config.transportProvider=(0,a.createTransport)(e):this.q.push(this.setTransport.bind(this,e))},u.prototype.identify=function(t,n){if((0,i.isInstanceProxy)(t)){var o=t._q;t._q=[],t=(0,i.convertProxyObjectToRealObject)(new r.Identify,o)}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)},u.prototype.groupIdentify=function(t,n,o,a){if((0,i.isInstanceProxy)(o)){var s=o._q;o._q=[],o=(0,i.convertProxyObjectToRealObject)(new r.Identify,s)}return e.prototype.groupIdentify.call(this,t,n,o,a)},u.prototype.revenue=function(t,n){if((0,i.isInstanceProxy)(t)){var o=t._q;t._q=[],t=(0,i.convertProxyObjectToRealObject)(new r.Revenue,o)}return e.prototype.revenue.call(this,t,n)},u}(r.AmplitudeCore);e.AmplitudeBrowser=u;var c=s((function(){var e=new u;return{init:(0,r.debugWrapper)((0,r.returnWrapper)(e.init.bind(e)),"init",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),add:(0,r.debugWrapper)((0,r.returnWrapper)(e.add.bind(e)),"add",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.plugins"])),remove:(0,r.debugWrapper)((0,r.returnWrapper)(e.remove.bind(e)),"remove",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.plugins"])),track:(0,r.debugWrapper)((0,r.returnWrapper)(e.track.bind(e)),"track",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),logEvent:(0,r.debugWrapper)((0,r.returnWrapper)(e.logEvent.bind(e)),"logEvent",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),identify:(0,r.debugWrapper)((0,r.returnWrapper)(e.identify.bind(e)),"identify",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),groupIdentify:(0,r.debugWrapper)((0,r.returnWrapper)(e.groupIdentify.bind(e)),"groupIdentify",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),setGroup:(0,r.debugWrapper)((0,r.returnWrapper)(e.setGroup.bind(e)),"setGroup",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),revenue:(0,r.debugWrapper)((0,r.returnWrapper)(e.revenue.bind(e)),"revenue",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),flush:(0,r.debugWrapper)((0,r.returnWrapper)(e.flush.bind(e)),"flush",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config.apiKey","timeline.queue.length"])),getUserId:(0,r.debugWrapper)(e.getUserId.bind(e),"getUserId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.userId"])),setUserId:(0,r.debugWrapper)(e.setUserId.bind(e),"setUserId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.userId"])),getDeviceId:(0,r.debugWrapper)(e.getDeviceId.bind(e),"getDeviceId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.deviceId"])),setDeviceId:(0,r.debugWrapper)(e.setDeviceId.bind(e),"setDeviceId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.deviceId"])),reset:(0,r.debugWrapper)(e.reset.bind(e),"reset",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config","config.userId","config.deviceId"])),getSessionId:(0,r.debugWrapper)(e.getSessionId.bind(e),"getSessionId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),setSessionId:(0,r.debugWrapper)(e.setSessionId.bind(e),"setSessionId",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),setOptOut:(0,r.debugWrapper)(e.setOptOut.bind(e),"setOptOut",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"])),setTransport:(0,r.debugWrapper)(e.setTransport.bind(e),"setTransport",(0,r.getClientLogConfig)(e),(0,r.getClientStates)(e,["config"]))}}),"createInstance");e.createInstance=c,e.default=(0,e.createInstance)()})),Wh=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Types=e.Identify=e.Revenue=e.runQueuedFunctions=e.track=e.setUserId=e.setTransport=e.setSessionId=e.setOptOut=e.setGroup=e.setDeviceId=e.revenue=e.reset=e.remove=e.logEvent=e.init=e.identify=e.groupIdentify=e.getUserId=e.getSessionId=e.getDeviceId=e.flush=e.add=e.createInstance=void 0;var t=(kn(),We(_n)),r=t.__importDefault(ml()),n=ml();Object.defineProperty(e,"createInstance",{enumerable:!0,get:function(){return n.createInstance}}),e.add=r.default.add,e.flush=r.default.flush,e.getDeviceId=r.default.getDeviceId,e.getSessionId=r.default.getSessionId,e.getUserId=r.default.getUserId,e.groupIdentify=r.default.groupIdentify,e.identify=r.default.identify,e.init=r.default.init,e.logEvent=r.default.logEvent,e.remove=r.default.remove,e.reset=r.default.reset,e.revenue=r.default.revenue,e.setDeviceId=r.default.setDeviceId,e.setGroup=r.default.setGroup,e.setOptOut=r.default.setOptOut,e.setSessionId=r.default.setSessionId,e.setTransport=r.default.setTransport,e.setUserId=r.default.setUserId,e.track=r.default.track;var i=ul();Object.defineProperty(e,"runQueuedFunctions",{enumerable:!0,get:function(){return i.runQueuedFunctions}});var o=un();Object.defineProperty(e,"Revenue",{enumerable:!0,get:function(){return o.Revenue}}),Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}}),e.Types=t.__importStar(mt())})),Tg=pe(((e,t)=>{y();var r="__lodash_hash_undefined__",n=9007199254740991,i="[object Arguments]",o="[object Array]",a="[object Boolean]",l="[object Date]",u="[object Error]",c="[object Function]",d="[object Map]",h="[object Number]",p="[object Object]",f="[object Promise]",g="[object RegExp]",v="[object Set]",m="[object String]",b="[object WeakMap]",_="[object ArrayBuffer]",w="[object DataView]",M=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,E={};E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E[i]=E[o]=E[_]=E[a]=E[w]=E[l]=E[u]=E[c]=E[d]=E[h]=E[p]=E[g]=E[v]=E[m]=E[b]=!1;var S="object"==typeof global&&global&&global.Object===Object&&global,I="object"==typeof self&&self&&self.Object===Object&&self,k=S||I||Function("return this")(),C="object"==typeof e&&e&&!e.nodeType&&e,O=C&&"object"==typeof t&&t&&!t.nodeType&&t,T=O&&O.exports===C,A=T&&S.process,P=function(){try{return A&&A.binding&&A.binding("util")}catch{}}(),F=P&&P.isTypedArray;function j(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function L(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function N(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function D(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function R(e){return function(t){return e(t)}}function B(e,t){return e.has(t)}function U(e,t){return null==e?void 0:e[t]}function G(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function W(e,t){return function(r){return e(t(r))}}function V(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}s(j,"arrayFilter"),s(L,"arrayPush"),s(N,"arraySome"),s(D,"baseTimes"),s(R,"baseUnary"),s(B,"cacheHas"),s(U,"getValue"),s(G,"mapToArray"),s(W,"overArg"),s(V,"setToArray");var z,q=Array.prototype,H=Function.prototype,X=Object.prototype,Y=k["__core-js_shared__"],K=H.toString,$=X.hasOwnProperty,J=(z=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+z:"",Z=X.toString,Q=RegExp("^"+K.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=T?k.Buffer:void 0,te=k.Symbol,re=k.Uint8Array,ne=X.propertyIsEnumerable,ie=q.splice,oe=te?te.toStringTag:void 0,ae=Object.getOwnPropertySymbols,se=ee?ee.isBuffer:void 0,le=W(Object.keys,Object),ue=ct(k,"DataView"),ce=ct(k,"Map"),de=ct(k,"Promise"),he=ct(k,"Set"),pe=ct(k,"WeakMap"),fe=ct(Object,"create"),ge=bt(ue),ve=bt(ce),ye=bt(de),me=bt(he),be=bt(pe),_e=te?te.prototype:void 0,we=_e?_e.valueOf:void 0;function Me(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function xe(){this.__data__=fe?fe(null):{},this.size=0}function Ee(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 n=t[e];return n===r?void 0:n}return $.call(t,e)?t[e]:void 0}function Ie(e){var t=this.__data__;return fe?void 0!==t[e]:$.call(t,e)}function ke(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=fe&&void 0===t?r:t,this}function Ce(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Oe(){this.__data__=[],this.size=0}function Te(e){var t=this.__data__,r=$e(t,e);return!(r<0)&&(r==t.length-1?t.pop():ie.call(t,r,1),--this.size,!0)}function Ae(e){var t=this.__data__,r=$e(t,e);return r<0?void 0:t[r][1]}function Pe(e){return $e(this.__data__,e)>-1}function Fe(e,t){var r=this.__data__,n=$e(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function je(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Le(){this.size=0,this.__data__={hash:new Me,map:new(ce||Ce),string:new Me}}function Ne(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 Re(e){return ut(this,e).has(e)}function Be(e,t){var r=ut(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Ue(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new je;++t<r;)this.add(e[t])}function Ge(e){return this.__data__.set(e,r),this}function We(e){return this.__data__.has(e)}function Ve(e){var t=this.__data__=new Ce(e);this.size=t.size}function ze(){this.__data__=new Ce,this.size=0}function qe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function He(e){return this.__data__.get(e)}function Xe(e){return this.__data__.has(e)}function Ye(e,t){var r=this.__data__;if(r instanceof Ce){var n=r.__data__;if(!ce||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new je(n)}return r.set(e,t),this.size=r.size,this}function Ke(e,t){var r=Mt(e),n=!r&&wt(e),i=!r&&!n&&Et(e),o=!r&&!n&&!i&&Tt(e),a=r||n||i||o,s=a?D(e.length,String):[],l=s.length;for(var u in e)(t||$.call(e,u))&&(!a||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ft(u,l)))&&s.push(u);return s}function $e(e,t){for(var r=e.length;r--;)if(_t(e[r][0],t))return r;return-1}function Je(e,t,r){var n=t(e);return Mt(e)?n:L(n,r(e))}function Ze(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":oe&&oe in Object(e)?dt(e):mt(e)}function Qe(e){return Ot(e)&&Ze(e)==i}function et(e,t,r,n,i){return e===t||(null==e||null==t||!Ot(e)&&!Ot(t)?e!=e&&t!=t:tt(e,t,r,n,et,i))}function tt(e,t,r,n,a,s){var l=Mt(e),u=Mt(t),c=l?o:pt(e),d=u?o:pt(t),h=(c=c==i?p:c)==p,f=(d=d==i?p:d)==p,g=c==d;if(g&&Et(e)){if(!Et(t))return!1;l=!0,h=!1}if(g&&!h)return s||(s=new Ve),l||Tt(e)?ot(e,t,r,n,a,s):at(e,t,c,r,n,a,s);if(!(1&r)){var v=h&&$.call(e,"__wrapped__"),y=f&&$.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,b=y?t.value():t;return s||(s=new Ve),a(m,b,r,n,s)}}return!!g&&(s||(s=new Ve),st(e,t,r,n,a,s))}function rt(e){return!(!Ct(e)||vt(e))&&(It(e)?Q:M).test(bt(e))}function nt(e){return Ot(e)&&kt(e.length)&&!!E[Ze(e)]}function it(e){if(!yt(e))return le(e);var t=[];for(var r in Object(e))$.call(e,r)&&"constructor"!=r&&t.push(r);return t}function ot(e,t,r,n,i,o){var a=1&r,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,d=!0,h=2&r?new Ue:void 0;for(o.set(e,t),o.set(t,e);++c<s;){var p=e[c],f=t[c];if(n)var g=a?n(f,p,c,t,e,o):n(p,f,c,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(h){if(!N(t,(function(e,t){if(!B(h,t)&&(p===e||i(p,e,r,n,o)))return h.push(t)}))){d=!1;break}}else if(p!==f&&!i(p,f,r,n,o)){d=!1;break}}return o.delete(e),o.delete(t),d}function at(e,t,r,n,i,o,s){switch(r){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!o(new re(e),new re(t)));case a:case l:case h:return _t(+e,+t);case u:return e.name==t.name&&e.message==t.message;case g:case m:return e==t+"";case d:var c=G;case v:var p=1&n;if(c||(c=V),e.size!=t.size&&!p)return!1;var f=s.get(e);if(f)return f==t;n|=2,s.set(e,t);var y=ot(c(e),c(t),n,i,o,s);return s.delete(e),y;case"[object Symbol]":if(we)return we.call(e)==we.call(t)}return!1}function st(e,t,r,n,i,o){var a=1&r,s=lt(e),l=s.length;if(l!=lt(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:$.call(t,c)))return!1}var d=o.get(e);if(d&&o.get(t))return d==t;var h=!0;o.set(e,t),o.set(t,e);for(var p=a;++u<l;){var f=e[c=s[u]],g=t[c];if(n)var v=a?n(g,f,c,t,e,o):n(f,g,c,e,t,o);if(!(void 0===v?f===g||i(f,g,r,n,o):v)){h=!1;break}p||(p="constructor"==c)}if(h&&!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)&&(h=!1)}return o.delete(e),o.delete(t),h}function lt(e){return Je(e,At,ht)}function ut(e,t){var r=e.__data__;return gt(t)?r["string"==typeof t?"string":"hash"]:r.map}function ct(e,t){var r=U(e,t);return rt(r)?r:void 0}function dt(e){var t=$.call(e,oe),r=e[oe];try{e[oe]=void 0;var n=!0}catch{}var i=Z.call(e);return n&&(t?e[oe]=r:delete e[oe]),i}s(Me,"Hash"),s(xe,"hashClear"),s(Ee,"hashDelete"),s(Se,"hashGet"),s(Ie,"hashHas"),s(ke,"hashSet"),Me.prototype.clear=xe,Me.prototype.delete=Ee,Me.prototype.get=Se,Me.prototype.has=Ie,Me.prototype.set=ke,s(Ce,"ListCache"),s(Oe,"listCacheClear"),s(Te,"listCacheDelete"),s(Ae,"listCacheGet"),s(Pe,"listCacheHas"),s(Fe,"listCacheSet"),Ce.prototype.clear=Oe,Ce.prototype.delete=Te,Ce.prototype.get=Ae,Ce.prototype.has=Pe,Ce.prototype.set=Fe,s(je,"MapCache"),s(Le,"mapCacheClear"),s(Ne,"mapCacheDelete"),s(De,"mapCacheGet"),s(Re,"mapCacheHas"),s(Be,"mapCacheSet"),je.prototype.clear=Le,je.prototype.delete=Ne,je.prototype.get=De,je.prototype.has=Re,je.prototype.set=Be,s(Ue,"SetCache"),s(Ge,"setCacheAdd"),s(We,"setCacheHas"),Ue.prototype.add=Ue.prototype.push=Ge,Ue.prototype.has=We,s(Ve,"Stack"),s(ze,"stackClear"),s(qe,"stackDelete"),s(He,"stackGet"),s(Xe,"stackHas"),s(Ye,"stackSet"),Ve.prototype.clear=ze,Ve.prototype.delete=qe,Ve.prototype.get=He,Ve.prototype.has=Xe,Ve.prototype.set=Ye,s(Ke,"arrayLikeKeys"),s($e,"assocIndexOf"),s(Je,"baseGetAllKeys"),s(Ze,"baseGetTag"),s(Qe,"baseIsArguments"),s(et,"baseIsEqual"),s(tt,"baseIsEqualDeep"),s(rt,"baseIsNative"),s(nt,"baseIsTypedArray"),s(it,"baseKeys"),s(ot,"equalArrays"),s(at,"equalByTag"),s(st,"equalObjects"),s(lt,"getAllKeys"),s(ut,"getMapData"),s(ct,"getNative"),s(dt,"getRawTag");var ht=ae?function(e){return null==e?[]:(e=Object(e),j(ae(e),(function(t){return ne.call(e,t)})))}:Pt,pt=Ze;function ft(e,t){return!!(t=null==t?n: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!!J&&J in e}function yt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||X)}function mt(e){return Z.call(e)}function bt(e){if(null!=e){try{return K.call(e)}catch{}try{return e+""}catch{}}return""}function _t(e,t){return e===t||e!=e&&t!=t}(ue&&pt(new ue(new ArrayBuffer(1)))!=w||ce&&pt(new ce)!=d||de&&pt(de.resolve())!=f||he&&pt(new he)!=v||pe&&pt(new pe)!=b)&&(pt=s((function(e){var t=Ze(e),r=t==p?e.constructor:void 0,n=r?bt(r):"";if(n)switch(n){case ge:return w;case ve:return d;case ye:return f;case me:return v;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(_t,"eq");var wt=Qe(function(){return arguments}())?Qe:function(e){return Ot(e)&&$.call(e,"callee")&&!ne.call(e,"callee")},Mt=Array.isArray;function xt(e){return null!=e&&kt(e.length)&&!It(e)}s(xt,"isArrayLike");var Et=se||Ft;function St(e,t){return et(e,t)}function It(e){if(!Ct(e))return!1;var t=Ze(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function kt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}function Ct(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ot(e){return null!=e&&"object"==typeof e}s(St,"isEqual"),s(It,"isFunction"),s(kt,"isLength"),s(Ct,"isObject"),s(Ot,"isObjectLike");var Tt=F?R(F):nt;function At(e){return xt(e)?Ke(e):it(e)}function Pt(){return[]}function Ft(){return!1}s(At,"keys"),s(Pt,"stubArray"),s(Ft,"stubFalse"),t.exports=St})),tm=pe(((e,t)=>{y();var r="__lodash_hash_undefined__",n=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 d="object"==typeof global&&global&&global.Object===Object&&global,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")(),f="object"==typeof e&&e&&!e.nodeType&&e,g=f&&"object"==typeof t&&t&&!t.nodeType&&t,v=g&&g.exports===f,m=v&&d.process,b=function(){try{return g&&g.require&&g.require("util").types||m&&m.binding&&m.binding("util")}catch{}}(),_=b&&b.isTypedArray;function w(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function M(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function x(e){return function(t){return e(t)}}function E(e,t){return null==e?void 0:e[t]}function S(e,t){return function(r){return e(t(r))}}s(w,"apply"),s(M,"baseTimes"),s(x,"baseUnary"),s(E,"getValue"),s(S,"overArg");var I,k=Array.prototype,C=Function.prototype,O=Object.prototype,T=p["__core-js_shared__"],A=C.toString,P=O.hasOwnProperty,F=(I=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"",j=O.toString,L=A.call(Object),N=RegExp("^"+A.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=v?p.Buffer:void 0,R=p.Symbol,B=p.Uint8Array,U=D?D.allocUnsafe:void 0,G=S(Object.getPrototypeOf,Object),W=Object.create,V=O.propertyIsEnumerable,z=k.splice,q=R?R.toStringTag:void 0,H=function(){try{var e=He(Object,"defineProperty");return e({},"",{}),e}catch{}}(),X=D?D.isBuffer:void 0,Y=Math.max,K=Date.now,$=He(p,"Map"),J=He(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 r=new e;return e.prototype=void 0,r}}();function Q(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ee(){this.__data__=J?J(null):{},this.size=0}function te(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function re(e){var t=this.__data__;if(J){var n=t[e];return n===r?void 0:n}return P.call(t,e)?t[e]:void 0}function ne(e){var t=this.__data__;return J?void 0!==t[e]:P.call(t,e)}function ie(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=J&&void 0===t?r:t,this}function oe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ae(){this.__data__=[],this.size=0}function se(e){var t=this.__data__,r=Ie(t,e);return!(r<0)&&(r==t.length-1?t.pop():z.call(t,r,1),--this.size,!0)}function le(e){var t=this.__data__,r=Ie(t,e);return r<0?void 0:t[r][1]}function ue(e){return Ie(this.__data__,e)>-1}function ce(e,t){var r=this.__data__,n=Ie(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function de(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function he(){this.size=0,this.__data__={hash:new Q,map:new($||oe),string:new Q}}function pe(e){var t=qe(this,e).delete(e);return this.size-=t?1:0,t}function fe(e){return qe(this,e).get(e)}function ge(e){return qe(this,e).has(e)}function ve(e,t){var r=qe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?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__,r=t.delete(e);return this.size=t.size,r}function _e(e){return this.__data__.get(e)}function we(e){return this.__data__.has(e)}function Me(e,t){var r=this.__data__;if(r instanceof oe){var n=r.__data__;if(!$||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new de(n)}return r.set(e,t),this.size=r.size,this}function xe(e,t){var r=ut(e),n=!r&&lt(e),i=!r&&!n&&ht(e),o=!r&&!n&&!i&&mt(e),a=r||n||i||o,s=a?M(e.length,String):[],l=s.length;for(var u in e)(t||P.call(e,u))&&(!a||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ke(u,l)))&&s.push(u);return s}function Ee(e,t,r){(void 0!==r&&!st(e[t],r)||void 0===r&&!(t in e))&&ke(e,t,r)}function Se(e,t,r){var n=e[t];(!P.call(e,t)||!st(n,r)||void 0===r&&!(t in e))&&ke(e,t,r)}function Ie(e,t){for(var r=e.length;r--;)if(st(e[r][0],t))return r;return-1}function ke(e,t,r){"__proto__"==t&&H?H(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}s(Q,"Hash"),s(ee,"hashClear"),s(te,"hashDelete"),s(re,"hashGet"),s(ne,"hashHas"),s(ie,"hashSet"),Q.prototype.clear=ee,Q.prototype.delete=te,Q.prototype.get=re,Q.prototype.has=ne,Q.prototype.set=ie,s(oe,"ListCache"),s(ae,"listCacheClear"),s(se,"listCacheDelete"),s(le,"listCacheGet"),s(ue,"listCacheHas"),s(ce,"listCacheSet"),oe.prototype.clear=ae,oe.prototype.delete=se,oe.prototype.get=le,oe.prototype.has=ue,oe.prototype.set=ce,s(de,"MapCache"),s(he,"mapCacheClear"),s(pe,"mapCacheDelete"),s(fe,"mapCacheGet"),s(ge,"mapCacheHas"),s(ve,"mapCacheSet"),de.prototype.clear=he,de.prototype.delete=pe,de.prototype.get=fe,de.prototype.has=ge,de.prototype.set=ve,s(ye,"Stack"),s(me,"stackClear"),s(be,"stackDelete"),s(_e,"stackGet"),s(we,"stackHas"),s(Me,"stackSet"),ye.prototype.clear=me,ye.prototype.delete=be,ye.prototype.get=_e,ye.prototype.has=we,ye.prototype.set=Me,s(xe,"arrayLikeKeys"),s(Ee,"assignMergeValue"),s(Se,"assignValue"),s(Ie,"assocIndexOf"),s(ke,"baseAssignValue");var Ce=ze();function Oe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":q&&q in Object(e)?Xe(e):tt(e)}function Te(e){return vt(e)&&Oe(e)==i}function Ae(e){return!(!gt(e)||Ze(e))&&(pt(e)?N:l).test(at(e))}function Pe(e){return vt(e)&&ft(e.length)&&!!c[Oe(e)]}function Fe(e){if(!gt(e))return et(e);var t=Qe(e),r=[];for(var n in e)"constructor"==n&&(t||!P.call(e,n))||r.push(n);return r}function je(e,t,r,n,i){e!==t&&Ce(t,(function(o,a){if(i||(i=new ye),gt(o))Le(e,t,a,r,je,n,i);else{var s=n?n(nt(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),Ee(e,a,s)}}),_t)}function Le(e,t,r,n,i,o,a){var s=nt(e,r),l=nt(t,r),u=a.get(l);if(u)Ee(e,r,u);else{var c=o?o(s,l,r+"",e,t,a):void 0,d=void 0===c;if(d){var h=ut(l),p=!h&&ht(l),f=!h&&!p&&mt(l);c=l,h||p||f?ut(s)?c=s:dt(s)?c=Ge(s):p?(d=!1,c=Re(l,!0)):f?(d=!1,c=Ue(l,!0)):c=[]:yt(l)||lt(l)?(c=s,lt(s)?c=bt(s):(!gt(s)||pt(s))&&(c=Ye(l))):d=!1}d&&(a.set(l,c),i(c,l,n,o,a),a.delete(l)),Ee(e,r,c)}}function Ne(e,t){return it(rt(e,t,xt),e+"")}s(Oe,"baseGetTag"),s(Te,"baseIsArguments"),s(Ae,"baseIsNative"),s(Pe,"baseIsTypedArray"),s(Fe,"baseKeysIn"),s(je,"baseMerge"),s(Le,"baseMergeDeep"),s(Ne,"baseRest");var De=H?function(e,t){return H(e,"toString",{configurable:!0,enumerable:!1,value:Mt(t),writable:!0})}:xt;function Re(e,t){if(t)return e.slice();var r=e.length,n=U?U(r):new e.constructor(r);return e.copy(n),n}function Be(e){var t=new e.constructor(e.byteLength);return new B(t).set(new B(e)),t}function Ue(e,t){var r=t?Be(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ge(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function We(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=n?n(r[s],e[s],s,r,e):void 0;void 0===l&&(l=e[s]),i?ke(r,s,l):Se(r,s,l)}return r}function Ve(e){return Ne((function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&$e(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var s=r[n];s&&e(t,s,n,o)}return t}))}function ze(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===r(o[l],l,o))break}return t}}function qe(e,t){var r=e.__data__;return Je(t)?r["string"==typeof t?"string":"hash"]:r.map}function He(e,t){var r=E(e,t);return Ae(r)?r:void 0}function Xe(e){var t=P.call(e,q),r=e[q];try{e[q]=void 0;var n=!0}catch{}var i=j.call(e);return n&&(t?e[q]=r:delete e[q]),i}function Ye(e){return"function"!=typeof e.constructor||Qe(e)?{}:Z(G(e))}function Ke(e,t){var r=typeof e;return!!(t=null==t?n:t)&&("number"==r||"symbol"!=r&&u.test(e))&&e>-1&&e%1==0&&e<t}function $e(e,t,r){if(!gt(r))return!1;var n=typeof t;return!!("number"==n?ct(r)&&Ke(t,r.length):"string"==n&&t in r)&&st(r[t],e)}function Je(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Ze(e){return!!F&&F in e}function Qe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||O)}function et(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}function tt(e){return j.call(e)}function rt(e,t,r){return t=Y(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Y(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),w(e,this,s)}}function nt(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}s(Re,"cloneBuffer"),s(Be,"cloneArrayBuffer"),s(Ue,"cloneTypedArray"),s(Ge,"copyArray"),s(We,"copyObject"),s(Ve,"createAssigner"),s(ze,"createBaseFor"),s(qe,"getMapData"),s(He,"getNative"),s(Xe,"getRawTag"),s(Ye,"initCloneObject"),s(Ke,"isIndex"),s($e,"isIterateeCall"),s(Je,"isKeyable"),s(Ze,"isMasked"),s(Qe,"isPrototype"),s(et,"nativeKeysIn"),s(tt,"objectToString"),s(rt,"overRest"),s(nt,"safeGet");var it=ot(De);function ot(e){var t=0,r=0;return function(){var n=K(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function at(e){if(null!=e){try{return A.call(e)}catch{}try{return e+""}catch{}}return""}function st(e,t){return e===t||e!=e&&t!=t}s(ot,"shortOut"),s(at,"toSource"),s(st,"eq");var lt=Te(function(){return arguments}())?Te:function(e){return vt(e)&&P.call(e,"callee")&&!V.call(e,"callee")},ut=Array.isArray;function ct(e){return null!=e&&ft(e.length)&&!pt(e)}function dt(e){return vt(e)&&ct(e)}s(ct,"isArrayLike"),s(dt,"isArrayLikeObject");var ht=X||Et;function pt(e){if(!gt(e))return!1;var t=Oe(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<=n}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)||Oe(e)!=a)return!1;var t=G(e);if(null===t)return!0;var r=P.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&A.call(r)==L}s(pt,"isFunction"),s(ft,"isLength"),s(gt,"isObject"),s(vt,"isObjectLike"),s(yt,"isPlainObject");var mt=_?x(_):Pe;function bt(e){return We(e,_t(e))}function _t(e){return ct(e)?xe(e,!0):Fe(e)}s(bt,"toPlainObject"),s(_t,"keysIn");var wt=Ve((function(e,t,r){je(e,t,r)}));function Mt(e){return function(){return e}}function xt(e){return e}function Et(){return!1}s(Mt,"constant"),s(xt,"identity"),s(Et,"stubFalse"),t.exports=wt})),nm=pe(((e,t)=>{y(),function(r,n){var i="function",o="undefined",a="object",l="string",u="model",c="name",d="type",h="vendor",p="version",f="architecture",g="console",v="mobile",y="tablet",m="smarttv",b="wearable",_="embedded",w="Amazon",M="Apple",x="ASUS",E="BlackBerry",S="Browser",I="Chrome",k="Firefox",C="Google",O="Huawei",T="LG",A="Microsoft",P="Motorola",F="Opera",j="Samsung",L="Sharp",N="Sony",D="Xiaomi",R="Zebra",B="Facebook",U=s((function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r}),"extend"),G=s((function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t}),"enumerize"),W=s((function(e,t){return typeof e===l&&-1!==V(t).indexOf(V(e))}),"has"),V=s((function(e){return e.toLowerCase()}),"lowerize"),z=s((function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:n}),"majorize"),q=s((function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,350)}),"trim"),H=s((function(e,t){for(var r,o,s,l,u,c,d=0;d<t.length&&!u;){var h=t[d],p=t[d+1];for(r=o=0;r<h.length&&!u;)if(u=h[r++].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]):n:this[l[0]]=c?l[1].call(this,c,l[2]):n:4===l.length&&(this[l[0]]=c?l[3].call(this,c.replace(l[1],l[2])):n):this[l]=c||n;d+=2}}),"rgxMapper"),X=s((function(e,t){for(var r in t)if(typeof t[r]===a&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(W(t[r][i],e))return"?"===r?n:r}else if(W(t[r],e))return"?"===r?n:r;return e}),"strMapper"),Y={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"},K={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,F+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[c,F]],[/(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|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[c,"UC"+S]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/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,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[c,F+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[c,F+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[c,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[p,[c,k]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+S]],[/(oculus|samsung|sailfish|huawei)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,/\[(linkedin)app\]/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,I+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,I+" 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,X,{"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,k+" 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],[/(cobalt)\/([\w\.]+)/i],[c,[p,/master.|lts./,""]]],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-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[h,j],[d,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,j],[d,v]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[h,M],[d,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,M],[d,y]],[/(macintosh);/i],[u,[h,M]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,O],[d,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,O],[d,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," "],[h,D],[d,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,D],[d,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,[h,"OPPO"],[d,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,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,[h,P],[d,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,P],[d,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,T],[d,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,T],[d,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[d,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[d,v]],[/(pixel c)\b/i],[u,[h,C],[d,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,C],[d,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,[h,N],[d,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,N],[d,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[d,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,w],[d,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,w],[d,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,E],[d,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,x],[d,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,x],[d,v]],[/(nexus 9)/i],[u,[h,"HTC"],[d,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,L],[d,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],[h,u,[d,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],[h,u,[d,y]],[/(surface duo)/i],[u,[h,A],[d,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,v]],[/(u304aa)/i],[u,[h,"AT&T"],[d,v]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,v]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,y]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,y]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,y]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,v]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,v]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,y]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,y]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,v]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,y]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,y]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,y]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[d,y]],[/(sprint) (\w+)/i],[h,u,[d,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,A],[d,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,R],[d,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,R],[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[d,g]],[/(playstation [345portablevi]+)/i],[u,[h,N],[d,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,A],[d,g]],[/smart-tv.+(samsung)/i],[h,[d,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,j],[d,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,T],[d,m]],[/(apple) ?tv/i],[h,[u,M+" TV"],[d,m]],[/crkey/i],[[u,I+"cast"],[h,C],[d,m]],[/droid.+aft(\w)( bui|\))/i],[u,[h,w],[d,m]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[h,L],[d,m]],[/(bravia[\w ]+)( bui|\))/i],[u,[h,N],[d,m]],[/(mitv-\w{5}) bui/i],[u,[h,D],[d,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,q],[u,q],[d,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,m]],[/((pebble))app/i],[h,u,[d,b]],[/droid.+; (glass) \d/i],[u,[h,C],[d,b]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,R],[d,b]],[/(quest( 2)?)/i],[u,[h,B],[d,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[d,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,y]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"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,X,Y]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[p,X,Y]],[/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|harmonyos)/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,E]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[c,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[c,I+"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]]},$=s((function(e,t){if(typeof e===a&&(t=e,e=n),!(this instanceof $))return new $(e,t).getResult();var i=e||(typeof r!==o&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:""),s=t?U(K,t):K;return this.getBrowser=function(){var e={};return e[c]=n,e[p]=n,H.call(e,i,s.browser),e.major=z(e.version),e},this.getCPU=function(){var e={};return e[f]=n,H.call(e,i,s.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,H.call(e,i,s.device),e},this.getEngine=function(){var e={};return e[c]=n,e[p]=n,H.call(e,i,s.engine),e},this.getOS=function(){var e={};return e[c]=n,e[p]=n,H.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>350?q(e,350):e,this},this.setUA(i),this}),"UAParser");$.VERSION="0.7.33",$.BROWSER=G([c,p,"major"]),$.CPU=G([f]),$.DEVICE=G([u,h,d,g,v,m,y,b,_]),$.ENGINE=$.OS=G([c,p]),typeof e!==o?(typeof t!==o&&t.exports&&(e=t.exports=$),e.UAParser=$):typeof define===i&&define.amd?define((function(){return $})):typeof r!==o&&(r.UAParser=$);var J=typeof r!==o&&(r.jQuery||r.Zepto);if(J&&!J.ua){var Z=new $;J.ua=Z.getResult(),J.ua.get=function(){return Z.getUA()},J.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var r in t)J.ua[r]=t[r]}}}("object"==typeof window?window:e)})),wm=pe(((e,t)=>{y(),t.exports=s((function(e){if(!Array.isArray(e))throw new TypeError("array-unique expects an array.");for(var t=e.length,r=-1;r++<t;)for(var n=r+1;n<e.length;++n)e[r]===e[n]&&e.splice(n--,1);return e}),"unique"),t.exports.immutable=s((function(e){if(!Array.isArray(e))throw new TypeError("array-unique expects an array.");for(var r=e.length,n=new Array(r),i=0;i<r;i++)n[i]=e[i];return t.exports(n)}),"uniqueImmutable")})),Bm=pe(((e,t)=>{var r,n;y(),r=e,n=function(){function e(e,r,i,o,a){t(e,r,i||0,o||e.length-1,a||n)}function t(e,n,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,l=n-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);t(e,n,Math.max(i,Math.floor(n-l*c/s+d)),Math.min(o,Math.floor(n+(s-l)*c/s+d)),a)}var h=e[n],p=i,f=o;for(r(e,i,n),a(e[o],h)>0&&r(e,i,o);p<f;){for(r(e,p,f),p++,f--;a(e[p],h)<0;)p++;for(;a(e[f],h)>0;)f--}0===a(e[i],h)?r(e,i,f):r(e,++f,o),f<=n&&(i=f+1),n<=f&&(o=f-1)}}function r(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function n(e,t){return e<t?-1:e>t?1:0}s(e,"quickselect"),s(t,"quickselectStep"),s(r,"swap"),s(n,"defaultCompare");var i=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()}),"RBush");function o(e,t,r){if(!r)return t.indexOf(e);for(var n=0;n<t.length;n++)if(r(e,t[n]))return n;return-1}function a(e,t){l(e,0,e.children.length,t,e)}function l(e,t,r,n,i){i||(i=m(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=t;o<r;o++){var a=e.children[o];u(i,e.leaf?n(a):a)}return i}function u(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 c(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function h(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){var r=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-r)*Math.max(0,o-n)}function v(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function m(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function b(t,r,n,i,o){for(var a=[r,n];a.length;)if(!((n=a.pop())-(r=a.pop())<=i)){var s=r+Math.ceil((n-r)/i/2)*i;e(t,s,r,n,o),a.push(r,s,s,n)}}return i.prototype.all=s((function(){return this._all(this.data,[])}),"all"),i.prototype.search=s((function(e){var t=this.data,r=[];if(!y(e,t))return r;for(var n=this.toBBox,i=[];t;){for(var o=0;o<t.children.length;o++){var a=t.children[o],s=t.leaf?n(a):a;y(e,s)&&(t.leaf?r.push(a):v(e,s)?this._all(a,r):i.push(a))}t=i.pop()}return r}),"search"),i.prototype.collides=s((function(e){var t=this.data;if(!y(e,t))return!1;for(var r=[];t;){for(var n=0;n<t.children.length;n++){var i=t.children[n],o=t.leaf?this.toBBox(i):i;if(y(e,o)){if(t.leaf||v(e,o))return!0;r.push(i)}}t=r.pop()}return!1}),"collides"),i.prototype.load=s((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 r=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var n=this.data;this.data=r,r=n}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this}),"load"),i.prototype.insert=s((function(e){return e&&this._insert(e,this.data.height-1),this}),"insert"),i.prototype.clear=s((function(){return this.data=m([]),this}),"clear"),i.prototype.remove=s((function(e,t){if(!e)return this;for(var r,n,i,a=this.data,s=this.toBBox(e),l=[],u=[];a||l.length;){if(a||(a=l.pop(),n=l[l.length-1],r=u.pop(),i=!0),a.leaf){var c=o(e,a.children,t);if(-1!==c)return a.children.splice(c,1),l.push(a),this._condense(l),this}i||a.leaf||!v(a,s)?n?(r++,a=n.children[r],i=!1):a=null:(l.push(a),u.push(r),r=0,n=a,a=a.children[0])}return this}),"remove"),i.prototype.toBBox=s((function(e){return e}),"toBBox"),i.prototype.compareMinX=s((function(e,t){return e.minX-t.minX}),"compareMinX"),i.prototype.compareMinY=s((function(e,t){return e.minY-t.minY}),"compareMinY"),i.prototype.toJSON=s((function(){return this.data}),"toJSON"),i.prototype.fromJSON=s((function(e){return this.data=e,this}),"fromJSON"),i.prototype._all=s((function(e,t){for(var r=[];e;)e.leaf?t.push.apply(t,e.children):r.push.apply(r,e.children),e=r.pop();return t}),"_all"),i.prototype._build=s((function(e,t,r,n){var i,o=r-t+1,s=this._maxEntries;if(o<=s)return a(i=m(e.slice(t,r+1)),this.toBBox),i;n||(n=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,n-1))),(i=m([])).leaf=!1,i.height=n;var l=Math.ceil(o/s),u=l*Math.ceil(Math.sqrt(s));b(e,t,r,u,this.compareMinX);for(var c=t;c<=r;c+=u){var d=Math.min(c+u-1,r);b(e,c,d,l,this.compareMinY);for(var h=c;h<=d;h+=l){var p=Math.min(h+l-1,d);i.children.push(this._build(e,h,p,n-1))}}return a(i,this.toBBox),i}),"_build"),i.prototype._chooseSubtree=s((function(e,t,r,n){for(;n.push(t),!t.leaf&&n.length-1!==r;){for(var i=1/0,o=1/0,a=void 0,s=0;s<t.children.length;s++){var l=t.children[s],u=h(l),c=f(e,l)-u;c<o?(o=c,i=u<i?u:i,a=l):c===o&&u<i&&(i=u,a=l)}t=a||t.children[0]}return t}),"_chooseSubtree"),i.prototype._insert=s((function(e,t,r){var n=r?e:this.toBBox(e),i=[],o=this._chooseSubtree(n,this.data,t,i);for(o.children.push(e),u(o,n);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(n,i,t)}),"_insert"),i.prototype._split=s((function(e,t){var r=e[t],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);var o=this._chooseSplitIndex(r,i,n),s=m(r.children.splice(o,r.children.length-o));s.height=r.height,s.leaf=r.leaf,a(r,this.toBBox),a(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(r,s)}),"_split"),i.prototype._splitRoot=s((function(e,t){this.data=m([e,t]),this.data.height=e.height+1,this.data.leaf=!1,a(this.data,this.toBBox)}),"_splitRoot"),i.prototype._chooseSplitIndex=s((function(e,t,r){for(var n,i=1/0,o=1/0,a=t;a<=r-t;a++){var s=l(e,0,a,this.toBBox),u=l(e,a,r,this.toBBox),c=g(s,u),d=h(s)+h(u);c<i?(i=c,n=a,o=d<o?d:o):c===i&&d<o&&(o=d,n=a)}return n||r-t}),"_chooseSplitIndex"),i.prototype._chooseSplitAxis=s((function(e,t,r){var n=e.leaf?this.compareMinX:c,i=e.leaf?this.compareMinY:d;this._allDistMargin(e,t,r,n)<this._allDistMargin(e,t,r,i)&&e.children.sort(n)}),"_chooseSplitAxis"),i.prototype._allDistMargin=s((function(e,t,r,n){e.children.sort(n);for(var i=this.toBBox,o=l(e,0,t,i),a=l(e,r-t,r,i),s=p(o)+p(a),c=t;c<r-t;c++){var d=e.children[c];u(o,e.leaf?i(d):d),s+=p(o)}for(var h=r-t-1;h>=t;h--){var f=e.children[h];u(a,e.leaf?i(f):f),s+=p(a)}return s}),"_allDistMargin"),i.prototype._adjustParentBBoxes=s((function(e,t,r){for(var n=r;n>=0;n--)u(t[n],e)}),"_adjustParentBBoxes"),i.prototype._condense=s((function(e){for(var t=e.length-1,r=void 0;t>=0;t--)0===e[t].children.length?t>0?(r=e[t-1].children).splice(r.indexOf(e[t]),1):this.clear():a(e[t],this.toBBox)}),"_condense"),s(o,"findItem"),s(a,"calcBBox"),s(l,"distBBox"),s(u,"extend"),s(c,"compareNodeMinX"),s(d,"compareNodeMinY"),s(h,"bboxArea"),s(p,"bboxMargin"),s(f,"enlargedArea"),s(g,"intersectionArea"),s(v,"contains"),s(y,"intersects"),s(m,"createNode"),s(b,"multiSelect"),i},"object"==typeof e&&typeof t<"u"?t.exports=n():"function"==typeof define&&define.amd?define(n):(r=r||self).RBush=n()})),uf=pe((e=>{function t(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function r(e,t,r){switch(void 0===r&&(r={}),e){case"Point":return n(t).geometry;case"LineString":return l(t).geometry;case"Polygon":return o(t).geometry;case"MultiPoint":return h(t).geometry;case"MultiLineString":return d(t).geometry;case"MultiPolygon":return p(t).geometry;default:throw new Error(e+" is invalid")}}function n(e,r,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(!S(e[0])||!S(e[1]))throw new Error("coordinates must contain numbers");return t({type:"Point",coordinates:e},r,n)}function i(e,t,r){return void 0===r&&(r={}),c(e.map((function(e){return n(e,t)})),r)}function o(e,r,n){void 0===n&&(n={});for(var i=0,o=e;i<o.length;i++){var a=o[i];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<a[a.length-1].length;s++)if(a[a.length-1][s]!==a[0][s])throw new Error("First and last Position are not equivalent.")}return t({type:"Polygon",coordinates:e},r,n)}function a(e,t,r){return void 0===r&&(r={}),c(e.map((function(e){return o(e,t)})),r)}function l(e,r,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return t({type:"LineString",coordinates:e},r,n)}function u(e,t,r){return void 0===r&&(r={}),c(e.map((function(e){return l(e,t)})),r)}function c(e,t){void 0===t&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function d(e,r,n){return void 0===n&&(n={}),t({type:"MultiLineString",coordinates:e},r,n)}function h(e,r,n){return void 0===n&&(n={}),t({type:"MultiPoint",coordinates:e},r,n)}function p(e,r,n){return void 0===n&&(n={}),t({type:"MultiPolygon",coordinates:e},r,n)}function f(e,r,n){return void 0===n&&(n={}),t({type:"GeometryCollection",geometries:e},r,n)}function g(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r}function v(t,r){void 0===r&&(r="kilometers");var n=e.factors[r];if(!n)throw new Error(r+" units is invalid");return t*n}function m(t,r){void 0===r&&(r="kilometers");var n=e.factors[r];if(!n)throw new Error(r+" units is invalid");return t/n}function b(e,t){return w(m(e,t))}function _(e){var t=e%360;return t<0&&(t+=360),t}function w(e){return 180*(e%(2*Math.PI))/Math.PI}function M(e){return e%360*Math.PI/180}function x(e,t,r){if(void 0===t&&(t="kilometers"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return v(m(e,t),r)}function E(t,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[r];if(!i)throw new Error("invalid original units");var o=e.areaFactors[n];if(!o)throw new Error("invalid final units");return t/i*o}function S(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function I(e){return!!e&&e.constructor===Object}function k(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 C(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")}y(),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(r,"geometry"),e.geometry=r,s(n,"point"),e.point=n,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(d,"multiLineString"),e.multiLineString=d,s(h,"multiPoint"),e.multiPoint=h,s(p,"multiPolygon"),e.multiPolygon=p,s(f,"geometryCollection"),e.geometryCollection=f,s(g,"round"),e.round=g,s(v,"radiansToLength"),e.radiansToLength=v,s(m,"lengthToRadians"),e.lengthToRadians=m,s(b,"lengthToDegrees"),e.lengthToDegrees=b,s(_,"bearingToAzimuth"),e.bearingToAzimuth=_,s(w,"radiansToDegrees"),e.radiansToDegrees=w,s(M,"degreesToRadians"),e.degreesToRadians=M,s(x,"convertLength"),e.convertLength=x,s(E,"convertArea"),e.convertArea=E,s(S,"isNumber"),e.isNumber=S,s(I,"isObject"),e.isObject=I,s(k,"validateBBox"),e.validateBBox=k,s(C,"validateId"),e.validateId=C})),cf=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0});var t=uf();function r(e,t,n){if(null!==e)for(var i,o,a,s,l,u,c,d,h=0,p=0,f=e.type,g="FeatureCollection"===f,v="Feature"===f,y=g?e.features.length:1,m=0;m<y;m++){l=(d=!!(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 _=0,w=0;if(null!==(s=d?c.geometries[b]:c)){u=s.coordinates;var M=s.type;switch(h=!n||"Polygon"!==M&&"MultiPolygon"!==M?0:1,M){case null:break;case"Point":if(!1===t(u,p,m,_,w))return!1;p++,_++;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&&_++}"LineString"===M&&_++;break;case"Polygon":case"MultiLineString":for(i=0;i<u.length;i++){for(o=0;o<u[i].length-h;o++){if(!1===t(u[i][o],p,m,_,w))return!1;p++}"MultiLineString"===M&&_++,"Polygon"===M&&w++}"Polygon"===M&&_++;break;case"MultiPolygon":for(i=0;i<u.length;i++){for(w=0,o=0;o<u[i].length;o++){for(a=0;a<u[i][o].length-h;a++){if(!1===t(u[i][o][a],p,m,_,w))return!1;p++}w++}_++}break;case"GeometryCollection":for(i=0;i<s.geometries.length;i++)if(!1===r(s.geometries[i],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function n(e,t,n,i){var o=n;return r(e,(function(e,r,i,a,s){o=0===r&&void 0===n?e:t(o,e,r,i,a,s)}),i),o}function i(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&!1!==t(e.features[r].properties,r);r++);break;case"Feature":t(e.properties,0)}}function o(e,t,r){var n=r;return i(e,(function(e,i){n=0===i&&void 0===r?e:t(n,e,i)})),n}function a(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var r=0;r<e.features.length&&!1!==t(e.features[r],r);r++);}function l(e,t,r){var n=r;return a(e,(function(e,i){n=0===i&&void 0===r?e:t(n,e,i)})),n}function u(e){var t=[];return r(e,(function(e){t.push(e)})),t}function c(e,t){var r,n,i,o,a,s,l,u,c,d,h=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(r=0;r<g;r++){for(s=p?e.features[r].geometry:f?e.geometry:e,u=p?e.features[r].properties:f?e.properties:{},c=p?e.features[r].bbox:f?e.bbox:void 0,d=p?e.features[r].id:f?e.id:void 0,a=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=l?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,h,u,c,d))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],h,u,c,d))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,h,u,c,d))return!1;h++}}function d(e,t,r){var n=r;return c(e,(function(e,i,o,a,s){n=0===i&&void 0===r?e:t(n,e,i,o,a,s)})),n}function h(e,r){c(e,(function(e,n,i,o,a){var s,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==r(t.feature(e,i,{bbox:o,id:a}),n,0)&&void 0}switch(l){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var u=0;u<e.coordinates.length;u++){var c={type:s,coordinates:e.coordinates[u]};if(!1===r(t.feature(c,i),n,u))return!1}}))}function p(e,t,r){var n=r;return h(e,(function(e,i,o){n=0===i&&0===o&&void 0===r?e:t(n,e,i,o)})),n}function f(e,n){h(e,(function(e,i,o){var a=0;if(e.geometry){var s=e.geometry.type;if("Point"!==s&&"MultiPoint"!==s){var l,u=0,c=0,d=0;if(!1===r(e,(function(r,s,h,p,f){if(void 0===l||i>u||p>c||f>d)return l=r,u=i,c=p,d=f,void(a=0);var g=t.lineString([l,r],e.properties);if(!1===n(g,i,o,f,a))return!1;a++,l=r})))return!1}}}))}function g(e,t,r){var n=r,i=!1;return f(e,(function(e,o,a,s,l){n=!1===i&&void 0===r?e:t(n,e,o,a,s,l),i=!0})),n}function v(e,r){if(!e)throw new Error("geojson is required");h(e,(function(e,n,i){if(null!==e.geometry){var o=e.geometry.type,a=e.geometry.coordinates;switch(o){case"LineString":if(!1===r(e,n,i,0,0))return!1;break;case"Polygon":for(var s=0;s<a.length;s++)if(!1===r(t.lineString(a[s],e.properties),n,i,s))return!1}}}))}function m(e,t,r){var n=r;return v(e,(function(e,i,o,a){n=0===i&&void 0===r?e:t(n,e,i,o,a)})),n}function b(e,r){if(r=r||{},!t.isObject(r))throw new Error("options is invalid");var n,i=r.featureIndex||0,o=r.multiFeatureIndex||0,a=r.geometryIndex||0,s=r.segmentIndex||0,l=r.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,n=e.features[i].geometry;break;case"Feature":l=l||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var u=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=u.length+s-1),t.lineString([u[s],u[s+1]],l,r);case"Polygon":return a<0&&(a=u.length+a),s<0&&(s=u[a].length+s-1),t.lineString([u[a][s],u[a][s+1]],l,r);case"MultiLineString":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s-1),t.lineString([u[o][s],u[o][s+1]],l,r);case"MultiPolygon":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a),s<0&&(s=u[o][a].length-s-1),t.lineString([u[o][a][s],u[o][a][s+1]],l,r)}throw new Error("geojson is invalid")}function _(e,r){if(r=r||{},!t.isObject(r))throw new Error("options is invalid");var n,i=r.featureIndex||0,o=r.multiFeatureIndex||0,a=r.geometryIndex||0,s=r.coordIndex||0,l=r.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,n=e.features[i].geometry;break;case"Feature":l=l||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var u=n.coordinates;switch(n.type){case"Point":return t.point(u,l,r);case"MultiPoint":return o<0&&(o=u.length+o),t.point(u[o],l,r);case"LineString":return s<0&&(s=u.length+s),t.point(u[s],l,r);case"Polygon":return a<0&&(a=u.length+a),s<0&&(s=u[a].length+s),t.point(u[a][s],l,r);case"MultiLineString":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),t.point(u[o][s],l,r);case"MultiPolygon":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a),s<0&&(s=u[o][a].length-s),t.point(u[o][a][s],l,r)}throw new Error("geojson is invalid")}s(r,"coordEach"),s(n,"coordReduce"),s(i,"propEach"),s(o,"propReduce"),s(a,"featureEach"),s(l,"featureReduce"),s(u,"coordAll"),s(c,"geomEach"),s(d,"geomReduce"),s(h,"flattenEach"),s(p,"flattenReduce"),s(f,"segmentEach"),s(g,"segmentReduce"),s(v,"lineEach"),s(m,"lineReduce"),s(b,"findSegment"),s(_,"findPoint"),e.coordAll=u,e.coordEach=r,e.coordReduce=n,e.featureEach=a,e.featureReduce=l,e.findPoint=_,e.findSegment=b,e.flattenEach=h,e.flattenReduce=p,e.geomEach=c,e.geomReduce=d,e.lineEach=v,e.lineReduce=m,e.propEach=i,e.propReduce=o,e.segmentEach=f,e.segmentReduce=g})),Km=pe((e=>{y(),Object.defineProperty(e,"__esModule",{value:!0});var t=cf();function r(e){var r=[1/0,1/0,-1/0,-1/0];return t.coordEach(e,(function(e){r[0]>e[0]&&(r[0]=e[0]),r[1]>e[1]&&(r[1]=e[1]),r[2]<e[0]&&(r[2]=e[0]),r[3]<e[1]&&(r[3]=e[1])})),r}s(r,"bbox"),r.default=r,e.default=r})),tv=pe(((e,t)=>{y();var r=Bm(),n=uf(),i=cf(),o=Km().default,a=i.featureEach,l=(i.coordEach,n.polygon,n.featureCollection);function u(e){var t=new r(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:o(e),r.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)})),r.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),r.prototype.remove.call(this,e,t)},t.clear=function(){return r.prototype.clear.call(this)},t.search=function(e){var t=r.prototype.search.call(this,this.toBBox(e));return l(t)},t.collides=function(e){return r.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=r.prototype.all.call(this);return l(e)},t.toJSON=function(){return r.prototype.toJSON.call(this)},t.fromJSON=function(e){return r.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})),wv=pe(((e,t)=>{y(),t.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())))})),Ev=pe(((e,t)=>{y();var r="%[a-f0-9]{2}",n=new RegExp("("+r+")|([^%]+?)","gi"),i=new RegExp("("+r+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],o(r),o(n))}function a(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(n)||[],r=1;r<t.length;r++)t=(e=o(t,r).join("")).match(n)||[];return e}}function l(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=i.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=a(r[0]);n!==r[0]&&(t[r[0]]=n)}r=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)}}})),Sv=pe(((e,t)=>{y(),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 r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}})),Pv=pe(((e,t)=>{y(),t.exports=function(e,t){for(var r={},n=Object.keys(e),i=Array.isArray(t),o=0;o<n.length;o++){var a=n[o],s=e[a];(i?-1!==t.indexOf(a):t(a,s,e))&&(r[a]=s)}return r}})),Rv=pe((e=>{y();var t=wv(),r=Ev(),n=Sv(),i=Pv(),o=s((e=>null==e),"isNullOrUndefined"),a=Symbol("encodeFragmentIdentifier");function l(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{let i=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[d(t,e),"[",i,"]"].join("")]:[...r,[d(t,e),"[",d(i,e),"]=",d(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[d(t,e),"[]"].join("")]:[...r,[d(t,e),"[]=",d(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:(i=null===i?"":i,0===n.length?[[d(r,e),t,d(i,e)].join("")]:[[n,d(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,d(t,e)]:[...r,[d(t,e),"=",d(n,e)].join("")]}}function u(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{let i="string"==typeof r&&r.includes(e.arrayFormatSeparator),o="string"==typeof r&&!i&&h(r,e).includes(e.arrayFormatSeparator);r=o?h(r,e):r;let a=i||o?r.split(e.arrayFormatSeparator).map((t=>h(t,e))):null===r?r:h(r,e);n[t]=a};case"bracket-separator":return(t,r,n)=>{let i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(n[t]=r&&h(r,e));let o=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>h(t,e)));void 0!==n[t]?n[t]=[].concat(n[t],o):n[t]=o};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function d(e,r){return r.encode?r.strict?t(e):encodeURIComponent(e):e}function h(e,t){return t.decode?r(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="",r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}function v(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 r=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,a]=n(t.decode?o.replace(/\+/g," "):o,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:h(a,t),r(h(e,t),a,i)}for(let e of Object.keys(i)){let r=i[e];if("object"==typeof r&&null!==r)for(let e of Object.keys(r))r[e]=m(r[e],t);else i[e]=m(r,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce(((e,t)=>{let r=i[t];return r&&"object"==typeof r&&!Array.isArray(r)?e[t]=p(r):e[t]=r,e}),Object.create(null))}s(l,"encoderForArrayFormat"),s(u,"parserForArrayFormat"),s(c,"validateArrayFormatSeparator"),s(d,"encode"),s(h,"decode"),s(p,"keysSorter"),s(f,"removeHash"),s(g,"getHash"),s(v,"extract"),s(m,"parseValue"),s(b,"parse"),e.extract=v,e.parse=b,e.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let r=s((r=>t.skipNull&&o(e[r])||t.skipEmptyString&&""===e[r]),"shouldFilter"),n=l(t),i={};for(let t of Object.keys(e))r(t)||(i[t]=e[t]);let a=Object.keys(i);return!1!==t.sort&&a.sort(t.sort),a.map((r=>{let i=e[r];return void 0===i?"":null===i?d(r,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?d(r,t)+"[]":i.reduce(n(r),[]).join("&"):d(r,t)+"="+d(i,t)})).filter((e=>e.length>0)).join("&")},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[r,i]=n(e,"#");return Object.assign({url:r.split("?")[0]||"",query:b(v(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:h(i,t)}:{})},e.stringifyUrl=(t,r)=>{r=Object.assign({encode:!0,strict:!0,[a]:!0},r);let n=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,r);l&&(l="?".concat(l));let u=g(t.url);return t.fragmentIdentifier&&(u="#".concat(r[a]?d(t.fragmentIdentifier,r):t.fragmentIdentifier)),"".concat(n).concat(l).concat(u)},e.pick=(t,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[a]:!1},n);let{url:o,query:s,fragmentIdentifier:l}=e.parseUrl(t,n);return e.stringifyUrl({url:o,query:i(s,r),fragmentIdentifier:l},n)},e.exclude=(t,r,n)=>{let i=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return e.pick(t,i,n)}})),Uv=pe(((e,t)=>{var r,n;y(),r=e,n=function(){var e=s((function(){return e=Object.assign||s((function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}),"__assign"),e.apply(this,arguments)}),"__assign");function t(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function r(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}s(t,"__values"),s(r,"__read");var n,i="KEYS",o="VALUES",a="",l=function(){function e(e,t){var r=e._tree,n=Array.from(r.keys());this.set=e,this._type=t,this._path=n.length>0?[{node:r,keys:n}]:[]}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=u(this._path),t=e.node,r=e.keys;if(u(r)===a)return{done:!1,value:this.result()};var n=t.get(u(r));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()},e.prototype.backtrack=function(){if(0!==this._path.length){var e=u(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 u(t)})).filter((function(e){return e!==a})).join("")},e.prototype.value=function(){return u(this._path).node.get(a)},e.prototype.result=function(){switch(this._type){case o:return this.value();case i:return this.key();default:return[this.key(),this.value()]}},e.prototype[Symbol.iterator]=function(){return this},e}(),u=s((function(e){return e[e.length-1]}),"last$1"),c=s((function(e,t,r){var n=new Map;if(void 0===t)return n;for(var i=t.length+1,o=i+r,a=new Uint8Array(o*i).fill(r+1),s=0;s<i;++s)a[s]=s;for(var l=1;l<o;++l)a[l*i]=l;return d(e,t,r,n,a,1,i,""),n}),"fuzzySearch"),d=s((function(e,r,n,i,o,s,l,u){var c,h,p=s*l;try{e:for(var f=t(e.keys()),g=f.next();!g.done;g=f.next()){var v=g.value;if(v===a){var y=o[p-1];y<=n&&i.set(u,[e.get(v),y])}else{for(var m=s,b=0;b<v.length;++b,++m){for(var _=v[b],w=l*m,M=w-l,x=o[w],E=Math.max(0,m-n-1),S=Math.min(l-1,m+n),I=E;I<S;++I){var k=_!==r[I],C=o[M+I]+ +k,O=o[M+I+1]+1,T=o[w+I]+1,A=o[w+I+1]=Math.min(C,O,T);A<x&&(x=A)}if(x>n)continue e}d(e.get(v),r,n,i,o,m,l,u+v)}}}catch(e){c={error:e}}finally{try{g&&!g.done&&(h=f.return)&&h.call(f)}finally{if(c)throw c.error}}}),"recurse"),h=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(n){var i,o;if(!n.startsWith(this._prefix))throw new Error("Mismatched prefix");var s=r(p(this._tree,n.slice(this._prefix.length)),2),l=s[0],u=s[1];if(void 0===l){var c=r(b(u),2),d=c[0],h=c[1];try{for(var f=t(d.keys()),g=f.next();!g.done;g=f.next()){var v=g.value;if(v!==a&&v.startsWith(h)){var y=new Map;return y.set(v.slice(h.length),d.get(v)),new e(y,n)}}}catch(e){i={error:e}}finally{try{g&&!g.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}}return new e(l,n)},e.prototype.clear=function(){this._size=void 0,this._tree.clear()},e.prototype.delete=function(e){return this._size=void 0,v(this._tree,e)},e.prototype.entries=function(){return new l(this,"ENTRIES")},e.prototype.forEach=function(e){var n,i;try{for(var o=t(this),a=o.next();!a.done;a=o.next()){var s=r(a.value,2);e(s[0],s[1],this)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},e.prototype.fuzzyGet=function(e,t){return c(this._tree,e,t)},e.prototype.get=function(e){var t=f(this._tree,e);return void 0!==t?t.get(a):void 0},e.prototype.has=function(e){var t=f(this._tree,e);return void 0!==t&&t.has(a)},e.prototype.keys=function(){return new l(this,i)},e.prototype.set=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");return this._size=void 0,g(this._tree,e).set(a,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 r=g(this._tree,e);return r.set(a,t(r.get(a))),this},e.prototype.fetch=function(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;var r=g(this._tree,e),n=r.get(a);return void 0===n&&r.set(a,n=t()),n},e.prototype.values=function(){return new l(this,o)},e.prototype[Symbol.iterator]=function(){return this.entries()},e.from=function(n){var i,o,a=new e;try{for(var s=t(n),l=s.next();!l.done;l=s.next()){var u=r(l.value,2),c=u[0],d=u[1];a.set(c,d)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a},e.fromObject=function(t){return e.from(Object.entries(t))},e}(),p=s((function(e,r,n){var i,o;if(void 0===n&&(n=[]),0===r.length||null==e)return[e,n];try{for(var s=t(e.keys()),l=s.next();!l.done;l=s.next()){var u=l.value;if(u!==a&&r.startsWith(u))return n.push([e,u]),p(e.get(u),r.slice(u.length),n)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return n.push([e,r]),p(void 0,"",n)}),"trackDown"),f=s((function(e,r){var n,i;if(0===r.length||null==e)return e;try{for(var o=t(e.keys()),s=o.next();!s.done;s=o.next()){var l=s.value;if(l!==a&&r.startsWith(l))return f(e.get(l),r.slice(l.length))}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}),"lookup"),g=s((function(e,r){var n,i,o=r.length;e:for(var s=0;e&&s<o;){try{for(var l=(n=void 0,t(e.keys())),u=l.next();!u.done;u=l.next()){var c=u.value;if(c!==a&&r[s]===c[0]){for(var d=Math.min(o-s,c.length),h=1;h<d&&r[s+h]===c[h];)++h;var p=e.get(c);if(h===c.length)e=p;else{var f=new Map;f.set(c.slice(h),p),e.set(r.slice(s,s+h),f),e.delete(c),e=f}s+=h;continue e}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}var g=new Map;return e.set(r.slice(s),g),g}return e}),"createPath"),v=s((function(e,t){var n=r(p(e,t),2),i=n[0],o=n[1];if(void 0!==i)if(i.delete(a),0===i.size)y(o);else if(1===i.size){var s=r(i.entries().next().value,2),l=s[0],u=s[1];m(o,l,u)}}),"remove"),y=s((function(e){if(0!==e.length){var t=r(b(e),2),n=t[0],i=t[1];if(n.delete(i),0===n.size)y(e.slice(0,-1));else if(1===n.size){var o=r(n.entries().next().value,2),s=o[0],l=o[1];s!==a&&m(e.slice(0,-1),s,l)}}}),"cleanup"),m=s((function(e,t,n){if(0!==e.length){var i=r(b(e),2),o=i[0],a=i[1];o.set(a+t,n),o.delete(a)}}),"merge"),b=s((function(e){return e[e.length-1]}),"last"),_="or",w=function(){function n(t){if(null==(null==t?void 0:t.fields))throw new Error('MiniSearch: option "fields" must be provided');this._options=e(e(e({},I),t),{searchOptions:e(e({},k),t.searchOptions||{})}),this._index=new h,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(n,"MiniSearch"),n.prototype.add=function(e){var r,n,i,o,a=this._options,s=a.extractField,l=a.tokenize,u=a.processTerm,c=a.fields,d=a.idField,h=s(e,d);if(null==h)throw new Error('MiniSearch: document does not have ID field "'.concat(d,'"'));var p=this.addDocumentId(h);this.saveStoredFields(p,e);try{for(var f=t(c),g=f.next();!g.done;g=f.next()){var v=g.value,y=s(e,v);if(null!=y){var m=l(y.toString(),v),b=this._fieldIds[v],_=new Set(m).size;this.addFieldLength(p,b,this._documentCount-1,_);try{for(var w=(i=void 0,t(m)),M=w.next();!M.done;M=w.next()){var x=u(M.value,v);x&&this.addTerm(b,p,x)}}catch(e){i={error:e}}finally{try{M&&!M.done&&(o=w.return)&&o.call(w)}finally{if(i)throw i.error}}}}}catch(e){r={error:e}}finally{try{g&&!g.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}},n.prototype.addAll=function(e){var r,n;try{for(var i=t(e),o=i.next();!o.done;o=i.next()){var a=o.value;this.add(a)}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},n.prototype.addAllAsync=function(e,t){var r=this;void 0===t&&(t={});var n=t.chunkSize,i=void 0===n?10:n,o={chunk:[],promise:Promise.resolve()},a=e.reduce((function(e,t,n){var o=e.chunk,a=e.promise;return o.push(t),(n+1)%i==0?{chunk:[],promise:a.then((function(){return new Promise((function(e){return setTimeout(e,0)}))})).then((function(){return r.addAll(o)}))}:{chunk:o,promise:a}}),o),s=a.chunk;return a.promise.then((function(){return r.addAll(s)}))},n.prototype.remove=function(e){var n,i,o,a,s,l,u=this._options,c=u.tokenize,d=u.processTerm,h=u.extractField,p=u.fields,f=u.idField,g=h(e,f);if(null==g)throw new Error('MiniSearch: document does not have ID field "'.concat(f,'"'));try{for(var v=t(this._documentIds),y=v.next();!y.done;y=v.next()){var m=r(y.value,2),b=m[0];if(g===m[1]){try{for(var _=(o=void 0,t(p)),w=_.next();!w.done;w=_.next()){var M=w.value,x=h(e,M);if(null!=x){var E=c(x.toString(),M),S=this._fieldIds[M],I=new Set(E).size;this.removeFieldLength(b,S,this._documentCount,I);try{for(var k=(s=void 0,t(E)),C=k.next();!C.done;C=k.next()){var O=d(C.value,M);O&&this.removeTerm(S,b,O)}}catch(e){s={error:e}}finally{try{C&&!C.done&&(l=k.return)&&l.call(k)}finally{if(s)throw s.error}}}}}catch(e){o={error:e}}finally{try{w&&!w.done&&(a=_.return)&&a.call(_)}finally{if(o)throw o.error}}return this._storedFields.delete(b),this._documentIds.delete(b),this._fieldLength.delete(b),void(this._documentCount-=1)}}}catch(e){n={error:e}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}throw new Error("MiniSearch: cannot remove document with ID ".concat(g,": it is not in the index"))},n.prototype.removeAll=function(e){var r,n;if(e)try{for(var i=t(e),o=i.next();!o.done;o=i.next()){var a=o.value;this.remove(a)}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new h,this._documentCount=0,this._documentIds=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},n.prototype.search=function(e,n){var i,o;void 0===n&&(n={});var a=this.executeQuery(e,n),s=[];try{for(var l=t(a),u=l.next();!u.done;u=l.next()){var c=r(u.value,2),d=c[0],h=c[1],p=h.score,f=h.terms,g=h.match,v=f.length,y={id:this._documentIds.get(d),score:p*v,terms:Object.keys(g),match:g};Object.assign(y,this._storedFields.get(d)),(null==n.filter||n.filter(y))&&s.push(y)}}catch(e){i={error:e}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}return s.sort(A),s},n.prototype.autoSuggest=function(n,i){var o,a,s,l;void 0===i&&(i={}),i=e(e({},C),i);var u=new Map;try{for(var c=t(this.search(n,i)),d=c.next();!d.done;d=c.next()){var h=d.value,p=h.score,f=(w=h.terms).join(" ");null!=(b=u.get(f))?(b.score+=p,b.count+=1):u.set(f,{score:p,terms:w,count:1})}}catch(e){o={error:e}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}var g=[];try{for(var v=t(u),y=v.next();!y.done;y=v.next()){var m=r(y.value,2),b=m[0],_=m[1],w=(p=_.score,_.terms),M=_.count;g.push({suggestion:b,terms:w,score:p/M})}}catch(e){s={error:e}}finally{try{y&&!y.done&&(l=v.return)&&l.call(v)}finally{if(s)throw s.error}}return g.sort(A),g},Object.defineProperty(n.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),n.loadJSON=function(e,t){if(null==t)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return n.loadJS(JSON.parse(e),t)},n.getDefault=function(e){if(I.hasOwnProperty(e))return M(I,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))},n.loadJS=function(e,i){var o,a,s,l,u=e.index,c=e.documentCount,d=e.nextId,p=e.documentIds,f=e.fieldIds,g=e.fieldLength,v=e.averageFieldLength,y=e.storedFields,m=e.serializationVersion;if(1!==m&&2!==m)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var b=new n(i);b._documentCount=c,b._nextId=d,b._documentIds=F(p),b._fieldIds=f,b._fieldLength=F(g),b._avgFieldLength=v,b._storedFields=F(y),b._index=new h;try{for(var _=t(u),w=_.next();!w.done;w=_.next()){var M=r(w.value,2),x=M[0],E=M[1],S=new Map;try{for(var I=(s=void 0,t(Object.keys(E))),k=I.next();!k.done;k=I.next()){var C=k.value,O=E[C];1===m&&(O=O.ds),S.set(parseInt(C,10),F(O))}}catch(e){s={error:e}}finally{try{k&&!k.done&&(l=I.return)&&l.call(I)}finally{if(s)throw s.error}}b._index.set(x,S)}}catch(e){o={error:e}}finally{try{w&&!w.done&&(a=_.return)&&a.call(_)}finally{if(o)throw o.error}}return b},n.prototype.executeQuery=function(t,r){var n=this;if(void 0===r&&(r={}),"string"!=typeof t){var i=e(e(e({},r),t),{queries:void 0}),o=t.queries.map((function(e){return n.executeQuery(e,i)}));return this.combineResults(o,t.combineWith)}var a=this._options,s=a.tokenize,l=a.processTerm,u=a.searchOptions,c=e(e({tokenize:s,processTerm:l},u),r),d=c.tokenize,h=c.processTerm,p=d(t).map((function(e){return h(e)})).filter((function(e){return!!e})).map(S(c)).map((function(e){return n.executeQuerySpec(e,c)}));return this.combineResults(p,c.combineWith)},n.prototype.executeQuerySpec=function(n,i){var o,a,s,l,u,c,d=e(e({},this._options.searchOptions),i),h=(d.fields||this._options.fields).reduce((function(t,r){var n;return e(e({},t),((n={})[r]=M(t,r)||1,n))}),d.boost||{}),p=d.boostDocument,f=d.weights,g=d.maxFuzzy,v=e(e({},k.weights),f),y=v.fuzzy,m=v.prefix,b=this._index.get(n.term),_=this.termResults(n.term,n.term,1,b,h,p);if(n.prefix&&(u=this._index.atPrefix(n.term)),n.fuzzy){var w=!0===n.fuzzy?.2:n.fuzzy,x=w<1?Math.min(g,Math.round(n.term.length*w)):w;x&&(c=this._index.fuzzyGet(n.term,x))}if(u)try{for(var E=t(u),S=E.next();!S.done;S=E.next()){var I=r(S.value,2),C=I[0],O=I[1];if(F=C.length-n.term.length){null==c||c.delete(C);var T=m*C.length/(C.length+.3*F);this.termResults(n.term,C,T,O,h,p,_)}}}catch(e){o={error:e}}finally{try{S&&!S.done&&(a=E.return)&&a.call(E)}finally{if(o)throw o.error}}if(c)try{for(var A=t(c.keys()),P=A.next();!P.done;P=A.next()){C=P.value;var F,j=r(c.get(C),2),L=j[0];(F=j[1])&&(T=y*C.length/(C.length+F),this.termResults(n.term,C,T,L,h,p,_))}}catch(e){s={error:e}}finally{try{P&&!P.done&&(l=A.return)&&l.call(A)}finally{if(s)throw s.error}}return _},n.prototype.combineResults=function(e,t){if(void 0===t&&(t=_),0===e.length)return new Map;var r=t.toLowerCase();return e.reduce(x[r])||new Map},n.prototype.toJSON=function(){var e,n,i,o,a=[];try{for(var s=t(this._index),l=s.next();!l.done;l=s.next()){var u=r(l.value,2),c=u[0],d=u[1],h={};try{for(var p=(i=void 0,t(d)),f=p.next();!f.done;f=p.next()){var g=r(f.value,2),v=g[0],y=g[1];h[v]=Object.fromEntries(y)}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}a.push([c,h])}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}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:a,serializationVersion:2}},n.prototype.termResults=function(e,r,n,i,o,a,s){var l,u,c,d,h;if(void 0===s&&(s=new Map),null==i)return s;try{for(var p=t(Object.keys(o)),f=p.next();!f.done;f=p.next()){var g=f.value,v=o[g],y=this._fieldIds[g],m=i.get(y);if(null!=m){var b=m.size,_=this._avgFieldLength[y];try{for(var w=(c=void 0,t(m.keys())),x=w.next();!x.done;x=w.next()){var S=x.value,I=a?a(this._documentIds.get(S),r):1;if(I){var k=m.get(S),C=this._fieldLength.get(S)[y],T=n*v*I*E(k,b,this._documentCount,C,_),A=s.get(S);if(A){A.score+=T,O(A.terms,e);var P=M(A.match,r);P?P.push(g):A.match[r]=[g]}else s.set(S,{score:T,terms:[e],match:(h={},h[r]=[g],h)})}}}catch(e){c={error:e}}finally{try{x&&!x.done&&(d=w.return)&&d.call(w)}finally{if(c)throw c.error}}}}}catch(e){l={error:e}}finally{try{f&&!f.done&&(u=p.return)&&u.call(p)}finally{if(l)throw l.error}}return s},n.prototype.addTerm=function(e,t,r){var n=this._index.fetch(r,P),i=n.get(e);if(null==i)(i=new Map).set(t,1),n.set(e,i);else{var o=i.get(t);i.set(t,(o||0)+1)}},n.prototype.removeTerm=function(e,t,r){if(this._index.has(r)){var n=this._index.fetch(r,P),i=n.get(e);null==i||null==i.get(t)?this.warnDocumentChanged(t,e,r):i.get(t)<=1?i.size<=1?n.delete(e):i.delete(t):i.set(t,i.get(t)-1),0===this._index.get(r).size&&this._index.delete(r)}else this.warnDocumentChanged(t,e,r)},n.prototype.warnDocumentChanged=function(e,r,n){var i,o;if(null!=console&&null!=console.warn)try{for(var a=t(Object.keys(this._fieldIds)),s=a.next();!s.done;s=a.next()){var l=s.value;if(this._fieldIds[l]===r)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(l,'". Removing a document after it has changed can corrupt the index!'))}}catch(e){i={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},n.prototype.addDocumentId=function(e){var t=this._nextId;return this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t},n.prototype.addFields=function(e){for(var t=0;t<e.length;t++)this._fieldIds[e[t]]=t},n.prototype.addFieldLength=function(e,t,r,n){var i=this._fieldLength.get(e);null==i&&this._fieldLength.set(e,i=[]),i[t]=n;var o=(this._avgFieldLength[t]||0)*r+n;this._avgFieldLength[t]=o/(r+1)},n.prototype.removeFieldLength=function(e,t,r,n){var i=this._avgFieldLength[t]*r-n;this._avgFieldLength[t]=i/(r-1)},n.prototype.saveStoredFields=function(e,r){var n,i,o=this._options,a=o.storeFields,s=o.extractField;if(null!=a&&0!==a.length){var l=this._storedFields.get(e);null==l&&this._storedFields.set(e,l={});try{for(var u=t(a),c=u.next();!c.done;c=u.next()){var d=c.value,h=s(r,d);void 0!==h&&(l[d]=h)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}},n}(),M=s((function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}),"getOwnProperty"),x=((n={}).or=function(e,r){var n,i;try{for(var o=t(r.keys()),a=o.next();!a.done;a=o.next()){var s=a.value,l=e.get(s);if(null==l)e.set(s,r.get(s));else{var u=r.get(s),c=u.score,d=u.terms,h=u.match;l.score=l.score+c,l.match=Object.assign(l.match,h),T(l.terms,d)}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return e},n.and=function(e,r){var n,i,o=new Map;try{for(var a=t(r.keys()),s=a.next();!s.done;s=a.next()){var l=s.value,u=e.get(l);if(null!=u){var c=r.get(l),d=c.score,h=c.terms,p=c.match;T(u.terms,h),o.set(l,{score:u.score+d,terms:u.terms,match:Object.assign(u.match,p)})}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o},n.and_not=function(e,r){var n,i;try{for(var o=t(r.keys()),a=o.next();!a.done;a=o.next()){var s=a.value;e.delete(s)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return e},n),E=s((function(e,t,r,n,i){return Math.log(1+(r-t+.5)/(t+.5))*(.5+2.2*e/(e+1.2*(1-.7+.7*n/i)))}),"calcBM25Score"),S=s((function(e){return function(t,r,n){return{term:t,fuzzy:"function"==typeof e.fuzzy?e.fuzzy(t,r,n):e.fuzzy||!1,prefix:"function"==typeof e.prefix?e.prefix(t,r,n):!0===e.prefix}}}),"termToQuerySpec"),I={idField:"id",extractField:function(e,t){return e[t]},tokenize:function(e,t){return e.split(j)},processTerm:function(e,t){return e.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[]},k={combineWith:_,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375}},C={prefix:function(e,t,r){return t===r.length-1}},O=s((function(e,t){e.includes(t)||e.push(t)}),"assignUniqueTerm"),T=s((function(e,r){var n,i;try{for(var o=t(r),a=o.next();!a.done;a=o.next()){var s=a.value;e.includes(s)||e.push(s)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}),"assignUniqueTerms"),A=s((function(e,t){var r=e.score;return t.score-r}),"byScore"),P=s((function(){return new Map}),"createMap"),F=s((function(e){var r,n,i=new Map;try{for(var o=t(Object.keys(e)),a=o.next();!a.done;a=o.next()){var s=a.value;i.set(parseInt(s,10),e[s])}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}),"objectToNumericMap"),j=/[\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;return w},"object"==typeof e&&typeof t<"u"?t.exports=n():"function"==typeof define&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).MiniSearch=n()})),pT={};So(pT,{Mappedin:()=>Ln,MappedinDestinationSet:()=>xt,OfflineSearch:()=>mo,getVenue:()=>Df,getVenueBundle:()=>zf,initialize:()=>dT,setFetchFn:()=>$v}),module.exports=We(pT),y(),y();var Xv=an(qf());y(),y(),y();var Wf=an(Uf());y();var _u=class{constructor({origin:e,destination:t,vortex:r,elevationDelta:n=0,distance:i=0,angle:o=0,pathWeight:a=0}){let s,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=r,this.distance=i,this.angle=o,r)this.distance=0,this.angle=0,s=void 0!==r.weight&&r.weight>0?r.weight:"elevator"===r.type?2e3:1e3,l=r.multiplier&&r.multiplier>=1?r.multiplier:1,this.weight=n*l+s;else{let e=a||t.weight;s=e&&e>=0?e:0,l=t.multiplier&&t.multiplier>=1?t.multiplier:1,this.weight=this.distance*l+s}if(isNaN(this.angle))throw new Error("nan angle")}};s(_u,"Edge");var wu=_u,or=wu;y();var Gf="mi-debug",sy={logState: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)}},ae=sy;function uy(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],r=e.georeference[2],n=(0,Wf.getDistance)({latitude:t.target.x,longitude:t.target.y},{latitude:r.target.x,longitude:r.target.y}),i=t.control.x-r.control.x,o=t.control.y-r.control.y;return Math.sqrt(i*i+o*o)/n}catch(e){return ae.error(e),1}}function Po(e,t){let r=e.x-t.x,n=e.y-t.y;return(Math.atan2(n,r)+2.5*Math.PI)%(2*Math.PI)}s(uy,"getMapScale"),s(Po,"getAngle");var xu=class{constructor({nodes:e,vortexes:t,maps:r,showVortexNames:n=!1}){g(this,"edges"),g(this,"nodesById"),g(this,"mapsById"),this.edges={},this.mapsById=r.map((e=>({...e,_scale:uy(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:n?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:r})=>{let n=this.nodesById[t];return new or({angle:Po(e,n),destination:n,distance:this.getDistance(e,n),origin:e,pathWeight:r})}))})),o.forEach((e=>{if(null==e.nodes||0===e.nodes.length)return;let t=0;for(;t<e.nodes.length-1;){let r=this.nodesById[e.nodes[t]];if(t++,null==r)continue;let n=t;for(;n<e.nodes.length;){let t=this.nodesById[e.nodes[n]];if(n++,null==t)continue;let i=this.mapsById[r.map].elevation||0,o=this.mapsById[t.map].elevation||0,a=Math.abs(i-o);this.edges[r.id].push(new or({destination:t,elevationDelta:a,origin:r,vortex:e})),this.edges[t.id].push(new or({destination:r,elevationDelta:a,origin:t,vortex:e}))}}}))}aStar({originIds:e,destinationNodeIds:t,accessible:r,includedVortexIds:n,excludedVortexIds:i,excludedNodeIds:o}){let a=e.map((e=>this.nodesById[e])).filter((e=>e&&(!o||!o.has(e.id)))),s=t.map((e=>this.nodesById[e])).filter((e=>e&&(!o||!o.has(e.id))));if(0===a.length||0===s.length)return[];let l=[],u={},c={};for(a.forEach((e=>{let t=this.getShortestEuclideanDistance(e,s);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(s.includes(e.origin)){let t=[],r=u[e.origin.id];for(;null!=r;){t.push(r);let e=u[r.origin.id];r=null!=e?e:null}return t.reverse()}for(let t of this.edges[e.origin.id]){let a=t.vortex&&!1===t.vortex.accessible||!1===t.origin.accessible||!1===t.destination.accessible,d=t.vortex&&(n&&!n.has(t.vortex.id)||i&&i.has(t.vortex.id)),h=o&&o.has(t.destination.id);if(r&&a||d||h)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,s);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 r,n=e.x-t.x,i=e.y-t.y,o=n*n+i*i;return r=null==this.mapsById[e.map]?1:this.mapsById[e.map]._scale,Math.sqrt(o)/r}getShortestEuclideanDistance(e,t){return t.reduce(((t,r)=>{let n=this.getDistance(e,r);return Math.min(t,n)}),Number.MAX_VALUE)}};s(xu,"NavigationGraph");var ku=xu,Mu=ku;function ly(e){switch(e){case"down":case"up":return"".concat(e," ");default:return""}}y(),y(),s(ly,"vortexDirectionTest");var Tu=class{constructor({origin:e,action:t,distance:r,atLocation:n,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=r||0,this.atLocation=n,this.instruction="",i?this.instruction=i:(null!=t&&"Departure"===t.type?this.instruction=null!=n?"Depart from ".concat(n.name):"Depart from current location":null!=t&&"Arrival"===t.type?this.instruction=null!=n?"Arrive at ".concat(n.name):"Arrive at destination":null!=t&&"TakeVortex"===t.type?this.instruction="Take ".concat(n&&n.name," ").concat(ly(t.direction),"to ").concat(t.toMap.name):null!=t&&"ExitVortex"===t.type?this.instruction="Exit ".concat(n&&n.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&&n&&(this.instruction+=" at ".concat(n.name)))}};s(Tu,"Directive");var Eu=Tu,Gn=Eu;function Su(e,t,r,n){if(!(e&&t&&r&&n))return null;let i=e.x,o=e.y,a=t.x,s=t.y,l=r.x,u=r.y,c=n.x,d=n.y;if(i===a&&o===s||l===c&&u===d)return null;let h=(d-u)*(a-i)-(c-l)*(s-o);if(0===h)return null;let p=((c-l)*(o-u)-(d-u)*(i-l))/h,f=((a-i)*(o-u)-(s-o)*(i-l))/h;return p<0||p>1||f<0||f>1?null:{x:i+p*(a-i),y:o+p*(s-o)}}function Yf(e,t,r){if(e.x===t.x)return[{x:e.x+r,y:e.y},{x:t.x+r,y:t.y}];if(e.y===t.y)return[{x:e.x,y:e.y+r},{x:t.x,y:t.y+r}];let n=-1/((t.y-e.y)/(t.x-e.x)),i=r*Math.sqrt(1/(1+n*n)),o=n*i;return[{x:e.x+i,y:e.y+o},{x:t.x+i,y:t.y+o}]}function Hf(e,t,r=[],n=0){let i=!0;return r.forEach((r=>{if(n>0){let o=Yf(e,t,-n),a=Yf(e,t,n);if(Su(o[0],o[1],r[0],r[1])||Su(a[0],a[1],r[0],r[1]))return void(i=!1)}else if(Su(e,t,r[0],r[1]))return void(i=!1)})),i}y(),s(Su,"getLineIntersection"),s(Yf,"getOffsetLine"),s(Hf,"hasLineOfSight");var Io=.1*Math.PI;function Ao(e,t){return((t-e+Math.PI)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)-Math.PI}s(Ao,"differenceBetweenAngles");var Iu=class{constructor({locations:e,nodes:t,vortexes:r,maps:n,polygons:i,showVortexNames:o}){g(this,"graph"),g(this,"locationsByNodeId"),g(this,"geometryEdgesByMapId",new Map),this.graph=new Mu({maps:n,nodes:t,showVortexNames:o,vortexes:r}),this.locationsByNodeId=e.reduce(((e,t)=>(t.nodes&&t.nodes.forEach((r=>{e[r.node]=t})),t.polygons&&t.polygons.forEach((r=>{r.entrances&&r.entrances.forEach((r=>{e[r]=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 r=0;r<t.length;r++)t[r+1]&&this.geometryEdgesByMapId.get(e.map).push([t[r],t[r+1]]);else e.vertexes.forEach(((t,r)=>{e.vertexes[r+1]?this.geometryEdgesByMapId.get(e.map).push([t,e.vertexes[r+1]]):this.geometryEdgesByMapId.get(e.map).push([t,e.vertexes[0]])}))}))}getClosestLocationInRay(e,t=.5*Math.PI,r=10){let n=0,i=0,o=e;for(;Math.abs(n)<t&&i<r;){let e=this.graph.edges[o.destination.id],a=null,s=0;for(let t of e)if(t.distance>0)if(null!=a){let e=-Ao(o.angle,t.angle);Math.abs(e)<Math.abs(s)&&(a=t,s=e)}else a=t,s=-Ao(o.angle,t.angle);if(null==a)return null;{if(Math.abs(s)>=t||(n+=s,i+=a.distance,Math.abs(n)>=t||i>r))return null;let e=this.locationsByNodeId[a.destination.id];if(null!=e)return e;o=a}}return null}getDirections({originIds:e,destinationNodeIds:t,accessible:r,departFrom:n,arriveAt:i,includedVortexIds:o,excludedVortexIds:a,excludedNodeIds:s,simplify:l}){var u,c,d;let h=this.graph.aStar({originIds:e,destinationNodeIds:t,accessible:r,includedVortexIds:o,excludedVortexIds:a,excludedNodeIds:s});if(0===h.length)return{distance:0,instructions:[new Gn({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=[h[0]];for(let r=1;r<h.length;r++){if(h[r].origin.map!==h[r-1].origin.map){let n=null!=(c=this.geometryEdgesByMapId.get(h[r-1].origin.map))?c:[];g.push(...this.simplifySteps(t,n,e)),t=[h[r]]}t.push(h[r])}let r=h[h.length-1],n=null!=(d=this.geometryEdgesByMapId.get(r.origin.map))?d:[];g.push(...this.simplifySteps(t,n,e)),h=g}for(let e=0;e<h.length;e++)f.push(h[e].origin);f.push(h[h.length-1].destination);let v=[],y=null,m=null,b=0,_=0;for(let e=0;e<h.length;e++){let t=h[e],r=t.origin,o=t.destination;if(p+=t.distance,b+=(null==m?void 0:m.distance)||0,0===e&&v.push(new Gn({action:{type:"Departure"},atLocation:n,distance:0,origin:r})),null!=t.vortex){let e=this.graph.mapsById[r.map],n=this.graph.mapsById[o.map],i="none";if(null!=e.elevation&&null!=n.elevation){let t=e.elevation-n.elevation;t>0?i="down":t<0&&(i="up")}v.push(new Gn({action:{direction:i,fromMap:e,toMap:n,type:"TakeVortex"},atLocation:t.vortex,distance:b,origin:r})),_+=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 Gn({action:{fromMap:e,toMap:t,type:"ExitVortex"},atLocation:m.vortex,distance:b,origin:r})),_+=b,b=0}else{let e=this.graph.edges[r.id].filter((e=>e.destination!==y&&e.destination!==t.destination));if(e.length>0){let n=-Ao(m.angle,t.angle),i=e.reduce(((e,r)=>{let n=-Ao(t.angle,r.angle);return Math.min(e,Math.abs(n))}),Math.PI);if(Math.abs(n)>=Io||Math.abs(i)<=Io){let e;e=n<=-Math.PI/4?"Right":n<=-Io?"SlightRight":n<=Io?"Straight":n<=Math.PI/4?"SlightLeft":"Left";let t=this.locationsByNodeId[r.id];if(t||(t=this.getClosestLocationInRay(m,.5*Math.PI,10)),null!=t){let n=new Gn({action:{bearing:e,referencePosition:"At",type:"Turn"},atLocation:t,distance:b,origin:r});n.type=e,v.push(n)}else v.push(new Gn({action:{bearing:e,referencePosition:"At",type:"Turn"},distance:b,origin:r}));_+=b,b=0}}}e===h.length-1&&(v.push(new Gn({action:{type:"Arrival"},atLocation:i,distance:p-_<0?0:p-_,origin:t.destination})),_+=b,b=0),y=r,m=t}let w=[],M=null;for(let e=v.length-1;e>=0;e--){let t=v[e],{action:r}=t;r&&"TakeVortex"===r.type?(M=t.node,w.unshift(t)):r&&"Turn"===r.type&&null!=M?this.graph.getDistance(t.node,M)>5?w.unshift(t):w[0].distance+=t.distance:w.unshift(t)}return{distance:p,instructions:w,path:f}}simplifySteps(e,t,r){if(e.length<3)return e;let n=[e[0]],i=1;for(let o=i+2;o<e.length;o++)if(!Hf(e[i].origin,e[o].origin,t,r)){let t=o-1;n.push(new or({...e[i],destination:e[t].origin,distance:this.graph.getDistance(e[i].origin,e[t].origin),angle:Po(e[i].origin,e[t].origin)})),i=t}return n.push(new or({...e[i],destination:e[e.length-1].origin,distance:this.graph.getDistance(e[i].origin,e[e.length-1].origin),angle:Po(e[i].origin,e[e.length-1].origin)}),e[e.length-1]),n}};s(Iu,"Navigator");var Ou=Iu,Pu=Ou;y(),y();var on,Ti,Au,Si,Cu,Co,$f,ju=class{constructor(e){G(this,Ti),G(this,Si),G(this,Co),G(this,on,void 0),H(this,on,e)}directionsTo(e,t){let r=m(this,on).analytics;return e instanceof xt?0===e.destinations.length?[]:(r.getDirections(this,e.destinations[e.destinations.length-1]),Ke(this,Co,$f).call(this,e,t)):(r.getDirections(this,e),Ke(this,Si,Cu).call(this,e,t))}distanceTo(e,t){let r=Ke(this,Si,Cu).call(this,e,t);return(null==r?void 0:r.distance)||0}};on=new WeakMap,Ti=new WeakSet,Au=s((function(){var e;return null!=(e=m(this,on).venue.renderOptions)&&e.simplifyDirections?{enabled:!0}:void 0}),"#venueHasSimplifyRenderOption"),Si=new WeakSet,Cu=s((function(e,t){let r=Ei(this),n=Ei(e),i=m(this,on).navigator.getDirections({originIds:r,destinationNodeIds:n,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)||m(this,Ti,Au)});return new sr(m(this,on),i)}),"#directionsToSingleDestination"),Co=new WeakSet,$f=s((function(e,t){let r,n=[],i=Ei(this);for(let o=0;o<e.destinations.length;o++){r=Ei(e.destinations[o]);let a=m(this,on).navigator.getDirections({originIds:i,destinationNodeIds:r,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)||m(this,Ti,Au)}),s=new sr(m(this,on),a);n.push(s),i=0===s.path.length?r:[s.path[s.path.length-1].id]}return n}),"#directionsToDestinationSet"),s(ju,"MappedinNavigatable");var sn=ju;y(),y();var ms=an(Wh()),Oc={production:"40ead723d18886045e302513245edb27",development:""},Lr={plan:{version:"22",branch:"main",source:"websdk",versionId:"197467d1-8926-452d-a088-b3817cbac89f"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"}},Pc=class{constructor(e){this.event_properties=e,g(this,"event_type","Analytics:categorySelected-call"),this.event_properties=e}};s(Pc,"AnalyticsCategorySelectedCall");var Xi=Pc,Ic=class{constructor(e){this.event_properties=e,g(this,"event_type","Analytics:locationSelected-call"),this.event_properties=e}};s(Ic,"AnalyticsLocationSelectedCall");var $i=Ic,Ac=class{constructor(e){this.event_properties=e,g(this,"event_type","BlueDot:disable-call"),this.event_properties=e}};s(Ac,"BlueDotDisableCall");var vl=Ac,Cc=class{constructor(e){this.event_properties=e,g(this,"event_type","BlueDot:enable-call"),this.event_properties=e}};s(Cc,"BlueDotEnableCall");var yl=Cc,jc=class{constructor(e){this.event_properties=e,g(this,"event_type","BlueDot:off-call"),this.event_properties=e}};s(jc,"BlueDotOffCall");var bl=jc,Nc=class{constructor(e){this.event_properties=e,g(this,"event_type","BlueDot:on-call"),this.event_properties=e}};s(Nc,"BlueDotOnCall");var wl=Nc,Lc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:animate-call"),this.event_properties=e}};s(Lc,"CameraAnimateCall");var _l=Lc,Fc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:cancelAnimation-call"),this.event_properties=e}};s(Fc,"CameraCancelAnimationCall");var kl=Fc,Rc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:focusOn-call"),this.event_properties=e}};s(Rc,"CameraFocusOnCall");var Ml=Rc,Dc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:getSafeAreaInsets-call"),this.event_properties=e}};s(Dc,"CameraGetSafeAreaInsetsCall");var xl=Dc,zc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:interaction.disable-call"),this.event_properties=e}};s(zc,"CameraInteractionDisableCall");var El=zc,Bc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:interaction.enable-call"),this.event_properties=e}};s(Bc,"CameraInteractionEnableCall");var Tl=Bc,Vc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:set-call"),this.event_properties=e}};s(Vc,"CameraSetCall");var Sl=Vc,qc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:setSafeAreaInsets-call"),this.event_properties=e}};s(qc,"CameraSetSafeAreaInsetsCall");var Ol=qc,Uc=class{constructor(e){this.event_properties=e,g(this,"event_type","Camera:translate-call"),this.event_properties=e}};s(Uc,"CameraTranslateCall");var Pl=Uc,Gc=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:add-call"),this.event_properties=e}};s(Gc,"FlatLabelsAddCall");var Il=Gc,Wc=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:labelAllLocations-call"),this.event_properties=e}};s(Wc,"FlatLabelsLabelAllLocationsCall");var Al=Wc,Yc=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:remove-call"),this.event_properties=e}};s(Yc,"FlatLabelsRemoveCall");var Cl=Yc,Hc=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:removeAll-call"),this.event_properties=e}};s(Hc,"FlatLabelsRemoveAllCall");var jl=Hc,Xc=class{constructor(e){this.event_properties=e,g(this,"event_type","FlatLabels:setAppearance-call"),this.event_properties=e}};s(Xc,"FlatLabelsSetAppearanceCall");var Nl=Xc,$c=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:add-call"),this.event_properties=e}};s($c,"FloatingLabelsAddCall");var Ll=$c,Kc=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:labelAllLocations-call"),this.event_properties=e}};s(Kc,"FloatingLabelsLabelAllLocationsCall");var Fl=Kc,Jc=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:remove-call"),this.event_properties=e}};s(Jc,"FloatingLabelsRemoveCall");var Rl=Jc,Qc=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:removeAll-call"),this.event_properties=e}};s(Qc,"FloatingLabelsRemoveAllCall");var Dl=Qc,Zc=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:resetPriority-call"),this.event_properties=e}};s(Zc,"FloatingLabelsResetPriorityCall");var zl=Zc,ed=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:setAppearance-call"),this.event_properties=e}};s(ed,"FloatingLabelsSetAppearanceCall");var Bl=ed,td=class{constructor(e){this.event_properties=e,g(this,"event_type","FloatingLabels:setPriority-call"),this.event_properties=e}};s(td,"FloatingLabelsSetPriorityCall");var Vl=td,nd=class{constructor(e){this.event_properties=e,g(this,"event_type","global:getVenue-call"),this.event_properties=e}};s(nd,"GlobalGetVenueCall");var Ki=nd,rd=class{constructor(e){this.event_properties=e,g(this,"event_type","global:getVenueMVF-call"),this.event_properties=e}};s(rd,"GlobalGetVenueMvfCall");var gs=rd,id=class{constructor(e){this.event_properties=e,g(this,"event_type","global:showVenue-call"),this.event_properties=e}};s(id,"GlobalShowVenueCall");var ql=id,ad=class{constructor(e){this.event_properties=e,g(this,"event_type","Journey:clear-call"),this.event_properties=e}};s(ad,"JourneyClearCall");var Ul=ad,od=class{constructor(e){this.event_properties=e,g(this,"event_type","Journey:draw-call"),this.event_properties=e}};s(od,"JourneyDrawCall");var Gl=od,sd=class{constructor(e){this.event_properties=e,g(this,"event_type","Journey:setStep-call"),this.event_properties=e}};s(sd,"JourneySetStepCall");var Wl=sd,ud=class{constructor(e){this.event_properties=e,g(this,"event_type","Mappedin:getCollectionItemById-call"),this.event_properties=e}};s(ud,"MappedinGetCollectionItemByIdCall");var Yl=ud,ld=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinCoordinate:absoluteDistanceTo-call"),this.event_properties=e}};s(ld,"MappedinCoordinateAbsoluteDistanceToCall");var Hl=ld,cd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinCoordinate:nearestNode-call"),this.event_properties=e}};s(cd,"MappedinCoordinateNearestNodeCall");var Xl=cd,dd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinLocation:clone-call"),this.event_properties=e}};s(dd,"MappedinLocationCloneCall");var Ji=dd,pd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinLocation:directionsTo-call"),this.event_properties=e}};s(pd,"MappedinLocationDirectionsToCall");var Qi=pd,fd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinLocation:distanceTo-call"),this.event_properties=e}};s(fd,"MappedinLocationDistanceToCall");var Zi=fd,hd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinMap:createCoordinate-call"),this.event_properties=e}};s(hd,"MappedinMapCreateCoordinateCall");var $l=hd,gd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinMap:createCoordinateByXY-call"),this.event_properties=e}};s(gd,"MappedinMapCreateCoordinateByXyCall");var Kl=gd,md=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinMap:getNorth-call"),this.event_properties=e}};s(md,"MappedinMapGetNorthCall");var Jl=md,vd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinNode:directionsTo-call"),this.event_properties=e}};s(vd,"MappedinNodeDirectionsToCall");var ea=vd,yd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinNode:distanceTo-call"),this.event_properties=e}};s(yd,"MappedinNodeDistanceToCall");var ta=yd,bd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinPolygon:directionsTo-call"),this.event_properties=e}};s(bd,"MappedinPolygonDirectionsToCall");var na=bd,wd=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinPolygon:distanceTo-call"),this.event_properties=e}};s(wd,"MappedinPolygonDistanceToCall");var ra=wd,_d=class{constructor(e){this.event_properties=e,g(this,"event_type","MappedinVenue:metadata-read"),this.event_properties=e}};s(_d,"MappedinVenueMetadataRead");var ia=_d,kd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:addInteractivePolygon-call"),this.event_properties=e}};s(kd,"MapViewAddInteractivePolygonCall");var Ql=kd,Md=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:addInteractivePolygonsForAllLocations-call"),this.event_properties=e}};s(Md,"MapViewAddInteractivePolygonsForAllLocationsCall");var Zl=Md,xd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:clearPolygonColor-call"),this.event_properties=e}};s(xd,"MapViewClearPolygonColorCall");var ec=xd,Ed=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:createCustomTooltip-call"),this.event_properties=e}};s(Ed,"MapViewCreateCustomTooltipCall");var tc=Ed,Td=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:createMarker-call"),this.event_properties=e}};s(Td,"MapViewCreateMarkerCall");var nc=Td,Sd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:createTooltip-call"),this.event_properties=e}};s(Sd,"MapViewCreateTooltipCall");var rc=Sd,Od=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:destroy-call"),this.event_properties=e}};s(Od,"MapViewDestroyCall");var ic=Od,Pd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:disableImageFlippingForAllPolygons-call"),this.event_properties=e}};s(Pd,"MapViewDisableImageFlippingForAllPolygonsCall");var ac=Pd,Id=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:drawPath-call"),this.event_properties=e}};s(Id,"MapViewDrawPathCall");var oc=Id,Ad=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:enableImageFlippingForAllLocations-call"),this.event_properties=e}};s(Ad,"MapViewEnableImageFlippingForAllLocationsCall");var sc=Ad,Cd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:enableImageFlippingForPolygon-call"),this.event_properties=e}};s(Cd,"MapViewEnableImageFlippingForPolygonCall");var uc=Cd,jd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:getNearestNodeByScreenCoordinates-call"),this.event_properties=e}};s(jd,"MapViewGetNearestNodeByScreenCoordinatesCall");var lc=jd,Nd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:getPolygonAtCoordinate-call"),this.event_properties=e}};s(Nd,"MapViewGetPolygonAtCoordinateCall");var cc=Nd,Ld=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:getPrimaryLocationForPolygon-call"),this.event_properties=e}};s(Ld,"MapViewGetPrimaryLocationForPolygonCall");var dc=Ld,Fd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:labelAllLocations-call"),this.event_properties=e}};s(Fd,"MapViewLabelAllLocationsCall");var pc=Fd,Rd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeAllInteractivePolygons-call"),this.event_properties=e}};s(Rd,"MapViewRemoveAllInteractivePolygonsCall");var fc=Rd,Dd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeAllMarkers-call"),this.event_properties=e}};s(Dd,"MapViewRemoveAllMarkersCall");var hc=Dd,zd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeAllPaths-call"),this.event_properties=e}};s(zd,"MapViewRemoveAllPathsCall");var gc=zd,Bd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeAllTooltips-call"),this.event_properties=e}};s(Bd,"MapViewRemoveAllTooltipsCall");var mc=Bd,Vd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeInteractivePolygon-call"),this.event_properties=e}};s(Vd,"MapViewRemoveInteractivePolygonCall");var vc=Vd,qd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeMarker-call"),this.event_properties=e}};s(qd,"MapViewRemoveMarkerCall");var yc=qd,Ud=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removePath-call"),this.event_properties=e}};s(Ud,"MapViewRemovePathCall");var bc=Ud,Gd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:removeTooltip-call"),this.event_properties=e}};s(Gd,"MapViewRemoveTooltipCall");var wc=Gd,Wd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setBackgroundColor-call"),this.event_properties=e}};s(Wd,"MapViewSetBackgroundColorCall");var _c=Wd,Yd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setHoverColor-call"),this.event_properties=e}};s(Yd,"MapViewSetHoverColorCall");var kc=Yd,Hd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setMap-call"),this.event_properties=e}};s(Hd,"MapViewSetMapCall");var Mc=Hd,Xd=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setPolygonColor-call"),this.event_properties=e}};s(Xd,"MapViewSetPolygonColorCall");var xc=Xd,$d=class{constructor(e){this.event_properties=e,g(this,"event_type","MapView:setState-call"),this.event_properties=e}};s($d,"MapViewSetStateCall");var Ec=$d,Kd=class{constructor(e){this.event_properties=e,g(this,"event_type","metrics:mapLoad-event"),this.event_properties=e}};s(Kd,"MetricsMapLoadEvent");var Tc=Kd,Jd=class{constructor(e){this.event_properties=e,g(this,"event_type","OfflineSearch:addQuery-call"),this.event_properties=e}};s(Jd,"OfflineSearchAddQueryCall");var aa=Jd,Qd=class{constructor(e){this.event_properties=e,g(this,"event_type","OfflineSearch:constructor-call"),this.event_properties=e}};s(Qd,"OfflineSearchConstructorCall");var oa=Qd,Zd=class{constructor(e){this.event_properties=e,g(this,"event_type","OfflineSearch:search-call"),this.event_properties=e}};s(Zd,"OfflineSearchSearchCall");var sa=Zd,ep=class{constructor(e){this.event_properties=e,g(this,"event_type","OfflineSearch:suggest-call"),this.event_properties=e}};s(ep,"OfflineSearchSuggestCall");var ua=ep,hs=s((()=>({promise:Promise.resolve()})),"getVoidPromiseResult"),tp=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,r;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."),hs();let n=null;if(e.client&&"apiKey"in e.client?n=e.client.apiKey:"environment"in e&&(n=Oc[e.environment]),e.client&&"instance"in e.client)this.amplitude=e.client.instance;else{if(n)return this.amplitude=ms.createInstance(),this.amplitude.init(n,void 0,{...Lr,...null!=(null==e?void 0:e.client)&&"configuration"in e.client?null==(r=e.client)?void 0:r.configuration:{}});console.error("ERROR: ampli.load() requires 'environment', 'client.apiKey', or 'client.instance'")}return hs()}identify(e,t,r){if(!this.isInitializedAndEnabled())return hs();e&&(r={...r,user_id:e});let n=new ms.Identify,i=t;if(null!=i)for(let[e,t]of Object.entries(i))n.set(e,t);return this.amplitude.identify(n,r)}track(e,t){return this.isInitializedAndEnabled()?this.amplitude.track(e,void 0,t):hs()}analyticsCategorySelectedCall(e,t){return this.track(new Xi(e),t)}analyticsLocationSelectedCall(e,t){return this.track(new $i(e),t)}blueDotDisableCall(e,t){return this.track(new vl(e),t)}blueDotEnableCall(e,t){return this.track(new yl(e),t)}blueDotOffCall(e,t){return this.track(new bl(e),t)}blueDotOnCall(e,t){return this.track(new wl(e),t)}cameraAnimateCall(e,t){return this.track(new _l(e),t)}cameraCancelAnimationCall(e,t){return this.track(new kl(e),t)}cameraFocusOnCall(e,t){return this.track(new Ml(e),t)}cameraGetSafeAreaInsetsCall(e,t){return this.track(new xl(e),t)}cameraInteractionDisableCall(e,t){return this.track(new El(e),t)}cameraInteractionEnableCall(e,t){return this.track(new Tl(e),t)}cameraSetCall(e,t){return this.track(new Sl(e),t)}cameraSetSafeAreaInsetsCall(e,t){return this.track(new Ol(e),t)}cameraTranslateCall(e,t){return this.track(new Pl(e),t)}flatLabelsAddCall(e,t){return this.track(new Il(e),t)}flatLabelsLabelAllLocationsCall(e,t){return this.track(new Al(e),t)}flatLabelsRemoveCall(e,t){return this.track(new Cl(e),t)}flatLabelsRemoveAllCall(e,t){return this.track(new jl(e),t)}flatLabelsSetAppearanceCall(e,t){return this.track(new Nl(e),t)}floatingLabelsAddCall(e,t){return this.track(new Ll(e),t)}floatingLabelsLabelAllLocationsCall(e,t){return this.track(new Fl(e),t)}floatingLabelsRemoveCall(e,t){return this.track(new Rl(e),t)}floatingLabelsRemoveAllCall(e,t){return this.track(new Dl(e),t)}floatingLabelsResetPriorityCall(e,t){return this.track(new zl(e),t)}floatingLabelsSetAppearanceCall(e,t){return this.track(new Bl(e),t)}floatingLabelsSetPriorityCall(e,t){return this.track(new Vl(e),t)}globalGetVenueCall(e,t){return this.track(new Ki(e),t)}globalGetVenueMvfCall(e,t){return this.track(new gs(e),t)}globalShowVenueCall(e,t){return this.track(new ql(e),t)}journeyClearCall(e,t){return this.track(new Ul(e),t)}journeyDrawCall(e,t){return this.track(new Gl(e),t)}journeySetStepCall(e,t){return this.track(new Wl(e),t)}mappedinGetCollectionItemByIdCall(e,t){return this.track(new Yl(e),t)}mappedinCoordinateAbsoluteDistanceToCall(e,t){return this.track(new Hl(e),t)}mappedinCoordinateNearestNodeCall(e,t){return this.track(new Xl(e),t)}mappedinLocationCloneCall(e,t){return this.track(new Ji(e),t)}mappedinLocationDirectionsToCall(e,t){return this.track(new Qi(e),t)}mappedinLocationDistanceToCall(e,t){return this.track(new Zi(e),t)}mappedinMapCreateCoordinateCall(e,t){return this.track(new $l(e),t)}mappedinMapCreateCoordinateByXyCall(e,t){return this.track(new Kl(e),t)}mappedinMapGetNorthCall(e,t){return this.track(new Jl(e),t)}mappedinNodeDirectionsToCall(e,t){return this.track(new ea(e),t)}mappedinNodeDistanceToCall(e,t){return this.track(new ta(e),t)}mappedinPolygonDirectionsToCall(e,t){return this.track(new na(e),t)}mappedinPolygonDistanceToCall(e,t){return this.track(new ra(e),t)}mappedinVenueMetadataRead(e,t){return this.track(new ia(e),t)}mapViewAddInteractivePolygonCall(e,t){return this.track(new Ql(e),t)}mapViewAddInteractivePolygonsForAllLocationsCall(e,t){return this.track(new Zl(e),t)}mapViewClearPolygonColorCall(e,t){return this.track(new ec(e),t)}mapViewCreateCustomTooltipCall(e,t){return this.track(new tc(e),t)}mapViewCreateMarkerCall(e,t){return this.track(new nc(e),t)}mapViewCreateTooltipCall(e,t){return this.track(new rc(e),t)}mapViewDestroyCall(e,t){return this.track(new ic(e),t)}mapViewDisableImageFlippingForAllPolygonsCall(e,t){return this.track(new ac(e),t)}mapViewDrawPathCall(e,t){return this.track(new oc(e),t)}mapViewEnableImageFlippingForAllLocationsCall(e,t){return this.track(new sc(e),t)}mapViewEnableImageFlippingForPolygonCall(e,t){return this.track(new uc(e),t)}mapViewGetNearestNodeByScreenCoordinatesCall(e,t){return this.track(new lc(e),t)}mapViewGetPolygonAtCoordinateCall(e,t){return this.track(new cc(e),t)}mapViewGetPrimaryLocationForPolygonCall(e,t){return this.track(new dc(e),t)}mapViewLabelAllLocationsCall(e,t){return this.track(new pc(e),t)}mapViewRemoveAllInteractivePolygonsCall(e,t){return this.track(new fc(e),t)}mapViewRemoveAllMarkersCall(e,t){return this.track(new hc(e),t)}mapViewRemoveAllPathsCall(e,t){return this.track(new gc(e),t)}mapViewRemoveAllTooltipsCall(e,t){return this.track(new mc(e),t)}mapViewRemoveInteractivePolygonCall(e,t){return this.track(new vc(e),t)}mapViewRemoveMarkerCall(e,t){return this.track(new yc(e),t)}mapViewRemovePathCall(e,t){return this.track(new bc(e),t)}mapViewRemoveTooltipCall(e,t){return this.track(new wc(e),t)}mapViewSetBackgroundColorCall(e,t){return this.track(new _c(e),t)}mapViewSetHoverColorCall(e,t){return this.track(new kc(e),t)}mapViewSetMapCall(e,t){return this.track(new Mc(e),t)}mapViewSetPolygonColorCall(e,t){return this.track(new xc(e),t)}mapViewSetStateCall(e,t){return this.track(new Ec(e),t)}metricsMapLoadEvent(e,t){return this.track(new Tc(e),t)}offlineSearchAddQueryCall(e,t){return this.track(new aa(e),t)}offlineSearchConstructorCall(e,t){return this.track(new oa(e),t)}offlineSearchSearchCall(e,t){return this.track(new sa(e),t)}offlineSearchSuggestCall(e,t){return this.track(new ua(e),t)}};s(tp,"Ampli");var Sc=tp,la=new Sc;y();var In,br,Jt,qr,cn,Rs,sm,Ds,um,_a,Ep,ka,Tp,Qt,im=an(Tg()),am=an(tm()),om=an(nm()),rm="5.37.0",bx="https://api2.amplitude.com/2/httpapi",wx="https://api2.amplitude.com/batch",_x="__unspecified__",Mp={branch:"main",version:"0",source:"websdk"},yt=class e{constructor(){G(this,Rs),G(this,Ds),G(this,_a),G(this,ka),G(this,Jt,{}),G(this,qr,!1),G(this,cn,void 0),G(this,Qt,s((async e=>{Mx(e.type)&&(window.removeEventListener("visibilitychange",m(this,Qt)),window.removeEventListener("pagehide",m(this,Qt)),window.removeEventListener("beforeunload",m(this,Qt)),window.removeEventListener("unload",m(this,Qt)),await this.sendAllPendingEvents())}),"#handlePageUnload")),null==m(e,br)&&H(e,br,rm),typeof navigator<"u"&&null!=navigator.userAgent&&H(this,cn,new om.UAParser(navigator.userAgent).getResult())}static setContext(t){H(e,In,t)}static setVersion(t){H(e,br,t)}addPendingEvent(t){var r;if(null==m(e,In))return;let n=t.event_type;if(!Ke(this,Ds,um).call(this,t))return;null==t.event_properties&&(t.event_properties={});let i=m(this,Jt)[n];(0,am.default)(t.event_properties,null!=(r=null==i?void 0:i.event_properties)?r:{}),m(this,Jt)[n]=t}async sendAllPendingEvents(){if(null==m(e,In)||Object.keys(m(this,Jt)).length<1)return;if(m(this,qr))return void ae.warn("The current batch of analytics is already sending. Wait until this finishes before trying to send again.");let t=[];for(let e in m(this,Jt)){let r=m(this,Jt)[e],n=Ke(this,_a,Ep).call(this,r);null!=n&&t.push(n)}if(!(t.length<1))try{H(this,qr,!0),200===(await Ke(this,ka,Tp).call(this,wx,t)).status&&H(this,Jt,{})}catch(e){ae.warn("Error sending batch product analytics!",e)}finally{H(this,qr,!1)}}async load(){if(!la.isLoaded){let{promise:e}=la.load({environment:"production",client:{configuration:{trackingOptions:{osName:!0}}}});e.then((()=>{window.addEventListener("pagehide",m(this,Qt)),window.addEventListener("beforeunload",m(this,Qt)),window.addEventListener("unload",m(this,Qt)),window.addEventListener("visibilitychange",m(this,Qt))}))}}async sendEventNow(t){if(null==m(e,In))return;let r=Ke(this,_a,Ep).call(this,t);if(null!=r)try{await Ke(this,ka,Tp).call(this,bx,[r])}catch(e){ae.warn("Error sending single product analytics event!",e)}}};In=new WeakMap,br=new WeakMap,Jt=new WeakMap,qr=new WeakMap,cn=new WeakMap,Rs=new WeakSet,sm=s((function(e){let t=e.event_type;return null!=m(this,Jt)[t]}),"#isEventTypePending"),Ds=new WeakSet,um=s((function(e){if(!Ke(this,Rs,sm).call(this,e))return!0;let t=e.event_type,r=m(this,Jt)[t];return!(0,im.default)(r.event_properties,e.event_properties)}),"#didEventPropertiesChange"),_a=new WeakSet,Ep=s((function(e){var t,r,n,i,o,a,s,l,u,c,d,h,p,f,g,v,y;if(null!=m(yt,In))return null==(null==(t=e.event_properties)?void 0:t.venue)&&ae.warn("Error processing product analytics event! Unspecified venue slug",e),null==Lr.plan&&ae.warn("Error processing product analytics event! Unknown coinfiguration plan",e),{event_type:e.event_type,session_id:null!=(r=la.client.getSessionId())?r:Bs(),device_id:null!=(n=la.client.getDeviceId())?n:zs(),plan:{branch:null!=(o=null==(i=Lr.plan)?void 0:i.branch)?o:Mp.branch,version:null!=(s=null==(a=Lr.plan)?void 0:a.version)?s:Mp.version,source:null!=(u=null==(l=Lr.plan)?void 0:l.source)?u:Mp.source},os_name:null==(c=m(this,cn))?void 0:c.browser.name,os_version:null==(d=m(this,cn))?void 0:d.browser.version,device_manufacturer:null==(h=m(this,cn))?void 0:h.device.vendor,device_model:null==(p=m(this,cn))?void 0:p.device.model,event_properties:{...e.event_properties,context:m(yt,In),sdk_version:m(yt,br),browser_name:null==(f=m(this,cn))?void 0:f.browser.name,browser_version:null==(g=m(this,cn))?void 0:g.browser.version,venue:null!=(y=null==(v=e.event_properties)?void 0:v.venue)?y:_x},time:e.time}}),"#makeBatchFormattedEvent"),ka=new WeakSet,Tp=s((async function(e,t){return await An()(e,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify({api_key:Oc.production,events:t})})}),"#batchSend"),Qt=new WeakMap,s(yt,"ProductAnalytics"),G(yt,In,void 0),G(yt,br,void 0);var xp=yt,kx=new xp,tt=kx;function Mx(e){return"beforeunload"===e||"pagehide"===e||"unload"===e||"hidden"===document.visibilityState}s(Mx,"areWeLeavingThePage");var Gt,Ur,pt,Ea,Ma=class e extends sn{constructor(e,t){super(e),G(this,Gt,void 0),G(this,Ur,void 0),G(this,pt,{}),g(this,"id",""),g(this,"x",0),g(this,"y",0),g(this,"operationHours"),g(this,"externalId"),G(this,Ea,void 0),H(this,Gt,e),H(this,Ur,t);let r=Object.assign({},t);delete r.map,Object.assign(this,r)}get map(){let e=m(this,pt).map;if(typeof e<"u")return e;let t=m(this,Gt).getCollectionItemById("maps",m(this,Ur).map);return m(this,pt).map=t,t}get lat(){var e;let t=m(this,pt).cachedLatLon;if(null!=t)return t.lat;let r=null==(e=m(this,Gt)._mapsById)?void 0:e[this.map.id];if(null==r)throw new Error("Map not found");return m(this,pt).cachedLatLon=r.createCoordinateByXY(this.x,this.y),m(this,pt).cachedLatLon.lat}get lon(){var e;let t=m(this,pt).cachedLatLon;if(null!=t)return t.lon;let r=null==(e=m(this,Gt)._mapsById)?void 0:e[this.map.id];if(null==r)throw new Error("Map not found");return m(this,pt).cachedLatLon=r.createCoordinateByXY(this.x,this.y),m(this,pt).cachedLatLon.lon}get paths(){let e=m(this,pt).paths;if(typeof e<"u")return e;let t=[],r=m(this,Gt)._nodesById,n=m(this,Ea);if(Array.isArray(n))for(let e=0,i=n.length;e<i;++e){let i=r[n[e].node];null!=i&&t.push(i)}return m(this,pt).paths=t,t}set paths(e){H(this,Ea,e)}get locations(){var e,t,r;let n=m(this,pt).locations;if(typeof n<"u")return n;let i=[],o=null!=(r=null==(t=null==(e=bt.instances.get(m(this,Gt)))?void 0:e.locationsByMapId)?void 0:t.get(this.map.id))?r:[],a=this.id;for(let e=0,t=o.length;e<t;++e){let t=o[e],r=t.nodes;if(Array.isArray(r))for(let e=0,n=r.length;e<n;++e)if(r[e].id===a){i.push(t);break}}return m(this,pt).locations=i,i}get polygon(){var e,t,r,n;let i=m(this,pt).polygon;if(typeof i<"u")return i;let o,a=null!=(n=null==(r=null==(e=bt.instances.get(m(this,Gt)))?void 0:e.polygonsByMapId)?void 0:r.get(null==(t=null==this?void 0:this.map)?void 0:t.id))?n:[],s=this.id;for(let e=0,t=a.length;e<t;++e){let t=a[e];t.entrances.map((e=>e.id)).includes(s)&&(o=t)}return m(this,pt).polygon=o,o}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async fetch(t){let r=t.options.things.nodes.slice();t.options.things.maps&&nt(r,"map"),["weight","multiplier","accessible"].forEach((function(e){nt(r,e)}));let n={fields:r,venue:t.options.venue};try{return(await rt(t.options,"node",n)).map((r=>new e(t,r)))}catch(e){return ae.error("Fetch Nodes:",e),[]}}directionsTo(e,t){let r=e instanceof xt,n=m(this,Gt).venue.slug,i=new ea({with_destination_set:r||void 0,venue:n});return tt.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let r=m(this,Gt).venue.slug;return tt.addPendingEvent(new ta({venue:r})),super.distanceTo(e,t)}toJSON(){return m(this,Ur)}};Gt=new WeakMap,Ur=new WeakMap,pt=new WeakMap,Ea=new WeakMap,s(Ma,"MappedinNode");var xa=Ma;y();var dn,Gr,Wt,Sa,Ta=class e extends sn{constructor(e,t){super(e),G(this,dn,void 0),G(this,Gr,void 0),G(this,Wt,{}),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"),G(this,Sa,void 0),H(this,dn,e),H(this,Gr,t);let r=Object.assign({},t);delete r.map,Object.assign(this,r)}get map(){let e=m(this,Wt).map;if(typeof e<"u")return e;let t=m(this,dn).getCollectionItemById("maps",m(this,Gr).map);return m(this,Wt).map=t,t}get locations(){var e,t;let r=m(this,Wt).locations;if(typeof r<"u")return r;let n=[],i=null!=(t=null==(e=bt.instances.get(m(this,dn)))?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],r=t.polygons;if(Array.isArray(r))for(let e=0,i=r.length;e<i;++e)if(r[e].id===o){n.push(t);break}}return m(this,Wt).locations=n,n}get entrances(){let e=m(this,Wt).entrances;if(typeof e<"u")return e;let t=[],r=m(this,Sa),n=m(this,dn)._nodesById;if(Array.isArray(r)){for(let e=0,i=r.length;e<i;++e){let i=n[r[e].id];null!=i&&t.push(i)}return m(this,Wt).entrances=t,t}return[]}set entrances(e){H(this,Sa,e)}get rank(){let e=m(this,Wt).rank;if(typeof e<"u")return e;let{rankings:t}=m(this,dn);if(!t||!t.polygons)return null;let r=t.polygons.find((e=>e.polygonId===this.id));return r?(m(this,Wt).rank={score:r.score,node:r.entranceNodeId},{score:r.score,node:r.entranceNodeId}):(m(this,Wt).rank=null,null)}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async fetch(t){let r=t.options.things.polygons.slice();t.options.things.maps&&nt(r,"map"),t.options.things.nodes&&nt(r,"entrances");let n={fields:r,venue:t.options.venue};try{return(await rt(t.options,"polygon",n)).map((r=>new e(t,r)))}catch(e){return ae.error("Fetch Polygons:",e),[]}}directionsTo(e,t){let r=e instanceof xt,n=m(this,dn).venue.slug,i=new na({with_destination_set:r||void 0,venue:n});return tt.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let r=m(this,dn).venue.slug;return tt.addPendingEvent(new ra({venue:r})),super.distanceTo(e,t)}toJSON(){return m(this,Gr)}};dn=new WeakMap,Gr=new WeakMap,Wt=new WeakMap,Sa=new WeakMap,s(Ta,"MappedinPolygon");var wr=Ta;y();var xx=0,Ex="9999-12-31T00:00:00.000Z";function Tx(e,t,r=new Date){if(!e.states)return;let n=r||new Date,i=e.states.find((e=>{let t=new Date(e.start||xx),r=new Date(e.end||Ex);return t<n&&r>n}));return i?t.find((e=>e.value===i.type)):void 0}s(Tx,"getCurrentLocationState");var Ft,Kn,Rt,Oa,Pa,Ia,lm=["name","description","shortName","tags"],_r=class e extends sn{constructor(e,t){super(e),G(this,Ft,void 0),G(this,Kn,void 0),G(this,Rt,{}),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"),G(this,Oa,void 0),G(this,Pa,[]),G(this,Ia,void 0),H(this,Ft,e),H(this,Kn,t);let r=Object.assign({},t);delete r.categories,Object.assign(this,r)}get polygons(){let e=m(this,Rt).polygons;if(typeof e<"u")return e;let t=[],r=m(this,Oa),n=m(this,Ft)._polygonsById;if(Array.isArray(r))for(let e=0,i=r.length;e<i;++e){let i=n[r[e].id];null!=i&&t.push(i)}return m(this,Rt).polygons=t,t}set polygons(e){H(this,Oa,e)}get nodes(){let e=m(this,Rt).nodes;if(typeof e<"u")return e;let t=[],r=m(this,Pa),n=m(this,Ft)._nodesById;if(r&&r.length)for(let e=0,i=r.length;e<i;++e){let i=n[r[e].node];null!=i&&t.push(i)}return m(this,Rt).nodes=t,t}set nodes(e){H(this,Pa,e)}get parent(){let e=m(this,Rt).parent;if(typeof e<"u")return e;let t,r=m(this,Ft)._locationsById,n=m(this,Ia);return void 0!==n&&(t=r[n]),m(this,Rt).parent=t,t}set parent(e){H(this,Ia,e)}get categories(){let e=m(this,Rt).categories;if(typeof e<"u")return e;let t=[];return m(this,Kn).categories.forEach((e=>{let r=m(this,Ft).getCollectionItemById("categories",e);r&&t.push(r)})),m(this,Rt).categories=t,t}get state(){return Tx(this,m(this,Ft).locationStates)}clone(){let t=m(this,Ft).venue.slug;return tt.addPendingEvent(new Ji({venue:t})),new e(m(this,Ft),m(this,Kn))}get nodeOperationHours(){let e=m(this,Rt).nodeOperationHours;if(typeof e<"u")return e;if(null==this.nodes)return{};let t=m(this,Kn).nodes.reduce(((e,t)=>(null!=t.operationHours&&(e[t.node]=t.operationHours),e)),{});return m(this,Rt).nodeOperationHours=t,t}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async updateInPlace(t,r){let n,i=r||await e.fetch(t);for(let e=0;e<i.length;e++){n=t.locations[e];for(let t of lm)n[t]=i[e][t]}}static async fetch(t){let r=t.options.things.locations.slice();t.options.things.categories&&nt(r,"categories"),t.options.things.nodes&&nt(r,"nodes"),t.options.things.polygons&&nt(r,"polygons"),t.options.things.locationStates&&nt(r,"states");let n={fields:r,venue:t.options.venue};try{let r=await rt(t.options,"location",n);return t.options.includeHidden||(r=r.filter((e=>!e.hidden))),r.map((r=>new e(t,r)))}catch(e){return ae.error("Fetch Locations:",e),[]}}directionsTo(e,t){let r=e instanceof xt,n=m(this,Ft).venue.slug,i=new Qi({with_destination_set:r||void 0,venue:n});return tt.addPendingEvent(i),super.directionsTo(e,t)}distanceTo(e,t){let r=m(this,Ft).venue.slug;return tt.addPendingEvent(new Zi({venue:r})),super.distanceTo(e,t)}toJSON(){let e={...m(this,Kn)};for(let t of lm)e[t]=this[t];return delete e.color,e}};Ft=new WeakMap,Kn=new WeakMap,Rt=new WeakMap,Oa=new WeakMap,Pa=new WeakMap,Ia=new WeakMap,s(_r,"MappedinLocation");var Cn=_r;y();var Yr,kr,Aa,cm=["name"],Wr=class e{constructor(e,t){G(this,Yr,void 0),G(this,kr,{}),G(this,Aa,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=t.id,H(this,Aa,t),H(this,Yr,e),Object.assign(this,t)}get locations(){var e;let t=m(this,kr).locations;if(typeof t<"u")return t;let r=[],{locations:n}=m(this,Yr),{id:i}=this;for(let t=0,o=n.length;t<o;++t){let o=n[t],a=o.categories;if(Array.isArray(a))for(let t=0,n=a.length;t<n;++t)if((null==(e=a[t])?void 0:e.id)===i){r.push(o);break}}return m(this,kr).locations=r,r}get children(){var e;let t=m(this,kr).children;if(typeof t<"u")return t;let{categories:r}=m(this,Yr),{id:n}=this,i=[];for(let t=0;t<r.length;t++)n&&null!=(e=r[t].parents)&&e.includes(n)&&i.push(r[t]);return m(this,kr).children=i,i}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async updateInPlace(t,r){let n=r||await e.fetch(t);for(let e=0;e<n.length;e++)for(let r of cm)t.categories[e][r]=n[e][r]}static async fetch(t){let r={fields:t.options.things.categories,venue:t.options.venue};try{return(await rt(t.options,"category",r)).map((r=>new e(t,r)))}catch(e){return ae.error("Fetch Categories:",e),[]}}toJSON(){let e={...m(this,Aa)};for(let t of cm)e[t]=this[t];return e}};Yr=new WeakMap,kr=new WeakMap,Aa=new WeakMap,s(Wr,"MappedinCategory");var Mr=Wr;y();var Ca,jn,Op=class{constructor(e,t){G(this,Ca,void 0),G(this,jn,void 0),g(this,"distance",0),g(this,"path",[]),g(this,"instructions",[]),H(this,jn,e),H(this,Ca,t),this.distance=t.distance,this.instructions=t.instructions.map((e=>{var t,r,n,i,o,a,s,l,u,c,d,h;let p={...e,action:{...e.action},atLocation:null!=(t=e.atLocation)&&t.id?null==(n=null==(r=m(this,jn))?void 0:r._vortexesById)?void 0:n[e.atLocation.id]:void 0,node:null!=(i=e.node)&&i.id?null==(a=null==(o=m(this,jn))?void 0:o._nodesById)?void 0:a[e.node.id]:void 0};if("TakeVortex"===(null==(s=p.action)?void 0:s.type)||"ExitVortex"===(null==(l=p.action)?void 0:l.type)){let e=null==(c=m(this,jn)._mapsById)?void 0:c[null==(u=p.action)?void 0:u.fromMap.id],t=null==(h=m(this,jn)._mapsById)?void 0:h[null==(d=p.action)?void 0:d.toMap.id];e&&t&&(p.action.fromMap=e,p.action.toMap=t)}return p})),this.path=t.path.reduce(((e,{id:t})=>{var r,n;let i=null==(n=null==(r=m(this,jn))?void 0:r._nodesById)?void 0:n[t];return i&&e.push(i),e}),[])}toJSON(){return m(this,Ca)}};Ca=new WeakMap,jn=new WeakMap,s(Op,"MappedinDirections");var sr=Op;y();var Pp=class{constructor(e){g(this,"destinations",[]),this.destinations=e}};s(Pp,"MappedinDestinationSet");var xt=Pp;y();var La,ja=class e{constructor(e){g(this,"id",""),G(this,La,void 0),g(this,"accessible"),g(this,"name"),g(this,"type"),g(this,"weight"),g(this,"multiplier"),g(this,"nodes"),g(this,"filterFlags"),H(this,La,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let r=t.options.things.vortexes.slice();["name","type","accessible","weight","multiplier","nodes"].forEach((function(e){nt(r,e)}));let n={fields:r,venue:t.options.venue};try{return(await rt(t.options,"vortex",n)).map((t=>new e(t)))}catch(e){return ae.error("Fetch Vortexes:",e),[]}}toJSON(){return m(this,La)}};La=new WeakMap,s(ja,"MappedinVortex");var Na=ja;y();var Ra,Da,za,Hr,Fa=class e{constructor(e,t){G(this,Ra,void 0),G(this,Da,void 0),G(this,za,void 0),G(this,Hr,{}),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}),H(this,Da,e),H(this,Ra,t),Object.assign(this,t)}get metadata(){return tt.addPendingEvent(new ia({venue:this.slug})),m(this,za)}set metadata(e){H(this,za,e)}static hydrate(t,r){return new e(r,t)}static async fetch(t){let r={fields:t.options.things.venue,slug:t.options.venue,limit:1};try{let n=await rt(t.options,"venue",r);return new e(t,Array.isArray(n)?n[0]:n)}catch(e){return ae.error("Fetch Venue:",e),{}}}get isMultiBuilding(){if(null==m(this,Hr).isMultiBuilding){let e=m(this,Da).maps,t=e.reduce(((e,t)=>e.add(t.elevation)),new Set),r=e.length!==t.size;m(this,Hr).isMultiBuilding=r}return m(this,Hr).isMultiBuilding}toJSON(){return m(this,Ra)}};Ra=new WeakMap,Da=new WeakMap,za=new WeakMap,Hr=new WeakMap,s(Fa,"MappedinVenue");var Xr=Fa;y();var Va,Ba=class e{constructor(e){g(this,"id",""),G(this,Va,void 0),H(this,Va,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async fetch(t){let r={fields:t.options.things.themes.slice(),venue:t.options.venue};try{return(await rt(t.options,"apollo-theme",r)).map((t=>new e(t)))}catch(e){return ae.error("Fetch Theme:",e),[]}}toJSON(){return m(this,Va)}};Va=new WeakMap,s(Ba,"MappedinTheme");var Vs=Ba;y();var Ga,qa=class e{constructor(e){G(this,Ga,void 0),g(this,"polygons",[]),H(this,Ga,e),Object.assign(this,e)}static hydrate(t){return new e(t)}static async fetch(t){try{let r=await $r({...t.options,secure:!1},"smart-labels/polygon-label-ranking",{venue:t.options.venue},!0);return new e(r)}catch(e){return ae.error("Fetch Rankings:",e),null}}toJSON(){return m(this,Ga)}};Ga=new WeakMap,s(qa,"MappedinRankings");var Ua=qa;y(),y();var Ya,Jr,Ha,dm=["name","description"],Kr=class e{constructor(e,t){G(this,Ya,void 0),G(this,Jr,void 0),G(this,Ha,{}),g(this,"id",""),g(this,"type",""),g(this,"name",""),g(this,"description"),g(this,"image"),g(this,"startDate"),g(this,"endDate"),g(this,"showDate"),H(this,Jr,t),H(this,Ya,e),Object.assign(this,t)}location(){let e=m(this,Ha).location;if(typeof e<"u")return e;let t,r=m(this,Ya)._locationsById,n=m(this,Jr).location;if(null!=n){let e=r[n];null!=e&&(t=e)}return m(this,Ha).location=t,t}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async updateInPlace(t,r){let n=r||await e.fetch(t);for(let e=0;e<n.length;e++)for(let r of dm)t.events[e][r]=n[e][r]}static async fetch(t){let r=t.options.things.events.slice();t.options.things.locations&&nt(r,"location");let n={fields:r,venue:t.options.venue,activeAtOrAfter:Date.now()};try{return(await rt(t.options,"event",n)).map((r=>new e(t,r)))}catch(e){return ae.error("Fetch Events:",e),[]}}toJSON(){let e={...m(this,Jr)};for(let t of dm)e[t]=this[t];return e}};Ya=new WeakMap,Jr=new WeakMap,Ha=new WeakMap,s(Kr,"MappedinEvent");var Wa=Kr;y();var $a,pm=["name"],Qr=class e{constructor(e){G(this,$a,void 0),g(this,"id",""),g(this,"name",""),g(this,"value",""),H(this,$a,e),Object.assign(this,e)}static hydrate(t){return t.map((t=>new e(t)))}static async updateInPlace(t,r){let n=r||await e.fetch(t);for(let e=0;e<n.length;e++)for(let r of pm)t.locationStates[e][r]=n[e][r]}static async fetch(t){let r={fields:t.options.things.locationStates.slice(),venue:t.options.venue};try{return(await rt(t.options,"location-state",r)).map((t=>new e(t)))}catch(e){return ae.error("Fetch Location States:",e),[]}}toJSON(){let e={...m(this,$a)};for(let t of pm)e[t]=this[t];return e}};$a=new WeakMap,s(Qr,"MappedinLocationState");var Xa=Qr;y(),y(),y();var fm=" ",wt=class e{static get separator(){return fm}static set separator(e){fm=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 r=null;switch(t.length){case 3:r=t[0]/1+t[1]/60+t[2]/3600;break;case 2:r=t[0]/1+t[1]/60;break;case 1:r=t[0];break;default:return NaN}return/^-|[WS]$/i.test(e.trim())&&(r=-r),Number(r)}static toDms(t,r="d",n){if(isNaN(t)||"string"==typeof t&&""==t.trim()||"boolean"==typeof t||t==1/0||null==t)return null;if(void 0===n)switch(r){case"d":case"deg":n=4;break;case"dm":case"deg+min":n=2;break;case"dms":case"deg+min+sec":n=0;break;default:r="d",n=4}t=Math.abs(t);let i=null,o=null,a=null,s=null;switch(r){default:case"d":case"deg":o=t.toFixed(n),o<100&&(o="0"+o),o<10&&(o="0"+o),i=o+"°";break;case"dm":case"deg+min":o=Math.floor(t),a=(60*t%60).toFixed(n),60==a&&(a=(0).toFixed(n),o++),o=("000"+o).slice(-3),a<10&&(a="0"+a),i=o+"°"+e.separator+a+"′";break;case"dms":case"deg+min+sec":o=Math.floor(t),a=Math.floor(3600*t/60)%60,s=(3600*t%60).toFixed(n),60==s&&(s=(0).toFixed(n),a++),60==a&&(a=0,o++),o=("000"+o).slice(-3),a=("00"+a).slice(-2),s<10&&(s="0"+s),i=o+"°"+e.separator+a+"′"+e.separator+s+"″"}return i}static toLat(t,r,n){let i=e.toDms(e.wrap90(t),r,n);return null===i?"–":i.slice(1)+e.separator+(t<0?"S":"N")}static toLon(t,r,n){let i=e.toDms(e.wrap180(t),r,n);return null===i?"–":i+e.separator+(t<0?"W":"E")}static toBrng(t,r,n){let i=e.toDms(e.wrap360(t),r,n);return null===i?"–":i.replace("360","0")}static fromLocale(e){let t=123456.789.toLocaleString(),r={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(r.thousands,"⁜").replace(r.decimal,".").replace("⁜",",")}static toLocale(e){let t=123456.789.toLocaleString(),r={thousands:t.slice(3,4),decimal:t.slice(7,8)};return e.replace(/,([0-9])/,"⁜$1").replace(".",r.decimal).replace("⁜",r.thousands)}static compassPoint(t,r=3){if(![1,2,3].includes(Number(r)))throw new RangeError("invalid precision ‘".concat(r,"’"));t=e.wrap360(t);let n=4*2**(r-1);return["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.round(t*n/360)%n*16/n]}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(wt,"Dms");var Ip=wt;Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};var De=Ip,Ze=Math.PI,Ce=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=De.wrap90(Number(e)),this._lon=De.wrap180(Number(t))}get lat(){return this._lat}get latitude(){return this._lat}set lat(e){if(this._lat=isNaN(e)?De.wrap90(De.parse(e)):De.wrap90(Number(e)),isNaN(this._lat))throw new TypeError("invalid lat ‘".concat(e,"’"))}set latitude(e){if(this._lat=isNaN(e)?De.wrap90(De.parse(e)):De.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)?De.wrap180(De.parse(e)):De.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lon ‘".concat(e,"’"))}set lng(e){if(this._lon=isNaN(e)?De.wrap180(De.parse(e)):De.wrap180(Number(e)),isNaN(this._lon))throw new TypeError("invalid lng ‘".concat(e,"’"))}set longitude(e){if(this._lon=isNaN(e)?De.wrap180(De.parse(e)):De.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 r,n;if(2==t.length&&([r,n]=t,r=De.wrap90(De.parse(r)),n=De.wrap180(De.parse(n)),isNaN(r)||isNaN(n)))throw new TypeError("invalid point ‘".concat(t.toString(),"’"));if(1==t.length&&"string"==typeof t[0]&&([r,n]=t[0].split(","),r=De.wrap90(De.parse(r)),n=De.wrap180(De.parse(n)),isNaN(r)||isNaN(n)))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)?[n,r]=e.coordinates:(null!=e.latitude&&(r=e.latitude),null!=e.lat&&(r=e.lat),null!=e.longitude&&(n=e.longitude),null!=e.lng&&(n=e.lng),null!=e.lon&&(n=e.lon),r=De.wrap90(De.parse(r)),n=De.wrap180(De.parse(n))),isNaN(r)||isNaN(n))throw new TypeError("invalid point ‘".concat(JSON.stringify(t[0]),"’"))}if(isNaN(r)||isNaN(n))throw new TypeError("invalid point ‘".concat(t.toString(),"’"));return new e(r,n)}distanceTo(t,r=6371e3){if(t instanceof e||(t=e.parse(t)),isNaN(r))throw new TypeError("invalid radius ‘".concat(r,"’"));let n=r,i=this.lat.toRadians(),o=this.lon.toRadians(),a=t.lat.toRadians(),s=a-i,l=t.lon.toRadians()-o,u=Math.sin(s/2)*Math.sin(s/2)+Math.cos(i)*Math.cos(a)*Math.sin(l/2)*Math.sin(l/2);return n*(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 r=this.lat.toRadians(),n=t.lat.toRadians(),i=(t.lon-this.lon).toRadians(),o=Math.cos(r)*Math.sin(n)-Math.sin(r)*Math.cos(n)*Math.cos(i),a=Math.sin(i)*Math.cos(n),s=Math.atan2(a,o).toDegrees();return De.wrap360(s)}finalBearingTo(t){t instanceof e||(t=e.parse(t));let r=t.initialBearingTo(this)+180;return De.wrap360(r)}midpointTo(t){t instanceof e||(t=e.parse(t));let r=this.lat.toRadians(),n=this.lon.toRadians(),i=t.lat.toRadians(),o=(t.lon-this.lon).toRadians(),a=Math.cos(r),s=0,l=Math.sin(r),u={x:a+Math.cos(i)*Math.cos(o),y:s+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)),d=n+Math.atan2(u.y,u.x),h=c.toDegrees(),p=d.toDegrees();return new e(h,p)}intermediatePointTo(t,r){if(t instanceof e||(t=e.parse(t)),this.equals(t))return new e(this.lat,this.lon);let n=this.lat.toRadians(),i=this.lon.toRadians(),o=t.lat.toRadians(),a=t.lon.toRadians(),s=o-n,l=a-i,u=Math.sin(s/2)*Math.sin(s/2)+Math.cos(n)*Math.cos(o)*Math.sin(l/2)*Math.sin(l/2),c=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),d=Math.sin((1-r)*c)/Math.sin(c),h=Math.sin(r*c)/Math.sin(c),p=d*Math.cos(n)*Math.cos(i)+h*Math.cos(o)*Math.cos(a),f=d*Math.cos(n)*Math.sin(i)+h*Math.cos(o)*Math.sin(a),g=d*Math.sin(n)+h*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,r,n=6371e3){let i=t/n,o=Number(r).toRadians(),a=this.lat.toRadians(),s=this.lon.toRadians(),l=Math.sin(a)*Math.cos(i)+Math.cos(a)*Math.sin(i)*Math.cos(o),u=Math.asin(l),c=Math.sin(o)*Math.sin(i)*Math.cos(a),d=Math.cos(i)-Math.sin(a)*l,h=s+Math.atan2(c,d),p=u.toDegrees(),f=h.toDegrees();return new e(p,f)}static intersection(t,r,n,i){if(t instanceof e||(t=e.parse(t)),n instanceof e||(n=e.parse(n)),isNaN(r))throw new TypeError("invalid brng1 ‘".concat(r,"’"));if(isNaN(i))throw new TypeError("invalid brng2 ‘".concat(i,"’"));let o=t.lat.toRadians(),a=t.lon.toRadians(),s=n.lat.toRadians(),l=n.lon.toRadians(),u=Number(r).toRadians(),c=Number(i).toRadians(),d=s-o,h=l-a,p=2*Math.asin(Math.sqrt(Math.sin(d/2)*Math.sin(d/2)+Math.cos(o)*Math.cos(s)*Math.sin(h/2)*Math.sin(h/2)));if(Math.abs(p)<Number.EPSILON)return new e(t.lat,t.lon);let f=(Math.sin(s)-Math.sin(o)*Math.cos(p))/(Math.sin(p)*Math.cos(o)),g=(Math.sin(o)-Math.sin(s)*Math.cos(p))/(Math.sin(p)*Math.cos(s)),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-a)>0?v:2*Ze-v),b=(Math.sin(l-a)>0?2*Ze-y:y)-c;if(0==Math.sin(m)&&0==Math.sin(b)||Math.sin(m)*Math.sin(b)<0)return null;let _=-Math.cos(m)*Math.cos(b)+Math.sin(m)*Math.sin(b)*Math.cos(p),w=Math.atan2(Math.sin(p)*Math.sin(m)*Math.sin(b),Math.cos(b)+Math.cos(m)*_),M=Math.asin(Math.min(Math.max(Math.sin(o)*Math.cos(w)+Math.cos(o)*Math.sin(w)*Math.cos(u),-1),1)),x=a+Math.atan2(Math.sin(u)*Math.sin(w)*Math.cos(o),Math.cos(w)-Math.sin(o)*Math.sin(M)),E=M.toDegrees(),S=x.toDegrees();return new e(E,S)}crossTrackDistanceTo(t,r,n=6371e3){t instanceof e||(t=e.parse(t)),r instanceof e||(r=e.parse(r));let i=n;if(this.equals(t))return 0;let o=t.distanceTo(this,i)/i,a=t.initialBearingTo(this).toRadians(),s=t.initialBearingTo(r).toRadians();return Math.asin(Math.sin(o)*Math.sin(a-s))*i}alongTrackDistanceTo(t,r,n=6371e3){t instanceof e||(t=e.parse(t)),r instanceof e||(r=e.parse(r));let i=n;if(this.equals(t))return 0;let o=t.distanceTo(this,i)/i,a=t.initialBearingTo(this).toRadians(),s=t.initialBearingTo(r).toRadians(),l=Math.asin(Math.sin(o)*Math.sin(a-s));return Math.acos(Math.cos(o)/Math.abs(Math.cos(l)))*Math.sign(Math.cos(s-a))*i}maxLatitude(e){let t=Number(e).toRadians(),r=this.lat.toRadians();return Math.acos(Math.abs(Math.sin(t)*Math.cos(r))).toDegrees()}static crossingParallels(e,t,r){if(e.equals(t))return null;let n=Number(r).toRadians(),i=e.lat.toRadians(),o=e.lon.toRadians(),a=t.lat.toRadians(),s=t.lon.toRadians()-o,l=Math.sin(i)*Math.cos(a)*Math.cos(n)*Math.sin(s),u=Math.sin(i)*Math.cos(a)*Math.cos(n)*Math.cos(s)-Math.cos(i)*Math.sin(a)*Math.cos(n),c=Math.cos(i)*Math.cos(a)*Math.sin(n)*Math.sin(s);if(c*c>l*l+u*u)return null;let d=Math.atan2(-u,l),h=Math.acos(c/Math.sqrt(l*l+u*u)),p=o+d+h,f=(o+d-h).toDegrees(),g=p.toDegrees();return{lon1:De.wrap180(f),lon2:De.wrap180(g)}}rhumbDistanceTo(t,r=6371e3){t instanceof e||(t=e.parse(t));let n=r,i=this.lat.toRadians(),o=t.lat.toRadians(),a=o-i,s=Math.abs(t.lon-this.lon).toRadians();Math.abs(s)>Ze&&(s=s>0?-(2*Ze-s):2*Ze+s);let l=Math.log(Math.tan(o/2+Ze/4)/Math.tan(i/2+Ze/4)),u=Math.abs(l)>1e-11?a/l:Math.cos(i);return Math.sqrt(a*a+u*u*s*s)*n}rhumbBearingTo(t){if(t instanceof e||(t=e.parse(t)),this.equals(t))return NaN;let r=this.lat.toRadians(),n=t.lat.toRadians(),i=(t.lon-this.lon).toRadians();Math.abs(i)>Ze&&(i=i>0?-(2*Ze-i):2*Ze+i);let o=Math.log(Math.tan(n/2+Ze/4)/Math.tan(r/2+Ze/4)),a=Math.atan2(i,o).toDegrees();return De.wrap360(a)}rhumbDestinationPoint(t,r,n=6371e3){let i=this.lat.toRadians(),o=this.lon.toRadians(),a=Number(r).toRadians(),s=t/n,l=s*Math.cos(a),u=i+l;Math.abs(u)>Ze/2&&(u=u>0?Ze-u:-Ze-u);let c=Math.log(Math.tan(u/2+Ze/4)/Math.tan(i/2+Ze/4)),d=Math.abs(c)>1e-11?l/c:Math.cos(i),h=o+s*Math.sin(a)/d,p=u.toDegrees(),f=h.toDegrees();return new e(p,f)}rhumbMidpointTo(t){t instanceof e||(t=e.parse(t));let r=this.lat.toRadians(),n=this.lon.toRadians(),i=t.lat.toRadians(),o=t.lon.toRadians();Math.abs(o-n)>Ze&&(n+=2*Ze);let a=(r+i)/2,s=Math.tan(Ze/4+r/2),l=Math.tan(Ze/4+i/2),u=Math.tan(Ze/4+a/2),c=((o-n)*Math.log(u)+n*Math.log(l)-o*Math.log(s))/Math.log(l/s);isFinite(c)||(c=(n+o)/2);let d=a.toDegrees(),h=c.toDegrees();return new e(d,h)}static areaOf(e,t=6371e3){let r=t,n=e[0].equals(e[e.length-1]);n||e.push(e[0]);let i=e.length-1,o=0;for(let t=0;t<i;t++){let r=e[t].lat.toRadians(),n=e[t+1].lat.toRadians(),i=(e[t+1].lon-e[t].lon).toRadians();o+=2*Math.atan2(Math.tan(i/2)*(Math.tan(r/2)+Math.tan(n/2)),1+Math.tan(r/2)*Math.tan(n/2))}s(e)&&(o=Math.abs(o)-2*Ze);let a=Math.abs(o*r*r);return n||e.pop(),a;function s(e){let t=0,r=e[0].initialBearingTo(e[1]);for(let n=0;n<e.length-1;n++){let i=e[n].initialBearingTo(e[n+1]),o=e[n].finalBearingTo(e[n+1]);t+=(i-r+540)%360-180,t+=(o-i+540)%360-180,r=o}return t+=(e[0].initialBearingTo(e[1])-r+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 r=De.toLat(this.lat,e,t),n=De.toLon(this.lon,e,t);return"".concat(r,", ").concat(n)}};s(Ce,"LatLonSpherical");var pn,Jn,Ja,at=Ce,hm=["name","shortName"],Zr=class e{constructor(e,t){G(this,pn,void 0),G(this,Jn,{}),G(this,Ja,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),H(this,pn,e),H(this,Ja,t),Object.assign(this,t),this._scale=gm(this),this.scale=this.x_scale||1/this._scale}get polygons(){var e,t,r;return null!=(r=null==(t=null==(e=bt.instances.get(m(this,pn)))?void 0:e.polygonsByMapId)?void 0:t.get(this.id))?r:[]}get locations(){var e,t,r;return null!=(r=null==(t=null==(e=bt.instances.get(m(this,pn)))?void 0:e.locationsByMapId)?void 0:t.get(this.id))?r:[]}get nodes(){var e,t,r;return null!=(r=null==(t=null==(e=bt.instances.get(m(this,pn)))?void 0:e.nodesByMapId)?void 0:t.get(this.id))?r:[]}get mapGroup(){let e=m(this,Jn).mapGroup;if(typeof e<"u")return e;let t=this.group,r=t&&m(this,pn)._mapGroupsById[t]||null;return m(this,Jn).mapGroup=r,r}createCoordinateByXY(e,t){return new xr({x:e,y:t,map:this,mappedin:m(this,pn)})}createCoordinate(e,t){return new xr({lat:e,lon:t,map:this,mappedin:m(this,pn)})}getNorth(){let e;try{let t=this.georeference[0],r=this.georeference[2],n=new at(t.target.x,t.target.y),i=new at(r.target.x,r.target.y);e=-((n.finalBearingTo(i)+0)*Math.PI/180-Math.atan2(r.control.y-t.control.y,r.control.x-t.control.x)-Math.PI/2)}catch(t){e=0,ae.warn(t),ae.warn("Couldn't georeference ".concat(this.name||this.shortName||this.id,". Probably not enough geocoordinates."))}return e}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async updateInPlace(t,r){let n=r||await e.fetch(t);for(let e=0;e<n.length;e++)for(let r of hm)t.maps[e][r]=n[e][r]}static async fetch(t){var r;let n=t.options.things.maps.slice();t.options.perspective&&nt(n,"perspectives"),t.options.things.mapGroups&&nt(n,"group"),nt(n,"elevation"),nt(n,"x_scale"),nt(n,"scale"),nt(n,"georeference");let i={fields:n,perspective:t.options.perspective,venue:t.options.venue};try{let a=await rt(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,n.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!=(r=o.scene)&&r.polygons&&"string"==typeof o.scene.polygons){let e=await An()(o.scene.polygons);o.scene.polygons=await e.json()}a[i]=new e(t,o)}return a}catch(e){return ae.error("Fetch Maps:",e),[]}}get center(){if(m(this,Jn).center)return m(this,Jn).center;let[e,t]=[this.georeference[0].control.x,this.georeference[0].control.y],[r,n]=[this.georeference[2].control.x,this.georeference[2].control.y],{lat:i,lon:o}=this.createCoordinateByXY(e,t),{lat:a,lon:s}=this.createCoordinateByXY(r,n),l=new at(i,o),u=new at(a,s),c=l.midPointTo(u);return m(this,Jn).center=c,c}toJSON(){let e={...m(this,Ja)};for(let t of hm)e[t]=this[t];return e}};pn=new WeakMap,Jn=new WeakMap,Ja=new WeakMap,s(Zr,"MappedinMap");var Ka=Zr;y();var Qa,Ap,Za,Cp,Zt,ei,qs,mm,Us,vm,fn,hn,gn,mn,jp=class{constructor(e){G(this,Qa),G(this,Za),G(this,qs),G(this,Us),g(this,"map"),G(this,Zt,{}),G(this,ei,void 0),G(this,fn,void 0),G(this,hn,void 0),G(this,gn,void 0),G(this,mn,void 0);let{map:t,mappedin:r}=e;null!=e.lat&&null!=e.lon&&(H(this,fn,e.lat),H(this,hn,e.lon)),null!=e.x&&null!=e.y&&(H(this,gn,e.x),H(this,mn,e.y)),this.map=t,H(this,ei,r)}get x(){return Ke(this,Za,Cp).call(this,"x")}get y(){return Ke(this,Za,Cp).call(this,"y")}get lat(){return Ke(this,Qa,Ap).call(this,"lat")}get lon(){return Ke(this,Qa,Ap).call(this,"lon")}absoluteDistanceTo(e){return ym([e.lat,e.lon],[this.lat,this.lon])}get nearestNode(){let e=m(this,Zt).nearestNode;if(typeof e<"u")return e;let t=bt.instances.get(m(this,ei)).findNearestNodeOnMap(this.map.id,this);return m(this,Zt).nearestNode=t,t}nodesInRadius(e){if(e<=0)return ae.error("Radius must be greater than 0."),[];let t=m(this,Zt).radius,r=m(this,Zt).nodesInRadius;if(t&&r&&m(this,Zt).radius===e)return m(this,Zt).nodesInRadius;let n=bt.instances.get(m(this,ei)).findNodeWithinRadiusOnMap(this.map.id,this,e*this.map._scale);return m(this,Zt).radius=e,m(this,Zt).nodesInRadius=n,n}toJSON(){return{x:this.x,y:this.y,map:this.map,lat:this.lat,lon:this.lon}}};Qa=new WeakSet,Ap=s((function(e){if(typeof m(this,fn)<"u"&&typeof m(this,hn)<"u")return m(this,"lat"===e?fn:hn);if(typeof m(this,gn)<"u"&&typeof m(this,mn)<"u"){let[t,r]=Ke(this,Us,vm).call(this,m(this,gn),m(this,mn));return H(this,fn,t),H(this,hn,r),m(this,"lat"===e?fn:hn)}throw Error("MappedinCoordinate is missing x and y")}),"#getLatLon"),Za=new WeakSet,Cp=s((function(e){if(m(this,gn)&&m(this,mn))return m(this,"x"===e?gn:mn);if(null!=m(this,fn)&&null!=m(this,hn)){let[t,r]=Ke(this,qs,mm).call(this,m(this,fn),m(this,hn));return H(this,gn,t),H(this,mn,r),m(this,"x"===e?gn:mn)}throw Error("MappedinCoordinate is missing lat and lon")}),"#getXY"),Zt=new WeakMap,ei=new WeakMap,qs=new WeakSet,mm=s((function(e,t){let r=this.map.georeference[0],n=new at(r.target.x,r.target.y),i=new at(e,t),o=n.distanceTo(i),a=(n.finalBearingTo(i)+360)%360*Math.PI/180||0,s=o*(1/this.map.scale),l=a+this.map.getNorth(),u=Math.sin(l)*s,c=Math.cos(l)*s;return[r.control.x+u,r.control.y-c]}),"#latLonToXY"),Us=new WeakSet,vm=s((function(e,t){let r,n=this.map.georeference[0],i=new at(n.target.x,n.target.y),o=e-n.control.x,a=n.control.y-t,s=Math.atan2(o,a);r=0===o&&0===a?0:0===o?a:o/Math.sin(s);let l=s-this.map.getNorth(),u=r/this.map._scale,c=i.destinationPoint(u,180*l/Math.PI);return[c.lat,c.lon]}),"#xyToLatLon"),fn=new WeakMap,hn=new WeakMap,gn=new WeakMap,mn=new WeakMap,s(jp,"MappedinCoordinate");var xr=jp;y();var to,ni,no,bm=["name"],ti=class e{constructor(e,t){G(this,to,void 0),G(this,ni,void 0),G(this,no,{}),g(this,"id",""),g(this,"name",""),H(this,ni,t),H(this,to,e),Object.assign(this,t)}get maps(){let e=m(this,no).maps;if(typeof e<"u")return e;let t=[],{maps:r}=m(this,to),{id:n}=m(this,ni);for(let e=0,i=r.length;e<i;++e){let i=r[e];i.group===n&&t.push(i)}return m(this,no).maps=t,t}static hydrate(t,r){return t.map((t=>new e(r,t)))}static async updateInPlace(t,r){let n=r||await e.fetch(t);for(let e=0;e<n.length;e++)for(let r of bm)t.mapGroups[e][r]=n[e][r]}static async fetch(t){let r={fields:t.options.things.mapGroups.slice(),venue:t.options.venue};try{return(await rt(t.options,"map-group",r)).map((r=>new e(t,r)))}catch(e){return ae.error("Fetch Map Groups:",e),[]}}toJSON(){let e={...m(this,ni)};for(let t of bm)e[t]=this[t];return e}};to=new WeakMap,ni=new WeakMap,no=new WeakMap,s(ti,"MappedinMapGroup");var eo=ti;y();var xm=an(wm());y(),y();var Er,en,tn,Np=[0,4,6,8,10],Nn=s((()=>{let e=new Array(16).fill(0),t=4294967296*Math.random();for(let r=0;r<e.length;r++)r>0&&!(3&r)&&(t=4294967296*Math.random()),e[r]=t>>>((3&r)<<3)&255;let r=e.map((e=>e.toString(16).padStart(2,"0")));return r[6]="4"+r[6][1],r[8]=["8","9","a","b"].includes(r[7][0])?r[7]:"a"+r[7][1],Np.map(((e,t)=>r.slice(e,t===Np.length-1?void 0:Np[t+1]).join(""))).join("-")}),"randomId"),_m="mi-session-data",km="mi-local-data",ro=class e{constructor(){G(this,en,void 0),G(this,tn,void 0);try{let e=sessionStorage.getItem(_m);H(this,en,e?JSON.parse(e):{id:Nn()})}catch{H(this,en,{id:Nn()})}try{let e=localStorage.getItem(km);H(this,tn,e?JSON.parse(e):{deviceId:Nn()})}catch{H(this,tn,{deviceId:Nn()})}m(this,en).id||(m(this,en).id=Nn()),m(this,tn).deviceId||(m(this,tn).deviceId=Nn())}static getInstance(){return m(this,Er)||H(this,Er,new e),m(this,Er)}static ___clearInstance(){H(this,Er,void 0)}saveSessionData(e,t){m(this,en)[e]=t;try{return sessionStorage.setItem(_m,JSON.stringify(m(this,en))),!0}catch{return!1}}loadSessionData(e){let t=m(this,en)[e];if(null!=t)return t}saveLocalData(e,t){m(this,tn)[e]=t;try{return localStorage.setItem(km,JSON.stringify(m(this,tn))),!0}catch{return!1}}loadLocalData(e){let t=m(this,tn)[e];if(null!=t)return t}};Er=new WeakMap,en=new WeakMap,tn=new WeakMap,s(ro,"SafeStorage"),G(ro,Er,void 0);var io=ro;y();var Lp={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 Ws(e){return/^[\da-f]{24}$/i.test(e)}function Mm(e,t=!1){let r="";if(null!=e){let n="?",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],a=e[o];null!=a&&(r+="".concat(n+encodeURIComponent(o),"=").concat(encodeURIComponent(a)),n="&")}}return r}function Sx(e,t,r,n=!1){var i,o;return n?"".concat(e.supplementaryUrl).concat(t,"?venue=").concat(r.venue||r.slug):null!=(i=e.baseUrl)&&i.includes("gateway")?"".concat(e.baseUrl).concat(t,"/").concat(r.venue||r.slug).concat(Mm(r,null==(o=e.baseUrl)?void 0:o.includes("gateway"))):e.baseUrl+t+Mm(r)}async function rt(e,t,r,n=!1){return $r(e,t,r,n,!0)}async function $r(e,t,r,n=!1,i=!1){let o=Sx(e,t,r,n),a=await Fp(e,o,n);if(!i&&Array.isArray(a)){if(1===a.length)return a[0];throw new Error("Invalid response object")}return a}function Ox(e,t,r=!1){let n={language:e.language,clientId:e.clientId,clientSecret:e.clientSecret};r&&delete n.language,n.language&&(t+="&lang=".concat(encodeURIComponent(n.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)),n.language&&(i["Accept-Language"]=n.language);let o={method:"GET",headers:i};return e.secure&&(t+="&withcdntoken"),{req:o,url:t}}async function Fp(e,t,r=!1){let n=Ox(e,t,r),i=await An()(n.url,n.req);if(!i.ok)throw new Error("".concat(i.status," ").concat(i.statusText));return i.json()}function nt(e,t){e.indexOf(t)<0&&e.push(t)}function ym([e,t],[r,n]){let i=new at(e,t),o=new at(r,n);return i.distanceTo(o)}function gm(e){if(e.scale||e.x_scale)return 1/(e.scale||e.x_scale);let t;try{let r=e.georeference[0],n=e.georeference[2],i=new at(r.target.x,r.target.y),o=new at(n.target.x,n.target.y),a=i.distanceTo(o),s=r.control.x-n.control.x,l=r.control.y-n.control.y;t=Math.sqrt(s*s+l*l)/a}catch(r){t=1,ae.warn(r),ae.warn("Couldn't georeference ".concat(e.name||e.shortName||e.id,". Probably not enough geocoordinates."))}return t}function Ei(e){var t;return e instanceof wr?e.entrances.map((e=>e.id)):e instanceof Cn?(null==(t=e.nodes)?void 0:t.map((e=>e.id)))||[]:[e.id]}async function Em(e){let t={},{maps:r,images:n,scenes:i,polygons:o}=e;if(null!=n)try{let e=Object.keys(n).map((e=>fetch("data:image/png;base64,".concat(n[e])).then((e=>e.blob())).then((r=>{t[e]=r})).catch((e=>{ae.error(e)}))));await Promise.all(e)}catch(e){ae.error(e)}return r.forEach((e=>{var r;(null!=(r=e.scene)&&r.polygons||i&&i[e.id])&&(null!=i&&i[e.id]&&(e.scene||(e.scene={}),Object.defineProperty(e.scene,"polygons",{get:()=>i[e.id]})),null!=n&&(e.scene.images=e.scene.images.map((({filename:e})=>({filename:e,url:t[e]}))),e.scene.polygons.forEach((e=>{var r,n;if(null!=(r=null==e?void 0:e.image)&&r.url&&null!=(n=null==e?void 0:e.image)&&n.url){let r=e.image.url.split("/"),n=t[r[r.length-1]];n&&(e.image.url=n)}}))))})),null!=n&&o.forEach((e=>{var r;if(null!=(r=null==e?void 0:e.image)&&r.url){let r=e.image.url.split("/"),n=t[r[r.length-1]];n&&(e.image.url=n)}})),null!=e.images&&delete e.images,null!=e.scenes&&delete e.scenes,e}function ri(e,t,r){let n;return function(...i){let o=this,a=s((function(){n=null,r||e.apply(o,i)}),"later"),l=r&&!n;clearTimeout(n),n=setTimeout(a,t),l&&e.apply(o,i)}}function Tm(e,t,r,n=0){if(!e||e<=0)return 0;let i=0;n>=0&&n<=1&&(i=n/10);let o=1e-5,a=1+(r-e)/(r-t)+i;return Math.max(1+o,Math.min(2-o,a))}function zs(){return io.getInstance().loadLocalData("deviceId")}function Bs(){return io.getInstance().loadSessionData("id")}s(Ws,"isGatewayKey"),s(Mm,"stringifyQuery"),s(Sx,"buildUrl"),s(rt,"getArray"),s($r,"getObject"),s(Ox,"constructParamsForRequest"),s(Fp,"generateAPIRequest"),s(nt,"addToSet"),s(ym,"getDistanceBetweenLatLon"),s(gm,"getMapScale"),s(Ei,"getNodesForNavigatable"),s(Em,"populateBundledImagesAsBlobs"),s(ri,"debounce"),s(Tm,"normalizeCategoryRank"),s(zs,"getDeviceID"),s(Bs,"getSessionID");var Sm=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 r=null;if(null!=e&&void 0!==e.locations&&e.locations.length>0){r=e.locations[0];for(let t=0,n=e.locations.length;t<n;t++){let n=e.locations[t];for(;void 0!==n.parent;)n=n.parent,n.polygons.includes(e)&&(r=n);if(void 0===n.parent&&n.polygons.includes(e))return n}}return r}),"getPrimaryLocationForPolygon");function Om(e){var t;let r={...e};for(let[e,n]of Object.entries(Lp))r[e]=(0,xm.default)(n.concat(null!=(t=r[e])?t:[]));return r}function Rp(e){let t=+this._x.call(null,e),r=+this._y.call(null,e);return Pm(this.cover(t,r),t,r,e)}function Pm(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var i,o,a,s,l,u,c,d,h,p=e._root,f={data:n},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=r>=(a=(v+m)/2))?v=a:m=a,i=p,!(p=p[d=c<<1|u]))return i[d]=f,e;if(s=+e._x.call(null,p.data),l=+e._y.call(null,p.data),t===s&&r===l)return f.next=p,i?i[d]=f:e._root=f,e;do{i=i?i[d]=new Array(4):e._root=new Array(4),(u=t>=(o=(g+y)/2))?g=o:y=o,(c=r>=(a=(v+m)/2))?v=a:m=a}while((d=c<<1|u)==(h=(l>=a)<<1|s>=o));return i[h]=p,i[d]=f,e}function Im(e){var t,r,n,i,o=e.length,a=new Array(o),s=new Array(o),l=1/0,u=1/0,c=-1/0,d=-1/0;for(r=0;r<o;++r)isNaN(n=+this._x.call(null,t=e[r]))||isNaN(i=+this._y.call(null,t))||(a[r]=n,s[r]=i,n<l&&(l=n),n>c&&(c=n),i<u&&(u=i),i>d&&(d=i));if(l>c||u>d)return this;for(this.cover(l,u).cover(c,d),r=0;r<o;++r)Pm(this,a[r],s[r],e[r]);return this}function Dp(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,i=this._x1,o=this._y1;if(isNaN(r))i=(r=Math.floor(e))+1,o=(n=Math.floor(t))+1;else{for(var a,s,l=i-r||1,u=this._root;r>e||e>=i||n>t||t>=o;)switch(s=(t<n)<<1|e<r,a=new Array(4),a[s]=u,u=a,l*=2,s){case 0:i=r+l,o=n+l;break;case 1:r=i-l,o=n+l;break;case 2:i=r+l,n=o-l;break;case 3:r=i-l,n=o-l}this._root&&this._root.length&&(this._root=u)}return this._x0=r,this._y0=n,this._x1=i,this._y1=o,this}function zp(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e}function Bp(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 st(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}function Vp(e,t,r){var n,i,o,a,s,l,u,c=this._x0,d=this._y0,h=this._x1,p=this._y1,f=[],g=this._root;for(g&&f.push(new st(g,c,d,h,p)),null==r?r=1/0:(c=e-r,d=t-r,h=e+r,p=t+r,r*=r);l=f.pop();)if(!(!(g=l.node)||(i=l.x0)>h||(o=l.y0)>p||(a=l.x1)<c||(s=l.y1)<d))if(g.length){var v=(i+a)/2,y=(o+s)/2;f.push(new st(g[3],v,y,a,s),new st(g[2],i,y,v,s),new st(g[1],v,o,a,y),new st(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),_=m*m+b*b;if(_<r){var w=Math.sqrt(r=_);c=e-w,d=t-w,h=e+w,p=t+w,n=g.data}}return n}function qp(e){if(isNaN(o=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,r,n,i,o,a,s,l,u,c,d,h,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>=(s=(f+v)/2))?f=s:v=s,(c=a>=(l=(g+y)/2))?g=l:y=l,t=p,!(p=p[d=c<<1|u]))return this;if(!p.length)break;(t[d+1&3]||t[d+2&3]||t[d+3&3])&&(r=t,h=d)}for(;p.data!==e;)if(n=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,n?(i?n.next=i:delete n.next,this):t?(i?t[d]=i:delete t[d],(p=t[0]||t[1]||t[2]||t[3])&&p===(t[3]||t[2]||t[1]||t[0])&&!p.length&&(r?r[h]=p:this._root=p),this):(this._root=i,this)}function Am(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}function Up(){return this._root}function Gp(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e}function Wp(e){var t,r,n,i,o,a,s=[],l=this._root;for(l&&s.push(new st(l,this._x0,this._y0,this._x1,this._y1));t=s.pop();)if(!e(l=t.node,n=t.x0,i=t.y0,o=t.x1,a=t.y1)&&l.length){var u=(n+o)/2,c=(i+a)/2;(r=l[3])&&s.push(new st(r,u,c,o,a)),(r=l[2])&&s.push(new st(r,n,c,u,a)),(r=l[1])&&s.push(new st(r,u,i,o,c)),(r=l[0])&&s.push(new st(r,n,i,u,c))}return this}function Yp(e){var t,r=[],n=[];for(this._root&&r.push(new st(this._root,this._x0,this._y0,this._x1,this._y1));t=r.pop();){var i=t.node;if(i.length){var o,a=t.x0,s=t.y0,l=t.x1,u=t.y1,c=(a+l)/2,d=(s+u)/2;(o=i[0])&&r.push(new st(o,a,s,c,d)),(o=i[1])&&r.push(new st(o,c,s,l,d)),(o=i[2])&&r.push(new st(o,a,d,c,u)),(o=i[3])&&r.push(new st(o,c,d,l,u))}n.push(t)}for(;t=n.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this}function Cm(e){return e[0]}function Hp(e){return arguments.length?(this._x=e,this):this._x}function jm(e){return e[1]}function Xp(e){return arguments.length?(this._y=e,this):this._y}function ii(e,t,r){var n=new $p(null==t?Cm:t,null==r?jm:r,NaN,NaN,NaN,NaN);return null==e?n:n.addAll(e)}function $p(e,t,r,n,i,o){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=o,this._root=void 0}function Nm(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}s(Om,"mergeThings"),y(),y(),y(),y(),s(Rp,"default"),s(Pm,"add"),s(Im,"addAll"),y(),s(Dp,"default"),y(),s(zp,"default"),y(),s(Bp,"default"),y(),y(),s(st,"default"),s(Vp,"default"),y(),s(qp,"default"),s(Am,"removeAll"),y(),s(Up,"default"),y(),s(Gp,"default"),y(),s(Wp,"default"),y(),s(Yp,"default"),y(),s(Cm,"defaultX"),s(Hp,"default"),y(),s(jm,"defaultY"),s(Xp,"default"),s(ii,"quadtree"),s($p,"Quadtree"),s(Nm,"leaf_copy");var _t=ii.prototype=$p.prototype;_t.copy=function(){var e,t,r=new $p(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=Nm(n),r;for(e=[{source:n,target:r._root=new Array(4)}];n=e.pop();)for(var i=0;i<4;++i)(t=n.source[i])&&(t.length?e.push({source:t,target:n.target[i]=new Array(4)}):n.target[i]=Nm(t));return r},_t.add=Rp,_t.addAll=Im,_t.cover=Dp,_t.data=zp,_t.extent=Bp,_t.find=Vp,_t.remove=qp,_t.removeAll=Am,_t.root=Up,_t.size=Gp,_t.visit=Wp,_t.visitAfter=Yp,_t.x=Hp,_t.y=Xp;var vn,$e,nn=class e{constructor(e){G(this,vn,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",{}),G(this,$e,{}),H(this,vn,e)}get polygonsByMapId(){if(m(this,$e).polygonsByMapId)return m(this,$e).polygonsByMapId;let e,t={};for(let r=0,n=m(this,vn).polygons.length;r<n;++r)e=m(this,vn).polygons[r],t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e);let r=Object.entries(t).reduce(((e,[t,r])=>(e.set(t,r),e)),new Map);return m(this,$e).polygonsByMapId=r,m(this,$e).polygonsByMapId}get nodesByMapId(){if(m(this,$e).nodesByMapId)return m(this,$e).nodesByMapId;let e,t={};for(let r=0,n=m(this,vn).nodes.length;r<n;++r)e=m(this,vn).nodes[r],t[e.map.id]||(t[e.map.id]=[]),t[e.map.id].push(e);let r=Object.entries(t).reduce(((e,[t,r])=>(e.set(t,r),e)),new Map);return m(this,$e).nodesByMapId=r,m(this,$e).nodesByMapId}findNearestNodeOnMap(e,t){var r;if(m(this,$e).nodeTreesByMap||(m(this,$e).nodeTreesByMap=new Map),!m(this,$e).nodeTreesByMap.has(e)){let t=null!=(r=this.nodesByMapId.get(e))?r:[],n=ii();n.x((e=>e.x)),n.y((e=>e.y)),n.addAll(t),m(this,$e).nodeTreesByMap.set(e,n)}return m(this,$e).nodeTreesByMap.get(e).find(t.x,t.y)}findNodeWithinRadiusOnMap(e,t,r){var n;if(m(this,$e).nodeTreesByMap||(m(this,$e).nodeTreesByMap=new Map),!m(this,$e).nodeTreesByMap.has(e)){let t=null!=(n=this.nodesByMapId.get(e))?n:[],r=ii();r.x((e=>e.x)),r.y((e=>e.y)),r.addAll(t),m(this,$e).nodeTreesByMap.set(e,r)}let i=m(this,$e).nodeTreesByMap.get(e),o=[],a=t.x,s=t.y;return i.visit(((e,t,n,i,l)=>{if(e&&!e.length)do{let t=e.data;Math.sqrt((t.x-a)**2+(t.y-s)**2)<=r&&o.push(t)}while(e=e.next);let u=a-Math.max(t,Math.min(i,a)),c=s-Math.max(n,Math.min(l,s));return u*u+c*c>=r*r})),o}get locationsByMapId(){if(m(this,$e).locationsByMapId)return m(this,$e).locationsByMapId;let e,t={};for(let r=0,n=m(this,vn).locations.length;r<n;++r){e=m(this,vn).locations[r];for(let r=0,n=e.polygons.length;r<n;++r)t[e.polygons[r].map.id]||(t[e.polygons[r].map.id]=[]),-1===t[e.polygons[r].map.id].indexOf(e)&&t[e.polygons[r].map.id].push(e);for(let r=0,n=e.nodes.length;r<n;++r){let n=e.nodes[r];t[n.map.id]||(t[n.map.id]=[]),-1===t[n.map.id].indexOf(e)&&t[n.map.id].push(e)}}let r=Object.entries(t).reduce(((e,[t,r])=>(e.set(t,r),e)),new Map);return m(this,$e).locationsByMapId=r,m(this,$e).locationsByMapId}static create(t){return e.instances.has(t)||e.instances.set(t,new e(t)),e.instances.get(t)}static clear(){e.instances.clear()}static clearInstance(t){e.instances.has(t)&&e.instances.delete(t)}};vn=new WeakMap,$e=new WeakMap,s(nn,"MappedinCache"),g(nn,"instances",new Map);var Kp=nn,bt=Kp,Ys={categories:Mr,locations:Cn,vortexes:Na,maps:Ka,nodes:xa,polygons:wr,venue:Xr,events:Wa,mapGroups:eo,themes:Vs,locationStates:Xa,rankings:Ua};y(),y(),y(),y();var kt=6371008.8,Lm={centimeters:100*kt,centimetres:100*kt,degrees:kt/111325,feet:3.28084*kt,inches:39.37*kt,kilometers:kt/1e3,kilometres:kt/1e3,meters:kt,metres:kt,miles:kt/1609.344,millimeters:1e3*kt,millimetres:1e3*kt,nauticalmiles:kt/1852,radians:1,yards:1.0936*kt},hj={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/kt,yards:1.0936133};function Qn(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function Mt(e,t,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(!Jp(e[0])||!Jp(e[1]))throw new Error("coordinates must contain numbers");return Qn({type:"Point",coordinates:e},t,r)}function Fn(e,t,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return Qn({type:"LineString",coordinates:e},t,r)}function Tr(e,t){void 0===t&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function Fm(e,t){void 0===t&&(t="kilometers");var r=Lm[t];if(!r)throw new Error(t+" units is invalid");return e*r}function Rm(e,t){void 0===t&&(t="kilometers");var r=Lm[t];if(!r)throw new Error(t+" units is invalid");return e/r}function ao(e){return 180*(e%(2*Math.PI))/Math.PI}function Ot(e){return e%360*Math.PI/180}function Jp(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Hs(e,t,r){if(null!==e)for(var n,i,o,a,s,l,u,c,d=0,h=0,p=e.type,f="FeatureCollection"===p,g="Feature"===p,v=f?e.features.length:1,y=0;y<v;y++){s=(c=!!(u=f?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var m=0;m<s;m++){var b=0,_=0;if(null!==(a=c?u.geometries[m]:u)){l=a.coordinates;var w=a.type;switch(d=!r||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===t(l,h,y,b,_))return!1;h++,b++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(!1===t(l[n],h,y,b,_))return!1;h++,"MultiPoint"===w&&b++}"LineString"===w&&b++;break;case"Polygon":case"MultiLineString":for(n=0;n<l.length;n++){for(i=0;i<l[n].length-d;i++){if(!1===t(l[n][i],h,y,b,_))return!1;h++}"MultiLineString"===w&&b++,"Polygon"===w&&_++}"Polygon"===w&&b++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(_=0,i=0;i<l[n].length;i++){for(o=0;o<l[n][i].length-d;o++){if(!1===t(l[n][i][o],h,y,b,_))return!1;h++}_++}b++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===Hs(a.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Qp(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var r=0;r<e.features.length&&!1!==t(e.features[r],r);r++);}function Px(e,t){var r,n,i,o,a,s,l,u,c,d,h=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(r=0;r<g;r++){for(s=p?e.features[r].geometry:f?e.geometry:e,u=p?e.features[r].properties:f?e.properties:{},c=p?e.features[r].bbox:f?e.bbox:void 0,d=p?e.features[r].id:f?e.id:void 0,a=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=l?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,h,u,c,d))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],h,u,c,d))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,h,u,c,d))return!1;h++}}function oo(e,t){Px(e,(function(e,r,n,i,o){var a,s=null===e?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==t(Qn(e,n,{bbox:i,id:o}),r,0)&&void 0}switch(s){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u=e.coordinates[l];if(!1===t(Qn({type:a,coordinates:u},n),r,l))return!1}}))}function Ix(e,t){oo(e,(function(e,r,n){var i=0;if(e.geometry){var o=e.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var a,s=0,l=0,u=0;if(!1===Hs(e,(function(o,c,d,h,p){if(void 0===a||r>s||h>l||p>u)return a=o,s=r,l=h,u=p,void(i=0);var f=Fn([a,o],e.properties);if(!1===t(f,r,n,p,i))return!1;i++,a=o})))return!1}}}))}function Dm(e,t,r){var n=r,i=!1;return Ix(e,(function(e,o,a,s,l){n=!1===i&&void 0===r?e:t(n,e,o,a,s,l),i=!0})),n}function Zp(e){var t=[1/0,1/0,-1/0,-1/0];return Hs(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(Qn,"feature"),s(Mt,"point"),s(Fn,"lineString"),s(Tr,"featureCollection"),s(Fm,"radiansToLength"),s(Rm,"lengthToRadians"),s(ao,"radiansToDegrees"),s(Ot,"degreesToRadians"),s(Jp,"isNumber"),s(Hs,"coordEach"),s(Qp,"featureEach"),s(Px,"geomEach"),s(oo,"flattenEach"),s(Ix,"segmentEach"),s(Dm,"segmentReduce"),s(Zp,"bbox"),Zp.default=Zp;var Xs=Zp;function yn(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 zm(e,t){return"FeatureCollection"===e.type?"FeatureCollection":"GeometryCollection"===e.type?"GeometryCollection":"Feature"===e.type&&null!==e.geometry?e.geometry.type:e.type}function Ax(e,t,r){void 0===r&&(r={});var n=yn(e),i=yn(t),o=Ot(i[1]-n[1]),a=Ot(i[0]-n[0]),s=Ot(n[1]),l=Ot(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(l);return Fm(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),r.units)}y(),y(),y(),y(),s(yn,"getCoord"),s(Dt,"getCoords"),s(zm,"getType"),s(Ax,"distance");var Zn=Ax;function $s(e,t){return void 0===t&&(t={}),Dm(e,(function(e,r){var n=r.geometry.coordinates;return e+Zn(n[0],n[1],t)}),0)}function Ks(e,t,r){if(void 0===r&&(r={}),!0===r.final)return Cx(e,t);var n=yn(e),i=yn(t),o=Ot(n[0]),a=Ot(i[0]),s=Ot(n[1]),l=Ot(i[1]),u=Math.sin(a-o)*Math.cos(l),c=Math.cos(s)*Math.sin(l)-Math.sin(s)*Math.cos(l)*Math.cos(a-o);return ao(Math.atan2(u,c))}function Cx(e,t){var r=Ks(t,e);return r=(r+180)%360}function Js(e,t,r,n){void 0===n&&(n={});var i=yn(e),o=Ot(i[0]),a=Ot(i[1]),s=Ot(r),l=Rm(t,n.units),u=Math.asin(Math.sin(a)*Math.cos(l)+Math.cos(a)*Math.sin(l)*Math.cos(s));return Mt([ao(o+Math.atan2(Math.sin(s)*Math.sin(l)*Math.cos(a),Math.cos(l)-Math.sin(a)*Math.sin(u))),ao(u)],n.properties)}function jx(e){if(!e)throw new Error("geojson is required");var t=[];return oo(e,(function(e){Nx(e,t)})),Tr(t)}function Nx(e,t){var r=[],n=e.geometry;if(null!==n){switch(n.type){case"Polygon":r=Dt(n);break;case"LineString":r=[Dt(n)]}r.forEach((function(r){Lx(r,e.properties).forEach((function(e){e.id=t.length,t.push(e)}))}))}}function Lx(e,t){var r=[];return e.reduce((function(e,n){var i=Fn([e,n],t);return i.bbox=Fx(e,n),r.push(i),n})),r}function Fx(e,t){var r=e[0],n=e[1],i=t[0],o=t[1];return[r<i?r:i,n<o?n:o,r>i?r:i,n>o?n:o]}s($s,"length"),y(),y(),y(),s(Ks,"bearing"),s(Cx,"calculateFinalBearing"),y(),s(Js,"destination"),y(),y(),s(jx,"lineSegment"),s(Nx,"lineSegmentFeature"),s(Lx,"createSegments"),s(Fx,"bbox");var ef=jx,rv=an(tv(),1);function lE(e,t){var r={},n=[];if("LineString"===e.type&&(e=Qn(e)),"LineString"===t.type&&(t=Qn(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=nv(e,t);return i&&n.push(i),Tr(n)}var o=(0,rv.default)();return o.load(ef(t)),Qp(ef(e),(function(e){Qp(o.search(e),(function(t){var i=nv(e,t);if(i){var o=Dt(i).join(",");r[o]||(r[o]=!0,n.push(i))}}))})),Tr(n)}function nv(e,t){var r=Dt(e),n=Dt(t);if(2!==r.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==n.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=r[0][0],o=r[0][1],a=r[1][0],s=r[1][1],l=n[0][0],u=n[0][1],c=n[1][0],d=n[1][1],h=(d-u)*(a-i)-(c-l)*(s-o);if(0===h)return null;var p=((c-l)*(o-u)-(d-u)*(i-l))/h,f=((a-i)*(o-u)-(s-o)*(i-l))/h;return p>=0&&p<=1&&f>=0&&f<=1?Mt([i+p*(a-i),o+p*(s-o)]):null}s(lE,"lineIntersect"),s(nv,"intersects");var iv=lE;function cE(e,t,r){void 0===r&&(r={});var n=Mt([1/0,1/0],{dist:1/0}),i=0;return oo(e,(function(e){for(var o=Dt(e),a=0;a<o.length-1;a++){var s=Mt(o[a]);s.properties.dist=Zn(t,s,r);var l=Mt(o[a+1]);l.properties.dist=Zn(t,l,r);var u=Zn(s,l,r),c=Math.max(s.properties.dist,l.properties.dist),d=Ks(s,l),h=Js(t,c,d+90,r),p=Js(t,c,d-90,r),f=iv(Fn([h.geometry.coordinates,p.geometry.coordinates]),Fn([s.geometry.coordinates,l.geometry.coordinates])),g=null;f.features.length>0&&((g=f.features[0]).properties.dist=Zn(t,g,r),g.properties.location=i+Zn(s,g,r)),s.properties.dist<n.properties.dist&&((n=s).properties.index=a,n.properties.location=i),l.properties.dist<n.properties.dist&&((n=l).properties.index=a+1,n.properties.location=i+u),g&&g.properties.dist<n.properties.dist&&((n=g).properties.index=a),i+=u}})),n}s(cE,"nearestPointOnLine");var uo=cE;function dE(e,t,r){var n=Dt(r);if("LineString"!==zm(r))throw new Error("line must be a LineString");for(var i,o=uo(r,e),a=uo(r,t),s=[(i=o.properties.index<=a.properties.index?[o,a]:[a,o])[0].geometry.coordinates],l=i[0].properties.index+1;l<i[1].properties.index+1;l++)s.push(n[l]);return s.push(i[1].geometry.coordinates),Fn(s,r.properties)}s(dE,"lineSlice");var hf=dE;function pE(e,t){void 0===t&&(t={});var r=Xs(e);return Mt([(r[0]+r[2])/2,(r[1]+r[3])/2],t.properties,t)}y(),s(pE,"center");var av=pE;function fE(e,t,r){void 0===r&&(r={});for(var n=yn(e),i=Dt(t),o=0;o<i.length-1;o++){var a=!1;if(r.ignoreEndVertices&&(0===o&&(a="start"),o===i.length-2&&(a="end"),0===o&&o+1===i.length-1&&(a="both")),hE(i[o],i[o+1],n,a,typeof r.epsilon>"u"?null:r.epsilon))return!0}return!1}function hE(e,t,r,n,i){var o=r[0],a=r[1],s=e[0],l=e[1],u=t[0],c=t[1],d=u-s,h=c-l,p=(r[0]-s)*h-(r[1]-l)*d;if(null!==i){if(Math.abs(p)>i)return!1}else if(0!==p)return!1;return n?"start"===n?Math.abs(d)>=Math.abs(h)?d>0?s<o&&o<=u:u<=o&&o<s:h>0?l<a&&a<=c:c<=a&&a<l:"end"===n?Math.abs(d)>=Math.abs(h)?d>0?s<=o&&o<u:u<o&&o<=s:h>0?l<=a&&a<c:c<a&&a<=l:"both"===n&&(Math.abs(d)>=Math.abs(h)?d>0?s<o&&o<u:u<o&&o<s:h>0?l<a&&a<c:c<a&&a<l):Math.abs(d)>=Math.abs(h)?d>0?s<=o&&o<=u:u<=o&&o<=s:h>0?l<=a&&a<=c:c<=a&&a<=l}y(),s(fE,"booleanPointOnLine"),s(hE,"isPointOnLineSegment");var ov=fE,gE=1e-7,sv=.005;function gf(e,t){let r=bE(t);return Tr(e.features.reduce(((e,t)=>{let n=[t],{properties:i}=t,o=(i.entrances||[]).reduce(((e,t)=>(r.has(t)&&e.push(r.get(t)),e)),[]);return o.length&&(n=mE(t,o)),e.push(...n),e}),[]))}function mE(e,t){return t.reduce(((e,t)=>{let r={epsilon:gE},n=e.findIndex((e=>ov(av(t),e,r))),i=e[n];if(i){let[r,o]=yE(i,t);e.splice(n,1,r,o)}return e}),[e])}function vE(e){return null!=e&&(null!=e.polygons||null!=e.lineStrings)}function yE(e,t){let{coordinates:r}=t.geometry,{coordinates:n}=e.geometry,i=r.map((t=>uo(e,Mt(t))));return n.reduce(((t,r)=>{let n=hf(Mt(r),i[0],e),o=hf(Mt(r),i[1],e),a=$s(n)<$s(o)?n:o;return a.properties={...e.properties,entrances:[]},t.concat([a])}),[])}function uv(e){let t=new Map;for(let r in e){let n=e[r];if(!vE(n))continue;let{altitude:i,color:o,width:a,height:s,opacity:l}=n,u={altitude:i,color:o,width:a,height:s,opacity:l,type:r};(n.polygons||n.lineStrings).forEach((e=>{t.set(e,u)}))}return t}function bE(e){return new Map(e.features.map((e=>{let{properties:t}=e,{id:r}=t;return[r,e]})))}function lv(e){if(0===e.length)return;let t;for(let r of e)if("number"==typeof r.elevation){if(!t){t=r;continue}"number"==typeof t.elevation&&(t=Math.abs(r.elevation)===Math.abs(t.elevation)?r.elevation>t.elevation?r:t:Math.abs(r.elevation)<Math.abs(t.elevation)?r:t)}return t}function pv(e){let[t,r,n,i]=Xs(e);return{minLat:r,minLong:t,maxLat:i,maxLong:n}}function wE(e,t,r){let n=r.createGeoreferences(),i=new Set;t.forEach((e=>{e.layer&&i.add(e.layer)}));let o=e.id||"",a=e.externalId||o||"",s=e.elevation||0,l=[...i].map((e=>({id:e,visible:!0}))),u=1/r.mapScale;return{id:o,georeference:n,name:a,shortName:a,scene:{polygons:t},elevation:s,scale:u,x_scale:u,layers:l,width:r.widthInMapUnits,height:r.heightInMapUnits}}s(gf,"processObstructions"),s(mE,"splitObstructionByAllEntrances"),s(vE,"isPolygonStyle"),s(yE,"splitObstructionByEntrance"),s(uv,"getStylesMap"),s(bE,"getEntranceMap"),y(),y(),s(lv,"findMapWithElevationClosestToZero"),y(),s(pv,"getMapExtent"),s(wE,"convertMap");var vf=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:r,maxLat:n,maxLong:i}=e,o=(t+n)/2,a=(r+i)/2,s=new at(o,i),l=new at(o,r),u=new at(t,a),c=new at(n,a);this.latDistance=u.distanceTo(c),this.longDistance=s.distanceTo(l);let d=this.latDistance/this.longDistance,h=(n-t)/(i-r);this.stretchRatio=d/h,this.midLat=o,this.midLong=a,this.widthInMapUnits=(i-r)*this.mapUnitRatio,this.heightInMapUnits=(n-t)*this.mapUnitRatio*this.stretchRatio,this.mapScale=this.widthInMapUnits/this.longDistance}convert(e){let t=e[1],r=(e[0]-this.midLong)*this.mapUnitRatio,n=(this.midLat-t)*this.mapUnitRatio*this.stretchRatio;return{x:r+this.widthInMapUnits/2,y:n+this.heightInMapUnits/2}}createGeoreferences(){let{minLat:e,minLong:t,maxLat:r,maxLong:n}=this.mapExtent;return[[e,t],[e,n],[r,n],[r,t]].map((e=>({target:{x:e[0],y:e[1]},control:this.convert([e[1],e[0]])})))}};s(vf,"CoordinateConverter");var tu=vf;function _E(e,t){let r=[];return e.forEach(((n,i)=>{let o=n.properties.map||"",a=t.get(o);if(a){let t=a.convert(n.geometry.coordinates),s=n.properties.externalId||"",l=[];n.properties.neighbors.forEach((t=>{var r;let n=null!=(r=t.weight)?r:0,i=e.get(t.id);i&&i.properties.map===o&&l.push({node:i.properties.id,map:i.properties.map,weight:n})})),r.push({id:i,map:o,externalId:s,paths:l,...t})}})),r}function kE(e,t,r){let n=[];return e.features.forEach((e=>{let i=r.convert(e.geometry.coordinates);n.push({id:e.properties.id,x:i.x,y:i.y,map:t,paths:e.properties.neighbors.map((e=>({node:e,map:t})))})})),n}s(_E,"convertNodes"),s(kE,"convertNodes_MVFv1");var cv=s(((e,t,r,n,i,o)=>{var a,s,l;let u,c=[],d=Math.max(o.widthInMapUnits,o.heightInMapUnits)/1e3,h=i.Walls,p=null!=(a=i.ExteriorWalls)?a:h,f={map:e,id:"walls"+e,externalId:"walls"+e,layer:"Wall",isLineStringSegment:!0,geometry:{visible:!0,position:{x:0,y:0,z:((null==h?void 0:h.altitude)||0)*o.mapScale/d},scale:{x:1,y:1,z:((null==h?void 0:h.height)||1)*o.mapScale/d},width:null==h?void 0:h.width},material:{color:(null==h?void 0:h.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/d},scale:{x:1,y:1,z:((null==p?void 0:p.height)||1)*o.mapScale/d},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 a=t.features[i];if("Point"===a.geometry.type)continue;let h="desk-entrance"===(null==(s=a.properties.kind)?void 0:s.toLowerCase()),p=(h?a.properties.externalId:a.properties.id)||"",v=a.properties.externalId||"",y=r.get(p)||[];if("destinationNodes"in a.properties&&a.properties.destinationNodes.forEach((t=>{y.push({map:e,id:t})})),h)r.set(v,y);else{let r=n.get(a.properties.id),s=a.properties.center?o.convert(a.properties.center):void 0,h=a.geometry.coordinates.slice(1).map((e=>e.map((e=>o.convert(e))))),m=a.properties.kind||"",b="void"===m.toLowerCase(),_=1-(i+1)/t.features.length*sv;"LineString"===a.geometry.type&&"wall"===(null==(l=a.properties.kind)?void 0:l.toLowerCase())?(u=a.geometry.coordinates.map((e=>o.convert(e))),a.properties.footprintComponent?g.vertexes.push(u):f.vertexes.push(u)):(u=a.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==r?void 0:r.altitude)||0)*o.mapScale/d},scale:{x:1,y:1,z:((null==r?void 0:r.height)||1)*o.mapScale/d*_},width:null==r?void 0:r.width},material:{color:(null==r?void 0:r.color)||"#000000"},vertexes:u,center:s,holes:h}))}}return f.vertexes.length>0&&c.push(f),g.vertexes.length>0&&c.push(g),c}),"generateMappedinPolygons"),dv=s(((e,t,r)=>{let n=[];return t.features.forEach((t=>{if(!t.geometry.coordinates[0].forEach)return;let i=t.properties,o=t.geometry.coordinates[0].map((e=>r.convert(e))),a=t.geometry.coordinates.slice(1).map((e=>e.map((e=>r.convert(e))))),s=Math.max(r.widthInMapUnits,r.heightInMapUnits)/1e3,l=[];"entrances"in t.properties&&t.properties.entrances.forEach((e=>l.push({id:"n_"+e.id,map:e.level}))),n.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)*r.mapScale/s},scale:{x:1,y:1,z:((null==i?void 0:i.height)||1)*r.mapScale/s}},material:{color:(null==i?void 0:i.color)||"#000000"},vertexes:o,holes:a})})),n}),"generateMappedinPolygons_MVFv1");function ME(e,t,r,n,i,o,a){let s=cv(e,r,n,i,o,a),l=cv(e,t,n,i,o,a);return s.concat(l)}function xE(e,t){let r=[];return e.forEach((e=>{var n;let i;for(let r of e.nodes){let n=t.get(r);if(n)for(let t of n.properties.neighbors)if(e.nodes.includes(t.id)&&t.weight){i=t.weight;break}if(i)break}r.push({id:e.id||"",name:e.externalId||"",type:e.type||"",weight:null!=i?i:1e3,multiplier:1,nodes:e.nodes||[],accessible:null!=(n=e.accessible)&&n})})),r}function EE(e){let t=new Map;return e.features.forEach((e=>{var r,n,i,o,a,s,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 d=null!=(n=null==(r=t.get(u))?void 0:r.nodes)?n:[],h=new Set([...d,...c]);t.set(u,{id:u,name:null!=(i=e.properties.name)?i:"",type:null!=(o=e.properties.type)?o:"",weight:null!=(a=e.properties.weight)?a:1e3,multiplier:null!=(s=e.properties.multiplier)?s:1,nodes:Array.from(h),accessible:null!=(l=e.properties.accessible)&&l})})),Array.from(t.values())}function fv(e,t){var r;let n=null!=(r=t.properties.externalId)?r:"";return 0===n.length&&(n=t.properties.id),"location-".concat(e,"-").concat(n.toLowerCase().replace(" ","-"))}function hv(e,t){var r;let n=new Set;if("entrance"===e)n.add("Entrance");else if("obstruction"===e){let e=t.properties.kind;null!=e&&e.length>0&&n.add(e),t.properties.footprintComponent&&n.add("Exterior")}else if("space"===e){let e=t.properties.kind;null!=e&&e.length>0&&n.add("default"===e?"Room":e);let i=null!=(r=t.properties.tags)?r:[];if(i.length>0)for(let e of i)n.add(e)}return Array.from(n).filter((e=>e.length>0))}function gv(e){return"category-".concat(e.toLowerCase().replace(" ","-"))}function mf(e,t,r){let n=hv(e,t);for(let e of n){let t=gv(e);null==r[t]&&(r[t]={id:t,name:e})}}function mv(e){var t,r,n;return null!=(n=null==(r=null==(t=null==e?void 0:e.properties)?void 0:t.kind)?void 0:r.startsWith("connection"))&&n}function TE(e){var t;let r=null!=(t=e.properties.externalId)?t:"";return mv(e)&&0===r.length&&(r="unnamed-connection-"+e.properties.id),r}function lo(e,t,r,n){var i;if((null==t.properties.externalId||0===t.properties.externalId.length)&&!mv(t)||"obstruction"===e&&"desks"!==(null==(i=t.properties.kind)?void 0:i.toLowerCase()))return;let o=TE(t),a=fv(e,t);if(null==n[a]){let e={id:a,type:"",name:o,nodes:[],polygons:[],categories:[]};n[a]=e}if("space"===e||"obstruction"===e){let e={map:r.id,id:t.properties.id};n[a].polygons.push(e)}if("destinationNodes"in t.properties&&t.properties.destinationNodes.forEach((e=>{let t={map:r.id,node:e};n[a].nodes.push(t)})),"node"in t.properties&&t.properties.node){let e={map:r.id,node:t.properties.node};n[a].nodes.push(e)}let s=hv(e,t);for(let e of s){let t=gv(e);n[a].categories.push(t)}}function SE(e,t=new Map){var r,n,i,o,a,s,l,u,c;let d={},h={},{space:p,"map.geojson":f,entrance:g,obstruction:v}=e;for(let e of f){let f=null!=(n=null==(r=p[e.id])?void 0:r.features)?n:[],y=null!=(o=null==(i=g[e.id])?void 0:i.features)?o:[],m=null!=(s=null==(a=v[e.id])?void 0:a.features)?s:[];for(let t of f)["Polygon","Point"].includes(t.geometry.type)&&"hallway"!==(null==(l=t.properties.kind)?void 0:l.toLowerCase())&&(mf("space",t,h),lo("space",t,e,d));let b=new Map;for(let t of y)b.set(t.properties.id,t),t.properties.externalId&&(mf("entrance",t,h),lo("entrance",t,e,d));let _={type:"Feature",geometry:{type:"LineString",coordinates:[]},properties:{id:"footprintComponent",externalId:"footprintComponent",node:void 0,metadata:void 0}};lo("entrance",_,e,d);for(let r of m){if(mf("obstruction",r,h),lo("obstruction",r,e,d),r.properties.footprintComponent){let t=r.properties.entrances;for(let r of t){let t=b.get(r);t&&lo("entrance",{...t,properties:{...t.properties,externalId:_.properties.externalId}},e,d)}}if("desks"===(null==(u=r.properties.kind)?void 0:u.toLowerCase())&&r.properties.externalId.length>0){let e=null!=(c=t.get(r.properties.id))?c:[];for(let t of e){let e=fv("obstruction",r);null!=d[e]&&d[e].nodes.push({map:t.map,node:t.id})}}}}return{locations:Object.values(d),categories:Object.values(h)}}function vv(e){var t,r,n,i,o,a,s,l,u,c;let d=null!=(t=e.obstruction)?t:[],h=null!=(r=e.space)?r:[],p=null!=(n=e.entrance)?n:[],f=null!=(i=e["mapstack.geojson"])?i:[],g=null!=(o=e["map.geojson"])?o:[],v=null!=(a=e["styles.json"])?a:{},y=null!=(s=e["manifest.geojson"])?s:{},m=null!=(l=e["node.geojson"])?l:{},b=null!=(u=e["connection.json"])?u:[],_={},w=new Map,M=[],x=uv(v),E=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=gf(d[e],p[e]);if(t.features.length){let r=pv(t),n=new tu(r);w.set(e,n),_[e]=ME(e,t,h[e],E,x,v,n),M.push(wE(S.get(e),_[e],n))}}))})),M.sort(((e,t)=>"number"==typeof e.elevation&&"number"==typeof t.elevation?e.elevation-t.elevation:0));let I=new Map;"features"in m&&m.features.forEach((e=>{let t=e.properties.id;t&&!I.has(t)&&I.set(t,e)}));let k=Object.values(_).flat(),C=xE(b,I),O=_E(I,w),T=y.features[0],A=T.properties.name,P=T.geometry.coordinates[0],F=T.geometry.coordinates[1],j=(null==(c=lv(M))?void 0:c.id)||"",{locations:L,categories:N}=SE(e,E);return{polygons:k,venue:{name:A,latitude:F,longitude:P,defaultMap:j},maps:M,vortexes:C,nodes:O,locations:L,mapGroups:[],locationStates:[],categories:N,themes:[],imageBinaries:new Map}}function yv(e){var t,r,n,i,o,a,s;let l=null!=(t=e.obstruction)?t:{},u=null!=(r=e.space)?r:{},c=null!=(n=e.node)?n:{},d=null!=(i=e.level)?i:{},h=null!=(o=e["manifest.geojson"])?o:{},p=null!=(a=e.connection)?a:{},f={},g=new Map,v=[],y=[],m=[];Object.keys(d).forEach((e=>{let t=gf(l[e],{type:"FeatureCollection",features:[]});if(t.features.length){let r=pv(t),n=new tu(r);g.set(e,n);let i=dv(e,u[e],n),o=dv(e,t,n);f[e]=i.concat(o),y=y.concat(kE(c[e],e,n)),v.push(OE(d[e],f[e],n))}m=m.concat(EE(p[e]))}));let b=Object.values(f).flat(),_=h.features[0],w=_.properties.name,M=_.geometry.coordinates[0],x=_.geometry.coordinates[1],E=(null==(s=v[0])?void 0:s.id)||"",S=new Map;b.forEach((e=>S.set(e.id,e)));let I=[],k=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}))))})),I=e}}return{...e.properties,nodes:I,polygons:e.properties.spaces}})),C=e["category.geojson"].features.map((e=>e.properties));return{polygons:b,venue:{name:w,latitude:x,longitude:M,defaultMap:E},maps:v,vortexes:m,nodes:y,locations:k,mapGroups:[],locationStates:[],categories:C,themes:[],imageBinaries:new Map}}function OE(e,t,r){let n=r.createGeoreferences(),i=new Set,o=e.features[0].properties;t.forEach((e=>{e.layer&&i.add(e.layer)}));let a=[...i].map((e=>({id:e,visible:!0}))),s=1/r.mapScale;return{id:o.id,georeference:n,name:o.name,shortName:o.abbreviation||o.name,scene:{polygons:t},elevation:o.elevation,scale:s,x_scale:s,layers:a,width:r.widthInMapUnits,height:r.heightInMapUnits}}s(ME,"convertPolygons"),s(xE,"convertVortexes"),s(EE,"convertVortexes_MVFv1"),s(fv,"getLocationId"),s(hv,"getFeatureCategories"),s(gv,"getCategoryIdFromName"),s(mf,"mutateCategoriesWithNewFeature"),s(mv,"isFeatureConnection"),s(TE,"getLocationLabel"),s(lo,"mutateLocationsWithNewFeature"),s(SE,"createMetaDataFromMVF"),s(vv,"convertMVFToMappedin"),s(yv,"convertMVFv1ToMappedin"),s(OE,"convertMap_MVFv1"),y();var Dv,co,oi,si,po,ui,li,ci,tr,di,pi,fi,fo,hi,Sr,zv=an(Rv()),DE=null==(Dv=null==R?void 0:R.env)?void 0:Dv.npm_package_version,nu=["websdk","web","webv2","kiosk-v2","mobile","iossdk","androidsdk","reactnativesdk"],wf=nu[0],zE=!1,rn=class e{constructor(e){var t;G(this,co,void 0),G(this,oi,void 0),G(this,si,void 0),G(this,po,void 0),G(this,ui,void 0),G(this,li,void 0),G(this,ci,void 0),G(this,tr,void 0),G(this,di,void 0),G(this,pi,void 0),G(this,fi,void 0),G(this,fo,void 0),G(this,hi,void 0),G(this,Sr,void 0),H(this,tr,e.clientId),H(this,di,e.clientSecret),H(this,pi,e.accessToken),H(this,ci,e.noAuth||!1);let r="https://api-gateway.mappedin.com/track-analytics/a/";!m(this,ci)&&m(this,tr)&&!Ws(m(this,tr))&&(r="https://web-proxy.mappedin.com/a/"),H(this,si,r),H(this,si,m(this,si)+(e.venue+"/")),H(this,hi,e.venue),H(this,oi,!1),H(this,co,"boolean"==typeof e.testMode?e.testMode:"true"===(null==(t=e.testMode)?void 0:t.toLowerCase())),H(this,po,nu.find((t=>t===e.context))||nu[0]),H(this,ui,zs()),H(this,li,Bs()),H(this,fi,new Set),H(this,fo,e.platformString||""),this.locationSelected=this.locationSelected.bind(this),this.categorySelected=this.categorySelected.bind(this),this.getDirections=ri(this.getDirections.bind(this),2500)}static create(t){return e.instance||(e.instance=new e(t)),e.instance}track(e,t){let r={...t,g:m(this,oi)};m(this,Sr)&&(r={...r,...m(this,Sr)});let n=m(this,si)+e+"?"+zv.default.stringify(r,{skipEmptyString:!0,skipNull:!0});if(zE&&ae.log("Analytics.track",n),m(this,co))return;let i={"mi-context":wf||m(this,po),"mi-session":m(this,li),"mi-device":m(this,ui),"mappedin-sdk-version":DE,"mappedin-platform-version":m(this,fo)};m(this,pi)?i.Authorization="Bearer ".concat(m(this,pi)):m(this,ci)||m(this,di)&&m(this,tr)&&(i["x-mappedin-key"]=btoa(m(this,tr)),i["x-mappedin-secret"]=btoa(m(this,di))),An()(n,{method:"GET",mode:"cors",headers:i})}updateAnalyticsUserPosition(e){H(this,Sr,e?{...e,bluedotTimestamp:Date.now()}:void 0)}locationSelected(e){let t=e.id||e;tt.addPendingEvent(new $i({venue:m(this,hi)})),this.track("select-location",{id:t})}categorySelected(e){let t=e.id||e;tt.addPendingEvent(new Xi({venue:m(this,hi)})),this.track("select-category",{id:t})}mapViewLoaded(e,t,r,n){this.track("load-mapview",{type:e,force:t,benchmark:r||-1,reason:n||"success"})}getDirections(e,t){let r={start:e.id,end:t.id,type:"location_to_location"};this.track("query-directions",r)}getSessionID(){return m(this,li)}getDeviceID(){return m(this,ui)}setGeolocationMode(e){H(this,oi,e)}trackBlueDotEvent(t){t&&Object.values(e.BLUEDOT_EVENT).includes(t)&&!m(this,fi).has(t)&&(this.track(t),m(this,fi).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=nu.find((t=>t===e));t&&(wf=t)}static clearContext(){wf=void 0}static destroy(){e.instance=null}};co=new WeakMap,oi=new WeakMap,si=new WeakMap,po=new WeakMap,ui=new WeakMap,li=new WeakMap,ci=new WeakMap,tr=new WeakMap,di=new WeakMap,pi=new WeakMap,fi=new WeakMap,fo=new WeakMap,hi=new WeakMap,Sr=new WeakMap,s(rn,"Analytics"),g(rn,"instance",null),g(rn,"BLUEDOT_EVENT",{ATTEMPT_BLUEDOT:"attempt-bluedot",FOUND_POSITION:"found-position",FOUND_FLOOR:"found-floor"});var _f=rn,ho=_f;y();var kf=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 r=this._subscribers[e].indexOf(t);-1!==r&&this._subscribers[e].splice(r,1)}destroy(){this._subscribers={}}};s(kf,"PubSub");var nr,gi,Or,mi,go,Mf,iu,qv,ru=kf,Vv={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",venue:""},xf=class extends ru{constructor(e){super(),G(this,go),G(this,iu),g(this,"perspective"),g(this,"things"),g(this,"options"),G(this,nr,void 0),G(this,gi,""),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"),G(this,Or,{}),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"),G(this,mi,void 0),g(this,"images"),g(this,"imageBinaries"),g(this,"scenes"),g(this,"analytics"),g(this,"navigator"),this.options=e,H(this,nr,bt.create(this));let t=ho.create({...e,testMode:!(null!=e&&e.emitAnalyticsEvents)});this.analytics={locationSelected:t.locationSelected,categorySelected:t.categorySelected,getDirections:t.getDirections},globalThis.MappedinDebug||(globalThis.MappedinDebug={enable(){globalThis.sessionStorage.setItem(Gf,"true")}})}generateGetters(e){try{for(let t=0,r=e.length;t<r;++t){let r=e[t];Array.isArray(this[r])&&(Object.defineProperty(this,"_".concat(r,"ByExternalId"),{configurable:!0,get(){let e=m(this,nr)[r];if(null!=e)return e;let t={};return this[r].forEach((e=>t[e.externalId]=e)),m(this,nr)[r]=t,t}}),Object.defineProperty(this,"_".concat(r,"ById"),{configurable:!0,get(){let e=m(this,nr)[r];if(null!=e)return e;let t={};return this[r].forEach((e=>t[e.id]=e)),m(this,nr)[r]=t,t}}))}return this}catch(e){throw new Error("Unable to generate getters, "+e)}}getCollectionItemById(e,t){let r="_".concat(e,"ById"),n="_".concat(e,"ByExternalId"),i=this[r];return null!=i&&null!=i[t]||(i=this[n],null!=i&&null!=i[t])?i[t]:null}async hydrateFromMVF(e){let t=vv(e);return this.hydrate(t)}async hydrateFromMVFv1(e){let t=yv(e);return this.hydrate(t)}async changeLanguage(e,t=!0){var r;let n=e.toLowerCase();if(this.currentLanguage.code.toLowerCase()!==n){if(null==(r=this.venue.languages)||!r.find((e=>e.code.toLowerCase()===n)))return void ae.error("Language ".concat(n," not found in venue ").concat(this.venue.slug));if(t&&!m(this,Or)[this.currentLanguage.code]&&(m(this,Or)[this.currentLanguage.code]=JSON.stringify(this.toJSON())),this.currentLanguage=this.venue.languages.find((e=>e.code.toLowerCase()===n)),null!=m(this,Or)[n]){let e=JSON.parse(m(this,Or)[n]);await this.hydrate(e,!1,!0)}else this.options.language=this.currentLanguage.code,await this.fetch(!0);this.publish(0,this.currentLanguage)}}async hydrate(e,t=!1,r=!1){let n;if("string"==typeof e)try{H(this,gi,e),n=JSON.parse(e)}catch(e){return void ae.error("Unable to parse JSON",e)}else n=e,H(this,gi,JSON.stringify(n));let i=Object.keys(n);for(let e=0,t=i.length;e<t;++e){let t=i[e],o=n[t],a=Ys[t];null!=a&&"function"==typeof a.hydrate&&(r?"updateInPlace"in a&&"function"==typeof a.updateInPlace&&a.updateInPlace(this,o):this[t]=a.hydrate(o,this))}t&&await Em(n);let{images:o,scenes:a,imageBinaries:s}=n;this.images=o,this.scenes=a,this.imageBinaries=s,r||this.generateGetters(i),Ke(this,go,Mf).call(this),this.initNavigator()}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"]),Ws(this.options.clientId)||this.options.things.rankings&&delete this.options.things.rankings;let{things:t}=this.options,r=[],n=Object.keys(t);for(let t=0,i=n.length;t<i;++t){let i=n[t],o=Ys[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()))),r.push(t)}}return r.push($r(this.options,"cdn-access-token",{venue:this.options.venue},!1).then((e=>H(this,mi,e.token)),(()=>Promise.resolve()))),e||this.generateGetters(n),Promise.all(r).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,Ke(this,go,Mf).call(this),this.initNavigator()}))}initNavigator(){this.navigator=new Pu({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()))})}toJSON(){var e;let t={};for(let e in Ys)Array.isArray(this[e])&&(t[e]=this[e].map((e=>e.toJSON())));let r={...t,venue:this.venue.toJSON()};return null!=this.rankings&&(r.rankings=null==(e=this.rankings)?void 0:e.toJSON()),delete r.locationRankings,r}toString(){return m(this,gi)||JSON.stringify(this.toJSON())}};nr=new WeakMap,gi=new WeakMap,Or=new WeakMap,mi=new WeakMap,go=new WeakSet,Mf=s((function(){m(this,mi)&&this.maps.forEach((e=>{var t;null!=(t=e.scene)&&t.polygons&&(e.scene.polygons+="?".concat(m(this,mi)))})),Ke(this,iu,qv).call(this)}),"#transformData"),iu=new WeakSet,qv=s((function(){let e=this.categories.filter((e=>e.sortOrder)).map((e=>e.sortOrder));if(e.length<=0)return;let t=Math.min(...e),r=Math.max(...e);this.polygons.forEach((e=>{var n,i;let o=Sm(e,this);if(o){let a=o.categories.filter((e=>e.sortOrder)).map((e=>e.sortOrder));if(a.length>0){let o=Math.min(...a);e.categoryRank=Tm(o,t,r,null!=(i=null==(n=e.rank)?void 0:n.score)?i:0)}}}))}),"#applyCategoryRankToPolygons"),s(xf,"Mappedin");var Ln=xf;y();var Pr=an(Uv());y();var BE=["0","1","2","3","4","5","6","7","8","9"],VE=["۱","۲","۳","۴","۵","۶","۷","۸","۹","۰"],qE=["0","1","2","3","4","5","6","7","8","9"],UE=["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],mF=[...BE,...VE,...qE,...UE],Gv=["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"];y();var GE=32,It=!1,WE=120,Sf=0,Pf=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,It&&ae.log("update instantiated",this.name)}getLastFrameTime(){return this._lastFrameTime}};s(Pf,"FrameUpdate");var au=Pf,If=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,It&&ae.log("task instantiated",this.name)}isComplete(){return this._complete}getLastFrameTime(){return this._lastFrameTime}};s(If,"FrameTask");var Dn=If,Af=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,It&&ae.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(Af,"FrameTaskGroup");var ou=Af,Cf=class{constructor(e){g(this,"_maxMillisecondsPerFrame"),g(this,"_time"),this._maxMillisecondsPerFrame=null!=(null==e?void 0:e.maxMillisecondsPerFrame)?e.maxMillisecondsPerFrame:GE,this._time=0}beginFrame(){this._time=performance.now()+this._maxMillisecondsPerFrame}hasTimeRemaining(){return performance.now()<=this._time}};s(Cf,"RealTimeTimer");var Of=Cf,jf=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 Of,this._performance=null!=(null==e?void 0:e.performance)&&e.performance,this._scheduledUpdatesByOrdering=new vi,this._scheduledTasksByPriority=new vi,this._postponedTasks=new Set,this._requestAnimationFrameHandle=null,this._updatesToRunThisFrame=[],this._lastFrameTime=0,this._updatesRunLastFrame=new Set,this.update=this.update.bind(this),It&&ae.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 vi,this._scheduledTasksByPriority=new vi,this._postponedTasks=new Set,this._lastFrameTime=0,this._updatesRunLastFrame.clear(),It&&ae.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 r;this._timer.beginFrame(),this._performance&&(r=performance.now());let n=!1;It&&(0===Sf&&(n=!0),++Sf,Sf%=WE);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),n&&ae.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,n&&ae.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 r;this._performance&&(r=performance.now()),t._callback(e),this._performance&&(t._lastFrameTime=performance.now()-r),n&&ae.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()-r),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,r=this._scheduledTasksByPriority.popFromMaxKey(),n=null;ae.assert(void 0!==r),Object.getPrototypeOf(r)===ou.prototype&&(n=r,r=n._popTask()),ae.assert(void 0!==r),ae.assert(Object.getPrototypeOf(r)===Dn.prototype),this._performance&&(t=performance.now()),r._callback(e),r._complete=!0,this._performance&&(r._lastFrameTime=performance.now()-t),It&&ae.log("task completed",r.name),null!=n&&(n.isComplete()?(n.clear(),n._onComplete(),It&&ae.log("group completed",n.name)):this._scheduledTasksByPriority.insert(n._priority,n))}scheduleUpdate(e){e._remainingFrameCount=e._frameCount,this._scheduledUpdatesByOrdering.insert(e._ordering,e),this.requestAnimationFrame()}scheduleTask(e){if(Object.getPrototypeOf(e)===ou)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,It&&ae.log("task scheduled",e.name),this.requestAnimationFrame()}cancelUpdate(e){this._scheduledUpdatesByOrdering.delete(e._ordering,e),It&&ae.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)===Dn.prototype?e._cancelled=!0:"clear"in e&&e.clear(),It&&ae.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)===Dn.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)===Dn.prototype||!e.isComplete())&&this._postponedTasks.add(e),e._postponed=!0,It&&ae.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)===Dn.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)===Dn.prototype||!e.isComplete())&&this._scheduledTasksByPriority.insert(e._priority,e),e._postponed=!1,this.requestAnimationFrame(),It&&ae.log("task resumed",e.name)}}setTaskPriority(e,t){if(Object.getPrototypeOf(e)===Dn.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,It&&ae.log("task priority changed",e.name,t)}};s(jf,"TaskScheduler");var su=jf,Nf=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(ae.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,r={[Symbol.iterator]:()=>r,next:()=>{if(null==t){let r=e.next();if(r.done)return r;t=this._map.get(r.value).values()}let r=t.next();for(;r.done;){let n=e.next();if(n.done)return n;t=this._map.get(n.value).values(),r=t.next()}return r}};return r}keys(){return this._sortedKeys}get size(){let e=0;for(let t of this._map.values())e+=t.size;return ae.assert(e===this._size),e}};s(Nf,"Multimap");var vi=Nf,zn=s((e=>e.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()),"removeAccents"),YE=/([!-/:-@])|(?:[\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 HE(e){return e.split(YE).filter(Boolean)}s(HE,"tokenizeAndCaptureDelimiters");var Bn,Yt,rr,wn,it,vo,yo,bi,bo,wo,_o,ko,wi,Vn,uu,lu,ir,Mo,cu,du,pu,Yv,yi="",XE=.09,$E=1,KE=.025,JE=.5,QE=5e-4,ZE=5e-4,eT=.01,tT=.05,Wv=1,nT=.01,rT=.2,iT={MappedinCategory:"categories",MappedinLocation:"locations"},aT={searchDescriptions:!0,searchTags:!0,searchTagsInCategories:!1,searchDescriptionsInCategories:!1,stopWords:Gv,jsonIndex:void 0,useLocationRank:!0,emitAnalyticsEvents:"production"===R.env.NODE_ENV,constants:{PRIMARY_INDEX_FUZZYNESS:XE,PRIMARY_INDEX_WEIGHT:$E,SECONDARY_INDEX_WEIGHT:KE,CATEGORY_NAME_WEIGHT:JE,LOCATION_NAME_WEIGHT:Wv,CATEGORY_LOCATION_DESCRIPTION_WEIGHT:QE,CATEGORY_LOCATION_TAGS_WEIGHT:ZE,CATEGORY_LOCATION_NAME_WEIGHT:eT,PRIMARY_INDEX_TAGS_NAME_WEIGHT:tT,LOCATION_DEFAULT_RANK:Wv,RATIO_OF_FUZZY_TO_EXACT:nT,RATIO_OF_PREFIX_TO_EXACT:rT}},Lf=class{constructor(e,t){var r;G(this,pu),G(this,Bn,void 0),G(this,Yt,void 0),G(this,rr,void 0),G(this,wn,void 0),G(this,it,void 0),G(this,vo,new su({performance:!0})),G(this,yo,void 0),G(this,bi,void 0),G(this,bo,new Map),G(this,wo,void 0),G(this,_o,void 0),G(this,ko,void 0),g(this,"buildIndices",s((()=>{var e,t;H(this,ir,new Promise((e=>{H(this,Mo,e)})));let{PRIMARY_INDEX_FUZZYNESS:r,PRIMARY_INDEX_WEIGHT:n,CATEGORY_NAME_WEIGHT:i,RATIO_OF_FUZZY_TO_EXACT:o,RATIO_OF_PREFIX_TO_EXACT:a,PRIMARY_INDEX_TAGS_NAME_WEIGHT:s}=m(this,it).constants,l=["object","query","weight","tag","rank"],u={fields:["query","name","tag"],storeFields:l,searchOptions:{combineWith:"OR",prefix:!0,fuzzy:r},boost:{name:n,query:n,tag:s},weights:{fuzzy:o,prefix:a},boostDocument:e=>e.includes("MappedinLocation")?n:e.includes("MappedinCategory")?i:n,tokenize:HE},c={fields:["description"],storeFields:l,searchOptions:{combineWith:"AND",prefix:!0,fuzzy:.1},processTerm:(e,t)=>{var r;return null!=(r=m(this,yo))&&r.has(e.toLowerCase())?null:e.toLowerCase()}},d={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=m(this,it))&&e.jsonIndex){let{primary:e,secondary:r,extra:n}=JSON.parse(null==(t=m(this,it))?void 0:t.jsonIndex);H(this,Yt,Pr.default.loadJS(e,u)),H(this,rr,Pr.default.loadJS(r,c)),H(this,wn,Pr.default.loadJS(n,d))}else H(this,Yt,new Pr.default(u)),H(this,rr,new Pr.default(c)),H(this,wn,new Pr.default(d)),m(this,Bn).locations.forEach(m(this,uu)),m(this,Bn).categories.forEach(m(this,lu));m(this,vo).update(performance.now())}),"buildIndices")),G(this,wi,0),G(this,Vn,s((e=>{yu(this,wi)._++,m(this,vo).scheduleUpdate(new au({name:"updateIndex",ordering:0,frameCount:1,callback:()=>{e(),yu(this,wi)._--,0===m(this,wi)&&m(this,Mo).call(this)}}))}),"#addTask")),G(this,uu,s((e=>{var t,r,n;let{SECONDARY_INDEX_WEIGHT:i,LOCATION_DEFAULT_RANK:o,PRIMARY_INDEX_TAGS_NAME_WEIGHT:a}=m(this,it).constants,s=o;null!=(t=m(this,it))&&t.useLocationRank&&(s=Array.isArray(e.polygons)?Math.max(...e.polygons.map((e=>{var t,r;return null!=(t=e.rank)&&t.score?null==(r=e.rank)?void 0:r.score:o})),o):o),m(this,Vn).call(this,(()=>{m(this,Yt).add({name:zn(e.name),tags:"",id:"MappedinLocation_"+e.id,weight:o,rank:s})})),null!=(r=m(this,it))&&r.searchTags&&Array.isArray(e.tags)&&e.tags.forEach((t=>{m(this,Yt).add({name:"",tag:zn(t),id:"MappedinLocation_"+e.id,weight:a,rank:s})})),null!=(n=m(this,it))&&n.searchDescriptions&&m(this,Vn).call(this,(()=>m(this,rr).add({description:zn(e.description||""),id:"MappedinLocation_"+e.id,weight:i,rank:s})))}),"#processLocation")),G(this,lu,s((e=>{var t,r;let{CATEGORY_LOCATION_DESCRIPTION_WEIGHT:n,CATEGORY_LOCATION_TAGS_WEIGHT:i,CATEGORY_LOCATION_NAME_WEIGHT:o,CATEGORY_NAME_WEIGHT:a}=m(this,it).constants;m(this,Vn).call(this,(()=>m(this,Yt).add({name:zn(e.name||""),description:"",id:"MappedinCategory_"+e.id,weight:a})));let s=e.locations.reduce(((e,t)=>e+" ".concat(yi," ")+t.name),"")+" ".concat(yi);if(null!=(t=m(this,it))&&t.searchDescriptionsInCategories&&e.locations.forEach((t=>{null!=t.description&&m(this,Vn).call(this,(()=>m(this,wn).add({id:"MappedinCategory_"+e.id,"category.locations.description":zn(t.description),ref:t.name,weight:n})))})),null!=(r=m(this,it))&&r.searchTagsInCategories){let t=e.locations.reduce(((e,t)=>{var r;return e+(null==(r=t.tags)?void 0:r.reduce(((e,t)=>e+" ".concat(yi," ")+t),""))+" ".concat(yi)}),"");m(this,Vn).call(this,(()=>m(this,wn).add({"category.locations.tags":zn(t),id:"MappedinCategory_"+e.id,weight:i})))}m(this,Vn).call(this,(()=>m(this,wn).add({"category.locations.name":zn(s),id:"MappedinCategory_"+e.id,weight:o})))}),"#processCategory")),G(this,ir,void 0),G(this,Mo,void 0),G(this,cu,s((e=>{var t;let r=e.score,{object:n,id:i,weight:o,rank:a}=e,[s,l]=i.split("_"),u=n||m(this,Bn).getCollectionItemById(iT[s],l);return a&&null!=(t=m(this,it))&&t.useLocationRank&&(r+=a),o&&(r*=o),{score:r,type:s,object:u}}),"#processSearchResult")),G(this,du,s(((e,t)=>{for(let r in e.match)e.match[r].forEach((n=>{let i=e.ref||e[n]||t.object[n];if("category.locations.tags"===n||"category.locations.name"===n){let t=new RegExp("[^".concat(yi,"]* ")+r+" [^".concat(yi,"]*"),"ig").exec(e[n]);null!=t&&(i=t[0].slice(1,-1))}t.matches.push({term:r,weight:e.weight,matchesOn:n,value:i})}))}),"#addMatches")),H(this,bi,ho.create({...e.options,testMode:!1===(null==t?void 0:t.emitAnalyticsEvents)})),H(this,it,{...aT,...t}),H(this,Bn,e),H(this,yo,new Set(null==(r=m(this,it))?void 0:r.stopWords));let n=m(this,Bn).venue.slug;m(this,Bn).on(0,this.buildIndices),this.buildIndices(),H(this,wo,ri((e=>{m(this,bi).trackSearchSuggest({query:e}),tt.addPendingEvent(new ua({venue:n}))}),300)),H(this,_o,ri((e=>{m(this,bi).trackSearch({query:e}),tt.addPendingEvent(new sa({venue:n}))}),300)),H(this,ko,ri((()=>{tt.addPendingEvent(new aa({venue:n}))}),300)),tt.addPendingEvent(new oa({search_descriptions:m(this,it).searchDescriptions,search_tags:m(this,it).searchTags,search_descriptions_in_categories:m(this,it).searchDescriptionsInCategories,search_tags_in_categories:m(this,it).searchTagsInCategories,use_location_rank:m(this,it).useLocationRank,venue:n}))}async suggest(e){await m(this,ir);let{PRIMARY_INDEX_FUZZYNESS:t,PRIMARY_INDEX_WEIGHT:r,PRIMARY_INDEX_TAGS_NAME_WEIGHT:n,RATIO_OF_FUZZY_TO_EXACT:i,RATIO_OF_PREFIX_TO_EXACT:o}=m(this,it).constants,a=m(this,Yt).autoSuggest(e,{fields:["name","tag","query"],combineWith:"AND",prefix:!0,fuzzy:t,boost:{name:r,query:r,tag:n},weights:{fuzzy:i,prefix:o}});return m(this,wo).call(this,e),{total:a.length,hits:a.map((e=>({text:e.suggestion})))}}async search(e){await m(this,ir);let t=Ke(this,pu,Yv).call(this,e);return m(this,_o).call(this,e),t}async toJSON(){return await m(this,ir),JSON.stringify({primary:m(this,Yt),secondary:m(this,rr),extra:m(this,wn)})}async addQuery(e){let t,r,{query:n,object:i,weight:o=1}=e;await m(this,ir),t=i instanceof Cn?"MappedinLocation":i instanceof Mr?"MappedinCategory":"Custom","MappedinLocation"===t||"MappedinCategory"===t?r=t+"_"+i.id:"string"==typeof i.id?r="Custom_"+i.id:(r=m(this,bo).get(i),r||(r="Custom_"+Nn(),m(this,bo).set(i,r))),m(this,Yt).add({id:r,weight:o,object:i,query:zn(n)}),m(this,ko).call(this)}};Bn=new WeakMap,Yt=new WeakMap,rr=new WeakMap,wn=new WeakMap,it=new WeakMap,vo=new WeakMap,yo=new WeakMap,bi=new WeakMap,bo=new WeakMap,wo=new WeakMap,_o=new WeakMap,ko=new WeakMap,wi=new WeakMap,Vn=new WeakMap,uu=new WeakMap,lu=new WeakMap,ir=new WeakMap,Mo=new WeakMap,cu=new WeakMap,du=new WeakMap,pu=new WeakSet,Yv=s((function(e){let t=[],r=zn(e);t=[...m(this,Yt).search(r),...m(this,rr).search(r),...m(this,wn).search(r)].sort(((e,t)=>t.score-e.score));let n={};for(let e of t){let t=m(this,cu).call(this,e);n[e.id]?n[e.id].score+=t.score:n[e.id]={...t,matches:[]},m(this,du).call(this,e,n[e.id])}return Object.keys(n).map((e=>({...n[e],matches:n[e].matches.sort(((e,t)=>t.weight-e.weight))}))).sort(((e,t)=>t.score-e.score))}),"#doSearch"),s(Lf,"OfflineSearch");var mo=Lf;y();var Ff=globalThis.fetch;function An(){if(null==Ff)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return Ff}function $v(e){Ff=e}s(An,"isomorphicFetch"),s($v,"setFetchFn");var Hv,oT=null==(Hv=null==R?void 0:R.env)?void 0:Hv.npm_package_version;globalThis.btoa||(globalThis.btoa=Xv.encode);var sT=["ar"];function Rf(e){var t;let r={...Vv,...e};return r.headers={...r.headers,"mappedin-sdk-version":oT},r.things=Om("things"in e?e.things:void 0),"platformString"in e&&(r.headers={...r.headers,"mappedin-platform-version":e.platformString}),r.noAuth||(r.accessToken?r.authorization="Bearer ".concat(r.accessToken):r.clientId&&r.clientSecret&&(r.authorization="Basic ".concat(globalThis.btoa("".concat(r.clientId,":").concat(r.clientSecret))))),r.language=null==(t=r.language)?void 0:t.toLowerCase(),r}async function Df(e){let t={emitAnalyticsEvents:!0,secure:!0,...e},r=Rf({baseUrl:"https://api-gateway.mappedin.com/",...t}),n="public/1/".concat(r.useDraftData?"draft/":""),i=new Ln({...r,baseUrl:r.baseUrl+n});return await i.fetch(),t.emitAnalyticsEvents,tt.addPendingEvent(new Ki({venue:r.venue})),i}s(Rf,"parseOptions"),s(Df,"getVenue");var Kv={shouldPopulateBundledImagesAsBlobs:!(typeof globalThis.navigator<"u"&&"ReactNative"==globalThis.navigator.product)};async function zf(e){let t=Rf({baseUrl:"https://api-gateway.mappedin.com/",...Kv,...e}),{url:r,updated_at:n}=await uT(e),i=await An()(r,{mode:"cors"}),{data:o,format:a="jsonstring"}=await i.json();if("jsonstring"!==a)throw new Error("Unrecognized format ".concat(a));let s=new Ln(t);return await s.hydrate(o,t.shouldPopulateBundledImagesAsBlobs),s.updatedAt=n,s}async function uT(e){let t=Rf({baseUrl:"https://api-gateway.mappedin.com/",...Kv,...e}),{version:r,venue:n}=e,i="".concat(e.bundleBaseUri||t.baseUrl+"exports/legacy".concat(null!=t.language&&sT.includes(t.language)?"-"+t.language:"","/1/bundle"),"?venue=").concat(n,"&version=1.0.0");return t.language=void 0,await Fp(t,i)}s(zf,"getVenueBundle"),s(uT,"getVenueBundleURL");var lT=!1;function cT(e){e.things=e.things||{},e.things.venue=e.things.venue||[],e.things.venue.push("slug","defaultMap"),e.things.nodes=e.things.nodes||[],e.things.nodes.push("x","y","paths","map"),e.things.polygons=e.things.polygons||[],e.things.locations=e.things.locations||[],e.things.locations.push("sortOrder","parent","showLabelWhenImagePresent","hidden"),e.things.maps=e.things.maps||[],e.things.maps.push("height","width","georeference"),e.perspective=e.perspective3D||e.perspective||void 0,e.things.maps.push("scene","layers"),e.things.polygons.push("canvasBounds","map","image","perspectives","material","holes","label","geometry"),lT&&e.things.polygons.push("layer","geometry","vertexes")}s(cT,"parseOptions");var dT=s((function(e){return null==e.mapView&&(e.mapView={}),new Promise((function(t,r){function n(n,i){if(n)r(n);else{let n={};try{e.firstMapSelector&&(e.mapView=e.mapView||{},e.mapView.firstMap=e.firstMapSelector(i))}catch(e){ae.error("Failure in firstMapSelector! Loading default map instead."),ae.error(e),r(e)}n.venue=i,t(n)}}s(n,"handleInit"),cT(e.venue),e.venue.useVenueBundle?zf(e.venue).then((e=>n(null,e))).catch((e=>n(e,null))):Df(e.venue).then((e=>n(null,e))).catch((e=>n(e,null)))}))}),"initialize");