@local-logic/sdks-app 1.7.1 → 2.0.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/{index-legacy.9e6e31fb.js → index-legacy.5b5c89be.js} +1 -1
- package/dist/assets/{index-legacy.8a8cb342.js → index-legacy.6f7be327.js} +1 -1
- package/dist/assets/index-legacy.873d2f5f.js +1 -0
- package/dist/assets/{index-legacy.93d69255.js → index-legacy.8b48df8f.js} +1 -1
- package/dist/assets/index-legacy.a2e5122a.js +23 -0
- package/dist/assets/{index-legacy.46f64d17.js → index-legacy.b4a1ea09.js} +1 -1
- package/dist/assets/index-legacy.e333988e.js +106 -0
- package/dist/assets/index.1b34a15d.js +35 -0
- package/dist/assets/index.24661964.js +247 -0
- package/dist/assets/index.3039bacf.js +161 -0
- package/dist/assets/index.3eec99ca.js +1318 -0
- package/dist/assets/index.77b51154.js +1 -0
- package/dist/assets/index.aae000f4.js +1 -0
- package/dist/assets/{index.fb08bd56.js → index.d89a7cee.js} +1 -1
- package/dist/assets/polyfills-legacy.db2bc606.js +1 -0
- package/dist/assets/{useIsMobile-legacy.cb5792f6.js → useIsMobile-legacy.7fb572d8.js} +1 -1
- package/dist/assets/{useIsMobile.8a6bbdf7.js → useIsMobile.b5e8d9ad.js} +1 -1
- package/dist/assets/{useQuery-legacy.9e74d2d1.js → useQuery-legacy.7e93cb2c.js} +1 -1
- package/dist/assets/useQuery.19a6ca1c.js +9 -0
- package/dist/index.html +3 -3
- package/dist/types/context/languageProvider/data-explorer/locales/en/index.d.ts.map +1 -1
- package/dist/types/context/languageProvider/data-explorer/locales/en/index.js +2 -0
- package/dist/types/context/languageProvider/data-explorer/locales/en/index.js.map +1 -1
- package/dist/types/context/languageProvider/data-explorer/locales/fr/index.d.ts.map +1 -1
- package/dist/types/context/languageProvider/data-explorer/locales/fr/index.js +2 -0
- package/dist/types/context/languageProvider/data-explorer/locales/fr/index.js.map +1 -1
- package/dist/types/context/languageProvider/data-explorer/types.d.ts +2 -2
- package/dist/types/context/languageProvider/data-explorer/types.d.ts.map +1 -1
- package/dist/types/context/languageProvider/index.d.ts +2 -2
- package/dist/types/context/languageProvider/index.d.ts.map +1 -1
- package/dist/types/features/calculateRoute/useCommute.js +2 -2
- package/dist/types/features/calculateRoute/useCommute.js.map +1 -1
- package/dist/types/features/reverse-geocodes/useReverseGeocodes.js +2 -2
- package/dist/types/features/reverse-geocodes/useReverseGeocodes.js.map +1 -1
- package/dist/types/main.d.ts +1 -1
- package/dist/types/main.d.ts.map +1 -1
- package/dist/types/main.js +2 -13
- package/dist/types/main.js.map +1 -1
- package/dist/types/sdks/DataExplorer/components/Table/index.d.ts +4 -0
- package/dist/types/sdks/DataExplorer/components/Table/index.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Table/index.js +65 -0
- package/dist/types/sdks/DataExplorer/components/Table/index.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Table/styles.d.ts +6 -0
- package/dist/types/sdks/DataExplorer/components/Table/styles.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Table/styles.js +27 -0
- package/dist/types/sdks/DataExplorer/components/Table/styles.js.map +1 -0
- package/dist/types/sdks/DataExplorer/context.d.ts +3 -0
- package/dist/types/sdks/DataExplorer/context.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/context.js +3 -0
- package/dist/types/sdks/DataExplorer/context.js.map +1 -1
- package/dist/types/sdks/DataExplorer/index.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/index.js +8 -0
- package/dist/types/sdks/DataExplorer/index.js.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/Household/index.d.ts.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/Household/index.js +2 -1
- package/dist/types/sdks/Demographics/components/Content/Household/index.js.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/Household/styles.d.ts +3 -0
- package/dist/types/sdks/Demographics/components/Content/Household/styles.d.ts.map +1 -0
- package/dist/types/sdks/Demographics/components/Content/Household/styles.js +19 -0
- package/dist/types/sdks/Demographics/components/Content/Household/styles.js.map +1 -0
- package/dist/types/sdks/Demographics/components/Content/Housing/index.d.ts.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/Housing/index.js +10 -7
- package/dist/types/sdks/Demographics/components/Content/Housing/index.js.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/Housing/styles.d.ts +3 -0
- package/dist/types/sdks/Demographics/components/Content/Housing/styles.d.ts.map +1 -0
- package/dist/types/sdks/Demographics/components/Content/Housing/styles.js +12 -0
- package/dist/types/sdks/Demographics/components/Content/Housing/styles.js.map +1 -0
- package/dist/types/sdks/Demographics/components/Content/Languages/index.d.ts +3 -0
- package/dist/types/sdks/Demographics/components/Content/Languages/index.d.ts.map +1 -0
- package/dist/types/sdks/Demographics/components/Content/Languages/index.js +14 -0
- package/dist/types/sdks/Demographics/components/Content/Languages/index.js.map +1 -0
- package/dist/types/sdks/Demographics/components/Content/index.d.ts.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/index.js +3 -0
- package/dist/types/sdks/Demographics/components/Content/index.js.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/styles.js +1 -1
- package/dist/types/sdks/Demographics/components/Content/styles.js.map +1 -1
- package/dist/types/sdks/Demographics/context.d.ts +3 -0
- package/dist/types/sdks/Demographics/context.d.ts.map +1 -1
- package/dist/types/sdks/Demographics/context.js.map +1 -1
- package/dist/types/sdks/Demographics/styles.d.ts.map +1 -1
- package/dist/types/sdks/Demographics/styles.js +0 -1
- package/dist/types/sdks/Demographics/styles.js.map +1 -1
- package/dist/types/utils/errorTracker/index.d.ts +23 -0
- package/dist/types/utils/errorTracker/index.d.ts.map +1 -0
- package/dist/types/utils/errorTracker/index.js +100 -0
- package/dist/types/utils/errorTracker/index.js.map +1 -0
- package/package.json +5 -4
- package/dist/assets/index-legacy.02b7ed30.js +0 -1
- package/dist/assets/index-legacy.0500abfa.js +0 -106
- package/dist/assets/index-legacy.4d0178fa.js +0 -1
- package/dist/assets/index.3e70a7fa.js +0 -28
- package/dist/assets/index.414e070d.js +0 -1374
- package/dist/assets/index.630bec89.js +0 -120
- package/dist/assets/index.693f2772.js +0 -247
- package/dist/assets/index.d464e7cf.js +0 -1
- package/dist/assets/index.e63e2d64.js +0 -1
- package/dist/assets/polyfills-legacy.147ba02d.js +0 -1
- package/dist/assets/useQuery.fe83c221.js +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){var e,t,n,r,o,i,a,l,s,c,u,d,p,f,h,m,v,g,y,b,x,w,C,M,S,k,O,P,L,I,E,A,_,j,z,T,R,N;function G(e){return function(e){if(Array.isArray(e))return Q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||q(e)||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 Z(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function V(e){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V(e)}function D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e,t,n){return t&&H(e.prototype,t),n&&H(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function U(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */U=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(O){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof d?t:d,i=Object.create(o.prototype),a=new M(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=x(a,n);if(l){if(l===u)continue;return l}}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 s=c(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===u)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(O){return{type:"throw",arg:O}}}e.wrap=s;var u={};function d(){}function p(){}function f(){}var h={};l(h,o,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(S([])));v&&v!==t&&n.call(v,o)&&(h=v);var g=f.prototype=d.prototype=Object.create(h);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function r(o,i,a,l){var s=c(e[o],e,i);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==V(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,l)}),(function(e){r("throw",e,a,l)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,l)}))}l(s.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:k}}function k(){return{value:void 0,done:!0}}return p.prototype=f,l(g,"constructor",f),l(f,"constructor",p),p.displayName=l(f,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,a,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},y(b.prototype),l(b.prototype,i,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new b(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(g),l(g,a,"Generator"),l(g,o,(function(){return this})),l(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,M.prototype={constructor:M,reset:function(e){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(C),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}function B(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(c){return void n(c)}l.done?t(s):Promise.resolve(s).then(r,o)}function W(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){B(i,r,o,a,l,"next",e)}function l(e){B(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=q(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function K(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||q(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){if(e){if("string"==typeof e)return Q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){J(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}System.register(["./index-legacy.9e6e31fb.js","./index-legacy.0500abfa.js","./useIsMobile-legacy.cb5792f6.js","./useQuery-legacy.9e74d2d1.js"],(function(H,B){"use strict";var q,Q,X,ee,te,ne,re,oe,ie,ae,le,se,ce,ue,de,pe,fe,he,me,ve,ge,ye,be,xe,we,Ce,Me,Se,ke,Oe,Pe,Le,Ie,Ee,Ae,_e,je,ze,Te,Re,Ne,Ge,Ze,Ve,De,He,Fe,Ue,Be,We,Ye,Ke,qe,Qe,Xe,$e,Je,et,tt,nt;return{setters:[function(e){q=e.M,Q=e.d,X=e.p,ee=e.s,te=e.a,ne=e.b,re=e.$,oe=e.c,ie=e.e,ae=e.f,le=e.S,se=e.g,ce=e.h,ue=e.i,de=e.A,pe=e.u,fe=e.j,he=e.m,me=e.k,ve=e.N,ge=e.P},function(e){ye=e.R,be=e.r,xe=e.c,we=e.j,Ce=e.O,Me=e.n,Se=e.u,ke=e.a,Oe=e.N,Pe=e.s,Le=e.m,Ie=e._,Ee=e.b,Ae=e.d,_e=e.C,je=e.w,ze=e.I,Te=e.e,Re=e.W,Ne=e.K,Ge=e.i,Ze=e.F,Ve=e.f,De=e.q,He=e.g,Fe=e.h,Ue=e.k,Be=e.Z,We=e.X,Ye=e.G,Ke=e.V,qe=e.Y,Qe=e.l,Xe=e.o,$e=e.p,Je=e.t,et=e.U},function(e){tt=e.u},function(e){nt=e.u}],execute:function(){var B=ye.createContext({}),rt=function(){return be.exports.useContext(B)},ot=function(e,t){switch(t.type){case"CATEGORY":return $($({},e),{},{activeCategory:t.value});case"SCORE":var n=Ce.find((function(n){return""===t.value?n.value===e.activeCategory:n.scores.includes(t.value)})).value;return{activeCategory:n,activeScoreByCategory:$($({},e.activeScoreByCategory),{},J({},n,t.value))}}},it=function(e){var t=e.children,n=window.innerWidth<xe.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=K(be.exports.useReducer(ot,n),2),o=r[0],i=r[1],a=K(be.exports.useState(),2),l=a[0],s=a[1],c=K(be.exports.useState(),2),u=c[0],d=c[1],p=K(be.exports.useState(),2),f=p[0],h=p[1],m=K(be.exports.useState(),2),v=m[0],g=m[1],y=K(be.exports.useState(),2),b=y[0],x=y[1],w=K(be.exports.useState(!1),2),C=w[0],M=w[1],S=o.activeCategory,k=o.activeScoreByCategory[S],O=function(e){i({type:"SCORE",value:e})},P=function(e){i({type:"CATEGORY",value:e})},L=be.exports.useMemo((function(){return{activeScore:k,setActiveScore:O,activeCategory:S,setActiveCategory:P,activePOI:l,setActivePOI:s,hoveredPOI:u,setHoveredPOI:d,commuteGeojson:f,setCommuteGeojson:h,destination:b,setDestination:x,showCommuteCalculator:C,setShowCommuteCalculator:M,schoolCatchment:v,setSchoolCatchment:g}}),[k,O,S,P,l,s,u,d,f,h,b,x,C,M,v,g]);return we(B.Provider,{value:L,children:t})};function at(e,t){if(!e)throw new Error(t)}var lt=0;function st(e){var t=be.exports.useContext(q).map.getMap(),n=be.exports.useRef(e),r=K(be.exports.useState(0),2)[1],o=be.exports.useMemo((function(){return e.id||"jsx-source-".concat(lt++)}),[]);be.exports.useEffect((function(){if(t){var e=function(){return r((function(e){return e+1}))};return t.on("styledata",e),e(),function(){var n;if(t.off("styledata",e),t.style&&t.style._loaded&&t.getSource(o)){var r=null===(n=t.getStyle())||void 0===n?void 0:n.layers;if(r){var i,a=Y(r);try{for(a.s();!(i=a.n()).done;){var l=i.value;l.source===o&&t.removeLayer(l.id)}}catch(s){a.e(s)}finally{a.f()}}t.removeSource(o)}}}}),[t]);var i=t&&t.style&&t.getSource(o);return i?function(e,t,n){at(t.id===n.id,"source id changed"),at(t.type===n.type,"source type changed");var r="",o=0;for(var i in t)"children"===i||"id"===i||Q(n[i],t[i])||(r=i,o++);if(o){var a=t.type;if("geojson"===a)e.setData(t.data);else if("image"===a)e.updateImage({url:t.url,coordinates:t.coordinates});else if("canvas"!==a&&"video"!==a||1!==o||"coordinates"!==r)if("vector"===a&&"setUrl"in e)switch(r){case"url":e.setUrl(t.url);break;case"tiles":e.setTiles(t.tiles)}else console.warn("Unable to update <Source> prop: ".concat(r));else e.setCoordinates(t.coordinates)}}(i,e,n.current):i=function(e,t,n){if(e.style&&e.style._loaded){var r=$({},n);return delete r.id,delete r.children,e.addSource(t,r),e.getSource(t)}return null}(t,o,e),n.current=e,i&&be.exports.Children.map(e.children,(function(e){return e&&be.exports.cloneElement(e,{source:o})}))||null}var ct=0;function ut(e){var t=be.exports.useContext(q).map.getMap(),n=be.exports.useRef(e),r=K(be.exports.useState(0),2)[1],o=be.exports.useMemo((function(){return e.id||"jsx-layer-".concat(ct++)}),[]);if(be.exports.useEffect((function(){if(t){var e=function(){return r((function(e){return e+1}))};return t.on("styledata",e),e(),function(){t.off("styledata",e),t.style&&t.style._loaded&&t.getLayer(o)&&t.removeLayer(o)}}}),[t]),t&&t.style&&t.getLayer(o))try{!function(e,t,n,r){if(at(n.id===r.id,"layer id changed"),at(n.type===r.type,"layer type changed"),"custom"!==n.type&&"custom"!==r.type){var o=n.layout,i=void 0===o?{}:o,a=n.paint,l=void 0===a?{}:a,s=n.filter,c=n.minzoom,u=n.maxzoom,d=n.beforeId;if(d!==r.beforeId&&e.moveLayer(t,d),i!==r.layout){var p=r.layout||{};for(var f in i)Q(i[f],p[f])||e.setLayoutProperty(t,f,i[f]);for(var h in p)i.hasOwnProperty(h)||e.setLayoutProperty(t,h,void 0)}if(l!==r.paint){var m=r.paint||{};for(var v in l)Q(l[v],m[v])||e.setPaintProperty(t,v,l[v]);for(var g in m)l.hasOwnProperty(g)||e.setPaintProperty(t,g,void 0)}Q(s,r.filter)||e.setFilter(t,s),c===r.minzoom&&u===r.maxzoom||e.setLayerZoomRange(t,c,u)}}(t,o,e,n.current)}catch(i){console.warn(i)}else!function(e,t,n){if(e.style&&e.style._loaded&&(!("source"in n)||e.getSource(n.source))){var r=$($({},n),{},{id:t});delete r.beforeId,e.addLayer(r,n.beforeId)}}(t,o,e);return n.current=e,null}function dt(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function pt(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!ft(e[0])||!ft(e[1]))throw new Error("coordinates must contain numbers");return dt({type:"Point",coordinates:e},t,n)}function ft(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function ht(e,t,n){if(null!==e)for(var r,o,i,a,l,s,c,u,d=0,p=0,f=e.type,h="FeatureCollection"===f,m="Feature"===f,v=h?e.features.length:1,g=0;g<v;g++){l=(u=!!(c=h?e.features[g].geometry:m?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var y=0;y<l;y++){var b=0,x=0;if(null!==(a=u?c.geometries[y]:c)){s=a.coordinates;var w=a.type;switch(d=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===t(s,p,g,b,x))return!1;p++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<s.length;r++){if(!1===t(s[r],p,g,b,x))return!1;p++,"MultiPoint"===w&&b++}"LineString"===w&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<s.length;r++){for(o=0;o<s[r].length-d;o++){if(!1===t(s[r][o],p,g,b,x))return!1;p++}"MultiLineString"===w&&b++,"Polygon"===w&&x++}"Polygon"===w&&b++;break;case"MultiPolygon":for(r=0;r<s.length;r++){for(x=0,o=0;o<s[r].length;o++){for(i=0;i<s[r][o].length-d;i++){if(!1===t(s[r][o][i],p,g,b,x))return!1;p++}x++}b++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===ht(a.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function mt(e){var t=[1/0,1/0,-1/0,-1/0];return ht(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}function vt(){var e,t=Me().client,n=Se().sdkState,r=ke(n.options,250),o=rt().activeScore,i=o?Oe[o]:void 0,a=$($({},be.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:i});return nt(X.list(a),W(U().mark((function e(){return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.getPois(a));case 1:case"end":return e.stop()}}),e)}))),{enabled:!!(a&&null!==(e=a.include)&&void 0!==e&&e.length&&a.lat&&a.lng)})}function gt(){var e=Me().client,t=Se().sdkState,n=ke(t.options,250),r=rt().activeScore,o="high_schools"===r||"primary_schools"===r,i=$($({},be.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,include_catchments:!1});return nt(ee.list(i),W(U().mark((function t(){return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.getSchools(i));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!i&&!!i.lat&&!!i.lng&&o})}mt.default=mt;var yt=ye.createContext({}),bt=function(){return be.exports.useContext(yt)},xt=function(e){var t=e.children,n=e.mapRef,r=e.mapPadding;return we(yt.Provider,{value:{mapRef:n,mapPadding:r},children:t})};function wt(e,t,n,r,o,i){if(!(o-r<=n)){var a=r+o>>1;Ct(e,t,a,r,o,i%2),wt(e,t,n,r,a-1,i+1),wt(e,t,n,a+1,o,i+1)}}function Ct(e,t,n,r,o,i){for(;o>r;){if(o-r>600){var a=o-r+1,l=n-r+1,s=Math.log(a),c=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*c*(a-c)/a)*(l-a/2<0?-1:1);Ct(e,t,n,Math.max(r,Math.floor(n-l*c/a+u)),Math.min(o,Math.floor(n+(a-l)*c/a+u)),i)}var d=t[2*n+i],p=r,f=o;for(Mt(e,t,r,n),t[2*o+i]>d&&Mt(e,t,r,o);p<f;){for(Mt(e,t,p,f),p++,f--;t[2*p+i]<d;)p++;for(;t[2*f+i]>d;)f--}t[2*r+i]===d?Mt(e,t,r,f):Mt(e,t,++f,o),f<=n&&(r=f+1),n<=f&&(o=f-1)}}function Mt(e,t,n,r){St(e,n,r),St(t,2*n,2*r),St(t,2*n+1,2*r+1)}function St(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function kt(e,t,n,r){var o=e-n,i=t-r;return o*o+i*i}var Ot,Pt=function(e){return e[0]},Lt=function(e){return e[1]},It=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pt,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Lt,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:64,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Float64Array;D(this,e),this.nodeSize=o,this.points=t;for(var a=t.length<65536?Uint16Array:Uint32Array,l=this.ids=new a(t.length),s=this.coords=new i(2*t.length),c=0;c<t.length;c++)l[c]=c,s[2*c]=n(t[c]),s[2*c+1]=r(t[c]);wt(l,s,o,0,l.length-1,0)}return F(e,[{key:"range",value:function(e,t,n,r){return function(e,t,n,r,o,i,a){for(var l,s,c=[0,e.length-1,0],u=[];c.length;){var d=c.pop(),p=c.pop(),f=c.pop();if(p-f<=a)for(var h=f;h<=p;h++)l=t[2*h],s=t[2*h+1],l>=n&&l<=o&&s>=r&&s<=i&&u.push(e[h]);else{var m=Math.floor((f+p)/2);l=t[2*m],s=t[2*m+1],l>=n&&l<=o&&s>=r&&s<=i&&u.push(e[m]);var v=(d+1)%2;(0===d?n<=l:r<=s)&&(c.push(f),c.push(m-1),c.push(v)),(0===d?o>=l:i>=s)&&(c.push(m+1),c.push(p),c.push(v))}}return u}(this.ids,this.coords,e,t,n,r,this.nodeSize)}},{key:"within",value:function(e,t,n){return function(e,t,n,r,o,i){for(var a=[0,e.length-1,0],l=[],s=o*o;a.length;){var c=a.pop(),u=a.pop(),d=a.pop();if(u-d<=i)for(var p=d;p<=u;p++)kt(t[2*p],t[2*p+1],n,r)<=s&&l.push(e[p]);else{var f=Math.floor((d+u)/2),h=t[2*f],m=t[2*f+1];kt(h,m,n,r)<=s&&l.push(e[f]);var v=(c+1)%2;(0===c?n-o<=h:r-o<=m)&&(a.push(d),a.push(f-1),a.push(v)),(0===c?n+o>=h:r+o>=m)&&(a.push(f+1),a.push(u),a.push(v))}}return l}(this.ids,this.coords,e,t,n,this.nodeSize)}}]),e}(),Et={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(e){return e}},At=Math.fround||(Ot=new Float32Array(1),function(e){return Ot[0]=+e,Ot[0]}),_t=function(){function e(t){D(this,e),this.options=Gt(Object.create(Et),t),this.trees=new Array(this.options.maxZoom+1)}return F(e,[{key:"load",value:function(e){var t=this.options,n=t.log,r=t.minZoom,o=t.maxZoom,i=t.nodeSize;n&&console.time("total time");var a="prepare ".concat(e.length," points");n&&console.time(a),this.points=e;for(var l,s,c,u,d,p=[],f=0;f<e.length;f++)e[f].geometry&&p.push((l=e[f],s=f,c=void 0,u=void 0,d=void 0,c=K(l.geometry.coordinates,2),u=c[0],d=c[1],{x:At(Rt(u)),y:At(Nt(d)),zoom:1/0,index:s,parentId:-1}));this.trees[o+1]=new It(p,Zt,Vt,i,Float32Array),n&&console.timeEnd(a);for(var h=o;h>=r;h--){var m=+Date.now();p=this._cluster(p,h),this.trees[h]=new It(p,Zt,Vt,i,Float32Array),n&&console.log("z%d: %d clusters in %dms",h,p.length,+Date.now()-m)}return n&&console.timeEnd("total time"),this}},{key:"getClusters",value:function(e,t){var n=((e[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,e[1])),o=180===e[2]?180:((e[2]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,o=180;else if(n>o){var a=this.getClusters([n,r,180,i],t),l=this.getClusters([-180,r,o,i],t);return a.concat(l)}var s,c=this.trees[this._limitZoom(t)],u=[],d=Y(c.range(Rt(n),Nt(i),Rt(o),Nt(r)));try{for(d.s();!(s=d.n()).done;){var p=s.value,f=c.points[p];u.push(f.numPoints?zt(f):this.points[f.index])}}catch(h){d.e(h)}finally{d.f()}return u}},{key:"getChildren",value:function(e){var t=this._getOriginId(e),n=this._getOriginZoom(e),r="No cluster with the specified id.",o=this.trees[n];if(!o)throw new Error(r);var i=o.points[t];if(!i)throw new Error(r);var a,l=this.options.radius/(this.options.extent*Math.pow(2,n-1)),s=[],c=Y(o.within(i.x,i.y,l));try{for(c.s();!(a=c.n()).done;){var u=a.value,d=o.points[u];d.parentId===e&&s.push(d.numPoints?zt(d):this.points[d.index])}}catch(p){c.e(p)}finally{c.f()}if(0===s.length)throw new Error(r);return s}},{key:"getLeaves",value:function(e,t,n){t=t||10,n=n||0;var r=[];return this._appendLeaves(r,e,t,n,0),r}},{key:"getTile",value:function(e,t,n){var r=this.trees[this._limitZoom(e)],o=Math.pow(2,e),i=this.options,a=i.extent,l=i.radius/a,s=(n-l)/o,c=(n+1+l)/o,u={features:[]};return this._addTileFeatures(r.range((t-l)/o,s,(t+1+l)/o,c),r.points,t,n,o,u),0===t&&this._addTileFeatures(r.range(1-l/o,s,1,c),r.points,o,n,o,u),t===o-1&&this._addTileFeatures(r.range(0,s,l/o,c),r.points,-1,n,o,u),u.features.length?u:null}},{key:"getClusterExpansionZoom",value:function(e){for(var t=this._getOriginZoom(e)-1;t<=this.options.maxZoom;){var n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t}},{key:"_appendLeaves",value:function(e,t,n,r,o){var i,a=Y(this.getChildren(t));try{for(a.s();!(i=a.n()).done;){var l=i.value,s=l.properties;if(s&&s.cluster?o+s.point_count<=r?o+=s.point_count:o=this._appendLeaves(e,s.cluster_id,n,r,o):o<r?o++:e.push(l),e.length===n)break}}catch(c){a.e(c)}finally{a.f()}return o}},{key:"_addTileFeatures",value:function(e,t,n,r,o,i){var a,l=Y(e);try{for(l.s();!(a=l.n()).done;){var s=t[a.value],c=s.numPoints,u=void 0,d=void 0,p=void 0;if(c)u=Tt(s),d=s.x,p=s.y;else{var f=this.points[s.index];u=f.properties,d=Rt(f.geometry.coordinates[0]),p=Nt(f.geometry.coordinates[1])}var h={type:1,geometry:[[Math.round(this.options.extent*(d*o-n)),Math.round(this.options.extent*(p*o-r))]],tags:u},m=void 0;c?m=s.id:this.options.generateId?m=s.index:this.points[s.index].id&&(m=this.points[s.index].id),void 0!==m&&(h.id=m),i.features.push(h)}}catch(v){l.e(v)}finally{l.f()}}},{key:"_limitZoom",value:function(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}},{key:"_cluster",value:function(e,t){for(var n=[],r=this.options,o=r.radius,i=r.extent,a=r.reduce,l=r.minPoints,s=o/(i*Math.pow(2,t)),c=0;c<e.length;c++){var u=e[c];if(!(u.zoom<=t)){u.zoom=t;var d,p=this.trees[t+1],f=p.within(u.x,u.y,s),h=u.numPoints||1,m=h,v=Y(f);try{for(v.s();!(d=v.n()).done;){var g=d.value,y=p.points[g];y.zoom>t&&(m+=y.numPoints||1)}}catch(_){v.e(_)}finally{v.f()}if(m>h&&m>=l){var b,x=u.x*h,w=u.y*h,C=a&&h>1?this._map(u,!0):null,M=(c<<5)+(t+1)+this.points.length,S=Y(f);try{for(S.s();!(b=S.n()).done;){var k=b.value,O=p.points[k];if(!(O.zoom<=t)){O.zoom=t;var P=O.numPoints||1;x+=O.x*P,w+=O.y*P,O.parentId=M,a&&(C||(C=this._map(u,!0)),a(C,this._map(O)))}}}catch(_){S.e(_)}finally{S.f()}u.parentId=M,n.push(jt(x/m,w/m,M,m,C))}else if(n.push(u),m>1){var L,I=Y(f);try{for(I.s();!(L=I.n()).done;){var E=L.value,A=p.points[E];A.zoom<=t||(A.zoom=t,n.push(A))}}catch(_){I.e(_)}finally{I.f()}}}}return n}},{key:"_getOriginId",value:function(e){return e-this.points.length>>5}},{key:"_getOriginZoom",value:function(e){return(e-this.points.length)%32}},{key:"_map",value:function(e,t){if(e.numPoints)return t?Gt({},e.properties):e.properties;var n=this.points[e.index].properties,r=this.options.map(n);return t&&r===n?Gt({},r):r}}]),e}();function jt(e,t,n,r,o){return{x:At(e),y:At(t),zoom:1/0,id:n,parentId:-1,numPoints:r,properties:o}}function zt(e){return{type:"Feature",id:e.id,properties:Tt(e),geometry:{type:"Point",coordinates:[(r=e.x,360*(r-.5)),(t=e.y,n=(180-360*t)*Math.PI/180,360*Math.atan(Math.exp(n))/Math.PI-90)]}};var t,n,r}function Tt(e){var t=e.numPoints,n=t>=1e4?"".concat(Math.round(t/1e3),"k"):t>=1e3?"".concat(Math.round(t/100)/10,"k"):t;return Gt(Gt({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:n})}function Rt(e){return e/360+.5}function Nt(e){var t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function Gt(e,t){for(var n in t)e[n]=t[n];return e}function Zt(e){return e.x}function Vt(e){return e.y}var Dt=Object.prototype.hasOwnProperty;function Ht(e,t,n){var r,o=Y(e.keys());try{for(o.s();!(r=o.n()).done;)if(Ft(n=r.value,t))return n}catch(i){o.e(i)}finally{o.f()}}function Ft(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Ft(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;var i,a=Y(e);try{for(a.s();!(i=a.n()).done;){if((o=r=i.value)&&"object"===V(o)&&!(o=Ht(t,o)))return!1;if(!t.has(o))return!1}}catch(c){a.e(c)}finally{a.f()}return!0}if(n===Map){if(e.size!==t.size)return!1;var l,s=Y(e);try{for(s.s();!(l=s.n()).done;){if((o=(r=l.value)[0])&&"object"===V(o)&&!(o=Ht(t,o)))return!1;if(!Ft(r[1],t.get(o)))return!1}}catch(c){s.e(c)}finally{s.f()}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"===V(e)){for(n in r=0,e){if(Dt.call(e,n)&&++r&&!Dt.call(t,n))return!1;if(!(n in t)||!Ft(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}function Ut(e,t){return be.exports.useEffect(e,(n=t,r=be.exports.useRef(n),o=be.exports.useRef(0),Ft(n,r.current)||(r.current=n,o.current+=1),be.exports.useMemo((function(){return r.current}),[o.current])));var n,r,o}var Bt=Pe(Le.div)(e||(e=Z(["\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"])),Ie["--ll-color-primary-variant1"],Ie["--ll-color-primary"],Ie["--ll-color-on-primary"],(function(e){return e.diameter}),(function(e){return e.diameter}),Ie["--ll-font-family"],(function(e){return e.diameter/2.5}),Ie["--ll-shadow-small"]),Wt=Pe.ul(t||(t=Z(["\n list-style: none;\n padding: 0;\n margin: 0;\n"]))),Yt=Pe.li(n||(n=Z(["\n font-family: ",";\n padding: ",";\n background-color: ",";\n border-radius: ",";\n border: 1px solid ",";\n cursor: default;\n\n &:not(:last-child) {\n margin-bottom: ",";\n }\n\n &:hover {\n background-color: ",";\n }\n"])),Ie["--ll-font-family"],Ie["--ll-spacing-x-small"],Ie["--ll-color-background"],Ie["--ll-border-radius-small"],Ie["--ll-color-border"],Ie["--ll-spacing-xx-small"],Ie["--ll-color-surface"]),Kt={all:function(){return["commute-calculator"]},list:function(e){return[].concat(G(Kt.all()),[e])}};function qt(e){var t=e.transportMode,n=e.origin,r=e.destination,o=e.isOpen,i={return:"polyline,summary,typicalDuration",transportMode:t,origin:n,destination:"".concat(null==r?void 0:r.lat,",").concat(null==r?void 0:r.lng),apiKey:"KDL0aAzsbOcv7p53P2ovno2izfDOe93hyzZRrayktbE"};return nt(Kt.list(i),(function(){return fetch("https://router.hereapi.com/v8/routes?"+new URLSearchParams(i)).then((function(e){return e.json()})).then((function(e){return e.routes.length>0&&e.routes[0].sections.length>0?e.routes[0].sections[0]:[]})).catch((function(e){Ee(e)}))}),{enabled:!!i&&!!r&&!!n&&o})}var Qt=function(e){var t,n,r,o,i=e.poi,a=e.poiType,l=e.rect,s=e.activePOI,c=e.hoveredPOI,u=e.isMapMoving,d=e.setActivePOI,p=e.isMobile,f=K(be.exports.useState(!1),2),h=f[0],m=f[1],v=c===i,g=Ae().translations,y=Se().sdkState,b=rt(),x=b.setCommuteGeojson,w=b.setDestination,C=b.setShowCommuteCalculator,M=b.setSchoolCatchment,S=qt({destination:{lat:i.lat,lng:i.lng},transportMode:"pedestrian",origin:"".concat(null==y||null===(t=y.options)||void 0===t||null===(n=t.marker)||void 0===n?void 0:n.lat,",").concat(null==y||null===(r=y.options)||void 0===r||null===(o=r.marker)||void 0===o?void 0:o.lng),isOpen:h}).data;be.exports.useEffect((function(){if(m(s===i),s===i){var e="high_schools"===a||"primary_schools"===a?"school":"poi";_e.poi.isSchool(i,e)&&null!=i&&i.catchments&&Object.keys((null==i?void 0:i.catchments)||[]).length>0&&M(je.formatGeometry.formatGeometry(i.catchments[0].geometry))}}),[s,i]);var k=be.exports.useMemo((function(){if(null==S||!S.summary||!h)return null;var e=Math.floor(S.summary.typicalDuration/60/60),t=Math.floor(S.summary.typicalDuration/60%60);return 0===e?"".concat(t," ").concat(ze.pluralize(g.MINUTE,t)):"".concat(e," ").concat(ze.pluralize(g.HOUR,e)," ").concat(t," ").concat(ze.pluralize(g.MINUTE,t))}),[S,h]);return we(te,{latitude:i.lat,longitude:i.lng,style:{zIndex:h?1:0},children:Te(Re.Root,{options:{type:a,poi:i,isOpen:!u&&h,isHovered:v,side:"top",size:["rapid_transit_stations"].includes(a)?"medium":"small",collisionPadding:p?{top:l.height+32,bottom:2*Ne,left:2*Ne,right:2*Ne}:{left:l.width+32,right:2*Ne,top:2*Ne,bottom:2*Ne},walkingTime:k,calculateRoute:function(){null!=S&&S.summary&&h&&(w({label:i.name,lat:i.lat,lng:i.lng}),x(je.polyline.decode(S.polyline)),C(!0),m(!1))}},onChange:function(e){"open-change"===e.type&&(e.data?setTimeout((function(){d(i)}),0):h&&(d(void 0),M()))},children:[we(Re.Marker,{}),we(Re.Content,{})]})})},Xt={default:{scale:1},hovered:{scale:1.2}},$t=function(e){var t=e.cluster,n=e.supercluster,r=e.pointsCount,o=e.onClick,i=e.zoom,a=e.activePOI,l=e.hoveredPOI,s=e.setActivePOI,c=e.rect,u=e.isMobile,d=e.isMapMoving,p=K(be.exports.useState(!1),2),f=p[0],h=p[1],m=20+t.properties.point_count/r*25,v=be.exports.useMemo((function(){return null==n?void 0:n.getChildren(t.id).map((function(e){return e.properties})).filter((function(e){return!!e}))}),[n,t]),g=null==v?void 0:v.find((function(e){return!!a&&e.poi===a}));return g?we(Qt,{rect:c,poi:g.poi,poiType:g.type,isMobile:u,activePOI:a,hoveredPOI:l,isMapMoving:d,setActivePOI:s}):Te(Ge.Root,{open:!d&&f,onOpenChange:function(e){i<=17||h(e)},children:[we(Ge.Trigger,{children:we(Bt,{diameter:m,onClick:function(){i>17?h(!0):o&&o(t)},variants:Xt,animate:f?"hovered":"default",whileHover:{scale:1.2},transition:xe.transitions.default,children:t.properties.point_count})}),we(Ge.Content,{side:"top",children:we(Wt,{children:null==v?void 0:v.map((function(e,t){var n;return we(Yt,{onClick:function(){return s(e.poi)},children:null===(n=e.poi)||void 0===n?void 0:n.name},t)}))})})]})};var Jt=ye.memo((function(e){var t,n=e.rect,r=e.zoom,o=e.mapRef,i=e.points,a=e.isMobile,l=e.activePOI,s=e.hoveredPOI,c=e.isMapMoving,u=e.setActivePOI,d=null==o||null===(t=o.current)||void 0===t?void 0:t.getMap().getBounds().toArray().flat(),p=function(e){var t=e.points,n=e.bounds,r=e.zoom,o=e.options,i=be.exports.useRef(),a=be.exports.useRef(),l=be.exports.useState([]),s=l[0],c=l[1],u=Math.round(r);return Ut((function(){i.current&&Ft(a.current,t)&&Ft(i.current.options,o)||(i.current=new _t(o),i.current.load(t)),n&&c(i.current.getClusters(n,u)),a.current=t}),[t,n,u,o]),{clusters:s,supercluster:i.current}}({points:i,bounds:d,zoom:r,options:{radius:50,maxZoom:30}}),f=p.clusters,h=p.supercluster;return we(Ze,{children:f.map((function(e,t){var d=K(e.geometry.coordinates,2),p=d[0],f=d[1];return function(e){return void 0!==e.properties.cluster}(e)?we(te,{latitude:f,longitude:p,children:we($t,{rect:n,zoom:r,cluster:e,supercluster:h,pointsCount:i.length,activePOI:l,setActivePOI:u,isMobile:a,isMapMoving:c,hoveredPOI:s,onClick:function(){var t,n=Math.min(h.getClusterExpansionZoom(e.id),20);null===(t=o.current)||void 0===t||t.flyTo({zoom:n,center:[p,f],duration:1e3,essential:!0})}})},"cluster-".concat(e.id)):we(Qt,{rect:n,poi:e.properties.poi,poiType:e.properties.type,isMobile:a,activePOI:l,hoveredPOI:s,isMapMoving:c,setActivePOI:u},t)}))})}));Jt.displayName="Markers";var en=function(e){return be.exports.createElement("svg",$({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),be.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"}))},tn=function(e){return be.exports.createElement("svg",$({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),be.exports.createElement("path",{d:"M10 20V14H14V20H19V12H22L12 3L2 12H5V20H10Z"}))};function nn(e){var t=Me().client,n=Se().sdkState,r=ke(n.options,250),o=$($({},be.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:e});return nt(ne.list(o),W(U().mark((function e(){return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.getScores(o));case 1:case"end":return e.stop()}}),e)}))),{enabled:!!o})}var rn=Pe.div(r||(r=Z(["\n padding: "," ",";\n background-color: ",";\n display: flex;\n flex-direction: column;\n overflow: hidden;\n flex: 1;\n"])),Ie["--ll-spacing-small"],Ie["--ll-spacing-medium"],Ie["--ll-color-surface"]),on=Pe.div(o||(o=Z(["\n display: grid;\n grid-template-columns: min-content 1fr;\n grid-gap: ",";\n margin-bottom: ",";\n"])),Ie["--ll-spacing-medium"],Ie["--ll-spacing-medium"]),an=function(){var e,t,n=Se().sdkState,r=rt(),o=r.activeCategory,i=r.activeScore,a=nn(Ce.find((function(e){return e.value===o})).scores),l=a.data,s=a.isLoading;return i&&null!=l&&l.location[i]?s?we("div",{children:"Loading"}):we(Ve.Root,{options:{score:i,scoresData:l},children:Te(rn,{children:[Te(on,{children:[we(Ve.Badge,{}),we(Ve.BarChart,{options:{renderNeighbourhoodAvg:!1,locationIcon:"pin"===(null===(e=n.options)||void 0===e||null===(t=e.marker)||void 0===t?void 0:t.icon)?en:tn}})]}),we(Ve.Description,{})]})}):null},ln=Pe.div(i||(i=Z(["\n display: flex;\n overflow-x: scroll;\n padding: "," ",";\n flex-shrink: 0;\n position: relative;\n"])),Ie["--ll-spacing-x-small"],Ie["--ll-spacing-medium"]),sn=Pe.button(a||(a=Z(["\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"]))),cn=Pe.div(l||(l=Z(["\n position: absolute;\n top: -6px;\n right: 4px;\n border: 2px solid ",";\n border-radius: 6px;\n"])),Ie["--ll-color-background"]),un=Pe.div(s||(s=Z(["\n flex: 1;\n display: flex;\n align-items: center;\n"]))),dn=Pe.div(c||(c=Z(["\n margin: 0 2px;\n"]))),pn=function(e){var t=e.category,n=nn(t.scores),r=n.data,o=n.isLoading,i=n.isFetching,a=rt(),l=a.activeScore,s=a.setActiveScore,c=a.setActiveCategory;return we(ln,{children:t.scores.map((function(e){var n=e===l,a=n?"--ll-color-primary":"--ll-color-disabled";return o||i?we(dn,{children:we(De,{height:"44px",width:"60px"})},e):we(Ve.Root,{options:{score:e,scoresData:r},children:Te(sn,{onClick:function(){c(t.value),s(e)},children:[we(Ve.Icon,{options:{color:a,height:28,width:28}}),we(un,{children:we(Ve.Title,{options:{variant:"caption1",color:a,lineClamp:1,noMargin:!0,weight:"--ll-font-weight-bold"}})}),we(cn,{children:we(Ve.Badge,{options:{variant:"small",isPrimary:n}})})]})},e)}))})},fn=Pe.div(u||(u=Z(["\n display: flex;\n padding: "," ","\n "," ",";\n"])),Ie["--ll-spacing-x-small"],Ie["--ll-spacing-medium"],Ie["--ll-spacing-xx-small"],Ie["--ll-spacing-medium"]),hn=Pe.div(d||(d=Z(["\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"])),Ie["--ll-color-background"],Ie["--ll-color-border"]),mn=ye.forwardRef((function(e,t){var n=rt(),r=n.activeCategory,o=n.setActiveCategory;return Te(hn,{ref:t,children:[we(fn,{children:Te(He.Root,{value:r,onValueChange:function(e){return o(e)},children:[we(He.Trigger,{size:"large",children:we(Fe.Root,{options:{scoreCategory:r},children:we(Fe.Title,{options:{color:"inherit",noMargin:!0,variant:"h6",lineHeight:1}})},r)}),we(He.Content,{children:Ce.map((function(e){return we(Fe.Root,{options:{scoreCategory:e.value},children:we(He.Item,{value:e.value,children:we(Fe.Title,{options:{color:"inherit",noMargin:!0,variant:"h6"}})})},e.value)}))})]})}),we(pn,{category:Ce.find((function(e){return e.value===r}))}),we(an,{})]})}));mn.displayName="MobileScores";var vn=Ue({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),gn=Ue({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),yn=Pe(re)(p||(p=Z(["\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"])),Ie["--ll-spacing-medium"],Ie["--ll-spacing-medium"],Ie["--ll-color-surface"],Ie["--ll-shadow-small"]),bn=Pe(oe)(f||(f=Z(["\n background: none;\n border: none;\n display: flex;\n align-items: center;\n width: 100%;\n padding: "," 0;\n"])),Ie["--ll-spacing-x-small"]),xn=Pe(ie)(h||(h=Z(["\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 /* TODO: Re-implement this once StyledComponents is fixed. https://locallogic.atlassian.net/browse/LL22-1107 */\n /* animation: ',' 300ms cubic-bezier(0.87, 0, 0.13, 1); */\n visibility: visible;\n }\n\n [data-state="closed"] & {\n /* TODO: Re-implement this once StyledComponents is fixed. https://locallogic.atlassian.net/browse/LL22-1107 */\n /* animation: '," 300ms cubic-bezier(0.87, 0, 0.13, 1); */\n visibility: hidden;\n }\n"])),Ie["--ll-color-surface"],Ie["--ll-spacing-medium"],Ie["--ll-spacing-medium"],vn,gn),wn=Pe.div(m||(m=Z(["\n padding: ",";\n border-top: 1px solid ",";\n border-bottom: 1px solid ",";\n"])),Ie["--ll-spacing-medium"],Ie["--ll-color-border"],Ie["--ll-color-border"]),Cn=Pe.span(v||(v=Z(["\n ","[data-state=open] & {\n transform: rotate(90deg);\n } ;\n"])),bn);Pe.div(g||(g=Z(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n"])));var Mn=Pe.div(y||(y=Z(["\n margin: "," 0;\n"])),Ie["--ll-spacing-small"]),Sn=Pe.div(b||(b=Z(["\n margin-top: ",";\n &:empty {\n margin: 0;\n }\n"])),Ie["--ll-spacing-large"]),kn=function(e){var t=e.score,n=gt(),r=n.data,o=n.isLoading,i=rt(),a=i.activePOI,l=i.setActivePOI,s=i.hoveredPOI,c=i.setHoveredPOI,u=bt(),d=u.mapRef,p=u.mapPadding;return o?we(Ze,{children:G(Array(10)).map((function(e,t){return we(Mn,{children:we(De,{height:"34px",width:"100%"})},t)}))}):r?we(Be.Root,{options:{type:"school",data:null==r?void 0:r[t],activePOI:a,hoveredPOI:s},onChange:function(e){if("poi-click"===e.type){var t=e.data;l(t);var n,r=window.innerWidth-p.left,o=window.innerWidth/2,i=r/2+p.left-o;if(t)null===(n=d.current)||void 0===n||n.easeTo({zoom:18,center:[t.lng,t.lat],duration:1e3,offset:[i,0]})}"poi-hover"===e.type&&c(e.data)}}):null},On=ye.memo((function(e){var t=e.result,n=e.poi,r=rt(),o=r.activePOI,i=r.setActivePOI,a=r.hoveredPOI,l=r.setHoveredPOI,s=bt(),c=s.mapRef,u=s.mapPadding;return t.data&&t.data[n]?we(We.Content,{options:{value:n},children:we(Be.Root,{options:{type:"poi",data:t.data[n],activePOI:o,hoveredPOI:a},onChange:function(e){if("poi-click"===e.type){var t=e.data;i(t);var n,r=window.innerWidth-u.left,o=window.innerWidth/2,a=r/2+u.left-o;if(t)null===(n=c.current)||void 0===n||n.flyTo({zoom:18,center:[t.lng,t.lat],duration:1e3,offset:[a,0],essential:!0})}"poi-hover"===e.type&&l(e.data)}})},n):null}));On.displayName="POI";var Pn=ye.memo((function(e){var t=e.include,n=vt(),r=null==t?void 0:t.filter((function(e){var t;return((null==n||null===(t=n.data)||void 0===t?void 0:t[e])||[]).length>0}));return n.isLoading&&r.length?we(Ze,{children:G(Array(10)).map((function(e,t){return we(Mn,{children:we(De,{height:"34px",width:"100%"})},t)}))}):n.data?Te(We.Root,{options:{include:r},children:[we(We.Tabs,{}),r.map((function(e){return we(On,{poi:e,result:n},e)}))]}):null}));Pn.displayName="POIs";var Ln=ye.memo((function(e){var t,n,r=e.score,o=e.isLoading,i=e.scoresData,a=Se().sdkState,l=r===rt().activeScore;return o?we(Mn,{children:we(De,{height:"34px",width:"100%"},r)}):null!=i&&i.location[r]?we(ae,{value:r,children:Te(Ve.Root,{options:{score:r,scoresData:i},children:[we(yn,{children:Te(bn,{children:[we(Cn,{children:we(Ye,{SVGElement:le,fill:Ie["--ll-color-on-background-variant1"]})}),we(Ke,{spacing:"--ll-spacing-small"}),we(Ve.Icon,{}),we(Ke,{spacing:"--ll-spacing-small"}),we(Ve.Title,{}),we(Ke,{}),we(Ve.Badge,{options:{isPrimary:l}})]})}),we(xn,{children:Te(wn,{children:[we(Ve.Description,{}),we(Ke,{vertical:!0,spacing:"--ll-spacing-small"}),we(Ve.BarChart,{options:{renderNeighbourhoodAvg:!1,locationIcon:"pin"===(null===(t=a.options)||void 0===t||null===(n=t.marker)||void 0===n?void 0:n.icon)?en:tn}}),we(Sn,{children:"high_schools"===r||"primary_schools"===r?we(kn,{score:r}):we(Pn,{include:Oe[r]})})]})})]})},r):null}));Ln.displayName="Score";var In=Pe.div(x||(x=Z(["\n padding: "," ",";\n"])),Ie["--ll-spacing-small"],Ie["--ll-spacing-medium"]),En=Pe.div(w||(w=Z(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"]))),An=ye.memo((function(e){var t=e.tabContent,n=nn(t.scores),r=n.data,o=n.isLoading,i=n.isFetching,a=Ae().translations;return Te(In,{children:[Te(En,{children:[we(qe.Title,{options:{variant:"h4",noMargin:!0,weight:"--ll-font-weight-medium"}}),i&&!o&&we(Qe,{size:"small"})]}),we(Ke,{spacing:"--ll-spacing-small",vertical:!0}),!i&&!Object.keys((null==r?void 0:r.location)||{}).length&&we(Xe,{color:"--ll-color-on-background-variant1",children:a.EMPTY_TEXT}),t.scores.map((function(e){return we(Ln,{score:e,isLoading:o,scoresData:r},e)}))]})}));An.displayName="ScoreCategory";var _n=ye.memo((function(e){var t=e.tabContent,n=rt(),r=n.activeScore,o=n.setActiveScore;return be.exports.useEffect((function(){o(t.scores[0])}),[]),we(se,{value:r,onValueChange:function(e){o(e)},type:"single",collapsible:!0,children:we(An,{tabContent:t})})}));_n.displayName="ScoreCategoryAccordion";var jn=Pe.div(C||(C=Z(["\n overflow-y: auto;\n"]))),zn=Pe.div(M||(M=Z(["\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"])),Ie["--ll-spacing-medium"],Ie["--ll-spacing-medium"],Ie["--ll-spacing-medium"],Ie["--ll-border-radius-medium"],Ie["--ll-color-background"],Ie["--ll-color-border"]);Pe.div(S||(S=Z(["\n display: flex;\n justify-content: center;\n padding: ",";\n"])),Ie["--ll-spacing-small"]);var Tn=Pe.div(k||(k=Z(["\n padding: ",";\n border-bottom: 1px solid ",";\n"])),Ie["--ll-spacing-xx-small"],Ie["--ll-color-border"]),Rn=Pe.div(O||(O=Z(["\n display: flex;\n justify-content: center;\n padding: ",";\n background-color: ",";\n"])),Ie["--ll-spacing-small"],Ie["--ll-color-background"]),Nn=function(){return we(Rn,{children:we($e.Root,{})})},Gn=ye.forwardRef((function(e,t){var n=rt(),r=n.activeCategory,o=n.setActiveCategory;return we(qe.Root,{options:{currentTab:r},onChange:function(e){o(e.data)},children:Te(zn,{ref:t,children:[we(Tn,{children:we(qe.Tabs,{})}),we(jn,{children:Ce.map((function(e){return we(qe.Content,{options:{value:e.value},children:we(_n,{tabContent:e},e.value)},e.value)}))}),we(Nn,{})]})})}));Gn.displayName="DesktopScores";var Zn=Pe.div(P||(P=Z(["\n position: relative;\n display: flex;\n flex-direction: column;\n height: 100vh;\n"]))),Vn=function(e){return be.exports.createElement("svg",$({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),be.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"}))},Dn=function(e){return be.exports.createElement("svg",$({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),be.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"}))},Hn=function(e){return be.exports.createElement("svg",$({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),be.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"}),be.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"}),be.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"}))},Fn=function(e){return be.exports.createElement("svg",$({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),be.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"}))},Un=Pe.div(L||(L=Z(["\n max-height: calc(100% - 2 * ",");\n border-radius: ",";\n box-shadow: ",";\n background-color: ",";\n border: 1px solid ",";\n padding: ",";\n"])),Ie["--ll-spacing-medium"],Ie["--ll-border-radius-medium"],Ie["--ll-shadow-small"],Ie["--ll-color-background"],Ie["--ll-color-border"],Ie["--ll-spacing-x-small"]),Bn=Pe.div(I||(I=Z(["\n display: flex;\n justify-content: space-between;\n align-items: end;\n\n "," {\n // Adjust if text of commute transport mode changes\n width: 52%;\n margin-right: ",";\n }\n"])),ce,Ie["--ll-spacing-x-small"]),Wn=Pe.div(E||(E=Z(["\n background-color: ",";\n padding: "," "," 0;\n border-radius: ",";\n"])),Ie["--ll-color-surface"],Ie["--ll-spacing-x-small"],Ie["--ll-spacing-small"],Ie["--ll-border-radius-medium"]),Yn=Pe(Je)(A||(A=Z(["\n position: absolute;\n right: ",";\n top: ",";\n"])),Ie["--ll-spacing-xx-small"],Ie["--ll-spacing-xx-small"]),Kn=function(e){var t,n,r,o,i=e.className,a=e.onClose,l=Se().sdkState,s=rt(),c=s.setCommuteGeojson,u=s.destination,d=s.setDestination,p=K(be.exports.useState("pedestrian"),2),f=p[0],h=p[1],m=tt(),v=Ae().translations,g=qt({destination:u,transportMode:f,origin:"".concat(null==l||null===(t=l.options)||void 0===t||null===(n=t.marker)||void 0===n?void 0:n.lat,",").concat(null==l||null===(r=l.options)||void 0===r||null===(o=r.marker)||void 0===o?void 0:o.lng),isOpen:!0}),y=g.data,b=g.isFetching,x=g.isFetched;be.exports.useEffect((function(){null!=y&&y.summary&&c(je.polyline.decode(y.polyline))}),[y]);var w={pedestrian:[v.WALKING,Dn],car:[v.DRIVING,Hn]},C=be.exports.useMemo((function(){if(null==y||!y.summary)return null;var e=Math.floor(y.summary.typicalDuration/60/60),t=Math.floor(y.summary.typicalDuration/60%60);return 0===e?"".concat(t," ").concat(ze.pluralize(v.MINUTE,t)):"".concat(e," ").concat(ze.pluralize(v.HOUR,e)," ").concat(t," ").concat(ze.pluralize(v.MINUTE,t))}),[y]),M=be.exports.useMemo((function(){if(null==y||!y.summary)return null;var e=Math.floor(y.summary.length/1e3);return 0===e?"".concat(y.summary.length," m"):"".concat(e," km")}),[y]);return Te(Un,{className:i,children:[we(Yn,{size:"medium",color:"neutral",onClick:a,SVGElement:Fn}),Te(Bn,{children:[we(ue,{label:v.CALCULATE_COMMUTE,placeholder:(null==u?void 0:u.label)||v.SEARCH_MAP,renderListAbove:m,renderListAbovePosition:30,onSearch:function(e){d({lat:e.latitude,lng:e.longitude})}}),we(He.Root,{value:f,onValueChange:function(e){h(e)},children:Te(He.Trigger,{children:[we(Ye,{SVGElement:w[f][1],fill:Ie["--ll-color-on-background-variant1"],width:16}),w[f][0],Te(He.Content,{children:[we(He.Item,{value:"car",children:v.DRIVING}),we(He.Item,{value:"pedestrian",children:v.WALKING})]})]})})]}),(x||b)&&Te(Ze,{children:[we(Ke,{vertical:!0,spacing:"--ll-spacing-x-small"}),we(de,{open:!!y,children:b?we(De,{height:"70.4px",width:"100%"}):null!=y&&y.summary?Te(Wn,{children:[we(Xe,{variant:"h5",children:C}),Te(Xe,{children:[M," – ",v.FAST_ROUTE]})]}):Te(Wn,{children:[we(Xe,{variant:"h5",children:v.NO_ROUTE}),we(Xe,{children:v.TRY_SUGGESTION})]})})]})]})},qn=Pe.div(_||(_=Z(["\n position: absolute;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 3;\n"]))),Qn=Pe.div(j||(j=Z(["\n position: absolute;\n top: ",";\n right: ",";\n z-index: 3;\n max-width: 356px;\n"])),Ie["--ll-spacing-medium"],Ie["--ll-spacing-medium"]),Xn=Pe(Je)(z||(z=Z(["\n box-shadow: ",";\n position: absolute;\n bottom: ",";\n right: ",";\n"])),Ie["--ll-shadow-medium"],Ie["--ll-spacing-medium"],Ie["--ll-spacing-medium"]),$n=Pe(Kn)(T||(T=Z([""]))),Jn=Pe(Kn)(R||(R=Z(["\n border-radius: ","\n "," 0 0;\n border: 0;\n"])),Ie["--ll-border-radius-small"],Ie["--ll-border-radius-small"]),er=Pe(et)(N||(N=Z(["\n box-shadow: ",";\n"])),Ie["--ll-shadow-small"]),tr=function(){var e=rt(),t=e.setCommuteGeojson,n=e.setDestination,r=e.showCommuteCalculator,o=e.setShowCommuteCalculator,i=Ae().translations,a=function(){n(void 0),t(void 0),o(!1)},l=function(){o(!0)};return tt()?we(Ze,{children:r?we(qn,{children:we(Jn,{onClose:a})}):we(Xn,{size:"large",SVGElement:Vn,onClick:l})}):we(Qn,{children:r?we($n,{onClose:a}):we(er,{onClick:l,startAdornment:we(Vn,{}),children:i.CALCULATE_COMMUTE})})},nr=function(){var e,t,n,r=Se(),o=r.sdkState,i=r.setSdkState,a=rt(),l=a.activeScore,s=a.activePOI,c=a.setActivePOI,u=a.hoveredPOI,d=a.commuteGeojson,p=a.destination,f=a.schoolCatchment,h=tt(),m=vt(),v=gt(),g="night"===(null==o||null===(e=o.globalOptions)||void 0===e||null===(t=e.appearance)||void 0===t?void 0:t.theme)?"dd191599-2a92-49fc-9a33-e12391753ad5":"600d69cb-288d-445e-9839-3dfe4d76b31a",y={id:"point",type:"line",paint:{"line-width":6,"line-color":getComputedStyle(document.documentElement).getPropertyValue("--ll-color-link")}},b={id:"school",type:"line",source:"schoolCatchment",paint:{"line-width":3,"line-color":getComputedStyle(document.documentElement).getPropertyValue("--ll-color-on-background")}},x=K(be.exports.useState(!1),2),w=x[0],C=x[1],M=be.exports.useMemo((function(){var e,t;return"high_schools"!==l&&"primary_schools"!==l||v.isFetching?Oe&&l&&Oe[l]&&null!==(e=Oe[l])&&void 0!==e&&e.length||m.isFetching?m.data:J({},l,[]):J({},l,(null==v||null===(t=v.data)||void 0===t?void 0:t[l])||[])}),[m.data,v.data,l]),S=be.exports.useMemo((function(){return M?Object.entries(M).map((function(e){var t=K(e,2),n=t[0];return t[1].map((function(e){return pt([e.lng,e.lat],{poi:e,type:n})}))})).flat().filter((function(e,t,n){return n.findIndex((function(t){return["lat","lng","name"].every((function(n){return t.properties.poi[n]===e.properties.poi[n]}))}))===t})):[]}),[M]),k=be.exports.useMemo((function(){var e,t,n,r=(null==o||null===(e=o.options)||void 0===e?void 0:e.marker)&&pt([null==o||null===(t=o.options)||void 0===t?void 0:t.marker.lng,null==o||null===(n=o.options)||void 0===n?void 0:n.marker.lat]);return[].concat(G(S),G(r?[r]:[]),G(p?[pt([null==p?void 0:p.lng,null==p?void 0:p.lat])]:[]))}),[S,null==o||null===(n=o.options)||void 0===n?void 0:n.marker,p]),O=be.exports.useRef(),P=K(pe(),2),L=P[0],I=P[1],E=be.exports.useMemo((function(){return{top:25+I.height,bottom:25,left:25,right:25}}),[I.height]),A=be.exports.useMemo((function(){return{top:50,bottom:50,left:I.width+32+50,right:50}}),[I.width]),_=h?E:A;return be.exports.useEffect((function(){var e,t;if(k.length&&null!==(e=o.options)&&void 0!==e&&e.marker){var n,r,i,a=K(mt((n=k.map((function(e){var t=e.geometry;return[t.coordinates[1],t.coordinates[0]]})),void 0===i&&(i={}),dt({type:"MultiPoint",coordinates:n},r,i))),4),l=a[0],s=a[1],c=a[2],u=a[3];null==O||null===(t=O.current)||void 0===t||t.fitBounds([[s,l],[u,c]],{maxZoom:17,padding:_,duration:1e3})}}),[k,_,f]),o.options?we(xt,{mapRef:O,mapPadding:_,children:Te(Zn,{children:[Te(fe,{ref:O,mapLib:he,latitude:o.options.lat,longitude:o.options.lng,zoom:o.options.zoom,pitch:o.options.pitch,bearing:o.options.bearing,style:{flex:1,width:"100vw"},mapStyle:"https://api.maptiler.com/maps/".concat(g,"/style.json?key=","9jNGatuzs05Q1oNlctEs"),onMove:function(e){i($($({},o),{},{options:$($({},o.options),{},{lat:e.viewState.latitude,lng:e.viewState.longitude,zoom:e.viewState.zoom,bearing:e.viewState.bearing,pitch:e.viewState.pitch})}))},cooperativeGestures:o.options.cooperativeGestures,onMoveStart:function(){return C(!0)},onMoveEnd:function(){return C(!1)},attributionControl:!1,children:[we(me,{compact:!0,position:h?"bottom-left":"bottom-right"}),we(ve,{position:h?"top-right":"bottom-right",showCompass:!0,style:{marginTop:h?16+I.height:16,marginRight:16}}),o.options.marker&&we(ge,{marker:o.options.marker}),we(Jt,{rect:I,zoom:o.options.zoom,mapRef:O,points:S,isMobile:h,activePOI:s,hoveredPOI:u,isMapMoving:w,setActivePOI:c}),we(h?mn:Gn,{ref:L}),we(tr,{}),p&&we(ge,{marker:$({icon:"pin"},p)}),d&&we(st,{type:"geojson",data:d,children:we(ut,$({},y))}),f&&we(st,{type:"geojson",data:f,children:we(ut,$({},b))})]}),h&&we(Nn,{})]})}):we("div",{children:"No options provided."})};H("default",(function(){return we(it,{children:we(nr,{})})}))}}}))}();
|
|
1
|
+
!function(){var e,t,n,r,o,i,a,l,s,c,u,d,p,f,h,m,v,g,y,b,x,w,C,M,S,k,O,P,L,I,E,A,_,j,z,T,R,N;function G(e){return function(e){if(Array.isArray(e))return Q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||q(e)||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 Z(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function V(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e,t,n){return t&&H(e.prototype,t),n&&H(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function U(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */U=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(O){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof d?t:d,i=Object.create(o.prototype),a=new M(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=x(a,n);if(l){if(l===u)continue;return l}}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 s=c(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===u)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(O){return{type:"throw",arg:O}}}e.wrap=s;var u={};function d(){}function p(){}function f(){}var h={};l(h,o,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(S([])));v&&v!==t&&n.call(v,o)&&(h=v);var g=f.prototype=d.prototype=Object.create(h);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function r(o,i,a,l){var s=c(e[o],e,i);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==D(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,l)}),(function(e){r("throw",e,a,l)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,l)}))}l(s.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:k}}function k(){return{value:void 0,done:!0}}return p.prototype=f,l(g,"constructor",f),l(f,"constructor",p),p.displayName=l(f,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,a,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},y(b.prototype),l(b.prototype,i,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new b(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(g),l(g,a,"Generator"),l(g,o,(function(){return this})),l(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,M.prototype={constructor:M,reset:function(e){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(C),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}function B(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(c){return void n(c)}l.done?t(s):Promise.resolve(s).then(r,o)}function W(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){B(i,r,o,a,l,"next",e)}function l(e){B(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=q(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function K(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||q(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){if(e){if("string"==typeof e)return Q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){J(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}System.register(["./index-legacy.5b5c89be.js","./index-legacy.e333988e.js","./useIsMobile-legacy.7fb572d8.js","./useQuery-legacy.7e93cb2c.js"],(function(H,B){"use strict";var q,Q,X,ee,te,ne,re,oe,ie,ae,le,se,ce,ue,de,pe,fe,he,me,ve,ge,ye,be,xe,we,Ce,Me,Se,ke,Oe,Pe,Le,Ie,Ee,Ae,_e,je,ze,Te,Re,Ne,Ge,Ze,De,Ve,He,Fe,Ue,Be,We,Ye,Ke,qe,Qe,Xe,$e,Je,et,tt,nt;return{setters:[function(e){q=e.M,Q=e.d,X=e.p,ee=e.s,te=e.a,ne=e.b,re=e.$,oe=e.c,ie=e.e,ae=e.f,le=e.S,se=e.g,ce=e.h,ue=e.i,de=e.A,pe=e.u,fe=e.j,he=e.m,me=e.k,ve=e.N,ge=e.P},function(e){ye=e.R,be=e.r,xe=e.o,we=e.j,Ce=e.M,Me=e.G,Se=e.u,ke=e.a,Oe=e.Q,Pe=e.s,Le=e.m,Ie=e.C,Ee=e.b,Ae=e.c,_e=e.d,je=e.w,ze=e.I,Te=e.e,Re=e.Z,Ne=e.X,Ge=e.n,Ze=e.F,De=e.f,Ve=e.K,He=e.g,Fe=e.O,Ue=e.k,Be=e.q,We=e.J,Ye=e.h,Ke=e.L,qe=e.i,Qe=e.l,Xe=e.p,$e=e.U,Je=e.t,et=e.v},function(e){tt=e.u},function(e){nt=e.u}],execute:function(){var B=ye.createContext({}),rt=function(){return be.exports.useContext(B)},ot=function(e,t){switch(t.type){case"CATEGORY":return $($({},e),{},{activeCategory:t.value});case"SCORE":var n=Ce.find((function(n){return""===t.value?n.value===e.activeCategory:n.scores.includes(t.value)})).value;return{activeCategory:n,activeScoreByCategory:$($({},e.activeScoreByCategory),{},J({},n,t.value))}}},it=function(e){var t=e.children,n=window.innerWidth<xe.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=K(be.exports.useReducer(ot,n),2),o=r[0],i=r[1],a=K(be.exports.useState(),2),l=a[0],s=a[1],c=K(be.exports.useState(),2),u=c[0],d=c[1],p=K(be.exports.useState(),2),f=p[0],h=p[1],m=K(be.exports.useState(),2),v=m[0],g=m[1],y=K(be.exports.useState(),2),b=y[0],x=y[1],w=K(be.exports.useState(!1),2),C=w[0],M=w[1],S=o.activeCategory,k=o.activeScoreByCategory[S],O=function(e){i({type:"SCORE",value:e})},P=function(e){i({type:"CATEGORY",value:e})},L=be.exports.useMemo((function(){return{activeScore:k,setActiveScore:O,activeCategory:S,setActiveCategory:P,activePOI:l,setActivePOI:s,hoveredPOI:u,setHoveredPOI:d,commuteGeojson:f,setCommuteGeojson:h,destination:b,setDestination:x,showCommuteCalculator:C,setShowCommuteCalculator:M,schoolCatchment:v,setSchoolCatchment:g}}),[k,O,S,P,l,s,u,d,f,h,b,x,C,M,v,g]);return we(B.Provider,{value:L,children:t})};function at(e,t){if(!e)throw new Error(t)}var lt=0;function st(e){var t=be.exports.useContext(q).map.getMap(),n=be.exports.useRef(e),r=K(be.exports.useState(0),2)[1],o=be.exports.useMemo((function(){return e.id||"jsx-source-".concat(lt++)}),[]);be.exports.useEffect((function(){if(t){var e=function(){return r((function(e){return e+1}))};return t.on("styledata",e),e(),function(){var n;if(t.off("styledata",e),t.style&&t.style._loaded&&t.getSource(o)){var r=null===(n=t.getStyle())||void 0===n?void 0:n.layers;if(r){var i,a=Y(r);try{for(a.s();!(i=a.n()).done;){var l=i.value;l.source===o&&t.removeLayer(l.id)}}catch(s){a.e(s)}finally{a.f()}}t.removeSource(o)}}}}),[t]);var i=t&&t.style&&t.getSource(o);return i?function(e,t,n){at(t.id===n.id,"source id changed"),at(t.type===n.type,"source type changed");var r="",o=0;for(var i in t)"children"===i||"id"===i||Q(n[i],t[i])||(r=i,o++);if(o){var a=t.type;if("geojson"===a)e.setData(t.data);else if("image"===a)e.updateImage({url:t.url,coordinates:t.coordinates});else if("canvas"!==a&&"video"!==a||1!==o||"coordinates"!==r)if("vector"===a&&"setUrl"in e)switch(r){case"url":e.setUrl(t.url);break;case"tiles":e.setTiles(t.tiles)}else console.warn("Unable to update <Source> prop: ".concat(r));else e.setCoordinates(t.coordinates)}}(i,e,n.current):i=function(e,t,n){if(e.style&&e.style._loaded){var r=$({},n);return delete r.id,delete r.children,e.addSource(t,r),e.getSource(t)}return null}(t,o,e),n.current=e,i&&be.exports.Children.map(e.children,(function(e){return e&&be.exports.cloneElement(e,{source:o})}))||null}var ct=0;function ut(e){var t=be.exports.useContext(q).map.getMap(),n=be.exports.useRef(e),r=K(be.exports.useState(0),2)[1],o=be.exports.useMemo((function(){return e.id||"jsx-layer-".concat(ct++)}),[]);if(be.exports.useEffect((function(){if(t){var e=function(){return r((function(e){return e+1}))};return t.on("styledata",e),e(),function(){t.off("styledata",e),t.style&&t.style._loaded&&t.getLayer(o)&&t.removeLayer(o)}}}),[t]),t&&t.style&&t.getLayer(o))try{!function(e,t,n,r){if(at(n.id===r.id,"layer id changed"),at(n.type===r.type,"layer type changed"),"custom"!==n.type&&"custom"!==r.type){var o=n.layout,i=void 0===o?{}:o,a=n.paint,l=void 0===a?{}:a,s=n.filter,c=n.minzoom,u=n.maxzoom,d=n.beforeId;if(d!==r.beforeId&&e.moveLayer(t,d),i!==r.layout){var p=r.layout||{};for(var f in i)Q(i[f],p[f])||e.setLayoutProperty(t,f,i[f]);for(var h in p)i.hasOwnProperty(h)||e.setLayoutProperty(t,h,void 0)}if(l!==r.paint){var m=r.paint||{};for(var v in l)Q(l[v],m[v])||e.setPaintProperty(t,v,l[v]);for(var g in m)l.hasOwnProperty(g)||e.setPaintProperty(t,g,void 0)}Q(s,r.filter)||e.setFilter(t,s),c===r.minzoom&&u===r.maxzoom||e.setLayerZoomRange(t,c,u)}}(t,o,e,n.current)}catch(i){console.warn(i)}else!function(e,t,n){if(e.style&&e.style._loaded&&(!("source"in n)||e.getSource(n.source))){var r=$($({},n),{},{id:t});delete r.beforeId,e.addLayer(r,n.beforeId)}}(t,o,e);return n.current=e,null}function dt(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function pt(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!ft(e[0])||!ft(e[1]))throw new Error("coordinates must contain numbers");return dt({type:"Point",coordinates:e},t,n)}function ft(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function ht(e,t,n){if(null!==e)for(var r,o,i,a,l,s,c,u,d=0,p=0,f=e.type,h="FeatureCollection"===f,m="Feature"===f,v=h?e.features.length:1,g=0;g<v;g++){l=(u=!!(c=h?e.features[g].geometry:m?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var y=0;y<l;y++){var b=0,x=0;if(null!==(a=u?c.geometries[y]:c)){s=a.coordinates;var w=a.type;switch(d=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===t(s,p,g,b,x))return!1;p++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<s.length;r++){if(!1===t(s[r],p,g,b,x))return!1;p++,"MultiPoint"===w&&b++}"LineString"===w&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<s.length;r++){for(o=0;o<s[r].length-d;o++){if(!1===t(s[r][o],p,g,b,x))return!1;p++}"MultiLineString"===w&&b++,"Polygon"===w&&x++}"Polygon"===w&&b++;break;case"MultiPolygon":for(r=0;r<s.length;r++){for(x=0,o=0;o<s[r].length;o++){for(i=0;i<s[r][o].length-d;i++){if(!1===t(s[r][o][i],p,g,b,x))return!1;p++}x++}b++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===ht(a.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function mt(e){var t=[1/0,1/0,-1/0,-1/0];return ht(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}function vt(){var e,t=Me().client,n=Se().sdkState,r=ke(n.options,250),o=rt().activeScore,i=o?Oe[o]:void 0,a=$($({},be.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:i});return nt(X.list(a),W(U().mark((function e(){return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.getPois(a));case 1:case"end":return e.stop()}}),e)}))),{enabled:!!(a&&null!==(e=a.include)&&void 0!==e&&e.length&&a.lat&&a.lng)})}function gt(){var e=Me().client,t=Se().sdkState,n=ke(t.options,250),r=rt().activeScore,o="high_schools"===r||"primary_schools"===r,i=$($({},be.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,include_catchments:!1});return nt(ee.list(i),W(U().mark((function t(){return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.getSchools(i));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!i&&!!i.lat&&!!i.lng&&o})}mt.default=mt;var yt=ye.createContext({}),bt=function(){return be.exports.useContext(yt)},xt=function(e){var t=e.children,n=e.mapRef,r=e.mapPadding;return we(yt.Provider,{value:{mapRef:n,mapPadding:r},children:t})};function wt(e,t,n,r,o,i){if(!(o-r<=n)){var a=r+o>>1;Ct(e,t,a,r,o,i%2),wt(e,t,n,r,a-1,i+1),wt(e,t,n,a+1,o,i+1)}}function Ct(e,t,n,r,o,i){for(;o>r;){if(o-r>600){var a=o-r+1,l=n-r+1,s=Math.log(a),c=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*c*(a-c)/a)*(l-a/2<0?-1:1);Ct(e,t,n,Math.max(r,Math.floor(n-l*c/a+u)),Math.min(o,Math.floor(n+(a-l)*c/a+u)),i)}var d=t[2*n+i],p=r,f=o;for(Mt(e,t,r,n),t[2*o+i]>d&&Mt(e,t,r,o);p<f;){for(Mt(e,t,p,f),p++,f--;t[2*p+i]<d;)p++;for(;t[2*f+i]>d;)f--}t[2*r+i]===d?Mt(e,t,r,f):Mt(e,t,++f,o),f<=n&&(r=f+1),n<=f&&(o=f-1)}}function Mt(e,t,n,r){St(e,n,r),St(t,2*n,2*r),St(t,2*n+1,2*r+1)}function St(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function kt(e,t,n,r){var o=e-n,i=t-r;return o*o+i*i}var Ot,Pt=function(e){return e[0]},Lt=function(e){return e[1]},It=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pt,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Lt,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:64,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Float64Array;V(this,e),this.nodeSize=o,this.points=t;for(var a=t.length<65536?Uint16Array:Uint32Array,l=this.ids=new a(t.length),s=this.coords=new i(2*t.length),c=0;c<t.length;c++)l[c]=c,s[2*c]=n(t[c]),s[2*c+1]=r(t[c]);wt(l,s,o,0,l.length-1,0)}return F(e,[{key:"range",value:function(e,t,n,r){return function(e,t,n,r,o,i,a){for(var l,s,c=[0,e.length-1,0],u=[];c.length;){var d=c.pop(),p=c.pop(),f=c.pop();if(p-f<=a)for(var h=f;h<=p;h++)l=t[2*h],s=t[2*h+1],l>=n&&l<=o&&s>=r&&s<=i&&u.push(e[h]);else{var m=Math.floor((f+p)/2);l=t[2*m],s=t[2*m+1],l>=n&&l<=o&&s>=r&&s<=i&&u.push(e[m]);var v=(d+1)%2;(0===d?n<=l:r<=s)&&(c.push(f),c.push(m-1),c.push(v)),(0===d?o>=l:i>=s)&&(c.push(m+1),c.push(p),c.push(v))}}return u}(this.ids,this.coords,e,t,n,r,this.nodeSize)}},{key:"within",value:function(e,t,n){return function(e,t,n,r,o,i){for(var a=[0,e.length-1,0],l=[],s=o*o;a.length;){var c=a.pop(),u=a.pop(),d=a.pop();if(u-d<=i)for(var p=d;p<=u;p++)kt(t[2*p],t[2*p+1],n,r)<=s&&l.push(e[p]);else{var f=Math.floor((d+u)/2),h=t[2*f],m=t[2*f+1];kt(h,m,n,r)<=s&&l.push(e[f]);var v=(c+1)%2;(0===c?n-o<=h:r-o<=m)&&(a.push(d),a.push(f-1),a.push(v)),(0===c?n+o>=h:r+o>=m)&&(a.push(f+1),a.push(u),a.push(v))}}return l}(this.ids,this.coords,e,t,n,this.nodeSize)}}]),e}(),Et={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(e){return e}},At=Math.fround||(Ot=new Float32Array(1),function(e){return Ot[0]=+e,Ot[0]}),_t=function(){function e(t){V(this,e),this.options=Gt(Object.create(Et),t),this.trees=new Array(this.options.maxZoom+1)}return F(e,[{key:"load",value:function(e){var t=this.options,n=t.log,r=t.minZoom,o=t.maxZoom,i=t.nodeSize;n&&console.time("total time");var a="prepare ".concat(e.length," points");n&&console.time(a),this.points=e;for(var l,s,c,u,d,p=[],f=0;f<e.length;f++)e[f].geometry&&p.push((l=e[f],s=f,c=void 0,u=void 0,d=void 0,c=K(l.geometry.coordinates,2),u=c[0],d=c[1],{x:At(Rt(u)),y:At(Nt(d)),zoom:1/0,index:s,parentId:-1}));this.trees[o+1]=new It(p,Zt,Dt,i,Float32Array),n&&console.timeEnd(a);for(var h=o;h>=r;h--){var m=+Date.now();p=this._cluster(p,h),this.trees[h]=new It(p,Zt,Dt,i,Float32Array),n&&console.log("z%d: %d clusters in %dms",h,p.length,+Date.now()-m)}return n&&console.timeEnd("total time"),this}},{key:"getClusters",value:function(e,t){var n=((e[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,e[1])),o=180===e[2]?180:((e[2]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,o=180;else if(n>o){var a=this.getClusters([n,r,180,i],t),l=this.getClusters([-180,r,o,i],t);return a.concat(l)}var s,c=this.trees[this._limitZoom(t)],u=[],d=Y(c.range(Rt(n),Nt(i),Rt(o),Nt(r)));try{for(d.s();!(s=d.n()).done;){var p=s.value,f=c.points[p];u.push(f.numPoints?zt(f):this.points[f.index])}}catch(h){d.e(h)}finally{d.f()}return u}},{key:"getChildren",value:function(e){var t=this._getOriginId(e),n=this._getOriginZoom(e),r="No cluster with the specified id.",o=this.trees[n];if(!o)throw new Error(r);var i=o.points[t];if(!i)throw new Error(r);var a,l=this.options.radius/(this.options.extent*Math.pow(2,n-1)),s=[],c=Y(o.within(i.x,i.y,l));try{for(c.s();!(a=c.n()).done;){var u=a.value,d=o.points[u];d.parentId===e&&s.push(d.numPoints?zt(d):this.points[d.index])}}catch(p){c.e(p)}finally{c.f()}if(0===s.length)throw new Error(r);return s}},{key:"getLeaves",value:function(e,t,n){t=t||10,n=n||0;var r=[];return this._appendLeaves(r,e,t,n,0),r}},{key:"getTile",value:function(e,t,n){var r=this.trees[this._limitZoom(e)],o=Math.pow(2,e),i=this.options,a=i.extent,l=i.radius/a,s=(n-l)/o,c=(n+1+l)/o,u={features:[]};return this._addTileFeatures(r.range((t-l)/o,s,(t+1+l)/o,c),r.points,t,n,o,u),0===t&&this._addTileFeatures(r.range(1-l/o,s,1,c),r.points,o,n,o,u),t===o-1&&this._addTileFeatures(r.range(0,s,l/o,c),r.points,-1,n,o,u),u.features.length?u:null}},{key:"getClusterExpansionZoom",value:function(e){for(var t=this._getOriginZoom(e)-1;t<=this.options.maxZoom;){var n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t}},{key:"_appendLeaves",value:function(e,t,n,r,o){var i,a=Y(this.getChildren(t));try{for(a.s();!(i=a.n()).done;){var l=i.value,s=l.properties;if(s&&s.cluster?o+s.point_count<=r?o+=s.point_count:o=this._appendLeaves(e,s.cluster_id,n,r,o):o<r?o++:e.push(l),e.length===n)break}}catch(c){a.e(c)}finally{a.f()}return o}},{key:"_addTileFeatures",value:function(e,t,n,r,o,i){var a,l=Y(e);try{for(l.s();!(a=l.n()).done;){var s=t[a.value],c=s.numPoints,u=void 0,d=void 0,p=void 0;if(c)u=Tt(s),d=s.x,p=s.y;else{var f=this.points[s.index];u=f.properties,d=Rt(f.geometry.coordinates[0]),p=Nt(f.geometry.coordinates[1])}var h={type:1,geometry:[[Math.round(this.options.extent*(d*o-n)),Math.round(this.options.extent*(p*o-r))]],tags:u},m=void 0;c?m=s.id:this.options.generateId?m=s.index:this.points[s.index].id&&(m=this.points[s.index].id),void 0!==m&&(h.id=m),i.features.push(h)}}catch(v){l.e(v)}finally{l.f()}}},{key:"_limitZoom",value:function(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}},{key:"_cluster",value:function(e,t){for(var n=[],r=this.options,o=r.radius,i=r.extent,a=r.reduce,l=r.minPoints,s=o/(i*Math.pow(2,t)),c=0;c<e.length;c++){var u=e[c];if(!(u.zoom<=t)){u.zoom=t;var d,p=this.trees[t+1],f=p.within(u.x,u.y,s),h=u.numPoints||1,m=h,v=Y(f);try{for(v.s();!(d=v.n()).done;){var g=d.value,y=p.points[g];y.zoom>t&&(m+=y.numPoints||1)}}catch(_){v.e(_)}finally{v.f()}if(m>h&&m>=l){var b,x=u.x*h,w=u.y*h,C=a&&h>1?this._map(u,!0):null,M=(c<<5)+(t+1)+this.points.length,S=Y(f);try{for(S.s();!(b=S.n()).done;){var k=b.value,O=p.points[k];if(!(O.zoom<=t)){O.zoom=t;var P=O.numPoints||1;x+=O.x*P,w+=O.y*P,O.parentId=M,a&&(C||(C=this._map(u,!0)),a(C,this._map(O)))}}}catch(_){S.e(_)}finally{S.f()}u.parentId=M,n.push(jt(x/m,w/m,M,m,C))}else if(n.push(u),m>1){var L,I=Y(f);try{for(I.s();!(L=I.n()).done;){var E=L.value,A=p.points[E];A.zoom<=t||(A.zoom=t,n.push(A))}}catch(_){I.e(_)}finally{I.f()}}}}return n}},{key:"_getOriginId",value:function(e){return e-this.points.length>>5}},{key:"_getOriginZoom",value:function(e){return(e-this.points.length)%32}},{key:"_map",value:function(e,t){if(e.numPoints)return t?Gt({},e.properties):e.properties;var n=this.points[e.index].properties,r=this.options.map(n);return t&&r===n?Gt({},r):r}}]),e}();function jt(e,t,n,r,o){return{x:At(e),y:At(t),zoom:1/0,id:n,parentId:-1,numPoints:r,properties:o}}function zt(e){return{type:"Feature",id:e.id,properties:Tt(e),geometry:{type:"Point",coordinates:[(r=e.x,360*(r-.5)),(t=e.y,n=(180-360*t)*Math.PI/180,360*Math.atan(Math.exp(n))/Math.PI-90)]}};var t,n,r}function Tt(e){var t=e.numPoints,n=t>=1e4?"".concat(Math.round(t/1e3),"k"):t>=1e3?"".concat(Math.round(t/100)/10,"k"):t;return Gt(Gt({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:n})}function Rt(e){return e/360+.5}function Nt(e){var t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function Gt(e,t){for(var n in t)e[n]=t[n];return e}function Zt(e){return e.x}function Dt(e){return e.y}var Vt=Object.prototype.hasOwnProperty;function Ht(e,t,n){var r,o=Y(e.keys());try{for(o.s();!(r=o.n()).done;)if(Ft(n=r.value,t))return n}catch(i){o.e(i)}finally{o.f()}}function Ft(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Ft(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;var i,a=Y(e);try{for(a.s();!(i=a.n()).done;){if((o=r=i.value)&&"object"===D(o)&&!(o=Ht(t,o)))return!1;if(!t.has(o))return!1}}catch(c){a.e(c)}finally{a.f()}return!0}if(n===Map){if(e.size!==t.size)return!1;var l,s=Y(e);try{for(s.s();!(l=s.n()).done;){if((o=(r=l.value)[0])&&"object"===D(o)&&!(o=Ht(t,o)))return!1;if(!Ft(r[1],t.get(o)))return!1}}catch(c){s.e(c)}finally{s.f()}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"===D(e)){for(n in r=0,e){if(Vt.call(e,n)&&++r&&!Vt.call(t,n))return!1;if(!(n in t)||!Ft(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}function Ut(e,t){return be.exports.useEffect(e,(n=t,r=be.exports.useRef(n),o=be.exports.useRef(0),Ft(n,r.current)||(r.current=n,o.current+=1),be.exports.useMemo((function(){return r.current}),[o.current])));var n,r,o}var Bt=Pe(Le.div)(e||(e=Z(["\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"])),Ie["--ll-color-primary-variant1"],Ie["--ll-color-primary"],Ie["--ll-color-on-primary"],(function(e){return e.diameter}),(function(e){return e.diameter}),Ie["--ll-font-family"],(function(e){return e.diameter/2.5}),Ie["--ll-shadow-small"]),Wt=Pe.ul(t||(t=Z(["\n list-style: none;\n padding: 0;\n margin: 0;\n"]))),Yt=Pe.li(n||(n=Z(["\n font-family: ",";\n padding: ",";\n background-color: ",";\n border-radius: ",";\n border: 1px solid ",";\n cursor: default;\n\n &:not(:last-child) {\n margin-bottom: ",";\n }\n\n &:hover {\n background-color: ",";\n }\n"])),Ie["--ll-font-family"],Ie["--ll-spacing-x-small"],Ie["--ll-color-background"],Ie["--ll-border-radius-small"],Ie["--ll-color-border"],Ie["--ll-spacing-xx-small"],Ie["--ll-color-surface"]),Kt={all:function(){return["commute-calculator"]},list:function(e){return[].concat(G(Kt.all()),[e])}};function qt(e){var t=e.transportMode,n=e.origin,r=e.destination,o=e.isOpen,i={return:"polyline,summary,typicalDuration",transportMode:t,origin:n,destination:"".concat(null==r?void 0:r.lat,",").concat(null==r?void 0:r.lng),apiKey:"KDL0aAzsbOcv7p53P2ovno2izfDOe93hyzZRrayktbE"};return nt(Kt.list(i),(function(){return fetch("https://router.hereapi.com/v8/routes?"+new URLSearchParams(i)).then((function(e){return e.json()})).then((function(e){return e.routes.length>0&&e.routes[0].sections.length>0?e.routes[0].sections[0]:[]})).catch((function(e){Ee.captureException(e)}))}),{enabled:!!i&&!!r&&!!n&&o})}var Qt=function(e){var t,n,r,o,i=e.poi,a=e.poiType,l=e.rect,s=e.activePOI,c=e.hoveredPOI,u=e.isMapMoving,d=e.setActivePOI,p=e.isMobile,f=K(be.exports.useState(!1),2),h=f[0],m=f[1],v=c===i,g=Ae().translations,y=Se().sdkState,b=rt(),x=b.setCommuteGeojson,w=b.setDestination,C=b.setShowCommuteCalculator,M=b.setSchoolCatchment,S=qt({destination:{lat:i.lat,lng:i.lng},transportMode:"pedestrian",origin:"".concat(null==y||null===(t=y.options)||void 0===t||null===(n=t.marker)||void 0===n?void 0:n.lat,",").concat(null==y||null===(r=y.options)||void 0===r||null===(o=r.marker)||void 0===o?void 0:o.lng),isOpen:h}).data;be.exports.useEffect((function(){if(m(s===i),s===i){var e="high_schools"===a||"primary_schools"===a?"school":"poi";_e.poi.isSchool(i,e)&&null!=i&&i.catchments&&Object.keys((null==i?void 0:i.catchments)||[]).length>0&&M(je.formatGeometry.formatGeometry(i.catchments[0].geometry))}}),[s,i]);var k=be.exports.useMemo((function(){if(null==S||!S.summary||!h)return null;var e=Math.floor(S.summary.typicalDuration/60/60),t=Math.floor(S.summary.typicalDuration/60%60);return 0===e?"".concat(t," ").concat(ze.pluralize(g.MINUTE,t)):"".concat(e," ").concat(ze.pluralize(g.HOUR,e)," ").concat(t," ").concat(ze.pluralize(g.MINUTE,t))}),[S,h]);return we(te,{latitude:i.lat,longitude:i.lng,style:{zIndex:h?1:0},children:Te(Re.Root,{options:{type:a,poi:i,isOpen:!u&&h,isHovered:v,side:"top",size:["rapid_transit_stations"].includes(a)?"medium":"small",collisionPadding:p?{top:l.height+32,bottom:2*Ne,left:2*Ne,right:2*Ne}:{left:l.width+32,right:2*Ne,top:2*Ne,bottom:2*Ne},walkingTime:k,calculateRoute:function(){null!=S&&S.summary&&h&&(w({label:i.name,lat:i.lat,lng:i.lng}),x(je.polyline.decode(S.polyline)),C(!0),m(!1))}},onChange:function(e){"open-change"===e.type&&(e.data?setTimeout((function(){d(i)}),0):h&&(d(void 0),M()))},children:[we(Re.Marker,{}),we(Re.Content,{})]})})},Xt={default:{scale:1},hovered:{scale:1.2}},$t=function(e){var t=e.cluster,n=e.supercluster,r=e.pointsCount,o=e.onClick,i=e.zoom,a=e.activePOI,l=e.hoveredPOI,s=e.setActivePOI,c=e.rect,u=e.isMobile,d=e.isMapMoving,p=K(be.exports.useState(!1),2),f=p[0],h=p[1],m=20+t.properties.point_count/r*25,v=be.exports.useMemo((function(){return null==n?void 0:n.getChildren(t.id).map((function(e){return e.properties})).filter((function(e){return!!e}))}),[n,t]),g=null==v?void 0:v.find((function(e){return!!a&&e.poi===a}));return g?we(Qt,{rect:c,poi:g.poi,poiType:g.type,isMobile:u,activePOI:a,hoveredPOI:l,isMapMoving:d,setActivePOI:s}):Te(Ge.Root,{open:!d&&f,onOpenChange:function(e){i<=17||h(e)},children:[we(Ge.Trigger,{children:we(Bt,{diameter:m,onClick:function(){i>17?h(!0):o&&o(t)},variants:Xt,animate:f?"hovered":"default",whileHover:{scale:1.2},transition:xe.transitions.default,children:t.properties.point_count})}),we(Ge.Content,{side:"top",children:we(Wt,{children:null==v?void 0:v.map((function(e,t){var n;return we(Yt,{onClick:function(){return s(e.poi)},children:null===(n=e.poi)||void 0===n?void 0:n.name},t)}))})})]})};var Jt=ye.memo((function(e){var t,n=e.rect,r=e.zoom,o=e.mapRef,i=e.points,a=e.isMobile,l=e.activePOI,s=e.hoveredPOI,c=e.isMapMoving,u=e.setActivePOI,d=null==o||null===(t=o.current)||void 0===t?void 0:t.getMap().getBounds().toArray().flat(),p=function(e){var t=e.points,n=e.bounds,r=e.zoom,o=e.options,i=be.exports.useRef(),a=be.exports.useRef(),l=be.exports.useState([]),s=l[0],c=l[1],u=Math.round(r);return Ut((function(){i.current&&Ft(a.current,t)&&Ft(i.current.options,o)||(i.current=new _t(o),i.current.load(t)),n&&c(i.current.getClusters(n,u)),a.current=t}),[t,n,u,o]),{clusters:s,supercluster:i.current}}({points:i,bounds:d,zoom:r,options:{radius:50,maxZoom:30}}),f=p.clusters,h=p.supercluster;return we(Ze,{children:f.map((function(e,t){var d=K(e.geometry.coordinates,2),p=d[0],f=d[1];return function(e){return void 0!==e.properties.cluster}(e)?we(te,{latitude:f,longitude:p,children:we($t,{rect:n,zoom:r,cluster:e,supercluster:h,pointsCount:i.length,activePOI:l,setActivePOI:u,isMobile:a,isMapMoving:c,hoveredPOI:s,onClick:function(){var t,n=Math.min(h.getClusterExpansionZoom(e.id),20);null===(t=o.current)||void 0===t||t.flyTo({zoom:n,center:[p,f],duration:1e3,essential:!0})}})},"cluster-".concat(e.id)):we(Qt,{rect:n,poi:e.properties.poi,poiType:e.properties.type,isMobile:a,activePOI:l,hoveredPOI:s,isMapMoving:c,setActivePOI:u},t)}))})}));Jt.displayName="Markers";var en=function(e){return be.exports.createElement("svg",$({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),be.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"}))},tn=function(e){return be.exports.createElement("svg",$({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),be.exports.createElement("path",{d:"M10 20V14H14V20H19V12H22L12 3L2 12H5V20H10Z"}))};function nn(e){var t=Me().client,n=Se().sdkState,r=ke(n.options,250),o=$($({},be.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:e});return nt(ne.list(o),W(U().mark((function e(){return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.getScores(o));case 1:case"end":return e.stop()}}),e)}))),{enabled:!!o})}var rn=Pe.div(r||(r=Z(["\n padding: "," ",";\n background-color: ",";\n display: flex;\n flex-direction: column;\n overflow: hidden;\n flex: 1;\n"])),Ie["--ll-spacing-small"],Ie["--ll-spacing-medium"],Ie["--ll-color-surface"]),on=Pe.div(o||(o=Z(["\n display: grid;\n grid-template-columns: min-content 1fr;\n grid-gap: ",";\n margin-bottom: ",";\n"])),Ie["--ll-spacing-medium"],Ie["--ll-spacing-medium"]),an=function(){var e,t,n=Se().sdkState,r=rt(),o=r.activeCategory,i=r.activeScore,a=nn(Ce.find((function(e){return e.value===o})).scores),l=a.data,s=a.isLoading;return i&&null!=l&&l.location[i]?s?we("div",{children:"Loading"}):we(De.Root,{options:{score:i,scoresData:l},children:Te(rn,{children:[Te(on,{children:[we(De.Badge,{}),we(De.BarChart,{options:{renderNeighbourhoodAvg:!1,locationIcon:"pin"===(null===(e=n.options)||void 0===e||null===(t=e.marker)||void 0===t?void 0:t.icon)?en:tn}})]}),we(De.Description,{})]})}):null},ln=Pe.div(i||(i=Z(["\n display: flex;\n overflow-x: scroll;\n padding: "," ",";\n flex-shrink: 0;\n position: relative;\n"])),Ie["--ll-spacing-x-small"],Ie["--ll-spacing-medium"]),sn=Pe.button(a||(a=Z(["\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"]))),cn=Pe.div(l||(l=Z(["\n position: absolute;\n top: -6px;\n right: 4px;\n border: 2px solid ",";\n border-radius: 6px;\n"])),Ie["--ll-color-background"]),un=Pe.div(s||(s=Z(["\n flex: 1;\n display: flex;\n align-items: center;\n"]))),dn=Pe.div(c||(c=Z(["\n margin: 0 2px;\n"]))),pn=function(e){var t=e.category,n=nn(t.scores),r=n.data,o=n.isLoading,i=n.isFetching,a=rt(),l=a.activeScore,s=a.setActiveScore,c=a.setActiveCategory;return we(ln,{children:t.scores.map((function(e){var n=e===l,a=n?"--ll-color-primary":"--ll-color-disabled";return o||i?we(dn,{children:we(Ve,{height:"44px",width:"60px"})},e):we(De.Root,{options:{score:e,scoresData:r},children:Te(sn,{onClick:function(){c(t.value),s(e)},children:[we(De.Icon,{options:{color:a,height:28,width:28}}),we(un,{children:we(De.Title,{options:{variant:"caption1",color:a,lineClamp:1,noMargin:!0,weight:"--ll-font-weight-bold"}})}),we(cn,{children:we(De.Badge,{options:{variant:"small",isPrimary:n}})})]})},e)}))})},fn=Pe.div(u||(u=Z(["\n display: flex;\n padding: "," ","\n "," ",";\n"])),Ie["--ll-spacing-x-small"],Ie["--ll-spacing-medium"],Ie["--ll-spacing-xx-small"],Ie["--ll-spacing-medium"]),hn=Pe.div(d||(d=Z(["\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"])),Ie["--ll-color-background"],Ie["--ll-color-border"]),mn=ye.forwardRef((function(e,t){var n=rt(),r=n.activeCategory,o=n.setActiveCategory;return Te(hn,{ref:t,children:[we(fn,{children:Te(He.Root,{value:r,onValueChange:function(e){return o(e)},children:[we(He.Trigger,{size:"large",children:we(Fe.Root,{options:{scoreCategory:r},children:we(Fe.Title,{options:{color:"inherit",noMargin:!0,variant:"h6",lineHeight:1}})},r)}),we(He.Content,{children:Ce.map((function(e){return we(Fe.Root,{options:{scoreCategory:e.value},children:we(He.Item,{value:e.value,children:we(Fe.Title,{options:{color:"inherit",noMargin:!0,variant:"h6"}})})},e.value)}))})]})}),we(pn,{category:Ce.find((function(e){return e.value===r}))}),we(an,{})]})}));mn.displayName="MobileScores";var vn=Ue({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),gn=Ue({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),yn=Pe(re)(p||(p=Z(["\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"])),Ie["--ll-spacing-medium"],Ie["--ll-spacing-medium"],Ie["--ll-color-surface"],Ie["--ll-shadow-small"]),bn=Pe(oe)(f||(f=Z(["\n background: none;\n border: none;\n display: flex;\n align-items: center;\n width: 100%;\n padding: "," 0;\n"])),Ie["--ll-spacing-x-small"]),xn=Pe(ie)(h||(h=Z(["\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 /* TODO: Re-implement this once StyledComponents is fixed. https://locallogic.atlassian.net/browse/LL22-1107 */\n /* animation: ',' 300ms cubic-bezier(0.87, 0, 0.13, 1); */\n visibility: visible;\n }\n\n [data-state="closed"] & {\n /* TODO: Re-implement this once StyledComponents is fixed. https://locallogic.atlassian.net/browse/LL22-1107 */\n /* animation: '," 300ms cubic-bezier(0.87, 0, 0.13, 1); */\n visibility: hidden;\n }\n"])),Ie["--ll-color-surface"],Ie["--ll-spacing-medium"],Ie["--ll-spacing-medium"],vn,gn),wn=Pe.div(m||(m=Z(["\n padding: ",";\n border-top: 1px solid ",";\n border-bottom: 1px solid ",";\n"])),Ie["--ll-spacing-medium"],Ie["--ll-color-border"],Ie["--ll-color-border"]),Cn=Pe.span(v||(v=Z(["\n ","[data-state=open] & {\n transform: rotate(90deg);\n } ;\n"])),bn);Pe.div(g||(g=Z(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n"])));var Mn=Pe.div(y||(y=Z(["\n margin: "," 0;\n"])),Ie["--ll-spacing-small"]),Sn=Pe.div(b||(b=Z(["\n margin-top: ",";\n &:empty {\n margin: 0;\n }\n"])),Ie["--ll-spacing-large"]),kn=function(e){var t=e.score,n=gt(),r=n.data,o=n.isLoading,i=rt(),a=i.activePOI,l=i.setActivePOI,s=i.hoveredPOI,c=i.setHoveredPOI,u=bt(),d=u.mapRef,p=u.mapPadding;return o?we(Ze,{children:G(Array(10)).map((function(e,t){return we(Mn,{children:we(Ve,{height:"34px",width:"100%"})},t)}))}):r?we(Be.Root,{options:{type:"school",data:null==r?void 0:r[t],activePOI:a,hoveredPOI:s},onChange:function(e){if("poi-click"===e.type){var t=e.data;l(t);var n,r=window.innerWidth-p.left,o=window.innerWidth/2,i=r/2+p.left-o;if(t)null===(n=d.current)||void 0===n||n.easeTo({zoom:18,center:[t.lng,t.lat],duration:1e3,offset:[i,0]})}"poi-hover"===e.type&&c(e.data)}}):null},On=ye.memo((function(e){var t=e.result,n=e.poi,r=rt(),o=r.activePOI,i=r.setActivePOI,a=r.hoveredPOI,l=r.setHoveredPOI,s=bt(),c=s.mapRef,u=s.mapPadding;return t.data&&t.data[n]?we(We.Content,{options:{value:n},children:we(Be.Root,{options:{type:"poi",data:t.data[n],activePOI:o,hoveredPOI:a},onChange:function(e){if("poi-click"===e.type){var t=e.data;i(t);var n,r=window.innerWidth-u.left,o=window.innerWidth/2,a=r/2+u.left-o;if(t)null===(n=c.current)||void 0===n||n.flyTo({zoom:18,center:[t.lng,t.lat],duration:1e3,offset:[a,0],essential:!0})}"poi-hover"===e.type&&l(e.data)}})},n):null}));On.displayName="POI";var Pn=ye.memo((function(e){var t=e.include,n=vt(),r=null==t?void 0:t.filter((function(e){var t;return((null==n||null===(t=n.data)||void 0===t?void 0:t[e])||[]).length>0}));return n.isLoading&&r.length?we(Ze,{children:G(Array(10)).map((function(e,t){return we(Mn,{children:we(Ve,{height:"34px",width:"100%"})},t)}))}):n.data?Te(We.Root,{options:{include:r},children:[we(We.Tabs,{}),r.map((function(e){return we(On,{poi:e,result:n},e)}))]}):null}));Pn.displayName="POIs";var Ln=ye.memo((function(e){var t,n,r=e.score,o=e.isLoading,i=e.scoresData,a=Se().sdkState,l=r===rt().activeScore;return o?we(Mn,{children:we(Ve,{height:"34px",width:"100%"},r)}):null!=i&&i.location[r]?we(ae,{value:r,children:Te(De.Root,{options:{score:r,scoresData:i},children:[we(yn,{children:Te(bn,{children:[we(Cn,{children:we(Ye,{SVGElement:le,fill:Ie["--ll-color-on-background-variant1"]})}),we(Ke,{spacing:"--ll-spacing-small"}),we(De.Icon,{}),we(Ke,{spacing:"--ll-spacing-small"}),we(De.Title,{}),we(Ke,{}),we(De.Badge,{options:{isPrimary:l}})]})}),we(xn,{children:Te(wn,{children:[we(De.Description,{}),we(Ke,{vertical:!0,spacing:"--ll-spacing-small"}),we(De.BarChart,{options:{renderNeighbourhoodAvg:!1,locationIcon:"pin"===(null===(t=a.options)||void 0===t||null===(n=t.marker)||void 0===n?void 0:n.icon)?en:tn}}),we(Sn,{children:"high_schools"===r||"primary_schools"===r?we(kn,{score:r}):we(Pn,{include:Oe[r]})})]})})]})},r):null}));Ln.displayName="Score";var In=Pe.div(x||(x=Z(["\n padding: "," ",";\n"])),Ie["--ll-spacing-small"],Ie["--ll-spacing-medium"]),En=Pe.div(w||(w=Z(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"]))),An=ye.memo((function(e){var t=e.tabContent,n=nn(t.scores),r=n.data,o=n.isLoading,i=n.isFetching,a=Ae().translations;return Te(In,{children:[Te(En,{children:[we(qe.Title,{options:{variant:"h4",noMargin:!0,weight:"--ll-font-weight-medium"}}),i&&!o&&we(Qe,{size:"small"})]}),we(Ke,{spacing:"--ll-spacing-small",vertical:!0}),!i&&!Object.keys((null==r?void 0:r.location)||{}).length&&we(Xe,{color:"--ll-color-on-background-variant1",children:a.EMPTY_TEXT}),t.scores.map((function(e){return we(Ln,{score:e,isLoading:o,scoresData:r},e)}))]})}));An.displayName="ScoreCategory";var _n=ye.memo((function(e){var t=e.tabContent,n=rt(),r=n.activeScore,o=n.setActiveScore;return be.exports.useEffect((function(){o(t.scores[0])}),[]),we(se,{value:r,onValueChange:function(e){o(e)},type:"single",collapsible:!0,children:we(An,{tabContent:t})})}));_n.displayName="ScoreCategoryAccordion";var jn=Pe.div(C||(C=Z(["\n overflow-y: auto;\n"]))),zn=Pe.div(M||(M=Z(["\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"])),Ie["--ll-spacing-medium"],Ie["--ll-spacing-medium"],Ie["--ll-spacing-medium"],Ie["--ll-border-radius-medium"],Ie["--ll-color-background"],Ie["--ll-color-border"]);Pe.div(S||(S=Z(["\n display: flex;\n justify-content: center;\n padding: ",";\n"])),Ie["--ll-spacing-small"]);var Tn=Pe.div(k||(k=Z(["\n padding: ",";\n border-bottom: 1px solid ",";\n"])),Ie["--ll-spacing-xx-small"],Ie["--ll-color-border"]),Rn=Pe.div(O||(O=Z(["\n display: flex;\n justify-content: center;\n padding: ",";\n background-color: ",";\n"])),Ie["--ll-spacing-small"],Ie["--ll-color-background"]),Nn=function(){return we(Rn,{children:we($e.Root,{})})},Gn=ye.forwardRef((function(e,t){var n=rt(),r=n.activeCategory,o=n.setActiveCategory;return we(qe.Root,{options:{currentTab:r},onChange:function(e){o(e.data)},children:Te(zn,{ref:t,children:[we(Tn,{children:we(qe.Tabs,{})}),we(jn,{children:Ce.map((function(e){return we(qe.Content,{options:{value:e.value},children:we(_n,{tabContent:e},e.value)},e.value)}))}),we(Nn,{})]})})}));Gn.displayName="DesktopScores";var Zn=Pe.div(P||(P=Z(["\n position: relative;\n display: flex;\n flex-direction: column;\n height: 100vh;\n"]))),Dn=function(e){return be.exports.createElement("svg",$({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),be.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"}))},Vn=function(e){return be.exports.createElement("svg",$({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),be.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"}))},Hn=function(e){return be.exports.createElement("svg",$({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),be.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"}),be.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"}),be.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"}))},Fn=function(e){return be.exports.createElement("svg",$({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),be.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"}))},Un=Pe.div(L||(L=Z(["\n max-height: calc(100% - 2 * ",");\n border-radius: ",";\n box-shadow: ",";\n background-color: ",";\n border: 1px solid ",";\n padding: ",";\n"])),Ie["--ll-spacing-medium"],Ie["--ll-border-radius-medium"],Ie["--ll-shadow-small"],Ie["--ll-color-background"],Ie["--ll-color-border"],Ie["--ll-spacing-x-small"]),Bn=Pe.div(I||(I=Z(["\n display: flex;\n justify-content: space-between;\n align-items: end;\n\n "," {\n // Adjust if text of commute transport mode changes\n width: 52%;\n margin-right: ",";\n }\n"])),ce,Ie["--ll-spacing-x-small"]),Wn=Pe.div(E||(E=Z(["\n background-color: ",";\n padding: "," "," 0;\n border-radius: ",";\n"])),Ie["--ll-color-surface"],Ie["--ll-spacing-x-small"],Ie["--ll-spacing-small"],Ie["--ll-border-radius-medium"]),Yn=Pe(Je)(A||(A=Z(["\n position: absolute;\n right: ",";\n top: ",";\n"])),Ie["--ll-spacing-xx-small"],Ie["--ll-spacing-xx-small"]),Kn=function(e){var t,n,r,o,i=e.className,a=e.onClose,l=Se().sdkState,s=rt(),c=s.setCommuteGeojson,u=s.destination,d=s.setDestination,p=K(be.exports.useState("pedestrian"),2),f=p[0],h=p[1],m=tt(),v=Ae().translations,g=qt({destination:u,transportMode:f,origin:"".concat(null==l||null===(t=l.options)||void 0===t||null===(n=t.marker)||void 0===n?void 0:n.lat,",").concat(null==l||null===(r=l.options)||void 0===r||null===(o=r.marker)||void 0===o?void 0:o.lng),isOpen:!0}),y=g.data,b=g.isFetching,x=g.isFetched;be.exports.useEffect((function(){null!=y&&y.summary&&c(je.polyline.decode(y.polyline))}),[y]);var w={pedestrian:[v.WALKING,Vn],car:[v.DRIVING,Hn]},C=be.exports.useMemo((function(){if(null==y||!y.summary)return null;var e=Math.floor(y.summary.typicalDuration/60/60),t=Math.floor(y.summary.typicalDuration/60%60);return 0===e?"".concat(t," ").concat(ze.pluralize(v.MINUTE,t)):"".concat(e," ").concat(ze.pluralize(v.HOUR,e)," ").concat(t," ").concat(ze.pluralize(v.MINUTE,t))}),[y]),M=be.exports.useMemo((function(){if(null==y||!y.summary)return null;var e=Math.floor(y.summary.length/1e3);return 0===e?"".concat(y.summary.length," m"):"".concat(e," km")}),[y]);return Te(Un,{className:i,children:[we(Yn,{size:"medium",color:"neutral",onClick:a,SVGElement:Fn}),Te(Bn,{children:[we(ue,{label:v.CALCULATE_COMMUTE,placeholder:(null==u?void 0:u.label)||v.SEARCH_MAP,renderListAbove:m,renderListAbovePosition:30,onSearch:function(e){d({lat:e.latitude,lng:e.longitude})}}),we(He.Root,{value:f,onValueChange:function(e){h(e)},children:Te(He.Trigger,{children:[we(Ye,{SVGElement:w[f][1],fill:Ie["--ll-color-on-background-variant1"],width:16}),w[f][0],Te(He.Content,{children:[we(He.Item,{value:"car",children:v.DRIVING}),we(He.Item,{value:"pedestrian",children:v.WALKING})]})]})})]}),(x||b)&&Te(Ze,{children:[we(Ke,{vertical:!0,spacing:"--ll-spacing-x-small"}),we(de,{open:!!y,children:b?we(Ve,{height:"70.4px",width:"100%"}):null!=y&&y.summary?Te(Wn,{children:[we(Xe,{variant:"h5",children:C}),Te(Xe,{children:[M," – ",v.FAST_ROUTE]})]}):Te(Wn,{children:[we(Xe,{variant:"h5",children:v.NO_ROUTE}),we(Xe,{children:v.TRY_SUGGESTION})]})})]})]})},qn=Pe.div(_||(_=Z(["\n position: absolute;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 3;\n"]))),Qn=Pe.div(j||(j=Z(["\n position: absolute;\n top: ",";\n right: ",";\n z-index: 3;\n max-width: 356px;\n"])),Ie["--ll-spacing-medium"],Ie["--ll-spacing-medium"]),Xn=Pe(Je)(z||(z=Z(["\n box-shadow: ",";\n position: absolute;\n bottom: ",";\n right: ",";\n"])),Ie["--ll-shadow-medium"],Ie["--ll-spacing-medium"],Ie["--ll-spacing-medium"]),$n=Pe(Kn)(T||(T=Z([""]))),Jn=Pe(Kn)(R||(R=Z(["\n border-radius: ","\n "," 0 0;\n border: 0;\n"])),Ie["--ll-border-radius-small"],Ie["--ll-border-radius-small"]),er=Pe(et)(N||(N=Z(["\n box-shadow: ",";\n"])),Ie["--ll-shadow-small"]),tr=function(){var e=rt(),t=e.setCommuteGeojson,n=e.setDestination,r=e.showCommuteCalculator,o=e.setShowCommuteCalculator,i=Ae().translations,a=function(){n(void 0),t(void 0),o(!1)},l=function(){o(!0)};return tt()?we(Ze,{children:r?we(qn,{children:we(Jn,{onClose:a})}):we(Xn,{size:"large",SVGElement:Dn,onClick:l})}):we(Qn,{children:r?we($n,{onClose:a}):we(er,{onClick:l,startAdornment:we(Dn,{}),children:i.CALCULATE_COMMUTE})})},nr=function(){var e,t,n,r=Se(),o=r.sdkState,i=r.setSdkState,a=rt(),l=a.activeScore,s=a.activePOI,c=a.setActivePOI,u=a.hoveredPOI,d=a.commuteGeojson,p=a.destination,f=a.schoolCatchment,h=tt(),m=vt(),v=gt(),g="night"===(null==o||null===(e=o.globalOptions)||void 0===e||null===(t=e.appearance)||void 0===t?void 0:t.theme)?"dd191599-2a92-49fc-9a33-e12391753ad5":"600d69cb-288d-445e-9839-3dfe4d76b31a",y={id:"point",type:"line",paint:{"line-width":6,"line-color":getComputedStyle(document.documentElement).getPropertyValue("--ll-color-link")}},b={id:"school",type:"line",source:"schoolCatchment",paint:{"line-width":3,"line-color":getComputedStyle(document.documentElement).getPropertyValue("--ll-color-on-background")}},x=K(be.exports.useState(!1),2),w=x[0],C=x[1],M=be.exports.useMemo((function(){var e,t;return"high_schools"!==l&&"primary_schools"!==l||v.isFetching?Oe&&l&&Oe[l]&&null!==(e=Oe[l])&&void 0!==e&&e.length||m.isFetching?m.data:J({},l,[]):J({},l,(null==v||null===(t=v.data)||void 0===t?void 0:t[l])||[])}),[m.data,v.data,l]),S=be.exports.useMemo((function(){return M?Object.entries(M).map((function(e){var t=K(e,2),n=t[0];return t[1].map((function(e){return pt([e.lng,e.lat],{poi:e,type:n})}))})).flat().filter((function(e,t,n){return n.findIndex((function(t){return["lat","lng","name"].every((function(n){return t.properties.poi[n]===e.properties.poi[n]}))}))===t})):[]}),[M]),k=be.exports.useMemo((function(){var e,t,n,r=(null==o||null===(e=o.options)||void 0===e?void 0:e.marker)&&pt([null==o||null===(t=o.options)||void 0===t?void 0:t.marker.lng,null==o||null===(n=o.options)||void 0===n?void 0:n.marker.lat]);return[].concat(G(S),G(r?[r]:[]),G(p?[pt([null==p?void 0:p.lng,null==p?void 0:p.lat])]:[]))}),[S,null==o||null===(n=o.options)||void 0===n?void 0:n.marker,p]),O=be.exports.useRef(),P=K(pe(),2),L=P[0],I=P[1],E=be.exports.useMemo((function(){return{top:25+I.height,bottom:25,left:25,right:25}}),[I.height]),A=be.exports.useMemo((function(){return{top:50,bottom:50,left:I.width+32+50,right:50}}),[I.width]),_=h?E:A;return be.exports.useEffect((function(){var e,t;if(k.length&&null!==(e=o.options)&&void 0!==e&&e.marker){var n,r,i,a=K(mt((n=k.map((function(e){var t=e.geometry;return[t.coordinates[1],t.coordinates[0]]})),void 0===i&&(i={}),dt({type:"MultiPoint",coordinates:n},r,i))),4),l=a[0],s=a[1],c=a[2],u=a[3];null==O||null===(t=O.current)||void 0===t||t.fitBounds([[s,l],[u,c]],{maxZoom:17,padding:_,duration:1e3})}}),[k,_,f]),o.options?we(xt,{mapRef:O,mapPadding:_,children:Te(Zn,{children:[Te(fe,{ref:O,mapLib:he,latitude:o.options.lat,longitude:o.options.lng,zoom:o.options.zoom,pitch:o.options.pitch,bearing:o.options.bearing,style:{flex:1,width:"100vw"},mapStyle:"https://api.maptiler.com/maps/".concat(g,"/style.json?key=","9jNGatuzs05Q1oNlctEs"),onMove:function(e){i($($({},o),{},{options:$($({},o.options),{},{lat:e.viewState.latitude,lng:e.viewState.longitude,zoom:e.viewState.zoom,bearing:e.viewState.bearing,pitch:e.viewState.pitch})}))},cooperativeGestures:o.options.cooperativeGestures,onMoveStart:function(){return C(!0)},onMoveEnd:function(){return C(!1)},attributionControl:!1,children:[we(me,{compact:!0,position:h?"bottom-left":"bottom-right"}),we(ve,{position:h?"top-right":"bottom-right",showCompass:!0,style:{marginTop:h?16+I.height:16,marginRight:16}}),o.options.marker&&we(ge,{marker:o.options.marker}),we(Jt,{rect:I,zoom:o.options.zoom,mapRef:O,points:S,isMobile:h,activePOI:s,hoveredPOI:u,isMapMoving:w,setActivePOI:c}),we(h?mn:Gn,{ref:L}),we(tr,{}),p&&we(ge,{marker:$({icon:"pin"},p)}),d&&we(st,{type:"geojson",data:d,children:we(ut,$({},y))}),f&&we(st,{type:"geojson",data:f,children:we(ut,$({},b))})]}),h&&we(Nn,{})]})}):we("div",{children:"No options provided."})};H("default",(function(){return we(it,{children:we(nr,{})})}))}}}))}();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){function t(e){return t="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(e)}var e,n,r,o,i,a,u;function c(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */c=function(){return e};var e={},n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(P){l=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),a=new L(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return _()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=j(a,n);if(u){if(u===h)continue;return u}}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 c=f(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}e.wrap=s;var h={};function d(){}function p(){}function v(){}var y={};l(y,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(E([])));g&&g!==n&&r.call(g,i)&&(y=g);var b=v.prototype=d.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(e,n){function o(i,a,u,c){var l=f(e[i],e,a);if("throw"!==l.type){var s=l.arg,h=s.value;return h&&"object"==t(h)&&r.call(h,"__await")?n.resolve(h.__await).then((function(t){o("next",t,u,c)}),(function(t){o("throw",t,u,c)})):n.resolve(h).then((function(t){s.value=t,u(s)}),(function(t){return o("throw",t,u,c)}))}c(l.arg)}var i;this._invoke=function(t,e){function r(){return new n((function(n,r){o(t,e,n,r)}))}return i=i?i.then(r,r):r()}}function j(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,j(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,h;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function O(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 S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function E(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 n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:_}}function _(){return{value:void 0,done:!0}}return p.prototype=v,l(b,"constructor",v),l(v,"constructor",p),p.displayName=l(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},w(x.prototype),l(x.prototype,a,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new x(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),l(b,u,"Generator"),l(b,i,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.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}},e.values=E,L.prototype={constructor:L,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(S),!t)for(var e in this)"t"===e.charAt(0)&&r.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 n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):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),h},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),S(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}function l(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(l){return void n(l)}u.done?e(c):Promise.resolve(c).then(r,o)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){l(i,r,o,a,u,"next",t)}function u(t){l(i,r,o,a,u,"throw",t)}a(void 0)}))}}function f(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function h(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 d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){p(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function v(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,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(t,e)}(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 y(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}System.register(["./index-legacy.e333988e.js","./useIsMobile-legacy.7fb572d8.js","./keyFactory-legacy.782b8549.js","./useQuery-legacy.7e93cb2c.js"],(function(t,l){"use strict";var h,p,y,m,g,b,w,x,j,O,S,L,E,_,P,C,k,M,A;return{setters:[function(t){h=t.R,p=t.r,y=t.ab,m=t.u,g=t.j,b=t.e,w=t.ac,x=t.s,j=t.C,O=t.c,S=t.p,L=t.G,E=t.ad,_=t.o,P=t.l,C=t.U},function(t){k=t.u},function(t){M=t.d},function(t){A=t.u}],execute:function(){var l=h.createContext({}),T=function(){return p.exports.useContext(l)},G=function(t){var e,n,r=t.children,o=k(),i=v(p.exports.useState(y[0].value),2),a=i[0],u=i[1],c=m().sdkState,s=v(p.exports.useReducer((function(t,e){return d(d({},t),e)}),{location:{lat:(null===(e=c.options)||void 0===e?void 0:e.lat)||43.661337,lng:(null===(n=c.options)||void 0===n?void 0:n.lng)||-79.401903},demographics:{radius:2500}}),2),f=s[0],h=s[1],x=p.exports.useMemo((function(){return{demographicsState:f,setDemographicsState:h,activeCategory:a,setActiveCategory:u}}),[a,u,f,h]);return g(l.Provider,{value:x,children:b(w.Root,{options:{activeTab:a},onChange:function(t){u(t.data)},children:[g(o?w.Select:w.Tabs,{}),r]})})},I=x.div(e||(e=f(["\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n background-color: ",";\n"])),j["--ll-color-background"]),D=x.div(n||(n=f(["\n overflow-y: auto;\n padding: ",";\n"])),j["--ll-spacing-medium"]),N=function(){var t=O().translations;return g(S,{variant:"h3",weight:"--ll-font-weight-bold",children:t.DEMOGRAPHICS_TITLE})},F=x.div(r||(r=f(["\n margin: "," 0;\n"])),j["--ll-spacing-xx-small"]);x.div(o||(o=f(["\n display: flex;\n padding: "," ","\n "," ",";\n"])),j["--ll-spacing-x-small"],j["--ll-spacing-medium"],j["--ll-spacing-xx-small"],j["--ll-spacing-medium"]);var R=x.div(i||(i=f(["\n height: 40px;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: ",";\n"])),j["--ll-spacing-medium"]);var z=function(){var t=T().demographicsState.income;return g(E.AvgIncomeCard,{options:{incomeTypes:(null==t?void 0:t.variables)||[]}})},H=function(){var t=T().demographicsState.population_age;return g(E.PopulationByAgeChart,{options:{labels:(null==t?void 0:t.variables.map((function(t){return t.label})))||[],data:(null==t?void 0:t.variables.map((function(t){return Math.round(100*t.value)})))||[]}})},U=x.div(a||(a=f(["\n display: flex;\n justify-content: space-between;\n gap: ",";\n\n @media (max-width: ","px) {\n flex-wrap: wrap;\n }\n"])),j["--ll-spacing-medium"],_.screenSizes.tablet),Y=function(){var t=T().demographicsState,e=t.housing_tenancy;t.housing_type;return g(U,{children:g(E.OwnersRentersCard,{options:{datasets:(null==e?void 0:e.variables.map((function(t){return{label:t.label,data:Math.round(100*t.value)}})))||[]}})})},B=function(){var t=T().demographicsState,e=t.household_composition,n=(t.family_composition,null==e?void 0:e.variables.map((function(t){return d(d({},t),{},{value:Math.round(100*t.value)})})).filter((function(t){return Math.round(100*t.value)>0})));return g(E.HouseholdCompositionCard,{options:{labels:(null==n?void 0:n.map((function(t){return"".concat(t.value,"% ").concat(t.label)})))||[],data:(null==n?void 0:n.map((function(t){return t.value})))||[]}})},Q=function(){var t=T().demographicsState.commute_mode,e=null==t?void 0:t.variables.map((function(t){return d(d({},t),{},{value:Math.round(100*t.value)})})).filter((function(t){return Math.round(100*t.value)>0}));return g(E.CommuteModeCard,{options:{labels:(null==e?void 0:e.map((function(t){return"".concat(t.value,"% ").concat(t.label)})))||[],data:(null==e?void 0:e.map((function(t){return t.value})))||[]}})},$=function(){var t=T().demographicsState.education_level;return g(E.EducationLevelChart,{options:{labels:(null==t?void 0:t.variables.map((function(t){return t.label})))||[],data:(null==t?void 0:t.variables.map((function(t){return Math.round(100*t.value)})))||[]}})},q=function(){var t=T().demographicsState.mother_tongue,e=null==t?void 0:t.variables.map((function(t){return d(d({},t),{},{value:Math.round(100*t.value)})})).filter((function(t){return t.value>0}));return g(E.MotherTongueChart,{options:{labels:(null==e?void 0:e.map((function(t){return t.label})))||[],data:(null==e?void 0:e.map((function(t){return t.value})))||[]}})},J=function(){var t,e,n,r,o,i,a=T(),u=a.demographicsState,l=a.activeCategory,f=a.setDemographicsState,h=(t={lat:u.location.lat,lng:u.location.lng,radius:u.demographics.radius},e=t.lat,n=t.lng,r=t.radius,o=L().client,i={lat:e,lng:n,radius:r},A(M.list(i),s(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.getDemographics(i));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!i})),v=h.data,y=h.isFetching;p.exports.useEffect((function(){!y&&v&&f(d({},v))}),[y]);return g(F,{children:g(w.Content,{options:{value:l},children:function(){if(y)return g(R,{children:g(P,{})});switch(l){case"income":return g(z,{});case"population":return g(H,{});case"housing":return g(Y,{});case"household":return g(B,{});case"commute":return g(Q,{});case"education":return g($,{});case"languages":return g(q,{});default:return b("div",{children:[l," tab"]})}}()})})},K=x.div(u||(u=f(["\n padding: ",";\n\n a {\n justify-content: end;\n }\n"])),j["--ll-spacing-small"]),V=function(){return g(K,{children:g(C.Root,{})})};t("default",(function(){return g(G,{children:g(I,{children:b(D,{children:[g(N,{}),g(J,{}),g(V,{})]})})})}))}}}))}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){function e(e,o){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);o&&(t=t.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),r.push.apply(r,t)}return r}function o(o){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?e(Object(i),!0).forEach((function(e){r(o,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(i,e))}))}return o}function r(e,o,r){return o in e?Object.defineProperty(e,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[o]=r,e}System.register([],(function(e,r){"use strict";return{execute:function(){e("translations",o(o(o({},{RADIUS:"Radius",LIMIT:"Limit",EXPORT:"Export",SEARCH_MAP:"Search map..."}),{LOCATION:"Location",SCORES:"Scores",POIS:"Points of interest",SCHOOLS:"Schools",DEMOGRAPHICS:"Demographics",PROFILES:"Profiles"}),{LOCATION_TEXT:"Set the location for your data query. Long-press on the map to move the pin.",SCORES_TEXT:"Configure Local Logic Scores for your specified location.",POIS_TEXT:"Configure Local Logic Points of Interest (POIs) for your specified location.",SCHOOLS_TEXT:"Configure Local Logic Schools for your specified location.",DEMOGRAPHICS_TEXT:"Configure Local Logic Demographics for your specified location.",PROFILES_TEXT:"Local Profiles returns qualitative and localized information for your specified location."}))}}}))}();
|
|
1
|
+
!function(){function e(e,o){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);o&&(t=t.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),r.push.apply(r,t)}return r}function o(o){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?e(Object(i),!0).forEach((function(e){r(o,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(i,e))}))}return o}function r(e,o,r){return o in e?Object.defineProperty(e,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[o]=r,e}System.register([],(function(e,r){"use strict";return{execute:function(){e("translations",o(o(o({},{RADIUS:"Radius",LIMIT:"Limit",EXPORT:"Export",SEARCH_MAP:"Search map..."}),{LOCATION:"Location",SCORES:"Scores",POIS:"Points of interest",SCHOOLS:"Schools",DEMOGRAPHICS:"Demographics",PROFILES:"Profiles",TABLE:"Table"}),{LOCATION_TEXT:"Set the location for your data query. Long-press on the map to move the pin.",SCORES_TEXT:"Configure Local Logic Scores for your specified location.",POIS_TEXT:"Configure Local Logic Points of Interest (POIs) for your specified location.",SCHOOLS_TEXT:"Configure Local Logic Schools for your specified location.",DEMOGRAPHICS_TEXT:"Configure Local Logic Demographics for your specified location.",PROFILES_TEXT:"Local Profiles returns qualitative and localized information for your specified location.",TABLE_TEXT:"Table show an excerpt of the data for your specified location."}))}}}))}();
|