@local-logic/sdks-app 1.0.0 → 1.2.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/dist/assets/{auto-track-legacy.a46e361b.js → auto-track-legacy.5a15cc10.js} +1 -1
- package/dist/assets/{auto-track.bcea5d95.js → auto-track.9c4c37f2.js} +1 -1
- package/dist/assets/{index-legacy.770cfe03.js → index-legacy.2dafcab0.js} +1 -1
- package/dist/assets/index-legacy.33e7763b.js +1 -0
- package/dist/assets/{index-legacy.ea25d2c0.js → index-legacy.3e15a23a.js} +1 -1
- package/dist/assets/{index-legacy.98ea5567.js → index-legacy.64d191bf.js} +12 -12
- package/dist/assets/{index-legacy.ded6c0c3.js → index-legacy.8c8f66b9.js} +1 -1
- package/dist/assets/{index-legacy.9eb391ce.js → index-legacy.b1b7c758.js} +1 -1
- package/dist/assets/{index-legacy.b7a4faaa.js → index-legacy.bfac1b45.js} +1 -1
- package/dist/assets/{index-legacy.fe28c497.js → index-legacy.f168d7a1.js} +1 -1
- package/dist/assets/{index-legacy.5bcad02a.js → index-legacy.f70a489f.js} +1 -1
- package/dist/assets/{index-legacy.0be73293.js → index-legacy.fe45c685.js} +1 -1
- package/dist/assets/{index.9c4a9ff4.js → index.2fa91f65.js} +1 -1
- package/dist/assets/{index.3f198d2d.js → index.7c5ff2a7.js} +39 -39
- package/dist/assets/{index.16564d34.js → index.913d55c2.js} +1 -1
- package/dist/assets/{index.520a122e.js → index.a59f31e1.js} +16 -19
- package/dist/assets/{index.939781f4.js → index.a62f0f16.js} +1 -1
- package/dist/assets/{index.499b0146.js → index.ab13cdc9.js} +1 -1
- package/dist/assets/{index.9c512de3.js → index.b571c2ea.js} +1 -1
- package/dist/assets/{index.0ad6c4c5.js → index.e16053c4.js} +1 -1
- package/dist/assets/index.e267d77a.js +1 -0
- package/dist/assets/{index.a930ac3c.js → index.eedc8298.js} +1 -1
- package/dist/assets/{index.umd-legacy.97cfaf3e.js → index.umd-legacy.313ecd9d.js} +1 -1
- package/dist/assets/{index.umd.fababc47.js → index.umd.4df6dfc8.js} +1 -1
- package/dist/index.html +2 -2
- package/dist/types/components/Search/index.d.ts.map +1 -1
- package/dist/types/components/Search/index.js +13 -5
- package/dist/types/components/Search/index.js.map +1 -1
- package/dist/types/components/Search/useSuggestions.d.ts +1 -1
- package/dist/types/components/Search/useSuggestions.d.ts.map +1 -1
- package/dist/types/components/Search/useSuggestions.js +2 -1
- package/dist/types/components/Search/useSuggestions.js.map +1 -1
- package/dist/types/constants/tracking.d.ts +2 -3
- package/dist/types/constants/tracking.d.ts.map +1 -1
- package/dist/types/constants/tracking.js +2 -3
- package/dist/types/constants/tracking.js.map +1 -1
- package/dist/types/features/suggestions/types.d.ts +4 -1
- package/dist/types/features/suggestions/types.d.ts.map +1 -1
- package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/index.d.ts.map +1 -1
- package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/index.js +16 -4
- package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/index.js.map +1 -1
- package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/styles.d.ts +1 -1
- package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/styles.d.ts.map +1 -1
- package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/styles.js +1 -4
- package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/styles.js.map +1 -1
- package/dist/types/sdks/LocalContent/Map/CommuteContainer/index.d.ts.map +1 -1
- package/dist/types/sdks/LocalContent/Map/CommuteContainer/index.js +8 -2
- package/dist/types/sdks/LocalContent/Map/CommuteContainer/index.js.map +1 -1
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/index.d.ts.map +1 -1
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/index.js +3 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/index.js.map +1 -1
- package/dist/types/sdks/LocalContent/Map/index.d.ts.map +1 -1
- package/dist/types/sdks/LocalContent/Map/index.js +5 -0
- package/dist/types/sdks/LocalContent/Map/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/index-legacy.d5ed91f3.js +0 -1
- package/dist/assets/index.6afa5429.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){var t,e,n,r,i,o,a,s,u,c,l,d,p,f,h,v,y,g,m,b,w,x,_,C,S,I,k,O,P,L,M,E,j,A,T;function F(t){return function(t){if(Array.isArray(t))return V(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||U(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function N(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */N=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(k){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),a=new C(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return I()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(k){return{type:"throw",arg:k}}}t.wrap=u;var l={};function d(){}function p(){}function f(){}var h={};s(h,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,i)&&(h=y);var g=f.prototype=d.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==$(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(d).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:I}}function I(){return{value:void 0,done:!0}}return p.prototype=f,s(g,"constructor",f),s(f,"constructor",p),p.displayName=s(f,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,s(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),s(g,a,"Generator"),s(g,i,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),_(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function z(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(c){return void n(c)}s.done?e(u):Promise.resolve(u).then(r,i)}function R(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){z(o,r,i,a,s,"next",t)}function s(t){z(o,r,i,a,s,"throw",t)}a(void 0)}))}}function q(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=U(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function B(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||U(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(t,e){if(t){if("string"==typeof t)return V(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V(t,e):void 0}}function V(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function G(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function K(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?G(Object(n),!0).forEach((function(e){J(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function H(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function W(t,e,n){return e&&H(t.prototype,e),n&&H(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function J(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $(t){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$(t)}System.register(["./index-legacy.770cfe03.js","./index-legacy.ea25d2c0.js"],(function(z,U){"use strict";var V,G,H,Y,Q,X,tt,et,nt,rt,it,ot,at,st,ut,ct,lt,dt,pt,ft,ht,vt,yt,gt,mt,bt,wt,xt,_t,Ct,St,It,kt,Ot,Pt,Lt,Mt,Et,jt,At,Tt,Ft,Dt,Nt,zt,Rt,qt,Bt,Ut,Vt,Gt,Kt,Zt,Ht,Wt,Jt,$t,Yt,Qt,Xt,te,ee;return{setters:[function(t){V=t.M,G=t.d,H=t.u,Y=t.p,Q=t.s,X=t.a,tt=t.b,et=t.$,nt=t.c,rt=t.e,it=t.f,ot=t.S,at=t.g,st=t.h,ut=t.i,ct=t.A,lt=t.j,dt=t.k,pt=t.m,ft=t.l,ht=t.N,vt=t.P},function(t){yt=t._,gt=t.a,mt=t.b,bt=t.c,wt=t.d,xt=t.e,_t=t.f,Ct=t.g,St=t.R,It=t.r,kt=t.S,Ot=t.j,Pt=t.I,Lt=t.L,Mt=t.u,Et=t.h,jt=t.p,At=t.s,Tt=t.y,Ft=t.F,Dt=t.i,Nt=t.k,zt=t.l,Rt=t.m,qt=t.M,Bt=t.n,Ut=t.B,Vt=t.U,Gt=t.A,Kt=t.x,Zt=t.O,Ht=t.o,Wt=t.q,Jt=t.C,$t=t.t,Yt=t.v,Qt=t.w,Xt=t.z,te=t.T,ee=t.N}],execute:function(){function ne(t){return"string"==typeof t}function re(t){return"number"==typeof t}function ie(t){return"function"==typeof t}function oe(t){return"object"===Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}z({a:fe,b:mi,e:function(){return!ye()},h:Nr,i:me,j:ge,l:yi,m:ui,n:he,o:Te,u:function(t){var e=vi(t);void 0!==e&&e.remove();return Promise.resolve()}});var ae=function(t){function e(e,n){var r=t.call(this,n)||this;return r.field=e,r}return yt(e,t),e}(Error);function se(t){var e,n=t&&t.event&&t.event.type,r=t.event;if(void 0===r)throw new ae("event","Event is missing");if(!ne(n))throw new ae("event","Event is not a string");if("track"===n&&!ne(r.event))throw new ae("event","Event is not a string");var i=null!==(e=r.properties)&&void 0!==e?e:r.traits;if("alias"!==n&&!oe(i))throw new ae("properties","properties is not an object");if(!function(t){var e,n,r;return ne(null!==(r=null!==(n=null!==(e=t.userId)&&void 0!==e?e:t.anonymousId)&&void 0!==n?n:t.groupId)&&void 0!==r?r:t.previousId)}(r))throw new ae("userId","Missing userId or anonymousId");return t}var ue={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:se,identify:se,page:se,alias:se,group:se,screen:se};function ce(t,e,n,r){var i,o=[t,e,n,r],a=oe(t)?t.event:t;if(!a||!ne(a))throw new Error("Event missing");var s=oe(t)?null!==(i=t.properties)&&void 0!==i?i:{}:oe(e)?e:{},u={};return oe(e)&&!ie(n)&&(u=null!=n?n:{}),oe(t)&&!ie(e)&&(u=null!=e?e:{}),[a,s,u,o.find(ie)]}function le(t,e,n,r,i){var o,a,s=null,u=null,c=[t,e,n,r,i],l=c.filter(ne);void 0!==l[0]&&void 0!==l[1]&&(s=l[0],u=l[1]),1===l.length&&(s=null,u=l[0]);var d=c.find(ie),p=c.filter((function(t){return null===u?oe(t):oe(t)||null===t})),f=null!==(o=p[0])&&void 0!==o?o:{},h=null!==(a=p[1])&&void 0!==a?a:{};return[s,u,f,h,d]}var de=function(t){return function(){for(var e,n,r,i,o,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var u=null;u=null!==(r=null!==(e=a.find(ne))&&void 0!==e?e:null===(n=a.find(re))||void 0===n?void 0:n.toString())&&void 0!==r?r:t.id();var c=a.filter((function(t){return null===u?oe(t):oe(t)||null===t})),l=null!==(i=c[0])&&void 0!==i?i:{},d=null!==(o=c[1])&&void 0!==o?o:{},p=a.find(ie);return[u,l,d,p]}};function pe(t,e,n,r){re(t)&&(t=t.toString()),re(e)&&(e=e.toString());var i=[t,e,n,r],o=i.filter(ne),a=o[0],s=void 0===a?t:a,u=o[1],c=void 0===u?null:u,l=i.filter(oe)[0];return[s,c,void 0===l?{}:l,i.find(ie)]}function fe(t){return Promise.resolve(t)}function he(t,e){return new Promise((function(n,r){var i=setTimeout((function(){r(Error("Promise timed out"))}),e);t.then((function(t){return clearTimeout(i),n(t)})).catch(r)}))}function ve(t,e,n,r){var i;return(i=n,new Promise((function(t){return setTimeout(t,i)}))).then((function(){return he(function(){try{return fe(e(t))}catch(n){return Promise.reject(n)}}(),null!=r?r:1e3)})).catch((function(e){null==t||t.log("warn","Callback Error",{error:e}),null==t||t.stats.increment("callback_error")})).then((function(){return t}))}function ye(){return"undefined"!=typeof window}function ge(){return!ye()||window.navigator.onLine}function me(){return!ge()}for(var be,we=256,xe=[];we--;)xe[we]=(we+256).toString(16).substring(1);function _e(){var t,e=0,n="";if(!be||we+16>256){for(be=Array(e=256);e--;)be[e]=256*Math.random()|0;e=we=0}for(;e<16;e++)t=be[we+e],n+=6==e?xe[15&t|64]:8==e?xe[63&t|128]:xe[t],1&e&&e>1&&e<11&&(n+="-");return we++,n}function Ce(t,e,n){e.split&&(e=e.split("."));for(var r,i,o=0,a=e.length,s=t;o<a&&"__proto__"!==(i=e[o++])&&"constructor"!==i&&"prototype"!==i;)s=s[i]=o===a?n:$(r=s[i])===$(e)?r:0*e[o]!=0||~(""+e[o]).indexOf(".")?{}:[]}var Se=Object.freeze(Object.defineProperty({__proto__:null,dset:Ce},Symbol.toStringTag,{value:"Module"}));z("d",Se);var Ie=function(){function t(){var t=this;this._logs=[],this.log=function(e,n,r){var i=new Date;t._logs.push({level:e,message:n,time:i,extras:r})}}return Object.defineProperty(t.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),t.prototype.flush=function(){if(this.logs.length>1){var t=this._logs.reduce((function(t,e){var n,r,i,o=gt(gt({},e),{json:JSON.stringify(e.extras,null," "),extras:e.extras});delete o.time;var a=null!==(i=null===(r=e.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return t[a]&&(a="".concat(a,"-").concat(Math.random())),gt(gt({},t),((n={})[a]=o,n))}),{});console.table?console.table(t):console.log(t)}else this.logs.forEach((function(t){var e=t.level,n=t.message,r=t.extras;"info"===e||"debug"===e?console.log(n,null!=r?r:""):console[e](n,null!=r?r:"")}));this._logs=[]},t}(),ke=Ie,Oe=function(){function t(t){this.metrics=[],this.remoteMetrics=t}return t.prototype.increment=function(t,e,n){var r;void 0===e&&(e=1),this.metrics.push({metric:t,value:e,tags:null!=n?n:[],type:"counter",timestamp:Date.now()}),null===(r=this.remoteMetrics)||void 0===r||r.increment(t,null!=n?n:[])},t.prototype.gauge=function(t,e,n){this.metrics.push({metric:t,value:e,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},t.prototype.flush=function(){var t=this.metrics.map((function(t){return gt(gt({},t),{tags:t.tags.join(",")})}));console.table?console.table(t):console.log(t),this.metrics=[]},t.prototype.serialize=function(){return this.metrics.map((function(t){return{m:t.metric,v:t.value,t:t.tags,k:(e=t.type,{gauge:"g",counter:"c"}[e]),e:t.timestamp};var e}))},t}(),Pe=Oe;function Le(t,e){return e=e||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],a=[],s={},u=function t(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:t,headers:{keys:function(){return o},entries:function(){return a},get:function(t){return s[t.toLowerCase()]},has:function(t){return t.toLowerCase()in s}}}};for(var c in i.open(e.method||"get",t,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(t,e,n){o.push(e=e.toLowerCase()),a.push([e,n]),s[e]=s[e]?s[e]+","+n:n})),n(u())},i.onerror=r,i.withCredentials="include"==e.credentials,e.headers)i.setRequestHeader(c,e.headers[c]);i.send(e.body||null)}))}var Me="1.44.0";/*! js-cookie v3.0.1 | MIT */function Ee(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var je,Ae=function t(e,n){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=Ee({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in i)i[a]&&(o+="; "+a,!0!==i[a]&&(o+="="+i[a].split(";")[0]));return document.cookie=t+"="+e.write(r,t)+o}}return Object.create({set:r,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=e.read(a,s),t===s)break}catch(u){}}return t?r[t]:r}},remove:function(t,e){r(t,"",Ee({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,Ee({},this.attributes,e))},withConverter:function(e){return t(Ee({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function Te(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(Rr){return t}}function Fe(t){var e=function(t){try{return new URL(t)}catch(Rr){return}}(t);if(e)for(var n=function(t){var e=t.hostname.split("."),n=e[e.length-1],r=[];if(4===e.length&&parseInt(n,10)>0)return r;if(e.length<=1)return r;for(var i=e.length-2;i>=0;--i)r.push(e.slice(i).join("."));return r}(e),r=0;r<n.length;++r){var i="__tld__",o=n[r],a={domain:"."+o};try{if(Ae.set(i,"1",a),Ae.get(i))return Ae.remove(i,a),o}catch(s){return}}}function De(t,e,n){var r=Ae.get("s:context.referrer"),i=function(t){var e={btid:"dataxu",urid:"millennial-media"};t.startsWith("?")&&(t=t.substring(1));for(var n=0,r=(t=t.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),o=i[0],a=i[1];if(e[o])return{id:a,type:e[o]}}}(t);r=r?JSON.parse(r):void 0,(i=null!=i?i:r)&&(e&&(e.referrer=gt(gt({},e.referrer),i)),n||Ae.set("s:context.referrer",JSON.stringify(i),function(){if(je)return je;var t=Fe(window.location.href);return je={expires:31536e6,secure:!1,path:"/"},t&&(je.domain=t),je}()))}function Ne(t,e,n,r){var i,o,a,s,u=t.user(),c=window.location.search;e.context=null!==(o=null!==(i=e.context)&&void 0!==i?i:e.options)&&void 0!==o?o:{};var l=e.context,d=e.anonymousId;delete e.options,e.writeKey=null==n?void 0:n.apiKey,l.userAgent=window.navigator.userAgent;var p=navigator.userLanguage||navigator.language;if(void 0===l.locale&&void 0!==p&&(l.locale=p),!l.library){l.library={name:"analytics.js",version:"npm:next-".concat(Me)}}c&&!l.campaign&&(l.campaign=function(t){return t.startsWith("?")&&(t=t.substring(1)),(t=t.replace(/\?/g,"&")).split("&").reduce((function(t,e){var n=e.split("="),r=n[0],i=n[1],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var a=r.substr(4);"campaign"===a&&(a="name"),t[a]=Te(o)}return t}),{})}(c)),De(c,l,null!==(a=t.options.disableClientPersistence)&&void 0!==a&&a),e.userId=e.userId||u.id(),e.anonymousId=u.anonymousId(d),e.sentAt=new Date;var f=t.queue.failedInitializations||[];f.length>0&&(e._metadata={failedInitializations:f});var h=[],v=[];for(var y in r){var g=r[y];"Segment.io"===y&&h.push(y),"bundled"===g.bundlingStatus&&h.push(y),"unbundled"===g.bundlingStatus&&v.push(y)}for(var m=0,b=(null==n?void 0:n.unbundledIntegrations)||[];m<b.length;m++){var w=b[m];v.includes(w)||v.push(w)}var x=null!==(s=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==s?s:{},_=[];h.sort().forEach((function(t){var e;(null!==(e=x[t])&&void 0!==e?e:[]).forEach((function(t){_.push(t)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(e._metadata=gt(gt({},e._metadata),{bundled:h.sort(),unbundled:v.sort(),bundledIds:_}));var C=function(){var t=Ae.get("_ga");if(t&&t.startsWith("amp"))return t}();return C&&(l.amp={id:C}),e}function ze(t){console.error("Error sending segment performance metrics",t)}var Re,qe=function(){function t(t){var e,n,r,i,o=this;if(this.host=null!==(e=null==t?void 0:t.host)&&void 0!==e?e:"api.segment.io/v1",this.sampleRate=null!==(n=null==t?void 0:t.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==t?void 0:t.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==t?void 0:t.maxQueueSize)&&void 0!==i?i:20,this.queue=[],this.sampleRate>0){var a=!1;!function t(){a||(a=!0,o.flush().catch(ze),a=!1,setTimeout(t,o.flushTimer))}()}}return t.prototype.increment=function(t,e){if(t.includes("analytics_js.")&&0!==e.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=e.reduce((function(t,e){var n=e.split(":"),r=n[0],i=n[1];return t[r]=i,t}),{});n.library="analytics.js";n.library_version="npm:next-".concat(Me),this.queue.push({type:"Counter",metric:t,value:1,tags:n}),t.includes("error")&&this.flush().catch(ze)}},t.prototype.flush=function(){return mt(this,void 0,void 0,(function(){var t=this;return bt(this,(function(e){switch(e.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(e){ze(e),t.sampleRate=0}))];case 1:return e.sent(),[2]}}))}))},t.prototype.send=function(){return mt(this,void 0,void 0,(function(){var t,e;return bt(this,(function(n){return t={series:this.queue},this.queue=[],e={"Content-Type":"text/plain"},[2,Le("https://".concat(this.host,"/m"),{headers:e,body:JSON.stringify(t),method:"POST"})]}))}))},t}(),Be=z("C",(function(t){var e,n,r;this.retry=null===(e=t.retry)||void 0===e||e,this.type=null!==(n=t.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=t.reason)&&void 0!==r?r:""})),Ue=z("k",function(){function t(t,e){this.logger=new ke,this.cancel=function(t){if(t)throw t;throw new Be({reason:"Context Cancel"})},this._attempts=0,this._event=t,this._id=null!=e?e:_e(),this.stats=new Pe(Re)}return t.initMetrics=function(t){Re=new qe(t)},t.system=function(){return new t({type:"track",event:"system"})},t.prototype.isSame=function(t){return t._id===this._id},t.prototype.log=function(t,e,n){this.logger.log(t,e,n)},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"event",{get:function(){return this._event},set:function(t){this._event=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attempts",{get:function(){return this._attempts},set:function(t){this._attempts=t},enumerable:!1,configurable:!0}),t.prototype.updateEvent=function(t,e){var n;if("integrations"===t.split(".")[0]){var r=t.split(".")[1];if(!1===(null===(n=this._event.integrations)||void 0===n?void 0:n[r]))return this._event}return Ce(this._event,t,e),this._event},t.prototype.failedDelivery=function(){return this._failedDelivery},t.prototype.setFailedDelivery=function(t){this._failedDelivery=t},t.prototype.logs=function(){return this.logger.logs},t.prototype.flush=function(){this.logger.flush(),this.stats.flush()},t.prototype.toJSON=function(){return{id:this._id,event:this._event,logs:this.logger.logs,metrics:this.stats.metrics}},t}()),Ve=function(){function t(){this.callbacks={}}return t.prototype.on=function(t,e){return this.callbacks[t]?this.callbacks[t].push(e):this.callbacks[t]=[e],this},t.prototype.once=function(t,e){var n=this;return this.on(t,(function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];n.off(t,r),e.apply(n,i)})),this},t.prototype.off=function(t,e){var n,r=(null!==(n=this.callbacks[t])&&void 0!==n?n:[]).filter((function(t){return t!==e}));return this.callbacks[t]=r,this},t.prototype.emit=function(t){for(var e,n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var o=null!==(e=this.callbacks[t])&&void 0!==e?e:[];return o.forEach((function(t){t.apply(n,r)})),this},t}(),Ge=z("c",{}),Ke={},Ze={},He={exports:{}};!function(t){function e(t){return function(e,n,r,o){var a,s=o&&function(t){return"function"==typeof t}(o.normalizer)?o.normalizer:i;n=s(n);for(var u=!1;!u;)c();function c(){for(a in e){var t=s(a);if(0===n.indexOf(t)){var r=n.substr(t.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=e[a];return null==i?void(u=!0):n.length?void(e=i):void(u=!0)}}}a=void 0,u=!0}if(a)return null==e?e:t(e,a,r)}}function n(t,e){return t.hasOwnProperty(e)&&delete t[e],t}function r(t,e,n){return t.hasOwnProperty(e)&&(t[e]=n),t}function i(t){return t.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}t.exports=e((function(t,e){if(t.hasOwnProperty(e))return t[e]})),t.exports.find=t.exports,t.exports.replace=function(t,n,i,o){return e(r).call(this,t,n,i,o),t},t.exports.del=function(t,r,i){return e(n).call(this,t,r,null,i),t}}(He);var We=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ze,"__esModule",{value:!0});var Je=We(He.exports);function $e(t,e){return function(){var n=this.traits(),r=this.properties?this.properties():{};return Je.default(n,"address."+t)||Je.default(n,t)||(e?Je.default(n,"address."+e):null)||(e?Je.default(n,e):null)||Je.default(r,"address."+t)||Je.default(r,t)||(e?Je.default(r,"address."+e):null)||(e?Je.default(r,e):null)}}Ze.default=function(t){t.zip=$e("postalCode","zip"),t.country=$e("country"),t.street=$e("street"),t.state=$e("state"),t.city=$e("city"),t.region=$e("region")};var Ye={};Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.clone=void 0,Ye.clone=function t(e){if("[object Object]"===Object.prototype.toString.call(e)){var n={};for(var r in e)n[r]=t(e[r]);return n}return Array.isArray(e)?e.map(t):e};var Qe={};Object.defineProperty(Qe,"__esModule",{value:!0});var Xe={Salesforce:!0};Qe.default=function(t){return!Xe[t]};var tn={},en=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;tn.parse=function(t){var e=[1,5,6,7,11,12],n=en.exec(t),r=0;if(!n)return new Date(t);for(var i,o=0;i=e[o];o++)n[i]=parseInt(n[i],10)||0;n[2]=parseInt(n[2],10)||1,n[3]=parseInt(n[3],10)||1,n[2]--,n[8]=n[8]?(n[8]+"00").substring(0,3):0," "===n[4]?r=(new Date).getTimezoneOffset():"Z"!==n[9]&&n[10]&&(r=60*n[11]+n[12],"+"===n[10]&&(r=0-r));var a=Date.UTC(n[1],n[2],n[3],n[5],n[6]+r,n[7],n[8]);return new Date(a)},tn.is=function(t,e){return"string"==typeof t&&((!e||!1!==/^\d{4}-\d{2}-\d{2}/.test(t))&&en.test(t))};var nn={},rn=/\d{13}/;nn.is=function(t){return rn.test(t)},nn.parse=function(t){return t=parseInt(t,10),new Date(t)};var on={},an=/\d{10}/;on.is=function(t){return an.test(t)},on.parse=function(t){var e=1e3*parseInt(t,10);return new Date(e)};var sn=tn,un=nn,cn=on,ln=Object.prototype.toString;var dn=function(t){return e=t,"[object Date]"===ln.call(e)?t:function(t){return"[object Number]"===ln.call(t)}(t)?new Date((n=t)<315576e5?1e3*n:n):sn.is(t)?sn.parse(t):un.is(t)?un.parse(t):cn.is(t)?cn.parse(t):new Date(t);var e,n};var pn=tn,fn=hn;function hn(t,e){return void 0===e&&(e=!0),t&&"object"===$(t)?function(t,e){return Object.keys(t).forEach((function(n){t[n]=hn(t[n],e)})),t}(t,e):Array.isArray(t)?function(t,e){return t.forEach((function(n,r){t[r]=hn(n,e)})),t}(t,e):pn.is(t,e)?pn.parse(t):t}var vn=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.Facade=void 0;var yn=vn(Ze),gn=Ye,mn=vn(Qe),bn=vn(dn),wn=vn(He.exports),xn=vn(fn);function _n(t,e){e=e||{},this.raw=gn.clone(t),"clone"in e||(e.clone=!0),e.clone&&(t=gn.clone(t)),"traverse"in e||(e.traverse=!0),t.timestamp="timestamp"in t?bn.default(t.timestamp):new Date,e.traverse&&xn.default(t),this.opts=e,this.obj=t}Ke.Facade=_n;var Cn=_n.prototype;function Sn(t){return gn.clone(t)}Cn.proxy=function(t){var e=t.split("."),n=this[t=e.shift()]||this.field(t);return n?("function"==typeof n&&(n=n.call(this)||{}),0===e.length||(n=wn.default(n,e.join("."))),this.opts.clone?Sn(n):n):n},Cn.field=function(t){var e=this.obj[t];return this.opts.clone?Sn(e):e},_n.proxy=function(t){return function(){return this.proxy(t)}},_n.field=function(t){return function(){return this.field(t)}},_n.multi=function(t){return function(){var e=this.proxy(t+"s");if(Array.isArray(e))return e;var n=this.proxy(t);return n&&(n=[this.opts.clone?gn.clone(n):n]),n||[]}},_n.one=function(t){return function(){var e=this.proxy(t);if(e)return e;var n=this.proxy(t+"s");return Array.isArray(n)?n[0]:void 0}},Cn.json=function(){var t=this.opts.clone?gn.clone(this.obj):this.obj;return this.type&&(t.type=this.type()),t},Cn.rawEvent=function(){return this.raw},Cn.options=function(t){var e=this.obj.options||this.obj.context||{},n=this.opts.clone?gn.clone(e):e;if(!t)return n;if(this.enabled(t)){var r=this.integrations(),i=r[t]||wn.default(r,t);return"object"!==$(i)&&(i=wn.default(this.options(),t)),"object"===$(i)?i:{}}},Cn.context=Cn.options,Cn.enabled=function(t){var e=this.proxy("options.providers.all");"boolean"!=typeof e&&(e=this.proxy("options.all")),"boolean"!=typeof e&&(e=this.proxy("integrations.all")),"boolean"!=typeof e&&(e=!0);var n=e&&mn.default(t),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(t)&&(n=r.providers[t]),r.hasOwnProperty(t)){var i=r[t];n="boolean"!=typeof i||i}return!!n},Cn.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},Cn.active=function(){var t=this.proxy("options.active");return null==t&&(t=!0),t},Cn.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},Cn.sessionId=Cn.anonymousId,Cn.groupId=_n.proxy("options.groupId"),Cn.traits=function(t){var e=this.proxy("options.traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();null!=i&&(e[t[r]]=i,delete e[r])}return e},Cn.library=function(){var t=this.proxy("options.library");return t?"string"==typeof t?{name:t,version:null}:t:{name:"unknown",version:null}},Cn.device=function(){var t=this.proxy("context.device");"object"===$(t)&&null!==t||(t={});var e=this.library().name;return t.type||(e.indexOf("ios")>-1&&(t.type="ios"),e.indexOf("android")>-1&&(t.type="android")),t},Cn.userAgent=_n.proxy("context.userAgent"),Cn.timezone=_n.proxy("context.timezone"),Cn.timestamp=_n.field("timestamp"),Cn.channel=_n.field("channel"),Cn.ip=_n.proxy("context.ip"),Cn.userId=_n.field("userId"),yn.default(Cn);var In={},kn={exports:{}};"function"==typeof Object.create?kn.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:kn.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}};var On=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(In,"__esModule",{value:!0}),In.Alias=void 0;var Pn=On(kn.exports),Ln=Ke;function Mn(t,e){Ln.Facade.call(this,t,e)}In.Alias=Mn,Pn.default(Mn,Ln.Facade),Mn.prototype.action=function(){return"alias"},Mn.prototype.type=Mn.prototype.action,Mn.prototype.previousId=function(){return this.field("previousId")||this.field("from")},Mn.prototype.from=Mn.prototype.previousId,Mn.prototype.userId=function(){return this.field("userId")||this.field("to")},Mn.prototype.to=Mn.prototype.userId;var En={},jn={};Object.defineProperty(jn,"__esModule",{value:!0});var An=/.+\@.+\..+/;jn.default=function(t){return An.test(t)};var Tn=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(En,"__esModule",{value:!0}),En.Group=void 0;var Fn=Tn(kn.exports),Dn=Tn(jn),Nn=Tn(dn),zn=Ke;function Rn(t,e){zn.Facade.call(this,t,e)}En.Group=Rn,Fn.default(Rn,zn.Facade);var qn=Rn.prototype;qn.action=function(){return"group"},qn.type=qn.action,qn.groupId=zn.Facade.field("groupId"),qn.created=function(){var t=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(t)return Nn.default(t)},qn.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.groupId();return Dn.default(e)?e:void 0},qn.traits=function(t){var e=this.properties(),n=this.groupId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(e[t[r]]=i,delete e[r])}return e},qn.name=zn.Facade.proxy("traits.name"),qn.industry=zn.Facade.proxy("traits.industry"),qn.employees=zn.Facade.proxy("traits.employees"),qn.properties=function(){return this.field("traits")||this.field("properties")||{}};var Bn={},Un=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.Identify=void 0;var Vn=Ke,Gn=Un(He.exports),Kn=Un(kn.exports),Zn=Un(jn),Hn=Un(dn),Wn=function(t){return t.trim()};function Jn(t,e){Vn.Facade.call(this,t,e)}Bn.Identify=Jn,Kn.default(Jn,Vn.Facade);var $n=Jn.prototype;$n.action=function(){return"identify"},$n.type=$n.action,$n.traits=function(t){var e=this.field("traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(e[t[r]]=i,r!==t[r]&&delete e[r])}return e},$n.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.userId();return Zn.default(e)?e:void 0},$n.created=function(){var t=this.proxy("traits.created")||this.proxy("traits.createdAt");if(t)return Hn.default(t)},$n.companyCreated=function(){var t=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(t)return Hn.default(t)},$n.companyName=function(){return this.proxy("traits.company.name")},$n.name=function(){var t=this.proxy("traits.name");if("string"==typeof t)return Wn(t);var e=this.firstName(),n=this.lastName();return e&&n?Wn(e+" "+n):void 0},$n.firstName=function(){var t=this.proxy("traits.firstName");if("string"==typeof t)return Wn(t);var e=this.proxy("traits.name");return"string"==typeof e?Wn(e).split(" ")[0]:void 0},$n.lastName=function(){var t=this.proxy("traits.lastName");if("string"==typeof t)return Wn(t);var e=this.proxy("traits.name");if("string"==typeof e){var n=Wn(e).indexOf(" ");if(-1!==n)return Wn(e.substr(n+1))}},$n.uid=function(){return this.userId()||this.username()||this.email()},$n.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},$n.age=function(){var t=this.birthday(),e=Gn.default(this.traits(),"age");return null!=e?e:t instanceof Date?(new Date).getFullYear()-t.getFullYear():void 0},$n.avatar=function(){var t=this.traits();return Gn.default(t,"avatar")||Gn.default(t,"photoUrl")||Gn.default(t,"avatarUrl")},$n.position=function(){var t=this.traits();return Gn.default(t,"position")||Gn.default(t,"jobTitle")},$n.username=Vn.Facade.proxy("traits.username"),$n.website=Vn.Facade.one("traits.website"),$n.websites=Vn.Facade.multi("traits.website"),$n.phone=Vn.Facade.one("traits.phone"),$n.phones=Vn.Facade.multi("traits.phone"),$n.address=Vn.Facade.proxy("traits.address"),$n.gender=Vn.Facade.proxy("traits.gender"),$n.birthday=Vn.Facade.proxy("traits.birthday");var Yn={},Qn=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.Track=void 0;var Xn=Qn(kn.exports),tr=Ke,er=Bn,nr=Qn(jn),rr=Qn(He.exports);function ir(t,e){tr.Facade.call(this,t,e)}Yn.Track=ir,Xn.default(ir,tr.Facade);var or=ir.prototype;or.action=function(){return"track"},or.type=or.action,or.event=tr.Facade.field("event"),or.value=tr.Facade.proxy("properties.value"),or.category=tr.Facade.proxy("properties.category"),or.id=tr.Facade.proxy("properties.id"),or.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},or.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},or.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},or.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},or.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},or.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},or.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},or.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},or.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},or.sku=tr.Facade.proxy("properties.sku"),or.tax=tr.Facade.proxy("properties.tax"),or.name=tr.Facade.proxy("properties.name"),or.price=tr.Facade.proxy("properties.price"),or.total=tr.Facade.proxy("properties.total"),or.repeat=tr.Facade.proxy("properties.repeat"),or.coupon=tr.Facade.proxy("properties.coupon"),or.shipping=tr.Facade.proxy("properties.shipping"),or.discount=tr.Facade.proxy("properties.discount"),or.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},or.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},or.description=tr.Facade.proxy("properties.description"),or.plan=tr.Facade.proxy("properties.plan"),or.subtotal=function(){var t=rr.default(this.properties(),"subtotal"),e=this.total()||this.revenue();if(t)return t;if(!e)return 0;if(this.total()){var n=this.tax();n&&(e-=n),(n=this.shipping())&&(e-=n),(n=this.discount())&&(e+=n)}return e},or.products=function(){var t=this.properties(),e=rr.default(t,"products");return Array.isArray(e)?e.filter((function(t){return null!==t})):[]},or.quantity=function(){return(this.obj.properties||{}).quantity||1},or.currency=function(){return(this.obj.properties||{}).currency||"USD"},or.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},or.query=tr.Facade.proxy("options.query"),or.properties=function(t){var e=this.field("properties")||{};for(var n in t=t||{}){var r=null==this[n]?this.proxy("properties."+n):this[n]();null!=r&&(e[t[n]]=r,delete e[n])}return e},or.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},or.email=function(){var t=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(t)return t;var e=this.userId();return nr.default(e)?e:void 0},or.revenue=function(){var t=this.proxy("properties.revenue"),e=this.event();return!t&&e&&e.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(t=this.proxy("properties.total")),function(t){if(!t)return;if("number"==typeof t)return t;if("string"!=typeof t)return;if(t=t.replace(/\$/g,""),t=parseFloat(t),!isNaN(t))return t}(t)},or.cents=function(){var t=this.revenue();return"number"!=typeof t?this.value()||0:100*t},or.identify=function(){var t=this.json();return t.traits=this.traits(),new er.Identify(t,this.opts)};var ar={},sr=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ar,"__esModule",{value:!0}),ar.Page=void 0;var ur=sr(kn.exports),cr=Ke,lr=Yn,dr=sr(jn);function pr(t,e){cr.Facade.call(this,t,e)}ar.Page=pr,ur.default(pr,cr.Facade);var fr=pr.prototype;fr.action=function(){return"page"},fr.type=fr.action,fr.category=cr.Facade.field("category"),fr.name=cr.Facade.field("name"),fr.title=cr.Facade.proxy("properties.title"),fr.path=cr.Facade.proxy("properties.path"),fr.url=cr.Facade.proxy("properties.url"),fr.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},fr.properties=function(t){var e=this.field("properties")||{},n=this.category(),r=this.name();for(var i in t=t||{},n&&(e.category=n),r&&(e.name=r),t){var o=null==this[i]?this.proxy("properties."+i):this[i]();null!=o&&(e[t[i]]=o,i!==t[i]&&delete e[i])}return e},fr.email=function(){var t=this.proxy("context.traits.email")||this.proxy("properties.email");if(t)return t;var e=this.userId();return dr.default(e)?e:void 0},fr.fullName=function(){var t=this.category(),e=this.name();return e&&t?t+" "+e:e},fr.event=function(t){return t?"Viewed "+t+" Page":"Loaded a Page"},fr.track=function(t){var e=this.json();return e.event=this.event(t),e.timestamp=this.timestamp(),e.properties=this.properties(),new lr.Track(e,this.opts)};var hr={},vr=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(hr,"__esModule",{value:!0}),hr.Screen=void 0;var yr=vr(kn.exports),gr=ar,mr=Yn;function br(t,e){gr.Page.call(this,t,e)}hr.Screen=br,yr.default(br,gr.Page),br.prototype.action=function(){return"screen"},br.prototype.type=br.prototype.action,br.prototype.event=function(t){return t?"Viewed "+t+" Screen":"Loaded a Screen"},br.prototype.track=function(t){var e=this.json();return e.event=this.event(t),e.timestamp=this.timestamp(),e.properties=this.properties(),new mr.Track(e,this.opts)};var wr={},xr=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wr,"__esModule",{value:!0}),wr.Delete=void 0;var _r=xr(kn.exports),Cr=Ke;function Sr(t,e){Cr.Facade.call(this,t,e)}wr.Delete=Sr,_r.default(Sr,Cr.Facade),Sr.prototype.type=function(){return"delete"},function(t){var e=wt&&wt.__assign||function(){return e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},e.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Delete=t.Screen=t.Page=t.Track=t.Identify=t.Group=t.Alias=t.Facade=void 0;var n=Ke;Object.defineProperty(t,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=In;Object.defineProperty(t,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=En;Object.defineProperty(t,"Group",{enumerable:!0,get:function(){return i.Group}});var o=Bn;Object.defineProperty(t,"Identify",{enumerable:!0,get:function(){return o.Identify}});var a=Yn;Object.defineProperty(t,"Track",{enumerable:!0,get:function(){return a.Track}});var s=ar;Object.defineProperty(t,"Page",{enumerable:!0,get:function(){return s.Page}});var u=hr;Object.defineProperty(t,"Screen",{enumerable:!0,get:function(){return u.Screen}});var c=wr;Object.defineProperty(t,"Delete",{enumerable:!0,get:function(){return c.Delete}}),t.default=e(e({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:o.Identify,Track:a.Track,Page:s.Page,Screen:u.Screen,Delete:c.Delete})}(Ge);var Ir={exports:{}};!function(t,e){t.exports=function(t){var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(t,e){var n=t[0],r=t[1],i=t[2],o=t[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+e[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+e[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+e[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+e[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+e[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+e[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+e[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+e[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+e[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+e[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+e[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+e[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+e[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+e[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+e[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+e[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+e[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+e[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+e[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+e[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+e[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+e[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+e[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+e[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+e[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+e[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+e[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+e[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+e[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+e[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+e[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+e[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+e[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+e[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+e[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+e[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+e[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+e[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+e[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+e[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+e[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+e[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+e[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+e[9]-343485551|0)<<21|r>>>11)+i|0,t[0]=n+t[0]|0,t[1]=r+t[1]|0,t[2]=i+t[2]|0,t[3]=o+t[3]|0}function r(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}function i(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return n}function o(t){var e,i,o,a,s,u,c=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=c;e+=64)n(l,r(t.substring(e-64,e)));for(i=(t=t.substring(e-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<i;e+=1)o[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(n(l,o),e=0;e<16;e+=1)o[e]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,n(l,o),l}function a(t){var e,r,o,a,s,u,c=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=c;e+=64)n(l,i(t.subarray(e-64,e)));for(r=(t=e-64<c?t.subarray(e-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<r;e+=1)o[e>>2]|=t[e]<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(n(l,o),e=0;e<16;e+=1)o[e]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,n(l,o),l}function s(t){var n,r="";for(n=0;n<4;n+=1)r+=e[t>>8*n+4&15]+e[t>>8*n&15];return r}function u(t){var e;for(e=0;e<t.length;e+=1)t[e]=s(t[e]);return t.join("")}function c(t){return/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t))),t}function l(t,e){var n,r=t.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=t.charCodeAt(n);return e?o:i}function d(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function p(t,e,n){var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(new Uint8Array(t)),r.set(new Uint8Array(e),t.byteLength),n?r:r.buffer}function f(t){var e,n=[],r=t.length;for(e=0;e<r-1;e+=2)n.push(parseInt(t.substr(e,2),16));return String.fromCharCode.apply(String,n)}function h(){this.reset()}return u(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(t,e){return(t=0|t||0)<0?Math.max(t+e,0):Math.min(t,e)}ArrayBuffer.prototype.slice=function(n,r){var i,o,a,s,u=this.byteLength,c=e(n,u),l=u;return r!==t&&(l=e(r,u)),c>l?new ArrayBuffer(0):(i=l-c,o=new ArrayBuffer(i),a=new Uint8Array(o),s=new Uint8Array(this,c,i),a.set(s),o)}}(),h.prototype.append=function(t){return this.appendBinary(c(t)),this},h.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var e,i=this._buff.length;for(e=64;e<=i;e+=64)n(this._hash,r(this._buff.substring(e-64,e)));return this._buff=this._buff.substring(e-64),this},h.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=r.charCodeAt(e)<<(e%4<<3);return this._finish(o,i),n=u(this._hash),t&&(n=f(n)),this.reset(),n},h.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},h.prototype.setState=function(t){return this._buff=t.buff,this._length=t.length,this._hash=t.hash,this},h.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},h.prototype._finish=function(t,e){var r,i,o,a=e;if(t[a>>2]|=128<<(a%4<<3),a>55)for(n(this._hash,t),a=0;a<16;a+=1)t[a]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,t[14]=i,t[15]=o,n(this._hash,t)},h.hash=function(t,e){return h.hashBinary(c(t),e)},h.hashBinary=function(t,e){var n=u(o(t));return e?f(n):n},h.ArrayBuffer=function(){this.reset()},h.ArrayBuffer.prototype.append=function(t){var e,r=p(this._buff.buffer,t,!0),o=r.length;for(this._length+=t.byteLength,e=64;e<=o;e+=64)n(this._hash,i(r.subarray(e-64,e)));return this._buff=e-64<o?new Uint8Array(r.buffer.slice(e-64)):new Uint8Array(0),this},h.ArrayBuffer.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=r[e]<<(e%4<<3);return this._finish(o,i),n=u(this._hash),t&&(n=f(n)),this.reset(),n},h.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.ArrayBuffer.prototype.getState=function(){var t=h.prototype.getState.call(this);return t.buff=d(t.buff),t},h.ArrayBuffer.prototype.setState=function(t){return t.buff=l(t.buff,!0),h.prototype.setState.call(this,t)},h.ArrayBuffer.prototype.destroy=h.prototype.destroy,h.ArrayBuffer.prototype._finish=h.prototype._finish,h.ArrayBuffer.hash=function(t,e){var n=u(a(new Uint8Array(t)));return e?f(n):n},h}()}(Ir);var kr=Ir.exports,Or=function(){function t(t){this.user=t}return t.prototype.track=function(t,e,n,r){return this.normalize(gt(gt({},this.baseEvent()),{event:t,type:"track",properties:e,options:gt({},n),integrations:gt({},r)}))},t.prototype.page=function(t,e,n,r,i){var o,a={type:"page",properties:gt({},n),options:gt({},r),integrations:gt({},i)};return null!==t&&(a.category=t,a.properties=null!==(o=a.properties)&&void 0!==o?o:{},a.properties.category=t),null!==e&&(a.name=e),this.normalize(gt(gt({},this.baseEvent()),a))},t.prototype.screen=function(t,e,n,r,i){var o={type:"screen",properties:gt({},n),options:gt({},r),integrations:gt({},i)};return null!==t&&(o.category=t),null!==e&&(o.name=e),this.normalize(gt(gt({},this.baseEvent()),o))},t.prototype.identify=function(t,e,n,r){return this.normalize(gt(gt({},this.baseEvent()),{type:"identify",userId:t,traits:e,options:gt({},n),integrations:gt({},r)}))},t.prototype.group=function(t,e,n,r){return this.normalize(gt(gt({},this.baseEvent()),{type:"group",traits:e,options:gt({},n),integrations:gt({},r),groupId:t}))},t.prototype.alias=function(t,e,n,r){var i={userId:t,type:"alias",options:gt({},n),integrations:gt({},r)};return null!==e&&(i.previousId=e),void 0===t?this.normalize(gt(gt({},i),this.baseEvent())):this.normalize(gt(gt({},this.baseEvent()),i))},t.prototype.baseEvent=function(){var t={integrations:{},options:{}},e=this.user;return e.id()&&(t.userId=e.id()),e.anonymousId()&&(t.anonymousId=e.anonymousId()),t},t.prototype.context=function(t){var e,n,r,i=["integrations","anonymousId","timestamp","userId"],o=null!==(e=t.options)&&void 0!==e?e:{};delete o.integrations;var a=Object.keys(o),s=null!==(r=null===(n=t.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},u={};return a.forEach((function(t){"context"!==t&&(i.includes(t)?Ce(u,t,o[t]):Ce(s,t,o[t]))})),[s,u]},t.prototype.normalize=function(t){var e,n,r=Object.keys(null!==(e=t.integrations)&&void 0!==e?e:{}).reduce((function(e,n){var r,i;return gt(gt({},e),((r={})[n]=Boolean(null===(i=t.integrations)||void 0===i?void 0:i[n]),r))}),{}),i=gt(gt({},r),null===(n=t.options)||void 0===n?void 0:n.integrations),o=this.context(t),a=o[0],s=o[1];t.options;var u=xt(t,["options"]),c=gt(gt(gt({timestamp:new Date},u),{context:a,integrations:i}),s),l="ajs-next-"+kr.hash(JSON.stringify(c)+_e());return gt(gt({},c),{messageId:l})},t}();var Pr="onRemoveFromFuture",Lr=z("P",function(t){function e(e,n,r){var i=t.call(this)||this;return i.future=[],i.maxAttempts=e,i.queue=n,i.seen=null!=r?r:{},i}return yt(e,t),e.prototype.push=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.map((function(e){return!(t.updateAttempts(e)>t.maxAttempts||t.includes(e))&&(t.queue.push(e),!0)}));return this.queue=this.queue.sort((function(e,n){return t.getAttempts(e)-t.getAttempts(n)})),r},e.prototype.pushWithBackoff=function(t){var e=this;if(0===this.getAttempts(t))return this.push(t)[0];var n=this.updateAttempts(t);if(n>this.maxAttempts||this.includes(t))return!1;var r=function(t){var e=Math.random()+1,n=t.minTimeout,r=void 0===n?500:n,i=t.factor,o=void 0===i?2:i,a=t.attempt,s=t.maxTimeout,u=void 0===s?1/0:s;return Math.min(e*r*Math.pow(o,a),u)}({attempt:n-1});return setTimeout((function(){e.queue.push(t),e.future=e.future.filter((function(e){return e.id!==t.id})),e.emit(Pr)}),r),this.future.push(t),!0},e.prototype.getAttempts=function(t){var e;return null!==(e=this.seen[t.id])&&void 0!==e?e:0},e.prototype.updateAttempts=function(t){return this.seen[t.id]=this.getAttempts(t)+1,this.getAttempts(t)},e.prototype.includes=function(t){return this.queue.includes(t)||this.future.includes(t)||Boolean(this.queue.find((function(e){return e.id===t.id})))||Boolean(this.future.find((function(e){return e.id===t.id})))},e.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(e.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),e}(Ve)),Mr={getItem:function(){},setItem:function(){},removeItem:function(){}};try{Mr=ye()&&window.localStorage?window.localStorage:Mr}catch(ps){console.warn("Unable to access localStorage",ps)}function Er(t){var e=Mr.getItem(t);return(e?JSON.parse(e):[]).map((function(t){return new Ue(t.event,t.id)}))}function jr(t){var e=Mr.getItem(t);return e?JSON.parse(e):{}}function Ar(t){Mr.removeItem(t)}function Tr(t,e,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(t,":lock"),i=Mr.getItem(r),o=i?JSON.parse(i):null,a=null===o||function(t){return(new Date).getTime()>t}(o);if(a)return Mr.setItem(r,JSON.stringify((new Date).getTime()+50)),e(),void Mr.removeItem(r);!a&&n<3?setTimeout((function(){Tr(t,e,n+1)}),50):console.error("Unable to retrieve lock")}var Fr=z("f",function(t){function e(e,n){var r=t.call(this,e,[])||this,i="persisted-queue:v1:".concat(n,":items"),o="persisted-queue:v1:".concat(n,":seen"),a=[],s={};return Tr(n,(function(){try{a=Er(i),s=jr(o),Ar(i),Ar(o),r.queue=_t(_t([],a,!0),r.queue,!0),r.seen=gt(gt({},s),r.seen)}catch(ps){console.error(ps)}})),document.addEventListener("pagehide",(function(){if(r.todo>0){var t=_t(_t([],r.queue,!0),r.future,!0);try{Tr(n,(function(){!function(t,e){var n=Er(t),r=_t(_t([],e,!0),n,!0).reduce((function(t,e){var n;return gt(gt({},t),((n={})[e.id]=e,n))}),{});Mr.setItem(t,JSON.stringify(Object.values(r)))}(i,t),function(t,e){var n=jr(t);Mr.setItem(t,JSON.stringify(gt(gt({},n),e)))}(o,r.seen)}))}catch(ps){console.error(ps)}}})),r}return yt(e,t),e}(Lr)),Dr=function(t){return"object"===$(t)&&null!==t&&"then"in t&&"function"==typeof t.then};function Nr(t,e){var n="action"in e?e.action.name:e.name;t.log("debug","plugin",{plugin:n});var r=(new Date).getTime(),i=e[t.event.type];if(void 0===i)return Promise.resolve(t);var o=function(t){return mt(this,void 0,void 0,(function(){var e;return bt(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,t()];case 1:return[2,n.sent()];case 2:return e=n.sent(),[2,Promise.reject(e)];case 3:return[2]}}))}))}((function(){return i.apply(e,[t])})).then((function(t){var e=(new Date).getTime()-r;return t.stats.gauge("plugin_time",e,["plugin:".concat(n)]),t})).catch((function(e){if(e instanceof Be&&"middleware_cancellation"===e.type)throw e;return e instanceof Be?(t.log("warn",e.type,{plugin:n,error:e}),e):(t.log("error","plugin Error",{plugin:n,error:e}),t.stats.increment("plugin_error",1,["plugin:".concat(n)]),e)}));return o}function zr(t,e){return Nr(t,e).then((function(e){if(e instanceof Ue)return e;t.log("debug","Context canceled"),t.stats.increment("context_canceled"),t.cancel(e)}))}var Rr,qr,Br=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null},Ur=null!==(Rr=(qr=Br()).__SEGMENT_INSPECTOR__)&&void 0!==Rr?Rr:qr.__SEGMENT_INSPECTOR__={},Vr=function(t){function e(e){var n,r,i,o=t.call(this)||this;return o.criticalTasks=(i=0,{done:function(){return n},run:function(t){var e=t();return Dr(e)&&(1==++i&&(n=new Promise((function(t){return r=t}))),e.finally((function(){return 0==--i&&r()}))),e}}),o.plugins=[],o.failedInitializations=[],o.flushing=!1,o.queue=null!=e?e:new Fr(4,"event-queue"),o.queue.on(Pr,(function(){o.scheduleFlush(0)})),o}return yt(e,t),e.prototype.register=function(t,e,n){return mt(this,void 0,void 0,(function(){var r=this;return bt(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve(e.load(t,n)).then((function(){r.plugins.push(e)})).catch((function(n){if("destination"===e.type)return r.failedInitializations.push(e.name),console.warn(e.name,n),void t.log("warn","Failed to load destination",{plugin:e.name,error:n});throw n}))];case 1:return i.sent(),[2]}}))}))},e.prototype.deregister=function(t,e,n){return mt(this,void 0,void 0,(function(){var r;return bt(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e.unload?[4,Promise.resolve(e.unload(t,n))]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.plugins=this.plugins.filter((function(t){return t.name!==e.name})),[3,4];case 3:return r=i.sent(),t.log("warn","Failed to unload destination",{plugin:e.name,error:r}),[3,4];case 4:return[2]}}))}))},e.prototype.dispatch=function(t){return mt(this,void 0,void 0,(function(){var e;return bt(this,(function(n){return t.log("debug","Dispatching"),t.stats.increment("message_dispatched"),this.queue.push(t),e=this.subscribeToDelivery(t),this.scheduleFlush(0),[2,e]}))}))},e.prototype.subscribeToDelivery=function(t){return mt(this,void 0,void 0,(function(){var e=this;return bt(this,(function(n){return[2,new Promise((function(n){e.on("flush",(function r(i,o){i.isSame(t)&&(e.off("flush",r),n(i))}))}))]}))}))},e.prototype.dispatchSingle=function(t){return mt(this,void 0,void 0,(function(){var e=this;return bt(this,(function(n){return t.log("debug","Dispatching"),t.stats.increment("message_dispatched"),this.queue.updateAttempts(t),t.attempts=1,[2,this.deliver(t).catch((function(n){return n instanceof Be&&!1===n.retry?(t.setFailedDelivery({reason:n}),t):e.enqueuRetry(n,t)?e.subscribeToDelivery(t):(t.setFailedDelivery({reason:n}),t)}))]}))}))},e.prototype.isEmpty=function(){return 0===this.queue.length},e.prototype.scheduleFlush=function(t){var e=this;void 0===t&&(t=500),this.flushing||(this.flushing=!0,setTimeout((function(){e.flush().then((function(){setTimeout((function(){e.flushing=!1,e.queue.length&&e.scheduleFlush(0)}),0)}))}),t))},e.prototype.deliver=function(t){return mt(this,void 0,void 0,(function(){var e,n,r;return bt(this,(function(i){switch(i.label){case 0:return[4,this.criticalTasks.done()];case 1:i.sent(),e=Date.now(),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.flushOne(t)];case 3:return t=i.sent(),n=Date.now()-e,t.stats.gauge("delivered",n),t.log("debug","Delivered",t.event),[2,t];case 4:throw r=i.sent(),t.log("error","Failed to deliver",r),t.stats.increment("delivery_failed"),r;case 5:return[2]}}))}))},e.prototype.enqueuRetry=function(t,e){return!(t instanceof Be&&!1===t.retry)&&this.queue.pushWithBackoff(e)},e.prototype.flush=function(){return mt(this,void 0,void 0,(function(){var t,e;return bt(this,(function(n){switch(n.label){case 0:if(0===this.queue.length||!ge())return[2,[]];if(!(t=this.queue.pop()))return[2,[]];t.attempts=this.queue.getAttempts(t),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deliver(t)];case 2:return t=n.sent(),this.emit("flush",t,!0),[3,4];case 3:return e=n.sent(),this.enqueuRetry(e,t)||(t.setFailedDelivery({reason:e}),this.emit("flush",t,!1)),[2,[]];case 4:return[2,[t]]}}))}))},e.prototype.isReady=function(){return!0},e.prototype.availableExtensions=function(t){var e,n,r=this.plugins.filter((function(e){var n,r,i;if("destination"!==e.type&&"Segment.io"!==e.name)return!0;var o=void 0;return null===(n=e.alternativeNames)||void 0===n||n.forEach((function(e){void 0!==t[e]&&(o=t[e])})),null!==(i=null!==(r=t[e.name])&&void 0!==r?r:o)&&void 0!==i?i:!1!==("Segment.io"===e.name||t.All)})),i=(e="type",n={},r.forEach((function(t){var r,i=void 0;if("string"==typeof e){var o=t[e];i="string"!=typeof o?JSON.stringify(o):o}else e instanceof Function&&(i=e(t));void 0!==i&&(n[i]=_t(_t([],null!==(r=n[i])&&void 0!==r?r:[],!0),[t],!1))})),n),o=i.before,a=void 0===o?[]:o,s=i.enrichment,u=void 0===s?[]:s,c=i.destination,l=void 0===c?[]:c,d=i.after;return{before:a,enrichment:u,destinations:l,after:void 0===d?[]:d}},e.prototype.flushOne=function(t){var e,n,r,i;return mt(this,void 0,void 0,(function(){var o,a,s,u,c,l,d,p,f,h,v,y,g,m;return bt(this,(function(b){switch(b.label){case 0:if(!this.isReady())throw new Error("Not ready");o=this.availableExtensions(null!==(e=t.event.integrations)&&void 0!==e?e:{}),a=o.before,s=o.enrichment,u=0,c=a,b.label=1;case 1:return u<c.length?(l=c[u],[4,zr(t,l)]):[3,4];case 2:(h=b.sent())instanceof Ue&&(t=h),b.label=3;case 3:return u++,[3,1];case 4:d=0,p=s,b.label=5;case 5:return d<p.length?(f=p[d],[4,Nr(t,f)]):[3,8];case 6:(h=b.sent())instanceof Ue&&(t=h),b.label=7;case 7:return d++,[3,5];case 8:return null===(n=Ur.enriched)||void 0===n||n.call(Ur,t),v=this.availableExtensions(null!==(r=t.event.integrations)&&void 0!==r?r:{}),y=v.destinations,g=v.after,[4,new Promise((function(e,n){setTimeout((function(){var r=y.map((function(e){return Nr(t,e)}));Promise.all(r).then(e).catch(n)}),0)}))];case 9:return b.sent(),t.stats.increment("message_delivered"),null===(i=Ur.delivered)||void 0===i||i.call(Ur,t,["segment.io"]),m=g.map((function(e){return Nr(t,e)})),[4,Promise.all(m)];case 10:return b.sent(),[2,t]}}))}))},e}(Ve);function Gr(t){for(var e=t.constructor.prototype,n=0,r=Object.getOwnPropertyNames(e);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,i);o&&"function"==typeof o.value&&(t[i]=t[i].bind(t))}}return t}var Kr={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},Zr=function(){function t(){this.cache={}}return t.prototype.get=function(t){return this.cache[t]},t.prototype.set=function(t,e){return this.cache[t]=e,e},t.prototype.remove=function(t){delete this.cache[t]},t}(),Hr=function(t){function e(n){void 0===n&&(n=e.defaults);var r=t.call(this)||this;return r.options=gt(gt({},e.defaults),n),r}return yt(e,t),e.available=function(){var t=window.navigator.cookieEnabled;return t||(Ae.set("ajs:cookies","test"),t=document.cookie.includes("ajs:cookies"),Ae.remove("ajs:cookies")),t},Object.defineProperty(e,"defaults",{get:function(){return{maxage:365,domain:Fe(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),e.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},e.prototype.get=function(t){try{var e=Ae.get(t);if(!e)return null;try{return JSON.parse(e)}catch(n){return e}}catch(n){return null}},e.prototype.set=function(t,e){return"string"==typeof e?Ae.set(t,e,this.opts()):null===e?Ae.remove(t,this.opts()):Ae.set(t,JSON.stringify(e),this.opts()),e},e.prototype.remove=function(t){return Ae.remove(t,this.opts())},e}(Zr),Wr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.get=function(t){return null},e.set=function(t,e){return null},e.remove=function(t){},e}return yt(e,t),e}(Zr),Jr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return yt(e,t),e.available=function(){var t="test";try{return localStorage.setItem(t,t),localStorage.removeItem(t),!0}catch(e){return!1}},e.prototype.get=function(t){var e=localStorage.getItem(t);if(e)try{return JSON.parse(e)}catch(n){return JSON.parse(JSON.stringify(e))}return null},e.prototype.set=function(t,e){try{localStorage.setItem(t,JSON.stringify(e))}catch(Rr){console.warn("Unable to set ".concat(t," in localStorage, storage may be full."))}return e},e.prototype.remove=function(t){return localStorage.removeItem(t)},e}(Zr),$r=function(){function t(t,e){void 0===t&&(t=Kr);var n,r,i,o,a=this;this.options={},this.id=function(t){var e,n;if(a.options.disable)return null;var r=a.chainGet(a.idKey);void 0!==t&&(a.trySet(a.idKey,t),t!==r&&null!==r&&null!==t&&a.anonymousId(null));return null!==(n=null!==(e=a.chainGet(a.idKey))&&void 0!==e?e:a.cookies.get(Kr.cookie.oldKey))&&void 0!==n?n:null},this.anonymousId=function(t){var e,n;if(a.options.disable)return null;if(void 0===t){var r=null!==(e=a.chainGet(a.anonKey))&&void 0!==e?e:null===(n=a.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===t?(a.trySet(a.anonKey,null),a.chainGet(a.anonKey)):(a.trySet(a.anonKey,null!=t?t:_e()),a.chainGet(a.anonKey))},this.traits=function(t){var e,n;if(!a.options.disable)return null===t&&(t={}),t&&(a.mem.set(a.traitsKey,null!=t?t:{}),a.localStorage.set(a.traitsKey,null!=t?t:{})),null!==(n=null!==(e=a.localStorage.get(a.traitsKey))&&void 0!==e?e:a.mem.get(a.traitsKey))&&void 0!==n?n:{}},this.options=t,this.cookieOptions=e,this.idKey=null!==(r=null===(n=t.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:Kr.cookie.key,this.traitsKey=null!==(o=null===(i=t.localStorage)||void 0===i?void 0:i.key)&&void 0!==o?o:Kr.localStorage.key,this.anonKey="ajs_anonymous_id";var s=!0===t.disable,u=!1!==t.persist;this.localStorage=s||t.localStorageFallbackDisabled||!u||!Jr.available()?new Wr:new Jr,this.cookies=!s&&u&&Hr.available()?new Hr(e):new Wr,this.mem=s?new Wr:new Zr;var c=this.cookies.get(Kr.cookie.oldKey);c&&(c.id&&this.id(c.id),c.traits&&this.traits(c.traits)),Gr(this)}return t.prototype.chainGet=function(t){var e,n,r,i=null!==(r=null!==(n=null!==(e=this.localStorage.get(t))&&void 0!==e?e:this.cookies.get(t))&&void 0!==n?n:this.mem.get(t))&&void 0!==r?r:null;return this.trySet(t,"number"==typeof i?i.toString():i)},t.prototype.trySet=function(t,e){return this.localStorage.set(t,e),this.cookies.set(t,e),this.mem.set(t,e),e},t.prototype.chainClear=function(t){this.localStorage.remove(t),this.cookies.remove(t),this.mem.remove(t)},t.prototype.legacySIO=function(){var t=this.cookies.get("_sio");if(!t)return null;var e=t.split("----");return[e[0],e[1]]},t.prototype.identify=function(t,e){if(!this.options.disable){e=null!=e?e:{};var n=this.id();null!==n&&n!==t||(e=gt(gt({},this.traits()),e)),t&&this.id(t),this.traits(e)}},t.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},t.prototype.reset=function(){this.logout(),this.chainClear(this.idKey),this.chainClear(this.anonKey),this.chainClear(this.traitsKey)},t.prototype.load=function(){return new t(this.options,this.cookieOptions)},t.prototype.save=function(){return!0},t.defaults=Kr,t}(),Yr={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},Qr=function(t){function e(e,n){void 0===e&&(e=Yr);var r=t.call(this,e,n)||this;return r.anonymousId=function(t){},Gr(r),r}return yt(e,t),e}($r),Xr="This is being deprecated and will be not be available in future releases of Analytics JS",ti=Br(),ei=null==ti?void 0:ti.analytics;function ni(){console.warn(Xr)}var ri=function(t){function e(e,n,r,i,o){var a,s,u,c=this;(c=t.call(this)||this)._debug=!1,c.initialized=!1,c.user=function(){return c._user},c.init=c.initialize.bind(c),c.log=ni,c.addIntegrationMiddleware=ni,c.listeners=ni,c.addEventListener=ni,c.removeAllListeners=ni,c.removeListener=ni,c.removeEventListener=ni,c.hasListeners=ni,c.add=ni,c.addIntegration=ni;var l=null==n?void 0:n.cookie,d=null!==(a=null==n?void 0:n.disableClientPersistence)&&void 0!==a&&a;return c.settings=e,c.settings.timeout=null!==(s=c.settings.timeout)&&void 0!==s?s:300,c.queue=null!=r?r:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var n=t?4:1,r=e?new Lr(n,[]):new Fr(n,"event-queue");return new Vr(r)}(null==n?void 0:n.retryQueue,d),c._user=null!=i?i:new $r(d?gt(gt({},null==n?void 0:n.user),{persist:!1}):null==n?void 0:n.user,l).load(),c._group=null!=o?o:new Qr(d?gt(gt({},null==n?void 0:n.group),{persist:!1}):null==n?void 0:n.group,l).load(),c.eventFactory=new Or(c._user),c.integrations=null!==(u=null==n?void 0:n.integrations)&&void 0!==u?u:{},c.options=null!=n?n:{},Gr(c),c}return yt(e,t),e.prototype.track=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n,r,i,o,a,s=this;return bt(this,(function(u){return e=ce.apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],a=this.eventFactory.track(n,r,i,this.integrations),[2,this.dispatch(a,o).then((function(t){return s.emit("track",n,t.event.properties,t.event.options),t}))]}))}))},e.prototype.page=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n,r,i,o,a,s,u=this;return bt(this,(function(c){return e=le.apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=this.eventFactory.page(n,r,i,o,this.integrations),[2,this.dispatch(s,a).then((function(t){return u.emit("page",n,r,t.event.properties,t.event.options),t}))]}))}))},e.prototype.identify=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n,r,i,o,a,s=this;return bt(this,(function(u){return e=de(this._user).apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],this._user.identify(n,r),a=this.eventFactory.identify(this._user.id(),this._user.traits(),i,this.integrations),[2,this.dispatch(a,o).then((function(t){return s.emit("identify",t.event.userId,t.event.traits,t.event.options),t}))]}))}))},e.prototype.group=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(0===e.length)return this._group;var r=de(this._group).apply(void 0,e),i=r[0],o=r[1],a=r[2],s=r[3];this._group.identify(i,o);var u=this._group.id(),c=this._group.traits(),l=this.eventFactory.group(u,c,a,this.integrations);return this.dispatch(l,s).then((function(e){return t.emit("group",e.event.groupId,e.event.traits,e.event.options),e}))},e.prototype.alias=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n,r,i,o,a,s=this;return bt(this,(function(u){return e=pe.apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],a=this.eventFactory.alias(n,r,i,this.integrations),[2,this.dispatch(a,o).then((function(t){return s.emit("alias",n,r,t.event.options),t}))]}))}))},e.prototype.screen=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n,r,i,o,a,s,u=this;return bt(this,(function(c){return e=le.apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=this.eventFactory.screen(n,r,i,o,this.integrations),[2,this.dispatch(s,a).then((function(t){return u.emit("screen",n,r,t.event.properties,t.event.options),t}))]}))}))},e.prototype.trackClick=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n;return bt(this,(function(r){switch(r.label){case 0:return[4,Ct((function(){return U.import("./auto-track-legacy.a46e361b.js")}),void 0)];case 1:return e=r.sent(),[2,(n=e.link).call.apply(n,_t([this],t,!1))]}}))}))},e.prototype.trackLink=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n;return bt(this,(function(r){switch(r.label){case 0:return[4,Ct((function(){return U.import("./auto-track-legacy.a46e361b.js")}),void 0)];case 1:return e=r.sent(),[2,(n=e.link).call.apply(n,_t([this],t,!1))]}}))}))},e.prototype.trackSubmit=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n;return bt(this,(function(r){switch(r.label){case 0:return[4,Ct((function(){return U.import("./auto-track-legacy.a46e361b.js")}),void 0)];case 1:return e=r.sent(),[2,(n=e.form).call.apply(n,_t([this],t,!1))]}}))}))},e.prototype.trackForm=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n;return bt(this,(function(r){switch(r.label){case 0:return[4,Ct((function(){return U.import("./auto-track-legacy.a46e361b.js")}),void 0)];case 1:return e=r.sent(),[2,(n=e.form).call.apply(n,_t([this],t,!1))]}}))}))},e.prototype.register=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n,r=this;return bt(this,(function(i){switch(i.label){case 0:return e=Ue.system(),n=t.map((function(t){return r.queue.register(e,t,r)})),[4,Promise.all(n)];case 1:return i.sent(),[2,e]}}))}))},e.prototype.deregister=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n,r=this;return bt(this,(function(i){switch(i.label){case 0:return e=Ue.system(),n=t.map((function(t){return mt(r,void 0,void 0,(function(){var n;return bt(this,(function(r){return n=this.queue.plugins.find((function(e){return e.name===t})),n?[2,this.queue.deregister(e,n,this)]:(e.log("warn","plugin ".concat(t," not found")),[2])}))}))})),[4,Promise.all(n)];case 1:return i.sent(),[2,e]}}))}))},e.prototype.debug=function(t){return!1===t&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=t,this},e.prototype.reset=function(){this._user.reset(),this._group.reset()},e.prototype.timeout=function(t){this.settings.timeout=t},e.prototype.dispatch=function(t,e){var n;return mt(this,void 0,void 0,(function(){var r,i,o,a,s;return bt(this,(function(u){switch(u.label){case 0:return r=new Ue(t),null===(n=Ur.triggered)||void 0===n||n.call(Ur,r),me()&&!this.options.retryQueue?[2,r]:(i=Date.now(),this.queue.isEmpty()?[4,this.queue.dispatchSingle(r)]:[3,2]);case 1:return o=u.sent(),[3,4];case 2:return[4,this.queue.dispatch(r)];case 3:o=u.sent(),u.label=4;case 4:return a=Date.now()-i,s=this.settings.timeout,e?[4,ve(o,e,Math.max((null!=s?s:300)-a,0),s)]:[3,6];case 5:o=u.sent(),u.label=6;case 6:return this._debug&&o.flush(),[2,o]}}))}))},e.prototype.addSourceMiddleware=function(t){return mt(this,void 0,void 0,(function(){var e=this;return bt(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return mt(e,void 0,void 0,(function(){var e,n,r;return bt(this,(function(i){switch(i.label){case 0:return[4,Ct((function(){return Promise.resolve().then((function(){return bi}))}),void 0)];case 1:return e=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach((function(t){if("destination"===t.type)return n[t.name]=!0})),r=e(t,n),[4,this.register(r)];case 2:return i.sent(),[2]}}))}))}))];case 1:return n.sent(),[2,this]}}))}))},e.prototype.addDestinationMiddleware=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=this.queue.plugins.filter((function(e){return e.name.toLowerCase()===t.toLowerCase()}));return r.forEach((function(t){t.addMiddleware.apply(t,e)})),Promise.resolve(this)},e.prototype.setAnonymousId=function(t){return this._user.anonymousId(t)},e.prototype.queryString=function(t){return mt(this,void 0,void 0,(function(){return bt(this,(function(e){switch(e.label){case 0:return[4,Ct((function(){return U.import("./index-legacy.9eb391ce.js")}),void 0)];case 1:return[2,(0,e.sent().queryString)(this,t)]}}))}))},e.prototype.use=function(t){return t(this),this},e.prototype.ready=function(t){return void 0===t&&(t=function(t){return t}),mt(this,void 0,void 0,(function(){return bt(this,(function(e){return[2,Promise.all(this.queue.plugins.map((function(t){return t.ready?t.ready():Promise.resolve()}))).then((function(e){return t(e),e}))]}))}))},e.prototype.noConflict=function(){return console.warn(Xr),window.analytics=null!=ei?ei:this,this},e.prototype.normalize=function(t){return console.warn(Xr),this.eventFactory.normalize(t)},Object.defineProperty(e.prototype,"failedInitializations",{get:function(){return console.warn(Xr),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"VERSION",{get:function(){return Me},enumerable:!1,configurable:!0}),e.prototype.initialize=function(t,e){return mt(this,void 0,void 0,(function(){return bt(this,(function(t){return console.warn(Xr),[2,Promise.resolve(this)]}))}))},e.prototype.pageview=function(t){return mt(this,void 0,void 0,(function(){return bt(this,(function(e){switch(e.label){case 0:return console.warn(Xr),[4,this.page({path:t})];case 1:return e.sent(),[2,this]}}))}))},Object.defineProperty(e.prototype,"plugins",{get:function(){var t;return console.warn(Xr),null!==(t=this._plugins)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Integrations",{get:function(){return console.warn(Xr),this.queue.plugins.filter((function(t){return"destination"===t.type})).reduce((function(t,e){var n="".concat(e.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return t;var i=r.Integration;return i?(t[e.name]=i,t):(t[e.name]=r,t)}),{})},enumerable:!1,configurable:!0}),e.prototype.push=function(t){var e=t.shift();e&&!this[e]||this[e].apply(this,t)},e}(Ve);function ii(){return"undefined"!=typeof process&&process.env?process.env:{}}var oi,ai=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,si=function(){var t=function(){var t;return null!=oi?oi:null===(t=window.analytics)||void 0===t?void 0:t._cdn}();if(t)return t;var e,n=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach((function(t){var n,r=null!==(n=t.getAttribute("src"))&&void 0!==n?n:"",i=ai.exec(r);i&&i[1]&&(e=i[1])})),e);return n||"https://cdn.segment.com"};z("g",(function(){var t=si();return"".concat(t,"/next-integrations")}));function ui(t,e){var n,r=Object.entries(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(t,e){var n,r,i=e[0],o=e[1];return"object"===$(o)?gt(gt({},t),((n={})[i]=o,n)):gt(gt({},t),((r={})[i]={},r))}),{});return Object.entries(t.integrations).reduce((function(t,e){var n,i=e[0],o=e[1];return gt(gt({},t),((n={})[i]=gt(gt({},o),r[i]),n))}),{})}function ci(){var t=document.getElementsByTagName("link"),e="";return Array.prototype.slice.call(t).forEach((function(t){"canonical"===t.getAttribute("rel")&&(e=t.getAttribute("href"))})),e}function li(){var t=ci();if(!t)return window.location.pathname;var e=document.createElement("a");return e.href=t,e.pathname.startsWith("/")?e.pathname:"/"+e.pathname}function di(t){void 0===t&&(t="");var e=ci();if(e)return e.includes("?")?e:"".concat(e).concat(t);var n=window.location.href,r=n.indexOf("#");return-1===r?n:n.slice(0,r)}function pi(){return{path:li(),referrer:document.referrer,search:location.search,title:document.title,url:di(location.search)}}function fi(t){var e,n=t.event;n.context=n.context||{};var r=pi(),i=null!==(e=n.properties)&&void 0!==e?e:{};return Object.keys(r).forEach((function(t){i[t]&&(r[t]=i[t])})),n.context.page&&(r=Object.assign({},r,n.context.page)),n.context=Object.assign({},n.context,{page:r}),t.event=n,t}var hi={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:function(t){return t.event.properties=Object.assign({},pi(),t.event.properties),t.event.name&&(t.event.properties.name=t.event.name),fi(t)},alias:fi,track:fi,identify:fi,group:fi};function vi(t){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(e){return e.src===t}))}function yi(t,e){var n=vi(t);if(void 0!==n){var r=null==n?void 0:n.getAttribute("status");if("loaded"===r)return Promise.resolve(n);if("loading"===r)return new Promise((function(t,e){n.addEventListener("load",(function(){return t(n)})),n.addEventListener("error",(function(t){return e(t)}))}))}return new Promise((function(n,r){var i,o=window.document.createElement("script");o.type="text/javascript",o.src=t,o.async=!0,o.setAttribute("status","loading");for(var a=0,s=Object.entries(null!=e?e:{});a<s.length;a++){var u=s[a],c=u[0],l=u[1];o.setAttribute(c,l)}o.onload=function(){o.onerror=o.onload=null,o.setAttribute("status","loaded"),n(o)},o.onerror=function(){o.onerror=o.onload=null,o.setAttribute("status","error"),r(new Error("Failed to load ".concat(t)))};var d=window.document.getElementsByTagName("script")[0];null===(i=d.parentElement)||void 0===i||i.insertBefore(o,d)}))}function gi(t,e){var n=new Ge.Facade(t,e);return"track"===t.type&&(n=new Ge.Track(t,e)),"identify"===t.type&&(n=new Ge.Identify(t,e)),"page"===t.type&&(n=new Ge.Page(t,e)),"alias"===t.type&&(n=new Ge.Alias(t,e)),"group"===t.type&&(n=new Ge.Group(t,e)),"screen"===t.type&&(n=new Ge.Screen(t,e)),Object.defineProperty(n,"obj",{value:t,writable:!0}),n}function mi(t,e,n){return mt(this,void 0,void 0,(function(){function r(e,n){return mt(this,void 0,void 0,(function(){var r,i,o;return bt(this,(function(a){switch(a.label){case 0:return r=!1,i=null,[4,fe(n({payload:gi(e,{clone:!0,traverse:!1}),integration:t,next:function(t){r=!0,null===t&&(i=null),t&&(i=t.obj)}}))];case 1:return a.sent(),r||null===i||(i.integrations=gt(gt({},e.integrations),((o={})[t]=!1,o))),[2,i]}}))}))}var i,o,a,s,u;return bt(this,(function(t){switch(t.label){case 0:i=function(t){return JSON.parse(JSON.stringify(t))}(e),o=0,a=n,t.label=1;case 1:return o<a.length?(s=a[o],[4,r(i,s)]):[3,4];case 2:if(null===(u=t.sent()))return[2,null];i=u,t.label=3;case 3:return o++,[3,1];case 4:return[2,i]}}))}))}var bi=Object.freeze(Object.defineProperty({__proto__:null,applyDestinationMiddleware:mi,sourceMiddlewarePlugin:function(t,e){function n(n){return mt(this,void 0,void 0,(function(){var r;return bt(this,(function(i){switch(i.label){case 0:return r=!1,[4,fe(t({payload:gi(n.event,{clone:!0,traverse:!1}),integrations:null!=e?e:{},next:function(t){r=!0,t&&(n.event=t.obj)}}))];case 1:if(i.sent(),!r)throw new Be({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(t.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(t){return Promise.resolve(t)},track:n,page:n,identify:n,alias:n,group:n}}},Symbol.toStringTag,{value:"Module"})),wi=function(){function t(t,e){this.version="1.0.0",this.alternativeNames=[],this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=e,this.name=t,this.type=e.type,this.alternativeNames.push(e.name)}return t.prototype.addMiddleware=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(t=this.middleware).push.apply(t,e)},t.prototype.transform=function(t){return mt(this,void 0,void 0,(function(){var e;return bt(this,(function(n){switch(n.label){case 0:return[4,mi(this.name,t.event,this.middleware)];case 1:return null===(e=n.sent())&&t.cancel(new Be({retry:!1,reason:"dropped by destination middleware"})),[2,new Ue(e)]}}))}))},t.prototype._createMethod=function(t){var e=this;return function(n){return mt(e,void 0,void 0,(function(){var e;return bt(this,(function(r){switch(r.label){case 0:return this.action[t]?[4,this.transform(n)]:[2,n];case 1:return e=r.sent(),[4,this.action[t](e)];case 2:return r.sent(),[2,n]}}))}))}},t.prototype.isLoaded=function(){return this.action.isLoaded()},t.prototype.ready=function(){return this.action.ready?this.action.ready():Promise.resolve()},t.prototype.load=function(t,e){return this.action.load(t,e)},t.prototype.unload=function(t,e){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,t,e)},t}();function xi(t,e,n,r,i){var o,a,s;return mt(this,void 0,void 0,(function(){var u,c,l,d,p=this;return bt(this,(function(f){switch(f.label){case 0:return u=[],c=si(),l=null!==(a=null===(o=t.middlewareSettings)||void 0===o?void 0:o.routingRules)&&void 0!==a?a:[],d=(null!==(s=t.remotePlugins)&&void 0!==s?s:[]).map((function(t){return mt(p,void 0,void 0,(function(){var o,a,s,d,p,f,h,v;return bt(this,(function(y){switch(y.label){case 0:if(!1===e.All&&!e[t.name]||!1===e[t.name])return[2];y.label=1;case 1:if(y.trys.push([1,12,,13]),!r)return[3,7];o=t.url.split("/"),a=o[o.length-2],s=t.url.replace(a,btoa(a).replace(/=/g,"")),y.label=2;case 2:return y.trys.push([2,4,,6]),[4,yi(s.replace("https://cdn.segment.com",c))];case 3:return y.sent(),[3,6];case 4:return y.sent(),[4,yi(t.url.replace("https://cdn.segment.com",c))];case 5:return y.sent(),[3,6];case 6:return[3,9];case 7:return[4,yi(t.url.replace("https://cdn.segment.com",c))];case 8:y.sent(),y.label=9;case 9:return d=t.libraryName,"function"!=typeof window[d]?[3,11]:[4,fe((0,window[d])(gt(gt({},t.settings),n[t.name])))];case 10:p=y.sent(),function(t){if(!Array.isArray(t))throw new Error("Not a valid list of plugins");var e=["load","isLoaded","name","version","type"];t.forEach((function(t){e.forEach((function(e){var n;if(void 0===t[e])throw new Error("Plugin: ".concat(null!==(n=t.name)&&void 0!==n?n:"unknown"," missing required function ").concat(e))}))}))}(f=Array.isArray(p)?p:[p]),h=l.filter((function(e){return e.destinationName===t.creationName})),f.forEach((function(e){var n=new wi(t.creationName,e);h.length&&i&&"destination"===e.type&&n.addMiddleware(i),u.push(n)})),y.label=11;case 11:return[3,13];case 12:return v=y.sent(),console.warn("Failed to load Remote Plugin",v),[3,13];case 13:return[2]}}))}))})),[4,Promise.all(d)];case 1:return f.sent(),[2,u.filter(Boolean)]}}))}))}var _i=Le;"undefined"!=typeof window&&(_i=window.fetch||Le);function Ci(t){return(encodeURI(JSON.stringify(t)).split(/%..|./).length-1)/1024}function Si(t,e){var n,r,i,o,a,s=[],u=!1,c=null!==(n=null==e?void 0:e.size)&&void 0!==n?n:10,l=null!==(r=null==e?void 0:e.timeout)&&void 0!==r?r:5e3;function d(e){var n;if(0!==e.length){var r=null===(n=e[0])||void 0===n?void 0:n.writeKey;return _i("https://".concat(t,"/b"),{keepalive:u,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({batch:e,writeKey:r})})}}function p(){return mt(this,void 0,void 0,(function(){var t;return bt(this,(function(e){return s.length?(t=s,s=[],[2,d(t)]):[2]}))}))}return o=function(){if(u=!0,s.length){var t=function(t){var e=[],n=0;return t.forEach((function(t){Ci(e[n])>=64&&n++,e[n]?e[n].push(t):e[n]=[t]})),e}(s).map(d);Promise.all(t).catch(console.error)}},a=!1,document.addEventListener("pagehide",(function(){a||(a=!0,o())})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(a)return;a=!0,o()}else a=!1})),{dispatch:function(t,e){return mt(this,void 0,void 0,(function(){var t;return bt(this,(function(n){return s.push(e),t=s.length>=c||function(t){return Ci(t)>=450}(s),[2,t||u?p():void(i||(i=setTimeout((function(){i=void 0,p().catch(console.error)}),l)))]}))}))}}}var Ii=Le;"undefined"!=typeof window&&(Ii=window.fetch||Le);var ki=z("p",(function(t,e){return mt(void 0,void 0,void 0,(function(){var n;return bt(this,(function(r){return n=function(r){return mt(void 0,void 0,void 0,(function(){var i;return bt(this,(function(o){switch(o.label){case 0:return t(r)?(i=n,[4,e()]):[3,2];case 1:return[2,i.apply(void 0,[o.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))}));function Oi(t,e){return mt(this,void 0,void 0,(function(){var n,r=this;return bt(this,(function(i){switch(i.label){case 0:return n=[],me()?[2,e]:[4,ki((function(){return e.length>0&&!me()}),(function(){return mt(r,void 0,void 0,(function(){var r,i;return bt(this,(function(o){switch(o.label){case 0:return(r=e.pop())?[4,Nr(r,t)]:[2];case 1:return i=o.sent(),i instanceof Ue||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(t){return e.pushWithBackoff(t)})),[2,e]}}))}))}function Pi(t,e,n,r){var i=this;t||setTimeout((function(){return mt(i,void 0,void 0,(function(){var t,i;return bt(this,(function(o){switch(o.label){case 0:return t=!0,[4,Oi(n,e)];case 1:return i=o.sent(),t=!1,e.todo>0&&r(t,i,n,r),[2]}}))}))}),5e3*Math.random())}function Li(t,e,n){var r,i,o,a,s=t.options.disableClientPersistence?new Lr(t.queue.queue.maxAttempts,[]):new Fr(t.queue.queue.maxAttempts,"dest-Segment.io"),u=null!==(r=null==e?void 0:e.apiHost)&&void 0!==r?r:"api.segment.io/v1",c=null!==(i=null==e?void 0:e.protocol)&&void 0!==i?i:"https",l="".concat(c,"://").concat(u),d="batching"===(null===(o=null==e?void 0:e.deliveryStrategy)||void 0===o?void 0:o.strategy)?Si(u,null===(a=null==e?void 0:e.deliveryStrategy)||void 0===a?void 0:a.config):{dispatch:function(t,e){return Ii(t,{headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(e)})}};function p(r){return mt(this,void 0,void 0,(function(){var i,o;return bt(this,(function(a){return me()?(s.push(r),Pi(false,s,f,Pi),[2,r]):(i=r.event.type.charAt(0),o=gi(r.event).json(),"track"===r.event.type&&delete o.traits,"alias"===r.event.type&&(o=function(t,e){var n,r,i,o,a=t.user();return e.previousId=null!==(i=null!==(r=null!==(n=e.previousId)&&void 0!==n?n:e.from)&&void 0!==r?r:a.id())&&void 0!==i?i:a.anonymousId(),e.userId=null!==(o=e.userId)&&void 0!==o?o:e.to,delete e.from,delete e.to,e}(t,o)),[2,d.dispatch("".concat(l,"/").concat(i),Ne(t,o,e,n)).then((function(){return r})).catch((function(t){return"error"!==t.type&&"Failed to fetch"!==t.message||(s.push(r),Pi(false,s,f,Pi)),r}))])}))}))}var f={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:p,identify:p,page:p,alias:p,group:p};return f}var Mi=function(t,e,n){n.getCalls(t).forEach((function(t){Fi(e,t).catch(console.error)}))},Ei=function(t,e){return mt(void 0,void 0,void 0,(function(){var n,r,i;return bt(this,(function(o){switch(o.label){case 0:n=0,r=e.getCalls("addSourceMiddleware"),o.label=1;case 1:return n<r.length?(i=r[n],[4,Fi(t,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},ji=Mi.bind(globalThis,"on"),Ai=Mi.bind(globalThis,"setAnonymousId"),Ti=function(){function t(){this._value={}}return t.prototype.toArray=function(){var t;return(t=[]).concat.apply(t,Object.values(this._value))},t.prototype.getCalls=function(t){var e;return null!==(e=this._value[t])&&void 0!==e?e:[]},t.prototype.push=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.forEach((function(e){t._value[e.method]?t._value[e.method].push(e):t._value[e.method]=[e]})),this},t.prototype.clear=function(){return this._value={},this},t}();function Fi(t,e){return mt(this,void 0,void 0,(function(){var n,r;return bt(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e.called?[2,void 0]:(e.called=!0,n=t[e.method].apply(t,e.args),Dr(n)?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return e.resolve(n),[3,4];case 3:return r=i.sent(),e.reject(r),[3,4];case 4:return[2]}}))}))}var Di=function(){function t(t){var e=this;this._preInitBuffer=new Ti,this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=Me,this._promise=t(this._preInitBuffer),this._promise.then((function(t){var n=t[0],r=t[1];e.instance=n,e.ctx=r})).catch((function(){}))}return t.prototype.then=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).then.apply(t,e)},t.prototype.catch=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).catch.apply(t,e)},t.prototype.finally=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).finally.apply(t,e)},t.prototype._createMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(e.instance){var o=(n=e.instance)[t].apply(n,r);return Promise.resolve(o)}return new Promise((function(n,i){e._preInitBuffer.push({method:t,args:r,resolve:n,reject:i,called:!1})}))}},t.prototype._createChainableMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.instance?((n=e.instance)[t].apply(n,r),e):(e._preInitBuffer.push({method:t,args:r,resolve:function(){},reject:console.error,called:!1}),e)}},t}();function Ni(t){var e=t[0],n=t.slice(1);return{method:e,resolve:function(){},reject:console.error,args:n,called:!1}}var zi=function(){var t=window.analytics;if(!Array.isArray(t))return[];var e=t.splice(0,t.length);return e.map(Ni)};function Ri(t,e){return mt(this,void 0,void 0,(function(){return bt(this,(function(n){switch(n.label){case 0:return e.push.apply(e,zi()),[4,Ei(t,e)];case 1:return n.sent(),e.push.apply(e,zi()),function(t,e){e.toArray().forEach((function(e){setTimeout((function(){Fi(t,e).catch(console.error)}),0)}))}(t,e),e.clear(),[2]}}))}))}function qi(t,e,n,r,i){var o,a,s;return mt(this,void 0,void 0,(function(){var u,c,l,d,p,f,h,v,y,g,m=this;return bt(this,(function(b){switch(b.label){case 0:return function(t){var e,n,r;return"test"!==ii().NODE_ENV&&(null!==(r=null===(n=null===(e=t.middlewareSettings)||void 0===e?void 0:e.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(t)?[4,Ct((function(){return U.import("./index-legacy.98ea5567.js")}),void 0).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return c=b.sent(),[3,3];case 2:c=void 0,b.label=3;case 3:return u=c,w=t,"test"!==ii().NODE_ENV&&Object.keys(w.integrations).length>1?[4,Ct((function(){return U.import("./index-legacy.0be73293.js")}),void 0).then((function(r){return r.ajsDestinations(t,e.integrations,n,u)}))]:[3,5];case 4:return d=b.sent(),[3,6];case 5:d=[],b.label=6;case 6:return l=d,t.legacyVideoPluginsEnabled?[4,Ct((function(){return U.import("./index-legacy.5bcad02a.js")}),void 0).then((function(t){return t.loadLegacyVideoPlugins(e)}))]:[3,8];case 7:b.sent(),b.label=8;case 8:return(null===(o=n.plan)||void 0===o?void 0:o.track)?[4,Ct((function(){return U.import("./index-legacy.b7a4faaa.js")}),void 0).then((function(e){var r;return e.schemaFilter(null===(r=n.plan)||void 0===r?void 0:r.track,t)}))]:[3,10];case 9:return f=b.sent(),[3,11];case 10:f=void 0,b.label=11;case 11:return p=f,h=ui(t,r),[4,xi(t,e.integrations,h,r.obfuscate,u).catch((function(){return[]}))];case 12:return v=b.sent(),y=_t(_t(_t([ue,hi],i,!0),l,!0),v,!0),p&&y.push(p),!1===(null===(a=n.integrations)||void 0===a?void 0:a.All)&&!n.integrations["Segment.io"]||n.integrations&&!1===n.integrations["Segment.io"]||y.push(Li(e,h["Segment.io"],t.integrations)),[4,e.register.apply(e,y)];case 13:return g=b.sent(),Object.entries(null!==(s=t.enabledMiddleware)&&void 0!==s?s:{}).some((function(t){return t[1]}))?[4,Ct((function(){return U.import("./index-legacy.d5ed91f3.js")}),void 0).then((function(n){var i=n.remoteMiddlewares;return mt(m,void 0,void 0,(function(){var n,o;return bt(this,(function(a){switch(a.label){case 0:return[4,i(g,t,r.obfuscate)];case 1:return n=a.sent(),o=n.map((function(t){return e.addSourceMiddleware(t)})),[2,Promise.all(o)]}}))}))}))]:[3,15];case 14:b.sent(),b.label=15;case 15:return[2,g]}var w}))}))}function Bi(t,e,n){var r,i,o,a,s,u;return void 0===e&&(e={}),mt(this,void 0,void 0,(function(){var c,l,d,p,f,h,v,y,g,m;return bt(this,(function(b){switch(b.label){case 0:return t.cdnURL&&(C=t.cdnURL,window.analytics&&(window.analytics._cdn=C),oi=C),null===(r=t.cdnSettings)||void 0===r?[3,1]:(l=r,[3,3]);case 1:return[4,(w=t.writeKey,x=t.cdnURL,_=null!=x?x:si(),Le("".concat(_,"/v1/projects/").concat(w,"/settings")).then((function(t){return t.ok?t.json():t.text().then((function(t){throw new Error(t)}))})).catch((function(t){throw console.error(t.message),t})))];case 2:l=b.sent(),b.label=3;case 3:return d=null===(o=null===(i=(c=l).integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===o||o,p=gt({retryQueue:d},e),f=new ri(t,p),h=null!==(a=t.plugins)&&void 0!==a?a:[],Ue.initMetrics(c.metrics),function(t,e){e.push.apply(e,zi()),Ai(t,e),ji(t,e)}(f,n),[4,qi(c,f,p,e,h)];case 4:return v=b.sent(),y=null!==(s=window.location.search)&&void 0!==s?s:"",g=null!==(u=window.location.hash)&&void 0!==u?u:"",(m=y.length?y:g.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,f.queryString(m).catch(console.error)]:[3,6];case 5:b.sent(),b.label=6;case 6:return f.initialized=!0,f.emit("initialize",t,e),e.initialPageview&&f.page().catch(console.error),[4,Ri(f,n)];case 7:return b.sent(),[2,[f,v]]}var w,x,_,C}))}))}var Ui=function(t){function e(e){return t.call(this,e)||this}return yt(e,t),e.load=function(t,e){return void 0===e&&(e={}),new this((function(n){return Bi(t,e,n)}))},e.standalone=function(t,n){return e.load({writeKey:t},n).then((function(t){return t[0]}))},e}(Di),Vi=new(function(){function t(){Z(this,t),J(this,"analytics",void 0),this.analytics=Ui.load({writeKey:"c0SISxJpICLXxstkrSppa4uxwYzBQbqf"})}return W(t,[{key:"trackPageLoad",value:function(){this.analytics.page()}},{key:"trackEvent",value:function(t,e){this.analytics.track(t,{event_data:e,environment:"production"})}}]),t}()),Gi=function(t){return t.LC_VIEWED="LC-Viewed",t.LC_CATEGORY_CLICK="LC-Category-Clicked",t.LC_CATEGORY_VIEW="LC-Category-Viewed",t.LC_SCORE_CLICK="LC-Score-Clicked",t.LC_SCORE_VIEW="LC-Score-Viewed",t.LC_TRANSPORT_MODE_CLICK="LC-Transportation-Method-Clicked",t.LC_LONG_DESCRIPTION_CLICK="LC-Long-Description-Clicked",t.LC_LONG_DESCRIPTION_VIEW="LC-Long-Description-Viewed",t.LC_POI_CLICK="LC-POI-Clicked",t.LC_POI_VIEW="LC-POI-Viewed",t.LC_LIST_VIEW_CLICK="LC-List-View-Clicked",t.LC_MAP_VIEW_CLICK="LC-Map-View-Clicked",t.LC_SCORES_LIST_SCROLL="LC-Scores-List-Scroll",t.LC_COMMUTE_CALC_CLICK="LC-Commute-Calc-Clicked",t.LC_COMMUTE_CALC_VIEW="LC-Commute-Calc-Viewed",t.LC_COMMUTE_CALCULATE_CLICK="LC-Commute-Calc-Calculate-Clicked",t.LC_ATTRIBUTION_CLICK="LC-Attribution-Clicked",t}(Gi||{}),Ki=St.createContext({}),Zi=function(){return It.exports.useContext(Ki)},Hi=function(t,e){switch(e.type){case"CATEGORY":return K(K({},t),{},{activeCategory:e.value});case"SCORE":var n=Pt.find((function(n){return""===e.value?n.value===t.activeCategory:n.scores.includes(e.value)})).value;return{activeCategory:n,activeScoreByCategory:K(K({},t.activeScoreByCategory),{},J({},n,e.value))}}},Wi=function(t){var e=t.children,n=window.innerWidth<kt.screenSizes.tablet?{activeCategory:"commute",activeScoreByCategory:{commute:"transit_friendly",amenities:"groceries",character:"quiet",nature:"parks",education:"primary_schools"}}:{activeCategory:"commute",activeScoreByCategory:{commute:"",amenities:"",character:"",nature:"",education:""}},r=B(It.exports.useReducer(Hi,n),2),i=r[0],o=r[1],a=B(It.exports.useState(),2),s=a[0],u=a[1],c=B(It.exports.useState(),2),l=c[0],d=c[1],p=B(It.exports.useState(),2),f=p[0],h=p[1],v=B(It.exports.useState(),2),y=v[0],g=v[1];It.exports.useEffect((function(){s&&Vi.trackEvent(Gi.LC_POI_VIEW,{poi_name:null==s?void 0:s.name,poi_info:null==s?void 0:s.address})}),[s]);var m=i.activeCategory;It.exports.useEffect((function(){Vi.trackEvent(Gi.LC_CATEGORY_VIEW,m)}),[m]);var b=i.activeScoreByCategory[m];It.exports.useEffect((function(){""!==b&&Vi.trackEvent(Gi.LC_SCORE_VIEW,b)}),[b]);var w=function(t){o({type:"SCORE",value:t})},x=function(t){o({type:"CATEGORY",value:t})},_=It.exports.useMemo((function(){return{activeScore:b,setActiveScore:w,activeCategory:m,setActiveCategory:x,activePOI:s,setActivePOI:u,hoveredPOI:l,setHoveredPOI:d,commuteGeojson:f,setCommuteGeojson:h,destination:y,setDestination:g}}),[b,w,m,x,s,u,l,d,f,h,y,g]);return Ot(Ki.Provider,{value:_,children:e})};function Ji(t,e){if(!t)throw new Error(e)}var $i=0;function Yi(t){var e=It.exports.useContext(V).map.getMap(),n=It.exports.useRef(t),r=B(It.exports.useState(0),2)[1],i=It.exports.useMemo((function(){return t.id||"jsx-source-".concat($i++)}),[]);It.exports.useEffect((function(){if(e){var t=function(){return r((function(t){return t+1}))};return e.on("styledata",t),t(),function(){var n;if(e.off("styledata",t),e.style&&e.style._loaded&&e.getSource(i)){var r=null===(n=e.getStyle())||void 0===n?void 0:n.layers;if(r){var o,a=q(r);try{for(a.s();!(o=a.n()).done;){var s=o.value;s.source===i&&e.removeLayer(s.id)}}catch(ps){a.e(ps)}finally{a.f()}}e.removeSource(i)}}}}),[e]);var o=e&&e.style&&e.getSource(i);return o?function(t,e,n){Ji(e.id===n.id,"source id changed"),Ji(e.type===n.type,"source type changed");var r="",i=0;for(var o in e)"children"===o||"id"===o||G(n[o],e[o])||(r=o,i++);if(i){var a=e.type;if("geojson"===a)t.setData(e.data);else if("image"===a)t.updateImage({url:e.url,coordinates:e.coordinates});else if("canvas"!==a&&"video"!==a||1!==i||"coordinates"!==r)if("vector"===a&&"setUrl"in t)switch(r){case"url":t.setUrl(e.url);break;case"tiles":t.setTiles(e.tiles)}else console.warn("Unable to update <Source> prop: ".concat(r));else t.setCoordinates(e.coordinates)}}(o,t,n.current):o=function(t,e,n){if(t.style&&t.style._loaded){var r=K({},n);return delete r.id,delete r.children,t.addSource(e,r),t.getSource(e)}return null}(e,i,t),n.current=t,o&&It.exports.Children.map(t.children,(function(t){return t&&It.exports.cloneElement(t,{source:i})}))||null}var Qi=0;function Xi(t){var e=It.exports.useContext(V).map.getMap(),n=It.exports.useRef(t),r=B(It.exports.useState(0),2)[1],i=It.exports.useMemo((function(){return t.id||"jsx-layer-".concat(Qi++)}),[]);if(It.exports.useEffect((function(){if(e){var t=function(){return r((function(t){return t+1}))};return e.on("styledata",t),t(),function(){e.off("styledata",t),e.style&&e.style._loaded&&e.getLayer(i)&&e.removeLayer(i)}}}),[e]),e&&e.style&&e.getLayer(i))try{!function(t,e,n,r){if(Ji(n.id===r.id,"layer id changed"),Ji(n.type===r.type,"layer type changed"),"custom"!==n.type&&"custom"!==r.type){var i=n.layout,o=void 0===i?{}:i,a=n.paint,s=void 0===a?{}:a,u=n.filter,c=n.minzoom,l=n.maxzoom,d=n.beforeId;if(d!==r.beforeId&&t.moveLayer(e,d),o!==r.layout){var p=r.layout||{};for(var f in o)G(o[f],p[f])||t.setLayoutProperty(e,f,o[f]);for(var h in p)o.hasOwnProperty(h)||t.setLayoutProperty(e,h,void 0)}if(s!==r.paint){var v=r.paint||{};for(var y in s)G(s[y],v[y])||t.setPaintProperty(e,y,s[y]);for(var g in v)s.hasOwnProperty(g)||t.setPaintProperty(e,g,void 0)}G(u,r.filter)||t.setFilter(e,u),c===r.minzoom&&l===r.maxzoom||t.setLayerZoomRange(e,c,l)}}(e,i,t,n.current)}catch(o){console.warn(o)}else!function(t,e,n){if(t.style&&t.style._loaded&&(!("source"in n)||t.getSource(n.source))){var r=K(K({},n),{},{id:e});delete r.beforeId,t.addLayer(r,n.beforeId)}}(e,i,t);return n.current=t,null}function to(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function eo(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!no(t[0])||!no(t[1]))throw new Error("coordinates must contain numbers");return to({type:"Point",coordinates:t},e,n)}function no(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function ro(t,e,n){if(null!==t)for(var r,i,o,a,s,u,c,l,d=0,p=0,f=t.type,h="FeatureCollection"===f,v="Feature"===f,y=h?t.features.length:1,g=0;g<y;g++){s=(l=!!(c=h?t.features[g].geometry:v?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var m=0;m<s;m++){var b=0,w=0;if(null!==(a=l?c.geometries[m]:c)){u=a.coordinates;var x=a.type;switch(d=!n||"Polygon"!==x&&"MultiPolygon"!==x?0:1,x){case null:break;case"Point":if(!1===e(u,p,g,b,w))return!1;p++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(!1===e(u[r],p,g,b,w))return!1;p++,"MultiPoint"===x&&b++}"LineString"===x&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-d;i++){if(!1===e(u[r][i],p,g,b,w))return!1;p++}"MultiLineString"===x&&b++,"Polygon"===x&&w++}"Polygon"===x&&b++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(w=0,i=0;i<u[r].length;i++){for(o=0;o<u[r][i].length-d;o++){if(!1===e(u[r][i][o],p,g,b,w))return!1;p++}w++}b++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===ro(a.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function io(t){var e=[1/0,1/0,-1/0,-1/0];return ro(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}io.default=io;var oo=/^\s+|\s+$/g,ao=/^[-+]0x[0-9a-f]+$/i,so=/^0b[01]+$/i,uo=/^0o[0-7]+$/i,co=parseInt,lo="object"==$(wt)&&wt&&wt.Object===Object&&wt,po="object"==("undefined"==typeof self?"undefined":$(self))&&self&&self.Object===Object&&self,fo=lo||po||Function("return this")(),ho=Object.prototype.toString,vo=Math.max,yo=Math.min,go=function(){return fo.Date.now()};function mo(t){var e=$(t);return!!t&&("object"==e||"function"==e)}function bo(t){return"symbol"==$(t)||function(t){return!!t&&"object"==$(t)}(t)&&"[object Symbol]"==ho.call(t)}function wo(t){if("number"==typeof t)return t;if(bo(t))return NaN;if(mo(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=mo(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(oo,"");var n=so.test(t);return n||uo.test(t)?co(t.slice(2),n?2:8):ao.test(t)?NaN:+t}var xo=function(t,e,n){var r,i,o,a,s,u,c=0,l=!1,d=!1,p=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(e){var n=r,o=i;return r=i=void 0,c=e,a=t.apply(o,n)}function h(t){return c=t,s=setTimeout(y,e),l?f(t):a}function v(t){var n=t-u;return void 0===u||n>=e||n<0||d&&t-c>=o}function y(){var t=go();if(v(t))return g(t);s=setTimeout(y,function(t){var n=e-(t-u);return d?yo(n,o-(t-c)):n}(t))}function g(t){return s=void 0,p&&r?f(t):(r=i=void 0,a)}function m(){var t=go(),n=v(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return h(u);if(d)return s=setTimeout(y,e),f(u)}return void 0===s&&(s=setTimeout(y,e)),a}return e=wo(e)||0,mo(n)&&(l=!!n.leading,o=(d="maxWait"in n)?vo(wo(n.maxWait)||0,e):o,p="trailing"in n?!!n.trailing:p),m.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},m.flush=function(){return void 0===s?a:g(go())},m},_o=function(){var t=B(It.exports.useState(!1),2),e=t[0],n=t[1];return It.exports.useLayoutEffect((function(){var t=function(){n(window.innerWidth<kt.screenSizes.tablet)};return window.addEventListener("resize",xo(t,250)),t(),function(){return window.removeEventListener("resize",t)}}),[]),e};function Co(){var t,e=Lt().client,n=Mt().sdkState,r=Et(n.options,250),i=Zi().activeScore,o=i?jt[i]:void 0,a=K(K({},It.exports.useMemo((function(){return!(null==r||!r.marker)?r.marker:{lat:null==r?void 0:r.lat,lng:null==r?void 0:r.lng}}),[r])),{},{limit:10,radius:2e3,include:o});return H(Y.list(a),R(N().mark((function t(){return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.getPois(a));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!(a&&null!==(t=a.include)&&void 0!==t&&t.length&&a.lat&&a.lng)})}function So(){var t=Lt().client,e=Mt().sdkState,n=Et(e.options,250),r=Zi().activeScore,i="high_schools"===r||"primary_schools"===r,o=K(K({},It.exports.useMemo((function(){return!(null==n||!n.marker)?n.marker:{lat:null==n?void 0:n.lat,lng:null==n?void 0:n.lng}}),[n])),{},{limit:10,radius:2e3});return H(Q.list(o),R(N().mark((function e(){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.getSchools(o));case 1:case"end":return e.stop()}}),e)}))),{enabled:!!o&&!!o.lat&&!!o.lng&&i})}var Io=St.createContext({}),ko=function(){return It.exports.useContext(Io)},Oo=function(t){var e=t.children,n=t.mapRef,r=t.mapPadding;return Ot(Io.Provider,{value:{mapRef:n,mapPadding:r},children:e})};function Po(t,e,n,r,i,o){if(!(i-r<=n)){var a=r+i>>1;Lo(t,e,a,r,i,o%2),Po(t,e,n,r,a-1,o+1),Po(t,e,n,a+1,i,o+1)}}function Lo(t,e,n,r,i,o){for(;i>r;){if(i-r>600){var a=i-r+1,s=n-r+1,u=Math.log(a),c=.5*Math.exp(2*u/3),l=.5*Math.sqrt(u*c*(a-c)/a)*(s-a/2<0?-1:1);Lo(t,e,n,Math.max(r,Math.floor(n-s*c/a+l)),Math.min(i,Math.floor(n+(a-s)*c/a+l)),o)}var d=e[2*n+o],p=r,f=i;for(Mo(t,e,r,n),e[2*i+o]>d&&Mo(t,e,r,i);p<f;){for(Mo(t,e,p,f),p++,f--;e[2*p+o]<d;)p++;for(;e[2*f+o]>d;)f--}e[2*r+o]===d?Mo(t,e,r,f):Mo(t,e,++f,i),f<=n&&(r=f+1),n<=f&&(i=f-1)}}function Mo(t,e,n,r){Eo(t,n,r),Eo(e,2*n,2*r),Eo(e,2*n+1,2*r+1)}function Eo(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function jo(t,e,n,r){var i=t-n,o=e-r;return i*i+o*o}var Ao,To=function(t){return t[0]},Fo=function(t){return t[1]},Do=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:To,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Fo,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:64,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Float64Array;Z(this,t),this.nodeSize=i,this.points=e;for(var a=e.length<65536?Uint16Array:Uint32Array,s=this.ids=new a(e.length),u=this.coords=new o(2*e.length),c=0;c<e.length;c++)s[c]=c,u[2*c]=n(e[c]),u[2*c+1]=r(e[c]);Po(s,u,i,0,s.length-1,0)}return W(t,[{key:"range",value:function(t,e,n,r){return function(t,e,n,r,i,o,a){for(var s,u,c=[0,t.length-1,0],l=[];c.length;){var d=c.pop(),p=c.pop(),f=c.pop();if(p-f<=a)for(var h=f;h<=p;h++)s=e[2*h],u=e[2*h+1],s>=n&&s<=i&&u>=r&&u<=o&&l.push(t[h]);else{var v=Math.floor((f+p)/2);s=e[2*v],u=e[2*v+1],s>=n&&s<=i&&u>=r&&u<=o&&l.push(t[v]);var y=(d+1)%2;(0===d?n<=s:r<=u)&&(c.push(f),c.push(v-1),c.push(y)),(0===d?i>=s:o>=u)&&(c.push(v+1),c.push(p),c.push(y))}}return l}(this.ids,this.coords,t,e,n,r,this.nodeSize)}},{key:"within",value:function(t,e,n){return function(t,e,n,r,i,o){for(var a=[0,t.length-1,0],s=[],u=i*i;a.length;){var c=a.pop(),l=a.pop(),d=a.pop();if(l-d<=o)for(var p=d;p<=l;p++)jo(e[2*p],e[2*p+1],n,r)<=u&&s.push(t[p]);else{var f=Math.floor((d+l)/2),h=e[2*f],v=e[2*f+1];jo(h,v,n,r)<=u&&s.push(t[f]);var y=(c+1)%2;(0===c?n-i<=h:r-i<=v)&&(a.push(d),a.push(f-1),a.push(y)),(0===c?n+i>=h:r+i>=v)&&(a.push(f+1),a.push(l),a.push(y))}}return s}(this.ids,this.coords,t,e,n,this.nodeSize)}}]),t}(),No={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},zo=Math.fround||(Ao=new Float32Array(1),function(t){return Ao[0]=+t,Ao[0]}),Ro=function(){function t(e){Z(this,t),this.options=Ho(Object.create(No),e),this.trees=new Array(this.options.maxZoom+1)}return W(t,[{key:"load",value:function(t){var e=this.options,n=e.log,r=e.minZoom,i=e.maxZoom,o=e.nodeSize;n&&console.time("total time");var a="prepare ".concat(t.length," points");n&&console.time(a),this.points=t;for(var s=[],u=0;u<t.length;u++)t[u].geometry&&s.push(Bo(t[u],u));this.trees[i+1]=new Do(s,Wo,Jo,o,Float32Array),n&&console.timeEnd(a);for(var c=i;c>=r;c--){var l=+Date.now();s=this._cluster(s,c),this.trees[c]=new Do(s,Wo,Jo,o,Float32Array),n&&console.log("z%d: %d clusters in %dms",c,s.length,+Date.now()-l)}return n&&console.timeEnd("total time"),this}},{key:"getClusters",value:function(t,e){var n=((t[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,i=180;else if(n>i){var a=this.getClusters([n,r,180,o],e),s=this.getClusters([-180,r,i,o],e);return a.concat(s)}var u,c=this.trees[this._limitZoom(e)],l=[],d=q(c.range(Go(n),Ko(o),Go(i),Ko(r)));try{for(d.s();!(u=d.n()).done;){var p=u.value,f=c.points[p];l.push(f.numPoints?Uo(f):this.points[f.index])}}catch(ps){d.e(ps)}finally{d.f()}return l}},{key:"getChildren",value:function(t){var e=this._getOriginId(t),n=this._getOriginZoom(t),r="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(r);var o=i.points[e];if(!o)throw new Error(r);var a,s=this.options.radius/(this.options.extent*Math.pow(2,n-1)),u=[],c=q(i.within(o.x,o.y,s));try{for(c.s();!(a=c.n()).done;){var l=a.value,d=i.points[l];d.parentId===t&&u.push(d.numPoints?Uo(d):this.points[d.index])}}catch(ps){c.e(ps)}finally{c.f()}if(0===u.length)throw new Error(r);return u}},{key:"getLeaves",value:function(t,e,n){e=e||10,n=n||0;var r=[];return this._appendLeaves(r,t,e,n,0),r}},{key:"getTile",value:function(t,e,n){var r=this.trees[this._limitZoom(t)],i=Math.pow(2,t),o=this.options,a=o.extent,s=o.radius/a,u=(n-s)/i,c=(n+1+s)/i,l={features:[]};return this._addTileFeatures(r.range((e-s)/i,u,(e+1+s)/i,c),r.points,e,n,i,l),0===e&&this._addTileFeatures(r.range(1-s/i,u,1,c),r.points,i,n,i,l),e===i-1&&this._addTileFeatures(r.range(0,u,s/i,c),r.points,-1,n,i,l),l.features.length?l:null}},{key:"getClusterExpansionZoom",value:function(t){for(var e=this._getOriginZoom(t)-1;e<=this.options.maxZoom;){var n=this.getChildren(t);if(e++,1!==n.length)break;t=n[0].properties.cluster_id}return e}},{key:"_appendLeaves",value:function(t,e,n,r,i){var o,a=q(this.getChildren(e));try{for(a.s();!(o=a.n()).done;){var s=o.value,u=s.properties;if(u&&u.cluster?i+u.point_count<=r?i+=u.point_count:i=this._appendLeaves(t,u.cluster_id,n,r,i):i<r?i++:t.push(s),t.length===n)break}}catch(ps){a.e(ps)}finally{a.f()}return i}},{key:"_addTileFeatures",value:function(t,e,n,r,i,o){var a,s=q(t);try{for(s.s();!(a=s.n()).done;){var u=e[a.value],c=u.numPoints,l=void 0,d=void 0,p=void 0;if(c)l=Vo(u),d=u.x,p=u.y;else{var f=this.points[u.index];l=f.properties,d=Go(f.geometry.coordinates[0]),p=Ko(f.geometry.coordinates[1])}var h={type:1,geometry:[[Math.round(this.options.extent*(d*i-n)),Math.round(this.options.extent*(p*i-r))]],tags:l},v=void 0;c?v=u.id:this.options.generateId?v=u.index:this.points[u.index].id&&(v=this.points[u.index].id),void 0!==v&&(h.id=v),o.features.push(h)}}catch(ps){s.e(ps)}finally{s.f()}}},{key:"_limitZoom",value:function(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}},{key:"_cluster",value:function(t,e){for(var n=[],r=this.options,i=r.radius,o=r.extent,a=r.reduce,s=r.minPoints,u=i/(o*Math.pow(2,e)),c=0;c<t.length;c++){var l=t[c];if(!(l.zoom<=e)){l.zoom=e;var d,p=this.trees[e+1],f=p.within(l.x,l.y,u),h=l.numPoints||1,v=h,y=q(f);try{for(y.s();!(d=y.n()).done;){var g=d.value,m=p.points[g];m.zoom>e&&(v+=m.numPoints||1)}}catch(ps){y.e(ps)}finally{y.f()}if(v>h&&v>=s){var b,w=l.x*h,x=l.y*h,_=a&&h>1?this._map(l,!0):null,C=(c<<5)+(e+1)+this.points.length,S=q(f);try{for(S.s();!(b=S.n()).done;){var I=b.value,k=p.points[I];if(!(k.zoom<=e)){k.zoom=e;var O=k.numPoints||1;w+=k.x*O,x+=k.y*O,k.parentId=C,a&&(_||(_=this._map(l,!0)),a(_,this._map(k)))}}}catch(ps){S.e(ps)}finally{S.f()}l.parentId=C,n.push(qo(w/v,x/v,C,v,_))}else if(n.push(l),v>1){var P,L=q(f);try{for(L.s();!(P=L.n()).done;){var M=P.value,E=p.points[M];E.zoom<=e||(E.zoom=e,n.push(E))}}catch(ps){L.e(ps)}finally{L.f()}}}}return n}},{key:"_getOriginId",value:function(t){return t-this.points.length>>5}},{key:"_getOriginZoom",value:function(t){return(t-this.points.length)%32}},{key:"_map",value:function(t,e){if(t.numPoints)return e?Ho({},t.properties):t.properties;var n=this.points[t.index].properties,r=this.options.map(n);return e&&r===n?Ho({},r):r}}]),t}();function qo(t,e,n,r,i){return{x:zo(t),y:zo(e),zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function Bo(t,e){var n=B(t.geometry.coordinates,2),r=n[0],i=n[1];return{x:zo(Go(r)),y:zo(Ko(i)),zoom:1/0,index:e,parentId:-1}}function Uo(t){return{type:"Feature",id:t.id,properties:Vo(t),geometry:{type:"Point",coordinates:[(e=t.x,360*(e-.5)),Zo(t.y)]}};var e}function Vo(t){var e=t.numPoints,n=e>=1e4?"".concat(Math.round(e/1e3),"k"):e>=1e3?"".concat(Math.round(e/100)/10,"k"):e;return Ho(Ho({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function Go(t){return t/360+.5}function Ko(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function Zo(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function Ho(t,e){for(var n in e)t[n]=e[n];return t}function Wo(t){return t.x}function Jo(t){return t.y}var $o=Object.prototype.hasOwnProperty;function Yo(t,e,n){var r,i=q(t.keys());try{for(i.s();!(r=i.n()).done;)if(Qo(n=r.value,e))return n}catch(ps){i.e(ps)}finally{i.f()}}function Qo(t,e){var n,r,i;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((r=t.length)===e.length)for(;r--&&Qo(t[r],e[r]););return-1===r}if(n===Set){if(t.size!==e.size)return!1;var o,a=q(t);try{for(a.s();!(o=a.n()).done;){if((i=r=o.value)&&"object"===$(i)&&!(i=Yo(e,i)))return!1;if(!e.has(i))return!1}}catch(ps){a.e(ps)}finally{a.f()}return!0}if(n===Map){if(t.size!==e.size)return!1;var s,u=q(t);try{for(u.s();!(s=u.n()).done;){if((i=(r=s.value)[0])&&"object"===$(i)&&!(i=Yo(e,i)))return!1;if(!Qo(r[1],e.get(i)))return!1}}catch(ps){u.e(ps)}finally{u.f()}return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((r=t.byteLength)===e.byteLength)for(;r--&&t.getInt8(r)===e.getInt8(r););return-1===r}if(ArrayBuffer.isView(t)){if((r=t.byteLength)===e.byteLength)for(;r--&&t[r]===e[r];);return-1===r}if(!n||"object"===$(t)){for(n in r=0,t){if($o.call(t,n)&&++r&&!$o.call(e,n))return!1;if(!(n in e)||!Qo(t[n],e[n]))return!1}return Object.keys(e).length===r}}return t!=t&&e!=e}function Xo(t,e){return It.exports.useEffect(t,(n=e,r=It.exports.useRef(n),i=It.exports.useRef(0),Qo(n,r.current)||(r.current=n,i.current+=1),It.exports.useMemo((function(){return r.current}),[i.current])));var n,r,i}var ta=At.div(t||(t=D(["\n border-radius: 50%;\n background: linear-gradient(\n to top,\n ",",\n ","\n );\n color: ",";\n height: ","px;\n width: ","px;\n display: flex;\n justify-content: center;\n align-items: center;\n line-height: 1;\n font-family: ",";\n font-size: ","px;\n border: 2px solid #fff;\n box-shadow: ",";\n cursor: default;\n"])),Tt["--ll-color-primary-variant1"],Tt["--ll-color-primary"],Tt["--ll-color-on-primary"],(function(t){return t.diameter}),(function(t){return t.diameter}),Tt["--ll-font-family"],(function(t){return t.diameter/2.5}),Tt["--ll-shadow-small"]),ea=function(t){var e=t.cluster,n=t.pointsCount,r=t.onClick,i=e.properties.point_count;return Ot(ta,{diameter:20+i/n*25,onClick:function(){return r&&r(e)},children:e.properties.point_count})};var na=St.memo((function(t){var e,n=t.rect,r=t.zoom,i=t.mapRef,o=t.points,a=t.isMobile,s=t.activePOI,u=t.hoveredPOI,c=t.isMapMoving,l=t.setActivePOI,d=null==i||null===(e=i.current)||void 0===e?void 0:e.getMap().getBounds().toArray().flat(),p=function(t){var e=t.points,n=t.bounds,r=t.zoom,i=t.options,o=It.exports.useRef(),a=It.exports.useRef(),s=It.exports.useState([]),u=s[0],c=s[1],l=Math.round(r);return Xo((function(){o.current&&Qo(a.current,e)&&Qo(o.current.options,i)||(o.current=new Ro(i),o.current.load(e)),n&&c(o.current.getClusters(n,l)),a.current=e}),[e,n,l,i]),{clusters:u,supercluster:o.current}}({points:o,bounds:d,zoom:r,options:{radius:50,maxZoom:18}}),f=p.clusters,h=p.supercluster;return Ot(Ft,{children:f.map((function(t,e){var r=B(t.geometry.coordinates,2),d=r[0],p=r[1];if(function(t){return void 0!==t.properties.cluster}(t))return Ot(X,{latitude:p,longitude:d,children:Ot(ea,{cluster:t,pointsCount:o.length,onClick:function(){var e,n=Math.min(h.getClusterExpansionZoom(t.id),20);null===(e=i.current)||void 0===e||e.flyTo({zoom:n,center:[d,p],duration:1e3,essential:!0})}})},"cluster-".concat(t.id));var f=t.properties,v=f.poi,y=f.type,g=s===v,m=u===v;return Ot(X,{latitude:v.lat,longitude:v.lng,style:{zIndex:g?1:0},children:Dt(Nt.Root,{options:{type:y,poi:v,isOpen:!c&&g,isHovered:m,side:"top",size:["rapid_transit_stations"].includes(y)?"medium":"small",collisionPadding:a?{top:n.height+32,bottom:2*zt,left:2*zt,right:2*zt}:{left:n.width+32,right:2*zt,top:2*zt,bottom:2*zt}},onChange:function(t){"open-change"===t.type&&(t.data?setTimeout((function(){l(v)}),0):g&&l(void 0))},children:[Ot(Nt.Marker,{}),Ot(Nt.Content,{})]})},"".concat(v.name,"-").concat(v.lat,"-").concat(v.lng,"-").concat(e))}))})}));na.displayName="Markers";var ra=function(t){return It.exports.createElement("svg",K({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t),It.exports.createElement("path",{d:"M12 2C8.13 2 5 5.13 5 9C5 14.25 12 22 12 22C12 22 19 14.25 19 9C19 5.13 15.87 2 12 2ZM12 11.5C10.62 11.5 9.5 10.38 9.5 9C9.5 7.62 10.62 6.5 12 6.5C13.38 6.5 14.5 7.62 14.5 9C14.5 10.38 13.38 11.5 12 11.5Z"}))},ia=function(t){return It.exports.createElement("svg",K({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),It.exports.createElement("path",{d:"M10 20V14H14V20H19V12H22L12 3L2 12H5V20H10Z"}))};function oa(t){var e=Lt().client,n=Mt().sdkState,r=Et(n.options,250),i=K(K({},It.exports.useMemo((function(){return!(null==r||!r.marker)?r.marker:{lat:null==r?void 0:r.lat,lng:null==r?void 0:r.lng}}),[r])),{},{geographyLevels:["20","30"],locationScoresRounding:!1,include:t});return H(tt.list(i),R(N().mark((function t(){return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.getScores(i));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!i})}var aa=At.div(e||(e=D(["\n padding: "," ",";\n background-color: ",";\n display: flex;\n flex-direction: column;\n overflow: hidden;\n flex: 1;\n"])),Tt["--ll-spacing-small"],Tt["--ll-spacing-medium"],Tt["--ll-color-surface"]),sa=At.div(n||(n=D(["\n display: grid;\n grid-template-columns: min-content 1fr;\n grid-gap: ",";\n margin-bottom: ",";\n"])),Tt["--ll-spacing-medium"],Tt["--ll-spacing-medium"]),ua=function(){var t,e,n=Mt().sdkState,r=Zi(),i=r.activeCategory,o=r.activeScore,a=oa(Pt.find((function(t){return t.value===i})).scores),s=a.data,u=a.isLoading;return o&&null!=s&&s.location[o]?u?Ot("div",{children:"Loading"}):Ot(Rt.Root,{options:{score:o,scoresData:s},children:Dt(aa,{children:[Dt(sa,{children:[Ot(Rt.Badge,{}),Ot(Rt.BarChart,{options:{locationIcon:"pin"===(null===(t=n.options)||void 0===t||null===(e=t.marker)||void 0===e?void 0:e.icon)?ra:ia}})]}),Ot(Rt.Description,{})]})}):null},ca=At.div(r||(r=D(["\n display: flex;\n overflow-x: scroll;\n padding: "," ",";\n flex-shrink: 0;\n position: relative;\n"])),Tt["--ll-spacing-x-small"],Tt["--ll-spacing-medium"]),la=At.button(i||(i=D(["\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n background: none;\n border: none;\n min-width: 60px;\n padding: 0;\n margin: 0 8px;\n flex-shrink: 0;\n\n &:first-child {\n margin-left: 0;\n }\n\n &:last-child {\n margin-right: 0;\n }\n"]))),da=At.div(o||(o=D(["\n position: absolute;\n top: -6px;\n right: 4px;\n border: 2px solid ",";\n border-radius: 6px;\n"])),Tt["--ll-color-background"]),pa=At.div(a||(a=D(["\n flex: 1;\n display: flex;\n align-items: center;\n"]))),fa=At.div(s||(s=D(["\n margin: 0 2px;\n"]))),ha=function(t){var e=t.category,n=oa(e.scores),r=n.data,i=n.isLoading,o=n.isFetching,a=Zi(),s=a.activeScore,u=a.setActiveScore,c=a.setActiveCategory;return Ot(ca,{children:e.scores.map((function(t){var n=t===s,a=n?"--ll-color-primary":"--ll-color-disabled";return i||o?Ot(fa,{children:Ot(qt,{height:"44px",width:"60px"})},t):Ot(Rt.Root,{options:{score:t,scoresData:r},children:Dt(la,{onClick:function(){c(e.value),u(t)},children:[Ot(Rt.Icon,{options:{color:a,height:28,width:28}}),Ot(pa,{children:Ot(Rt.Title,{options:{variant:"caption1",color:a,noWrap:!0,noMargin:!0,weight:"--ll-font-weight-bold"}})}),Ot(da,{children:Ot(Rt.Badge,{options:{variant:"small",isPrimary:n}})})]})},t)}))})},va=At.div(u||(u=D(["\n display: flex;\n padding: "," ","\n "," ",";\n"])),Tt["--ll-spacing-x-small"],Tt["--ll-spacing-medium"],Tt["--ll-spacing-xx-small"],Tt["--ll-spacing-medium"]),ya=At.div(c||(c=D(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n z-index: 3;\n box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n background-color: ",";\n border: 1px solid ",";\n"])),Tt["--ll-color-background"],Tt["--ll-color-border"]),ga=St.forwardRef((function(t,e){var n=Zi(),r=n.activeCategory,i=n.setActiveCategory;return Dt(ya,{ref:e,children:[Ot(va,{children:Dt(Bt.Root,{value:r,onValueChange:function(t){return i(t)},children:[Ot(Bt.Trigger,{size:"large",children:Ot(Ut.Root,{options:{scoreCategory:r},children:Ot(Ut.Title,{options:{color:"inherit",noMargin:!0,variant:"h6",lineHeight:1}})},r)}),Ot(Bt.Content,{children:Pt.map((function(t){return Ot(Ut.Root,{options:{scoreCategory:t.value},children:Ot(Bt.Item,{value:t.value,children:Ot(Ut.Title,{options:{color:"inherit",noMargin:!0,variant:"h6"}})})},t.value)}))})]})}),Ot(ha,{category:Pt.find((function(t){return t.value===r}))}),Ot(ua,{})]})}));ga.displayName="MobileScores";var ma=Vt({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),ba=Vt({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),wa=At(et)(l||(l=D(["\n margin: 0;\n z-index: 1;\n position: relative;\n margin: 0 calc(-1 * ",");\n padding: 0 ",";\n\n &:hover {\n background-color: ",";\n box-shadow: ",";\n }\n"])),Tt["--ll-spacing-medium"],Tt["--ll-spacing-medium"],Tt["--ll-color-surface"],Tt["--ll-shadow-small"]),xa=At(nt)(d||(d=D(["\n background: none;\n border: none;\n display: flex;\n align-items: center;\n width: 100%;\n padding: "," 0;\n"])),Tt["--ll-spacing-x-small"]),_a=At(rt)(p||(p=D(["\n background-color: ",";\n position: relative;\n overflow: hidden;\n margin-left: calc(-1 * ",");\n margin-right: calc(-1 * ",');\n\n [data-state="open"] & {\n animation: ',' 300ms cubic-bezier(0.87, 0, 0.13, 1);\n }\n\n [data-state="closed"] & {\n animation: '," 300ms cubic-bezier(0.87, 0, 0.13, 1);\n }\n"])),Tt["--ll-color-surface"],Tt["--ll-spacing-medium"],Tt["--ll-spacing-medium"],ma,ba),Ca=At.div(f||(f=D(["\n padding: ",";\n border-top: 1px solid ",";\n border-bottom: 1px solid ",";\n"])),Tt["--ll-spacing-medium"],Tt["--ll-color-border"],Tt["--ll-color-border"]),Sa=At.span(h||(h=D(["\n ","[data-state=open] & {\n transform: rotate(90deg);\n } ;\n"])),xa);At.div(v||(v=D(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n"])));var Ia=At.div(y||(y=D(["\n margin: "," 0;\n"])),Tt["--ll-spacing-small"]),ka=At.div(g||(g=D(["\n margin-top: ",";\n &:empty {\n margin: 0;\n }\n"])),Tt["--ll-spacing-large"]),Oa=function(t){var e=t.score,n=So(),r=n.data,i=n.isLoading,o=Zi(),a=o.activePOI,s=o.setActivePOI,u=o.hoveredPOI,c=o.setHoveredPOI,l=ko(),d=l.mapRef,p=l.mapPadding;return i?Ot(Ft,{children:F(Array(10)).map((function(t,e){return Ot(Ia,{children:Ot(qt,{height:"34px",width:"100%"})},e)}))}):r?Ot(Gt.Root,{options:{type:"school",data:null==r?void 0:r[e],activePOI:a,hoveredPOI:u},onChange:function(t){if("poi-click"===t.type){var e=t.data;s(e);var n,r=window.innerWidth-p.left,i=window.innerWidth/2,o=r/2+p.left-i;if(e)null===(n=d.current)||void 0===n||n.easeTo({zoom:18,center:[e.lng,e.lat],duration:1e3,offset:[o,0]})}"poi-hover"===t.type&&c(t.data)}}):null},Pa=St.memo((function(t){var e=t.result,n=t.poi,r=Zi(),i=r.activePOI,o=r.setActivePOI,a=r.hoveredPOI,s=r.setHoveredPOI,u=ko(),c=u.mapRef,l=u.mapPadding;return e.data&&e.data[n]?Ot(Kt.Content,{options:{value:n},children:Ot(Gt.Root,{options:{type:"poi",data:e.data[n],activePOI:i,hoveredPOI:a},onChange:function(t){if("poi-click"===t.type){var e=t.data;o(e);var n,r=window.innerWidth-l.left,i=window.innerWidth/2,a=r/2+l.left-i;if(e)null===(n=c.current)||void 0===n||n.flyTo({zoom:18,center:[e.lng,e.lat],duration:1e3,offset:[a,0],essential:!0})}"poi-hover"===t.type&&s(t.data)}})},n):null}));Pa.displayName="POI";var La=St.memo((function(t){var e=t.include,n=Co();return n.isLoading&&e.length?Ot(Ft,{children:F(Array(10)).map((function(t,e){return Ot(Ia,{children:Ot(qt,{height:"34px",width:"100%"})},e)}))}):n.data?Dt(Kt.Root,{options:{include:e},children:[Ot(Kt.Tabs,{}),e.map((function(t){return Ot(Pa,{poi:t,result:n},t)}))]}):null}));La.displayName="POIs";var Ma=St.memo((function(t){var e,n,r=t.score,i=t.isLoading,o=t.scoresData,a=Mt().sdkState,s=Zi().activeScore,u=r===s;return i?Ot(Ia,{children:Ot(qt,{height:"34px",width:"100%"},r)}):null!=o&&o.location[r]?Ot(it,{value:r,children:Dt(Rt.Root,{options:{score:r,scoresData:o},onChange:function(t){"tooltip-toggle"===t.type&&t.data&&Vi.trackEvent(Gi.LC_LONG_DESCRIPTION_VIEW,r)},children:[Ot(wa,{children:Dt(xa,{children:[Ot(Sa,{children:Ot(Zt,{SVGElement:ot,fill:Tt["--ll-color-on-background-variant1"]})}),Ot(Ht,{spacing:"--ll-spacing-small"}),Ot(Rt.Icon,{}),Ot(Ht,{spacing:"--ll-spacing-small"}),Ot(Rt.Title,{}),Ot(Ht,{}),Ot(Rt.Badge,{options:{isPrimary:u}})]})}),Ot(_a,{children:Dt(Ca,{children:[Ot(Rt.Description,{}),Ot(Ht,{vertical:!0,spacing:"--ll-spacing-small"}),Ot(Rt.BarChart,{options:{locationIcon:"pin"===(null===(e=a.options)||void 0===e||null===(n=e.marker)||void 0===n?void 0:n.icon)?ra:ia}}),Ot(ka,{children:"high_schools"===r||"primary_schools"===r?Ot(Oa,{score:r}):Ot(La,{include:jt[r]})})]})})]})},r):null}));Ma.displayName="Score";var Ea=At.div(m||(m=D(["\n padding: "," ",";\n"])),Tt["--ll-spacing-small"],Tt["--ll-spacing-medium"]),ja=At.div(b||(b=D(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"]))),Aa=St.memo((function(t){var e=t.tabContent,n=oa(e.scores),r=n.data,i=n.isLoading,o=n.isFetching,a=Wt().translations;return Dt(Ea,{children:[Dt(ja,{children:[Ot(Jt.Title,{options:{variant:"h4",noMargin:!0,weight:"--ll-font-weight-medium"}}),o&&!i&&Ot($t,{size:"small"})]}),Ot(Ht,{spacing:"--ll-spacing-small",vertical:!0}),!o&&!Object.keys((null==r?void 0:r.location)||{}).length&&Ot(Yt,{color:"--ll-color-on-background-variant1",children:a.EMPTY_TEXT}),e.scores.map((function(t){return Ot(Ma,{score:t,isLoading:i,scoresData:r},t)}))]})}));Aa.displayName="ScoreCategory";var Ta=St.memo((function(t){var e=t.tabContent,n=Zi(),r=n.activeScore,i=n.setActiveScore;return It.exports.useEffect((function(){i(e.scores[0])}),[]),Ot(at,{value:r,onValueChange:function(t){i(t)},type:"single",collapsible:!0,children:Ot(Aa,{tabContent:e})})}));Ta.displayName="ScoreCategoryAccordion";var Fa=At.div(w||(w=D(["\n overflow-y: auto;\n"]))),Da=At.div(x||(x=D(["\n position: absolute;\n top: ",";\n left: ",";\n width: 360px;\n max-height: calc(100% - 2 * ",");\n z-index: 1;\n border-radius: ",";\n box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;\n background-color: #fff;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n background-color: ",";\n border: 1px solid ",";\n"])),Tt["--ll-spacing-medium"],Tt["--ll-spacing-medium"],Tt["--ll-spacing-medium"],Tt["--ll-border-radius-medium"],Tt["--ll-color-background"],Tt["--ll-color-border"]);At.div(_||(_=D(["\n display: flex;\n justify-content: center;\n padding: ",";\n"])),Tt["--ll-spacing-small"]);var Na=At.div(C||(C=D(["\n padding: ",";\n border-bottom: 1px solid ",";\n"])),Tt["--ll-spacing-xx-small"],Tt["--ll-color-border"]),za=At.div(S||(S=D(["\n display: flex;\n justify-content: center;\n padding: ",";\n background-color: ",";\n"])),Tt["--ll-spacing-small"],Tt["--ll-color-background"]),Ra=function(){return Ot(za,{children:Ot(Qt.Root,{})})},qa=St.forwardRef((function(t,e){var n=Zi(),r=n.activeCategory,i=n.setActiveCategory;return Ot(Jt.Root,{options:{currentTab:r},onChange:function(t){i(t.data)},children:Dt(Da,{ref:e,children:[Ot(Na,{children:Ot(Jt.Tabs,{})}),Ot(Fa,{children:Pt.map((function(t){return Ot(Jt.Content,{options:{value:t.value},children:Ot(Ta,{tabContent:t},t.value)},t.value)}))}),Ot(Ra,{})]})})}));qa.displayName="DesktopScores";var Ba=At.div(I||(I=D(["\n position: relative;\n display: flex;\n flex-direction: column;\n height: 100vh;\n"]))),Ua=function(t){return It.exports.createElement("svg",K({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t),It.exports.createElement("path",{d:"M22.4275 10.5938L13.4175 1.58383C12.6675 0.833834 11.3475 0.823834 10.5875 1.58383L1.58745 10.5838C0.807453 11.3638 0.807453 12.6238 1.58745 13.4038L10.5875 22.4038C10.9775 22.7938 11.4875 22.9838 11.9975 22.9838C12.5075 22.9838 13.0175 22.7938 13.4075 22.4038L22.3975 13.4138C23.1875 12.6538 23.1975 11.3938 22.4275 10.5938ZM12.0075 20.9938L3.00745 11.9938L12.0075 2.99383L21.0075 11.9938L12.0075 20.9938ZM7.99745 11.0038V15.0038H9.99745V12.0038H13.9975V14.5038L17.4975 11.0038L13.9975 7.50383V10.0038H8.99745C8.44745 10.0038 7.99745 10.4538 7.99745 11.0038Z"}))},Va=function(t){return It.exports.createElement("svg",K({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t),It.exports.createElement("path",{d:"M18.92 6.01C18.72 5.42 18.16 5 17.5 5H6.5C5.84 5 5.29 5.42 5.08 6.01L3 12V20C3 20.55 3.45 21 4 21H5C5.55 21 6 20.55 6 20V19H18V20C18 20.55 18.45 21 19 21H20C20.55 21 21 20.55 21 20V12L18.92 6.01ZM6.85 7H17.14L18.22 10.11H5.77L6.85 7ZM19 17H5V12H19V17Z"}),It.exports.createElement("path",{d:"M7.5 16C8.32843 16 9 15.3284 9 14.5C9 13.6716 8.32843 13 7.5 13C6.67157 13 6 13.6716 6 14.5C6 15.3284 6.67157 16 7.5 16Z"}),It.exports.createElement("path",{d:"M16.5 16C17.3284 16 18 15.3284 18 14.5C18 13.6716 17.3284 13 16.5 13C15.6716 13 15 13.6716 15 14.5C15 15.3284 15.6716 16 16.5 16Z"}))},Ga=function(t){return It.exports.createElement("svg",K({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t),It.exports.createElement("path",{d:"M13.5 5.5C14.6 5.5 15.5 4.6 15.5 3.5C15.5 2.4 14.6 1.5 13.5 1.5C12.4 1.5 11.5 2.4 11.5 3.5C11.5 4.6 12.4 5.5 13.5 5.5ZM9.8 8.9L7 23H9.1L10.9 15L13 17V23H15V15.5L12.9 13.5L13.5 10.5C14.8 12 16.8 13 19 13V11C17.1 11 15.5 10 14.7 8.6L13.7 7C13.14 6.11 12.02 5.75 11.05 6.16L6 8.3V13H8V9.6L9.8 8.9Z"}))},Ka=function(t){return It.exports.createElement("svg",K({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t),It.exports.createElement("path",{d:"M12,2C6.47,2,2,6.47,2,12s4.47,10,10,10s10-4.47,10-10S17.53,2,12,2z M17,15.59L15.59,17L12,13.41L8.41,17L7,15.59 L10.59,12L7,8.41L8.41,7L12,10.59L15.59,7L17,8.41L13.41,12L17,15.59z"}))},Za={all:function(){return["commute-calc"]},list:function(t){return[].concat(F(Za.all()),[t])}};var Ha=function(t,e,n){return 1===e?t:null!=n?n:"".concat(t,"s")},Wa=[62,-1,-1,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,63,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],Ja="undefined"!=typeof BigInt?BigInt:Number;function $a(t){var e=Ja(0),n=Ja(0),r=[];if(t.split("").forEach((function(t){var i=Ja(function(t){var e=t.charCodeAt(0);return Wa[e-45]}(t));e|=(i&Ja(31))<<n,(i&Ja(32))===Ja(0)?(r.push(e),e=Ja(0),n=Ja(0)):n+=Ja(5)})),n>0)throw new Error("Invalid encoding");return r}function Ya(t){var e=t;return e&Ja(1)&&(e=~e),+(e>>=Ja(1)).toString()}function Qa(t){for(var e=$a(t),n=function(t,e){if(1!=+t.toString())throw new Error("Invalid format version");var n=+e.toString();return{precision:15&n,thirdDim:n>>4&7,thirdDimPrecision:n>>7&15}}(e[0],e[1]),r=Math.pow(10,n.precision),i=Math.pow(10,n.thirdDimPrecision),o=n.thirdDim,a=0,s=0,u=0,c=[],l=2;l<e.length;){if(a+=Ya(e[l])/r,s+=Ya(e[l+1])/r,o)u+=Ya(e[l+2])/i,c.push([s,a,u]),l+=3;else c.push([s,a]),l+=2}if(l!==e.length)throw new Error("Invalid encoding. Premature ending reached");return{type:"FeatureCollection",features:[{id:"route",type:"Feature",geometry:{type:"LineString",coordinates:c}}]}}var Xa=At.div(k||(k=D(["\n max-height: calc(100% - 2 * ",");\n border-radius: ",";\n box-shadow: ",";\n background-color: ",";\n border: 1px solid ",";\n padding: ",";\n"])),Tt["--ll-spacing-medium"],Tt["--ll-border-radius-medium"],Tt["--ll-shadow-small"],Tt["--ll-color-background"],Tt["--ll-color-border"],Tt["--ll-spacing-x-small"]),ts=At.div(O||(O=D(["\n display: flex;\n justify-content: space-between;\n align-items: end;\n\n "," {\n width: 229px;\n margin-right: ",";\n }\n"])),st,Tt["--ll-spacing-x-small"]),es=At.div(P||(P=D(["\n background-color: ",";\n padding: "," "," 0;\n border-radius: ",";\n"])),Tt["--ll-color-surface"],Tt["--ll-spacing-x-small"],Tt["--ll-spacing-small"],Tt["--ll-border-radius-medium"]),ns=At(te)(L||(L=D(["\n position: absolute;\n right: ",";\n top: ",";\n svg {\n fill: ",";\n }\n"])),Tt["--ll-spacing-xx-small"],Tt["--ll-spacing-xx-small"],Tt["--ll-color-disabled"]),rs=function(t){var e,n,r,i,o=t.className,a=t.onClose,s=Mt().sdkState,u=Zi(),c=u.setCommuteGeojson,l=u.destination,d=u.setDestination,p=B(It.exports.useState("pedestrian"),2),f=p[0],h=p[1],v=_o(),y=Wt().translations,g=function(t){var e=t.transportMode,n=t.origin,r=t.destination,i={return:"polyline,summary,typicalDuration",transportMode:e,origin:n,destination:"".concat(null==r?void 0:r.lat,",").concat(null==r?void 0:r.lng),apiKey:"KDL0aAzsbOcv7p53P2ovno2izfDOe93hyzZRrayktbE"};return H(Za.list(i),(function(){return fetch("https://router.hereapi.com/v8/routes?"+new URLSearchParams(i)).then((function(t){return t.json()})).then((function(t){return t.routes.length>0&&t.routes[0].sections.length>0?t.routes[0].sections[0]:[]})).catch((function(t){Xt(t)}))}),{enabled:!!i&&!!r&&!!n})}({destination:l,transportMode:f,origin:"".concat(null==s||null===(e=s.options)||void 0===e||null===(n=e.marker)||void 0===n?void 0:n.lat,",").concat(null==s||null===(r=s.options)||void 0===r||null===(i=r.marker)||void 0===i?void 0:i.lng)}),m=g.data,b=g.isFetching,w=g.isFetched;It.exports.useEffect((function(){null!=m&&m.summary&&c(Qa(m.polyline))}),[m]);var x={pedestrian:[y.WALKING,Ga],car:[y.DRIVING,Va]},_=It.exports.useMemo((function(){if(null==m||!m.summary)return null;var t=Math.floor(m.summary.typicalDuration/60/60),e=Math.floor(m.summary.typicalDuration/60%60);return 0===t?"".concat(e," ").concat(Ha(y.MINUTE,e)):"".concat(t," ").concat(Ha(y.HOUR,t)," ").concat(e," ").concat(Ha(y.MINUTE,e))}),[m]),C=It.exports.useMemo((function(){return null!=m&&m.summary?Math.floor(m.summary.length/1e3):null}),[m]);return Dt(Xa,{className:o,children:[Ot(ns,{variant:"text",size:"medium",onClick:a,children:Ot(Zt,{SVGElement:Ka,fill:Tt["--ll-color-disabled"],width:16})}),Dt(ts,{children:[Ot(ut,{label:y.CALCULATE_COMMUTE,placeholder:y.SEARCH_MAP,renderListBelow:v,renderListBelowPosition:30,onSearch:function(t){d({lat:t.latitude,lng:t.longitude})}}),Ot(Bt.Root,{value:f,onValueChange:function(t){h(t)},children:Dt(Bt.Trigger,{children:[Ot(Zt,{SVGElement:x[f][1],fill:Tt["--ll-color-on-background-variant1"],width:16}),x[f][0],Dt(Bt.Content,{children:[Ot(Bt.Item,{value:"car",children:y.DRIVING}),Ot(Bt.Item,{value:"pedestrian",children:y.WALKING})]})]})})]}),(w||b)&&Dt(Ft,{children:[Ot(Ht,{vertical:!0,spacing:"--ll-spacing-x-small"}),Ot(ct,{open:!!m,children:b?Ot(qt,{height:"70.4px",width:"100%"}):null!=m&&m.summary?Dt(es,{children:[Ot(Yt,{variant:"h5",children:_}),Dt(Yt,{children:[C," km – ",y.FAST_ROUTE]})]}):Dt(es,{children:[Ot(Yt,{variant:"h5",children:y.NO_ROUTE}),Ot(Yt,{children:y.TRY_SUGGESTION})]})})]})]})},is=At.div(M||(M=D(["\n position: absolute;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 3;\n"]))),os=At.div(E||(E=D(["\n position: absolute;\n top: ",";\n right: ",";\n z-index: 3;\n max-width: 356px;\n"])),Tt["--ll-spacing-medium"],Tt["--ll-spacing-medium"]),as=At(ee)(j||(j=D(["\n box-shadow: ",";\n position: absolute;\n bottom: ",";\n right: ",";\n"])),Tt["--ll-shadow-medium"],Tt["--ll-spacing-medium"],Tt["--ll-spacing-medium"]),ss=At(rs)(A||(A=D([""]))),us=At(rs)(T||(T=D(["\n border-radius: ","\n "," 0 0;\n border: 0;\n"])),Tt["--ll-border-radius-small"],Tt["--ll-border-radius-small"]),cs=function(){var t=Zi(),e=t.setCommuteGeojson,n=t.setDestination,r=B(It.exports.useState(!1),2),i=r[0],o=r[1],a=Wt().translations,s=function(){n(void 0),e(void 0),o(!1)};return _o()?Ot(Ft,{children:i?Ot(is,{children:Ot(us,{onClose:s})}):Ot(as,{size:"large",SVGElement:Ua,onClick:function(){return o(!0)}})}):Ot(os,{children:i?Ot(ss,{onClose:s}):Ot(te,{onClick:function(){return o(!0)},startAdornment:Ot(Ua,{}),children:a.CALCULATE_COMMUTE})})},ls=function(){var t,e,n,r=Mt(),i=r.sdkState,o=r.setSdkState,a=Zi(),s=a.activeScore,u=a.activePOI,c=a.setActivePOI,l=a.hoveredPOI,d=a.commuteGeojson,p=a.destination,f=_o(),h=Co(),v=So(),y="night"===(null==i||null===(t=i.globalOptions)||void 0===t||null===(e=t.appearance)||void 0===e?void 0:e.theme)?"dd191599-2a92-49fc-9a33-e12391753ad5":"600d69cb-288d-445e-9839-3dfe4d76b31a",g=B(It.exports.useState(!1),2),m=g[0],b=g[1],w=It.exports.useMemo((function(){var t,e;return"high_schools"!==s&&"primary_schools"!==s||v.isFetching?jt&&s&&jt[s]&&null!==(t=jt[s])&&void 0!==t&&t.length||h.isFetching?h.data:J({},s,[]):J({},s,(null==v||null===(e=v.data)||void 0===e?void 0:e[s])||[])}),[h.data,v.data,s]),x=It.exports.useMemo((function(){return w?Object.entries(w).map((function(t){var e=B(t,2),n=e[0];return e[1].map((function(t){return eo([t.lng,t.lat],{poi:t,type:n})}))})).flat().filter((function(t,e,n){return n.findIndex((function(e){return["lat","lng","name"].every((function(n){return e.properties.poi[n]===t.properties.poi[n]}))}))===e})):[]}),[w]),_=It.exports.useMemo((function(){var t,e,n,r=(null==i||null===(t=i.options)||void 0===t?void 0:t.marker)&&eo([null==i||null===(e=i.options)||void 0===e?void 0:e.marker.lng,null==i||null===(n=i.options)||void 0===n?void 0:n.marker.lat]);return[].concat(F(x),F(r?[r]:[]),F(p?[eo([null==p?void 0:p.lng,null==p?void 0:p.lat])]:[]))}),[x,null==i||null===(n=i.options)||void 0===n?void 0:n.marker,p]),C=It.exports.useRef(),S=B(lt(),2),I=S[0],k=S[1],O=It.exports.useMemo((function(){return{top:25+k.height,bottom:25,left:25,right:25}}),[k.height]),P=It.exports.useMemo((function(){return{top:50,bottom:50,left:k.width+32+50,right:50}}),[k.width]),L=f?O:P;return It.exports.useEffect((function(){var t,e;if(_.length&&null!==(t=i.options)&&void 0!==t&&t.marker){var n,r,o,a=B(io((n=_.map((function(t){var e=t.geometry;return[e.coordinates[1],e.coordinates[0]]})),void 0===o&&(o={}),to({type:"MultiPoint",coordinates:n},r,o))),4),s=a[0],u=a[1],c=a[2],l=a[3];null==C||null===(e=C.current)||void 0===e||e.fitBounds([[u,s],[l,c]],{maxZoom:17,padding:L,duration:1e3})}}),[_,L]),i.options?Ot(Oo,{mapRef:C,mapPadding:L,children:Dt(Ba,{children:[Dt(dt,{ref:C,mapLib:pt,latitude:i.options.lat,longitude:i.options.lng,zoom:i.options.zoom,pitch:i.options.pitch,bearing:i.options.bearing,style:{flex:1,width:"100vw"},mapStyle:"https://api.maptiler.com/maps/".concat(y,"/style.json?key=","9jNGatuzs05Q1oNlctEs"),onMove:function(t){o(K(K({},i),{},{options:K(K({},i.options),{},{lat:t.viewState.latitude,lng:t.viewState.longitude,zoom:t.viewState.zoom,bearing:t.viewState.bearing,pitch:t.viewState.pitch})}))},cooperativeGestures:i.options.cooperativeGestures,onMoveStart:function(){return b(!0)},onMoveEnd:function(){return b(!1)},attributionControl:!1,children:[Ot(ft,{compact:!0,position:f?"bottom-left":"bottom-right"}),Ot(ht,{position:f?"top-right":"bottom-right",showCompass:!0,style:{marginTop:f?16+k.height:16,marginRight:16}}),i.options.marker&&Ot(vt,{marker:i.options.marker}),Ot(na,{rect:k,zoom:i.options.zoom,mapRef:C,points:x,isMobile:f,activePOI:u,hoveredPOI:l,isMapMoving:m,setActivePOI:c}),Ot(f?ga:qa,{ref:I}),Ot(cs,{}),p&&Ot(vt,{marker:K({icon:"pin"},p)}),d&&Ot(Yi,{type:"geojson",data:d,children:Ot(Xi,K({},{id:"point",type:"line",paint:{"line-width":6,"line-color":"#0056D3"}}))})]}),f&&Ot(Ra,{})]})}):Ot("div",{children:"No options provided."})},ds=Object.freeze(Object.defineProperty({__proto__:null,default:function(){return Vi.trackPageLoad(),Ot(Wi,{children:Ot(ls,{})})}},Symbol.toStringTag,{value:"Module"}));z("q",ds)}}}))}();
|
|
1
|
+
!function(){var t,e,n,r,i,o,a,s,u,c,l,d,f,p,h,v,y,g,m,b,w,x,_,C,S,I,k,O,E,L,M,P,j,A,T;function F(t){return function(t){if(Array.isArray(t))return V(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||U(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function N(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */N=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(k){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),a=new C(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return I()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(k){return{type:"throw",arg:k}}}t.wrap=u;var l={};function d(){}function f(){}function p(){}var h={};s(h,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,i)&&(h=y);var g=p.prototype=d.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==$(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(d).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:I}}function I(){return{value:void 0,done:!0}}return f.prototype=p,s(g,"constructor",p),s(p,"constructor",f),f.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),s(g,a,"Generator"),s(g,i,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),_(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function R(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(c){return void n(c)}s.done?e(u):Promise.resolve(u).then(r,i)}function z(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){R(o,r,i,a,s,"next",t)}function s(t){R(o,r,i,a,s,"throw",t)}a(void 0)}))}}function q(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=U(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function B(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||U(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(t,e){if(t){if("string"==typeof t)return V(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V(t,e):void 0}}function V(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function G(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function K(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?G(Object(n),!0).forEach((function(e){J(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function H(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function W(t,e,n){return e&&H(t.prototype,e),n&&H(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function J(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $(t){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$(t)}System.register(["./index-legacy.2dafcab0.js","./index-legacy.3e15a23a.js"],(function(R,U){"use strict";var V,G,H,Y,Q,X,tt,et,nt,rt,it,ot,at,st,ut,ct,lt,dt,ft,pt,ht,vt,yt,gt,mt,bt,wt,xt,_t,Ct,St,It,kt,Ot,Et,Lt,Mt,Pt,jt,At,Tt,Ft,Dt,Nt,Rt,zt,qt,Bt,Ut,Vt,Gt,Kt,Zt,Ht,Wt,Jt,$t,Yt,Qt,Xt,te,ee;return{setters:[function(t){V=t.M,G=t.d,H=t.u,Y=t.p,Q=t.s,X=t.a,tt=t.b,et=t.$,nt=t.c,rt=t.e,it=t.f,ot=t.S,at=t.g,st=t.h,ut=t.i,ct=t.A,lt=t.j,dt=t.k,ft=t.m,pt=t.l,ht=t.N,vt=t.P},function(t){yt=t._,gt=t.a,mt=t.b,bt=t.c,wt=t.d,xt=t.e,_t=t.f,Ct=t.g,St=t.R,It=t.r,kt=t.S,Ot=t.j,Et=t.I,Lt=t.L,Mt=t.u,Pt=t.h,jt=t.p,At=t.s,Tt=t.y,Ft=t.F,Dt=t.i,Nt=t.k,Rt=t.l,zt=t.m,qt=t.M,Bt=t.n,Ut=t.B,Vt=t.U,Gt=t.A,Kt=t.x,Zt=t.O,Ht=t.o,Wt=t.q,Jt=t.C,$t=t.t,Yt=t.v,Qt=t.w,Xt=t.z,te=t.N,ee=t.T}],execute:function(){function ne(t){return"string"==typeof t}function re(t){return"number"==typeof t}function ie(t){return"function"==typeof t}function oe(t){return"object"===Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}R({a:pe,b:mi,e:function(){return!ye()},h:Nr,i:me,j:ge,l:yi,m:ui,n:he,o:Te,u:function(t){var e=vi(t);void 0!==e&&e.remove();return Promise.resolve()}});var ae=function(t){function e(e,n){var r=t.call(this,n)||this;return r.field=e,r}return yt(e,t),e}(Error);function se(t){var e,n=t&&t.event&&t.event.type,r=t.event;if(void 0===r)throw new ae("event","Event is missing");if(!ne(n))throw new ae("event","Event is not a string");if("track"===n&&!ne(r.event))throw new ae("event","Event is not a string");var i=null!==(e=r.properties)&&void 0!==e?e:r.traits;if("alias"!==n&&!oe(i))throw new ae("properties","properties is not an object");if(!function(t){var e,n,r;return ne(null!==(r=null!==(n=null!==(e=t.userId)&&void 0!==e?e:t.anonymousId)&&void 0!==n?n:t.groupId)&&void 0!==r?r:t.previousId)}(r))throw new ae("userId","Missing userId or anonymousId");return t}var ue={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:se,identify:se,page:se,alias:se,group:se,screen:se};function ce(t,e,n,r){var i,o=[t,e,n,r],a=oe(t)?t.event:t;if(!a||!ne(a))throw new Error("Event missing");var s=oe(t)?null!==(i=t.properties)&&void 0!==i?i:{}:oe(e)?e:{},u={};return oe(e)&&!ie(n)&&(u=null!=n?n:{}),oe(t)&&!ie(e)&&(u=null!=e?e:{}),[a,s,u,o.find(ie)]}function le(t,e,n,r,i){var o,a,s=null,u=null,c=[t,e,n,r,i],l=c.filter(ne);void 0!==l[0]&&void 0!==l[1]&&(s=l[0],u=l[1]),1===l.length&&(s=null,u=l[0]);var d=c.find(ie),f=c.filter((function(t){return null===u?oe(t):oe(t)||null===t})),p=null!==(o=f[0])&&void 0!==o?o:{},h=null!==(a=f[1])&&void 0!==a?a:{};return[s,u,p,h,d]}var de=function(t){return function(){for(var e,n,r,i,o,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var u=null;u=null!==(r=null!==(e=a.find(ne))&&void 0!==e?e:null===(n=a.find(re))||void 0===n?void 0:n.toString())&&void 0!==r?r:t.id();var c=a.filter((function(t){return null===u?oe(t):oe(t)||null===t})),l=null!==(i=c[0])&&void 0!==i?i:{},d=null!==(o=c[1])&&void 0!==o?o:{},f=a.find(ie);return[u,l,d,f]}};function fe(t,e,n,r){re(t)&&(t=t.toString()),re(e)&&(e=e.toString());var i=[t,e,n,r],o=i.filter(ne),a=o[0],s=void 0===a?t:a,u=o[1],c=void 0===u?null:u,l=i.filter(oe)[0];return[s,c,void 0===l?{}:l,i.find(ie)]}function pe(t){return Promise.resolve(t)}function he(t,e){return new Promise((function(n,r){var i=setTimeout((function(){r(Error("Promise timed out"))}),e);t.then((function(t){return clearTimeout(i),n(t)})).catch(r)}))}function ve(t,e,n,r){var i;return(i=n,new Promise((function(t){return setTimeout(t,i)}))).then((function(){return he(function(){try{return pe(e(t))}catch(n){return Promise.reject(n)}}(),null!=r?r:1e3)})).catch((function(e){null==t||t.log("warn","Callback Error",{error:e}),null==t||t.stats.increment("callback_error")})).then((function(){return t}))}function ye(){return"undefined"!=typeof window}function ge(){return!ye()||window.navigator.onLine}function me(){return!ge()}for(var be,we=256,xe=[];we--;)xe[we]=(we+256).toString(16).substring(1);function _e(){var t,e=0,n="";if(!be||we+16>256){for(be=Array(e=256);e--;)be[e]=256*Math.random()|0;e=we=0}for(;e<16;e++)t=be[we+e],n+=6==e?xe[15&t|64]:8==e?xe[63&t|128]:xe[t],1&e&&e>1&&e<11&&(n+="-");return we++,n}function Ce(t,e,n){e.split&&(e=e.split("."));for(var r,i,o=0,a=e.length,s=t;o<a&&"__proto__"!==(i=e[o++])&&"constructor"!==i&&"prototype"!==i;)s=s[i]=o===a?n:$(r=s[i])===$(e)?r:0*e[o]!=0||~(""+e[o]).indexOf(".")?{}:[]}var Se=Object.freeze(Object.defineProperty({__proto__:null,dset:Ce},Symbol.toStringTag,{value:"Module"}));R("d",Se);var Ie=function(){function t(){var t=this;this._logs=[],this.log=function(e,n,r){var i=new Date;t._logs.push({level:e,message:n,time:i,extras:r})}}return Object.defineProperty(t.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),t.prototype.flush=function(){if(this.logs.length>1){var t=this._logs.reduce((function(t,e){var n,r,i,o=gt(gt({},e),{json:JSON.stringify(e.extras,null," "),extras:e.extras});delete o.time;var a=null!==(i=null===(r=e.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return t[a]&&(a="".concat(a,"-").concat(Math.random())),gt(gt({},t),((n={})[a]=o,n))}),{});console.table?console.table(t):console.log(t)}else this.logs.forEach((function(t){var e=t.level,n=t.message,r=t.extras;"info"===e||"debug"===e?console.log(n,null!=r?r:""):console[e](n,null!=r?r:"")}));this._logs=[]},t}(),ke=Ie,Oe=function(){function t(t){this.metrics=[],this.remoteMetrics=t}return t.prototype.increment=function(t,e,n){var r;void 0===e&&(e=1),this.metrics.push({metric:t,value:e,tags:null!=n?n:[],type:"counter",timestamp:Date.now()}),null===(r=this.remoteMetrics)||void 0===r||r.increment(t,null!=n?n:[])},t.prototype.gauge=function(t,e,n){this.metrics.push({metric:t,value:e,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},t.prototype.flush=function(){var t=this.metrics.map((function(t){return gt(gt({},t),{tags:t.tags.join(",")})}));console.table?console.table(t):console.log(t),this.metrics=[]},t.prototype.serialize=function(){return this.metrics.map((function(t){return{m:t.metric,v:t.value,t:t.tags,k:(e=t.type,{gauge:"g",counter:"c"}[e]),e:t.timestamp};var e}))},t}(),Ee=Oe;function Le(t,e){return e=e||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],a=[],s={},u=function t(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:t,headers:{keys:function(){return o},entries:function(){return a},get:function(t){return s[t.toLowerCase()]},has:function(t){return t.toLowerCase()in s}}}};for(var c in i.open(e.method||"get",t,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(t,e,n){o.push(e=e.toLowerCase()),a.push([e,n]),s[e]=s[e]?s[e]+","+n:n})),n(u())},i.onerror=r,i.withCredentials="include"==e.credentials,e.headers)i.setRequestHeader(c,e.headers[c]);i.send(e.body||null)}))}var Me="1.44.0";/*! js-cookie v3.0.1 | MIT */function Pe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var je,Ae=function t(e,n){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=Pe({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in i)i[a]&&(o+="; "+a,!0!==i[a]&&(o+="="+i[a].split(";")[0]));return document.cookie=t+"="+e.write(r,t)+o}}return Object.create({set:r,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=e.read(a,s),t===s)break}catch(u){}}return t?r[t]:r}},remove:function(t,e){r(t,"",Pe({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,Pe({},this.attributes,e))},withConverter:function(e){return t(Pe({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function Te(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(zr){return t}}function Fe(t){var e=function(t){try{return new URL(t)}catch(zr){return}}(t);if(e)for(var n=function(t){var e=t.hostname.split("."),n=e[e.length-1],r=[];if(4===e.length&&parseInt(n,10)>0)return r;if(e.length<=1)return r;for(var i=e.length-2;i>=0;--i)r.push(e.slice(i).join("."));return r}(e),r=0;r<n.length;++r){var i="__tld__",o=n[r],a={domain:"."+o};try{if(Ae.set(i,"1",a),Ae.get(i))return Ae.remove(i,a),o}catch(s){return}}}function De(t,e,n){var r=Ae.get("s:context.referrer"),i=function(t){var e={btid:"dataxu",urid:"millennial-media"};t.startsWith("?")&&(t=t.substring(1));for(var n=0,r=(t=t.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),o=i[0],a=i[1];if(e[o])return{id:a,type:e[o]}}}(t);r=r?JSON.parse(r):void 0,(i=null!=i?i:r)&&(e&&(e.referrer=gt(gt({},e.referrer),i)),n||Ae.set("s:context.referrer",JSON.stringify(i),function(){if(je)return je;var t=Fe(window.location.href);return je={expires:31536e6,secure:!1,path:"/"},t&&(je.domain=t),je}()))}function Ne(t,e,n,r){var i,o,a,s,u=t.user(),c=window.location.search;e.context=null!==(o=null!==(i=e.context)&&void 0!==i?i:e.options)&&void 0!==o?o:{};var l=e.context,d=e.anonymousId;delete e.options,e.writeKey=null==n?void 0:n.apiKey,l.userAgent=window.navigator.userAgent;var f=navigator.userLanguage||navigator.language;if(void 0===l.locale&&void 0!==f&&(l.locale=f),!l.library){l.library={name:"analytics.js",version:"npm:next-".concat(Me)}}c&&!l.campaign&&(l.campaign=function(t){return t.startsWith("?")&&(t=t.substring(1)),(t=t.replace(/\?/g,"&")).split("&").reduce((function(t,e){var n=e.split("="),r=n[0],i=n[1],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var a=r.substr(4);"campaign"===a&&(a="name"),t[a]=Te(o)}return t}),{})}(c)),De(c,l,null!==(a=t.options.disableClientPersistence)&&void 0!==a&&a),e.userId=e.userId||u.id(),e.anonymousId=u.anonymousId(d),e.sentAt=new Date;var p=t.queue.failedInitializations||[];p.length>0&&(e._metadata={failedInitializations:p});var h=[],v=[];for(var y in r){var g=r[y];"Segment.io"===y&&h.push(y),"bundled"===g.bundlingStatus&&h.push(y),"unbundled"===g.bundlingStatus&&v.push(y)}for(var m=0,b=(null==n?void 0:n.unbundledIntegrations)||[];m<b.length;m++){var w=b[m];v.includes(w)||v.push(w)}var x=null!==(s=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==s?s:{},_=[];h.sort().forEach((function(t){var e;(null!==(e=x[t])&&void 0!==e?e:[]).forEach((function(t){_.push(t)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(e._metadata=gt(gt({},e._metadata),{bundled:h.sort(),unbundled:v.sort(),bundledIds:_}));var C=function(){var t=Ae.get("_ga");if(t&&t.startsWith("amp"))return t}();return C&&(l.amp={id:C}),e}function Re(t){console.error("Error sending segment performance metrics",t)}var ze,qe=function(){function t(t){var e,n,r,i,o=this;if(this.host=null!==(e=null==t?void 0:t.host)&&void 0!==e?e:"api.segment.io/v1",this.sampleRate=null!==(n=null==t?void 0:t.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==t?void 0:t.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==t?void 0:t.maxQueueSize)&&void 0!==i?i:20,this.queue=[],this.sampleRate>0){var a=!1;!function t(){a||(a=!0,o.flush().catch(Re),a=!1,setTimeout(t,o.flushTimer))}()}}return t.prototype.increment=function(t,e){if(t.includes("analytics_js.")&&0!==e.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=e.reduce((function(t,e){var n=e.split(":"),r=n[0],i=n[1];return t[r]=i,t}),{});n.library="analytics.js";n.library_version="npm:next-".concat(Me),this.queue.push({type:"Counter",metric:t,value:1,tags:n}),t.includes("error")&&this.flush().catch(Re)}},t.prototype.flush=function(){return mt(this,void 0,void 0,(function(){var t=this;return bt(this,(function(e){switch(e.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(e){Re(e),t.sampleRate=0}))];case 1:return e.sent(),[2]}}))}))},t.prototype.send=function(){return mt(this,void 0,void 0,(function(){var t,e;return bt(this,(function(n){return t={series:this.queue},this.queue=[],e={"Content-Type":"text/plain"},[2,Le("https://".concat(this.host,"/m"),{headers:e,body:JSON.stringify(t),method:"POST"})]}))}))},t}(),Be=R("C",(function(t){var e,n,r;this.retry=null===(e=t.retry)||void 0===e||e,this.type=null!==(n=t.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=t.reason)&&void 0!==r?r:""})),Ue=R("k",function(){function t(t,e){this.logger=new ke,this.cancel=function(t){if(t)throw t;throw new Be({reason:"Context Cancel"})},this._attempts=0,this._event=t,this._id=null!=e?e:_e(),this.stats=new Ee(ze)}return t.initMetrics=function(t){ze=new qe(t)},t.system=function(){return new t({type:"track",event:"system"})},t.prototype.isSame=function(t){return t._id===this._id},t.prototype.log=function(t,e,n){this.logger.log(t,e,n)},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"event",{get:function(){return this._event},set:function(t){this._event=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attempts",{get:function(){return this._attempts},set:function(t){this._attempts=t},enumerable:!1,configurable:!0}),t.prototype.updateEvent=function(t,e){var n;if("integrations"===t.split(".")[0]){var r=t.split(".")[1];if(!1===(null===(n=this._event.integrations)||void 0===n?void 0:n[r]))return this._event}return Ce(this._event,t,e),this._event},t.prototype.failedDelivery=function(){return this._failedDelivery},t.prototype.setFailedDelivery=function(t){this._failedDelivery=t},t.prototype.logs=function(){return this.logger.logs},t.prototype.flush=function(){this.logger.flush(),this.stats.flush()},t.prototype.toJSON=function(){return{id:this._id,event:this._event,logs:this.logger.logs,metrics:this.stats.metrics}},t}()),Ve=function(){function t(){this.callbacks={}}return t.prototype.on=function(t,e){return this.callbacks[t]?this.callbacks[t].push(e):this.callbacks[t]=[e],this},t.prototype.once=function(t,e){var n=this;return this.on(t,(function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];n.off(t,r),e.apply(n,i)})),this},t.prototype.off=function(t,e){var n,r=(null!==(n=this.callbacks[t])&&void 0!==n?n:[]).filter((function(t){return t!==e}));return this.callbacks[t]=r,this},t.prototype.emit=function(t){for(var e,n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var o=null!==(e=this.callbacks[t])&&void 0!==e?e:[];return o.forEach((function(t){t.apply(n,r)})),this},t}(),Ge=R("c",{}),Ke={},Ze={},He={exports:{}};!function(t){function e(t){return function(e,n,r,o){var a,s=o&&function(t){return"function"==typeof t}(o.normalizer)?o.normalizer:i;n=s(n);for(var u=!1;!u;)c();function c(){for(a in e){var t=s(a);if(0===n.indexOf(t)){var r=n.substr(t.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=e[a];return null==i?void(u=!0):n.length?void(e=i):void(u=!0)}}}a=void 0,u=!0}if(a)return null==e?e:t(e,a,r)}}function n(t,e){return t.hasOwnProperty(e)&&delete t[e],t}function r(t,e,n){return t.hasOwnProperty(e)&&(t[e]=n),t}function i(t){return t.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}t.exports=e((function(t,e){if(t.hasOwnProperty(e))return t[e]})),t.exports.find=t.exports,t.exports.replace=function(t,n,i,o){return e(r).call(this,t,n,i,o),t},t.exports.del=function(t,r,i){return e(n).call(this,t,r,null,i),t}}(He);var We=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ze,"__esModule",{value:!0});var Je=We(He.exports);function $e(t,e){return function(){var n=this.traits(),r=this.properties?this.properties():{};return Je.default(n,"address."+t)||Je.default(n,t)||(e?Je.default(n,"address."+e):null)||(e?Je.default(n,e):null)||Je.default(r,"address."+t)||Je.default(r,t)||(e?Je.default(r,"address."+e):null)||(e?Je.default(r,e):null)}}Ze.default=function(t){t.zip=$e("postalCode","zip"),t.country=$e("country"),t.street=$e("street"),t.state=$e("state"),t.city=$e("city"),t.region=$e("region")};var Ye={};Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.clone=void 0,Ye.clone=function t(e){if("[object Object]"===Object.prototype.toString.call(e)){var n={};for(var r in e)n[r]=t(e[r]);return n}return Array.isArray(e)?e.map(t):e};var Qe={};Object.defineProperty(Qe,"__esModule",{value:!0});var Xe={Salesforce:!0};Qe.default=function(t){return!Xe[t]};var tn={},en=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;tn.parse=function(t){var e=[1,5,6,7,11,12],n=en.exec(t),r=0;if(!n)return new Date(t);for(var i,o=0;i=e[o];o++)n[i]=parseInt(n[i],10)||0;n[2]=parseInt(n[2],10)||1,n[3]=parseInt(n[3],10)||1,n[2]--,n[8]=n[8]?(n[8]+"00").substring(0,3):0," "===n[4]?r=(new Date).getTimezoneOffset():"Z"!==n[9]&&n[10]&&(r=60*n[11]+n[12],"+"===n[10]&&(r=0-r));var a=Date.UTC(n[1],n[2],n[3],n[5],n[6]+r,n[7],n[8]);return new Date(a)},tn.is=function(t,e){return"string"==typeof t&&((!e||!1!==/^\d{4}-\d{2}-\d{2}/.test(t))&&en.test(t))};var nn={},rn=/\d{13}/;nn.is=function(t){return rn.test(t)},nn.parse=function(t){return t=parseInt(t,10),new Date(t)};var on={},an=/\d{10}/;on.is=function(t){return an.test(t)},on.parse=function(t){var e=1e3*parseInt(t,10);return new Date(e)};var sn=tn,un=nn,cn=on,ln=Object.prototype.toString;var dn=function(t){return e=t,"[object Date]"===ln.call(e)?t:function(t){return"[object Number]"===ln.call(t)}(t)?new Date((n=t)<315576e5?1e3*n:n):sn.is(t)?sn.parse(t):un.is(t)?un.parse(t):cn.is(t)?cn.parse(t):new Date(t);var e,n};var fn=tn,pn=hn;function hn(t,e){return void 0===e&&(e=!0),t&&"object"===$(t)?function(t,e){return Object.keys(t).forEach((function(n){t[n]=hn(t[n],e)})),t}(t,e):Array.isArray(t)?function(t,e){return t.forEach((function(n,r){t[r]=hn(n,e)})),t}(t,e):fn.is(t,e)?fn.parse(t):t}var vn=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.Facade=void 0;var yn=vn(Ze),gn=Ye,mn=vn(Qe),bn=vn(dn),wn=vn(He.exports),xn=vn(pn);function _n(t,e){e=e||{},this.raw=gn.clone(t),"clone"in e||(e.clone=!0),e.clone&&(t=gn.clone(t)),"traverse"in e||(e.traverse=!0),t.timestamp="timestamp"in t?bn.default(t.timestamp):new Date,e.traverse&&xn.default(t),this.opts=e,this.obj=t}Ke.Facade=_n;var Cn=_n.prototype;function Sn(t){return gn.clone(t)}Cn.proxy=function(t){var e=t.split("."),n=this[t=e.shift()]||this.field(t);return n?("function"==typeof n&&(n=n.call(this)||{}),0===e.length||(n=wn.default(n,e.join("."))),this.opts.clone?Sn(n):n):n},Cn.field=function(t){var e=this.obj[t];return this.opts.clone?Sn(e):e},_n.proxy=function(t){return function(){return this.proxy(t)}},_n.field=function(t){return function(){return this.field(t)}},_n.multi=function(t){return function(){var e=this.proxy(t+"s");if(Array.isArray(e))return e;var n=this.proxy(t);return n&&(n=[this.opts.clone?gn.clone(n):n]),n||[]}},_n.one=function(t){return function(){var e=this.proxy(t);if(e)return e;var n=this.proxy(t+"s");return Array.isArray(n)?n[0]:void 0}},Cn.json=function(){var t=this.opts.clone?gn.clone(this.obj):this.obj;return this.type&&(t.type=this.type()),t},Cn.rawEvent=function(){return this.raw},Cn.options=function(t){var e=this.obj.options||this.obj.context||{},n=this.opts.clone?gn.clone(e):e;if(!t)return n;if(this.enabled(t)){var r=this.integrations(),i=r[t]||wn.default(r,t);return"object"!==$(i)&&(i=wn.default(this.options(),t)),"object"===$(i)?i:{}}},Cn.context=Cn.options,Cn.enabled=function(t){var e=this.proxy("options.providers.all");"boolean"!=typeof e&&(e=this.proxy("options.all")),"boolean"!=typeof e&&(e=this.proxy("integrations.all")),"boolean"!=typeof e&&(e=!0);var n=e&&mn.default(t),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(t)&&(n=r.providers[t]),r.hasOwnProperty(t)){var i=r[t];n="boolean"!=typeof i||i}return!!n},Cn.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},Cn.active=function(){var t=this.proxy("options.active");return null==t&&(t=!0),t},Cn.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},Cn.sessionId=Cn.anonymousId,Cn.groupId=_n.proxy("options.groupId"),Cn.traits=function(t){var e=this.proxy("options.traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();null!=i&&(e[t[r]]=i,delete e[r])}return e},Cn.library=function(){var t=this.proxy("options.library");return t?"string"==typeof t?{name:t,version:null}:t:{name:"unknown",version:null}},Cn.device=function(){var t=this.proxy("context.device");"object"===$(t)&&null!==t||(t={});var e=this.library().name;return t.type||(e.indexOf("ios")>-1&&(t.type="ios"),e.indexOf("android")>-1&&(t.type="android")),t},Cn.userAgent=_n.proxy("context.userAgent"),Cn.timezone=_n.proxy("context.timezone"),Cn.timestamp=_n.field("timestamp"),Cn.channel=_n.field("channel"),Cn.ip=_n.proxy("context.ip"),Cn.userId=_n.field("userId"),yn.default(Cn);var In={},kn={exports:{}};"function"==typeof Object.create?kn.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:kn.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}};var On=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(In,"__esModule",{value:!0}),In.Alias=void 0;var En=On(kn.exports),Ln=Ke;function Mn(t,e){Ln.Facade.call(this,t,e)}In.Alias=Mn,En.default(Mn,Ln.Facade),Mn.prototype.action=function(){return"alias"},Mn.prototype.type=Mn.prototype.action,Mn.prototype.previousId=function(){return this.field("previousId")||this.field("from")},Mn.prototype.from=Mn.prototype.previousId,Mn.prototype.userId=function(){return this.field("userId")||this.field("to")},Mn.prototype.to=Mn.prototype.userId;var Pn={},jn={};Object.defineProperty(jn,"__esModule",{value:!0});var An=/.+\@.+\..+/;jn.default=function(t){return An.test(t)};var Tn=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.Group=void 0;var Fn=Tn(kn.exports),Dn=Tn(jn),Nn=Tn(dn),Rn=Ke;function zn(t,e){Rn.Facade.call(this,t,e)}Pn.Group=zn,Fn.default(zn,Rn.Facade);var qn=zn.prototype;qn.action=function(){return"group"},qn.type=qn.action,qn.groupId=Rn.Facade.field("groupId"),qn.created=function(){var t=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(t)return Nn.default(t)},qn.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.groupId();return Dn.default(e)?e:void 0},qn.traits=function(t){var e=this.properties(),n=this.groupId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(e[t[r]]=i,delete e[r])}return e},qn.name=Rn.Facade.proxy("traits.name"),qn.industry=Rn.Facade.proxy("traits.industry"),qn.employees=Rn.Facade.proxy("traits.employees"),qn.properties=function(){return this.field("traits")||this.field("properties")||{}};var Bn={},Un=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.Identify=void 0;var Vn=Ke,Gn=Un(He.exports),Kn=Un(kn.exports),Zn=Un(jn),Hn=Un(dn),Wn=function(t){return t.trim()};function Jn(t,e){Vn.Facade.call(this,t,e)}Bn.Identify=Jn,Kn.default(Jn,Vn.Facade);var $n=Jn.prototype;$n.action=function(){return"identify"},$n.type=$n.action,$n.traits=function(t){var e=this.field("traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(e[t[r]]=i,r!==t[r]&&delete e[r])}return e},$n.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.userId();return Zn.default(e)?e:void 0},$n.created=function(){var t=this.proxy("traits.created")||this.proxy("traits.createdAt");if(t)return Hn.default(t)},$n.companyCreated=function(){var t=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(t)return Hn.default(t)},$n.companyName=function(){return this.proxy("traits.company.name")},$n.name=function(){var t=this.proxy("traits.name");if("string"==typeof t)return Wn(t);var e=this.firstName(),n=this.lastName();return e&&n?Wn(e+" "+n):void 0},$n.firstName=function(){var t=this.proxy("traits.firstName");if("string"==typeof t)return Wn(t);var e=this.proxy("traits.name");return"string"==typeof e?Wn(e).split(" ")[0]:void 0},$n.lastName=function(){var t=this.proxy("traits.lastName");if("string"==typeof t)return Wn(t);var e=this.proxy("traits.name");if("string"==typeof e){var n=Wn(e).indexOf(" ");if(-1!==n)return Wn(e.substr(n+1))}},$n.uid=function(){return this.userId()||this.username()||this.email()},$n.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},$n.age=function(){var t=this.birthday(),e=Gn.default(this.traits(),"age");return null!=e?e:t instanceof Date?(new Date).getFullYear()-t.getFullYear():void 0},$n.avatar=function(){var t=this.traits();return Gn.default(t,"avatar")||Gn.default(t,"photoUrl")||Gn.default(t,"avatarUrl")},$n.position=function(){var t=this.traits();return Gn.default(t,"position")||Gn.default(t,"jobTitle")},$n.username=Vn.Facade.proxy("traits.username"),$n.website=Vn.Facade.one("traits.website"),$n.websites=Vn.Facade.multi("traits.website"),$n.phone=Vn.Facade.one("traits.phone"),$n.phones=Vn.Facade.multi("traits.phone"),$n.address=Vn.Facade.proxy("traits.address"),$n.gender=Vn.Facade.proxy("traits.gender"),$n.birthday=Vn.Facade.proxy("traits.birthday");var Yn={},Qn=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.Track=void 0;var Xn=Qn(kn.exports),tr=Ke,er=Bn,nr=Qn(jn),rr=Qn(He.exports);function ir(t,e){tr.Facade.call(this,t,e)}Yn.Track=ir,Xn.default(ir,tr.Facade);var or=ir.prototype;or.action=function(){return"track"},or.type=or.action,or.event=tr.Facade.field("event"),or.value=tr.Facade.proxy("properties.value"),or.category=tr.Facade.proxy("properties.category"),or.id=tr.Facade.proxy("properties.id"),or.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},or.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},or.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},or.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},or.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},or.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},or.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},or.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},or.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},or.sku=tr.Facade.proxy("properties.sku"),or.tax=tr.Facade.proxy("properties.tax"),or.name=tr.Facade.proxy("properties.name"),or.price=tr.Facade.proxy("properties.price"),or.total=tr.Facade.proxy("properties.total"),or.repeat=tr.Facade.proxy("properties.repeat"),or.coupon=tr.Facade.proxy("properties.coupon"),or.shipping=tr.Facade.proxy("properties.shipping"),or.discount=tr.Facade.proxy("properties.discount"),or.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},or.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},or.description=tr.Facade.proxy("properties.description"),or.plan=tr.Facade.proxy("properties.plan"),or.subtotal=function(){var t=rr.default(this.properties(),"subtotal"),e=this.total()||this.revenue();if(t)return t;if(!e)return 0;if(this.total()){var n=this.tax();n&&(e-=n),(n=this.shipping())&&(e-=n),(n=this.discount())&&(e+=n)}return e},or.products=function(){var t=this.properties(),e=rr.default(t,"products");return Array.isArray(e)?e.filter((function(t){return null!==t})):[]},or.quantity=function(){return(this.obj.properties||{}).quantity||1},or.currency=function(){return(this.obj.properties||{}).currency||"USD"},or.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},or.query=tr.Facade.proxy("options.query"),or.properties=function(t){var e=this.field("properties")||{};for(var n in t=t||{}){var r=null==this[n]?this.proxy("properties."+n):this[n]();null!=r&&(e[t[n]]=r,delete e[n])}return e},or.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},or.email=function(){var t=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(t)return t;var e=this.userId();return nr.default(e)?e:void 0},or.revenue=function(){var t=this.proxy("properties.revenue"),e=this.event();return!t&&e&&e.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(t=this.proxy("properties.total")),function(t){if(!t)return;if("number"==typeof t)return t;if("string"!=typeof t)return;if(t=t.replace(/\$/g,""),t=parseFloat(t),!isNaN(t))return t}(t)},or.cents=function(){var t=this.revenue();return"number"!=typeof t?this.value()||0:100*t},or.identify=function(){var t=this.json();return t.traits=this.traits(),new er.Identify(t,this.opts)};var ar={},sr=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ar,"__esModule",{value:!0}),ar.Page=void 0;var ur=sr(kn.exports),cr=Ke,lr=Yn,dr=sr(jn);function fr(t,e){cr.Facade.call(this,t,e)}ar.Page=fr,ur.default(fr,cr.Facade);var pr=fr.prototype;pr.action=function(){return"page"},pr.type=pr.action,pr.category=cr.Facade.field("category"),pr.name=cr.Facade.field("name"),pr.title=cr.Facade.proxy("properties.title"),pr.path=cr.Facade.proxy("properties.path"),pr.url=cr.Facade.proxy("properties.url"),pr.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},pr.properties=function(t){var e=this.field("properties")||{},n=this.category(),r=this.name();for(var i in t=t||{},n&&(e.category=n),r&&(e.name=r),t){var o=null==this[i]?this.proxy("properties."+i):this[i]();null!=o&&(e[t[i]]=o,i!==t[i]&&delete e[i])}return e},pr.email=function(){var t=this.proxy("context.traits.email")||this.proxy("properties.email");if(t)return t;var e=this.userId();return dr.default(e)?e:void 0},pr.fullName=function(){var t=this.category(),e=this.name();return e&&t?t+" "+e:e},pr.event=function(t){return t?"Viewed "+t+" Page":"Loaded a Page"},pr.track=function(t){var e=this.json();return e.event=this.event(t),e.timestamp=this.timestamp(),e.properties=this.properties(),new lr.Track(e,this.opts)};var hr={},vr=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(hr,"__esModule",{value:!0}),hr.Screen=void 0;var yr=vr(kn.exports),gr=ar,mr=Yn;function br(t,e){gr.Page.call(this,t,e)}hr.Screen=br,yr.default(br,gr.Page),br.prototype.action=function(){return"screen"},br.prototype.type=br.prototype.action,br.prototype.event=function(t){return t?"Viewed "+t+" Screen":"Loaded a Screen"},br.prototype.track=function(t){var e=this.json();return e.event=this.event(t),e.timestamp=this.timestamp(),e.properties=this.properties(),new mr.Track(e,this.opts)};var wr={},xr=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wr,"__esModule",{value:!0}),wr.Delete=void 0;var _r=xr(kn.exports),Cr=Ke;function Sr(t,e){Cr.Facade.call(this,t,e)}wr.Delete=Sr,_r.default(Sr,Cr.Facade),Sr.prototype.type=function(){return"delete"},function(t){var e=wt&&wt.__assign||function(){return e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},e.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Delete=t.Screen=t.Page=t.Track=t.Identify=t.Group=t.Alias=t.Facade=void 0;var n=Ke;Object.defineProperty(t,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=In;Object.defineProperty(t,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=Pn;Object.defineProperty(t,"Group",{enumerable:!0,get:function(){return i.Group}});var o=Bn;Object.defineProperty(t,"Identify",{enumerable:!0,get:function(){return o.Identify}});var a=Yn;Object.defineProperty(t,"Track",{enumerable:!0,get:function(){return a.Track}});var s=ar;Object.defineProperty(t,"Page",{enumerable:!0,get:function(){return s.Page}});var u=hr;Object.defineProperty(t,"Screen",{enumerable:!0,get:function(){return u.Screen}});var c=wr;Object.defineProperty(t,"Delete",{enumerable:!0,get:function(){return c.Delete}}),t.default=e(e({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:o.Identify,Track:a.Track,Page:s.Page,Screen:u.Screen,Delete:c.Delete})}(Ge);var Ir={exports:{}};!function(t,e){t.exports=function(t){var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(t,e){var n=t[0],r=t[1],i=t[2],o=t[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+e[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+e[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+e[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+e[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+e[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+e[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+e[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+e[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+e[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+e[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+e[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+e[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+e[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+e[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+e[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+e[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+e[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+e[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+e[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+e[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+e[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+e[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+e[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+e[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+e[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+e[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+e[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+e[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+e[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+e[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+e[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+e[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+e[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+e[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+e[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+e[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+e[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+e[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+e[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+e[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+e[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+e[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+e[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+e[9]-343485551|0)<<21|r>>>11)+i|0,t[0]=n+t[0]|0,t[1]=r+t[1]|0,t[2]=i+t[2]|0,t[3]=o+t[3]|0}function r(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}function i(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return n}function o(t){var e,i,o,a,s,u,c=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=c;e+=64)n(l,r(t.substring(e-64,e)));for(i=(t=t.substring(e-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<i;e+=1)o[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(n(l,o),e=0;e<16;e+=1)o[e]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,n(l,o),l}function a(t){var e,r,o,a,s,u,c=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=c;e+=64)n(l,i(t.subarray(e-64,e)));for(r=(t=e-64<c?t.subarray(e-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<r;e+=1)o[e>>2]|=t[e]<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(n(l,o),e=0;e<16;e+=1)o[e]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,n(l,o),l}function s(t){var n,r="";for(n=0;n<4;n+=1)r+=e[t>>8*n+4&15]+e[t>>8*n&15];return r}function u(t){var e;for(e=0;e<t.length;e+=1)t[e]=s(t[e]);return t.join("")}function c(t){return/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t))),t}function l(t,e){var n,r=t.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=t.charCodeAt(n);return e?o:i}function d(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function f(t,e,n){var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(new Uint8Array(t)),r.set(new Uint8Array(e),t.byteLength),n?r:r.buffer}function p(t){var e,n=[],r=t.length;for(e=0;e<r-1;e+=2)n.push(parseInt(t.substr(e,2),16));return String.fromCharCode.apply(String,n)}function h(){this.reset()}return u(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(t,e){return(t=0|t||0)<0?Math.max(t+e,0):Math.min(t,e)}ArrayBuffer.prototype.slice=function(n,r){var i,o,a,s,u=this.byteLength,c=e(n,u),l=u;return r!==t&&(l=e(r,u)),c>l?new ArrayBuffer(0):(i=l-c,o=new ArrayBuffer(i),a=new Uint8Array(o),s=new Uint8Array(this,c,i),a.set(s),o)}}(),h.prototype.append=function(t){return this.appendBinary(c(t)),this},h.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var e,i=this._buff.length;for(e=64;e<=i;e+=64)n(this._hash,r(this._buff.substring(e-64,e)));return this._buff=this._buff.substring(e-64),this},h.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=r.charCodeAt(e)<<(e%4<<3);return this._finish(o,i),n=u(this._hash),t&&(n=p(n)),this.reset(),n},h.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},h.prototype.setState=function(t){return this._buff=t.buff,this._length=t.length,this._hash=t.hash,this},h.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},h.prototype._finish=function(t,e){var r,i,o,a=e;if(t[a>>2]|=128<<(a%4<<3),a>55)for(n(this._hash,t),a=0;a<16;a+=1)t[a]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,t[14]=i,t[15]=o,n(this._hash,t)},h.hash=function(t,e){return h.hashBinary(c(t),e)},h.hashBinary=function(t,e){var n=u(o(t));return e?p(n):n},h.ArrayBuffer=function(){this.reset()},h.ArrayBuffer.prototype.append=function(t){var e,r=f(this._buff.buffer,t,!0),o=r.length;for(this._length+=t.byteLength,e=64;e<=o;e+=64)n(this._hash,i(r.subarray(e-64,e)));return this._buff=e-64<o?new Uint8Array(r.buffer.slice(e-64)):new Uint8Array(0),this},h.ArrayBuffer.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=r[e]<<(e%4<<3);return this._finish(o,i),n=u(this._hash),t&&(n=p(n)),this.reset(),n},h.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.ArrayBuffer.prototype.getState=function(){var t=h.prototype.getState.call(this);return t.buff=d(t.buff),t},h.ArrayBuffer.prototype.setState=function(t){return t.buff=l(t.buff,!0),h.prototype.setState.call(this,t)},h.ArrayBuffer.prototype.destroy=h.prototype.destroy,h.ArrayBuffer.prototype._finish=h.prototype._finish,h.ArrayBuffer.hash=function(t,e){var n=u(a(new Uint8Array(t)));return e?p(n):n},h}()}(Ir);var kr=Ir.exports,Or=function(){function t(t){this.user=t}return t.prototype.track=function(t,e,n,r){return this.normalize(gt(gt({},this.baseEvent()),{event:t,type:"track",properties:e,options:gt({},n),integrations:gt({},r)}))},t.prototype.page=function(t,e,n,r,i){var o,a={type:"page",properties:gt({},n),options:gt({},r),integrations:gt({},i)};return null!==t&&(a.category=t,a.properties=null!==(o=a.properties)&&void 0!==o?o:{},a.properties.category=t),null!==e&&(a.name=e),this.normalize(gt(gt({},this.baseEvent()),a))},t.prototype.screen=function(t,e,n,r,i){var o={type:"screen",properties:gt({},n),options:gt({},r),integrations:gt({},i)};return null!==t&&(o.category=t),null!==e&&(o.name=e),this.normalize(gt(gt({},this.baseEvent()),o))},t.prototype.identify=function(t,e,n,r){return this.normalize(gt(gt({},this.baseEvent()),{type:"identify",userId:t,traits:e,options:gt({},n),integrations:gt({},r)}))},t.prototype.group=function(t,e,n,r){return this.normalize(gt(gt({},this.baseEvent()),{type:"group",traits:e,options:gt({},n),integrations:gt({},r),groupId:t}))},t.prototype.alias=function(t,e,n,r){var i={userId:t,type:"alias",options:gt({},n),integrations:gt({},r)};return null!==e&&(i.previousId=e),void 0===t?this.normalize(gt(gt({},i),this.baseEvent())):this.normalize(gt(gt({},this.baseEvent()),i))},t.prototype.baseEvent=function(){var t={integrations:{},options:{}},e=this.user;return e.id()&&(t.userId=e.id()),e.anonymousId()&&(t.anonymousId=e.anonymousId()),t},t.prototype.context=function(t){var e,n,r,i=["integrations","anonymousId","timestamp","userId"],o=null!==(e=t.options)&&void 0!==e?e:{};delete o.integrations;var a=Object.keys(o),s=null!==(r=null===(n=t.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},u={};return a.forEach((function(t){"context"!==t&&(i.includes(t)?Ce(u,t,o[t]):Ce(s,t,o[t]))})),[s,u]},t.prototype.normalize=function(t){var e,n,r=Object.keys(null!==(e=t.integrations)&&void 0!==e?e:{}).reduce((function(e,n){var r,i;return gt(gt({},e),((r={})[n]=Boolean(null===(i=t.integrations)||void 0===i?void 0:i[n]),r))}),{}),i=gt(gt({},r),null===(n=t.options)||void 0===n?void 0:n.integrations),o=this.context(t),a=o[0],s=o[1];t.options;var u=xt(t,["options"]),c=gt(gt(gt({timestamp:new Date},u),{context:a,integrations:i}),s),l="ajs-next-"+kr.hash(JSON.stringify(c)+_e());return gt(gt({},c),{messageId:l})},t}();var Er="onRemoveFromFuture",Lr=R("P",function(t){function e(e,n,r){var i=t.call(this)||this;return i.future=[],i.maxAttempts=e,i.queue=n,i.seen=null!=r?r:{},i}return yt(e,t),e.prototype.push=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.map((function(e){return!(t.updateAttempts(e)>t.maxAttempts||t.includes(e))&&(t.queue.push(e),!0)}));return this.queue=this.queue.sort((function(e,n){return t.getAttempts(e)-t.getAttempts(n)})),r},e.prototype.pushWithBackoff=function(t){var e=this;if(0===this.getAttempts(t))return this.push(t)[0];var n=this.updateAttempts(t);if(n>this.maxAttempts||this.includes(t))return!1;var r=function(t){var e=Math.random()+1,n=t.minTimeout,r=void 0===n?500:n,i=t.factor,o=void 0===i?2:i,a=t.attempt,s=t.maxTimeout,u=void 0===s?1/0:s;return Math.min(e*r*Math.pow(o,a),u)}({attempt:n-1});return setTimeout((function(){e.queue.push(t),e.future=e.future.filter((function(e){return e.id!==t.id})),e.emit(Er)}),r),this.future.push(t),!0},e.prototype.getAttempts=function(t){var e;return null!==(e=this.seen[t.id])&&void 0!==e?e:0},e.prototype.updateAttempts=function(t){return this.seen[t.id]=this.getAttempts(t)+1,this.getAttempts(t)},e.prototype.includes=function(t){return this.queue.includes(t)||this.future.includes(t)||Boolean(this.queue.find((function(e){return e.id===t.id})))||Boolean(this.future.find((function(e){return e.id===t.id})))},e.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(e.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),e}(Ve)),Mr={getItem:function(){},setItem:function(){},removeItem:function(){}};try{Mr=ye()&&window.localStorage?window.localStorage:Mr}catch(fs){console.warn("Unable to access localStorage",fs)}function Pr(t){var e=Mr.getItem(t);return(e?JSON.parse(e):[]).map((function(t){return new Ue(t.event,t.id)}))}function jr(t){var e=Mr.getItem(t);return e?JSON.parse(e):{}}function Ar(t){Mr.removeItem(t)}function Tr(t,e,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(t,":lock"),i=Mr.getItem(r),o=i?JSON.parse(i):null,a=null===o||function(t){return(new Date).getTime()>t}(o);if(a)return Mr.setItem(r,JSON.stringify((new Date).getTime()+50)),e(),void Mr.removeItem(r);!a&&n<3?setTimeout((function(){Tr(t,e,n+1)}),50):console.error("Unable to retrieve lock")}var Fr=R("f",function(t){function e(e,n){var r=t.call(this,e,[])||this,i="persisted-queue:v1:".concat(n,":items"),o="persisted-queue:v1:".concat(n,":seen"),a=[],s={};return Tr(n,(function(){try{a=Pr(i),s=jr(o),Ar(i),Ar(o),r.queue=_t(_t([],a,!0),r.queue,!0),r.seen=gt(gt({},s),r.seen)}catch(fs){console.error(fs)}})),document.addEventListener("pagehide",(function(){if(r.todo>0){var t=_t(_t([],r.queue,!0),r.future,!0);try{Tr(n,(function(){!function(t,e){var n=Pr(t),r=_t(_t([],e,!0),n,!0).reduce((function(t,e){var n;return gt(gt({},t),((n={})[e.id]=e,n))}),{});Mr.setItem(t,JSON.stringify(Object.values(r)))}(i,t),function(t,e){var n=jr(t);Mr.setItem(t,JSON.stringify(gt(gt({},n),e)))}(o,r.seen)}))}catch(fs){console.error(fs)}}})),r}return yt(e,t),e}(Lr)),Dr=function(t){return"object"===$(t)&&null!==t&&"then"in t&&"function"==typeof t.then};function Nr(t,e){var n="action"in e?e.action.name:e.name;t.log("debug","plugin",{plugin:n});var r=(new Date).getTime(),i=e[t.event.type];if(void 0===i)return Promise.resolve(t);var o=function(t){return mt(this,void 0,void 0,(function(){var e;return bt(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,t()];case 1:return[2,n.sent()];case 2:return e=n.sent(),[2,Promise.reject(e)];case 3:return[2]}}))}))}((function(){return i.apply(e,[t])})).then((function(t){var e=(new Date).getTime()-r;return t.stats.gauge("plugin_time",e,["plugin:".concat(n)]),t})).catch((function(e){if(e instanceof Be&&"middleware_cancellation"===e.type)throw e;return e instanceof Be?(t.log("warn",e.type,{plugin:n,error:e}),e):(t.log("error","plugin Error",{plugin:n,error:e}),t.stats.increment("plugin_error",1,["plugin:".concat(n)]),e)}));return o}function Rr(t,e){return Nr(t,e).then((function(e){if(e instanceof Ue)return e;t.log("debug","Context canceled"),t.stats.increment("context_canceled"),t.cancel(e)}))}var zr,qr,Br=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null},Ur=null!==(zr=(qr=Br()).__SEGMENT_INSPECTOR__)&&void 0!==zr?zr:qr.__SEGMENT_INSPECTOR__={},Vr=function(t){function e(e){var n,r,i,o=t.call(this)||this;return o.criticalTasks=(i=0,{done:function(){return n},run:function(t){var e=t();return Dr(e)&&(1==++i&&(n=new Promise((function(t){return r=t}))),e.finally((function(){return 0==--i&&r()}))),e}}),o.plugins=[],o.failedInitializations=[],o.flushing=!1,o.queue=null!=e?e:new Fr(4,"event-queue"),o.queue.on(Er,(function(){o.scheduleFlush(0)})),o}return yt(e,t),e.prototype.register=function(t,e,n){return mt(this,void 0,void 0,(function(){var r=this;return bt(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve(e.load(t,n)).then((function(){r.plugins.push(e)})).catch((function(n){if("destination"===e.type)return r.failedInitializations.push(e.name),console.warn(e.name,n),void t.log("warn","Failed to load destination",{plugin:e.name,error:n});throw n}))];case 1:return i.sent(),[2]}}))}))},e.prototype.deregister=function(t,e,n){return mt(this,void 0,void 0,(function(){var r;return bt(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e.unload?[4,Promise.resolve(e.unload(t,n))]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.plugins=this.plugins.filter((function(t){return t.name!==e.name})),[3,4];case 3:return r=i.sent(),t.log("warn","Failed to unload destination",{plugin:e.name,error:r}),[3,4];case 4:return[2]}}))}))},e.prototype.dispatch=function(t){return mt(this,void 0,void 0,(function(){var e;return bt(this,(function(n){return t.log("debug","Dispatching"),t.stats.increment("message_dispatched"),this.queue.push(t),e=this.subscribeToDelivery(t),this.scheduleFlush(0),[2,e]}))}))},e.prototype.subscribeToDelivery=function(t){return mt(this,void 0,void 0,(function(){var e=this;return bt(this,(function(n){return[2,new Promise((function(n){e.on("flush",(function r(i,o){i.isSame(t)&&(e.off("flush",r),n(i))}))}))]}))}))},e.prototype.dispatchSingle=function(t){return mt(this,void 0,void 0,(function(){var e=this;return bt(this,(function(n){return t.log("debug","Dispatching"),t.stats.increment("message_dispatched"),this.queue.updateAttempts(t),t.attempts=1,[2,this.deliver(t).catch((function(n){return n instanceof Be&&!1===n.retry?(t.setFailedDelivery({reason:n}),t):e.enqueuRetry(n,t)?e.subscribeToDelivery(t):(t.setFailedDelivery({reason:n}),t)}))]}))}))},e.prototype.isEmpty=function(){return 0===this.queue.length},e.prototype.scheduleFlush=function(t){var e=this;void 0===t&&(t=500),this.flushing||(this.flushing=!0,setTimeout((function(){e.flush().then((function(){setTimeout((function(){e.flushing=!1,e.queue.length&&e.scheduleFlush(0)}),0)}))}),t))},e.prototype.deliver=function(t){return mt(this,void 0,void 0,(function(){var e,n,r;return bt(this,(function(i){switch(i.label){case 0:return[4,this.criticalTasks.done()];case 1:i.sent(),e=Date.now(),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.flushOne(t)];case 3:return t=i.sent(),n=Date.now()-e,t.stats.gauge("delivered",n),t.log("debug","Delivered",t.event),[2,t];case 4:throw r=i.sent(),t.log("error","Failed to deliver",r),t.stats.increment("delivery_failed"),r;case 5:return[2]}}))}))},e.prototype.enqueuRetry=function(t,e){return!(t instanceof Be&&!1===t.retry)&&this.queue.pushWithBackoff(e)},e.prototype.flush=function(){return mt(this,void 0,void 0,(function(){var t,e;return bt(this,(function(n){switch(n.label){case 0:if(0===this.queue.length||!ge())return[2,[]];if(!(t=this.queue.pop()))return[2,[]];t.attempts=this.queue.getAttempts(t),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deliver(t)];case 2:return t=n.sent(),this.emit("flush",t,!0),[3,4];case 3:return e=n.sent(),this.enqueuRetry(e,t)||(t.setFailedDelivery({reason:e}),this.emit("flush",t,!1)),[2,[]];case 4:return[2,[t]]}}))}))},e.prototype.isReady=function(){return!0},e.prototype.availableExtensions=function(t){var e,n,r=this.plugins.filter((function(e){var n,r,i;if("destination"!==e.type&&"Segment.io"!==e.name)return!0;var o=void 0;return null===(n=e.alternativeNames)||void 0===n||n.forEach((function(e){void 0!==t[e]&&(o=t[e])})),null!==(i=null!==(r=t[e.name])&&void 0!==r?r:o)&&void 0!==i?i:!1!==("Segment.io"===e.name||t.All)})),i=(e="type",n={},r.forEach((function(t){var r,i=void 0;if("string"==typeof e){var o=t[e];i="string"!=typeof o?JSON.stringify(o):o}else e instanceof Function&&(i=e(t));void 0!==i&&(n[i]=_t(_t([],null!==(r=n[i])&&void 0!==r?r:[],!0),[t],!1))})),n),o=i.before,a=void 0===o?[]:o,s=i.enrichment,u=void 0===s?[]:s,c=i.destination,l=void 0===c?[]:c,d=i.after;return{before:a,enrichment:u,destinations:l,after:void 0===d?[]:d}},e.prototype.flushOne=function(t){var e,n,r,i;return mt(this,void 0,void 0,(function(){var o,a,s,u,c,l,d,f,p,h,v,y,g,m;return bt(this,(function(b){switch(b.label){case 0:if(!this.isReady())throw new Error("Not ready");o=this.availableExtensions(null!==(e=t.event.integrations)&&void 0!==e?e:{}),a=o.before,s=o.enrichment,u=0,c=a,b.label=1;case 1:return u<c.length?(l=c[u],[4,Rr(t,l)]):[3,4];case 2:(h=b.sent())instanceof Ue&&(t=h),b.label=3;case 3:return u++,[3,1];case 4:d=0,f=s,b.label=5;case 5:return d<f.length?(p=f[d],[4,Nr(t,p)]):[3,8];case 6:(h=b.sent())instanceof Ue&&(t=h),b.label=7;case 7:return d++,[3,5];case 8:return null===(n=Ur.enriched)||void 0===n||n.call(Ur,t),v=this.availableExtensions(null!==(r=t.event.integrations)&&void 0!==r?r:{}),y=v.destinations,g=v.after,[4,new Promise((function(e,n){setTimeout((function(){var r=y.map((function(e){return Nr(t,e)}));Promise.all(r).then(e).catch(n)}),0)}))];case 9:return b.sent(),t.stats.increment("message_delivered"),null===(i=Ur.delivered)||void 0===i||i.call(Ur,t,["segment.io"]),m=g.map((function(e){return Nr(t,e)})),[4,Promise.all(m)];case 10:return b.sent(),[2,t]}}))}))},e}(Ve);function Gr(t){for(var e=t.constructor.prototype,n=0,r=Object.getOwnPropertyNames(e);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,i);o&&"function"==typeof o.value&&(t[i]=t[i].bind(t))}}return t}var Kr={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},Zr=function(){function t(){this.cache={}}return t.prototype.get=function(t){return this.cache[t]},t.prototype.set=function(t,e){return this.cache[t]=e,e},t.prototype.remove=function(t){delete this.cache[t]},t}(),Hr=function(t){function e(n){void 0===n&&(n=e.defaults);var r=t.call(this)||this;return r.options=gt(gt({},e.defaults),n),r}return yt(e,t),e.available=function(){var t=window.navigator.cookieEnabled;return t||(Ae.set("ajs:cookies","test"),t=document.cookie.includes("ajs:cookies"),Ae.remove("ajs:cookies")),t},Object.defineProperty(e,"defaults",{get:function(){return{maxage:365,domain:Fe(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),e.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},e.prototype.get=function(t){try{var e=Ae.get(t);if(!e)return null;try{return JSON.parse(e)}catch(n){return e}}catch(n){return null}},e.prototype.set=function(t,e){return"string"==typeof e?Ae.set(t,e,this.opts()):null===e?Ae.remove(t,this.opts()):Ae.set(t,JSON.stringify(e),this.opts()),e},e.prototype.remove=function(t){return Ae.remove(t,this.opts())},e}(Zr),Wr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.get=function(t){return null},e.set=function(t,e){return null},e.remove=function(t){},e}return yt(e,t),e}(Zr),Jr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return yt(e,t),e.available=function(){var t="test";try{return localStorage.setItem(t,t),localStorage.removeItem(t),!0}catch(e){return!1}},e.prototype.get=function(t){var e=localStorage.getItem(t);if(e)try{return JSON.parse(e)}catch(n){return JSON.parse(JSON.stringify(e))}return null},e.prototype.set=function(t,e){try{localStorage.setItem(t,JSON.stringify(e))}catch(zr){console.warn("Unable to set ".concat(t," in localStorage, storage may be full."))}return e},e.prototype.remove=function(t){return localStorage.removeItem(t)},e}(Zr),$r=function(){function t(t,e){void 0===t&&(t=Kr);var n,r,i,o,a=this;this.options={},this.id=function(t){var e,n;if(a.options.disable)return null;var r=a.chainGet(a.idKey);void 0!==t&&(a.trySet(a.idKey,t),t!==r&&null!==r&&null!==t&&a.anonymousId(null));return null!==(n=null!==(e=a.chainGet(a.idKey))&&void 0!==e?e:a.cookies.get(Kr.cookie.oldKey))&&void 0!==n?n:null},this.anonymousId=function(t){var e,n;if(a.options.disable)return null;if(void 0===t){var r=null!==(e=a.chainGet(a.anonKey))&&void 0!==e?e:null===(n=a.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===t?(a.trySet(a.anonKey,null),a.chainGet(a.anonKey)):(a.trySet(a.anonKey,null!=t?t:_e()),a.chainGet(a.anonKey))},this.traits=function(t){var e,n;if(!a.options.disable)return null===t&&(t={}),t&&(a.mem.set(a.traitsKey,null!=t?t:{}),a.localStorage.set(a.traitsKey,null!=t?t:{})),null!==(n=null!==(e=a.localStorage.get(a.traitsKey))&&void 0!==e?e:a.mem.get(a.traitsKey))&&void 0!==n?n:{}},this.options=t,this.cookieOptions=e,this.idKey=null!==(r=null===(n=t.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:Kr.cookie.key,this.traitsKey=null!==(o=null===(i=t.localStorage)||void 0===i?void 0:i.key)&&void 0!==o?o:Kr.localStorage.key,this.anonKey="ajs_anonymous_id";var s=!0===t.disable,u=!1!==t.persist;this.localStorage=s||t.localStorageFallbackDisabled||!u||!Jr.available()?new Wr:new Jr,this.cookies=!s&&u&&Hr.available()?new Hr(e):new Wr,this.mem=s?new Wr:new Zr;var c=this.cookies.get(Kr.cookie.oldKey);c&&(c.id&&this.id(c.id),c.traits&&this.traits(c.traits)),Gr(this)}return t.prototype.chainGet=function(t){var e,n,r,i=null!==(r=null!==(n=null!==(e=this.localStorage.get(t))&&void 0!==e?e:this.cookies.get(t))&&void 0!==n?n:this.mem.get(t))&&void 0!==r?r:null;return this.trySet(t,"number"==typeof i?i.toString():i)},t.prototype.trySet=function(t,e){return this.localStorage.set(t,e),this.cookies.set(t,e),this.mem.set(t,e),e},t.prototype.chainClear=function(t){this.localStorage.remove(t),this.cookies.remove(t),this.mem.remove(t)},t.prototype.legacySIO=function(){var t=this.cookies.get("_sio");if(!t)return null;var e=t.split("----");return[e[0],e[1]]},t.prototype.identify=function(t,e){if(!this.options.disable){e=null!=e?e:{};var n=this.id();null!==n&&n!==t||(e=gt(gt({},this.traits()),e)),t&&this.id(t),this.traits(e)}},t.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},t.prototype.reset=function(){this.logout(),this.chainClear(this.idKey),this.chainClear(this.anonKey),this.chainClear(this.traitsKey)},t.prototype.load=function(){return new t(this.options,this.cookieOptions)},t.prototype.save=function(){return!0},t.defaults=Kr,t}(),Yr={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},Qr=function(t){function e(e,n){void 0===e&&(e=Yr);var r=t.call(this,e,n)||this;return r.anonymousId=function(t){},Gr(r),r}return yt(e,t),e}($r),Xr="This is being deprecated and will be not be available in future releases of Analytics JS",ti=Br(),ei=null==ti?void 0:ti.analytics;function ni(){console.warn(Xr)}var ri=function(t){function e(e,n,r,i,o){var a,s,u,c=this;(c=t.call(this)||this)._debug=!1,c.initialized=!1,c.user=function(){return c._user},c.init=c.initialize.bind(c),c.log=ni,c.addIntegrationMiddleware=ni,c.listeners=ni,c.addEventListener=ni,c.removeAllListeners=ni,c.removeListener=ni,c.removeEventListener=ni,c.hasListeners=ni,c.add=ni,c.addIntegration=ni;var l=null==n?void 0:n.cookie,d=null!==(a=null==n?void 0:n.disableClientPersistence)&&void 0!==a&&a;return c.settings=e,c.settings.timeout=null!==(s=c.settings.timeout)&&void 0!==s?s:300,c.queue=null!=r?r:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var n=t?4:1,r=e?new Lr(n,[]):new Fr(n,"event-queue");return new Vr(r)}(null==n?void 0:n.retryQueue,d),c._user=null!=i?i:new $r(d?gt(gt({},null==n?void 0:n.user),{persist:!1}):null==n?void 0:n.user,l).load(),c._group=null!=o?o:new Qr(d?gt(gt({},null==n?void 0:n.group),{persist:!1}):null==n?void 0:n.group,l).load(),c.eventFactory=new Or(c._user),c.integrations=null!==(u=null==n?void 0:n.integrations)&&void 0!==u?u:{},c.options=null!=n?n:{},Gr(c),c}return yt(e,t),e.prototype.track=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n,r,i,o,a,s=this;return bt(this,(function(u){return e=ce.apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],a=this.eventFactory.track(n,r,i,this.integrations),[2,this.dispatch(a,o).then((function(t){return s.emit("track",n,t.event.properties,t.event.options),t}))]}))}))},e.prototype.page=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n,r,i,o,a,s,u=this;return bt(this,(function(c){return e=le.apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=this.eventFactory.page(n,r,i,o,this.integrations),[2,this.dispatch(s,a).then((function(t){return u.emit("page",n,r,t.event.properties,t.event.options),t}))]}))}))},e.prototype.identify=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n,r,i,o,a,s=this;return bt(this,(function(u){return e=de(this._user).apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],this._user.identify(n,r),a=this.eventFactory.identify(this._user.id(),this._user.traits(),i,this.integrations),[2,this.dispatch(a,o).then((function(t){return s.emit("identify",t.event.userId,t.event.traits,t.event.options),t}))]}))}))},e.prototype.group=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(0===e.length)return this._group;var r=de(this._group).apply(void 0,e),i=r[0],o=r[1],a=r[2],s=r[3];this._group.identify(i,o);var u=this._group.id(),c=this._group.traits(),l=this.eventFactory.group(u,c,a,this.integrations);return this.dispatch(l,s).then((function(e){return t.emit("group",e.event.groupId,e.event.traits,e.event.options),e}))},e.prototype.alias=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n,r,i,o,a,s=this;return bt(this,(function(u){return e=fe.apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],a=this.eventFactory.alias(n,r,i,this.integrations),[2,this.dispatch(a,o).then((function(t){return s.emit("alias",n,r,t.event.options),t}))]}))}))},e.prototype.screen=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n,r,i,o,a,s,u=this;return bt(this,(function(c){return e=le.apply(void 0,t),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=this.eventFactory.screen(n,r,i,o,this.integrations),[2,this.dispatch(s,a).then((function(t){return u.emit("screen",n,r,t.event.properties,t.event.options),t}))]}))}))},e.prototype.trackClick=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n;return bt(this,(function(r){switch(r.label){case 0:return[4,Ct((function(){return U.import("./auto-track-legacy.5a15cc10.js")}),void 0)];case 1:return e=r.sent(),[2,(n=e.link).call.apply(n,_t([this],t,!1))]}}))}))},e.prototype.trackLink=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n;return bt(this,(function(r){switch(r.label){case 0:return[4,Ct((function(){return U.import("./auto-track-legacy.5a15cc10.js")}),void 0)];case 1:return e=r.sent(),[2,(n=e.link).call.apply(n,_t([this],t,!1))]}}))}))},e.prototype.trackSubmit=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n;return bt(this,(function(r){switch(r.label){case 0:return[4,Ct((function(){return U.import("./auto-track-legacy.5a15cc10.js")}),void 0)];case 1:return e=r.sent(),[2,(n=e.form).call.apply(n,_t([this],t,!1))]}}))}))},e.prototype.trackForm=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n;return bt(this,(function(r){switch(r.label){case 0:return[4,Ct((function(){return U.import("./auto-track-legacy.5a15cc10.js")}),void 0)];case 1:return e=r.sent(),[2,(n=e.form).call.apply(n,_t([this],t,!1))]}}))}))},e.prototype.register=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n,r=this;return bt(this,(function(i){switch(i.label){case 0:return e=Ue.system(),n=t.map((function(t){return r.queue.register(e,t,r)})),[4,Promise.all(n)];case 1:return i.sent(),[2,e]}}))}))},e.prototype.deregister=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mt(this,void 0,void 0,(function(){var e,n,r=this;return bt(this,(function(i){switch(i.label){case 0:return e=Ue.system(),n=t.map((function(t){return mt(r,void 0,void 0,(function(){var n;return bt(this,(function(r){return n=this.queue.plugins.find((function(e){return e.name===t})),n?[2,this.queue.deregister(e,n,this)]:(e.log("warn","plugin ".concat(t," not found")),[2])}))}))})),[4,Promise.all(n)];case 1:return i.sent(),[2,e]}}))}))},e.prototype.debug=function(t){return!1===t&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=t,this},e.prototype.reset=function(){this._user.reset(),this._group.reset()},e.prototype.timeout=function(t){this.settings.timeout=t},e.prototype.dispatch=function(t,e){var n;return mt(this,void 0,void 0,(function(){var r,i,o,a,s;return bt(this,(function(u){switch(u.label){case 0:return r=new Ue(t),null===(n=Ur.triggered)||void 0===n||n.call(Ur,r),me()&&!this.options.retryQueue?[2,r]:(i=Date.now(),this.queue.isEmpty()?[4,this.queue.dispatchSingle(r)]:[3,2]);case 1:return o=u.sent(),[3,4];case 2:return[4,this.queue.dispatch(r)];case 3:o=u.sent(),u.label=4;case 4:return a=Date.now()-i,s=this.settings.timeout,e?[4,ve(o,e,Math.max((null!=s?s:300)-a,0),s)]:[3,6];case 5:o=u.sent(),u.label=6;case 6:return this._debug&&o.flush(),[2,o]}}))}))},e.prototype.addSourceMiddleware=function(t){return mt(this,void 0,void 0,(function(){var e=this;return bt(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return mt(e,void 0,void 0,(function(){var e,n,r;return bt(this,(function(i){switch(i.label){case 0:return[4,Ct((function(){return Promise.resolve().then((function(){return bi}))}),void 0)];case 1:return e=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach((function(t){if("destination"===t.type)return n[t.name]=!0})),r=e(t,n),[4,this.register(r)];case 2:return i.sent(),[2]}}))}))}))];case 1:return n.sent(),[2,this]}}))}))},e.prototype.addDestinationMiddleware=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=this.queue.plugins.filter((function(e){return e.name.toLowerCase()===t.toLowerCase()}));return r.forEach((function(t){t.addMiddleware.apply(t,e)})),Promise.resolve(this)},e.prototype.setAnonymousId=function(t){return this._user.anonymousId(t)},e.prototype.queryString=function(t){return mt(this,void 0,void 0,(function(){return bt(this,(function(e){switch(e.label){case 0:return[4,Ct((function(){return U.import("./index-legacy.b1b7c758.js")}),void 0)];case 1:return[2,(0,e.sent().queryString)(this,t)]}}))}))},e.prototype.use=function(t){return t(this),this},e.prototype.ready=function(t){return void 0===t&&(t=function(t){return t}),mt(this,void 0,void 0,(function(){return bt(this,(function(e){return[2,Promise.all(this.queue.plugins.map((function(t){return t.ready?t.ready():Promise.resolve()}))).then((function(e){return t(e),e}))]}))}))},e.prototype.noConflict=function(){return console.warn(Xr),window.analytics=null!=ei?ei:this,this},e.prototype.normalize=function(t){return console.warn(Xr),this.eventFactory.normalize(t)},Object.defineProperty(e.prototype,"failedInitializations",{get:function(){return console.warn(Xr),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"VERSION",{get:function(){return Me},enumerable:!1,configurable:!0}),e.prototype.initialize=function(t,e){return mt(this,void 0,void 0,(function(){return bt(this,(function(t){return console.warn(Xr),[2,Promise.resolve(this)]}))}))},e.prototype.pageview=function(t){return mt(this,void 0,void 0,(function(){return bt(this,(function(e){switch(e.label){case 0:return console.warn(Xr),[4,this.page({path:t})];case 1:return e.sent(),[2,this]}}))}))},Object.defineProperty(e.prototype,"plugins",{get:function(){var t;return console.warn(Xr),null!==(t=this._plugins)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Integrations",{get:function(){return console.warn(Xr),this.queue.plugins.filter((function(t){return"destination"===t.type})).reduce((function(t,e){var n="".concat(e.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return t;var i=r.Integration;return i?(t[e.name]=i,t):(t[e.name]=r,t)}),{})},enumerable:!1,configurable:!0}),e.prototype.push=function(t){var e=t.shift();e&&!this[e]||this[e].apply(this,t)},e}(Ve);function ii(){return"undefined"!=typeof process&&process.env?process.env:{}}var oi,ai=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,si=function(){var t=function(){var t;return null!=oi?oi:null===(t=window.analytics)||void 0===t?void 0:t._cdn}();if(t)return t;var e,n=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach((function(t){var n,r=null!==(n=t.getAttribute("src"))&&void 0!==n?n:"",i=ai.exec(r);i&&i[1]&&(e=i[1])})),e);return n||"https://cdn.segment.com"};R("g",(function(){var t=si();return"".concat(t,"/next-integrations")}));function ui(t,e){var n,r=Object.entries(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(t,e){var n,r,i=e[0],o=e[1];return"object"===$(o)?gt(gt({},t),((n={})[i]=o,n)):gt(gt({},t),((r={})[i]={},r))}),{});return Object.entries(t.integrations).reduce((function(t,e){var n,i=e[0],o=e[1];return gt(gt({},t),((n={})[i]=gt(gt({},o),r[i]),n))}),{})}function ci(){var t=document.getElementsByTagName("link"),e="";return Array.prototype.slice.call(t).forEach((function(t){"canonical"===t.getAttribute("rel")&&(e=t.getAttribute("href"))})),e}function li(){var t=ci();if(!t)return window.location.pathname;var e=document.createElement("a");return e.href=t,e.pathname.startsWith("/")?e.pathname:"/"+e.pathname}function di(t){void 0===t&&(t="");var e=ci();if(e)return e.includes("?")?e:"".concat(e).concat(t);var n=window.location.href,r=n.indexOf("#");return-1===r?n:n.slice(0,r)}function fi(){return{path:li(),referrer:document.referrer,search:location.search,title:document.title,url:di(location.search)}}function pi(t){var e,n=t.event;n.context=n.context||{};var r=fi(),i=null!==(e=n.properties)&&void 0!==e?e:{};return Object.keys(r).forEach((function(t){i[t]&&(r[t]=i[t])})),n.context.page&&(r=Object.assign({},r,n.context.page)),n.context=Object.assign({},n.context,{page:r}),t.event=n,t}var hi={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:function(t){return t.event.properties=Object.assign({},fi(),t.event.properties),t.event.name&&(t.event.properties.name=t.event.name),pi(t)},alias:pi,track:pi,identify:pi,group:pi};function vi(t){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(e){return e.src===t}))}function yi(t,e){var n=vi(t);if(void 0!==n){var r=null==n?void 0:n.getAttribute("status");if("loaded"===r)return Promise.resolve(n);if("loading"===r)return new Promise((function(t,e){n.addEventListener("load",(function(){return t(n)})),n.addEventListener("error",(function(t){return e(t)}))}))}return new Promise((function(n,r){var i,o=window.document.createElement("script");o.type="text/javascript",o.src=t,o.async=!0,o.setAttribute("status","loading");for(var a=0,s=Object.entries(null!=e?e:{});a<s.length;a++){var u=s[a],c=u[0],l=u[1];o.setAttribute(c,l)}o.onload=function(){o.onerror=o.onload=null,o.setAttribute("status","loaded"),n(o)},o.onerror=function(){o.onerror=o.onload=null,o.setAttribute("status","error"),r(new Error("Failed to load ".concat(t)))};var d=window.document.getElementsByTagName("script")[0];null===(i=d.parentElement)||void 0===i||i.insertBefore(o,d)}))}function gi(t,e){var n=new Ge.Facade(t,e);return"track"===t.type&&(n=new Ge.Track(t,e)),"identify"===t.type&&(n=new Ge.Identify(t,e)),"page"===t.type&&(n=new Ge.Page(t,e)),"alias"===t.type&&(n=new Ge.Alias(t,e)),"group"===t.type&&(n=new Ge.Group(t,e)),"screen"===t.type&&(n=new Ge.Screen(t,e)),Object.defineProperty(n,"obj",{value:t,writable:!0}),n}function mi(t,e,n){return mt(this,void 0,void 0,(function(){function r(e,n){return mt(this,void 0,void 0,(function(){var r,i,o;return bt(this,(function(a){switch(a.label){case 0:return r=!1,i=null,[4,pe(n({payload:gi(e,{clone:!0,traverse:!1}),integration:t,next:function(t){r=!0,null===t&&(i=null),t&&(i=t.obj)}}))];case 1:return a.sent(),r||null===i||(i.integrations=gt(gt({},e.integrations),((o={})[t]=!1,o))),[2,i]}}))}))}var i,o,a,s,u;return bt(this,(function(t){switch(t.label){case 0:i=function(t){return JSON.parse(JSON.stringify(t))}(e),o=0,a=n,t.label=1;case 1:return o<a.length?(s=a[o],[4,r(i,s)]):[3,4];case 2:if(null===(u=t.sent()))return[2,null];i=u,t.label=3;case 3:return o++,[3,1];case 4:return[2,i]}}))}))}var bi=Object.freeze(Object.defineProperty({__proto__:null,applyDestinationMiddleware:mi,sourceMiddlewarePlugin:function(t,e){function n(n){return mt(this,void 0,void 0,(function(){var r;return bt(this,(function(i){switch(i.label){case 0:return r=!1,[4,pe(t({payload:gi(n.event,{clone:!0,traverse:!1}),integrations:null!=e?e:{},next:function(t){r=!0,t&&(n.event=t.obj)}}))];case 1:if(i.sent(),!r)throw new Be({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(t.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(t){return Promise.resolve(t)},track:n,page:n,identify:n,alias:n,group:n}}},Symbol.toStringTag,{value:"Module"})),wi=function(){function t(t,e){this.version="1.0.0",this.alternativeNames=[],this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=e,this.name=t,this.type=e.type,this.alternativeNames.push(e.name)}return t.prototype.addMiddleware=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(t=this.middleware).push.apply(t,e)},t.prototype.transform=function(t){return mt(this,void 0,void 0,(function(){var e;return bt(this,(function(n){switch(n.label){case 0:return[4,mi(this.name,t.event,this.middleware)];case 1:return null===(e=n.sent())&&t.cancel(new Be({retry:!1,reason:"dropped by destination middleware"})),[2,new Ue(e)]}}))}))},t.prototype._createMethod=function(t){var e=this;return function(n){return mt(e,void 0,void 0,(function(){var e;return bt(this,(function(r){switch(r.label){case 0:return this.action[t]?[4,this.transform(n)]:[2,n];case 1:return e=r.sent(),[4,this.action[t](e)];case 2:return r.sent(),[2,n]}}))}))}},t.prototype.isLoaded=function(){return this.action.isLoaded()},t.prototype.ready=function(){return this.action.ready?this.action.ready():Promise.resolve()},t.prototype.load=function(t,e){return this.action.load(t,e)},t.prototype.unload=function(t,e){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,t,e)},t}();function xi(t,e,n,r,i){var o,a,s;return mt(this,void 0,void 0,(function(){var u,c,l,d,f=this;return bt(this,(function(p){switch(p.label){case 0:return u=[],c=si(),l=null!==(a=null===(o=t.middlewareSettings)||void 0===o?void 0:o.routingRules)&&void 0!==a?a:[],d=(null!==(s=t.remotePlugins)&&void 0!==s?s:[]).map((function(t){return mt(f,void 0,void 0,(function(){var o,a,s,d,f,p,h,v;return bt(this,(function(y){switch(y.label){case 0:if(!1===e.All&&!e[t.name]||!1===e[t.name])return[2];y.label=1;case 1:if(y.trys.push([1,12,,13]),!r)return[3,7];o=t.url.split("/"),a=o[o.length-2],s=t.url.replace(a,btoa(a).replace(/=/g,"")),y.label=2;case 2:return y.trys.push([2,4,,6]),[4,yi(s.replace("https://cdn.segment.com",c))];case 3:return y.sent(),[3,6];case 4:return y.sent(),[4,yi(t.url.replace("https://cdn.segment.com",c))];case 5:return y.sent(),[3,6];case 6:return[3,9];case 7:return[4,yi(t.url.replace("https://cdn.segment.com",c))];case 8:y.sent(),y.label=9;case 9:return d=t.libraryName,"function"!=typeof window[d]?[3,11]:[4,pe((0,window[d])(gt(gt({},t.settings),n[t.name])))];case 10:f=y.sent(),function(t){if(!Array.isArray(t))throw new Error("Not a valid list of plugins");var e=["load","isLoaded","name","version","type"];t.forEach((function(t){e.forEach((function(e){var n;if(void 0===t[e])throw new Error("Plugin: ".concat(null!==(n=t.name)&&void 0!==n?n:"unknown"," missing required function ").concat(e))}))}))}(p=Array.isArray(f)?f:[f]),h=l.filter((function(e){return e.destinationName===t.creationName})),p.forEach((function(e){var n=new wi(t.creationName,e);h.length&&i&&"destination"===e.type&&n.addMiddleware(i),u.push(n)})),y.label=11;case 11:return[3,13];case 12:return v=y.sent(),console.warn("Failed to load Remote Plugin",v),[3,13];case 13:return[2]}}))}))})),[4,Promise.all(d)];case 1:return p.sent(),[2,u.filter(Boolean)]}}))}))}var _i=Le;"undefined"!=typeof window&&(_i=window.fetch||Le);function Ci(t){return(encodeURI(JSON.stringify(t)).split(/%..|./).length-1)/1024}function Si(t,e){var n,r,i,o,a,s=[],u=!1,c=null!==(n=null==e?void 0:e.size)&&void 0!==n?n:10,l=null!==(r=null==e?void 0:e.timeout)&&void 0!==r?r:5e3;function d(e){var n;if(0!==e.length){var r=null===(n=e[0])||void 0===n?void 0:n.writeKey;return _i("https://".concat(t,"/b"),{keepalive:u,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({batch:e,writeKey:r})})}}function f(){return mt(this,void 0,void 0,(function(){var t;return bt(this,(function(e){return s.length?(t=s,s=[],[2,d(t)]):[2]}))}))}return o=function(){if(u=!0,s.length){var t=function(t){var e=[],n=0;return t.forEach((function(t){Ci(e[n])>=64&&n++,e[n]?e[n].push(t):e[n]=[t]})),e}(s).map(d);Promise.all(t).catch(console.error)}},a=!1,document.addEventListener("pagehide",(function(){a||(a=!0,o())})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(a)return;a=!0,o()}else a=!1})),{dispatch:function(t,e){return mt(this,void 0,void 0,(function(){var t;return bt(this,(function(n){return s.push(e),t=s.length>=c||function(t){return Ci(t)>=450}(s),[2,t||u?f():void(i||(i=setTimeout((function(){i=void 0,f().catch(console.error)}),l)))]}))}))}}}var Ii=Le;"undefined"!=typeof window&&(Ii=window.fetch||Le);var ki=R("p",(function(t,e){return mt(void 0,void 0,void 0,(function(){var n;return bt(this,(function(r){return n=function(r){return mt(void 0,void 0,void 0,(function(){var i;return bt(this,(function(o){switch(o.label){case 0:return t(r)?(i=n,[4,e()]):[3,2];case 1:return[2,i.apply(void 0,[o.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))}));function Oi(t,e){return mt(this,void 0,void 0,(function(){var n,r=this;return bt(this,(function(i){switch(i.label){case 0:return n=[],me()?[2,e]:[4,ki((function(){return e.length>0&&!me()}),(function(){return mt(r,void 0,void 0,(function(){var r,i;return bt(this,(function(o){switch(o.label){case 0:return(r=e.pop())?[4,Nr(r,t)]:[2];case 1:return i=o.sent(),i instanceof Ue||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(t){return e.pushWithBackoff(t)})),[2,e]}}))}))}function Ei(t,e,n,r){var i=this;t||setTimeout((function(){return mt(i,void 0,void 0,(function(){var t,i;return bt(this,(function(o){switch(o.label){case 0:return t=!0,[4,Oi(n,e)];case 1:return i=o.sent(),t=!1,e.todo>0&&r(t,i,n,r),[2]}}))}))}),5e3*Math.random())}function Li(t,e,n){var r,i,o,a,s=t.options.disableClientPersistence?new Lr(t.queue.queue.maxAttempts,[]):new Fr(t.queue.queue.maxAttempts,"dest-Segment.io"),u=null!==(r=null==e?void 0:e.apiHost)&&void 0!==r?r:"api.segment.io/v1",c=null!==(i=null==e?void 0:e.protocol)&&void 0!==i?i:"https",l="".concat(c,"://").concat(u),d="batching"===(null===(o=null==e?void 0:e.deliveryStrategy)||void 0===o?void 0:o.strategy)?Si(u,null===(a=null==e?void 0:e.deliveryStrategy)||void 0===a?void 0:a.config):{dispatch:function(t,e){return Ii(t,{headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(e)})}};function f(r){return mt(this,void 0,void 0,(function(){var i,o;return bt(this,(function(a){return me()?(s.push(r),Ei(false,s,p,Ei),[2,r]):(i=r.event.type.charAt(0),o=gi(r.event).json(),"track"===r.event.type&&delete o.traits,"alias"===r.event.type&&(o=function(t,e){var n,r,i,o,a=t.user();return e.previousId=null!==(i=null!==(r=null!==(n=e.previousId)&&void 0!==n?n:e.from)&&void 0!==r?r:a.id())&&void 0!==i?i:a.anonymousId(),e.userId=null!==(o=e.userId)&&void 0!==o?o:e.to,delete e.from,delete e.to,e}(t,o)),[2,d.dispatch("".concat(l,"/").concat(i),Ne(t,o,e,n)).then((function(){return r})).catch((function(t){return"error"!==t.type&&"Failed to fetch"!==t.message||(s.push(r),Ei(false,s,p,Ei)),r}))])}))}))}var p={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:f,identify:f,page:f,alias:f,group:f};return p}var Mi=function(t,e,n){n.getCalls(t).forEach((function(t){Fi(e,t).catch(console.error)}))},Pi=function(t,e){return mt(void 0,void 0,void 0,(function(){var n,r,i;return bt(this,(function(o){switch(o.label){case 0:n=0,r=e.getCalls("addSourceMiddleware"),o.label=1;case 1:return n<r.length?(i=r[n],[4,Fi(t,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},ji=Mi.bind(globalThis,"on"),Ai=Mi.bind(globalThis,"setAnonymousId"),Ti=function(){function t(){this._value={}}return t.prototype.toArray=function(){var t;return(t=[]).concat.apply(t,Object.values(this._value))},t.prototype.getCalls=function(t){var e;return null!==(e=this._value[t])&&void 0!==e?e:[]},t.prototype.push=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.forEach((function(e){t._value[e.method]?t._value[e.method].push(e):t._value[e.method]=[e]})),this},t.prototype.clear=function(){return this._value={},this},t}();function Fi(t,e){return mt(this,void 0,void 0,(function(){var n,r;return bt(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e.called?[2,void 0]:(e.called=!0,n=t[e.method].apply(t,e.args),Dr(n)?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return e.resolve(n),[3,4];case 3:return r=i.sent(),e.reject(r),[3,4];case 4:return[2]}}))}))}var Di=function(){function t(t){var e=this;this._preInitBuffer=new Ti,this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=Me,this._promise=t(this._preInitBuffer),this._promise.then((function(t){var n=t[0],r=t[1];e.instance=n,e.ctx=r})).catch((function(){}))}return t.prototype.then=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).then.apply(t,e)},t.prototype.catch=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).catch.apply(t,e)},t.prototype.finally=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).finally.apply(t,e)},t.prototype._createMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(e.instance){var o=(n=e.instance)[t].apply(n,r);return Promise.resolve(o)}return new Promise((function(n,i){e._preInitBuffer.push({method:t,args:r,resolve:n,reject:i,called:!1})}))}},t.prototype._createChainableMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.instance?((n=e.instance)[t].apply(n,r),e):(e._preInitBuffer.push({method:t,args:r,resolve:function(){},reject:console.error,called:!1}),e)}},t}();function Ni(t){var e=t[0],n=t.slice(1);return{method:e,resolve:function(){},reject:console.error,args:n,called:!1}}var Ri=function(){var t=window.analytics;if(!Array.isArray(t))return[];var e=t.splice(0,t.length);return e.map(Ni)};function zi(t,e){return mt(this,void 0,void 0,(function(){return bt(this,(function(n){switch(n.label){case 0:return e.push.apply(e,Ri()),[4,Pi(t,e)];case 1:return n.sent(),e.push.apply(e,Ri()),function(t,e){e.toArray().forEach((function(e){setTimeout((function(){Fi(t,e).catch(console.error)}),0)}))}(t,e),e.clear(),[2]}}))}))}function qi(t,e,n,r,i){var o,a,s;return mt(this,void 0,void 0,(function(){var u,c,l,d,f,p,h,v,y,g,m=this;return bt(this,(function(b){switch(b.label){case 0:return function(t){var e,n,r;return"test"!==ii().NODE_ENV&&(null!==(r=null===(n=null===(e=t.middlewareSettings)||void 0===e?void 0:e.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(t)?[4,Ct((function(){return U.import("./index-legacy.64d191bf.js")}),void 0).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return c=b.sent(),[3,3];case 2:c=void 0,b.label=3;case 3:return u=c,w=t,"test"!==ii().NODE_ENV&&Object.keys(w.integrations).length>1?[4,Ct((function(){return U.import("./index-legacy.fe45c685.js")}),void 0).then((function(r){return r.ajsDestinations(t,e.integrations,n,u)}))]:[3,5];case 4:return d=b.sent(),[3,6];case 5:d=[],b.label=6;case 6:return l=d,t.legacyVideoPluginsEnabled?[4,Ct((function(){return U.import("./index-legacy.f70a489f.js")}),void 0).then((function(t){return t.loadLegacyVideoPlugins(e)}))]:[3,8];case 7:b.sent(),b.label=8;case 8:return(null===(o=n.plan)||void 0===o?void 0:o.track)?[4,Ct((function(){return U.import("./index-legacy.bfac1b45.js")}),void 0).then((function(e){var r;return e.schemaFilter(null===(r=n.plan)||void 0===r?void 0:r.track,t)}))]:[3,10];case 9:return p=b.sent(),[3,11];case 10:p=void 0,b.label=11;case 11:return f=p,h=ui(t,r),[4,xi(t,e.integrations,h,r.obfuscate,u).catch((function(){return[]}))];case 12:return v=b.sent(),y=_t(_t(_t([ue,hi],i,!0),l,!0),v,!0),f&&y.push(f),!1===(null===(a=n.integrations)||void 0===a?void 0:a.All)&&!n.integrations["Segment.io"]||n.integrations&&!1===n.integrations["Segment.io"]||y.push(Li(e,h["Segment.io"],t.integrations)),[4,e.register.apply(e,y)];case 13:return g=b.sent(),Object.entries(null!==(s=t.enabledMiddleware)&&void 0!==s?s:{}).some((function(t){return t[1]}))?[4,Ct((function(){return U.import("./index-legacy.33e7763b.js")}),void 0).then((function(n){var i=n.remoteMiddlewares;return mt(m,void 0,void 0,(function(){var n,o;return bt(this,(function(a){switch(a.label){case 0:return[4,i(g,t,r.obfuscate)];case 1:return n=a.sent(),o=n.map((function(t){return e.addSourceMiddleware(t)})),[2,Promise.all(o)]}}))}))}))]:[3,15];case 14:b.sent(),b.label=15;case 15:return[2,g]}var w}))}))}function Bi(t,e,n){var r,i,o,a,s,u;return void 0===e&&(e={}),mt(this,void 0,void 0,(function(){var c,l,d,f,p,h,v,y,g,m;return bt(this,(function(b){switch(b.label){case 0:return t.cdnURL&&(C=t.cdnURL,window.analytics&&(window.analytics._cdn=C),oi=C),null===(r=t.cdnSettings)||void 0===r?[3,1]:(l=r,[3,3]);case 1:return[4,(w=t.writeKey,x=t.cdnURL,_=null!=x?x:si(),Le("".concat(_,"/v1/projects/").concat(w,"/settings")).then((function(t){return t.ok?t.json():t.text().then((function(t){throw new Error(t)}))})).catch((function(t){throw console.error(t.message),t})))];case 2:l=b.sent(),b.label=3;case 3:return d=null===(o=null===(i=(c=l).integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===o||o,f=gt({retryQueue:d},e),p=new ri(t,f),h=null!==(a=t.plugins)&&void 0!==a?a:[],Ue.initMetrics(c.metrics),function(t,e){e.push.apply(e,Ri()),Ai(t,e),ji(t,e)}(p,n),[4,qi(c,p,f,e,h)];case 4:return v=b.sent(),y=null!==(s=window.location.search)&&void 0!==s?s:"",g=null!==(u=window.location.hash)&&void 0!==u?u:"",(m=y.length?y:g.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,p.queryString(m).catch(console.error)]:[3,6];case 5:b.sent(),b.label=6;case 6:return p.initialized=!0,p.emit("initialize",t,e),e.initialPageview&&p.page().catch(console.error),[4,zi(p,n)];case 7:return b.sent(),[2,[p,v]]}var w,x,_,C}))}))}var Ui=function(t){function e(e){return t.call(this,e)||this}return yt(e,t),e.load=function(t,e){return void 0===e&&(e={}),new this((function(n){return Bi(t,e,n)}))},e.standalone=function(t,n){return e.load({writeKey:t},n).then((function(t){return t[0]}))},e}(Di),Vi=new(function(){function t(){Z(this,t),J(this,"analytics",void 0),this.analytics=Ui.load({writeKey:"c0SISxJpICLXxstkrSppa4uxwYzBQbqf"})}return W(t,[{key:"trackPageLoad",value:function(){this.analytics.page()}},{key:"trackEvent",value:function(t,e){this.analytics.track(t,{event_data:e,environment:"production"})}}]),t}()),Gi=function(t){return t.LC_VIEWED="LC-Viewed",t.LC_CATEGORY_CLICK="LC-Category-Clicked",t.LC_CATEGORY_VIEW="LC-Category-Viewed",t.LC_SCORE_CLICK="LC-Score-Clicked",t.LC_SCORE_VIEW="LC-Score-Viewed",t.LC_SCORE_CLOSE="LC-Score-Close",t.LC_TRANSPORT_MODE_CLICK="LC-Transportation-Method-Clicked",t.LC_LONG_DESCRIPTION_CLICK="LC-Long-Description-Clicked",t.LC_LONG_DESCRIPTION_VIEW="LC-Long-Description-Viewed",t.LC_POI_CLICK="LC-POI-Clicked",t.LC_POI_VIEW="LC-POI-Viewed",t.LC_SCORES_LIST_SCROLL="LC-Scores-List-Scroll",t.LC_COMMUTE_CALC_CLICK="LC-Commute-Calc-Clicked",t.LC_COMMUTE_CALC_VIEW="LC-Commute-Calc-Viewed",t.LC_COMMUTE_CALCULATE_ROUTE="LC-Commute-Calc-Calculate-Route",t.LC_ATTRIBUTION_CLICK="LC-Attribution-Clicked",t}(Gi||{}),Ki=St.createContext({}),Zi=function(){return It.exports.useContext(Ki)},Hi=function(t,e){switch(e.type){case"CATEGORY":return K(K({},t),{},{activeCategory:e.value});case"SCORE":var n=Et.find((function(n){return""===e.value?n.value===t.activeCategory:n.scores.includes(e.value)})).value;return{activeCategory:n,activeScoreByCategory:K(K({},t.activeScoreByCategory),{},J({},n,e.value))}}},Wi=function(t){var e=t.children,n=window.innerWidth<kt.screenSizes.tablet?{activeCategory:"commute",activeScoreByCategory:{commute:"transit_friendly",amenities:"groceries",character:"quiet",nature:"parks",education:"primary_schools"}}:{activeCategory:"commute",activeScoreByCategory:{commute:"",amenities:"",character:"",nature:"",education:""}},r=B(It.exports.useReducer(Hi,n),2),i=r[0],o=r[1],a=B(It.exports.useState(),2),s=a[0],u=a[1],c=B(It.exports.useState(),2),l=c[0],d=c[1],f=B(It.exports.useState(),2),p=f[0],h=f[1],v=B(It.exports.useState(),2),y=v[0],g=v[1];It.exports.useEffect((function(){s&&Vi.trackEvent(Gi.LC_POI_VIEW,{poi_name:null==s?void 0:s.name,poi_info:null==s?void 0:s.address})}),[s]);var m=i.activeCategory;It.exports.useEffect((function(){Vi.trackEvent(Gi.LC_CATEGORY_VIEW,m)}),[m]);var b=i.activeScoreByCategory[m];It.exports.useEffect((function(){""!==b&&Vi.trackEvent(Gi.LC_SCORE_VIEW,b)}),[b]);var w=function(t){o({type:"SCORE",value:t})},x=function(t){o({type:"CATEGORY",value:t})},_=It.exports.useMemo((function(){return{activeScore:b,setActiveScore:w,activeCategory:m,setActiveCategory:x,activePOI:s,setActivePOI:u,hoveredPOI:l,setHoveredPOI:d,commuteGeojson:p,setCommuteGeojson:h,destination:y,setDestination:g}}),[b,w,m,x,s,u,l,d,p,h,y,g]);return Ot(Ki.Provider,{value:_,children:e})};function Ji(t,e){if(!t)throw new Error(e)}var $i=0;function Yi(t){var e=It.exports.useContext(V).map.getMap(),n=It.exports.useRef(t),r=B(It.exports.useState(0),2)[1],i=It.exports.useMemo((function(){return t.id||"jsx-source-".concat($i++)}),[]);It.exports.useEffect((function(){if(e){var t=function(){return r((function(t){return t+1}))};return e.on("styledata",t),t(),function(){var n;if(e.off("styledata",t),e.style&&e.style._loaded&&e.getSource(i)){var r=null===(n=e.getStyle())||void 0===n?void 0:n.layers;if(r){var o,a=q(r);try{for(a.s();!(o=a.n()).done;){var s=o.value;s.source===i&&e.removeLayer(s.id)}}catch(fs){a.e(fs)}finally{a.f()}}e.removeSource(i)}}}}),[e]);var o=e&&e.style&&e.getSource(i);return o?function(t,e,n){Ji(e.id===n.id,"source id changed"),Ji(e.type===n.type,"source type changed");var r="",i=0;for(var o in e)"children"===o||"id"===o||G(n[o],e[o])||(r=o,i++);if(i){var a=e.type;if("geojson"===a)t.setData(e.data);else if("image"===a)t.updateImage({url:e.url,coordinates:e.coordinates});else if("canvas"!==a&&"video"!==a||1!==i||"coordinates"!==r)if("vector"===a&&"setUrl"in t)switch(r){case"url":t.setUrl(e.url);break;case"tiles":t.setTiles(e.tiles)}else console.warn("Unable to update <Source> prop: ".concat(r));else t.setCoordinates(e.coordinates)}}(o,t,n.current):o=function(t,e,n){if(t.style&&t.style._loaded){var r=K({},n);return delete r.id,delete r.children,t.addSource(e,r),t.getSource(e)}return null}(e,i,t),n.current=t,o&&It.exports.Children.map(t.children,(function(t){return t&&It.exports.cloneElement(t,{source:i})}))||null}var Qi=0;function Xi(t){var e=It.exports.useContext(V).map.getMap(),n=It.exports.useRef(t),r=B(It.exports.useState(0),2)[1],i=It.exports.useMemo((function(){return t.id||"jsx-layer-".concat(Qi++)}),[]);if(It.exports.useEffect((function(){if(e){var t=function(){return r((function(t){return t+1}))};return e.on("styledata",t),t(),function(){e.off("styledata",t),e.style&&e.style._loaded&&e.getLayer(i)&&e.removeLayer(i)}}}),[e]),e&&e.style&&e.getLayer(i))try{!function(t,e,n,r){if(Ji(n.id===r.id,"layer id changed"),Ji(n.type===r.type,"layer type changed"),"custom"!==n.type&&"custom"!==r.type){var i=n.layout,o=void 0===i?{}:i,a=n.paint,s=void 0===a?{}:a,u=n.filter,c=n.minzoom,l=n.maxzoom,d=n.beforeId;if(d!==r.beforeId&&t.moveLayer(e,d),o!==r.layout){var f=r.layout||{};for(var p in o)G(o[p],f[p])||t.setLayoutProperty(e,p,o[p]);for(var h in f)o.hasOwnProperty(h)||t.setLayoutProperty(e,h,void 0)}if(s!==r.paint){var v=r.paint||{};for(var y in s)G(s[y],v[y])||t.setPaintProperty(e,y,s[y]);for(var g in v)s.hasOwnProperty(g)||t.setPaintProperty(e,g,void 0)}G(u,r.filter)||t.setFilter(e,u),c===r.minzoom&&l===r.maxzoom||t.setLayerZoomRange(e,c,l)}}(e,i,t,n.current)}catch(o){console.warn(o)}else!function(t,e,n){if(t.style&&t.style._loaded&&(!("source"in n)||t.getSource(n.source))){var r=K(K({},n),{},{id:e});delete r.beforeId,t.addLayer(r,n.beforeId)}}(e,i,t);return n.current=t,null}function to(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function eo(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!no(t[0])||!no(t[1]))throw new Error("coordinates must contain numbers");return to({type:"Point",coordinates:t},e,n)}function no(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function ro(t,e,n){if(null!==t)for(var r,i,o,a,s,u,c,l,d=0,f=0,p=t.type,h="FeatureCollection"===p,v="Feature"===p,y=h?t.features.length:1,g=0;g<y;g++){s=(l=!!(c=h?t.features[g].geometry:v?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var m=0;m<s;m++){var b=0,w=0;if(null!==(a=l?c.geometries[m]:c)){u=a.coordinates;var x=a.type;switch(d=!n||"Polygon"!==x&&"MultiPolygon"!==x?0:1,x){case null:break;case"Point":if(!1===e(u,f,g,b,w))return!1;f++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(!1===e(u[r],f,g,b,w))return!1;f++,"MultiPoint"===x&&b++}"LineString"===x&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-d;i++){if(!1===e(u[r][i],f,g,b,w))return!1;f++}"MultiLineString"===x&&b++,"Polygon"===x&&w++}"Polygon"===x&&b++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(w=0,i=0;i<u[r].length;i++){for(o=0;o<u[r][i].length-d;o++){if(!1===e(u[r][i][o],f,g,b,w))return!1;f++}w++}b++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===ro(a.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function io(t){var e=[1/0,1/0,-1/0,-1/0];return ro(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}io.default=io;var oo=/^\s+|\s+$/g,ao=/^[-+]0x[0-9a-f]+$/i,so=/^0b[01]+$/i,uo=/^0o[0-7]+$/i,co=parseInt,lo="object"==$(wt)&&wt&&wt.Object===Object&&wt,fo="object"==("undefined"==typeof self?"undefined":$(self))&&self&&self.Object===Object&&self,po=lo||fo||Function("return this")(),ho=Object.prototype.toString,vo=Math.max,yo=Math.min,go=function(){return po.Date.now()};function mo(t){var e=$(t);return!!t&&("object"==e||"function"==e)}function bo(t){return"symbol"==$(t)||function(t){return!!t&&"object"==$(t)}(t)&&"[object Symbol]"==ho.call(t)}function wo(t){if("number"==typeof t)return t;if(bo(t))return NaN;if(mo(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=mo(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(oo,"");var n=so.test(t);return n||uo.test(t)?co(t.slice(2),n?2:8):ao.test(t)?NaN:+t}var xo=function(t,e,n){var r,i,o,a,s,u,c=0,l=!1,d=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(e){var n=r,o=i;return r=i=void 0,c=e,a=t.apply(o,n)}function h(t){return c=t,s=setTimeout(y,e),l?p(t):a}function v(t){var n=t-u;return void 0===u||n>=e||n<0||d&&t-c>=o}function y(){var t=go();if(v(t))return g(t);s=setTimeout(y,function(t){var n=e-(t-u);return d?yo(n,o-(t-c)):n}(t))}function g(t){return s=void 0,f&&r?p(t):(r=i=void 0,a)}function m(){var t=go(),n=v(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return h(u);if(d)return s=setTimeout(y,e),p(u)}return void 0===s&&(s=setTimeout(y,e)),a}return e=wo(e)||0,mo(n)&&(l=!!n.leading,o=(d="maxWait"in n)?vo(wo(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f),m.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},m.flush=function(){return void 0===s?a:g(go())},m},_o=function(){var t=B(It.exports.useState(!1),2),e=t[0],n=t[1];return It.exports.useLayoutEffect((function(){var t=function(){n(window.innerWidth<kt.screenSizes.tablet)};return window.addEventListener("resize",xo(t,250)),t(),function(){return window.removeEventListener("resize",t)}}),[]),e};function Co(){var t,e=Lt().client,n=Mt().sdkState,r=Pt(n.options,250),i=Zi().activeScore,o=i?jt[i]:void 0,a=K(K({},It.exports.useMemo((function(){return!(null==r||!r.marker)?r.marker:{lat:null==r?void 0:r.lat,lng:null==r?void 0:r.lng}}),[r])),{},{limit:10,radius:2e3,include:o});return H(Y.list(a),z(N().mark((function t(){return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.getPois(a));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!(a&&null!==(t=a.include)&&void 0!==t&&t.length&&a.lat&&a.lng)})}function So(){var t=Lt().client,e=Mt().sdkState,n=Pt(e.options,250),r=Zi().activeScore,i="high_schools"===r||"primary_schools"===r,o=K(K({},It.exports.useMemo((function(){return!(null==n||!n.marker)?n.marker:{lat:null==n?void 0:n.lat,lng:null==n?void 0:n.lng}}),[n])),{},{limit:10,radius:2e3});return H(Q.list(o),z(N().mark((function e(){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.getSchools(o));case 1:case"end":return e.stop()}}),e)}))),{enabled:!!o&&!!o.lat&&!!o.lng&&i})}var Io=St.createContext({}),ko=function(){return It.exports.useContext(Io)},Oo=function(t){var e=t.children,n=t.mapRef,r=t.mapPadding;return Ot(Io.Provider,{value:{mapRef:n,mapPadding:r},children:e})};function Eo(t,e,n,r,i,o){if(!(i-r<=n)){var a=r+i>>1;Lo(t,e,a,r,i,o%2),Eo(t,e,n,r,a-1,o+1),Eo(t,e,n,a+1,i,o+1)}}function Lo(t,e,n,r,i,o){for(;i>r;){if(i-r>600){var a=i-r+1,s=n-r+1,u=Math.log(a),c=.5*Math.exp(2*u/3),l=.5*Math.sqrt(u*c*(a-c)/a)*(s-a/2<0?-1:1);Lo(t,e,n,Math.max(r,Math.floor(n-s*c/a+l)),Math.min(i,Math.floor(n+(a-s)*c/a+l)),o)}var d=e[2*n+o],f=r,p=i;for(Mo(t,e,r,n),e[2*i+o]>d&&Mo(t,e,r,i);f<p;){for(Mo(t,e,f,p),f++,p--;e[2*f+o]<d;)f++;for(;e[2*p+o]>d;)p--}e[2*r+o]===d?Mo(t,e,r,p):Mo(t,e,++p,i),p<=n&&(r=p+1),n<=p&&(i=p-1)}}function Mo(t,e,n,r){Po(t,n,r),Po(e,2*n,2*r),Po(e,2*n+1,2*r+1)}function Po(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function jo(t,e,n,r){var i=t-n,o=e-r;return i*i+o*o}var Ao,To=function(t){return t[0]},Fo=function(t){return t[1]},Do=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:To,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Fo,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:64,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Float64Array;Z(this,t),this.nodeSize=i,this.points=e;for(var a=e.length<65536?Uint16Array:Uint32Array,s=this.ids=new a(e.length),u=this.coords=new o(2*e.length),c=0;c<e.length;c++)s[c]=c,u[2*c]=n(e[c]),u[2*c+1]=r(e[c]);Eo(s,u,i,0,s.length-1,0)}return W(t,[{key:"range",value:function(t,e,n,r){return function(t,e,n,r,i,o,a){for(var s,u,c=[0,t.length-1,0],l=[];c.length;){var d=c.pop(),f=c.pop(),p=c.pop();if(f-p<=a)for(var h=p;h<=f;h++)s=e[2*h],u=e[2*h+1],s>=n&&s<=i&&u>=r&&u<=o&&l.push(t[h]);else{var v=Math.floor((p+f)/2);s=e[2*v],u=e[2*v+1],s>=n&&s<=i&&u>=r&&u<=o&&l.push(t[v]);var y=(d+1)%2;(0===d?n<=s:r<=u)&&(c.push(p),c.push(v-1),c.push(y)),(0===d?i>=s:o>=u)&&(c.push(v+1),c.push(f),c.push(y))}}return l}(this.ids,this.coords,t,e,n,r,this.nodeSize)}},{key:"within",value:function(t,e,n){return function(t,e,n,r,i,o){for(var a=[0,t.length-1,0],s=[],u=i*i;a.length;){var c=a.pop(),l=a.pop(),d=a.pop();if(l-d<=o)for(var f=d;f<=l;f++)jo(e[2*f],e[2*f+1],n,r)<=u&&s.push(t[f]);else{var p=Math.floor((d+l)/2),h=e[2*p],v=e[2*p+1];jo(h,v,n,r)<=u&&s.push(t[p]);var y=(c+1)%2;(0===c?n-i<=h:r-i<=v)&&(a.push(d),a.push(p-1),a.push(y)),(0===c?n+i>=h:r+i>=v)&&(a.push(p+1),a.push(l),a.push(y))}}return s}(this.ids,this.coords,t,e,n,this.nodeSize)}}]),t}(),No={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},Ro=Math.fround||(Ao=new Float32Array(1),function(t){return Ao[0]=+t,Ao[0]}),zo=function(){function t(e){Z(this,t),this.options=Ho(Object.create(No),e),this.trees=new Array(this.options.maxZoom+1)}return W(t,[{key:"load",value:function(t){var e=this.options,n=e.log,r=e.minZoom,i=e.maxZoom,o=e.nodeSize;n&&console.time("total time");var a="prepare ".concat(t.length," points");n&&console.time(a),this.points=t;for(var s=[],u=0;u<t.length;u++)t[u].geometry&&s.push(Bo(t[u],u));this.trees[i+1]=new Do(s,Wo,Jo,o,Float32Array),n&&console.timeEnd(a);for(var c=i;c>=r;c--){var l=+Date.now();s=this._cluster(s,c),this.trees[c]=new Do(s,Wo,Jo,o,Float32Array),n&&console.log("z%d: %d clusters in %dms",c,s.length,+Date.now()-l)}return n&&console.timeEnd("total time"),this}},{key:"getClusters",value:function(t,e){var n=((t[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,i=180;else if(n>i){var a=this.getClusters([n,r,180,o],e),s=this.getClusters([-180,r,i,o],e);return a.concat(s)}var u,c=this.trees[this._limitZoom(e)],l=[],d=q(c.range(Go(n),Ko(o),Go(i),Ko(r)));try{for(d.s();!(u=d.n()).done;){var f=u.value,p=c.points[f];l.push(p.numPoints?Uo(p):this.points[p.index])}}catch(fs){d.e(fs)}finally{d.f()}return l}},{key:"getChildren",value:function(t){var e=this._getOriginId(t),n=this._getOriginZoom(t),r="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(r);var o=i.points[e];if(!o)throw new Error(r);var a,s=this.options.radius/(this.options.extent*Math.pow(2,n-1)),u=[],c=q(i.within(o.x,o.y,s));try{for(c.s();!(a=c.n()).done;){var l=a.value,d=i.points[l];d.parentId===t&&u.push(d.numPoints?Uo(d):this.points[d.index])}}catch(fs){c.e(fs)}finally{c.f()}if(0===u.length)throw new Error(r);return u}},{key:"getLeaves",value:function(t,e,n){e=e||10,n=n||0;var r=[];return this._appendLeaves(r,t,e,n,0),r}},{key:"getTile",value:function(t,e,n){var r=this.trees[this._limitZoom(t)],i=Math.pow(2,t),o=this.options,a=o.extent,s=o.radius/a,u=(n-s)/i,c=(n+1+s)/i,l={features:[]};return this._addTileFeatures(r.range((e-s)/i,u,(e+1+s)/i,c),r.points,e,n,i,l),0===e&&this._addTileFeatures(r.range(1-s/i,u,1,c),r.points,i,n,i,l),e===i-1&&this._addTileFeatures(r.range(0,u,s/i,c),r.points,-1,n,i,l),l.features.length?l:null}},{key:"getClusterExpansionZoom",value:function(t){for(var e=this._getOriginZoom(t)-1;e<=this.options.maxZoom;){var n=this.getChildren(t);if(e++,1!==n.length)break;t=n[0].properties.cluster_id}return e}},{key:"_appendLeaves",value:function(t,e,n,r,i){var o,a=q(this.getChildren(e));try{for(a.s();!(o=a.n()).done;){var s=o.value,u=s.properties;if(u&&u.cluster?i+u.point_count<=r?i+=u.point_count:i=this._appendLeaves(t,u.cluster_id,n,r,i):i<r?i++:t.push(s),t.length===n)break}}catch(fs){a.e(fs)}finally{a.f()}return i}},{key:"_addTileFeatures",value:function(t,e,n,r,i,o){var a,s=q(t);try{for(s.s();!(a=s.n()).done;){var u=e[a.value],c=u.numPoints,l=void 0,d=void 0,f=void 0;if(c)l=Vo(u),d=u.x,f=u.y;else{var p=this.points[u.index];l=p.properties,d=Go(p.geometry.coordinates[0]),f=Ko(p.geometry.coordinates[1])}var h={type:1,geometry:[[Math.round(this.options.extent*(d*i-n)),Math.round(this.options.extent*(f*i-r))]],tags:l},v=void 0;c?v=u.id:this.options.generateId?v=u.index:this.points[u.index].id&&(v=this.points[u.index].id),void 0!==v&&(h.id=v),o.features.push(h)}}catch(fs){s.e(fs)}finally{s.f()}}},{key:"_limitZoom",value:function(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}},{key:"_cluster",value:function(t,e){for(var n=[],r=this.options,i=r.radius,o=r.extent,a=r.reduce,s=r.minPoints,u=i/(o*Math.pow(2,e)),c=0;c<t.length;c++){var l=t[c];if(!(l.zoom<=e)){l.zoom=e;var d,f=this.trees[e+1],p=f.within(l.x,l.y,u),h=l.numPoints||1,v=h,y=q(p);try{for(y.s();!(d=y.n()).done;){var g=d.value,m=f.points[g];m.zoom>e&&(v+=m.numPoints||1)}}catch(fs){y.e(fs)}finally{y.f()}if(v>h&&v>=s){var b,w=l.x*h,x=l.y*h,_=a&&h>1?this._map(l,!0):null,C=(c<<5)+(e+1)+this.points.length,S=q(p);try{for(S.s();!(b=S.n()).done;){var I=b.value,k=f.points[I];if(!(k.zoom<=e)){k.zoom=e;var O=k.numPoints||1;w+=k.x*O,x+=k.y*O,k.parentId=C,a&&(_||(_=this._map(l,!0)),a(_,this._map(k)))}}}catch(fs){S.e(fs)}finally{S.f()}l.parentId=C,n.push(qo(w/v,x/v,C,v,_))}else if(n.push(l),v>1){var E,L=q(p);try{for(L.s();!(E=L.n()).done;){var M=E.value,P=f.points[M];P.zoom<=e||(P.zoom=e,n.push(P))}}catch(fs){L.e(fs)}finally{L.f()}}}}return n}},{key:"_getOriginId",value:function(t){return t-this.points.length>>5}},{key:"_getOriginZoom",value:function(t){return(t-this.points.length)%32}},{key:"_map",value:function(t,e){if(t.numPoints)return e?Ho({},t.properties):t.properties;var n=this.points[t.index].properties,r=this.options.map(n);return e&&r===n?Ho({},r):r}}]),t}();function qo(t,e,n,r,i){return{x:Ro(t),y:Ro(e),zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function Bo(t,e){var n=B(t.geometry.coordinates,2),r=n[0],i=n[1];return{x:Ro(Go(r)),y:Ro(Ko(i)),zoom:1/0,index:e,parentId:-1}}function Uo(t){return{type:"Feature",id:t.id,properties:Vo(t),geometry:{type:"Point",coordinates:[(e=t.x,360*(e-.5)),Zo(t.y)]}};var e}function Vo(t){var e=t.numPoints,n=e>=1e4?"".concat(Math.round(e/1e3),"k"):e>=1e3?"".concat(Math.round(e/100)/10,"k"):e;return Ho(Ho({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function Go(t){return t/360+.5}function Ko(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function Zo(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function Ho(t,e){for(var n in e)t[n]=e[n];return t}function Wo(t){return t.x}function Jo(t){return t.y}var $o=Object.prototype.hasOwnProperty;function Yo(t,e,n){var r,i=q(t.keys());try{for(i.s();!(r=i.n()).done;)if(Qo(n=r.value,e))return n}catch(fs){i.e(fs)}finally{i.f()}}function Qo(t,e){var n,r,i;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((r=t.length)===e.length)for(;r--&&Qo(t[r],e[r]););return-1===r}if(n===Set){if(t.size!==e.size)return!1;var o,a=q(t);try{for(a.s();!(o=a.n()).done;){if((i=r=o.value)&&"object"===$(i)&&!(i=Yo(e,i)))return!1;if(!e.has(i))return!1}}catch(fs){a.e(fs)}finally{a.f()}return!0}if(n===Map){if(t.size!==e.size)return!1;var s,u=q(t);try{for(u.s();!(s=u.n()).done;){if((i=(r=s.value)[0])&&"object"===$(i)&&!(i=Yo(e,i)))return!1;if(!Qo(r[1],e.get(i)))return!1}}catch(fs){u.e(fs)}finally{u.f()}return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((r=t.byteLength)===e.byteLength)for(;r--&&t.getInt8(r)===e.getInt8(r););return-1===r}if(ArrayBuffer.isView(t)){if((r=t.byteLength)===e.byteLength)for(;r--&&t[r]===e[r];);return-1===r}if(!n||"object"===$(t)){for(n in r=0,t){if($o.call(t,n)&&++r&&!$o.call(e,n))return!1;if(!(n in e)||!Qo(t[n],e[n]))return!1}return Object.keys(e).length===r}}return t!=t&&e!=e}function Xo(t,e){return It.exports.useEffect(t,(n=e,r=It.exports.useRef(n),i=It.exports.useRef(0),Qo(n,r.current)||(r.current=n,i.current+=1),It.exports.useMemo((function(){return r.current}),[i.current])));var n,r,i}var ta=At.div(t||(t=D(["\n border-radius: 50%;\n background: linear-gradient(\n to top,\n ",",\n ","\n );\n color: ",";\n height: ","px;\n width: ","px;\n display: flex;\n justify-content: center;\n align-items: center;\n line-height: 1;\n font-family: ",";\n font-size: ","px;\n border: 2px solid #fff;\n box-shadow: ",";\n cursor: default;\n"])),Tt["--ll-color-primary-variant1"],Tt["--ll-color-primary"],Tt["--ll-color-on-primary"],(function(t){return t.diameter}),(function(t){return t.diameter}),Tt["--ll-font-family"],(function(t){return t.diameter/2.5}),Tt["--ll-shadow-small"]),ea=function(t){var e=t.cluster,n=t.pointsCount,r=t.onClick,i=e.properties.point_count;return Ot(ta,{diameter:20+i/n*25,onClick:function(){return r&&r(e)},children:e.properties.point_count})};var na=St.memo((function(t){var e,n=t.rect,r=t.zoom,i=t.mapRef,o=t.points,a=t.isMobile,s=t.activePOI,u=t.hoveredPOI,c=t.isMapMoving,l=t.setActivePOI,d=null==i||null===(e=i.current)||void 0===e?void 0:e.getMap().getBounds().toArray().flat(),f=function(t){var e=t.points,n=t.bounds,r=t.zoom,i=t.options,o=It.exports.useRef(),a=It.exports.useRef(),s=It.exports.useState([]),u=s[0],c=s[1],l=Math.round(r);return Xo((function(){o.current&&Qo(a.current,e)&&Qo(o.current.options,i)||(o.current=new zo(i),o.current.load(e)),n&&c(o.current.getClusters(n,l)),a.current=e}),[e,n,l,i]),{clusters:u,supercluster:o.current}}({points:o,bounds:d,zoom:r,options:{radius:50,maxZoom:18}}),p=f.clusters,h=f.supercluster;return Ot(Ft,{children:p.map((function(t,e){var r=B(t.geometry.coordinates,2),d=r[0],f=r[1];if(function(t){return void 0!==t.properties.cluster}(t))return Ot(X,{latitude:f,longitude:d,children:Ot(ea,{cluster:t,pointsCount:o.length,onClick:function(){var e,n=Math.min(h.getClusterExpansionZoom(t.id),20);null===(e=i.current)||void 0===e||e.flyTo({zoom:n,center:[d,f],duration:1e3,essential:!0})}})},"cluster-".concat(t.id));var p=t.properties,v=p.poi,y=p.type,g=s===v,m=u===v;return Ot(X,{latitude:v.lat,longitude:v.lng,style:{zIndex:g?1:0},children:Dt(Nt.Root,{options:{type:y,poi:v,isOpen:!c&&g,isHovered:m,side:"top",size:["rapid_transit_stations"].includes(y)?"medium":"small",collisionPadding:a?{top:n.height+32,bottom:2*Rt,left:2*Rt,right:2*Rt}:{left:n.width+32,right:2*Rt,top:2*Rt,bottom:2*Rt}},onChange:function(t){"open-change"===t.type&&(t.data?setTimeout((function(){l(v)}),0):g&&l(void 0))},children:[Ot(Nt.Marker,{}),Ot(Nt.Content,{})]})},"".concat(v.name,"-").concat(v.lat,"-").concat(v.lng,"-").concat(e))}))})}));na.displayName="Markers";var ra=function(t){return It.exports.createElement("svg",K({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t),It.exports.createElement("path",{d:"M12 2C8.13 2 5 5.13 5 9C5 14.25 12 22 12 22C12 22 19 14.25 19 9C19 5.13 15.87 2 12 2ZM12 11.5C10.62 11.5 9.5 10.38 9.5 9C9.5 7.62 10.62 6.5 12 6.5C13.38 6.5 14.5 7.62 14.5 9C14.5 10.38 13.38 11.5 12 11.5Z"}))},ia=function(t){return It.exports.createElement("svg",K({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),It.exports.createElement("path",{d:"M10 20V14H14V20H19V12H22L12 3L2 12H5V20H10Z"}))};function oa(t){var e=Lt().client,n=Mt().sdkState,r=Pt(n.options,250),i=K(K({},It.exports.useMemo((function(){return!(null==r||!r.marker)?r.marker:{lat:null==r?void 0:r.lat,lng:null==r?void 0:r.lng}}),[r])),{},{geographyLevels:["20","30"],locationScoresRounding:!1,include:t});return H(tt.list(i),z(N().mark((function t(){return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.getScores(i));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!i})}var aa=At.div(e||(e=D(["\n padding: "," ",";\n background-color: ",";\n display: flex;\n flex-direction: column;\n overflow: hidden;\n flex: 1;\n"])),Tt["--ll-spacing-small"],Tt["--ll-spacing-medium"],Tt["--ll-color-surface"]),sa=At.div(n||(n=D(["\n display: grid;\n grid-template-columns: min-content 1fr;\n grid-gap: ",";\n margin-bottom: ",";\n"])),Tt["--ll-spacing-medium"],Tt["--ll-spacing-medium"]),ua=function(){var t,e,n=Mt().sdkState,r=Zi(),i=r.activeCategory,o=r.activeScore,a=oa(Et.find((function(t){return t.value===i})).scores),s=a.data,u=a.isLoading;return o&&null!=s&&s.location[o]?u?Ot("div",{children:"Loading"}):Ot(zt.Root,{options:{score:o,scoresData:s},children:Dt(aa,{children:[Dt(sa,{children:[Ot(zt.Badge,{}),Ot(zt.BarChart,{options:{locationIcon:"pin"===(null===(t=n.options)||void 0===t||null===(e=t.marker)||void 0===e?void 0:e.icon)?ra:ia}})]}),Ot(zt.Description,{})]})}):null},ca=At.div(r||(r=D(["\n display: flex;\n overflow-x: scroll;\n padding: "," ",";\n flex-shrink: 0;\n position: relative;\n"])),Tt["--ll-spacing-x-small"],Tt["--ll-spacing-medium"]),la=At.button(i||(i=D(["\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n background: none;\n border: none;\n min-width: 60px;\n padding: 0;\n margin: 0 8px;\n flex-shrink: 0;\n\n &:first-child {\n margin-left: 0;\n }\n\n &:last-child {\n margin-right: 0;\n }\n"]))),da=At.div(o||(o=D(["\n position: absolute;\n top: -6px;\n right: 4px;\n border: 2px solid ",";\n border-radius: 6px;\n"])),Tt["--ll-color-background"]),fa=At.div(a||(a=D(["\n flex: 1;\n display: flex;\n align-items: center;\n"]))),pa=At.div(s||(s=D(["\n margin: 0 2px;\n"]))),ha=function(t){var e=t.category,n=oa(e.scores),r=n.data,i=n.isLoading,o=n.isFetching,a=Zi(),s=a.activeScore,u=a.setActiveScore,c=a.setActiveCategory;return Ot(ca,{children:e.scores.map((function(t){var n=t===s,a=n?"--ll-color-primary":"--ll-color-disabled";return i||o?Ot(pa,{children:Ot(qt,{height:"44px",width:"60px"})},t):Ot(zt.Root,{options:{score:t,scoresData:r},children:Dt(la,{onClick:function(){c(e.value),u(t)},children:[Ot(zt.Icon,{options:{color:a,height:28,width:28}}),Ot(fa,{children:Ot(zt.Title,{options:{variant:"caption1",color:a,noWrap:!0,noMargin:!0,weight:"--ll-font-weight-bold"}})}),Ot(da,{children:Ot(zt.Badge,{options:{variant:"small",isPrimary:n}})})]})},t)}))})},va=At.div(u||(u=D(["\n display: flex;\n padding: "," ","\n "," ",";\n"])),Tt["--ll-spacing-x-small"],Tt["--ll-spacing-medium"],Tt["--ll-spacing-xx-small"],Tt["--ll-spacing-medium"]),ya=At.div(c||(c=D(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n z-index: 3;\n box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n background-color: ",";\n border: 1px solid ",";\n"])),Tt["--ll-color-background"],Tt["--ll-color-border"]),ga=St.forwardRef((function(t,e){var n=Zi(),r=n.activeCategory,i=n.setActiveCategory;return Dt(ya,{ref:e,children:[Ot(va,{children:Dt(Bt.Root,{value:r,onValueChange:function(t){return i(t)},children:[Ot(Bt.Trigger,{size:"large",children:Ot(Ut.Root,{options:{scoreCategory:r},children:Ot(Ut.Title,{options:{color:"inherit",noMargin:!0,variant:"h6",lineHeight:1}})},r)}),Ot(Bt.Content,{children:Et.map((function(t){return Ot(Ut.Root,{options:{scoreCategory:t.value},children:Ot(Bt.Item,{value:t.value,children:Ot(Ut.Title,{options:{color:"inherit",noMargin:!0,variant:"h6"}})})},t.value)}))})]})}),Ot(ha,{category:Et.find((function(t){return t.value===r}))}),Ot(ua,{})]})}));ga.displayName="MobileScores";var ma=Vt({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),ba=Vt({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),wa=At(et)(l||(l=D(["\n margin: 0;\n z-index: 1;\n position: relative;\n margin: 0 calc(-1 * ",");\n padding: 0 ",";\n\n &:hover {\n background-color: ",";\n box-shadow: ",";\n }\n"])),Tt["--ll-spacing-medium"],Tt["--ll-spacing-medium"],Tt["--ll-color-surface"],Tt["--ll-shadow-small"]),xa=At(nt)(d||(d=D(["\n background: none;\n border: none;\n display: flex;\n align-items: center;\n width: 100%;\n padding: "," 0;\n"])),Tt["--ll-spacing-x-small"]),_a=At(rt)(f||(f=D(["\n background-color: ",";\n position: relative;\n overflow: hidden;\n margin-left: calc(-1 * ",");\n margin-right: calc(-1 * ",');\n\n [data-state="open"] & {\n animation: ',' 300ms cubic-bezier(0.87, 0, 0.13, 1);\n }\n\n [data-state="closed"] & {\n animation: '," 300ms cubic-bezier(0.87, 0, 0.13, 1);\n }\n"])),Tt["--ll-color-surface"],Tt["--ll-spacing-medium"],Tt["--ll-spacing-medium"],ma,ba),Ca=At.div(p||(p=D(["\n padding: ",";\n border-top: 1px solid ",";\n border-bottom: 1px solid ",";\n"])),Tt["--ll-spacing-medium"],Tt["--ll-color-border"],Tt["--ll-color-border"]),Sa=At.span(h||(h=D(["\n ","[data-state=open] & {\n transform: rotate(90deg);\n } ;\n"])),xa);At.div(v||(v=D(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n"])));var Ia=At.div(y||(y=D(["\n margin: "," 0;\n"])),Tt["--ll-spacing-small"]),ka=At.div(g||(g=D(["\n margin-top: ",";\n &:empty {\n margin: 0;\n }\n"])),Tt["--ll-spacing-large"]),Oa=function(t){var e=t.score,n=So(),r=n.data,i=n.isLoading,o=Zi(),a=o.activePOI,s=o.setActivePOI,u=o.hoveredPOI,c=o.setHoveredPOI,l=ko(),d=l.mapRef,f=l.mapPadding;return i?Ot(Ft,{children:F(Array(10)).map((function(t,e){return Ot(Ia,{children:Ot(qt,{height:"34px",width:"100%"})},e)}))}):r?Ot(Gt.Root,{options:{type:"school",data:null==r?void 0:r[e],activePOI:a,hoveredPOI:u},onChange:function(t){if("poi-click"===t.type){var e=t.data;s(e);var n,r=window.innerWidth-f.left,i=window.innerWidth/2,o=r/2+f.left-i;if(e)null===(n=d.current)||void 0===n||n.easeTo({zoom:18,center:[e.lng,e.lat],duration:1e3,offset:[o,0]})}"poi-hover"===t.type&&c(t.data)}}):null},Ea=St.memo((function(t){var e=t.result,n=t.poi,r=Zi(),i=r.activePOI,o=r.setActivePOI,a=r.hoveredPOI,s=r.setHoveredPOI,u=ko(),c=u.mapRef,l=u.mapPadding;return e.data&&e.data[n]?Ot(Kt.Content,{options:{value:n},children:Ot(Gt.Root,{options:{type:"poi",data:e.data[n],activePOI:i,hoveredPOI:a},onChange:function(t){if("poi-click"===t.type){var e=t.data;o(e);var n,r=window.innerWidth-l.left,i=window.innerWidth/2,a=r/2+l.left-i;if(e)null===(n=c.current)||void 0===n||n.flyTo({zoom:18,center:[e.lng,e.lat],duration:1e3,offset:[a,0],essential:!0})}"poi-hover"===t.type&&s(t.data)}})},n):null}));Ea.displayName="POI";var La=St.memo((function(t){var e=t.include,n=Co();return n.isLoading&&e.length?Ot(Ft,{children:F(Array(10)).map((function(t,e){return Ot(Ia,{children:Ot(qt,{height:"34px",width:"100%"})},e)}))}):n.data?Dt(Kt.Root,{options:{include:e},children:[Ot(Kt.Tabs,{}),e.map((function(t){return Ot(Ea,{poi:t,result:n},t)}))]}):null}));La.displayName="POIs";var Ma=St.memo((function(t){var e,n,r=t.score,i=t.isLoading,o=t.scoresData,a=Mt().sdkState,s=Zi().activeScore,u=r===s;return i?Ot(Ia,{children:Ot(qt,{height:"34px",width:"100%"},r)}):null!=o&&o.location[r]?Ot(it,{value:r,children:Dt(zt.Root,{options:{score:r,scoresData:o},onChange:function(t){"tooltip-toggle"===t.type&&t.data&&Vi.trackEvent(Gi.LC_LONG_DESCRIPTION_VIEW,r)},children:[Ot(wa,{children:Dt(xa,{children:[Ot(Sa,{children:Ot(Zt,{SVGElement:ot,fill:Tt["--ll-color-on-background-variant1"]})}),Ot(Ht,{spacing:"--ll-spacing-small"}),Ot(zt.Icon,{}),Ot(Ht,{spacing:"--ll-spacing-small"}),Ot(zt.Title,{}),Ot(Ht,{}),Ot(zt.Badge,{options:{isPrimary:u}})]})}),Ot(_a,{children:Dt(Ca,{children:[Ot(zt.Description,{}),Ot(Ht,{vertical:!0,spacing:"--ll-spacing-small"}),Ot(zt.BarChart,{options:{locationIcon:"pin"===(null===(e=a.options)||void 0===e||null===(n=e.marker)||void 0===n?void 0:n.icon)?ra:ia}}),Ot(ka,{children:"high_schools"===r||"primary_schools"===r?Ot(Oa,{score:r}):Ot(La,{include:jt[r]})})]})})]})},r):null}));Ma.displayName="Score";var Pa=At.div(m||(m=D(["\n padding: "," ",";\n"])),Tt["--ll-spacing-small"],Tt["--ll-spacing-medium"]),ja=At.div(b||(b=D(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"]))),Aa=St.memo((function(t){var e=t.tabContent,n=oa(e.scores),r=n.data,i=n.isLoading,o=n.isFetching,a=Wt().translations;return Dt(Pa,{children:[Dt(ja,{children:[Ot(Jt.Title,{options:{variant:"h4",noMargin:!0,weight:"--ll-font-weight-medium"}}),o&&!i&&Ot($t,{size:"small"})]}),Ot(Ht,{spacing:"--ll-spacing-small",vertical:!0}),!o&&!Object.keys((null==r?void 0:r.location)||{}).length&&Ot(Yt,{color:"--ll-color-on-background-variant1",children:a.EMPTY_TEXT}),e.scores.map((function(t){return Ot(Ma,{score:t,isLoading:i,scoresData:r},t)}))]})}));Aa.displayName="ScoreCategory";var Ta=St.memo((function(t){var e=t.tabContent,n=Zi(),r=n.activeScore,i=n.setActiveScore;return It.exports.useEffect((function(){i(e.scores[0])}),[]),Ot(at,{value:r,onValueChange:function(t){i(t),Vi.trackEvent(Gi.LC_SCORE_CLICK,t||Gi.LC_SCORE_CLOSE)},type:"single",collapsible:!0,children:Ot(Aa,{tabContent:e})})}));Ta.displayName="ScoreCategoryAccordion";var Fa=At.div(w||(w=D(["\n overflow-y: auto;\n"]))),Da=At.div(x||(x=D(["\n position: absolute;\n top: ",";\n left: ",";\n width: 360px;\n max-height: calc(100% - 2 * ",");\n z-index: 1;\n border-radius: ",";\n box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;\n background-color: #fff;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n background-color: ",";\n border: 1px solid ",";\n"])),Tt["--ll-spacing-medium"],Tt["--ll-spacing-medium"],Tt["--ll-spacing-medium"],Tt["--ll-border-radius-medium"],Tt["--ll-color-background"],Tt["--ll-color-border"]);At.div(_||(_=D(["\n display: flex;\n justify-content: center;\n padding: ",";\n"])),Tt["--ll-spacing-small"]);var Na=At.div(C||(C=D(["\n padding: ",";\n border-bottom: 1px solid ",";\n"])),Tt["--ll-spacing-xx-small"],Tt["--ll-color-border"]),Ra=At.div(S||(S=D(["\n display: flex;\n justify-content: center;\n padding: ",";\n background-color: ",";\n"])),Tt["--ll-spacing-small"],Tt["--ll-color-background"]),za=function(){return Ot(Ra,{children:Ot(Qt.Root,{})})},qa=St.forwardRef((function(t,e){var n=Zi(),r=n.activeCategory,i=n.setActiveCategory;return Ot(Jt.Root,{options:{currentTab:r},onChange:function(t){i(t.data)},children:Dt(Da,{ref:e,children:[Ot(Na,{children:Ot(Jt.Tabs,{})}),Ot(Fa,{children:Et.map((function(t){return Ot(Jt.Content,{options:{value:t.value},children:Ot(Ta,{tabContent:t},t.value)},t.value)}))}),Ot(za,{})]})})}));qa.displayName="DesktopScores";var Ba=At.div(I||(I=D(["\n position: relative;\n display: flex;\n flex-direction: column;\n height: 100vh;\n"]))),Ua=function(t){return It.exports.createElement("svg",K({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t),It.exports.createElement("path",{d:"M22.4275 10.5938L13.4175 1.58383C12.6675 0.833834 11.3475 0.823834 10.5875 1.58383L1.58745 10.5838C0.807453 11.3638 0.807453 12.6238 1.58745 13.4038L10.5875 22.4038C10.9775 22.7938 11.4875 22.9838 11.9975 22.9838C12.5075 22.9838 13.0175 22.7938 13.4075 22.4038L22.3975 13.4138C23.1875 12.6538 23.1975 11.3938 22.4275 10.5938ZM12.0075 20.9938L3.00745 11.9938L12.0075 2.99383L21.0075 11.9938L12.0075 20.9938ZM7.99745 11.0038V15.0038H9.99745V12.0038H13.9975V14.5038L17.4975 11.0038L13.9975 7.50383V10.0038H8.99745C8.44745 10.0038 7.99745 10.4538 7.99745 11.0038Z"}))},Va=function(t){return It.exports.createElement("svg",K({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t),It.exports.createElement("path",{d:"M18.92 6.01C18.72 5.42 18.16 5 17.5 5H6.5C5.84 5 5.29 5.42 5.08 6.01L3 12V20C3 20.55 3.45 21 4 21H5C5.55 21 6 20.55 6 20V19H18V20C18 20.55 18.45 21 19 21H20C20.55 21 21 20.55 21 20V12L18.92 6.01ZM6.85 7H17.14L18.22 10.11H5.77L6.85 7ZM19 17H5V12H19V17Z"}),It.exports.createElement("path",{d:"M7.5 16C8.32843 16 9 15.3284 9 14.5C9 13.6716 8.32843 13 7.5 13C6.67157 13 6 13.6716 6 14.5C6 15.3284 6.67157 16 7.5 16Z"}),It.exports.createElement("path",{d:"M16.5 16C17.3284 16 18 15.3284 18 14.5C18 13.6716 17.3284 13 16.5 13C15.6716 13 15 13.6716 15 14.5C15 15.3284 15.6716 16 16.5 16Z"}))},Ga=function(t){return It.exports.createElement("svg",K({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t),It.exports.createElement("path",{d:"M13.5 5.5C14.6 5.5 15.5 4.6 15.5 3.5C15.5 2.4 14.6 1.5 13.5 1.5C12.4 1.5 11.5 2.4 11.5 3.5C11.5 4.6 12.4 5.5 13.5 5.5ZM9.8 8.9L7 23H9.1L10.9 15L13 17V23H15V15.5L12.9 13.5L13.5 10.5C14.8 12 16.8 13 19 13V11C17.1 11 15.5 10 14.7 8.6L13.7 7C13.14 6.11 12.02 5.75 11.05 6.16L6 8.3V13H8V9.6L9.8 8.9Z"}))},Ka=function(t){return It.exports.createElement("svg",K({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t),It.exports.createElement("path",{d:"M12,2C6.47,2,2,6.47,2,12s4.47,10,10,10s10-4.47,10-10S17.53,2,12,2z M17,15.59L15.59,17L12,13.41L8.41,17L7,15.59 L10.59,12L7,8.41L8.41,7L12,10.59L15.59,7L17,8.41L13.41,12L17,15.59z"}))},Za={all:function(){return["commute-calc"]},list:function(t){return[].concat(F(Za.all()),[t])}};var Ha=function(t,e,n){return 1===e?t:null!=n?n:"".concat(t,"s")},Wa=[62,-1,-1,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,63,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],Ja="undefined"!=typeof BigInt?BigInt:Number;function $a(t){var e=Ja(0),n=Ja(0),r=[];if(t.split("").forEach((function(t){var i=Ja(function(t){var e=t.charCodeAt(0);return Wa[e-45]}(t));e|=(i&Ja(31))<<n,(i&Ja(32))===Ja(0)?(r.push(e),e=Ja(0),n=Ja(0)):n+=Ja(5)})),n>0)throw new Error("Invalid encoding");return r}function Ya(t){var e=t;return e&Ja(1)&&(e=~e),+(e>>=Ja(1)).toString()}function Qa(t){for(var e=$a(t),n=function(t,e){if(1!=+t.toString())throw new Error("Invalid format version");var n=+e.toString();return{precision:15&n,thirdDim:n>>4&7,thirdDimPrecision:n>>7&15}}(e[0],e[1]),r=Math.pow(10,n.precision),i=Math.pow(10,n.thirdDimPrecision),o=n.thirdDim,a=0,s=0,u=0,c=[],l=2;l<e.length;){if(a+=Ya(e[l])/r,s+=Ya(e[l+1])/r,o)u+=Ya(e[l+2])/i,c.push([s,a,u]),l+=3;else c.push([s,a]),l+=2}if(l!==e.length)throw new Error("Invalid encoding. Premature ending reached");return{type:"FeatureCollection",features:[{id:"route",type:"Feature",geometry:{type:"LineString",coordinates:c}}]}}var Xa=At.div(k||(k=D(["\n max-height: calc(100% - 2 * ",");\n border-radius: ",";\n box-shadow: ",";\n background-color: ",";\n border: 1px solid ",";\n padding: ",";\n"])),Tt["--ll-spacing-medium"],Tt["--ll-border-radius-medium"],Tt["--ll-shadow-small"],Tt["--ll-color-background"],Tt["--ll-color-border"],Tt["--ll-spacing-x-small"]),ts=At.div(O||(O=D(["\n display: flex;\n justify-content: space-between;\n align-items: end;\n\n "," {\n width: 229px;\n margin-right: ",";\n }\n"])),st,Tt["--ll-spacing-x-small"]),es=At.div(E||(E=D(["\n background-color: ",";\n padding: "," "," 0;\n border-radius: ",";\n"])),Tt["--ll-color-surface"],Tt["--ll-spacing-x-small"],Tt["--ll-spacing-small"],Tt["--ll-border-radius-medium"]),ns=At(te)(L||(L=D(["\n position: absolute;\n right: ",";\n top: ",";\n"])),Tt["--ll-spacing-xx-small"],Tt["--ll-spacing-xx-small"]),rs=function(t){var e,n,r,i,o=t.className,a=t.onClose,s=Mt().sdkState,u=Zi(),c=u.setCommuteGeojson,l=u.destination,d=u.setDestination,f=B(It.exports.useState("pedestrian"),2),p=f[0],h=f[1],v=_o(),y=Wt().translations,g=function(t){var e=t.transportMode,n=t.origin,r=t.destination,i={return:"polyline,summary,typicalDuration",transportMode:e,origin:n,destination:"".concat(null==r?void 0:r.lat,",").concat(null==r?void 0:r.lng),apiKey:"KDL0aAzsbOcv7p53P2ovno2izfDOe93hyzZRrayktbE"};return H(Za.list(i),(function(){return fetch("https://router.hereapi.com/v8/routes?"+new URLSearchParams(i)).then((function(t){return t.json()})).then((function(t){return t.routes.length>0&&t.routes[0].sections.length>0?t.routes[0].sections[0]:[]})).catch((function(t){Xt(t)}))}),{enabled:!!i&&!!r&&!!n})}({destination:l,transportMode:p,origin:"".concat(null==s||null===(e=s.options)||void 0===e||null===(n=e.marker)||void 0===n?void 0:n.lat,",").concat(null==s||null===(r=s.options)||void 0===r||null===(i=r.marker)||void 0===i?void 0:i.lng)}),m=g.data,b=g.isFetching,w=g.isFetched;It.exports.useEffect((function(){Vi.trackEvent(Gi.LC_COMMUTE_CALC_VIEW,"Commute Calculator Viewed")}),[]),It.exports.useEffect((function(){null!=m&&m.summary&&(Vi.trackEvent(Gi.LC_COMMUTE_CALCULATE_ROUTE,{origin:origin,destination:l}),c(Qa(m.polyline)))}),[m]);var x={pedestrian:[y.WALKING,Ga],car:[y.DRIVING,Va]},_=It.exports.useMemo((function(){if(null==m||!m.summary)return null;var t=Math.floor(m.summary.typicalDuration/60/60),e=Math.floor(m.summary.typicalDuration/60%60);return 0===t?"".concat(e," ").concat(Ha(y.MINUTE,e)):"".concat(t," ").concat(Ha(y.HOUR,t)," ").concat(e," ").concat(Ha(y.MINUTE,e))}),[m]),C=It.exports.useMemo((function(){if(null==m||!m.summary)return null;var t=Math.floor(m.summary.length/1e3);return 0===t?"".concat(m.summary.length," m"):"".concat(t," km")}),[m]);return Dt(Xa,{className:o,children:[Ot(ns,{size:"medium",color:"neutral",onClick:a,SVGElement:Ka}),Dt(ts,{children:[Ot(ut,{label:y.CALCULATE_COMMUTE,placeholder:y.SEARCH_MAP,renderListBelow:v,renderListBelowPosition:30,onSearch:function(t){d({lat:t.latitude,lng:t.longitude})}}),Ot(Bt.Root,{value:p,onValueChange:function(t){h(t)},children:Dt(Bt.Trigger,{children:[Ot(Zt,{SVGElement:x[p][1],fill:Tt["--ll-color-on-background-variant1"],width:16}),x[p][0],Dt(Bt.Content,{children:[Ot(Bt.Item,{value:"car",children:y.DRIVING}),Ot(Bt.Item,{value:"pedestrian",children:y.WALKING})]})]})})]}),(w||b)&&Dt(Ft,{children:[Ot(Ht,{vertical:!0,spacing:"--ll-spacing-x-small"}),Ot(ct,{open:!!m,children:b?Ot(qt,{height:"70.4px",width:"100%"}):null!=m&&m.summary?Dt(es,{children:[Ot(Yt,{variant:"h5",children:_}),Dt(Yt,{children:[C," – ",y.FAST_ROUTE]})]}):Dt(es,{children:[Ot(Yt,{variant:"h5",children:y.NO_ROUTE}),Ot(Yt,{children:y.TRY_SUGGESTION})]})})]})]})},is=At.div(M||(M=D(["\n position: absolute;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 3;\n"]))),os=At.div(P||(P=D(["\n position: absolute;\n top: ",";\n right: ",";\n z-index: 3;\n max-width: 356px;\n"])),Tt["--ll-spacing-medium"],Tt["--ll-spacing-medium"]),as=At(te)(j||(j=D(["\n box-shadow: ",";\n position: absolute;\n bottom: ",";\n right: ",";\n"])),Tt["--ll-shadow-medium"],Tt["--ll-spacing-medium"],Tt["--ll-spacing-medium"]),ss=At(rs)(A||(A=D([""]))),us=At(rs)(T||(T=D(["\n border-radius: ","\n "," 0 0;\n border: 0;\n"])),Tt["--ll-border-radius-small"],Tt["--ll-border-radius-small"]),cs=function(){var t=Zi(),e=t.setCommuteGeojson,n=t.setDestination,r=B(It.exports.useState(!1),2),i=r[0],o=r[1],a=Wt().translations,s=_o(),u=function(){n(void 0),e(void 0),o(!1)},c=function(){o(!0),Vi.trackEvent(Gi.LC_COMMUTE_CALC_CLICK,{isMobile:s})};return s?Ot(Ft,{children:i?Ot(is,{children:Ot(us,{onClose:u})}):Ot(as,{size:"large",SVGElement:Ua,onClick:c})}):Ot(os,{children:i?Ot(ss,{onClose:u}):Ot(ee,{onClick:c,startAdornment:Ot(Ua,{}),children:a.CALCULATE_COMMUTE})})},ls=function(){var t,e,n,r=Mt(),i=r.sdkState,o=r.setSdkState,a=Zi(),s=a.activeScore,u=a.activePOI,c=a.setActivePOI,l=a.hoveredPOI,d=a.commuteGeojson,f=a.destination,p=_o(),h=Co(),v=So(),y="night"===(null==i||null===(t=i.globalOptions)||void 0===t||null===(e=t.appearance)||void 0===e?void 0:e.theme)?"dd191599-2a92-49fc-9a33-e12391753ad5":"600d69cb-288d-445e-9839-3dfe4d76b31a";It.exports.useEffect((function(){Vi.trackEvent(Gi.LC_VIEWED,s)}),[]);var g=B(It.exports.useState(!1),2),m=g[0],b=g[1],w=It.exports.useMemo((function(){var t,e;return"high_schools"!==s&&"primary_schools"!==s||v.isFetching?jt&&s&&jt[s]&&null!==(t=jt[s])&&void 0!==t&&t.length||h.isFetching?h.data:J({},s,[]):J({},s,(null==v||null===(e=v.data)||void 0===e?void 0:e[s])||[])}),[h.data,v.data,s]),x=It.exports.useMemo((function(){return w?Object.entries(w).map((function(t){var e=B(t,2),n=e[0];return e[1].map((function(t){return eo([t.lng,t.lat],{poi:t,type:n})}))})).flat().filter((function(t,e,n){return n.findIndex((function(e){return["lat","lng","name"].every((function(n){return e.properties.poi[n]===t.properties.poi[n]}))}))===e})):[]}),[w]),_=It.exports.useMemo((function(){var t,e,n,r=(null==i||null===(t=i.options)||void 0===t?void 0:t.marker)&&eo([null==i||null===(e=i.options)||void 0===e?void 0:e.marker.lng,null==i||null===(n=i.options)||void 0===n?void 0:n.marker.lat]);return[].concat(F(x),F(r?[r]:[]),F(f?[eo([null==f?void 0:f.lng,null==f?void 0:f.lat])]:[]))}),[x,null==i||null===(n=i.options)||void 0===n?void 0:n.marker,f]),C=It.exports.useRef(),S=B(lt(),2),I=S[0],k=S[1],O=It.exports.useMemo((function(){return{top:25+k.height,bottom:25,left:25,right:25}}),[k.height]),E=It.exports.useMemo((function(){return{top:50,bottom:50,left:k.width+32+50,right:50}}),[k.width]),L=p?O:E;return It.exports.useEffect((function(){var t,e;if(_.length&&null!==(t=i.options)&&void 0!==t&&t.marker){var n,r,o,a=B(io((n=_.map((function(t){var e=t.geometry;return[e.coordinates[1],e.coordinates[0]]})),void 0===o&&(o={}),to({type:"MultiPoint",coordinates:n},r,o))),4),s=a[0],u=a[1],c=a[2],l=a[3];null==C||null===(e=C.current)||void 0===e||e.fitBounds([[u,s],[l,c]],{maxZoom:17,padding:L,duration:1e3})}}),[_,L]),i.options?Ot(Oo,{mapRef:C,mapPadding:L,children:Dt(Ba,{children:[Dt(dt,{ref:C,mapLib:ft,latitude:i.options.lat,longitude:i.options.lng,zoom:i.options.zoom,pitch:i.options.pitch,bearing:i.options.bearing,style:{flex:1,width:"100vw"},mapStyle:"https://api.maptiler.com/maps/".concat(y,"/style.json?key=","9jNGatuzs05Q1oNlctEs"),onMove:function(t){o(K(K({},i),{},{options:K(K({},i.options),{},{lat:t.viewState.latitude,lng:t.viewState.longitude,zoom:t.viewState.zoom,bearing:t.viewState.bearing,pitch:t.viewState.pitch})}))},cooperativeGestures:i.options.cooperativeGestures,onMoveStart:function(){return b(!0)},onMoveEnd:function(){return b(!1)},attributionControl:!1,children:[Ot(pt,{compact:!0,position:p?"bottom-left":"bottom-right"}),Ot(ht,{position:p?"top-right":"bottom-right",showCompass:!0,style:{marginTop:p?16+k.height:16,marginRight:16}}),i.options.marker&&Ot(vt,{marker:i.options.marker}),Ot(na,{rect:k,zoom:i.options.zoom,mapRef:C,points:x,isMobile:p,activePOI:u,hoveredPOI:l,isMapMoving:m,setActivePOI:c}),Ot(p?ga:qa,{ref:I}),Ot(cs,{}),f&&Ot(vt,{marker:K({icon:"pin"},f)}),d&&Ot(Yi,{type:"geojson",data:d,children:Ot(Xi,K({},{id:"point",type:"line",paint:{"line-width":6,"line-color":"#0056D3"}}))})]}),p&&Ot(za,{})]})}):Ot("div",{children:"No options provided."})},ds=Object.freeze(Object.defineProperty({__proto__:null,default:function(){return Vi.trackPageLoad(),Ot(Wi,{children:Ot(ls,{})})}},Symbol.toStringTag,{value:"Module"}));R("q",ds)}}}))}();
|